Commit 2c5e5c7a authored by Wang Tsu-Han's avatar Wang Tsu-Han

print removel and config file chenge back to one RU

parent 12b81a5b
...@@ -188,18 +188,6 @@ RUs = ( ...@@ -188,18 +188,6 @@ RUs = (
max_rxgain = 116; max_rxgain = 116;
eNB_instances = [0]; eNB_instances = [0];
sdr_addrs = "type=x300"; sdr_addrs = "type=x300";
},
{
local_rf = "yes"
nb_tx = 1
nb_rx = 1
att_tx = 0
att_rx = 0;
bands = [7];
max_pdschReferenceSignalPower = -27;
max_rxgain = 116;
eNB_instances = [0];
sdr_addrs = "type=x300";
} }
); );
......
...@@ -426,14 +426,11 @@ static void* L1_thread( void* param ) { ...@@ -426,14 +426,11 @@ static void* L1_thread( void* param ) {
if (rxtx(eNB,proc,thread_name) < 0) break; if (rxtx(eNB,proc,thread_name) < 0) break;
} }
if(get_thread_parallel_conf() == PARALLEL_RU_L1_SPLIT) phy_procedures_eNB_TX(eNB, proc, 1);
if (release_thread(&proc->mutex,&proc->instance_cnt,thread_name)<0) break; if (release_thread(&proc->mutex,&proc->instance_cnt,thread_name)<0) break;
if (nfapi_mode!=2){ if (nfapi_mode!=2){
if(get_thread_parallel_conf() == PARALLEL_RU_L1_TRX_SPLIT) wakeup_tx(eNB); if(get_thread_parallel_conf() == PARALLEL_RU_L1_TRX_SPLIT) wakeup_tx(eNB);
else if(get_thread_parallel_conf() == PARALLEL_RU_L1_SPLIT) else if(get_thread_parallel_conf() == PARALLEL_RU_L1_SPLIT) wakeup_txfh(proc,eNB);
{
phy_procedures_eNB_TX(eNB, proc, 1);
wakeup_txfh(proc,eNB);
}
} }
} // while !oai_exit } // while !oai_exit
...@@ -481,7 +478,6 @@ int wakeup_txfh(L1_rxtx_proc_t *proc,PHY_VARS_eNB *eNB) { ...@@ -481,7 +478,6 @@ int wakeup_txfh(L1_rxtx_proc_t *proc,PHY_VARS_eNB *eNB) {
struct timespec wait; struct timespec wait;
wait.tv_sec=0; wait.tv_sec=0;
wait.tv_nsec=5000000L; wait.tv_nsec=5000000L;
//printf("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~inside wakeup_txfh %d.%d IC_RU = %d\n", proc->frame_tx, proc->subframe_tx, proc->instance_cnt_RUs);
if(wait_on_condition(&proc->mutex_RUs,&proc->cond_RUs,&proc->instance_cnt_RUs,"wakeup_txfh")<0) { if(wait_on_condition(&proc->mutex_RUs,&proc->cond_RUs,&proc->instance_cnt_RUs,"wakeup_txfh")<0) {
LOG_E(PHY,"Frame %d, subframe %d: TX FH not ready\n", proc->frame_tx, proc->subframe_tx); LOG_E(PHY,"Frame %d, subframe %d: TX FH not ready\n", proc->frame_tx, proc->subframe_tx);
...@@ -922,7 +918,6 @@ void init_eNB_proc(int inst) { ...@@ -922,7 +918,6 @@ void init_eNB_proc(int inst) {
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;
printf("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~proc->RU_mask_tx = %d\n", proc->RU_mask_tx);
proc->RU_mask =0; proc->RU_mask =0;
proc->RU_mask_prach =0; proc->RU_mask_prach =0;
...@@ -1045,15 +1040,17 @@ void kill_eNB_proc(int inst) { ...@@ -1045,15 +1040,17 @@ void kill_eNB_proc(int inst) {
} }
LOG_I(PHY, "Killing TX CC_id %d inst %d\n", CC_id, inst ); LOG_I(PHY, "Killing TX CC_id %d inst %d\n", CC_id, inst );
pthread_mutex_lock(&L1_proc->mutex); if ((get_thread_parallel_conf() == PARALLEL_RU_L1_SPLIT || get_thread_parallel_conf() == PARALLEL_RU_L1_TRX_SPLIT) && nfapi_mode!=2) {
L1_proc->instance_cnt = 0; pthread_mutex_lock(&L1_proc->mutex);
pthread_cond_signal(&L1_proc->cond); L1_proc->instance_cnt = 0;
pthread_mutex_unlock(&L1_proc->mutex); pthread_cond_signal(&L1_proc->cond);
pthread_mutex_unlock(&L1_proc->mutex);
pthread_mutex_lock(&L1_proc_tx->mutex);
L1_proc_tx->instance_cnt = 0; pthread_mutex_lock(&L1_proc_tx->mutex);
pthread_cond_signal(&L1_proc_tx->cond); L1_proc_tx->instance_cnt = 0;
pthread_mutex_unlock(&L1_proc_tx->mutex); pthread_cond_signal(&L1_proc_tx->cond);
pthread_mutex_unlock(&L1_proc_tx->mutex);
}
pthread_mutex_lock(&proc->mutex_prach); pthread_mutex_lock(&proc->mutex_prach);
proc->instance_cnt_prach = 0; proc->instance_cnt_prach = 0;
...@@ -1088,9 +1085,13 @@ void kill_eNB_proc(int inst) { ...@@ -1088,9 +1085,13 @@ void kill_eNB_proc(int inst) {
LOG_I(PHY, "Destroying L1_proc mutex/cond\n"); LOG_I(PHY, "Destroying L1_proc mutex/cond\n");
pthread_mutex_destroy( &L1_proc->mutex ); pthread_mutex_destroy( &L1_proc->mutex );
pthread_cond_destroy( &L1_proc->cond ); pthread_cond_destroy( &L1_proc->cond );
pthread_mutex_destroy( &L1_proc->mutex_RUs );
pthread_cond_destroy( &L1_proc->cond_RUs );
LOG_I(PHY, "Destroying L1_proc_tx mutex/cond\n"); LOG_I(PHY, "Destroying L1_proc_tx mutex/cond\n");
pthread_mutex_destroy( &L1_proc_tx->mutex ); pthread_mutex_destroy( &L1_proc_tx->mutex );
pthread_cond_destroy( &L1_proc_tx->cond ); pthread_cond_destroy( &L1_proc_tx->cond );
pthread_mutex_destroy( &L1_proc_tx->mutex_RUs );
pthread_cond_destroy( &L1_proc_tx->cond_RUs );
pthread_attr_destroy(&proc->attr_prach); pthread_attr_destroy(&proc->attr_prach);
pthread_attr_destroy(&proc->attr_asynch_rxtx); pthread_attr_destroy(&proc->attr_asynch_rxtx);
......
...@@ -1558,7 +1558,6 @@ static void* ru_thread_tx( void* param ) { ...@@ -1558,7 +1558,6 @@ static void* ru_thread_tx( void* param ) {
// wait until eNBs are finished subframe RX n and TX n+4 // wait until eNBs are finished subframe RX n and TX n+4
wait_on_condition(&proc->mutex_eNBs,&proc->cond_eNBs,&proc->instance_cnt_eNBs,"ru_thread_tx"); wait_on_condition(&proc->mutex_eNBs,&proc->cond_eNBs,&proc->instance_cnt_eNBs,"ru_thread_tx");
if (oai_exit) break; if (oai_exit) break;
//printf("~~~~~~~~~~~~~~~~~~~~~~~~~~~~ru_thread_tx is waken up %d.%d having L1 %d\n", proc->frame_tx, proc->subframe_tx, ru->num_eNB);
// do TX front-end processing if needed (precoding and/or IDFTs) // do TX front-end processing if needed (precoding and/or IDFTs)
if (ru->feptx_prec) ru->feptx_prec(ru); if (ru->feptx_prec) ru->feptx_prec(ru);
...@@ -1587,17 +1586,14 @@ static void* ru_thread_tx( void* param ) { ...@@ -1587,17 +1586,14 @@ static void* ru_thread_tx( void* param ) {
} }
} }
if (eNB_proc->RU_mask_tx != (1<<eNB->num_RU)-1) { // not all RUs have provided their information so return if (eNB_proc->RU_mask_tx != (1<<eNB->num_RU)-1) { // not all RUs have provided their information so return
printf("~~~~~~~~~~~~~~~~~~~~~~(mask = %d)\n", eNB_proc->RU_mask_tx);
pthread_mutex_unlock(&eNB_proc->mutex_RU_tx); pthread_mutex_unlock(&eNB_proc->mutex_RU_tx);
} }
else { // all RUs TX are finished so send the ready signal to eNB processing else { // all RUs TX are finished so send the ready signal to eNB processing
printf("~~~~~~~~~~~~~~~~~~~~~~ready to send wakeup signal\n");
eNB_proc->RU_mask_tx = 0; eNB_proc->RU_mask_tx = 0;
pthread_mutex_unlock(&eNB_proc->mutex_RU_tx); pthread_mutex_unlock(&eNB_proc->mutex_RU_tx);
pthread_mutex_lock( &L1_proc->mutex_RUs); pthread_mutex_lock( &L1_proc->mutex_RUs);
L1_proc->instance_cnt_RUs = 0; L1_proc->instance_cnt_RUs = 0;
printf("~~~~~~~~~~~~~~~~~~~~~~ru_thread_tx send signal to L1_thread_tx with (mask = %d)\n", eNB_proc->RU_mask_tx);
// the thread can now be woken up // the thread can now be woken up
if (pthread_cond_signal(&L1_proc->cond_RUs) != 0) { if (pthread_cond_signal(&L1_proc->cond_RUs) != 0) {
LOG_E( PHY, "[eNB] ERROR pthread_cond_signal for eNB TXnp4 thread\n"); LOG_E( PHY, "[eNB] ERROR pthread_cond_signal for eNB TXnp4 thread\n");
......
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