Commit 5055e3e6 authored by Raymond Knopp's avatar Raymond Knopp

bugfixing for single-thread and cleanup

parent f3e084e0
...@@ -1104,7 +1104,8 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB, ...@@ -1104,7 +1104,8 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
#if defined(SMBV) #if defined(SMBV)
// counts number of allocations in subframe // counts number of allocations in subframe
// there is at least one allocation for PDCCH // there is at least one allocation for PDCCH
uint8_t smbv_alloc_cnt = 1; uint8_t smbv_alloc_cnt = 1;Exiting eNB thread RXn_TXnp4
#endif #endif
if ((fp->frame_type == TDD) && (subframe_select(fp,subframe)!=SF_DL)) return; if ((fp->frame_type == TDD) && (subframe_select(fp,subframe)!=SF_DL)) return;
...@@ -2587,7 +2588,7 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB){ ...@@ -2587,7 +2588,7 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB){
LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms; LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms;
const int subframe = proc->subframe_rx; const int subframe = proc->subframe_rx;
const int frame = proc->frame_rx; const int frame = proc->frame_rx;
int offset = (proc == &eNB->proc.proc_rxtx[0]) ? 0 : 1; int offset = (eNB->single_thread_flag==1) ? 0 : (subframe&1);
if ((fp->frame_type == TDD) && (subframe_select(fp,subframe)!=SF_UL)) return; if ((fp->frame_type == TDD) && (subframe_select(fp,subframe)!=SF_UL)) return;
......
...@@ -464,7 +464,7 @@ void proc_tx_high0(PHY_VARS_eNB *eNB, ...@@ -464,7 +464,7 @@ void proc_tx_high0(PHY_VARS_eNB *eNB,
int offset = proc == &eNB->proc.proc_rxtx[0] ? 0 : 1; int offset = proc == &eNB->proc.proc_rxtx[0] ? 0 : 1;
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_ENB+offset, proc->frame_tx ); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_ENB+offset, proc->frame_tx );
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_TX0_ENB+offset, proc->subframe_rx ); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_TX0_ENB+offset, proc->subframe_tx );
phy_procedures_eNB_TX(eNB,proc,r_type,rn); phy_procedures_eNB_TX(eNB,proc,r_type,rn);
...@@ -526,7 +526,7 @@ void proc_tx_rru_if4p5(PHY_VARS_eNB *eNB, ...@@ -526,7 +526,7 @@ void proc_tx_rru_if4p5(PHY_VARS_eNB *eNB,
int offset = proc == &eNB->proc.proc_rxtx[0] ? 0 : 1; int offset = proc == &eNB->proc.proc_rxtx[0] ? 0 : 1;
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_ENB+offset, proc->frame_tx ); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_ENB+offset, proc->frame_tx );
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_TX0_ENB+offset, proc->subframe_rx ); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_TX0_ENB+offset, proc->subframe_tx );
/// **** recv_IF4 of txdataF from RCC **** /// /// **** recv_IF4 of txdataF from RCC **** ///
symbol_number = 0; symbol_number = 0;
...@@ -546,7 +546,7 @@ void proc_tx_rru_if5(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) { ...@@ -546,7 +546,7 @@ void proc_tx_rru_if5(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) {
int offset = proc == &eNB->proc.proc_rxtx[0] ? 0 : 1; int offset = proc == &eNB->proc.proc_rxtx[0] ? 0 : 1;
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_ENB+offset, proc->frame_tx ); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_ENB+offset, proc->frame_tx );
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_TX0_ENB+offset, proc->subframe_rx ); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_TX0_ENB+offset, proc->subframe_tx );
/// **** recv_IF5 of txdata from BBU **** /// /// **** recv_IF5 of txdata from BBU **** ///
recv_IF5(eNB, &proc->timestamp_tx, proc->subframe_tx, IF5_RRH_GW_DL); recv_IF5(eNB, &proc->timestamp_tx, proc->subframe_tx, IF5_RRH_GW_DL);
} }
...@@ -1317,7 +1317,7 @@ static void* eNB_thread_single( void* param ) { ...@@ -1317,7 +1317,7 @@ static void* eNB_thread_single( void* param ) {
proc_rxtx->subframe_rx = proc->subframe_rx; proc_rxtx->subframe_rx = proc->subframe_rx;
proc_rxtx->frame_rx = proc->frame_rx; proc_rxtx->frame_rx = proc->frame_rx;
proc_rxtx->subframe_tx = (proc->subframe_rx+4)%10; proc_rxtx->subframe_tx = (proc->subframe_rx+4)%10;
proc_rxtx->frame_tx = (proc->frame_rx < 6) ? proc->frame_rx : (proc->frame_rx+1); proc_rxtx->frame_tx = (proc->subframe_rx < 6) ? proc->frame_rx : (proc->frame_rx+1);
if (rxtx(eNB,proc_rxtx,"eNB_thread_single") < 0) break; if (rxtx(eNB,proc_rxtx,"eNB_thread_single") < 0) break;
} }
...@@ -1391,6 +1391,7 @@ void init_eNB_proc(int inst) { ...@@ -1391,6 +1391,7 @@ void init_eNB_proc(int inst) {
pthread_create( &proc->pthread_asynch_rxtx, attr_asynch, eNB_thread_asynch_rxtx, &eNB->proc ); pthread_create( &proc->pthread_asynch_rxtx, attr_asynch, eNB_thread_asynch_rxtx, &eNB->proc );
char name[16]; char name[16];
if (eNB->single_thread_flag == 0) {
snprintf( name, sizeof(name), "RXTX0 %d", i ); snprintf( name, sizeof(name), "RXTX0 %d", i );
pthread_setname_np( proc_rxtx[0].pthread_rxtx, name ); pthread_setname_np( proc_rxtx[0].pthread_rxtx, name );
snprintf( name, sizeof(name), "RXTX1 %d", i ); snprintf( name, sizeof(name), "RXTX1 %d", i );
...@@ -1398,6 +1399,11 @@ void init_eNB_proc(int inst) { ...@@ -1398,6 +1399,11 @@ void init_eNB_proc(int inst) {
snprintf( name, sizeof(name), "FH %d", i ); snprintf( name, sizeof(name), "FH %d", i );
pthread_setname_np( proc->pthread_FH, name ); pthread_setname_np( proc->pthread_FH, name );
} }
else {
snprintf( name, sizeof(name), " %d", i );
pthread_setname_np( proc->pthread_single, name );
}
}
/* setup PHY proc TX sync mechanism */ /* setup PHY proc TX sync mechanism */
pthread_mutex_init(&sync_phy_proc.mutex_phy_proc_tx, NULL); pthread_mutex_init(&sync_phy_proc.mutex_phy_proc_tx, NULL);
......
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