compilation passes and 1 UE simulation ok.
This commit is contained in:
@@ -685,13 +685,6 @@ function main() {
|
|||||||
oaisim_build_dir=oaisim_build_oai
|
oaisim_build_dir=oaisim_build_oai
|
||||||
oaisim_exec=oaisim
|
oaisim_exec=oaisim
|
||||||
fi
|
fi
|
||||||
# mandatory shared lib
|
|
||||||
compilations \
|
|
||||||
$oaisim_build_dir $config_libconfig_shlib \
|
|
||||||
lib$config_libconfig_shlib.so $dbin/lib$config_libconfig_shlib.so
|
|
||||||
compilations \
|
|
||||||
$oaisim_build_dir coding \
|
|
||||||
libcoding.so $dbin/libcoding.so
|
|
||||||
|
|
||||||
echo_info "Compiling $oaisim_exec ($oaisim_build_dir)"
|
echo_info "Compiling $oaisim_exec ($oaisim_build_dir)"
|
||||||
cmake_file=$DIR/$oaisim_build_dir/CMakeLists.txt
|
cmake_file=$DIR/$oaisim_build_dir/CMakeLists.txt
|
||||||
@@ -711,6 +704,13 @@ function main() {
|
|||||||
compilations \
|
compilations \
|
||||||
$oaisim_build_dir $oaisim_exec \
|
$oaisim_build_dir $oaisim_exec \
|
||||||
$oaisim_exec $dbin/$oaisim_exec.$REL
|
$oaisim_exec $dbin/$oaisim_exec.$REL
|
||||||
|
compilations \
|
||||||
|
$oaisim_build_dir $config_libconfig_shlib \
|
||||||
|
lib$config_libconfig_shlib.so $dbin/lib$config_libconfig_shlib.so
|
||||||
|
compilations \
|
||||||
|
$oaisim_build_dir coding \
|
||||||
|
libcoding.so $dbin/libcoding.so
|
||||||
|
|
||||||
|
|
||||||
if [ "$NOS1" != "1" ] ; then
|
if [ "$NOS1" != "1" ] ; then
|
||||||
|
|
||||||
|
|||||||
@@ -407,7 +407,7 @@ void recv_IF4p5(RU_t *ru, int *frame, int *subframe, uint16_t *packet_type, uint
|
|||||||
PRACH_BLOCK_SIZE_BYTES);
|
PRACH_BLOCK_SIZE_BYTES);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOG_I(PHY,"PRACH_IF4p5: CC_id %d : frame %d, subframe %d => %d dB\n",ru->idx,*frame,*subframe,
|
LOG_D(PHY,"PRACH_IF4p5: CC_id %d : frame %d, subframe %d => %d dB\n",ru->idx,*frame,*subframe,
|
||||||
dB_fixed(signal_energy((int*)&prach_rxsigF[0][0],839)));
|
dB_fixed(signal_energy((int*)&prach_rxsigF[0][0],839)));
|
||||||
for (idx=0;idx<ru->num_eNB;idx++) ru->wakeup_prach_eNB(ru->eNB_list[idx],ru,*frame,*subframe);
|
for (idx=0;idx<ru->num_eNB;idx++) ru->wakeup_prach_eNB(ru->eNB_list[idx],ru,*frame,*subframe);
|
||||||
|
|
||||||
|
|||||||
@@ -1514,7 +1514,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
|||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
send_IF4p5(ru, ru->proc.frame_prach, ru->proc.subframe_prach, IF4p5_PRACH);
|
send_IF4p5(ru, ru->proc.frame_prach, ru->proc.subframe_prach, IF4p5_PRACH);
|
||||||
|
LOG_D(PHY,"SFN/SF %d.%d: Sending PRACH over IF4p5\n",ru->proc.frame_prach,ru->proc.subframe_prach);
|
||||||
return;
|
return;
|
||||||
} else if (eNB!=NULL) {
|
} else if (eNB!=NULL) {
|
||||||
|
|
||||||
|
|||||||
@@ -834,7 +834,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
|
|||||||
else {
|
else {
|
||||||
for (i=0;i<number_ul_pdu;i++) {
|
for (i=0;i<number_ul_pdu;i++) {
|
||||||
ul_config_pdu = &UL_req->ul_config_request_body.ul_config_pdu_list[i];
|
ul_config_pdu = &UL_req->ul_config_request_body.ul_config_pdu_list[i];
|
||||||
LOG_I(PHY,"NFAPI: ul_pdu %d : type %d\n",i,ul_config_pdu->pdu_type);
|
LOG_D(PHY,"NFAPI: ul_pdu %d : type %d\n",i,ul_config_pdu->pdu_type);
|
||||||
AssertFatal(ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_ULSCH_PDU_TYPE ||
|
AssertFatal(ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_ULSCH_PDU_TYPE ||
|
||||||
ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_ULSCH_HARQ_PDU_TYPE ||
|
ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_ULSCH_HARQ_PDU_TYPE ||
|
||||||
ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_ULSCH_CQI_RI_PDU_TYPE ||
|
ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_ULSCH_CQI_RI_PDU_TYPE ||
|
||||||
|
|||||||
@@ -1898,7 +1898,7 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,const
|
|||||||
|
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_UESPEC, 1 );
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_UESPEC, 1 );
|
||||||
|
|
||||||
LOG_I(PHY,"[eNB %d] Frame %d: Doing phy_procedures_eNB_uespec_RX(%d)\n",eNB->Mod_id,frame, subframe);
|
LOG_D(PHY,"[eNB %d] Frame %d: Doing phy_procedures_eNB_uespec_RX(%d)\n",eNB->Mod_id,frame, subframe);
|
||||||
|
|
||||||
eNB->rb_mask_ul[0]=0;
|
eNB->rb_mask_ul[0]=0;
|
||||||
eNB->rb_mask_ul[1]=0;
|
eNB->rb_mask_ul[1]=0;
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ void prach_procedures(PHY_VARS_eNB *eNB
|
|||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
|
|
||||||
LOG_I(PHY,"[RAPROC] Frame %d, subframe %d : Most likely preamble %d, energy %d dB delay %d (prach_energy counter %d)\n",
|
LOG_D(PHY,"[RAPROC] Frame %d, subframe %d : Most likely preamble %d, energy %d dB delay %d (prach_energy counter %d)\n",
|
||||||
frame,subframe,
|
frame,subframe,
|
||||||
max_preamble[0],
|
max_preamble[0],
|
||||||
max_preamble_energy[0]/10,
|
max_preamble_energy[0]/10,
|
||||||
|
|||||||
@@ -391,7 +391,7 @@ void eNB_top(PHY_VARS_eNB *eNB, int frame_rx, int subframe_rx, char *string)
|
|||||||
proc->frame_tx = proc_rxtx->frame_tx;
|
proc->frame_tx = proc_rxtx->frame_tx;
|
||||||
proc_rxtx->timestamp_tx = proc->timestamp_tx;
|
proc_rxtx->timestamp_tx = proc->timestamp_tx;
|
||||||
|
|
||||||
LOG_I(PHY,"RXTX for TX: %d.%d, RX: %d.%d\n",proc_rxtx->frame_tx,proc_rxtx->subframe_tx,proc_rxtx->frame_rx,proc_rxtx->subframe_rx);
|
LOG_D(PHY,"RXTX for TX: %d.%d, RX: %d.%d\n",proc_rxtx->frame_tx,proc_rxtx->subframe_tx,proc_rxtx->frame_rx,proc_rxtx->subframe_rx);
|
||||||
|
|
||||||
if (rxtx(eNB,proc_rxtx,string) < 0) LOG_E(PHY,"eNB %d CC_id %d failed during execution\n",eNB->Mod_id,eNB->CC_id);
|
if (rxtx(eNB,proc_rxtx,string) < 0) LOG_E(PHY,"eNB %d CC_id %d failed during execution\n",eNB->Mod_id,eNB->CC_id);
|
||||||
}
|
}
|
||||||
@@ -630,7 +630,7 @@ static void* eNB_thread_prach( void* param ) {
|
|||||||
|
|
||||||
if (wait_on_condition(&proc->mutex_prach,&proc->cond_prach,&proc->instance_cnt_prach,"eNB_prach_thread") < 0) break;
|
if (wait_on_condition(&proc->mutex_prach,&proc->cond_prach,&proc->instance_cnt_prach,"eNB_prach_thread") < 0) break;
|
||||||
|
|
||||||
LOG_I(PHY,"Running eNB prach procedures\n");
|
LOG_D(PHY,"Running eNB prach procedures\n");
|
||||||
prach_procedures(eNB
|
prach_procedures(eNB
|
||||||
#ifdef Rel14
|
#ifdef Rel14
|
||||||
,0
|
,0
|
||||||
|
|||||||
+55
-51
@@ -1097,7 +1097,7 @@ static void* ru_thread_prach( void* param ) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
LOG_I(PHY,"Running rx_prach in %d.%d\n",proc->frame_prach,proc->subframe_prach);
|
LOG_D(PHY,"Running rx_prach in %d.%d\n",proc->frame_prach,proc->subframe_prach);
|
||||||
rx_prach(NULL,
|
rx_prach(NULL,
|
||||||
ru,
|
ru,
|
||||||
NULL,
|
NULL,
|
||||||
@@ -1289,7 +1289,7 @@ 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_I(PHY,"Frame %d, Subframe %d: RU %d done (wait_cnt %d),RU_mask[%d] %x\n",
|
LOG_D(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]);
|
ru->proc.frame_rx,ru->proc.subframe_rx,ru->idx,ru->wait_cnt,ru->proc.subframe_rx,proc->RU_mask[ru->proc.subframe_rx]);
|
||||||
|
|
||||||
clock_gettime(CLOCK_MONOTONIC,&ru->proc.t[ru->proc.subframe_rx]);
|
clock_gettime(CLOCK_MONOTONIC,&ru->proc.t[ru->proc.subframe_rx]);
|
||||||
@@ -1612,7 +1612,7 @@ static void* ru_thread_control( void* param ) {
|
|||||||
&rru_config_msg,
|
&rru_config_msg,
|
||||||
msg_len))<0) {
|
msg_len))<0) {
|
||||||
LOG_D(PHY,"Waiting msg for RU %d\n", ru->idx);
|
LOG_D(PHY,"Waiting msg for RU %d\n", ru->idx);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
switch(rru_config_msg.type)
|
switch(rru_config_msg.type)
|
||||||
@@ -1845,7 +1845,7 @@ static void* ru_thread( void* param ) {
|
|||||||
PHY_VARS_eNB **eNB_list = ru->eNB_list;
|
PHY_VARS_eNB **eNB_list = ru->eNB_list;
|
||||||
PHY_VARS_eNB *eNB=eNB_list[0];
|
PHY_VARS_eNB *eNB=eNB_list[0];
|
||||||
eNB_proc_t *eNBproc = &eNB->proc;
|
eNB_proc_t *eNBproc = &eNB->proc;
|
||||||
|
int ret;
|
||||||
|
|
||||||
// set default return value
|
// set default return value
|
||||||
thread_top_init("ru_thread",0,870000,1000000,1000000);
|
thread_top_init("ru_thread",0,870000,1000000,1000000);
|
||||||
@@ -1862,8 +1862,8 @@ static void* ru_thread( void* param ) {
|
|||||||
phy_init_RU(ru);
|
phy_init_RU(ru);
|
||||||
|
|
||||||
|
|
||||||
ret = openair0_device_load(&ru->rfdevice,&ru->openair0_cfg);
|
ret = openair0_device_load(&ru->rfdevice,&ru->openair0_cfg);
|
||||||
}
|
|
||||||
if (setup_RU_buffers(ru)!=0) {
|
if (setup_RU_buffers(ru)!=0) {
|
||||||
printf("Exiting, cannot initialize RU Buffers\n");
|
printf("Exiting, cannot initialize RU Buffers\n");
|
||||||
exit(-1);
|
exit(-1);
|
||||||
@@ -1891,9 +1891,9 @@ static void* ru_thread( void* param ) {
|
|||||||
// wait to be woken up
|
// wait to be woken up
|
||||||
if (ru->function!=eNodeB_3GPP && ru->has_ctrl_prt == 1) {
|
if (ru->function!=eNodeB_3GPP && ru->has_ctrl_prt == 1) {
|
||||||
if (wait_on_condition(&ru->proc.mutex_ru,&ru->proc.cond_ru_thread,&ru->proc.instance_cnt_ru,"ru_thread")<0) break;
|
if (wait_on_condition(&ru->proc.mutex_ru,&ru->proc.cond_ru_thread,&ru->proc.instance_cnt_ru,"ru_thread")<0) break;
|
||||||
|
}
|
||||||
else wait_sync("ru_thread");
|
else wait_sync("ru_thread");
|
||||||
|
|
||||||
if (ru->is_slave == 0) AssertFatal(ru->state == RU_RUN,"ru-%d state = %s != RU_RUN\n",ru->idx,ru_states[ru->state]);
|
if (ru->is_slave == 0) AssertFatal(ru->state == RU_RUN,"ru-%d state = %s != RU_RUN\n",ru->idx,ru_states[ru->state]);
|
||||||
else if (ru->is_slave == 1) AssertFatal(ru->state == RU_SYNC || ru->state == RU_RUN,"ru %d state = %s != RU_SYNC or RU_RUN\n",ru->idx,ru_states[ru->state]);
|
else if (ru->is_slave == 1) AssertFatal(ru->state == RU_SYNC || ru->state == RU_RUN,"ru %d state = %s != RU_SYNC or RU_RUN\n",ru->idx,ru_states[ru->state]);
|
||||||
// Start RF device if any
|
// Start RF device if any
|
||||||
@@ -1903,11 +1903,11 @@ static void* ru_thread( void* param ) {
|
|||||||
else LOG_I(PHY,"RU %d rf device ready\n",ru->idx);
|
else LOG_I(PHY,"RU %d rf device ready\n",ru->idx);
|
||||||
}
|
}
|
||||||
else LOG_D(PHY,"RU %d no rf device\n",ru->idx);
|
else LOG_D(PHY,"RU %d no rf device\n",ru->idx);
|
||||||
|
|
||||||
|
|
||||||
// if an asnych_rxtx thread exists
|
// if an asnych_rxtx thread exists
|
||||||
// wakeup the thread because the devices are ready at this point
|
// wakeup the thread because the devices are ready at this point
|
||||||
|
|
||||||
LOG_D(PHY,"Locking asynch mutex\n");
|
LOG_D(PHY,"Locking asynch mutex\n");
|
||||||
if ((ru->fh_south_asynch_in)||(ru->fh_north_asynch_in)) {
|
if ((ru->fh_south_asynch_in)||(ru->fh_north_asynch_in)) {
|
||||||
pthread_mutex_lock(&proc->mutex_asynch_rxtx);
|
pthread_mutex_lock(&proc->mutex_asynch_rxtx);
|
||||||
@@ -1916,15 +1916,15 @@ static void* ru_thread( void* param ) {
|
|||||||
pthread_cond_signal(&proc->cond_asynch_rxtx);
|
pthread_cond_signal(&proc->cond_asynch_rxtx);
|
||||||
}
|
}
|
||||||
else LOG_D(PHY,"RU %d no asynch_south interface\n",ru->idx);
|
else LOG_D(PHY,"RU %d no asynch_south interface\n",ru->idx);
|
||||||
|
|
||||||
// if this is a slave RRU, try to synchronize on the DL frequency
|
// if this is a slave RRU, try to synchronize on the DL frequency
|
||||||
if ((ru->is_slave == 1) && (ru->if_south == LOCAL_RF)) do_ru_synch(ru);
|
if ((ru->is_slave == 1) && (ru->if_south == LOCAL_RF)) do_ru_synch(ru);
|
||||||
|
|
||||||
|
|
||||||
LOG_D(PHY,"Starting steady-state operation\n");
|
LOG_D(PHY,"Starting steady-state operation\n");
|
||||||
// This is a forever while loop, it loops over subframes which are scheduled by incoming samples from HW devices
|
// This is a forever while loop, it loops over subframes which are scheduled by incoming samples from HW devices
|
||||||
while (ru->state == RU_RUN) {
|
while (ru->state == RU_RUN) {
|
||||||
|
|
||||||
// these are local subframe/frame counters to check that we are in synch with the fronthaul timing.
|
// these are local subframe/frame counters to check that we are in synch with the fronthaul timing.
|
||||||
// They are set on the first rx/tx in the underly FH routines.
|
// They are set on the first rx/tx in the underly FH routines.
|
||||||
if (subframe==9) {
|
if (subframe==9) {
|
||||||
@@ -1934,8 +1934,8 @@ static void* ru_thread( void* param ) {
|
|||||||
} else {
|
} else {
|
||||||
subframe++;
|
subframe++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// synchronization on input FH interface, acquire signals/data and block
|
// synchronization on input FH interface, acquire signals/data and block
|
||||||
if (ru->stop_rf && ru->cmd == STOP_RU) {
|
if (ru->stop_rf && ru->cmd == STOP_RU) {
|
||||||
ru->stop_rf(ru);
|
ru->stop_rf(ru);
|
||||||
@@ -1951,38 +1951,38 @@ static void* ru_thread( void* param ) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (oai_exit == 1) break;
|
if (oai_exit == 1) break;
|
||||||
|
|
||||||
if (ru->fh_south_in && ru->state == RU_RUN ) ru->fh_south_in(ru,&frame,&subframe);
|
if (ru->fh_south_in && ru->state == RU_RUN ) ru->fh_south_in(ru,&frame,&subframe);
|
||||||
else AssertFatal(1==0, "No fronthaul interface at south port");
|
else AssertFatal(1==0, "No fronthaul interface at south port");
|
||||||
|
|
||||||
if (ru->wait_cnt > 0) {
|
if (ru->wait_cnt > 0) {
|
||||||
|
|
||||||
ru->wait_cnt--;
|
ru->wait_cnt--;
|
||||||
|
|
||||||
|
|
||||||
LOG_I(PHY,"RU thread %d, frame %d, subframe %d, wait_cnt %d \n",ru->idx, frame, subframe, ru->wait_cnt);
|
LOG_I(PHY,"RU thread %d, frame %d, subframe %d, wait_cnt %d \n",ru->idx, frame, subframe, ru->wait_cnt);
|
||||||
|
|
||||||
if (ru->if_south!=LOCAL_RF && ru->wait_cnt <=20 && subframe == 5 && frame != RC.ru[0]->proc.frame_rx && resynch_done == 0) {
|
if (ru->if_south!=LOCAL_RF && ru->wait_cnt <=20 && subframe == 5 && frame != RC.ru[0]->proc.frame_rx && resynch_done == 0) {
|
||||||
// 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;
|
ru->cmd=WAIT_RESYNCH;
|
||||||
LOG_D(PHY,"Sending Frame Resynch %d to RRU %d\n", RC.ru[0]->proc.frame_rx,ru->idx);
|
LOG_D(PHY,"Sending Frame Resynch %d to RRU %d\n", RC.ru[0]->proc.frame_rx,ru->idx);
|
||||||
AssertFatal((ru->ifdevice.trx_ctlsend_func(&ru->ifdevice,&rru_config_msg,rru_config_msg.len)!=-1),"Failed to send msg to RAU\n");
|
AssertFatal((ru->ifdevice.trx_ctlsend_func(&ru->ifdevice,&rru_config_msg,rru_config_msg.len)!=-1),"Failed to send msg to RAU\n");
|
||||||
resynch_done=1;
|
resynch_done=1;
|
||||||
}
|
}
|
||||||
wakeup_eNBs(ru);
|
wakeup_eNBs(ru);
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
|
|
||||||
LOG_D(PHY,"RU thread %d, frame %d, subframe %d \n",
|
LOG_D(PHY,"RU thread %d, frame %d, subframe %d \n",
|
||||||
ru->idx,frame,subframe);
|
ru->idx,frame,subframe);
|
||||||
|
|
||||||
if ((ru->do_prach>0) && (is_prach_subframe(fp, proc->frame_rx, proc->subframe_rx)==1)) {
|
if ((ru->do_prach>0) && (is_prach_subframe(fp, proc->frame_rx, proc->subframe_rx)==1)) {
|
||||||
LOG_I(PHY,"Waking up prach for %d.%d\n",proc->frame_rx,proc->subframe_rx);
|
LOG_D(PHY,"Waking up prach for %d.%d\n",proc->frame_rx,proc->subframe_rx);
|
||||||
wakeup_prach_ru(ru);
|
wakeup_prach_ru(ru);
|
||||||
}
|
}
|
||||||
#ifdef Rel14
|
#ifdef Rel14
|
||||||
@@ -1990,14 +1990,14 @@ static void* ru_thread( void* param ) {
|
|||||||
wakeup_prach_ru_br(ru);
|
wakeup_prach_ru_br(ru);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// adjust for timing offset between RU
|
// adjust for timing offset between RU
|
||||||
if (ru->idx!=0) proc->frame_tx = (proc->frame_tx+proc->frame_offset)&1023;
|
if (ru->idx!=0) proc->frame_tx = (proc->frame_tx+proc->frame_offset)&1023;
|
||||||
|
|
||||||
// At this point, all information for subframe has been received on FH interface
|
// At this point, all information for subframe has been received on FH interface
|
||||||
// If this proc is to provide synchronization, do so
|
// If this proc is to provide synchronization, do so
|
||||||
wakeup_slaves(proc);
|
wakeup_slaves(proc);
|
||||||
|
|
||||||
// do RX front-end processing (frequency-shift, dft) if needed
|
// do RX front-end processing (frequency-shift, dft) if needed
|
||||||
if (ru->feprx) ru->feprx(ru);
|
if (ru->feprx) ru->feprx(ru);
|
||||||
|
|
||||||
@@ -2019,18 +2019,18 @@ static void* ru_thread( void* param ) {
|
|||||||
if (ru->fh_north_out) ru->fh_north_out(ru);
|
if (ru->fh_north_out) ru->fh_north_out(ru);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} // while !oai_exit
|
} // while !oai_exit
|
||||||
|
|
||||||
|
|
||||||
printf( "Exiting ru_thread \n");
|
printf( "Exiting ru_thread \n");
|
||||||
|
|
||||||
if (ru->stop_rf != NULL) {
|
if (ru->stop_rf != NULL) {
|
||||||
if (ru->stop_rf(ru) != 0)
|
if (ru->stop_rf(ru) != 0)
|
||||||
LOG_E(HW,"Could not stop the RF device\n");
|
LOG_E(HW,"Could not stop the RF device\n");
|
||||||
else LOG_I(PHY,"RU %d rf device stopped\n",ru->idx);
|
else LOG_I(PHY,"RU %d rf device stopped\n",ru->idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2886,12 +2886,16 @@ void RCconfig_RU(void) {
|
|||||||
|
|
||||||
// Check if control port set
|
// Check if control port set
|
||||||
if (!(config_isparamset(RUParamList.paramarray[j],RU_REMOTE_PORTC_IDX)) ){
|
if (!(config_isparamset(RUParamList.paramarray[j],RU_REMOTE_PORTC_IDX)) ){
|
||||||
RC.ru[j]->eth_params.my_portc = *(RUParamList.paramarray[j][RU_LOCAL_PORTC_IDX].uptr);
|
printf("Removing control port for RU %d\n",j);
|
||||||
RC.ru[j]->eth_params.remote_portc = *(RUParamList.paramarray[j][RU_REMOTE_PORTC_IDX].uptr);
|
|
||||||
|
|
||||||
RC.ru[j]->has_ctrl_prt = 0;
|
RC.ru[j]->has_ctrl_prt = 0;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
RC.ru[j]->eth_params.my_portc = *(RUParamList.paramarray[j][RU_LOCAL_PORTC_IDX].uptr);
|
||||||
|
RC.ru[j]->eth_params.remote_portc = *(RUParamList.paramarray[j][RU_REMOTE_PORTC_IDX].uptr);
|
||||||
|
printf(" Control port %u \n",RC.ru[j]->eth_params.my_portc);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "udp") == 0) {
|
if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "udp") == 0) {
|
||||||
RC.ru[j]->if_south = LOCAL_RF;
|
RC.ru[j]->if_south = LOCAL_RF;
|
||||||
|
|||||||
@@ -497,7 +497,7 @@ void do_UL_sig(channel_desc_t *UE2RU[NUMBER_OF_UE_MAX][NUMBER_OF_RU_MAX][MAX_NUM
|
|||||||
if (((double)PHY_vars_UE_g[UE_id][CC_id]->tx_power_dBm[subframe] +
|
if (((double)PHY_vars_UE_g[UE_id][CC_id]->tx_power_dBm[subframe] +
|
||||||
UE2RU[UE_id][ru_id][CC_id]->path_loss_dB) <= -125.0) {
|
UE2RU[UE_id][ru_id][CC_id]->path_loss_dB) <= -125.0) {
|
||||||
// don't simulate a UE that is too weak
|
// don't simulate a UE that is too weak
|
||||||
LOG_D(OCM,"[SIM][UL] ULPOWERS UE %d tx_pwr %d dBm (num_RE %d) for subframe %d (sf_offset %d)\n",
|
LOG_D(PHY,"[SIM][UL] ULPOWERS UE %d tx_pwr %d dBm (num_RE %d) for subframe %d (sf_offset %d)\n",
|
||||||
UE_id,
|
UE_id,
|
||||||
PHY_vars_UE_g[UE_id][CC_id]->tx_power_dBm[subframe],
|
PHY_vars_UE_g[UE_id][CC_id]->tx_power_dBm[subframe],
|
||||||
PHY_vars_UE_g[UE_id][CC_id]->tx_total_RE[subframe],
|
PHY_vars_UE_g[UE_id][CC_id]->tx_total_RE[subframe],
|
||||||
@@ -516,7 +516,7 @@ void do_UL_sig(channel_desc_t *UE2RU[NUMBER_OF_UE_MAX][NUMBER_OF_RU_MAX][MAX_NUM
|
|||||||
1,
|
1,
|
||||||
NULL,
|
NULL,
|
||||||
PHY_vars_UE_g[UE_id][CC_id]->tx_total_RE[subframe]); // This make the previous argument the total power
|
PHY_vars_UE_g[UE_id][CC_id]->tx_total_RE[subframe]); // This make the previous argument the total power
|
||||||
LOG_D(OCM,"[SIM][UL] ULPOWERS UE %d tx_pwr %f dBm (target %d dBm, num_RE %d) for subframe %d (sf_offset %d)\n",
|
LOG_D(PHY,"[SIM][UL] ULPOWERS UE %d tx_pwr %f dBm (target %d dBm, num_RE %d) for subframe %d (sf_offset %d)\n",
|
||||||
UE_id,
|
UE_id,
|
||||||
10*log10(tx_pwr*PHY_vars_UE_g[UE_id][CC_id]->tx_total_RE[subframe]),
|
10*log10(tx_pwr*PHY_vars_UE_g[UE_id][CC_id]->tx_total_RE[subframe]),
|
||||||
PHY_vars_UE_g[UE_id][CC_id]->tx_power_dBm[subframe],
|
PHY_vars_UE_g[UE_id][CC_id]->tx_power_dBm[subframe],
|
||||||
|
|||||||
@@ -443,13 +443,13 @@ int olg_config(void)
|
|||||||
//set_log(OCM, LOG_INFO, 20);
|
//set_log(OCM, LOG_INFO, 20);
|
||||||
//set_log(OTG, LOG_INFO, 1);
|
//set_log(OTG, LOG_INFO, 1);
|
||||||
set_comp_log(OCG, LOG_ERR, 0x15,1);
|
set_comp_log(OCG, LOG_ERR, 0x15,1);
|
||||||
set_comp_log(EMU, LOG_DEBUG, 0x15,20);
|
set_comp_log(EMU, LOG_INFO, 0x15,20);
|
||||||
set_comp_log(MAC, LOG_TRACE, 0x15,1);
|
set_comp_log(MAC, LOG_TRACE, 0x15,1);
|
||||||
set_comp_log(RLC, LOG_TRACE, 0x15,1);
|
set_comp_log(RLC, LOG_TRACE, 0x15,1);
|
||||||
set_comp_log(PHY, LOG_TRACE, 0x15, 1);
|
set_comp_log(PHY, LOG_TRACE, 0x15, 1);
|
||||||
set_comp_log(PDCP, LOG_DEBUG, 0x15,1);
|
set_comp_log(PDCP, LOG_DEBUG, 0x15,1);
|
||||||
set_comp_log(RRC, LOG_DEBUG, 0x15,1);
|
set_comp_log(RRC, LOG_DEBUG, 0x15,1);
|
||||||
set_comp_log(OCM, LOG_DEBUG, 0x15,20);
|
set_comp_log(OCM, LOG_INFO, 0x15,20);
|
||||||
set_comp_log(OTG, LOG_DEBUG, 0x15,1);
|
set_comp_log(OTG, LOG_DEBUG, 0x15,1);
|
||||||
set_comp_log(OMG, LOG_NOTICE, 0x15,1);
|
set_comp_log(OMG, LOG_NOTICE, 0x15,1);
|
||||||
set_comp_log(OPT, LOG_ERR, 0x15,1);
|
set_comp_log(OPT, LOG_ERR, 0x15,1);
|
||||||
|
|||||||
@@ -1072,7 +1072,7 @@ int ru_trx_read(openair0_device *device, openair0_timestamp *ptimestamp, void **
|
|||||||
*ptimestamp = last_ru_rx_timestamp[ru_id][CC_id];
|
*ptimestamp = last_ru_rx_timestamp[ru_id][CC_id];
|
||||||
|
|
||||||
|
|
||||||
LOG_D(EMU,"RU_trx_read nsamps %d TS(%llu,%llu) => subframe %d\n",nsamps,
|
LOG_D(PHY,"RU_trx_read nsamps %d TS(%llu,%llu) => subframe %d\n",nsamps,
|
||||||
(unsigned long long)current_ru_rx_timestamp[ru_id][CC_id],
|
(unsigned long long)current_ru_rx_timestamp[ru_id][CC_id],
|
||||||
(unsigned long long)last_ru_rx_timestamp[ru_id][CC_id],
|
(unsigned long long)last_ru_rx_timestamp[ru_id][CC_id],
|
||||||
(int)((*ptimestamp/RC.ru[ru_id]->frame_parms.samples_per_tti)%10));
|
(int)((*ptimestamp/RC.ru[ru_id]->frame_parms.samples_per_tti)%10));
|
||||||
@@ -1087,8 +1087,9 @@ int ru_trx_read(openair0_device *device, openair0_timestamp *ptimestamp, void **
|
|||||||
|
|
||||||
|
|
||||||
subframe = (last_ru_rx_timestamp[ru_id][CC_id]/RC.ru[ru_id]->frame_parms.samples_per_tti)%10;
|
subframe = (last_ru_rx_timestamp[ru_id][CC_id]/RC.ru[ru_id]->frame_parms.samples_per_tti)%10;
|
||||||
if (subframe_select(&RC.ru[ru_id]->frame_parms,subframe) != SF_DL) {
|
if (RC.ru[ru_id]->frame_parms.frame_type == FDD ||
|
||||||
LOG_D(EMU,"RU_trx_read generating UL subframe %d (Ts %llu, current TS %llu)\n",
|
subframe_select(&RC.ru[ru_id]->frame_parms,subframe) != SF_DL) {
|
||||||
|
LOG_D(PHY,"RU_trx_read generating UL subframe %d (Ts %llu, current TS %llu)\n",
|
||||||
subframe,(unsigned long long)*ptimestamp,
|
subframe,(unsigned long long)*ptimestamp,
|
||||||
(unsigned long long)current_ru_rx_timestamp[ru_id][CC_id]);
|
(unsigned long long)current_ru_rx_timestamp[ru_id][CC_id]);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user