Commit 3efaa383 authored by Wang Tsu-Han's avatar Wang Tsu-Han

adjustable thread structure

parent 13c8931b
...@@ -597,7 +597,7 @@ add_boolean_option(NAS_ADDRESS_FIX False "specific to oaisim: for nasmesh driver ...@@ -597,7 +597,7 @@ add_boolean_option(NAS_ADDRESS_FIX False "specific to oaisim: for nasmesh driver
add_boolean_option(NAS_NETLINK False "???? Must be True to compile nasmesh driver without rtai") add_boolean_option(NAS_NETLINK False "???? Must be True to compile nasmesh driver without rtai")
add_boolean_option(OAISIM False "specific to oaisim") add_boolean_option(OAISIM False "specific to oaisim")
add_boolean_option(OAI_NW_DRIVER_USE_NETLINK True "????") add_boolean_option(OAI_NW_DRIVER_USE_NETLINK True "????")
add_boolean_option(EMULATE_RF True "allows to run lte-softmodem without HW") add_boolean_option(EMULATE_RF False "allows to run lte-softmodem without HW")
add_boolean_option(USE_MME False "this flag is used only one time in lte-softmodem.c") add_boolean_option(USE_MME False "this flag is used only one time in lte-softmodem.c")
add_list_string_option(PACKAGE_NAME "NotDefined" "As per attribute name") add_list_string_option(PACKAGE_NAME "NotDefined" "As per attribute name")
......
...@@ -58,6 +58,8 @@ ...@@ -58,6 +58,8 @@
uint64_t deadline, uint64_t deadline,
uint64_t period);*/ uint64_t period);*/
extern int codingw;
void free_eNB_dlsch(LTE_eNB_DLSCH_t *dlsch) void free_eNB_dlsch(LTE_eNB_DLSCH_t *dlsch)
{ {
int i; int i;
...@@ -606,16 +608,28 @@ int dlsch_encoding_2threads(PHY_VARS_eNB *eNB, ...@@ -606,16 +608,28 @@ int dlsch_encoding_2threads(PHY_VARS_eNB *eNB,
} }
stop_meas(te_main_stats); stop_meas(te_main_stats);
// wait for worker to finish
start_meas(te_wait_stats); start_meas(te_wait_stats);
if(worker_num == 1)
{
wait_on_busy_condition(&proc->tep[0].mutex_te,&proc->tep[0].cond_te,&proc->tep[0].instance_cnt_te,"te thread 0");
}
else if(worker_num == 2)
{
wait_on_busy_condition(&proc->tep[0].mutex_te,&proc->tep[0].cond_te,&proc->tep[0].instance_cnt_te,"te thread 0");
wait_on_busy_condition(&proc->tep[1].mutex_te,&proc->tep[1].cond_te,&proc->tep[1].instance_cnt_te,"te thread 1");
}
else
{
wait_on_busy_condition(&proc->tep[0].mutex_te,&proc->tep[0].cond_te,&proc->tep[0].instance_cnt_te,"te thread 0"); wait_on_busy_condition(&proc->tep[0].mutex_te,&proc->tep[0].cond_te,&proc->tep[0].instance_cnt_te,"te thread 0");
wait_on_busy_condition(&proc->tep[1].mutex_te,&proc->tep[1].cond_te,&proc->tep[1].instance_cnt_te,"te thread 1"); wait_on_busy_condition(&proc->tep[1].mutex_te,&proc->tep[1].cond_te,&proc->tep[1].instance_cnt_te,"te thread 1");
wait_on_busy_condition(&proc->tep[2].mutex_te,&proc->tep[2].cond_te,&proc->tep[2].instance_cnt_te,"te thread 2"); wait_on_busy_condition(&proc->tep[2].mutex_te,&proc->tep[2].cond_te,&proc->tep[2].instance_cnt_te,"te thread 2");
}
stop_meas(te_wait_stats); stop_meas(te_wait_stats);
if(opp_enabled == 1 && te_wait_stats->diff_now>100*3000){
/*if(opp_enabled == 1 && te_wait_stats->diff_now>100*3000){
print_meas_now(te_wait_stats,"coding_wait",stderr); print_meas_now(te_wait_stats,"coding_wait",stderr);
printf("delay in wait on codition in frame_rx: %d \n",proc->frame_rx); printf("coding delay in wait on codition in frame_rx: %d \n",proc->frame_rx);
} }*/
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ENCODING, VCD_FUNCTION_OUT); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ENCODING, VCD_FUNCTION_OUT);
...@@ -654,7 +668,7 @@ int dlsch_encoding_all(PHY_VARS_eNB *eNB, ...@@ -654,7 +668,7 @@ int dlsch_encoding_all(PHY_VARS_eNB *eNB,
} }
} }
if(C >= 8&&get_nprocs()>=6)//one main three worker if(C >= 8 && get_nprocs()>8 && codingw)//one main three worker
{ {
encoding_return = encoding_return =
dlsch_encoding_2threads(eNB, dlsch_encoding_2threads(eNB,
...@@ -672,7 +686,7 @@ int dlsch_encoding_all(PHY_VARS_eNB *eNB, ...@@ -672,7 +686,7 @@ int dlsch_encoding_all(PHY_VARS_eNB *eNB,
i_stats, i_stats,
3); 3);
} }
else if(C >= 6&&get_nprocs()>=4)//one main two worker else if(C >= 6 && get_nprocs()>=6 && codingw)//one main two worker
{ {
encoding_return = encoding_return =
dlsch_encoding_2threads(eNB, dlsch_encoding_2threads(eNB,
...@@ -690,7 +704,7 @@ int dlsch_encoding_all(PHY_VARS_eNB *eNB, ...@@ -690,7 +704,7 @@ int dlsch_encoding_all(PHY_VARS_eNB *eNB,
i_stats, i_stats,
2); 2);
} }
else if(C >= 4&&get_nprocs()>=2)//one main one worker else if(C >= 4 && get_nprocs()>=4 && codingw)//one main one worker
{ {
encoding_return = encoding_return =
dlsch_encoding_2threads(eNB, dlsch_encoding_2threads(eNB,
......
...@@ -52,6 +52,8 @@ ...@@ -52,6 +52,8 @@
#include "UTIL/LOG/vcd_signal_dumper.h" #include "UTIL/LOG/vcd_signal_dumper.h"
//#define DEBUG_ULSCH_DECODING //#define DEBUG_ULSCH_DECODING
extern int codingw;
void free_eNB_ulsch(LTE_eNB_ULSCH_t *ulsch) void free_eNB_ulsch(LTE_eNB_ULSCH_t *ulsch)
{ {
...@@ -817,7 +819,7 @@ int ulsch_decoding_data_all(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_fl ...@@ -817,7 +819,7 @@ int ulsch_decoding_data_all(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_fl
int ret = 0; int ret = 0;
LTE_eNB_ULSCH_t *ulsch = eNB->ulsch[UE_id]; LTE_eNB_ULSCH_t *ulsch = eNB->ulsch[UE_id];
LTE_UL_eNB_HARQ_t *ulsch_harq = ulsch->harq_processes[harq_pid]; LTE_UL_eNB_HARQ_t *ulsch_harq = ulsch->harq_processes[harq_pid];
if(ulsch_harq->C>3) if(ulsch_harq->C>3 && get_nprocs()>=2 && codingw)
{ {
ret = ulsch_decoding_data_2thread(eNB,UE_id,harq_pid,llr8_flag); ret = ulsch_decoding_data_2thread(eNB,UE_id,harq_pid,llr8_flag);
} }
......
...@@ -222,10 +222,10 @@ void feptx_ofdm_2thread(RU_t *ru) { ...@@ -222,10 +222,10 @@ void feptx_ofdm_2thread(RU_t *ru) {
start_meas(&ru->ofdm_mod_wait_stats); start_meas(&ru->ofdm_mod_wait_stats);
wait_on_busy_condition(&proc->mutex_feptx,&proc->cond_feptx,&proc->instance_cnt_feptx,"feptx thread"); wait_on_busy_condition(&proc->mutex_feptx,&proc->cond_feptx,&proc->instance_cnt_feptx,"feptx thread");
stop_meas(&ru->ofdm_mod_wait_stats); stop_meas(&ru->ofdm_mod_wait_stats);
if(opp_enabled == 1 && ru->ofdm_mod_wait_stats.diff_now>30*3000){ /*if(opp_enabled == 1 && ru->ofdm_mod_wait_stats.diff_now>30*3000){
print_meas_now(&ru->ofdm_mod_wait_stats,"fep wakeup",stderr); print_meas_now(&ru->ofdm_mod_wait_stats,"fep wakeup",stderr);
printf("delay in feptx wait on codition in frame_rx: %d subframe_rx: %d \n",proc->frame_tx,proc->subframe_tx); printf("delay in feptx wait on codition in frame_rx: %d subframe_rx: %d \n",proc->frame_tx,proc->subframe_tx);
} }*/
stop_meas(&ru->ofdm_mod_stats); stop_meas(&ru->ofdm_mod_stats);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_OFDM , 0 ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_OFDM , 0 );
......
...@@ -71,7 +71,7 @@ schedule_ue_spec_phy_test( ...@@ -71,7 +71,7 @@ schedule_ue_spec_phy_test(
uint16_t rnti = 0x1235; uint16_t rnti = 0x1235;
uint32_t rb_alloc = 0x1FFFFFFF; uint32_t rb_alloc = 0x1FFFFFFF;
int32_t tpc = 1; int32_t tpc = 1;
int32_t mcs = 0; int32_t mcs = 28;
int32_t cqi = 15; int32_t cqi = 15;
int32_t ndi = subframeP/5; int32_t ndi = subframeP/5;
int32_t dai = 0; int32_t dai = 0;
......
...@@ -150,10 +150,10 @@ eNBs = ...@@ -150,10 +150,10 @@ eNBs =
NETWORK_INTERFACES : NETWORK_INTERFACES :
{ {
ENB_INTERFACE_NAME_FOR_S1_MME = "em1"; ENB_INTERFACE_NAME_FOR_S1_MME = "eth6";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.155/24"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24";
ENB_INTERFACE_NAME_FOR_S1U = "em1"; ENB_INTERFACE_NAME_FOR_S1U = "eth6";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.155/24"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24";
ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_PORT_FOR_S1U = 2152; # Spec 2152
}; };
} }
......
...@@ -150,6 +150,7 @@ void wakeup_prach_eNB(PHY_VARS_eNB *eNB,RU_t *ru,int frame,int subframe); ...@@ -150,6 +150,7 @@ void wakeup_prach_eNB(PHY_VARS_eNB *eNB,RU_t *ru,int frame,int subframe);
#ifdef Rel14 #ifdef Rel14
void wakeup_prach_eNB_br(PHY_VARS_eNB *eNB,RU_t *ru,int frame,int subframe); void wakeup_prach_eNB_br(PHY_VARS_eNB *eNB,RU_t *ru,int frame,int subframe);
#endif #endif
extern int codingw;
static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_name) { static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_name) {
...@@ -182,14 +183,25 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam ...@@ -182,14 +183,25 @@ 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 ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER , 0 );
if(get_nprocs() > 8)
{
wakeup_tx(eNB,eNB->proc.ru_proc); wakeup_tx(eNB,eNB->proc.ru_proc);
//if(oai_exit) return(-1); }
//phy_procedures_eNB_TX(eNB, proc, no_relay, NULL, 1); else if(get_nprocs() > 4)
// {
//pthread_mutex_lock(&eNB->proc.ru_proc->mutex_eNBs); if(oai_exit) return(-1);
//++eNB->proc.ru_proc->instance_cnt_eNBs; phy_procedures_eNB_TX(eNB, proc, no_relay, NULL, 1);
//pthread_cond_signal(&eNB->proc.ru_proc->cond_eNBs);
//pthread_mutex_unlock(&eNB->proc.ru_proc->mutex_eNBs); pthread_mutex_lock(&eNB->proc.ru_proc->mutex_eNBs);
++eNB->proc.ru_proc->instance_cnt_eNBs;
pthread_cond_signal(&eNB->proc.ru_proc->cond_eNBs);
pthread_mutex_unlock(&eNB->proc.ru_proc->mutex_eNBs);
}
else
{
if(oai_exit) return(-1);
phy_procedures_eNB_TX(eNB, proc, no_relay, NULL, 1);
}
stop_meas( &softmodem_stats_rxtx_sf ); stop_meas( &softmodem_stats_rxtx_sf );
...@@ -350,10 +362,6 @@ void eNB_top(PHY_VARS_eNB *eNB, int frame_rx, int subframe_rx, char *string,RU_t ...@@ -350,10 +362,6 @@ void eNB_top(PHY_VARS_eNB *eNB, int frame_rx, int subframe_rx, char *string,RU_t
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);
LOG_D(PHY,"eNB_top out %p (proc %p, CC_id %d), frame %d, subframe %d, instance_cnt_prach %d\n", LOG_D(PHY,"eNB_top out %p (proc %p, CC_id %d), frame %d, subframe %d, instance_cnt_prach %d\n",
(void*)pthread_self(), proc, eNB->CC_id, proc->frame_rx,proc->subframe_rx,proc->instance_cnt_prach); (void*)pthread_self(), proc, eNB->CC_id, proc->frame_rx,proc->subframe_rx,proc->instance_cnt_prach);
pthread_mutex_lock(&ru_proc->mutex_eNBs);
++ru_proc->instance_cnt_eNBs;
pthread_mutex_unlock(&ru_proc->mutex_eNBs);
pthread_cond_signal(&ru_proc->cond_eNBs);
} }
} }
...@@ -824,8 +832,12 @@ void init_eNB_proc(int inst) { ...@@ -824,8 +832,12 @@ void init_eNB_proc(int inst) {
//////////////////////////////////////need to modified////////////////***** //////////////////////////////////////need to modified////////////////*****
//printf("//////////////////////////////////////////////////////////////////**************************************************************** codingw = %d\n",codingw);
if(get_nprocs() > 2 && codingw)
{
init_te_thread(eNB); init_te_thread(eNB);
init_td_thread(eNB,attr_td); init_td_thread(eNB,attr_td);
}
if (opp_enabled == 1) pthread_create(&proc->process_stats_thread,NULL,process_stats_thread,(void*)eNB); if (opp_enabled == 1) pthread_create(&proc->process_stats_thread,NULL,process_stats_thread,(void*)eNB);
......
...@@ -113,7 +113,7 @@ unsigned short config_frames[4] = {2,9,11,13}; ...@@ -113,7 +113,7 @@ unsigned short config_frames[4] = {2,9,11,13};
extern volatile int oai_exit; extern volatile int oai_exit;
extern int numerology; extern int numerology;
extern int fh_two_thread; extern int fepw;
extern void phy_init_RU(RU_t*); extern void phy_init_RU(RU_t*);
...@@ -681,6 +681,7 @@ void fh_if4p5_north_out(RU_t *ru) { ...@@ -681,6 +681,7 @@ void fh_if4p5_north_out(RU_t *ru) {
if (ru->idx == 0) VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPRX, 0 ); if (ru->idx == 0) VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPRX, 0 );
} }
#ifdef EMULATE_RF
static void* emulatedRF_thread(void* param) { static void* emulatedRF_thread(void* param) {
RU_proc_t *proc = (RU_proc_t *) param; RU_proc_t *proc = (RU_proc_t *) param;
int microsec = 500; // length of time to sleep, in miliseconds int microsec = 500; // length of time to sleep, in miliseconds
...@@ -708,6 +709,7 @@ static void* emulatedRF_thread(void* param) { ...@@ -708,6 +709,7 @@ static void* emulatedRF_thread(void* param) {
} }
return 0; return 0;
} }
#endif
void rx_rf(RU_t *ru,int *frame,int *subframe) { void rx_rf(RU_t *ru,int *frame,int *subframe) {
...@@ -716,7 +718,7 @@ void rx_rf(RU_t *ru,int *frame,int *subframe) { ...@@ -716,7 +718,7 @@ void rx_rf(RU_t *ru,int *frame,int *subframe) {
void *rxp[ru->nb_rx]; void *rxp[ru->nb_rx];
unsigned int rxs; unsigned int rxs;
int i; int i;
openair0_timestamp ts,old_ts; openair0_timestamp ts=0,old_ts=0;
for (i=0; i<ru->nb_rx; i++) for (i=0; i<ru->nb_rx; i++)
rxp[i] = (void*)&ru->common.rxdata[i][*subframe*fp->samples_per_tti]; rxp[i] = (void*)&ru->common.rxdata[i][*subframe*fp->samples_per_tti];
...@@ -1024,7 +1026,7 @@ static void* ru_thread_prach_br( void* param ) { ...@@ -1024,7 +1026,7 @@ static void* ru_thread_prach_br( void* param ) {
ru_thread_prach_status = 0; ru_thread_prach_status = 0;
thread_top_init("ru_thread_prach_br",1,500000,1000000,20000000); thread_top_init("ru_thread_prach_br",1,500000,1000000,20000000);
wait_sync(ru_thread_prach_br); wait_sync("ru_thread_prach_br");
while (!oai_exit) { while (!oai_exit) {
...@@ -1154,7 +1156,7 @@ void wakeup_eNBs(RU_t *ru) { ...@@ -1154,7 +1156,7 @@ void wakeup_eNBs(RU_t *ru) {
LOG_D(PHY,"wakeup_eNBs (num %d) for RU %d\n",ru->num_eNB,ru->idx); LOG_D(PHY,"wakeup_eNBs (num %d) for RU %d\n",ru->num_eNB,ru->idx);
if (0){//(ru->num_eNB==1) { if (get_nprocs() <= 4) {
// call eNB function directly // call eNB function directly
char string[20]; char string[20];
...@@ -1392,7 +1394,7 @@ static void* ru_stats_thread(void* param) { ...@@ -1392,7 +1394,7 @@ static void* ru_stats_thread(void* param) {
while (!oai_exit) { while (!oai_exit) {
sleep(1); sleep(1);
if (opp_enabled == 1) { if (opp_enabled == 1 && fepw) {
if (ru->feprx) print_meas(&ru->ofdm_demod_stats,"feprx",NULL,NULL); if (ru->feprx) print_meas(&ru->ofdm_demod_stats,"feprx",NULL,NULL);
if (ru->feptx_ofdm) print_meas(&ru->ofdm_mod_stats,"feptx_ofdm",NULL,NULL); if (ru->feptx_ofdm) print_meas(&ru->ofdm_mod_stats,"feptx_ofdm",NULL,NULL);
} }
...@@ -1422,17 +1424,10 @@ static void* ru_thread_tx( void* param ) { ...@@ -1422,17 +1424,10 @@ static void* ru_thread_tx( void* param ) {
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_CPUID_RU_THREAD_TX,sched_getcpu()); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_CPUID_RU_THREAD_TX,sched_getcpu());
if (oai_exit) break; if (oai_exit) break;
if (subframe==9) {
subframe=0;
frame++;
frame&=1023;
} else {
subframe++;
}
LOG_D(PHY,"ru_thread_tx: Waiting for TX processing\n"); LOG_D(PHY,"ru_thread_tx: Waiting for TX processing\n");
// 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");
//printf("//////////////////instance_cnt_eNBs = %d\n",proc->instance_cnt_eNBs);//////////////////*********
#ifdef EMULATE_RF #ifdef EMULATE_RF
#else #else
...@@ -1474,8 +1469,8 @@ static void* ru_thread( void* param ) { ...@@ -1474,8 +1469,8 @@ static void* ru_thread( void* param ) {
// set default return value // set default return value
thread_top_init("ru_thread",1,400000,500000,500000); thread_top_init("ru_thread",1,400000,500000,500000);
CPU_SET(1, &cpuset); //CPU_SET(1, &cpuset);
pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset); //pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
pthread_setname_np( pthread_self(),"ru thread"); pthread_setname_np( pthread_self(),"ru thread");
LOG_I(PHY,"thread ru created id=%ld\n", syscall(__NR_gettid)); LOG_I(PHY,"thread ru created id=%ld\n", syscall(__NR_gettid));
...@@ -1604,13 +1599,11 @@ static void* ru_thread( void* param ) { ...@@ -1604,13 +1599,11 @@ static void* ru_thread( void* param ) {
// wakeup all eNB processes waiting for this RU // wakeup all eNB processes waiting for this RU
if (ru->num_eNB>0) wakeup_eNBs(ru); if (ru->num_eNB>0) wakeup_eNBs(ru);
/*
if(fh_two_thread == 0)
{
// 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");
if(get_nprocs() <=4)
{
#ifdef EMULATE_RF
#else
// 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);
...@@ -1620,8 +1613,9 @@ static void* ru_thread( void* param ) { ...@@ -1620,8 +1613,9 @@ static void* ru_thread( void* param ) {
if ((ru->fh_north_asynch_in == NULL) && (ru->fh_south_out)) ru->fh_south_out(ru); if ((ru->fh_north_asynch_in == NULL) && (ru->fh_south_out)) ru->fh_south_out(ru);
if (ru->fh_north_out) ru->fh_north_out(ru); if (ru->fh_north_out) ru->fh_north_out(ru);
#endif
} }
*/
} }
...@@ -1809,7 +1803,7 @@ void init_RU_proc(RU_t *ru) { ...@@ -1809,7 +1803,7 @@ void init_RU_proc(RU_t *ru) {
pthread_create( &proc->pthread_emulateRF, attr_emulateRF, emulatedRF_thread, (void*)proc ); pthread_create( &proc->pthread_emulateRF, attr_emulateRF, emulatedRF_thread, (void*)proc );
#endif #endif
if (fh_two_thread==1) if (get_nprocs() > 4)
pthread_create( &proc->pthread_FH1, attr_FH1, ru_thread_tx, (void*)ru ); pthread_create( &proc->pthread_FH1, attr_FH1, ru_thread_tx, (void*)ru );
if (ru->function == NGFI_RRU_IF4p5) { if (ru->function == NGFI_RRU_IF4p5) {
...@@ -1832,7 +1826,7 @@ void init_RU_proc(RU_t *ru) { ...@@ -1832,7 +1826,7 @@ void init_RU_proc(RU_t *ru) {
} }
if (get_nprocs()>=2) { if (get_nprocs()> 2 && fepw) {
if (ru->feprx) init_fep_thread(ru,NULL); if (ru->feprx) init_fep_thread(ru,NULL);
if (ru->feptx_ofdm) init_feptx_thread(ru,NULL); if (ru->feptx_ofdm) init_feptx_thread(ru,NULL);
} }
......
...@@ -206,8 +206,9 @@ extern void reset_opp_meas(void); ...@@ -206,8 +206,9 @@ extern void reset_opp_meas(void);
extern void print_opp_meas(void); extern void print_opp_meas(void);
int transmission_mode=1; int transmission_mode=1;
int numerology = 2; int numerology = 0;
int fh_two_thread = 1; int codingw = 1;
int fepw = 1;
......
...@@ -84,6 +84,8 @@ ...@@ -84,6 +84,8 @@
#define CONFIG_HLP_NOTWAIT "don't wait for tracer, start immediately\n" #define CONFIG_HLP_NOTWAIT "don't wait for tracer, start immediately\n"
#define CONFIG_HLP_TNOFORK "to ease debugging with gdb\n" #define CONFIG_HLP_TNOFORK "to ease debugging with gdb\n"
#define CONFIG_HLP_NUMEROLOGY "adding numerology for 5G\n" #define CONFIG_HLP_NUMEROLOGY "adding numerology for 5G\n"
#define CONFIG_HLP_CODINGW "coding worker thread disabled(enable by defult)\n"
#define CONFIG_HLP_FEPW "FEP worker thread disabled(enable by defult)\n"
/***************************************************************************************************************************************/ /***************************************************************************************************************************************/
...@@ -138,7 +140,7 @@ extern int16_t dlsch_demod_shift; ...@@ -138,7 +140,7 @@ extern int16_t dlsch_demod_shift;
/* optname helpstr paramflags XXXptr defXXXval type numelt */ /* optname helpstr paramflags XXXptr defXXXval type numelt */
/*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
#define CMDLINE_PARAMS_DESC { \ #define CMDLINE_PARAMS_DESC { \
{"rf-config-file", CONFIG_HLP_RFCFGF, 0, strptr:(char **)&rf_config_file, defstrval:NULL, TYPE_STRING, sizeof(rf_config_file)}, \ {"rf-config-file", CONFIG_HLP_RFCFGF, 0, strptr:(char **)&rf_config_file, defstrval:NULL, TYPE_STRING, sizeof(rf_config_file)},\
{"ulsch-max-errors", CONFIG_HLP_ULMAXE, 0, uptr:&ULSCH_max_consecutive_errors, defuintval:0, TYPE_UINT, 0}, \ {"ulsch-max-errors", CONFIG_HLP_ULMAXE, 0, uptr:&ULSCH_max_consecutive_errors, defuintval:0, TYPE_UINT, 0}, \
{"phy-test", CONFIG_HLP_PHYTST, PARAMFLAG_BOOL, iptr:&phy_test, defintval:0, TYPE_INT, 0}, \ {"phy-test", CONFIG_HLP_PHYTST, PARAMFLAG_BOOL, iptr:&phy_test, defintval:0, TYPE_INT, 0}, \
{"usim-test", CONFIG_HLP_USIM, PARAMFLAG_BOOL, u8ptr:&usim_test, defintval:0, TYPE_UINT8, 0}, \ {"usim-test", CONFIG_HLP_USIM, PARAMFLAG_BOOL, u8ptr:&usim_test, defintval:0, TYPE_UINT8, 0}, \
...@@ -169,6 +171,8 @@ extern int16_t dlsch_demod_shift; ...@@ -169,6 +171,8 @@ extern int16_t dlsch_demod_shift;
{"S" , CONFIG_HLP_MSLOTS, PARAMFLAG_BOOL, u8ptr:&exit_missed_slots, defintval:1, TYPE_UINT8, 0}, \ {"S" , CONFIG_HLP_MSLOTS, PARAMFLAG_BOOL, u8ptr:&exit_missed_slots, defintval:1, TYPE_UINT8, 0}, \
{"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0}, \ {"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0}, \
{"numerology" , CONFIG_HLP_NUMEROLOGY, PARAMFLAG_BOOL, iptr:&numerology, defintval:0, TYPE_INT, 0} \ {"numerology" , CONFIG_HLP_NUMEROLOGY, PARAMFLAG_BOOL, iptr:&numerology, defintval:0, TYPE_INT, 0} \
//{"coding-worker-disable" , CONFIG_HLP_CODINGW, PARAMFLAG_BOOL, iptr:&codingw, defintval:0, TYPE_INT, 0}, \
//{"fep-worker-disable" , CONFIG_HLP_FEPW, PARAMFLAG_BOOL, iptr:&fepw, defintval:0, TYPE_INT, 0} \
} }
#define CONFIG_HLP_FLOG "Enable online log \n" #define CONFIG_HLP_FLOG "Enable online log \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