Commit 4fdbfc31 authored by Wang Tsu-Han's avatar Wang Tsu-Han

adding timing check for emulate-rf

parent 7e10daaf
......@@ -463,6 +463,7 @@ typedef struct RU_proc_t_s {
/// pipeline ready state
int ru_rx_ready;
int ru_tx_ready;
int emulate_rf_busy;
} RU_proc_t;
/// Context data structure for eNB subframe processing
......
......@@ -644,6 +644,7 @@ int wakeup_rxtx(PHY_VARS_eNB *eNB,RU_t *ru) {
}
pthread_mutex_unlock( &proc_rxtx0->mutex_rxtx );
ru_proc->emulate_rf_busy = 0;
return(0);
}
......
......@@ -122,6 +122,7 @@ extern volatile int oai_exit;
extern int emulate_rf;
extern int numerology;
extern int fepw;
extern int single_thread_flag;
extern void phy_init_RU(RU_t*);
......@@ -703,6 +704,11 @@ static void* emulatedRF_thread(void* param) {
wait_sync("emulatedRF_thread");
while(!oai_exit){
nanosleep(&req, (struct timespec *)NULL);
if(proc->emulate_rf_busy )
{
LOG_E(PHY,"rf being delayed in emulated RF\n");
}
proc->emulate_rf_busy = 1;
pthread_mutex_lock(&proc->mutex_emulateRF);
++proc->instance_cnt_emulateRF;
pthread_mutex_unlock(&proc->mutex_emulateRF);
......@@ -1652,7 +1658,7 @@ static void* ru_thread( void* param ) {
// wakeup all eNB processes waiting for this RU
if (ru->num_eNB>0) wakeup_eNBs(ru);
if(get_nprocs() <= 4){
if(get_nprocs() <= 4 || single_thread_flag){
// do TX front-end processing if needed (precoding and/or IDFTs)
if (ru->feptx_prec) ru->feptx_prec(ru);
......@@ -1664,6 +1670,7 @@ static void* ru_thread( void* param ) {
if (ru->fh_north_out) ru->fh_north_out(ru);
}
proc->emulate_rf_busy = 0;
}
}
......
......@@ -218,7 +218,7 @@ extern void init_eNB_afterRU(void);
int transmission_mode=1;
int emulate_rf = 0;
int numerology = 0;
int numerology = 2;
int codingw = 0;
int fepw = 0;
......
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