Commit 68f8ef7c authored by Robert Schmidt's avatar Robert Schmidt

Reduce amount of logs in L1/L2

This commit removes many logs that just show memory addresses, indices,
etc., which, I presume, do not mean anything to the "average user" and
developers alike.
parent 8cc6c0cb
...@@ -363,7 +363,6 @@ void wait_RUs(void) { ...@@ -363,7 +363,6 @@ void wait_RUs(void) {
} }
pthread_mutex_unlock(&RC.ru_mutex); pthread_mutex_unlock(&RC.ru_mutex);
LOG_I(PHY,"RUs configured\n");
} }
void wait_eNBs(void) { void wait_eNBs(void) {
......
...@@ -400,12 +400,12 @@ void term_gNB_Tpool(int inst) { ...@@ -400,12 +400,12 @@ void term_gNB_Tpool(int inst) {
void init_eNB_afterRU(void) { void init_eNB_afterRU(void) {
int inst,ru_id,i,aa; int inst,ru_id,i,aa;
PHY_VARS_gNB *gNB; PHY_VARS_gNB *gNB;
LOG_I(PHY,"%s() RC.nb_nr_inst:%d\n", __FUNCTION__, RC.nb_nr_inst); LOG_D(PHY, "%s() RC.nb_nr_inst:%d\n", __FUNCTION__, RC.nb_nr_inst);
if(NFAPI_MODE == NFAPI_MODE_PNF) if(NFAPI_MODE == NFAPI_MODE_PNF)
RC.nb_nr_inst = 1; RC.nb_nr_inst = 1;
for (inst=0; inst<RC.nb_nr_inst; inst++) { for (inst=0; inst<RC.nb_nr_inst; inst++) {
LOG_I(PHY,"RC.nb_nr_CC[inst:%d]:%p\n", inst, RC.gNB[inst]); LOG_D(PHY, "RC.nb_nr_CC[inst:%d]:%p\n", inst, RC.gNB[inst]);
gNB = RC.gNB[inst]; gNB = RC.gNB[inst];
gNB->ldpc_offload_flag = get_softmodem_params()->ldpc_offload_flag; gNB->ldpc_offload_flag = get_softmodem_params()->ldpc_offload_flag;
...@@ -415,8 +415,7 @@ void init_eNB_afterRU(void) { ...@@ -415,8 +415,7 @@ void init_eNB_afterRU(void) {
// map antennas and PRACH signals to gNB RX // map antennas and PRACH signals to gNB RX
if (0) AssertFatal(gNB->num_RU>0,"Number of RU attached to gNB %d is zero\n",gNB->Mod_id); if (0) AssertFatal(gNB->num_RU>0,"Number of RU attached to gNB %d is zero\n",gNB->Mod_id);
LOG_I(PHY,"Mapping RX ports from %d RUs to gNB %d\n",gNB->num_RU,gNB->Mod_id); LOG_D(PHY, "Mapping RX ports from %d RUs to gNB %d\n", gNB->num_RU, gNB->Mod_id);
LOG_I(PHY,"gNB->num_RU:%d\n", gNB->num_RU);
for (ru_id=0,aa=0; ru_id<gNB->num_RU; ru_id++) { for (ru_id=0,aa=0; ru_id<gNB->num_RU; ru_id++) {
AssertFatal(gNB->RU_list[ru_id]->common.rxdataF != NULL, "RU %d : common.rxdataF is NULL\n", gNB->RU_list[ru_id]->idx); AssertFatal(gNB->RU_list[ru_id]->common.rxdataF != NULL, "RU %d : common.rxdataF is NULL\n", gNB->RU_list[ru_id]->idx);
...@@ -447,30 +446,25 @@ void init_gNB(int wait_for_sync) { ...@@ -447,30 +446,25 @@ void init_gNB(int wait_for_sync) {
if (RC.gNB == NULL) { if (RC.gNB == NULL) {
RC.gNB = (PHY_VARS_gNB **) calloc(1+RC.nb_nr_L1_inst, sizeof(PHY_VARS_gNB *)); RC.gNB = (PHY_VARS_gNB **) calloc(1+RC.nb_nr_L1_inst, sizeof(PHY_VARS_gNB *));
LOG_I(PHY,"gNB L1 structure RC.gNB allocated @ %p\n",RC.gNB); LOG_D(PHY, "gNB L1 structure RC.gNB allocated @ %p\n", RC.gNB);
} }
for (inst=0; inst<RC.nb_nr_L1_inst; inst++) { for (inst=0; inst<RC.nb_nr_L1_inst; inst++) {
if (RC.gNB[inst] == NULL) { if (RC.gNB[inst] == NULL) {
RC.gNB[inst] = (PHY_VARS_gNB *) calloc(1, sizeof(PHY_VARS_gNB)); RC.gNB[inst] = (PHY_VARS_gNB *) calloc(1, sizeof(PHY_VARS_gNB));
LOG_I(PHY,"[nr-gnb.c] gNB structure RC.gNB[%d] allocated @ %p\n",inst,RC.gNB[inst]); LOG_D(PHY, "[nr-gnb.c] gNB structure RC.gNB[%d] allocated @ %p\n", inst, RC.gNB[inst]);
} }
gNB = RC.gNB[inst]; gNB = RC.gNB[inst];
/*nr_polar_init(&gNB->nrPolar_params, /*nr_polar_init(&gNB->nrPolar_params,
NR_POLAR_PBCH_MESSAGE_TYPE, NR_POLAR_PBCH_MESSAGE_TYPE,
NR_POLAR_PBCH_PAYLOAD_BITS, NR_POLAR_PBCH_PAYLOAD_BITS,
NR_POLAR_PBCH_AGGREGATION_LEVEL);*/ NR_POLAR_PBCH_AGGREGATION_LEVEL);*/
LOG_I(PHY,"Initializing gNB %d\n",inst);
LOG_I(PHY,"Initializing gNB %d\n",inst);
LOG_I(PHY,"Registering with MAC interface module (before %p)\n",gNB->if_inst); AssertFatal((gNB->if_inst = NR_IF_Module_init(inst)) != NULL, "Cannot register interface");
AssertFatal((gNB->if_inst = NR_IF_Module_init(inst))!=NULL,"Cannot register interface");
LOG_I(PHY,"Registering with MAC interface module (after %p)\n",gNB->if_inst);
gNB->if_inst->NR_Schedule_response = nr_schedule_response; gNB->if_inst->NR_Schedule_response = nr_schedule_response;
gNB->if_inst->NR_PHY_config_req = nr_phy_config_request; gNB->if_inst->NR_PHY_config_req = nr_phy_config_request;
memset((void *)&gNB->UL_INFO,0,sizeof(gNB->UL_INFO)); memset(&gNB->UL_INFO, 0, sizeof(gNB->UL_INFO));
LOG_I(PHY,"Setting indication lists\n");
gNB->UL_INFO.rx_ind.pdu_list = gNB->rx_pdu_list; gNB->UL_INFO.rx_ind.pdu_list = gNB->rx_pdu_list;
gNB->UL_INFO.crc_ind.crc_list = gNB->crc_pdu_list; gNB->UL_INFO.crc_ind.crc_list = gNB->crc_pdu_list;
...@@ -482,11 +476,7 @@ void init_gNB(int wait_for_sync) { ...@@ -482,11 +476,7 @@ void init_gNB(int wait_for_sync) {
gNB->prach_energy_counter = 0; gNB->prach_energy_counter = 0;
gNB->chest_time = get_softmodem_params()->chest_time; gNB->chest_time = get_softmodem_params()->chest_time;
gNB->chest_freq = get_softmodem_params()->chest_freq; gNB->chest_freq = get_softmodem_params()->chest_freq;
} }
LOG_I(PHY,"[nr-gnb.c] gNB structure allocated\n");
} }
......
...@@ -88,7 +88,7 @@ int attach_rru(RU_t *ru) { ...@@ -88,7 +88,7 @@ int attach_rru(RU_t *ru) {
memset((void *)&rru_config_msg,0,sizeof(rru_config_msg)); memset((void *)&rru_config_msg,0,sizeof(rru_config_msg));
rru_config_msg.type = RAU_tick; rru_config_msg.type = RAU_tick;
rru_config_msg.len = sizeof(RRU_CONFIG_msg_t)-MAX_RRU_CONFIG_SIZE; rru_config_msg.len = sizeof(RRU_CONFIG_msg_t)-MAX_RRU_CONFIG_SIZE;
LOG_I(PHY,"Sending RAU tick to RRU %d\n",ru->idx); LOG_D(PHY, "Sending RAU tick to RRU %d\n", ru->idx);
AssertFatal((ru->ifdevice.trx_ctlsend_func(&ru->ifdevice,&rru_config_msg,rru_config_msg.len)!=-1), AssertFatal((ru->ifdevice.trx_ctlsend_func(&ru->ifdevice,&rru_config_msg,rru_config_msg.len)!=-1),
"RU %d cannot access remote radio\n",ru->idx); "RU %d cannot access remote radio\n",ru->idx);
msg_len = sizeof(RRU_CONFIG_msg_t)-MAX_RRU_CONFIG_SIZE+sizeof(RRU_capabilities_t); msg_len = sizeof(RRU_CONFIG_msg_t)-MAX_RRU_CONFIG_SIZE+sizeof(RRU_capabilities_t);
...@@ -97,7 +97,7 @@ int attach_rru(RU_t *ru) { ...@@ -97,7 +97,7 @@ int attach_rru(RU_t *ru) {
if ((len = ru->ifdevice.trx_ctlrecv_func(&ru->ifdevice, if ((len = ru->ifdevice.trx_ctlrecv_func(&ru->ifdevice,
&rru_config_msg, &rru_config_msg,
msg_len))<0) { msg_len))<0) {
LOG_I(PHY,"Waiting for RRU %d\n",ru->idx); LOG_D(PHY, "Waiting for RRU %d\n", ru->idx);
} else if (rru_config_msg.type == RRU_capabilities) { } else if (rru_config_msg.type == RRU_capabilities) {
AssertFatal(rru_config_msg.len==msg_len,"Received capabilities with incorrect length (%d!=%d)\n",(int)rru_config_msg.len,(int)msg_len); AssertFatal(rru_config_msg.len==msg_len,"Received capabilities with incorrect length (%d!=%d)\n",(int)rru_config_msg.len,(int)msg_len);
LOG_I(PHY,"Received capabilities from RRU %d (len %d/%d, num_bands %d,max_pdschReferenceSignalPower %d, max_rxgain %d, nb_tx %d, nb_rx %d)\n",ru->idx, LOG_I(PHY,"Received capabilities from RRU %d (len %d/%d, num_bands %d,max_pdschReferenceSignalPower %d, max_rxgain %d, nb_tx %d, nb_rx %d)\n",ru->idx,
...@@ -1756,7 +1756,7 @@ void init_NR_RU(configmodule_interface_t *cfg, char *rf_config_file) ...@@ -1756,7 +1756,7 @@ void init_NR_RU(configmodule_interface_t *cfg, char *rf_config_file)
AssertFatal(gNB0, "gNB0 is null!\n"); AssertFatal(gNB0, "gNB0 is null!\n");
if (gNB0 && gNB_RC) { if (gNB0 && gNB_RC) {
LOG_I(PHY,"Copying frame parms from gNB in RC to gNB %d in ru %d and frame_parms in ru\n", gNB0->Mod_id, ru->idx); LOG_D(PHY, "Copying frame parms from gNB in RC to gNB %d in ru %d and frame_parms in ru\n", gNB0->Mod_id, ru->idx);
memcpy((void *)fp, &gNB_RC->frame_parms, sizeof(NR_DL_FRAME_PARMS)); memcpy((void *)fp, &gNB_RC->frame_parms, sizeof(NR_DL_FRAME_PARMS));
memcpy((void *)&gNB0->frame_parms, (void *)&gNB_RC->frame_parms, sizeof(NR_DL_FRAME_PARMS)); memcpy((void *)&gNB0->frame_parms, (void *)&gNB_RC->frame_parms, sizeof(NR_DL_FRAME_PARMS));
// attach all RU to all gNBs in its list/ // attach all RU to all gNBs in its list/
...@@ -1772,14 +1772,14 @@ void init_NR_RU(configmodule_interface_t *cfg, char *rf_config_file) ...@@ -1772,14 +1772,14 @@ void init_NR_RU(configmodule_interface_t *cfg, char *rf_config_file)
init_RU_proc(ru); init_RU_proc(ru);
if (ru->if_south != REMOTE_IF4p5) { if (ru->if_south != REMOTE_IF4p5) {
int threadCnt = ru->num_tpcores; int threadCnt = ru->num_tpcores;
if (threadCnt < 2) LOG_E(PHY,"Number of threads for gNB should be more than 1. Allocated only %d\n",threadCnt); if (threadCnt < 2)
else LOG_I(PHY,"RU Thread pool size %d\n",threadCnt); LOG_E(PHY, "Number of threads for gNB should be more than 1. Allocated only %d\n", threadCnt);
char pool[80]; char pool[80];
int s_offset = sprintf(pool,"%d",ru->tpcores[0]); int s_offset = sprintf(pool,"%d",ru->tpcores[0]);
for (int icpu=1; icpu<threadCnt; icpu++) { for (int icpu=1; icpu<threadCnt; icpu++) {
s_offset+=sprintf(pool+s_offset,",%d",ru->tpcores[icpu]); s_offset+=sprintf(pool+s_offset,",%d",ru->tpcores[icpu]);
} }
LOG_I(PHY,"RU thread-pool core string %s\n",pool); LOG_I(PHY, "RU thread-pool core string %s (size %d)\n", pool, threadCnt);
ru->threadPool = (tpool_t*)malloc(sizeof(tpool_t)); ru->threadPool = (tpool_t*)malloc(sizeof(tpool_t));
initTpool(pool, ru->threadPool, cpumeas(CPUMEAS_GETSTATE)); initTpool(pool, ru->threadPool, cpumeas(CPUMEAS_GETSTATE));
// FEP RX result FIFO // FEP RX result FIFO
...@@ -1879,7 +1879,7 @@ static void NRRCconfig_RU(configmodule_interface_t *cfg) ...@@ -1879,7 +1879,7 @@ static void NRRCconfig_RU(configmodule_interface_t *cfg)
LOG_E(PHY, "Erroneous RU clock source in the provided configuration file: '%s'\n", *(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr)); LOG_E(PHY, "Erroneous RU clock source in the provided configuration file: '%s'\n", *(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr));
} }
} else { } else {
LOG_I(PHY,"Setting clock source to internal\n"); LOG_D(PHY, "Setting clock source to internal\n");
RC.ru[j]->openair0_cfg.clock_source = internal; RC.ru[j]->openair0_cfg.clock_source = internal;
} }
...@@ -1897,7 +1897,7 @@ static void NRRCconfig_RU(configmodule_interface_t *cfg) ...@@ -1897,7 +1897,7 @@ static void NRRCconfig_RU(configmodule_interface_t *cfg)
LOG_E(PHY, "Erroneous RU time source in the provided configuration file: '%s'\n", *(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr)); LOG_E(PHY, "Erroneous RU time source in the provided configuration file: '%s'\n", *(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr));
} }
} else { } else {
LOG_I(PHY,"Setting time source to internal\n"); LOG_D(PHY, "Setting time source to internal\n");
RC.ru[j]->openair0_cfg.time_source = internal; RC.ru[j]->openair0_cfg.time_source = internal;
} }
......
...@@ -265,7 +265,7 @@ static int create_gNB_tasks(ngran_node_t node_type, configmodule_interface_t *cf ...@@ -265,7 +265,7 @@ static int create_gNB_tasks(ngran_node_t node_type, configmodule_interface_t *cf
uint32_t gnb_id_end = gnb_id_start + gnb_nb; uint32_t gnb_id_end = gnb_id_start + gnb_nb;
LOG_D(GNB_APP, "%s(gnb_nb:%d)\n", __FUNCTION__, gnb_nb); LOG_D(GNB_APP, "%s(gnb_nb:%d)\n", __FUNCTION__, gnb_nb);
itti_wait_ready(1); itti_wait_ready(1);
LOG_I(PHY, "%s() Task ready initialize structures\n", __FUNCTION__); LOG_D(PHY, "%s() Task ready initialize structures\n", __FUNCTION__);
#ifdef ENABLE_AERIAL #ifdef ENABLE_AERIAL
AssertFatal(NFAPI_MODE == NFAPI_MODE_AERIAL,"Can only be run with '--nfapi AERIAL' when compiled with AERIAL support, if you want to run other (n)FAPI modes, please run ./build_oai without -w AERIAL"); AssertFatal(NFAPI_MODE == NFAPI_MODE_AERIAL,"Can only be run with '--nfapi AERIAL' when compiled with AERIAL support, if you want to run other (n)FAPI modes, please run ./build_oai without -w AERIAL");
...@@ -280,7 +280,7 @@ static int create_gNB_tasks(ngran_node_t node_type, configmodule_interface_t *cf ...@@ -280,7 +280,7 @@ static int create_gNB_tasks(ngran_node_t node_type, configmodule_interface_t *cf
if (RC.nb_nr_macrlc_inst > 0) if (RC.nb_nr_macrlc_inst > 0)
RCconfig_nr_macrlc(cfg); RCconfig_nr_macrlc(cfg);
LOG_I(PHY, "%s() RC.nb_nr_L1_inst:%d\n", __FUNCTION__, RC.nb_nr_L1_inst); LOG_D(PHY, "%s() RC.nb_nr_L1_inst:%d\n", __FUNCTION__, RC.nb_nr_L1_inst);
if (RC.nb_nr_L1_inst>0) AssertFatal(l1_north_init_gNB()==0,"could not initialize L1 north interface\n"); if (RC.nb_nr_L1_inst>0) AssertFatal(l1_north_init_gNB()==0,"could not initialize L1 north interface\n");
...@@ -288,7 +288,7 @@ static int create_gNB_tasks(ngran_node_t node_type, configmodule_interface_t *cf ...@@ -288,7 +288,7 @@ static int create_gNB_tasks(ngran_node_t node_type, configmodule_interface_t *cf
"Number of gNB is greater than gNB defined in configuration file (%d/%d)!", "Number of gNB is greater than gNB defined in configuration file (%d/%d)!",
gnb_nb, RC.nb_nr_inst); gnb_nb, RC.nb_nr_inst);
LOG_I(GNB_APP,"Allocating gNB_RRC_INST for %d instances\n",RC.nb_nr_inst); LOG_D(GNB_APP, "Allocating gNB_RRC_INST for %d instances\n", RC.nb_nr_inst);
if (RC.nb_nr_inst > 0) { if (RC.nb_nr_inst > 0) {
AssertFatal(RC.nb_nr_inst == 1, "multiple RRC instances are not supported\n"); AssertFatal(RC.nb_nr_inst == 1, "multiple RRC instances are not supported\n");
...@@ -472,7 +472,7 @@ void wait_RUs(void) { ...@@ -472,7 +472,7 @@ void wait_RUs(void) {
} }
pthread_mutex_unlock(&RC.ru_mutex); pthread_mutex_unlock(&RC.ru_mutex);
LOG_I(PHY,"RUs configured\n"); LOG_D(PHY, "RUs configured\n");
} }
void wait_gNBs(void) { void wait_gNBs(void) {
......
...@@ -47,15 +47,10 @@ const char *nfapi_get_strmode(void) { ...@@ -47,15 +47,10 @@ const char *nfapi_get_strmode(void) {
return nfapi_str_mode[nfapi_params.nfapi_mode]; return nfapi_str_mode[nfapi_params.nfapi_mode];
} }
void nfapi_logmode() {
LOG_I(ENB_APP,"nfapi (%d) running mode: %s\n",nfapi_params.nfapi_mode,nfapi_get_strmode());
}
nfapi_mode_t nfapi_getmode(void) { nfapi_mode_t nfapi_getmode(void) {
return nfapi_params.nfapi_mode; return nfapi_params.nfapi_mode;
} }
void nfapi_setmode(nfapi_mode_t nfapi_mode) { void nfapi_setmode(nfapi_mode_t nfapi_mode) {
nfapi_params.nfapi_mode = nfapi_mode; nfapi_params.nfapi_mode = nfapi_mode;
nfapi_logmode();
} }
...@@ -39,7 +39,7 @@ int phy_init_RU(RU_t *ru) { ...@@ -39,7 +39,7 @@ int phy_init_RU(RU_t *ru) {
RU_CALIBRATION *calibration = &ru->calibration; RU_CALIBRATION *calibration = &ru->calibration;
int i,j,p,re; int i,j,p,re;
//load_dftslib(); //load_dftslib();
LOG_I(PHY,"Initializing RU signal buffers (if_south %s) nb_tx %d\n",ru_if_types[ru->if_south],ru->nb_tx); LOG_D(PHY, "Initializing RU signal buffers (if_south %s) nb_tx %d\n", ru_if_types[ru->if_south], ru->nb_tx);
if (ru->is_slave == 1) { if (ru->is_slave == 1) {
generate_ul_ref_sigs_rx(); generate_ul_ref_sigs_rx();
...@@ -54,8 +54,11 @@ int phy_init_RU(RU_t *ru) { ...@@ -54,8 +54,11 @@ int phy_init_RU(RU_t *ru) {
for (i=0; i<ru->nb_tx; i++) { for (i=0; i<ru->nb_tx; i++) {
// Allocate 10 subframes of I/Q TX signal data (time) if not // Allocate 10 subframes of I/Q TX signal data (time) if not
ru->common.txdata[i] = (int32_t *)malloc16_clear( fp->samples_per_tti*10*sizeof(int32_t) ); ru->common.txdata[i] = (int32_t *)malloc16_clear( fp->samples_per_tti*10*sizeof(int32_t) );
LOG_I(PHY,"[INIT] common.txdata[%d] = %p (%lu bytes)\n",i,ru->common.txdata[i], LOG_D(PHY,
fp->samples_per_tti*10*sizeof(int32_t)); "[INIT] common.txdata[%d] = %p (%lu bytes)\n",
i,
ru->common.txdata[i],
fp->samples_per_tti * 10 * sizeof(int32_t));
} }
if (ru->is_slave == 1) { if (ru->is_slave == 1) {
...@@ -71,7 +74,6 @@ int phy_init_RU(RU_t *ru) { ...@@ -71,7 +74,6 @@ int phy_init_RU(RU_t *ru) {
} }
} // IF5 or local RF } // IF5 or local RF
else { else {
// LOG_I(PHY,"No rxdata/txdata for RU\n");
ru->common.txdata = (int32_t **)NULL; ru->common.txdata = (int32_t **)NULL;
ru->common.rxdata = (int32_t **)NULL; ru->common.rxdata = (int32_t **)NULL;
} }
...@@ -79,22 +81,21 @@ int phy_init_RU(RU_t *ru) { ...@@ -79,22 +81,21 @@ int phy_init_RU(RU_t *ru) {
if (ru->function != NGFI_RRU_IF5) { // we need to do RX/TX RU processing if (ru->function != NGFI_RRU_IF5) { // we need to do RX/TX RU processing
load_dftslib(); load_dftslib();
init_7_5KHz(); init_7_5KHz();
LOG_I(PHY,"nb_tx %d\n",ru->nb_tx); LOG_D(PHY, "nb_tx %d\n", ru->nb_tx);
ru->common.rxdata_7_5kHz = (int32_t **)malloc16(ru->nb_rx*sizeof(int32_t *) ); ru->common.rxdata_7_5kHz = (int32_t **)malloc16(ru->nb_rx*sizeof(int32_t *) );
for (i=0; i<ru->nb_rx; i++) { for (i=0; i<ru->nb_rx; i++) {
ru->common.rxdata_7_5kHz[i] = (int32_t *)malloc16_clear( 2*fp->samples_per_tti*2*sizeof(int32_t) ); ru->common.rxdata_7_5kHz[i] = (int32_t *)malloc16_clear( 2*fp->samples_per_tti*2*sizeof(int32_t) );
LOG_I(PHY,"rxdata_7_5kHz[%d] %p for RU %d\n",i,ru->common.rxdata_7_5kHz[i],ru->idx); LOG_D(PHY, "rxdata_7_5kHz[%d] %p for RU %d\n", i, ru->common.rxdata_7_5kHz[i], ru->idx);
} }
// allocate IFFT input buffers (TX) // allocate IFFT input buffers (TX)
ru->common.txdataF_BF = (int32_t **)malloc16(ru->nb_tx*sizeof(int32_t *)); ru->common.txdataF_BF = (int32_t **)malloc16(ru->nb_tx*sizeof(int32_t *));
LOG_I(PHY,"[INIT] common.txdata_BF= %p (%lu bytes)\n",ru->common.txdataF_BF, LOG_D(PHY, "[INIT] common.txdata_BF= %p (%lu bytes)\n", ru->common.txdataF_BF, ru->nb_tx * sizeof(int32_t *));
ru->nb_tx*sizeof(int32_t *));
for (i=0; i<ru->nb_tx; i++) { for (i=0; i<ru->nb_tx; i++) {
ru->common.txdataF_BF[i] = (int32_t *)malloc16_clear(fp->symbols_per_tti*fp->ofdm_symbol_size*sizeof(int32_t) ); ru->common.txdataF_BF[i] = (int32_t *)malloc16_clear(fp->symbols_per_tti*fp->ofdm_symbol_size*sizeof(int32_t) );
LOG_I(PHY,"txdataF_BF[%d] %p for RU %d\n",i,ru->common.txdataF_BF[i],ru->idx); LOG_D(PHY, "txdataF_BF[%d] %p for RU %d\n", i, ru->common.txdataF_BF[i], ru->idx);
} }
// allocate FFT output buffers (RX) // allocate FFT output buffers (RX)
...@@ -103,7 +104,7 @@ int phy_init_RU(RU_t *ru) { ...@@ -103,7 +104,7 @@ int phy_init_RU(RU_t *ru) {
for (i=0; i<ru->nb_rx; i++) { for (i=0; i<ru->nb_rx; i++) {
// allocate 2 subframes of I/Q signal data (frequency) // allocate 2 subframes of I/Q signal data (frequency)
ru->common.rxdataF[i] = (int32_t *)malloc16_clear(sizeof(int32_t)*(2*fp->ofdm_symbol_size*fp->symbols_per_tti) ); ru->common.rxdataF[i] = (int32_t *)malloc16_clear(sizeof(int32_t)*(2*fp->ofdm_symbol_size*fp->symbols_per_tti) );
LOG_I(PHY,"rxdataF[%d] %p for RU %d\n",i,ru->common.rxdataF[i],ru->idx); LOG_D(PHY, "rxdataF[%d] %p for RU %d\n", i, ru->common.rxdataF[i], ru->idx);
} }
if (ru->is_slave == 1) { if (ru->is_slave == 1) {
...@@ -114,7 +115,7 @@ int phy_init_RU(RU_t *ru) { ...@@ -114,7 +115,7 @@ int phy_init_RU(RU_t *ru) {
for (i=0; i<ru->nb_rx; i++) { for (i=0; i<ru->nb_rx; i++) {
// allocate 2 subframes of I/Q signal data (frequency) // allocate 2 subframes of I/Q signal data (frequency)
calibration->rxdataF_ext[i] = (int32_t *)malloc16_clear(sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti ); calibration->rxdataF_ext[i] = (int32_t *)malloc16_clear(sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti );
LOG_I(PHY,"rxdataF_ext[%d] %p for RU %d\n",i,calibration->rxdataF_ext[i],ru->idx); LOG_D(PHY, "rxdataF_ext[%d] %p for RU %d\n", i, calibration->rxdataF_ext[i], ru->idx);
calibration->drs_ch_estimates[i] = (int32_t *)malloc16_clear(sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti); calibration->drs_ch_estimates[i] = (int32_t *)malloc16_clear(sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti);
} }
} }
...@@ -186,7 +187,7 @@ int phy_init_RU(RU_t *ru) { ...@@ -186,7 +187,7 @@ int phy_init_RU(RU_t *ru) {
void phy_free_RU(RU_t *ru) { void phy_free_RU(RU_t *ru) {
int i,j,p; int i,j,p;
RU_CALIBRATION *calibration = &ru->calibration; RU_CALIBRATION *calibration = &ru->calibration;
LOG_I(PHY, "Freeing RU signal buffers (if_south %s) nb_tx %d\n", ru_if_types[ru->if_south], ru->nb_tx); LOG_D(PHY, "Freeing RU signal buffers (if_south %s) nb_tx %d\n", ru_if_types[ru->if_south], ru->nb_tx);
if (ru->if_south <= REMOTE_IF5) { // this means REMOTE_IF5 or LOCAL_RF, so free memory for time-domain signals if (ru->if_south <= REMOTE_IF5) { // this means REMOTE_IF5 or LOCAL_RF, so free memory for time-domain signals
for (i = 0; i < ru->nb_tx; i++) free_and_zero(ru->common.txdata[i]); for (i = 0; i < ru->nb_tx; i++) free_and_zero(ru->common.txdata[i]);
......
...@@ -47,19 +47,19 @@ int l1_north_init_gNB() { ...@@ -47,19 +47,19 @@ int l1_north_init_gNB() {
AssertFatal(RC.nb_nr_L1_inst>0,"nb_nr_L1_inst=%d\n",RC.nb_nr_L1_inst); AssertFatal(RC.nb_nr_L1_inst>0,"nb_nr_L1_inst=%d\n",RC.nb_nr_L1_inst);
AssertFatal(RC.gNB!=NULL,"RC.gNB is null\n"); AssertFatal(RC.gNB!=NULL,"RC.gNB is null\n");
LOG_I(PHY,"%s() RC.nb_nr_L1_inst:%d\n", __FUNCTION__, RC.nb_nr_L1_inst); LOG_D(PHY, "%s() RC.nb_nr_L1_inst:%d\n", __FUNCTION__, RC.nb_nr_L1_inst);
for (int i=0; i<RC.nb_nr_L1_inst; i++) { for (int i=0; i<RC.nb_nr_L1_inst; i++) {
AssertFatal(RC.gNB[i]!=NULL,"RC.gNB[%d] is null\n",i); AssertFatal(RC.gNB[i]!=NULL,"RC.gNB[%d] is null\n",i);
if ((RC.gNB[i]->if_inst = NR_IF_Module_init(i))<0) return(-1); if ((RC.gNB[i]->if_inst = NR_IF_Module_init(i))<0) return(-1);
LOG_I(PHY,"%s() RC.gNB[%d] installing callbacks\n", __FUNCTION__, i); LOG_D(PHY, "%s() RC.gNB[%d] installing callbacks\n", __FUNCTION__, i);
RC.gNB[i]->if_inst->NR_PHY_config_req = nr_phy_config_request; RC.gNB[i]->if_inst->NR_PHY_config_req = nr_phy_config_request;
RC.gNB[i]->if_inst->NR_Schedule_response = nr_schedule_response; RC.gNB[i]->if_inst->NR_Schedule_response = nr_schedule_response;
} }
} else { } else {
LOG_I(PHY,"%s() Not installing PHY callbacks - RC.nb_nr_L1_inst:%d RC.gNB:%p\n", __FUNCTION__, RC.nb_nr_L1_inst, RC.gNB); LOG_D(PHY, "%s() Not installing PHY callbacks - RC.nb_nr_L1_inst:%d RC.gNB:%p\n", __FUNCTION__, RC.nb_nr_L1_inst, RC.gNB);
} }
return(0); return(0);
...@@ -125,7 +125,7 @@ void phy_init_nr_gNB(PHY_VARS_gNB *gNB) ...@@ -125,7 +125,7 @@ void phy_init_nr_gNB(PHY_VARS_gNB *gNB)
AssertFatal(Ptx > 0 && Ptx < 9,"Ptx %d is not supported\n", Ptx); AssertFatal(Ptx > 0 && Ptx < 9,"Ptx %d is not supported\n", Ptx);
AssertFatal(Prx > 0 && Prx < 9,"Prx %d is not supported\n", Prx); AssertFatal(Prx > 0 && Prx < 9,"Prx %d is not supported\n", Prx);
LOG_I(PHY, "[gNB %d]About to wait for gNB to be configured\n", gNB->Mod_id); LOG_D(PHY, "[gNB %d]About to wait for gNB to be configured\n", gNB->Mod_id);
while(gNB->configured == 0) while(gNB->configured == 0)
usleep(10000); usleep(10000);
...@@ -381,8 +381,7 @@ void nr_phy_config_request_sim(PHY_VARS_gNB *gNB, ...@@ -381,8 +381,7 @@ void nr_phy_config_request_sim(PHY_VARS_gNB *gNB,
init_symbol_rotation(fp); init_symbol_rotation(fp);
init_timeshift_rotation(fp); init_timeshift_rotation(fp);
gNB->configured = 1; gNB->configured = 1;
LOG_I(PHY,"gNB configured\n");
} }
void nr_phy_config_request(NR_PHY_Config_t *phy_config) void nr_phy_config_request(NR_PHY_Config_t *phy_config)
...@@ -434,8 +433,6 @@ void nr_phy_config_request(NR_PHY_Config_t *phy_config) ...@@ -434,8 +433,6 @@ void nr_phy_config_request(NR_PHY_Config_t *phy_config)
fp->ofdm_offset_divisor = RC.gNB[Mod_id]->ofdm_offset_divisor; fp->ofdm_offset_divisor = RC.gNB[Mod_id]->ofdm_offset_divisor;
init_symbol_rotation(fp); init_symbol_rotation(fp);
init_timeshift_rotation(fp); init_timeshift_rotation(fp);
LOG_I(PHY,"gNB %d configured\n",Mod_id);
} }
void init_DLSCH_struct(PHY_VARS_gNB *gNB, processingData_L1tx_t *msg) void init_DLSCH_struct(PHY_VARS_gNB *gNB, processingData_L1tx_t *msg)
...@@ -476,7 +473,6 @@ void init_nr_transport(PHY_VARS_gNB *gNB) ...@@ -476,7 +473,6 @@ void init_nr_transport(PHY_VARS_gNB *gNB)
NR_DL_FRAME_PARMS *fp = &gNB->frame_parms; NR_DL_FRAME_PARMS *fp = &gNB->frame_parms;
const nfapi_nr_config_request_scf_t *cfg = &gNB->gNB_config; const nfapi_nr_config_request_scf_t *cfg = &gNB->gNB_config;
LOG_I(PHY, "Initialise nr transport\n");
int nb_slots_per_period = cfg->cell_config.frame_duplex_type.value ? int nb_slots_per_period = cfg->cell_config.frame_duplex_type.value ?
fp->slots_per_frame / get_nb_periods_per_frame(cfg->tdd_table.tdd_period.value) : fp->slots_per_frame / get_nb_periods_per_frame(cfg->tdd_table.tdd_period.value) :
......
...@@ -33,7 +33,7 @@ int nr_phy_init_RU(RU_t *ru) ...@@ -33,7 +33,7 @@ int nr_phy_init_RU(RU_t *ru)
{ {
NR_DL_FRAME_PARMS *fp = ru->nr_frame_parms; NR_DL_FRAME_PARMS *fp = ru->nr_frame_parms;
LOG_I(PHY,"Initializing RU signal buffers (if_south %s) nb_tx %d, nb_rx %d\n",ru_if_types[ru->if_south],ru->nb_tx, ru->nb_rx); LOG_D(PHY, "Initializing RU signal buffers (if_south %s) nb_tx %d, nb_rx %d\n", ru_if_types[ru->if_south], ru->nb_tx, ru->nb_rx);
nfapi_nr_config_request_scf_t *cfg = &ru->config; nfapi_nr_config_request_scf_t *cfg = &ru->config;
ru->nb_log_antennas = 0; ru->nb_log_antennas = 0;
...@@ -60,29 +60,30 @@ int nr_phy_init_RU(RU_t *ru) ...@@ -60,29 +60,30 @@ int nr_phy_init_RU(RU_t *ru)
for (int i = 0; i < ru->nb_tx; i++) { for (int i = 0; i < ru->nb_tx; i++) {
// Allocate 10 subframes of I/Q TX signal data (time) if not // Allocate 10 subframes of I/Q TX signal data (time) if not
ru->common.txdata[i] = (int32_t*)malloc16_clear((ru->sf_extension + fp->samples_per_frame)*sizeof(int32_t)); ru->common.txdata[i] = (int32_t*)malloc16_clear((ru->sf_extension + fp->samples_per_frame)*sizeof(int32_t));
LOG_I(PHY,"[INIT] common.txdata[%d] = %p (%lu bytes,sf_extension %d)\n",i,ru->common.txdata[i], LOG_D(PHY,
(ru->sf_extension + fp->samples_per_frame)*sizeof(int32_t),ru->sf_extension); "[INIT] common.txdata[%d] = %p (%lu bytes,sf_extension %d)\n",
i,
ru->common.txdata[i],
(ru->sf_extension + fp->samples_per_frame) * sizeof(int32_t),
ru->sf_extension);
ru->common.txdata[i] = &ru->common.txdata[i][ru->sf_extension]; ru->common.txdata[i] = &ru->common.txdata[i][ru->sf_extension];
LOG_I(PHY,"[INIT] common.txdata[%d] = %p \n",i,ru->common.txdata[i]); LOG_D(PHY, "[INIT] common.txdata[%d] = %p \n", i, ru->common.txdata[i]);
} }
for (int i = 0; i < ru->nb_rx; i++) { for (int i = 0; i < ru->nb_rx; i++) {
ru->common.rxdata[i] = (int32_t*)malloc16_clear( fp->samples_per_frame*sizeof(int32_t) ); ru->common.rxdata[i] = (int32_t*)malloc16_clear( fp->samples_per_frame*sizeof(int32_t) );
} }
} // IF5 or local RF } // IF5 or local RF
else { else {
// LOG_I(PHY,"No rxdata/txdata for RU\n");
ru->common.txdata = (int32_t**)NULL; ru->common.txdata = (int32_t**)NULL;
ru->common.rxdata = (int32_t**)NULL; ru->common.rxdata = (int32_t**)NULL;
} }
if (ru->function != NGFI_RRU_IF5) { // we need to do RX/TX RU processing if (ru->function != NGFI_RRU_IF5) { // we need to do RX/TX RU processing
LOG_I(PHY,"nb_tx %d\n",ru->nb_tx); LOG_D(PHY, "nb_tx %d\n", ru->nb_tx);
ru->common.rxdata_7_5kHz = (int32_t**)malloc16(ru->nb_rx*sizeof(int32_t*) ); ru->common.rxdata_7_5kHz = (int32_t**)malloc16(ru->nb_rx*sizeof(int32_t*) );
for (int i = 0; i < ru->nb_rx; i++) { for (int i = 0; i < ru->nb_rx; i++) {
ru->common.rxdata_7_5kHz[i] = (int32_t*)malloc16_clear( 2*fp->samples_per_subframe*2*sizeof(int32_t) ); ru->common.rxdata_7_5kHz[i] = (int32_t*)malloc16_clear( 2*fp->samples_per_subframe*2*sizeof(int32_t) );
LOG_I(PHY,"rxdata_7_5kHz[%d] %p for RU %d\n",i,ru->common.rxdata_7_5kHz[i],ru->idx); LOG_D(PHY, "rxdata_7_5kHz[%d] %p for RU %d\n", i, ru->common.rxdata_7_5kHz[i], ru->idx);
} }
...@@ -94,10 +95,10 @@ int nr_phy_init_RU(RU_t *ru) ...@@ -94,10 +95,10 @@ int nr_phy_init_RU(RU_t *ru)
// allocate IFFT input buffers (TX) // allocate IFFT input buffers (TX)
ru->common.txdataF_BF = (int32_t **)malloc16(ru->nb_tx*sizeof(int32_t*)); ru->common.txdataF_BF = (int32_t **)malloc16(ru->nb_tx*sizeof(int32_t*));
LOG_I(PHY,"[INIT] common.txdata_BF= %p (%lu bytes)\n", ru->common.txdataF_BF, ru->nb_tx*sizeof(int32_t*)); LOG_D(PHY, "[INIT] common.txdata_BF= %p (%lu bytes)\n", ru->common.txdataF_BF, ru->nb_tx * sizeof(int32_t *));
for (int i = 0; i < ru->nb_tx; i++) { for (int i = 0; i < ru->nb_tx; i++) {
ru->common.txdataF_BF[i] = (int32_t*)malloc16_clear(fp->samples_per_subframe_wCP*sizeof(int32_t) ); ru->common.txdataF_BF[i] = (int32_t*)malloc16_clear(fp->samples_per_subframe_wCP*sizeof(int32_t) );
LOG_I(PHY,"txdataF_BF[%d] %p for RU %d\n",i,ru->common.txdataF_BF[i],ru->idx); LOG_D(PHY, "txdataF_BF[%d] %p for RU %d\n", i, ru->common.txdataF_BF[i], ru->idx);
} }
// allocate FFT output buffers (RX) // allocate FFT output buffers (RX)
ru->common.rxdataF = (int32_t**)malloc16(ru->nb_rx*sizeof(int32_t*) ); ru->common.rxdataF = (int32_t**)malloc16(ru->nb_rx*sizeof(int32_t*) );
...@@ -105,7 +106,7 @@ int nr_phy_init_RU(RU_t *ru) ...@@ -105,7 +106,7 @@ int nr_phy_init_RU(RU_t *ru)
// allocate 4 slots of I/Q signal data (frequency) // allocate 4 slots of I/Q signal data (frequency)
int size = RU_RX_SLOT_DEPTH * fp->symbols_per_slot * fp->ofdm_symbol_size; int size = RU_RX_SLOT_DEPTH * fp->symbols_per_slot * fp->ofdm_symbol_size;
ru->common.rxdataF[i] = (int32_t*)malloc16_clear(sizeof(**ru->common.rxdataF) * size); ru->common.rxdataF[i] = (int32_t*)malloc16_clear(sizeof(**ru->common.rxdataF) * size);
LOG_I(PHY,"rxdataF[%d] %p for RU %d\n",i,ru->common.rxdataF[i],ru->idx); LOG_D(PHY, "rxdataF[%d] %p for RU %d\n", i, ru->common.rxdataF[i], ru->idx);
} }
/* number of elements of an array X is computed as sizeof(X) / sizeof(X[0]) */ /* number of elements of an array X is computed as sizeof(X) / sizeof(X[0]) */
...@@ -124,7 +125,7 @@ int nr_phy_init_RU(RU_t *ru) ...@@ -124,7 +125,7 @@ int nr_phy_init_RU(RU_t *ru)
AssertFatal(ru->num_gNB <= NUMBER_OF_gNB_MAX,"gNB instances %d > %d\n", AssertFatal(ru->num_gNB <= NUMBER_OF_gNB_MAX,"gNB instances %d > %d\n",
ru->num_gNB,NUMBER_OF_gNB_MAX); ru->num_gNB,NUMBER_OF_gNB_MAX);
LOG_I(PHY,"[INIT] %s() ru->num_gNB:%d \n", __FUNCTION__, ru->num_gNB); LOG_D(PHY, "[INIT] %s() ru->num_gNB:%d \n", __FUNCTION__, ru->num_gNB);
} // !=IF5 } // !=IF5
...@@ -135,7 +136,7 @@ int nr_phy_init_RU(RU_t *ru) ...@@ -135,7 +136,7 @@ int nr_phy_init_RU(RU_t *ru)
void nr_phy_free_RU(RU_t *ru) void nr_phy_free_RU(RU_t *ru)
{ {
LOG_I(PHY, "Freeing RU signal buffers (if_south %s) nb_tx %d\n", ru_if_types[ru->if_south], ru->nb_tx); LOG_D(PHY, "Freeing RU signal buffers (if_south %s) nb_tx %d\n", ru_if_types[ru->if_south], ru->nb_tx);
if (ru->if_south <= REMOTE_IF5) { // this means REMOTE_IF5 or LOCAL_RF, so free memory for time-domain signals if (ru->if_south <= REMOTE_IF5) { // this means REMOTE_IF5 or LOCAL_RF, so free memory for time-domain signals
// Hack: undo what is done at allocation // Hack: undo what is done at allocation
......
...@@ -586,7 +586,7 @@ void perform_symbol_rotation(NR_DL_FRAME_PARMS *fp, double f0, c16_t *symbol_rot ...@@ -586,7 +586,7 @@ void perform_symbol_rotation(NR_DL_FRAME_PARMS *fp, double f0, c16_t *symbol_rot
const double Ncp0=16*64 + (144*64*(1/(float)(1<<fp->numerology_index))); const double Ncp0=16*64 + (144*64*(1/(float)(1<<fp->numerology_index)));
const double Ncp1=(144*64*(1/(float)(1<<fp->numerology_index))); const double Ncp1=(144*64*(1/(float)(1<<fp->numerology_index)));
LOG_I(PHY, "Doing symbol rotation calculation for TX/RX, f0 %f Hz, Nsymb %d\n", f0, nsymb); LOG_D(PHY, "Doing symbol rotation calculation for TX/RX, f0 %f Hz, Nsymb %d\n", f0, nsymb);
double tl = 0.0; double tl = 0.0;
double poff = 0.0; double poff = 0.0;
......
...@@ -72,23 +72,15 @@ uint32_t gNB_app_register(uint32_t gnb_id_start, uint32_t gnb_id_end)//, const E ...@@ -72,23 +72,15 @@ uint32_t gNB_app_register(uint32_t gnb_id_start, uint32_t gnb_id_end)//, const E
for (gnb_id = gnb_id_start; (gnb_id < gnb_id_end) ; gnb_id++) { for (gnb_id = gnb_id_start; (gnb_id < gnb_id_end) ; gnb_id++) {
{ {
if(get_softmodem_params()->sa){ if(get_softmodem_params()->sa){
ngap_register_gnb_req_t *ngap_register_gNB; //Type Temporarily reuse
// note: there is an implicit relationship between the data structure and the message name // note: there is an implicit relationship between the data structure and the message name
msg_p = itti_alloc_new_message (TASK_GNB_APP, 0, NGAP_REGISTER_GNB_REQ); //Message Temporarily reuse msg_p = itti_alloc_new_message (TASK_GNB_APP, 0, NGAP_REGISTER_GNB_REQ); //Message Temporarily reuse
RCconfig_NR_NG(msg_p, gnb_id); RCconfig_NR_NG(msg_p, gnb_id);
ngap_register_gNB = &NGAP_REGISTER_GNB_REQ(msg_p); //Message Temporarily reuse
LOG_I(GNB_APP,"default drx %d\n",ngap_register_gNB->default_drx);
itti_send_msg_to_task (TASK_NGAP, GNB_MODULE_ID_TO_INSTANCE(gnb_id), msg_p); itti_send_msg_to_task (TASK_NGAP, GNB_MODULE_ID_TO_INSTANCE(gnb_id), msg_p);
} }
} }
LOG_I(GNB_APP,"[gNB %d] gNB_app_register for instance %d\n", gnb_id, GNB_MODULE_ID_TO_INSTANCE(gnb_id));
register_gnb_pending++; register_gnb_pending++;
} }
...@@ -105,7 +97,6 @@ uint32_t gNB_app_register_x2(uint32_t gnb_id_start, uint32_t gnb_id_end) { ...@@ -105,7 +97,6 @@ uint32_t gNB_app_register_x2(uint32_t gnb_id_start, uint32_t gnb_id_end) {
for (gnb_id = gnb_id_start; (gnb_id < gnb_id_end) ; gnb_id++) { for (gnb_id = gnb_id_start; (gnb_id < gnb_id_end) ; gnb_id++) {
{ {
msg_p = itti_alloc_new_message (TASK_GNB_APP, 0, X2AP_REGISTER_ENB_REQ); msg_p = itti_alloc_new_message (TASK_GNB_APP, 0, X2AP_REGISTER_ENB_REQ);
LOG_I(X2AP, "GNB_ID: %d \n", gnb_id);
RCconfig_NR_X2(msg_p, gnb_id); RCconfig_NR_X2(msg_p, gnb_id);
itti_send_msg_to_task (TASK_X2AP, ENB_MODULE_ID_TO_INSTANCE(gnb_id), msg_p); itti_send_msg_to_task (TASK_X2AP, ENB_MODULE_ID_TO_INSTANCE(gnb_id), msg_p);
register_gnb_x2_pending++; register_gnb_x2_pending++;
......
...@@ -863,7 +863,7 @@ void RCconfig_NR_L1(void) ...@@ -863,7 +863,7 @@ void RCconfig_NR_L1(void)
int XP = *GNBParamList.paramarray[0][GNB_PDSCH_ANTENNAPORTS_XP_IDX].iptr; int XP = *GNBParamList.paramarray[0][GNB_PDSCH_ANTENNAPORTS_XP_IDX].iptr;
char *ulprbbl = *GNBParamList.paramarray[0][GNB_ULPRBBLACKLIST_IDX].strptr; char *ulprbbl = *GNBParamList.paramarray[0][GNB_ULPRBBLACKLIST_IDX].strptr;
if (ulprbbl) if (ulprbbl)
LOG_I(NR_PHY, "PRB blacklist %s\n", ulprbbl); LOG_D(NR_PHY, "PRB blacklist %s\n", ulprbbl);
char *save = NULL; char *save = NULL;
char *pt = strtok_r(ulprbbl, ",", &save); char *pt = strtok_r(ulprbbl, ",", &save);
int prbbl[275]; int prbbl[275];
...@@ -874,13 +874,13 @@ void RCconfig_NR_L1(void) ...@@ -874,13 +874,13 @@ void RCconfig_NR_L1(void)
const int rb = atoi(pt); const int rb = atoi(pt);
AssertFatal(rb < 275, "RB %d out of bounds (max 275)\n", rb); AssertFatal(rb < 275, "RB %d out of bounds (max 275)\n", rb);
prbbl[rb] = 0x3FFF; // all symbols taken prbbl[rb] = 0x3FFF; // all symbols taken
LOG_I(NR_PHY, "Blacklisting prb %d\n", atoi(pt)); LOG_D(NR_PHY, "Blacklisting prb %d\n", atoi(pt));
pt = strtok_r(NULL, ",", &save); pt = strtok_r(NULL, ",", &save);
num_prbbl++; num_prbbl++;
} }
RC.gNB[j]->num_ulprbbl = num_prbbl; RC.gNB[j]->num_ulprbbl = num_prbbl;
LOG_I(NR_PHY, "Copying %d blacklisted PRB to L1 context\n", num_prbbl); LOG_D(NR_PHY, "Copying %d blacklisted PRB to L1 context\n", num_prbbl);
memcpy(RC.gNB[j]->ulprbbl, prbbl, 275 * sizeof(int)); memcpy(RC.gNB[j]->ulprbbl, prbbl, 275 * sizeof(int));
RC.gNB[j]->ap_N1 = N1; RC.gNB[j]->ap_N1 = N1;
...@@ -897,7 +897,6 @@ void RCconfig_NR_L1(void) ...@@ -897,7 +897,6 @@ void RCconfig_NR_L1(void)
for (j = 0; j < RC.nb_nr_L1_inst; j++) { for (j = 0; j < RC.nb_nr_L1_inst; j++) {
if (RC.gNB[j] == NULL) { if (RC.gNB[j] == NULL) {
RC.gNB[j] = (PHY_VARS_gNB *)malloc(sizeof(PHY_VARS_gNB)); RC.gNB[j] = (PHY_VARS_gNB *)malloc(sizeof(PHY_VARS_gNB));
LOG_I(NR_PHY, "RC.gNB[%d] = %p\n", j, RC.gNB[j]);
memset(RC.gNB[j], 0, sizeof(PHY_VARS_gNB)); memset(RC.gNB[j], 0, sizeof(PHY_VARS_gNB));
RC.gNB[j]->Mod_id = j; RC.gNB[j]->Mod_id = j;
} }
...@@ -934,9 +933,15 @@ void RCconfig_NR_L1(void) ...@@ -934,9 +933,15 @@ void RCconfig_NR_L1(void)
RC.nb_nr_CC = (int *)malloc((1 + RC.nb_nr_inst) * sizeof(int)); RC.nb_nr_CC = (int *)malloc((1 + RC.nb_nr_inst) * sizeof(int));
RC.nb_nr_CC[0] = 1; RC.nb_nr_CC[0] = 1;
LOG_I(PHY, "%s() NFAPI PNF mode - RC.nb_nr_inst=1 this is because phy_init_RU() uses that to index and not RC.num_gNB - why the 2 similar variables?\n", __FUNCTION__); LOG_D(PHY,
LOG_I(PHY, "%s() NFAPI PNF mode - RC.nb_nr_CC[0]=%d for init_gNB_afterRU()\n", __FUNCTION__, RC.nb_nr_CC[0]); "%s() NFAPI PNF mode - RC.nb_nr_inst=1 this is because phy_init_RU() uses that to index and not RC.num_gNB - why the "
LOG_I(PHY, "%s() NFAPI PNF mode - RC.nb_nr_macrlc_inst:%d because used by mac_top_init_gNB()\n", __FUNCTION__, RC.nb_nr_macrlc_inst); "2 similar variables?\n",
__FUNCTION__);
LOG_D(PHY, "%s() NFAPI PNF mode - RC.nb_nr_CC[0]=%d for init_gNB_afterRU()\n", __FUNCTION__, RC.nb_nr_CC[0]);
LOG_D(PHY,
"%s() NFAPI PNF mode - RC.nb_nr_macrlc_inst:%d because used by mac_top_init_gNB()\n",
__FUNCTION__,
RC.nb_nr_macrlc_inst);
configure_nr_nfapi_pnf(RC.gNB[j]->eth_params_n.remote_addr, configure_nr_nfapi_pnf(RC.gNB[j]->eth_params_n.remote_addr,
RC.gNB[j]->eth_params_n.remote_portc, RC.gNB[j]->eth_params_n.remote_portc,
...@@ -948,7 +953,7 @@ void RCconfig_NR_L1(void) ...@@ -948,7 +953,7 @@ void RCconfig_NR_L1(void)
} // for (j = 0; j < RC.nb_nr_L1_inst; j++) } // for (j = 0; j < RC.nb_nr_L1_inst; j++)
l1_north_init_gNB(); l1_north_init_gNB();
} else { } else {
LOG_I(PHY, "No " CONFIG_STRING_L1_LIST " configuration found"); LOG_E(PHY, "No " CONFIG_STRING_L1_LIST " configuration found");
// need to create some structures for VNF // need to create some structures for VNF
...@@ -957,7 +962,6 @@ void RCconfig_NR_L1(void) ...@@ -957,7 +962,6 @@ void RCconfig_NR_L1(void)
if (RC.gNB[j] == NULL) { if (RC.gNB[j] == NULL) {
RC.gNB[j] = (PHY_VARS_gNB *)malloc(sizeof(PHY_VARS_gNB)); RC.gNB[j] = (PHY_VARS_gNB *)malloc(sizeof(PHY_VARS_gNB));
memset((void *)RC.gNB[j], 0, sizeof(PHY_VARS_gNB)); memset((void *)RC.gNB[j], 0, sizeof(PHY_VARS_gNB));
LOG_I(PHY, "RC.gNB[%d] = %p\n", j, RC.gNB[j]);
RC.gNB[j]->Mod_id = j; RC.gNB[j]->Mod_id = j;
} }
} }
...@@ -2154,8 +2158,6 @@ void NRRCConfig(void) { ...@@ -2154,8 +2158,6 @@ void NRRCConfig(void) {
/* get global parameters, defined outside any section in the config file */ /* get global parameters, defined outside any section in the config file */
LOG_I(GNB_APP, "Getting GNBSParams\n");
config_get(config_get_if(), GNBSParams, sizeofArray(GNBSParams), NULL); config_get(config_get_if(), GNBSParams, sizeofArray(GNBSParams), NULL);
RC.nb_nr_inst = GNBSParams[GNB_ACTIVE_GNBS_IDX].numelt; RC.nb_nr_inst = GNBSParams[GNB_ACTIVE_GNBS_IDX].numelt;
......
...@@ -288,7 +288,6 @@ static void config_common(gNB_MAC_INST *nrmac, ...@@ -288,7 +288,6 @@ static void config_common(gNB_MAC_INST *nrmac,
cfg->carrier_config.dl_bandwidth.value = get_supported_bw_mhz(frequency_range, bw_index); cfg->carrier_config.dl_bandwidth.value = get_supported_bw_mhz(frequency_range, bw_index);
cfg->carrier_config.dl_bandwidth.tl.tag = NFAPI_NR_CONFIG_DL_BANDWIDTH_TAG; // temporary cfg->carrier_config.dl_bandwidth.tl.tag = NFAPI_NR_CONFIG_DL_BANDWIDTH_TAG; // temporary
cfg->num_tlv++; cfg->num_tlv++;
LOG_I(NR_MAC, "DL_Bandwidth:%d\n", cfg->carrier_config.dl_bandwidth.value);
cfg->carrier_config.dl_frequency.value = from_nrarfcn(*frequencyInfoDL->frequencyBandList.list.array[0], cfg->carrier_config.dl_frequency.value = from_nrarfcn(*frequencyInfoDL->frequencyBandList.list.array[0],
*scc->ssbSubcarrierSpacing, *scc->ssbSubcarrierSpacing,
...@@ -318,7 +317,6 @@ static void config_common(gNB_MAC_INST *nrmac, ...@@ -318,7 +317,6 @@ static void config_common(gNB_MAC_INST *nrmac,
cfg->carrier_config.uplink_bandwidth.value = get_supported_bw_mhz(frequency_range, bw_index); cfg->carrier_config.uplink_bandwidth.value = get_supported_bw_mhz(frequency_range, bw_index);
cfg->carrier_config.uplink_bandwidth.tl.tag = NFAPI_NR_CONFIG_UPLINK_BANDWIDTH_TAG; // temporary cfg->carrier_config.uplink_bandwidth.tl.tag = NFAPI_NR_CONFIG_UPLINK_BANDWIDTH_TAG; // temporary
cfg->num_tlv++; cfg->num_tlv++;
LOG_I(NR_MAC, "DL_Bandwidth:%d\n", cfg->carrier_config.uplink_bandwidth.value);
int UL_pointA; int UL_pointA;
if (frequencyInfoUL->absoluteFrequencyPointA == NULL) if (frequencyInfoUL->absoluteFrequencyPointA == NULL)
...@@ -496,7 +494,7 @@ static void config_common(gNB_MAC_INST *nrmac, ...@@ -496,7 +494,7 @@ static void config_common(gNB_MAC_INST *nrmac,
nrmac->ssb_SubcarrierOffset = cfg->ssb_table.ssb_subcarrier_offset.value; nrmac->ssb_SubcarrierOffset = cfg->ssb_table.ssb_subcarrier_offset.value;
nrmac->ssb_OffsetPointA = cfg->ssb_table.ssb_offset_point_a.value; nrmac->ssb_OffsetPointA = cfg->ssb_table.ssb_offset_point_a.value;
LOG_I(NR_MAC, LOG_D(NR_MAC,
"ssb_OffsetPointA %d, ssb_SubcarrierOffset %d\n", "ssb_OffsetPointA %d, ssb_SubcarrierOffset %d\n",
cfg->ssb_table.ssb_offset_point_a.value, cfg->ssb_table.ssb_offset_point_a.value,
cfg->ssb_table.ssb_subcarrier_offset.value); cfg->ssb_table.ssb_subcarrier_offset.value);
...@@ -582,7 +580,7 @@ static void config_common(gNB_MAC_INST *nrmac, ...@@ -582,7 +580,7 @@ static void config_common(gNB_MAC_INST *nrmac,
__FUNCTION__); __FUNCTION__);
cfg->tdd_table.tdd_period.value = *scc->tdd_UL_DL_ConfigurationCommon->pattern1.ext1->dl_UL_TransmissionPeriodicity_v1530; cfg->tdd_table.tdd_period.value = *scc->tdd_UL_DL_ConfigurationCommon->pattern1.ext1->dl_UL_TransmissionPeriodicity_v1530;
} }
LOG_I(NR_MAC, "Setting TDD configuration period to %d\n", cfg->tdd_table.tdd_period.value); LOG_D(NR_MAC, "Setting TDD configuration period to %d\n", cfg->tdd_table.tdd_period.value);
int periods_per_frame = set_tdd_config_nr(cfg, int periods_per_frame = set_tdd_config_nr(cfg,
frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing, frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing,
scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofDownlinkSlots, scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofDownlinkSlots,
...@@ -675,7 +673,7 @@ void nr_mac_config_scc(gNB_MAC_INST *nrmac, NR_ServingCellConfigCommon_t *scc, c ...@@ -675,7 +673,7 @@ void nr_mac_config_scc(gNB_MAC_INST *nrmac, NR_ServingCellConfigCommon_t *scc, c
initialize_beam_information(&nrmac->beam_info, *scc->ssbSubcarrierSpacing, n); initialize_beam_information(&nrmac->beam_info, *scc->ssbSubcarrierSpacing, n);
LOG_I(NR_MAC, "Configuring common parameters from NR ServingCellConfig\n"); LOG_D(NR_MAC, "Configuring common parameters from NR ServingCellConfig\n");
config_common(nrmac, config, scc); config_common(nrmac, config, scc);
fapi_beam_index_allocation(scc, nrmac); fapi_beam_index_allocation(scc, nrmac);
......
...@@ -217,8 +217,6 @@ void mac_top_init_gNB(ngran_node_t node_type, ...@@ -217,8 +217,6 @@ void mac_top_init_gNB(ngran_node_t node_type,
AssertFatal(RC.nb_nr_macrlc_inst == 1, "what is the point of calling %s() if you don't need exactly one MAC?\n", __func__); AssertFatal(RC.nb_nr_macrlc_inst == 1, "what is the point of calling %s() if you don't need exactly one MAC?\n", __func__);
LOG_I(MAC, "[MAIN] Init function start:nb_nr_macrlc_inst=%d\n",RC.nb_nr_macrlc_inst);
if (RC.nb_nr_macrlc_inst > 0) { if (RC.nb_nr_macrlc_inst > 0) {
RC.nrmac = (gNB_MAC_INST **) malloc16(RC.nb_nr_macrlc_inst *sizeof(gNB_MAC_INST *)); RC.nrmac = (gNB_MAC_INST **) malloc16(RC.nb_nr_macrlc_inst *sizeof(gNB_MAC_INST *));
......
...@@ -497,13 +497,13 @@ void NR_UL_indication(NR_UL_IND_t *UL_info) { ...@@ -497,13 +497,13 @@ void NR_UL_indication(NR_UL_IND_t *UL_info) {
NR_IF_Module_t *NR_IF_Module_init(int Mod_id) { NR_IF_Module_t *NR_IF_Module_init(int Mod_id) {
AssertFatal(Mod_id<MAX_MODULES,"Asking for Module %d > %d\n",Mod_id,MAX_IF_MODULES); AssertFatal(Mod_id<MAX_MODULES,"Asking for Module %d > %d\n",Mod_id,MAX_IF_MODULES);
LOG_I(PHY,"Installing callbacks for IF_Module - UL_indication\n"); LOG_D(PHY, "Installing callbacks for IF_Module - UL_indication\n");
if (nr_if_inst[Mod_id]==NULL) { if (nr_if_inst[Mod_id]==NULL) {
nr_if_inst[Mod_id] = (NR_IF_Module_t*)malloc(sizeof(NR_IF_Module_t)); nr_if_inst[Mod_id] = (NR_IF_Module_t*)malloc(sizeof(NR_IF_Module_t));
memset((void*)nr_if_inst[Mod_id],0,sizeof(NR_IF_Module_t)); memset((void*)nr_if_inst[Mod_id],0,sizeof(NR_IF_Module_t));
LOG_I(MAC,"Allocating shared L1/L2 interface structure for instance %d @ %p\n",Mod_id,nr_if_inst[Mod_id]); LOG_D(MAC, "Allocating shared L1/L2 interface structure for instance %d @ %p\n", Mod_id, nr_if_inst[Mod_id]);
nr_if_inst[Mod_id]->CC_mask=0; nr_if_inst[Mod_id]->CC_mask=0;
nr_if_inst[Mod_id]->NR_UL_indication = NR_UL_indication; nr_if_inst[Mod_id]->NR_UL_indication = NR_UL_indication;
......
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