develop&-nr up-to-date as of 30.7.19
This commit is contained in:
+23
-16
@@ -194,14 +194,14 @@ static inline int rxtx(PHY_VARS_eNB *eNB,
|
||||
eNB->UL_INFO.harq_ind.harq_indication_body.number_of_harqs ||
|
||||
eNB->UL_INFO.crc_ind.crc_indication_body.number_of_crcs ||
|
||||
eNB->UL_INFO.rach_ind.rach_indication_body.number_of_preambles ||
|
||||
eNB->UL_INFO.cqi_ind.number_of_cqis
|
||||
eNB->UL_INFO.cqi_ind.cqi_indication_body.number_of_cqis
|
||||
) {
|
||||
LOG_D(PHY, "UL_info[rx_ind:%05d:%d harqs:%05d:%d crcs:%05d:%d preambles:%05d:%d cqis:%d] RX:%04d%d TX:%04d%d num_pdcch_symbols:%d\n",
|
||||
NFAPI_SFNSF2DEC(eNB->UL_INFO.rx_ind.sfn_sf), eNB->UL_INFO.rx_ind.rx_indication_body.number_of_pdus,
|
||||
NFAPI_SFNSF2DEC(eNB->UL_INFO.harq_ind.sfn_sf), eNB->UL_INFO.harq_ind.harq_indication_body.number_of_harqs,
|
||||
NFAPI_SFNSF2DEC(eNB->UL_INFO.crc_ind.sfn_sf), eNB->UL_INFO.crc_ind.crc_indication_body.number_of_crcs,
|
||||
NFAPI_SFNSF2DEC(eNB->UL_INFO.rach_ind.sfn_sf), eNB->UL_INFO.rach_ind.rach_indication_body.number_of_preambles,
|
||||
eNB->UL_INFO.cqi_ind.number_of_cqis,
|
||||
eNB->UL_INFO.cqi_ind.cqi_indication_body.number_of_cqis,
|
||||
proc->frame_rx, proc->subframe_rx,
|
||||
proc->frame_tx, proc->subframe_tx, eNB->pdcch_vars[proc->subframe_tx&1].num_pdcch_symbols);
|
||||
}
|
||||
@@ -223,9 +223,11 @@ static inline int rxtx(PHY_VARS_eNB *eNB,
|
||||
wakeup_prach_eNB_br(eNB,NULL,proc->frame_rx,proc->subframe_rx);
|
||||
#endif
|
||||
}
|
||||
|
||||
release_UE_in_freeList(eNB->Mod_id);
|
||||
|
||||
if (NFAPI_MODE!=NFAPI_MODE_PNF) {
|
||||
release_UE_in_freeList(eNB->Mod_id);
|
||||
} else {
|
||||
release_rnti_of_phy(eNB->Mod_id);
|
||||
}
|
||||
// UE-specific RX processing for subframe n
|
||||
if (NFAPI_MODE==NFAPI_MONOLITHIC || NFAPI_MODE==NFAPI_MODE_PNF) {
|
||||
phy_procedures_eNB_uespec_RX(eNB, proc);
|
||||
@@ -436,13 +438,12 @@ static void *L1_thread( void *param )
|
||||
}
|
||||
|
||||
LOG_D(PHY,"L1 RX %d.%d done\n",proc->frame_rx,proc->subframe_rx);
|
||||
|
||||
if(get_thread_parallel_conf() == PARALLEL_RU_L1_SPLIT) phy_procedures_eNB_TX(eNB, proc, 1);
|
||||
|
||||
|
||||
if (NFAPI_MODE!=NFAPI_MODE_VNF) {
|
||||
if(get_thread_parallel_conf() == PARALLEL_RU_L1_TRX_SPLIT) wakeup_tx(eNB,proc->frame_rx,proc->subframe_rx,proc->frame_tx,proc->subframe_tx,proc->timestamp_tx);
|
||||
else if(get_thread_parallel_conf() == PARALLEL_RU_L1_SPLIT) wakeup_txfh(eNB,proc,proc->frame_tx,proc->subframe_tx,proc->timestamp_tx);
|
||||
if(get_thread_parallel_conf() == PARALLEL_RU_L1_TRX_SPLIT) wakeup_tx(eNB,proc->frame_rx,proc->subframe_rx,proc->frame_tx,proc->subframe_tx,proc->timestamp_tx);
|
||||
else if(get_thread_parallel_conf() == PARALLEL_RU_L1_SPLIT) {
|
||||
phy_procedures_eNB_TX(eNB, proc, 1);
|
||||
wakeup_txfh(eNB,proc,proc->frame_tx,proc->subframe_tx,proc->timestamp_tx);
|
||||
}
|
||||
}
|
||||
|
||||
if (release_thread(&proc->mutex,&proc->instance_cnt,thread_name)<0) break;
|
||||
@@ -968,7 +969,9 @@ void init_eNB_proc(int inst)
|
||||
|
||||
LOG_I(PHY,"eNB->single_thread_flag:%d\n", eNB->single_thread_flag);
|
||||
|
||||
if ((get_thread_parallel_conf() == PARALLEL_RU_L1_SPLIT || get_thread_parallel_conf() == PARALLEL_RU_L1_TRX_SPLIT) && NFAPI_MODE!=NFAPI_MODE_VNF) {
|
||||
if ((get_thread_parallel_conf() == PARALLEL_RU_L1_SPLIT) && NFAPI_MODE!=NFAPI_MODE_VNF) {
|
||||
pthread_create( &L1_proc->pthread, attr0, L1_thread, proc );
|
||||
} else if ((get_thread_parallel_conf() == PARALLEL_RU_L1_TRX_SPLIT) && NFAPI_MODE!=NFAPI_MODE_VNF) {
|
||||
pthread_create( &L1_proc->pthread, attr0, L1_thread, proc );
|
||||
pthread_create( &L1_proc_tx->pthread, attr1, L1_thread_tx, proc);
|
||||
} else if (NFAPI_MODE==NFAPI_MODE_VNF) { // this is neccesary in VNF or L2 FAPI simulator.
|
||||
@@ -979,10 +982,12 @@ void init_eNB_proc(int inst)
|
||||
pthread_create( &L1_proc_tx->pthread, attr1, L1_thread, L1_proc_tx);
|
||||
}
|
||||
|
||||
pthread_create( &proc->pthread_prach, attr_prach, eNB_thread_prach, eNB );
|
||||
if (NFAPI_MODE!=NFAPI_MODE_VNF) {
|
||||
pthread_create( &proc->pthread_prach, attr_prach, eNB_thread_prach, eNB );
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
pthread_create( &proc->pthread_prach_br, attr_prach_br, eNB_thread_prach_br, eNB );
|
||||
pthread_create( &proc->pthread_prach_br, attr_prach_br, eNB_thread_prach_br, eNB );
|
||||
#endif
|
||||
}
|
||||
AssertFatal(proc->instance_cnt_prach == -1,"instance_cnt_prach = %d\n",proc->instance_cnt_prach);
|
||||
|
||||
if (opp_enabled == 1) pthread_create(&proc->process_stats_thread,NULL,process_stats_thread,(void *)eNB);
|
||||
@@ -1144,6 +1149,7 @@ void init_transport(PHY_VARS_eNB *eNB)
|
||||
LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms;
|
||||
LOG_I(PHY, "Initialise transport\n");
|
||||
|
||||
if (NFAPI_MODE!=NFAPI_MODE_VNF) {
|
||||
for (i=0; i<NUMBER_OF_UE_MAX; i++) {
|
||||
LOG_D(PHY,"Allocating Transport Channel Buffers for DLSCH, UE %d\n",i);
|
||||
|
||||
@@ -1186,6 +1192,7 @@ void init_transport(PHY_VARS_eNB *eNB)
|
||||
LOG_D(PHY,"eNB %d.%d : RA %p\n",eNB->Mod_id,eNB->CC_id,eNB->dlsch_ra);
|
||||
eNB->dlsch_MCH = new_eNB_dlsch(1,8,NSOFT,fp->N_RB_DL, 0, fp);
|
||||
LOG_D(PHY,"eNB %d.%d : MCH %p\n",eNB->Mod_id,eNB->CC_id,eNB->dlsch_MCH);
|
||||
}
|
||||
eNB->rx_total_gain_dB=130;
|
||||
|
||||
for(i=0; i<NUMBER_OF_UE_MAX; i++)
|
||||
@@ -1328,8 +1335,8 @@ void init_eNB(int single_thread_flag,
|
||||
eNB->UL_INFO.crc_ind.crc_indication_body.crc_pdu_list = eNB->crc_pdu_list;
|
||||
eNB->UL_INFO.sr_ind.sr_indication_body.sr_pdu_list = eNB->sr_pdu_list;
|
||||
eNB->UL_INFO.harq_ind.harq_indication_body.harq_pdu_list = eNB->harq_pdu_list;
|
||||
eNB->UL_INFO.cqi_ind.cqi_pdu_list = eNB->cqi_pdu_list;
|
||||
eNB->UL_INFO.cqi_ind.cqi_raw_pdu_list = eNB->cqi_raw_pdu_list;
|
||||
eNB->UL_INFO.cqi_ind.cqi_indication_body.cqi_pdu_list = eNB->cqi_pdu_list;
|
||||
eNB->UL_INFO.cqi_ind.cqi_indication_body.cqi_raw_pdu_list = eNB->cqi_raw_pdu_list;
|
||||
eNB->prach_energy_counter = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,6 +62,7 @@ void get_common_options(void) {
|
||||
uint32_t nonbiot;
|
||||
uint32_t rfsim;
|
||||
uint32_t basicsim;
|
||||
char *logmem_filename = NULL;
|
||||
uint32_t do_forms;
|
||||
paramdef_t cmdline_params[] =CMDLINE_PARAMS_DESC ;
|
||||
paramdef_t cmdline_logparams[] =CMDLINE_LOGPARAMS_DESC ;
|
||||
@@ -83,6 +84,13 @@ void get_common_options(void) {
|
||||
load_module_shlib("telnetsrv",NULL,0,NULL);
|
||||
}
|
||||
|
||||
if (logmem_filename != NULL && strlen(logmem_filename) > 0) {
|
||||
log_mem_filename = &logmem_filename[0];
|
||||
log_mem_flag = 1;
|
||||
printf("Enabling OPT for log save at memory %s\n",log_mem_filename);
|
||||
logInit_log_mem();
|
||||
}
|
||||
|
||||
if (noS1) {
|
||||
set_softmodem_optmask(SOFTMODEM_NOS1_BIT);
|
||||
}
|
||||
|
||||
@@ -259,7 +259,7 @@ void exit_function(const char *file, const char *function, const int line, const
|
||||
if (s != NULL) {
|
||||
printf("%s:%d %s() Exiting OAI softmodem: %s\n",file,line, function, s);
|
||||
}
|
||||
|
||||
close_log_mem();
|
||||
oai_exit = 1;
|
||||
|
||||
if (RC.ru == NULL)
|
||||
@@ -523,6 +523,7 @@ int main ( int argc, char **argv )
|
||||
int i;
|
||||
int CC_id = 0;
|
||||
int ru_id;
|
||||
int node_type = ngran_eNB;
|
||||
|
||||
if ( load_configmodule(argc,argv,0) == NULL) {
|
||||
exit_fun("[SOFTMODEM] Error, configuration module init failed\n");
|
||||
@@ -603,12 +604,13 @@ int main ( int argc, char **argv )
|
||||
RRC_CONFIGURATION_REQ(msg_p) = RC.rrc[enb_id]->configuration;
|
||||
itti_send_msg_to_task (TASK_RRC_ENB, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
|
||||
}
|
||||
node_type = RC.rrc[0]->node_type;
|
||||
} else {
|
||||
printf("RC.nb_inst = 0, Initializing L1\n");
|
||||
RCconfig_L1();
|
||||
}
|
||||
|
||||
if (RC.nb_inst > 0 && NODE_IS_CU(RC.rrc[0]->node_type)) {
|
||||
if (RC.nb_inst > 0 && NODE_IS_CU(node_type)) {
|
||||
protocol_ctxt_t ctxt;
|
||||
ctxt.module_id = 0 ;
|
||||
ctxt.instance = 0;
|
||||
@@ -620,7 +622,7 @@ int main ( int argc, char **argv )
|
||||
}
|
||||
|
||||
/* start threads if only L1 or not a CU */
|
||||
if (RC.nb_inst == 0 || !NODE_IS_CU(RC.rrc[0]->node_type)) {
|
||||
if (RC.nb_inst == 0 || !NODE_IS_CU(node_type) || NFAPI_MODE == NFAPI_MODE_PNF || NFAPI_MODE == NFAPI_MODE_VNF) {
|
||||
// init UE_PF_PO and mutex lock
|
||||
pthread_mutex_init(&ue_pf_po_mutex, NULL);
|
||||
memset (&UE_PF_PO[0][0], 0, sizeof(UE_PF_PO_t)*MAX_MOBILES_PER_ENB*MAX_NUM_CCs);
|
||||
@@ -719,7 +721,7 @@ int main ( int argc, char **argv )
|
||||
LOG_I(ENB_APP,"oai_exit=%d\n",oai_exit);
|
||||
// stop threads
|
||||
|
||||
if (RC.nb_inst == 0 || !NODE_IS_CU(RC.rrc[0]->node_type)) {
|
||||
if (RC.nb_inst == 0 || !NODE_IS_CU(node_type)) {
|
||||
if(IS_SOFTMODEM_DOFORMS)
|
||||
end_forms();
|
||||
|
||||
|
||||
@@ -216,16 +216,17 @@
|
||||
#define CONFIG_HLP_LOGV "Set the global log verbosity \n"
|
||||
#define CONFIG_HLP_TELN "Start embedded telnet server \n"
|
||||
#define CONFIG_HLP_MSC "Enable the MSC tracing utility \n"
|
||||
/*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* command line parameters for LOG utility */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/*----------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* command line parameters for LOG utility */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*----------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define START_MSC softmodem_params.start_msc
|
||||
#define CMDLINE_LOGPARAMS_DESC { \
|
||||
{"R" , CONFIG_HLP_FLOG, 0, uptr:&online_log_messages, defintval:1, TYPE_INT, 0}, \
|
||||
{"g" , CONFIG_HLP_LOGL, 0, uptr:&glog_level, defintval:0, TYPE_UINT, 0}, \
|
||||
{"telnetsrv", CONFIG_HLP_TELN, PARAMFLAG_BOOL, uptr:&start_telnetsrv, defintval:0, TYPE_UINT, 0}, \
|
||||
{"msc", CONFIG_HLP_MSC, PARAMFLAG_BOOL, uptr:&START_MSC, defintval:0, TYPE_UINT, 0}, \
|
||||
{"R" , CONFIG_HLP_FLOG, 0, uptr:&online_log_messages, defintval:1, TYPE_INT, 0}, \
|
||||
{"g" , CONFIG_HLP_LOGL, 0, uptr:&glog_level, defintval:0, TYPE_UINT, 0}, \
|
||||
{"telnetsrv", CONFIG_HLP_TELN, PARAMFLAG_BOOL, uptr:&start_telnetsrv, defintval:0, TYPE_UINT, 0}, \
|
||||
{"msc", CONFIG_HLP_MSC, PARAMFLAG_BOOL, uptr:&START_MSC, defintval:0, TYPE_UINT, 0}, \
|
||||
{"log-mem", NULL, 0, strptr:(char **)&logmem_filename, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
}
|
||||
|
||||
#define CMDLINE_ONLINELOG_IDX 0
|
||||
@@ -235,10 +236,11 @@
|
||||
|
||||
/* check function for global log level */
|
||||
#define CMDLINE_LOGPARAMS_CHECK_DESC { \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s2= { config_check_intrange, {0,4}}}, \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL} } , \
|
||||
{ .s2= {config_check_intrange, {0,4}}}, \
|
||||
{ .s5= {NULL} } , \
|
||||
{ .s5= {NULL} } , \
|
||||
{ .s5= {NULL} } , \
|
||||
}
|
||||
|
||||
/***************************************************************************************************************************************/
|
||||
|
||||
@@ -1074,9 +1074,9 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg)
|
||||
UL_INFO->harq_ind.harq_indication_body.number_of_harqs = 0;
|
||||
UL_INFO->sr_ind.sr_indication_body.sr_pdu_list = (nfapi_sr_indication_pdu_t *)malloc(NB_UE_INST*sizeof(nfapi_sr_indication_pdu_t));
|
||||
UL_INFO->sr_ind.sr_indication_body.number_of_srs = 0;
|
||||
UL_INFO->cqi_ind.cqi_pdu_list = (nfapi_cqi_indication_pdu_t *)malloc(NB_UE_INST*sizeof(nfapi_cqi_indication_pdu_t));
|
||||
UL_INFO->cqi_ind.cqi_raw_pdu_list = (nfapi_cqi_indication_raw_pdu_t *)malloc(NB_UE_INST*sizeof(nfapi_cqi_indication_raw_pdu_t));
|
||||
UL_INFO->cqi_ind.number_of_cqis = 0;
|
||||
UL_INFO->cqi_ind.cqi_indication_body.cqi_pdu_list = (nfapi_cqi_indication_pdu_t *)malloc(NB_UE_INST*sizeof(nfapi_cqi_indication_pdu_t));
|
||||
UL_INFO->cqi_ind.cqi_indication_body.cqi_raw_pdu_list = (nfapi_cqi_indication_raw_pdu_t *)malloc(NB_UE_INST*sizeof(nfapi_cqi_indication_raw_pdu_t));
|
||||
UL_INFO->cqi_ind.cqi_indication_body.number_of_cqis = 0;
|
||||
|
||||
if (pthread_mutex_lock(&phy_stub_ticking->mutex_single_thread) != 0) {
|
||||
LOG_E( MAC, "[SCHED][UE] error locking mutex for ue_thread_id %d (mutex_single_thread)\n",ue_thread_id);
|
||||
@@ -1283,10 +1283,10 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg)
|
||||
free(UL_INFO->sr_ind.sr_indication_body.sr_pdu_list);
|
||||
UL_INFO->sr_ind.sr_indication_body.sr_pdu_list = NULL;
|
||||
//}
|
||||
free(UL_INFO->cqi_ind.cqi_pdu_list);
|
||||
UL_INFO->cqi_ind.cqi_pdu_list = NULL;
|
||||
free(UL_INFO->cqi_ind.cqi_raw_pdu_list);
|
||||
UL_INFO->cqi_ind.cqi_raw_pdu_list = NULL;
|
||||
free(UL_INFO->cqi_ind.cqi_indication_body.cqi_pdu_list);
|
||||
UL_INFO->cqi_ind.cqi_indication_body.cqi_pdu_list = NULL;
|
||||
free(UL_INFO->cqi_ind.cqi_indication_body.cqi_raw_pdu_list);
|
||||
UL_INFO->cqi_ind.cqi_indication_body.cqi_raw_pdu_list = NULL;
|
||||
free(UL_INFO);
|
||||
UL_INFO = NULL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user