From 1f228ee4d1219b956011d86d3aaefde4d5947dc6 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Sun, 2 Jun 2019 23:40:57 +0200 Subject: [PATCH] - reworked configuration file and configuration for gNB (write directly to ASN1 structure from config module instead of passing intermediate structures) - added prach procedures for gNB with configuration of PRACH L1/L2 parameters --- cmake_targets/CMakeLists.txt | 1 + common/ran_context.h | 4 +- executables/nr-gnb.c | 321 +- executables/nr-ru.c | 16 +- executables/nr-softmodem.c | 49 +- openair1/PHY/INIT/nr_init.c | 51 +- openair1/PHY/NR_TRANSPORT/nr_prach_common.c | 7 + openair1/PHY/TOOLS/nr_phy_scope.c | 4 +- openair1/PHY/defs_nr_common.h | 2 +- openair1/SCHED_NR/fapi_nr_l1.c | 3 +- openair1/SCHED_NR/nr_prach_procedures.c | 140 + openair1/SCHED_NR/nr_ru_procedures.c | 10 + openair1/SCHED_NR/phy_procedures_nr_gNB.c | 16 + openair2/COMMON/rrc_messages_types.h | 191 +- openair2/GNB_APP/RRC_nr_paramsvalues.h | 373 ++- openair2/GNB_APP/gnb_config.c | 2640 ++--------------- openair2/GNB_APP/gnb_paramdef.h | 655 ---- openair2/LAYER2/NR_MAC_gNB/config.c | 131 +- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c | 22 +- openair2/LAYER2/NR_MAC_gNB/mac_proto.h | 33 +- openair2/LAYER2/NR_MAC_gNB/nr_mac_common.c | 14 + openair2/NR_PHY_INTERFACE/NR_IF_Module.c | 4 + openair2/RRC/NR/L2_nr_interface.c | 2 +- openair2/RRC/NR/MESSAGES/asn1_msg.c | 725 +---- openair2/RRC/NR/MESSAGES/asn1_msg.h | 29 +- openair2/RRC/NR/nr_rrc_config.c | 140 +- openair2/RRC/NR/nr_rrc_defs.h | 20 +- openair2/RRC/NR/rrc_gNB.c | 150 +- .../CONF/gnb.band78.tm1.217PRB.usrpn300.conf | 318 +- 29 files changed, 1334 insertions(+), 4737 deletions(-) create mode 100644 openair1/SCHED_NR/nr_prach_procedures.c diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 204b227e68..df762bdad1 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -1010,6 +1010,7 @@ set(SCHED_NR_SRC ${OPENAIR1_DIR}/SCHED_NR/fapi_nr_l1.c ${OPENAIR1_DIR}/SCHED_NR/phy_procedures_nr_common.c ${OPENAIR1_DIR}/SCHED_NR/phy_procedures_nr_gNB.c + ${OPENAIR1_DIR}/SCHED_NR/nr_prach_procedures.c ) add_library(SCHED_NR_LIB ${SCHED_NR_SRC}) diff --git a/common/ran_context.h b/common/ran_context.h index 61e2ac477e..22f2ad2b5a 100644 --- a/common/ran_context.h +++ b/common/ran_context.h @@ -83,8 +83,6 @@ typedef struct { int nb_nr_L1_inst; /// Number of Component Carriers per instance in this node int *nb_L1_CC; - /// Number of NR Component Carriers per instance in this node - int *nb_nr_L1_CC; /// Number of RU instances in this node int nb_RU; /// FlexRAN context variables @@ -92,7 +90,7 @@ typedef struct { /// eNB context variables struct PHY_VARS_eNB_s ***eNB; /// gNB context variables - struct PHY_VARS_gNB_s ***gNB; + struct PHY_VARS_gNB_s **gNB; /// NB_IoT L1 context variables struct PHY_VARS_eNB_NB_IoT_s **L1_NB_IoT; /// RRC context variables diff --git a/executables/nr-gnb.c b/executables/nr-gnb.c index c0571f2bc5..578c241cbc 100644 --- a/executables/nr-gnb.c +++ b/executables/nr-gnb.c @@ -686,57 +686,56 @@ void init_gNB_proc(int inst) { gNB_L1_rxtx_proc_t *L1_proc,*L1_proc_tx; LOG_I(PHY,"%s(inst:%d) RC.nb_nr_CC[inst]:%d \n",__FUNCTION__,inst,RC.nb_nr_CC[inst]); - for (CC_id=0; CC_idproc; - L1_proc = &proc->L1_proc; - L1_proc_tx = &proc->L1_proc_tx; - L1_proc->instance_cnt = -1; - L1_proc_tx->instance_cnt = -1; - L1_proc->instance_cnt_RUs = 0; - L1_proc_tx->instance_cnt_RUs = 0; - proc->instance_cnt_prach = -1; - proc->instance_cnt_asynch_rxtx = -1; - proc->CC_id = CC_id; - proc->first_rx =1; - proc->first_tx =1; - proc->RU_mask =0; - proc->RU_mask_tx = (1<num_RU)-1; - proc->RU_mask_prach =0; - pthread_mutex_init( &gNB->UL_INFO_mutex, NULL); - pthread_mutex_init( &L1_proc->mutex, NULL); - pthread_mutex_init( &L1_proc_tx->mutex, NULL); - pthread_cond_init( &L1_proc->cond, NULL); - pthread_cond_init( &L1_proc_tx->cond, NULL); - pthread_mutex_init( &proc->mutex_prach, NULL); - pthread_mutex_init( &proc->mutex_asynch_rxtx, NULL); - pthread_mutex_init( &proc->mutex_RU,NULL); - pthread_mutex_init( &proc->mutex_RU_tx,NULL); - pthread_mutex_init( &proc->mutex_RU_PRACH,NULL); - pthread_cond_init( &proc->cond_prach, NULL); - pthread_cond_init( &proc->cond_asynch_rxtx, NULL); - LOG_I(PHY,"gNB->single_thread_flag:%d\n", gNB->single_thread_flag); - - if (get_thread_parallel_conf() == PARALLEL_RU_L1_SPLIT || get_thread_parallel_conf() == PARALLEL_RU_L1_TRX_SPLIT) { - threadCreate( &L1_proc->pthread, gNB_L1_thread, gNB, "L1_proc", -1, OAI_PRIORITY_RT ); - threadCreate( &L1_proc_tx->pthread, gNB_L1_thread_tx, gNB,"L1_proc_tx", -1, OAI_PRIORITY_RT); - } - - //pthread_create( &proc->pthread_prach, attr_prach, gNB_thread_prach, gNB ); - char name[16]; - - if (gNB->single_thread_flag==0) { - snprintf( name, sizeof(name), "L1 %d", i ); - pthread_setname_np( L1_proc->pthread, name ); - snprintf( name, sizeof(name), "L1TX %d", i ); - pthread_setname_np( L1_proc_tx->pthread, name ); - } - - AssertFatal(proc->instance_cnt_prach == -1,"instance_cnt_prach = %d\n",proc->instance_cnt_prach); + proc = &gNB->proc; + L1_proc = &proc->L1_proc; + L1_proc_tx = &proc->L1_proc_tx; + L1_proc->instance_cnt = -1; + L1_proc_tx->instance_cnt = -1; + L1_proc->instance_cnt_RUs = 0; + L1_proc_tx->instance_cnt_RUs = 0; + proc->instance_cnt_prach = -1; + proc->instance_cnt_asynch_rxtx = -1; + proc->CC_id = 0; + proc->first_rx =1; + proc->first_tx =1; + proc->RU_mask =0; + proc->RU_mask_tx = (1<num_RU)-1; + proc->RU_mask_prach =0; + pthread_mutex_init( &gNB->UL_INFO_mutex, NULL); + pthread_mutex_init( &L1_proc->mutex, NULL); + pthread_mutex_init( &L1_proc_tx->mutex, NULL); + pthread_cond_init( &L1_proc->cond, NULL); + pthread_cond_init( &L1_proc_tx->cond, NULL); + pthread_mutex_init( &proc->mutex_prach, NULL); + pthread_mutex_init( &proc->mutex_asynch_rxtx, NULL); + pthread_mutex_init( &proc->mutex_RU,NULL); + pthread_mutex_init( &proc->mutex_RU_tx,NULL); + pthread_mutex_init( &proc->mutex_RU_PRACH,NULL); + pthread_cond_init( &proc->cond_prach, NULL); + pthread_cond_init( &proc->cond_asynch_rxtx, NULL); + LOG_I(PHY,"gNB->single_thread_flag:%d\n", gNB->single_thread_flag); + + if (get_thread_parallel_conf() == PARALLEL_RU_L1_SPLIT || get_thread_parallel_conf() == PARALLEL_RU_L1_TRX_SPLIT) { + threadCreate( &L1_proc->pthread, gNB_L1_thread, gNB, "L1_proc", -1, OAI_PRIORITY_RT ); + threadCreate( &L1_proc_tx->pthread, gNB_L1_thread_tx, gNB,"L1_proc_tx", -1, OAI_PRIORITY_RT); } + + //pthread_create( &proc->pthread_prach, attr_prach, gNB_thread_prach, gNB ); + char name[16]; + + if (gNB->single_thread_flag==0) { + snprintf( name, sizeof(name), "L1 %d", i ); + pthread_setname_np( L1_proc->pthread, name ); + snprintf( name, sizeof(name), "L1TX %d", i ); + pthread_setname_np( L1_proc_tx->pthread, name ); + } + + AssertFatal(proc->instance_cnt_prach == -1,"instance_cnt_prach = %d\n",proc->instance_cnt_prach); + /* setup PHY proc TX sync mechanism */ pthread_mutex_init(&sync_phy_proc.mutex_phy_proc_tx, NULL); @@ -755,52 +754,51 @@ void kill_gNB_proc(int inst) { gNB_L1_proc_t *proc; gNB_L1_rxtx_proc_t *L1_proc, *L1_proc_tx; - for (int CC_id=0; CC_idproc; - L1_proc = &proc->L1_proc; - L1_proc_tx = &proc->L1_proc_tx; - LOG_I(PHY, "Killing TX CC_id %d inst %d\n", CC_id, inst ); - - if (get_thread_parallel_conf() == PARALLEL_RU_L1_SPLIT || get_thread_parallel_conf() == PARALLEL_RU_L1_TRX_SPLIT) { - pthread_mutex_lock(&L1_proc->mutex); - L1_proc->instance_cnt = 0; - pthread_cond_signal(&L1_proc->cond); - pthread_mutex_unlock(&L1_proc->mutex); - pthread_mutex_lock(&L1_proc_tx->mutex); - L1_proc_tx->instance_cnt = 0; - pthread_cond_signal(&L1_proc_tx->cond); - pthread_mutex_unlock(&L1_proc_tx->mutex); - } - - proc->instance_cnt_prach = 0; - pthread_cond_signal( &proc->cond_prach ); - pthread_cond_signal( &proc->cond_asynch_rxtx ); - pthread_cond_broadcast(&sync_phy_proc.cond_phy_proc_tx); - // LOG_D(PHY, "joining pthread_prach\n"); - // pthread_join( proc->pthread_prach, (void**)&status ); - LOG_I(PHY, "Destroying prach mutex/cond\n"); - pthread_mutex_destroy( &proc->mutex_prach ); - pthread_cond_destroy( &proc->cond_prach ); - LOG_I(PHY, "Destroying UL_INFO mutex\n"); - pthread_mutex_destroy(&gNB->UL_INFO_mutex); - - if (get_thread_parallel_conf() == PARALLEL_RU_L1_SPLIT || get_thread_parallel_conf() == PARALLEL_RU_L1_TRX_SPLIT) { - LOG_I(PHY, "Joining L1_proc mutex/cond\n"); - pthread_join( L1_proc->pthread, (void **)&status ); - LOG_I(PHY, "Joining L1_proc_tx mutex/cond\n"); - pthread_join( L1_proc_tx->pthread, (void **)&status ); - } - - LOG_I(PHY, "Destroying L1_proc mutex/cond\n"); - pthread_mutex_destroy( &L1_proc->mutex ); - pthread_cond_destroy( &L1_proc->cond ); - LOG_I(PHY, "Destroying L1_proc_tx mutex/cond\n"); - pthread_mutex_destroy( &L1_proc_tx->mutex ); - pthread_cond_destroy( &L1_proc_tx->cond ); - pthread_mutex_destroy( &proc->mutex_RU ); - pthread_mutex_destroy( &proc->mutex_RU_tx ); + gNB=RC.gNB[inst]; + proc = &gNB->proc; + L1_proc = &proc->L1_proc; + L1_proc_tx = &proc->L1_proc_tx; + LOG_I(PHY, "Killing TX CC_id %d inst %d\n",inst ); + + if (get_thread_parallel_conf() == PARALLEL_RU_L1_SPLIT || get_thread_parallel_conf() == PARALLEL_RU_L1_TRX_SPLIT) { + pthread_mutex_lock(&L1_proc->mutex); + L1_proc->instance_cnt = 0; + pthread_cond_signal(&L1_proc->cond); + pthread_mutex_unlock(&L1_proc->mutex); + pthread_mutex_lock(&L1_proc_tx->mutex); + L1_proc_tx->instance_cnt = 0; + pthread_cond_signal(&L1_proc_tx->cond); + pthread_mutex_unlock(&L1_proc_tx->mutex); } + + proc->instance_cnt_prach = 0; + pthread_cond_signal( &proc->cond_prach ); + pthread_cond_signal( &proc->cond_asynch_rxtx ); + pthread_cond_broadcast(&sync_phy_proc.cond_phy_proc_tx); + // LOG_D(PHY, "joining pthread_prach\n"); + // pthread_join( proc->pthread_prach, (void**)&status ); + LOG_I(PHY, "Destroying prach mutex/cond\n"); + pthread_mutex_destroy( &proc->mutex_prach ); + pthread_cond_destroy( &proc->cond_prach ); + LOG_I(PHY, "Destroying UL_INFO mutex\n"); + pthread_mutex_destroy(&gNB->UL_INFO_mutex); + + if (get_thread_parallel_conf() == PARALLEL_RU_L1_SPLIT || get_thread_parallel_conf() == PARALLEL_RU_L1_TRX_SPLIT) { + LOG_I(PHY, "Joining L1_proc mutex/cond\n"); + pthread_join( L1_proc->pthread, (void **)&status ); + LOG_I(PHY, "Joining L1_proc_tx mutex/cond\n"); + pthread_join( L1_proc_tx->pthread, (void **)&status ); + } + + LOG_I(PHY, "Destroying L1_proc mutex/cond\n"); + pthread_mutex_destroy( &L1_proc->mutex ); + pthread_cond_destroy( &L1_proc->cond ); + LOG_I(PHY, "Destroying L1_proc_tx mutex/cond\n"); + pthread_mutex_destroy( &L1_proc_tx->mutex ); + pthread_cond_destroy( &L1_proc_tx->cond ); + pthread_mutex_destroy( &proc->mutex_RU ); + pthread_mutex_destroy( &proc->mutex_RU_tx ); + } @@ -837,45 +835,43 @@ void init_eNB_afterRU(void) { LOG_I(PHY,"%s() RC.nb_nr_inst:%d\n", __FUNCTION__, RC.nb_nr_inst); for (inst=0; instnum_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_I(PHY,"Overwriting gNB->prach_vars.rxsigF[0]:%p\n", gNB->prach_vars.rxsigF[0]); - gNB->prach_vars.rxsigF[0] = (int16_t **)malloc16(64*sizeof(int16_t *)); - LOG_I(PHY,"gNB->num_RU:%d\n", gNB->num_RU); - - for (ru_id=0,aa=0; ru_idnum_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]->prach_rxsigF!=NULL, - "RU %d : prach_rxsigF is NULL\n", - gNB->RU_list[ru_id]->idx); - - for (i=0; iRU_list[ru_id]->nb_rx; aa++,i++) { - LOG_I(PHY,"Attaching RU %d antenna %d to gNB antenna %d\n",gNB->RU_list[ru_id]->idx,i,aa); - gNB->prach_vars.rxsigF[0][aa] = gNB->RU_list[ru_id]->prach_rxsigF[i]; - gNB->common_vars.rxdataF[aa] = gNB->RU_list[ru_id]->common.rxdataF[i]; - } + LOG_I(PHY,"RC.nb_nr_CC[inst:%d]:%p\n", inst, CC_id, RC.gNB[inst]); + gNB = RC.gNB[inst]; + phy_init_nr_gNB(gNB,0,0); + + // 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); + + LOG_I(PHY,"Mapping RX ports from %d RUs to gNB %d\n",gNB->num_RU,gNB->Mod_id); + //LOG_I(PHY,"Overwriting gNB->prach_vars.rxsigF[0]:%p\n", gNB->prach_vars.rxsigF[0]); + gNB->prach_vars.rxsigF[0] = (int16_t **)malloc16(64*sizeof(int16_t *)); + LOG_I(PHY,"gNB->num_RU:%d\n", gNB->num_RU); + + for (ru_id=0,aa=0; ru_idnum_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]->prach_rxsigF!=NULL, + "RU %d : prach_rxsigF is NULL\n", + gNB->RU_list[ru_id]->idx); + + for (i=0; iRU_list[ru_id]->nb_rx; aa++,i++) { + LOG_I(PHY,"Attaching RU %d antenna %d to gNB antenna %d\n",gNB->RU_list[ru_id]->idx,i,aa); + gNB->prach_vars.rxsigF[0][aa] = gNB->RU_list[ru_id]->prach_rxsigF[i]; + gNB->common_vars.rxdataF[aa] = gNB->RU_list[ru_id]->common.rxdataF[i]; } - - /* TODO: review this code, there is something wrong. - * In monolithic mode, we come here with nb_antennas_rx == 0 - * (not tested in other modes). - */ - //init_precoding_weights(RC.gNB[inst][CC_id]); } - - init_gNB_proc(inst); + + /* TODO: review this code, there is something wrong. + * In monolithic mode, we come here with nb_antennas_rx == 0 + * (not tested in other modes). + */ + //init_precoding_weights(RC.gNB[inst]); } + + init_gNB_proc(inst); + for (ru_id=0; ru_idabstraction_flag = 0; - gNB->single_thread_flag = single_thread_flag; - /*nr_polar_init(&gNB->nrPolar_params, - NR_POLAR_PBCH_MESSAGE_TYPE, - NR_POLAR_PBCH_PAYLOAD_BITS, - NR_POLAR_PBCH_AGGREGATION_LEVEL);*/ - LOG_I(PHY,"Initializing gNB %d CC_id %d single_thread_flag:%d\n",inst,CC_id,single_thread_flag); -#ifndef OCP_FRAMEWORK - LOG_I(PHY,"Initializing gNB %d CC_id %d\n",inst,CC_id); -#endif - LOG_I(PHY,"Registering with MAC interface module\n"); - AssertFatal((gNB->if_inst = NR_IF_Module_init(inst))!=NULL,"Cannot register interface"); - gNB->if_inst->NR_Schedule_response = nr_schedule_response; - gNB->if_inst->NR_PHY_config_req = nr_phy_config_request; - memset((void *)&gNB->UL_INFO,0,sizeof(gNB->UL_INFO)); - memset((void *)&gNB->Sched_INFO,0,sizeof(gNB->Sched_INFO)); - LOG_I(PHY,"Setting indication lists\n"); - gNB->UL_INFO.rx_ind.rx_indication_body.rx_pdu_list = gNB->rx_pdu_list; - gNB->UL_INFO.crc_ind.crc_indication_body.crc_pdu_list = gNB->crc_pdu_list; - gNB->UL_INFO.sr_ind.sr_indication_body.sr_pdu_list = gNB->sr_pdu_list; - gNB->UL_INFO.harq_ind.harq_indication_body.harq_pdu_list = gNB->harq_pdu_list; - gNB->UL_INFO.cqi_ind.cqi_pdu_list = gNB->cqi_pdu_list; - gNB->UL_INFO.cqi_ind.cqi_raw_pdu_list = gNB->cqi_raw_pdu_list; - gNB->prach_energy_counter = 0; + if (RC.gNB[inst] == NULL) { + RC.gNB[inst] = (PHY_VARS_gNB *) malloc(sizeof(PHY_VARS_gNB)); + memset((void*)RC.gNB[inst],0,sizeof(PHY_VARS_gNB)); } + LOG_I(PHY,"[lte-softmodem.c] gNB structure RC.gNB[%d] allocated @ %p\n",inst,RC.gNB[inst]); + gNB = RC.gNB[inst]; + gNB->abstraction_flag = 0; + gNB->single_thread_flag = single_thread_flag; + /*nr_polar_init(&gNB->nrPolar_params, + NR_POLAR_PBCH_MESSAGE_TYPE, + NR_POLAR_PBCH_PAYLOAD_BITS, + NR_POLAR_PBCH_AGGREGATION_LEVEL);*/ + LOG_I(PHY,"Initializing gNB %d single_thread_flag:%d\n",inst,gNB->single_thread_flag); +#ifndef OCP_FRAMEWORK + LOG_I(PHY,"Initializing gNB %d\n",inst); +#endif + 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"); + 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_PHY_config_req = nr_phy_config_request; + memset((void *)&gNB->UL_INFO,0,sizeof(gNB->UL_INFO)); + memset((void *)&gNB->Sched_INFO,0,sizeof(gNB->Sched_INFO)); + LOG_I(PHY,"Setting indication lists\n"); + gNB->UL_INFO.rx_ind.rx_indication_body.rx_pdu_list = gNB->rx_pdu_list; + gNB->UL_INFO.crc_ind.crc_indication_body.crc_pdu_list = gNB->crc_pdu_list; + gNB->UL_INFO.sr_ind.sr_indication_body.sr_pdu_list = gNB->sr_pdu_list; + gNB->UL_INFO.harq_ind.harq_indication_body.harq_pdu_list = gNB->harq_pdu_list; + gNB->UL_INFO.cqi_ind.cqi_pdu_list = gNB->cqi_pdu_list; + gNB->UL_INFO.cqi_ind.cqi_raw_pdu_list = gNB->cqi_raw_pdu_list; + gNB->prach_energy_counter = 0; } + LOG_I(PHY,"[nr-softmodem.c] gNB structure allocated\n"); } diff --git a/executables/nr-ru.c b/executables/nr-ru.c index e6e62ad553..804fd537ed 100644 --- a/executables/nr-ru.c +++ b/executables/nr-ru.c @@ -1409,12 +1409,12 @@ static void *ru_thread( void *param ) { if (ru->fh_south_in) ru->fh_south_in(ru,&frame,&slot); else AssertFatal(1==0, "No fronthaul interface at south port"); - LOG_D(PHY,"AFTER fh_south_in - SFN/SL:%d%d RU->proc[RX:%d.%d TX:%d.%d] RC.gNB[0][0]:[RX:%d%d TX(SFN):%d]\n", + LOG_D(PHY,"AFTER fh_south_in - SFN/SL:%d%d RU->proc[RX:%d.%d TX:%d.%d] RC.gNB[0]:[RX:%d%d TX(SFN):%d]\n", frame,slot, proc->frame_rx,proc->tti_rx, proc->frame_tx,proc->tti_tx, - RC.gNB[0][0]->proc.frame_rx,RC.gNB[0][0]->proc.slot_rx, - RC.gNB[0][0]->proc.frame_tx); + RC.gNB[0]->proc.frame_rx,RC.gNB[0]->proc.slot_rx, + RC.gNB[0]->proc.frame_tx); /* LOG_D(PHY,"RU thread (do_prach %d, is_prach_subframe %d), received frame %d, subframe %d\n", ru->do_prach, @@ -2068,10 +2068,6 @@ void init_RU(char *rf_config_file) { RCconfig_RU(); LOG_I(PHY,"number of L1 instances %d, number of RU %d, number of CPU cores %d\n",RC.nb_nr_L1_inst,RC.nb_RU,get_nprocs()); - if (RC.nb_nr_CC != 0) - for (i=0; inum_RU=0; - LOG_D(PHY,"Process RUs RC.nb_RU:%d\n",RC.nb_RU); for (ru_id=0; ru_idnum_gNB > 0) { - LOG_D(PHY, "%s() RC.ru[%d].num_gNB:%d ru->gNB_list[0]:%p RC.gNB[0][0]:%p rf_config_file:%s\n", __FUNCTION__, ru_id, ru->num_gNB, ru->gNB_list[0], RC.gNB[0][0], ru->rf_config_file); + LOG_D(PHY, "%s() RC.ru[%d].num_gNB:%d ru->gNB_list[0]:%p RC.gNB[0]:%p rf_config_file:%s\n", __FUNCTION__, ru_id, ru->num_gNB, ru->gNB_list[0], RC.gNB[0], ru->rf_config_file); if (ru->gNB_list[0] == 0) { LOG_E(PHY,"%s() DJP - ru->gNB_list ru->num_gNB are not initialized - so do it manually\n", __FUNCTION__); - ru->gNB_list[0] = RC.gNB[0][0]; + ru->gNB_list[0] = RC.gNB[0]; ru->num_gNB=1; // // DJP - feptx_prec() / feptx_ofdm() parses the gNB_list (based on num_gNB) and copies the txdata_F to txdata in RU @@ -2169,7 +2165,7 @@ void RCconfig_RU(void) { else RC.ru[j]->num_gNB = 0; - for (i=0; inum_gNB; i++) RC.ru[j]->gNB_list[i] = RC.gNB[RUParamList.paramarray[j][RU_ENB_LIST_IDX].iptr[i]][0]; + for (i=0; inum_gNB; i++) RC.ru[j]->gNB_list[i] = RC.gNB[RUParamList.paramarray[j][RU_ENB_LIST_IDX].iptr[i]]; if (config_isparamset(RUParamList.paramarray[j], RU_SDR_ADDRS)) { RC.ru[j]->openair0_cfg.sdr_addrs = strdup(*(RUParamList.paramarray[j][RU_SDR_ADDRS].strptr)); diff --git a/executables/nr-softmodem.c b/executables/nr-softmodem.c index 3147284e99..fcddef9e7a 100644 --- a/executables/nr-softmodem.c +++ b/executables/nr-softmodem.c @@ -373,7 +373,7 @@ void exit_function(const char *file, const char *function, const int line, const void reset_stats(FL_OBJECT *button, long arg) { - PHY_VARS_gNB *phy_vars_gNB = RC.gNB[0][0]; + PHY_VARS_gNB *phy_vars_gNB = RC.gNB[0]; for (int i=0; igNB_config.rf_config.tx_antenna_ports.value, - RC.gNB[0][0]->gNB_config.rf_config.tx_antenna_ports.value ); + RC.gNB[0]->gNB_config.rf_config.tx_antenna_ports.value, + RC.gNB[0]->gNB_config.rf_config.tx_antenna_ports.value ); openair0_cfg[card].Mod_id = 0; openair0_cfg[card].num_rb_dl=config[0]->rf_config.dl_carrier_bandwidth.value; @@ -741,8 +741,8 @@ void init_openair0(void) { openair0_cfg[card].clock_source = clock_source; - openair0_cfg[card].tx_num_channels=min(2,RC.gNB[0][0]->gNB_config.rf_config.tx_antenna_ports.value ); - openair0_cfg[card].rx_num_channels=min(2,RC.gNB[0][0]->gNB_config.rf_config.tx_antenna_ports.value ); + openair0_cfg[card].tx_num_channels=min(2,RC.gNB[0]->gNB_config.rf_config.tx_antenna_ports.value ); + openair0_cfg[card].rx_num_channels=min(2,RC.gNB[0]->gNB_config.rf_config.tx_antenna_ports.value ); for (i=0; i<4; i++) { @@ -758,7 +758,7 @@ void init_openair0(void) { openair0_cfg[card].autocal[i] = 1; openair0_cfg[card].tx_gain[i] = tx_gain[0][i]; - openair0_cfg[card].rx_gain[i] = RC.gNB[0][0]->rx_total_gain_dB; + openair0_cfg[card].rx_gain[i] = RC.gNB[0]->rx_total_gain_dB; openair0_cfg[card].configFilename = rf_config_file; @@ -796,13 +796,10 @@ void wait_gNBs(void) { waiting=0; for (i=0; iconfigured==0) { - waiting=1; - break; - } + if (RC.gNB[i]->configured==0) { + waiting=1; + break; } } } @@ -862,10 +859,9 @@ int stop_L1L2(module_id_t gnb_id) { kill_RU_proc(gnb_id); oai_exit = 0; - for (int cc_id = 0; cc_id < RC.nb_nr_CC[gnb_id]; cc_id++) { - //free_transport(RC.gNB[gnb_id][cc_id]); - phy_free_nr_gNB(RC.gNB[gnb_id][cc_id]); - } + //free_transport(RC.gNB[gnb_id]); + phy_free_nr_gNB(RC.gNB[gnb_id]); + nr_phy_free_RU(RC.ru[gnb_id]); free_lte_top(); @@ -883,14 +879,13 @@ int restart_L1L2(module_id_t gnb_id) { /* block threads */ sync_var = -1; - for (cc_id = 0; cc_id < RC.nb_nr_L1_CC[gnb_id]; cc_id++) { - RC.gNB[gnb_id][cc_id]->configured = 0; - } + RC.gNB[gnb_id]->configured = 0; + RC.ru_mask |= (1 << ru->idx); /* copy the changed frame parameters to the RU */ /* TODO this should be done for all RUs associated to this gNB */ - memcpy(&ru->nr_frame_parms, &RC.gNB[gnb_id][0]->frame_parms, sizeof(NR_DL_FRAME_PARMS)); + memcpy(&ru->nr_frame_parms, &RC.gNB[gnb_id]->frame_parms, sizeof(NR_DL_FRAME_PARMS)); set_function_spec_param(RC.ru[gnb_id]); LOG_I(ENB_APP, "attempting to create ITTI tasks\n"); @@ -1013,7 +1008,7 @@ int main( int argc, char **argv ) { # define PACKAGE_VERSION "UNKNOWN-EXPERIMENTAL" #endif LOG_I(HW, "Version: %s\n", PACKAGE_VERSION); -#if defined(ENABLE_ITTI) + if (RC.nb_nr_inst > 0) { // don't create if node doesn't connect to RRC/S1/GTP @@ -1023,14 +1018,16 @@ int main( int argc, char **argv ) { RCconfig_L1(); } -#endif + + /* Start the agent. If it is turned off in the configuration, it won't start */ + /* RCconfig_nr_flexran(); for (i = 0; i < RC.nb_nr_L1_inst; i++) { flexran_agent_start(i); } - +*/ // 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)*NUMBER_OF_UE_MAX*MAX_NUM_CCs); @@ -1201,10 +1198,8 @@ int main( int argc, char **argv ) { /* release memory used by the RU/gNB threads (incomplete), after all * threads have been stopped (they partially use the same memory) */ for (int inst = 0; inst < NB_gNB_INST; inst++) { - for (int cc_id = 0; cc_id < RC.nb_nr_CC[inst]; cc_id++) { - //free_transport(RC.gNB[inst][cc_id]); - phy_free_nr_gNB(RC.gNB[inst][cc_id]); - } + //free_transport(RC.gNB[inst]); + phy_free_nr_gNB(RC.gNB[inst]); } for (int inst = 0; inst < NB_RU; inst++) { diff --git a/openair1/PHY/INIT/nr_init.c b/openair1/PHY/INIT/nr_init.c index f316e46533..2440b467bf 100644 --- a/openair1/PHY/INIT/nr_init.c +++ b/openair1/PHY/INIT/nr_init.c @@ -39,35 +39,27 @@ #include "SCHED_NR/fapi_nr_l1.h" extern uint32_t from_nrarfcn(int nr_bandP,uint32_t dl_nrarfcn); -extern int32_t get_uldl_offset(int nr_bandP); +extern int32_t get_nr_uldl_offset(int nr_bandP); extern openair0_config_t openair0_cfg[MAX_CARDS]; int l1_north_init_gNB() { int i,j; - if (RC.nb_nr_L1_inst > 0 && RC.nb_nr_L1_CC != NULL && RC.gNB != NULL) { + if (RC.nb_nr_L1_inst > 0 && RC.gNB != NULL) { AssertFatal(RC.nb_nr_L1_inst>0,"nb_nr_L1_inst=%d\n",RC.nb_nr_L1_inst); - AssertFatal(RC.nb_nr_L1_CC!=NULL,"nb_nr_L1_CC 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); for (i=0; i0,"RC.nb_nr_L1_CC[%d]=%d\n",i,RC.nb_nr_L1_CC[i]); - LOG_I(PHY,"%s() RC.nb_nr_L1_CC[%d]:%d\n", __FUNCTION__, i, RC.nb_nr_L1_CC[i]); - - for (j=0; jif_inst = NR_IF_Module_init(i))<0) return(-1); - - LOG_I(PHY,"%s() RC.gNB[%d][%d] installing callbacks\n", __FUNCTION__, i, j); - RC.gNB[i][j]->if_inst->NR_PHY_config_req = nr_phy_config_request; - RC.gNB[i][j]->if_inst->NR_Schedule_response = nr_schedule_response; - } + if ((RC.gNB[i]->if_inst = NR_IF_Module_init(i))<0) return(-1); + + LOG_I(PHY,"%s() RC.gNB[%d][%d] installing callbacks\n", __FUNCTION__, i, j); + RC.gNB[i]->if_inst->NR_PHY_config_req = nr_phy_config_request; + RC.gNB[i]->if_inst->NR_Schedule_response = nr_schedule_response; } } else { - LOG_I(PHY,"%s() Not installing PHY callbacks - RC.nb_nr_L1_inst:%d RC.nb_nr_L1_CC:%p RC.gNB:%p\n", __FUNCTION__, RC.nb_nr_L1_inst, RC.nb_nr_L1_CC, RC.gNB); + 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); } return(0); @@ -392,9 +384,8 @@ void nr_phy_config_request_sim(PHY_VARS_gNB *gNB,int N_RB_DL,int N_RB_UL,int mu, void nr_phy_config_request(NR_PHY_Config_t *phy_config) { uint8_t Mod_id = phy_config->Mod_id; - int CC_id = phy_config->CC_id; - NR_DL_FRAME_PARMS *fp = &RC.gNB[Mod_id][CC_id]->frame_parms; - nfapi_nr_config_request_t *gNB_config = &RC.gNB[Mod_id][CC_id]->gNB_config; + NR_DL_FRAME_PARMS *fp = &RC.gNB[Mod_id]->frame_parms; + nfapi_nr_config_request_t *gNB_config = &RC.gNB[Mod_id]->gNB_config; gNB_config->nfapi_config.rf_bands.rf_band[0] = phy_config->cfg->nfapi_config.rf_bands.rf_band[0]; //22 gNB_config->nfapi_config.nrarfcn.value = phy_config->cfg->nfapi_config.nrarfcn.value; //6600 gNB_config->subframe_config.numerology_index_mu.value = phy_config->cfg->subframe_config.numerology_index_mu.value;//1 @@ -412,28 +403,30 @@ void nr_phy_config_request(NR_PHY_Config_t *phy_config) { gNB_config->subframe_config.duplex_mode.value = FDD; } - RC.gNB[Mod_id][CC_id]->mac_enabled = 1; + memcpy((void*)&gNB_config->rach_config,(void*)&phy_config->cfg->rach_config,sizeof(phy_config->cfg->rach_config)); + + RC.gNB[Mod_id]->mac_enabled = 1; fp->dl_CarrierFreq = from_nrarfcn(gNB_config->nfapi_config.rf_bands.rf_band[0],gNB_config->nfapi_config.nrarfcn.value); - fp->ul_CarrierFreq = fp->dl_CarrierFreq - (get_uldl_offset(gNB_config->nfapi_config.rf_bands.rf_band[0])*100000); + fp->ul_CarrierFreq = fp->dl_CarrierFreq - (get_nr_uldl_offset(gNB_config->nfapi_config.rf_bands.rf_band[0])*100000); fp->threequarter_fs = openair0_cfg[0].threequarter_fs; - LOG_I(PHY,"Configuring MIB for instance %d, CCid %d : (band %d,N_RB_DL %d, N_RB_UL %d, Nid_cell %d,DL freq %u)\n", + LOG_I(PHY,"Configuring MIB for instance %d, : (band %d,N_RB_DL %d, N_RB_UL %d, Nid_cell %d,DL freq %u)\n", Mod_id, - CC_id, gNB_config->nfapi_config.rf_bands.rf_band[0], gNB_config->rf_config.dl_carrier_bandwidth.value, gNB_config->rf_config.ul_carrier_bandwidth.value, gNB_config->sch_config.physical_cell_id.value, fp->dl_CarrierFreq ); + nr_init_frame_parms(gNB_config, fp); - if (RC.gNB[Mod_id][CC_id]->configured == 1) { + if (RC.gNB[Mod_id]->configured == 1) { LOG_E(PHY,"Already gNB already configured, do nothing\n"); return; } - RC.gNB[Mod_id][CC_id]->configured = 1; - LOG_I(PHY,"gNB %d/%d configured\n",Mod_id,CC_id); + RC.gNB[Mod_id]->configured = 1; + LOG_I(PHY,"gNB %d configured\n",Mod_id); } void init_nr_transport(PHY_VARS_gNB *gNB) { @@ -487,11 +480,11 @@ void init_nr_transport(PHY_VARS_gNB *gNB) { } gNB->dlsch_SI = new_gNB_dlsch(1,8,NSOFT, 0, fp, cfg); - LOG_D(PHY,"gNB %d.%d : SI %p\n",gNB->Mod_id,gNB->CC_id,gNB->dlsch_SI); + LOG_D(PHY,"gNB %d : SI %p\n",gNB->Mod_id,gNB->dlsch_SI); gNB->dlsch_ra = new_gNB_dlsch(1,8,NSOFT, 0, fp, cfg); - LOG_D(PHY,"gNB %d.%d : RA %p\n",gNB->Mod_id,gNB->CC_id,gNB->dlsch_ra); + LOG_D(PHY,"gNB %d : RA %p\n",gNB->Mod_id,gNB->dlsch_ra); gNB->dlsch_MCH = new_gNB_dlsch(1,8,NSOFT, 0, fp, cfg); - LOG_D(PHY,"gNB %d.%d : MCH %p\n",gNB->Mod_id,gNB->CC_id,gNB->dlsch_MCH); + LOG_D(PHY,"gNB %d : MCH %p\n",gNB->Mod_id,gNB->dlsch_MCH); gNB->rx_total_gain_dB=130; for(i=0; islots_per_subframe; + // when were in the last slot of the subframe and this is a PRACH subframe ,return 1 + if (((slot%fp->slots_per_subframe) == fp->slots_per_subframe-1)&& + (is_nr_prach_subframe(fp,frame,subframe))) return (1); + else return(0); +} uint16_t get_nr_prach_fmt(int prach_ConfigIndex,lte_frame_type_t frame_type, nr_frequency_range_e fr) { diff --git a/openair1/PHY/TOOLS/nr_phy_scope.c b/openair1/PHY/TOOLS/nr_phy_scope.c index f8c0aad3f2..311afca354 100644 --- a/openair1/PHY/TOOLS/nr_phy_scope.c +++ b/openair1/PHY/TOOLS/nr_phy_scope.c @@ -853,7 +853,7 @@ typedef struct { } FD_stats_form; void reset_stats_gNB(FL_OBJECT *button, long arg) { - PHY_VARS_gNB *phy_vars_gNB = RC.gNB[0][0]; + PHY_VARS_gNB *phy_vars_gNB = RC.gNB[0]; for (int i=0; iproc.L1_proc; uint8_t number_dl_pdu = DL_req->dl_config_request_body.number_pdu; diff --git a/openair1/SCHED_NR/nr_prach_procedures.c b/openair1/SCHED_NR/nr_prach_procedures.c new file mode 100644 index 0000000000..dc501293ba --- /dev/null +++ b/openair1/SCHED_NR/nr_prach_procedures.c @@ -0,0 +1,140 @@ +/* + * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The OpenAirInterface Software Alliance licenses this file to You under + * the OAI Public License, Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.openairinterface.org/?page_id=698 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *------------------------------------------------------------------------------- + * For more information about the OpenAirInterface (OAI) Software Alliance: + * contact@openairinterface.org + */ + +/*! \file nr_prach_procedures.c + * \brief Implementation of gNB prach procedures from 38.213 LTE specifications + * \author R. Knopp, + * \date 2019 + * \version 0.1 + * \company Eurecom + * \email: knopp@eurecom.fr + * \note + * \warning + */ + +#include "PHY/defs_eNB.h" +#include "PHY/phy_extern.h" +#include "SCHED/sched_eNB.h" +#include "nfapi_nr_interface.h" +#include "fapi_nr_l1.h" +#include "nfapi_pnf.h" +#include "common/utils/LOG/log.h" +#include "common/utils/LOG/vcd_signal_dumper.h" + + +#include "assertions.h" +#include "msc.h" + +#include + +#include "intertask_interface.h" + +extern uint32_t nfapi_mode; + +extern int oai_nfapi_nr_rach_ind(nfapi_rach_indication_t *rach_ind); + + +void L1_nr_prach_procedures(PHY_VARS_gNB *gNB,int frame,int subframe) { + uint16_t max_preamble[4],max_preamble_energy[4],max_preamble_delay[4]; + uint16_t i; + + + gNB->UL_INFO.rach_ind.rach_indication_body.number_of_preambles=0; + + RU_t *ru; + int aa=0; + int ru_aa; + + + VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PRACH_RX,1); + + + + for (i=0;inum_RU;i++) { + ru=gNB->RU_list[i]; + for (ru_aa=0,aa=0;ru_aanb_rx;ru_aa++,aa++) { + gNB->prach_vars.rxsigF[0][aa] = gNB->RU_list[i]->prach_rxsigF[ru_aa]; + } + } + + rx_nr_prach(gNB, + 0, + &max_preamble[0], + &max_preamble_energy[0], + &max_preamble_delay[0] + ); + + LOG_D(PHY,"[RAPROC] Frame %d, subframe %d : Most likely preamble %d, energy %d dB delay %d (prach_energy counter %d)\n", + frame,subframe, + max_preamble[0], + max_preamble_energy[0]/10, + max_preamble_delay[0], + gNB->prach_energy_counter); + + if ((gNB->prach_energy_counter == 100) && + (max_preamble_energy[0] > gNB->measurements.prach_I0+100)) { + + LOG_I(PHY,"[gNB %d][RAPROC] Frame %d, subframe %d Initiating RA procedure with preamble %d, energy %d.%d dB, delay %d\n", + gNB->Mod_id, + frame, + subframe, + max_preamble[0], + max_preamble_energy[0]/10, + max_preamble_energy[0]%10, + max_preamble_delay[0]); + + T(T_ENB_PHY_INITIATE_RA_PROCEDURE, T_INT(gNB->Mod_id), T_INT(frame), T_INT(subframe), + T_INT(max_preamble[0]), T_INT(max_preamble_energy[0]), T_INT(max_preamble_delay[0])); + + + gNB->UL_INFO.rach_ind.rach_indication_body.number_of_preambles = 1; + gNB->UL_INFO.rach_ind.rach_indication_body.preamble_list = &gNB->preamble_list[0]; + gNB->UL_INFO.rach_ind.rach_indication_body.tl.tag = NFAPI_RACH_INDICATION_BODY_TAG; + gNB->UL_INFO.rach_ind.header.message_id = NFAPI_RACH_INDICATION; + gNB->UL_INFO.rach_ind.sfn_sf = frame<<4 | subframe; + + gNB->preamble_list[0].preamble_rel8.tl.tag = NFAPI_PREAMBLE_REL8_TAG; + gNB->preamble_list[0].preamble_rel8.timing_advance = max_preamble_delay[0]; + gNB->preamble_list[0].preamble_rel8.preamble = max_preamble[0]; + gNB->preamble_list[0].preamble_rel8.rnti = 1+subframe; // note: fid is implicitly 0 here + gNB->preamble_list[0].instance_length = 0; //don't know exactly what this is + + if (nfapi_mode == 1) { // If NFAPI PNF then we need to send the message to the VNF + + LOG_D(PHY,"Filling NFAPI indication for NR RACH : SFN_SF:%d TA %d, Preamble %d, rnti %x\n", + NFAPI_SFNSF2DEC(gNB->UL_INFO.rach_ind.sfn_sf), + gNB->preamble_list[0].preamble_rel8.timing_advance, + gNB->preamble_list[0].preamble_rel8.preamble, + gNB->preamble_list[0].preamble_rel8.rnti); + + oai_nfapi_rach_ind(&gNB->UL_INFO.rach_ind); + + gNB->UL_INFO.rach_ind.rach_indication_body.number_of_preambles = 0; + } + } // max_preamble_energy > prach_I0 + 100 + else { + gNB->measurements.prach_I0 = ((gNB->measurements.prach_I0*900)>>10) + ((max_preamble_energy[0]*124)>>10); + if (frame==0) LOG_I(PHY,"prach_I0 = %d.%d dB\n",gNB->measurements.prach_I0/10,gNB->measurements.prach_I0%10); + if (gNB->prach_energy_counter < 100) gNB->prach_energy_counter++; + } + + VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PRACH_RX,0); +} diff --git a/openair1/SCHED_NR/nr_ru_procedures.c b/openair1/SCHED_NR/nr_ru_procedures.c index 653e9632b5..8957b0dd74 100644 --- a/openair1/SCHED_NR/nr_ru_procedures.c +++ b/openair1/SCHED_NR/nr_ru_procedures.c @@ -244,3 +244,13 @@ void nr_feptx_ofdm(RU_t *ru) { dB_fixed(signal_energy_nodc(ru->common.txdataF_BF[aa],2*slot_sizeF))); } + +void nr_feprx(RU_t *ru) { + + // PRACH component + int frame=ru->proc.frame_rx, slot=ru->proc.tti_rx; + + if (do_prach_rx(ru->nr_frame_parms,frame,slot)) rx_nr_prach_ru(ru, + frame, + slot/ru->nr_frame_parms->slots_per_subframe); +} diff --git a/openair1/SCHED_NR/phy_procedures_nr_gNB.c b/openair1/SCHED_NR/phy_procedures_nr_gNB.c index aeda4b3549..acca1a0eea 100644 --- a/openair1/SCHED_NR/phy_procedures_nr_gNB.c +++ b/openair1/SCHED_NR/phy_procedures_nr_gNB.c @@ -183,3 +183,19 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB, VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX+offset,0); } + + +void phy_procedures_gNB_RX(PHY_VARS_gNB *gNB, + int frame,int slot) { + + NR_DL_FRAME_PARMS *fp=&gNB->frame_parms; + nfapi_nr_config_request_t *cfg = &gNB->gNB_config; + + if ((cfg->subframe_config.duplex_mode.value == TDD) && (nr_slot_select(cfg,slot)==SF_DL)) return; + + // VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX,1); + + + if (do_prach_rx(fp,frame,slot)) L1_nr_prach_procedures(gNB,frame,slot/fp->slots_per_subframe); + +} diff --git a/openair2/COMMON/rrc_messages_types.h b/openair2/COMMON/rrc_messages_types.h index 1c12f41150..7362bd7275 100644 --- a/openair2/COMMON/rrc_messages_types.h +++ b/openair2/COMMON/rrc_messages_types.h @@ -37,6 +37,7 @@ #else #include "RRC/LTE/MESSAGES/SystemInformationBlockType2.h" #endif +#include "NR_ServingCellConfigCommon.h" #include "SL-OffsetIndicator-r12.h" #include "SubframeBitmapSL-r12.h" #include "SL-CP-Len-r12.h" @@ -304,194 +305,8 @@ typedef struct NRRrcConfigurationReq_s { uint16_t mcc[PLMN_LIST_MAX_SIZE]; uint16_t mnc[PLMN_LIST_MAX_SIZE]; uint8_t mnc_digit_length[PLMN_LIST_MAX_SIZE]; - int16_t nb_cc; - lte_frame_type_t frame_type[MAX_NUM_CCs]; - uint8_t tdd_config[MAX_NUM_CCs]; - uint8_t tdd_config_s[MAX_NUM_CCs]; - lte_prefix_type_t DL_prefix_type[MAX_NUM_CCs]; - lte_prefix_type_t UL_prefix_type[MAX_NUM_CCs]; - int16_t nr_band[MAX_NUM_CCs]; - uint64_t downlink_frequency[MAX_NUM_CCs]; - int32_t uplink_frequency_offset[MAX_NUM_CCs]; - int16_t Nid_cell[MAX_NUM_CCs];// for testing, change later - int16_t N_RB_DL[MAX_NUM_CCs];// for testing, change later - int nb_antenna_ports[MAX_NUM_CCs]; - - ///NR - //MIB - long MIB_subCarrierSpacingCommon[MAX_NUM_CCs]; - uint32_t MIB_ssb_SubcarrierOffset[MAX_NUM_CCs]; - long MIB_dmrs_TypeA_Position[MAX_NUM_CCs]; - uint32_t pdcch_ConfigSIB1[MAX_NUM_CCs]; - - //SIB1 - long SIB1_frequencyOffsetSSB[MAX_NUM_CCs]; - long SIB1_ssb_PeriodicityServingCell[MAX_NUM_CCs]; - long SIB1_ss_PBCH_BlockPower[MAX_NUM_CCs]; - //NR FrequencyInfoDL - long absoluteFrequencySSB[MAX_NUM_CCs]; - long DL_FreqBandIndicatorNR[MAX_NUM_CCs]; - long DL_absoluteFrequencyPointA[MAX_NUM_CCs]; - - //NR DL SCS-SpecificCarrier - uint32_t DL_offsetToCarrier[MAX_NUM_CCs]; - long DL_SCS_SubcarrierSpacing[MAX_NUM_CCs]; - uint32_t DL_carrierBandwidth[MAX_NUM_CCs]; - - //NR BWP-DownlinkCommon - uint32_t DL_locationAndBandwidth[MAX_NUM_CCs]; - long DL_BWP_SubcarrierSpacing[MAX_NUM_CCs]; - lte_prefix_type_t DL_BWP_prefix_type[MAX_NUM_CCs]; - - //NR FrequencyInfoUL - long UL_FreqBandIndicatorNR[MAX_NUM_CCs]; - long UL_absoluteFrequencyPointA[MAX_NUM_CCs]; - long UL_additionalSpectrumEmission[MAX_NUM_CCs]; - long UL_p_Max[MAX_NUM_CCs]; - long UL_frequencyShift7p5khz[MAX_NUM_CCs]; - - //NR UL SCS-SpecificCarrier - uint32_t UL_offsetToCarrier[MAX_NUM_CCs]; - long UL_SCS_SubcarrierSpacing[MAX_NUM_CCs]; - uint32_t UL_carrierBandwidth[MAX_NUM_CCs]; - - // NR BWP-UplinkCommon - uint32_t UL_locationAndBandwidth[MAX_NUM_CCs]; - long UL_BWP_SubcarrierSpacing[MAX_NUM_CCs]; - lte_prefix_type_t UL_BWP_prefix_type[MAX_NUM_CCs]; - long UL_timeAlignmentTimerCommon[MAX_NUM_CCs]; - long ServingCellConfigCommon_n_TimingAdvanceOffset[MAX_NUM_CCs]; - uint64_t ServingCellConfigCommon_ssb_PositionsInBurst_PR[MAX_NUM_CCs]; - long ServingCellConfigCommon_ssb_periodicityServingCell[MAX_NUM_CCs]; //ServingCellConfigCommon - long ServingCellConfigCommon_dmrs_TypeA_Position[MAX_NUM_CCs]; //ServingCellConfigCommon - long NIA_SubcarrierSpacing[MAX_NUM_CCs]; //ServingCellConfigCommon Used only for non-initial access - long ServingCellConfigCommon_ss_PBCH_BlockPower[MAX_NUM_CCs]; //ServingCellConfigCommon - - - //NR TDD-UL-DL-ConfigCommon - long referenceSubcarrierSpacing[MAX_NUM_CCs]; - long dl_UL_TransmissionPeriodicity[MAX_NUM_CCs]; - long nrofDownlinkSlots[MAX_NUM_CCs]; - long nrofDownlinkSymbols[MAX_NUM_CCs]; - long nrofUplinkSlots[MAX_NUM_CCs]; - long nrofUplinkSymbols[MAX_NUM_CCs]; - - //NR RACH-ConfigCommon - long rach_totalNumberOfRA_Preambles[MAX_NUM_CCs]; - long rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_choice[MAX_NUM_CCs]; - long rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneEighth[MAX_NUM_CCs]; - long rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneFourth[MAX_NUM_CCs]; - long rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneHalf[MAX_NUM_CCs]; - long rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_one[MAX_NUM_CCs]; - long rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_two[MAX_NUM_CCs]; - uint32_t rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_four[MAX_NUM_CCs]; - uint32_t rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_eight[MAX_NUM_CCs]; - uint32_t rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_sixteen[MAX_NUM_CCs]; - BOOLEAN_t rach_groupBconfigured[MAX_NUM_CCs]; - long rach_ra_Msg3SizeGroupA[MAX_NUM_CCs]; - long rach_messagePowerOffsetGroupB[MAX_NUM_CCs]; - long rach_numberOfRA_PreamblesGroupA[MAX_NUM_CCs]; - long rach_ra_ContentionResolutionTimer[MAX_NUM_CCs]; - long rsrp_ThresholdSSB[MAX_NUM_CCs]; - long rsrp_ThresholdSSB_SUL[MAX_NUM_CCs]; - long prach_RootSequenceIndex_choice[MAX_NUM_CCs]; - uint32_t prach_RootSequenceIndex_l839[MAX_NUM_CCs]; - uint32_t prach_RootSequenceIndex_l139[MAX_NUM_CCs]; - long prach_msg1_SubcarrierSpacing[MAX_NUM_CCs]; - long restrictedSetConfig[MAX_NUM_CCs]; - long msg3_transformPrecoding[MAX_NUM_CCs]; - //ssb-perRACH-OccasionAndCB-PreamblesPerSSB not sure - - //NR RACH-ConfigGeneric - uint32_t prach_ConfigurationIndex[MAX_NUM_CCs]; - long prach_msg1_FDM[MAX_NUM_CCs]; - long prach_msg1_FrequencyStart[MAX_NUM_CCs]; - uint32_t zeroCorrelationZoneConfig[MAX_NUM_CCs]; - long preambleReceivedTargetPower[MAX_NUM_CCs]; - long preambleTransMax[MAX_NUM_CCs]; - long powerRampingStep[MAX_NUM_CCs]; - long ra_ResponseWindow[MAX_NUM_CCs]; - - //NR PUSCH-ConfigCommon - BOOLEAN_t groupHoppingEnabledTransformPrecoding[MAX_NUM_CCs]; - long msg3_DeltaPreamble[MAX_NUM_CCs]; - long p0_NominalWithGrant[MAX_NUM_CCs]; - - ///NR PUSCH-TimeDomainResourceAllocation - uint32_t PUSCH_TimeDomainResourceAllocation_k2[MAX_NUM_CCs]; - long PUSCH_TimeDomainResourceAllocation_mappingType[MAX_NUM_CCs]; - uint32_t PUSCH_TimeDomainResourceAllocation_startSymbolAndLength[MAX_NUM_CCs]; - - //NR PUCCH-ConfigCommon - uint32_t pucch_ResourceCommon[MAX_NUM_CCs]; - long pucch_GroupHopping[MAX_NUM_CCs]; - uint32_t hoppingId[MAX_NUM_CCs]; - long p0_nominal[MAX_NUM_CCs]; - - //NR PDSCH-ConfigCOmmon - //NR PDSCH-TimeDomainResourceAllocation - uint32_t PDSCH_TimeDomainResourceAllocation_k0[MAX_NUM_CCs]; - long PDSCH_TimeDomainResourceAllocation_mappingType[MAX_NUM_CCs]; - long PDSCH_TimeDomainResourceAllocation_startSymbolAndLength[MAX_NUM_CCs]; - - //NR RateMatchPattern is used to configure one rate matching pattern for PDSCH - long rateMatchPatternId[MAX_NUM_CCs]; - long RateMatchPattern_patternType[MAX_NUM_CCs]; - long symbolsInResourceBlock[MAX_NUM_CCs]; - long periodicityAndPattern[MAX_NUM_CCs]; - long RateMatchPattern_controlResourceSet[MAX_NUM_CCs]; ///ControlResourceSetId - long RateMatchPattern_subcarrierSpacing[MAX_NUM_CCs]; - long RateMatchPattern_mode[MAX_NUM_CCs]; - - //NR PDCCH-ConfigCommon - uint32_t controlResourceSetZero[MAX_NUM_CCs]; - uint32_t searchSpaceZero[MAX_NUM_CCs]; - long searchSpaceSIB1[MAX_NUM_CCs]; - long searchSpaceOtherSystemInformation[MAX_NUM_CCs]; - long pagingSearchSpace[MAX_NUM_CCs]; - long ra_SearchSpace[MAX_NUM_CCs]; - //NR PDCCH-ConfigCommon commonControlResourcesSets - long PDCCH_common_controlResourceSetId[MAX_NUM_CCs]; - long PDCCH_common_ControlResourceSet_duration[MAX_NUM_CCs]; - long PDCCH_cce_REG_MappingType[MAX_NUM_CCs]; - long PDCCH_reg_BundleSize[MAX_NUM_CCs]; - long PDCCH_interleaverSize[MAX_NUM_CCs]; - long PDCCH_shiftIndex[MAX_NUM_CCs]; - long PDCCH_precoderGranularity[MAX_NUM_CCs]; //Corresponds to L1 parameter 'CORESET-precoder-granuality' - long PDCCH_TCI_StateId[MAX_NUM_CCs]; - BOOLEAN_t tci_PresentInDCI[MAX_NUM_CCs]; - uint32_t PDCCH_DMRS_ScramblingID[MAX_NUM_CCs]; - - //NR PDCCH-ConfigCommon commonSearchSpaces - long SearchSpaceId[MAX_NUM_CCs]; - long commonSearchSpaces_controlResourceSetId[MAX_NUM_CCs]; - long SearchSpace_monitoringSlotPeriodicityAndOffset_choice[MAX_NUM_CCs]; - uint32_t SearchSpace_monitoringSlotPeriodicityAndOffset_value[MAX_NUM_CCs]; - uint32_t SearchSpace_duration[MAX_NUM_CCs]; - long SearchSpace_nrofCandidates_aggregationLevel1[MAX_NUM_CCs]; - long SearchSpace_nrofCandidates_aggregationLevel2[MAX_NUM_CCs]; - long SearchSpace_nrofCandidates_aggregationLevel4[MAX_NUM_CCs]; - long SearchSpace_nrofCandidates_aggregationLevel8[MAX_NUM_CCs]; - long SearchSpace_nrofCandidates_aggregationLevel16[MAX_NUM_CCs]; - long SearchSpace_searchSpaceType[MAX_NUM_CCs]; - long Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel1[MAX_NUM_CCs]; - long Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel2[MAX_NUM_CCs]; - long Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel4[MAX_NUM_CCs]; - long Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel8[MAX_NUM_CCs]; - long Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel16[MAX_NUM_CCs]; - long Common_dci_Format2_3_monitoringPeriodicity[MAX_NUM_CCs]; - long Common_dci_Format2_3_nrofPDCCH_Candidates[MAX_NUM_CCs]; - long ue_Specific__dci_Formats[MAX_NUM_CCs]; - - //RateMatchPatternLTE-CRS - uint32_t RateMatchPatternLTE_CRS_carrierFreqDL[MAX_NUM_CCs]; - long RateMatchPatternLTE_CRS_carrierBandwidthDL[MAX_NUM_CCs]; - long RateMatchPatternLTE_CRS_nrofCRS_Ports[MAX_NUM_CCs]; - long RateMatchPatternLTE_CRS_v_Shift[MAX_NUM_CCs]; - long RateMatchPatternLTE_CRS_radioframeAllocationPeriod[MAX_NUM_CCs]; - uint32_t RateMatchPatternLTE_CRS_radioframeAllocationOffset[MAX_NUM_CCs]; - long RateMatchPatternLTE_CRS_subframeAllocation_choice[MAX_NUM_CCs]; - + NR_ServingCellConfigCommon_t *scc; + int ssb_SubcarrierOffset; } gNB_RrcConfigurationReq; diff --git a/openair2/GNB_APP/RRC_nr_paramsvalues.h b/openair2/GNB_APP/RRC_nr_paramsvalues.h index ca7c659355..203324acbc 100644 --- a/openair2/GNB_APP/RRC_nr_paramsvalues.h +++ b/openair2/GNB_APP/RRC_nr_paramsvalues.h @@ -31,59 +31,354 @@ */ #ifndef __NR_RRC_PARAMSVALUES__H__ #define __NR_RRC_PARAMSVALUES__H__ + +#include "common/config/config_paramdesc.h" +#include "NR_ServingCellConfigCommon.h" + /* cell configuration section name */ #define GNB_CONFIG_STRING_GNB_LIST "gNBs" -/* component carriers configuration section name */ -#define GNB_CONFIG_STRING_COMPONENT_CARRIERS "component_carriers" +#define GNB_CONFIG_STRING_SSBSUBCARRIEROFFSET "ssb_SubcarrierOffset" +#define GNB_CONFIG_STRING_SERVINGCELLCONFIGCOMMON "servingCellConfigCommon" +#define GNB_CONFIG_STRING_PHYSCELLID "physCellId" +#define GNB_CONFIG_STRING_NTIMINGADVANCEOFFSET "n_TimingAdvanceOffset" +#define GNB_CONFIG_STRING_SUBCARRIERSPACING "subcarrierSpacing" +#define GNB_CONFIG_STRING_ABSOLUTEFREQUENCYSSB "absoluteFrequencySSB" +#define GNB_CONFIG_STRING_DLFREQUENCYBAND "dl_frequencyBand" +#define GNB_CONFIG_STRING_DLABSOLUEFREQUENCYPOINTA "dl_absoluteFrequencyPointA" +#define GNB_CONFIG_STRING_DLOFFSETTOCARRIER "dl_offstToCarrier" +#define GNB_CONFIG_STRING_DLSUBCARRIERSPACING "dl_subcarrierSpacing" +#define GNB_CONFIG_STRING_DLCARRIERBANDWIDTH "dl_carrierBandwidth" -#define GNB_CONFIG_STRING_FRAME_TYPE "frame_type" -#define GNB_CONFIG_STRING_DL_PREFIX_TYPE "DL_prefix_type" -#define GNB_CONFIG_STRING_UL_PREFIX_TYPE "UL_prefix_type" -#define GNB_CONFIG_STRING_NR_BAND "nr_band" -#define GNB_CONFIG_STRING_DOWNLINK_FREQUENCY "downlink_frequency" -#define GNB_CONFIG_STRING_UPLINK_FREQUENCY_OFFSET "uplink_frequency_offset" -#define GNB_CONFIG_STRING_NID_CELL "Nid_cell" -#define GNB_CONFIG_STRING_N_RB_DL "N_RB_DL" +#define GNB_CONFIG_STRING_INITIALDLBWPLOCATIONANDBANDWIDTH "initialDLBWPlocationAndBandwidth" +#define GNB_CONFIG_STRING_INITIALDLBWPSUBCARRIERSPACING "initialDLBWPsubcarrierSpacing" +#define GNB_CONFIG_STRING_INITIALDLBWPCYCLICPREFIX "initialDLBWPcyclicPrefix" -#define FRAMETYPE_OKVALUES {"FDD","TDD"} -#define FRAMETYPE_MODVALUES { FDD, TDD} +#define GNB_CONFIG_STRING_INITIALDLBWPCONTROLRESOURCESETZERO "initialDLBWPcontrolResourceSetZero" +#define GNB_CONFIG_STRING_INITIALDLBWPSEARCHSPACEZERO "initialDLBWPsearchSpaceZero" -#define TDDCFG(A) TDD_Config__subframeAssignment_ ## A -#define TDDCONFIG_OKRANGE { TDDCFG(sa0), TDDCFG(sa6)} -#define TDDCFGS(A) TDD_Config__specialSubframePatterns_ ## A -#define TDDCONFIGS_OKRANGE { TDDCFGS(ssp0), TDDCFGS(ssp8)} +#define GNB_CONFIG_STRING_INITIALDLBWPK0_0 "initialDLBWPk0_0" +#define GNB_CONFIG_STRING_INITIALDLBWPMAPPINGTYPE_0 "initialDLBWPmappingType_0" +#define GNB_CONFIG_STRING_INITIALDLBWPSTARTSYMBOLANDLENGTH_0 "initialDLBWPstartSymbolAndLength_0" +#define GNB_CONFIG_STRING_INITIALDLBWPK0_1 "initialDLBWPk0_1" +#define GNB_CONFIG_STRING_INITIALDLBWPMAPPINGTYPE_1 "initialDLBWPmappingType_1" +#define GNB_CONFIG_STRING_INITIALDLBWPSTARTSYMBOLANDLENGTH_1 "initialDLBWPstartSymbolAndLength_1" +#define GNB_CONFIG_STRING_INITIALDLBWPK0_2 "initialDLBWPk0_2" +#define GNB_CONFIG_STRING_INITIALDLBWPMAPPINGTYPE_2 "initialDLBWPmappingType_2" +#define GNB_CONFIG_STRING_INITIALDLBWPSTARTSYMBOLANDLENGTH_2 "initialDLBWPstartSymbolAndLength_2" +#define GNB_CONFIG_STRING_INITIALDLBWPK0_3 "initialDLBWPk0_3" +#define GNB_CONFIG_STRING_INITIALDLBWPMAPPINGTYPE_3 "initialDLBWPmappingType_3" +#define GNB_CONFIG_STRING_INITIALDLBWPSTARTSYMBOLANDLENGTH_3 "initialDLBWPstartSymbolAndLength_3" +#define GNB_CONFIG_STRING_INITIALDLBWPK0_4 "initialDLBWPk0_4" +#define GNB_CONFIG_STRING_INITIALDLBWPMAPPINGTYPE_4 "initialDLBWPmappingType_4" +#define GNB_CONFIG_STRING_INITIALDLBWPSTARTSYMBOLANDLENGTH_4 "initialDLBWPstartSymbolAndLength_4" +#define GNB_CONFIG_STRING_INITIALDLBWPK0_5 "initialDLBWPk0_5" +#define GNB_CONFIG_STRING_INITIALDLBWPMAPPINGTYPE_5 "initialDLBWPmappingType_5" +#define GNB_CONFIG_STRING_INITIALDLBWPSTARTSYMBOLANDLENGTH_5 "initialDLBWPstartSymbolAndLength_5" +#define GNB_CONFIG_STRING_INITIALDLBWPK0_6 "initialDLBWPk0_6" +#define GNB_CONFIG_STRING_INITIALDLBWPMAPPINGTYPE_6 "initialDLBWPmappingType_6" +#define GNB_CONFIG_STRING_INITIALDLBWPSTARTSYMBOLANDLENGTH_6 "initialDLBWPstartSymbolAndLength_6" +#define GNB_CONFIG_STRING_INITIALDLBWPK0_7 "initialDLBWPk0_7" +#define GNB_CONFIG_STRING_INITIALDLBWPMAPPINGTYPE_7 "initialDLBWPmappingType_7" +#define GNB_CONFIG_STRING_INITIALDLBWPSTARTSYMBOLANDLENGTH_7 "initialDLBWPstartSymbolAndLength_7" +#define GNB_CONFIG_STRING_INITIALDLBWPK0_8 "initialDLBWPk0_8" +#define GNB_CONFIG_STRING_INITIALDLBWPMAPPINGTYPE_8 "initialDLBWPmappingType_8" +#define GNB_CONFIG_STRING_INITIALDLBWPSTARTSYMBOLANDLENGTH_8 "initialDLBWPstartSymbolAndLength_8" +#define GNB_CONFIG_STRING_INITIALDLBWPK0_9 "initialDLBWPk0_9" +#define GNB_CONFIG_STRING_INITIALDLBWPMAPPINGTYPE_9 "initialDLBWPmappingType_9" +#define GNB_CONFIG_STRING_INITIALDLBWPSTARTSYMBOLANDLENGTH_9 "initialDLBWPstartSymbolAndLength_9" +#define GNB_CONFIG_STRING_INITIALDLBWPK0_10 "initialDLBWPk0_10" +#define GNB_CONFIG_STRING_INITIALDLBWPMAPPINGTYPE_10 "initialDLBWPmappingType_10" +#define GNB_CONFIG_STRING_INITIALDLBWPSTARTSYMBOLANDLENGTH_10 "initialDLBWPstartSymbolAndLength_10" +#define GNB_CONFIG_STRING_INITIALDLBWPK0_11 "initialDLBWPk0_11" +#define GNB_CONFIG_STRING_INITIALDLBWPMAPPINGTYPE_11 "initialDLBWPmappingType_11" +#define GNB_CONFIG_STRING_INITIALDLBWPSTARTSYMBOLANDLENGTH_11 "initialDLBWPstartSymbolAndLength_11" +#define GNB_CONFIG_STRING_INITIALDLBWPK0_12 "initialDLBWPk0_12" +#define GNB_CONFIG_STRING_INITIALDLBWPMAPPINGTYPE_12 "initialDLBWPmappingType_12" +#define GNB_CONFIG_STRING_INITIALDLBWPSTARTSYMBOLANDLENGTH_12 "initialDLBWPstartSymbolAndLength_12" +#define GNB_CONFIG_STRING_INITIALDLBWPK0_13 "initialDLBWPk0_13" +#define GNB_CONFIG_STRING_INITIALDLBWPMAPPINGTYPE_13 "initialDLBWPmappingType_13" +#define GNB_CONFIG_STRING_INITIALDLBWPSTARTSYMBOLANDLENGTH_13 "initialDLBWPstartSymbolAndLength_13" +#define GNB_CONFIG_STRING_INITIALDLBWPK0_14 "initialDLBWPk0_14" +#define GNB_CONFIG_STRING_INITIALDLBWPMAPPINGTYPE_14 "initialDLBWPmappingType_14" +#define GNB_CONFIG_STRING_INITIALDLBWPSTARTSYMBOLANDLENGTH_14 "initialDLBWPstartSymbolAndLength_14" +#define GNB_CONFIG_STRING_INITIALDLBWPK0_15 "initialDLBWPk0_15" +#define GNB_CONFIG_STRING_INITIALDLBWPMAPPINGTYPE_15 "initialDLBWPmappingType_15" +#define GNB_CONFIG_STRING_INITIALDLBWPSTARTSYMBOLANDLENGTH_15 "initialDLBWPstartSymbolAndLength_15" -#define PREFIX_OKVALUES {"NORMAL","EXTENDED"} -#define PREFIX_MODVALUES { NORMAL, EXTENDED} +#define GNB_CONFIG_STRING_ULFREQUENCYBAND "ul_frequencyBand" +#define GNB_CONFIG_STRING_ULABSOLUEFREQUENCYPOINTA "ul_absoluteFrequencyPointA" +#define GNB_CONFIG_STRING_ULOFFSETTOCARRIER "ul_offstToCarrier" +#define GNB_CONFIG_STRING_ULSUBCARRIERSPACING "ul_subcarrierSpacing" +#define GNB_CONFIG_STRING_ULCARRIERBANDWIDTH "ul_carrierBandwidth" -#define PREFIXUL_OKVALUES {"NORMAL","EXTENDED"} -#define PREFIXUL_MODVALUES { NORMAL, EXTENDED} +#define GNB_CONFIG_STRING_INITIALULBWPLOCATIONANDBANDWIDTH "initialULBWPlocationAndBandwidth" +#define GNB_CONFIG_STRING_INITIALULBWPSUBCARRIERSPACING "initialULBWPsubcarrierSpacing" -#define NRBDL_OKVALUES {6,15,25,50,75,100} +#define GNB_CONFIG_STRING_PMAX "pMax" +#define GNB_CONFIG_STRING_PRACHCONFIGURATIONINDEX "prach_ConfigurationIndex" +#define GNB_CONFIG_STRING_PRACHMSG1FDM "prach_msg1_FDM" +#define GNB_CONFIG_STRING_PRACHMSG1FREQUENCYSTART "prach_msg1_FrequencyStart" +#define GNB_CONFIG_STRING_ZEROCORRELATIONZONECONFIG "zeroCorrelationZoneConfig" +#define GNB_CONFIG_STRING_PREAMBLERECEIVEDTARGETPOWER "preambleReceivedTargetPower" +#define GNB_CONFIG_STRING_PREAMBLETRANSMAX "preambleTransMax" +#define GNB_CONFIG_STRING_POWERRAMPINGSTEP "powerRampingStep" +#define GNB_CONFIG_STRING_RARESPONSEWINDOW "ra_ResponseWindow" +#define GNB_CONFIG_STRING_SSBPERRACHOCCASIONANDCBPREAMBLESPERSSBPR "ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR" +#define GNB_CONFIG_STRING_SSBPERRACHOCCASIONANDCBPREAMBLESPERSSB "ssb_perRACH_OccasionAndCB_PreamblesPerSSB" +#define GNB_CONFIG_STRING_RACONTENTIONRESOLUTIONTIMER "ra_ContentionResolutionTimer" +#define GNB_CONFIG_STRING_RSRPTHRESHOLDSSB "rsrp_ThresholdSSB" +#define GNB_CONFIG_STRING_PRACHROOTSEQUENCEINDEXPR "prach_RootSequenceIndex_PR" +#define GNB_CONFIG_STRING_PRACHROOTSEQUENCEINDEX "prach_RootSequenceIndex" +#define GNB_CONFIG_STRING_MSG1SUBCARRIERSPACING "msg1_SubcarrierSpacing" +#define GNB_CONFIG_STRING_RESTRICTEDSETCONFIG "restrictedSetConfig" +#define GNB_CONFIG_STRING_PUSCHTIMEDOMAINALLOCATIONLIST "puschTimeDomainAllocationList" +#define GNB_CONFIG_STRING_MSG3DELTAPREABMLE "msg3_DeltaPreamble" +#define GNB_CONFIG_STRING_P0NOMINALWITHGRANT "p0_NominalWithGrant" +#define GNB_CONFIG_STRING_PUCCHGROUPHOPPING "pucchGroupHopping" +#define GNB_CONFIG_STRING_HOPPINGID "hoppingId" +#define GNB_CONFIG_STRING_P0NOMINAL "p0_nominal" +#define GNB_CONFIG_STRING_INITIALULBWPK2_0 "initialULBWPk2_0" +#define GNB_CONFIG_STRING_INITIALULBWPMAPPINGTYPE_0 "initialULBWPmappingType_0" +#define GNB_CONFIG_STRING_INITIALULBWPSTARTSYMBOLANDLENGTH_0 "initialULBWPstartSymbolAndLength_0" +#define GNB_CONFIG_STRING_INITIALULBWPK2_1 "initialULBWPk2_1" +#define GNB_CONFIG_STRING_INITIALULBWPMAPPINGTYPE_1 "initialULBWPmappingType_1" +#define GNB_CONFIG_STRING_INITIALULBWPSTARTSYMBOLANDLENGTH_1 "initialULBWPstartSymbolAndLength_1" +#define GNB_CONFIG_STRING_INITIALULBWPK2_2 "initialULBWPk2_2" +#define GNB_CONFIG_STRING_INITIALULBWPMAPPINGTYPE_2 "initialULBWPmappingType_2" +#define GNB_CONFIG_STRING_INITIALULBWPSTARTSYMBOLANDLENGTH_2 "initialULBWPstartSymbolAndLength_2" +#define GNB_CONFIG_STRING_INITIALULBWPK2_3 "initialULBWPk2_3" +#define GNB_CONFIG_STRING_INITIALULBWPMAPPINGTYPE_3 "initialULBWPmappingType_3" +#define GNB_CONFIG_STRING_INITIALULBWPSTARTSYMBOLANDLENGTH_3 "initialULBWPstartSymbolAndLength_3" +#define GNB_CONFIG_STRING_INITIALULBWPK2_4 "initialULBWPk2_4" +#define GNB_CONFIG_STRING_INITIALULBWPMAPPINGTYPE_4 "initialULBWPmappingType_4" +#define GNB_CONFIG_STRING_INITIALULBWPSTARTSYMBOLANDLENGTH_4 "initialULBWPstartSymbolAndLength_4" +#define GNB_CONFIG_STRING_INITIALULBWPK2_5 "initialULBWPk2_5" +#define GNB_CONFIG_STRING_INITIALULBWPMAPPINGTYPE_5 "initialULBWPmappingType_5" +#define GNB_CONFIG_STRING_INITIALULBWPSTARTSYMBOLANDLENGTH_5 "initialULBWPstartSymbolAndLength_5" +#define GNB_CONFIG_STRING_INITIALULBWPK2_6 "initialULBWPk2_6" +#define GNB_CONFIG_STRING_INITIALULBWPMAPPINGTYPE_6 "initialULBWPmappingType_6" +#define GNB_CONFIG_STRING_INITIALULBWPSTARTSYMBOLANDLENGTH_6 "initialULBWPstartSymbolAndLength_6" +#define GNB_CONFIG_STRING_INITIALULBWPK2_7 "initialULBWPk2_7" +#define GNB_CONFIG_STRING_INITIALULBWPMAPPINGTYPE_7 "initialULBWPmappingType_7" +#define GNB_CONFIG_STRING_INITIALULBWPSTARTSYMBOLANDLENGTH_7 "initialULBWPstartSymbolAndLength_7" +#define GNB_CONFIG_STRING_INITIALULBWPK2_8 "initialULBWPk2_8" +#define GNB_CONFIG_STRING_INITIALULBWPMAPPINGTYPE_8 "initialULBWPmappingType_8" +#define GNB_CONFIG_STRING_INITIALULBWPSTARTSYMBOLANDLENGTH_8 "initialULBWPstartSymbolAndLength_8" +#define GNB_CONFIG_STRING_INITIALULBWPK2_9 "initialULBWPk2_9" +#define GNB_CONFIG_STRING_INITIALULBWPMAPPINGTYPE_9 "initialULBWPmappingType_9" +#define GNB_CONFIG_STRING_INITIALULBWPSTARTSYMBOLANDLENGTH_9 "initialULBWPstartSymbolAndLength_9" +#define GNB_CONFIG_STRING_INITIALULBWPK2_10 "initialULBWPk2_10" +#define GNB_CONFIG_STRING_INITIALULBWPMAPPINGTYPE_10 "initialULBWPmappingType_10" +#define GNB_CONFIG_STRING_INITIALULBWPSTARTSYMBOLANDLENGTH_10 "initialULBWPstartSymbolAndLength_10" +#define GNB_CONFIG_STRING_INITIALULBWPK2_11 "initialULBWPk2_11" +#define GNB_CONFIG_STRING_INITIALULBWPMAPPINGTYPE_11 "initialULBWPmappingType_11" +#define GNB_CONFIG_STRING_INITIALULBWPSTARTSYMBOLANDLENGTH_11 "initialULBWPstartSymbolAndLength_11" +#define GNB_CONFIG_STRING_INITIALULBWPK2_12 "initialULBWPk2_12" +#define GNB_CONFIG_STRING_INITIALULBWPMAPPINGTYPE_12 "initialULBWPmappingType_12" +#define GNB_CONFIG_STRING_INITIALULBWPSTARTSYMBOLANDLENGTH_12 "initialULBWPstartSymbolAndLength_12" +#define GNB_CONFIG_STRING_INITIALULBWPK2_13 "initialULBWPk2_13" +#define GNB_CONFIG_STRING_INITIALULBWPMAPPINGTYPE_13 "initialULBWPmappingType_13" +#define GNB_CONFIG_STRING_INITIALULBWPSTARTSYMBOLANDLENGTH_13 "initialULBWPstartSymbolAndLength_13" +#define GNB_CONFIG_STRING_INITIALULBWPK2_14 "initialULBWPk2_14" +#define GNB_CONFIG_STRING_INITIALULBWPMAPPINGTYPE_14 "initialULBWPmappingType_14" +#define GNB_CONFIG_STRING_INITIALULBWPSTARTSYMBOLANDLENGTH_14 "initialULBWPstartSymbolAndLength_14" +#define GNB_CONFIG_STRING_INITIALULBWPK2_15 "initialULBWPk2_15" +#define GNB_CONFIG_STRING_INITIALULBWPMAPPINGTYPE_15 "initialULBWPmappingType_15" +#define GNB_CONFIG_STRING_INITIALULBWPSTARTSYMBOLANDLENGTH_15 "initialULBWPstartSymbolAndLength_15" -#define UETIMER_T300_OKVALUES {100,200,300,400,600,1000,1500,2000} -#define UETT300(A) UE_TimersAndConstants__t300_ ## A -#define UETIMER_T300_MODVALUES { UETT300(ms100), UETT300(ms200),UETT300(ms300),UETT300(ms400),UETT300(ms600),UETT300(ms1000),UETT300(ms1500),UETT300(ms2000)} -#define UETIMER_T301_OKVALUES {100,200,300,400,600,1000,1500,2000} -#define UETT301(A) UE_TimersAndConstants__t301_ ## A -#define UETIMER_T301_MODVALUES { UETT301(ms100), UETT301(ms200),UETT301(ms300),UETT301(ms400),UETT301(ms600),UETT301(ms1000),UETT301(ms1500),UETT301(ms2000)} +#define GNB_CONFIG_STRING_SSBPOSITIONSINBURSTPR "ssb_PositionsInBurst_PR" +#define GNB_CONFIG_STRING_SSBPOSITIONSINBURST "ssb_PositionsInBurst_Bitmap" +#define GNB_CONFIG_STRING_SSBPERIODICITYSERVINGCELL "ssb_periodicityServingCell" +#define GNB_CONFIG_STRING_DMRSTYPEAPOSITION "dmrs_TypeA_Position" +#define GNB_CONFIG_STRING_REFERENCESUBCARRIERSPACING "referenceSubcarrierSpacing" +#define GNB_CONFIG_STRING_DLULTRANSMISSIONPERIODICITY "dl_UL_TransmissionPeriodicity" +#define GNB_CONFIG_STRING_NROFDOWNLINKSLOTS "nrofDownlinkSlots" +#define GNB_CONFIG_STRING_NROFDOWNLINKSYMBOLS "nrofDownlinkSymbols" +#define GNB_CONFIG_STRING_NROFUPLINKSLOTS "nrofUplinkSlots" +#define GNB_CONFIG_STRING_NROFUPLINKSYMBOLS "nrofUplinkSymbols" +#define GNB_CONFIG_STRING_DLULTRANSMISSIONPERIODICITY2 "dl_UL_TransmissionPeriodicity2" +#define GNB_CONFIG_STRING_NROFDOWNLINKSLOTS2 "nrofDownlinkSlots2" +#define GNB_CONFIG_STRING_NROFDOWNLINKSYMBOLS2 "nrofDownlinkSymbols2" +#define GNB_CONFIG_STRING_NROFUPLINKSLOTS2 "nrofUplinkSlots2" +#define GNB_CONFIG_STRING_NROFUPLINKSYMBOLS2 "nrofUplinkSymbols2" +#define GNB_CONFIG_STRING_SSPBCHBLOCKPOWER "ssPBCH_BlockPower" + + +#define CARRIERBANDWIDTH_OKVALUES {11,18,24,25,31,32,38,51,52,65,66,78,79,93,106,107,121,132,133,135,160,162,189,216,217,245,264,270,273} + +/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ +/* Serving Cell Config Common configuration parameters */ +/* optname helpstr paramflags XXXptr defXXXval type numelt */ +/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ + +#define GNB_CONFIG_PHYSCELLID_IDX 0 +#define GNB_CONFIG_ABSOLUTEFREQUENCYSSB_IDX 5 +#define GNB_CONFIG_DLFREQUENCYBAND_IDX 6 +#define GNB_CONFIG_ABSOLUTEFREQUENCYPOINTA_IDX 7 +#define GNB_CONFIG_DLCARRIERBANDWIDTH_IDX 10 + +#define SSBPARAMS_DESC {{GNB_CONFIG_STRING_SSBSUBCARRIEROFFSET,NULL,0,iptr:&ssb_SubcarrierOffset,defintval:0,TYPE_INT,0}} + +#define SCCPARAMS_DESC(scc) { \ +{GNB_CONFIG_STRING_PHYSCELLID,NULL,0,i64ptr:scc->physCellId,defint64val:0,TYPE_INT64,0/*0*/}, \ +{GNB_CONFIG_STRING_NTIMINGADVANCEOFFSET,NULL,0,i64ptr:scc->n_TimingAdvanceOffset,defint64val:NR_ServingCellConfigCommon__n_TimingAdvanceOffset_n0,TYPE_INT64,0/*1*/},\ +{GNB_CONFIG_STRING_SSBPERIODICITYSERVINGCELL,NULL,0,i64ptr:scc->ssb_periodicityServingCell,defint64val:NR_ServingCellConfigCommon__ssb_periodicityServingCell_ms20,TYPE_INT64,0/*2*/},\ +{GNB_CONFIG_STRING_DMRSTYPEAPOSITION,NULL,0,i64ptr:&scc->dmrs_TypeA_Position,defint64val:NR_ServingCellConfigCommon__dmrs_TypeA_Position_pos2,TYPE_INT64,0/*3*/},\ +{GNB_CONFIG_STRING_SUBCARRIERSPACING,NULL,0,i64ptr:scc->subcarrierSpacing,defint64val:NR_SubcarrierSpacing_kHz30,TYPE_INT64,0/*4*/},\ +{GNB_CONFIG_STRING_ABSOLUTEFREQUENCYSSB,NULL,0,i64ptr:scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB,defint64val:660960,TYPE_INT64,0/*5*/},\ +{GNB_CONFIG_STRING_DLFREQUENCYBAND,NULL,0,i64ptr:scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0],defint64val:78,TYPE_INT64,0/*6*/},\ +{GNB_CONFIG_STRING_DLABSOLUEFREQUENCYPOINTA,NULL,0,i64ptr:&scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA,defint64val:660000,TYPE_INT64,0/*7*/},\ +{GNB_CONFIG_STRING_DLOFFSETTOCARRIER,NULL,0,i64ptr:&scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->offsetToCarrier,defint64val:0,TYPE_INT64,0/*8*/},\ +{GNB_CONFIG_STRING_DLSUBCARRIERSPACING,NULL,0,i64ptr:&scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing,defint64val:NR_SubcarrierSpacing_kHz30,TYPE_INT64,0/*9*/},\ +{GNB_CONFIG_STRING_DLCARRIERBANDWIDTH,NULL,0,i64ptr:&scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->carrierBandwidth,defint64val:217,TYPE_INT64,0 /*10*/}, \ +{GNB_CONFIG_STRING_INITIALDLBWPLOCATIONANDBANDWIDTH,NULL,0,i64ptr:&scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth,defint64val:13036,TYPE_INT64,0/*11*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPSUBCARRIERSPACING,NULL,0,i64ptr:&scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.subcarrierSpacing,defint64val:NR_SubcarrierSpacing_kHz30,TYPE_INT64,0/*12*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPCONTROLRESOURCESETZERO,NULL,0,i64ptr:scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->controlResourceSetZero,defint64val:12,TYPE_INT64,0/*13*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPSEARCHSPACEZERO,NULL,0,i64ptr:scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->searchSpaceZero,defint64val:0,TYPE_INT64,0/*14*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPK0_0,NULL,0,i64ptr:scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[0]->k0,defint64val:-1,TYPE_INT64,0/*15*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPMAPPINGTYPE_0,NULL,0,i64ptr:&scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[0]->mappingType,defint64val:-1,TYPE_INT64,0/*16*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPSTARTSYMBOLANDLENGTH_0,NULL,0,i64ptr:&scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[0]->startSymbolAndLength,defint64val:-1,TYPE_INT64,0/*17*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPK0_1,NULL,0,i64ptr:scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[1]->k0,defint64val:-1,TYPE_INT64,0/*18*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPMAPPINGTYPE_1,NULL,0,i64ptr:&scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[1]->mappingType,defint64val:NR_PDSCH_TimeDomainResourceAllocation__mappingType_typeA,TYPE_INT64,0/*19*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPSTARTSYMBOLANDLENGTH_0,NULL,0,i64ptr:&scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[1]->startSymbolAndLength,defint64val:53,TYPE_INT64,0/*20*/}, \ +{GNB_CONFIG_STRING_INITIALDLBWPK0_2,NULL,0,i64ptr:scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[2]->k0,defint64val:-1,TYPE_INT64,0/*21*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPMAPPINGTYPE_2,NULL,0,i64ptr:&scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[2]->mappingType,defint64val:NR_PDSCH_TimeDomainResourceAllocation__mappingType_typeA,TYPE_INT64,0/*22*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPSTARTSYMBOLANDLENGTH_2,NULL,0,i64ptr:&scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[2]->startSymbolAndLength,defint64val:54,TYPE_INT64,0/*23*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPK0_3,NULL,0,i64ptr:scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[3]->k0,defint64val:-1,TYPE_INT64,0/*24*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPMAPPINGTYPE_3,NULL,0,i64ptr:&scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[3]->mappingType,defint64val:NR_PDSCH_TimeDomainResourceAllocation__mappingType_typeA,TYPE_INT64,0/*25*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPSTARTSYMBOLANDLENGTH_3,NULL,0,i64ptr:&scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[3]->startSymbolAndLength,defint64val:54,TYPE_INT64,0/*26*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPK0_4,NULL,0,i64ptr:scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[4]->k0,defint64val:-1,TYPE_INT64,0/*27*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPMAPPINGTYPE_4,NULL,0,i64ptr:&scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[4]->mappingType,defint64val:NR_PDSCH_TimeDomainResourceAllocation__mappingType_typeA,TYPE_INT64,0/*28*/}, \ +{GNB_CONFIG_STRING_INITIALDLBWPSTARTSYMBOLANDLENGTH_4,NULL,0,i64ptr:&scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[4]->startSymbolAndLength,defint64val:54,TYPE_INT64,0/*29*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPK0_5,NULL,0,i64ptr:scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[5]->k0,defint64val:-1,TYPE_INT64,0/*30*/}, \ +{GNB_CONFIG_STRING_INITIALDLBWPMAPPINGTYPE_5,NULL,0,i64ptr:&scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[5]->mappingType,defint64val:NR_PDSCH_TimeDomainResourceAllocation__mappingType_typeA,TYPE_INT64,0/*31*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPSTARTSYMBOLANDLENGTH_5,NULL,0,i64ptr:&scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[5]->startSymbolAndLength,defint64val:54,TYPE_INT64,0/*32*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPK0_6,NULL,0,i64ptr:scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[6]->k0,defint64val:-1,TYPE_INT64,0/*33*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPMAPPINGTYPE_6,NULL,0,i64ptr:&scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[6]->mappingType,defint64val:NR_PDSCH_TimeDomainResourceAllocation__mappingType_typeA,TYPE_INT64,0/*34*/}, \ +{GNB_CONFIG_STRING_INITIALDLBWPSTARTSYMBOLANDLENGTH_6,NULL,0,i64ptr:&scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[6]->startSymbolAndLength,defint64val:54,TYPE_INT64,0/*35*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPK0_7,NULL,0,i64ptr:scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[7]->k0,defint64val:-1,TYPE_INT64,0/*36*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPMAPPINGTYPE_7,NULL,0,i64ptr:&scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[7]->mappingType,defint64val:NR_PDSCH_TimeDomainResourceAllocation__mappingType_typeA,TYPE_INT64,0/*37*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPSTARTSYMBOLANDLENGTH_7,NULL,0,i64ptr:&scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[7]->startSymbolAndLength,defint64val:54,TYPE_INT64,0/*38*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPK0_8,NULL,0,i64ptr:scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[8]->k0,defint64val:-1,TYPE_INT64,0/*39*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPMAPPINGTYPE_8,NULL,0,i64ptr:&scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[8]->mappingType,defint64val:NR_PDSCH_TimeDomainResourceAllocation__mappingType_typeA,TYPE_INT64,0/*40*/}, \ +{GNB_CONFIG_STRING_INITIALDLBWPSTARTSYMBOLANDLENGTH_8,NULL,0,i64ptr:&scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[8]->startSymbolAndLength,defint64val:54,TYPE_INT64,0/*41*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPK0_9,NULL,0,i64ptr:scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[2]->k0,defint64val:-1,TYPE_INT64,0/*42*/}, \ +{GNB_CONFIG_STRING_INITIALDLBWPMAPPINGTYPE_9,NULL,0,i64ptr:&scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[9]->mappingType,defint64val:NR_PDSCH_TimeDomainResourceAllocation__mappingType_typeA,TYPE_INT64,0/*43*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPSTARTSYMBOLANDLENGTH_9,NULL,0,i64ptr:&scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[9]->startSymbolAndLength,defint64val:54,TYPE_INT64,0/*44*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPK0_10,NULL,0,i64ptr:scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[10]->k0,defint64val:-1,TYPE_INT64,0/*45*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPMAPPINGTYPE_10,NULL,0,i64ptr:&scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[10]->mappingType,defint64val:NR_PDSCH_TimeDomainResourceAllocation__mappingType_typeA,TYPE_INT64,0/*46*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPSTARTSYMBOLANDLENGTH_10,NULL,0,i64ptr:&scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[10]->startSymbolAndLength,defint64val:54,TYPE_INT64,0/*47*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPK0_11,NULL,0,i64ptr:scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[11]->k0,defint64val:-1,TYPE_INT64,0/*48*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPMAPPINGTYPE_11,NULL,0,i64ptr:&scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[11]->mappingType,defint64val:NR_PDSCH_TimeDomainResourceAllocation__mappingType_typeA,TYPE_INT64,0/*49*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPSTARTSYMBOLANDLENGTH_11,NULL,0,i64ptr:&scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[11]->startSymbolAndLength,defint64val:54,TYPE_INT64,0/*50*/}, \ +{GNB_CONFIG_STRING_INITIALDLBWPK0_12,NULL,0,i64ptr:scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[12]->k0,defint64val:-1,TYPE_INT64,0/*51*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPMAPPINGTYPE_12,NULL,0,i64ptr:&scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[12]->mappingType,defint64val:NR_PDSCH_TimeDomainResourceAllocation__mappingType_typeA,TYPE_INT64,0/*52*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPSTARTSYMBOLANDLENGTH_12,NULL,0,i64ptr:&scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[12]->startSymbolAndLength,defint64val:54,TYPE_INT64,0/*53*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPK0_13,NULL,0,i64ptr:scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[13]->k0,defint64val:-1,TYPE_INT64,0/*54*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPMAPPINGTYPE_13,NULL,0,i64ptr:&scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[13]->mappingType,defint64val:NR_PDSCH_TimeDomainResourceAllocation__mappingType_typeA,TYPE_INT64,0/*55*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPSTARTSYMBOLANDLENGTH_13,NULL,0,i64ptr:&scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[13]->startSymbolAndLength,defint64val:54,TYPE_INT64,0/*56*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPK0_14,NULL,0,i64ptr:scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[14]->k0,defint64val:-1,TYPE_INT64,0/*57*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPMAPPINGTYPE_14,NULL,0,i64ptr:&scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[14]->mappingType,defint64val:NR_PDSCH_TimeDomainResourceAllocation__mappingType_typeA,TYPE_INT64,0/*58*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPSTARTSYMBOLANDLENGTH_14,NULL,0,i64ptr:&scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[14]->startSymbolAndLength,defint64val:54,TYPE_INT64,0/*59*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPK0_15,NULL,0,i64ptr:scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[15]->k0,defint64val:-1,TYPE_INT64,0/*60*/}, \ +{GNB_CONFIG_STRING_INITIALDLBWPMAPPINGTYPE_15,NULL,0,i64ptr:&scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[15]->mappingType,defint64val:NR_PDSCH_TimeDomainResourceAllocation__mappingType_typeA,TYPE_INT64,0/*61*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPSTARTSYMBOLANDLENGTH_15,NULL,0,i64ptr:&scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[15]->startSymbolAndLength,defint64val:54,TYPE_INT64,0/*62*/},\ +{GNB_CONFIG_STRING_ULFREQUENCYBAND,NULL,0,i64ptr:scc->uplinkConfigCommon->frequencyInfoUL->frequencyBandList->list.array[0],defint64val:-1,TYPE_INT64,0/*63*/},\ +{GNB_CONFIG_STRING_ULABSOLUEFREQUENCYPOINTA,NULL,0,i64ptr:scc->uplinkConfigCommon->frequencyInfoUL->absoluteFrequencyPointA,defint64val:-1,TYPE_INT64,0/*64*/},\ +{GNB_CONFIG_STRING_ULOFFSETTOCARRIER,NULL,0,i64ptr:&scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->offsetToCarrier,defint64val:0,TYPE_INT64,0/*65*/},\ +{GNB_CONFIG_STRING_ULSUBCARRIERSPACING,NULL,0,i64ptr:&scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing,defint64val:NR_SubcarrierSpacing_kHz30,TYPE_INT64,0/*66*/},\ +{GNB_CONFIG_STRING_ULCARRIERBANDWIDTH,NULL,0,i64ptr:&scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->carrierBandwidth,defint64val:217,TYPE_INT64,0/*67*/},\ +{GNB_CONFIG_STRING_PMAX,NULL,0,i64ptr:scc->uplinkConfigCommon->frequencyInfoUL->p_Max,defint64val:20,TYPE_INT64,0/*68*/},\ +{GNB_CONFIG_STRING_INITIALULBWPLOCATIONANDBANDWIDTH,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.locationAndBandwidth,defint64val:13036,TYPE_INT64,0/*69*/},\ +{GNB_CONFIG_STRING_INITIALULBWPSUBCARRIERSPACING,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.subcarrierSpacing,defint64val:NR_SubcarrierSpacing_kHz30,TYPE_INT64,0 /*70*/}, \ +{GNB_CONFIG_STRING_PRACHCONFIGURATIONINDEX,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.prach_ConfigurationIndex,defint64val:98,TYPE_INT64,0/*71*/},\ +{GNB_CONFIG_STRING_PRACHMSG1FDM,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.msg1_FDM,defint64val:NR_RACH_ConfigGeneric__msg1_FDM_one,TYPE_INT64,0/*72*/},\ +{GNB_CONFIG_STRING_PRACHMSG1FREQUENCYSTART,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.msg1_FrequencyStart,defint64val:0,TYPE_INT64,0/*73*/},\ +{GNB_CONFIG_STRING_ZEROCORRELATIONZONECONFIG,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.zeroCorrelationZoneConfig,defint64val:13,TYPE_INT64,0/*74*/},\ +{GNB_CONFIG_STRING_PREAMBLERECEIVEDTARGETPOWER,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.preambleReceivedTargetPower,defint64val:-118,TYPE_INT64,0/*75*/},\ +{GNB_CONFIG_STRING_PREAMBLETRANSMAX,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.preambleTransMax,defint64val:NR_RACH_ConfigGeneric__preambleTransMax_n10,TYPE_INT64,0/*76*/},\ +{GNB_CONFIG_STRING_POWERRAMPINGSTEP,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.powerRampingStep,defint64val:NR_RACH_ConfigGeneric__powerRampingStep_dB2,TYPE_INT64,0/*77*/},\ +{GNB_CONFIG_STRING_RARESPONSEWINDOW,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.ra_ResponseWindow,defint64val:NR_RACH_ConfigGeneric__ra_ResponseWindow_sl20,TYPE_INT64,0/*78*/},\ +{GNB_CONFIG_STRING_SSBPERRACHOCCASIONANDCBPREAMBLESPERSSBPR,NULL,0,uptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->present,defuintval:NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_one,TYPE_UINT,0/*79*/},\ +{GNB_CONFIG_STRING_SSBPERRACHOCCASIONANDCBPREAMBLESPERSSB,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->choice.one,defint64val:NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__one_n64,TYPE_INT64,0 /*80*/}, \ +{GNB_CONFIG_STRING_RACONTENTIONRESOLUTIONTIMER,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->ra_ContentionResolutionTimer,defint64val:NR_RACH_ConfigCommon__ra_ContentionResolutionTimer_sf64,TYPE_INT64,0/*81*/},\ +{GNB_CONFIG_STRING_RSRPTHRESHOLDSSB,NULL,0,i64ptr:scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rsrp_ThresholdSSB,defint64val:19,TYPE_INT64,0/*82*/},\ +{GNB_CONFIG_STRING_PRACHROOTSEQUENCEINDEXPR,NULL,0,uptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->prach_RootSequenceIndex.present,defuintval:NR_RACH_ConfigCommon__prach_RootSequenceIndex_PR_l139,TYPE_UINT,0/*83*/},\ +{GNB_CONFIG_STRING_PRACHROOTSEQUENCEINDEX,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->prach_RootSequenceIndex.choice.l139,defint64val:0,TYPE_INT64,0/*84*/},\ +{GNB_CONFIG_STRING_MSG1SUBCARRIERSPACING,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->restrictedSetConfig,defintval:NR_RACH_ConfigCommon__restrictedSetConfig_unrestrictedSet,TYPE_INT64,0/*85*/}, \ +{GNB_CONFIG_STRING_INITIALULBWPK2_0,NULL,0,i64ptr:scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[0]->k2,defint64val:-1,TYPE_INT64,0/*86*/},\ +{GNB_CONFIG_STRING_INITIALULBWPMAPPINGTYPE_0,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[0]->mappingType,defint64val:NR_PDSCH_TimeDomainResourceAllocation__mappingType_typeB,TYPE_INT64,/*87*/},\ +{GNB_CONFIG_STRING_INITIALULBWPSTARTSYMBOLANDLENGTH_0,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[0]->startSymbolAndLength,defint64val:55,TYPE_INT64,0/*88*/},\ +{GNB_CONFIG_STRING_INITIALULBWPK2_1,NULL,0,i64ptr:scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[1]->k2,defint64val:-1,TYPE_INT64,0/*89*/}, \ +{GNB_CONFIG_STRING_INITIALULBWPMAPPINGTYPE_1,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[1]->mappingType,defint64val:NR_PUSCH_TimeDomainResourceAllocation__mappingType_typeB,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_INITIALULBWPSTARTSYMBOLANDLENGTH_1,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[1]->startSymbolAndLength,defint64val:53,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_INITIALULBWPK2_2,NULL,0,i64ptr:scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[2]->k2,defint64val:-1,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_INITIALULBWPMAPPINGTYPE_2,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[2]->mappingType,defint64val:NR_PDSCH_TimeDomainResourceAllocation__mappingType_typeB,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_INITIALULBWPSTARTSYMBOLANDLENGTH_2,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[2]->startSymbolAndLength,defint64val:55,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_INITIALULBWPK2_3,NULL,0,i64ptr:scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[3]->k2,defint64val:-1,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_INITIALULBWPMAPPINGTYPE_3,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[3]->mappingType,defint64val:NR_PUSCH_TimeDomainResourceAllocation__mappingType_typeB,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_INITIALULBWPSTARTSYMBOLANDLENGTH_3,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[3]->startSymbolAndLength,defint64val:53,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_INITIALULBWPK2_4,NULL,0,i64ptr:scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[4]->k2,defint64val:-1,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_INITIALULBWPMAPPINGTYPE_4,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[4]->mappingType,defint64val:NR_PDSCH_TimeDomainResourceAllocation__mappingType_typeB,TYPE_INT64,0 /*99*/}, \ +{GNB_CONFIG_STRING_INITIALULBWPSTARTSYMBOLANDLENGTH_4,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[4]->startSymbolAndLength,defint64val:55,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_INITIALULBWPK2_5,NULL,0,i64ptr:scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[5]->k2,defint64val:-1,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_INITIALULBWPMAPPINGTYPE_5,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[5]->mappingType,defint64val:NR_PUSCH_TimeDomainResourceAllocation__mappingType_typeB,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_INITIALULBWPSTARTSYMBOLANDLENGTH_5,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[5]->startSymbolAndLength,defint64val:53,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_INITIALULBWPK2_6,NULL,0,i64ptr:scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[6]->k2,defint64val:-1,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_INITIALULBWPMAPPINGTYPE_6,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[6]->mappingType,defint64val:NR_PDSCH_TimeDomainResourceAllocation__mappingType_typeB,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_INITIALULBWPSTARTSYMBOLANDLENGTH_6,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[6]->startSymbolAndLength,defint64val:55,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_INITIALULBWPK2_7,NULL,0,i64ptr:scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[7]->k2,defint64val:-1,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_INITIALULBWPMAPPINGTYPE_7,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[7]->mappingType,defint64val:NR_PUSCH_TimeDomainResourceAllocation__mappingType_typeB,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_INITIALULBWPSTARTSYMBOLANDLENGTH_7,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[7]->startSymbolAndLength,defint64val:53,TYPE_INT64,0/*109*/}, \ +{GNB_CONFIG_STRING_INITIALULBWPK2_8,NULL,0,i64ptr:scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[8]->k2,defint64val:-1,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_INITIALULBWPMAPPINGTYPE_8,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[8]->mappingType,defint64val:NR_PDSCH_TimeDomainResourceAllocation__mappingType_typeB,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_INITIALULBWPSTARTSYMBOLANDLENGTH_8,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[8]->startSymbolAndLength,defint64val:55,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_INITIALULBWPK2_9,NULL,0,i64ptr:scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[9]->k2,defint64val:-1,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_INITIALULBWPMAPPINGTYPE_9,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[9]->mappingType,defint64val:NR_PUSCH_TimeDomainResourceAllocation__mappingType_typeB,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_INITIALULBWPSTARTSYMBOLANDLENGTH_9,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[9]->startSymbolAndLength,defint64val:53,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_INITIALULBWPK2_10,NULL,0,i64ptr:scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[10]->k2,defint64val:-1,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_INITIALULBWPMAPPINGTYPE_10,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[10]->mappingType,defint64val:NR_PDSCH_TimeDomainResourceAllocation__mappingType_typeB,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_INITIALULBWPSTARTSYMBOLANDLENGTH_10,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[10]->startSymbolAndLength,defint64val:55,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_INITIALULBWPK2_11,NULL,0,i64ptr:scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[11]->k2,defint64val:-1,TYPE_INT64,0/*119*/}, \ +{GNB_CONFIG_STRING_INITIALULBWPMAPPINGTYPE_11,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[11]->mappingType,defint64val:NR_PUSCH_TimeDomainResourceAllocation__mappingType_typeB,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_INITIALULBWPSTARTSYMBOLANDLENGTH_11,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[11]->startSymbolAndLength,defint64val:53,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_INITIALULBWPK2_12,NULL,0,i64ptr:scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[12]->k2,defint64val:-1,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_INITIALULBWPMAPPINGTYPE_12,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[12]->mappingType,defint64val:NR_PDSCH_TimeDomainResourceAllocation__mappingType_typeB,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_INITIALULBWPSTARTSYMBOLANDLENGTH_12,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[12]->startSymbolAndLength,defint64val:55,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_INITIALULBWPK2_13,NULL,0,i64ptr:scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[13]->k2,defint64val:-1,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_INITIALULBWPMAPPINGTYPE_13,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[13]->mappingType,defint64val:NR_PUSCH_TimeDomainResourceAllocation__mappingType_typeB,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_INITIALULBWPSTARTSYMBOLANDLENGTH_13,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[13]->startSymbolAndLength,defint64val:53,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_INITIALULBWPK2_14,NULL,0,i64ptr:scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[14]->k2,defint64val:-1,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_INITIALULBWPMAPPINGTYPE_14,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[14]->mappingType,defint64val:NR_PDSCH_TimeDomainResourceAllocation__mappingType_typeB,TYPE_INT64,0 /*129*/}, \ +{GNB_CONFIG_STRING_INITIALULBWPSTARTSYMBOLANDLENGTH_14,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[14]->startSymbolAndLength,defint64val:55,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_INITIALULBWPK2_15,NULL,0,i64ptr:scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[15]->k2,defint64val:-1,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_INITIALULBWPMAPPINGTYPE_15,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[15]->mappingType,defint64val:NR_PUSCH_TimeDomainResourceAllocation__mappingType_typeB,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_INITIALULBWPSTARTSYMBOLANDLENGTH_15,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[15]->startSymbolAndLength,defint64val:53,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_MSG3DELTAPREABMLE, NULL,0,i64ptr:scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->msg3_DeltaPreamble,defint64val:1,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_P0NOMINALWITHGRANT, NULL,0,i64ptr:scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->p0_NominalWithGrant,defint64val:1,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_PUCCHGROUPHOPPING, NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->pucch_ConfigCommon->choice.setup->pucch_GroupHopping,defint64val:NR_PUCCH_ConfigCommon__pucch_GroupHopping_neither,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_HOPPINGID, NULL,0,i64ptr:scc->uplinkConfigCommon->initialUplinkBWP->pucch_ConfigCommon->choice.setup->hoppingId,defint64val:40,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_P0NOMINAL, NULL,0,i64ptr:scc->uplinkConfigCommon->initialUplinkBWP->pucch_ConfigCommon->choice.setup->p0_nominal,defint64val:1,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_SSBPOSITIONSINBURSTPR,NULL,0,uptr:&scc->ssb_PositionsInBurst->present,defuintval:NR_ServingCellConfigCommon__ssb_PositionsInBurst_PR_mediumBitmap,TYPE_UINT,0/*139*/}, \ +{GNB_CONFIG_STRING_SSBPOSITIONSINBURST,NULL,0,iptr:&ssb_bitmap,defintval:0xff,TYPE_INT,0}, \ +{GNB_CONFIG_STRING_REFERENCESUBCARRIERSPACING,NULL,0,i64ptr:&scc->tdd_UL_DL_ConfigurationCommon->referenceSubcarrierSpacing,defint64val:NR_SubcarrierSpacing_kHz30,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_DLULTRANSMISSIONPERIODICITY,NULL,0,i64ptr:&scc->tdd_UL_DL_ConfigurationCommon->pattern1.dl_UL_TransmissionPeriodicity,defint64val:NR_TDD_UL_DL_Pattern__dl_UL_TransmissionPeriodicity_ms0p5,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_NROFDOWNLINKSLOTS,NULL,0,i64ptr:&scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofDownlinkSlots,defint64val:7,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_NROFDOWNLINKSYMBOLS,NULL,0,i64ptr:&scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofDownlinkSymbols,defint64val:6,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_NROFUPLINKSLOTS,NULL,0,i64ptr:&scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSlots,defint64val:2,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_NROFUPLINKSYMBOLS,NULL,0,i64ptr:&scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSymbols,defint64val:4,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_DLULTRANSMISSIONPERIODICITY2,NULL,0,i64ptr:&scc->tdd_UL_DL_ConfigurationCommon->pattern2->dl_UL_TransmissionPeriodicity,defint64val:-1,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_NROFDOWNLINKSLOTS2,NULL,0,i64ptr:&scc->tdd_UL_DL_ConfigurationCommon->pattern2->nrofDownlinkSlots,defint64val:-1,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_NROFDOWNLINKSYMBOLS2,NULL,0,i64ptr:&scc->tdd_UL_DL_ConfigurationCommon->pattern2->nrofDownlinkSymbols,defint64val:-1,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_NROFUPLINKSLOTS2,NULL,0,i64ptr:&scc->tdd_UL_DL_ConfigurationCommon->pattern2->nrofUplinkSlots,defint64val:-1,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_NROFUPLINKSYMBOLS2,NULL,0,i64ptr:&scc->tdd_UL_DL_ConfigurationCommon->pattern2->nrofUplinkSymbols,defint64val:-1,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_SSPBCHBLOCKPOWER,NULL,0,i64ptr:&scc->ss_PBCH_BlockPower,defint64val:20,TYPE_INT64,0}, \ +{GNB_CONFIG_STRING_MSG1SUBCARRIERSPACING,NULL,0,i64ptr:scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg1_SubcarrierSpacing,defintval:-1,TYPE_INT64,0/*86*/}} -#define UETIMER_T310_OKVALUES {0,50,100,200,500,1000,2000} -#define UETT310(A) UE_TimersAndConstants__t310_ ## A -#define UETIMER_T310_MODVALUES { UETT310(ms0), UETT310(ms50),UETT310(ms100),UETT310(ms200),UETT310(ms500),UETT310(ms1000),UETT310(ms2000)} -#define UETIMER_T311_OKVALUES {1000,3110,5000,10000,15000,20000,31100} -#define UETT311(A) UE_TimersAndConstants__t311_ ## A -#define UETIMER_T311_MODVALUES { UETT311(ms1000), UETT311(ms3000),UETT311(ms5000),UETT311(ms10000),UETT311(ms15000),UETT311(ms20000),UETT311(ms30000)} -#define UETIMER_N310_OKVALUES {1,2,3,4,6,8,10,20} -#define UETN310(A) UE_TimersAndConstants__n310_ ## A -#define UETIMER_N310_MODVALUES { UETN310(n1), UETN310(n2),UETN310(n3),UETN310(n4),UETN310(n6),UETN310(n8),UETN310(n10),UETN310(n20)} -#define UETIMER_N311_OKVALUES {1,2,3,4,5,6,8,10} -#define UETN311(A) UE_TimersAndConstants__n311_ ## A -#define UETIMER_N311_MODVALUES { UETN311(n1), UETN311(n2),UETN311(n3),UETN311(n4),UETN311(n5),UETN311(n6),UETN311(n8),UETN311(n10)} #endif diff --git a/openair2/GNB_APP/gnb_config.c b/openair2/GNB_APP/gnb_config.c index ab36765445..f2f72f4888 100644 --- a/openair2/GNB_APP/gnb_config.c +++ b/openair2/GNB_APP/gnb_config.c @@ -60,6 +60,7 @@ #include "gnb_paramdef.h" #include "LAYER2/NR_MAC_gNB/mac_proto.h" +#include "NR_asn_constant.h" #include "NR_SCS-SpecificCarrier.h" #include "NR_TDD-UL-DL-ConfigCommon.h" #include "NR_FrequencyInfoUL.h" @@ -84,6 +85,188 @@ extern WORKER_CONF_t get_thread_worker_conf(void); extern int config_check_band_frequencies(int ind, int16_t band, uint32_t downlink_frequency, int32_t uplink_frequency_offset, uint32_t frame_type); +void prepare_scc(NR_ServingCellConfigCommon_t *scc) { + + NR_FreqBandIndicatorNR_t *dl_frequencyBandList,*ul_frequencyBandList; + struct NR_SCS_SpecificCarrier *dl_scs_SpecificCarrierList,*ul_scs_SpecificCarrierList; + struct NR_PDSCH_TimeDomainResourceAllocation *bwp_dl_timedomainresourceallocation; + struct NR_PUSCH_TimeDomainResourceAllocation *pusch_configcommontimedomainresourceallocation; + // struct NR_RateMatchPattern *ratematchpattern; + // NR_RateMatchPatternId_t *ratematchpatternid; + // NR_TCI_StateId_t *TCI_StateId; + // struct NR_ControlResourceSet *bwp_dl_controlresourceset; + // NR_SearchSpace_t *bwp_dl_searchspace; + + scc->physCellId = CALLOC(1,sizeof(NR_PhysCellId_t)); + scc->downlinkConfigCommon = CALLOC(1,sizeof(struct NR_DownlinkConfigCommon)); + scc->downlinkConfigCommon->frequencyInfoDL = CALLOC(1,sizeof(struct NR_FrequencyInfoDL)); + scc->downlinkConfigCommon->initialDownlinkBWP = CALLOC(1,sizeof(struct NR_BWP_DownlinkCommon)); + scc->uplinkConfigCommon = CALLOC(1,sizeof(struct NR_UplinkConfigCommon)); + scc->uplinkConfigCommon->frequencyInfoUL = CALLOC(1,sizeof(struct NR_FrequencyInfoUL)); + scc->uplinkConfigCommon->initialUplinkBWP = CALLOC(1,sizeof(struct NR_BWP_UplinkCommon)); + //scc->supplementaryUplinkConfig = CALLOC(1,sizeof(struct NR_UplinkConfigCommon)); + scc->ssb_PositionsInBurst = CALLOC(1,sizeof(struct NR_ServingCellConfigCommon__ssb_PositionsInBurst)); + scc->ssb_periodicityServingCell = CALLOC(1,sizeof(long)); + // scc->rateMatchPatternToAddModList = CALLOC(1,sizeof(struct NR_ServingCellConfigCommon__rateMatchPatternToAddModList)); + // scc->rateMatchPatternToReleaseList = CALLOC(1,sizeof(struct NR_ServingCellConfigCommon__rateMatchPatternToReleaseList)); + scc->subcarrierSpacing = CALLOC(1,sizeof(NR_SubcarrierSpacing_t)); + scc->tdd_UL_DL_ConfigurationCommon = CALLOC(1,sizeof(struct NR_TDD_UL_DL_ConfigCommon)); + scc->tdd_UL_DL_ConfigurationCommon->pattern2 = CALLOC(1,sizeof(struct NR_TDD_UL_DL_Pattern)); + + scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB = CALLOC(1,sizeof(NR_ARFCN_ValueNR_t)); + + dl_frequencyBandList = CALLOC(1,sizeof(NR_FreqBandIndicatorNR_t)); + dl_scs_SpecificCarrierList = CALLOC(1,sizeof(struct NR_SCS_SpecificCarrier)); + + ASN_SEQUENCE_ADD(&scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list,dl_frequencyBandList); + ASN_SEQUENCE_ADD(&scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list,dl_scs_SpecificCarrierList); + // scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.cyclicPrefix = CALLOC(1,sizeof(long)); + scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon = CALLOC(1,sizeof(struct NR_SetupRelease_PDCCH_ConfigCommon)); + scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup = CALLOC(1,sizeof(struct NR_PDCCH_ConfigCommon)); + scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->controlResourceSetZero = CALLOC(1,sizeof(long)); + scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->searchSpaceZero = CALLOC(1,sizeof(long)); + // scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonControlResourceSet = CALLOC(1,sizeof(struct NR_ControlResourceSet)); + + // scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonSearchSpaceList = CALLOC(1,sizeof(struct NR_PDCCH_ConfigCommon__commonSearchSpaceList)); + // scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->searchSpaceSIB1 = CALLOC(1,sizeof(NR_SearchSpaceId_t)); + // scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->searchSpaceOtherSystemInformation = CALLOC(1,sizeof(NR_SearchSpaceId_t)); + // scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->pagingSearchSpace = CALLOC(1,sizeof(NR_SearchSpaceId_t)); + // scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->ra_SearchSpace = CALLOC(1,sizeof(NR_SearchSpaceId_t)); + scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon = CALLOC(1,sizeof(struct NR_SetupRelease_PDSCH_ConfigCommon)); + scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->present = NR_SetupRelease_PDSCH_ConfigCommon_PR_setup; + scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup = CALLOC(1,sizeof(struct NR_PDSCH_ConfigCommon)); + scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList = CALLOC(1,sizeof(struct NR_PDSCH_TimeDomainResourceAllocationList)); + // + for (int i=0;ik0 = CALLOC(1,sizeof(long)); + *bwp_dl_timedomainresourceallocation->k0=0; + ASN_SEQUENCE_ADD(&scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list, + bwp_dl_timedomainresourceallocation); + } + + ul_frequencyBandList = CALLOC(1,sizeof(NR_FreqBandIndicatorNR_t)); + scc->uplinkConfigCommon->frequencyInfoUL->frequencyBandList = CALLOC(1,sizeof(struct NR_MultiFrequencyBandListNR)); + ASN_SEQUENCE_ADD(&scc->uplinkConfigCommon->frequencyInfoUL->frequencyBandList->list,ul_frequencyBandList); + + scc->uplinkConfigCommon->frequencyInfoUL->absoluteFrequencyPointA = CALLOC(1,sizeof(NR_ARFCN_ValueNR_t)); + // scc->uplinkConfigCommon->frequencyInfoUL->additionalSpectrumEmission = CALLOC(1,sizeof(NR_AdditionalSpectrumEmission_t)); + scc->uplinkConfigCommon->frequencyInfoUL->p_Max = CALLOC(1,sizeof(NR_P_Max_t)); + // scc->uplinkConfigCommon->frequencyInfoUL->frequencyShift7p5khz = CALLOC(1,sizeof(long)); + + // scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.cyclicPrefix = CALLOC(1,sizeof(long)); + scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon = CALLOC(1,sizeof(NR_SetupRelease_RACH_ConfigCommon_t)); + scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup = CALLOC(1,sizeof(struct NR_RACH_ConfigCommon)); + // scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->totalNumberOfRA_Preambles = CALLOC(1,sizeof(long)); + scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->ssb_perRACH_OccasionAndCB_PreamblesPerSSB = CALLOC(1,sizeof(struct NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB)); + // scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->groupBconfigured = CALLOC(1,sizeof(struct NR_RACH_ConfigCommon__groupBconfigured)); + scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rsrp_ThresholdSSB = CALLOC(1,sizeof(NR_RSRP_Range_t)); + // scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rsrp_ThresholdSSB_SUL = CALLOC(1,sizeof(NR_RSRP_Range_t)); + scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg1_SubcarrierSpacing = CALLOC(1,sizeof(NR_SubcarrierSpacing_t)); + scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg3_transformPrecoder = CALLOC(1,sizeof(long)); + scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon = CALLOC(1,sizeof(NR_SetupRelease_PUSCH_ConfigCommon_t)); + scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->present = NR_SetupRelease_PUSCH_ConfigCommon_PR_setup; + scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup = CALLOC(1,sizeof(struct NR_PUSCH_ConfigCommon)); + + scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->groupHoppingEnabledTransformPrecoding = CALLOC(1,sizeof(long)); + + scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList = CALLOC(1,sizeof(struct NR_PUSCH_TimeDomainResourceAllocationList)); + scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->msg3_DeltaPreamble = CALLOC(1,sizeof(long)); + scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->p0_NominalWithGrant = CALLOC(1,sizeof(long)); + + scc->uplinkConfigCommon->initialUplinkBWP->pucch_ConfigCommon = CALLOC(1,sizeof(struct NR_SetupRelease_PUCCH_ConfigCommon)); + scc->uplinkConfigCommon->initialUplinkBWP->pucch_ConfigCommon->choice.setup = CALLOC(1,sizeof(struct NR_PUCCH_ConfigCommon)); + scc->uplinkConfigCommon->initialUplinkBWP->pucch_ConfigCommon->choice.setup->p0_nominal = CALLOC(1,sizeof(long)); + scc->uplinkConfigCommon->initialUplinkBWP->pucch_ConfigCommon->choice.setup->pucch_ResourceCommon = CALLOC(1,sizeof(long)); + scc->uplinkConfigCommon->initialUplinkBWP->pucch_ConfigCommon->choice.setup->hoppingId = CALLOC(1,sizeof(long)); + + // scc->ssb_PositionsInBurst->choice.shortBitmap.buf = MALLOC(1); + // scc->ssb_PositionsInBurst->choice.mediumBitmap.buf = MALLOC(1); + // scc->ssb_PositionsInBurst->choice.longBitmap.buf = MALLOC(8); + + ul_frequencyBandList = CALLOC(1,sizeof(NR_FreqBandIndicatorNR_t)); + ASN_SEQUENCE_ADD(&scc->uplinkConfigCommon->frequencyInfoUL->frequencyBandList->list,ul_frequencyBandList); + + ul_scs_SpecificCarrierList = CALLOC(1,sizeof(struct NR_SCS_SpecificCarrier)); + ASN_SEQUENCE_ADD(&scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list,ul_scs_SpecificCarrierList); + + for (int i=0;ik2 = CALLOC(1,sizeof(long)); + *pusch_configcommontimedomainresourceallocation->k2=0; + ASN_SEQUENCE_ADD(&scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list,pusch_configcommontimedomainresourceallocation); + } + //ratematchpattern = CALLOC(1,sizeof(struct NR_RateMatchPattern)); + //ratematchpattern->patternType.choice.bitmaps = CALLOC(1,sizeof(struct NR_RateMatchPattern__patternType__bitmaps)); + //ratematchpattern->patternType.choice.bitmaps->resourceBlocks.buf = MALLOC(35); + //ratematchpattern->patternType.choice.bitmaps->symbolsInResourceBlock.choice.oneSlot.buf = MALLOC(2); + //ratematchpattern->patternType.choice.bitmaps->symbolsInResourceBlock.choice.twoSlots.buf = MALLOC(4); + //ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern = CALLOC(1,sizeof(struct NR_RateMatchPattern__patternType__bitmaps__periodicityAndPattern)); + //ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n2.buf = MALLOC(1); + //ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n4.buf = MALLOC(1); + //ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n5.buf = MALLOC(1); + //ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n8.buf = MALLOC(1); + //ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n10.buf = MALLOC(2); + //ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n20.buf = MALLOC(3); + //ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n40.buf = MALLOC(5); + //ratematchpattern->subcarrierSpacing = CALLOC(1,sizeof(NR_SubcarrierSpacing_t)); + //ratematchpatternid = CALLOC(1,sizeof(NR_RateMatchPatternId_t)); + +} + + +void fix_scc(NR_ServingCellConfigCommon_t *scc,int ssbmap) { + + + int ssbmaplen = (int)scc->ssb_PositionsInBurst->present; + AssertFatal(ssbmaplen==NR_ServingCellConfigCommon__ssb_PositionsInBurst_PR_shortBitmap || ssbmaplen==NR_ServingCellConfigCommon__ssb_PositionsInBurst_PR_mediumBitmap || ssbmaplen==NR_ServingCellConfigCommon__ssb_PositionsInBurst_PR_longBitmap, "illegal ssbmaplen %d\n",ssbmaplen); + if(ssbmaplen==NR_ServingCellConfigCommon__ssb_PositionsInBurst_PR_shortBitmap){ + scc->ssb_PositionsInBurst->choice.shortBitmap.size = 1; + scc->ssb_PositionsInBurst->choice.shortBitmap.bits_unused = 4; + scc->ssb_PositionsInBurst->choice.shortBitmap.buf = CALLOC(1,1); + scc->ssb_PositionsInBurst->choice.shortBitmap.buf[0] = ssbmap; + }else if(ssbmaplen==NR_ServingCellConfigCommon__ssb_PositionsInBurst_PR_mediumBitmap){ + scc->ssb_PositionsInBurst->choice.mediumBitmap.size = 1; + scc->ssb_PositionsInBurst->choice.mediumBitmap.bits_unused = 0; + scc->ssb_PositionsInBurst->choice.mediumBitmap.buf = CALLOC(1,1); + scc->ssb_PositionsInBurst->choice.mediumBitmap.buf[0] = ssbmap; + }else { + scc->ssb_PositionsInBurst->choice.longBitmap.size = 8; + scc->ssb_PositionsInBurst->choice.longBitmap.bits_unused = 0; + scc->ssb_PositionsInBurst->choice.longBitmap.buf = CALLOC(1,8); + scc->ssb_PositionsInBurst->choice.longBitmap.buf[0] = 0xff; + scc->ssb_PositionsInBurst->choice.longBitmap.buf[1] = 0xff; + scc->ssb_PositionsInBurst->choice.longBitmap.buf[2] = 0xff; + scc->ssb_PositionsInBurst->choice.longBitmap.buf[3] = 0xff; + scc->ssb_PositionsInBurst->choice.longBitmap.buf[4] = 0xff; + scc->ssb_PositionsInBurst->choice.longBitmap.buf[5] = 0xff; + scc->ssb_PositionsInBurst->choice.longBitmap.buf[6] = 0xff; + scc->ssb_PositionsInBurst->choice.longBitmap.buf[7] = 0xff; + } + + // fix DL and UL Allocation lists + + for (int i=scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.count-1;i>=0;i--) { + if ((int)*scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[i]->k0==-1) { + free(scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[i]->k0); + asn_sequence_del(&scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list,i,1); + } + } + + for (int i=scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.count-1;i>=0;i--) { + if ((int)*scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[i]->k2==-1) { + free(scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[i]->k2); + asn_sequence_del(&scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list,i,1); + } + } + if ((int)scc->tdd_UL_DL_ConfigurationCommon->pattern2->dl_UL_TransmissionPeriodicity == -1) { + free(scc->tdd_UL_DL_ConfigurationCommon->pattern2); + } + + if ((int)*scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg1_SubcarrierSpacing == -1) + free(scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg1_SubcarrierSpacing); +} + void RCconfig_nr_flexran() { uint16_t i; @@ -96,87 +279,6 @@ void RCconfig_nr_flexran() uint16_t Nid_cell_tr = 0; uint32_t gnb_id = 0; - /* - * the only reason for all these variables is, that they are "hard-encoded" - * into the CCPARAMS_DESC macro and we need it for the Nid_cell variable ... - */ - char *frame_type, *DL_prefix_type, *UL_prefix_type, *SIB1_frequencyOffsetSSB, - *DL_SCS_SubcarrierSpacing, *DL_BWP_SubcarrierSpacing, *DL_BWP_prefix_type, - *UL_frequencyShift7p5khz, *UL_SCS_SubcarrierSpacing, *UL_BWP_SubcarrierSpacing, - *UL_BWP_prefix_type, *UL_timeAlignmentTimerCommon, - *ServingCellConfigCommon_n_TimingAdvanceOffset, - *NIA_SubcarrierSpacing, *referenceSubcarrierSpacing, *dl_UL_TransmissionPeriodicity, - *rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_choice, - *rach_groupBconfigured, *rach_messagePowerOffsetGroupB, - *prach_RootSequenceIndex_choice, *prach_msg1_SubcarrierSpacing, - *restrictedSetConfig, *msg3_transformPrecoding, *prach_msg1_FDM, - *powerRampingStep, *groupHoppingEnabledTransformPrecoding, - *PUSCH_TimeDomainResourceAllocation_mappingType, *pucch_GroupHopping, - *PDSCH_TimeDomainResourceAllocation_mappingType, *RateMatchPattern_patternType, - *symbolsInResourceBlock, *RateMatchPattern_subcarrierSpacing, *RateMatchPattern_mode, - *PDCCH_cce_REG_MappingType, *PDCCH_precoderGranularity, - *tci_PresentInDCI, *SearchSpace_monitoringSlotPeriodicityAndOffset_choice, - *SearchSpace_searchSpaceType, *ue_Specific__dci_Formats, - *RateMatchPatternLTE_CRS_subframeAllocation_choice; - - uint64_t downlink_frequency, ServingCellConfigCommon_ssb_PositionsInBurst_PR; - - int32_t nr_band, uplink_frequency_offset, N_RB_DL, nb_antenna_ports, - MIB_subCarrierSpacingCommon, MIB_ssb_SubcarrierOffset, MIB_dmrs_TypeA_Position, - pdcch_ConfigSIB1, SIB1_ssb_PeriodicityServingCell, SIB1_ss_PBCH_BlockPower, - absoluteFrequencySSB, DL_FreqBandIndicatorNR, - DL_absoluteFrequencyPointA, DL_offsetToCarrier, - DL_carrierBandwidth, DL_locationAndBandwidth, UL_FreqBandIndicatorNR, - UL_absoluteFrequencyPointA, UL_additionalSpectrumEmission, UL_p_Max, - UL_offsetToCarrier, UL_carrierBandwidth, - UL_locationAndBandwidth, ServingCellConfigCommon_ssb_periodicityServingCell, - ServingCellConfigCommon_dmrs_TypeA_Position, ServingCellConfigCommon_ss_PBCH_BlockPower, - nrofDownlinkSlots, nrofDownlinkSymbols, nrofUplinkSlots, nrofUplinkSymbols, - rach_totalNumberOfRA_Preambles, rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneEighth, - rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneFourth, - rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneHalf, - rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_one, - rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_two, - rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_four, - rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_eight, - rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_sixteen, - rach_ra_Msg3SizeGroupA, rach_numberOfRA_PreamblesGroupA, rach_ra_ContentionResolutionTimer, - rsrp_ThresholdSSB, rsrp_ThresholdSSB_SUL, prach_RootSequenceIndex_l839, - prach_RootSequenceIndex_l139, prach_ConfigurationIndex, prach_msg1_FrequencyStart, - zeroCorrelationZoneConfig, preambleReceivedTargetPower, preambleTransMax, - ra_ResponseWindow, msg3_DeltaPreamble, p0_NominalWithGrant, - PUSCH_TimeDomainResourceAllocation_k2, - PUSCH_TimeDomainResourceAllocation_startSymbolAndLength, - pucch_ResourceCommon, hoppingId, p0_nominal, PDSCH_TimeDomainResourceAllocation_k0, - PDSCH_TimeDomainResourceAllocation_startSymbolAndLength, - rateMatchPatternId, periodicityAndPattern, RateMatchPattern_controlResourceSet, - controlResourceSetZero, searchSpaceZero, - searchSpaceSIB1, searchSpaceOtherSystemInformation, pagingSearchSpace, - ra_SearchSpace, PDCCH_common_controlResourceSetId, - PDCCH_common_ControlResourceSet_duration, PDCCH_reg_BundleSize, PDCCH_interleaverSize, - PDCCH_shiftIndex, PDCCH_TCI_StateId, PDCCH_DMRS_ScramblingID, - SearchSpaceId, commonSearchSpaces_controlResourceSetId, - SearchSpace_monitoringSlotPeriodicityAndOffset_value, - SearchSpace_duration, - SearchSpace_nrofCandidates_aggregationLevel1, - SearchSpace_nrofCandidates_aggregationLevel2, - SearchSpace_nrofCandidates_aggregationLevel4, - SearchSpace_nrofCandidates_aggregationLevel8, - SearchSpace_nrofCandidates_aggregationLevel16, - Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel1, - Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel2, - Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel4, - Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel8, - Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel16, - Common_dci_Format2_3_monitoringPeriodicity, - Common_dci_Format2_3_nrofPDCCH_Candidates, - RateMatchPatternLTE_CRS_carrierFreqDL, - RateMatchPatternLTE_CRS_carrierBandwidthDL, - RateMatchPatternLTE_CRS_nrofCRS_Ports, - RateMatchPatternLTE_CRS_v_Shift, - RateMatchPatternLTE_CRS_radioframeAllocationPeriod, - RateMatchPatternLTE_CRS_radioframeAllocationOffset - ; /* get number of gNBs */ paramdef_t GNBSParams[] = GNBSPARAMS_DESC; @@ -187,15 +289,6 @@ void RCconfig_nr_flexran() paramdef_t GNBParams[] = GNBPARAMS_DESC; paramlist_def_t GNBParamList = {GNB_CONFIG_STRING_GNB_LIST, NULL, 0}; - /* for Nid_cell */ - checkedparam_t config_check_CCparams[] = NRCCPARAMS_CHECK; - paramdef_t CCsParams[] = NRCCPARAMS_DESC; - paramlist_def_t CCsParamList = {GNB_CONFIG_STRING_COMPONENT_CARRIERS, NULL, 0}; - /* map parameter checking array instances to parameter definition array instances */ - for (int I = 0; I < (sizeof(CCsParams) / sizeof(paramdef_t)); I++) { - CCsParams[I].chkPptr = &(config_check_CCparams[I]); - } - paramdef_t flexranParams[] = FLEXRANPARAMS_DESC; config_get(flexranParams, sizeof(flexranParams)/sizeof(paramdef_t), CONFIG_STRING_NETWORK_CONTROLLER_CONFIG); @@ -239,12 +332,6 @@ void RCconfig_nr_flexran() /* cell ID */ sprintf(aprefix, "%s.[%i]", GNB_CONFIG_STRING_GNB_LIST, i); - config_getlist(&CCsParamList, NULL, 0, aprefix); - if (CCsParamList.numelt > 0) { - sprintf(aprefix, "%s.[%i].%s.[%i]", GNB_CONFIG_STRING_GNB_LIST, i, GNB_CONFIG_STRING_COMPONENT_CARRIERS, 0); - config_get(CCsParams, sizeof(CCsParams)/sizeof(paramdef_t), aprefix); - Nid_cell_tr = (uint16_t) Nid_cell; - } RC.flexran[i]->mod_id = i; RC.flexran[i]->agent_id = (((uint64_t)i) << 48) | (((uint64_t)gnb_id) << 16) | ((uint64_t)Nid_cell_tr); @@ -268,7 +355,6 @@ void RCconfig_NR_L1(void) { RC.gNB = (PHY_VARS_gNB ***)malloc((1+NUMBER_OF_gNB_MAX)*sizeof(PHY_VARS_gNB**)); LOG_I(NR_PHY,"RC.gNB = %p\n",RC.gNB); memset(RC.gNB,0,(1+NUMBER_OF_gNB_MAX)*sizeof(PHY_VARS_gNB**)); - RC.nb_nr_L1_CC = malloc((1+RC.nb_nr_L1_inst)*sizeof(int)); } config_getlist( &L1_ParamList,L1_Params,sizeof(L1_Params)/sizeof(paramdef_t), NULL); @@ -276,35 +362,25 @@ void RCconfig_NR_L1(void) { if (L1_ParamList.numelt > 0) { for (j = 0; j < RC.nb_nr_L1_inst; j++) { - RC.nb_nr_L1_CC[j] = *(L1_ParamList.paramarray[j][L1_CC_IDX].uptr); if (RC.gNB[j] == NULL) { - RC.gNB[j] = (PHY_VARS_gNB **)malloc((1+MAX_NUM_CCs)*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,(1+MAX_NUM_CCs)*sizeof(PHY_VARS_gNB*)); - } - - for (i=0;iMod_id = j; - RC.gNB[j][i]->CC_id = i; - } + memset(RC.gNB[j],0,sizeof(PHY_VARS_gNB)); + RC.gNB[j]->Mod_id = j; } if(strcmp(*(L1_ParamList.paramarray[j][L1_TRANSPORT_N_PREFERENCE_IDX].strptr), "local_mac") == 0) { //sf_ahead = 2; // Need 4 subframe gap between RX and TX }else if (strcmp(*(L1_ParamList.paramarray[j][L1_TRANSPORT_N_PREFERENCE_IDX].strptr), "nfapi") == 0) { - RC.gNB[j][0]->eth_params_n.local_if_name = strdup(*(L1_ParamList.paramarray[j][L1_LOCAL_N_IF_NAME_IDX].strptr)); - RC.gNB[j][0]->eth_params_n.my_addr = strdup(*(L1_ParamList.paramarray[j][L1_LOCAL_N_ADDRESS_IDX].strptr)); - RC.gNB[j][0]->eth_params_n.remote_addr = strdup(*(L1_ParamList.paramarray[j][L1_REMOTE_N_ADDRESS_IDX].strptr)); - RC.gNB[j][0]->eth_params_n.my_portc = *(L1_ParamList.paramarray[j][L1_LOCAL_N_PORTC_IDX].iptr); - RC.gNB[j][0]->eth_params_n.remote_portc = *(L1_ParamList.paramarray[j][L1_REMOTE_N_PORTC_IDX].iptr); - RC.gNB[j][0]->eth_params_n.my_portd = *(L1_ParamList.paramarray[j][L1_LOCAL_N_PORTD_IDX].iptr); - RC.gNB[j][0]->eth_params_n.remote_portd = *(L1_ParamList.paramarray[j][L1_REMOTE_N_PORTD_IDX].iptr); - RC.gNB[j][0]->eth_params_n.transp_preference = ETH_UDP_MODE; + RC.gNB[j]->eth_params_n.local_if_name = strdup(*(L1_ParamList.paramarray[j][L1_LOCAL_N_IF_NAME_IDX].strptr)); + RC.gNB[j]->eth_params_n.my_addr = strdup(*(L1_ParamList.paramarray[j][L1_LOCAL_N_ADDRESS_IDX].strptr)); + RC.gNB[j]->eth_params_n.remote_addr = strdup(*(L1_ParamList.paramarray[j][L1_REMOTE_N_ADDRESS_IDX].strptr)); + RC.gNB[j]->eth_params_n.my_portc = *(L1_ParamList.paramarray[j][L1_LOCAL_N_PORTC_IDX].iptr); + RC.gNB[j]->eth_params_n.remote_portc = *(L1_ParamList.paramarray[j][L1_REMOTE_N_PORTC_IDX].iptr); + RC.gNB[j]->eth_params_n.my_portd = *(L1_ParamList.paramarray[j][L1_LOCAL_N_PORTD_IDX].iptr); + RC.gNB[j]->eth_params_n.remote_portd = *(L1_ParamList.paramarray[j][L1_REMOTE_N_PORTD_IDX].iptr); + RC.gNB[j]->eth_params_n.transp_preference = ETH_UDP_MODE; //sf_ahead = 2; // Cannot cope with 4 subframes betweem RX and TX - set it to 2 @@ -322,7 +398,7 @@ void RCconfig_NR_L1(void) { mac_top_init_gNB(); - configure_nfapi_pnf(RC.gNB[j][0]->eth_params_n.remote_addr, RC.gNB[j][0]->eth_params_n.remote_portc, RC.gNB[j][0]->eth_params_n.my_addr, RC.gNB[j][0]->eth_params_n.my_portd, RC.gNB[j][0]->eth_params_n .remote_portd); + configure_nfapi_pnf(RC.gNB[j]->eth_params_n.remote_addr, RC.gNB[j]->eth_params_n.remote_portc, RC.gNB[j]->eth_params_n.my_addr, RC.gNB[j]->eth_params_n.my_portd, RC.gNB[j]->eth_params_n .remote_portd); }else { // other midhaul } }// for (j = 0; j < RC.nb_nr_L1_inst; j++) @@ -335,26 +411,13 @@ void RCconfig_NR_L1(void) { j = 0; - RC.nb_nr_L1_CC = malloc((1+RC.nb_nr_L1_inst)*sizeof(int)); // DJP - 1 lot then??? - - RC.nb_nr_L1_CC[j]=1; // DJP - hmmm if (RC.gNB[j] == NULL) { - RC.gNB[j] = (PHY_VARS_gNB **)malloc((1+MAX_NUM_CCs)*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)); LOG_I(PHY,"RC.gNB[%d] = %p\n",j,RC.gNB[j]); - memset(RC.gNB[j],0,(1+MAX_NUM_CCs)*sizeof(PHY_VARS_gNB***)); - } - - for (i=0;iMod_id = j; - RC.gNB[j][i]->CC_id = i; - } - } // END for (i=0;iMod_id = j; + } } } @@ -423,218 +486,26 @@ void RCconfig_nr_macrlc() { void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) { int num_gnbs = 0; - int num_component_carriers = 0; - int j,k = 0; + char aprefix[MAX_OPTNAME_SIZE*2 + 8]; int32_t gnb_id = 0; - - int nb_cc = 0; - char* frame_type = NULL; - char* DL_prefix_type = NULL; - char* UL_prefix_type = NULL; - - int32_t nr_band = 0; - uint64_t downlink_frequency = 0; - int32_t uplink_frequency_offset = 0; - int32_t Nid_cell = 0; - int32_t N_RB_DL = 0; - int32_t nb_antenna_ports = 0; - - ///NR - //MIB - int32_t MIB_subCarrierSpacingCommon = 0; - int32_t MIB_ssb_SubcarrierOffset = 0; - int32_t MIB_dmrs_TypeA_Position = 0; - int32_t pdcch_ConfigSIB1 = 0; - - //SIB1 - char* SIB1_frequencyOffsetSSB = NULL; - int32_t SIB1_ssb_PeriodicityServingCell = 0; - int32_t SIB1_ss_PBCH_BlockPower = 0; - //DownlinkConfigCommon - //NR FrequencyInfoDL - int32_t absoluteFrequencySSB = 0; - int32_t DL_FreqBandIndicatorNR = 0; - int32_t DL_absoluteFrequencyPointA = 0; - - //NR DL SCS-SpecificCarrier - int32_t DL_offsetToCarrier = 0; - char* DL_SCS_SubcarrierSpacing = 0; - int32_t DL_carrierBandwidth = 0; - - // NR BWP-DownlinkCommon - int32_t DL_locationAndBandwidth = 0; - char* DL_BWP_SubcarrierSpacing = 0; - char* DL_BWP_prefix_type = NULL; - - //NR FrequencyInfoUL - int32_t UL_FreqBandIndicatorNR = 0; - int32_t UL_absoluteFrequencyPointA = 0; - int32_t UL_additionalSpectrumEmission = 0; - int32_t UL_p_Max = 0; - char* UL_frequencyShift7p5khz = 0; - - //NR UL SCS-SpecificCarrier - int32_t UL_offsetToCarrier = 0; - char* UL_SCS_SubcarrierSpacing = 0; - int32_t UL_carrierBandwidth = 0; - - // NR BWP-UplinkCommon - int32_t UL_locationAndBandwidth = 0; - char* UL_BWP_SubcarrierSpacing = 0; - char* UL_BWP_prefix_type = NULL; - char* UL_timeAlignmentTimerCommon = 0; - - char* ServingCellConfigCommon_n_TimingAdvanceOffset = 0; - uint64_t ServingCellConfigCommon_ssb_PositionsInBurst_PR = 0; - int32_t ServingCellConfigCommon_ssb_periodicityServingCell = 0; - int32_t ServingCellConfigCommon_dmrs_TypeA_Position = 0; - char* NIA_SubcarrierSpacing = 0; - int32_t ServingCellConfigCommon_ss_PBCH_BlockPower = 0; - - //NR TDD-UL-DL-ConfigCommon - char* referenceSubcarrierSpacing = 0; - char* dl_UL_TransmissionPeriodicity = 0; - int32_t nrofDownlinkSlots = 0; - int32_t nrofDownlinkSymbols = 0; - int32_t nrofUplinkSlots = 0; - int32_t nrofUplinkSymbols = 0; - - //NR RACH-ConfigCommon - int32_t rach_totalNumberOfRA_Preambles = 0; - char* rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_choice = 0; - int32_t rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneEighth = 0; - int32_t rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneFourth = 0; - int32_t rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneHalf = 0; - int32_t rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_one = 0; - int32_t rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_two = 0; - int32_t rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_four = 0; - int32_t rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_eight = 0; - int32_t rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_sixteen = 0; - char* rach_groupBconfigured = NULL; - int32_t rach_ra_Msg3SizeGroupA = 0; - char* rach_messagePowerOffsetGroupB = NULL; - int32_t rach_numberOfRA_PreamblesGroupA = 0; - int32_t rach_ra_ContentionResolutionTimer = 0; - int32_t rsrp_ThresholdSSB = 0; - int32_t rsrp_ThresholdSSB_SUL = 0; - char* prach_RootSequenceIndex_choice = NULL; - int32_t prach_RootSequenceIndex_l839 = 0; - int32_t prach_RootSequenceIndex_l139 = 0; - char* prach_msg1_SubcarrierSpacing = NULL; - char* restrictedSetConfig = NULL; - char* msg3_transformPrecoding = NULL; - //ssb-perRACH-OccasionAndCB-PreamblesPerSSB not sure - - //NR RACH-ConfigGeneric - int32_t prach_ConfigurationIndex = 0; - char* prach_msg1_FDM = NULL; - int32_t prach_msg1_FrequencyStart = 0; - int32_t zeroCorrelationZoneConfig = 0; - int32_t preambleReceivedTargetPower = 0; - int32_t preambleTransMax = 0; - char* powerRampingStep = NULL; - int32_t ra_ResponseWindow = 0; - - //PUSCH-ConfigCommon - char* groupHoppingEnabledTransformPrecoding = NULL; - int32_t msg3_DeltaPreamble = 0; - int32_t p0_NominalWithGrant = 0; - - ///PUSCH-TimeDomainResourceAllocation - int32_t PUSCH_TimeDomainResourceAllocation_k2 = 0; - char* PUSCH_TimeDomainResourceAllocation_mappingType = NULL; - int32_t PUSCH_TimeDomainResourceAllocation_startSymbolAndLength = 0; - - //PUCCH-ConfigCommon - int32_t pucch_ResourceCommon = 0; - char* pucch_GroupHopping = NULL; - int32_t hoppingId = 0; - int32_t p0_nominal = 0; - - //PDSCH-ConfigCOmmon - //PDSCH-TimeDomainResourceAllocation - int32_t PDSCH_TimeDomainResourceAllocation_k0 = 0; - char* PDSCH_TimeDomainResourceAllocation_mappingType = NULL; - int32_t PDSCH_TimeDomainResourceAllocation_startSymbolAndLength = 0; - - //RateMatchPattern is used to configure one rate matching pattern for PDSCH - int32_t rateMatchPatternId = 0; - char* RateMatchPattern_patternType = NULL; - char* symbolsInResourceBlock = NULL; - int32_t periodicityAndPattern = 0; - int32_t RateMatchPattern_controlResourceSet = 0; - char* RateMatchPattern_subcarrierSpacing = NULL; - char* RateMatchPattern_mode = NULL; - - //PDCCH-ConfigCommon - int32_t controlResourceSetZero = 0; - int32_t searchSpaceZero = 0; - int32_t searchSpaceSIB1 = 0; - int32_t searchSpaceOtherSystemInformation = 0; - int32_t pagingSearchSpace = 0; - int32_t ra_SearchSpace = 0; - - //NR PDCCH-ConfigCommon commonControlResourcesSets - int32_t PDCCH_common_controlResourceSetId = 0; - int32_t PDCCH_common_ControlResourceSet_duration = 0; - char* PDCCH_cce_REG_MappingType = NULL; - int32_t PDCCH_reg_BundleSize = 0; - int32_t PDCCH_interleaverSize = 0; - int32_t PDCCH_shiftIndex = 0; - char* PDCCH_precoderGranularity = NULL; - int32_t PDCCH_TCI_StateId = 0; - char* tci_PresentInDCI = NULL; - int32_t PDCCH_DMRS_ScramblingID = 0; - - //NR PDCCH-ConfigCommon commonSearchSpaces - int32_t SearchSpaceId = 0; - int32_t commonSearchSpaces_controlResourceSetId = 0; - char* SearchSpace_monitoringSlotPeriodicityAndOffset_choice = NULL; - int32_t SearchSpace_monitoringSlotPeriodicityAndOffset_value = 0; - int32_t SearchSpace_duration = 0; - int32_t SearchSpace_nrofCandidates_aggregationLevel1 = 0; - int32_t SearchSpace_nrofCandidates_aggregationLevel2 = 0; - int32_t SearchSpace_nrofCandidates_aggregationLevel4 = 0; - int32_t SearchSpace_nrofCandidates_aggregationLevel8 = 0; - int32_t SearchSpace_nrofCandidates_aggregationLevel16 = 0; - char* SearchSpace_searchSpaceType = NULL; - int32_t Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel1 = 0; - int32_t Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel2 = 0; - int32_t Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel4 = 0; - int32_t Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel8 = 0; - int32_t Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel16 = 0; - int32_t Common_dci_Format2_3_monitoringPeriodicity = 0; - int32_t Common_dci_Format2_3_nrofPDCCH_Candidates = 0; - char* ue_Specific__dci_Formats = NULL; - //NR RateMatchPatternLTE-CRS - int32_t RateMatchPatternLTE_CRS_carrierFreqDL = 0; - int32_t RateMatchPatternLTE_CRS_carrierBandwidthDL = 0; - int32_t RateMatchPatternLTE_CRS_nrofCRS_Ports = 0; - int32_t RateMatchPatternLTE_CRS_v_Shift = 0; - int32_t RateMatchPatternLTE_CRS_radioframeAllocationPeriod = 0; - int32_t RateMatchPatternLTE_CRS_radioframeAllocationOffset = 0; - char* RateMatchPatternLTE_CRS_subframeAllocation_choice = NULL; - - - /*int32_t srb1_timer_poll_retransmit = 0; - int32_t srb1_timer_reordering = 0; - int32_t srb1_timer_status_prohibit = 0; - int32_t srb1_poll_pdu = 0; - int32_t srb1_poll_byte = 0; - int32_t srb1_max_retx_threshold = 0;*/ - - //int32_t my_int; - + int k; paramdef_t GNBSParams[] = GNBSPARAMS_DESC; ////////// Identification parameters paramdef_t GNBParams[] = GNBPARAMS_DESC; paramlist_def_t GNBParamList = {GNB_CONFIG_STRING_GNB_LIST,NULL,0}; - ////////// Physical parameters - //checkedparam_t config_check_CCparams[] = NRCCPARAMS_CHECK; - paramdef_t CCsParams[] = NRCCPARAMS_DESC; - paramlist_def_t CCsParamList = {GNB_CONFIG_STRING_COMPONENT_CARRIERS,NULL,0}; - - //paramdef_t SRB1Params[] = SRB1PARAMS_DESC; + NR_ServingCellConfigCommon_t *scc = calloc(1,sizeof(NR_ServingCellConfigCommon_t)); + int ssb_SubcarrierOffset = 0; + int ssb_bitmap=0xff; + memset((void*)scc,0,sizeof(NR_ServingCellConfigCommon_t)); + prepare_scc(scc); + paramdef_t SCCsParams[] = SCCPARAMS_DESC(scc); + paramlist_def_t SCCsParamList = {GNB_CONFIG_STRING_SERVINGCELLCONFIGCOMMON, NULL, 0}; + paramdef_t SSBsParams[] = SSBPARAMS_DESC; + paramlist_def_t SSBsParamList = {GNB_CONFIG_STRING_SSBSUBCARRIEROFFSET, NULL, 0}; + ////////// Physical parameters + + + printf("SCCsParams[15].i64ptr %p (%p)\n",SCCsParams[15].i64ptr,scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[0]->k0); /* get global parameters, defined outside any section in the config file */ @@ -642,45 +513,48 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) { num_gnbs = GNBSParams[GNB_ACTIVE_GNBS_IDX].numelt; AssertFatal (i0) { + + + // Output a list of all gNBs. ////////// Identification parameters config_getlist( &GNBParamList,GNBParams,sizeof(GNBParams)/sizeof(paramdef_t),NULL); - + if (GNBParamList.paramarray[i][GNB_GNB_ID_IDX].uptr == NULL) { - // Calculate a default gNB ID - # if defined(ENABLE_USE_MME) - uint32_t hash; - hash = s1ap_generate_eNB_id (); - gnb_id = i + (hash & 0xFFFF8); - # else - gnb_id = i; - # endif + // Calculate a default gNB ID +# if defined(ENABLE_USE_MME) + uint32_t hash; + hash = s1ap_generate_eNB_id (); + gnb_id = i + (hash & 0xFFFF8); +# else + gnb_id = i; +# endif } else { - gnb_id = *(GNBParamList.paramarray[i][GNB_GNB_ID_IDX].uptr); + gnb_id = *(GNBParamList.paramarray[i][GNB_GNB_ID_IDX].uptr); } - printf("NRRRC %d: Southbound Transport %s\n",i,*(GNBParamList.paramarray[i][GNB_TRANSPORT_S_PREFERENCE_IDX].strptr)); + sprintf(aprefix, "%s.[%i]", GNB_CONFIG_STRING_GNB_LIST, 0); + config_getlist(&SSBsParamList, NULL, 0, aprefix); + if (SSBsParamList.numelt > 0) config_get(SSBsParams,sizeof(SSBsParams)/sizeof(paramdef_t),aprefix); + + config_getlist(&SCCsParamList, NULL, 0, aprefix); + if (SCCsParamList.numelt > 0) { + sprintf(aprefix, "%s.[%i].%s.[%i]", GNB_CONFIG_STRING_GNB_LIST,0,GNB_CONFIG_STRING_SERVINGCELLCONFIGCOMMON, 0); + config_get( SCCsParams,sizeof(SCCsParams)/sizeof(paramdef_t),aprefix); + LOG_I(RRC,"Read in ServingCellConfigCommon (PhysCellId %d, ABSFREQSSB %d, DLBand %d, ABSFREQPOINTA %d, DLBW %d\n", + (int)*scc->physCellId, + (int)*scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB, + (int)*scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0], + (int)scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA, + (int)scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->carrierBandwidth); + fix_scc(scc,ssb_bitmap); + + } + printf("NRRRC %d: Southbound Transport %s\n",i,*(GNBParamList.paramarray[i][GNB_TRANSPORT_S_PREFERENCE_IDX].strptr)); + if (strcmp(*(GNBParamList.paramarray[i][GNB_TRANSPORT_S_PREFERENCE_IDX].strptr), "local_mac") == 0) { - + } else if (strcmp(*(GNBParamList.paramarray[i][GNB_TRANSPORT_S_PREFERENCE_IDX].strptr), "cudu") == 0) { rrc->eth_params_s.local_if_name = strdup(*(GNBParamList.paramarray[i][GNB_LOCAL_S_IF_NAME_IDX].strptr)); rrc->eth_params_s.my_addr = strdup(*(GNBParamList.paramarray[i][GNB_LOCAL_S_ADDRESS_IDX].strptr)); @@ -692,15 +566,15 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) { rrc->eth_params_s.transp_preference = ETH_UDP_MODE; } else { // other midhaul } - + // search if in active list - + for (k=0; k 0) { - - char ccspath[MAX_OPTNAME_SIZE*2 + 16]; - - for (j = 0; j < CCsParamList.numelt ;j++) { - - sprintf(ccspath,"%s.%s.[%i]",gnbpath,GNB_CONFIG_STRING_COMPONENT_CARRIERS,j); - config_get( CCsParams,sizeof(CCsParams)/sizeof(paramdef_t),ccspath); - - nb_cc++; - - // NRRRC_CONFIGURATION_REQ (msg_p).tdd_config[j] = tdd_config; - // AssertFatal (tdd_config <= TDD_Config__subframeAssignment_sa6, - // "Failed to parse gNB configuration file %s, gnb %d illegal tdd_config %d (should be 0-%d)!", - // RC.config_file_name, i, tdd_config, TDD_Config__subframeAssignment_sa6); - - // NRRRC_CONFIGURATION_REQ (msg_p).tdd_config_s[j] = tdd_config_s; - // AssertFatal (tdd_config_s <= TDD_Config__specialSubframePatterns_ssp8, - // "Failed to parse gNB configuration file %s, gnb %d illegal tdd_config_s %d (should be 0-%d)!", - // RC.config_file_name, i, tdd_config_s, TDD_Config__specialSubframePatterns_ssp8); - - if (!DL_prefix_type){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d define %s: NORMAL,EXTENDED!\n", - RC.config_file_name, i, GNB_CONFIG_STRING_DL_PREFIX_TYPE); - }else if (strcmp(DL_prefix_type, "NORMAL") == 0) { - NRRRC_CONFIGURATION_REQ (msg_p).DL_prefix_type[j] = NORMAL; - }else if (strcmp(DL_prefix_type, "EXTENDED") == 0) { - NRRRC_CONFIGURATION_REQ (msg_p).DL_prefix_type[j] = EXTENDED; - }else { - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for DL_prefix_type choice: NORMAL or EXTENDED !\n", - RC.config_file_name, i, DL_prefix_type); - } - - if (!UL_prefix_type){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d define %s: NORMAL,EXTENDED!\n", - RC.config_file_name, i, GNB_CONFIG_STRING_UL_PREFIX_TYPE); - }else if (strcmp(UL_prefix_type, "NORMAL") == 0) { - NRRRC_CONFIGURATION_REQ (msg_p).UL_prefix_type[j] = NORMAL; - }else if (strcmp(UL_prefix_type, "EXTENDED") == 0) { - NRRRC_CONFIGURATION_REQ (msg_p).UL_prefix_type[j] = EXTENDED; - }else { - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for UL_prefix_type choice: NORMAL or EXTENDED !\n", - RC.config_file_name, i, UL_prefix_type); - } - - NRRRC_CONFIGURATION_REQ (msg_p).nr_band[j] = nr_band; - NRRRC_CONFIGURATION_REQ (msg_p).downlink_frequency[j] = (uint64_t) downlink_frequency; - NRRRC_CONFIGURATION_REQ (msg_p).uplink_frequency_offset[j] = (unsigned int) uplink_frequency_offset; - NRRRC_CONFIGURATION_REQ (msg_p).Nid_cell[j]= Nid_cell; - - if (Nid_cell>503) { - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for Nid_cell choice: 0...503 !\n", - RC.config_file_name, i, Nid_cell); - } - - NRRRC_CONFIGURATION_REQ (msg_p).N_RB_DL[j]= N_RB_DL; - if(N_RB_DL == 217) sf_ahead = 2; - else if(N_RB_DL == 106) sf_ahead = 4; - else AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for N_RB_DL choice: 106, 217 !\n", - RC.config_file_name, i, N_RB_DL); - - /* - if ((N_RB_DL!=6) && (N_RB_DL!=15) && (N_RB_DL!=25) && (N_RB_DL!=50) && (N_RB_DL!=75) && (N_RB_DL!=100)) { - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for N_RB_DL choice: 6,15,25,50,75,100 !\n", - RC.config_file_name, i, N_RB_DL); - } - */ - - if (strcmp(frame_type, "FDD") == 0) { - NRRRC_CONFIGURATION_REQ (msg_p).frame_type[j] = FDD; - }else if (strcmp(frame_type, "TDD") == 0) { - NRRRC_CONFIGURATION_REQ (msg_p).frame_type[j] = TDD; - }else { - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for frame_type choice: FDD or TDD !\n", - RC.config_file_name, i, frame_type); - } - - if (!DL_prefix_type){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d define %s: NORMAL,EXTENDED!\n", - RC.config_file_name, i, GNB_CONFIG_STRING_DL_PREFIX_TYPE); - }else if (strcmp(DL_prefix_type, "NORMAL") == 0) { - NRRRC_CONFIGURATION_REQ (msg_p).DL_prefix_type[j] = NORMAL; - }else if (strcmp(DL_prefix_type, "EXTENDED") == 0) { - NRRRC_CONFIGURATION_REQ (msg_p).DL_prefix_type[j] = EXTENDED; - }else { - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for DL_prefix_type choice: NORMAL or EXTENDED !\n", - RC.config_file_name, i, DL_prefix_type); - } - - if (!UL_prefix_type){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d define %s: NORMAL,EXTENDED!\n", - RC.config_file_name, i, GNB_CONFIG_STRING_UL_PREFIX_TYPE); - }else if (strcmp(UL_prefix_type, "NORMAL") == 0) { - NRRRC_CONFIGURATION_REQ (msg_p).UL_prefix_type[j] = NORMAL; - }else if (strcmp(UL_prefix_type, "EXTENDED") == 0) { - NRRRC_CONFIGURATION_REQ (msg_p).UL_prefix_type[j] = EXTENDED; - }else { - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for UL_prefix_type choice: NORMAL or EXTENDED !\n", - RC.config_file_name, i, UL_prefix_type); - } - - NRRRC_CONFIGURATION_REQ (msg_p).nr_band[j] = nr_band; - NRRRC_CONFIGURATION_REQ (msg_p).downlink_frequency[j] = (uint64_t) downlink_frequency; - NRRRC_CONFIGURATION_REQ (msg_p).uplink_frequency_offset[j] = (unsigned int) uplink_frequency_offset; - - if (config_check_band_frequencies(j, - NRRRC_CONFIGURATION_REQ (msg_p).nr_band[j], - NRRRC_CONFIGURATION_REQ (msg_p).downlink_frequency[j], - NRRRC_CONFIGURATION_REQ (msg_p).uplink_frequency_offset[j], - NRRRC_CONFIGURATION_REQ (msg_p).frame_type[j])) { - AssertFatal(0, "error calling enb_check_band_frequencies\n"); - } - - if ((nb_antenna_ports <1) || (nb_antenna_ports > 2)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, enb %d unknown value \"%d\" for nb_antenna_ports choice: 1..2 !\n", - RC.config_file_name, i, nb_antenna_ports); - } - NRRRC_CONFIGURATION_REQ (msg_p).nb_antenna_ports[j] = nb_antenna_ports; - - - //////////////////////////////////////////////////////////////////////////////// - //---------------------------NR--------Configuration--------------------------// - //////////////////////////////////////////////////////////////////////////////// - /////////////////////////////////MIB/////////////////////////////// - NRRRC_CONFIGURATION_REQ (msg_p).MIB_subCarrierSpacingCommon[j] = MIB_subCarrierSpacingCommon; - if ((MIB_subCarrierSpacingCommon !=15) && (MIB_subCarrierSpacingCommon !=30) && (MIB_subCarrierSpacingCommon !=60) && (MIB_subCarrierSpacingCommon !=120)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for MIB_subCarrierSpacingCommon choice: 15,30,60,120 !\n", - RC.config_file_name, i, MIB_subCarrierSpacingCommon); - } - - NRRRC_CONFIGURATION_REQ (msg_p).MIB_ssb_SubcarrierOffset[j] = MIB_ssb_SubcarrierOffset; - if ((MIB_ssb_SubcarrierOffset <0) || (MIB_ssb_SubcarrierOffset > 15)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for MIB_ssb_SubcarrierOffset choice: 1..23 !\n", - RC.config_file_name, i, MIB_ssb_SubcarrierOffset); - } - - NRRRC_CONFIGURATION_REQ (msg_p).MIB_dmrs_TypeA_Position[j] = MIB_dmrs_TypeA_Position; - if ((MIB_dmrs_TypeA_Position !=2) && (MIB_dmrs_TypeA_Position !=3)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for MIB_dmrs_TypeA_Position choice:2,3 !\n", - RC.config_file_name, i, MIB_dmrs_TypeA_Position); - } - - NRRRC_CONFIGURATION_REQ (msg_p).pdcch_ConfigSIB1[j] = pdcch_ConfigSIB1; - if ((pdcch_ConfigSIB1 <0) || (pdcch_ConfigSIB1 > 255)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for pdcch_ConfigSIB1 choice: 0..3279165 !\n", - RC.config_file_name, i, pdcch_ConfigSIB1); - } - - ////////////////////////////////SIB1////////////////////////////// - - if (strcmp(SIB1_frequencyOffsetSSB , "khz-5") == 0) { - NRRRC_CONFIGURATION_REQ (msg_p).SIB1_frequencyOffsetSSB[j] = -5; - }else if (strcmp(SIB1_frequencyOffsetSSB , "khz5") == 0) { - NRRRC_CONFIGURATION_REQ (msg_p).SIB1_frequencyOffsetSSB[j] = 5; - }else { - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for SIB1_frequencyOffsetSSB !\n", - RC.config_file_name, i, SIB1_frequencyOffsetSSB); - } - - NRRRC_CONFIGURATION_REQ (msg_p).SIB1_ssb_PeriodicityServingCell[j] = SIB1_ssb_PeriodicityServingCell; - if ((SIB1_ssb_PeriodicityServingCell !=5) && - (SIB1_ssb_PeriodicityServingCell !=10) && - (SIB1_ssb_PeriodicityServingCell !=20) && - (SIB1_ssb_PeriodicityServingCell !=40) && - (SIB1_ssb_PeriodicityServingCell !=80) && - (SIB1_ssb_PeriodicityServingCell !=160) ){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for SIB1_ssb_PeriodicityServingCell choice: 5,10,20,40,80,160 !\n", - RC.config_file_name, i, SIB1_ssb_PeriodicityServingCell); - } - - NRRRC_CONFIGURATION_REQ (msg_p).SIB1_ss_PBCH_BlockPower[j] = SIB1_ss_PBCH_BlockPower; - if ((SIB1_ss_PBCH_BlockPower < -60) || (SIB1_ss_PBCH_BlockPower > 50)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for SIB1_ss_PBCH_BlockPower choice: -60..50 !\n", - RC.config_file_name, i, SIB1_ss_PBCH_BlockPower); - } - - ////////////////////////////////NR FrequencyInfoDL////////////////////////////// - NRRRC_CONFIGURATION_REQ (msg_p).absoluteFrequencySSB[j] = absoluteFrequencySSB; - if ((absoluteFrequencySSB <0) || (absoluteFrequencySSB > 3279165)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for absoluteFrequencySSB choice: 0..3279165 !\n", - RC.config_file_name, i, absoluteFrequencySSB); - } - - NRRRC_CONFIGURATION_REQ (msg_p).DL_FreqBandIndicatorNR[j] = DL_FreqBandIndicatorNR; - if ((DL_FreqBandIndicatorNR <1) || (DL_FreqBandIndicatorNR > 1024)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for DL_FreqBandIndicatorNR choice: 1..1024 !\n", - RC.config_file_name, i, DL_FreqBandIndicatorNR); - } - - NRRRC_CONFIGURATION_REQ (msg_p).DL_absoluteFrequencyPointA[j] = DL_absoluteFrequencyPointA; - if ((DL_absoluteFrequencyPointA <0) || (DL_absoluteFrequencyPointA > 3279165)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for DL_absoluteFrequencyPointA choice: 0..3279165 !\n", - RC.config_file_name, i, DL_absoluteFrequencyPointA); - } - - - /////////////////////////////////NR DL SCS-SpecificCarrier/////////////////////////// - NRRRC_CONFIGURATION_REQ (msg_p).DL_offsetToCarrier[j] = DL_offsetToCarrier; - if ((DL_offsetToCarrier <0) || (DL_offsetToCarrier > 2199)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for DL_offsetToCarrier choice: 0..11 !\n", - RC.config_file_name, i, DL_offsetToCarrier); - } - - if (strcmp(DL_SCS_SubcarrierSpacing,"kHz15")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).DL_SCS_SubcarrierSpacing[j] = NR_SubcarrierSpacing_kHz15; - }else if (strcmp(DL_SCS_SubcarrierSpacing,"kHz30")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).DL_SCS_SubcarrierSpacing[j] = NR_SubcarrierSpacing_kHz30; - }else if (strcmp(DL_SCS_SubcarrierSpacing,"kHz60")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).DL_SCS_SubcarrierSpacing[j] = NR_SubcarrierSpacing_kHz60; - }else if (strcmp(DL_SCS_SubcarrierSpacing,"kHz120")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).DL_SCS_SubcarrierSpacing[j] = NR_SubcarrierSpacing_kHz120; - }else if (strcmp(DL_SCS_SubcarrierSpacing,"kHz240")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).DL_SCS_SubcarrierSpacing[j] = NR_SubcarrierSpacing_kHz240; - }else { - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for DL_SCS_SubcarrierSpacing choice: minusinfinity,kHz15,kHz30,kHz60,kHz120,kHz240!\n", - RC.config_file_name, i, DL_SCS_SubcarrierSpacing); - } - - NRRRC_CONFIGURATION_REQ (msg_p).DL_carrierBandwidth[j] = DL_carrierBandwidth; - if ((DL_carrierBandwidth <1) || (DL_carrierBandwidth > 275)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for DL_carrierBandwidth choice: 1..275 !\n", - RC.config_file_name, i, DL_carrierBandwidth); - } - - /////////////////////////////////NR BWP-DownlinkCommon/////////////////////////// - NRRRC_CONFIGURATION_REQ (msg_p).DL_locationAndBandwidth[j] = DL_locationAndBandwidth; - if ((DL_locationAndBandwidth <0) || (DL_locationAndBandwidth > 37949)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for DL_locationAndBandwidth choice: 0..11 !\n", - RC.config_file_name, i, DL_locationAndBandwidth); - } - - if (strcmp(DL_BWP_SubcarrierSpacing,"kHz15")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).DL_BWP_SubcarrierSpacing[j] = NR_SubcarrierSpacing_kHz15; - }else if (strcmp(DL_BWP_SubcarrierSpacing,"kHz30")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).DL_BWP_SubcarrierSpacing[j] = NR_SubcarrierSpacing_kHz30; - }else if (strcmp(DL_BWP_SubcarrierSpacing,"kHz60")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).DL_BWP_SubcarrierSpacing[j] = NR_SubcarrierSpacing_kHz60; - }else if (strcmp(DL_BWP_SubcarrierSpacing,"kHz120")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).DL_BWP_SubcarrierSpacing[j] = NR_SubcarrierSpacing_kHz120; - }else if (strcmp(DL_BWP_SubcarrierSpacing,"kHz240")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).DL_BWP_SubcarrierSpacing[j] = NR_SubcarrierSpacing_kHz240; - }else { - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for DL_BWP_SubcarrierSpacing choice: minusinfinity,kHz15,kHz30,kHz60,kHz120,kHz240!\n", - RC.config_file_name, i, DL_BWP_SubcarrierSpacing); - } - - if (!DL_BWP_prefix_type){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d define %s: NORMAL,EXTENDED!\n", - RC.config_file_name, i, GNB_CONFIG_STRING_DL_PREFIX_TYPE); - }else if (strcmp(DL_BWP_prefix_type, "NORMAL") == 0) { - NRRRC_CONFIGURATION_REQ (msg_p).DL_BWP_prefix_type[j] = NORMAL; - }else if (strcmp(DL_BWP_prefix_type, "EXTENDED") == 0) { - NRRRC_CONFIGURATION_REQ (msg_p).DL_BWP_prefix_type[j] = EXTENDED; - }else { - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for DL_BWP_prefix_type choice: NORMAL or EXTENDED !\n", - RC.config_file_name, i, DL_BWP_prefix_type); - } - - /////////////////////////////////NR FrequencyInfoUL////////////////////////////// - NRRRC_CONFIGURATION_REQ (msg_p).UL_FreqBandIndicatorNR[j] = UL_FreqBandIndicatorNR; - if ((UL_FreqBandIndicatorNR <1) || (UL_FreqBandIndicatorNR > 1024)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for UL_FreqBandIndicatorNR choice: 1..1024 !\n", - RC.config_file_name, i, UL_FreqBandIndicatorNR); - } - - NRRRC_CONFIGURATION_REQ (msg_p).UL_absoluteFrequencyPointA[j] = UL_absoluteFrequencyPointA; - if ((UL_absoluteFrequencyPointA <0) || (UL_absoluteFrequencyPointA > 3279165)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for UL_absoluteFrequencyPointA choice: 0..3279165 !\n", - RC.config_file_name, i, UL_absoluteFrequencyPointA); - } - - NRRRC_CONFIGURATION_REQ (msg_p).UL_additionalSpectrumEmission[j] = UL_additionalSpectrumEmission; - if ((UL_additionalSpectrumEmission <0) || (UL_additionalSpectrumEmission > 7)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for UL_additionalSpectrumEmission choice: 0..7 !\n", - RC.config_file_name, i, UL_additionalSpectrumEmission); - } - - NRRRC_CONFIGURATION_REQ (msg_p).UL_p_Max[j] = UL_p_Max; - if ((UL_p_Max <-30) || (UL_p_Max > 33)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for UL_p_Max choice: -30..33 !\n", - RC.config_file_name, i, UL_p_Max); - } - - if (strcmp(UL_frequencyShift7p5khz,"TRUE") == 0) { - NRRRC_CONFIGURATION_REQ (msg_p).UL_frequencyShift7p5khz[j] = NR_FrequencyInfoUL__frequencyShift7p5khz_true; //enum true = 0 - }else{ - NRRRC_CONFIGURATION_REQ (msg_p).UL_frequencyShift7p5khz[j] = 1;//false - } - - /////////////////////////////////NR UL SCS-SpecificCarrier/////////////////////////// - NRRRC_CONFIGURATION_REQ (msg_p).UL_offsetToCarrier[j] = UL_offsetToCarrier; - if ((UL_offsetToCarrier <0) || (UL_offsetToCarrier > 2199)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for UL_offsetToCarrier choice: 0..11 !\n", - RC.config_file_name, i, UL_offsetToCarrier); - } - - if (strcmp(UL_SCS_SubcarrierSpacing,"kHz15")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).UL_SCS_SubcarrierSpacing[j] = NR_SubcarrierSpacing_kHz15; - }else if (strcmp(UL_SCS_SubcarrierSpacing,"kHz30")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).UL_SCS_SubcarrierSpacing[j] = NR_SubcarrierSpacing_kHz30; - }else if (strcmp(UL_SCS_SubcarrierSpacing,"kHz60")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).UL_SCS_SubcarrierSpacing[j] = NR_SubcarrierSpacing_kHz60; - }else if (strcmp(UL_SCS_SubcarrierSpacing,"kHz120")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).UL_SCS_SubcarrierSpacing[j] = NR_SubcarrierSpacing_kHz120; - }else if (strcmp(UL_SCS_SubcarrierSpacing,"kHz240")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).UL_SCS_SubcarrierSpacing[j] = NR_SubcarrierSpacing_kHz240; - }else { AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for UL_SCS_SubcarrierSpacing choice: minusinfinity,kHz15,kHz30,kHz60,kHz120,kHz240!\n", - RC.config_file_name, i, UL_SCS_SubcarrierSpacing); - } - - NRRRC_CONFIGURATION_REQ (msg_p).UL_carrierBandwidth[j] = UL_carrierBandwidth; - if ((UL_carrierBandwidth <1) || (UL_carrierBandwidth > 275)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for UL_carrierBandwidth choice: 1..275 !\n", - RC.config_file_name, i, UL_carrierBandwidth); - } - - /////////////////////////////////NR BWP-UplinkCommon/////////////////////////// - NRRRC_CONFIGURATION_REQ (msg_p).UL_locationAndBandwidth[j] = UL_locationAndBandwidth; - if ((UL_locationAndBandwidth <0) || (UL_locationAndBandwidth > 37949)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for UL_locationAndBandwidth choice: 0..11 !\n", - RC.config_file_name, i, UL_locationAndBandwidth); - } - - if (strcmp(UL_BWP_SubcarrierSpacing,"kHz15")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).UL_BWP_SubcarrierSpacing[j] = NR_SubcarrierSpacing_kHz15; - }else if (strcmp(UL_BWP_SubcarrierSpacing,"kHz30")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).UL_BWP_SubcarrierSpacing[j] = NR_SubcarrierSpacing_kHz30; - }else if (strcmp(UL_BWP_SubcarrierSpacing,"kHz60")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).UL_BWP_SubcarrierSpacing[j] = NR_SubcarrierSpacing_kHz60; - }else if (strcmp(UL_BWP_SubcarrierSpacing,"kHz120")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).UL_BWP_SubcarrierSpacing[j] = NR_SubcarrierSpacing_kHz120; - }else if (strcmp(UL_BWP_SubcarrierSpacing,"kHz240")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).UL_BWP_SubcarrierSpacing[j] = NR_SubcarrierSpacing_kHz240; - }else { - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for UL_BWP_SubcarrierSpacing choice: minusinfinity,kHz15,kHz30,kHz60,kHz120,kHz240!\n", - RC.config_file_name, i, UL_BWP_SubcarrierSpacing); - } - - if (!UL_BWP_prefix_type){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d define %s: NORMAL,EXTENDED!\n", - RC.config_file_name, i, GNB_CONFIG_STRING_DL_PREFIX_TYPE); - }else if (strcmp(UL_BWP_prefix_type, "NORMAL") == 0) { - NRRRC_CONFIGURATION_REQ (msg_p).UL_BWP_prefix_type[j] = NORMAL; - }else if (strcmp(UL_BWP_prefix_type, "EXTENDED") == 0) { - NRRRC_CONFIGURATION_REQ (msg_p).UL_BWP_prefix_type[j] = EXTENDED; - }else { - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for UL_BWP_prefix_type choice: NORMAL or EXTENDED !\n", - RC.config_file_name, i, UL_BWP_prefix_type); - } - - if (strcmp(UL_timeAlignmentTimerCommon,"ms500")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).UL_timeAlignmentTimerCommon[j] = NR_TimeAlignmentTimer_ms500; - }else if (strcmp(UL_timeAlignmentTimerCommon,"ms750")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).UL_timeAlignmentTimerCommon[j] = NR_TimeAlignmentTimer_ms750; - }else if (strcmp(UL_timeAlignmentTimerCommon,"ms1280")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).UL_timeAlignmentTimerCommon[j] = NR_TimeAlignmentTimer_ms1280; - }else if (strcmp(UL_timeAlignmentTimerCommon,"ms1920")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).UL_timeAlignmentTimerCommon[j] = NR_TimeAlignmentTimer_ms1920; - }else if (strcmp(UL_timeAlignmentTimerCommon,"ms2560")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).UL_timeAlignmentTimerCommon[j] = NR_TimeAlignmentTimer_ms2560; - }else if (strcmp(UL_timeAlignmentTimerCommon,"ms5120")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).UL_timeAlignmentTimerCommon[j] = NR_TimeAlignmentTimer_ms5120; - }else if (strcmp(UL_timeAlignmentTimerCommon,"ms10240")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).UL_timeAlignmentTimerCommon[j] = NR_TimeAlignmentTimer_ms10240; - }else if (strcmp(UL_timeAlignmentTimerCommon,"infinity")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).UL_timeAlignmentTimerCommon[j] = NR_TimeAlignmentTimer_infinity; - }else { - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for UL_timeAlignmentTimerCommon choice: ms500,ms750,ms1280,ms1920,ms2560,ms5120,ms10240,infinity!\n", - RC.config_file_name, i, UL_timeAlignmentTimerCommon); - } - - if (strcmp(ServingCellConfigCommon_n_TimingAdvanceOffset,"n0")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).ServingCellConfigCommon_n_TimingAdvanceOffset[j] = NR_ServingCellConfigCommon__n_TimingAdvanceOffset_n0; - }else if (strcmp(ServingCellConfigCommon_n_TimingAdvanceOffset,"n25600")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).ServingCellConfigCommon_n_TimingAdvanceOffset[j] = NR_ServingCellConfigCommon__n_TimingAdvanceOffset_n25600; - }else if (strcmp(ServingCellConfigCommon_n_TimingAdvanceOffset,"n39936")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).ServingCellConfigCommon_n_TimingAdvanceOffset[j] = NR_ServingCellConfigCommon__n_TimingAdvanceOffset_n39936; - }else { - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for ServingCellConfigCommon_n_TimingAdvanceOffset choice n0,n25600,n39936!\n", - RC.config_file_name, i, ServingCellConfigCommon_n_TimingAdvanceOffset); - } - - - uint64_t t_freq; - if(nr_band == 41 || (nr_band > 76 && nr_band < 80)) - t_freq = 2400000000; - else - t_freq = 3000000000; - - if (downlink_frequency 15)) - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unvalid value \"%ld\" for ssb_PositionsInBurst at DL frequency %ld !\n", - RC.config_file_name, i, ServingCellConfigCommon_ssb_PositionsInBurst_PR, downlink_frequency); - else { - if(downlink_frequency<6000000000 && (ServingCellConfigCommon_ssb_PositionsInBurst_PR > 255)) - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unvalid value \"%ld\" for ssb_PositionsInBurst at DL frequency %ld !\n", - RC.config_file_name, i, ServingCellConfigCommon_ssb_PositionsInBurst_PR, downlink_frequency); - else - NRRRC_CONFIGURATION_REQ (msg_p).ServingCellConfigCommon_ssb_PositionsInBurst_PR[j] = ServingCellConfigCommon_ssb_PositionsInBurst_PR; - } - - switch (ServingCellConfigCommon_ssb_periodicityServingCell) { - case 5: - NRRRC_CONFIGURATION_REQ (msg_p).ServingCellConfigCommon_ssb_periodicityServingCell[j] = NR_ServingCellConfigCommon__ssb_periodicityServingCell_ms5; - break; - - case 10: - NRRRC_CONFIGURATION_REQ (msg_p).ServingCellConfigCommon_ssb_periodicityServingCell[j] = NR_ServingCellConfigCommon__ssb_periodicityServingCell_ms10; - break; - - case 20: - NRRRC_CONFIGURATION_REQ (msg_p).ServingCellConfigCommon_ssb_periodicityServingCell[j] = NR_ServingCellConfigCommon__ssb_periodicityServingCell_ms20; - break; - - case 40: - NRRRC_CONFIGURATION_REQ (msg_p).ServingCellConfigCommon_ssb_periodicityServingCell[j] = NR_ServingCellConfigCommon__ssb_periodicityServingCell_ms40; - break; - - case 80: - NRRRC_CONFIGURATION_REQ (msg_p).ServingCellConfigCommon_ssb_periodicityServingCell[j] = NR_ServingCellConfigCommon__ssb_periodicityServingCell_ms80; - break; - - case 160: - NRRRC_CONFIGURATION_REQ (msg_p).ServingCellConfigCommon_ssb_periodicityServingCell[j] = NR_ServingCellConfigCommon__ssb_periodicityServingCell_ms160; - break; - - default: - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for ServingCellConfigCommon_ssb_periodicityServingCell choice: -6,0,6 !\n", - RC.config_file_name, i, ServingCellConfigCommon_ssb_periodicityServingCell); - break; - } - - switch (ServingCellConfigCommon_dmrs_TypeA_Position) { - case 2: - NRRRC_CONFIGURATION_REQ (msg_p).ServingCellConfigCommon_dmrs_TypeA_Position[j] = NR_ServingCellConfigCommon__dmrs_TypeA_Position_pos2; - break; - - case 3: - NRRRC_CONFIGURATION_REQ (msg_p).ServingCellConfigCommon_dmrs_TypeA_Position[j] = NR_ServingCellConfigCommon__dmrs_TypeA_Position_pos3; - break; - - default: - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for ServingCellConfigCommon_dmrs_TypeA_Position choice: 2,3 !\n", - RC.config_file_name, i, ServingCellConfigCommon_dmrs_TypeA_Position); - break; - } - - if (strcmp(NIA_SubcarrierSpacing,"kHz15")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).NIA_SubcarrierSpacing[j] = NR_SubcarrierSpacing_kHz15; - }else if (strcmp(NIA_SubcarrierSpacing,"kHz30")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).NIA_SubcarrierSpacing[j] = NR_SubcarrierSpacing_kHz30; - }else if (strcmp(NIA_SubcarrierSpacing,"kHz60")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).NIA_SubcarrierSpacing[j] = NR_SubcarrierSpacing_kHz60; - }else if (strcmp(NIA_SubcarrierSpacing,"kHz120")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).NIA_SubcarrierSpacing[j] = NR_SubcarrierSpacing_kHz120; - }else if (strcmp(NIA_SubcarrierSpacing,"kHz240")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).NIA_SubcarrierSpacing[j] = NR_SubcarrierSpacing_kHz240; - }else { AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for NIA_SubcarrierSpacing choice: minusinfinity,kHz15,kHz30,kHz60,kHz120,kHz240!\n", - RC.config_file_name, i, NIA_SubcarrierSpacing); - } - - NRRRC_CONFIGURATION_REQ (msg_p).ServingCellConfigCommon_ss_PBCH_BlockPower[j] = ServingCellConfigCommon_ss_PBCH_BlockPower; - if ((ServingCellConfigCommon_ss_PBCH_BlockPower < -60) || (ServingCellConfigCommon_ss_PBCH_BlockPower > 50)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for ServingCellConfigCommon_ss_PBCH_BlockPower choice: 0..11 !\n", - RC.config_file_name, i, ServingCellConfigCommon_ss_PBCH_BlockPower); - } - - /////////////////////////////////NR TDD-UL-DL-ConfigCommon/////////////////////////// - if (strcmp(referenceSubcarrierSpacing,"kHz15")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).referenceSubcarrierSpacing[j] = NR_SubcarrierSpacing_kHz15; - }else if (strcmp(referenceSubcarrierSpacing,"kHz30")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).referenceSubcarrierSpacing[j] = NR_SubcarrierSpacing_kHz30; - }else if (strcmp(referenceSubcarrierSpacing,"kHz60")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).referenceSubcarrierSpacing[j] = NR_SubcarrierSpacing_kHz60; - }else if (strcmp(referenceSubcarrierSpacing,"kHz120")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).referenceSubcarrierSpacing[j] = NR_SubcarrierSpacing_kHz120; - }else if (strcmp(referenceSubcarrierSpacing,"kHz240")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).referenceSubcarrierSpacing[j] = NR_SubcarrierSpacing_kHz240; - }else { - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for referenceSubcarrierSpacing choice: minusinfinity,kHz15,kHz30,kHz60,kHz120,kHz240!\n", - RC.config_file_name, i, referenceSubcarrierSpacing); - } - - if (strcmp(dl_UL_TransmissionPeriodicity,"ms0p5")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).dl_UL_TransmissionPeriodicity[j] = NR_TDD_UL_DL_Pattern__dl_UL_TransmissionPeriodicity_ms0p5; - }else if (strcmp(dl_UL_TransmissionPeriodicity,"ms0p625")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).dl_UL_TransmissionPeriodicity[j] = NR_TDD_UL_DL_Pattern__dl_UL_TransmissionPeriodicity_ms0p625; - }else if (strcmp(dl_UL_TransmissionPeriodicity,"ms1")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).dl_UL_TransmissionPeriodicity[j] = NR_TDD_UL_DL_Pattern__dl_UL_TransmissionPeriodicity_ms1; - }else if (strcmp(dl_UL_TransmissionPeriodicity,"ms1p25")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).dl_UL_TransmissionPeriodicity[j] = NR_TDD_UL_DL_Pattern__dl_UL_TransmissionPeriodicity_ms1p25; - }else if (strcmp(dl_UL_TransmissionPeriodicity,"ms2")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).dl_UL_TransmissionPeriodicity[j] = NR_TDD_UL_DL_Pattern__dl_UL_TransmissionPeriodicity_ms2; - }else if (strcmp(dl_UL_TransmissionPeriodicity,"ms2p5")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).dl_UL_TransmissionPeriodicity[j] = NR_TDD_UL_DL_Pattern__dl_UL_TransmissionPeriodicity_ms2p5; - }else if (strcmp(dl_UL_TransmissionPeriodicity,"ms5")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).dl_UL_TransmissionPeriodicity[j] = NR_TDD_UL_DL_Pattern__dl_UL_TransmissionPeriodicity_ms5; - }else if (strcmp(dl_UL_TransmissionPeriodicity,"ms10")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).dl_UL_TransmissionPeriodicity[j] = NR_TDD_UL_DL_Pattern__dl_UL_TransmissionPeriodicity_ms10; - }else { - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for dl_UL_TransmissionPeriodicity choice: minusinfinity,ms0p5,ms0p625,ms1,ms1p25,ms2,ms2p5,ms5,ms10 !\n", - RC.config_file_name, i, dl_UL_TransmissionPeriodicity); - } - - NRRRC_CONFIGURATION_REQ (msg_p).nrofDownlinkSlots[j] = nrofDownlinkSlots; - if ((nrofDownlinkSlots < 0) || (nrofDownlinkSlots > 320)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for nrofDownlinkSlots choice: 0..320 !\n", - RC.config_file_name, i, nrofDownlinkSlots); - } - - NRRRC_CONFIGURATION_REQ (msg_p).nrofDownlinkSymbols[j] = nrofDownlinkSymbols; - if ((nrofDownlinkSymbols < 0) || (nrofDownlinkSymbols > 13)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for nrofDownlinkSymbols choice: 0..13 !\n", - RC.config_file_name, i, nrofDownlinkSymbols); - } - - NRRRC_CONFIGURATION_REQ (msg_p).nrofUplinkSlots[j] = nrofUplinkSlots; - if ((nrofUplinkSlots < 0) || (nrofUplinkSlots > 320)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for nrofUplinkSlots choice: 0..320 !\n", - RC.config_file_name, i, nrofUplinkSlots); - } - - NRRRC_CONFIGURATION_REQ (msg_p).nrofUplinkSymbols[j] = nrofUplinkSymbols; - if ((nrofUplinkSymbols < 0) || (nrofUplinkSymbols > 13)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for nrofUplinkSymbols choice: 0..13 !\n", - RC.config_file_name, i, nrofUplinkSymbols); - } - - /////////////////////////////////NR RACH-ConfigCommon/////////////////////////// - - NRRRC_CONFIGURATION_REQ (msg_p).rach_totalNumberOfRA_Preambles[j] = rach_totalNumberOfRA_Preambles; - if ((rach_totalNumberOfRA_Preambles <1) || (rach_totalNumberOfRA_Preambles>63)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for rach_numberOfRA_Preambles choice: 1..63 !\n", - RC.config_file_name, i, rach_totalNumberOfRA_Preambles); - } - - if (strcmp(rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_choice,"oneEighth")==0) { - - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_choice[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_oneEighth; - switch (rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneEighth){ - case 4: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneEighth[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneEighth_n4; - break; - case 8: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneEighth[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneEighth_n8; - break; - case 12: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneEighth[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneEighth_n12; - break; - case 16: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneEighth[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneEighth_n16; - break; - case 20: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneEighth[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneEighth_n20; - break; - case 24: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneEighth[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneEighth_n24; - break; - case 28: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneEighth[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneEighth_n28; - break; - case 32: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneEighth[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneEighth_n32; - break; - case 36: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneEighth[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneEighth_n36; - break; - case 40: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneEighth[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneEighth_n40; - break; - case 44: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneEighth[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneEighth_n44; - break; - case 48: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneEighth[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneEighth_n48; - break; - case 52: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneEighth[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneEighth_n52; - break; - case 56: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneEighth[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneEighth_n56; - break; - case 60: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneEighth[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneEighth_n60; - break; - case 64: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneEighth[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneEighth_n64; - break; - default: - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneEighth choice: 4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64!\n", - RC.config_file_name, i, rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneEighth); - break; - }//End oneEighth - - }else if (strcmp(rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_choice,"oneFourth")==0) { - - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_choice[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_oneFourth; - switch (rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneFourth){ - case 4: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneFourth[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneFourth_n4; - break; - case 8: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneFourth[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneFourth_n8; - break; - case 12: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneFourth[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneFourth_n12; - break; - case 16: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneFourth[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneFourth_n16; - break; - case 20: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneFourth[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneFourth_n20; - break; - case 24: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneFourth[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneFourth_n24; - break; - case 28: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneFourth[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneFourth_n28; - break; - case 32: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneFourth[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneFourth_n32; - break; - case 36: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneFourth[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneFourth_n36; - break; - case 40: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneFourth[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneFourth_n40; - break; - case 44: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneFourth[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneFourth_n44; - break; - case 48: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneFourth[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneFourth_n48; - break; - case 52: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneFourth[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneFourth_n52; - break; - case 56: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneFourth[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneFourth_n56; - break; - case 60: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneFourth[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneFourth_n60; - break; - case 64: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneFourth[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneFourth_n64; - break; - default: - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneFourth choice: 4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64!\n", - RC.config_file_name, i, rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneFourth); - break; - }//End oneFourth - - }else if (strcmp(rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_choice,"oneHalf")==0) { - - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_choice[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_oneHalf; - switch (rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneHalf){ - case 4: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneHalf[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneHalf_n4; - break; - case 8: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneHalf[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneHalf_n8; - break; - case 12: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneHalf[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneHalf_n12; - break; - case 16: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneHalf[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneHalf_n16; - break; - case 20: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneHalf[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneHalf_n20; - break; - case 24: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneHalf[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneHalf_n24; - break; - case 28: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneHalf[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneHalf_n28; - break; - case 32: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneHalf[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneHalf_n32; - break; - case 36: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneHalf[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneHalf_n36; - break; - case 40: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneHalf[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneHalf_n40; - break; - case 44: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneHalf[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneHalf_n44; - break; - case 48: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneHalf[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneHalf_n48; - break; - case 52: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneHalf[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneHalf_n52; - break; - case 56: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneHalf[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneHalf_n56; - break; - case 60: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneHalf[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneHalf_n60; - break; - case 64: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneHalf[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__oneHalf_n64; - break; - default: - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneHalf choice: 4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64!\n", - RC.config_file_name, i, rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneHalf); - break; - }//End oneHalf - - }else if (strcmp(rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_choice,"one")==0) { - - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_choice[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_one; - switch (rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_one){ - case 4: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_one[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__one_n4; - break; - case 8: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_one[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__one_n8; - break; - case 12: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_one[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__one_n12; - break; - case 16: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_one[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__one_n16; - break; - case 20: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_one[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__one_n20; - break; - case 24: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_one[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__one_n24; - break; - case 28: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_one[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__one_n28; - break; - case 32: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_one[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__one_n32; - break; - case 36: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_one[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__one_n36; - break; - case 40: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_one[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__one_n40; - break; - case 44: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_one[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__one_n44; - break; - case 48: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_one[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__one_n48; - break; - case 52: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_one[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__one_n52; - break; - case 56: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_one[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__one_n56; - break; - case 60: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_one[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__one_n60; - break; - case 64: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_one[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__one_n64; - break; - default: - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_one choice: 4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64!\n", - RC.config_file_name, i, rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_one); - break; - }//End one - - }else if (strcmp(rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_choice,"two")==0) { - - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_choice[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_two; - switch (rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_one){ - case 4: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_two[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__two_n4; - break; - case 8: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_two[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__two_n8; - break; - case 12: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_two[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__two_n12; - break; - case 16: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_two[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__two_n16; - break; - case 20: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_two[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__two_n20; - break; - case 24: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_two[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__two_n24; - break; - case 28: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_two[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__two_n28; - break; - case 32: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_two[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__two_n32; - break; - default: - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_two choice: 4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64!\n", - RC.config_file_name, i, rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_two); - break; - }//End two - - }else if (strcmp(rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_choice,"four")==0) { - - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_choice[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_four; - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_four[j] = rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_four; - if ((rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_four < 1) || (rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_four > 16)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_four choice: 1..16 !\n", - RC.config_file_name, i, rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_four); - }//End four - - }else if (strcmp(rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_choice,"eight")==0) { - - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_choice[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_eight; - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_eight[j] = rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_eight; - if ((rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_eight < 1) || (rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_eight > 8)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_eight choice: 1..8 !\n", - RC.config_file_name, i, rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_eight); - }//End eight - - }else if (strcmp(rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_choice,"sixteen")==0) { - - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_choice[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_sixteen; - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_sixteen[j] = rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_sixteen; - if ((rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_sixteen < 1) || (rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_sixteen > 4)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_sixteen choice: 1..4 !\n", - RC.config_file_name, i, rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_sixteen); - }//End sixteen - - }else if (strcmp(rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_choice,"NOTHING")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_choice[j] = NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_NOTHING; - }else { - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_choice: oneEighth,oneFourth,oneHalf,one,two,four,eight,sixteen !\n", - RC.config_file_name, i, rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_choice); - } - - if (strcmp(rach_groupBconfigured , "ENABLE") == 0) { - NRRRC_CONFIGURATION_REQ (msg_p).rach_groupBconfigured [j] = TRUE; - - switch (rach_ra_Msg3SizeGroupA) { - case 56: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ra_Msg3SizeGroupA[j] = NR_RACH_ConfigCommon__groupBconfigured__ra_Msg3SizeGroupA_b56; - break; - case 144: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ra_Msg3SizeGroupA[j] = NR_RACH_ConfigCommon__groupBconfigured__ra_Msg3SizeGroupA_b144; - break; - case 208: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ra_Msg3SizeGroupA[j] = NR_RACH_ConfigCommon__groupBconfigured__ra_Msg3SizeGroupA_b208; - break; - case 256: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ra_Msg3SizeGroupA[j] = NR_RACH_ConfigCommon__groupBconfigured__ra_Msg3SizeGroupA_b256; - break; - case 282: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ra_Msg3SizeGroupA[j] = NR_RACH_ConfigCommon__groupBconfigured__ra_Msg3SizeGroupA_b282; - break; - case 480: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ra_Msg3SizeGroupA[j] = NR_RACH_ConfigCommon__groupBconfigured__ra_Msg3SizeGroupA_b480; - break; - case 640: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ra_Msg3SizeGroupA[j] = NR_RACH_ConfigCommon__groupBconfigured__ra_Msg3SizeGroupA_b640; - break; - case 800: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ra_Msg3SizeGroupA[j] = NR_RACH_ConfigCommon__groupBconfigured__ra_Msg3SizeGroupA_b800; - break; - case 1000: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ra_Msg3SizeGroupA[j] = NR_RACH_ConfigCommon__groupBconfigured__ra_Msg3SizeGroupA_b1000; - break; - default: - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for rach_ra_Msg3SizeGroupA choice: 56,144,208,256,282,480,640,800,1000!\n", - RC.config_file_name, i, rach_ra_Msg3SizeGroupA); - break; - }// End switch (rach_ra_Msg3SizeGroupA) - - if (strcmp(rach_messagePowerOffsetGroupB,"minusinfinity")==0) { - RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = NR_RACH_ConfigCommon__groupBconfigured__messagePowerOffsetGroupB_minusinfinity; - }else if (strcmp(rach_messagePowerOffsetGroupB,"dB0")==0) { - RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = NR_RACH_ConfigCommon__groupBconfigured__messagePowerOffsetGroupB_dB0; - }else if (strcmp(rach_messagePowerOffsetGroupB,"dB5")==0) { - RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = NR_RACH_ConfigCommon__groupBconfigured__messagePowerOffsetGroupB_dB5; - }else if (strcmp(rach_messagePowerOffsetGroupB,"dB8")==0) { - RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = NR_RACH_ConfigCommon__groupBconfigured__messagePowerOffsetGroupB_dB8; - }else if (strcmp(rach_messagePowerOffsetGroupB,"dB10")==0) { - RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = NR_RACH_ConfigCommon__groupBconfigured__messagePowerOffsetGroupB_dB10; - }else if (strcmp(rach_messagePowerOffsetGroupB,"dB12")==0) { - RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = NR_RACH_ConfigCommon__groupBconfigured__messagePowerOffsetGroupB_dB12; - }else if (strcmp(rach_messagePowerOffsetGroupB,"dB15")==0) { - RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = NR_RACH_ConfigCommon__groupBconfigured__messagePowerOffsetGroupB_dB15; - }else if (strcmp(rach_messagePowerOffsetGroupB,"dB18")==0) { - RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = NR_RACH_ConfigCommon__groupBconfigured__messagePowerOffsetGroupB_dB18; - }else{ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for rach_messagePowerOffsetGroupB choice: minusinfinity,dB0,dB5,dB8,dB10,dB12,dB15,dB18!\n", - RC.config_file_name, i, rach_messagePowerOffsetGroupB); - }// End if (strcmp(rach_messagePowerOffsetGroupB,"minusinfinity")==0) - - NRRRC_CONFIGURATION_REQ (msg_p).rach_numberOfRA_PreamblesGroupA[j] = rach_numberOfRA_PreamblesGroupA; - if ((rach_numberOfRA_PreamblesGroupA <1) || (rach_numberOfRA_PreamblesGroupA>64)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for rach_numberOfRA_PreamblesGroupA choice: 1..63 !\n", - RC.config_file_name, i, rach_numberOfRA_PreamblesGroupA); - } - - }// End if (strcmp(rach_groupBconfigured , "ENABLE") == 0) - - switch (rach_ra_ContentionResolutionTimer) { - case 8: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ra_ContentionResolutionTimer[j] = NR_RACH_ConfigCommon__ra_ContentionResolutionTimer_sf8; - break; - case 16: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ra_ContentionResolutionTimer[j] = NR_RACH_ConfigCommon__ra_ContentionResolutionTimer_sf16; - break; - case 24: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ra_ContentionResolutionTimer[j] = NR_RACH_ConfigCommon__ra_ContentionResolutionTimer_sf24; - break; - case 32: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ra_ContentionResolutionTimer[j] = NR_RACH_ConfigCommon__ra_ContentionResolutionTimer_sf32; - break; - case 40: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ra_ContentionResolutionTimer[j] = NR_RACH_ConfigCommon__ra_ContentionResolutionTimer_sf40; - break; - case 48: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ra_ContentionResolutionTimer[j] = NR_RACH_ConfigCommon__ra_ContentionResolutionTimer_sf48; - break; - case 56: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ra_ContentionResolutionTimer[j] = NR_RACH_ConfigCommon__ra_ContentionResolutionTimer_sf56; - break; - case 64: - NRRRC_CONFIGURATION_REQ (msg_p).rach_ra_ContentionResolutionTimer[j] = NR_RACH_ConfigCommon__ra_ContentionResolutionTimer_sf64; - break; - default: - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for rach_ra_ContentionResolutionTimer choice: 8,16,24,32,40,48,56,64!\n", - RC.config_file_name, i, rach_ra_ContentionResolutionTimer); - break; - }// End switch (rach_ra_ContentionResolutionTimer) - - - NRRRC_CONFIGURATION_REQ (msg_p).rsrp_ThresholdSSB[j] = rsrp_ThresholdSSB; - if ((rsrp_ThresholdSSB <0) || (rsrp_ThresholdSSB>124)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for rsrp_ThresholdSSB choice: 0..124 !\n", - RC.config_file_name, i, rsrp_ThresholdSSB); - } - - NRRRC_CONFIGURATION_REQ (msg_p).rsrp_ThresholdSSB_SUL[j] = rsrp_ThresholdSSB_SUL; - if ((rsrp_ThresholdSSB_SUL <0) || (rsrp_ThresholdSSB_SUL>124)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for rsrp_ThresholdSSB_SUL choice: 0..124 !\n", - RC.config_file_name, i, rsrp_ThresholdSSB_SUL); - } - - if (strcmp(prach_RootSequenceIndex_choice , "l839") == 0) { - NRRRC_CONFIGURATION_REQ (msg_p).prach_RootSequenceIndex_choice[j] = NR_RACH_ConfigCommon__prach_RootSequenceIndex_PR_l839; - NRRRC_CONFIGURATION_REQ (msg_p).prach_RootSequenceIndex_l839[j] = prach_RootSequenceIndex_l839; - }else if (strcmp(prach_RootSequenceIndex_choice , "l139") == 0){ - NRRRC_CONFIGURATION_REQ (msg_p).prach_RootSequenceIndex_choice[j] = NR_RACH_ConfigCommon__prach_RootSequenceIndex_PR_l139; - NRRRC_CONFIGURATION_REQ (msg_p).prach_RootSequenceIndex_l139[j] = prach_RootSequenceIndex_l139; - }else { - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for prach_RootSequenceIndex_choice !\n", - RC.config_file_name, i, prach_RootSequenceIndex_choice); - } - - if (strcmp(prach_msg1_SubcarrierSpacing,"kHz15")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).prach_msg1_SubcarrierSpacing[j] = NR_SubcarrierSpacing_kHz15; - }else if (strcmp(prach_msg1_SubcarrierSpacing,"kHz30")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).prach_msg1_SubcarrierSpacing[j] = NR_SubcarrierSpacing_kHz30; - }else if (strcmp(prach_msg1_SubcarrierSpacing,"kHz60")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).prach_msg1_SubcarrierSpacing[j] = NR_SubcarrierSpacing_kHz60; - }else if (strcmp(prach_msg1_SubcarrierSpacing,"kHz120")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).prach_msg1_SubcarrierSpacing[j] = NR_SubcarrierSpacing_kHz120; - }else if (strcmp(prach_msg1_SubcarrierSpacing,"kHz240")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).prach_msg1_SubcarrierSpacing[j] = NR_SubcarrierSpacing_kHz240; - }else { - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for prach_msg1_SubcarrierSpacing choice: minusinfinity,kHz15,kHz30,kHz60,kHz120,kHz240!\n", - RC.config_file_name, i, prach_msg1_SubcarrierSpacing); - } - - if (strcmp(restrictedSetConfig , "unrestrictedSet") == 0) { - NRRRC_CONFIGURATION_REQ (msg_p).restrictedSetConfig[j] = NR_RACH_ConfigCommon__restrictedSetConfig_unrestrictedSet; - }else if (strcmp(restrictedSetConfig , "restrictedSetTypeA") == 0) { - NRRRC_CONFIGURATION_REQ (msg_p).restrictedSetConfig[j] = NR_RACH_ConfigCommon__restrictedSetConfig_restrictedSetTypeA; - }else if (strcmp(restrictedSetConfig , "restrictedSetTypeB") == 0) { - NRRRC_CONFIGURATION_REQ (msg_p).restrictedSetConfig[j] = NR_RACH_ConfigCommon__restrictedSetConfig_restrictedSetTypeB; - }else { - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for restrictedSetConfig !\n", - RC.config_file_name, i, restrictedSetConfig); - } - - if (strcmp(msg3_transformPrecoding , "ENABLE") == 0){ - NRRRC_CONFIGURATION_REQ (msg_p).msg3_transformPrecoding[j] = TRUE; - } - - ////////////////////////////////NR RACH-ConfigGeneric////////////////////////////// - NRRRC_CONFIGURATION_REQ (msg_p).prach_ConfigurationIndex[j] = prach_ConfigurationIndex; - if ((prach_ConfigurationIndex <0) || (prach_ConfigurationIndex>255)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for prach_ConfigurationIndex choice: 0..255 !\n", - RC.config_file_name, i, prach_ConfigurationIndex); - } - - if (strcmp(prach_msg1_FDM , "one") == 0) { - NRRRC_CONFIGURATION_REQ (msg_p).prach_msg1_FDM[j] = NR_RACH_ConfigGeneric__msg1_FDM_one; - }else if (strcmp(prach_msg1_FDM , "two") == 0) { - NRRRC_CONFIGURATION_REQ (msg_p).prach_msg1_FDM[j] = NR_RACH_ConfigGeneric__msg1_FDM_two; - }else if (strcmp(prach_msg1_FDM , "four") == 0) { - NRRRC_CONFIGURATION_REQ (msg_p).prach_msg1_FDM[j] = NR_RACH_ConfigGeneric__msg1_FDM_four; - }else if (strcmp(prach_msg1_FDM , "eight") == 0) { - NRRRC_CONFIGURATION_REQ (msg_p).prach_msg1_FDM[j] = NR_RACH_ConfigGeneric__msg1_FDM_eight; - }else { - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for prach_msg1_FDM !\n", - RC.config_file_name, i, prach_msg1_FDM); - } - - NRRRC_CONFIGURATION_REQ (msg_p).prach_msg1_FrequencyStart[j] = prach_msg1_FrequencyStart; - if ((prach_msg1_FrequencyStart <0) || (prach_msg1_FrequencyStart>274)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for prach_msg1_FrequencyStart choice: 0..274 !\n", - RC.config_file_name, i, prach_msg1_FrequencyStart); - } - - NRRRC_CONFIGURATION_REQ (msg_p).zeroCorrelationZoneConfig[j] = zeroCorrelationZoneConfig; - if ((zeroCorrelationZoneConfig <0) || (zeroCorrelationZoneConfig>15)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for zeroCorrelationZoneConfig choice: 0..15 !\n", - RC.config_file_name, i, zeroCorrelationZoneConfig); - } - - NRRRC_CONFIGURATION_REQ (msg_p).preambleReceivedTargetPower[j] = preambleReceivedTargetPower; - if ((preambleReceivedTargetPower <-200) || (preambleReceivedTargetPower>-74)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for preambleReceivedTargetPower choice: -200..-74 !\n", - RC.config_file_name, i, preambleReceivedTargetPower); - } - - switch (preambleTransMax) { - case 3: - NRRRC_CONFIGURATION_REQ (msg_p).preambleTransMax[j] = NR_RACH_ConfigGeneric__preambleTransMax_n3; - break; - case 4: - NRRRC_CONFIGURATION_REQ (msg_p).preambleTransMax[j] = NR_RACH_ConfigGeneric__preambleTransMax_n4; - break; - case 5: - NRRRC_CONFIGURATION_REQ (msg_p).preambleTransMax[j] = NR_RACH_ConfigGeneric__preambleTransMax_n5; - break; - case 6: - NRRRC_CONFIGURATION_REQ (msg_p).preambleTransMax[j] = NR_RACH_ConfigGeneric__preambleTransMax_n6; - break; - case 7: - NRRRC_CONFIGURATION_REQ (msg_p).preambleTransMax[j] = NR_RACH_ConfigGeneric__preambleTransMax_n7; - break; - case 8: - NRRRC_CONFIGURATION_REQ (msg_p).preambleTransMax[j] = NR_RACH_ConfigGeneric__preambleTransMax_n8; - break; - case 10: - NRRRC_CONFIGURATION_REQ (msg_p).preambleTransMax[j] = NR_RACH_ConfigGeneric__preambleTransMax_n10; - break; - case 20: - NRRRC_CONFIGURATION_REQ (msg_p).preambleTransMax[j] = NR_RACH_ConfigGeneric__preambleTransMax_n20; - break; - case 50: - NRRRC_CONFIGURATION_REQ (msg_p).preambleTransMax[j] = NR_RACH_ConfigGeneric__preambleTransMax_n50; - break; - case 100: - NRRRC_CONFIGURATION_REQ (msg_p).preambleTransMax[j] = NR_RACH_ConfigGeneric__preambleTransMax_n100; - break; - case 200: - NRRRC_CONFIGURATION_REQ (msg_p).preambleTransMax[j] = NR_RACH_ConfigGeneric__preambleTransMax_n200; - break; - default: - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for preambleTransMax choice: 3,4,5,6,7,8,10,20,50,100,200 !\n", - RC.config_file_name, i, preambleTransMax); - break; - } - - if (strcmp(powerRampingStep , "dB0") == 0) { - NRRRC_CONFIGURATION_REQ (msg_p).powerRampingStep[j] = NR_RACH_ConfigGeneric__powerRampingStep_dB0; - }else if (strcmp(powerRampingStep , "dB2") == 0) { - NRRRC_CONFIGURATION_REQ (msg_p).powerRampingStep[j] = NR_RACH_ConfigGeneric__powerRampingStep_dB2; - }else if (strcmp(powerRampingStep , "dB4") == 0) { - NRRRC_CONFIGURATION_REQ (msg_p).powerRampingStep[j] = NR_RACH_ConfigGeneric__powerRampingStep_dB4; - }else if (strcmp(powerRampingStep , "dB6") == 0) { - NRRRC_CONFIGURATION_REQ (msg_p).powerRampingStep[j] = NR_RACH_ConfigGeneric__powerRampingStep_dB6; - }else { - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for powerRampingStep !\n", - RC.config_file_name, i, powerRampingStep); - } - - switch (ra_ResponseWindow) { - case 1: - NRRRC_CONFIGURATION_REQ (msg_p).ra_ResponseWindow[j] = NR_RACH_ConfigGeneric__ra_ResponseWindow_sl1; - break; - case 2: - NRRRC_CONFIGURATION_REQ (msg_p).ra_ResponseWindow[j] = NR_RACH_ConfigGeneric__ra_ResponseWindow_sl2; - break; - case 4: - NRRRC_CONFIGURATION_REQ (msg_p).ra_ResponseWindow[j] = NR_RACH_ConfigGeneric__ra_ResponseWindow_sl4; - break; - case 8: - NRRRC_CONFIGURATION_REQ (msg_p).ra_ResponseWindow[j] = NR_RACH_ConfigGeneric__ra_ResponseWindow_sl8; - break; - case 10: - NRRRC_CONFIGURATION_REQ (msg_p).ra_ResponseWindow[j] = NR_RACH_ConfigGeneric__ra_ResponseWindow_sl10; - break; - case 20: - NRRRC_CONFIGURATION_REQ (msg_p).ra_ResponseWindow[j] = NR_RACH_ConfigGeneric__ra_ResponseWindow_sl20; - break; - case 40: - NRRRC_CONFIGURATION_REQ (msg_p).ra_ResponseWindow[j] = NR_RACH_ConfigGeneric__ra_ResponseWindow_sl40; - break; - case 80: - NRRRC_CONFIGURATION_REQ (msg_p).ra_ResponseWindow[j] = NR_RACH_ConfigGeneric__ra_ResponseWindow_sl80; - break; - default: - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for ra_ResponseWindow choice: 1,2,4,8,10,20,40,80 !\n", - RC.config_file_name, i, ra_ResponseWindow); - break; - } - - /////////////////////////////////NR PUSCH-ConfigCommon/////////////////////////// - if (strcmp(groupHoppingEnabledTransformPrecoding , "ENABLE") == 0){ - NRRRC_CONFIGURATION_REQ (msg_p).groupHoppingEnabledTransformPrecoding[j] = TRUE; - } - - NRRRC_CONFIGURATION_REQ (msg_p).msg3_DeltaPreamble[j] = msg3_DeltaPreamble; - if ((msg3_DeltaPreamble <-1) || (msg3_DeltaPreamble>6)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for msg3_DeltaPreamble choice: -1..6 !\n", - RC.config_file_name, i, msg3_DeltaPreamble); - } - - NRRRC_CONFIGURATION_REQ (msg_p).p0_NominalWithGrant[j] = p0_NominalWithGrant; - if ((p0_NominalWithGrant <-202) || (p0_NominalWithGrant>24)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for p0_NominalWithGrant choice: -202..24 !\n", - RC.config_file_name, i, p0_NominalWithGrant); - } - - /////////////////////////////////NR PUSCH-TimeDomainResourceAllocation/////////////////////////// - NRRRC_CONFIGURATION_REQ (msg_p).PUSCH_TimeDomainResourceAllocation_k2[j] = PUSCH_TimeDomainResourceAllocation_k2; - if ((PUSCH_TimeDomainResourceAllocation_k2 <0) || (PUSCH_TimeDomainResourceAllocation_k2>32)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for PUSCH_TimeDomainResourceAllocation_k2 choice: 0..7 !\n", - RC.config_file_name, i, PUSCH_TimeDomainResourceAllocation_k2); - } - - if (strcmp(PUSCH_TimeDomainResourceAllocation_mappingType , "typeA") == 0){ - NRRRC_CONFIGURATION_REQ (msg_p).PUSCH_TimeDomainResourceAllocation_mappingType[j] = NR_PUSCH_TimeDomainResourceAllocation__mappingType_typeA; - }else if (strcmp(PUSCH_TimeDomainResourceAllocation_mappingType , "typeB") == 0){ - NRRRC_CONFIGURATION_REQ (msg_p).PUSCH_TimeDomainResourceAllocation_mappingType[j] = NR_PUSCH_TimeDomainResourceAllocation__mappingType_typeB; - }else { - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for PUSCH_TimeDomainResourceAllocation_mappingType !\n", - RC.config_file_name, i, PUSCH_TimeDomainResourceAllocation_mappingType); - } - - NRRRC_CONFIGURATION_REQ (msg_p).PUSCH_TimeDomainResourceAllocation_startSymbolAndLength[j] = PUSCH_TimeDomainResourceAllocation_startSymbolAndLength; - if ((PUSCH_TimeDomainResourceAllocation_startSymbolAndLength <0) || (PUSCH_TimeDomainResourceAllocation_startSymbolAndLength>127)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for PUSCH_TimeDomainResourceAllocation_startSymbolAndLength choice: 0..127 !\n", - RC.config_file_name, i, PUSCH_TimeDomainResourceAllocation_startSymbolAndLength); - } - - /////////////////////////////////NR PUCCH-ConfigCommon/////////////////////////// - NRRRC_CONFIGURATION_REQ (msg_p).pucch_ResourceCommon[j] = pucch_ResourceCommon; - if ((pucch_ResourceCommon <0) || (pucch_ResourceCommon>15)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for pucch_ResourceCommon choice: 0..15 !\n", - RC.config_file_name, i, pucch_ResourceCommon); - } - - if (strcmp(pucch_GroupHopping , "neither") == 0){ - NRRRC_CONFIGURATION_REQ (msg_p).pucch_GroupHopping[j] = NR_PUCCH_ConfigCommon__pucch_GroupHopping_neither; - }else if (strcmp(pucch_GroupHopping , "enable") == 0){ - NRRRC_CONFIGURATION_REQ (msg_p).pucch_GroupHopping[j] = NR_PUCCH_ConfigCommon__pucch_GroupHopping_enable; - }else if (strcmp(pucch_GroupHopping , "disable") == 0){ - NRRRC_CONFIGURATION_REQ (msg_p).pucch_GroupHopping[j] = NR_PUCCH_ConfigCommon__pucch_GroupHopping_disable; - }else { - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for pucch_GroupHopping !\n", - RC.config_file_name, i, pucch_GroupHopping); - } - - NRRRC_CONFIGURATION_REQ (msg_p).hoppingId[j] = hoppingId; - if ((hoppingId <0) || (hoppingId>1024)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for hoppingId choice: 0..1024 !\n", - RC.config_file_name, i, hoppingId); - } - - NRRRC_CONFIGURATION_REQ (msg_p).p0_nominal[j] = p0_nominal; - if ((p0_nominal <-202) || (p0_nominal>24)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for p0_nominal choice: -202..24 !\n", - RC.config_file_name, i, p0_nominal); - } - - //////////////////////////////////NR PDSCH-TimeDomainResourceAllocation/////////////////////////// - NRRRC_CONFIGURATION_REQ (msg_p).PDSCH_TimeDomainResourceAllocation_k0[j] = PDSCH_TimeDomainResourceAllocation_k0; - if ((PDSCH_TimeDomainResourceAllocation_k0 <1) || (PDSCH_TimeDomainResourceAllocation_k0>3)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for PDSCH_TimeDomainResourceAllocation_k0 choice: 0..7 !\n", - RC.config_file_name, i, PDSCH_TimeDomainResourceAllocation_k0); - } - - if (strcmp(PDSCH_TimeDomainResourceAllocation_mappingType , "typeA") == 0){ - NRRRC_CONFIGURATION_REQ (msg_p).PDSCH_TimeDomainResourceAllocation_mappingType[j] = NR_PDSCH_TimeDomainResourceAllocation__mappingType_typeA; - }else if (strcmp(PDSCH_TimeDomainResourceAllocation_mappingType , "typeB") == 0){ - NRRRC_CONFIGURATION_REQ (msg_p).PDSCH_TimeDomainResourceAllocation_mappingType[j] = NR_PDSCH_TimeDomainResourceAllocation__mappingType_typeB; - }else { - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for PDSCH_TimeDomainResourceAllocation_mappingType !\n", - RC.config_file_name, i, PDSCH_TimeDomainResourceAllocation_mappingType); - } - - NRRRC_CONFIGURATION_REQ (msg_p).PDSCH_TimeDomainResourceAllocation_startSymbolAndLength[j] = PDSCH_TimeDomainResourceAllocation_startSymbolAndLength; - if ((PDSCH_TimeDomainResourceAllocation_startSymbolAndLength <0) || (PDSCH_TimeDomainResourceAllocation_startSymbolAndLength>127)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for PDSCH_TimeDomainResourceAllocation_startSymbolAndLength choice: 0..127 !\n", - RC.config_file_name, i, PDSCH_TimeDomainResourceAllocation_startSymbolAndLength); - } - - //////////////////////////////////NR RateMatchPattern/////////////////////////// - NRRRC_CONFIGURATION_REQ (msg_p).rateMatchPatternId[j] = rateMatchPatternId; - if ((rateMatchPatternId <0) || (rateMatchPatternId>3)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for rateMatchPatternId choice: 0..3 !\n", - RC.config_file_name, i, rateMatchPatternId); - } - - if (strcmp(RateMatchPattern_patternType , "NOTHING") == 0){ - NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPattern_patternType[j] = NR_RateMatchPattern__patternType_PR_NOTHING; - }else if (strcmp(RateMatchPattern_patternType , "bitmaps") == 0){ - NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPattern_patternType[j] = NR_RateMatchPattern__patternType_PR_bitmaps; - }else if (strcmp(RateMatchPattern_patternType , "controlResourceSet") == 0){ - NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPattern_patternType[j] = NR_RateMatchPattern__patternType_PR_controlResourceSet; - }else { - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for RateMatchPattern_patternType !\n", - RC.config_file_name, i, RateMatchPattern_patternType); - } - - if (strcmp(symbolsInResourceBlock , "NOTHING") == 0){ - NRRRC_CONFIGURATION_REQ (msg_p).symbolsInResourceBlock[j] = NR_RateMatchPattern__patternType__bitmaps__symbolsInResourceBlock_PR_NOTHING; - }else if (strcmp(symbolsInResourceBlock , "oneSlot") == 0){ - NRRRC_CONFIGURATION_REQ (msg_p).symbolsInResourceBlock[j] = NR_RateMatchPattern__patternType__bitmaps__symbolsInResourceBlock_PR_oneSlot; - }else if (strcmp(symbolsInResourceBlock , "twoSlots") == 0){ - NRRRC_CONFIGURATION_REQ (msg_p).symbolsInResourceBlock[j] = NR_RateMatchPattern__patternType__bitmaps__symbolsInResourceBlock_PR_twoSlots; - }else { - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for symbolsInResourceBlock !\n", - RC.config_file_name, i, symbolsInResourceBlock); - } - - switch(periodicityAndPattern){ - case 2: - NRRRC_CONFIGURATION_REQ (msg_p).periodicityAndPattern[j] = NR_RateMatchPattern__patternType__bitmaps__periodicityAndPattern_PR_n2; - break; - case 4: - NRRRC_CONFIGURATION_REQ (msg_p).periodicityAndPattern[j] = NR_RateMatchPattern__patternType__bitmaps__periodicityAndPattern_PR_n4; - break; - case 5: - NRRRC_CONFIGURATION_REQ (msg_p).periodicityAndPattern[j] = NR_RateMatchPattern__patternType__bitmaps__periodicityAndPattern_PR_n5; - break; - case 8: - NRRRC_CONFIGURATION_REQ (msg_p).periodicityAndPattern[j] = NR_RateMatchPattern__patternType__bitmaps__periodicityAndPattern_PR_n8; - break; - case 10: - NRRRC_CONFIGURATION_REQ (msg_p).periodicityAndPattern[j] = NR_RateMatchPattern__patternType__bitmaps__periodicityAndPattern_PR_n10; - break; - case 20: - NRRRC_CONFIGURATION_REQ (msg_p).periodicityAndPattern[j] = NR_RateMatchPattern__patternType__bitmaps__periodicityAndPattern_PR_n20; - break; - case 40: - NRRRC_CONFIGURATION_REQ (msg_p).periodicityAndPattern[j] = NR_RateMatchPattern__patternType__bitmaps__periodicityAndPattern_PR_n40; - break; - default: - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for periodicityAndPattern choice: 2,4,5,8,10,20,40 !\n", - RC.config_file_name, i, periodicityAndPattern); - break; - } - - NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPattern_controlResourceSet[j] = RateMatchPattern_controlResourceSet; - if ((RateMatchPattern_controlResourceSet <0) || (RateMatchPattern_controlResourceSet>11)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for RateMatchPattern_controlResourceSet choice: 0..3 !\n", - RC.config_file_name, i, RateMatchPattern_controlResourceSet); - } - - if (strcmp(RateMatchPattern_subcarrierSpacing,"kHz15")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPattern_subcarrierSpacing[j] = NR_SubcarrierSpacing_kHz15; - }else if (strcmp(RateMatchPattern_subcarrierSpacing,"kHz30")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPattern_subcarrierSpacing[j] = NR_SubcarrierSpacing_kHz30; - }else if (strcmp(RateMatchPattern_subcarrierSpacing,"kHz60")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPattern_subcarrierSpacing[j] = NR_SubcarrierSpacing_kHz60; - }else if (strcmp(RateMatchPattern_subcarrierSpacing,"kHz120")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPattern_subcarrierSpacing[j] = NR_SubcarrierSpacing_kHz120; - }else if (strcmp(RateMatchPattern_subcarrierSpacing,"kHz240")==0) { - NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPattern_subcarrierSpacing[j] = NR_SubcarrierSpacing_kHz240; - }else { - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for RateMatchPattern_subcarrierSpacing choice: minusinfinity,kHz15,kHz30,kHz60,kHz120,kHz240!\n", - RC.config_file_name, i, RateMatchPattern_subcarrierSpacing); - } - - if (strcmp(RateMatchPattern_mode , "dynamic") == 0){ -#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) - NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPattern_mode[j] = NR_RateMatchPattern__dummy_dynamic; -#else - NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPattern_mode[j] = NR_RateMatchPattern__mode_dynamic; -#endif - }else if (strcmp(RateMatchPattern_mode , "semiStatic") == 0){ -#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) - NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPattern_mode[j] = NR_RateMatchPattern__dummy_semiStatic; -#else - NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPattern_mode[j] = NR_RateMatchPattern__mode_semiStatic; -#endif - }else { - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for RateMatchPattern_mode !\n", - RC.config_file_name, i, RateMatchPattern_mode); - } - - //////////////////////////////////NR PDCCH-ConfigCommon/////////////////////////// - NRRRC_CONFIGURATION_REQ (msg_p).controlResourceSetZero[j] = controlResourceSetZero; - if ((controlResourceSetZero <0) || (controlResourceSetZero>15)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for controlResourceSetZero choice: 0..15 !\n", - RC.config_file_name, i, controlResourceSetZero); - } - - NRRRC_CONFIGURATION_REQ (msg_p).searchSpaceZero[j] = searchSpaceZero; - if ((searchSpaceZero <0) || (searchSpaceZero>15)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for searchSpaceZero choice: 0..15 !\n", - RC.config_file_name, i, searchSpaceZero); - } - - NRRRC_CONFIGURATION_REQ (msg_p).searchSpaceSIB1[j] = searchSpaceSIB1; - if ((searchSpaceSIB1 <0) || (searchSpaceSIB1>39)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for searchSpaceSIB1 choice: 0..39 !\n", - RC.config_file_name, i, searchSpaceSIB1); - } - - NRRRC_CONFIGURATION_REQ (msg_p).searchSpaceOtherSystemInformation[j] = searchSpaceOtherSystemInformation; - if ((searchSpaceOtherSystemInformation <0) || (searchSpaceOtherSystemInformation>39)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for searchSpaceOtherSystemInformation choice: 0..39 !\n", - RC.config_file_name, i, searchSpaceOtherSystemInformation); - } - - NRRRC_CONFIGURATION_REQ (msg_p).pagingSearchSpace[j] = pagingSearchSpace; - if ((pagingSearchSpace <0) || (pagingSearchSpace>39)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for pagingSearchSpace choice: 0..39 !\n", - RC.config_file_name, i, pagingSearchSpace); - } - - NRRRC_CONFIGURATION_REQ (msg_p).ra_SearchSpace[j] = ra_SearchSpace; - if ((ra_SearchSpace <0) || (ra_SearchSpace>39)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for ra_SearchSpace choice: 0..39 !\n", - RC.config_file_name, i, ra_SearchSpace); - } - - //////////////////////////////////NR PDCCH commonControlResourcesSets/////////////////////////// - NRRRC_CONFIGURATION_REQ (msg_p).PDCCH_common_controlResourceSetId[j] = PDCCH_common_controlResourceSetId; - if ((PDCCH_common_controlResourceSetId <0) || (PDCCH_common_controlResourceSetId>11)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for PDCCH_common_controlResourceSetId choice: 0..11 !\n", - RC.config_file_name, i, PDCCH_common_controlResourceSetId); - } - - NRRRC_CONFIGURATION_REQ (msg_p).PDCCH_common_ControlResourceSet_duration[j] = PDCCH_common_ControlResourceSet_duration; - if ((PDCCH_common_ControlResourceSet_duration <0) || (PDCCH_common_ControlResourceSet_duration>3)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for PDCCH_common_ControlResourceSet_duration choice: 0..11 !\n", - RC.config_file_name, i, PDCCH_common_ControlResourceSet_duration); - } - - if (strcmp(PDCCH_cce_REG_MappingType , "NOTHING") == 0){ - NRRRC_CONFIGURATION_REQ (msg_p).PDCCH_cce_REG_MappingType[j] = NR_ControlResourceSet__cce_REG_MappingType_PR_NOTHING; - }else if (strcmp(PDCCH_cce_REG_MappingType , "interleaved") == 0){ - NRRRC_CONFIGURATION_REQ (msg_p).PDCCH_cce_REG_MappingType[j] = NR_ControlResourceSet__cce_REG_MappingType_PR_interleaved; - }else if (strcmp(PDCCH_cce_REG_MappingType , "nonInterleaved") == 0){ - NRRRC_CONFIGURATION_REQ (msg_p).PDCCH_cce_REG_MappingType[j] = NR_ControlResourceSet__cce_REG_MappingType_PR_nonInterleaved; - }else { - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for PDCCH_cce_REG_MappingType !\n", - RC.config_file_name, i, PDCCH_cce_REG_MappingType); - } - - switch(PDCCH_reg_BundleSize){ - case 2: - NRRRC_CONFIGURATION_REQ (msg_p).PDCCH_reg_BundleSize[j] = NR_ControlResourceSet__cce_REG_MappingType__interleaved__reg_BundleSize_n2; - break; - case 3: - NRRRC_CONFIGURATION_REQ (msg_p).PDCCH_reg_BundleSize[j] = NR_ControlResourceSet__cce_REG_MappingType__interleaved__reg_BundleSize_n3; - break; - case 6: - NRRRC_CONFIGURATION_REQ (msg_p).PDCCH_reg_BundleSize[j] = NR_ControlResourceSet__cce_REG_MappingType__interleaved__reg_BundleSize_n6; - break; - default: - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for PDCCH_reg_BundleSize choice: 2,3,6 !\n", - RC.config_file_name, i, PDCCH_reg_BundleSize); - break; - } - - switch(PDCCH_interleaverSize){ - case 2: - NRRRC_CONFIGURATION_REQ (msg_p).PDCCH_interleaverSize[j] = NR_ControlResourceSet__cce_REG_MappingType__interleaved__reg_BundleSize_n2; - break; - case 3: - NRRRC_CONFIGURATION_REQ (msg_p).PDCCH_interleaverSize[j] = NR_ControlResourceSet__cce_REG_MappingType__interleaved__reg_BundleSize_n3; - break; - case 6: - NRRRC_CONFIGURATION_REQ (msg_p).PDCCH_interleaverSize[j] = NR_ControlResourceSet__cce_REG_MappingType__interleaved__reg_BundleSize_n6; - break; - default: - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for PDCCH_interleaverSize choice: 2,3,6 !\n", - RC.config_file_name, i, PDCCH_interleaverSize); - break; - } - - NRRRC_CONFIGURATION_REQ (msg_p).PDCCH_shiftIndex[j] = PDCCH_shiftIndex; - if ((PDCCH_shiftIndex <0) || (PDCCH_shiftIndex>274)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for PDCCH_shiftIndex choice: 0..274 !\n", - RC.config_file_name, i, PDCCH_shiftIndex); - } - - if (strcmp(PDCCH_precoderGranularity , "sameAsREG-bundle") == 0){ - NRRRC_CONFIGURATION_REQ (msg_p).PDCCH_precoderGranularity[j] = NR_ControlResourceSet__precoderGranularity_sameAsREG_bundle; - }else if (strcmp(PDCCH_precoderGranularity , "allContiguousRBs") == 0){ - NRRRC_CONFIGURATION_REQ (msg_p).PDCCH_precoderGranularity[j] = NR_ControlResourceSet__precoderGranularity_allContiguousRBs; - }else { - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for PDCCH_precoderGranularity !\n", - RC.config_file_name, i, PDCCH_precoderGranularity); - } - - NRRRC_CONFIGURATION_REQ (msg_p).PDCCH_TCI_StateId[j] = PDCCH_TCI_StateId; - if ((PDCCH_TCI_StateId <0) || (PDCCH_TCI_StateId>63)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for PDCCH_TCI_StateId choice: 0..63 !\n", - RC.config_file_name, i, PDCCH_TCI_StateId); - } - - if (strcmp(tci_PresentInDCI , "ENABLE") == 0){ - NRRRC_CONFIGURATION_REQ (msg_p).tci_PresentInDCI[j] = TRUE; - } - - NRRRC_CONFIGURATION_REQ (msg_p).PDCCH_DMRS_ScramblingID[j] = PDCCH_DMRS_ScramblingID; - if ((PDCCH_DMRS_ScramblingID <0) || (PDCCH_DMRS_ScramblingID>65535)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for PDCCH_DMRS_ScramblingID choice: 0..65535 !\n", - RC.config_file_name, i, PDCCH_DMRS_ScramblingID); - } - - //////////////////////////////////NR PDCCH commonSearchSpaces/////////////////////////// - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpaceId[j] = SearchSpaceId; - if ((SearchSpaceId <0) || (SearchSpaceId>39)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for SearchSpaceId choice: 0..39 !\n", - RC.config_file_name, i, SearchSpaceId); - } - - NRRRC_CONFIGURATION_REQ (msg_p).commonSearchSpaces_controlResourceSetId[j] = commonSearchSpaces_controlResourceSetId; - if ((commonSearchSpaces_controlResourceSetId <0) || (commonSearchSpaces_controlResourceSetId>11)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for commonSearchSpaces_controlResourceSetId choice: 0..11 !\n", - RC.config_file_name, i, commonSearchSpaces_controlResourceSetId); - } - - if (strcmp(SearchSpace_monitoringSlotPeriodicityAndOffset_choice , "sl1") == 0){ - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_monitoringSlotPeriodicityAndOffset_choice[j] = NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl1; - - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_monitoringSlotPeriodicityAndOffset_value[j] = 0; - - }else if (strcmp(SearchSpace_monitoringSlotPeriodicityAndOffset_choice , "sl2") == 0){ - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_monitoringSlotPeriodicityAndOffset_choice[j] = NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl2; - - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_monitoringSlotPeriodicityAndOffset_value[j] = SearchSpace_monitoringSlotPeriodicityAndOffset_value; - if ((SearchSpace_monitoringSlotPeriodicityAndOffset_value <0) || (SearchSpace_monitoringSlotPeriodicityAndOffset_value>1)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for SearchSpace_monitoringSlotPeriodicityAndOffset_value choice: 0..1 !\n", - RC.config_file_name, i, SearchSpace_monitoringSlotPeriodicityAndOffset_value); - } - - }else if (strcmp(SearchSpace_monitoringSlotPeriodicityAndOffset_choice , "sl4") == 0){ - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_monitoringSlotPeriodicityAndOffset_choice[j] = NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl4; - - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_monitoringSlotPeriodicityAndOffset_value[j] = SearchSpace_monitoringSlotPeriodicityAndOffset_value; - if ((SearchSpace_monitoringSlotPeriodicityAndOffset_value <0) || (SearchSpace_monitoringSlotPeriodicityAndOffset_value>3)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for SearchSpace_monitoringSlotPeriodicityAndOffset_value choice: 0..3 !\n", - RC.config_file_name, i, SearchSpace_monitoringSlotPeriodicityAndOffset_value); - } - - }else if (strcmp(SearchSpace_monitoringSlotPeriodicityAndOffset_choice , "sl5") == 0){ - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_monitoringSlotPeriodicityAndOffset_choice[j] = NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl5; - - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_monitoringSlotPeriodicityAndOffset_value[j] = SearchSpace_monitoringSlotPeriodicityAndOffset_value; - if ((SearchSpace_monitoringSlotPeriodicityAndOffset_value <0) || (SearchSpace_monitoringSlotPeriodicityAndOffset_value>4)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for SearchSpace_monitoringSlotPeriodicityAndOffset_value choice: 0..4 !\n", - RC.config_file_name, i, SearchSpace_monitoringSlotPeriodicityAndOffset_value); - } - - }else if (strcmp(SearchSpace_monitoringSlotPeriodicityAndOffset_choice , "sl8") == 0){ - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_monitoringSlotPeriodicityAndOffset_choice[j] = NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl8; - - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_monitoringSlotPeriodicityAndOffset_value[j] = SearchSpace_monitoringSlotPeriodicityAndOffset_value; - if ((SearchSpace_monitoringSlotPeriodicityAndOffset_value <0) || (SearchSpace_monitoringSlotPeriodicityAndOffset_value>7)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for SearchSpace_monitoringSlotPeriodicityAndOffset_value choice: 0..7 !\n", - RC.config_file_name, i, SearchSpace_monitoringSlotPeriodicityAndOffset_value); - } - - }else if (strcmp(SearchSpace_monitoringSlotPeriodicityAndOffset_choice , "sl10") == 0){ - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_monitoringSlotPeriodicityAndOffset_choice[j] = NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl10; - - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_monitoringSlotPeriodicityAndOffset_value[j] = SearchSpace_monitoringSlotPeriodicityAndOffset_value; - if ((SearchSpace_monitoringSlotPeriodicityAndOffset_value <0) || (SearchSpace_monitoringSlotPeriodicityAndOffset_value>9)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for SearchSpace_monitoringSlotPeriodicityAndOffset_value choice: 0..9 !\n", - RC.config_file_name, i, SearchSpace_monitoringSlotPeriodicityAndOffset_value); - } - - }else if (strcmp(SearchSpace_monitoringSlotPeriodicityAndOffset_choice , "sl16") == 0){ - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_monitoringSlotPeriodicityAndOffset_choice[j] = NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl16; - - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_monitoringSlotPeriodicityAndOffset_value[j] = SearchSpace_monitoringSlotPeriodicityAndOffset_value; - if ((SearchSpace_monitoringSlotPeriodicityAndOffset_value <0) || (SearchSpace_monitoringSlotPeriodicityAndOffset_value>15)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for SearchSpace_monitoringSlotPeriodicityAndOffset_value choice: 0..15 !\n", - RC.config_file_name, i, SearchSpace_monitoringSlotPeriodicityAndOffset_value); - } - - }else if (strcmp(SearchSpace_monitoringSlotPeriodicityAndOffset_choice , "sl20") == 0){ - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_monitoringSlotPeriodicityAndOffset_choice[j] = NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl20; - - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_monitoringSlotPeriodicityAndOffset_value[j] = SearchSpace_monitoringSlotPeriodicityAndOffset_value; - if ((SearchSpace_monitoringSlotPeriodicityAndOffset_value <0) || (SearchSpace_monitoringSlotPeriodicityAndOffset_value>19)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for SearchSpace_monitoringSlotPeriodicityAndOffset_value choice: 0..19 !\n", - RC.config_file_name, i, SearchSpace_monitoringSlotPeriodicityAndOffset_value); - } - - }else if (strcmp(SearchSpace_monitoringSlotPeriodicityAndOffset_choice , "UNABLE") == 0){ - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_monitoringSlotPeriodicityAndOffset_choice[j] = NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_NOTHING; - - }else { - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for SearchSpace_monitoringSlotPeriodicityAndOffset_choice !\n", - RC.config_file_name, i, SearchSpace_monitoringSlotPeriodicityAndOffset_choice); - }// End if (strcmp(SearchSpace_monitoringSlotPeriodicityAndOffset_choice , "sl1") - - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_duration[j] = SearchSpace_duration; - if ((SearchSpace_duration <2) || (SearchSpace_duration>2559)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for SearchSpace_duration choice: 2..2559 !\n", - RC.config_file_name, i, SearchSpace_duration); - } - - switch(SearchSpace_nrofCandidates_aggregationLevel1){ - case 0: - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_nrofCandidates_aggregationLevel1[j] = NR_SearchSpace__nrofCandidates__aggregationLevel1_n0; - break; - case 1: - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_nrofCandidates_aggregationLevel1[j] = NR_SearchSpace__nrofCandidates__aggregationLevel1_n1; - break; - case 2: - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_nrofCandidates_aggregationLevel1[j] = NR_SearchSpace__nrofCandidates__aggregationLevel1_n2; - break; - case 3: - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_nrofCandidates_aggregationLevel1[j] = NR_SearchSpace__nrofCandidates__aggregationLevel1_n3; - break; - case 4: - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_nrofCandidates_aggregationLevel1[j] = NR_SearchSpace__nrofCandidates__aggregationLevel1_n4; - break; - case 5: - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_nrofCandidates_aggregationLevel1[j] = NR_SearchSpace__nrofCandidates__aggregationLevel1_n5; - break; - case 6: - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_nrofCandidates_aggregationLevel1[j] = NR_SearchSpace__nrofCandidates__aggregationLevel1_n6; - break; - case 8: - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_nrofCandidates_aggregationLevel1[j] = NR_SearchSpace__nrofCandidates__aggregationLevel1_n8; - break; - default: - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for SearchSpace_nrofCandidates_aggregationLevel1 choice: 0,1,2,3,4,5,6,8 !\n", - RC.config_file_name, i, SearchSpace_nrofCandidates_aggregationLevel1); - break; - } - - switch(SearchSpace_nrofCandidates_aggregationLevel2){ - case 0: - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_nrofCandidates_aggregationLevel2[j] = NR_SearchSpace__nrofCandidates__aggregationLevel2_n0; - break; - case 1: - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_nrofCandidates_aggregationLevel2[j] = NR_SearchSpace__nrofCandidates__aggregationLevel2_n1; - break; - case 2: - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_nrofCandidates_aggregationLevel2[j] = NR_SearchSpace__nrofCandidates__aggregationLevel2_n2; - break; - case 3: - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_nrofCandidates_aggregationLevel2[j] = NR_SearchSpace__nrofCandidates__aggregationLevel2_n3; - break; - case 4: - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_nrofCandidates_aggregationLevel2[j] = NR_SearchSpace__nrofCandidates__aggregationLevel2_n4; - break; - case 5: - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_nrofCandidates_aggregationLevel2[j] = NR_SearchSpace__nrofCandidates__aggregationLevel2_n5; - break; - case 6: - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_nrofCandidates_aggregationLevel2[j] = NR_SearchSpace__nrofCandidates__aggregationLevel2_n6; - break; - case 8: - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_nrofCandidates_aggregationLevel2[j] = NR_SearchSpace__nrofCandidates__aggregationLevel2_n8; - break; - default: - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for SearchSpace_nrofCandidates_aggregationLevel2 choice: 0,1,2,3,4,5,6,8 !\n", - RC.config_file_name, i, SearchSpace_nrofCandidates_aggregationLevel2); - break; - } - - switch(SearchSpace_nrofCandidates_aggregationLevel4){ - case 0: - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_nrofCandidates_aggregationLevel4[j] = NR_SearchSpace__nrofCandidates__aggregationLevel4_n0; - break; - case 1: - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_nrofCandidates_aggregationLevel4[j] = NR_SearchSpace__nrofCandidates__aggregationLevel4_n1; - break; - case 2: - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_nrofCandidates_aggregationLevel4[j] = NR_SearchSpace__nrofCandidates__aggregationLevel4_n2; - break; - case 3: - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_nrofCandidates_aggregationLevel4[j] = NR_SearchSpace__nrofCandidates__aggregationLevel4_n3; - break; - case 4: - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_nrofCandidates_aggregationLevel4[j] = NR_SearchSpace__nrofCandidates__aggregationLevel4_n4; - break; - case 5: - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_nrofCandidates_aggregationLevel4[j] = NR_SearchSpace__nrofCandidates__aggregationLevel4_n5; - break; - case 6: - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_nrofCandidates_aggregationLevel4[j] = NR_SearchSpace__nrofCandidates__aggregationLevel4_n6; - break; - case 8: - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_nrofCandidates_aggregationLevel4[j] = NR_SearchSpace__nrofCandidates__aggregationLevel4_n8; - break; - default: - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for SearchSpace_nrofCandidates_aggregationLevel4 choice: 0,1,2,3,4,5,6,8 !\n", - RC.config_file_name, i, SearchSpace_nrofCandidates_aggregationLevel4); - break; - } - - switch(SearchSpace_nrofCandidates_aggregationLevel8){ - case 0: - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_nrofCandidates_aggregationLevel8[j] = NR_SearchSpace__nrofCandidates__aggregationLevel8_n0; - break; - case 1: - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_nrofCandidates_aggregationLevel8[j] = NR_SearchSpace__nrofCandidates__aggregationLevel8_n1; - break; - case 2: - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_nrofCandidates_aggregationLevel8[j] = NR_SearchSpace__nrofCandidates__aggregationLevel8_n2; - break; - case 3: - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_nrofCandidates_aggregationLevel8[j] = NR_SearchSpace__nrofCandidates__aggregationLevel8_n3; - break; - case 4: - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_nrofCandidates_aggregationLevel8[j] = NR_SearchSpace__nrofCandidates__aggregationLevel8_n4; - break; - case 5: - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_nrofCandidates_aggregationLevel8[j] = NR_SearchSpace__nrofCandidates__aggregationLevel8_n5; - break; - case 6: - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_nrofCandidates_aggregationLevel8[j] = NR_SearchSpace__nrofCandidates__aggregationLevel8_n6; - break; - case 8: - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_nrofCandidates_aggregationLevel8[j] = NR_SearchSpace__nrofCandidates__aggregationLevel8_n8; - break; - default: - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for SearchSpace_nrofCandidates_aggregationLevel8 choice: 0,1,2,3,4,5,6,8 !\n", - RC.config_file_name, i, SearchSpace_nrofCandidates_aggregationLevel8); - break; - } - - switch(SearchSpace_nrofCandidates_aggregationLevel16){ - case 0: - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_nrofCandidates_aggregationLevel16[j] = NR_SearchSpace__nrofCandidates__aggregationLevel16_n0; - break; - case 1: - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_nrofCandidates_aggregationLevel16[j] = NR_SearchSpace__nrofCandidates__aggregationLevel16_n1; - break; - case 2: - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_nrofCandidates_aggregationLevel16[j] = NR_SearchSpace__nrofCandidates__aggregationLevel16_n2; - break; - case 3: - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_nrofCandidates_aggregationLevel16[j] = NR_SearchSpace__nrofCandidates__aggregationLevel16_n3; - break; - case 4: - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_nrofCandidates_aggregationLevel16[j] = NR_SearchSpace__nrofCandidates__aggregationLevel16_n4; - break; - case 5: - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_nrofCandidates_aggregationLevel16[j] = NR_SearchSpace__nrofCandidates__aggregationLevel16_n5; - break; - case 6: - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_nrofCandidates_aggregationLevel16[j] = NR_SearchSpace__nrofCandidates__aggregationLevel16_n6; - break; - case 8: - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_nrofCandidates_aggregationLevel16[j] = NR_SearchSpace__nrofCandidates__aggregationLevel16_n8; - break; - default: - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for SearchSpace_nrofCandidates_aggregationLevel16 choice: 0,1,2,3,4,5,6,8 !\n", - RC.config_file_name, i, SearchSpace_nrofCandidates_aggregationLevel16); - break; - } - - if (strcmp(SearchSpace_searchSpaceType , "NOTHING") == 0){ - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_searchSpaceType[j] = NR_SearchSpace__searchSpaceType_PR_NOTHING; - }else if (strcmp(SearchSpace_searchSpaceType , "common") == 0){ - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_searchSpaceType[j] = NR_SearchSpace__searchSpaceType_PR_common; - }else if (strcmp(SearchSpace_searchSpaceType , "ue_Specific") == 0){ - NRRRC_CONFIGURATION_REQ (msg_p).SearchSpace_searchSpaceType[j] = NR_SearchSpace__searchSpaceType_PR_ue_Specific; - }else { - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for SearchSpace_searchSpaceType !\n", - RC.config_file_name, i, SearchSpace_searchSpaceType); - } - - switch(Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel1){ - case 1: - NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel1[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_0__nrofCandidates_SFI__aggregationLevel1_n1; - break; - case 2: - NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel1[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_0__nrofCandidates_SFI__aggregationLevel1_n2; - break; - default: - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel1 choice: 1,2 !\n", - RC.config_file_name, i, Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel1); - break; - } - - switch(Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel2){ - case 1: - NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel2[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_0__nrofCandidates_SFI__aggregationLevel2_n1; - break; - case 2: - NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel2[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_0__nrofCandidates_SFI__aggregationLevel2_n2; - break; - default: - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel2 choice: 1,2 !\n", - RC.config_file_name, i, Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel2); - break; - } - - switch(Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel4){ - case 1: - NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel4[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_0__nrofCandidates_SFI__aggregationLevel4_n1; - break; - case 2: - NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel4[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_0__nrofCandidates_SFI__aggregationLevel4_n2; - break; - default: - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel4 choice: 1,2 !\n", - RC.config_file_name, i, Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel4); - break; - } - - switch(Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel8){ - case 1: - NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel8[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_0__nrofCandidates_SFI__aggregationLevel8_n1; - break; - case 2: - NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel8[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_0__nrofCandidates_SFI__aggregationLevel8_n2; - break; - default: - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel8 choice: 1,2 !\n", - RC.config_file_name, i, Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel8); - break; - } - - switch(Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel16){ - case 1: - NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel16[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_0__nrofCandidates_SFI__aggregationLevel16_n1; - break; - case 2: - NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel16[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_0__nrofCandidates_SFI__aggregationLevel16_n2; - break; - default: - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel16 choice: 1,2 !\n", - RC.config_file_name, i, Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel16); - break; - } - - switch(Common_dci_Format2_3_monitoringPeriodicity){ - case 1: -#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) - NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl1; -#else - NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n1; -#endif - break; - case 2: -#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) - NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl2; -#else - NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n2; -#endif - break; - case 4: -#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) - NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl4; -#else - NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n4; -#endif - break; - case 5: -#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) - NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl5; -#else - NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n5; -#endif - break; - case 8: -#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) - NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl8; -#else - NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n8; -#endif - break; - case 10: -#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) - NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl10; -#else - NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n10; -#endif - break; - case 16: -#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) - NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl16; -#else - NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n16; -#endif - break; - case 20: -#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) - NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl20; -#else - NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n20; -#endif - break; - default: -#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for Common_dci_Format2_3_dummy1 choice: 1,2,4,5,8,10,16,20 !\n", - RC.config_file_name, i, Common_dci_Format2_3_monitoringPeriodicity); -#else - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for Common_dci_Format2_3_monitoringPeriodicity choice: 1,2,4,5,8,10,16,20 !\n", - RC.config_file_name, i, Common_dci_Format2_3_monitoringPeriodicity); -#endif - break; - } - - switch(Common_dci_Format2_3_nrofPDCCH_Candidates){ - case 1: -#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) - NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_nrofPDCCH_Candidates[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy2_n1; -#else - NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_nrofPDCCH_Candidates[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__nrofPDCCH_Candidates_n1; -#endif - break; - case 2: -#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) - NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_nrofPDCCH_Candidates[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy2_n2; -#else - NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_nrofPDCCH_Candidates[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__nrofPDCCH_Candidates_n2; -#endif - break; - default: - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for Common_dci_Format2_3_nrofPDCCH_Candidates choice: 1,2 !\n", - RC.config_file_name, i, Common_dci_Format2_3_nrofPDCCH_Candidates); - break; - } - - if (strcmp(ue_Specific__dci_Formats , "formats0-0-And-1-0") == 0){ - NRRRC_CONFIGURATION_REQ (msg_p).ue_Specific__dci_Formats[j] = NR_SearchSpace__searchSpaceType__ue_Specific__dci_Formats_formats0_0_And_1_0; - }else if (strcmp(ue_Specific__dci_Formats , "formats0-1-And-1-1") == 0){ - NRRRC_CONFIGURATION_REQ (msg_p).ue_Specific__dci_Formats[j] = NR_SearchSpace__searchSpaceType__ue_Specific__dci_Formats_formats0_1_And_1_1; - }else { - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for ue_Specific__dci_Formats !\n", - RC.config_file_name, i, ue_Specific__dci_Formats); - } - - //////////////////////////////////NR RateMatchPatternLTE-CRS/////////////////////////// - - NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_carrierFreqDL[j] = RateMatchPatternLTE_CRS_carrierFreqDL; - if ((RateMatchPatternLTE_CRS_carrierFreqDL <0) || (RateMatchPatternLTE_CRS_carrierFreqDL>16383)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for RateMatchPatternLTE_CRS_carrierFreqDL choice: 0..16383 !\n", - RC.config_file_name, i, RateMatchPatternLTE_CRS_carrierFreqDL); - } - - - switch(RateMatchPatternLTE_CRS_carrierBandwidthDL){ - case 6: - NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_carrierBandwidthDL[j] = NR_RateMatchPatternLTE_CRS__carrierBandwidthDL_n6; - break; - case 15: - NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_carrierBandwidthDL[j] = NR_RateMatchPatternLTE_CRS__carrierBandwidthDL_n15; - break; - case 25: - NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_carrierBandwidthDL[j] = NR_RateMatchPatternLTE_CRS__carrierBandwidthDL_n25; - break; - case 50: - NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_carrierBandwidthDL[j] = NR_RateMatchPatternLTE_CRS__carrierBandwidthDL_n50; - break; - case 75: - NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_carrierBandwidthDL[j] = NR_RateMatchPatternLTE_CRS__carrierBandwidthDL_n75; - break; - case 100: - NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_carrierBandwidthDL[j] = NR_RateMatchPatternLTE_CRS__carrierBandwidthDL_n100; - break; - default: - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for RateMatchPatternLTE_CRS_carrierBandwidthDL choice: 6,15,25,50,75,100 !\n", - RC.config_file_name, i, RateMatchPatternLTE_CRS_carrierBandwidthDL); - break; - } - - switch(RateMatchPatternLTE_CRS_nrofCRS_Ports){ - case 1: - NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_nrofCRS_Ports[j] = NR_RateMatchPatternLTE_CRS__nrofCRS_Ports_n1; - break; - case 2: - NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_nrofCRS_Ports[j] = NR_RateMatchPatternLTE_CRS__nrofCRS_Ports_n2; - break; - case 4: - NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_nrofCRS_Ports[j] = NR_RateMatchPatternLTE_CRS__nrofCRS_Ports_n4; - break; - default: - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for RateMatchPatternLTE_CRS_nrofCRS_Ports choice: 1,2,4 !\n", - RC.config_file_name, i, RateMatchPatternLTE_CRS_nrofCRS_Ports); - break; - } - - switch(RateMatchPatternLTE_CRS_v_Shift){ - case 0: - NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_v_Shift[j] = NR_RateMatchPatternLTE_CRS__v_Shift_n0; - break; - case 1: - NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_v_Shift[j] = NR_RateMatchPatternLTE_CRS__v_Shift_n1; - break; - case 2: - NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_v_Shift[j] = NR_RateMatchPatternLTE_CRS__v_Shift_n2; - break; - case 3: - NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_v_Shift[j] = NR_RateMatchPatternLTE_CRS__v_Shift_n3; - break; - case 4: - NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_v_Shift[j] = NR_RateMatchPatternLTE_CRS__v_Shift_n4; - break; - case 5: - NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_v_Shift[j] = NR_RateMatchPatternLTE_CRS__v_Shift_n5; - break; - default: - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for RateMatchPatternLTE_CRS_v_Shift choice: 0,1,2,3,4,5 !\n", - RC.config_file_name, i, RateMatchPatternLTE_CRS_v_Shift); - break; - } - - switch(RateMatchPatternLTE_CRS_radioframeAllocationPeriod){ - case 1: - NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_radioframeAllocationPeriod[j] = NR_EUTRA_MBSFN_SubframeConfig__radioframeAllocationPeriod_n1; - break; - case 2: - NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_radioframeAllocationPeriod[j] = NR_EUTRA_MBSFN_SubframeConfig__radioframeAllocationPeriod_n2; - break; - case 4: - NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_radioframeAllocationPeriod[j] = NR_EUTRA_MBSFN_SubframeConfig__radioframeAllocationPeriod_n4; - break; - case 8: - NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_radioframeAllocationPeriod[j] = NR_EUTRA_MBSFN_SubframeConfig__radioframeAllocationPeriod_n8; - break; - case 16: - NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_radioframeAllocationPeriod[j] = NR_EUTRA_MBSFN_SubframeConfig__radioframeAllocationPeriod_n16; - break; - case 32: - NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_radioframeAllocationPeriod[j] = NR_EUTRA_MBSFN_SubframeConfig__radioframeAllocationPeriod_n32; - break; - default: - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for RateMatchPatternLTE_CRS_radioframeAllocationPeriod choice: 1,2,4,8,16,32 !\n", - RC.config_file_name, i, RateMatchPatternLTE_CRS_radioframeAllocationPeriod); - break; - } - - NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_radioframeAllocationOffset[j] = RateMatchPatternLTE_CRS_radioframeAllocationOffset; - if ((RateMatchPatternLTE_CRS_radioframeAllocationOffset <0) || (RateMatchPatternLTE_CRS_radioframeAllocationOffset>7)){ - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for RateMatchPatternLTE_CRS_radioframeAllocationOffset choice: 0..7 !\n", - RC.config_file_name, i, RateMatchPatternLTE_CRS_radioframeAllocationOffset); - } - - if (strcmp(RateMatchPatternLTE_CRS_subframeAllocation_choice , "oneFrame") == 0){ -#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) - NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_subframeAllocation_choice[j] = NR_EUTRA_MBSFN_SubframeConfig__subframeAllocation1_PR_oneFrame; -#else - NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_subframeAllocation_choice[j] = NR_EUTRA_MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame; -#endif - }else if (strcmp(RateMatchPatternLTE_CRS_subframeAllocation_choice , "fourFrames") == 0){ -#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) - NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_subframeAllocation_choice[j] = NR_EUTRA_MBSFN_SubframeConfig__subframeAllocation1_PR_fourFrames; -#else - NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_subframeAllocation_choice[j] = NR_EUTRA_MBSFN_SubframeConfig__subframeAllocation_PR_fourFrames; -#endif - }else { - AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for RateMatchPatternLTE_CRS_subframeAllocation_choice !\n", - RC.config_file_name, i, RateMatchPatternLTE_CRS_subframeAllocation_choice); - } - - - }//End for (j = 0; j < CCsParamList.numelt ;j++) - - }//End if ( CCsParamList.numelt> 0) - - }//End for (k=0; k 0) { - RC.nb_nr_CC = (int *)malloc((1+RC.nb_nr_inst)*sizeof(int)); - for (int i=0;iconfig[CC_idP]; + nfapi_nr_config_request_t *cfg = &RC.nrmac[Mod_idP]->config[0]; cfg->num_tlv=0; - cfg->rf_config.dl_subcarrierspacing.value = subCarrierSpacingCommon; + cfg->rf_config.dl_subcarrierspacing.value = subcarrierSpacingCommon; cfg->rf_config.dl_subcarrierspacing.tl.tag = NFAPI_NR_RF_CONFIG_DL_SUBCARRIERSPACING_TAG; cfg->num_tlv++; - cfg->rf_config.ul_subcarrierspacing.value = subCarrierSpacingCommon; + cfg->rf_config.ul_subcarrierspacing.value = subcarrierSpacingCommon; cfg->rf_config.ul_subcarrierspacing.tl.tag = NFAPI_NR_RF_CONFIG_UL_SUBCARRIERSPACING_TAG; cfg->num_tlv++; @@ -79,33 +75,30 @@ void config_nr_mib(int Mod_idP, } void config_common(int Mod_idP, - int CC_idP, - int cellid, - int nr_bandP, - uint64_t ssb_pattern, - uint64_t dl_CarrierFreqP, - uint32_t dl_BandwidthP + NR_ServingCellConfigCommon_t *scc ){ - nfapi_nr_config_request_t *cfg = &RC.nrmac[Mod_idP]->config[CC_idP]; + nfapi_nr_config_request_t *cfg = &RC.nrmac[Mod_idP]->config[0]; int mu = 1; - cfg->sch_config.physical_cell_id.value = cellid; - cfg->sch_config.ssb_scg_position_in_burst.value = ssb_pattern; + cfg->sch_config.physical_cell_id.value = *scc->physCellId; + cfg->sch_config.ssb_scg_position_in_burst.value = scc->ssb_PositionsInBurst->choice.mediumBitmap.buf[0]; + - // FDD + // TDD cfg->subframe_config.duplex_mode.value = 1; cfg->subframe_config.duplex_mode.tl.tag = NFAPI_SUBFRAME_CONFIG_DUPLEX_MODE_TAG; cfg->num_tlv++; /// In NR DL and UL will be different band cfg->nfapi_config.rf_bands.number_rf_bands = 1; - cfg->nfapi_config.rf_bands.rf_band[0] = nr_bandP; + cfg->nfapi_config.rf_bands.rf_band[0] = *(long*)scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0]; cfg->nfapi_config.rf_bands.tl.tag = NFAPI_PHY_RF_BANDS_TAG; cfg->num_tlv++; - cfg->nfapi_config.nrarfcn.value = to_nrarfcn(nr_bandP,dl_CarrierFreqP,dl_BandwidthP*180000*(1+mu)); + cfg->nfapi_config.nrarfcn.value = scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA; + cfg->nfapi_config.nrarfcn.tl.tag = NFAPI_NR_NFAPI_NRARFCN_TAG; cfg->num_tlv++; @@ -113,15 +106,31 @@ void config_common(int Mod_idP, //cfg->subframe_config.tl.tag = //cfg->num_tlv++; - cfg->rf_config.dl_carrier_bandwidth.value = dl_BandwidthP; + cfg->rf_config.dl_carrier_bandwidth.value = scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->carrierBandwidth; cfg->rf_config.dl_carrier_bandwidth.tl.tag = NFAPI_RF_CONFIG_DL_CHANNEL_BANDWIDTH_TAG; //temporary cfg->num_tlv++; - LOG_I(PHY,"%s() dl_BandwidthP:%d\n", __FUNCTION__, dl_BandwidthP); + LOG_I(PHY,"%s() dl_BandwidthP:%d\n", __FUNCTION__, cfg->rf_config.dl_carrier_bandwidth.value); - cfg->rf_config.ul_carrier_bandwidth.value = dl_BandwidthP; + cfg->rf_config.ul_carrier_bandwidth.value = scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->carrierBandwidth; cfg->rf_config.ul_carrier_bandwidth.tl.tag = NFAPI_RF_CONFIG_UL_CHANNEL_BANDWIDTH_TAG; //temporary cfg->num_tlv++; + cfg->rach_config.prach_RootSequenceIndex.value = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->prach_RootSequenceIndex.choice.l139; + if (scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg1_SubcarrierSpacing) + cfg->rach_config.prach_msg1_SubcarrierSpacing.value = *scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg1_SubcarrierSpacing; + else cfg->rach_config.prach_msg1_SubcarrierSpacing.value=cfg->rf_config.dl_subcarrierspacing.value; + + cfg->rach_config.restrictedSetConfig.value = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->restrictedSetConfig; + if (scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg3_transformPrecoder) + cfg->rach_config.msg3_transformPrecoding.value = 1; + else cfg->rach_config.msg3_transformPrecoding.value = 0; + + cfg->rach_config.prach_ConfigurationIndex.value = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.prach_ConfigurationIndex; + cfg->rach_config.prach_msg1_FDM.value = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.msg1_FDM; + cfg->rach_config.prach_msg1_FrequencyStart.value = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.msg1_FrequencyStart; + cfg->rach_config.zeroCorrelationZoneConfig.value = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.zeroCorrelationZoneConfig; + cfg->rach_config.preambleReceivedTargetPower.value = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.preambleReceivedTargetPower; + //cfg->sch_config.half_frame_index.value = 0; Fix in PHY //cfg->sch_config.n_ssb_crb.value = 86; Fix in PHY @@ -132,48 +141,22 @@ void config_common(int Mod_idP, }*/ int rrc_mac_config_req_gNB(module_id_t Mod_idP, - int CC_idP, - int cellid, - int p_gNB, - int nr_bandP, - uint64_t ssb_pattern, - uint64_t dl_CarrierFreqP, - int dl_BandwidthP, - NR_BCCH_BCH_Message_t *mib, - NR_ServingCellConfigCommon_t *servingcellconfigcommon + int ssb_SubcarrierOffset, + NR_ServingCellConfigCommon_t *scc ){ + AssertFatal(scc!=NULL,"scc is null\n"); + config_nr_mib(Mod_idP, + *scc->subcarrierSpacing, + ssb_SubcarrierOffset, + scc->dmrs_TypeA_Position, + *scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->controlResourceSetZero * 16 + *scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->searchSpaceZero + ); - if( mib != NULL ){ - config_nr_mib(Mod_idP, - CC_idP, - p_gNB, - mib->message.choice.mib->subCarrierSpacingCommon, - mib->message.choice.mib->ssb_SubcarrierOffset, - mib->message.choice.mib->dmrs_TypeA_Position, -#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) - mib->message.choice.mib->pdcch_ConfigSIB1.controlResourceSetZero * 16 + mib->message.choice.mib->pdcch_ConfigSIB1.searchSpaceZero, -#else - mib->message.choice.mib->pdcch_ConfigSIB1, -#endif - mib->message.choice.mib->cellBarred, - mib->message.choice.mib->intraFreqReselection - ); - }// END if( mib != NULL ) - - - if( servingcellconfigcommon != NULL ){ - config_common(Mod_idP, - CC_idP, - cellid, - nr_bandP, - ssb_pattern, - dl_CarrierFreqP, - dl_BandwidthP - ); - }//END if( servingcellconfigcommon != NULL ) - + AssertFatal(scc->ssb_PositionsInBurst->present == NR_ServingCellConfigCommon__ssb_PositionsInBurst_PR_mediumBitmap, "SSB Bitmap is not 8-bits!\n"); + config_common(Mod_idP, + scc); LOG_E(MAC, "%s() %s:%d RC.nrmac[Mod_idP]->if_inst->NR_PHY_config_req:%p\n", __FUNCTION__, __FILE__, __LINE__, RC.nrmac[Mod_idP]->if_inst->NR_PHY_config_req); @@ -186,16 +169,16 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP, } } - if (servingcellconfigcommon != NULL){ - NR_PHY_Config_t phycfg; - phycfg.Mod_id = Mod_idP; - phycfg.CC_id = CC_idP; - phycfg.cfg = &RC.nrmac[Mod_idP]->config[CC_idP]; - - if (RC.nrmac[Mod_idP]->if_inst->NR_PHY_config_req) RC.nrmac[Mod_idP]->if_inst->NR_PHY_config_req(&phycfg); - - VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_FUNCTION_OUT); - } + + NR_PHY_Config_t phycfg; + phycfg.Mod_id = Mod_idP; + phycfg.CC_id = 0; + phycfg.cfg = &RC.nrmac[Mod_idP]->config[0]; + + if (RC.nrmac[Mod_idP]->if_inst->NR_PHY_config_req) RC.nrmac[Mod_idP]->if_inst->NR_PHY_config_req(&phycfg); + + VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_FUNCTION_OUT); + return(0); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c index 02c27930d3..c8741c6476 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c @@ -261,6 +261,20 @@ void schedule_nr_SRS(module_id_t module_idP, frame_t frameP, sub_frame_t subfram } } */ + +/* +void schedule_nr_prach(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) { + + gNB_MAC_INST *gNB = RC.nrmac[module_idP]; + + // schedule PRACH for iniital BWP + + if (is_initialBWP_prach_subframe(frameP,subframeP)<0) return; + + // fill FAPI +} +*/ + void copy_nr_ulreq(module_id_t module_idP, frame_t frameP, sub_frame_t slotP) { int CC_id; @@ -350,10 +364,10 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, (UE_list->UE_sched_ctrl[i].pucch1_snr[CC_id] - 128) / 2); } - RC.gNB[module_idP][CC_id]->pusch_stats_bsr[i][to_absslot(cfg,frameP,slotP)] = -63; + RC.gNB[module_idP]->pusch_stats_bsr[i][to_absslot(cfg,frameP,slotP)] = -63; if (i == UE_list->head) - VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_UE0_BSR,RC.gNB[module_idP][CC_id]-> + VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_UE0_BSR,RC.gNB[module_idP]-> pusch_stats_bsr[i][to_absslot(cfg,frameP,slotP)]); // increment this, it is cleared when we receive an sdu @@ -386,7 +400,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, // Note: This should not be done in the MAC! for (int ii=0; iiulsch[ii][0]; + NR_gNB_ULSCH_t *ulsch = RC.gNB[module_idP]->ulsch[ii][0]; if((ulsch != NULL) && (ulsch->rnti == rnti)){ LOG_W(MAC, "TODO: clean_eNb_ulsch UE %x \n", rnti); clean_gNB_ulsch(ulsch); @@ -394,7 +408,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, } for (int ii=0; iidlsch[ii][0]; + NR_gNB_DLSCH_t *dlsch = RC.gNB[module_idP]->dlsch[ii][0]; if((dlsch != NULL) && (dlsch->rnti == rnti)){ LOG_W(MAC, "TODO: clean_eNb_dlsch UE %x \n", rnti); clean_gNB_dlsch(dlsch); diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h index 9e70ae7025..0cd60a5ede 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h +++ b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h @@ -37,23 +37,11 @@ void mac_top_init_gNB(void); void config_common(int Mod_idP, - int CC_idP, - int Nid_cell, - int nr_bandP, - uint64_t ssb_pattern, - uint64_t dl_CarrierFreqP, - uint32_t dl_BandwidthP); - + NR_ServingCellConfigCommon_t *scc + ); int rrc_mac_config_req_gNB(module_id_t Mod_idP, - int CC_id, - int cellid, - int p_gNB, - int nr_bandP, - uint64_t ssb_pattern, - uint64_t dl_CarrierFreqP, - int dl_BandwidthP, - NR_BCCH_BCH_Message_t *mib, - NR_ServingCellConfigCommon_t *servingcellconfigcommon + int ssb_SubcarrierOffset, + NR_ServingCellConfigCommon_t *scc ); int is_nr_UL_slot(NR_COMMON_channels_t * ccP, int slotP); @@ -121,13 +109,10 @@ uint64_t from_nrarfcn(int nr_bandP, uint32_t dl_nrarfcn); uint32_t to_nrarfcn(int nr_bandP, uint64_t dl_CarrierFreq, uint32_t bw); void config_nr_mib(int Mod_idP, - int CC_idP, - int p_gNBP, - int subCarrierSpacingCommon, - uint32_t ssb_SubcarrierOffset, - int dmrs_TypeA_Position, - uint32_t pdcch_ConfigSIB1, - int cellBarred, - int intraFreqReselection); + int subCarrierSpacingCommon, + uint32_t ssb_SubcarrierOffset, + int dmrs_TypeA_Position, + uint32_t pdcch_ConfigSIB1 + ); #endif /*__LAYER2_NR_MAC_PROTO_H__*/ diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_mac_common.c b/openair2/LAYER2/NR_MAC_gNB/nr_mac_common.c index f2c2e437cc..2d6cc04db8 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_mac_common.c +++ b/openair2/LAYER2/NR_MAC_gNB/nr_mac_common.c @@ -143,6 +143,20 @@ uint64_t from_nrarfcn(int nr_bandP, uint32_t dl_nrarfcn) for (i = 0; i < 31 && nr_bandtable[i].band != nr_bandP; i++); AssertFatal(dl_nrarfcn>=nr_bandtable[i].N_OFFs_DL,"dl_nrarfcn %u < N_OFFs_DL %llu\n",dl_nrarfcn, (long long unsigned int)nr_bandtable[i].N_OFFs_DL); + LOG_I(PHY,"Computing dl_frequency (pointA %d => %llu (dlmin %llu, nr_bandtable[%d].N_OFFs_DL %d))\n",dl_nrarfcn,1000*(nr_bandtable[i].dl_min + (dl_nrarfcn - nr_bandtable[i].N_OFFs_DL) * deltaFglobal),nr_bandtable[i].dl_min,i,nr_bandtable[i].N_OFFs_DL); return 1000*(nr_bandtable[i].dl_min + (dl_nrarfcn - nr_bandtable[i].N_OFFs_DL) * deltaFglobal); } + +uint64_t get_nr_uldl_offset(int nr_bandP) +{ + + int i; + + + AssertFatal(nr_bandP < 87, "nr_band %d > 86\n", nr_bandP); + for (i = 0; i < 31 && nr_bandtable[i].band != nr_bandP; i++); + + return 1000*(nr_bandtable[i].dl_min -nr_bandtable[i].ul_min); + +} diff --git a/openair2/NR_PHY_INTERFACE/NR_IF_Module.c b/openair2/NR_PHY_INTERFACE/NR_IF_Module.c index 1bde86873b..7fe56053b9 100644 --- a/openair2/NR_PHY_INTERFACE/NR_IF_Module.c +++ b/openair2/NR_PHY_INTERFACE/NR_IF_Module.c @@ -366,9 +366,13 @@ NR_IF_Module_t *NR_IF_Module_init(int Mod_id){ LOG_D(PHY,"Installing callbacks for IF_Module - UL_indication\n"); if (if_inst[Mod_id]==NULL) { + + if_inst[Mod_id] = (NR_IF_Module_t*)malloc(sizeof(NR_IF_Module_t)); memset((void*)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,if_inst[Mod_id]); + if_inst[Mod_id]->CC_mask=0; if_inst[Mod_id]->NR_UL_indication = NR_UL_indication; diff --git a/openair2/RRC/NR/L2_nr_interface.c b/openair2/RRC/NR/L2_nr_interface.c index c8cdfd336f..d1bf2a9612 100644 --- a/openair2/RRC/NR/L2_nr_interface.c +++ b/openair2/RRC/NR/L2_nr_interface.c @@ -66,7 +66,7 @@ int8_t mac_rrc_nr_data_req(const module_id_t Mod_idP, NR_BCCH_BCH_Message_t *mib; rrc = RC.nrrrc[Mod_idP]; - carrier = &rrc->carrier[0]; + carrier = &rrc->carrier; mib = &carrier->mib; if( (Srb_id & RAB_OFFSET ) == MIBCH) { diff --git a/openair2/RRC/NR/MESSAGES/asn1_msg.c b/openair2/RRC/NR/MESSAGES/asn1_msg.c index 1b3e367ec7..d15959248d 100644 --- a/openair2/RRC/NR/MESSAGES/asn1_msg.c +++ b/openair2/RRC/NR/MESSAGES/asn1_msg.c @@ -132,16 +132,6 @@ extern uint8_t usim_test; extern RAN_CONTEXT_t RC; -uint16_t two_tier_hexagonal_nr_cellIds[7] = {0,1,2,4,5,7,8}; -uint16_t two_tier_hexagonal_adjacent_nr_cellIds[7][6] = {{1,2,4,5,7,8}, // CellId 0 - {11,18,2,0,8,15}, // CellId 1 - {18,13,3,4,0,1}, // CellId 2 - {2,3,14,6,5,0}, // CellId 4 - {0,4,6,16,9,7}, // CellId 5 - {8,0,5,9,17,12}, // CellId 7 - {15,1,0,7,12,10} -};// CellId 8 - /* * This is a helper function for xer_sprint, which directs all incoming data * into the provided string. @@ -187,39 +177,16 @@ int xer_nr_sprint (char *string, size_t string_size, asn_TYPE_descriptor_t *td, return er.encoded; } -uint16_t get_adjacent_cell_id_NR(uint8_t Mod_id,uint8_t index) -{ - return(two_tier_hexagonal_adjacent_nr_cellIds[Mod_id][index]); -} -/* This only works for the hexagonal topology...need a more general function for other topologies */ - -uint8_t get_adjacent_cell_mod_id_NR(uint16_t phyCellId) -{ - uint8_t i; - - for(i=0; i<7; i++) { - if(two_tier_hexagonal_nr_cellIds[i] == phyCellId) { - return i; - } - } - - LOG_E(RRC,"\nCannot get adjacent cell mod id! Fatal error!\n"); - return 0xFF; //error! -} //------------------------------------------------------------------------------ -uint8_t do_MIB_NR(rrc_gNB_carrier_data_t *carrier, - uint32_t frame, - uint32_t ssb_SubcarrierOffset, - uint32_t pdcch_ConfigSIB1, - uint32_t subCarrierSpacingCommon, - uint32_t dmrs_TypeA_Position) -{ +uint8_t do_MIB_NR(gNB_RRC_INST *rrc,uint32_t frame) { asn_enc_rval_t enc_rval; - + rrc_gNB_carrier_data_t *carrier = &rrc->carrier; NR_BCCH_BCH_Message_t *mib = &carrier->mib; + NR_ServingCellConfigCommon_t *scc = carrier->servingcellconfigcommon; + memset(mib,0,sizeof(NR_BCCH_BCH_Message_t)); mib->message.present = NR_BCCH_BCH_MessageType_PR_mib; @@ -239,46 +206,48 @@ uint8_t do_MIB_NR(rrc_gNB_carrier_data_t *carrier, mib->message.choice.mib->spare.size = 1; mib->message.choice.mib->spare.bits_unused = 7; // This makes a spare of 1 bits - mib->message.choice.mib->ssb_SubcarrierOffset = ssb_SubcarrierOffset; -#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) - mib->message.choice.mib->pdcch_ConfigSIB1.controlResourceSetZero = (pdcch_ConfigSIB1 / 16); - mib->message.choice.mib->pdcch_ConfigSIB1.searchSpaceZero = (pdcch_ConfigSIB1 % 16); -#else - mib->message.choice.mib->pdcch_ConfigSIB1 = pdcch_ConfigSIB1; -#endif - switch (subCarrierSpacingCommon) { - case 15: - mib->message.choice.mib->subCarrierSpacingCommon = NR_MIB__subCarrierSpacingCommon_scs15or60; - break; + mib->message.choice.mib->ssb_SubcarrierOffset = carrier->ssb_SubcarrierOffset; + mib->message.choice.mib->pdcch_ConfigSIB1.controlResourceSetZero = *scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->controlResourceSetZero; + mib->message.choice.mib->pdcch_ConfigSIB1.searchSpaceZero = *scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->searchSpaceZero; + AssertFatal(scc->subcarrierSpacing != NULL, "scc->subcarrierSpacing is null\n"); - case 30: - mib->message.choice.mib->subCarrierSpacingCommon = NR_MIB__subCarrierSpacingCommon_scs30or120; - break; - - case 60: - mib->message.choice.mib->subCarrierSpacingCommon = NR_MIB__subCarrierSpacingCommon_scs15or60; - break; - - case 120: - mib->message.choice.mib->subCarrierSpacingCommon = NR_MIB__subCarrierSpacingCommon_scs30or120; - break; - - default: - AssertFatal(1==0,"Unknown subCarrierSpacingCommon %d\n",subCarrierSpacingCommon); + switch (*scc->subcarrierSpacing) { + case NR_SubcarrierSpacing_kHz15: + mib->message.choice.mib->subCarrierSpacingCommon = NR_MIB__subCarrierSpacingCommon_scs15or60; + break; + + case NR_SubcarrierSpacing_kHz30: + mib->message.choice.mib->subCarrierSpacingCommon = NR_MIB__subCarrierSpacingCommon_scs30or120; + break; + + case NR_SubcarrierSpacing_kHz60: + mib->message.choice.mib->subCarrierSpacingCommon = NR_MIB__subCarrierSpacingCommon_scs15or60; + break; + + case NR_SubcarrierSpacing_kHz120: + mib->message.choice.mib->subCarrierSpacingCommon = NR_MIB__subCarrierSpacingCommon_scs30or120; + break; + + case NR_SubcarrierSpacing_kHz240: + AssertFatal(1==0,"Unknown subCarrierSpacingCommon %d\n",(int)*scc->subcarrierSpacing); + break; + + default: + AssertFatal(1==0,"Unknown subCarrierSpacingCommon %d\n",(int)*scc->subcarrierSpacing); } -mib->message.choice.mib->subCarrierSpacingCommon = 1; - switch (dmrs_TypeA_Position) { - case 2: - mib->message.choice.mib->dmrs_TypeA_Position = NR_MIB__dmrs_TypeA_Position_pos2; - break; - - case 3: - mib->message.choice.mib->dmrs_TypeA_Position = NR_MIB__dmrs_TypeA_Position_pos3; - break; - - default: - AssertFatal(1==0,"Unknown dmrs_TypeA_Position %d\n",dmrs_TypeA_Position); + switch (scc->dmrs_TypeA_Position) { + case NR_ServingCellConfigCommon__dmrs_TypeA_Position_pos2: + mib->message.choice.mib->dmrs_TypeA_Position = NR_MIB__dmrs_TypeA_Position_pos2; + break; + + case NR_ServingCellConfigCommon__dmrs_TypeA_Position_pos3: + mib->message.choice.mib->dmrs_TypeA_Position = NR_MIB__dmrs_TypeA_Position_pos3; + break; + + default: + AssertFatal(1==0,"Unknown dmrs_TypeA_Position %d\n",(int)scc->dmrs_TypeA_Position); + } // assign_enum @@ -305,584 +274,6 @@ mib->message.choice.mib->subCarrierSpacingCommon = 1; return((enc_rval.encoded+7)/8); } -void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id, - int CC_id, - #if defined(ENABLE_ITTI) - gNB_RrcConfigurationReq *configuration, - #endif - int initial_flag - ) -{ - NR_ServingCellConfigCommon_t **servingcellconfigcommon = &RC.nrrrc[Mod_id]->carrier[CC_id].servingcellconfigcommon; - NR_FreqBandIndicatorNR_t *dl_frequencyBandList; - struct NR_SCS_SpecificCarrier *dl_scs_SpecificCarrierList; - NR_TCI_StateId_t *TCI_StateId; - struct NR_ControlResourceSet *bwp_dl_controlresourceset; - NR_SearchSpace_t *bwp_dl_searchspace; - struct NR_PDSCH_TimeDomainResourceAllocation *bwp_dl_timedomainresourceallocation; - NR_FreqBandIndicatorNR_t *ul_frequencyBandList; - struct NR_SCS_SpecificCarrier *ul_scs_SpecificCarrierList; - struct NR_PUSCH_TimeDomainResourceAllocation *pusch_configcommontimedomainresourceallocation; - struct NR_RateMatchPattern *ratematchpattern; - NR_RateMatchPatternId_t *ratematchpatternid; - - if(initial_flag == 1){ - (*servingcellconfigcommon) = CALLOC(1,sizeof(NR_ServingCellConfigCommon_t)); - (*servingcellconfigcommon)->physCellId = CALLOC(1,sizeof(NR_PhysCellId_t)); - (*servingcellconfigcommon)->downlinkConfigCommon = CALLOC(1,sizeof(struct NR_DownlinkConfigCommon)); - (*servingcellconfigcommon)->downlinkConfigCommon->frequencyInfoDL = CALLOC(1,sizeof(struct NR_FrequencyInfoDL)); - (*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP = CALLOC(1,sizeof(struct NR_BWP_DownlinkCommon)); - (*servingcellconfigcommon)->uplinkConfigCommon = CALLOC(1,sizeof(struct NR_UplinkConfigCommon)); - (*servingcellconfigcommon)->uplinkConfigCommon->frequencyInfoUL = CALLOC(1,sizeof(struct NR_FrequencyInfoUL)); - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP = CALLOC(1,sizeof(struct NR_BWP_UplinkCommon)); - //(*servingcellconfigcommon)->supplementaryUplinkConfig = CALLOC(1,sizeof(struct NR_UplinkConfigCommon)); - (*servingcellconfigcommon)->ssb_PositionsInBurst = CALLOC(1,sizeof(struct NR_ServingCellConfigCommon__ssb_PositionsInBurst)); - (*servingcellconfigcommon)->ssb_periodicityServingCell = CALLOC(1,sizeof(long)); - //(*servingcellconfigcommon)->lte_CRS_ToMatchAround = CALLOC(1,sizeof(struct NR_SetupRelease_RateMatchPatternLTE_CRS)); - (*servingcellconfigcommon)->rateMatchPatternToAddModList = CALLOC(1,sizeof(struct NR_ServingCellConfigCommon__rateMatchPatternToAddModList)); - (*servingcellconfigcommon)->rateMatchPatternToReleaseList = CALLOC(1,sizeof(struct NR_ServingCellConfigCommon__rateMatchPatternToReleaseList)); - (*servingcellconfigcommon)->subcarrierSpacing = CALLOC(1,sizeof(NR_SubcarrierSpacing_t)); - (*servingcellconfigcommon)->tdd_UL_DL_ConfigurationCommon = CALLOC(1,sizeof(struct NR_TDD_UL_DL_ConfigCommon)); - - - (*servingcellconfigcommon)->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB = CALLOC(1,sizeof(NR_ARFCN_ValueNR_t)); - - dl_frequencyBandList = CALLOC(1,sizeof(NR_FreqBandIndicatorNR_t)); - dl_scs_SpecificCarrierList = CALLOC(1,sizeof(struct NR_SCS_SpecificCarrier)); - - (*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->genericParameters.cyclicPrefix = CALLOC(1,sizeof(long)); - (*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon = CALLOC(1,sizeof(struct NR_SetupRelease_PDCCH_ConfigCommon)); - (*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup = CALLOC(1,sizeof(struct NR_PDCCH_ConfigCommon)); - (*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->controlResourceSetZero = CALLOC(1,sizeof(long)); - (*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->searchSpaceZero = CALLOC(1,sizeof(long)); - (*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonControlResourceSet = CALLOC(1,sizeof(struct NR_ControlResourceSet)); -#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) - (*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonSearchSpaceList = CALLOC(1,sizeof(struct NR_PDCCH_ConfigCommon__commonSearchSpaceList)); -#else - (*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonSearchSpace = CALLOC(1,sizeof(struct NR_PDCCH_ConfigCommon__commonSearchSpace)); -#endif - (*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->searchSpaceSIB1 = CALLOC(1,sizeof(NR_SearchSpaceId_t)); - (*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->searchSpaceOtherSystemInformation = CALLOC(1,sizeof(NR_SearchSpaceId_t)); - (*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->pagingSearchSpace = CALLOC(1,sizeof(NR_SearchSpaceId_t)); - (*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->ra_SearchSpace = CALLOC(1,sizeof(NR_SearchSpaceId_t)); - (*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon = CALLOC(1,sizeof(struct NR_SetupRelease_PDSCH_ConfigCommon)); - (*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup = CALLOC(1,sizeof(struct NR_PDSCH_ConfigCommon)); - (*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList = CALLOC(1,sizeof(struct NR_PDSCH_TimeDomainResourceAllocationList)); - - (*servingcellconfigcommon)->uplinkConfigCommon->frequencyInfoUL->frequencyBandList = CALLOC(1,sizeof(struct NR_MultiFrequencyBandListNR)); - (*servingcellconfigcommon)->uplinkConfigCommon->frequencyInfoUL->absoluteFrequencyPointA = CALLOC(1,sizeof(NR_ARFCN_ValueNR_t)); - (*servingcellconfigcommon)->uplinkConfigCommon->frequencyInfoUL->additionalSpectrumEmission = CALLOC(1,sizeof(NR_AdditionalSpectrumEmission_t)); - (*servingcellconfigcommon)->uplinkConfigCommon->frequencyInfoUL->p_Max = CALLOC(1,sizeof(NR_P_Max_t)); - (*servingcellconfigcommon)->uplinkConfigCommon->frequencyInfoUL->frequencyShift7p5khz = CALLOC(1,sizeof(long)); - - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->genericParameters.cyclicPrefix = CALLOC(1,sizeof(long)); - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon = CALLOC(1,sizeof(NR_SetupRelease_RACH_ConfigCommon_t)); - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup = CALLOC(1,sizeof(struct NR_RACH_ConfigCommon)); - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->totalNumberOfRA_Preambles = CALLOC(1,sizeof(long)); - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->ssb_perRACH_OccasionAndCB_PreamblesPerSSB = CALLOC(1,sizeof(struct NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB)); - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->groupBconfigured = CALLOC(1,sizeof(struct NR_RACH_ConfigCommon__groupBconfigured)); - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rsrp_ThresholdSSB = CALLOC(1,sizeof(NR_RSRP_Range_t)); - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rsrp_ThresholdSSB_SUL = CALLOC(1,sizeof(NR_RSRP_Range_t)); - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg1_SubcarrierSpacing = CALLOC(1,sizeof(NR_SubcarrierSpacing_t)); -#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg3_transformPrecoder = CALLOC(1,sizeof(long)); -#else - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg3_transformPrecoding = CALLOC(1,sizeof(long)); -#endif - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon = CALLOC(1,sizeof(NR_SetupRelease_PUSCH_ConfigCommon_t)); - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup = CALLOC(1,sizeof(struct NR_PUSCH_ConfigCommon)); - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->groupHoppingEnabledTransformPrecoding = CALLOC(1,sizeof(long)); - - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList = CALLOC(1,sizeof(struct NR_PUSCH_TimeDomainResourceAllocationList)); - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->msg3_DeltaPreamble = CALLOC(1,sizeof(long)); - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->p0_NominalWithGrant = CALLOC(1,sizeof(long)); - - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pucch_ConfigCommon = CALLOC(1,sizeof(struct NR_SetupRelease_PUCCH_ConfigCommon)); - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pucch_ConfigCommon->choice.setup = CALLOC(1,sizeof(struct NR_PUCCH_ConfigCommon)); - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pucch_ConfigCommon->choice.setup->pucch_ResourceCommon = CALLOC(1,sizeof(BIT_STRING_t)); - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pucch_ConfigCommon->choice.setup->p0_nominal = CALLOC(1,sizeof(long)); - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pucch_ConfigCommon->choice.setup->pucch_ResourceCommon = CALLOC(1,sizeof(long)); - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pucch_ConfigCommon->choice.setup->hoppingId = CALLOC(1,sizeof(long)); - (*servingcellconfigcommon)->ssb_PositionsInBurst->choice.shortBitmap.buf = MALLOC(1); - (*servingcellconfigcommon)->ssb_PositionsInBurst->choice.mediumBitmap.buf = MALLOC(1); - (*servingcellconfigcommon)->ssb_PositionsInBurst->choice.longBitmap.buf = MALLOC(8); - - bwp_dl_controlresourceset =(*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonControlResourceSet; - bwp_dl_controlresourceset->cce_REG_MappingType.choice.interleaved = CALLOC(1,sizeof(struct NR_ControlResourceSet__cce_REG_MappingType__interleaved)); - bwp_dl_controlresourceset->frequencyDomainResources.buf = MALLOC(6); - bwp_dl_controlresourceset->cce_REG_MappingType.choice.interleaved->shiftIndex = CALLOC(1,sizeof(long)); - bwp_dl_controlresourceset->tci_StatesPDCCH_ToAddList = CALLOC(1,sizeof(struct NR_ControlResourceSet__tci_StatesPDCCH_ToAddList)); - bwp_dl_controlresourceset->tci_PresentInDCI = CALLOC(1,sizeof(long)); - bwp_dl_controlresourceset->pdcch_DMRS_ScramblingID = CALLOC(1,sizeof(long)); - TCI_StateId = CALLOC(1,sizeof(NR_TCI_StateId_t)); - bwp_dl_searchspace = CALLOC(1,sizeof(NR_SearchSpace_t)); - bwp_dl_searchspace->controlResourceSetId = CALLOC(1,sizeof(NR_ControlResourceSetId_t)); - bwp_dl_searchspace->monitoringSlotPeriodicityAndOffset = CALLOC(1,sizeof(struct NR_SearchSpace__monitoringSlotPeriodicityAndOffset)); - bwp_dl_searchspace->duration = CALLOC(1,sizeof(long)); - bwp_dl_searchspace->monitoringSymbolsWithinSlot = CALLOC(1,sizeof(BIT_STRING_t)); - bwp_dl_searchspace->monitoringSymbolsWithinSlot->buf = MALLOC(2); - bwp_dl_searchspace->nrofCandidates = CALLOC(1,sizeof(struct NR_SearchSpace__nrofCandidates)); - bwp_dl_searchspace->searchSpaceType = CALLOC(1,sizeof(struct NR_SearchSpace__searchSpaceType)); - bwp_dl_searchspace->searchSpaceType->choice.common = CALLOC(1,sizeof(struct NR_SearchSpace__searchSpaceType__common)); - bwp_dl_searchspace->searchSpaceType->choice.ue_Specific = CALLOC(1,sizeof(struct NR_SearchSpace__searchSpaceType__ue_Specific)); - - bwp_dl_timedomainresourceallocation = CALLOC(1,sizeof(struct NR_PDSCH_TimeDomainResourceAllocation)); - bwp_dl_timedomainresourceallocation->k0 = CALLOC(1,sizeof(long)); - - ul_frequencyBandList = CALLOC(1,sizeof(NR_FreqBandIndicatorNR_t)); - ul_scs_SpecificCarrierList = CALLOC(1,sizeof(struct NR_SCS_SpecificCarrier)); - - pusch_configcommontimedomainresourceallocation = CALLOC(1,sizeof(struct NR_PUSCH_TimeDomainResourceAllocation)); - pusch_configcommontimedomainresourceallocation->k2 = CALLOC(1,sizeof(long)); - - ratematchpattern = CALLOC(1,sizeof(struct NR_RateMatchPattern)); - ratematchpattern->patternType.choice.bitmaps = CALLOC(1,sizeof(struct NR_RateMatchPattern__patternType__bitmaps)); - ratematchpattern->patternType.choice.bitmaps->resourceBlocks.buf = MALLOC(35); - ratematchpattern->patternType.choice.bitmaps->symbolsInResourceBlock.choice.oneSlot.buf = MALLOC(2); - ratematchpattern->patternType.choice.bitmaps->symbolsInResourceBlock.choice.twoSlots.buf = MALLOC(4); - ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern = CALLOC(1,sizeof(struct NR_RateMatchPattern__patternType__bitmaps__periodicityAndPattern)); - ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n2.buf = MALLOC(1); - ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n4.buf = MALLOC(1); - ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n5.buf = MALLOC(1); - ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n8.buf = MALLOC(1); - ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n10.buf = MALLOC(2); - ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n20.buf = MALLOC(3); - ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n40.buf = MALLOC(5); - ratematchpattern->subcarrierSpacing = CALLOC(1,sizeof(NR_SubcarrierSpacing_t)); - ratematchpatternid = CALLOC(1,sizeof(NR_RateMatchPatternId_t)); - }else{ - bwp_dl_controlresourceset =(*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonControlResourceSet; - } - - - //------------------------------------Start Fill ServingCellConfigCommon------------------------------------// - //physCellId - *((*servingcellconfigcommon)->physCellId) = configuration->Nid_cell[CC_id]; - - //NR_DownlinkConfigCommon - *((*servingcellconfigcommon)->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB) = configuration->absoluteFrequencySSB[CC_id]; - - *(dl_frequencyBandList) = configuration->DL_FreqBandIndicatorNR[CC_id]; - ASN_SEQUENCE_ADD(&(*servingcellconfigcommon)->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list,&dl_frequencyBandList); - - (*servingcellconfigcommon)->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA = configuration->DL_absoluteFrequencyPointA[CC_id]; - - dl_scs_SpecificCarrierList->offsetToCarrier = configuration->DL_offsetToCarrier[CC_id]; - dl_scs_SpecificCarrierList->subcarrierSpacing = configuration->DL_SCS_SubcarrierSpacing[CC_id]; - dl_scs_SpecificCarrierList->carrierBandwidth = configuration->DL_carrierBandwidth[CC_id]; - ASN_SEQUENCE_ADD(&(*servingcellconfigcommon)->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list,&dl_scs_SpecificCarrierList); - - //initialDownlinkBWP - //initialDownlinkBWP ----- genericParameters - (*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth = configuration->DL_locationAndBandwidth[CC_id]; - (*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->genericParameters.subcarrierSpacing = configuration->DL_BWP_SubcarrierSpacing[CC_id]; - - if(configuration->DL_BWP_prefix_type[CC_id]){ - (*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->genericParameters.cyclicPrefix = NR_BWP__cyclicPrefix_extended; - } - - //initialDownlinkBWP ----- pdcch_ConfigCommon - - (*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->present = NR_SetupRelease_PDCCH_ConfigCommon_PR_setup; - - //Fill initialDownlinkBWP -> pdcch_ConfigCommon -> ControlResourceSet list // - - *((*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->controlResourceSetZero) = configuration->controlResourceSetZero[CC_id]; - *((*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->searchSpaceZero) = configuration->searchSpaceZero[CC_id]; - - bwp_dl_controlresourceset->controlResourceSetId = configuration->PDCCH_common_controlResourceSetId[CC_id]; - //BIT STRING (SIZE (45)) - bwp_dl_controlresourceset->frequencyDomainResources.size = 6; - bwp_dl_controlresourceset->frequencyDomainResources.bits_unused = 3; - bwp_dl_controlresourceset->frequencyDomainResources.buf[0] = 0x1f; - bwp_dl_controlresourceset->frequencyDomainResources.buf[1] = 0xff; - bwp_dl_controlresourceset->frequencyDomainResources.buf[2] = 0xff; - bwp_dl_controlresourceset->frequencyDomainResources.buf[3] = 0xff; - bwp_dl_controlresourceset->frequencyDomainResources.buf[4] = 0xff; - bwp_dl_controlresourceset->frequencyDomainResources.buf[5] = 0xff; - - bwp_dl_controlresourceset->duration = configuration->PDCCH_common_ControlResourceSet_duration[CC_id]; - bwp_dl_controlresourceset->cce_REG_MappingType.present = configuration->PDCCH_cce_REG_MappingType[CC_id]; - - if(bwp_dl_controlresourceset->cce_REG_MappingType.present == NR_ControlResourceSet__cce_REG_MappingType_PR_interleaved ){ - bwp_dl_controlresourceset->cce_REG_MappingType.choice.interleaved->reg_BundleSize = configuration->PDCCH_reg_BundleSize[CC_id]; - bwp_dl_controlresourceset->cce_REG_MappingType.choice.interleaved->interleaverSize = configuration->PDCCH_interleaverSize[CC_id]; - *(bwp_dl_controlresourceset->cce_REG_MappingType.choice.interleaved->shiftIndex) = configuration->PDCCH_shiftIndex[CC_id]; - }else if(bwp_dl_controlresourceset->cce_REG_MappingType.present == NR_ControlResourceSet__cce_REG_MappingType_PR_nonInterleaved){ - bwp_dl_controlresourceset->cce_REG_MappingType.choice.nonInterleaved = 0; - } - - bwp_dl_controlresourceset->precoderGranularity = configuration->PDCCH_precoderGranularity[CC_id]; - - *(TCI_StateId) = configuration->PDCCH_TCI_StateId[CC_id]; - ASN_SEQUENCE_ADD(&bwp_dl_controlresourceset->tci_StatesPDCCH_ToAddList->list,&TCI_StateId); - - if(configuration->tci_PresentInDCI[CC_id]){ - bwp_dl_controlresourceset->tci_PresentInDCI = NR_ControlResourceSet__tci_PresentInDCI_enabled; - } - - *(bwp_dl_controlresourceset->pdcch_DMRS_ScramblingID) = configuration->PDCCH_DMRS_ScramblingID[CC_id];; - - //Fill downlinkConfigCommon -> initialDownlinkBWP -> pdcch_ConfigCommon -> SearchSpace list // - bwp_dl_searchspace->searchSpaceId = configuration->SearchSpaceId[CC_id]; - *(bwp_dl_searchspace->controlResourceSetId) = configuration->commonSearchSpaces_controlResourceSetId[CC_id]; - - bwp_dl_searchspace->monitoringSlotPeriodicityAndOffset->present = configuration->SearchSpace_monitoringSlotPeriodicityAndOffset_choice[CC_id]; - - if(bwp_dl_searchspace->monitoringSlotPeriodicityAndOffset->present == NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl1){ - bwp_dl_searchspace->monitoringSlotPeriodicityAndOffset->choice.sl1 = configuration->SearchSpace_monitoringSlotPeriodicityAndOffset_value[CC_id]; - }else if(bwp_dl_searchspace->monitoringSlotPeriodicityAndOffset->present == NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl2){ - bwp_dl_searchspace->monitoringSlotPeriodicityAndOffset->choice.sl2 = configuration->SearchSpace_monitoringSlotPeriodicityAndOffset_value[CC_id]; - }else if(bwp_dl_searchspace->monitoringSlotPeriodicityAndOffset->present == NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl4){ - bwp_dl_searchspace->monitoringSlotPeriodicityAndOffset->choice.sl4 = configuration->SearchSpace_monitoringSlotPeriodicityAndOffset_value[CC_id]; - }else if(bwp_dl_searchspace->monitoringSlotPeriodicityAndOffset->present == NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl5){ - bwp_dl_searchspace->monitoringSlotPeriodicityAndOffset->choice.sl5 = configuration->SearchSpace_monitoringSlotPeriodicityAndOffset_value[CC_id]; - }else if(bwp_dl_searchspace->monitoringSlotPeriodicityAndOffset->present == NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl8){ - bwp_dl_searchspace->monitoringSlotPeriodicityAndOffset->choice.sl8 = configuration->SearchSpace_monitoringSlotPeriodicityAndOffset_value[CC_id]; - }else if(bwp_dl_searchspace->monitoringSlotPeriodicityAndOffset->present == NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl10){ - bwp_dl_searchspace->monitoringSlotPeriodicityAndOffset->choice.sl10 = configuration->SearchSpace_monitoringSlotPeriodicityAndOffset_value[CC_id]; - }else if(bwp_dl_searchspace->monitoringSlotPeriodicityAndOffset->present == NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl16){ - bwp_dl_searchspace->monitoringSlotPeriodicityAndOffset->choice.sl16 = configuration->SearchSpace_monitoringSlotPeriodicityAndOffset_value[CC_id]; - }else if(bwp_dl_searchspace->monitoringSlotPeriodicityAndOffset->present == NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl20){ - bwp_dl_searchspace->monitoringSlotPeriodicityAndOffset->choice.sl20 = configuration->SearchSpace_monitoringSlotPeriodicityAndOffset_value[CC_id]; - }else if(bwp_dl_searchspace->monitoringSlotPeriodicityAndOffset->present == NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl40){ - bwp_dl_searchspace->monitoringSlotPeriodicityAndOffset->choice.sl40 = configuration->SearchSpace_monitoringSlotPeriodicityAndOffset_value[CC_id]; - }else if(bwp_dl_searchspace->monitoringSlotPeriodicityAndOffset->present == NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl80){ - bwp_dl_searchspace->monitoringSlotPeriodicityAndOffset->choice.sl80 = configuration->SearchSpace_monitoringSlotPeriodicityAndOffset_value[CC_id]; - }else if(bwp_dl_searchspace->monitoringSlotPeriodicityAndOffset->present == NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl160){ - bwp_dl_searchspace->monitoringSlotPeriodicityAndOffset->choice.sl160 = configuration->SearchSpace_monitoringSlotPeriodicityAndOffset_value[CC_id]; - }else if(bwp_dl_searchspace->monitoringSlotPeriodicityAndOffset->present == NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl320){ - bwp_dl_searchspace->monitoringSlotPeriodicityAndOffset->choice.sl320 = configuration->SearchSpace_monitoringSlotPeriodicityAndOffset_value[CC_id]; - }else if(bwp_dl_searchspace->monitoringSlotPeriodicityAndOffset->present == NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl640){ - bwp_dl_searchspace->monitoringSlotPeriodicityAndOffset->choice.sl640 = configuration->SearchSpace_monitoringSlotPeriodicityAndOffset_value[CC_id]; - }else if(bwp_dl_searchspace->monitoringSlotPeriodicityAndOffset->present == NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl1280){ - bwp_dl_searchspace->monitoringSlotPeriodicityAndOffset->choice.sl1280 = configuration->SearchSpace_monitoringSlotPeriodicityAndOffset_value[CC_id]; - }else if(bwp_dl_searchspace->monitoringSlotPeriodicityAndOffset->present == NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_sl2560){ - bwp_dl_searchspace->monitoringSlotPeriodicityAndOffset->choice.sl2560 = configuration->SearchSpace_monitoringSlotPeriodicityAndOffset_value[CC_id]; - } - - *(bwp_dl_searchspace->duration) = configuration->SearchSpace_duration[CC_id]; - - bwp_dl_searchspace->monitoringSymbolsWithinSlot->size=2; - bwp_dl_searchspace->monitoringSymbolsWithinSlot->bits_unused=2; - bwp_dl_searchspace->monitoringSymbolsWithinSlot->buf[0]=0x3f; - bwp_dl_searchspace->monitoringSymbolsWithinSlot->buf[1]=0xff; - - bwp_dl_searchspace->nrofCandidates->aggregationLevel1 = configuration->SearchSpace_nrofCandidates_aggregationLevel1[CC_id]; - bwp_dl_searchspace->nrofCandidates->aggregationLevel2 = configuration->SearchSpace_nrofCandidates_aggregationLevel2[CC_id]; - bwp_dl_searchspace->nrofCandidates->aggregationLevel4 = configuration->SearchSpace_nrofCandidates_aggregationLevel4[CC_id]; - bwp_dl_searchspace->nrofCandidates->aggregationLevel8 = configuration->SearchSpace_nrofCandidates_aggregationLevel8[CC_id]; - bwp_dl_searchspace->nrofCandidates->aggregationLevel16 = configuration->SearchSpace_nrofCandidates_aggregationLevel16[CC_id]; - - bwp_dl_searchspace->searchSpaceType->present = configuration->SearchSpace_searchSpaceType[CC_id]; - - if(bwp_dl_searchspace->searchSpaceType->present == NR_SearchSpace__searchSpaceType_PR_common){ - bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0 = CALLOC(1,sizeof(struct NR_SearchSpace__searchSpaceType__common__dci_Format2_0)); - bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel1 = CALLOC(1,sizeof(long)); - bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel2 = CALLOC(1,sizeof(long)); - bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel4 = CALLOC(1,sizeof(long)); - bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel8 = CALLOC(1,sizeof(long)); - bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel16 = CALLOC(1,sizeof(long)); - bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_3 = CALLOC(1,sizeof(struct NR_SearchSpace__searchSpaceType__common__dci_Format2_3)); -#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) - bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_3->dummy1 = CALLOC(1,sizeof(long)); -#else - bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_3->monitoringPeriodicity = CALLOC(1,sizeof(long)); -#endif - *(bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel1) = configuration->Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel1[CC_id]; - *(bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel2) = configuration->Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel2[CC_id]; - *(bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel4) = configuration->Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel4[CC_id]; - *(bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel8) = configuration->Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel8[CC_id]; - *(bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel16) = configuration->Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel16[CC_id]; -#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) - *(bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_3->dummy1) = configuration->Common_dci_Format2_3_monitoringPeriodicity[CC_id]; - bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_3->dummy2 = configuration->Common_dci_Format2_3_nrofPDCCH_Candidates[CC_id]; -#else - *(bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_3->monitoringPeriodicity) = configuration->Common_dci_Format2_3_monitoringPeriodicity[CC_id]; - bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_3->nrofPDCCH_Candidates = configuration->Common_dci_Format2_3_nrofPDCCH_Candidates[CC_id]; -#endif - }else if (bwp_dl_searchspace->searchSpaceType->present == NR_SearchSpace__searchSpaceType_PR_ue_Specific){ - bwp_dl_searchspace->searchSpaceType->choice.ue_Specific->dci_Formats = configuration->ue_Specific__dci_Formats[CC_id]; - } - -#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) - ASN_SEQUENCE_ADD(&(*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonSearchSpaceList->list,&bwp_dl_searchspace); -#else - ASN_SEQUENCE_ADD(&(*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonSearchSpace->list,&bwp_dl_searchspace); -#endif - - *((*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->searchSpaceSIB1) = configuration->searchSpaceSIB1[CC_id]; - *((*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->searchSpaceOtherSystemInformation) = configuration->searchSpaceOtherSystemInformation[CC_id]; - *((*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->pagingSearchSpace) = configuration->pagingSearchSpace[CC_id]; - *((*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->ra_SearchSpace) = configuration->ra_SearchSpace[CC_id]; - - //initialDownlinkBWP ----- pdsch_ConfigCommon - (*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->present = NR_SetupRelease_PDSCH_ConfigCommon_PR_setup; - - *(bwp_dl_timedomainresourceallocation->k0) = configuration->PDSCH_TimeDomainResourceAllocation_k0[CC_id]; - bwp_dl_timedomainresourceallocation->mappingType = configuration->PDSCH_TimeDomainResourceAllocation_mappingType[CC_id]; - bwp_dl_timedomainresourceallocation->startSymbolAndLength = configuration->PDSCH_TimeDomainResourceAllocation_startSymbolAndLength[CC_id]; - - ASN_SEQUENCE_ADD(&(*servingcellconfigcommon)->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list,&bwp_dl_timedomainresourceallocation); - - //uplinkConfigCommon - //uplinkConfigCommon frequencyInfoUL // - *(ul_frequencyBandList) = configuration->UL_FreqBandIndicatorNR[CC_id]; - ASN_SEQUENCE_ADD(&(*servingcellconfigcommon)->uplinkConfigCommon->frequencyInfoUL->frequencyBandList->list,&ul_frequencyBandList); - - *((*servingcellconfigcommon)->uplinkConfigCommon->frequencyInfoUL->absoluteFrequencyPointA) = configuration->UL_absoluteFrequencyPointA[CC_id]; - - ul_scs_SpecificCarrierList->offsetToCarrier = configuration->UL_offsetToCarrier[CC_id]; - ul_scs_SpecificCarrierList->subcarrierSpacing = configuration->UL_SCS_SubcarrierSpacing[CC_id]; - ul_scs_SpecificCarrierList->carrierBandwidth = configuration->UL_carrierBandwidth[CC_id]; - ASN_SEQUENCE_ADD(&(*servingcellconfigcommon)->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list,&ul_scs_SpecificCarrierList); - - *((*servingcellconfigcommon)->uplinkConfigCommon->frequencyInfoUL->additionalSpectrumEmission) = configuration->UL_additionalSpectrumEmission[CC_id]; - *((*servingcellconfigcommon)->uplinkConfigCommon->frequencyInfoUL->p_Max) = configuration->UL_p_Max[CC_id]; - *((*servingcellconfigcommon)->uplinkConfigCommon->frequencyInfoUL->frequencyShift7p5khz) = configuration->UL_frequencyShift7p5khz[CC_id]; - - //uplinkConfigCommon initialUplinkBWP // - //Fill initialUplinkBWP -> BWP-UplinkCommon -> genericParameters// - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->genericParameters.locationAndBandwidth = configuration->UL_locationAndBandwidth[CC_id]; - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->genericParameters.subcarrierSpacing = configuration->UL_BWP_SubcarrierSpacing[CC_id]; - - if(configuration->UL_BWP_prefix_type[CC_id]){ - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->genericParameters.cyclicPrefix = NR_BWP__cyclicPrefix_extended; - } - - //Fill initialUplinkBWP -> BWP-UplinkCommon -> rach_ConfigCommon// - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->present = NR_SetupRelease_RACH_ConfigCommon_PR_setup; - - *((*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->totalNumberOfRA_Preambles) = configuration->rach_totalNumberOfRA_Preambles[CC_id]; - - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->present = configuration->rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_choice[CC_id]; - - if((*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->present == NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_oneEighth){ - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->choice.oneEighth = configuration->rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneEighth[CC_id]; - }else if((*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->present == NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_oneFourth){ - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->choice.oneFourth = configuration->rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneFourth[CC_id]; - }else if((*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->present == NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_oneHalf){ - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->choice.oneHalf = configuration->rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneHalf[CC_id]; - }else if((*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->present == NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_one){ - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->choice.one = configuration->rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_one[CC_id]; - }else if((*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->present == NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_two){ - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->choice.two = configuration->rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_two[CC_id]; - }else if((*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->present == NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_four){ - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->choice.four = configuration->rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_four[CC_id]; - }else if((*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->present == NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_eight){ - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->choice.eight = configuration->rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_eight[CC_id]; - }else if((*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->present == NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_sixteen){ - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->choice.sixteen = configuration->rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_sixteen[CC_id]; - } - - if(configuration->rach_groupBconfigured[CC_id]){ - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->groupBconfigured->ra_Msg3SizeGroupA = configuration->rach_ra_Msg3SizeGroupA[CC_id]; - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->groupBconfigured->messagePowerOffsetGroupB = configuration->rach_messagePowerOffsetGroupB[CC_id]; - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->groupBconfigured->numberOfRA_PreamblesGroupA = configuration->rach_numberOfRA_PreamblesGroupA[CC_id]; - } - - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->ra_ContentionResolutionTimer = configuration->rach_ra_ContentionResolutionTimer[CC_id]; - - *((*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rsrp_ThresholdSSB) = configuration->rsrp_ThresholdSSB[CC_id]; - *((*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rsrp_ThresholdSSB_SUL) = configuration->rsrp_ThresholdSSB_SUL[CC_id]; - - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->prach_RootSequenceIndex.present = configuration->prach_RootSequenceIndex_choice[CC_id]; - if((*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->prach_RootSequenceIndex.present == NR_RACH_ConfigCommon__prach_RootSequenceIndex_PR_l839){ - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->prach_RootSequenceIndex.choice.l839 = configuration->prach_RootSequenceIndex_l839[CC_id]; - }else if ((*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->prach_RootSequenceIndex.present == NR_RACH_ConfigCommon__prach_RootSequenceIndex_PR_l139){ - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->prach_RootSequenceIndex.choice.l139 = configuration->prach_RootSequenceIndex_l139[CC_id]; - } - - *((*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg1_SubcarrierSpacing) = configuration->prach_msg1_SubcarrierSpacing[CC_id]; - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->restrictedSetConfig = configuration->restrictedSetConfig[CC_id]; - - if(configuration->msg3_transformPrecoding[CC_id]){ -#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) - *((*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg3_transformPrecoder) = NR_RACH_ConfigCommon__msg3_transformPrecoder_enabled; -#else - *((*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg3_transformPrecoding) = NR_RACH_ConfigCommon__msg3_transformPrecoding_enabled; -#endif - } - - //Fill initialUplinkBWP -> BWP-UplinkCommon -> rach_ConfigCommon -> rach_ConfigGeneric// - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.prach_ConfigurationIndex = configuration->prach_ConfigurationIndex[CC_id]; - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.msg1_FDM = configuration->prach_msg1_FDM[CC_id]; - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.msg1_FrequencyStart = configuration->prach_msg1_FrequencyStart[CC_id]; - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.zeroCorrelationZoneConfig = configuration->zeroCorrelationZoneConfig[CC_id]; - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.preambleReceivedTargetPower = configuration->preambleReceivedTargetPower[CC_id]; - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.preambleTransMax = configuration->preambleTransMax[CC_id]; - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.powerRampingStep = configuration->powerRampingStep[CC_id]; - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.ra_ResponseWindow = configuration->ra_ResponseWindow[CC_id]; - - //Fill initialUplinkBWP -> BWP-UplinkCommon -> pusch_ConfigCommon// - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->present = NR_SetupRelease_PUSCH_ConfigCommon_PR_setup; - - if(configuration->groupHoppingEnabledTransformPrecoding[CC_id]){ - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->groupHoppingEnabledTransformPrecoding = NR_PUSCH_ConfigCommon__groupHoppingEnabledTransformPrecoding_enabled; - } - - *(pusch_configcommontimedomainresourceallocation->k2) = configuration->PUSCH_TimeDomainResourceAllocation_k2[CC_id]; - pusch_configcommontimedomainresourceallocation->mappingType = configuration->PUSCH_TimeDomainResourceAllocation_mappingType[CC_id]; - pusch_configcommontimedomainresourceallocation->startSymbolAndLength = configuration->PUSCH_TimeDomainResourceAllocation_startSymbolAndLength[CC_id]; - ASN_SEQUENCE_ADD(&(*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list,&pusch_configcommontimedomainresourceallocation); - - *((*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->msg3_DeltaPreamble) = configuration->msg3_DeltaPreamble[CC_id]; - *((*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->p0_NominalWithGrant) = configuration->p0_NominalWithGrant[CC_id]; - - //Fill initialUplinkBWP -> BWP-UplinkCommon -> pucch_ConfigCommon// - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pucch_ConfigCommon->present = NR_SetupRelease_PUCCH_ConfigCommon_PR_setup; - - (*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pucch_ConfigCommon->choice.setup->pucch_GroupHopping = configuration->pucch_GroupHopping[CC_id]; - *((*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pucch_ConfigCommon->choice.setup->p0_nominal) = configuration->p0_nominal[CC_id]; - *((*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pucch_ConfigCommon->choice.setup->pucch_ResourceCommon) = configuration->pucch_ResourceCommon[CC_id]; - *((*servingcellconfigcommon)->uplinkConfigCommon->initialUplinkBWP->pucch_ConfigCommon->choice.setup->hoppingId) = configuration->hoppingId[CC_id]; -#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) - (*servingcellconfigcommon)->uplinkConfigCommon->dummy = configuration->UL_timeAlignmentTimerCommon[CC_id]; -#else - (*servingcellconfigcommon)->uplinkConfigCommon->timeAlignmentTimerCommon = configuration->UL_timeAlignmentTimerCommon[CC_id]; -#endif - - (*servingcellconfigcommon)->n_TimingAdvanceOffset = CALLOC(1,sizeof(long)); - *((*servingcellconfigcommon)->n_TimingAdvanceOffset)=configuration->ServingCellConfigCommon_n_TimingAdvanceOffset[CC_id]; - //ssb_PositionsInBurst - (*servingcellconfigcommon)->ssb_PositionsInBurst->present = configuration->ServingCellConfigCommon_ssb_PositionsInBurst_PR[CC_id]; - - uint64_t t_freq; - if(configuration->nr_band[CC_id] == 41 || (configuration->nr_band[CC_id] > 76 && configuration->nr_band[CC_id] < 80)) - t_freq = 2400000000; - else - t_freq = 3000000000; - - if(configuration->downlink_frequency[CC_id]ssb_PositionsInBurst->choice.shortBitmap.size = 1; - (*servingcellconfigcommon)->ssb_PositionsInBurst->choice.shortBitmap.bits_unused = 4; - (*servingcellconfigcommon)->ssb_PositionsInBurst->choice.shortBitmap.buf[0] = configuration->ServingCellConfigCommon_ssb_PositionsInBurst_PR[CC_id]; - }else if(configuration->downlink_frequency[CC_id]<6000000000){ - (*servingcellconfigcommon)->ssb_PositionsInBurst->choice.mediumBitmap.size = 1; - (*servingcellconfigcommon)->ssb_PositionsInBurst->choice.mediumBitmap.bits_unused = 0; - (*servingcellconfigcommon)->ssb_PositionsInBurst->choice.mediumBitmap.buf[0] = configuration->ServingCellConfigCommon_ssb_PositionsInBurst_PR[CC_id]; - }else { - (*servingcellconfigcommon)->ssb_PositionsInBurst->choice.longBitmap.size = 8; - (*servingcellconfigcommon)->ssb_PositionsInBurst->choice.longBitmap.bits_unused = 0; - (*servingcellconfigcommon)->ssb_PositionsInBurst->choice.longBitmap.buf[0] = 0xff; - (*servingcellconfigcommon)->ssb_PositionsInBurst->choice.longBitmap.buf[1] = 0xff; - (*servingcellconfigcommon)->ssb_PositionsInBurst->choice.longBitmap.buf[2] = 0xff; - (*servingcellconfigcommon)->ssb_PositionsInBurst->choice.longBitmap.buf[3] = 0xff; - (*servingcellconfigcommon)->ssb_PositionsInBurst->choice.longBitmap.buf[4] = 0xff; - (*servingcellconfigcommon)->ssb_PositionsInBurst->choice.longBitmap.buf[5] = 0xff; - (*servingcellconfigcommon)->ssb_PositionsInBurst->choice.longBitmap.buf[6] = 0xff; - (*servingcellconfigcommon)->ssb_PositionsInBurst->choice.longBitmap.buf[7] = 0xff; - } - - - //ssb_periodicityServingCell - *(*servingcellconfigcommon)->ssb_periodicityServingCell = configuration->ServingCellConfigCommon_ssb_periodicityServingCell[CC_id]; - //dmrs_TypeA_Position - (*servingcellconfigcommon)->dmrs_TypeA_Position = configuration->ServingCellConfigCommon_dmrs_TypeA_Position[CC_id]; - - //lte_CRS_ToMatchAround - - //rateMatchPatternToAddModList - - ratematchpattern->rateMatchPatternId = configuration->rateMatchPatternId[CC_id]; - ratematchpattern->patternType.present = configuration->RateMatchPattern_patternType[CC_id]; - - if(ratematchpattern->patternType.present == NR_RateMatchPattern__patternType_PR_bitmaps){ - - ratematchpattern->patternType.choice.bitmaps->resourceBlocks.size = 35; - ratematchpattern->patternType.choice.bitmaps->resourceBlocks.bits_unused = 5; - ratematchpattern->patternType.choice.bitmaps->resourceBlocks.buf[0] = 0x07; - - for (int i =1;i<=34;i++ ){ - ratematchpattern->patternType.choice.bitmaps->resourceBlocks.buf[i] =0xff; - } - - ratematchpattern->patternType.choice.bitmaps->symbolsInResourceBlock.present = configuration->symbolsInResourceBlock[CC_id]; - if(ratematchpattern->patternType.choice.bitmaps->symbolsInResourceBlock.present == NR_RateMatchPattern__patternType__bitmaps__symbolsInResourceBlock_PR_oneSlot){ - ratematchpattern->patternType.choice.bitmaps->symbolsInResourceBlock.choice.oneSlot.size=2; - ratematchpattern->patternType.choice.bitmaps->symbolsInResourceBlock.choice.oneSlot.bits_unused=2; - ratematchpattern->patternType.choice.bitmaps->symbolsInResourceBlock.choice.oneSlot.buf[0]=0x3f; - ratematchpattern->patternType.choice.bitmaps->symbolsInResourceBlock.choice.oneSlot.buf[1]=0xff; - }else if(ratematchpattern->patternType.choice.bitmaps->symbolsInResourceBlock.present == NR_RateMatchPattern__patternType__bitmaps__symbolsInResourceBlock_PR_twoSlots){ - ratematchpattern->patternType.choice.bitmaps->symbolsInResourceBlock.choice.twoSlots.size=4; - ratematchpattern->patternType.choice.bitmaps->symbolsInResourceBlock.choice.twoSlots.bits_unused=4; - ratematchpattern->patternType.choice.bitmaps->symbolsInResourceBlock.choice.twoSlots.buf[0]=0x0f; - ratematchpattern->patternType.choice.bitmaps->symbolsInResourceBlock.choice.twoSlots.buf[1]=0xff; - ratematchpattern->patternType.choice.bitmaps->symbolsInResourceBlock.choice.twoSlots.buf[2]=0xff; - ratematchpattern->patternType.choice.bitmaps->symbolsInResourceBlock.choice.twoSlots.buf[3]=0xff; - } - - - ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->present = configuration->periodicityAndPattern[CC_id]; - if(ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->present == NR_RateMatchPattern__patternType__bitmaps__periodicityAndPattern_PR_n2){ - ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n2.size = 1; - ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n2.bits_unused = 6; - ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n2.buf[0] =0x03; - }else if(ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->present == NR_RateMatchPattern__patternType__bitmaps__periodicityAndPattern_PR_n4){ - ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n4.size = 1; - ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n4.bits_unused = 4; - ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n4.buf[0] = 0x0f; - }else if(ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->present == NR_RateMatchPattern__patternType__bitmaps__periodicityAndPattern_PR_n5){ - ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n5.size = 1; - ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n5.bits_unused = 3; - ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n5.buf[0] = 0x1f; - }else if(ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->present == NR_RateMatchPattern__patternType__bitmaps__periodicityAndPattern_PR_n8){ - ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n8.size = 1; - ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n8.bits_unused = 0; - ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n8.buf[0] = 0xff; - }else if(ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->present == NR_RateMatchPattern__patternType__bitmaps__periodicityAndPattern_PR_n10){ - ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n10.size = 2; - ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n10.bits_unused = 6; - ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n10.buf[0] = 0x03; - ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n10.buf[1] = 0xff; - }else if(ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->present == NR_RateMatchPattern__patternType__bitmaps__periodicityAndPattern_PR_n20){ - ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n20.size = 3; - ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n20.bits_unused = 4; - ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n20.buf[0] = 0x0f; - ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n20.buf[1] = 0xff; - ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n20.buf[2] = 0xff; - }else if(ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->present == NR_RateMatchPattern__patternType__bitmaps__periodicityAndPattern_PR_n40){ - ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n40.size = 5; - ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n40.bits_unused = 0; - ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n40.buf[0] = 0xff; - ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n40.buf[1] = 0xff; - ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n40.buf[2] = 0xff; - ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n40.buf[3] = 0xff; - ratematchpattern->patternType.choice.bitmaps->periodicityAndPattern->choice.n40.buf[4] = 0xff; - } - - }else if(ratematchpattern->patternType.present == NR_RateMatchPattern__patternType_PR_controlResourceSet){ - ratematchpattern->patternType.choice.controlResourceSet = configuration->RateMatchPattern_controlResourceSet[CC_id]; - } - - *(ratematchpattern->subcarrierSpacing) = configuration->RateMatchPattern_subcarrierSpacing[CC_id]; -#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0)) - ratematchpattern->dummy = configuration->RateMatchPattern_mode[CC_id]; -#else - ratematchpattern->mode = configuration->RateMatchPattern_mode[CC_id]; -#endif - - ASN_SEQUENCE_ADD(&(*servingcellconfigcommon)->rateMatchPatternToAddModList->list,&ratematchpattern); - - //rateMatchPatternToReleaseList - *(ratematchpatternid) = configuration->rateMatchPatternId[CC_id]; - ASN_SEQUENCE_ADD(&(*servingcellconfigcommon)->rateMatchPatternToReleaseList->list,&ratematchpatternid); - - //subcarrierSpacing - *(*servingcellconfigcommon)->subcarrierSpacing = configuration->NIA_SubcarrierSpacing[CC_id]; - - //tdd_UL_DL_ConfigurationCommon - (*servingcellconfigcommon)->tdd_UL_DL_ConfigurationCommon->referenceSubcarrierSpacing = configuration->referenceSubcarrierSpacing[CC_id]; - (*servingcellconfigcommon)->tdd_UL_DL_ConfigurationCommon->pattern1.dl_UL_TransmissionPeriodicity = configuration->dl_UL_TransmissionPeriodicity[CC_id]; - (*servingcellconfigcommon)->tdd_UL_DL_ConfigurationCommon->pattern1.nrofDownlinkSlots = configuration->nrofDownlinkSlots[CC_id]; - (*servingcellconfigcommon)->tdd_UL_DL_ConfigurationCommon->pattern1.nrofDownlinkSymbols = configuration->nrofDownlinkSymbols[CC_id]; - (*servingcellconfigcommon)->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSlots = configuration->nrofUplinkSlots[CC_id]; - (*servingcellconfigcommon)->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSymbols = configuration->nrofUplinkSymbols[CC_id]; - - //ss_PBCH_BlockPower - (*servingcellconfigcommon)->ss_PBCH_BlockPower = configuration->ServingCellConfigCommon_ss_PBCH_BlockPower[CC_id]; - -} void do_RLC_BEARER(uint8_t Mod_id, int CC_id, @@ -1140,35 +531,17 @@ void do_PHYSICALCELLGROUP(uint8_t Mod_id, } -void do_SpCellConfig(uint8_t Mod_id, - int CC_id, - struct NR_SpCellConfig *spconfig){ - //spconfig->servCellIndex = CALLOC(1,sizeof(NR_ServCellIndex_t)); - //*(spconfig->servCellIndex)= +void do_SpCellConfig(gNB_RRC_INST *rrc, + struct NR_SpCellConfig *spconfig){ gNB_RrcConfigurationReq *common_configuration; common_configuration = CALLOC(1,sizeof(gNB_RrcConfigurationReq)); //Fill servingcellconfigcommon config value - rrc_config_servingcellconfigcommon(Mod_id, - CC_id - #if defined(ENABLE_ITTI) - ,common_configuration - #endif - ); - //Fill common config to structure - do_SERVINGCELLCONFIGCOMMON(Mod_id, - CC_id, - #if defined(ENABLE_ITTI) - common_configuration, - #endif - 0 - ); + //Fill common config to structure + // rrc->configuration = common_configuration; spconfig->reconfigurationWithSync = CALLOC(1,sizeof(struct NR_ReconfigurationWithSync)); -/* - memcpy( spconfig->reconfigurationWithSync, - RC.nrrrc[Mod_id]->carrier[0].servingcellconfigcommon, - sizeof(struct NR_ServingCellConfigCommon)); -*/ + } + diff --git a/openair2/RRC/NR/MESSAGES/asn1_msg.h b/openair2/RRC/NR/MESSAGES/asn1_msg.h index d2e8b97391..e415b2726e 100644 --- a/openair2/RRC/NR/MESSAGES/asn1_msg.h +++ b/openair2/RRC/NR/MESSAGES/asn1_msg.h @@ -53,24 +53,9 @@ */ int xer_sprint_NR(char *string, size_t string_size, struct asn_TYPE_descriptor_s *td, void *sptr); -uint16_t get_adjacent_cell_id_NR(uint8_t Mod_id,uint8_t index); +uint8_t do_MIB_NR(gNB_RRC_INST *rrc, + uint32_t frame); -uint8_t get_adjacent_cell_mod_id_NR(uint16_t phyCellId); - -/** -\brief Generate configuration for SIB1 (eNB). -@param carrier pointer to Carrier information -@param N_RB_DL Number of downlink PRBs -@param phich_Resource PHICH resoure parameter -@param phich_duration PHICH duration parameter -@param frame radio frame number -@return size of encoded bit stream in bytes*/ -uint8_t do_MIB_NR(rrc_gNB_carrier_data_t *carrier, - uint32_t frame, - uint32_t ssb_SubcarrierOffset, - uint32_t pdcch_ConfigSIB1, - uint32_t subCarrierSpacingCommon, - uint32_t dmrs_TypeA_Position); /** \brief Generate configuration for SIB1 (eNB). @param carrier pointer to Carrier information @@ -81,13 +66,6 @@ uint8_t do_MIB_NR(rrc_gNB_carrier_data_t *carrier, uint8_t do_SIB1_NR(rrc_gNB_carrier_data_t *carrier,int Mod_id,int CC_id, gNB_RrcConfigurationReq *configuration); -void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id, - int CC_id, - #if defined(ENABLE_ITTI) - gNB_RrcConfigurationReq *configuration, - #endif - int initial_flag - ); void do_RLC_BEARER(uint8_t Mod_id, int CC_id, @@ -104,8 +82,7 @@ void do_PHYSICALCELLGROUP(uint8_t Mod_id, struct NR_PhysicalCellGroupConfig *physicalCellGroupConfig, physicalcellgroup_t *physicalcellgroup_config); -void do_SpCellConfig(uint8_t Mod_id, - int CC_id, +void do_SpCellConfig(gNB_RRC_INST *rrc, struct NR_SpCellConfig *spconfig); diff --git a/openair2/RRC/NR/nr_rrc_config.c b/openair2/RRC/NR/nr_rrc_config.c index 80008d9af2..dedd4cf839 100644 --- a/openair2/RRC/NR/nr_rrc_config.c +++ b/openair2/RRC/NR/nr_rrc_config.c @@ -30,144 +30,6 @@ #include "nr_rrc_config.h" -void rrc_config_servingcellconfigcommon(uint8_t Mod_id, - int CC_id - #if defined(ENABLE_ITTI) - ,gNB_RrcConfigurationReq *common_configuration - #endif - ){ - - common_configuration->MIB_subCarrierSpacingCommon[CC_id] = 0; - common_configuration->MIB_ssb_SubcarrierOffset[CC_id] = 0; - common_configuration->MIB_dmrs_TypeA_Position[CC_id] = 0; - common_configuration->pdcch_ConfigSIB1[CC_id] = 0; - common_configuration->absoluteFrequencySSB[CC_id] = 0; - common_configuration->DL_FreqBandIndicatorNR[CC_id] = 0; - common_configuration->DL_absoluteFrequencyPointA[CC_id] = 0; - common_configuration->DL_offsetToCarrier[CC_id] = 0; - common_configuration->DL_SCS_SubcarrierSpacing[CC_id] = 0; - common_configuration->DL_carrierBandwidth[CC_id] = 0; - common_configuration->DL_locationAndBandwidth[CC_id] = 0; - common_configuration->DL_BWP_SubcarrierSpacing[CC_id] = 0; - common_configuration->DL_BWP_prefix_type[CC_id] = 0; - common_configuration->UL_FreqBandIndicatorNR[CC_id] = 0; - common_configuration->UL_absoluteFrequencyPointA[CC_id] = 0; - common_configuration->UL_additionalSpectrumEmission[CC_id] = 0; - common_configuration->UL_p_Max[CC_id] = 0; - common_configuration->UL_frequencyShift7p5khz[CC_id] = 0; - common_configuration->UL_offsetToCarrier[CC_id] = 0; - common_configuration->UL_SCS_SubcarrierSpacing[CC_id] = 0; - common_configuration->UL_carrierBandwidth[CC_id] = 0; - common_configuration->UL_locationAndBandwidth[CC_id] = 0; - common_configuration->UL_BWP_SubcarrierSpacing[CC_id] = 0; - common_configuration->UL_BWP_prefix_type[CC_id] = 0; - common_configuration->UL_timeAlignmentTimerCommon[CC_id] = 0; - common_configuration->ServingCellConfigCommon_ssb_PositionsInBurst_PR[CC_id] = 0; - common_configuration->ServingCellConfigCommon_ssb_periodicityServingCell[CC_id] = 0; - common_configuration->ServingCellConfigCommon_dmrs_TypeA_Position[CC_id] = 0; - common_configuration->NIA_SubcarrierSpacing[CC_id] = 0; - common_configuration->ServingCellConfigCommon_ss_PBCH_BlockPower[CC_id] = 0; - common_configuration->referenceSubcarrierSpacing[CC_id] = 0; - common_configuration->dl_UL_TransmissionPeriodicity[CC_id] = 0; - common_configuration->nrofDownlinkSlots[CC_id] = 0; - common_configuration->nrofDownlinkSymbols[CC_id] = 0; - common_configuration->nrofUplinkSlots[CC_id] = 0; - common_configuration->nrofUplinkSymbols[CC_id] = 0; - common_configuration->rach_totalNumberOfRA_Preambles[CC_id] = 0; - common_configuration->rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_choice[CC_id] = 0; - common_configuration->rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneEighth[CC_id] = 0; - common_configuration->rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneFourth[CC_id] = 0; - common_configuration->rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneHalf[CC_id] = 0; - common_configuration->rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_one[CC_id] = 0; - common_configuration->rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_two[CC_id] = 0; - common_configuration->rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_four[CC_id] = 0; - common_configuration->rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_eight[CC_id] = 0; - common_configuration->rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_sixteen[CC_id] = 0; - common_configuration->rach_groupBconfigured[CC_id] = 0; - common_configuration->rach_ra_Msg3SizeGroupA[CC_id] = 0; - common_configuration->rach_messagePowerOffsetGroupB[CC_id] = 0; - common_configuration->rach_numberOfRA_PreamblesGroupA[CC_id] = 0; - common_configuration->rach_ra_ContentionResolutionTimer[CC_id] = 0; - common_configuration->rsrp_ThresholdSSB[CC_id] = 0; - common_configuration->rsrp_ThresholdSSB_SUL[CC_id] = 0; - common_configuration->prach_RootSequenceIndex_choice[CC_id] = 0; - common_configuration->prach_RootSequenceIndex_l839[CC_id] = 0; - common_configuration->prach_RootSequenceIndex_l139[CC_id] = 0; - common_configuration->prach_msg1_SubcarrierSpacing[CC_id] = 0; - common_configuration->restrictedSetConfig[CC_id] = 0; - common_configuration->msg3_transformPrecoding[CC_id] = 0; - common_configuration->prach_ConfigurationIndex[CC_id] = 0; - common_configuration->prach_msg1_FDM[CC_id] = 0; - common_configuration->prach_msg1_FrequencyStart[CC_id] = 0; - common_configuration->zeroCorrelationZoneConfig[CC_id] = 0; - common_configuration->preambleReceivedTargetPower[CC_id] = 0; - common_configuration->preambleTransMax[CC_id] = 0; - common_configuration->powerRampingStep[CC_id] = 0; - common_configuration->ra_ResponseWindow[CC_id] = 0; - common_configuration->groupHoppingEnabledTransformPrecoding[CC_id] = 0; - common_configuration->msg3_DeltaPreamble[CC_id] = 0; - common_configuration->p0_NominalWithGrant[CC_id] = 0; - common_configuration->PUSCH_TimeDomainResourceAllocation_k2[CC_id] = 0; - common_configuration->PUSCH_TimeDomainResourceAllocation_mappingType[CC_id] = 0; - common_configuration->PUSCH_TimeDomainResourceAllocation_startSymbolAndLength[CC_id] = 0; - common_configuration->pucch_ResourceCommon[CC_id] = 0; - common_configuration->pucch_GroupHopping[CC_id] = 0; - common_configuration->hoppingId[CC_id] = 0; - common_configuration->p0_nominal[CC_id] = 0; - common_configuration->PDSCH_TimeDomainResourceAllocation_k0[CC_id] = 0; - common_configuration->PDSCH_TimeDomainResourceAllocation_mappingType[CC_id] = 0; - common_configuration->PDSCH_TimeDomainResourceAllocation_startSymbolAndLength[CC_id] = 0; - common_configuration->rateMatchPatternId[CC_id] = 0; - common_configuration->RateMatchPattern_patternType[CC_id] = 0; - common_configuration->symbolsInResourceBlock[CC_id] = 0; - common_configuration->periodicityAndPattern[CC_id] = 0; - common_configuration->RateMatchPattern_controlResourceSet[CC_id] = 0; - common_configuration->RateMatchPattern_subcarrierSpacing[CC_id] = 0; - common_configuration->RateMatchPattern_mode[CC_id] = 0; - common_configuration->controlResourceSetZero[CC_id] = 0; - common_configuration->searchSpaceZero[CC_id] = 0; - common_configuration->searchSpaceSIB1[CC_id] = 0; - common_configuration->searchSpaceOtherSystemInformation[CC_id] = 0; - common_configuration->pagingSearchSpace[CC_id] = 0; - common_configuration->ra_SearchSpace[CC_id] = 0; - common_configuration->PDCCH_common_controlResourceSetId[CC_id] = 0; - common_configuration->PDCCH_common_ControlResourceSet_duration[CC_id] = 0; - common_configuration->PDCCH_cce_REG_MappingType[CC_id] = 0; - common_configuration->PDCCH_reg_BundleSize[CC_id] = 0; - common_configuration->PDCCH_interleaverSize[CC_id] = 0; - common_configuration->PDCCH_shiftIndex[CC_id] = 0; - common_configuration->PDCCH_precoderGranularity[CC_id] = 0; - common_configuration->PDCCH_TCI_StateId[CC_id] = 0; - common_configuration->tci_PresentInDCI[CC_id] = 0; - common_configuration->PDCCH_DMRS_ScramblingID[CC_id] = 0; - common_configuration->SearchSpaceId[CC_id] = 0; - common_configuration->commonSearchSpaces_controlResourceSetId[CC_id] = 0; - common_configuration->SearchSpace_monitoringSlotPeriodicityAndOffset_choice[CC_id] = 0; - common_configuration->SearchSpace_monitoringSlotPeriodicityAndOffset_value[CC_id] = 0; - common_configuration->SearchSpace_duration[CC_id] = 0; - common_configuration->SearchSpace_nrofCandidates_aggregationLevel1[CC_id] = 0; - common_configuration->SearchSpace_nrofCandidates_aggregationLevel2[CC_id] = 0; - common_configuration->SearchSpace_nrofCandidates_aggregationLevel4[CC_id] = 0; - common_configuration->SearchSpace_nrofCandidates_aggregationLevel8[CC_id] = 0; - common_configuration->SearchSpace_nrofCandidates_aggregationLevel16[CC_id] = 0; - common_configuration->SearchSpace_searchSpaceType[CC_id] = 0; - common_configuration->Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel1[CC_id] = 0; - common_configuration->Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel2[CC_id] = 0; - common_configuration->Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel4[CC_id] = 0; - common_configuration->Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel8[CC_id] = 0; - common_configuration->Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel16[CC_id] = 0; - common_configuration->Common_dci_Format2_3_monitoringPeriodicity[CC_id] = 0; - common_configuration->Common_dci_Format2_3_nrofPDCCH_Candidates[CC_id] = 0; - common_configuration->ue_Specific__dci_Formats[CC_id] = 0; - common_configuration->RateMatchPatternLTE_CRS_carrierFreqDL[CC_id] = 0; - common_configuration->RateMatchPatternLTE_CRS_carrierBandwidthDL[CC_id] = 0; - common_configuration->RateMatchPatternLTE_CRS_nrofCRS_Ports[CC_id] = 0; - common_configuration->RateMatchPatternLTE_CRS_v_Shift[CC_id] = 0; - common_configuration->RateMatchPatternLTE_CRS_radioframeAllocationPeriod[CC_id] = 0; - common_configuration->RateMatchPatternLTE_CRS_radioframeAllocationOffset[CC_id] = 0; - common_configuration->RateMatchPatternLTE_CRS_subframeAllocation_choice[CC_id] = 0; -} - void rrc_config_rlc_bearer(uint8_t Mod_id, int CC_id, rlc_bearer_config_t *rlc_config @@ -259,4 +121,4 @@ void rrc_config_rachdedicated(uint8_t Mod_id, physicalcellgroup_t *physicalcellgroup_config ){ -} \ No newline at end of file +} diff --git a/openair2/RRC/NR/nr_rrc_defs.h b/openair2/RRC/NR/nr_rrc_defs.h index 2290a409e1..7e0ad2acbe 100644 --- a/openair2/RRC/NR/nr_rrc_defs.h +++ b/openair2/RRC/NR/nr_rrc_defs.h @@ -379,18 +379,10 @@ typedef struct { uint8_t *ServingCellConfigCommon; uint8_t sizeof_servingcellconfigcommon; - //implicit parameters needed - int physCellId; - int Ncp; //cyclic prefix for DL - int Ncp_UL; //cyclic prefix for UL - int p_gNB; //number of tx antenna port - int p_rx_gNB; //number of receiving antenna ports - uint64_t dl_CarrierFreq; //detected by the UE - uint64_t ul_CarrierFreq; //detected by the UE - //are the only static one (memory has been already allocated) NR_BCCH_BCH_Message_t mib; - + + int ssb_SubcarrierOffset; NR_ServingCellConfigCommon_t *servingcellconfigcommon; @@ -405,8 +397,9 @@ typedef struct { //---NR---(completely change)--------------------- typedef struct gNB_RRC_INST_s { + int module_id; eth_params_t eth_params_s; - rrc_gNB_carrier_data_t carrier[MAX_NUM_CCs]; + rrc_gNB_carrier_data_t carrier; uid_allocator_t uid_allocator; // for rrc_ue_head RB_HEAD(rrc_nr_ue_tree_s, rrc_gNB_ue_context_s) rrc_ue_head; // ue_context tree key search by rnti @@ -415,11 +408,6 @@ typedef struct gNB_RRC_INST_s { hash_table_t *initial_id2_s1ap_ids; // key is content is rrc_ue_s1ap_ids_t hash_table_t *s1ap_id2_s1ap_ids ; // key is content is rrc_ue_s1ap_ids_t - //RRC configuration -#if defined(ENABLE_ITTI) - gNB_RrcConfigurationReq configuration;//rrc_messages_types.h -#endif - // other PLMN parameters /// Mobile country code int mcc; diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index 749320b357..c32596137c 100644 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -71,21 +71,15 @@ # include "UTIL/OSA/osa_defs.h" #endif -#if defined(ENABLE_USE_MME) # include "rrc_eNB_S1AP.h" # include "rrc_eNB_GTPV1U.h" -# if defined(ENABLE_ITTI) -# else -# include "../../S1AP/s1ap_eNB.h" -# endif -#endif #include "pdcp.h" #include "gtpv1u_eNB_task.h" -#if defined(ENABLE_ITTI) + # include "intertask_interface.h" -#endif + #if ENABLE_RAL # include "rrc_eNB_ral.h" @@ -118,12 +112,10 @@ void openair_nr_rrc_on(const protocol_ctxt_t* const ctxt_pP){ LOG_I(NR_RRC, PROTOCOL_NR_RRC_CTXT_FMT" gNB:OPENAIR NR RRC IN....\n",PROTOCOL_NR_RRC_CTXT_ARGS(ctxt_pP)); - for (int CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) { - rrc_config_nr_buffer (&RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].SI, BCCH, 1); - RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].SI.Active = 1; - rrc_config_nr_buffer (&RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].Srb0, CCCH, 1); - RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Active = 1; - } + rrc_config_nr_buffer (&RC.nrrrc[ctxt_pP->module_id]->carrier.SI, BCCH, 1); + RC.nrrrc[ctxt_pP->module_id]->carrier.SI.Active = 1; + rrc_config_nr_buffer (&RC.nrrrc[ctxt_pP->module_id]->carrier.Srb0, CCCH, 1); + RC.nrrrc[ctxt_pP->module_id]->carrier.Srb0.Active = 1; } @@ -206,8 +198,7 @@ void rrc_gNB_generate_SgNBAdditionRequestAcknowledge( physicalcellgroup_config); - do_SpCellConfig(ctxt_pP->module_id, - ue_context_pP->ue_context.primaryCC_id, + do_SpCellConfig(RC.nrrrc[ctxt_pP->module_id], spCellConfig); @@ -216,60 +207,23 @@ void rrc_gNB_generate_SgNBAdditionRequestAcknowledge( ///---------------------------------------------------------------------------------------------------------------/// ///---------------------------------------------------------------------------------------------------------------/// -static void init_NR_SI(const protocol_ctxt_t* const ctxt_pP, - const int CC_id - #if defined(ENABLE_ITTI) - , - gNB_RrcConfigurationReq * configuration - #endif - ){ - //int i; +static void init_NR_SI(gNB_RRC_INST *rrc) { + LOG_D(RRC,"%s()\n\n\n\n",__FUNCTION__); - // copy basic parameters - RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].physCellId = configuration->Nid_cell[CC_id]; - RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].p_gNB = configuration->nb_antenna_ports[CC_id]; - RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].Ncp = configuration->DL_prefix_type[CC_id]; - RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].Ncp_UL = configuration->UL_prefix_type[CC_id]; - RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].dl_CarrierFreq = configuration->downlink_frequency[CC_id]; - RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].ul_CarrierFreq = configuration->downlink_frequency[CC_id]+ configuration->uplink_frequency_offset[CC_id]; - ///MIB - RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_MIB = 0; - RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].MIB = (uint8_t*) malloc16(4); - RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_MIB = do_MIB_NR(&RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id],0, - #ifdef ENABLE_ITTI - configuration->MIB_ssb_SubcarrierOffset[CC_id], - configuration->pdcch_ConfigSIB1[CC_id], - configuration->MIB_subCarrierSpacingCommon[CC_id], - configuration->MIB_dmrs_TypeA_Position[CC_id] - #else - 0,0,15,2 - #endif - ); - do_SERVINGCELLCONFIGCOMMON(ctxt_pP->module_id, - CC_id, - #if defined(ENABLE_ITTI) - configuration, - #endif - 1 - ); + rrc->carrier.MIB = (uint8_t*) malloc16(4); + rrc->carrier.sizeof_MIB = do_MIB_NR(rrc,0); + LOG_I(NR_RRC,"Done init_NR_SI\n"); - rrc_mac_config_req_gNB(ctxt_pP->module_id, - CC_id, - RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].physCellId, - RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].p_gNB, - configuration->nr_band[CC_id], - configuration->ServingCellConfigCommon_ssb_PositionsInBurst_PR[CC_id], - RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].dl_CarrierFreq, - configuration->N_RB_DL[CC_id], - (NR_BCCH_BCH_Message_t *)&RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].mib, - (NR_ServingCellConfigCommon_t *)&RC.nrrrc[ctxt_pP->module_id]->carrier[CC_id].servingcellconfigcommon + rrc_mac_config_req_gNB(rrc->module_id, + rrc->carrier.ssb_SubcarrierOffset, + (NR_ServingCellConfigCommon_t *)rrc->carrier.servingcellconfigcommon ); } @@ -277,73 +231,41 @@ static void init_NR_SI(const protocol_ctxt_t* const ctxt_pP, char openair_rrc_gNB_configuration(const module_id_t gnb_mod_idP, gNB_RrcConfigurationReq* configuration){ protocol_ctxt_t ctxt; int CC_id; + gNB_RRC_INST *rrc=RC.nrrrc[gnb_mod_idP]; PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, gnb_mod_idP, GNB_FLAG_YES, NOT_A_RNTI, 0, 0,gnb_mod_idP); + LOG_I(NR_RRC, PROTOCOL_NR_RRC_CTXT_FMT" Init...\n", PROTOCOL_NR_RRC_CTXT_ARGS(&ctxt)); #if OCP_FRAMEWORK - while ( RC.nrrrc[gnb_mod_idP] == NULL ) { - LOG_E(NR_RRC, "RC.nrrrc not yet initialized, waiting 1 second\n"); - sleep(1); - } - #endif - AssertFatal(RC.nrrrc[gnb_mod_idP] != NULL, "RC.nrrrc not initialized!"); - AssertFatal(NUMBER_OF_UE_MAX < (module_id_t)0xFFFFFFFFFFFFFFFF, " variable overflow"); - #ifdef ENABLE_ITTI - AssertFatal(configuration!=NULL,"configuration input is null\n"); - #endif - - RC.nrrrc[ctxt.module_id]->Nb_ue = 0; - - for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) { - RC.nrrrc[ctxt.module_id]->carrier[CC_id].Srb0.Active = 0; + while (rrc == NULL ) { + LOG_E(NR_RRC, "RC.nrrrc not yet initialized, waiting 1 second\n"); + sleep(1); } +#endif + AssertFatal(rrc != NULL, "RC.nrrrc not initialized!"); + AssertFatal(NUMBER_OF_UE_MAX < (module_id_t)0xFFFFFFFFFFFFFFFF, " variable overflow"); + AssertFatal(configuration!=NULL,"configuration input is null\n"); + + rrc->module_id = gnb_mod_idP; + rrc->Nb_ue = 0; + + rrc->carrier.Srb0.Active = 0; - uid_linear_allocator_init(&RC.nrrrc[ctxt.module_id]->uid_allocator); - RB_INIT(&RC.nrrrc[ctxt.module_id]->rrc_ue_head); + uid_linear_allocator_init(&rrc->uid_allocator); + RB_INIT(&rrc->rrc_ue_head); - RC.nrrrc[ctxt.module_id]->initial_id2_s1ap_ids = hashtable_create (NUMBER_OF_UE_MAX * 2, NULL, NULL); - RC.nrrrc[ctxt.module_id]->s1ap_id2_s1ap_ids = hashtable_create (NUMBER_OF_UE_MAX * 2, NULL, NULL); - - memcpy(&RC.nrrrc[ctxt.module_id]->configuration,configuration,sizeof(gNB_RrcConfigurationReq)); + rrc->initial_id2_s1ap_ids = hashtable_create (NUMBER_OF_UE_MAX * 2, NULL, NULL); + rrc->s1ap_id2_s1ap_ids = hashtable_create (NUMBER_OF_UE_MAX * 2, NULL, NULL); + rrc->carrier.servingcellconfigcommon = configuration->scc; /// System Information INIT LOG_I(NR_RRC, PROTOCOL_NR_RRC_CTXT_FMT" Checking release \n",PROTOCOL_NR_RRC_CTXT_ARGS(&ctxt)); - #ifdef CBA - - for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) { - for (j = 0; j < NUM_MAX_CBA_GROUP; j++) { - RC.nrrrc[ctxt.module_id]->carrier[CC_id].cba_rnti[j] = CBA_OFFSET + j; - } - - if (RC.nrrrc[ctxt.module_id]->carrier[CC_id].num_active_cba_groups > NUM_MAX_CBA_GROUP) { - RC.nrrrc[ctxt.module_id]->carrier[CC_id].num_active_cba_groups = NUM_MAX_CBA_GROUP; - } - - LOG_D(NR_RRC, - PROTOCOL_NR_RRC_CTXT_FMT" Initialization of 4 cba_RNTI values (%x %x %x %x) num active groups %d\n", - PROTOCOL_NR_RRC_CTXT_ARGS(&ctxt), - gnb_mod_idP, RC.nrrrc[ctxt.module_id]->carrier[CC_id].cba_rnti[0], - RC.nrrrc[ctxt.module_id]->carrier[CC_id].cba_rnti[1], - RC.nrrrc[ctxt.module_id]->carrier[CC_id].cba_rnti[2], - RC.nrrrc[ctxt.module_id]->carrier[CC_id].cba_rnti[3], - RC.nrrrc[ctxt.module_id]->carrier[CC_id].num_active_cba_groups); - } - - #endif - - for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) { - init_NR_SI(&ctxt, - CC_id - #if defined(ENABLE_ITTI) - ,configuration - #endif - ); - }//END for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) + init_NR_SI(rrc); rrc_init_nr_global_param(); @@ -357,7 +279,6 @@ char openair_rrc_gNB_configuration(const module_id_t gnb_mod_idP, gNB_RrcConfigu ///---------------------------------------------------------------------------------------------------------------/// ///---------------------------------------------------------------------------------------------------------------/// -#if defined(ENABLE_ITTI) void* rrc_gnb_task(void* args_p){ MessageDef *msg_p; @@ -466,4 +387,3 @@ void* rrc_gnb_task(void* args_p){ } } -#endif //END #if defined(ENABLE_ITTI) diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpn300.conf index dbd937d61a..428fe8ad03 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpn300.conf @@ -21,183 +21,159 @@ gNBs = ////////// Physical parameters: - component_carriers = ( - { - node_function = "3GPP_gNODEB"; - node_timing = "synch_to_ext_device"; - node_synch_ref = 0; - frame_type = "TDD"; - DL_prefix_type = "NORMAL"; - UL_prefix_type = "NORMAL"; - eutra_band = 78; - downlink_frequency = 3510000000L; - uplink_frequency_offset = -120000000; - Nid_cell = 0; - N_RB_DL = 217; - nb_antenna_ports = 1; - nb_antennas_tx = 1; - nb_antennas_rx = 1; - tx_gain = 90; - rx_gain = 125; - MIB_subCarrierSpacingCommon = 30; - MIB_ssb_SubcarrierOffset = 0; - MIB_dmrs_TypeA_Position = 2; - pdcch_ConfigSIB1 = 0; - SIB1_frequencyOffsetSSB = "khz5"; - SIB1_ssb_PeriodicityServingCell = 5; - SIB1_ss_PBCH_BlockPower = -60; - absoluteFrequencySSB = 0; - DL_FreqBandIndicatorNR = 15; - DL_absoluteFrequencyPointA = 15; - DL_offsetToCarrier = 15; - DL_SCS_SubcarrierSpacing = "kHz30"; - DL_SCS_SpecificCarrier_k0 = 0; - DL_carrierBandwidth = 15; - DL_locationAndBandwidth = 15; - DL_BWP_SubcarrierSpacing = "kHz30"; - DL_BWP_prefix_type = "NORMAL"; - UL_FreqBandIndicatorNR = 15; - UL_absoluteFrequencyPointA = 13; - UL_additionalSpectrumEmission = 3; - UL_p_Max = -1; - UL_frequencyShift7p5khz = "TRUE"; - UL_offsetToCarrier = 10; - UL_SCS_SubcarrierSpacing = "kHz30"; - UL_SCS_SpecificCarrier_k0 = 0; - UL_carrierBandwidth = 15; - UL_locationAndBandwidth = 15; - UL_BWP_SubcarrierSpacing = "kHz30"; - UL_BWP_prefix_type = "NORMAL"; - UL_timeAlignmentTimerCommon = "infinity"; - ServingCellConfigCommon_n_TimingAdvanceOffset = "n0" - ServingCellConfigCommon_ssb_PositionsInBurst_PR = 0x01; - ServingCellConfigCommon_ssb_periodicityServingCell = 10; - ServingCellConfigCommon_dmrs_TypeA_Position = 2; - NIA_SubcarrierSpacing = "kHz15"; - ServingCellConfigCommon_ss_PBCH_BlockPower = -60; - referenceSubcarrierSpacing = "kHz15"; - dl_UL_TransmissionPeriodicity = "ms0p5"; - nrofDownlinkSlots = 10; - nrofDownlinkSymbols = 10; - nrofUplinkSlots = 10; - nrofUplinkSymbols = 10; - rach_totalNumberOfRA_Preambles = 63; - rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_choice = "oneEighth"; - rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneEighth = 4; - rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneFourth = 8; - rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneHalf = 16; - rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_one = 24; - rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_two = 32; - rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_four = 8; - rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_eight = 4; - rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_sixteen = 2; - rach_groupBconfigured = "ENABLE"; - rach_ra_Msg3SizeGroupA = 56; - rach_messagePowerOffsetGroupB = "dB0"; - rach_numberOfRA_PreamblesGroupA = 32; - rach_ra_ContentionResolutionTimer = 8; - rsrp_ThresholdSSB = 64; - rsrp_ThresholdSSB_SUL = 64; - prach_RootSequenceIndex_choice = "l839"; - prach_RootSequenceIndex_l839 = 0; - prach_RootSequenceIndex_l139 = 0; - prach_msg1_SubcarrierSpacing = "kHz30"; - restrictedSetConfig = "unrestrictedSet"; - msg3_transformPrecoding = "ENABLE"; - prach_ConfigurationIndex = 10; - prach_msg1_FDM = "one"; - prach_msg1_FrequencyStart = 10; - zeroCorrelationZoneConfig = 10; - preambleReceivedTargetPower = -150; - preambleTransMax = 6; - powerRampingStep = "dB0"; - ra_ResponseWindow = 8; - groupHoppingEnabledTransformPrecoding = "ENABLE"; - msg3_DeltaPreamble = 0; - p0_NominalWithGrant = 0; - PUSCH_TimeDomainResourceAllocation_k2 = 0; - PUSCH_TimeDomainResourceAllocation_mappingType = "typeA"; - PUSCH_TimeDomainResourceAllocation_startSymbolAndLength = 0; - pucch_ResourceCommon = 0; - pucch_GroupHopping = "neither"; - hoppingId = 0; - p0_nominal = -30; - PDSCH_TimeDomainResourceAllocation_k0 = 2; - PDSCH_TimeDomainResourceAllocation_mappingType = "typeA"; - PDSCH_TimeDomainResourceAllocation_startSymbolAndLength = 0; - rateMatchPatternId = 0; - RateMatchPattern_patternType = "bitmaps"; - symbolsInResourceBlock = "oneSlot"; - periodicityAndPattern = 2; - RateMatchPattern_controlResourceSet = 5; - RateMatchPattern_subcarrierSpacing = "kHz30"; - RateMatchPattern_mode = "dynamic"; - controlResourceSetZero = 0; - searchSpaceZero = 0; - searchSpaceSIB1 = 10; - searchSpaceOtherSystemInformation = 10; - pagingSearchSpace = 10; - ra_SearchSpace = 10; - PDCCH_common_controlResourceSetId = 5; - PDCCH_common_ControlResourceSet_duration = 2; - PDCCH_cce_REG_MappingType = "nonInterleaved"; - PDCCH_reg_BundleSize = 3; - PDCCH_interleaverSize = 3; - PDCCH_shiftIndex = 10; - PDCCH_precoderGranularity = "sameAsREG-bundle"; - PDCCH_TCI_StateId = 32; - tci_PresentInDCI = "ENABLE"; - PDCCH_DMRS_ScramblingID = 0; - SearchSpaceId = 10; - commonSearchSpaces_controlResourceSetId = 5; - SearchSpace_monitoringSlotPeriodicityAndOffset_choice = "sl1"; - SearchSpace_monitoringSlotPeriodicityAndOffset_value = 0; - SearchSpace_duration = 2; - SearchSpace_nrofCandidates_aggregationLevel1 = 0; - SearchSpace_nrofCandidates_aggregationLevel2 = 0; - SearchSpace_nrofCandidates_aggregationLevel4 = 0; - SearchSpace_nrofCandidates_aggregationLevel8 = 0; - SearchSpace_nrofCandidates_aggregationLevel16 = 0; - SearchSpace_searchSpaceType = "common"; - Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel1 = 1; - Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel2 = 1; - Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel4 = 1; - Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel8 = 1; - Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel16 = 1; - Common_dci_Format2_3_monitoringPeriodicity = 1; - Common_dci_Format2_3_nrofPDCCH_Candidates = 1; - ue_Specific__dci_Formats = "formats0-0-And-1-0"; - RateMatchPatternLTE_CRS_carrierFreqDL = 6; - RateMatchPatternLTE_CRS_carrierBandwidthDL = 6; - RateMatchPatternLTE_CRS_nrofCRS_Ports = 1; - RateMatchPatternLTE_CRS_v_Shift = 0; - RateMatchPatternLTE_CRS_radioframeAllocationPeriod = 1; - RateMatchPatternLTE_CRS_radioframeAllocationOffset = 0; - RateMatchPatternLTE_CRS_subframeAllocation_choice = "oneFrame"; - } - ); - - - srb1_parameters : + ssb_SubcarrierOffset = 0; + + servingCellConfigCommon = ( { - # timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500] - timer_poll_retransmit = 80; + #spCellConfigCommon - # timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200] - timer_reordering = 35; + physCellId = 0; - # timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500] - timer_status_prohibit = 0; +# downlinkConfigCommon + #frequencyInfoDL + # this is 3600 MHz + 84 PRBs@30kHz SCS (same as initial BWP) + absoluteFrequencySSB = 642016; + dl_frequencyBand = 78; + # this is 3600 MHz + dl_absoluteFrequencyPointA = 640000; + #scs-SpecificCarrierList + dl_offstToCarrier = 0; +# subcarrierSpacing +# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + dl_subcarrierSpacing = 1; + dl_carrierBandwidth = 217; + #initialDownlinkBWP + #genericParameters + # this is RBstart=84,L=50 (275*(L-1))+RBstart + initialDLBWPlocationAndBandwidth = 13559; +# subcarrierSpacing +# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + initialDLBWPsubcarrierSpacing = 1; + #pdcch-ConfigCommon + initialDLBWPcontrolResourceSetZero = 12; + initialDLBWPsearchSpaceZero = 0; + #pdsch-ConfigCommon + #pdschTimeDomainAllocationList (up to 16 entries) + initialDLBWPk0_0 = 0; + #initialULBWPmappingType + #0=typeA,1=typeB + initialDLBWPmappingType_0 = 0; + #this is SS=2,L=3 + initialDLBWPstartSymbolAndLength_0 = 40; - # poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)] - poll_pdu = 4; + initialDLBWPk0_1 = 0; + initialDLBWPmappingType_1 = 0; + #this is SS=2,L=12 + initialDLBWPstartSymbolAndLength_1 = 53; - # poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)] - poll_byte = 99999; + initialDLBWPk0_2 = 0; + initialDLBWPmappingType_2 = 0; + #this is SS=1,L=12 + initialDLBWPstartSymbolAndLength_2 = 54; + #uplinkConfigCommon + #frequencyInfoUL + ul_frequencyBand = 78; + #scs-SpecificCarrierList + ul_offstToCarrier = 0; +# subcarrierSpacing +# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + ul_subcarrierSpacing = 1; + ul_carrierBandwidth = 217; + pMax = 20; + #initialUplinkBWP + #genericParameters + initialULBWPlocationAndBandwidth = 13559; +# subcarrierSpacing +# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + initialULBWPsubcarrierSpacing = 1; + #rach-ConfigCommon + #rach-ConfigGeneric + prach_ConfigurationIndex = 98; +#prach_msg1_FDM +#0 = one, 1=two, 2=four, 3=eight + prach_msg1_FDM = 0; + prach_msg1_FrequencyStart = 0; + zeroCorrelationZoneConfig = 13; + preambleReceivedTargetPower = -118; + preambleTransMax = 6; +#powerRampingStep +# 0=dB0,1=dB2,2=dB4,3=dB6 + powerRampingStep = 1; + ra_ResponseWindow = 120; +#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR +#0=oneeighth,1=onefourth,2=half,3=one,4=two,5=four,6=eight,7=sixteen + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3; + ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 64; + ra_ContentionResolutionTimer = 64; + rsrp_ThresholdSSB = 19; +#prach-RootSequenceIndex_PR +#0 = 839, 1 = 139 + prach_RootSequenceIndex_PR = 1; + prach_RootSequenceIndex = 1; + # SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex + # + msg1_SubcarrierSpacing = 1, + +# restrictedSetConfig +# 0=unrestricted, 1=restricted type A, 2=restricted type B + restrictedSetConfig = 0, + # pusch-ConfigCommon (up to 16 elements) + initialULBWPk2_0 = 2; + initialULBWPmappingType_0 = 1 + # this is SS=0 L=11 + initialULBWPstartSymbolAndLength_0 = 55; + + initialULBWPk2_1 = 2; + initialULBWPmappingType_1 = 1; + # this is SS=0 L=12 + initialULBWPstartSymbolAndLength_1 = 69; + + + msg3_DeltaPreamble = 1; + p0_NominalWithGrant =-90; + +# pucch-ConfigCommon setup : +# pucchGroupHopping +# 0 = neither, 1= group hopping, 2=sequence hopping + pucchGroupHopping = 0; + hoppingId = 40; + p0_nominal = -90; +# ssb_PositionsInBurs_BitmapPR +# 1=short, 2=medium, 3=long + ssb_PositionsInBurst_PR = 2; + ssb_PositionsInBurst_Bitmap = 255; + +# ssb_periodicityServingCell +# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1 + ssb_periodicityServingCell = 2 +; +# dmrs_TypeA_position +# 0 = pos2, 1 = pos3 + dmrs_TypeA_Position = 0; + +# subcarrierSpacing +# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + subcarrierSpacing = 1; + + + #tdd-UL-DL-ConfigurationCommon +# subcarrierSpacing +# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + referenceSubcarrierSpacing = 2; + # pattern1 + # dl_UL_TransmissionPeriodicity + # 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10 + dl_UL_TransmissionPeriodicity = 0; + nrofDownlinkSlots = 7; + nrofDownlinkSymbols = 6; + nrofUplinkSlots = 2; + nrofUplinkSymbols = 4; + + ssPBCH_BlockPower = 10; + } + + ); - # max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32] - max_retx_threshold = 4; - } # ------- SCTP definitions SCTP :