nr-softmodem.c: remove unnecessary printfs
This commit is contained in:
@@ -182,12 +182,9 @@ struct timespec clock_difftime(struct timespec start, struct timespec end) {
|
||||
return temp;
|
||||
}
|
||||
|
||||
void print_difftimes(void) {
|
||||
#ifdef DEBUG
|
||||
printf("difftimes min = %lu ns ; max = %lu ns\n", min_diff_time.tv_nsec, max_diff_time.tv_nsec);
|
||||
#else
|
||||
LOG_I(HW,"difftimes min = %lu ns ; max = %lu ns\n", min_diff_time.tv_nsec, max_diff_time.tv_nsec);
|
||||
#endif
|
||||
void print_difftimes(void)
|
||||
{
|
||||
LOG_I(HW, "difftimes min = %lu ns ; max = %lu ns\n", min_diff_time.tv_nsec, max_diff_time.tv_nsec);
|
||||
}
|
||||
|
||||
void update_difftimes(struct timespec start, struct timespec end) {
|
||||
@@ -411,7 +408,6 @@ static void get_options(configmodule_interface_t *cfg)
|
||||
NRRCConfig();
|
||||
NB_gNB_INST = RC.nb_nr_inst;
|
||||
NB_RU = RC.nb_RU;
|
||||
printf("Configuration: nb_rrc_inst %d, nb_nr_L1_inst %d, nb_ru %hhu\n",NB_gNB_INST,RC.nb_nr_L1_inst,NB_RU);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -461,20 +457,18 @@ void set_default_frame_parms(nfapi_nr_config_request_scf_t *config[MAX_NUM_CCs],
|
||||
// downlink_frequency[CC_id][1] = downlink_frequency[CC_id][0];
|
||||
// downlink_frequency[CC_id][2] = downlink_frequency[CC_id][0];
|
||||
// downlink_frequency[CC_id][3] = downlink_frequency[CC_id][0];
|
||||
//printf("Downlink for CC_id %d frequency set to %u\n", CC_id, downlink_frequency[CC_id][0]);
|
||||
frame_parms[CC_id]->dl_CarrierFreq=downlink_frequency[CC_id][0];
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
void wait_RUs(void) {
|
||||
LOG_I(PHY,"Waiting for RUs to be configured ... RC.ru_mask:%02lx\n", RC.ru_mask);
|
||||
LOG_D(PHY, "Waiting for RUs to be configured ... RC.ru_mask:%02lx\n", RC.ru_mask);
|
||||
// wait for all RUs to be configured over fronthaul
|
||||
pthread_mutex_lock(&RC.ru_mutex);
|
||||
|
||||
while (RC.ru_mask>0) {
|
||||
pthread_cond_wait(&RC.ru_cond,&RC.ru_mutex);
|
||||
printf("RC.ru_mask:%02lx\n", RC.ru_mask);
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&RC.ru_mutex);
|
||||
@@ -486,7 +480,7 @@ void wait_gNBs(void) {
|
||||
int waiting=1;
|
||||
|
||||
while (waiting==1) {
|
||||
printf("Waiting for gNB L1 instances to all get configured ... sleeping 50ms (nb_nr_sL1_inst %d)\n",RC.nb_nr_L1_inst);
|
||||
LOG_D(GNB_APP, "Waiting for gNB L1 instances to all get configured ... sleeping 50ms (nb_nr_sL1_inst %d)\n", RC.nb_nr_L1_inst);
|
||||
usleep(50*1000);
|
||||
waiting=0;
|
||||
|
||||
@@ -498,7 +492,7 @@ void wait_gNBs(void) {
|
||||
}
|
||||
}
|
||||
|
||||
printf("gNB L1 are configured\n");
|
||||
LOG_D(GNB_APP, "gNB L1 are configured\n");
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -514,15 +508,14 @@ void terminate_task(task_id_t task_id, module_id_t mod_id) {
|
||||
//extern void free_transport(PHY_VARS_gNB *);
|
||||
extern void nr_phy_free_RU(RU_t *);
|
||||
|
||||
static void wait_nfapi_init(char *thread_name) {
|
||||
printf( "waiting for NFAPI PNF connection and population of global structure (%s)\n",thread_name);
|
||||
static void wait_nfapi_init(char *thread_name)
|
||||
{
|
||||
pthread_mutex_lock( &nfapi_sync_mutex );
|
||||
|
||||
while (nfapi_sync_var<0)
|
||||
pthread_cond_wait( &nfapi_sync_cond, &nfapi_sync_mutex );
|
||||
|
||||
pthread_mutex_unlock(&nfapi_sync_mutex);
|
||||
printf( "NFAPI: got sync (%s)\n", thread_name);
|
||||
}
|
||||
|
||||
void init_pdcp(void) {
|
||||
@@ -601,7 +594,6 @@ int main( int argc, char **argv ) {
|
||||
memset(tx_max_power,0,sizeof(int)*MAX_NUM_CCs);
|
||||
logInit();
|
||||
lock_memory_to_ram();
|
||||
printf("Reading in command-line options\n");
|
||||
get_options(uniqCfg);
|
||||
|
||||
EPC_MODE_ENABLED = !IS_SOFTMODEM_NOS1;
|
||||
@@ -626,7 +618,6 @@ int main( int argc, char **argv ) {
|
||||
#endif
|
||||
//randominit (0);
|
||||
set_taus_seed (0);
|
||||
printf("configuring for RAU/RRU\n");
|
||||
|
||||
cpuf=get_cpu_freq_GHz();
|
||||
itti_init(TASK_MAX, tasks_info);
|
||||
@@ -653,27 +644,20 @@ int main( int argc, char **argv ) {
|
||||
usleep(1000);
|
||||
|
||||
if (NFAPI_MODE && NFAPI_MODE != NFAPI_MODE_AERIAL) {
|
||||
printf("NFAPI*** - mutex and cond created - will block shortly for completion of PNF connection\n");
|
||||
pthread_cond_init(&sync_cond,NULL);
|
||||
pthread_mutex_init(&sync_mutex, NULL);
|
||||
}
|
||||
|
||||
printf("START MAIN THREADS\n");
|
||||
// start the main threads
|
||||
number_of_cards = 1;
|
||||
printf("RC.nb_nr_L1_inst:%d\n", RC.nb_nr_L1_inst);
|
||||
|
||||
if (RC.nb_nr_L1_inst > 0) {
|
||||
printf("Initializing gNB threads wait_for_sync:%d\n", wait_for_sync);
|
||||
init_gNB(wait_for_sync);
|
||||
}
|
||||
|
||||
printf("wait_gNBs()\n");
|
||||
wait_gNBs();
|
||||
printf("About to Init RU threads RC.nb_RU:%d\n", RC.nb_RU);
|
||||
int sl_ahead = NFAPI_MODE == NFAPI_MODE_AERIAL ? 0 : 6;
|
||||
if (RC.nb_RU >0) {
|
||||
printf("Initializing RU threads\n");
|
||||
init_NR_RU(uniqCfg, get_softmodem_params()->rf_config_file);
|
||||
|
||||
for (ru_id=0; ru_id<RC.nb_RU; ru_id++) {
|
||||
@@ -719,12 +703,8 @@ int main( int argc, char **argv ) {
|
||||
nvIPC_Init(nrmac->nvipc_params_s);
|
||||
#endif
|
||||
if (RC.nb_nr_L1_inst > 0) {
|
||||
printf("wait RUs\n");
|
||||
wait_RUs();
|
||||
printf("ALL RUs READY!\n");
|
||||
printf("RC.nb_RU:%d\n", RC.nb_RU);
|
||||
// once all RUs are ready initialize the rest of the gNBs ((dependence on final RU parameters after configuration)
|
||||
printf("ALL RUs ready - init gNBs\n");
|
||||
|
||||
for (int idx=0;idx<RC.nb_nr_L1_inst;idx++) RC.gNB[idx]->if_inst->sl_ahead = sl_ahead;
|
||||
if (IS_SOFTMODEM_DOSCOPE || IS_SOFTMODEM_IMSCOPE_ENABLED) {
|
||||
@@ -743,15 +723,10 @@ int main( int argc, char **argv ) {
|
||||
}
|
||||
|
||||
if (NFAPI_MODE != NFAPI_MODE_PNF && NFAPI_MODE != NFAPI_MODE_VNF && NFAPI_MODE != NFAPI_MODE_AERIAL) {
|
||||
printf("Not NFAPI mode - call init_eNB_afterRU()\n");
|
||||
init_eNB_afterRU();
|
||||
} else {
|
||||
printf("NFAPI mode - DO NOT call init_gNB_afterRU()\n");
|
||||
}
|
||||
|
||||
printf("ALL RUs ready - ALL gNBs ready\n");
|
||||
// connect the TX/RX buffers
|
||||
printf("Sending sync to all threads\n");
|
||||
pthread_mutex_lock(&sync_mutex);
|
||||
sync_var=0;
|
||||
pthread_cond_broadcast(&sync_cond);
|
||||
@@ -759,12 +734,10 @@ int main( int argc, char **argv ) {
|
||||
}
|
||||
|
||||
// wait for end of program
|
||||
printf("Entering ITTI signals handler\n");
|
||||
printf("TYPE <CTRL-C> TO TERMINATE\n");
|
||||
itti_wait_tasks_end(NULL);
|
||||
printf("Returned from ITTI signal handler\n");
|
||||
oai_exit=1;
|
||||
printf("oai_exit=%d\n",oai_exit);
|
||||
|
||||
// cleanup
|
||||
if (RC.nb_nr_L1_inst > 0)
|
||||
|
||||
Reference in New Issue
Block a user