Commit b2921ead authored by Raymond Knopp's avatar Raymond Knopp

Merge branch 'ru_rau_enhancement_L1_renaming' of...

Merge branch 'ru_rau_enhancement_L1_renaming' of https://gitlab.eurecom.fr/oai/openairinterface5g into ru_rau_enhancement_L1_renaming
parents 1b013ece 0c21813f
......@@ -510,11 +510,6 @@ int wakeup_txfh(L1_rxtx_proc_t *proc,PHY_VARS_eNB *eNB) {
pthread_mutex_unlock(&proc->mutex_RUs);
continue;//hacking only works when all RU_tx works on the same subframe #TODO: adding mask stuff
}
// skip the RUs that are not synced
//if (eNB->RU_list[ru_id]->state == RU_SYNC /*|| eNB->RU_list[ru_id]->wait_cnt>0*/) { LOG_D(PHY,"wakeup_txfh: eNB %d : Skipping ru %d\n",eNB->Mod_id,ru_id); continue; }
//if(ru_proc == NULL) {return(0);}
if (ru_proc->instance_cnt_eNBs == 0) {
LOG_E(PHY,"Frame %d, subframe %d: TX FH thread busy, dropping Frame %d, subframe %d\n", ru_proc->frame_tx, ru_proc->subframe_tx, proc->frame_rx, proc->subframe_rx);
return(-1);
......@@ -524,9 +519,8 @@ int wakeup_txfh(L1_rxtx_proc_t *proc,PHY_VARS_eNB *eNB) {
exit_fun( "error locking mutex_eNB" );
return(-1);
}
//VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_IC_ENB,ru_proc->instance_cnt_eNBs);
ru_proc->instance_cnt_eNBs = 0;
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_IC_ENB+ru_id,ru_proc->instance_cnt_eNBs);
//VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_IC_ENB+ru_id,ru_proc->instance_cnt_eNBs);
ru_proc->timestamp_tx = proc->timestamp_tx;
ru_proc->subframe_tx = proc->subframe_tx;
ru_proc->frame_tx = proc->frame_tx;
......@@ -555,6 +549,7 @@ int wakeup_tx(PHY_VARS_eNB *eNB) {
struct timespec wait;
wait.tv_sec=0;
wait.tv_nsec=5000000L;
LOG_D(PHY,"ENTERED wakeup_tx (IC %d)\n",L1_proc_tx->instance_cnt);
if (pthread_mutex_lock(&L1_proc_tx->mutex) != 0) {
LOG_E(PHY, "[SCHED][eNB] ERROR locking mutex for eNB L1_thread_tx\n");
......@@ -594,6 +589,8 @@ int wakeup_rxtx(PHY_VARS_eNB *eNB,RU_t *ru) {
L1_rxtx_proc_t *L1_proc=&proc->L1_proc;
LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms;
LOG_D(PHY,"ENTERED wakeup_rxtx\n");
int i;
struct timespec wait;
......@@ -612,6 +609,7 @@ int wakeup_rxtx(PHY_VARS_eNB *eNB,RU_t *ru) {
exit_fun( "error locking mutex_rxtx" );
return(-1);
}
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_L1_PROC_IC,L1_proc->instance_cnt);
++L1_proc->instance_cnt;
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_L1_PROC_IC,L1_proc->instance_cnt);
......
......@@ -220,6 +220,7 @@ void fh_if4p5_south_in(RU_t *ru,int *frame,int *subframe) {
RU_proc_t *proc = &ru->proc;
int f,sf;
// LOG_I(PHY,"ENTERED fh_if4p5_south_in\n");
uint16_t packet_type;
uint32_t symbol_number=0;
uint32_t symbol_mask_full;
......@@ -810,7 +811,7 @@ void tx_rf(RU_t *ru) {
ru->nb_tx,
flags);
ru->south_out_cnt++;
LOG_D(PHY,"south_out_cnt %d, frame %d, subframe %d\n",ru->south_out_cnt,proc->frame_tx,proc->subframe_tx);
LOG_D(PHY,"south_out_cnt %d\n",ru->south_out_cnt);
int se = dB_fixed(signal_energy(txp[0],siglen+sf_extension));
if (SF_type == SF_S) LOG_D(PHY,"[TXPATH] RU %d tx_rf (en %d,len %d), writing to TS %llu, frame %d, unwrapped_frame %d, subframe %d\n",ru->idx,se,siglen+sf_extension,
......@@ -1170,6 +1171,7 @@ void wakeup_L1s(RU_t *ru) {
L1_proc_t *proc = &eNB->proc;
RU_proc_t *ruproc = &ru->proc;
struct timespec t;
LOG_D(PHY,"wakeup_L1s (num %d) for RU %d ru->eNB_top:%p\n",ru->num_eNB,ru->idx, ru->eNB_top);
LOG_D(PHY,"wakeup_L1s (num %d) for RU %d ru->eNB_top:%p\n",ru->num_eNB,ru->idx, ru->eNB_top);
......@@ -1252,7 +1254,8 @@ void wakeup_L1s(RU_t *ru) {
}
}
}
/* AssertFatal(0==pthread_mutex_lock(&ruproc->mutex_eNBs),"");
/*
AssertFatal(0==pthread_mutex_lock(&ruproc->mutex_eNBs),"");
LOG_D(PHY,"RU %d sending signal to unlock waiting ru_threads\n", ru->idx);
AssertFatal(0==pthread_cond_broadcast(&ruproc->cond_eNBs),"");
if (ruproc->instance_cnt_eNBs==-1) ruproc->instance_cnt_eNBs++;
......@@ -2723,6 +2726,7 @@ void init_RU(char *rf_config_file, clock_source_t clock_source,clock_source_t ti
ru->ts_offset = 0;
if (ru->is_slave == 1) {
ru->in_synch = 0;
ru->generate_dmrs_sync = 0;
}
else {
ru->in_synch = 1;
......@@ -2734,7 +2738,7 @@ void init_RU(char *rf_config_file, clock_source_t clock_source,clock_source_t ti
// NOTE: multiple CC_id are not handled here yet!
ru->openair0_cfg.clock_source = clock_source;
ru->openair0_cfg.time_source = time_source;
ru->generate_dmrs_sync = (ru->is_slave == 0) ? 1 : 0;
// ru->generate_dmrs_sync = (ru->is_slave == 0) ? 1 : 0;
if (ru->generate_dmrs_sync == 1) {
generate_ul_ref_sigs();
ru->dmrssync = (int16_t*)malloc16_clear(ru->frame_parms.ofdm_symbol_size*2*sizeof(int16_t));
......
......@@ -204,7 +204,7 @@
{"emulate-rf" , CONFIG_HLP_EMULATE_RF, PARAMFLAG_BOOL, iptr:&EMULATE_RF, defintval:0, TYPE_INT, 0}, \
{"clock", CONFIG_HLP_CLK, 0, uptr:&CLOCK_SOURCE, defintval:0, TYPE_UINT, 0}, \
{"timing", CONFIG_HLP_TIMING, 0, uptr:&TIMING_SOURCE, defintval:0, TYPE_UINT, 0}, \
{"clock", CONFIG_HLP_DMRSSYNC, 0, uptr:&SEND_DMRSSYNC, defintval:0, TYPE_UINT, 0}, \
{"dmrssync", CONFIG_HLP_DMRSSYNC, 0, uptr:&SEND_DMRSSYNC, defintval:0, TYPE_UINT, 0}, \
{"wait-for-sync", NULL, PARAMFLAG_BOOL, iptr:&WAIT_FOR_SYNC, defintval:0, TYPE_INT, 0}, \
{"single-thread-enable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, iptr:&SINGLE_THREAD_FLAG, defintval:0, TYPE_INT, 0}, \
{"C" , CONFIG_HLP_DLF, 0, uptr:&(downlink_frequency[0][0]), defuintval:2680000000, TYPE_UINT, 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