phy test fix
This commit is contained in:
@@ -17,7 +17,7 @@ eNBs =
|
||||
|
||||
mobile_country_code = "208";
|
||||
|
||||
mobile_network_code = "93";
|
||||
mobile_network_code = "92";
|
||||
|
||||
tr_s_preference = "local_mac"
|
||||
|
||||
|
||||
+10
-11
@@ -217,14 +217,14 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam
|
||||
wakeup_prach_eNB_br(eNB,NULL,proc->frame_rx,proc->subframe_rx);
|
||||
#endif
|
||||
}
|
||||
|
||||
LOG_I(PHY,"eNB_uespec_RX proc RX %d.%d TX %d.%d \n", proc->frame_rx, proc->subframe_rx, proc->frame_tx, proc->subframe_tx);/////////////*********added
|
||||
// UE-specific RX processing for subframe n
|
||||
if (nfapi_mode == 0 || nfapi_mode == 1) {
|
||||
phy_procedures_eNB_uespec_RX(eNB, proc, no_relay );
|
||||
}
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER , 1 );
|
||||
|
||||
if(get_nprocs() >= 8){
|
||||
if(!eNB->single_thread_flag && get_nprocs() >= 8){
|
||||
if(wait_on_condition(&proc[1].mutex_rxtx,&proc[1].cond_rxtx,&proc[1].pipe_ready,"wakeup_tx")<0) {
|
||||
LOG_E(PHY,"Frame %d, subframe %d: TX1 not ready\n",proc[1].frame_rx,proc[1].subframe_rx);
|
||||
return(-1);
|
||||
@@ -238,6 +238,7 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam
|
||||
eNB->UL_INFO.subframe = proc->subframe_rx;
|
||||
eNB->UL_INFO.module_id = eNB->Mod_id;
|
||||
eNB->UL_INFO.CC_id = eNB->CC_id;
|
||||
LOG_I(PHY,"UL_INFO %d.%d \n", eNB->UL_INFO.frame, eNB->UL_INFO.subframe);/////////////*********added
|
||||
|
||||
eNB->if_inst->UL_indication(&eNB->UL_INFO);
|
||||
|
||||
@@ -245,7 +246,7 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER , 0 );
|
||||
if(oai_exit) return(-1);
|
||||
if(get_nprocs() <= 4){
|
||||
if(eNB->single_thread_flag || get_nprocs() <= 4){
|
||||
phy_procedures_eNB_TX(eNB, proc, no_relay, NULL, 1);
|
||||
}
|
||||
|
||||
@@ -327,6 +328,7 @@ static void* tx_thread(void* param) {
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX1_ENB,proc->frame_tx);
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX1_ENB,proc->frame_rx);
|
||||
|
||||
LOG_I(PHY,"tx thread proc RX %d.%d TX %d.%d \n", proc->frame_rx, proc->subframe_rx, proc->frame_tx, proc->subframe_tx);/////////////*********added
|
||||
phy_procedures_eNB_TX(eNB, proc, no_relay, NULL, 1);
|
||||
if (release_thread(&proc->mutex_rxtx,&proc->instance_cnt_rxtx,thread_name)<0) break;
|
||||
|
||||
@@ -408,7 +410,7 @@ static void* eNB_thread_rxtx( void* param ) {
|
||||
}
|
||||
pthread_mutex_unlock( &proc->mutex_rxtx );
|
||||
if(get_nprocs() >= 8) wakeup_tx(eNB,eNB->proc.ru_proc);
|
||||
else
|
||||
else if(get_nprocs() > 4)
|
||||
{
|
||||
phy_procedures_eNB_TX(eNB, proc, no_relay, NULL, 1);
|
||||
wakeup_txfh(proc,eNB->proc.ru_proc);
|
||||
@@ -565,7 +567,7 @@ int wakeup_rxtx(PHY_VARS_eNB *eNB,RU_t *ru) {
|
||||
eNB_proc_t *proc=&eNB->proc;
|
||||
RU_proc_t *ru_proc=&ru->proc;
|
||||
|
||||
eNB_rxtx_proc_t *proc_rxtx0=&proc->proc_rxtx[0];//*proc_rxtx=&proc->proc_rxtx[proc->frame_rx&1];
|
||||
eNB_rxtx_proc_t *proc_rxtx0=&proc->proc_rxtx[0];
|
||||
//eNB_rxtx_proc_t *proc_rxtx1=&proc->proc_rxtx[1];
|
||||
|
||||
|
||||
@@ -956,21 +958,18 @@ void init_eNB_proc(int inst) {
|
||||
// attr_td = &proc->attr_td;
|
||||
// attr_te = &proc->attr_te;
|
||||
#endif
|
||||
//////////////////////////////////////need to modified////////////////*****
|
||||
|
||||
if(get_nprocs() > 2 && codingw)
|
||||
{
|
||||
init_te_thread(eNB);
|
||||
init_td_thread(eNB);
|
||||
}
|
||||
//////////////////////////////////////need to modified////////////////*****
|
||||
pthread_create( &proc_rxtx[0].pthread_rxtx, attr0, eNB_thread_rxtx, proc );
|
||||
pthread_create( &proc_rxtx[1].pthread_rxtx, attr1, tx_thread, proc);
|
||||
|
||||
LOG_I(PHY,"eNB->single_thread_flag:%d\n", eNB->single_thread_flag);
|
||||
|
||||
if (eNB->single_thread_flag==0) {
|
||||
pthread_create( &proc_rxtx[0].pthread_rxtx, attr0, eNB_thread_rxtx, &proc_rxtx[0] );
|
||||
pthread_create( &proc_rxtx[1].pthread_rxtx, attr1, eNB_thread_rxtx, &proc_rxtx[1] );
|
||||
pthread_create( &proc_rxtx[0].pthread_rxtx, attr0, eNB_thread_rxtx, proc );
|
||||
pthread_create( &proc_rxtx[1].pthread_rxtx, attr1, tx_thread, proc);
|
||||
}
|
||||
pthread_create( &proc->pthread_prach, attr_prach, eNB_thread_prach, eNB );
|
||||
#ifdef Rel14
|
||||
|
||||
+29
-31
@@ -945,7 +945,6 @@ void wakeup_slaves(RU_proc_t *proc) {
|
||||
wait.tv_nsec=5000000L;
|
||||
|
||||
for (i=0;i<proc->num_slaves;i++) {
|
||||
//printf("////////////////////calling for slave thrads\n");////////////////////////********
|
||||
RU_proc_t *slave_proc = proc->slave_proc[i];
|
||||
// wake up slave FH thread
|
||||
// lock the FH mutex and make sure the thread is ready
|
||||
@@ -1197,9 +1196,14 @@ void wakeup_eNBs(RU_t *ru) {
|
||||
{
|
||||
LOG_D(PHY,"ru->wakeup_rxtx:%p\n", ru->wakeup_rxtx);
|
||||
eNB_list[i]->proc.ru_proc = &ru->proc;
|
||||
if (ru->wakeup_rxtx!=0 && ru->wakeup_rxtx(eNB_list[i],ru) < 0)
|
||||
if(eNB_list[i]->single_thread_flag){
|
||||
char string[20];
|
||||
sprintf(string,"Incoming RU %d",ru->idx);
|
||||
ru->eNB_top(eNB_list[0],ru->proc.frame_rx,ru->proc.subframe_rx,string,ru);
|
||||
}
|
||||
else if (ru->wakeup_rxtx!=0 && ru->wakeup_rxtx(eNB_list[i],ru) < 0)
|
||||
{
|
||||
LOG_E(PHY,"could not wakeup eNB rxtx process for subframe %d\n", ru->proc.subframe_rx);
|
||||
LOG_E(PHY,"could not wakeup eNB rxtx process for subframe %d\n", ru->proc.subframe_rx);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1623,7 +1627,8 @@ static void* ru_thread( void* param ) {
|
||||
ru->do_prach,
|
||||
is_prach_subframe(fp, proc->frame_rx, proc->subframe_rx),
|
||||
proc->frame_rx,proc->subframe_rx);
|
||||
*/
|
||||
*/
|
||||
if (oai_exit) break;
|
||||
if ((ru->do_prach>0) && (is_prach_subframe(fp, proc->frame_rx, proc->subframe_rx)==1)) {
|
||||
wakeup_prach_ru(ru);
|
||||
}
|
||||
@@ -1666,10 +1671,12 @@ static void* ru_thread( void* param ) {
|
||||
|
||||
printf( "Exiting ru_thread \n");
|
||||
|
||||
if (ru->stop_rf != NULL) {
|
||||
if (ru->stop_rf(ru) != 0)
|
||||
LOG_E(HW,"Could not stop the RF device\n");
|
||||
else LOG_I(PHY,"RU %d rf device stopped\n",ru->idx);
|
||||
if (!emulate_rf){
|
||||
if (ru->stop_rf != NULL) {
|
||||
if (ru->stop_rf(ru) != 0)
|
||||
LOG_E(HW,"Could not stop the RF device\n");
|
||||
else LOG_I(PHY,"RU %d rf device stopped\n",ru->idx);
|
||||
}
|
||||
}
|
||||
|
||||
ru_thread_status = 0;
|
||||
@@ -1778,6 +1785,8 @@ extern void feptx_ofdm_2thread(RU_t *ru);
|
||||
extern void feptx_prec(RU_t *ru);
|
||||
extern void init_fep_thread(RU_t *ru,pthread_attr_t *attr);
|
||||
extern void init_feptx_thread(RU_t *ru,pthread_attr_t *attr);
|
||||
extern void kill_fep_thread(RU_t *ru);
|
||||
extern void kill_feptx_thread(RU_t *ru);
|
||||
|
||||
void init_RU_proc(RU_t *ru) {
|
||||
|
||||
@@ -1901,6 +1910,17 @@ void kill_RU_proc(int inst)
|
||||
RU_t *ru = RC.ru[inst];
|
||||
RU_proc_t *proc = &ru->proc;
|
||||
|
||||
if (get_nprocs() > 2 && fepw) {
|
||||
if (ru->feprx) {
|
||||
LOG_D(PHY, "killing FEP thread\n");
|
||||
kill_fep_thread(ru);
|
||||
}
|
||||
if (ru->feptx_ofdm){
|
||||
LOG_D(PHY, "killing FEP TX thread\n");
|
||||
kill_feptx_thread(ru);
|
||||
}
|
||||
}
|
||||
|
||||
pthread_mutex_lock(&proc->mutex_FH);
|
||||
proc->instance_cnt_FH = 0;
|
||||
pthread_cond_signal(&proc->cond_FH);
|
||||
@@ -1962,28 +1982,6 @@ void kill_RU_proc(int inst)
|
||||
pthread_join(proc->pthread_asynch_rxtx, NULL);
|
||||
}
|
||||
}
|
||||
if (get_nprocs() > 2 && fepw) {
|
||||
if (ru->feprx) {
|
||||
pthread_mutex_lock(&proc->mutex_fep);
|
||||
proc->instance_cnt_fep = 0;
|
||||
pthread_mutex_unlock(&proc->mutex_fep);
|
||||
pthread_cond_signal(&proc->cond_fep);
|
||||
LOG_D(PHY, "Joining pthread_fep\n");
|
||||
pthread_join(proc->pthread_fep, NULL);
|
||||
pthread_mutex_destroy(&proc->mutex_fep);
|
||||
pthread_cond_destroy(&proc->cond_fep);
|
||||
}
|
||||
if (ru->feptx_ofdm) {
|
||||
pthread_mutex_lock(&proc->mutex_feptx);
|
||||
proc->instance_cnt_feptx = 0;
|
||||
pthread_mutex_unlock(&proc->mutex_feptx);
|
||||
pthread_cond_signal(&proc->cond_feptx);
|
||||
LOG_D(PHY, "Joining pthread_feptx\n");
|
||||
pthread_join(proc->pthread_feptx, NULL);
|
||||
pthread_mutex_destroy(&proc->mutex_feptx);
|
||||
pthread_cond_destroy(&proc->cond_feptx);
|
||||
}
|
||||
}
|
||||
if (opp_enabled) {
|
||||
LOG_D(PHY, "Joining ru_stats_thread\n");
|
||||
pthread_join(ru->ru_stats_thread, NULL);
|
||||
@@ -2348,7 +2346,7 @@ void set_function_spec_param(RU_t *ru)
|
||||
} // switch on interface type
|
||||
}
|
||||
|
||||
extern void RCconfig_RU(void);
|
||||
//extern void RCconfig_RU(void);
|
||||
|
||||
void init_RU(char *rf_config_file) {
|
||||
|
||||
|
||||
@@ -136,7 +136,7 @@ static clock_source_t clock_source = internal;
|
||||
static int wait_for_sync = 0;
|
||||
|
||||
unsigned int mmapped_dma=0;
|
||||
int single_thread_flag=1;
|
||||
int single_thread_flag = 0;
|
||||
|
||||
static int8_t threequarter_fs=0;
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ extern int16_t dlsch_demod_shift;
|
||||
{"mmapped-dma", CONFIG_HLP_DMAMAP, PARAMFLAG_BOOL, uptr:&mmapped_dma, defintval:0, TYPE_INT, 0}, \
|
||||
{"external-clock", CONFIG_HLP_EXCCLK, PARAMFLAG_BOOL, uptr:&clock_source, defintval:0, TYPE_INT, 0}, \
|
||||
{"wait-for-sync", NULL, PARAMFLAG_BOOL, iptr:&wait_for_sync, defintval:0, TYPE_INT, 0}, \
|
||||
{"single-thread-disable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, iptr:&single_thread_flag, defintval:1, TYPE_INT, 0}, \
|
||||
{"single-thread-enable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, iptr:&single_thread_flag, defintval:0, TYPE_INT, 0}, \
|
||||
{"threadIQ", NULL, 0, iptr:&(threads.iq), defintval:1, TYPE_INT, 0}, \
|
||||
{"threadOneSubframe", NULL, 0, iptr:&(threads.one), defintval:1, TYPE_INT, 0}, \
|
||||
{"threadTwoSubframe", NULL, 0, iptr:&(threads.two), defintval:1, TYPE_INT, 0}, \
|
||||
|
||||
Reference in New Issue
Block a user