From 103168a047e873b573e3881fcc2fbe420ff17e76 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Wed, 17 Jun 2020 09:55:26 +0200 Subject: [PATCH 001/579] standalone RRU executable initial testing version --- cmake_targets/CMakeLists.txt | 25 +++++++++++++ cmake_targets/build_oai | 15 ++++++-- openair1/PHY/INIT/init_top.c | 1 - openair1/PHY/INIT/lte_init.c | 1 + openair1/PHY/INIT/lte_init_ue.c | 1 + targets/RT/USER/lte-ru.c | 65 ++++++++++++++++++--------------- 6 files changed, 74 insertions(+), 34 deletions(-) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 4f91c8295b..ad8affabe2 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -2601,6 +2601,31 @@ target_link_libraries(du_test ${PROTO_AGENT_LIB} pthread UTIL ${T_LIB} dl ${ITTI_LIB} ) +add_executable(oairu + ${OPENAIR_TARGETS}/RT/USER/lte-ru.c + ${OPENAIR_TARGETS}/RT/USER/ru_control.c + ${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c + ${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c + ${OPENAIR_TARGETS}/ARCH/COMMON/record_player.c + ${OPENAIR_DIR}/executables/softmodem-common.c + ${OPENAIR_DIR}/openair1/SCHED/phy_procedures_lte_common.c + ${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c + ${OPENAIR_DIR}/executables/main_ru.c + ${T_SOURCE} + ${OPENAIR_DIR}/common/utils/LOG/log.c + ${CONFIG_SOURCES} + ${OPENAIR_DIR}/common/utils/utils.c + ${OPENAIR_DIR}/common/utils/system.c + ${SHLIB_LOADER_SOURCES} +) +target_link_libraries (oairu + -Wl,--start-group + SCHED_RU_LIB + PHY_COMMON PHY_RU + -Wl,--end-group z dl) + +target_link_libraries (oairu pthread m ${CONFIG_LIB} rt ${CMAKE_DL_LIBS} ${T_LIB}) + # lte-uesoftmodem is UE implementation ####################################### diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai index 20d965c71c..7b32ebf216 100755 --- a/cmake_targets/build_oai +++ b/cmake_targets/build_oai @@ -100,6 +100,8 @@ Options Makes the NR softmodem --nrUE Makes the NR UE softmodem +--RU + Makes the OAI RRU (without full stack) --UE Makes the UE specific parts (ue_ip, usim, nvram) from the given configuration file --UE-conf-nvram [configuration file] @@ -242,6 +244,10 @@ function main() { NR="True" echo_info "Will compile gNB" shift;; + --RU) + RU=1 + echo_info "Will compile RRU" + shift;; -a | --agent) echo_info "FlexRAN support is always compiled into the eNB" shift;; @@ -443,7 +449,7 @@ function main() { ######################################################## # to be discussed - if [ "$eNB" = "1" -o "$gNB" = "1" ] ; then + if [ "$eNB" = "1" -o "$gNB" = "1" =o "$RU" = "1"] ; then if [ "$HW" = "None" -a "$TP" = "None" ] ; then echo_info "No local radio head and no transport protocol selected" fi @@ -574,7 +580,7 @@ function main() { config_libconfig_shlib=params_libconfig # first generate the CMakefile in the right directory - if [ "$eNB" = "1" -o "$UE" = "1" -o "$gNB" = "1" -o "$nrUE" = "1" -o "$HW" = "EXMIMO" ] ; then + if [ "$eNB" = "1" -o "$UE" = "1" -o "$gNB" = "1" -o "$RU" = "1" -o "$nrUE" = "1" -o "$HW" = "EXMIMO" ] ; then # softmodem compilation @@ -609,6 +615,9 @@ function main() { if [ "$gNB" = "1" ] ; then execlist="$execlist nr-softmodem" fi + if [ "$RU" = "1" ] ; then + execlist="$execlist oairu" + fi if [ "$UE" = 1 ] ; then execlist="$execlist lte-uesoftmodem" fi @@ -820,7 +829,7 @@ function main() { #################################################### # Build RF device and transport protocol libraries # #################################################### - if [ "$eNB" = "1" -o "$UE" = "1" -o "$gNB" = "1" -o "$nrUE" = "1" -o "$HWLAT" = "1" ] ; then + if [ "$eNB" = "1" -o "$UE" = "1" -o "$gNB" = "1" -o "$RU" = "1" -o "$nrUE" = "1" -o "$HWLAT" = "1" ] ; then # build RF device libraries if [ "$HW" != "None" ] ; then diff --git a/openair1/PHY/INIT/init_top.c b/openair1/PHY/INIT/init_top.c index 0990a58266..81fb28cc98 100644 --- a/openair1/PHY/INIT/init_top.c +++ b/openair1/PHY/INIT/init_top.c @@ -73,7 +73,6 @@ void init_lte_top(LTE_DL_FRAME_PARMS *frame_parms) { init_unscrambling_lut(); init_scrambling_lut(); //set_taus_seed(1328); - init_sss(); } void free_lte_top(void) { diff --git a/openair1/PHY/INIT/lte_init.c b/openair1/PHY/INIT/lte_init.c index 2d65521ab3..fd38eef0e7 100644 --- a/openair1/PHY/INIT/lte_init.c +++ b/openair1/PHY/INIT/lte_init.c @@ -384,6 +384,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB, lte_gold (fp, eNB->lte_gold_table, fp->Nid_cell); generate_pcfich_reg_mapping (fp); generate_phich_reg_mapping (fp); + init_sss(); for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) { eNB->first_run_timing_advance[UE_id] = diff --git a/openair1/PHY/INIT/lte_init_ue.c b/openair1/PHY/INIT/lte_init_ue.c index 082db61da9..86c7ceb8b5 100644 --- a/openair1/PHY/INIT/lte_init_ue.c +++ b/openair1/PHY/INIT/lte_init_ue.c @@ -629,6 +629,7 @@ int init_lte_ue_signal(PHY_VARS_UE *ue, init_frame_parms(&ue->frame_parms,1); lte_sync_time_init(&ue->frame_parms); init_lte_top(&ue->frame_parms); + init_sss(); init_7_5KHz(); init_ul_hopping(&ue->frame_parms); // many memory allocation sizes are hard coded diff --git a/targets/RT/USER/lte-ru.c b/targets/RT/USER/lte-ru.c index d2e734f205..0c7f9f8159 100644 --- a/targets/RT/USER/lte-ru.c +++ b/targets/RT/USER/lte-ru.c @@ -2677,9 +2677,38 @@ void set_function_spec_param(RU_t *ru) { } // switch on interface type } -//extern void RCconfig_RU(void); +void init_RU0(RU_t *ru,int ru_id,char *rf_config_file, int send_dmrssync) { + ru->rf_config_file = rf_config_file; + ru->idx = ru_id; + ru->ts_offset = 0; + + if (ru->is_slave == 1) { + ru->in_synch = 0; + ru->generate_dmrs_sync = 0; + } else { + ru->in_synch = 1; + ru->generate_dmrs_sync = send_dmrssync; + } + + ru->cmd = EMPTY; + ru->south_out_cnt = 0; + // use eNB_list[0] as a reference for RU frame parameters + // NOTE: multiple CC_id are not handled here yet! + + //ru->generate_dmrs_sync = (ru->is_slave == 0) ? 1 : 0; + if ((ru->is_slave == 0) && (ru->ota_sync_enable == 1)) + ru->generate_dmrs_sync = 1; + else + ru->generate_dmrs_sync = 0; + + ru->wakeup_L1_sleeptime = 2000; + ru->wakeup_L1_sleep_cnt_max = 3; + +} + +// This part if on eNB side void init_RU(char *rf_config_file, int send_dmrssync) { int ru_id, i, CC_id; RU_t *ru; @@ -2699,38 +2728,14 @@ void init_RU(char *rf_config_file, int send_dmrssync) { for (ru_id=0; ru_idrf_config_file = rf_config_file; - ru->idx = ru_id; - ru->ts_offset = 0; - - if (ru->is_slave == 1) { - ru->in_synch = 0; - ru->generate_dmrs_sync = 0; - } else { - ru->in_synch = 1; - ru->generate_dmrs_sync = send_dmrssync; - } - - ru->cmd = EMPTY; - ru->south_out_cnt = 0; - // use eNB_list[0] as a reference for RU frame parameters - // NOTE: multiple CC_id are not handled here yet! - - //ru->generate_dmrs_sync = (ru->is_slave == 0) ? 1 : 0; - if ((ru->is_slave == 0) && (ru->ota_sync_enable == 1)) - ru->generate_dmrs_sync = 1; - else - ru->generate_dmrs_sync = 0; - - ru->wakeup_L1_sleeptime = 2000; - ru->wakeup_L1_sleep_cnt_max = 3; + init_RU0(ru,ru_id,rf_config_file,send_dmrssync); if (ru->num_eNB > 0) { LOG_D(PHY, "%s() RC.ru[%d].num_eNB:%d ru->eNB_list[0]:%p RC.eNB[0][0]:%p rf_config_file:%s\n", __FUNCTION__, ru_id, ru->num_eNB, ru->eNB_list[0], RC.eNB[0][0], ru->rf_config_file); - + if (ru->eNB_list[0] == 0) { - LOG_E(PHY,"%s() DJP - ru->eNB_list ru->num_eNB are not initialized - so do it manually\n", __FUNCTION__); - ru->eNB_list[0] = RC.eNB[0][0]; + LOG_E(PHY,"%s() DJP - ru->eNB_list ru->num_eNB are not initialized - so do it manually\n", __FUNCTION__); + ru->eNB_list[0] = RC.eNB[0][0]; ru->num_eNB=1; // // DJP - feptx_prec() / feptx_ofdm() parses the eNB_list (based on num_eNB) and copies the txdata_F to txdata in RU @@ -2739,7 +2744,7 @@ void init_RU(char *rf_config_file, int send_dmrssync) { LOG_E(PHY,"DJP - delete code above this %s:%d\n", __FILE__, __LINE__); } } - + eNB0 = ru->eNB_list[0]; fp = ru->frame_parms; LOG_D(PHY, "RU FUnction:%d ru->if_south:%d\n", ru->function, ru->if_south); From e99ad54b667f198b7cd25d777e2d4134218230c7 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Wed, 17 Jun 2020 12:49:56 +0200 Subject: [PATCH 002/579] added missing file --- executables/main_ru.c | 192 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 192 insertions(+) create mode 100644 executables/main_ru.c diff --git a/executables/main_ru.c b/executables/main_ru.c new file mode 100644 index 0000000000..4e06b82c5c --- /dev/null +++ b/executables/main_ru.c @@ -0,0 +1,192 @@ +/* + * 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 oairu.c + * \brief Top-level threads for radio-unit + * \author R. Knopp + * \date 2020 + * \version 0.1 + * \company Eurecom + * \email: knopp@eurecom.fr + * \note + * \warning + */ + + +#define _GNU_SOURCE /* See feature_test_macros(7) */ +#include + + + + +#include "assertions.h" +#include "PHY/types.h" + +#include "PHY/defs_RU.h" +#include "common/ran_context.h" +#include "common/config/config_userapi.h" +#include "common/utils/load_module_shlib.h" + + +#include "../../ARCH/COMMON/common_lib.h" +#include "../../ARCH/ETHERNET/USERSPACE/LIB/if_defs.h" + + +#include "PHY/phy_vars.h" +#include "SCHED/sched_common_vars.h" +#include "PHY/TOOLS/phy_scope_interface.h" +#include "common/utils/LOG/log.h" +#include "common/utils/LOG/vcd_signal_dumper.h" +#include "PHY/INIT/phy_init.h" + +#include "system.h" + +#include +#include + +pthread_cond_t sync_cond; +pthread_mutex_t sync_mutex; +int sync_var=-1; //!< protected by mutex \ref sync_mutex. +int config_sync_var=-1; + +volatile int oai_exit = 0; +uint16_t sf_ahead = 4; +RU_t ru_m; + +void init_RU0(RU_t *ru,int ru_id,char *rf_config_file, int send_dmrssync); + +void exit_function(const char *file, const char *function, const int line, const char *s) { + + if (s != NULL) { + printf("%s:%d %s() Exiting OAI softmodem: %s\n",file,line, function, s); + } + close_log_mem(); + oai_exit = 1; + + if (ru_m.rfdevice.trx_end_func) { + ru_m.rfdevice.trx_end_func(&ru_m.rfdevice); + ru_m.rfdevice.trx_end_func = NULL; + } + + if (ru_m.ifdevice.trx_end_func) { + ru_m.ifdevice.trx_end_func(&ru_m.ifdevice); + ru_m.ifdevice.trx_end_func = NULL; + } + + sleep(1); //allow lte-softmodem threads to exit first + exit(1); +} + + +static void get_options(void) { + CONFIG_SETRTFLAG(CONFIG_NOEXITONHELP); + get_common_options(SOFTMODEM_ENB_BIT ); + CONFIG_CLEARRTFLAG(CONFIG_NOEXITONHELP); + + //RCConfig(); + +} + + + + + +extern void phy_free_RU(RU_t *); + +nfapi_mode_t nfapi_getmode(void) { + return(NFAPI_MODE_PNF); +} + +void oai_nfapi_rach_ind(nfapi_rach_indication_t *rach_ind) { + + AssertFatal(1==0,"This is bad ... please check why we get here\n"); +} + +void wait_eNBs(void){ return; } + +uint64_t downlink_frequency[MAX_NUM_CCs][4]; + +int main ( int argc, char **argv ) +{ + + if ( load_configmodule(argc,argv,0) == NULL) { + exit_fun("[SOFTMODEM] Error, configuration module init failed\n"); + } + + logInit(); + printf("Reading in command-line options\n"); + get_options (); + + if (CONFIG_ISFLAGSET(CONFIG_ABORT) ) { + fprintf(stderr,"Getting configuration failed\n"); + exit(-1); + } + +#if T_TRACER + T_Config_Init(); +#endif + printf("configuring for RRU\n"); + +#ifndef PACKAGE_VERSION +# define PACKAGE_VERSION "UNKNOWN-EXPERIMENTAL" +#endif + LOG_I(HW, "Version: %s\n", PACKAGE_VERSION); + + /* Read configuration */ + + printf("About to Init RU threads\n"); + + + RU_t *ru=&ru_m; + init_RU0(ru,0,get_softmodem_params()->rf_config_file,get_softmodem_params()->send_dmrs_sync); + ru->rf_map.card=0; + ru->rf_map.chain=(get_softmodem_params()->chain_offset); + + + config_sync_var=0; + // once all RUs are ready intiailize the rest of the eNBs ((dependence on final RU parameters after configuration) + printf("ALL RUs ready - init eNBs\n"); + + while (oai_exit==0) sleep(1); + // stop threads + + kill_RU_proc(ru); + phy_free_RU(ru); + + free_lte_top(); + end_configmodule(); + + if (ru->rfdevice.trx_end_func) { + ru->rfdevice.trx_end_func(&ru->rfdevice); + ru->rfdevice.trx_end_func = NULL; + } + + if (ru->ifdevice.trx_end_func) { + ru->ifdevice.trx_end_func(&ru->ifdevice); + ru->ifdevice.trx_end_func = NULL; + } + + + + logClean(); + printf("Bye.\n"); + return 0; +} From e97122f5ea74b526c17cfcd958336b567272328a Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Wed, 17 Jun 2020 17:52:46 +0200 Subject: [PATCH 003/579] added configuration file parsing to oairu --- executables/main_ru.c | 171 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 158 insertions(+), 13 deletions(-) diff --git a/executables/main_ru.c b/executables/main_ru.c index 4e06b82c5c..3c1863fa9f 100644 --- a/executables/main_ru.c +++ b/executables/main_ru.c @@ -82,13 +82,13 @@ void exit_function(const char *file, const char *function, const int line, const oai_exit = 1; if (ru_m.rfdevice.trx_end_func) { - ru_m.rfdevice.trx_end_func(&ru_m.rfdevice); - ru_m.rfdevice.trx_end_func = NULL; + ru_m.rfdevice.trx_end_func(&ru_m.rfdevice); + ru_m.rfdevice.trx_end_func = NULL; } if (ru_m.ifdevice.trx_end_func) { - ru_m.ifdevice.trx_end_func(&ru_m.ifdevice); - ru_m.ifdevice.trx_end_func = NULL; + ru_m.ifdevice.trx_end_func(&ru_m.ifdevice); + ru_m.ifdevice.trx_end_func = NULL; } sleep(1); //allow lte-softmodem threads to exit first @@ -162,30 +162,175 @@ int main ( int argc, char **argv ) config_sync_var=0; - // once all RUs are ready intiailize the rest of the eNBs ((dependence on final RU parameters after configuration) - printf("ALL RUs ready - init eNBs\n"); - + + paramlist_def_t RUParamList = {CONFIG_STRING_RU_LIST,NULL,0}; + config_getlist( &RUParamList,NULL,0, NULL); + AssertFatal(RUParamList.numelt==1,"Cannot handle %d RUs, only 1\n",RUParamList.numelt); + + int j=0; + + ru->if_timing = synch_to_ext_device; + ru->num_eNB = 0; + ru->has_ctrl_prt = 1; + if (config_isparamset(RUParamList.paramarray[j], RU_SDR_ADDRS)) { + ru->openair0_cfg.sdr_addrs = strdup(*(RUParamList.paramarray[j][RU_SDR_ADDRS].strptr)); + } + + if (config_isparamset(RUParamList.paramarray[j], RU_SDR_CLK_SRC)) { + if (strcmp(*(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr), "internal") == 0) { + ru->openair0_cfg.clock_source = internal; + LOG_D(PHY, "RU clock source set as internal\n"); + } else if (strcmp(*(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr), "external") == 0) { + ru->openair0_cfg.clock_source = external; + LOG_D(PHY, "RU clock source set as external\n"); + } else if (strcmp(*(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr), "gpsdo") == 0) { + ru->openair0_cfg.clock_source = gpsdo; + LOG_D(PHY, "RU clock source set as gpsdo\n"); + } else { + LOG_E(PHY, "Erroneous RU clock source in the provided configuration file: '%s'\n", *(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr)); + } + } + else { + ru->openair0_cfg.clock_source = unset; + } + + if (config_isparamset(RUParamList.paramarray[j], RU_SDR_TME_SRC)) { + if (strcmp(*(RUParamList.paramarray[j][RU_SDR_TME_SRC].strptr), "internal") == 0) { + ru->openair0_cfg.time_source = internal; + LOG_D(PHY, "RU time source set as internal\n"); + } else if (strcmp(*(RUParamList.paramarray[j][RU_SDR_TME_SRC].strptr), "external") == 0) { + ru->openair0_cfg.time_source = external; + LOG_D(PHY, "RU time source set as external\n"); + } else if (strcmp(*(RUParamList.paramarray[j][RU_SDR_TME_SRC].strptr), "gpsdo") == 0) { + ru->openair0_cfg.time_source = gpsdo; + LOG_D(PHY, "RU time source set as gpsdo\n"); + } else { + LOG_E(PHY, "Erroneous RU time source in the provided configuration file: '%s'\n", *(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr)); + } + } + else { + ru->openair0_cfg.time_source = unset; + } + + if (strcmp(*(RUParamList.paramarray[j][RU_LOCAL_RF_IDX].strptr), "yes") == 0) { + if ( !(config_isparamset(RUParamList.paramarray[j],RU_LOCAL_IF_NAME_IDX)) ) { + AssertFatal(1==0,"IF_NAME is required\n"); + } else { + ru->eth_params.local_if_name = strdup(*(RUParamList.paramarray[j][RU_LOCAL_IF_NAME_IDX].strptr)); + ru->eth_params.my_addr = strdup(*(RUParamList.paramarray[j][RU_LOCAL_ADDRESS_IDX].strptr)); + ru->eth_params.remote_addr = strdup(*(RUParamList.paramarray[j][RU_REMOTE_ADDRESS_IDX].strptr)); + ru->eth_params.my_portd = *(RUParamList.paramarray[j][RU_LOCAL_PORTD_IDX].uptr); + ru->eth_params.remote_portd = *(RUParamList.paramarray[j][RU_REMOTE_PORTD_IDX].uptr); + + // Check if control port set + if (!(config_isparamset(RUParamList.paramarray[j],RU_REMOTE_PORTC_IDX)) ) { + printf("Removing control port for RU %d\n",j); + ru->has_ctrl_prt = 0; + } else { + ru->eth_params.my_portc = *(RUParamList.paramarray[j][RU_LOCAL_PORTC_IDX].uptr); + ru->eth_params.remote_portc = *(RUParamList.paramarray[j][RU_REMOTE_PORTC_IDX].uptr); + printf(" Control port %u \n",ru->eth_params.my_portc); + } + + if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "udp") == 0) { + ru->if_south = LOCAL_RF; + ru->function = NGFI_RRU_IF5; + ru->eth_params.transp_preference = ETH_UDP_MODE; + printf("Setting function for RU %d to NGFI_RRU_IF5 (udp)\n",j); + } else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "raw") == 0) { + ru->if_south = LOCAL_RF; + ru->function = NGFI_RRU_IF5; + ru->eth_params.transp_preference = ETH_RAW_MODE; + printf("Setting function for RU %d to NGFI_RRU_IF5 (raw)\n",j); + } else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "udp_if4p5") == 0) { + ru->if_south = LOCAL_RF; + ru->function = NGFI_RRU_IF4p5; + ru->eth_params.transp_preference = ETH_UDP_IF4p5_MODE; + printf("Setting function for RU %d to NGFI_RRU_IF4p5 (udp)\n",j); + } else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "raw_if4p5") == 0) { + ru->if_south = LOCAL_RF; + ru->function = NGFI_RRU_IF4p5; + ru->eth_params.transp_preference = ETH_RAW_IF4p5_MODE; + printf("Setting function for RU %d to NGFI_RRU_IF4p5 (raw)\n",j); + } + + printf("RU %d is_slave=%s\n",j,*(RUParamList.paramarray[j][RU_IS_SLAVE_IDX].strptr)); + + if (strcmp(*(RUParamList.paramarray[j][RU_IS_SLAVE_IDX].strptr), "yes") == 0) ru->is_slave=1; + else ru->is_slave=0; + + printf("RU %d ota_sync_enabled=%s\n",j,*(RUParamList.paramarray[j][RU_OTA_SYNC_ENABLE_IDX].strptr)); + + if (strcmp(*(RUParamList.paramarray[j][RU_OTA_SYNC_ENABLE_IDX].strptr), "yes") == 0) ru->ota_sync_enable=1; + else ru->ota_sync_enable=0; + } + + ru->max_pdschReferenceSignalPower = *(RUParamList.paramarray[j][RU_MAX_RS_EPRE_IDX].uptr);; + ru->max_rxgain = *(RUParamList.paramarray[j][RU_MAX_RXGAIN_IDX].uptr); + ru->num_bands = RUParamList.paramarray[j][RU_BAND_LIST_IDX].numelt; + /* sf_extension is in unit of samples for 30.72MHz here, has to be scaled later */ + ru->sf_extension = *(RUParamList.paramarray[j][RU_SF_EXTENSION_IDX].uptr); + + for (int i=0; inum_bands; i++) ru->band[i] = RUParamList.paramarray[j][RU_BAND_LIST_IDX].iptr[i]; + } //strcmp(local_rf, "yes") == 0 + else { + printf("RU %d: Transport %s\n",j,*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr)); + ru->eth_params.local_if_name = strdup(*(RUParamList.paramarray[j][RU_LOCAL_IF_NAME_IDX].strptr)); + ru->eth_params.my_addr = strdup(*(RUParamList.paramarray[j][RU_LOCAL_ADDRESS_IDX].strptr)); + ru->eth_params.remote_addr = strdup(*(RUParamList.paramarray[j][RU_REMOTE_ADDRESS_IDX].strptr)); + ru->eth_params.my_portc = *(RUParamList.paramarray[j][RU_LOCAL_PORTC_IDX].uptr); + ru->eth_params.remote_portc = *(RUParamList.paramarray[j][RU_REMOTE_PORTC_IDX].uptr); + ru->eth_params.my_portd = *(RUParamList.paramarray[j][RU_LOCAL_PORTD_IDX].uptr); + ru->eth_params.remote_portd = *(RUParamList.paramarray[j][RU_REMOTE_PORTD_IDX].uptr); + + if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "udp") == 0) { + ru->if_south = REMOTE_IF5; + ru->function = NGFI_RAU_IF5; + ru->eth_params.transp_preference = ETH_UDP_MODE; + } else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "raw") == 0) { + ru->if_south = REMOTE_IF5; + ru->function = NGFI_RAU_IF5; + ru->eth_params.transp_preference = ETH_RAW_MODE; + } else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "udp_if4p5") == 0) { + ru->if_south = REMOTE_IF4p5; + ru->function = NGFI_RAU_IF4p5; + ru->eth_params.transp_preference = ETH_UDP_IF4p5_MODE; + } else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "raw_if4p5") == 0) { + ru->if_south = REMOTE_IF4p5; + ru->function = NGFI_RAU_IF4p5; + ru->eth_params.transp_preference = ETH_RAW_IF4p5_MODE; + } + + if (strcmp(*(RUParamList.paramarray[j][RU_IS_SLAVE_IDX].strptr), "yes") == 0) ru->is_slave=1; + else ru->is_slave=0; + } /* strcmp(local_rf, "yes") != 0 */ + + ru->nb_tx = *(RUParamList.paramarray[j][RU_NB_TX_IDX].uptr); + ru->nb_rx = *(RUParamList.paramarray[j][RU_NB_RX_IDX].uptr); + ru->att_tx = *(RUParamList.paramarray[j][RU_ATT_TX_IDX].uptr); + ru->att_rx = *(RUParamList.paramarray[j][RU_ATT_RX_IDX].uptr); + while (oai_exit==0) sleep(1); // stop threads - + kill_RU_proc(ru); phy_free_RU(ru); - + free_lte_top(); end_configmodule(); - + if (ru->rfdevice.trx_end_func) { ru->rfdevice.trx_end_func(&ru->rfdevice); ru->rfdevice.trx_end_func = NULL; } - + if (ru->ifdevice.trx_end_func) { ru->ifdevice.trx_end_func(&ru->ifdevice); ru->ifdevice.trx_end_func = NULL; } - + - + logClean(); printf("Bye.\n"); return 0; From 695cb5f0cd0cc3ac9c6da9e685d877a07a960f5c Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Wed, 17 Jun 2020 19:03:28 +0200 Subject: [PATCH 004/579] configuration fix --- executables/main_ru.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/executables/main_ru.c b/executables/main_ru.c index 3c1863fa9f..0126ec0fdb 100644 --- a/executables/main_ru.c +++ b/executables/main_ru.c @@ -163,9 +163,9 @@ int main ( int argc, char **argv ) config_sync_var=0; + paramdef_t RUParams[] = RUPARAMS_DESC; paramlist_def_t RUParamList = {CONFIG_STRING_RU_LIST,NULL,0}; - config_getlist( &RUParamList,NULL,0, NULL); - AssertFatal(RUParamList.numelt==1,"Cannot handle %d RUs, only 1\n",RUParamList.numelt); + config_getlist( &RUParamList,RUParams,sizeof(RUParams)/sizeof(paramdef_t), NULL); int j=0; From d1a4911428505a6d6985f8ca4fcba413c95f8032 Mon Sep 17 00:00:00 2001 From: magounak Date: Wed, 17 Jun 2020 20:36:16 +0200 Subject: [PATCH 005/579] bug fixes in main --- executables/main_ru.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/executables/main_ru.c b/executables/main_ru.c index 0126ec0fdb..567392c567 100644 --- a/executables/main_ru.c +++ b/executables/main_ru.c @@ -56,12 +56,16 @@ #include "common/utils/LOG/log.h" #include "common/utils/LOG/vcd_signal_dumper.h" #include "PHY/INIT/phy_init.h" - +#include "openair2/ENB_APP/enb_paramdef.h" #include "system.h" #include #include +static int DEFBANDS[] = {7}; +static int DEFENBS[] = {0}; +static int DEFBFW[] = {0x00007fff}; + pthread_cond_t sync_cond; pthread_mutex_t sync_mutex; int sync_var=-1; //!< protected by mutex \ref sync_mutex. From 187561a1c21336323ab2c42c0142c5d3e7de85d3 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Wed, 17 Jun 2020 20:39:29 +0200 Subject: [PATCH 006/579] commit before merge --- executables/main_ru.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/executables/main_ru.c b/executables/main_ru.c index 0126ec0fdb..90d2005a47 100644 --- a/executables/main_ru.c +++ b/executables/main_ru.c @@ -56,7 +56,7 @@ #include "common/utils/LOG/log.h" #include "common/utils/LOG/vcd_signal_dumper.h" #include "PHY/INIT/phy_init.h" - +#include "openair2/ENB_APP/enb_paramdef.h" #include "system.h" #include @@ -71,6 +71,9 @@ volatile int oai_exit = 0; uint16_t sf_ahead = 4; RU_t ru_m; + +static int DEFBANDS[] = {7}; + void init_RU0(RU_t *ru,int ru_id,char *rf_config_file, int send_dmrssync); void exit_function(const char *file, const char *function, const int line, const char *s) { From f33278ac52b3653c2ace15a644052922a1aa16a6 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Wed, 17 Jun 2020 20:52:39 +0200 Subject: [PATCH 007/579] activated ru_threads --- executables/main_ru.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/executables/main_ru.c b/executables/main_ru.c index 9bc0481de7..2be1a93921 100644 --- a/executables/main_ru.c +++ b/executables/main_ru.c @@ -167,6 +167,10 @@ int main ( int argc, char **argv ) ru->rf_map.card=0; ru->rf_map.chain=(get_softmodem_params()->chain_offset); + LOG_I(PHY, "Initializing RRU descriptor %d : (%s,%s,%d)\n", ru_id, ru_if_types[ru->if_south], NB_timing[ru->if_timing], ru->function); + set_function_spec_param(ru); + LOG_I(PHY, "Starting ru_thread %d, is_slave %d, send_dmrs %d\n", ru_id, ru->is_slave, ru->generate_dmrs_sync); + init_RU_proc(ru); config_sync_var=0; @@ -316,6 +320,9 @@ int main ( int argc, char **argv ) ru->nb_rx = *(RUParamList.paramarray[j][RU_NB_RX_IDX].uptr); ru->att_tx = *(RUParamList.paramarray[j][RU_ATT_TX_IDX].uptr); ru->att_rx = *(RUParamList.paramarray[j][RU_ATT_RX_IDX].uptr); + + + mlockall(MCL_CURRENT | MCL_FUTURE); while (oai_exit==0) sleep(1); // stop threads From 196ba803aa918bdc392f653e16bda517e1d1e6fd Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Thu, 18 Jun 2020 10:17:06 +0200 Subject: [PATCH 008/579] fix typos and compilation errors Signed-off-by: Raphael Defosseux --- cmake_targets/build_oai | 2 +- executables/main_ru.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai index 7b32ebf216..86d6d38d05 100755 --- a/cmake_targets/build_oai +++ b/cmake_targets/build_oai @@ -449,7 +449,7 @@ function main() { ######################################################## # to be discussed - if [ "$eNB" = "1" -o "$gNB" = "1" =o "$RU" = "1"] ; then + if [ "$eNB" = "1" -o "$gNB" = "1" -o "$RU" = "1" ] ; then if [ "$HW" = "None" -a "$TP" = "None" ] ; then echo_info "No local radio head and no transport protocol selected" fi diff --git a/executables/main_ru.c b/executables/main_ru.c index 2be1a93921..09c9fa2661 100644 --- a/executables/main_ru.c +++ b/executables/main_ru.c @@ -76,8 +76,6 @@ uint16_t sf_ahead = 4; RU_t ru_m; -static int DEFBANDS[] = {7}; - void init_RU0(RU_t *ru,int ru_id,char *rf_config_file, int send_dmrssync); void exit_function(const char *file, const char *function, const int line, const char *s) { @@ -163,7 +161,8 @@ int main ( int argc, char **argv ) RU_t *ru=&ru_m; - init_RU0(ru,0,get_softmodem_params()->rf_config_file,get_softmodem_params()->send_dmrs_sync); + int ru_id = 0; + init_RU0(ru,ru_id,get_softmodem_params()->rf_config_file,get_softmodem_params()->send_dmrs_sync); ru->rf_map.card=0; ru->rf_map.chain=(get_softmodem_params()->chain_offset); From a93deb3813191fb79b91309eb822625beae7872a Mon Sep 17 00:00:00 2001 From: magounak Date: Thu, 18 Jun 2020 19:26:06 +0200 Subject: [PATCH 009/579] testing of standlone oairu --- executables/main_ru.c | 30 ++++++++++++++++++------------ targets/RT/USER/lte-ru.c | 10 ++++++---- targets/RT/USER/ru_control.c | 9 ++++----- 3 files changed, 28 insertions(+), 21 deletions(-) diff --git a/executables/main_ru.c b/executables/main_ru.c index 2be1a93921..583530a4bc 100644 --- a/executables/main_ru.c +++ b/executables/main_ru.c @@ -76,7 +76,6 @@ uint16_t sf_ahead = 4; RU_t ru_m; -static int DEFBANDS[] = {7}; void init_RU0(RU_t *ru,int ru_id,char *rf_config_file, int send_dmrssync); @@ -163,16 +162,6 @@ int main ( int argc, char **argv ) RU_t *ru=&ru_m; - init_RU0(ru,0,get_softmodem_params()->rf_config_file,get_softmodem_params()->send_dmrs_sync); - ru->rf_map.card=0; - ru->rf_map.chain=(get_softmodem_params()->chain_offset); - - LOG_I(PHY, "Initializing RRU descriptor %d : (%s,%s,%d)\n", ru_id, ru_if_types[ru->if_south], NB_timing[ru->if_timing], ru->function); - set_function_spec_param(ru); - LOG_I(PHY, "Starting ru_thread %d, is_slave %d, send_dmrs %d\n", ru_id, ru->is_slave, ru->generate_dmrs_sync); - init_RU_proc(ru); - - config_sync_var=0; paramdef_t RUParams[] = RUPARAMS_DESC; paramlist_def_t RUParamList = {CONFIG_STRING_RU_LIST,NULL,0}; @@ -323,7 +312,24 @@ int main ( int argc, char **argv ) mlockall(MCL_CURRENT | MCL_FUTURE); - + pthread_cond_init(&sync_cond,NULL); + pthread_mutex_init(&sync_mutex, NULL); + + init_RU0(ru,0,get_softmodem_params()->rf_config_file,get_softmodem_params()->send_dmrs_sync); + ru->rf_map.card=0; + ru->rf_map.chain=(get_softmodem_params()->chain_offset); + + LOG_I(PHY, "Initializing RRU descriptor : (%s,%s,%d)\n", ru_if_types[ru->if_south], NB_timing[ru->if_timing], ru->function); + set_function_spec_param(ru); + LOG_I(PHY, "Starting ru_thread , is_slave %d, send_dmrs %d\n", ru->is_slave, ru->generate_dmrs_sync); + init_RU_proc(ru); + + config_sync_var=0; + pthread_mutex_lock(&sync_mutex); + sync_var=0; + pthread_cond_broadcast(&sync_cond); + pthread_mutex_unlock(&sync_mutex); + while (oai_exit==0) sleep(1); // stop threads diff --git a/targets/RT/USER/lte-ru.c b/targets/RT/USER/lte-ru.c index 0c7f9f8159..1c12628270 100644 --- a/targets/RT/USER/lte-ru.c +++ b/targets/RT/USER/lte-ru.c @@ -534,7 +534,7 @@ void fh_if4p5_north_asynch_in(RU_t *ru, LOG_D(PHY,"RU %d/%d TST %llu, frame %d, subframe %d\n",ru->idx,0,(long long unsigned int)proc->timestamp_tx,frame_tx,tti_tx); // dump VCD output for first RU in list - if (ru == RC.ru[0]) { + if (ru->idx == 0) { /*VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_RU, frame_tx ); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_TX0_RU, tti_tx );*/ VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_IF4P5_NORTH_ASYNCH_IN, frame_tx); @@ -730,7 +730,7 @@ void rx_rf(RU_t *ru, proc->tti_rx); // dump VCD output for first RU in list - if (ru == RC.ru[0]) { + if (ru->idx == 0) { VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX0_RU, proc->frame_rx ); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_RX0_RU, proc->tti_rx ); @@ -1731,8 +1731,10 @@ static void *ru_thread( void *param ) { // wait to be woken up if (ru->function!=eNodeB_3GPP && ru->has_ctrl_prt == 1) { + LOG_I(PHY,"Waiting for control thread to say go\n"); if (wait_on_condition(&ru->proc.mutex_ru,&ru->proc.cond_ru_thread,&ru->proc.instance_cnt_ru,"ru_thread")<0) break; - } else wait_sync("ru_thread"); + } else wait_sync("ru_thread"); + LOG_I(PHY,"Got start from control thread\n"); if(!(get_softmodem_params()->emulate_rf)) { if (ru->is_slave == 0) AssertFatal(ru->state == RU_RUN,"ru-%d state = %s != RU_RUN\n",ru->idx,ru_states[ru->state]); @@ -1760,7 +1762,7 @@ static void *ru_thread( void *param ) { // if this is a slave RRU, try to synchronize on the DL frequency if ((ru->is_slave == 1) && (ru->if_south == LOCAL_RF)) do_ru_synch(ru); - LOG_D(PHY,"Starting steady-state operation\n"); + LOG_I(PHY,"Starting steady-state operation\n"); // This is a forever while loop, it loops over subframes which are scheduled by incoming samples from HW devices while (ru->state == RU_RUN || ru->state == RU_CHECK_SYNC) { diff --git a/targets/RT/USER/ru_control.c b/targets/RT/USER/ru_control.c index 6daf0f4dfa..afe16768b9 100644 --- a/targets/RT/USER/ru_control.c +++ b/targets/RT/USER/ru_control.c @@ -84,7 +84,7 @@ int attach_rru(RU_t *ru); void configure_ru(int idx, void *arg); -void configure_rru(int idx, void *arg); +void configure_rru(RU_t *ru, void *arg); void fill_rf_config(RU_t *ru, char *rf_config_file); void* ru_thread_control( void* param ); @@ -335,7 +335,7 @@ int connect_rau(RU_t *ru) ((RRU_config_t *)&rru_config_msg.msg[0])->prach_FreqOffset[0], ((RRU_config_t *)&rru_config_msg.msg[0])->prach_ConfigIndex[0]); - configure_rru(ru->idx, + configure_rru(ru, (void*)&rru_config_msg.msg[0]); configuration_received = 1; } @@ -440,11 +440,10 @@ void configure_ru(int idx, phy_init_RU(ru); } -void configure_rru(int idx, +void configure_rru(RU_t *ru, void *arg) { RRU_config_t *config = (RRU_config_t *)arg; - RU_t *ru = RC.ru[idx]; ru->frame_parms->eutra_band = config->band_list[0]; ru->frame_parms->dl_CarrierFreq = config->tx_freq[0]; @@ -603,7 +602,7 @@ void* ru_thread_control( void* param ) ((RRU_config_t *)&rru_config_msg.msg[0])->prach_ConfigIndex[0]); ru->frame_parms = calloc(1, sizeof(*ru->frame_parms)); - configure_rru(ru->idx, (void*)&rru_config_msg.msg[0]); + configure_rru(ru, (void*)&rru_config_msg.msg[0]); fill_rf_config(ru,ru->rf_config_file); From b3489a7e0acb4be3c74d1a7065c4dc648a3cb875 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Thu, 18 Jun 2020 19:30:36 +0200 Subject: [PATCH 010/579] testing oairu (RCC side) --- targets/RT/USER/lte-ru.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/targets/RT/USER/lte-ru.c b/targets/RT/USER/lte-ru.c index 0c7f9f8159..206f29a28e 100644 --- a/targets/RT/USER/lte-ru.c +++ b/targets/RT/USER/lte-ru.c @@ -228,31 +228,30 @@ void fh_if4p5_south_in(RU_t *ru, symbol_mask_full = (1<symbols_per_tti)-1; LOG_D(PHY,"fh_if4p5_south_in: RU %d, frame %d, subframe %d, ru %d, mask %x\n",ru->idx,*frame,*subframe,ru->idx,proc->symbol_mask[*subframe]); - AssertFatal(proc->symbol_mask[*subframe]==0 || proc->symbol_mask[*subframe]==symbol_mask_full,"rx_fh_if4p5: proc->symbol_mask[%d] = %x\n",*subframe,proc->symbol_mask[*subframe]); + AssertFatal(proc->symbol_mask[*subframe]==0 || proc->symbol_mask[*subframe]>=symbol_mask_full,"rx_fh_if4p5: proc->symbol_mask[%d] = %x\n",*subframe,proc->symbol_mask[*subframe]); // >= because PULTICK for S-subframe could have been received during normal subframe - if (proc->symbol_mask[*subframe]==0) { // this is normal case, if not true then we received a PULTICK before the previous subframe was finished + if (proc->symbol_mask[*subframe]idx,*frame,*subframe,f,sf); + LOG_D(PHY,"fh_if4p5_south_in (%s/%d): RU %d, frame %d, subframe %d, f %d, sf %d, symbol %d\n",packet_type == IF4p5_PULFFT ? "PULFFT" : "PULTICK",packet_type,ru->idx,*frame,*subframe,f,sf,symbol_number); if (oai_exit == 1 || ru->cmd== STOP_RU) break; if (packet_type == IF4p5_PULFFT) proc->symbol_mask[sf] = proc->symbol_mask[sf] | (1<symbol_mask[sf] = symbol_mask_full; + proc->symbol_mask[sf] = 0xffff; pultick_received++; - /* if ((proc->first_rx==0) && (f!=*frame)) LOG_E(PHY,"rx_fh_if4p5: PULTICK received frame %d != expected %d (RU %d) \n",f,*frame, ru->idx); else if ((proc->first_rx==0) && (sf!=*subframe)) LOG_E(PHY,"rx_fh_if4p5: PULTICK received subframe %d != expected %d (first_rx %d)\n",sf,*subframe,proc->first_rx); else break; */ - if (f==*frame || sf==*subframe) break; + //if (f==*frame || sf==*subframe) break; } else if (packet_type == IF4p5_PRACH) { // nothing in RU for RAU } - LOG_D(PHY,"rx_fh_if4p5 for RU %d: subframe %d, sf %d, symbol mask %x\n",ru->idx,*subframe,sf,proc->symbol_mask[sf]); - } while(proc->symbol_mask[sf] != symbol_mask_full); + LOG_D(PHY,"rx_fh_if4p5 for RU %d: subframe %d, sf %d, symbol %d, symbol mask %x\n",ru->idx,*subframe,sf,symbol_number,proc->symbol_mask[sf]); + } while(proc->symbol_mask[*subframe] < symbol_mask_full); } else { f = *frame; sf = *subframe; @@ -264,7 +263,7 @@ void fh_if4p5_south_in(RU_t *ru, proc->timestamp_rx = ((proc->frame_rx * 10) + proc->tti_rx ) * fp->samples_per_tti ; // proc->timestamp_tx = proc->timestamp_rx + (4*fp->samples_per_tti); - if (get_nprocs()<=4) { + if (get_thread_parallel_conf() == PARALLEL_SINGLE_THREAD) { proc->tti_tx = (sf+sf_ahead)%10; proc->frame_tx = (sf>(9-sf_ahead)) ? (f+1)&1023 : f; } From 72e57baa09f5bb069ac0dfaf86286e916dd093fc Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Thu, 18 Jun 2020 23:53:48 +0200 Subject: [PATCH 011/579] worker acivation --- executables/main_ru.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/executables/main_ru.c b/executables/main_ru.c index f98ea602c1..5a3629d877 100644 --- a/executables/main_ru.c +++ b/executables/main_ru.c @@ -61,6 +61,7 @@ #include #include +#include static int DEFBANDS[] = {7}; static int DEFENBS[] = {0}; @@ -129,6 +130,7 @@ void wait_eNBs(void){ return; } uint64_t downlink_frequency[MAX_NUM_CCs][4]; + int main ( int argc, char **argv ) { @@ -310,6 +312,8 @@ int main ( int argc, char **argv ) ru->att_rx = *(RUParamList.paramarray[j][RU_ATT_RX_IDX].uptr); + set_worker_conf("WORKER_ENABLE"); + mlockall(MCL_CURRENT | MCL_FUTURE); pthread_cond_init(&sync_cond,NULL); pthread_mutex_init(&sync_mutex, NULL); From c21df3b6f3b6bb008cafe6fb2e3cf86382208a43 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Tue, 30 Jun 2020 08:08:33 +0200 Subject: [PATCH 012/579] small fix for threadPool initialization when we use the full pipelining mode (RU_L1_TRX_SPLIT) --- targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp | 4 ++-- targets/RT/USER/lte-ru.c | 2 +- targets/RT/USER/lte-softmodem.c | 8 ++++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp index 08f0cd720b..a218f07dfd 100644 --- a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp +++ b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp @@ -1251,7 +1251,7 @@ extern "C" { LOG_I(HW,"Actual time source %s...\n",s->usrp->get_time_source(0).c_str()); sleep(1); // create tx & rx streamer - uhd::stream_args_t stream_args_rx("sc16", "sc16"); + uhd::stream_args_t stream_args_rx("sc12", "sc12"); int samples=openair0_cfg[0].sample_rate; int max=s->usrp->get_rx_stream(stream_args_rx)->get_max_num_samps(); samples/=10000; @@ -1268,7 +1268,7 @@ extern "C" { stream_args_rx.channels.push_back(i); s->rx_stream = s->usrp->get_rx_stream(stream_args_rx); - uhd::stream_args_t stream_args_tx("sc16", "sc16"); + uhd::stream_args_t stream_args_tx("sc12", "sc12"); for (int i = 0; isymbols_per_tti)-1; LOG_D(PHY,"fh_if4p5_south_in: RU %d, frame %d, subframe %d, ru %d, mask %x\n",ru->idx,*frame,*subframe,ru->idx,proc->symbol_mask[*subframe]); - AssertFatal(proc->symbol_mask[*subframe]==0 || proc->symbol_mask[*subframe]>=symbol_mask_full,"rx_fh_if4p5: proc->symbol_mask[%d] = %x\n",*subframe,proc->symbol_mask[*subframe]); // >= because PULTICK for S-subframe could have been received during normal subframe + //AssertFatal(proc->symbol_mask[*subframe]==0 || proc->symbol_mask[*subframe]>=symbol_mask_full,"rx_fh_if4p5: proc->symbol_mask[%d] = %x\n",*subframe,proc->symbol_mask[*subframe]); // >= because PULTICK for S-subframe could have been received during normal subframe if (proc->symbol_mask[*subframe]proc.L1_proc; + L1_rxtx_proc_t *L1proctx= &RC.eNB[x][CC_id]->proc.L1_proc_tx; L1proc->threadPool=(tpool_t*)malloc(sizeof(tpool_t)); L1proc->respEncode=(notifiedFIFO_t*) malloc(sizeof(notifiedFIFO_t)); L1proc->respDecode=(notifiedFIFO_t*) malloc(sizeof(notifiedFIFO_t)); @@ -657,8 +658,11 @@ int main ( int argc, char **argv ) initTpool(get_softmodem_params()->threadPoolConfig, L1proc->threadPool, true); else initTpool("n", L1proc->threadPool, true); - initNotifiedFIFO(L1proc->respEncode); - initNotifiedFIFO(L1proc->respDecode); + initNotifiedFIFO(L1proc->respEncode); + initNotifiedFIFO(L1proc->respDecode); + L1proctx->threadPool=L1proc->threadPool; + L1proctx->respEncode=L1proc->respEncode; + L1proctx->nbEncode=L1proc->nbEncode; } From 1698f9e20ff16915cd597e50cb72ea54a6be9d74 Mon Sep 17 00:00:00 2001 From: magounak Date: Mon, 13 Jul 2020 08:00:59 +0200 Subject: [PATCH 013/579] isolation of RU (no use of RC.xxx) --- cmake_targets/CMakeLists.txt | 111 +++--- cmake_targets/build_oai | 29 +- common/ran_context.h | 2 +- executables/main_ru.c | 19 +- openair1/PHY/INIT/lte_init_ru.c | 15 +- openair1/PHY/INIT/lte_param_init.c | 5 +- openair1/PHY/INIT/nr_init_ru.c | 18 +- .../PHY/LTE_ESTIMATION/freq_equalization.c | 1 - .../PHY/LTE_ESTIMATION/lte_adjust_sync_eNB.c | 1 - openair1/PHY/LTE_ESTIMATION/lte_sync_time.c | 2 - .../lte_ul_channel_estimation.c | 8 +- openair1/PHY/LTE_TRANSPORT/dci_tools_common.c | 10 - openair1/PHY/LTE_TRANSPORT/if4_tools.c | 6 +- openair1/PHY/LTE_TRANSPORT/if5_tools.c | 4 +- openair1/PHY/LTE_TRANSPORT/pmch.c | 16 - openair1/PHY/LTE_TRANSPORT/prach.c | 2 +- openair1/PHY/LTE_TRANSPORT/prach_extern.h | 2 +- openair1/PHY/LTE_TRANSPORT/transport_common.h | 6 +- openair1/PHY/LTE_TRANSPORT/transport_eNB.h | 6 +- .../PHY/LTE_TRANSPORT/ulsch_demodulation.c | 11 +- openair1/PHY/MODULATION/beamforming.c | 1 - openair1/PHY/MODULATION/slot_fep_ul.c | 4 +- openair1/PHY/MODULATION/ul_7_5_kHz.c | 1 - .../PHY/NR_UE_TRANSPORT/nr_transport_ue.h | 2 +- openair1/PHY/TOOLS/oai_dfts.c | 14 +- openair1/PHY/defs_RU.h | 16 +- openair1/PHY/defs_common.h | 17 + openair1/PHY/impl_defs_nr.h | 10 +- openair1/PHY/phy_extern.h | 4 +- openair1/PHY/phy_extern_ue.h | 1 - openair1/PHY/phy_vars.h | 4 +- openair1/SCHED/fapi_l1.h | 1 - openair1/SCHED/prach_procedures.c | 2 - openair1/SCHED/ru_procedures.c | 1 - openair1/SCHED_NR/nr_ru_procedures.c | 3 - openair1/SIMULATION/TOOLS/sim.h | 2 +- targets/ARCH/COMMON/common_lib.c | 3 +- targets/ARCH/ETHERNET/USERSPACE/LIB/eth_udp.c | 1 - targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp | 4 +- targets/ARCH/rfsimulator/simulator.c | 3 - targets/RT/USER/lte-ru.c | 345 +++++++++--------- targets/RT/USER/ru_control.c | 49 +-- 42 files changed, 386 insertions(+), 376 deletions(-) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index ad8affabe2..3beb2e24bf 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -286,8 +286,11 @@ add_definitions(-DLTE_RRC_VERSION=${LTE_RRC_VERSION}) set (RRC_FULL_DIR ${asn1_generated_dir}/RRC_${RRC_ASN1_VERSION}) # Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make -execute_process(COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${RRC_FULL_DIR}" "${RRC_GRAMMAR}" "LTE_" - RESULT_VARIABLE ret) +if (${RU} STREQUAL 0) + execute_process(COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${RRC_FULL_DIR}" "${RRC_GRAMMAR}" "LTE_" + RESULT_VARIABLE ret) +endif (${RU} STREQUAL 0) + if (NOT ${ret} STREQUAL 0) message(FATAL_ERROR "${ret}: error") endif (NOT ${ret} STREQUAL 0) @@ -315,13 +318,16 @@ add_definitions(-DNR_RRC_VERSION=${NR_RRC_VERSION}) set (NR_RRC_FULL_DIR ${asn1_generated_dir}/RRC_${NR_RRC_ASN1_VERSION}) # Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make -execute_process(COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${NR_RRC_FULL_DIR}" "${NR_RRC_GRAMMAR}" "NR_" "-findirect-choice" +if (${RU} STREQUAL 0) + execute_process(COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${NR_RRC_FULL_DIR}" "${NR_RRC_GRAMMAR}" "NR_" "-findirect-choice" RESULT_VARIABLE ret) if (NOT ${ret} STREQUAL 0) message(FATAL_ERROR "${ret}: error") endif () file(GLOB nr_rrc_source ${NR_RRC_FULL_DIR}/*.c) file(GLOB nr_rrc_h ${NR_RRC_FULL_DIR}/*.h) +endif (${RU} STREQUAL 0) + add_custom_target ( nr_rrc_flag ALL ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${NR_RRC_FULL_DIR}" "${NR_RRC_GRAMMAR}" "NR_" "-findirect-choice" @@ -349,31 +355,33 @@ set(S1AP_ASN_DIR ${S1AP_DIR}/MESSAGES/ASN1/${S1AP_RELEASE}) set(S1AP_C_DIR ${asn1_generated_dir}/S1AP_${S1AP_RELEASE}) # Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make -execute_process(COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${S1AP_C_DIR}" "${S1AP_ASN_DIR}/${S1AP_ASN_FILES}" "S1AP_" -fno-include-deps - RESULT_VARIABLE ret) -if (NOT ${ret} STREQUAL 0) - message(FATAL_ERROR "${ret}: error") -endif (NOT ${ret} STREQUAL 0) -file(GLOB S1AP_source ${S1AP_C_DIR}/*.c) +if (${RU} STREQUAL 0) + execute_process(COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${S1AP_C_DIR}" "${S1AP_ASN_DIR}/${S1AP_ASN_FILES}" "S1AP_" -fno-include-deps + RESULT_VARIABLE ret) + if (NOT ${ret} STREQUAL 0) + message(FATAL_ERROR "${ret}: error") + endif (NOT ${ret} STREQUAL 0) + file(GLOB S1AP_source ${S1AP_C_DIR}/*.c) +endif (${RU} STREQUAL 0) -add_custom_target ( - s1ap_flag ALL - ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${S1AP_C_DIR}" "${S1AP_ASN_DIR}/${S1AP_ASN_FILES}" "S1AP_" -fno-include-deps - DEPENDS "${S1AP_ASN_DIR}/${S1AP_ASN_FILES}" -) - -add_library(S1AP_LIB - ${S1AP_source} - ${S1AP_DIR}/s1ap_common.c + add_custom_target ( + s1ap_flag ALL + ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${S1AP_C_DIR}" "${S1AP_ASN_DIR}/${S1AP_ASN_FILES}" "S1AP_" -fno-include-deps + DEPENDS "${S1AP_ASN_DIR}/${S1AP_ASN_FILES}" ) -add_dependencies(S1AP_LIB rrc_flag s1ap_flag) -include_directories ("${S1AP_C_DIR}") -include_directories ("${S1AP_DIR}") + add_library(S1AP_LIB + ${S1AP_source} + ${S1AP_DIR}/s1ap_common.c + ) + add_dependencies(S1AP_LIB rrc_flag s1ap_flag) + + include_directories ("${S1AP_C_DIR}") + include_directories ("${S1AP_DIR}") add_library(S1AP_ENB - ${S1AP_DIR}/s1ap_eNB.c - ${S1AP_DIR}/s1ap_eNB_context_management_procedures.c + ${S1AP_DIR}/s1ap_eNB.c + ${S1AP_DIR}/s1ap_eNB_context_management_procedures.c ${S1AP_DIR}/s1ap_eNB_decoder.c ${S1AP_DIR}/s1ap_eNB_encoder.c ${S1AP_DIR}/s1ap_eNB_handlers.c @@ -416,11 +424,13 @@ set(M2AP_ASN_DIR ${M2AP_DIR}/MESSAGES/ASN1/${M2AP_RELEASE}) set(M2AP_C_DIR ${asn1_generated_dir}/M2AP_${M2AP_RELEASE}) # Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make -execute_process(COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${M2AP_C_DIR}" "${M2AP_ASN_DIR}/${M2AP_ASN_FILES}" "M2AP_" -fno-include-deps -DEMIT_ASN_DEBUG=1 +if (${RU} STREQUAL 0) + execute_process(COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${M2AP_C_DIR}" "${M2AP_ASN_DIR}/${M2AP_ASN_FILES}" "M2AP_" -fno-include-deps -DEMIT_ASN_DEBUG=1 RESULT_VARIABLE ret) -if (NOT ${ret} STREQUAL 0) - message(FATAL_ERROR "${ret}: error") -endif (NOT ${ret} STREQUAL 0) + if (NOT ${ret} STREQUAL 0) + message(FATAL_ERROR "${ret}: error") + endif (NOT ${ret} STREQUAL 0) +endif (${RU} STREQUAL 0) file(GLOB M2AP_source ${M2AP_C_DIR}/*.c) @@ -486,11 +496,13 @@ set(M3AP_ASN_DIR ${M3AP_DIR}/MESSAGES/ASN1/${M3AP_RELEASE}) set(M3AP_C_DIR ${asn1_generated_dir}/M3AP_${M3AP_RELEASE}) # Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make -execute_process(COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${M3AP_C_DIR}" "${M3AP_ASN_DIR}/${M3AP_ASN_FILES}" "M3AP_" -fno-include-deps - RESULT_VARIABLE ret) -if (NOT ${ret} STREQUAL 0) - message(FATAL_ERROR "${ret}: error") -endif (NOT ${ret} STREQUAL 0) +if (${RU} STREQUAL 0) + execute_process(COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${M3AP_C_DIR}" "${M3AP_ASN_DIR}/${M3AP_ASN_FILES}" "M3AP_" -fno-include-deps + RESULT_VARIABLE ret) + if (NOT ${ret} STREQUAL 0) + message(FATAL_ERROR "${ret}: error") + endif (NOT ${ret} STREQUAL 0) +endif (${RU} STREQUAL 0) file(GLOB M3AP_source ${M3AP_C_DIR}/*.c) @@ -540,11 +552,13 @@ add_definitions(-DX2AP_VERSION=${X2AP_VERSION}) set(X2AP_ASN_DIR ${X2AP_DIR}/MESSAGES/ASN1/${X2AP_RELEASE}) set(X2AP_C_DIR ${asn1_generated_dir}/X2AP_${X2AP_RELEASE}) # Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make -execute_process(COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${X2AP_C_DIR}" "${X2AP_ASN_DIR}/${X2AP_ASN_FILES}" "X2AP_" -fno-include-deps - RESULT_VARIABLE ret) -if (NOT ${ret} STREQUAL 0) - message(FATAL_ERROR "${ret}: error") -endif (NOT ${ret} STREQUAL 0) +if (${RU} STREQUAL 0) + execute_process(COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${X2AP_C_DIR}" "${X2AP_ASN_DIR}/${X2AP_ASN_FILES}" "X2AP_" -fno-include-deps + RESULT_VARIABLE ret) + if (NOT ${ret} STREQUAL 0) + message(FATAL_ERROR "${ret}: error") + endif (NOT ${ret} STREQUAL 0) +endif (${RU} STREQUAL 0) file(GLOB X2AP_source ${X2AP_C_DIR}/*.c) @@ -596,17 +610,18 @@ set(F1AP_ASN_FILES ${F1AP_ASN_DIR}/F1AP-Containers.asn ) -set(F1AP_ASN_GENERATED_C_DIR ${asn1_generated_dir}/F1AP_${ASN1RELDIR}) -message("calling ASN1C_PREFIX=F1AP_ asn1c -gen-PER -no-gen-OER -fcompound-names -no-gen-example -findirect-choice -fno-include-deps -D ${F1AP_ASN_GENERATED_C_DIR} ${F1AP_ASN_FILES}") -execute_process(COMMAND mkdir -p ${F1AP_ASN_GENERATED_C_DIR} - COMMAND env "ASN1C_PREFIX=F1AP_" asn1c -gen-PER -no-gen-OER -fcompound-names -no-gen-example -findirect-choice -fno-include-deps -D ${F1AP_ASN_GENERATED_C_DIR} ${F1AP_ASN_FILES} - RESULT_VARIABLE ret - OUTPUT_QUIET - ERROR_QUIET) +if (${RU} STREQUAL 0) + set(F1AP_ASN_GENERATED_C_DIR ${asn1_generated_dir}/F1AP_${ASN1RELDIR}) + message("calling ASN1C_PREFIX=F1AP_ asn1c -gen-PER -no-gen-OER -fcompound-names -no-gen-example -findirect-choice -fno-include-deps -D ${F1AP_ASN_GENERATED_C_DIR} ${F1AP_ASN_FILES}") + execute_process(COMMAND mkdir -p ${F1AP_ASN_GENERATED_C_DIR} + COMMAND env "ASN1C_PREFIX=F1AP_" asn1c -gen-PER -no-gen-OER -fcompound-names -no-gen-example -findirect-choice -fno-include-deps -D ${F1AP_ASN_GENERATED_C_DIR} ${F1AP_ASN_FILES} + RESULT_VARIABLE ret + OUTPUT_QUIET + ERROR_QUIET) -if (NOT ${ret} STREQUAL 0) - message(FATAL_ERROR "asn1c: error") -endif (NOT ${ret} STREQUAL 0) + if (NOT ${ret} STREQUAL 0) + message(FATAL_ERROR "asn1c: error") + endif (NOT ${ret} STREQUAL 0) file(GLOB F1AP_ASN_GENERATED_C_FILES ${F1AP_ASN_GENERATED_C_DIR}/*.c) add_library(F1AP_LIB @@ -621,6 +636,8 @@ add_library(F1AP ${F1AP_C_FILES} ) +endif (${RU} STREQUAL 0) + # Hardware dependant options ################################### diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai index 86d6d38d05..9f06060b1b 100755 --- a/cmake_targets/build_oai +++ b/cmake_targets/build_oai @@ -237,10 +237,12 @@ function main() { shift;; --eNB) eNB=1 + RU=0 echo_info "Will compile eNB" shift;; --gNB) gNB=1 + RU=0 NR="True" echo_info "Will compile gNB" shift;; @@ -252,10 +254,12 @@ function main() { echo_info "FlexRAN support is always compiled into the eNB" shift;; --UE) + RU=0 UE=1 echo_info "Will compile UE" shift;; --nrUE) + RU=0 nrUE=1 NR="True" echo_info "Will compile NR UE" @@ -604,6 +608,7 @@ function main() { echo "set ( UE_TIMING_TRACE $UE_TIMING_TRACE )" >> $cmake_file echo "set ( USRP_REC_PLAY $USRP_REC_PLAY )" >> $cmake_file echo "set ( SKIP_SHARED_LIB_FLAG $SKIP_SHARED_LIB_FLAG )" >> $cmake_file + echo "set ( RU $RU )" >> $cmake_file echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file cd $DIR/$build_dir/build eval $CMAKE_CMD @@ -642,20 +647,22 @@ function main() { $build_dir $config_libconfig_shlib \ lib$config_libconfig_shlib.so $dbin/lib$config_libconfig_shlib.so - compilations \ - $build_dir coding \ - libcoding.so $dbin/libcoding.so + if [ "$RU" = "0" ] ; then - compilations \ - $build_dir nasmesh \ - CMakeFiles/nasmesh/nasmesh.ko $dbin/nasmesh.ko + compilations \ + $build_dir coding \ + libcoding.so $dbin/libcoding.so - compilations \ - $build_dir rb_tool \ - rb_tool $dbin/rb_tool - cp $OPENAIR_DIR/cmake_targets/tools/init_nas_nos1 $dbin + compilations \ + $build_dir nasmesh \ + CMakeFiles/nasmesh/nasmesh.ko $dbin/nasmesh.ko + + compilations \ + $build_dir rb_tool \ + rb_tool $dbin/rb_tool + cp $OPENAIR_DIR/cmake_targets/tools/init_nas_nos1 $dbin + fi fi - fi if [ "$UE" = 1 ] ; then diff --git a/common/ran_context.h b/common/ran_context.h index 8262f5dd55..704271cb12 100644 --- a/common/ran_context.h +++ b/common/ran_context.h @@ -39,7 +39,7 @@ #include "PHY/types.h" #include "PHY/impl_defs_top.h" -#include "ENB_APP/enb_config.h" +//#include "ENB_APP/enb_config.h" #include "flexran_agent_defs.h" #include "gtpv1u.h" diff --git a/executables/main_ru.c b/executables/main_ru.c index 5a3629d877..295c122bed 100644 --- a/executables/main_ru.c +++ b/executables/main_ru.c @@ -41,7 +41,6 @@ #include "PHY/types.h" #include "PHY/defs_RU.h" -#include "common/ran_context.h" #include "common/config/config_userapi.h" #include "common/utils/load_module_shlib.h" @@ -60,7 +59,7 @@ #include "system.h" #include -#include +#include #include static int DEFBANDS[] = {7}; @@ -77,7 +76,10 @@ uint16_t sf_ahead = 4; RU_t ru_m; -void init_RU0(RU_t *ru,int ru_id,char *rf_config_file, int send_dmrssync); +extern void init_RU0(RU_t *ru,int ru_id,char *rf_config_file, int send_dmrssync); +extern void init_RU_proc(RU_t *ru); +extern void kill_RU_proc(RU_t *ru); +extern void set_function_spec_param(RU_t *ru); void exit_function(const char *file, const char *function, const int line, const char *s) { @@ -96,7 +98,9 @@ void exit_function(const char *file, const char *function, const int line, const ru_m.ifdevice.trx_end_func(&ru_m.ifdevice); ru_m.ifdevice.trx_end_func = NULL; } - + + pthread_mutex_destroy(ru_m.ru_mutex); + pthread_cond_destroy(ru_m.ru_cond); sleep(1); //allow lte-softmodem threads to exit first exit(1); } @@ -169,6 +173,13 @@ int main ( int argc, char **argv ) config_getlist( &RUParamList,RUParams,sizeof(RUParams)/sizeof(paramdef_t), NULL); int j=0; + uint64_t ru_mask=1; + pthread_mutex_t ru_mutex; pthread_mutex_init(&ru_mutex,NULL); + pthread_cond_t ru_cond; pthread_cond_init(&ru_cond,NULL); + + ru->ru_mask= &ru_mask; + ru->ru_mutex = &ru_mutex; + ru->ru_cond = &ru_cond; ru->if_timing = synch_to_ext_device; ru->num_eNB = 0; diff --git a/openair1/PHY/INIT/lte_init_ru.c b/openair1/PHY/INIT/lte_init_ru.c index dddd6b1bd5..c7d5c3db04 100644 --- a/openair1/PHY/INIT/lte_init_ru.c +++ b/openair1/PHY/INIT/lte_init_ru.c @@ -21,9 +21,8 @@ #include "phy_init.h" #include "SCHED/sched_eNB.h" -#include "PHY/phy_extern.h" #include "PHY/LTE_REFSIG/lte_refsig.h" -#include "SIMULATION/TOOLS/sim.h" +//#include "SIMULATION/TOOLS/sim.h" #include "LTE_RadioResourceConfigCommonSIB.h" #include "LTE_RadioResourceConfigDedicated.h" #include "LTE_TDD-Config.h" @@ -34,6 +33,8 @@ void init_7_5KHz(void); +extern const char ru_if_types[MAX_RU_IF_TYPES][20]; + int phy_init_RU(RU_t *ru) { LTE_DL_FRAME_PARMS *fp = ru->frame_parms; RU_CALIBRATION *calibration = &ru->calibration; @@ -135,14 +136,14 @@ int phy_init_RU(RU_t *ru) { } } - AssertFatal(RC.nb_L1_inst <= NUMBER_OF_eNB_MAX,"eNB instances %d > %d\n", - RC.nb_L1_inst,NUMBER_OF_eNB_MAX); - LOG_D(PHY,"[INIT] %s() RC.nb_L1_inst:%d \n", __FUNCTION__, RC.nb_L1_inst); + AssertFatal(ru->num_eNB <= NUMBER_OF_eNB_MAX,"eNB instances %d > %d\n", + ru->num_eNB,NUMBER_OF_eNB_MAX); + LOG_D(PHY,"[INIT] %s() ru->num_eNB:%d \n", __FUNCTION__, ru->num_eNB); int starting_antenna_index=0; for (i=0; iidx; i++) starting_antenna_index+=ru->nb_tx; - for (i=0; inum_eNB; i++) { for (p=0; p<15; p++) { LOG_D(PHY,"[INIT] %s() nb_antenna_ports_eNB:%d \n", __FUNCTION__, ru->eNB_list[i]->frame_parms.nb_antenna_ports_eNB); @@ -241,7 +242,7 @@ void phy_free_RU(RU_t *ru) { free_and_zero(ru->prach_rxsigF); /* ru->prach_rxsigF_br is not allocated -> don't free */ - for (i = 0; i < RC.nb_L1_inst; i++) { + for (i = 0; i < ru->num_eNB; i++) { for (p = 0; p < 15; p++) { if (p < ru->eNB_list[i]->frame_parms.nb_antenna_ports_eNB || p == 5) { for (j=0; jnb_tx; j++) free_and_zero(ru->beam_weights[i][p][j]); diff --git a/openair1/PHY/INIT/lte_param_init.c b/openair1/PHY/INIT/lte_param_init.c index 1505ee018e..504c8fa80a 100644 --- a/openair1/PHY/INIT/lte_param_init.c +++ b/openair1/PHY/INIT/lte_param_init.c @@ -25,7 +25,6 @@ #include #include -#include "SIMULATION/TOOLS/sim.h" #include "PHY/types.h" #include "PHY/defs_eNB.h" #include "PHY/defs_UE.h" @@ -33,7 +32,9 @@ #include "phy_init.h" #include "PHY/LTE_REFSIG/lte_refsig.h" #include "PHY/LTE_TRANSPORT/transport_common_proto.h" -#include "targets/RT/USER/lte-softmodem.h" +#include "executables/softmodem-common.h" +#include "SIMULATION/TOOLS/sim.h" + extern PHY_VARS_eNB *eNB; extern PHY_VARS_UE *UE; extern RU_t *ru; diff --git a/openair1/PHY/INIT/nr_init_ru.c b/openair1/PHY/INIT/nr_init_ru.c index 2dcf035866..9e7e87882d 100644 --- a/openair1/PHY/INIT/nr_init_ru.c +++ b/openair1/PHY/INIT/nr_init_ru.c @@ -21,8 +21,6 @@ #include "phy_init.h" #include "SCHED/sched_common.h" -#include "PHY/phy_extern.h" -#include "SIMULATION/TOOLS/sim.h" /*#include "RadioResourceConfigCommonSIB.h" #include "RadioResourceConfigDedicated.h" #include "TDD-Config.h" @@ -32,6 +30,8 @@ #include #include "openair1/PHY/defs_RU.h" +extern const char ru_if_types[MAX_RU_IF_TYPES][20]; + int nr_phy_init_RU(RU_t *ru) { NR_DL_FRAME_PARMS *fp = ru->nr_frame_parms; @@ -43,8 +43,8 @@ int nr_phy_init_RU(RU_t *ru) { nfapi_nr_config_request_scf_t *cfg; ru->nb_log_antennas=0; - for (int n=0;ngNB_config; + for (int n=0;nnum_gNB;n++) { + cfg = &ru->gNB_list[n]->gNB_config; if (cfg->carrier_config.num_tx_ant.value > ru->nb_log_antennas) ru->nb_log_antennas = cfg->carrier_config.num_tx_ant.value; } AssertFatal(ru->nb_log_antennas > 0 && ru->nb_log_antennas < 13, "ru->nb_log_antennas %d ! \n",ru->nb_log_antennas); @@ -111,10 +111,10 @@ int nr_phy_init_RU(RU_t *ru) { LOG_D(PHY,"[INIT] prach_vars->rxsigF[%d] = %p\n",i,ru->prach_rxsigF[i]); } - AssertFatal(RC.nb_nr_L1_inst <= NUMBER_OF_eNB_MAX,"gNB instances %d > %d\n", - RC.nb_nr_L1_inst,NUMBER_OF_gNB_MAX); + AssertFatal(ru->num_gNB <= NUMBER_OF_gNB_MAX,"gNB instances %d > %d\n", + ru->num_gNB,NUMBER_OF_gNB_MAX); - LOG_E(PHY,"[INIT] %s() RC.nb_nr_L1_inst:%d \n", __FUNCTION__, RC.nb_nr_L1_inst); + LOG_E(PHY,"[INIT] %s() ru->num_gNB:%d \n", __FUNCTION__, ru->num_gNB); int beam_count = 0; if (ru->nb_log_antennas>1) { @@ -125,7 +125,7 @@ int nr_phy_init_RU(RU_t *ru) { AssertFatal(ru->nb_bfw==(beam_count*ru->nb_tx),"Number of beam weights from config file is %d while the expected number is %d",ru->nb_bfw,(beam_count*ru->nb_tx)); int l_ind = 0; - for (i=0; inum_gNB; i++) { for (p=0;pnb_log_antennas;p++) { if ((fp->L_ssb >> p) & 0x01) { ru->beam_weights[i][p] = (int32_t **)malloc16_clear(ru->nb_tx*sizeof(int32_t*)); @@ -184,7 +184,7 @@ void nr_phy_free_RU(RU_t *ru) free_and_zero(ru->prach_rxsigF[i]); } - for (i = 0; i < RC.nb_nr_L1_inst; i++) { + for (i = 0; i < ru->num_gNB; i++) { for (p = 0; p < 15; p++) { for (j=0; jnb_tx; j++) free_and_zero(ru->beam_weights[i][p][j]); free_and_zero(ru->beam_weights[i][p]); diff --git a/openair1/PHY/LTE_ESTIMATION/freq_equalization.c b/openair1/PHY/LTE_ESTIMATION/freq_equalization.c index 3fd58a4989..cbf987623c 100644 --- a/openair1/PHY/LTE_ESTIMATION/freq_equalization.c +++ b/openair1/PHY/LTE_ESTIMATION/freq_equalization.c @@ -20,7 +20,6 @@ */ #include "PHY/defs_eNB.h" -#include "PHY/phy_extern.h" #include "PHY/sse_intrin.h" // This is 512/(1:256) in __m128i format diff --git a/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync_eNB.c b/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync_eNB.c index f85162e095..7950be0dd1 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync_eNB.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync_eNB.c @@ -21,7 +21,6 @@ #include "PHY/types.h" #include "PHY/defs_eNB.h" -#include "PHY/phy_extern.h" #include "common/utils/LOG/vcd_signal_dumper.h" diff --git a/openair1/PHY/LTE_ESTIMATION/lte_sync_time.c b/openair1/PHY/LTE_ESTIMATION/lte_sync_time.c index 0d765a18b3..b3b8bc9bef 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_sync_time.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_sync_time.c @@ -27,12 +27,10 @@ //#include #include -#include "LAYER2/MAC/mac.h" #include "PHY/defs_UE.h" #include "PHY/phy_extern_ue.h" #include "PHY_INTERFACE/phy_interface.h" #include "PHY/LTE_REFSIG/lte_refsig.h" -#include "RRC/LTE/rrc_extern.h" // Note: this is for prototype of generate_drs_pusch (OTA synchronization of RRUs) #include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h" diff --git a/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c b/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c index 755111feb8..7007230138 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c @@ -20,7 +20,7 @@ */ #include "PHY/defs_eNB.h" -#include "PHY/phy_extern.h" +//#include "PHY/phy_extern.h" #include "PHY/sse_intrin.h" //#define DEBUG_CH #include "common/utils/LOG/log.h" @@ -34,6 +34,12 @@ static int16_t ru_90c[2*128] = {32767, 0,32766, -402,32758, -804,32746, -1206,32 #define SCALE 0x3FFF +static const short conjugate[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1}; +static const short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1}; + +extern unsigned short dftsizes[34]; +extern int16_t *ul_ref_sigs_rx[30][2][34]; + int32_t lte_ul_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms, L1_rxtx_proc_t *proc, LTE_eNB_ULSCH_t * ulsch, diff --git a/openair1/PHY/LTE_TRANSPORT/dci_tools_common.c b/openair1/PHY/LTE_TRANSPORT/dci_tools_common.c index 583d12eedb..d9533072f8 100644 --- a/openair1/PHY/LTE_TRANSPORT/dci_tools_common.c +++ b/openair1/PHY/LTE_TRANSPORT/dci_tools_common.c @@ -100,7 +100,6 @@ uint16_t RIV2nb_rb_LUT100[6000]; uint16_t RIV2first_rb_LUT100[6000]; uint16_t RIV_max100=0; -extern RAN_CONTEXT_t RC; extern uint32_t current_dlsch_cqi; @@ -273,15 +272,6 @@ uint16_t get_nCCE(uint8_t num_pdcch_symbols,LTE_DL_FRAME_PARMS *frame_parms,uint -uint16_t get_nCCE_mac(uint8_t Mod_id,uint8_t CC_id,int num_pdcch_symbols,int subframe) -{ - - // check for eNB only ! - return(get_nCCE(num_pdcch_symbols, - &RC.eNB[Mod_id][CC_id]->frame_parms, - get_mi(&RC.eNB[Mod_id][CC_id]->frame_parms,subframe))); -} - void conv_eMTC_rballoc (uint16_t resource_block_coding, uint32_t N_RB_DL, uint32_t * rb_alloc) { diff --git a/openair1/PHY/LTE_TRANSPORT/if4_tools.c b/openair1/PHY/LTE_TRANSPORT/if4_tools.c index a843fc1fd7..081359d715 100644 --- a/openair1/PHY/LTE_TRANSPORT/if4_tools.c +++ b/openair1/PHY/LTE_TRANSPORT/if4_tools.c @@ -30,9 +30,11 @@ * \warning */ -#include "PHY/defs_eNB.h" +#include +//#include "PHY/defs_eNB.h" +#include "PHY/defs_RU.h" #include "PHY/TOOLS/alaw_lut.h" -#include "PHY/phy_extern.h" +//#include "PHY/phy_extern.h" #include "SCHED/sched_eNB.h" //#include "targets/ARCH/ETHERNET/USERSPACE/LIB/if_defs.h" diff --git a/openair1/PHY/LTE_TRANSPORT/if5_tools.c b/openair1/PHY/LTE_TRANSPORT/if5_tools.c index 1e0dd9db1b..706c56edab 100644 --- a/openair1/PHY/LTE_TRANSPORT/if5_tools.c +++ b/openair1/PHY/LTE_TRANSPORT/if5_tools.c @@ -31,11 +31,11 @@ */ #include -#include "PHY/defs_eNB.h" +#include +#include "PHY/defs_RU.h" #include "PHY/TOOLS/alaw_lut.h" //#include "targets/ARCH/ETHERNET/USERSPACE/LIB/if_defs.h" #include "targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.h" -#include #include "common/utils/LOG/vcd_signal_dumper.h" //#define DEBUG_DL_MOBIPASS //#define DEBUG_UL_MOBIPASS diff --git a/openair1/PHY/LTE_TRANSPORT/pmch.c b/openair1/PHY/LTE_TRANSPORT/pmch.c index 90e2836b1e..69acc83204 100644 --- a/openair1/PHY/LTE_TRANSPORT/pmch.c +++ b/openair1/PHY/LTE_TRANSPORT/pmch.c @@ -24,22 +24,6 @@ #include "transport_eNB.h" #include "transport_proto.h" #include "transport_common_proto.h" -// Mask for identifying subframe for MBMS -#define MBSFN_TDD_SF3 0x80// for TDD -#define MBSFN_TDD_SF4 0x40 -#define MBSFN_TDD_SF7 0x20 -#define MBSFN_TDD_SF8 0x10 -#define MBSFN_TDD_SF9 0x08 - - - -#define MBSFN_FDD_SF1 0x80// for FDD -#define MBSFN_FDD_SF2 0x40 -#define MBSFN_FDD_SF3 0x20 -#define MBSFN_FDD_SF6 0x10 -#define MBSFN_FDD_SF7 0x08 -#define MBSFN_FDD_SF8 0x04 - diff --git a/openair1/PHY/LTE_TRANSPORT/prach.c b/openair1/PHY/LTE_TRANSPORT/prach.c index 24faf584d3..b3ac836eff 100644 --- a/openair1/PHY/LTE_TRANSPORT/prach.c +++ b/openair1/PHY/LTE_TRANSPORT/prach.c @@ -31,7 +31,7 @@ */ #include "PHY/sse_intrin.h" #include "PHY/defs_eNB.h" -#include "PHY/phy_extern.h" +//#include "PHY/phy_extern.h" //#include "prach.h" #include "PHY/LTE_TRANSPORT/if4_tools.h" diff --git a/openair1/PHY/LTE_TRANSPORT/prach_extern.h b/openair1/PHY/LTE_TRANSPORT/prach_extern.h index 47fbd93ad7..f198db9ff8 100644 --- a/openair1/PHY/LTE_TRANSPORT/prach_extern.h +++ b/openair1/PHY/LTE_TRANSPORT/prach_extern.h @@ -35,7 +35,7 @@ #include "PHY/sse_intrin.h" #include "PHY/defs_eNB.h" -#include "PHY/phy_extern.h" +//#include "PHY/phy_extern.h" //#define PRACH_DEBUG 1 //#define PRACH_WRITE_OUTPUT_DEBUG 1 diff --git a/openair1/PHY/LTE_TRANSPORT/transport_common.h b/openair1/PHY/LTE_TRANSPORT/transport_common.h index 321789d54b..0d55515c46 100644 --- a/openair1/PHY/LTE_TRANSPORT/transport_common.h +++ b/openair1/PHY/LTE_TRANSPORT/transport_common.h @@ -35,9 +35,9 @@ #include "dci.h" #include "mdci.h" //#include "uci.h" -#ifndef STANDALONE_COMPILE - #include "UTIL/LISTS/list.h" -#endif +//#ifndef STANDALONE_COMPILE +// #include "UTIL/LISTS/list.h" +//#endif #define MOD_TABLE_QPSK_OFFSET 1 #define MOD_TABLE_16QAM_OFFSET 5 diff --git a/openair1/PHY/LTE_TRANSPORT/transport_eNB.h b/openair1/PHY/LTE_TRANSPORT/transport_eNB.h index 5e446db5fd..b3985e973a 100644 --- a/openair1/PHY/LTE_TRANSPORT/transport_eNB.h +++ b/openair1/PHY/LTE_TRANSPORT/transport_eNB.h @@ -36,9 +36,9 @@ #include "dci.h" #include "mdci.h" #include "uci_common.h" -#ifndef STANDALONE_COMPILE - #include "UTIL/LISTS/list.h" -#endif +//#ifndef STANDALONE_COMPILE +// #include "UTIL/LISTS/list.h" +//#endif // structures below implement 36-211 and 36-212 diff --git a/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c b/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c index 1b23fc99bf..1c1cc08a25 100644 --- a/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c +++ b/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c @@ -31,12 +31,12 @@ */ #include "PHY/defs_eNB.h" -#include "PHY/phy_extern.h" +//#include "PHY/phy_extern.h" #include "transport_eNB.h" #include "PHY/sse_intrin.h" #include "transport_common_proto.h" #include "PHY/LTE_ESTIMATION/lte_estimation.h" -#include "PHY/MODULATION/modulation_eNB.h" +//#include "PHY/MODULATION/modulation_eNB.h" #include "T.h" @@ -45,8 +45,11 @@ //extern int **ulchmag_eren; //eren -static short jitter[8] __attribute__ ((aligned(16))) = {1,0,0,1,0,1,1,0}; -static short jitterc[8] __attribute__ ((aligned(16))) = {0,1,1,0,1,0,0,1}; +static const short jitter[8] __attribute__ ((aligned(16))) = {1,0,0,1,0,1,1,0}; +static const short jitterc[8] __attribute__ ((aligned(16))) = {0,1,1,0,1,0,0,1}; +static const short conjugate[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1}; +static const short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1}; + void lte_idft(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *z, uint16_t Msc_PUSCH) { #if defined(__x86_64__) || defined(__i386__) diff --git a/openair1/PHY/MODULATION/beamforming.c b/openair1/PHY/MODULATION/beamforming.c index 79e220ac37..40e77db0d0 100644 --- a/openair1/PHY/MODULATION/beamforming.c +++ b/openair1/PHY/MODULATION/beamforming.c @@ -44,7 +44,6 @@ #include "PHY/defs_common.h" #include "PHY/defs_eNB.h" -#include "PHY/phy_extern.h" #include "PHY/CODING/coding_defs.h" #include "PHY/CODING/coding_extern.h" #include "PHY/CODING/lte_interleaver_inline.h" diff --git a/openair1/PHY/MODULATION/slot_fep_ul.c b/openair1/PHY/MODULATION/slot_fep_ul.c index 746f8dbc0e..ccb7ee5f3e 100644 --- a/openair1/PHY/MODULATION/slot_fep_ul.c +++ b/openair1/PHY/MODULATION/slot_fep_ul.c @@ -20,8 +20,8 @@ */ #include "PHY/defs_eNB.h" -#include "PHY/phy_extern.h" -#include "modulation_eNB.h" +//#include "PHY/phy_extern.h" +//#include "modulation_eNB.h" //#define DEBUG_FEP diff --git a/openair1/PHY/MODULATION/ul_7_5_kHz.c b/openair1/PHY/MODULATION/ul_7_5_kHz.c index a5b428a813..384b9d621c 100644 --- a/openair1/PHY/MODULATION/ul_7_5_kHz.c +++ b/openair1/PHY/MODULATION/ul_7_5_kHz.c @@ -20,7 +20,6 @@ */ #include "PHY/defs_eNB.h" -#include "PHY/phy_extern.h" #include #include "PHY/sse_intrin.h" #include "modulation_extern.h" diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h index bb92508934..0a34631a83 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h @@ -42,7 +42,7 @@ #include "UTIL/LISTS/list.h" #endif -#include "LAYER2/NR_MAC_gNB/mac_proto.h" +//#include "LAYER2/NR_MAC_gNB/mac_proto.h" #include "openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h" //#include "../LTE_TRANSPORT/transport_common.h" diff --git a/openair1/PHY/TOOLS/oai_dfts.c b/openair1/PHY/TOOLS/oai_dfts.c index bd516cd1e0..3fd8903c75 100644 --- a/openair1/PHY/TOOLS/oai_dfts.c +++ b/openair1/PHY/TOOLS/oai_dfts.c @@ -32,17 +32,17 @@ #define M_PI 3.14159265358979323846 #endif #define OAIDFTS_MAIN -#ifndef MR_MAIN -#include "PHY/defs_common.h" -#include "PHY/impl_defs_top.h" -#else +//#ifndef MR_MAIN +//#include "PHY/defs_common.h" +//#include "PHY/impl_defs_top.h" +//#else #include "time_meas.h" #include "LOG/log.h" #define debug_msg #define ONE_OVER_SQRT2_Q15 23170 -int oai_exit=0; -#endif +//int oai_exit=0; +//#endif #define ONE_OVER_SQRT3_Q15 18919 @@ -50,6 +50,8 @@ int oai_exit=0; #include "assertions.h" +#include "tools_defs.h" + #define print_shorts(s,x) printf("%s %d,%d,%d,%d,%d,%d,%d,%d\n",s,(x)[0],(x)[1],(x)[2],(x)[3],(x)[4],(x)[5],(x)[6],(x)[7]) #define print_shorts256(s,x) printf("%s %d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\n",s,(x)[0],(x)[1],(x)[2],(x)[3],(x)[4],(x)[5],(x)[6],(x)[7],(x)[8],(x)[9],(x)[10],(x)[11],(x)[12],(x)[13],(x)[14],(x)[15]) diff --git a/openair1/PHY/defs_RU.h b/openair1/PHY/defs_RU.h index ce808eddf9..c78c6156c1 100644 --- a/openair1/PHY/defs_RU.h +++ b/openair1/PHY/defs_RU.h @@ -38,7 +38,7 @@ #include "openairinterface5g_limits.h" #include "PHY/TOOLS/time_meas.h" #include "defs_common.h" -#include +//#include #define MAX_BANDS_PER_RRU 4 @@ -421,6 +421,14 @@ typedef enum { typedef struct RU_t_s { /// index of this ru uint32_t idx; + /// pointer to first RU + struct RU_t_s *ru0; + /// pointer to ru_mask + uint64_t *ru_mask; + /// pointer to ru_mutex + pthread_mutex_t *ru_mutex; + /// pointer to ru_cond + pthread_cond_t *ru_cond; /// Pointer to configuration file char *rf_config_file; /// southbound interface @@ -431,6 +439,12 @@ typedef struct RU_t_s { node_function_t function; /// Ethernet parameters for fronthaul interface eth_params_t eth_params; + /// flag to indicate RF emulation mode + int emulate_rf; + /// numerology index + int numerology; + /// flag to indicate basicsim operation + int basicsim; /// flag to indicate the RU is in sync with a master reference int in_synch; /// timing offset diff --git a/openair1/PHY/defs_common.h b/openair1/PHY/defs_common.h index 75b2d54dc6..b7674a633e 100644 --- a/openair1/PHY/defs_common.h +++ b/openair1/PHY/defs_common.h @@ -943,6 +943,23 @@ extern int sync_var; #define DECODE_NUM_FPTR 13 +// Mask for identifying subframe for MBMS +#define MBSFN_TDD_SF3 0x80// for TDD +#define MBSFN_TDD_SF4 0x40 +#define MBSFN_TDD_SF7 0x20 +#define MBSFN_TDD_SF8 0x10 +#define MBSFN_TDD_SF9 0x08 + + + +#define MBSFN_FDD_SF1 0x80// for FDD +#define MBSFN_FDD_SF2 0x40 +#define MBSFN_FDD_SF3 0x20 +#define MBSFN_FDD_SF6 0x10 +#define MBSFN_FDD_SF7 0x08 +#define MBSFN_FDD_SF8 0x04 + + typedef uint8_t(decoder_if_t)(int16_t *y, int16_t *y2, uint8_t *decoded_bytes, diff --git a/openair1/PHY/impl_defs_nr.h b/openair1/PHY/impl_defs_nr.h index 44f2e314ea..117704df25 100644 --- a/openair1/PHY/impl_defs_nr.h +++ b/openair1/PHY/impl_defs_nr.h @@ -36,7 +36,6 @@ #include #include "types.h" -#include "NR_PDSCH-TimeDomainResourceAllocation.h" #ifdef DEFINE_VARIABLES_PHY_IMPLEMENTATION_DEFS_NR_H #define EXTERN @@ -397,6 +396,13 @@ typedef struct{ typedef struct{ // to be defined FIXME!!! }zp_CSI_RS_Resource_t; + +typedef struct{ + int k0; + int mappingType; + int startSymbolAndLength; + +}PDSCH_TimeDomainResourceAllocation_t; typedef struct { /* * resourceAllocation @@ -449,7 +455,7 @@ typedef struct { */ maxNrofCodeWordsScheduledByDCI_t maxNrofCodeWordsScheduledByDCI; - NR_PDSCH_TimeDomainResourceAllocation_t *pdsch_TimeDomainResourceAllocation[MAX_NR_OF_DL_ALLOCATIONS]; + PDSCH_TimeDomainResourceAllocation_t *pdsch_TimeDomainResourceAllocation[MAX_NR_OF_DL_ALLOCATIONS]; } PDSCH_Config_t; diff --git a/openair1/PHY/phy_extern.h b/openair1/PHY/phy_extern.h index 165ed961b3..c1e3bb6312 100644 --- a/openair1/PHY/phy_extern.h +++ b/openair1/PHY/phy_extern.h @@ -23,7 +23,6 @@ #define __PHY_EXTERN_H__ #include "PHY/defs_common.h" -#include "common/ran_context.h" extern char* namepointer_chMag ; extern char* namepointer_log2; @@ -33,14 +32,13 @@ extern unsigned int RX_DMA_BUFFER[4][NB_ANTENNAS_RX]; extern unsigned int TX_DMA_BUFFER[4][NB_ANTENNAS_TX]; #include "PHY/LTE_TRANSPORT/transport_extern.h" -//#include "SIMULATION/ETH_TRANSPORT/extern.h" +#include "PHY/defs_RU.h" extern unsigned int DAQ_MBOX; extern int number_of_cards; extern const short conjugate[8],conjugate2[8]; -extern RAN_CONTEXT_t RC; extern short primary_synch0[144]; extern short primary_synch1[144]; diff --git a/openair1/PHY/phy_extern_ue.h b/openair1/PHY/phy_extern_ue.h index 622551c2fe..1580a0a036 100644 --- a/openair1/PHY/phy_extern_ue.h +++ b/openair1/PHY/phy_extern_ue.h @@ -23,7 +23,6 @@ #define __PHY_EXTERN_UE__H__ #include "PHY/defs_UE.h" -#include "common/ran_context.h" extern char* namepointer_chMag ; extern char* namepointer_log2; diff --git a/openair1/PHY/phy_vars.h b/openair1/PHY/phy_vars.h index a74d148479..d5edf1183a 100644 --- a/openair1/PHY/phy_vars.h +++ b/openair1/PHY/phy_vars.h @@ -25,7 +25,6 @@ #include "PHY/types.h" #include "PHY/defs_eNB.h" #include "PHY/defs_UE.h" -#include "common/ran_context.h" char* namepointer_chMag ; char fmageren_name2[512]; @@ -41,9 +40,10 @@ int16_t *primary_synch2_time; #include "PHY/LTE_TRANSPORT/transport_vars.h" #include "PHY/MODULATION/modulation_vars.h" +#include "nfapi/oai_integration/vendor_ext.h" + PHY_VARS_UE ***PHY_vars_UE_g; -RAN_CONTEXT_t RC; UL_RCC_IND_t UL_RCC_INFO; unsigned short rev[2048],rev_times4[8192],rev_half[1024]; diff --git a/openair1/SCHED/fapi_l1.h b/openair1/SCHED/fapi_l1.h index 4da1fa63ec..a122e36782 100644 --- a/openair1/SCHED/fapi_l1.h +++ b/openair1/SCHED/fapi_l1.h @@ -31,7 +31,6 @@ */ #include "PHY/defs_eNB.h" -#include "PHY/phy_extern.h" #include "PHY/LTE_TRANSPORT/transport_proto.h" #include "SCHED/sched_eNB.h" #include "SCHED/sched_common.h" diff --git a/openair1/SCHED/prach_procedures.c b/openair1/SCHED/prach_procedures.c index eb9a2922c5..e1d2e68622 100644 --- a/openair1/SCHED/prach_procedures.c +++ b/openair1/SCHED/prach_procedures.c @@ -31,7 +31,6 @@ */ #include "PHY/defs_eNB.h" -#include "PHY/phy_extern.h" #include "SCHED/sched_eNB.h" #include "nfapi_interface.h" #include "fapi_l1.h" @@ -46,7 +45,6 @@ #include -#include "intertask_interface.h" extern int oai_nfapi_rach_ind(nfapi_rach_indication_t *rach_ind); diff --git a/openair1/SCHED/ru_procedures.c b/openair1/SCHED/ru_procedures.c index cb03821388..40b0b8e98b 100644 --- a/openair1/SCHED/ru_procedures.c +++ b/openair1/SCHED/ru_procedures.c @@ -43,7 +43,6 @@ #include "PHY/defs_eNB.h" -#include "PHY/phy_extern.h" #include "SCHED/sched_eNB.h" #include "PHY/MODULATION/modulation_eNB.h" #include "PHY/LTE_TRANSPORT/if4_tools.h" diff --git a/openair1/SCHED_NR/nr_ru_procedures.c b/openair1/SCHED_NR/nr_ru_procedures.c index aefeec43e2..7a4c8774b6 100644 --- a/openair1/SCHED_NR/nr_ru_procedures.c +++ b/openair1/SCHED_NR/nr_ru_procedures.c @@ -31,15 +31,12 @@ */ #include "PHY/defs_gNB.h" -#include "PHY/phy_extern.h" #include "sched_nr.h" #include "PHY/MODULATION/modulation_common.h" #include "PHY/MODULATION/nr_modulation.h" #include "PHY/LTE_TRANSPORT/if4_tools.h" #include "PHY/LTE_TRANSPORT/if5_tools.h" -#include "LAYER2/NR_MAC_COMMON/nr_mac_extern.h" -#include "LAYER2/MAC/mac.h" #include "common/utils/LOG/log.h" #include "common/utils/system.h" #include "common/utils/LOG/vcd_signal_dumper.h" diff --git a/openair1/SIMULATION/TOOLS/sim.h b/openair1/SIMULATION/TOOLS/sim.h index ac46d51174..7b429cc48d 100644 --- a/openair1/SIMULATION/TOOLS/sim.h +++ b/openair1/SIMULATION/TOOLS/sim.h @@ -440,7 +440,7 @@ void init_channelmod(void) ; double N_RB2sampling_rate(uint16_t N_RB); double N_RB2channel_bandwidth(uint16_t N_RB); -#include "targets/RT/USER/rfsim.h" +//#include "targets/RT/USER/rfsim.h" void do_DL_sig(sim_t *sim, uint16_t subframe, diff --git a/targets/ARCH/COMMON/common_lib.c b/targets/ARCH/COMMON/common_lib.c index 3066f0906f..95f037664d 100644 --- a/targets/ARCH/COMMON/common_lib.c +++ b/targets/ARCH/COMMON/common_lib.c @@ -40,7 +40,8 @@ #include "assertions.h" #include "common/utils/load_module_shlib.h" #include "common/utils/LOG/log.h" -#include "targets/RT/USER/lte-softmodem.h" +//#include "targets/RT/USER/lte-softmodem.h" +#include "executables/softmodem-common.h" char *get_devname(int devtype) { char *devnames[MAX_RF_DEV_TYPE]=DEVTYPE_NAMES; diff --git a/targets/ARCH/ETHERNET/USERSPACE/LIB/eth_udp.c b/targets/ARCH/ETHERNET/USERSPACE/LIB/eth_udp.c index 473d129aaf..7b9d8128ff 100644 --- a/targets/ARCH/ETHERNET/USERSPACE/LIB/eth_udp.c +++ b/targets/ARCH/ETHERNET/USERSPACE/LIB/eth_udp.c @@ -45,7 +45,6 @@ #include "common_lib.h" #include "ethernet_lib.h" -#include "common/ran_context.h" #define DEBUG 0 diff --git a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp index a218f07dfd..359b7112ff 100644 --- a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp +++ b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp @@ -1251,7 +1251,7 @@ extern "C" { LOG_I(HW,"Actual time source %s...\n",s->usrp->get_time_source(0).c_str()); sleep(1); // create tx & rx streamer - uhd::stream_args_t stream_args_rx("sc12", "sc12"); + uhd::stream_args_t stream_args_rx("sc16", "sc12"); int samples=openair0_cfg[0].sample_rate; int max=s->usrp->get_rx_stream(stream_args_rx)->get_max_num_samps(); samples/=10000; @@ -1268,7 +1268,7 @@ extern "C" { stream_args_rx.channels.push_back(i); s->rx_stream = s->usrp->get_rx_stream(stream_args_rx); - uhd::stream_args_t stream_args_tx("sc12", "sc12"); + uhd::stream_args_t stream_args_tx("sc16", "sc12"); for (int i = 0; i -extern RAN_CONTEXT_t RC; // #define RFSIMU_SECTION "rfsimulator" diff --git a/targets/RT/USER/lte-ru.c b/targets/RT/USER/lte-ru.c index 921cdf5378..b34b6e10cc 100644 --- a/targets/RT/USER/lte-ru.c +++ b/targets/RT/USER/lte-ru.c @@ -51,7 +51,6 @@ #include "assertions.h" #include "msc.h" #include "PHY/defs_common.h" -#include "PHY/phy_extern.h" #include "PHY/types.h" #include "PHY/INIT/phy_init.h" #include "PHY/LTE_ESTIMATION/lte_estimation.h" @@ -59,23 +58,11 @@ #include "PHY/LTE_TRANSPORT/if4_tools.h" #include "PHY/LTE_TRANSPORT/if5_tools.h" #include "PHY/LTE_TRANSPORT/transport_proto.h" -#include "PHY_INTERFACE/phy_interface.h" -#include "LAYER2/MAC/mac.h" -#include "LAYER2/MAC/mac_extern.h" -#include "LAYER2/MAC/mac_proto.h" -#include "RRC/LTE/rrc_extern.h" -#include "SCHED/sched_eNB.h" -#include "UTIL/OPT/opt.h" -#include "UTIL/OTG/otg_tx.h" -#include "UTIL/OTG/otg_externs.h" -#include "UTIL/MATH/oml.h" +#include "SCHED/sched_common.h" #include "common/utils/LOG/log.h" #include "common/utils/LOG/vcd_signal_dumper.h" -#include "nfapi/oai_integration/vendor_ext.h" -#include "enb_config.h" #include "targets/ARCH/COMMON/common_lib.h" #include "targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.h" -#include "targets/RT/USER/lte-softmodem.h" //#include "PHY/TOOLS/time_meas.h" /* these variables have to be defined before including ENB_APP/enb_paramdef.h */ @@ -86,29 +73,24 @@ static int DEFBFW[] = {0x00007fff}; #include "ENB_APP/enb_paramdef.h" #include "common/config/config_userapi.h" -#ifndef OPENAIR2 - #include "UTIL/OTG/otg_extern.h" -#endif - -#include "s1ap_eNB.h" #include "SIMULATION/ETH_TRANSPORT/proto.h" #include "T.h" -#include "pdcp.h" #define MBMS_EXPERIMENTAL extern volatile int oai_exit; -extern int emulate_rf; -extern int numerology; extern clock_source_t clock_source; #include "executables/thread-common.h" //extern PARALLEL_CONF_t get_thread_parallel_conf(void); //extern WORKER_CONF_t get_thread_worker_conf(void); extern void phy_init_RU(RU_t *); -void stop_RU(int nb_ru); +void prach_procedures(PHY_VARS_eNB *eNB,int br_flag); + +void stop_RU(RU_t **rup,int nb_ru); + void do_ru_synch(RU_t *ru); void configure_ru(int idx, @@ -122,8 +104,14 @@ int connect_rau(RU_t *ru); const char ru_states[6][9] = {"RU_IDLE","RU_CONFIG","RU_READY","RU_RUN","RU_ERROR","RU_SYNC"}; +extern const char NB_functions[7][20]; +extern const char NB_timing[2][20]; + extern uint16_t sf_ahead; +extern const char ru_if_types[MAX_RU_IF_TYPES][20]; + + #if defined(PRE_SCD_THREAD) extern uint8_t dlsch_ue_select_tbl_in_use; void init_ru_vnf(void); @@ -139,7 +127,7 @@ extern uint16_t sf_ahead; // southbound IF5 fronthaul for 16-bit OAI format static inline void fh_if5_south_out(RU_t *ru,int frame, int subframe, uint64_t timestamp) { - if (ru == RC.ru[0]) VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, ru->proc.timestamp_tx&0xffffffff ); + if (ru->idx == 0) VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, ru->proc.timestamp_tx&0xffffffff ); send_IF5(ru, timestamp, subframe, &ru->seqno, IF5_RRH_GW_DL); } @@ -147,7 +135,7 @@ static inline void fh_if5_south_out(RU_t *ru,int frame, int subframe, uint64_t t // southbound IF5 fronthaul for Mobipass packet format static inline void fh_if5_mobipass_south_out(RU_t *ru,int frame, int subframe, uint64_t timestamp) { - if (ru == RC.ru[0]) VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, ru->proc.timestamp_tx&0xffffffff ); + if (ru->idx == 0) VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, ru->proc.timestamp_tx&0xffffffff ); send_IF5(ru, timestamp, subframe, &ru->seqno, IF5_MOBIPASS); } @@ -158,7 +146,7 @@ static inline void fh_if4p5_south_out(RU_t *ru, int frame, int subframe, uint64_t timestamp) { - if (ru == RC.ru[0]) VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, ru->proc.timestamp_tx&0xffffffff ); + if (ru->idx == 0) VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, ru->proc.timestamp_tx&0xffffffff ); LOG_D(PHY,"ENTERED fh_if4p5_south_out Sending IF4p5 for frame %d subframe %d ru %d\n",ru->proc.frame_tx,ru->proc.tti_tx,ru->idx); @@ -168,7 +156,7 @@ static inline void fh_if4p5_south_out(RU_t *ru, LOG_D(PHY,"south_out_cnt %d\n",ru->south_out_cnt); } - /*if (ru == RC.ru[0] || ru == RC.ru[1]) { + /*if (ru->idx == 0 || ru->idx == ru) { VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_RU+ru->idx, ru->proc.frame_tx ); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_TX0_RU+ru->idx, ru->proc.subframe_tx ); }*/ @@ -291,7 +279,7 @@ void fh_if4p5_south_in(RU_t *ru, *subframe = proc->tti_rx; } - /*if (ru == RC.ru[0] || ru == RC.ru[1]) { + /*if (ru->idx == 0 || ru->idx == 1) { VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX0_RU+ru->idx, f ); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_RX0_RU+ru->idx, sf ); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX0_RU, f ); @@ -441,7 +429,7 @@ void fh_if4p5_north_in(RU_t *ru, ru->north_in_cnt++; // dump VCD output for first RU in list - if (ru == RC.ru[0]) { + if (ru->idx == 0) { VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_RU, *frame ); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_TX0_RU, *subframe ); } @@ -599,8 +587,8 @@ volatile late_control_e late_control=STATE_BURST_NORMAL; static void *emulatedRF_thread(void *param) { RU_proc_t *proc = (RU_proc_t *) param; int microsec = 500; // length of time to sleep, in miliseconds + int numerology = 0 ; struct timespec req = {0}; - int numerology = get_softmodem_params()->numerology; req.tv_sec = 0; req.tv_nsec = (numerology>0)? ((microsec * 1000L)/numerology):(microsec * 1000L)*2; cpu_set_t cpuset; @@ -651,7 +639,7 @@ void rx_rf(RU_t *ru, VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ, 1 ); old_ts = proc->timestamp_rx; - if(get_softmodem_params()->emulate_rf) { + if(ru->emulate_rf) { wait_on_condition(&proc->mutex_emulateRF,&proc->cond_emulateRF,&proc->instance_cnt_emulateRF,"emulatedRF_thread"); release_thread(&proc->mutex_emulateRF,&proc->instance_cnt_emulateRF,"emulatedRF_thread"); rxs = fp->samples_per_tti; @@ -997,7 +985,7 @@ void *ru_thread_prach( void *param ) { thread_top_init("ru_thread_prach",1,500000,1000000,20000000); //wait_sync("ru_thread_prach"); - while (RC.ru_mask>0 && ru->function!=eNodeB_3GPP) { + while (*ru->ru_mask>0 && ru->function!=eNodeB_3GPP) { usleep(1e6); LOG_D(PHY,"%s() RACH waiting for RU to be configured\n", __FUNCTION__); } @@ -1345,11 +1333,9 @@ void fill_rf_config(RU_t *ru, char *rf_config_file) { LTE_DL_FRAME_PARMS *fp = ru->frame_parms; openair0_config_t *cfg = &ru->openair0_cfg; - //printf("////////////////numerology in config = %d\n",numerology); - int numerology = get_softmodem_params()->numerology; if(fp->N_RB_DL == 100) { - if(numerology == 0) { + if(ru->numerology == 0) { if (fp->threequarter_fs) { cfg->sample_rate=23.04e6; cfg->samples_per_frame = 230400; @@ -1361,18 +1347,18 @@ void fill_rf_config(RU_t *ru, cfg->tx_bw = 10e6; cfg->rx_bw = 10e6; } - } else if(numerology == 1) { + } else if(ru->numerology == 1) { cfg->sample_rate=61.44e6; cfg->samples_per_frame = 307200; cfg->tx_bw = 20e6; cfg->rx_bw = 20e6; - } else if(numerology == 2) { + } else if(ru->numerology == 2) { cfg->sample_rate=122.88e6; cfg->samples_per_frame = 307200; cfg->tx_bw = 40e6; cfg->rx_bw = 40e6; } else { - printf("Wrong input for numerology %d\n setting to 20MHz normal CP configuration",numerology); + printf("Wrong input for numerology %d\n setting to 20MHz normal CP configuration",ru->numerology); cfg->sample_rate=30.72e6; cfg->samples_per_frame = 307200; cfg->tx_bw = 10e6; @@ -1443,7 +1429,7 @@ int setup_RU_buffers(RU_t *ru) { else if (frame_parms->N_RB_DL == 50) ru->N_TA_offset = 624/2; else if (frame_parms->N_RB_DL == 25) ru->N_TA_offset = 624/4; - if(IS_SOFTMODEM_BASICSIM) + if(ru->basicsim) /* this is required for the basic simulator in TDD mode * TODO: find a proper cleaner solution */ @@ -1575,7 +1561,7 @@ static void *ru_thread_tx( void *param ) { // do OFDM if needed if ((ru->fh_north_asynch_in == NULL) && (ru->feptx_ofdm)) ru->feptx_ofdm(ru,proc->frame_tx,proc->tti_tx); - if(!(get_softmodem_params()->emulate_rf)) { //if(!emulate_rf){ + if(!(ru->emulate_rf)) { //if(!emulate_rf){ // do outgoing fronthaul (south) if needed if ((ru->fh_north_asynch_in == NULL) && (ru->fh_south_out)) ru->fh_south_out(ru,proc->frame_tx,proc->tti_tx,proc->timestamp_tx); @@ -1670,7 +1656,7 @@ static void *ru_thread( void *param ) { LOG_I(PHY,"thread ru created id=%ld\n", syscall(__NR_gettid)); LOG_I(PHY,"Starting RU %d (%s,%s),\n", ru->idx, NB_functions[ru->function], NB_timing[ru->if_timing]); - if(get_softmodem_params()->emulate_rf) { + if(ru->emulate_rf) { fill_rf_config(ru,ru->rf_config_file); init_frame_parms(ru->frame_parms,1); phy_init_RU(ru); @@ -1681,10 +1667,10 @@ static void *ru_thread( void *param ) { } LOG_I(PHY, "Signaling main thread that RU %d is ready\n",ru->idx); - AssertFatal((ret=pthread_mutex_lock(&RC.ru_mutex))==0,"mutex_lock returns %d\n",ret); - RC.ru_mask &= ~(1<idx); - pthread_cond_signal(&RC.ru_cond); - AssertFatal((ret=pthread_mutex_unlock(&RC.ru_mutex))==0,"mutex_unlock returns %d\n",ret); + AssertFatal((ret=pthread_mutex_lock(ru->ru_mutex))==0,"mutex_lock returns %d\n",ret); + *ru->ru_mask &= ~(1<idx); + pthread_cond_signal(ru->ru_cond); + AssertFatal((ret=pthread_mutex_unlock(ru->ru_mutex))==0,"mutex_unlock returns %d\n",ret); ru->state = RU_RUN; } else if (ru->has_ctrl_prt == 0) { // There is no control port: start everything here @@ -1702,16 +1688,16 @@ static void *ru_thread( void *param ) { exit(-1); } - AssertFatal((ret=pthread_mutex_lock(&RC.ru_mutex))==0,"mutex_lock returns %d\n",ret); - RC.ru_mask &= ~(1<idx); - pthread_cond_signal(&RC.ru_cond); - AssertFatal((ret=pthread_mutex_unlock(&RC.ru_mutex))==0,"mutex_unlock returns %d\n",ret); + AssertFatal((ret=pthread_mutex_lock(ru->ru_mutex))==0,"mutex_lock returns %d\n",ret); + *ru->ru_mask &= ~(1<idx); + pthread_cond_signal(ru->ru_cond); + AssertFatal((ret=pthread_mutex_unlock(ru->ru_mutex))==0,"mutex_unlock returns %d\n",ret); } - AssertFatal((ret=pthread_mutex_lock(&RC.ru_mutex))==0,"mutex_lock returns %d\n",ret); - RC.ru_mask &= ~(1<idx); - pthread_cond_signal(&RC.ru_cond); - AssertFatal((ret=pthread_mutex_unlock(&RC.ru_mutex))==0,"mutex_unlock returns %d\n",ret); + AssertFatal((ret=pthread_mutex_lock(ru->ru_mutex))==0,"mutex_lock returns %d\n",ret); + *ru->ru_mask &= ~(1<idx); + pthread_cond_signal(ru->ru_cond); + AssertFatal((ret=pthread_mutex_unlock(ru->ru_mutex))==0,"mutex_unlock returns %d\n",ret); ru->state = RU_RUN; } @@ -1735,7 +1721,7 @@ static void *ru_thread( void *param ) { } else wait_sync("ru_thread"); LOG_I(PHY,"Got start from control thread\n"); - if(!(get_softmodem_params()->emulate_rf)) { + if(!(ru->emulate_rf)) { if (ru->is_slave == 0) AssertFatal(ru->state == RU_RUN,"ru-%d state = %s != RU_RUN\n",ru->idx,ru_states[ru->state]); else if (ru->is_slave == 1) AssertFatal(ru->state == RU_SYNC || ru->state == RU_RUN || ru->state == RU_CHECK_SYNC,"ru %d state = %s != RU_SYNC or RU_RUN or RU_CHECK_SYNC\n",ru->idx,ru_states[ru->state]); @@ -1823,14 +1809,14 @@ static void *ru_thread( void *param ) { ru->wait_cnt--; LOG_D(PHY,"RU thread %d, frame %d, subframe %d, wait_cnt %d \n",ru->idx, frame, subframe, ru->wait_cnt); - if (ru->if_south!=LOCAL_RF && ru->wait_cnt <=20 && subframe == 5 && frame != RC.ru[0]->proc.frame_rx && resynch_done == 0) { + if (ru->if_south!=LOCAL_RF && ru->wait_cnt <=20 && subframe == 5 && frame != ru->ru0->proc.frame_rx && resynch_done == 0) { // Send RRU_frame adjust RRU_CONFIG_msg_t rru_config_msg; rru_config_msg.type = RRU_frame_resynch; rru_config_msg.len = sizeof(RRU_CONFIG_msg_t); // TODO: set to correct msg len - ((uint16_t *)&rru_config_msg.msg[0])[0] = RC.ru[0]->proc.frame_rx; + ((uint16_t *)&rru_config_msg.msg[0])[0] = ru->ru0->proc.frame_rx; ru->cmd=WAIT_RESYNCH; - LOG_I(PHY,"Sending Frame Resynch %d to RRU %d\n", RC.ru[0]->proc.frame_rx,ru->idx); + LOG_I(PHY,"Sending Frame Resynch %d to RRU %d\n", ru->ru0->proc.frame_rx,ru->idx); AssertFatal((ru->ifdevice.trx_ctlsend_func(&ru->ifdevice,&rru_config_msg,rru_config_msg.len)!=-1),"Failed to send msg to RAU\n"); resynch_done=1; } @@ -1888,9 +1874,9 @@ static void *ru_thread( void *param ) { #ifdef MBMS_EXPERIMENTAL //Workaround ... this must be properly handled - if(ru->if_south==LOCAL_RF && ru->function==eNodeB_3GPP && RC.eNB[0][0]!=NULL){ - if(ru->frame_parms->num_MBSFN_config!=RC.eNB[0][0]->frame_parms.num_MBSFN_config){ - ru->frame_parms = &RC.eNB[0][0]->frame_parms;//->frame_parms; + if(ru->if_south==LOCAL_RF && ru->function==eNodeB_3GPP && ru->eNB_list[0]!=NULL){ + if(ru->frame_parms->num_MBSFN_config!=ru->eNB_list[0]->frame_parms.num_MBSFN_config){ + ru->frame_parms = &ru->eNB_list[0]->frame_parms;//->frame_parms; LOG_W(PHY,"RU MBSFN SF PARAMS Updated\n"); } } @@ -1905,7 +1891,7 @@ static void *ru_thread( void *param ) { // do OFDM if needed if ((ru->fh_north_asynch_in == NULL) && (ru->feptx_ofdm)) ru->feptx_ofdm(ru, proc->frame_tx, proc->tti_tx); - if(!(get_softmodem_params()->emulate_rf)) { //if(!emulate_rf){ + if(!(ru->emulate_rf)) { //if(!emulate_rf){ // do outgoing fronthaul (south) if needed if ((ru->fh_north_asynch_in == NULL) && (ru->fh_south_out)) ru->fh_south_out(ru, proc->frame_tx, proc->tti_tx, proc->timestamp_tx); @@ -1944,7 +1930,7 @@ static void *ru_thread( void *param ) { printf( "Exiting ru_thread \n"); - if (!(get_softmodem_params()->emulate_rf)) { + if (!(ru->emulate_rf)) { if (ru->stop_rf != NULL) { if (ru->stop_rf(ru) != 0) LOG_E(HW,"Could not stop the RF device\n"); @@ -2162,7 +2148,7 @@ static void *rf_tx( void *param ) { // do OFDM if needed if ((ru->fh_north_asynch_in == NULL) && (ru->feptx_ofdm)) ru->feptx_ofdm(ru,proc->frame_tx,proc->tti_tx); - if(!emulate_rf) { + if(!ru->emulate_rf) { // do outgoing fronthaul (south) if needed if ((ru->fh_north_asynch_in == NULL) && (ru->fh_south_out)) ru->fh_south_out(ru,proc->frame_tx,proc->tti_tx,proc->timestamp_tx); @@ -2315,7 +2301,7 @@ void init_RU_proc(RU_t *ru) { pthread_create( &proc->pthread_rf_tx, NULL, rf_tx, (void *)ru ); #endif - if (get_softmodem_params()->emulate_rf) + if (ru->emulate_rf) pthread_create( &proc->pthread_emulateRF, attr_emulateRF, emulatedRF_thread, (void *)proc ); if (get_thread_parallel_conf() == PARALLEL_RU_L1_SPLIT || get_thread_parallel_conf() == PARALLEL_RU_L1_TRX_SPLIT) @@ -2364,10 +2350,10 @@ void init_RU_proc(RU_t *ru) { if (ru->function == eNodeB_3GPP) { usleep(10000); LOG_I(PHY, "Signaling main thread that RU %d (is_slave %d,send_dmrs %d) is ready in state %s\n",ru->idx,ru->is_slave,ru->generate_dmrs_sync,ru_states[ru->state]); - AssertFatal((ret=pthread_mutex_lock(&RC.ru_mutex))==0,"mutex_lock returns %d\n",ret); - RC.ru_mask &= ~(1<idx); - pthread_cond_signal(&RC.ru_cond); - AssertFatal((ret=pthread_mutex_unlock(&RC.ru_mutex))==0,"mutex_unlock returns %d\n",ret); + AssertFatal((ret=pthread_mutex_lock(ru->ru_mutex))==0,"mutex_lock returns %d\n",ret); + *ru->ru_mask &= ~(1<idx); + pthread_cond_signal(ru->ru_cond); + AssertFatal((ret=pthread_mutex_unlock(ru->ru_mutex))==0,"mutex_unlock returns %d\n",ret); } } @@ -2494,7 +2480,7 @@ void kill_RU_proc(RU_t *ru) { } -void init_precoding_weights(PHY_VARS_eNB *eNB) { +void init_precoding_weights(RU_t **rup,int nb_RU,PHY_VARS_eNB *eNB) { int layer,ru_id,aa,re,ue,tb; LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms; RU_t *ru; @@ -2508,8 +2494,8 @@ void init_precoding_weights(PHY_VARS_eNB *eNB) { for (layer=0; layer<4; layer++) { int nb_tx=0; - for (ru_id=0; ru_idnb_tx; } @@ -2710,33 +2696,29 @@ void init_RU0(RU_t *ru,int ru_id,char *rf_config_file, int send_dmrssync) { } // This part if on eNB side -void init_RU(char *rf_config_file, int send_dmrssync) { +void init_RU(RU_t **rup,int nb_RU,PHY_VARS_eNB ***eNBp,int nb_L1,int *nb_CC,char *rf_config_file, int send_dmrssync) { int ru_id, i, CC_id; RU_t *ru; PHY_VARS_eNB *eNB0 = (PHY_VARS_eNB *)NULL; LTE_DL_FRAME_PARMS *fp = (LTE_DL_FRAME_PARMS *)NULL; // create status mask - RC.ru_mask= (1 << RC.nb_RU) - 1; - pthread_mutex_init(&RC.ru_mutex,NULL); - pthread_cond_init(&RC.ru_cond,NULL); + if (nb_CC != NULL) + for (i=0; inum_RU=0; - if (RC.nb_CC != 0) - for (i=0; inum_RU=0; + LOG_D(PHY,"Process RUs RC.nb_RU:%d\n",nb_RU); - LOG_D(PHY,"Process RUs RC.nb_RU:%d\n",RC.nb_RU); - - for (ru_id=0; ru_idru0 = rup[0]; if (ru->num_eNB > 0) { - LOG_D(PHY, "%s() RC.ru[%d].num_eNB:%d ru->eNB_list[0]:%p RC.eNB[0][0]:%p rf_config_file:%s\n", __FUNCTION__, ru_id, ru->num_eNB, ru->eNB_list[0], RC.eNB[0][0], ru->rf_config_file); + LOG_D(PHY, "%s() ru[%d].num_eNB:%d ru->eNB_list[0]:%p eNB[0][0]:%p rf_config_file:%s\n", __FUNCTION__, ru_id, ru->num_eNB, ru->eNB_list[0], eNBp[0][0], ru->rf_config_file); if (ru->eNB_list[0] == 0) { LOG_E(PHY,"%s() DJP - ru->eNB_list ru->num_eNB are not initialized - so do it manually\n", __FUNCTION__); - ru->eNB_list[0] = RC.eNB[0][0]; + ru->eNB_list[0] = eNBp[0][0]; ru->num_eNB=1; // // DJP - feptx_prec() / feptx_ofdm() parses the eNB_list (based on num_eNB) and copies the txdata_F to txdata in RU @@ -2814,10 +2796,10 @@ void stop_ru(RU_t *ru) { } -void stop_RU(int nb_ru) { +void stop_RU(RU_t **rup,int nb_ru) { for (int inst = 0; inst < nb_ru; inst++) { LOG_I(PHY, "Stopping RU %d processing threads\n", inst); - kill_RU_proc(RC.ru[inst]); + kill_RU_proc(rup[inst]); } } @@ -2834,11 +2816,11 @@ void init_ru_vnf(void) { dlsch_ue_select_tbl_in_use = 1; // create status mask RC.ru_mask = 0; - pthread_mutex_init(&RC.ru_mutex,NULL); - pthread_cond_init(&RC.ru_cond,NULL); + pthread_mutex_init(ru->ru_mutex,NULL); + pthread_cond_init(ru->ru_cond,NULL); // read in configuration file) printf("configuring RU from file\n"); - RCconfig_RU(); + RC.ru = RCconfig_RU(); LOG_I(PHY,"number of L1 instances %d, number of RU %d, number of CPU cores %d\n",RC.nb_L1_inst,RC.nb_RU,get_nprocs()); if (RC.nb_CC != 0) @@ -2914,180 +2896,181 @@ void init_ru_vnf(void) { /* --------------------------------------------------------*/ /* from here function to use configuration module */ -void RCconfig_RU(void) { +RU_t **RCconfig_RU(int nb_RU,int nb_L1_inst,PHY_VARS_eNB ***eNB,uint64_t *ru_mask,pthread_mutex_t *ru_mutex,pthread_cond_t *ru_cond) { int i = 0; paramdef_t RUParams[] = RUPARAMS_DESC; paramlist_def_t RUParamList = {CONFIG_STRING_RU_LIST,NULL,0}; config_getlist( &RUParamList,RUParams,sizeof(RUParams)/sizeof(paramdef_t), NULL); - + RU_t **ru=NULL; if ( RUParamList.numelt > 0) { - RC.ru = (RU_t **)malloc(RC.nb_RU*sizeof(RU_t *)); + ru = (RU_t **)malloc(nb_RU*sizeof(RU_t *)); - for (int j = 0; j < RC.nb_RU; j++) { - RC.ru[j] = (RU_t *)malloc(sizeof(RU_t)); - memset((void *)RC.ru[j],0,sizeof(RU_t)); - RC.ru[j]->idx = j; - printf("Creating RC.ru[%d]:%p\n", j, RC.ru[j]); - RC.ru[j]->if_timing = synch_to_ext_device; + for (int j = 0; j < nb_RU; j++) { + ru[j] = (RU_t *)malloc(sizeof(RU_t)); + memset((void *)ru[j],0,sizeof(RU_t)); + ru[j]->idx = j; + printf("Creating ru[%d]:%p\n", j, ru[j]); + ru[j]->if_timing = synch_to_ext_device; - if (RC.nb_L1_inst >0) - RC.ru[j]->num_eNB = RUParamList.paramarray[j][RU_ENB_LIST_IDX].numelt; + ru[j]->ru_mask = ru_mask; + ru[j]->ru_mutex = ru_mutex; + ru[j]->ru_cond = ru_cond; + if (nb_L1_inst >0) + ru[j]->num_eNB = RUParamList.paramarray[j][RU_ENB_LIST_IDX].numelt; else - RC.ru[j]->num_eNB = 0; + ru[j]->num_eNB = 0; - for (i=0; inum_eNB; i++) RC.ru[j]->eNB_list[i] = RC.eNB[RUParamList.paramarray[j][RU_ENB_LIST_IDX].iptr[i]][0]; + for (i=0; inum_eNB; i++) ru[j]->eNB_list[i] = eNB[RUParamList.paramarray[j][RU_ENB_LIST_IDX].iptr[i]][0]; - RC.ru[j]->has_ctrl_prt = 1; + ru[j]->has_ctrl_prt = 1; if (config_isparamset(RUParamList.paramarray[j], RU_SDR_ADDRS)) { - RC.ru[j]->openair0_cfg.sdr_addrs = strdup(*(RUParamList.paramarray[j][RU_SDR_ADDRS].strptr)); + ru[j]->openair0_cfg.sdr_addrs = strdup(*(RUParamList.paramarray[j][RU_SDR_ADDRS].strptr)); } if (config_isparamset(RUParamList.paramarray[j], RU_SDR_CLK_SRC)) { if (strcmp(*(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr), "internal") == 0) { - RC.ru[j]->openair0_cfg.clock_source = internal; + ru[j]->openair0_cfg.clock_source = internal; LOG_D(PHY, "RU clock source set as internal\n"); } else if (strcmp(*(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr), "external") == 0) { - RC.ru[j]->openair0_cfg.clock_source = external; + ru[j]->openair0_cfg.clock_source = external; LOG_D(PHY, "RU clock source set as external\n"); } else if (strcmp(*(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr), "gpsdo") == 0) { - RC.ru[j]->openair0_cfg.clock_source = gpsdo; + ru[j]->openair0_cfg.clock_source = gpsdo; LOG_D(PHY, "RU clock source set as gpsdo\n"); } else { LOG_E(PHY, "Erroneous RU clock source in the provided configuration file: '%s'\n", *(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr)); } } else { - RC.ru[j]->openair0_cfg.clock_source = unset; + ru[j]->openair0_cfg.clock_source = unset; } if (config_isparamset(RUParamList.paramarray[j], RU_SDR_TME_SRC)) { if (strcmp(*(RUParamList.paramarray[j][RU_SDR_TME_SRC].strptr), "internal") == 0) { - RC.ru[j]->openair0_cfg.time_source = internal; + ru[j]->openair0_cfg.time_source = internal; LOG_D(PHY, "RU time source set as internal\n"); } else if (strcmp(*(RUParamList.paramarray[j][RU_SDR_TME_SRC].strptr), "external") == 0) { - RC.ru[j]->openair0_cfg.time_source = external; + ru[j]->openair0_cfg.time_source = external; LOG_D(PHY, "RU time source set as external\n"); } else if (strcmp(*(RUParamList.paramarray[j][RU_SDR_TME_SRC].strptr), "gpsdo") == 0) { - RC.ru[j]->openair0_cfg.time_source = gpsdo; + ru[j]->openair0_cfg.time_source = gpsdo; LOG_D(PHY, "RU time source set as gpsdo\n"); } else { LOG_E(PHY, "Erroneous RU time source in the provided configuration file: '%s'\n", *(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr)); } } else { - RC.ru[j]->openair0_cfg.time_source = unset; + ru[j]->openair0_cfg.time_source = unset; } if (strcmp(*(RUParamList.paramarray[j][RU_LOCAL_RF_IDX].strptr), "yes") == 0) { if ( !(config_isparamset(RUParamList.paramarray[j],RU_LOCAL_IF_NAME_IDX)) ) { - RC.ru[j]->if_south = LOCAL_RF; - RC.ru[j]->function = eNodeB_3GPP; - RC.ru[j]->state = RU_RUN; + ru[j]->if_south = LOCAL_RF; + ru[j]->function = eNodeB_3GPP; + ru[j]->state = RU_RUN; printf("Setting function for RU %d to eNodeB_3GPP\n",j); } else { - RC.ru[j]->eth_params.local_if_name = strdup(*(RUParamList.paramarray[j][RU_LOCAL_IF_NAME_IDX].strptr)); - RC.ru[j]->eth_params.my_addr = strdup(*(RUParamList.paramarray[j][RU_LOCAL_ADDRESS_IDX].strptr)); - RC.ru[j]->eth_params.remote_addr = strdup(*(RUParamList.paramarray[j][RU_REMOTE_ADDRESS_IDX].strptr)); - RC.ru[j]->eth_params.my_portd = *(RUParamList.paramarray[j][RU_LOCAL_PORTD_IDX].uptr); - RC.ru[j]->eth_params.remote_portd = *(RUParamList.paramarray[j][RU_REMOTE_PORTD_IDX].uptr); + ru[j]->eth_params.local_if_name = strdup(*(RUParamList.paramarray[j][RU_LOCAL_IF_NAME_IDX].strptr)); + ru[j]->eth_params.my_addr = strdup(*(RUParamList.paramarray[j][RU_LOCAL_ADDRESS_IDX].strptr)); + ru[j]->eth_params.remote_addr = strdup(*(RUParamList.paramarray[j][RU_REMOTE_ADDRESS_IDX].strptr)); + ru[j]->eth_params.my_portd = *(RUParamList.paramarray[j][RU_LOCAL_PORTD_IDX].uptr); + ru[j]->eth_params.remote_portd = *(RUParamList.paramarray[j][RU_REMOTE_PORTD_IDX].uptr); // Check if control port set if (!(config_isparamset(RUParamList.paramarray[j],RU_REMOTE_PORTC_IDX)) ) { printf("Removing control port for RU %d\n",j); - RC.ru[j]->has_ctrl_prt = 0; + ru[j]->has_ctrl_prt = 0; } else { - RC.ru[j]->eth_params.my_portc = *(RUParamList.paramarray[j][RU_LOCAL_PORTC_IDX].uptr); - RC.ru[j]->eth_params.remote_portc = *(RUParamList.paramarray[j][RU_REMOTE_PORTC_IDX].uptr); - printf(" Control port %u \n",RC.ru[j]->eth_params.my_portc); + ru[j]->eth_params.my_portc = *(RUParamList.paramarray[j][RU_LOCAL_PORTC_IDX].uptr); + ru[j]->eth_params.remote_portc = *(RUParamList.paramarray[j][RU_REMOTE_PORTC_IDX].uptr); + printf(" Control port %u \n",ru[j]->eth_params.my_portc); } if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "udp") == 0) { - RC.ru[j]->if_south = LOCAL_RF; - RC.ru[j]->function = NGFI_RRU_IF5; - RC.ru[j]->eth_params.transp_preference = ETH_UDP_MODE; + ru[j]->if_south = LOCAL_RF; + ru[j]->function = NGFI_RRU_IF5; + ru[j]->eth_params.transp_preference = ETH_UDP_MODE; printf("Setting function for RU %d to NGFI_RRU_IF5 (udp)\n",j); } else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "raw") == 0) { - RC.ru[j]->if_south = LOCAL_RF; - RC.ru[j]->function = NGFI_RRU_IF5; - RC.ru[j]->eth_params.transp_preference = ETH_RAW_MODE; + ru[j]->if_south = LOCAL_RF; + ru[j]->function = NGFI_RRU_IF5; + ru[j]->eth_params.transp_preference = ETH_RAW_MODE; printf("Setting function for RU %d to NGFI_RRU_IF5 (raw)\n",j); } else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "udp_if4p5") == 0) { - RC.ru[j]->if_south = LOCAL_RF; - RC.ru[j]->function = NGFI_RRU_IF4p5; - RC.ru[j]->eth_params.transp_preference = ETH_UDP_IF4p5_MODE; + ru[j]->if_south = LOCAL_RF; + ru[j]->function = NGFI_RRU_IF4p5; + ru[j]->eth_params.transp_preference = ETH_UDP_IF4p5_MODE; printf("Setting function for RU %d to NGFI_RRU_IF4p5 (udp)\n",j); } else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "raw_if4p5") == 0) { - RC.ru[j]->if_south = LOCAL_RF; - RC.ru[j]->function = NGFI_RRU_IF4p5; - RC.ru[j]->eth_params.transp_preference = ETH_RAW_IF4p5_MODE; + ru[j]->if_south = LOCAL_RF; + ru[j]->function = NGFI_RRU_IF4p5; + ru[j]->eth_params.transp_preference = ETH_RAW_IF4p5_MODE; printf("Setting function for RU %d to NGFI_RRU_IF4p5 (raw)\n",j); } printf("RU %d is_slave=%s\n",j,*(RUParamList.paramarray[j][RU_IS_SLAVE_IDX].strptr)); - if (strcmp(*(RUParamList.paramarray[j][RU_IS_SLAVE_IDX].strptr), "yes") == 0) RC.ru[j]->is_slave=1; - else RC.ru[j]->is_slave=0; + if (strcmp(*(RUParamList.paramarray[j][RU_IS_SLAVE_IDX].strptr), "yes") == 0) ru[j]->is_slave=1; + else ru[j]->is_slave=0; printf("RU %d ota_sync_enabled=%s\n",j,*(RUParamList.paramarray[j][RU_OTA_SYNC_ENABLE_IDX].strptr)); - if (strcmp(*(RUParamList.paramarray[j][RU_OTA_SYNC_ENABLE_IDX].strptr), "yes") == 0) RC.ru[j]->ota_sync_enable=1; - else RC.ru[j]->ota_sync_enable=0; + if (strcmp(*(RUParamList.paramarray[j][RU_OTA_SYNC_ENABLE_IDX].strptr), "yes") == 0) ru[j]->ota_sync_enable=1; + else ru[j]->ota_sync_enable=0; } - RC.ru[j]->max_pdschReferenceSignalPower = *(RUParamList.paramarray[j][RU_MAX_RS_EPRE_IDX].uptr);; - RC.ru[j]->max_rxgain = *(RUParamList.paramarray[j][RU_MAX_RXGAIN_IDX].uptr); - RC.ru[j]->num_bands = RUParamList.paramarray[j][RU_BAND_LIST_IDX].numelt; + ru[j]->max_pdschReferenceSignalPower = *(RUParamList.paramarray[j][RU_MAX_RS_EPRE_IDX].uptr);; + ru[j]->max_rxgain = *(RUParamList.paramarray[j][RU_MAX_RXGAIN_IDX].uptr); + ru[j]->num_bands = RUParamList.paramarray[j][RU_BAND_LIST_IDX].numelt; /* sf_extension is in unit of samples for 30.72MHz here, has to be scaled later */ - RC.ru[j]->sf_extension = *(RUParamList.paramarray[j][RU_SF_EXTENSION_IDX].uptr); + ru[j]->sf_extension = *(RUParamList.paramarray[j][RU_SF_EXTENSION_IDX].uptr); - for (i=0; inum_bands; i++) RC.ru[j]->band[i] = RUParamList.paramarray[j][RU_BAND_LIST_IDX].iptr[i]; + for (i=0; inum_bands; i++) ru[j]->band[i] = RUParamList.paramarray[j][RU_BAND_LIST_IDX].iptr[i]; } //strcmp(local_rf, "yes") == 0 else { printf("RU %d: Transport %s\n",j,*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr)); - RC.ru[j]->eth_params.local_if_name = strdup(*(RUParamList.paramarray[j][RU_LOCAL_IF_NAME_IDX].strptr)); - RC.ru[j]->eth_params.my_addr = strdup(*(RUParamList.paramarray[j][RU_LOCAL_ADDRESS_IDX].strptr)); - RC.ru[j]->eth_params.remote_addr = strdup(*(RUParamList.paramarray[j][RU_REMOTE_ADDRESS_IDX].strptr)); - RC.ru[j]->eth_params.my_portc = *(RUParamList.paramarray[j][RU_LOCAL_PORTC_IDX].uptr); - RC.ru[j]->eth_params.remote_portc = *(RUParamList.paramarray[j][RU_REMOTE_PORTC_IDX].uptr); - RC.ru[j]->eth_params.my_portd = *(RUParamList.paramarray[j][RU_LOCAL_PORTD_IDX].uptr); - RC.ru[j]->eth_params.remote_portd = *(RUParamList.paramarray[j][RU_REMOTE_PORTD_IDX].uptr); + ru[j]->eth_params.local_if_name = strdup(*(RUParamList.paramarray[j][RU_LOCAL_IF_NAME_IDX].strptr)); + ru[j]->eth_params.my_addr = strdup(*(RUParamList.paramarray[j][RU_LOCAL_ADDRESS_IDX].strptr)); + ru[j]->eth_params.remote_addr = strdup(*(RUParamList.paramarray[j][RU_REMOTE_ADDRESS_IDX].strptr)); + ru[j]->eth_params.my_portc = *(RUParamList.paramarray[j][RU_LOCAL_PORTC_IDX].uptr); + ru[j]->eth_params.remote_portc = *(RUParamList.paramarray[j][RU_REMOTE_PORTC_IDX].uptr); + ru[j]->eth_params.my_portd = *(RUParamList.paramarray[j][RU_LOCAL_PORTD_IDX].uptr); + ru[j]->eth_params.remote_portd = *(RUParamList.paramarray[j][RU_REMOTE_PORTD_IDX].uptr); if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "udp") == 0) { - RC.ru[j]->if_south = REMOTE_IF5; - RC.ru[j]->function = NGFI_RAU_IF5; - RC.ru[j]->eth_params.transp_preference = ETH_UDP_MODE; + ru[j]->if_south = REMOTE_IF5; + ru[j]->function = NGFI_RAU_IF5; + ru[j]->eth_params.transp_preference = ETH_UDP_MODE; } else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "raw") == 0) { - RC.ru[j]->if_south = REMOTE_IF5; - RC.ru[j]->function = NGFI_RAU_IF5; - RC.ru[j]->eth_params.transp_preference = ETH_RAW_MODE; + ru[j]->if_south = REMOTE_IF5; + ru[j]->function = NGFI_RAU_IF5; + ru[j]->eth_params.transp_preference = ETH_RAW_MODE; } else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "udp_if4p5") == 0) { - RC.ru[j]->if_south = REMOTE_IF4p5; - RC.ru[j]->function = NGFI_RAU_IF4p5; - RC.ru[j]->eth_params.transp_preference = ETH_UDP_IF4p5_MODE; + ru[j]->if_south = REMOTE_IF4p5; + ru[j]->function = NGFI_RAU_IF4p5; + ru[j]->eth_params.transp_preference = ETH_UDP_IF4p5_MODE; } else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "raw_if4p5") == 0) { - RC.ru[j]->if_south = REMOTE_IF4p5; - RC.ru[j]->function = NGFI_RAU_IF4p5; - RC.ru[j]->eth_params.transp_preference = ETH_RAW_IF4p5_MODE; + ru[j]->if_south = REMOTE_IF4p5; + ru[j]->function = NGFI_RAU_IF4p5; + ru[j]->eth_params.transp_preference = ETH_RAW_IF4p5_MODE; } else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "raw_if5_mobipass") == 0) { - RC.ru[j]->if_south = REMOTE_IF5; - RC.ru[j]->function = NGFI_RAU_IF5; - RC.ru[j]->if_timing = synch_to_other; - RC.ru[j]->eth_params.transp_preference = ETH_RAW_IF5_MOBIPASS; + ru[j]->if_south = REMOTE_IF5; + ru[j]->function = NGFI_RAU_IF5; + ru[j]->if_timing = synch_to_other; + ru[j]->eth_params.transp_preference = ETH_RAW_IF5_MOBIPASS; } - if (strcmp(*(RUParamList.paramarray[j][RU_IS_SLAVE_IDX].strptr), "yes") == 0) RC.ru[j]->is_slave=1; - else RC.ru[j]->is_slave=0; + if (strcmp(*(RUParamList.paramarray[j][RU_IS_SLAVE_IDX].strptr), "yes") == 0) ru[j]->is_slave=1; + else ru[j]->is_slave=0; } /* strcmp(local_rf, "yes") != 0 */ - RC.ru[j]->nb_tx = *(RUParamList.paramarray[j][RU_NB_TX_IDX].uptr); - RC.ru[j]->nb_rx = *(RUParamList.paramarray[j][RU_NB_RX_IDX].uptr); - RC.ru[j]->att_tx = *(RUParamList.paramarray[j][RU_ATT_TX_IDX].uptr); - RC.ru[j]->att_rx = *(RUParamList.paramarray[j][RU_ATT_RX_IDX].uptr); + ru[j]->nb_tx = *(RUParamList.paramarray[j][RU_NB_TX_IDX].uptr); + ru[j]->nb_rx = *(RUParamList.paramarray[j][RU_NB_RX_IDX].uptr); + ru[j]->att_tx = *(RUParamList.paramarray[j][RU_ATT_TX_IDX].uptr); + ru[j]->att_rx = *(RUParamList.paramarray[j][RU_ATT_RX_IDX].uptr); }// j=0..num_rus - } else { - RC.nb_RU = 0; - } // setting != NULL - - return; + } + + return ru; } diff --git a/targets/RT/USER/ru_control.c b/targets/RT/USER/ru_control.c index afe16768b9..2763722c6e 100644 --- a/targets/RT/USER/ru_control.c +++ b/targets/RT/USER/ru_control.c @@ -61,29 +61,16 @@ #include "PHY/LTE_TRANSPORT/if4_tools.h" #include "PHY/LTE_TRANSPORT/if5_tools.h" -#include "PHY/phy_extern.h" -#include "LAYER2/MAC/mac_extern.h" #include "PHY/LTE_TRANSPORT/transport_proto.h" #include "SCHED/sched_eNB.h" #include "PHY/LTE_ESTIMATION/lte_estimation.h" #include "PHY/INIT/phy_init.h" -#include "LAYER2/MAC/mac.h" -#include "LAYER2/MAC/mac_extern.h" -#include "LAYER2/MAC/mac_proto.h" -#include "RRC/LTE/rrc_extern.h" -#include "PHY_INTERFACE/phy_interface.h" - #include "common/utils/LOG/log.h" -#include "UTIL/OTG/otg_tx.h" -#include "UTIL/OTG/otg_externs.h" -#include "UTIL/MATH/oml.h" -#include "UTIL/OPT/opt.h" -#include "enb_config.h" int attach_rru(RU_t *ru); -void configure_ru(int idx, void *arg); +void configure_ru(RU_t *ru, void *arg); void configure_rru(RU_t *ru, void *arg); void fill_rf_config(RU_t *ru, char *rf_config_file); void* ru_thread_control( void* param ); @@ -164,7 +151,7 @@ int send_capab(RU_t *ru) cap->FH_fmt = MBP_IF5; break; default: - AssertFatal(1==0,"RU_function is unknown %d\n",RC.ru[0]->function); + AssertFatal(1==0,"RU_function is unknown %d\n",ru->function); break; } cap->num_bands = ru->num_bands; @@ -224,7 +211,7 @@ int attach_rru(RU_t *ru) LOG_E(PHY,"Received incorrect message %d from RRU %d\n",rru_config_msg.type,ru->idx); } } - configure_ru(ru->idx, + configure_ru(ru, (RRU_capabilities_t *)&rru_config_msg.msg[0]); rru_config_msg.type = RRU_config; @@ -296,7 +283,7 @@ int connect_rau(RU_t *ru) cap->FH_fmt = MBP_IF5; break; default: - AssertFatal(1==0,"RU_function is unknown %d\n",RC.ru[0]->function); + AssertFatal(1==0,"RU_function is unknown %d\n",ru->function); break; } cap->num_bands = ru->num_bands; @@ -388,21 +375,20 @@ int check_capabilities(RU_t *ru, return(-1); } -void configure_ru(int idx, +void configure_ru(RU_t *ru, void *arg) { - RU_t *ru = RC.ru[idx]; RRU_config_t *config = (RRU_config_t *)arg; RRU_capabilities_t *capabilities = (RRU_capabilities_t*)arg; int ret; - LOG_I(PHY, "Received capabilities from RRU %d\n",idx); + LOG_I(PHY, "Received capabilities from RRU %d\n",ru->idx); if (capabilities->FH_fmt < MAX_FH_FMTs) LOG_I(PHY, "RU FH options %s\n",rru_format_options[capabilities->FH_fmt]); AssertFatal((ret=check_capabilities(ru,capabilities)) == 0, - "Cannot configure RRU %d, check_capabilities returned %d\n", idx,ret); + "Cannot configure RRU %d, check_capabilities returned %d\n", ru->idx,ret); // take antenna capabilities of RRU ru->nb_tx = capabilities->nb_tx[0]; ru->nb_rx = capabilities->nb_rx[0]; @@ -485,7 +471,6 @@ void configure_rru(RU_t *ru, static int send_update_rru(RU_t * ru, LTE_DL_FRAME_PARMS * fp){ //ssize_t msg_len/*,len*/; int i; - //LTE_DL_FRAME_PARMS *fp = &RC.eNB[0][0]->frame_parms; RRU_CONFIG_msg_t rru_config_msg; memset((void *)&rru_config_msg,0,sizeof(rru_config_msg)); rru_config_msg.type = RRU_config_update; @@ -534,7 +519,7 @@ void* ru_thread_control( void* param ) send_tick(ru); if (ru->state == RU_RUN && ru->if_south != LOCAL_RF){ - LTE_DL_FRAME_PARMS *fp = &RC.eNB[0][0]->frame_parms; + LTE_DL_FRAME_PARMS *fp = &ru->eNB_list[0]->frame_parms; LOG_D(PHY,"Check MBSFN SF changes\n"); if(fp->num_MBSFN_config != ru_sf_update){ ru_sf_update = fp->num_MBSFN_config; @@ -578,7 +563,7 @@ void* ru_thread_control( void* param ) ((RRU_capabilities_t*)&rru_config_msg.msg[0])->nb_tx[0], ((RRU_capabilities_t*)&rru_config_msg.msg[0])->nb_rx[0]); - configure_ru(ru->idx,(RRU_capabilities_t *)&rru_config_msg.msg[0]); + configure_ru(ru,(RRU_capabilities_t *)&rru_config_msg.msg[0]); // send config if (send_config(ru,rru_config_msg) == 0) ru->state = RU_CONFIG; @@ -651,10 +636,10 @@ void* ru_thread_control( void* param ) LOG_I(PHY, "Signaling main thread that RU %d (is_slave %d) is ready in state %s\n",ru->idx,ru->is_slave,ru_states[ru->state]); - pthread_mutex_lock(&RC.ru_mutex); - RC.ru_mask &= ~(1<idx); - pthread_cond_signal(&RC.ru_cond); - pthread_mutex_unlock(&RC.ru_mutex); + pthread_mutex_lock(ru->ru_mutex); + *ru->ru_mask &= ~(1<idx); + pthread_cond_signal(ru->ru_cond); + pthread_mutex_unlock(ru->ru_mutex); wait_sync("ru_thread_control"); @@ -709,10 +694,10 @@ void* ru_thread_control( void* param ) if (ru->state == RU_READY){ LOG_I(PHY, "Signaling main thread that RU %d is ready\n",ru->idx); - pthread_mutex_lock(&RC.ru_mutex); - RC.ru_mask &= ~(1<idx); - pthread_cond_signal(&RC.ru_cond); - pthread_mutex_unlock(&RC.ru_mutex); + pthread_mutex_lock(ru->ru_mutex); + *ru->ru_mask &= ~(1<idx); + pthread_cond_signal(ru->ru_cond); + pthread_mutex_unlock(ru->ru_mutex); wait_sync("ru_thread_control"); From 895f54a9383d34105de48602940a68340236fa75 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Wed, 2 Dec 2020 20:15:38 +0100 Subject: [PATCH 014/579] added no_DTX function to eNB. This fills the TX subframes which have no PDSCH with a fake pdsch. It avoids switching between TX/RX in TDD systems during the DL periods. --- openair1/PHY/INIT/lte_init.c | 29 +++++++++++++++++++++++++ openair1/PHY/defs_eNB.h | 3 +++ openair1/SCHED/phy_procedures_lte_eNb.c | 6 ++++- targets/RT/USER/lte-enb.c | 2 ++ 4 files changed, 39 insertions(+), 1 deletion(-) diff --git a/openair1/PHY/INIT/lte_init.c b/openair1/PHY/INIT/lte_init.c index 2c7e3e88eb..943e6cdddb 100644 --- a/openair1/PHY/INIT/lte_init.c +++ b/openair1/PHY/INIT/lte_init.c @@ -347,6 +347,31 @@ void phy_config_sib13_eNB(module_id_t Mod_id,int CC_id,int mbsfn_Area_idx, lte_gold_mbsfn_khz_1dot25 (fp, RC.eNB[Mod_id][CC_id]->lte_gold_mbsfn_khz_1dot25_table, fp->Nid_cell_mbsfn); } +void fill_subframe_mask(PHY_VARS_eNB *eNB) { + + AssertFatal(eNB->subframe_mask!=NULL,"Subframe mask is null\n"); + int32_t **dummy_tx=eNB->common_vars.txdataF; + eNB->common_vars.txdataF = eNB->subframe_mask; + + for (int sf=0;sf<10;sf++) { + if (subframe_select(&eNB->frame_parms,sf)==SF_DL) { + LTE_DL_eNB_HARQ_t *dlsch_harq=eNB->dlsch[0][0]->harq_processes[0]; + L1_rxtx_proc_t proc; + proc.frame_tx=0; + proc.subframe_tx=sf; + eNB->dlsch[0][0]->harq_ids[0][sf]=0; + eNB->dlsch[0][0]->rnti=0x1234; + dlsch_harq->nb_rb=12; + dlsch_harq->rb_alloc[0]=0xfff; + dlsch_harq->Qm=2; + dlsch_harq->Nl=1; + dlsch_harq->pdsch_start=1; + dlsch_harq->mimo_mode=(eNB->frame_parms.nb_antenna_ports_eNB>1) ? ALAMOUTI : SISO; + pdsch_procedures(eNB,&proc,0,eNB->dlsch[0][0]); + } + } + eNB->common_vars.txdataF = dummy_tx; +} int phy_init_lte_eNB(PHY_VARS_eNB *eNB, unsigned char is_secondary_eNB, @@ -400,6 +425,9 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB, if (NFAPI_MODE!=NFAPI_MODE_VNF) { common_vars->rxdata = (int32_t **)NULL; common_vars->txdataF = (int32_t **)malloc16(NB_ANTENNA_PORTS_ENB*sizeof(int32_t *)); + if (eNB->use_DTX==0) { + eNB->subframe_mask = (int32_t **)malloc16(NB_ANTENNA_PORTS_ENB*sizeof(int32_t *)); + } common_vars->rxdataF = (int32_t **)malloc16(64*sizeof(int32_t *)); LOG_I(PHY,"[INIT] NB_ANTENNA_PORTS_ENB:%d fp->nb_antenna_ports_eNB:%d\n", NB_ANTENNA_PORTS_ENB, fp->nb_antenna_ports_eNB); @@ -409,6 +437,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB, LOG_I(PHY,"[INIT] common_vars->txdataF[%d] = %p (%lu bytes)\n", i,common_vars->txdataF[i], fp->ofdm_symbol_size*fp->symbols_per_tti*10*sizeof(int32_t)); + if (inb_antenna_ports_eNB) eNB->subframe_mask[i] = malloc16_clear(fp->ofdm_symbol_size*fp->symbols_per_tti*10*sizeof(int32_t) ); } } diff --git a/openair1/PHY/defs_eNB.h b/openair1/PHY/defs_eNB.h index f1021ead9b..1f18f114de 100644 --- a/openair1/PHY/defs_eNB.h +++ b/openair1/PHY/defs_eNB.h @@ -517,6 +517,9 @@ typedef struct PHY_VARS_eNB_s { uint8_t pbch_pdu[4]; //PBCH_PDU_SIZE char eNB_generate_rar; + /// indicator that eNB signal generation uses DTX (i.e. signal is cleared in each subframe + int use_DTX; + int32_t **subframe_mask; /// Indicator set to 0 after first SR uint8_t first_sr[NUMBER_OF_UE_MAX]; diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c index a37f95bcb3..a4e87d4981 100644 --- a/openair1/SCHED/phy_procedures_lte_eNb.c +++ b/openair1/SCHED/phy_procedures_lte_eNb.c @@ -521,7 +521,11 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB, // clear the transmit data array for the current subframe for (aa = 0; aa < fp->nb_antenna_ports_eNB; aa++) { - memset (&eNB->common_vars.txdataF[aa][subframe * fp->ofdm_symbol_size * (fp->symbols_per_tti)], 0, fp->ofdm_symbol_size * (fp->symbols_per_tti) * sizeof (int32_t)); + if (eNB->use_DTX==0) + memcpy(&eNB->common_vars.txdataF[aa][subframe * fp->ofdm_symbol_size * (fp->symbols_per_tti)], + &eNB->subframe_mask[aa][subframe*fp->ofdm_symbol_size*fp->symbols_per_tti], + fp->ofdm_symbol_size * (fp->symbols_per_tti) * sizeof (int32_t)); + else memset(&eNB->common_vars.txdataF[aa][subframe * fp->ofdm_symbol_size * (fp->symbols_per_tti)], 0, fp->ofdm_symbol_size * (fp->symbols_per_tti) * sizeof (int32_t)); } if (NFAPI_MODE==NFAPI_MONOLITHIC || NFAPI_MODE==NFAPI_MODE_PNF) { diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c index 1347d75fb0..dd69cc95e1 100644 --- a/targets/RT/USER/lte-enb.c +++ b/targets/RT/USER/lte-enb.c @@ -1134,6 +1134,8 @@ void init_transport(PHY_VARS_eNB *eNB) { eNB->FULL_MUMIMO_transmissions = 0; eNB->check_for_SUMIMO_transmissions = 0; fp->pucch_config_common.deltaPUCCH_Shift = 1; + if (eNB->use_DTX == 0) fill_subframe_mask(eNB); + } From 0571020666695a04ab268751b6d695618f97a13a Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Thu, 3 Dec 2020 10:44:12 +0100 Subject: [PATCH 015/579] minor modifications in T_defs.h and for constant power (i.e. no DTX in TX subframes for TDD) --- common/utils/T/T_defs.h | 4 ++-- openair1/PHY/INIT/lte_init.c | 9 ++++++--- openair1/SCHED/phy_procedures_lte_eNb.c | 2 ++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/common/utils/T/T_defs.h b/common/utils/T/T_defs.h index 7b5304b1cb..2f7e6e7570 100644 --- a/common/utils/T/T_defs.h +++ b/common/utils/T/T_defs.h @@ -44,7 +44,7 @@ /* let's have 100 RBs functional for the basic simulator */ # define T_BUFFER_MAX (1024*64*2) #else -# define T_BUFFER_MAX (1024*64) +# define T_BUFFER_MAX (1024*64*2) #endif /* size of the local cache for messages (must be pow(2,something)) */ @@ -52,7 +52,7 @@ /* we don't need much space for the basic simulator */ # define T_CACHE_SIZE 1024 #else -# define T_CACHE_SIZE (8192 * 2) +# define T_CACHE_SIZE (8192 ) #endif /* maximum number of bytes a message can contain */ diff --git a/openair1/PHY/INIT/lte_init.c b/openair1/PHY/INIT/lte_init.c index 943e6cdddb..3603a5e672 100644 --- a/openair1/PHY/INIT/lte_init.c +++ b/openair1/PHY/INIT/lte_init.c @@ -361,13 +361,15 @@ void fill_subframe_mask(PHY_VARS_eNB *eNB) { proc.subframe_tx=sf; eNB->dlsch[0][0]->harq_ids[0][sf]=0; eNB->dlsch[0][0]->rnti=0x1234; - dlsch_harq->nb_rb=12; - dlsch_harq->rb_alloc[0]=0xfff; + dlsch_harq->nb_rb=48; + dlsch_harq->rb_alloc[0]=0xffffffffffff; dlsch_harq->Qm=2; dlsch_harq->Nl=1; dlsch_harq->pdsch_start=1; dlsch_harq->mimo_mode=(eNB->frame_parms.nb_antenna_ports_eNB>1) ? ALAMOUTI : SISO; - pdsch_procedures(eNB,&proc,0,eNB->dlsch[0][0]); + dlsch_harq->dl_power_off = 1; + computeRhoB_eNB(4,eNB->frame_parms.pdsch_config_common.p_b,eNB->frame_parms.nb_antenna_ports_eNB,eNB->dlsch[0][0],dlsch_harq->dl_power_off); + pdsch_procedures(eNB,&proc,0,eNB->dlsch[0][0],NULL); } } eNB->common_vars.txdataF = dummy_tx; @@ -422,6 +424,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB, eNB->first_run_I0_measurements = 1; ///This flag used to be static. With multiple eNBs this does no longer work, hence we put it in the structure. However it has to be initialized with 1, which is performed here. + eNB->use_DTX=0; if (NFAPI_MODE!=NFAPI_MODE_VNF) { common_vars->rxdata = (int32_t **)NULL; common_vars->txdataF = (int32_t **)malloc16(NB_ANTENNA_PORTS_ENB*sizeof(int32_t *)); diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c index a4e87d4981..a264ee31a2 100644 --- a/openair1/SCHED/phy_procedures_lte_eNb.c +++ b/openair1/SCHED/phy_procedures_lte_eNb.c @@ -480,6 +480,8 @@ void pdsch_procedures(PHY_VARS_eNB *eNB, subframe<<1); stop_meas(&eNB->dlsch_scrambling_stats); start_meas(&eNB->dlsch_modulation_stats); + if (frame==0) LOG_I(PHY,"Generating pdsch for %d.%d starting in symbol %d, Qm %d, nb_rb %d, rbmask %x\n", + frame,subframe,dlsch_harq->pdsch_start,dlsch_harq->Qm,dlsch_harq->nb_rb,dlsch_harq->rb_alloc[0]); dlsch_modulation(eNB, eNB->common_vars.txdataF, AMP, From 7185b95591eaf63ac302ef690b686da0fdbd79e0 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Thu, 24 Dec 2020 16:10:03 +0100 Subject: [PATCH 016/579] debugging with AW2S RRU. Added statistics for ULSCH/UCI in PHY and MAC. --- cmake_targets/CMakeLists.txt | 6 + common/utils/lte/ue_power.c | 108 +++++++++ common/utils/lte/ue_power.h | 34 +++ .../PHY/LTE_ESTIMATION/lte_adjust_sync_eNB.c | 8 +- openair1/PHY/LTE_TRANSPORT/dci_tools.c | 4 +- openair1/PHY/LTE_TRANSPORT/dlsch_coding.c | 1 + openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c | 6 +- openair1/PHY/LTE_TRANSPORT/dlsch_scrambling.c | 3 - openair1/PHY/LTE_TRANSPORT/if5_tools.c | 2 +- openair1/PHY/LTE_TRANSPORT/prach.c | 31 ++- openair1/PHY/LTE_TRANSPORT/prach_common.c | 14 +- openair1/PHY/LTE_TRANSPORT/prach_extern.h | 11 - openair1/PHY/LTE_TRANSPORT/pucch.c | 207 ++++++++++++------ .../LTE_TRANSPORT/transport_common_proto.h | 8 +- openair1/PHY/LTE_TRANSPORT/transport_proto.h | 2 - openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c | 68 ++++++ .../PHY/LTE_TRANSPORT/ulsch_demodulation.c | 4 + openair1/PHY/defs_eNB.h | 49 ++++- openair1/SCHED/phy_procedures_lte_common.c | 67 ------ openair1/SCHED/phy_procedures_lte_eNb.c | 77 +++++-- openair1/SCHED/prach_procedures.c | 2 +- openair1/SCHED/ru_procedures.c | 27 +-- openair2/COMMON/platform_constants.h | 5 + openair2/LAYER2/MAC/eNB_scheduler.c | 6 +- openair2/LAYER2/MAC/eNB_scheduler_RA.c | 21 +- openair2/LAYER2/MAC/eNB_scheduler_dlsch.c | 5 +- openair2/LAYER2/MAC/eNB_scheduler_fairRR.c | 114 +++------- openair2/LAYER2/MAC/eNB_scheduler_ulsch.c | 78 ++++--- openair2/LAYER2/MAC/mac.h | 4 +- openair2/LAYER2/MAC/pre_processor.c | 6 +- openair2/LAYER2/MAC/rar_tools.c | 6 +- targets/RT/USER/lte-enb.c | 3 + 32 files changed, 635 insertions(+), 352 deletions(-) create mode 100644 common/utils/lte/ue_power.c create mode 100644 common/utils/lte/ue_power.h diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 94d55d5fe5..2dcc318179 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -2863,6 +2863,8 @@ add_executable(lte-softmodem ${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c ${OPENAIR_DIR}/common/utils/utils.c ${OPENAIR_DIR}/common/utils/system.c + ${OPENAIR_DIR}/common/utils/lte/ue_power.c + ${OPENAIR_DIR}/common/utils/lte/prach_utils.c ${GTPU_need_ITTI} ${XFORMSINTERFACE_SOURCE} ${T_SOURCE} @@ -2904,6 +2906,8 @@ add_executable(ocp-enb ${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c ${OPENAIR_DIR}/common/utils/utils.c ${OPENAIR_DIR}/common/utils/system.c + ${OPENAIR_DIR}/common/utils/lte/ue_power.c + ${OPENAIR_DIR}/common/utils/lte/prach_utils.c ${GTPU_need_ITTI} ${XFORMSINTERFACE_SOURCE} ${T_SOURCE} @@ -2970,6 +2974,8 @@ add_executable(lte-uesoftmodem ${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c ${OPENAIR_DIR}/common/utils/utils.c ${OPENAIR_DIR}/common/utils/system.c + ${OPENAIR_DIR}/common/utils/lte/ue_power.c + ${OPENAIR_DIR}/common/utils/lte/prach_utils.c ${XFORMSINTERFACE_SOURCE} ${T_SOURCE} ${CONFIG_SOURCES} diff --git a/common/utils/lte/ue_power.c b/common/utils/lte/ue_power.c new file mode 100644 index 0000000000..b377abf2ff --- /dev/null +++ b/common/utils/lte/ue_power.c @@ -0,0 +1,108 @@ +/* + * 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 ue_power.c +* \brief Routines to compute UE TX power according to 36.213 +* \author R. Knopp, F. Kaltenberger +* \date 2020 +* \version 0.1 +* \company Eurecom +* \email: knopp@eurecom.fr,florian.kaltenberger@eurecom.fr +* \note +* \warning +*/ + +#include +#include +#include "PHY/defs_eNB.h" +#include "PHY/TOOLS/dB_routines.h" + +extern int16_t hundred_times_delta_TF[100]; +extern uint16_t hundred_times_log10_NPRB[100]; + +int16_t estimate_ue_tx_power(int norm,uint32_t tbs, uint32_t nb_rb, uint8_t control_only, int ncp, uint8_t use_srs) +{ + + /// The payload + CRC size in bits, "B" + uint32_t B; + /// Number of code segments + uint32_t C; + /// Number of "small" code segments + uint32_t Cminus; + /// Number of "large" code segments + uint32_t Cplus; + /// Number of bits in "small" code segments (<6144) + uint32_t Kminus; + /// Number of bits in "large" code segments (<6144) + uint32_t Kplus; + /// Total number of bits across all segments + uint32_t sumKr; + /// Number of "Filler" bits + uint32_t F; + // num resource elements + uint32_t num_re=0.0; + // num symbols + uint32_t num_symb=0.0; + /// effective spectral efficiency of the PUSCH + uint32_t MPR_x100=0; + /// beta_offset + uint16_t beta_offset_pusch_x8=8; + /// delta mcs + float delta_mcs=0.0; + /// bandwidth factor + float bw_factor=0.0; + + B= tbs+24; + lte_segmentation(NULL, + NULL, + B, + &C, + &Cplus, + &Cminus, + &Kplus, + &Kminus, + &F); + + + sumKr = Cminus*Kminus + Cplus*Kplus; + num_symb = 12-(ncp<<1)-(use_srs==0?0:1); + num_re = num_symb * nb_rb * 12; + + if (num_re == 0) + return(0); + + MPR_x100 = 100*sumKr/num_re; + + if (control_only == 1 ) + beta_offset_pusch_x8=8; // fixme + + //(beta_offset_pusch_x8=ue->ulsch[eNB_id]->harq_processes[harq_pid]->control_only == 1) ? ue->ulsch[eNB_id]->beta_offset_cqi_times8:8; + + // if deltamcs_enabledm + delta_mcs = ((hundred_times_delta_TF[MPR_x100/6]+10*dB_fixed_times10((beta_offset_pusch_x8)>>3))/100.0); + + bw_factor = (norm!=0) ? 0 : (hundred_times_log10_NPRB[nb_rb-1]/100.0); + LOG_D(PHY,"estimated ue tx power %d (num_re %d, sumKr %d, mpr_x100 %d, delta_mcs %f, bw_factor %f)\n", + (int16_t)ceil(delta_mcs + bw_factor), num_re, sumKr, MPR_x100, delta_mcs, bw_factor); + return (int16_t)ceil(delta_mcs + bw_factor); + +} + diff --git a/common/utils/lte/ue_power.h b/common/utils/lte/ue_power.h new file mode 100644 index 0000000000..caeebec2c8 --- /dev/null +++ b/common/utils/lte/ue_power.h @@ -0,0 +1,34 @@ +/* + * 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 ue_power.h +* \brief support routines used in MAC and PHY +* \author R. Knopp, F. Kaltenberger +* \date 2020 +* \version 0.1 +* \company Eurecom +* \email: knopp@eurecom.fr,florian.kaltenberger@eurecom.fr +* \note +* \warning +*/ + +int16_t estimate_ue_tx_power(int norm,uint32_t tbs, uint32_t nb_rb, uint8_t control_only, lte_prefix_type_t ncp, uint8_t use_srs); + diff --git a/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync_eNB.c b/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync_eNB.c index f85162e095..367b700085 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync_eNB.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync_eNB.c @@ -118,8 +118,8 @@ int lte_est_timing_advance_pusch(LTE_DL_FRAME_PARMS *frame_parms, int temp, i, aa, max_pos=0, max_val=0; short Re,Im; - uint8_t cyclic_shift = 0; - int sync_pos = (frame_parms->ofdm_symbol_size-cyclic_shift*frame_parms->ofdm_symbol_size/12)%(frame_parms->ofdm_symbol_size); + // uint8_t cyclic_shift = 0; + int sync_pos = 0;//(frame_parms->ofdm_symbol_size-cyclic_shift*frame_parms->ofdm_symbol_size/12)%(frame_parms->ofdm_symbol_size); AssertFatal(frame_parms->ofdm_symbol_size > 127,"frame_parms->ofdm_symbol_size %d<128\n",frame_parms->ofdm_symbol_size); AssertFatal(frame_parms->nb_antennas_rx >0 && frame_parms->nb_antennas_rx<3,"frame_parms->nb_antennas_rx %d not in [0,1]\n", @@ -142,9 +142,5 @@ int lte_est_timing_advance_pusch(LTE_DL_FRAME_PARMS *frame_parms, if (max_pos>frame_parms->ofdm_symbol_size/2) max_pos = max_pos-frame_parms->ofdm_symbol_size; - //#ifdef DEBUG_PHY - LOG_D(PHY,"max_pos = %d, sync_pos=%d\n",max_pos,sync_pos); - //#endif //DEBUG_PHY - return max_pos - sync_pos; } diff --git a/openair1/PHY/LTE_TRANSPORT/dci_tools.c b/openair1/PHY/LTE_TRANSPORT/dci_tools.c index 8de011acef..dea0c27911 100644 --- a/openair1/PHY/LTE_TRANSPORT/dci_tools.c +++ b/openair1/PHY/LTE_TRANSPORT/dci_tools.c @@ -476,7 +476,7 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB, ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->harq_pid = rel8->harq_process; ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->dai = rel8->downlink_assignment_index; ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->padding = 0; - // printf("TDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB); + LOG_D(PHY,"TDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",rel8->mcs_1,rel8->resource_block_coding,rel8->redundancy_version_1,NPRB); } else { dci_alloc->dci_length = sizeof_DCI1A_20MHz_FDD_t; ((DCI1A_20MHz_FDD_t *)dci_pdu)->type = 1; @@ -535,7 +535,7 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB, dlsch0->harq_mask |= (1 << rel8->harq_process); - if (rel8->rnti_type == 1) LOG_D(PHY,"DCI 1A: round %d, mcs %d, TBS %d, rballoc %x, rv %d, rnti %x, harq process %d\n",dlsch0_harq->round,rel8->mcs_1,dlsch0_harq->TBS,rel8->resource_block_coding, + if (rel8->rnti != SI_RNTI) LOG_I(PHY,"DCI 1A: round %d, mcs %d, TBS %d, rballoc %x, rv %d, rnti %x, harq process %d\n",dlsch0_harq->round,rel8->mcs_1,dlsch0_harq->TBS,rel8->resource_block_coding, rel8->redundancy_version_1,rel8->rnti,rel8->harq_process); break; diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c b/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c index 3eb44d98fa..bba402d34a 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c @@ -360,6 +360,7 @@ int dlsch_encoding(PHY_VARS_eNB *eNB, proc->nbEncode=0; + // if (hadlsch->Ndi == 1) { // this is a new packet if (hadlsch->round == 0) { // this is a new packet // Add 24-bit crc (polynomial A) to payload diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c b/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c index 347fbb026b..c6a4e4f990 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c @@ -2375,16 +2375,14 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB, for (l=num_pdcch_symbols; lmimo_mode, pmi2hex_2Ar2(dlsch0_harq->pmi_alloc), mod_order0, mod_order1, rb_alloc[0] ); -#endif } if (frame_parms->Ncp==0) { // normal prefix diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_scrambling.c b/openair1/PHY/LTE_TRANSPORT/dlsch_scrambling.c index d48164e07d..294dab45c0 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_scrambling.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_scrambling.c @@ -113,9 +113,6 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms, x2 = ((Ns>>1)<<9) + frame_parms->Nid_cell_mbsfn; //this is c_init in 36.211 Sec 6.3.1 for PMCH } -#ifdef DEBUG_SCRAMBLING - printf("scrambling: i0 %d rnti %x, q %d, Ns %d, Nid_cell %d, G %d x2 %x\n",dlsch->i0,dlsch->rnti,q,Ns,frame_parms->Nid_cell, G, x2); -#endif s = lte_gold_generic(&x1, &x2, 1); for (n=0; n<(1+(G>>5)); n++) { diff --git a/openair1/PHY/LTE_TRANSPORT/if5_tools.c b/openair1/PHY/LTE_TRANSPORT/if5_tools.c index f39f3ef872..e78e3934a2 100644 --- a/openair1/PHY/LTE_TRANSPORT/if5_tools.c +++ b/openair1/PHY/LTE_TRANSPORT/if5_tools.c @@ -1469,7 +1469,7 @@ void recv_IF5(RU_t *ru, openair0_timestamp *proc_timestamp, int subframe, uint16 // HYPOTHESIS: first packet per subframe has lowest timestamp of subframe // should detect out of order and act accordingly .... AssertFatal(aid==0 || aid==1,"aid %d != 0 or 1\n",aid); - //LOG_I(PHY,"rxp[%d] %p, dest %p, offset %d (%lld,%lld)\n",aid,rxp[aid],rxp[aid]+(timestamp[packet_id]-timestamp[0]),(timestamp[packet_id]-timestamp[0]),timestamp[packet_id],timestamp[0]); + LOG_D(PHY,"rxp[%d] %p, dest %p, offset %d (%lld,%lld)\n",aid,rxp[aid],rxp[aid]+(timestamp[packet_id]-timestamp[0]),(int)(timestamp[packet_id]-timestamp[0]),timestamp[packet_id],timestamp[0]); memcpy((void*)(rxp[aid]+(timestamp[packet_id]-timestamp[0])), (void*)temp_rx, spp_eth<<2); diff --git a/openair1/PHY/LTE_TRANSPORT/prach.c b/openair1/PHY/LTE_TRANSPORT/prach.c index 31e97741fd..c67c37ef64 100644 --- a/openair1/PHY/LTE_TRANSPORT/prach.c +++ b/openair1/PHY/LTE_TRANSPORT/prach.c @@ -40,6 +40,7 @@ #include "prach_extern.h" #include #include +#include "common/utils/lte/prach_utils.h" void rx_prach0(PHY_VARS_eNB *eNB, RU_t *ru, @@ -112,7 +113,7 @@ void rx_prach0(PHY_VARS_eNB *eNB, prach_ConfigIndex = fp->prach_emtc_config_common.prach_ConfigInfo.prach_ConfigIndex[ce_level]; Ncs_config = fp->prach_emtc_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig; restricted_set = fp->prach_emtc_config_common.prach_ConfigInfo.highSpeedFlag; - n_ra_prb = get_prach_prb_offset(fp,prach_ConfigIndex, + n_ra_prb = get_prach_prb_offset(fp->frame_type,fp->tdd_config,fp->N_RB_UL,fp->prach_emtc_config_common.prach_ConfigInfo.prach_ConfigIndex[ce_level], fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[ce_level], tdd_mapindex,Nf); // update pointers to results for ce_level @@ -124,7 +125,7 @@ void rx_prach0(PHY_VARS_eNB *eNB, prach_ConfigIndex = fp->prach_config_common.prach_ConfigInfo.prach_ConfigIndex; Ncs_config = fp->prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig; restricted_set = fp->prach_config_common.prach_ConfigInfo.highSpeedFlag; - n_ra_prb = get_prach_prb_offset(fp,prach_ConfigIndex, + n_ra_prb = get_prach_prb_offset(fp->frame_type,fp->tdd_config,fp->N_RB_UL,fp->prach_config_common.prach_ConfigInfo.prach_ConfigIndex, fp->prach_config_common.prach_ConfigInfo.prach_FreqOffset, tdd_mapindex,Nf); } @@ -140,7 +141,7 @@ void rx_prach0(PHY_VARS_eNB *eNB, rxsigF = eNB->prach_vars_br.rxsigF[ce_level]; if (LOG_DEBUGFLAG(PRACH)) { - if (((frame_prach)&1023) < 20) LOG_I(PHY, + if (((frame_prach)&1023) < 20) LOG_D(PHY, "PRACH (eNB) : running rx_prach (br_flag %d, ce_level %d) for frame %d subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d, rootSequenceIndex %d, repetition number %d,numRepetitionsPrePreambleAttempt %d\n", br_flag,ce_level,frame_prach,subframe, fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[ce_level], @@ -153,24 +154,24 @@ void rx_prach0(PHY_VARS_eNB *eNB, prachF = eNB->prach_vars.prachF; rxsigF = eNB->prach_vars.rxsigF[0]; - if (LOG_DEBUGFLAG(PRACH)) { - if (((frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (eNB) : running rx_prach for subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d , rootSequenceIndex %d\n", subframe, + //if (LOG_DEBUGFLAG(PRACH)) { + if (((frame_prach)&1023) < 20) LOG_D(PHY,"PRACH (eNB) : running rx_prach for subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d , rootSequenceIndex %d\n", subframe, fp->prach_config_common.prach_ConfigInfo.prach_FreqOffset,prach_ConfigIndex,rootSequenceIndex); - } + //} } } else { if (br_flag == 1) { rxsigF = ru->prach_rxsigF_br[ce_level]; if (LOG_DEBUGFLAG(PRACH)) { - if (((frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (RU) : running rx_prach (br_flag %d, ce_level %d) for frame %d subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d\n", + if (((frame_prach)&1023) < 20) LOG_D(PHY,"PRACH (RU) : running rx_prach (br_flag %d, ce_level %d) for frame %d subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d\n", br_flag,ce_level,frame_prach,subframe,fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[ce_level],prach_ConfigIndex); } } else { rxsigF = ru->prach_rxsigF[0]; if (LOG_DEBUGFLAG(PRACH)) { - if (((frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (RU) : running rx_prach for subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d\n", + if (((frame_prach)&1023) < 20) LOG_D(PHY,"PRACH (RU) : running rx_prach for subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d\n", subframe,fp->prach_config_common.prach_ConfigInfo.prach_FreqOffset,prach_ConfigIndex); } } @@ -299,11 +300,13 @@ void rx_prach0(PHY_VARS_eNB *eNB, case 6: if (prach_fmt == 4) { dft(DFT_256,prach2,rxsigF[aa],1); + fft_size=256; } else { dft(DFT_1536,prach2,rxsigF[aa],1); if (prach_fmt>1) dft(DFT_1536,prach2+3072,rxsigF[aa]+3072,1); + fft_size=1536; } break; @@ -311,13 +314,14 @@ void rx_prach0(PHY_VARS_eNB *eNB, case 15: if (prach_fmt == 4) { dft(DFT_256,prach2,rxsigF[aa],1); + fft_size=256; } else { dft(DFT_3072,prach2,rxsigF[aa],1); if (prach_fmt>1) dft(DFT_3072,prach2+6144,rxsigF[aa]+6144,1); } - + fft_size=3072; break; case 25: @@ -339,11 +343,13 @@ void rx_prach0(PHY_VARS_eNB *eNB, case 50: if (prach_fmt == 4) { dft(DFT_2048,prach2,rxsigF[aa],1); + fft_size=2048; } else { dft(DFT_12288,prach2,rxsigF[aa],1); if (prach_fmt>1) dft(DFT_12288,prach2+24576,rxsigF[aa]+24576,1); + fft_size=12288; } break; @@ -351,11 +357,13 @@ void rx_prach0(PHY_VARS_eNB *eNB, case 75: if (prach_fmt == 4) { dft(DFT_3072,prach2,rxsigF[aa],1); + fft_size=3072; } else { dft(DFT_18432,prach2,rxsigF[aa],1); if (prach_fmt>1) dft(DFT_18432,prach2+36864,rxsigF[aa]+36864,1); + fft_size=18432; } break; @@ -364,20 +372,24 @@ void rx_prach0(PHY_VARS_eNB *eNB, if (fp->threequarter_fs==0) { if (prach_fmt == 4) { dft(DFT_4096,prach2,rxsigF[aa],1); + fft_size=2048; } else { dft(DFT_24576,prach2,rxsigF[aa],1); if (prach_fmt>1) dft(DFT_24576,prach2+49152,rxsigF[aa]+49152,1); + fft_size=24576; } } else { if (prach_fmt == 4) { dft(DFT_3072,prach2,rxsigF[aa],1); + fft_size=3072; } else { dft(DFT_18432,prach2,rxsigF[aa],1); if (prach_fmt>1) dft(DFT_18432,prach2+36864,rxsigF[aa]+36864,1); + fft_size=18432; } } @@ -547,7 +559,6 @@ void rx_prach0(PHY_VARS_eNB *eNB, } log2_ifft_size = 10; - fft_size = 6144; if (new_dft == 1) { new_dft = 0; diff --git a/openair1/PHY/LTE_TRANSPORT/prach_common.c b/openair1/PHY/LTE_TRANSPORT/prach_common.c index 393d4ca3f8..db5d524140 100644 --- a/openair1/PHY/LTE_TRANSPORT/prach_common.c +++ b/openair1/PHY/LTE_TRANSPORT/prach_common.c @@ -34,7 +34,7 @@ #include "PHY/phy_extern.h" #include "PHY/phy_extern_ue.h" #include "common/utils/LOG/vcd_signal_dumper.h" - +#include "common/utils/lte/prach_utils.h" uint16_t NCS_unrestricted[16] = {0,13,15,18,22,26,32,38,46,59,76,93,119,167,279,419}; uint16_t NCS_restricted[15] = {15,18,22,26,32,38,46,55,68,82,100,128,158,202,237}; // high-speed case @@ -44,6 +44,9 @@ int16_t ru[2*839]; // quantized roots of unity uint32_t ZC_inv[839]; // multiplicative inverse for roots u uint16_t du[838]; +extern PRACH_TDD_PREAMBLE_MAP tdd_preamble_map[64][7]; + +/* // This is table 5.7.1-4 from 36.211 PRACH_TDD_PREAMBLE_MAP tdd_preamble_map[64][7] = { // TDD Configuration Index 0 @@ -254,7 +257,7 @@ PRACH_TDD_PREAMBLE_MAP tdd_preamble_map[64][7] = { } }; - +*/ uint16_t prach_root_sequence_map0_3[838] = { 129, 710, 140, 699, 120, 719, 210, 629, 168, 671, 84, 755, 105, 734, 93, 746, 70, 769, 60, 779, 2, 837, 1, 838, @@ -377,7 +380,7 @@ uint8_t get_fid_prach_tdd(module_id_t Mod_id,uint8_t tdd_map_index) { LTE_DL_FRAME_PARMS *fp = &PHY_vars_UE_g[Mod_id][0]->frame_parms; return(tdd_preamble_map[fp->prach_config_common.prach_ConfigInfo.prach_ConfigIndex][fp->tdd_config].map[tdd_map_index].f_ra); } - +/* uint8_t get_prach_fmt(uint8_t prach_ConfigIndex,lte_frame_type_t frame_type) { if (frame_type == FDD) // FDD return(prach_ConfigIndex>>4); @@ -556,14 +559,15 @@ int is_prach_subframe0(LTE_DL_FRAME_PARMS *frame_parms,uint8_t prach_ConfigIndex return(prach_mask); } +*/ int is_prach_subframe(LTE_DL_FRAME_PARMS *frame_parms, uint32_t frame, uint8_t subframe) { uint8_t prach_ConfigIndex = frame_parms->prach_config_common.prach_ConfigInfo.prach_ConfigIndex; - int prach_mask = is_prach_subframe0(frame_parms, prach_ConfigIndex, frame, subframe); + int prach_mask = is_prach_subframe0(frame_parms->tdd_config,frame_parms->frame_type, prach_ConfigIndex, frame, subframe); for (int i=0; i<4; i++) { if (frame_parms->prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[i] == 1) - prach_mask |= (is_prach_subframe0(frame_parms, frame_parms->prach_emtc_config_common.prach_ConfigInfo.prach_ConfigIndex[i], + prach_mask |= (is_prach_subframe0(frame_parms->tdd_config,frame_parms->frame_type, frame_parms->prach_emtc_config_common.prach_ConfigInfo.prach_ConfigIndex[i], frame, subframe) << (i+1)); } diff --git a/openair1/PHY/LTE_TRANSPORT/prach_extern.h b/openair1/PHY/LTE_TRANSPORT/prach_extern.h index 47fbd93ad7..c9ff902260 100644 --- a/openair1/PHY/LTE_TRANSPORT/prach_extern.h +++ b/openair1/PHY/LTE_TRANSPORT/prach_extern.h @@ -74,17 +74,6 @@ uint8_t get_num_prach_tdd(module_id_t Mod_id); uint8_t get_fid_prach_tdd(module_id_t Mod_id,uint8_t tdd_map_index); -uint8_t get_prach_fmt(uint8_t prach_ConfigIndex,lte_frame_type_t frame_type); - - -uint8_t get_prach_prb_offset(LTE_DL_FRAME_PARMS *frame_parms, - uint8_t prach_ConfigIndex, - uint8_t n_ra_prboffset, - uint8_t tdd_mapindex, uint16_t Nf); - - -int is_prach_subframe0(LTE_DL_FRAME_PARMS *frame_parms,uint8_t prach_ConfigIndex,uint32_t frame, uint8_t subframe); - int is_prach_subframe(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame, uint8_t subframe); diff --git a/openair1/PHY/LTE_TRANSPORT/pucch.c b/openair1/PHY/LTE_TRANSPORT/pucch.c index 8637e80137..627d51314c 100644 --- a/openair1/PHY/LTE_TRANSPORT/pucch.c +++ b/openair1/PHY/LTE_TRANSPORT/pucch.c @@ -65,6 +65,29 @@ int16_t cfo_pucch_ep[24*6] = {24278,-22005,29621,-14010,32412,-4808,32412,4807,2 +void dump_uci_stats(PHY_VARS_eNB *eNB,int frame) { + + for (int i=0;iuci_stats[i].rnti>0) { + eNB_UCI_STATS_t *uci_stats = &eNB->uci_stats[i]; + LOG_I(PHY,"UCI RNTI %x: pucch1_trials %d, pucch1_thres %d dB, current pucch1_stat %d dB,positive SR count %d\n", + uci_stats->rnti,uci_stats->pucch1_trials,uci_stats->pucch1_thres,dB_fixed(uci_stats->current_pucch1_stat),uci_stats->pucch1_positive_SR); + LOG_I(PHY,"UCI RNTI %x: pucch1_low (%d,%d)dB pucch1_high (%d,%d)dB\n", + uci_stats->rnti, + dB_fixed(uci_stats->pucch1_low_stat[0]), + dB_fixed(uci_stats->pucch1_low_stat[1]), + dB_fixed(uci_stats->pucch1_high_stat[0]), + dB_fixed(uci_stats->pucch1_high_stat[1])); + + LOG_I(PHY,"UCI RNTI %x: pucch1a_trials %d, pucch1a_stat (%d,%d) pucch1ab_DTX %d\n", + uci_stats->rnti, + uci_stats->pucch1a_trials, + uci_stats->current_pucch1a_stat_re, + uci_stats->current_pucch1a_stat_im, + uci_stats->pucch1ab_DTX); + } + +} /* PUCCH format3 >> */ /* SubCarrier Demap */ uint16_t pucchfmt3_subCarrierDeMapping( PHY_VARS_eNB *eNB, @@ -725,7 +748,7 @@ int16_t pucchfmt3_Decode( int16_t b[48], uint32_t rx_pucch(PHY_VARS_eNB *eNB, PUCCH_FMT_t fmt, - uint8_t UE_id, + uint8_t UCI_id, uint16_t n1_pucch, uint16_t n2_pucch, uint8_t shortened_format, @@ -747,7 +770,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, int16_t rxcomp[NB_ANTENNAS_RX][2*12*14]; uint8_t ns,N_UL_symb,nsymb,n_oc,n_oc0,n_oc1; uint8_t c = (frame_parms->Ncp==0) ? 3 : 2; - uint16_t nprime,nprime0,nprime1; + int16_t nprime,nprime0,nprime1; uint16_t i,j,re_offset,thres,h,off; uint8_t Nprime_div_deltaPUCCH_Shift,Nprime,d; uint8_t m,l,refs,phase,re,l2,phase_max=0; @@ -755,12 +778,12 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, int16_t tmp_re,tmp_im,W_re=0,W_im=0; int16_t *rxptr; uint32_t symbol_offset; - int16_t stat_ref_re,stat_ref_im,*cfo; + int16_t stat0_ref_re[NB_ANTENNAS_RX],stat0_ref_im[NB_ANTENNAS_RX],stat1_ref_re[NB_ANTENNAS_RX],stat1_ref_im[NB_ANTENNAS_RX],*cfo; int16_t chest0_re[NB_ANTENNAS_RX][12],chest0_im[NB_ANTENNAS_RX][12]; int16_t chest1_re[NB_ANTENNAS_RX][12],chest1_im[NB_ANTENNAS_RX][12]; int32_t chest_mag; - int32_t stat_re=0,stat_im=0; - uint32_t stat,stat_max=0; + int32_t stat0_re[NB_ANTENNAS_RX],stat1_re[NB_ANTENNAS_RX],stat0_im[NB_ANTENNAS_RX],stat1_im[NB_ANTENNAS_RX]; + uint32_t stat0[NB_ANTENNAS_RX],stat1[NB_ANTENNAS_RX],stat_max=0,stat0_max[NB_ANTENNAS_RX],stat1_max[NB_ANTENNAS_RX]; uint8_t log2_maxh; uint8_t deltaPUCCH_Shift = frame_parms->pucch_config_common.deltaPUCCH_Shift; uint8_t NRB2 = frame_parms->pucch_config_common.nRB_CQI; @@ -808,9 +831,20 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, first_call=0; } - + eNB_UCI_STATS_t *uci_stats = NULL; if(fmt!=pucch_format3) { /* PUCCH format3 */ + + eNB_UCI_STATS_t *first_uci_stats=NULL; + for (int i=0;iuci_stats[i].rnti == eNB->ulsch[UCI_id]->rnti) { + uci_stats = &eNB->uci_stats[i]; + break; + } else if (eNB->uci_stats[i].rnti == 0) first_uci_stats = &eNB->uci_stats[i]; + if (uci_stats == NULL) { uci_stats=first_uci_stats; uci_stats->rnti = eNB->ulsch[UCI_id]->rnti;} + + AssertFatal(uci_stats!=NULL,"No stat index found\n"); + uci_stats->frame = frame; // TODO // "SR+ACK/NACK" length is only 7 bits. // This restriction will be lifted in the future. @@ -1016,57 +1050,63 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, // Do cfo correction and MRC across symbols if (fmt == pucch_format1) { + uci_stats->pucch1_trials++; #ifdef DEBUG_PUCCH_RX printf("Doing PUCCH detection for format 1\n"); #endif stat_max = 0; for (phase=0; phase<7; phase++) { - stat=0; - + int stat=0; for (aa=0; aanb_antennas_rx; aa++) { + stat0[aa]=0;stat1[aa]=0; for (re=0; re<12; re++) { - stat_re=0; - stat_im=0; + stat0_re[aa]=0; + stat0_im[aa]=0; + stat1_re[aa]=0; + stat1_im[aa]=0; off=re<<1; cfo = (frame_parms->Ncp==0) ? &cfo_pucch_np[14*phase] : &cfo_pucch_ep[12*phase]; for (l=0; l<(nsymb>>1); l++) { - stat_re += (((rxcomp[aa][off]*(int32_t)cfo[l<<1])>>15) - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l<<1)])>>15))/nsymb; - stat_im += (((rxcomp[aa][off]*(int32_t)cfo[1+(l<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l<<1)])>>15))/nsymb; + stat0_re[aa] += (((rxcomp[aa][off]*(int32_t)cfo[l<<1])>>15) - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l<<1)])>>15))/nsymb; + stat0_im[aa] += (((rxcomp[aa][off]*(int32_t)cfo[1+(l<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l<<1)])>>15))/nsymb; off+=2; #ifdef DEBUG_PUCCH_RX printf("[eNB] PUCCH subframe %d (%d,%d,%d) => (%d,%d) x (%d,%d) : (%d,%d) , stat %d\n",subframe,phase,l,re, rxcomp[aa][off],rxcomp[aa][1+off], cfo[l<<1],cfo[1+(l<<1)], - stat_re,stat_im,stat); + stat0_re[aa],stat0_im[aa],stat); #endif } for (l2=0,l=(nsymb>>1); l < nsymb; l++,l2++) { - stat_re += (((rxcomp[aa][off]*(int32_t)cfo[l2<<1])>>15) - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l2<<1)])>>15))/nsymb; - stat_im += (((rxcomp[aa][off]*(int32_t)cfo[1+(l2<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l2<<1)])>>15))/nsymb; + stat1_re[aa] += (((rxcomp[aa][off]*(int32_t)cfo[l2<<1])>>15) - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l2<<1)])>>15))/nsymb; + stat1_im[aa] += (((rxcomp[aa][off]*(int32_t)cfo[1+(l2<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l2<<1)])>>15))/nsymb; off+=2; #ifdef DEBUG_PUCCH_RX printf("[eNB] PUCCH subframe %d (%d,%d,%d) => (%d,%d) x (%d,%d) : (%d,%d), stat %d\n",subframe,phase,l2,re, rxcomp[aa][off],rxcomp[aa][1+off], cfo[l2<<1],cfo[1+(l2<<1)], - stat_re,stat_im,stat); + stat1_re[aa],stat1_im[aa],stat); #endif } - - stat += ((stat_re*stat_re) + (stat_im*stat_im)); + + stat0[aa] += ((stat0_re[aa]*stat0_re[aa]) + (stat0_im[aa]*stat0_im[aa])); + stat1[aa] += ((stat1_re[aa]*stat1_re[aa]) + (stat1_im[aa]*stat1_im[aa])); } //re + stat+=(stat0[aa]+stat1[aa]); } // aa - if (stat>stat_max) { stat_max = stat; phase_max = phase; + for (aa=0;aanb_antennas_rx;aa++) { + stat0_max[aa] = stat0[aa]; + stat1_max[aa] = stat1[aa]; + } } } //phase - // stat_max *= nsymb; // normalize to energy per symbol - // stat_max /= (frame_parms->N_RB_UL*12); // stat_max /= 12; #ifdef DEBUG_PUCCH_RX printf("[eNB] PUCCH: stat %d, stat_max %d, phase_max %d\n", stat,stat_max,phase_max); @@ -1074,12 +1114,14 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, #ifdef DEBUG_PUCCH_RX LOG_I(PHY,"[eNB] PUCCH fmt1: stat_max : %d, sigma2_dB %d (%d, %d), phase_max : %d\n",dB_fixed(stat_max),sigma2_dB,eNB->measurements.n0_subband_power_tot_dBm[6],pucch1_thres,phase_max); #endif - eNB->pucch1_stats[UE_id][(subframe<<10)+eNB->pucch1_stats_cnt[UE_id][subframe]] = stat_max; - eNB->pucch1_stats_thres[UE_id][(subframe<<10)+eNB->pucch1_stats_cnt[UE_id][subframe]] = sigma2_dB+pucch1_thres; - eNB->pucch1_stats_cnt[UE_id][subframe] = (eNB->pucch1_stats_cnt[UE_id][subframe]+1)&1023; - T(T_ENB_PHY_PUCCH_1_ENERGY, T_INT(eNB->Mod_id), T_INT(eNB->uci_vars[UE_id].rnti), T_INT(frame), T_INT(subframe), + eNB->pucch1_stats[UCI_id][(subframe<<10)+eNB->pucch1_stats_cnt[UCI_id][subframe]] = stat_max; + eNB->pucch1_stats_thres[UCI_id][(subframe<<10)+eNB->pucch1_stats_cnt[UCI_id][subframe]] = sigma2_dB+pucch1_thres; + eNB->pucch1_stats_cnt[UCI_id][subframe] = (eNB->pucch1_stats_cnt[UCI_id][subframe]+1)&1023; + uci_stats->pucch1_thres = sigma2_dB+pucch1_thres; + T(T_ENB_PHY_PUCCH_1_ENERGY, T_INT(eNB->Mod_id), T_INT(eNB->uci_vars[UCI_id].rnti), T_INT(frame), T_INT(subframe), T_INT(stat_max), T_INT(sigma2_dB+pucch1_thres)); + /* if (eNB->pucch1_stats_cnt[UE_id][subframe] == 0) { LOG_M("pucch_debug.m","pucch_energy", @@ -1093,11 +1135,17 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, // This is a moving average of the PUCCH1 statistics conditioned on being above or below the threshold if (sigma2_dB<(dB_fixed(stat_max)-pucch1_thres)) { *payload = 1; + uci_stats->current_pucch1_stat = stat_max; + for (int aa=0;aanb_antennas_rx;aa++) { + uci_stats->pucch1_low_stat[aa]=stat0_max[aa]; + uci_stats->pucch1_high_stat[aa]=stat1_max[aa]; + uci_stats->pucch1_positive_SR++; + } } else { *payload = 0; } - if (UE_id==0) { + if (UCI_id==0) { VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_UE0_SR_ENERGY,dB_fixed(stat_max)); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_UE0_SR_THRES,sigma2_dB+pucch1_thres); } @@ -1106,29 +1154,30 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, #ifdef DEBUG_PUCCH_RX LOG_D(PHY,"Doing PUCCH detection for format 1a/1b\n"); #endif - + int stat_re=0,stat_im=0; for (phase=0; phase<7; phase++) { - stat=0; - + int stat=0; for (aa=0; aanb_antennas_rx; aa++) { + stat0[aa]=0; + stat1[aa]=0; for (re=0; re<12; re++) { // compute received energy first slot, seperately for data and reference // by coherent combining across symbols but not resource elements // Note: assumption is that channel is stationary over symbols in slot after CFO - stat_re=0; - stat_im=0; - stat_ref_re=0; - stat_ref_im=0; + stat0_re[aa]=0; + stat0_im[aa]=0; + stat0_ref_re[aa]=0; + stat0_ref_im[aa]=0; off=re<<1; cfo = (frame_parms->Ncp==0) ? &cfo_pucch_np[14*phase] : &cfo_pucch_ep[12*phase]; for (l=0; l<(nsymb>>1); l++) { if ((l<2)||(l>(nsymb>>1) - 3)) { //data symbols - stat_re += ((rxcomp[aa][off]*(int32_t)cfo[l<<1])>>15) - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l<<1)])>>15); - stat_im += ((rxcomp[aa][off]*(int32_t)cfo[1+(l<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l<<1)])>>15); + stat0_re[aa] += ((rxcomp[aa][off]*(int32_t)cfo[l<<1])>>15) - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l<<1)])>>15); + stat0_im[aa] += ((rxcomp[aa][off]*(int32_t)cfo[1+(l<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l<<1)])>>15); } else { //reference symbols - stat_ref_re += ((rxcomp[aa][off]*(int32_t)cfo[l<<1])>>15) - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l<<1)])>>15); - stat_ref_im += ((rxcomp[aa][off]*(int32_t)cfo[1+(l<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l<<1)])>>15); + stat0_ref_re[aa] += ((rxcomp[aa][off]*(int32_t)cfo[l<<1])>>15) - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l<<1)])>>15); + stat0_ref_im[aa] += ((rxcomp[aa][off]*(int32_t)cfo[1+(l<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l<<1)])>>15); } off+=2; @@ -1141,21 +1190,21 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, } // this is total energy received, summed over data and reference - stat += ((((stat_re*stat_re)) + ((stat_im*stat_im)) + - ((stat_ref_re*stat_ref_re)) + ((stat_ref_im*stat_ref_im)))/nsymb); + stat0[aa] += ((((stat0_re[aa]*stat0_re[aa])) + ((stat0_im[aa]*stat0_im[aa])) + + ((stat0_ref_re[aa]*stat0_ref_re[aa])) + ((stat0_ref_im[aa]*stat0_ref_im[aa])))/nsymb); // now second slot - stat_re=0; - stat_im=0; - stat_ref_re=0; - stat_ref_im=0; + stat1_re[aa]=0; + stat1_im[aa]=0; + stat1_ref_re[aa]=0; + stat1_ref_im[aa]=0; for (l2=0,l=(nsymb>>1); l< nsymb; l++,l2++) { if ((l2<2) || ((l2>(nsymb>>1) - 3)) ) { // data symbols - stat_re += ((rxcomp[aa][off]*(int32_t)cfo[l2<<1])>>15) - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l2<<1)])>>15); - stat_im += ((rxcomp[aa][off]*(int32_t)cfo[1+(l2<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l2<<1)])>>15); + stat1_re[aa] += ((rxcomp[aa][off]*(int32_t)cfo[l2<<1])>>15) - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l2<<1)])>>15); + stat1_im[aa] += ((rxcomp[aa][off]*(int32_t)cfo[1+(l2<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l2<<1)])>>15); } else { //reference_symbols - stat_ref_re += ((rxcomp[aa][off]*(int32_t)cfo[l2<<1])>>15) - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l2<<1)])>>15); - stat_ref_im += ((rxcomp[aa][off]*(int32_t)cfo[1+(l2<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l2<<1)])>>15); + stat1_ref_re[aa] += ((rxcomp[aa][off]*(int32_t)cfo[l2<<1])>>15) - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l2<<1)])>>15); + stat1_ref_im[aa] += ((rxcomp[aa][off]*(int32_t)cfo[1+(l2<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l2<<1)])>>15); } off+=2; @@ -1170,15 +1219,16 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, #ifdef DEBUG_PUCCH_RX printf("aa%d re %d : phase %d : stat %d\n",aa,re,phase,stat); #endif - stat += ((((stat_re*stat_re)) + ((stat_im*stat_im)) + - ((stat_ref_re*stat_ref_re)) + ((stat_ref_im*stat_ref_im)))/nsymb); + stat1[aa] += ((((stat1_re[aa]*stat1_re[aa])) + ((stat1_im[aa]*stat1_im[aa])) + + ((stat1_ref_re[aa]*stat1_ref_re[aa])) + ((stat1_ref_im[aa]*stat1_ref_im[aa])))/nsymb); } //re + stat+=(stat0[aa]+stat1[aa]); } // aa #ifdef DEBUG_PUCCH_RX LOG_D(PHY,"Format 1A: phase %d : stat %d\n",phase,stat); #endif - + if (stat>stat_max) { stat_max = stat; phase_max = phase; @@ -1189,8 +1239,6 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, #ifdef DEBUG_PUCCH_RX LOG_I(PHY,"[eNB] PUCCH fmt1a/b: stat_max : %d (%d : sigma2 %d), phase_max : %d\n",stat_max,dB_fixed(stat_max),sigma2_dB,phase_max); #endif - stat_re=0; - stat_im=0; // Do detection now @@ -1198,13 +1246,12 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, // For instance i assume to skip pucch1_thres from the test below. // Not 100% sure - if (sigma2_dB<(dB_fixed(stat_max) - (IS_SOFTMODEM_IQPLAYER?0:pucch1_thres)) ) {// + if (sigma2_dB<(dB_fixed(stat_max) - (IS_SOFTMODEM_IQPLAYER?0:pucch1_thres)) ) {// chL = (nsymb>>1)-4; chest_mag=0; cfo = (frame_parms->Ncp==0) ? &cfo_pucch_np[14*phase_max] : &cfo_pucch_ep[12*phase_max]; for (aa=0; aanb_antennas_rx; aa++) { - // channel estimates first for (re=0; re<12; re++) { // channel estimate for first slot chest0_re[aa][re]=0; @@ -1238,6 +1285,11 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, // now do channel matched filter for (aa=0; aanb_antennas_rx; aa++) { + stat0_re[aa]=0; + stat0_im[aa]=0; + stat1_re[aa]=0; + stat1_im[aa]=0; + for (re=0; re<12; re++) { #ifdef DEBUG_PUCCH_RX printf("[eNB] PUCCH subframe %d chest0[%d][%d] => (%d,%d)\n",subframe,aa,re, @@ -1249,8 +1301,8 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, off=(re<<1) + (24*l); tmp_re = ((rxcomp[aa][off]*(int32_t)cfo[l<<1])>>15) - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l<<1)])>>15); tmp_im = ((rxcomp[aa][off]*(int32_t)cfo[1+(l<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l<<1)])>>15); - stat_re += (((tmp_re*chest0_re[aa][re])>>log2_maxh) + ((tmp_im*chest0_im[aa][re])>>log2_maxh)); - stat_im += (((tmp_re*chest0_im[aa][re])>>log2_maxh) - ((tmp_im*chest0_re[aa][re])>>log2_maxh)); + stat0_re[aa] += (((tmp_re*chest0_re[aa][re])>>log2_maxh) + ((tmp_im*chest0_im[aa][re])>>log2_maxh)); + stat0_im[aa] += (((tmp_re*chest0_im[aa][re])>>log2_maxh) - ((tmp_im*chest0_re[aa][re])>>log2_maxh)); off+=2; #ifdef DEBUG_PUCCH_RX printf("[eNB] PUCCH subframe %d (%d,%d) => (%d,%d) x (%d,%d) : (%d,%d) => (%d,%d)\n",subframe,l,re, @@ -1266,8 +1318,8 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, off=(re<<1) + (24*l); tmp_re = ((rxcomp[aa][off]*(int32_t)cfo[l<<1])>>15) - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l<<1)])>>15); tmp_im = ((rxcomp[aa][off]*(int32_t)cfo[1+(l<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l<<1)])>>15); - stat_re += (((tmp_re*chest0_re[aa][re])>>log2_maxh) + ((tmp_im*chest0_im[aa][re])>>log2_maxh)); - stat_im += (((tmp_re*chest0_im[aa][re])>>log2_maxh) - ((tmp_im*chest0_re[aa][re])>>log2_maxh)); + stat0_re[aa] += (((tmp_re*chest0_re[aa][re])>>log2_maxh) + ((tmp_im*chest0_im[aa][re])>>log2_maxh)); + stat0_im[aa] += (((tmp_re*chest0_im[aa][re])>>log2_maxh) - ((tmp_im*chest0_re[aa][re])>>log2_maxh)); off+=2; #ifdef DEBUG_PUCCH_RX printf("[eNB] PUCCH subframe %d (%d,%d) => (%d,%d) x (%d,%d) : (%d,%d) => (%d,%d)\n",subframe,l,re, @@ -1288,8 +1340,8 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, off=(re<<1) + (24*l) + (nsymb>>1)*24; tmp_re = ((rxcomp[aa][off]*(int32_t)cfo[l<<1])>>15) - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l<<1)])>>15); tmp_im = ((rxcomp[aa][off]*(int32_t)cfo[1+(l<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l<<1)])>>15); - stat_re += (((tmp_re*chest1_re[aa][re])>>log2_maxh) + ((tmp_im*chest1_im[aa][re])>>log2_maxh)); - stat_im += (((tmp_re*chest1_im[aa][re])>>log2_maxh) - ((tmp_im*chest1_re[aa][re])>>log2_maxh)); + stat1_re[aa] += (((tmp_re*chest1_re[aa][re])>>log2_maxh) + ((tmp_im*chest1_im[aa][re])>>log2_maxh)); + stat1_im[aa] += (((tmp_re*chest1_im[aa][re])>>log2_maxh) - ((tmp_im*chest1_re[aa][re])>>log2_maxh)); off+=2; #ifdef DEBUG_PUCCH_RX printf("[PHY][eNB] PUCCH subframe %d (%d,%d) => (%d,%d) x (%d,%d) : (%d,%d) => (%d,%d)\n",subframe,l,re, @@ -1305,8 +1357,8 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, off=(re<<1) + (24*l) + (nsymb>>1)*24; tmp_re = ((rxcomp[aa][off]*(int32_t)cfo[l<<1])>>15) - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l<<1)])>>15); tmp_im = ((rxcomp[aa][off]*(int32_t)cfo[1+(l<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l<<1)])>>15); - stat_re += (((tmp_re*chest1_re[aa][re])>>log2_maxh) + ((tmp_im*chest1_im[aa][re])>>log2_maxh)); - stat_im += (((tmp_re*chest1_im[aa][re])>>log2_maxh) - ((tmp_im*chest1_re[aa][re])>>log2_maxh)); + stat1_re[aa] += (((tmp_re*chest1_re[aa][re])>>log2_maxh) + ((tmp_im*chest1_im[aa][re])>>log2_maxh)); + stat1_im[aa] += (((tmp_re*chest1_im[aa][re])>>log2_maxh) - ((tmp_im*chest1_re[aa][re])>>log2_maxh)); off+=2; #ifdef DEBUG_PUCCH_RX printf("[PHY][eNB] PUCCH subframe %d (%d,%d) => (%d,%d) x (%d,%d) : (%d,%d) => (%d,%d)\n",subframe,l,re, @@ -1321,29 +1373,42 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, printf("aa%d re %d : stat %d,%d\n",aa,re,stat_re,stat_im); #endif } //re + stat_re+=stat0_re[aa]+stat1_re[aa]; + stat_im+=stat0_im[aa]+stat1_im[aa]; } // aa LOG_D(PHY,"PUCCH 1a/b: subframe %d : stat %d,%d (pos %d)\n",subframe,stat_re,stat_im, - (subframe<<10) + (eNB->pucch1ab_stats_cnt[UE_id][subframe])); + (subframe<<10) + (eNB->pucch1ab_stats_cnt[UCI_id][subframe])); LOG_D(PHY,"In pucch.c PUCCH 1a/b: ACK subframe %d : sigma2_dB %d, stat_max %d, pucch1_thres %d\n",subframe,sigma2_dB,dB_fixed(stat_max),pucch1_thres); - eNB->pucch1ab_stats[UE_id][(subframe<<11) + 2*(eNB->pucch1ab_stats_cnt[UE_id][subframe])] = (stat_re); - eNB->pucch1ab_stats[UE_id][(subframe<<11) + 1+2*(eNB->pucch1ab_stats_cnt[UE_id][subframe])] = (stat_im); - eNB->pucch1ab_stats_cnt[UE_id][subframe] = (eNB->pucch1ab_stats_cnt[UE_id][subframe]+1)&1023; + eNB->pucch1ab_stats[UCI_id][(subframe<<11) + 2*(eNB->pucch1ab_stats_cnt[UCI_id][subframe])] = (stat_re); + eNB->pucch1ab_stats[UCI_id][(subframe<<11) + 1+2*(eNB->pucch1ab_stats_cnt[UCI_id][subframe])] = (stat_im); + eNB->pucch1ab_stats_cnt[UCI_id][subframe] = (eNB->pucch1ab_stats_cnt[UCI_id][subframe]+1)&1023; /* frame not available here - set to -1 for the moment */ - T(T_ENB_PHY_PUCCH_1AB_IQ, T_INT(eNB->Mod_id), T_INT(eNB->uci_vars[UE_id].rnti), T_INT(-1), T_INT(subframe), T_INT(stat_re), T_INT(stat_im)); + T(T_ENB_PHY_PUCCH_1AB_IQ, T_INT(eNB->Mod_id), T_INT(eNB->uci_vars[UCI_id].rnti), T_INT(-1), T_INT(subframe), T_INT(stat_re), T_INT(stat_im)); *payload = (stat_re<0) ? 1 : 2; // 1 == ACK, 2 == NAK - if (fmt==pucch_format1b) + if (fmt==pucch_format1b) { + uci_stats->pucch1b_trials++; *(1+payload) = (stat_im<0) ? 1 : 2; + uci_stats->current_pucch1b_stat_re = stat_re; + uci_stats->current_pucch1b_stat_im = stat_im; + } + else { + uci_stats->pucch1a_trials++; + uci_stats->current_pucch1a_stat_re = stat_re; + uci_stats->current_pucch1a_stat_im = stat_im; + } + } else { // insufficient energy on PUCCH so NAK LOG_D(PHY,"In pucch.c PUCCH 1a/b: NAK subframe %d : sigma2_dB %d, stat_max %d, pucch1_thres %d\n",subframe,sigma2_dB,dB_fixed(stat_max),pucch1_thres); *payload = 4; // DTX - ((int16_t *)&eNB->pucch1ab_stats[UE_id][(subframe<<10) + (eNB->pucch1ab_stats_cnt[UE_id][subframe])])[0] = (int16_t)(stat_re); - ((int16_t *)&eNB->pucch1ab_stats[UE_id][(subframe<<10) + (eNB->pucch1ab_stats_cnt[UE_id][subframe])])[1] = (int16_t)(stat_im); - eNB->pucch1ab_stats_cnt[UE_id][subframe] = (eNB->pucch1ab_stats_cnt[UE_id][subframe]+1)&1023; + ((int16_t *)&eNB->pucch1ab_stats[UCI_id][(subframe<<10) + (eNB->pucch1ab_stats_cnt[UCI_id][subframe])])[0] = (int16_t)(stat_re); + ((int16_t *)&eNB->pucch1ab_stats[UCI_id][(subframe<<10) + (eNB->pucch1ab_stats_cnt[UCI_id][subframe])])[1] = (int16_t)(stat_im); + eNB->pucch1ab_stats_cnt[UCI_id][subframe] = (eNB->pucch1ab_stats_cnt[UCI_id][subframe]+1)&1023; if (fmt==pucch_format1b) *(1+payload) = 4; + uci_stats->pucch1ab_DTX++; } } else { LOG_E(PHY,"[eNB] PUCCH fmt2/2a/2b not supported\n"); diff --git a/openair1/PHY/LTE_TRANSPORT/transport_common_proto.h b/openair1/PHY/LTE_TRANSPORT/transport_common_proto.h index 1944f06fab..622f37b3bc 100644 --- a/openair1/PHY/LTE_TRANSPORT/transport_common_proto.h +++ b/openair1/PHY/LTE_TRANSPORT/transport_common_proto.h @@ -223,7 +223,9 @@ uint8_t get_num_prach_tdd(module_id_t Mod_id); @param frame_type 0-FDD, 1-TDD @returns 0-1 accordingly */ +/* uint8_t get_prach_fmt(uint8_t prach_ConfigIndex,lte_frame_type_t frame_type); +*/ /*! \brief Helper for MAC, returns frequency index of PRACH resource in TDD for a particular configuration index @@ -306,12 +308,12 @@ void init_scrambling_lut(void); void init_unscrambling_lut(void); - +/* uint8_t get_prach_prb_offset(LTE_DL_FRAME_PARMS *frame_parms, uint8_t prach_ConfigIndex, uint8_t n_ra_prboffset, uint8_t tdd_mapindex, uint16_t Nf); - +*/ uint8_t subframe2harq_pid(LTE_DL_FRAME_PARMS *frame_parms,frame_t frame,uint8_t subframe); uint8_t ul_subframe2pdcch_alloc_subframe(LTE_DL_FRAME_PARMS *frame_parms,uint8_t n); @@ -319,6 +321,6 @@ uint32_t conv_1C_RIV(int32_t rballoc,uint32_t N_RB_DL); void conv_rballoc(uint8_t ra_header,uint32_t rb_alloc,uint32_t N_RB_DL,uint32_t *rb_alloc2); -int16_t estimate_ue_tx_power(uint32_t tbs, uint32_t nb_rb, uint8_t control_only, lte_prefix_type_t ncp, uint8_t use_srs); +int16_t estimate_ue_tx_power(int norm,uint32_t tbs, uint32_t nb_rb, uint8_t control_only, lte_prefix_type_t ncp, uint8_t use_srs); #endif diff --git a/openair1/PHY/LTE_TRANSPORT/transport_proto.h b/openair1/PHY/LTE_TRANSPORT/transport_proto.h index 4ce113f78e..2de4c2698b 100644 --- a/openair1/PHY/LTE_TRANSPORT/transport_proto.h +++ b/openair1/PHY/LTE_TRANSPORT/transport_proto.h @@ -693,8 +693,6 @@ int16_t find_ulsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type); int16_t find_uci(uint16_t rnti, int frame, int subframe, PHY_VARS_eNB *eNB,find_type_t type); -uint8_t get_prach_fmt(uint8_t prach_ConfigIndex,lte_frame_type_t frame_type); - uint32_t lte_gold_generic(uint32_t *x1, uint32_t *x2, uint8_t reset); diff --git a/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c b/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c index 92fe777201..17f95f31ce 100644 --- a/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c +++ b/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c @@ -468,6 +468,35 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB, ulsch_harq->Nsymb_pusch, nb_rb); //#endif + + eNB_SCH_STATS_t *stats=NULL; + int first_free=-1; + for (int i=0;iulsch_stats[i].rnti == 0 && first_free == -1) { + first_free = i; + stats=&eNB->ulsch_stats[i]; + } + if (eNB->ulsch_stats[i].rnti == ulsch->rnti) { + stats=&eNB->ulsch_stats[i]; + break; + } + } + if (stats) { + stats->rnti = ulsch->rnti; + stats->round_trials[ulsch_harq->round]++; + stats->frame=proc->frame_rx; + } + if (ulsch_harq->round == 0) { + if (stats) { + stats->current_Qm = Q_m; + stats->current_RI = 1; + stats->total_bytes_tx += ulsch_harq->TBS; + stats->current_TBS = ulsch_harq->TBS; + stats->current_G = ulsch_harq->G; + } + } + + //if (ulsch_harq->round == 0) { // delete for RB shortage pattern // This is a new packet, so compute quantities regarding segmentation ulsch_harq->B = A+24; @@ -1086,3 +1115,42 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB, ret = ulsch_decoding_data_all(eNB,proc, UE_id,harq_pid,llr8_flag); return(ret); } + + +void dump_ulsch_stats(PHY_VARS_eNB *eNB,int frame) { + + for (int i=0;iulsch_stats[i].rnti>0) { + for (int aa=0;aaframe_parms.nb_antennas_rx;aa++) + LOG_I(PHY,"ULSCH RNTI %x: ulsch_power[%d] %d, ulsch_noise_power[%d] %d\n", + eNB->ulsch_stats[i].rnti, aa,eNB->ulsch_stats[i].ulsch_power[aa],aa,eNB->ulsch_stats[i].ulsch_noise_power[aa]); + + LOG_I(PHY,"ULSCH RNTI %x: round_trials %d(%1.1e):%d(%1.1e):%d(%1.1e):%d\n", + eNB->ulsch_stats[i].rnti, + eNB->ulsch_stats[i].round_trials[0], + (double)eNB->ulsch_stats[i].round_trials[1]/eNB->ulsch_stats[i].round_trials[0], + eNB->ulsch_stats[i].round_trials[1], + (double)eNB->ulsch_stats[i].round_trials[2]/eNB->ulsch_stats[i].round_trials[0], + eNB->ulsch_stats[i].round_trials[2], + (double)eNB->ulsch_stats[i].round_trials[3]/eNB->ulsch_stats[i].round_trials[0], + eNB->ulsch_stats[i].round_trials[3]); + LOG_I(PHY,"ULSCH RNTI %x: current_Qm %d, current_G %d, current_TBS %d, current_rate %f,current_RI %d, timing_offset %d, total_bytes RX/SCHED %d/%d\n", + eNB->ulsch_stats[i].rnti, + eNB->ulsch_stats[i].current_Qm, + eNB->ulsch_stats[i].current_G, + eNB->ulsch_stats[i].current_TBS, + (double)eNB->ulsch_stats[i].current_G/eNB->ulsch_stats[i].current_TBS, + eNB->ulsch_stats[i].current_RI, + eNB->ulsch_stats[i].timing_offset, + eNB->ulsch_stats[i].total_bytes_rx, + eNB->ulsch_stats[i].total_bytes_tx); + } + +} + +void clear_ulsch_stats(PHY_VARS_eNB *eNB) { + + for (int i=0;iulsch_stats[i],0,sizeof(eNB->ulsch_stats[i])); +} + diff --git a/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c b/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c index 1b23fc99bf..5a8060091b 100644 --- a/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c +++ b/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c @@ -1076,6 +1076,10 @@ void rx_ulsch(PHY_VARS_eNB *eNB, ulsch[UE_id]->harq_processes[harq_pid]->nb_rb*12)/correction_factor; LOG_D(PHY,"%4.4d.%d power harq_pid %d rb %2.2d TBS %2.2d (MPR_times_Ks %d correction %d) power %d dBtimes10\n", proc->frame_rx, proc->subframe_rx, harq_pid, ulsch[UE_id]->harq_processes[harq_pid]->nb_rb, ulsch[UE_id]->harq_processes[harq_pid]->TBS,MPR_times_100Ks,correction_factor,dB_fixed_times10(pusch_vars->ulsch_power[i])); + pusch_vars->ulsch_noise_power[i]=0; + for (int rb=0;rbharq_processes[harq_pid]->nb_rb;rb++) + pusch_vars->ulsch_noise_power[i]+=eNB->measurements.n0_subband_power[i][rb]/ulsch[UE_id]->harq_processes[harq_pid]->nb_rb; + LOG_D(PHY,"noise power[%d] %d\n",i,dB_fixed_times10(pusch_vars->ulsch_noise_power[i])); } ulsch_channel_level(pusch_vars->drs_ch_estimates, diff --git a/openair1/PHY/defs_eNB.h b/openair1/PHY/defs_eNB.h index 1f18f114de..32f22e9caf 100644 --- a/openair1/PHY/defs_eNB.h +++ b/openair1/PHY/defs_eNB.h @@ -164,8 +164,10 @@ typedef struct { /// - first index: rx antenna id [0..nb_antennas_rx[ /// - second index: ? [0..12*N_RB_UL*frame_parms->symbols_per_tti[ int32_t **ul_ch_magb; - /// measured RX power based on DRS - int ulsch_power[2]; + /// measured RX power based on DMRS + int ulsch_power[4]; + /// measured RX power of noise + int ulsch_noise_power[4]; /// \brief llr values. /// - first index: ? [0..1179743] (hard coded) int16_t *llr; @@ -421,6 +423,42 @@ typedef struct { int prach_I0; } PHY_MEASUREMENTS_eNB; +typedef struct { + uint16_t rnti; + int frame; + int round_trials[8]; + int total_bytes_tx; + int total_bytes_rx; + int current_G; + int current_TBS; + int current_Qm; + int current_mcs; + int current_RI; + int timing_offset; + int ulsch_power[4]; + int ulsch_noise_power[4]; +} eNB_SCH_STATS_t; + +typedef struct { + uint16_t rnti; + int frame; + int pucch1_trials; + int pucch1_thres; + int current_pucch1_stat; + int pucch1_positive_SR; + int pucch1_low_stat[4]; + int pucch1_high_stat[4]; + int pucch1_phase; + int pucch1a_trials; + int current_pucch1a_stat_re; + int current_pucch1a_stat_im; + int pucch1ab_DTX; + int pucch1b_trials; + int current_pucch1b_stat_re; + int current_pucch1b_stat_im; + int pucch3_trials; + int current_pucch3_stat; +} eNB_UCI_STATS_t; /// Top-level PHY Data Structure for eNB typedef struct PHY_VARS_eNB_s { @@ -591,7 +629,12 @@ typedef struct PHY_VARS_eNB_s { /// Information regarding TM5 MU_MIMO_mode mu_mimo_mode[NUMBER_OF_UE_MAX]; - + /// statistics for DLSCH measurement collection + eNB_SCH_STATS_t dlsch_stats[NUMBER_OF_SCH_STATS_MAX]; + /// statistics for ULSCH measurement collection + eNB_SCH_STATS_t ulsch_stats[NUMBER_OF_SCH_STATS_MAX]; + /// statis for UCI (PUCCH) measurement collection + eNB_UCI_STATS_t uci_stats[NUMBER_OF_SCH_STATS_MAX]; /// target_ue_dl_mcs : only for debug purposes uint32_t target_ue_dl_mcs; /// target_ue_ul_mcs : only for debug purposes diff --git a/openair1/SCHED/phy_procedures_lte_common.c b/openair1/SCHED/phy_procedures_lte_common.c index d162a413c1..7db0677f66 100644 --- a/openair1/SCHED/phy_procedures_lte_common.c +++ b/openair1/SCHED/phy_procedures_lte_common.c @@ -1086,72 +1086,5 @@ void compute_srs_pos(lte_frame_type_t frameType,uint16_t isrs,uint16_t *psrsPeri } } -// uint8_t eNB_id,uint8_t harq_pid, uint8_t UE_id, -int16_t estimate_ue_tx_power(uint32_t tbs, uint32_t nb_rb, uint8_t control_only, lte_prefix_type_t ncp, uint8_t use_srs) -{ - - /// The payload + CRC size in bits, "B" - uint32_t B; - /// Number of code segments - uint32_t C; - /// Number of "small" code segments - uint32_t Cminus; - /// Number of "large" code segments - uint32_t Cplus; - /// Number of bits in "small" code segments (<6144) - uint32_t Kminus; - /// Number of bits in "large" code segments (<6144) - uint32_t Kplus; - /// Total number of bits across all segments - uint32_t sumKr; - /// Number of "Filler" bits - uint32_t F; - // num resource elements - uint32_t num_re=0.0; - // num symbols - uint32_t num_symb=0.0; - /// effective spectral efficiency of the PUSCH - uint32_t MPR_x100=0; - /// beta_offset - uint16_t beta_offset_pusch_x8=8; - /// delta mcs - float delta_mcs=0.0; - /// bandwidth factor - float bw_factor=0.0; - - B= tbs+24; - lte_segmentation(NULL, - NULL, - B, - &C, - &Cplus, - &Cminus, - &Kplus, - &Kminus, - &F); - sumKr = Cminus*Kminus + Cplus*Kplus; - num_symb = 12-(ncp<<1)-(use_srs==0?0:1); - num_re = num_symb * nb_rb * 12; - - if (num_re == 0) - return(0); - - MPR_x100 = 100*sumKr/num_re; - - if (control_only == 1 ) - beta_offset_pusch_x8=8; // fixme - - //(beta_offset_pusch_x8=ue->ulsch[eNB_id]->harq_processes[harq_pid]->control_only == 1) ? ue->ulsch[eNB_id]->beta_offset_cqi_times8:8; - - // if deltamcs_enabledm - delta_mcs = ((hundred_times_delta_TF[MPR_x100/6]+10*dB_fixed_times10((beta_offset_pusch_x8)>>3))/100.0); - bw_factor = (hundred_times_log10_NPRB[nb_rb-1]/100.0); -#ifdef DEBUG_SEGMENTATION - printf("estimated ue tx power %d (num_re %d, sumKr %d, mpr_x100 %d, delta_mcs %f, bw_factor %f)\n", - (int16_t)ceil(delta_mcs + bw_factor), num_re, sumKr, MPR_x100, delta_mcs, bw_factor); -#endif - return (int16_t)ceil(delta_mcs + bw_factor); - -} diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c index a264ee31a2..414a0fe183 100644 --- a/openair1/SCHED/phy_procedures_lte_eNb.c +++ b/openair1/SCHED/phy_procedures_lte_eNb.c @@ -480,8 +480,6 @@ void pdsch_procedures(PHY_VARS_eNB *eNB, subframe<<1); stop_meas(&eNB->dlsch_scrambling_stats); start_meas(&eNB->dlsch_modulation_stats); - if (frame==0) LOG_I(PHY,"Generating pdsch for %d.%d starting in symbol %d, Qm %d, nb_rb %d, rbmask %x\n", - frame,subframe,dlsch_harq->pdsch_start,dlsch_harq->Qm,dlsch_harq->nb_rb,dlsch_harq->rb_alloc[0]); dlsch_modulation(eNB, eNB->common_vars.txdataF, AMP, @@ -1329,7 +1327,7 @@ void postDecode(L1_rxtx_proc_t *proc, notifiedFIFO_elt_t *req) { int nb=abortTpool(proc->threadPool, req->key); nb+=abortNotifiedFIFO(proc->respDecode, req->key); proc->nbDecode-=nb; - LOG_I(PHY,"uplink segment error %d/%d, aborted %d segments\n",rdata->segment_r,rdata->nbSegments, nb); + LOG_D(PHY,"uplink segment error %d/%d, aborted %d segments\n",rdata->segment_r,rdata->nbSegments, nb); AssertFatal(ulsch_harq->processedSegments+nb == rdata->nbSegments,"processed: %d, aborted: %d, total %d\n", ulsch_harq->processedSegments, nb, rdata->nbSegments); ulsch_harq->processedSegments=rdata->nbSegments; @@ -1385,6 +1383,15 @@ void postDecode(L1_rxtx_proc_t *proc, notifiedFIFO_elt_t *req) { fill_rx_indication(eNB,i,rdata->frame,rdata->subframe); // indicate SDU to MAC ulsch_harq->status = SCH_IDLE; ulsch->harq_mask &= ~(1 << rdata->harq_pid); + for (int j=0;julsch_stats[j].rnti == ulsch->rnti) { + eNB->ulsch_stats[j].total_bytes_rx+=ulsch_harq->TBS; + for (int aa=0;aaframe_parms.nb_antennas_rx;aa++) { + eNB->ulsch_stats[j].ulsch_power[aa] = dB_fixed_times10(eNB->pusch_vars[rdata->UEid]->ulsch_power[aa]); + eNB->ulsch_stats[j].ulsch_noise_power[aa] = dB_fixed_times10(eNB->pusch_vars[rdata->UEid]->ulsch_noise_power[aa]); + } + break; + } T (T_ENB_PHY_ULSCH_UE_ACK, T_INT(eNB->Mod_id), T_INT(rdata->frame), T_INT(rdata->subframe), T_INT(ulsch->rnti), T_INT(rdata->harq_pid)); } // ulsch not in error @@ -1541,7 +1548,7 @@ void kill_te_thread(PHY_VARS_eNB *eNB) { } void fill_rx_indication(PHY_VARS_eNB *eNB, - int UE_id, + int ULSCH_id, int frame, int subframe) { nfapi_rx_indication_pdu_t *pdu; @@ -1549,7 +1556,7 @@ void fill_rx_indication(PHY_VARS_eNB *eNB, int sync_pos; uint32_t harq_pid; - if (eNB->ulsch[UE_id]->ue_type > 0) harq_pid = 0; + if (eNB->ulsch[ULSCH_id]->ue_type > 0) harq_pid = 0; else { harq_pid = subframe2harq_pid (&eNB->frame_parms, frame, subframe); @@ -1559,19 +1566,22 @@ void fill_rx_indication(PHY_VARS_eNB *eNB, eNB->UL_INFO.rx_ind.sfn_sf = frame<<4| subframe; eNB->UL_INFO.rx_ind.rx_indication_body.tl.tag = NFAPI_RX_INDICATION_BODY_TAG; pdu = &eNB->UL_INFO.rx_ind.rx_indication_body.rx_pdu_list[eNB->UL_INFO.rx_ind.rx_indication_body.number_of_pdus]; - // pdu->rx_ue_information.handle = eNB->ulsch[UE_id]->handle; + // pdu->rx_ue_information.handle = eNB->ulsch[ULSCH_id]->handle; pdu->rx_ue_information.tl.tag = NFAPI_RX_UE_INFORMATION_TAG; - pdu->rx_ue_information.rnti = eNB->ulsch[UE_id]->rnti; + pdu->rx_ue_information.rnti = eNB->ulsch[ULSCH_id]->rnti; pdu->rx_indication_rel8.tl.tag = NFAPI_RX_INDICATION_REL8_TAG; - pdu->rx_indication_rel8.length = eNB->ulsch[UE_id]->harq_processes[harq_pid]->TBS>>3; + pdu->rx_indication_rel8.length = eNB->ulsch[ULSCH_id]->harq_processes[harq_pid]->TBS>>3; pdu->rx_indication_rel8.offset = 1; // DJP - I dont understand - but broken unless 1 ???? 0; // filled in at the end of the UL_INFO formation - pdu->data = eNB->ulsch[UE_id]->harq_processes[harq_pid]->decodedBytes; + pdu->data = eNB->ulsch[ULSCH_id]->harq_processes[harq_pid]->decodedBytes; // estimate timing advance for MAC - sync_pos = lte_est_timing_advance_pusch(&eNB->frame_parms, eNB->pusch_vars[UE_id]->drs_ch_estimates_time); - timing_advance_update = sync_pos; // - eNB->frame_parms.nb_prefix_samples/4; //to check + sync_pos = lte_est_timing_advance_pusch(&eNB->frame_parms, eNB->pusch_vars[ULSCH_id]->drs_ch_estimates_time); + timing_advance_update = sync_pos; - // if (timing_advance_update > 10) { dump_ulsch(eNB,frame,subframe,UE_id); exit(-1);} - // if (timing_advance_update < -10) { dump_ulsch(eNB,frame,subframe,UE_id); exit(-1);} + for (int i=0;iulsch_stats[i].rnti == eNB->ulsch[ULSCH_id]->rnti) + eNB->ulsch_stats[i].timing_offset = sync_pos; + // if (timing_advance_update > 10) { dump_ulsch(eNB,frame,subframe,ULSCH_id); exit(-1);} + // if (timing_advance_update < -10) { dump_ulsch(eNB,frame,subframe,ULSCH_id); exit(-1);} switch (eNB->frame_parms.N_RB_DL) { case 6: /* nothing to do */ break; @@ -1611,7 +1621,13 @@ void fill_rx_indication(PHY_VARS_eNB *eNB, pdu->rx_indication_rel8.timing_advance = timing_advance_update; // estimate UL_CQI for MAC - int SNRtimes10 = dB_fixed_times10(eNB->pusch_vars[UE_id]->ulsch_power[0] + ((eNB->frame_parms.nb_antennas_rx>1) ?eNB->pusch_vars[UE_id]->ulsch_power[1] : 0 )) - 10 * eNB->measurements.n0_subband_power_avg_dB; + int total_power=0, avg_noise_power=0; + for (int i=0;iframe_parms.nb_antennas_rx;i++) { + total_power+=(eNB->pusch_vars[ULSCH_id]->ulsch_power[i]); + avg_noise_power+=(eNB->pusch_vars[ULSCH_id]->ulsch_noise_power[i])/eNB->frame_parms.nb_antennas_rx; + } + int SNRtimes10 = dB_fixed_times10(total_power) - + dB_fixed_times10(avg_noise_power); if (SNRtimes10 < -640) pdu->rx_indication_rel8.ul_cqi = 0; @@ -1620,9 +1636,11 @@ void fill_rx_indication(PHY_VARS_eNB *eNB, else pdu->rx_indication_rel8.ul_cqi = (640 + SNRtimes10) / 5; - LOG_D(PHY,"[PUSCH %d] Frame %d Subframe %d Filling RX_indication with SNR %d (%d,%d), timing_advance %d (update %d)\n", - harq_pid,frame,subframe,SNRtimes10,pdu->rx_indication_rel8.ul_cqi,eNB->measurements.n0_subband_power_avg_dB,pdu->rx_indication_rel8.timing_advance, - timing_advance_update); + LOG_D(PHY,"[PUSCH %d] Frame %d Subframe %d Filling RX_indication with SNR %d (%d,%d,%d), timing_advance %d (update %d,sync_pos %d)\n", + harq_pid,frame,subframe,SNRtimes10,pdu->rx_indication_rel8.ul_cqi,dB_fixed_times10(total_power),dB_fixed_times10(avg_noise_power),pdu->rx_indication_rel8.timing_advance,timing_advance_update,sync_pos); + for (int i=0;iframe_parms.nb_antennas_rx;i++) + LOG_D(PHY,"antenna %d: ulsch_power %d, noise_power %d\n",i,dB_fixed_times10(eNB->pusch_vars[ULSCH_id]->ulsch_power[i]),dB_fixed_times10(eNB->pusch_vars[ULSCH_id]->ulsch_noise_power[i])); + eNB->UL_INFO.rx_ind.rx_indication_body.number_of_pdus++; eNB->UL_INFO.rx_ind.sfn_sf = frame<<4 | subframe; pthread_mutex_unlock(&eNB->UL_INFO_mutex); @@ -2151,6 +2169,29 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) { LOG_I (PHY, "max_I0 %d (rb %d), min_I0 %d (rb %d), avg I0 %d\n", max_I0, amax, min_I0, amin, eNB->measurements.n0_subband_power_avg_dB); } + // figure out a better way to choose slot_rx, 19 is ok for a particular TDD configuration with 30kHz SCS + if ((frame&127) == 0 && subframe==3) { + dump_ulsch_stats(eNB); + dump_uci_stats(eNB); + } + + // clear unused statistics after 2 seconds + for (int i=0;iulsch_stats[i].frame <= frame) { + if ((eNB->ulsch_stats[i].frame + 200) < frame) eNB->ulsch_stats[i].rnti = 0; + } + else { + if (eNB->ulsch_stats[i].frame + 200 < (frame+1024)) eNB->ulsch_stats[i].rnti = 0; + } + if (eNB->uci_stats[i].frame <= frame) { + if ((eNB->uci_stats[i].frame + 200) < frame) eNB->uci_stats[i].rnti = 0; + } + else { + if (eNB->uci_stats[i].frame + 200 < (frame+1024)) eNB->uci_stats[i].rnti = 0; + } + } + + VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_UESPEC, 0 ); } @@ -2188,6 +2229,8 @@ void release_rnti_of_phy(module_id_t mod_id) { if((ulsch != NULL) && (ulsch->rnti == rnti)) { LOG_I(PHY, "clean_eNb_ulsch ulsch[%d] UE %x\n", j, rnti); clean_eNb_ulsch(ulsch); + for (j=0;julsch_stats[j].rnti == rnti) {eNB_PHY->ulsch_stats[j].rnti=0; break;} } for(j=0; jprach_energy_counter == 100) && (max_preamble_energy[0] > eNB->measurements.prach_I0+eNB->prach_DTX_threshold)) { - LOG_D(PHY,"[eNB %d/%d][RAPROC] Frame %d, subframe %d Initiating RA procedure with preamble %d, energy %d.%d dB, delay %d\n", + LOG_I(PHY,"[eNB %d/%d][RAPROC] Frame %d, subframe %d Initiating RA procedure with preamble %d, energy %d.%d dB, delay %d\n", eNB->Mod_id, eNB->CC_id, frame, diff --git a/openair1/SCHED/ru_procedures.c b/openair1/SCHED/ru_procedures.c index e472d64db4..7dc8124fe1 100644 --- a/openair1/SCHED/ru_procedures.c +++ b/openair1/SCHED/ru_procedures.c @@ -474,15 +474,16 @@ void feptx_prec(RU_t *ru, VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_PREC+ru->idx , 1); for (aa=0;aanb_tx;aa++) { - memset(ru->common.txdataF_BF[aa],0,sizeof(int32_t)*fp->ofdm_symbol_size*fp->symbols_per_tti); - for (int p=0;pdo_precoding == 0) { - if (p==0) - memcpy((void*)ru->common.txdataF_BF[aa], - (void*)&eNB->common_vars.txdataF[aa][subframe*fp->symbols_per_tti*fp->ofdm_symbol_size], - sizeof(int32_t)*fp->ofdm_symbol_size*fp->symbols_per_tti); - } else { - if (pnb_antenna_ports_eNB) { + if (ru->do_precoding == 0) { + memcpy((void*)ru->common.txdataF_BF[aa], + (void*)&eNB->common_vars.txdataF[aa%fp->nb_antenna_ports_eNB][subframe*fp->symbols_per_tti*fp->ofdm_symbol_size], + sizeof(int32_t)*fp->ofdm_symbol_size*fp->symbols_per_tti); + + } + else { + memset(ru->common.txdataF_BF[aa],0,sizeof(int32_t)*fp->ofdm_symbol_size*fp->symbols_per_tti); + for (int p=0;pnb_antenna_ports_eNB) { // For the moment this does nothing different than below, except ignore antenna ports 5,7,8. for (l=0;lnum_pdcch_symbols;l++) beam_precoding(eNB->common_vars.txdataF, @@ -494,10 +495,10 @@ void feptx_prec(RU_t *ru, aa, p, eNB->Mod_id); - } //if (pnb_antenna_ports_eNB) + } //if (pnb_antenna_ports_eNB) // PDSCH region - if (pnb_antenna_ports_eNB || p==5 || p==7 || p==8) { + if (pnb_antenna_ports_eNB || p==5 || p==7 || p==8) { for (l=pdcch_vars->num_pdcch_symbols;lsymbols_per_tti;l++) { beam_precoding(eNB->common_vars.txdataF, ru->common.txdataF_BF, @@ -510,8 +511,8 @@ void feptx_prec(RU_t *ru, eNB->Mod_id); } // for (l=pdcch_vars ....) } // if (pnb_antenna_ports_eNB) ... - } // ru->do_precoding!=0 - } // for (p=0...) + } // for (p=0...) + } // if do_precoding } // for (aa=0 ...) if(ru->idx<2) diff --git a/openair2/COMMON/platform_constants.h b/openair2/COMMON/platform_constants.h index 49cb2247bf..ff5d68b93b 100644 --- a/openair2/COMMON/platform_constants.h +++ b/openair2/COMMON/platform_constants.h @@ -86,9 +86,14 @@ #define MAX_gNB 2 #endif +#define NUMBER_OF_DLSCH_MAX 16 +#define NUMBER_OF_ULSCH_MAX 16 +#define NUMBER_OF_SCH_STATS_MAX 16 + #define NUMBER_OF_NR_DLSCH_MAX 2//16 #define NUMBER_OF_NR_ULSCH_MAX 2//16 #define NUMBER_OF_NR_SCH_STATS_MAX 16 + #define NUMBER_OF_NR_PUCCH_MAX 16 #define NUMBER_OF_NR_SR_MAX 16 #define NUMBER_OF_NR_PDCCH_MAX 16 diff --git a/openair2/LAYER2/MAC/eNB_scheduler.c b/openair2/LAYER2/MAC/eNB_scheduler.c index 8f5aab99a7..20379b13c8 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler.c +++ b/openair2/LAYER2/MAC/eNB_scheduler.c @@ -596,13 +596,13 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, UE_scheduling_control = &(UE_info->UE_sched_ctrl[UE_id]); if (((frameP & 127) == 0) && (subframeP == 0)) { - LOG_I(MAC,"UE rnti %x : %s, PHR %d dB DL CQI %d PUSCH SNR %d PUCCH SNR %d\n", + LOG_I(MAC,"UE rnti %x : %s, PHR %d dB DL CQI %d PUSCH SNR %d (TPC accum %d) PUCCH SNR %d (TPC accum %d)\n", rnti, UE_scheduling_control->ul_out_of_sync == 0 ? "in synch" : "out of sync", UE_info->UE_template[CC_id][UE_id].phr_info, UE_scheduling_control->dl_cqi[CC_id], - (5 * UE_scheduling_control->pusch_snr[CC_id] - 640) / 10, - (5 * UE_scheduling_control->pucch1_snr[CC_id] - 640) / 10); + (5 * UE_scheduling_control->pusch_snr[CC_id] - 640) / 10, UE_scheduling_control->pucch_tpc_accumulated[CC_id], + (5 * UE_scheduling_control->pucch1_snr[CC_id] - 640) / 10, UE_scheduling_control->pusch_tpc_accumulated[CC_id]); } RC.eNB[module_idP][CC_id]->pusch_stats_bsr[UE_id][(frameP * 10) + subframeP] = -63; diff --git a/openair2/LAYER2/MAC/eNB_scheduler_RA.c b/openair2/LAYER2/MAC/eNB_scheduler_RA.c index d1365b9ac3..273da77609 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_RA.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_RA.c @@ -483,8 +483,8 @@ void generate_Msg2(module_id_t module_idP, first_rb = 0; vrb_map[first_rb] = 1; vrb_map[first_rb + 1] = 1; - vrb_map[first_rb + 2] = 1; - vrb_map[first_rb + 3] = 1; + //vrb_map[first_rb + 2] = 1; + //vrb_map[first_rb + 3] = 1; memset((void *) dl_config_pdu, 0, sizeof(nfapi_dl_config_request_pdu_t)); dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE; dl_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_dl_config_dci_dl_pdu)); @@ -495,12 +495,12 @@ void generate_Msg2(module_id_t module_idP, dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type = 2; // RA-RNTI : see Table 4-10 from SCF082 - nFAPI specifications dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power = 6000; // equal to RS power dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.harq_process = 0; - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc = 1; // no TPC + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc = 0; // no TPC dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1 = 1; - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_1 = 0; + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_1 = 1; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_1 = 0; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.virtual_resource_block_assignment_flag = 0; - dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.resource_block_coding = getRIV(N_RB_DL, first_rb, 4); + dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.resource_block_coding = getRIV(N_RB_DL, first_rb, 2); // This checks if the above DCI allocation is feasible in current subframe if (!CCE_allocation_infeasible(module_idP, CC_idP, 0, subframeP, @@ -519,7 +519,7 @@ void generate_Msg2(module_id_t module_idP, dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.rnti = ra->RA_rnti; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_allocation_type = 2; // format 1A/1B/1D dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.virtual_resource_block_assignment_flag = 0; // localized - dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_block_coding = getRIV(N_RB_DL, first_rb, 4); + dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_block_coding = getRIV(N_RB_DL, first_rb, 2); dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.modulation = 2; //QPSK dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.redundancy_version = 0; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_blocks = 1; // first block @@ -1295,9 +1295,9 @@ initiate_ra_proc(module_id_t module_idP, prach_ParametersListCE_r13 = &ext4_prach->prach_ParametersListCE_r13; } - LOG_D(MAC, - "[eNB %d][RAPROC] CC_id %d Frame %d, Subframe %d Initiating RA procedure for preamble index %d\n", - module_idP, CC_id, frameP, subframeP, preamble_index); + LOG_I(MAC, + "[eNB %d][RAPROC] CC_id %d Frame %d, Subframe %d Initiating RA procedure for preamble index %d, timing offset %d\n", + module_idP, CC_id, frameP, subframeP, preamble_index, timing_offset); LOG_D(MAC, "[eNB %d][RAPROC] CC_id %d Frame %d, Subframe %d PRACH resource type %d\n", module_idP, CC_id, frameP, subframeP, rach_resource_type); @@ -1339,6 +1339,9 @@ initiate_ra_proc(module_id_t module_idP, abort(); case 1 : + case 3 : + case 4 : + case 5 : offset = 6; break; } diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c index 1f99f50ece..3dfab5baba 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c @@ -1066,18 +1066,21 @@ schedule_ue_spec(module_id_t module_idP, if (snr > target_snr + 4) { tpc = 0; //-1 + ue_sched_ctrl->pucch_tpc_accumulated[CC_id]--; } else if (snr < target_snr - 4) { tpc = 2; //+1 + ue_sched_ctrl->pucch_tpc_accumulated[CC_id]--; } else { tpc = 1; //0 } - LOG_D(MAC, "[eNB %d] DLSCH scheduler: frame %d, subframe %d, harq_pid %d, tpc %d, snr/target snr %d/%d (normal case)\n", + LOG_D(MAC, "[eNB %d] DLSCH scheduler: frame %d, subframe %d, harq_pid %d, tpc %d (accumulated %d), snr/target snr %d/%d (normal case)\n", module_idP, frameP, subframeP, harq_pid, tpc, + ue_sched_ctrl->pucch_tpc_accumulated[CC_id], snr, target_snr); } // Po_PUCCH has been updated diff --git a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c index f6220fa46d..2dcde6c852 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c @@ -47,7 +47,7 @@ #include "OCG_extern.h" #include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h" #include "rlc.h" - +#include "common/utils/lte/prach_utils.h" #include "T.h" @@ -1042,48 +1042,6 @@ void dlsch_scheduler_pre_processor_fairRR (module_id_t Mod_id, } } -#ifdef TM5 - - // This has to be revisited!!!! - for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) { - i1 = 0; - i2 = 0; - i3 = 0; - - for (j = 0; j < N_RBG[CC_id]; j++) { - if (MIMO_mode_indicator[CC_id][j] == 2) { - i1 = i1 + 1; - } else if (MIMO_mode_indicator[CC_id][j] == 1) { - i2 = i2 + 1; - } else if (MIMO_mode_indicator[CC_id][j] == 0) { - i3 = i3 + 1; - } - } - - if ((i1 < N_RBG[CC_id]) && (i2 > 0) && (i3 == 0)) { - PHY_vars_eNB_g[Mod_id][CC_id]->check_for_SUMIMO_transmissions = - PHY_vars_eNB_g[Mod_id][CC_id]-> - check_for_SUMIMO_transmissions + 1; - } - - if (i3 == N_RBG[CC_id] && i1 == 0 && i2 == 0) { - PHY_vars_eNB_g[Mod_id][CC_id]->FULL_MUMIMO_transmissions = - PHY_vars_eNB_g[Mod_id][CC_id]->FULL_MUMIMO_transmissions + - 1; - } - - if((i1 < N_RBG[CC_id]) && (i3 > 0)) { - PHY_vars_eNB_g[Mod_id][CC_id]-> - check_for_MUMIMO_transmissions + 1; - } - - PHY_vars_eNB_g[Mod_id][CC_id]->check_for_total_transmissions = - PHY_vars_eNB_g[Mod_id][CC_id]->check_for_total_transmissions + - 1; - } - -#endif - for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) { for (i = 0; i < dlsch_ue_select[CC_id].ue_num; i++) { if(dlsch_ue_select[CC_id].list[i].ue_priority == SCH_DL_MSG2) { @@ -1152,7 +1110,6 @@ schedule_ue_spec_fairRR(module_id_t module_idP, // int continue_flag = 0; int32_t snr, target_snr; int32_t tpc = 1; - static int32_t tpc_accumulated = 0; UE_sched_ctrl_t *ue_sched_ctl; int mcs; int i; @@ -1936,7 +1893,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP, //#ifdef DEBUG_eNB_SCHEDULER if (ta_update != 31) { - LOG_D(MAC, + LOG_I(MAC, "[eNB %d][DLSCH] Frame %d Generate header for UE_id %d on CC_id %d: sdu_length_total %d, num_sdus %d, sdu_lengths[0] %d, sdu_lcids[0] %d => payload offset %d,timing advance value : %d, padding %d,post_padding %d,(mcs %d, TBS %d, nb_rb %d),header_dcch %d, header_dtch %d\n", module_idP, frameP, UE_id, CC_id, sdu_length_total, num_sdus, sdu_lengths[0], @@ -2013,17 +1970,17 @@ schedule_ue_spec_fairRR(module_id_t module_idP, if (snr > target_snr + 4) { tpc = 0; //-1 - tpc_accumulated--; + ue_sched_ctl->pucch_tpc_accumulated[CC_id]--; } else if (snr < target_snr - 4) { tpc = 2; //+1 - tpc_accumulated++; + ue_sched_ctl->pucch_tpc_accumulated[CC_id]++; } else { tpc = 1; //0 } LOG_D(MAC,"[eNB %d] DLSCH scheduler: frame %d, subframe %d, harq_pid %d, tpc %d, accumulated %d, snr/target snr %d/%d\n", module_idP,frameP, subframeP,harq_pid,tpc, - tpc_accumulated,snr,target_snr); + ue_sched_ctl->pucch_tpc_accumulated[CC_id],snr,target_snr); } // Po_PUCCH has been updated else { tpc = 1; //0 @@ -2241,7 +2198,6 @@ void ulsch_scheduler_pre_ue_select_fairRR( uint8_t first_ue_id[MAX_NUM_CCs][20]; uint8_t ul_inactivity_num[MAX_NUM_CCs]; uint8_t ul_inactivity_id[MAX_NUM_CCs][20]={{0}}; - // LTE_DL_FRAME_PARMS *frame_parms; uint8_t ulsch_ue_max_num[MAX_NUM_CCs]; uint16_t saved_ulsch_dci[MAX_NUM_CCs]; rnti_t rnti; @@ -2564,7 +2520,6 @@ void ulsch_scheduler_pre_processor_fairRR(module_id_t module_idP, eNB_MAC_INST *eNB = RC.mac[module_idP]; UE_info_t *UE_info= &eNB->UE_info; UE_TEMPLATE *UE_template = NULL; - LTE_DL_FRAME_PARMS *frame_parms = NULL; uint8_t ue_num_temp; uint8_t total_rbs=0; uint8_t average_rbs; @@ -2583,18 +2538,17 @@ void ulsch_scheduler_pre_processor_fairRR(module_id_t module_idP, // MCS and RB assgin for ( CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++ ) { cc = &RC.mac[module_idP]->common_channels[CC_id]; - frame_parms = &(RC.eNB[module_idP][CC_id]->frame_parms); - + int N_RB_UL = to_prb(cc->ul_Bandwidth); if (cc->tdd_Config) { //TDD - if (frame_parms->N_RB_UL == 25) { + if (N_RB_UL == 25) { num_pucch_rb = 1; - } else if (frame_parms->N_RB_UL == 50) { + } else if (N_RB_UL == 50) { num_pucch_rb = 2; } else { num_pucch_rb = 3; } } else {//FDD - if (frame_parms->N_RB_UL == 25) { + if (N_RB_UL == 25) { num_pucch_rb = 1; } else { num_pucch_rb = 2; @@ -2619,13 +2573,13 @@ void ulsch_scheduler_pre_processor_fairRR(module_id_t module_idP, continue; } - if (first_rb[CC_id] >= frame_parms->N_RB_UL-num_pucch_rb ) { + if (first_rb[CC_id] >= N_RB_UL-num_pucch_rb ) { LOG_W(MAC,"[eNB %d] frame %d subframe %d, UE %d/%x CC %d: dropping, not enough RBs\n", module_idP,frameP,subframeP,UE_id,UE_RNTI(CC_id,UE_id),CC_id); break; } - total_rbs = frame_parms->N_RB_UL-num_pucch_rb-first_rb[CC_id]; + total_rbs = N_RB_UL-num_pucch_rb-first_rb[CC_id]; average_rbs = (int)round((double)total_rbs/(double)ue_num_temp); if ( average_rbs < 3 ) { @@ -2677,21 +2631,24 @@ void ulsch_scheduler_pre_processor_fairRR(module_id_t module_idP, if ( ulsch_ue_select[CC_id].list[ulsch_ue_num].ul_total_buffer > 0 ) { rb_table_index = 2; tbs = get_TBS_UL(mcs,rb_table[rb_table_index]); - tx_power= estimate_ue_tx_power(tbs*8,rb_table[rb_table_index],0,frame_parms->Ncp,0); + tx_power= estimate_ue_tx_power(0,tbs*8,rb_table[rb_table_index],0,cc->Ncp,0); while ( (((UE_template->phr_info - tx_power) < 0 ) || (tbs > bytes_to_schedule)) && (mcs > 3) ) { mcs--; tbs = get_TBS_UL(mcs,rb_table[rb_table_index]); - tx_power= estimate_ue_tx_power(tbs*8,rb_table[rb_table_index],0,frame_parms->Ncp,0); + tx_power= estimate_ue_tx_power(0,tbs*8,rb_table[rb_table_index],0,cc->Ncp,0); } - while ( (tbs < bytes_to_schedule) && (rb_table[rb_table_index]<(frame_parms->N_RB_UL-num_pucch_rb-first_rb[CC_id])) && + while ( (tbs < bytes_to_schedule) && (rb_table[rb_table_index]<(N_RB_UL-num_pucch_rb-first_rb[CC_id])) && ((UE_template->phr_info - tx_power) > 0) && (rb_table_index < 32 )) { rb_table_index++; tbs = get_TBS_UL(mcs,rb_table[rb_table_index]); - tx_power= estimate_ue_tx_power(tbs*8,rb_table[rb_table_index],0,frame_parms->Ncp,0); + tx_power= estimate_ue_tx_power(0,tbs*8,rb_table[rb_table_index],0,cc->Ncp,0); } - + if (rb_table[rb_table_index]>40) LOG_I(MAC,"bytes_to_schedule %d, nb_rb %d tx_power %d PHR %d\n", + bytes_to_schedule,rb_table[rb_table_index], + estimate_ue_tx_power(0,tbs*8,rb_table[rb_table_index],0,cc->Ncp,0), + UE_template->phr_info); if ( rb_table[rb_table_index]<3 ) { rb_table_index=2; } @@ -2834,12 +2791,10 @@ schedule_ulsch_fairRR(module_id_t module_idP, frame_t frameP, ULSCH_UE_SELECT ulsch_ue_select[MAX_NUM_CCs]; memset(ulsch_ue_select, 0, sizeof(ulsch_ue_select)); - LTE_DL_FRAME_PARMS *frame_parms ; for (CC_id=0; CC_idcommon_channels[CC_id]; - frame_parms= &RC.eNB[module_idP][CC_id]->frame_parms; - + int N_RB_UL=to_prb(cc->ul_Bandwidth); // output of scheduling, the UE numbers in RBs, where it is in the code??? // check if RA (Msg3) is active in this subframeP, if so skip the PRBs used for Msg3 // Msg3 is using 1 PRB so we need to increase first_rb accordingly @@ -2849,13 +2804,13 @@ schedule_ulsch_fairRR(module_id_t module_idP, frame_t frameP, ulsch_ue_select[CC_id].list[ulsch_ue_select[CC_id].ue_num].ue_priority = SCH_UL_MSG3; if (cc->tdd_Config == NULL) { - if(frame_parms->N_RB_UL == 25) { + if(N_RB_UL == 25) { ulsch_ue_select[CC_id].list[ulsch_ue_select[CC_id].ue_num].start_rb = 1; } else { ulsch_ue_select[CC_id].list[ulsch_ue_select[CC_id].ue_num].start_rb = 2; } } else { - switch(frame_parms->N_RB_UL) { + switch(N_RB_UL) { case 25: default: ulsch_ue_select[CC_id].list[ulsch_ue_select[CC_id].ue_num].start_rb = 1; @@ -2879,14 +2834,18 @@ schedule_ulsch_fairRR(module_id_t module_idP, frame_t frameP, } //PRACH - if (is_prach_subframe(frame_parms,sched_frame,sched_subframe)==1) { + if (is_prach_subframe0(cc->tdd_Config!=NULL ? cc->tdd_Config->subframeAssignment : 0,cc->tdd_Config!=NULL ? 1 : 0, + cc->radioResourceConfigCommon->prach_Config.prach_ConfigInfo.prach_ConfigIndex, + sched_frame,sched_subframe)==1) { ulsch_ue_select[CC_id].list[ulsch_ue_select[CC_id].ue_num].ue_priority = SCH_UL_PRACH; - ulsch_ue_select[CC_id].list[ulsch_ue_select[CC_id].ue_num].start_rb = get_prach_prb_offset( - frame_parms, - frame_parms->prach_config_common.prach_ConfigInfo.prach_ConfigIndex, - frame_parms->prach_config_common.prach_ConfigInfo.prach_FreqOffset, - 0,//tdd_mapindex - frameP); //Nf --> shouldn't it be sched_frame ??? + ulsch_ue_select[CC_id].list[ulsch_ue_select[CC_id].ue_num].start_rb = + get_prach_prb_offset(cc->tdd_Config!=NULL ? 1 : 0, + cc->tdd_Config!=NULL ? cc->tdd_Config->subframeAssignment : 0, + to_prb(cc->ul_Bandwidth), + cc->radioResourceConfigCommon->prach_Config.prach_ConfigInfo.prach_ConfigIndex, + cc->radioResourceConfigCommon->prach_Config.prach_ConfigInfo.prach_FreqOffset, + 0, + sched_frame); ulsch_ue_select[CC_id].list[ulsch_ue_select[CC_id].ue_num].nb_rb = 6; ulsch_ue_select[CC_id].list[ulsch_ue_select[CC_id].ue_num].UE_id = -1; ulsch_ue_select[CC_id].ue_num++; @@ -2914,7 +2873,6 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP, uint32_t cqi_req,cshift,ndi,tpc; int32_t snr; int32_t target_snr=0; - static int32_t tpc_accumulated=0; int CC_id,ulsch_ue_num; int N_RB_UL; eNB_MAC_INST *eNB = RC.mac[module_idP]; @@ -3095,10 +3053,10 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP, if (snr > target_snr + 4) { tpc = 0; //-1 - tpc_accumulated--; + UE_sched_ctrl->pusch_tpc_accumulated[CC_id]--; } else if (snr < target_snr - 4) { tpc = 2; //+1 - tpc_accumulated++; + UE_sched_ctrl->pusch_tpc_accumulated[CC_id]++; } else { tpc = 1; //0 } @@ -3109,7 +3067,7 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP, if (tpc!=1) { LOG_D(MAC,"[eNB %d] ULSCH schedulerRR: frame %d, subframe %d, harq_pid %d, tpc %d, accumulated %d, snr/target snr %d/%d\n", module_idP,frameP,subframeP,harq_pid,tpc, - tpc_accumulated,snr,target_snr); + UE_sched_ctrl->pusch_tpc_accumulated[CC_id],snr,target_snr); } // new transmission diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c index b62df74082..b941f60458 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c @@ -57,7 +57,7 @@ #include "flexran_agent_mac.h" #include #include - +#include "common/utils/lte/prach_utils.h" #include "T.h" @@ -144,16 +144,18 @@ rx_sdu(const module_id_t enb_mod_idP, if (UE_id != -1) { UE_scheduling_control = &UE_info->UE_sched_ctrl[UE_id]; UE_template_ptr = &UE_info->UE_template[CC_idP][UE_id]; - LOG_D(MAC, "[eNB %d][PUSCH %d] CC_id %d %d.%d Received ULSCH sdu round %d from PHY (rnti %x, UE_id %d) ul_cqi %d\n", + LOG_D(MAC, "[eNB %d][PUSCH %d] CC_id %d %d.%d Received ULSCH (%s) sdu round %d from PHY (rnti %x, UE_id %d) ul_cqi %d, timing_advance %d\n", enb_mod_idP, harq_pid, CC_idP, frameP, subframeP, + sduP==NULL ? "in error" : "OK", UE_scheduling_control->round_UL[CC_idP][harq_pid], current_rnti, UE_id, - ul_cqi); + ul_cqi, + timing_advance); AssertFatal(UE_scheduling_control->round_UL[CC_idP][harq_pid] < 8, "round >= 8\n"); if (sduP != NULL) { @@ -270,14 +272,17 @@ rx_sdu(const module_id_t enb_mod_idP, AssertFatal(mac->common_channels[CC_idP].radioResourceConfigCommon->rach_ConfigCommon.maxHARQ_Msg3Tx > 1, "maxHARQ %d should be greater than 1\n", (int) mac->common_channels[CC_idP].radioResourceConfigCommon->rach_ConfigCommon.maxHARQ_Msg3Tx); - LOG_D(MAC, "[eNB %d][PUSCH %d] CC_id %d [RAPROC Msg3] Received ULSCH sdu round %d from PHY (rnti %x, RA_id %d) ul_cqi %d\n", + LOG_I(MAC, "[eNB %d][PUSCH %d] CC_id %d [RAPROC Msg3] Received ULSCH sdu (%s) round %d from PHY (rnti %x, RA_id %d) ul_cqi %d, timing advance %d\n", enb_mod_idP, harq_pid, CC_idP, + sduP!=NULL ? "OK" : "in error", ra->msg3_round, current_rnti, RA_id, - ul_cqi); + ul_cqi, + timing_advance); + first_rb = ra->msg3_first_rb; if (sduP == NULL) { // we've got an error on Msg3 @@ -1214,16 +1219,19 @@ schedule_ulsch(module_id_t module_idP, /* Note: RC.nb_mac_CC[module_idP] should be lower than or equal to NFAPI_CC_MAX */ for (int CC_id = 0; CC_id < RC.nb_mac_CC[module_idP]; CC_id++, cc++) { - LTE_DL_FRAME_PARMS *frame_parms = &RC.eNB[module_idP][CC_id]->frame_parms; - if (is_prach_subframe(frame_parms, sched_frame, sched_subframe)) { - int start_rb = get_prach_prb_offset( - frame_parms, - frame_parms->prach_config_common.prach_ConfigInfo.prach_ConfigIndex, - frame_parms->prach_config_common.prach_ConfigInfo.prach_FreqOffset, - 0, // tdd_mapindex - sched_frame); // Nf + + if (is_prach_subframe0(cc->tdd_Config!=NULL ? cc->tdd_Config->subframeAssignment : 0,cc->tdd_Config!=NULL ? 1 : 0, + cc->radioResourceConfigCommon->prach_Config.prach_ConfigInfo.prach_ConfigIndex, + sched_frame, sched_subframe)) { + int start_rb = get_prach_prb_offset(cc->tdd_Config!=NULL ? 1 : 0, + cc->tdd_Config!=NULL ? cc->tdd_Config->subframeAssignment : 0, + to_prb(cc->ul_Bandwidth), + cc->radioResourceConfigCommon->prach_Config.prach_ConfigInfo.prach_ConfigIndex, + cc->radioResourceConfigCommon->prach_Config.prach_ConfigInfo.prach_FreqOffset, + 0, // tdd_mapindex + sched_frame); // Nf for (int i = 0; i < 6; i++) - cc[CC_id].vrb_map_UL[start_rb + i] = 1; + cc->vrb_map_UL[start_rb + i] = 1; } /* HACK: let's remove the PUCCH from available RBs @@ -1235,24 +1243,24 @@ schedule_ulsch(module_id_t module_idP, */ switch (to_prb(cc[CC_id].ul_Bandwidth)) { case 25: - cc[CC_id].vrb_map_UL[0] = 1; - cc[CC_id].vrb_map_UL[24] = 1; + cc->vrb_map_UL[0] = 1; + cc->vrb_map_UL[24] = 1; break; case 50: - cc[CC_id].vrb_map_UL[0] = 1; - cc[CC_id].vrb_map_UL[1] = 1; - cc[CC_id].vrb_map_UL[48] = 1; - cc[CC_id].vrb_map_UL[49] = 1; + cc->vrb_map_UL[0] = 1; + cc->vrb_map_UL[1] = 1; + cc->vrb_map_UL[48] = 1; + cc->vrb_map_UL[49] = 1; break; case 100: - cc[CC_id].vrb_map_UL[0] = 1; - cc[CC_id].vrb_map_UL[1] = 1; - cc[CC_id].vrb_map_UL[2] = 1; - cc[CC_id].vrb_map_UL[97] = 1; - cc[CC_id].vrb_map_UL[98] = 1; - cc[CC_id].vrb_map_UL[99] = 1; + cc->vrb_map_UL[0] = 1; + cc->vrb_map_UL[1] = 1; + cc->vrb_map_UL[2] = 1; + cc->vrb_map_UL[97] = 1; + cc->vrb_map_UL[98] = 1; + cc->vrb_map_UL[99] = 1; break; default: @@ -1270,6 +1278,8 @@ schedule_ulsch(module_id_t module_idP, /* * Schedule the DCI0 for ULSCH */ + + void schedule_ulsch_rnti(module_id_t module_idP, int CC_id, @@ -1277,7 +1287,6 @@ schedule_ulsch_rnti(module_id_t module_idP, sub_frame_t subframeP, unsigned char sched_subframeP) { /* TODO: does this need to be static? */ - static int32_t tpc_accumulated = 0; /* values from 0 to 7 can be used for mapping the cyclic shift * (36.211 , Table 5.5.2.1.1-1) */ const uint32_t cshift = 0; @@ -1401,8 +1410,7 @@ schedule_ulsch_rnti(module_id_t module_idP, /* Power control */ /* * Compute the expected ULSCH RX snr (for the stats) - * This is the normalized RX snr and this should be constant (regardless - * of mcs) Is not in dBm, unit from nfapi, converting to dBm + * */ const int32_t snr = (5 * UE_sched_ctrl_ptr->pusch_snr[CC_id] - 640) / 10; const int32_t target_snr = mac->puSch10xSnr / 10; @@ -1423,10 +1431,10 @@ schedule_ulsch_rnti(module_id_t module_idP, if (snr > target_snr + 4) { tpc = 0; // -1 - tpc_accumulated--; + UE_sched_ctrl_ptr->pusch_tpc_accumulated[CC_id]--; } else if (snr < target_snr - 4) { tpc = 2; // +1 - tpc_accumulated++; + UE_sched_ctrl_ptr->pusch_tpc_accumulated[CC_id]++; } } if (tpc != 1) { @@ -1438,7 +1446,7 @@ schedule_ulsch_rnti(module_id_t module_idP, subframeP, harq_pid, tpc, - tpc_accumulated, + UE_sched_ctrl_ptr->pusch_tpc_accumulated[CC_id], snr, target_snr); } @@ -1998,10 +2006,10 @@ void schedule_ulsch_rnti_emtc(module_id_t module_idP, if (snr > target_snr + 4) { tpc = 0; //-1 - UE_sched_ctrl->tpc_accumulated[CC_id]--; + UE_sched_ctrl->pusch_tpc_accumulated[CC_id]--; } else if (snr < target_snr - 4) { tpc = 2; //+1 - UE_sched_ctrl->tpc_accumulated[CC_id]++; + UE_sched_ctrl->pusch_tpc_accumulated[CC_id]++; } else { tpc = 1; //0 } @@ -2016,7 +2024,7 @@ void schedule_ulsch_rnti_emtc(module_id_t module_idP, subframeP, harq_pid, tpc, - UE_sched_ctrl->tpc_accumulated[CC_id], + UE_sched_ctrl->pusch_tpc_accumulated[CC_id], snr, target_snr); } diff --git a/openair2/LAYER2/MAC/mac.h b/openair2/LAYER2/MAC/mac.h index 7eccc6222d..30714bd5a9 100644 --- a/openair2/LAYER2/MAC/mac.h +++ b/openair2/LAYER2/MAC/mac.h @@ -775,7 +775,6 @@ typedef struct { uint32_t num_mac_sdu_rx; // Length of SDU Got from LC UL - Size array can be refined uint32_t sdu_length_rx[NB_RB_MAX]; - } eNB_UE_STATS; /*! \brief eNB template for UE context information */ @@ -964,7 +963,8 @@ typedef struct { uint16_t feedback_cnt[NFAPI_CC_MAX]; uint16_t timing_advance; uint16_t timing_advance_r9; - uint8_t tpc_accumulated[NFAPI_CC_MAX]; + int8_t pusch_tpc_accumulated[NFAPI_CC_MAX]; + int8_t pucch_tpc_accumulated[NFAPI_CC_MAX]; uint8_t periodic_wideband_cqi[NFAPI_CC_MAX]; uint8_t periodic_wideband_spatial_diffcqi[NFAPI_CC_MAX]; uint8_t periodic_wideband_pmi[NFAPI_CC_MAX]; diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c index e720c1dfec..0ce8a3115c 100644 --- a/openair2/LAYER2/MAC/pre_processor.c +++ b/openair2/LAYER2/MAC/pre_processor.c @@ -730,13 +730,13 @@ void calculate_max_mcs_min_rb(module_id_t mod_id, int tbs = get_TBS_UL(*mcs, rb_table[*rb_index]); // fixme: set use_srs flag - *tx_power = estimate_ue_tx_power(tbs * 8, rb_table[*rb_index], 0, Ncp, 0); + *tx_power = estimate_ue_tx_power(0,tbs * 8, rb_table[*rb_index], 0, Ncp, 0); /* find maximum MCS */ while ((phr - *tx_power < 0 || tbs > bytes) && *mcs > 3) { mcs--; tbs = get_TBS_UL(*mcs, rb_table[*rb_index]); - *tx_power = estimate_ue_tx_power(tbs * 8, rb_table[*rb_index], 0, Ncp, 0); + *tx_power = estimate_ue_tx_power(0,tbs * 8, rb_table[*rb_index], 0, Ncp, 0); } /* find minimum necessary RBs */ @@ -746,7 +746,7 @@ void calculate_max_mcs_min_rb(module_id_t mod_id, && phr - *tx_power > 0) { (*rb_index)++; tbs = get_TBS_UL(*mcs, rb_table[*rb_index]); - *tx_power = estimate_ue_tx_power(tbs * 8, rb_table[*rb_index], 0, Ncp, 0); + *tx_power = estimate_ue_tx_power(0,tbs * 8, rb_table[*rb_index], 0, Ncp, 0); } /* Decrease if we went to far in last iteration */ diff --git a/openair2/LAYER2/MAC/rar_tools.c b/openair2/LAYER2/MAC/rar_tools.c index 23ac209389..d48952318a 100644 --- a/openair2/LAYER2/MAC/rar_tools.c +++ b/openair2/LAYER2/MAC/rar_tools.c @@ -67,8 +67,10 @@ fill_rar(const module_id_t module_idP, rar[5] = (uint8_t) (ra->rnti & 0xff); //ra->timing_offset = 0; ra->timing_offset /= 16; //T_A = N_TA/16, where N_TA should be on a 30.72Msps - rar[0] = (uint8_t) (ra->timing_offset >> (2 + 4)); // 7 MSBs of timing advance + divide by 4 - rar[1] = (uint8_t) (ra->timing_offset << (4 - 2)) & 0xf0; // 4 LSBs of timing advance + divide by 4 + //rar[0] = (uint8_t) (ra->timing_offset >> (2 + 4)); // 7 MSBs of timing advance + divide by 4 + //rar[1] = (uint8_t) (ra->timing_offset << (4 - 2)) & 0xf0; // 4 LSBs of timing advance + divide by 4 + rar[0] = (uint8_t) (ra->timing_offset >> (4)); // 7 MSBs of timing advance + divide by 4 + rar[1] = (uint8_t) (ra->timing_offset << (4)) & 0xf0; // 4 LSBs of timing advance + divide by 4 COMMON_channels_t *cc = &RC.mac[module_idP]->common_channels[CC_id]; if(N_RB_UL == 25) { diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c index dd69cc95e1..2591ab139d 100644 --- a/targets/RT/USER/lte-enb.c +++ b/targets/RT/USER/lte-enb.c @@ -331,6 +331,7 @@ static void *L1_thread_tx(void *param) { //wait_sync("tx_thread"); + proc->respEncode = eNB->proc.L1_proc.respEncode; while (!oai_exit) { LOG_D(PHY,"Waiting for TX (IC %d)\n",proc->instance_cnt); @@ -391,6 +392,8 @@ static void *L1_thread( void *param ) { } PHY_VARS_eNB *eNB = RC.eNB[0][proc->CC_id]; + + char thread_name[100]; cpu_set_t cpuset; CPU_ZERO(&cpuset); From 79d0f7774fb22c91206c4450fb815443e5f177c0 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Thu, 24 Dec 2020 16:14:56 +0100 Subject: [PATCH 017/579] added missing files --- common/utils/lte/prach_utils.c | 425 +++++++++++++++++++++++++++++++++ common/utils/lte/prach_utils.h | 40 ++++ 2 files changed, 465 insertions(+) create mode 100644 common/utils/lte/prach_utils.c create mode 100644 common/utils/lte/prach_utils.h diff --git a/common/utils/lte/prach_utils.c b/common/utils/lte/prach_utils.c new file mode 100644 index 0000000000..9ef29e55a5 --- /dev/null +++ b/common/utils/lte/prach_utils.c @@ -0,0 +1,425 @@ +/* + * 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 common/utils/lte/prach_utils.c + * \brief utils for PRACH common to both PHY and MAC + * \author R. Knopp + * \date 2020 + * \version 0.1 + * \company Eurecom + * \email: knopp@eurecom.fr + * \note + * \warning + */ + +#include + + +#include "PHY/LTE_TRANSPORT/transport_common.h" + +// This is table 5.7.1-4 from 36.211 +PRACH_TDD_PREAMBLE_MAP tdd_preamble_map[64][7] = { + // TDD Configuration Index 0 + { {1,{{0,1,0,2}}},{1,{{0,1,0,1}}}, {1,{{0,1,0,0}}}, {1,{{0,1,0,2}}}, {1,{{0,1,0,1}}}, {1,{{0,1,0,0}}}, {1,{{0,1,0,2}}}}, + // TDD Configuration Index 1 + { {1,{{0,2,0,2}}},{1,{{0,2,0,1}}}, {1,{{0,2,0,0}}}, {1,{{0,2,0,2}}}, {1,{{0,2,0,1}}}, {1,{{0,2,0,0}}}, {1,{{0,2,0,2}}}}, + // TDD Configuration Index 2 + { {1,{{0,1,1,2}}},{1,{{0,1,1,1}}}, {1,{{0,1,1,0}}}, {1,{{0,1,0,1}}}, {1,{{0,1,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,1,1,1}}}}, + // TDD Configuration Index 3 + { {1,{{0,0,0,2}}},{1,{{0,0,0,1}}}, {1,{{0,0,0,0}}}, {1,{{0,0,0,2}}}, {1,{{0,0,0,1}}}, {1,{{0,0,0,0}}}, {1,{{0,0,0,2}}}}, + // TDD Configuration Index 4 + { {1,{{0,0,1,2}}},{1,{{0,0,1,1}}}, {1,{{0,0,1,0}}}, {1,{{0,0,0,1}}}, {1,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,0,1,1}}}}, + // TDD Configuration Index 5 + { {1,{{0,0,0,1}}},{1,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,0,0,1}}}}, + // TDD Configuration Index 6 + { {2,{{0,0,0,2},{0,0,1,2}}}, {2,{{0,0,0,1},{0,0,1,1}}}, {2,{{0,0,0,0},{0,0,1,0}}}, {2,{{0,0,0,1},{0,0,0,2}}}, {2,{{0,0,0,0},{0,0,0,1}}}, {2,{{0,0,0,0},{1,0,0,0}}}, {2,{{0,0,0,2},{0,0,1,1}}}}, + // TDD Configuration Index 7 + { {2,{{0,0,0,1},{0,0,1,1}}}, {2,{{0,0,0,0},{0,0,1,0}}}, {0,{{0,0,0,0},{0,0,0,0}}}, {2,{{0,0,0,0},{0,0,0,2}}}, {0,{{0,0,0,0},{0,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0}}}, {2,{{0,0,0,1},{0,0,1,0}}}}, + // TDD Configuration Index 8 + { {2,{{0,0,0,0},{0,0,1,0}}}, {0,{{0,0,0,0},{0,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0}}}, {2,{{0,0,0,0},{0,0,0,1}}}, {0,{{0,0,0,0},{0,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0}}}, {2,{{0,0,0,0},{0,0,1,1}}}}, + // TDD Configuration Index 9 + { {3,{{0,0,0,1},{0,0,0,2},{0,0,1,2}}}, {3,{{0,0,0,0},{0,0,0,1},{0,0,1,1}}}, {3,{{0,0,0,0},{0,0,1,0},{1,0,0,0}}}, {3,{{0,0,0,0},{0,0,0,1},{0,0,0,2}}}, {3,{{0,0,0,0},{0,0,0,1},{1,0,0,1}}}, {3,{{0,0,0,0},{1,0,0,0},{2,0,0,0}}}, {3,{{0,0,0,1},{0,0,0,2},{0,0,1,1}}}}, + // TDD Configuration Index 10 + { {3,{{0,0,0,0},{0,0,1,0},{0,0,1,1}}}, {3,{{0,0,0,1},{0,0,1,0},{0,0,1,1}}}, {3,{{0,0,0,0},{0,0,1,0},{1,0,1,0}}}, {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, {3,{{0,0,0,0},{0,0,0,1},{1,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, {3,{{0,0,0,0},{0,0,0,2},{0,0,1,0}}}}, + // TDD Configuration Index 11 + { {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, {3,{{0,0,0,0},{0,0,0,1},{0,0,1,0}}}, {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, {3,{{0,0,0,1},{0,0,1,0},{0,0,1,1}}}}, + // TDD Configuration Index 12 + { {4,{{0,0,0,1},{0,0,0,2},{0,0,1,1},{0,0,1,2}}}, {4,{{0,0,0,0},{0,0,0,1},{0,0,1,0},{0,0,1,1}}}, + {4,{{0,0,0,0},{0,0,1,0},{1,0,0,0},{1,0,1,0}}}, + {4,{{0,0,0,0},{0,0,0,1},{0,0,0,2},{1,0,0,2}}}, + {4,{{0,0,0,0},{0,0,0,1},{1,0,0,0},{1,0,0,1}}}, + {4,{{0,0,0,0},{1,0,0,0},{2,0,0,0},{3,0,0,0}}}, + {4,{{0,0,0,1},{0,0,0,2},{0,0,1,0},{0,0,1,1}}} + }, + // TDD Configuration Index 13 + { {4,{{0,0,0,0},{0,0,0,2},{0,0,1,0},{0,0,1,2}}}, {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, + {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, + {4,{{0,0,0,0},{0,0,0,1},{0,0,0,2},{1,0,0,1}}}, + {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, + {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, + {4,{{0,0,0,0},{0,0,0,1},{0,0,0,2},{0,0,1,1}}} + }, + // TDD Configuration Index 14 + { {4,{{0,0,0,0},{0,0,0,1},{0,0,1,0},{0,0,1,1}}}, {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, + {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, + {4,{{0,0,0,0},{0,0,0,1},{0,0,0,2},{1,0,0,0}}}, + {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, + {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, + {4,{{0,0,0,0},{0,0,0,2},{0,0,1,0},{0,0,1,1}}} + }, + // TDD Configuration Index 15 + { {5,{{0,0,0,0},{0,0,0,1},{0,0,0,2},{0,0,1,1},{0,0,1,2}}}, {5,{{0,0,0,0},{0,0,0,1},{0,0,1,0},{0,0,1,1},{1,0,0,1}}}, + {5,{{0,0,0,0},{0,0,1,0},{1,0,0,0},{1,0,1,0},{2,0,0,0}}}, {5,{{0,0,0,0},{0,0,0,1},{0,0,0,2},{1,0,0,1},{1,0,0,2}}}, + {5,{{0,0,0,0},{0,0,0,1},{1,0,0,0},{1,0,0,1},{2,0,0,1}}}, {5,{{0,0,0,0},{1,0,0,0},{2,0,0,0},{3,0,0,0},{4,0,0,0}}}, + {5,{{0,0,0,0},{0,0,0,1},{0,0,0,2},{0,0,1,0},{0,0,1,1}}} + }, + // TDD Configuration Index 16 + { {5,{{0,0,0,1},{0,0,0,2},{0,0,1,0},{0,0,1,1},{0,0,1,2}}}, {5,{{0,0,0,0},{0,0,0,1},{0,0,1,0},{0,0,1,1},{1,0,1,1}}}, + {5,{{0,0,0,0},{0,0,1,0},{1,0,0,0},{1,0,1,0},{2,0,1,0}}}, {5,{{0,0,0,0},{0,0,0,1},{0,0,0,2},{1,0,0,0},{1,0,0,2}}}, + {5,{{0,0,0,0},{0,0,0,1},{1,0,0,0},{1,0,0,1},{2,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, + {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}} + }, + // TDD Configuration Index 17 + { {5,{{0,0,0,0},{0,0,0,1},{0,0,0,2},{0,0,1,0},{0,0,1,2}}}, {5,{{0,0,0,0},{0,0,0,1},{0,0,1,0},{0,0,1,1},{1,0,0,0}}}, + {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, {5,{{0,0,0,0},{0,0,0,1},{0,0,0,2},{1,0,0,0},{1,0,0,1}}}, + {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, + {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}} + }, + // TDD Configuration Index 18 + { {6,{{0,0,0,0},{0,0,0,1},{0,0,0,2},{0,0,1,0},{0,0,1,1},{0,0,1,2}}}, + {6,{{0,0,0,0},{0,0,0,1},{0,0,1,0},{0,0,1,1},{1,0,0,1},{1,0,1,1}}}, + {6,{{0,0,0,0},{0,0,1,0},{1,0,0,0},{1,0,1,0},{2,0,0,0},{2,0,1,0}}}, + {6,{{0,0,0,0},{0,0,0,1},{0,0,0,2},{1,0,0,0},{1,0,0,1},{1,0,0,2}}}, + {6,{{0,0,0,0},{0,0,0,1},{1,0,0,0},{1,0,0,1},{2,0,0,0},{2,0,0,1}}}, + {6,{{0,0,0,0},{1,0,0,0},{2,0,0,0},{3,0,0,0},{4,0,0,0},{5,0,0,0}}}, + {6,{{0,0,0,0},{0,0,0,1},{0,0,0,2},{0,0,1,0},{0,0,1,1},{1,0,0,2}}} + }, + // TDD Configuration Index 19 + { {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, + {6,{{0,0,0,0},{0,0,0,1},{0,0,1,0},{0,0,1,1},{1,0,0,0},{1,0,1,0}}}, + {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, + {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, + {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, + {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, + {6,{{0,0,0,0},{0,0,0,1},{0,0,0,2},{0,0,1,0},{0,0,1,1},{1,0,1,1}}} + }, + // TDD Configuration Index 20 + { {1,{{0,1,0,1}}},{1,{{0,1,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,1,0,1}}}, {1,{{0,1,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,1,0,1}}}}, + // TDD Configuration Index 21 + { {1,{{0,2,0,1}}},{1,{{0,2,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,2,0,1}}}, {1,{{0,2,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,2,0,1}}}}, + + // TDD Configuration Index 22 + { {1,{{0,1,1,1}}},{1,{{0,1,1,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,1,1,0}}}}, + + // TDD Configuration Index 23 + { {1,{{0,0,0,1}}},{1,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,0,0,1}}}, {1,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,0,0,1}}}}, + + // TDD Configuration Index 24 + { {1,{{0,0,1,1}}},{1,{{0,0,1,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,0,1,0}}}}, + + // TDD Configuration Index 25 + { {2,{{0,0,0,1},{0,0,1,1}}}, {2,{{0,0,0,0},{0,0,1,0}}}, {0,{{0,0,0,0},{0,0,0,0}}}, {2,{{0,0,0,1},{1,0,0,1}}}, {2,{{0,0,0,0},{1,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0}}}, {2,{{0,0,0,1},{0,0,1,0}}}}, + + // TDD Configuration Index 26 + { {3,{{0,0,0,1},{0,0,1,1},{1,0,0,1}}}, {3,{{0,0,0,0},{0,0,1,0},{1,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, {3,{{0,0,0,1},{1,0,0,1},{2,0,0,1}}}, {3,{{0,0,0,0},{1,0,0,0},{2,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, {3,{{0,0,0,1},{0,0,1,0},{1,0,0,1}}}}, + + // TDD Configuration Index 27 + { {4,{{0,0,0,1},{0,0,1,1},{1,0,0,1},{1,0,1,1}}}, {4,{{0,0,0,0},{0,0,1,0},{1,0,0,0},{1,0,1,0}}}, + {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, + {4,{{0,0,0,1},{1,0,0,1},{2,0,0,1},{3,0,0,1}}}, + {4,{{0,0,0,0},{1,0,0,0},{2,0,0,0},{3,0,0,0}}}, + {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, + {4,{{0,0,0,1},{0,0,1,0},{1,0,0,1},{1,0,1,0}}} + }, + + // TDD Configuration Index 28 + { {5,{{0,0,0,1},{0,0,1,1},{1,0,0,1},{1,0,1,1},{2,0,0,1}}}, {5,{{0,0,0,0},{0,0,1,0},{1,0,0,0},{1,0,1,0},{2,0,0,0}}}, + {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, {5,{{0,0,0,1},{1,0,0,1},{2,0,0,1},{3,0,0,1},{4,0,0,1}}}, + {5,{{0,0,0,0},{1,0,0,0},{2,0,0,0},{3,0,0,0},{4,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, + {5,{{0,0,0,1},{0,0,1,0},{1,0,0,1},{1,0,1,0},{2,0,0,1}}} + }, + + // TDD Configuration Index 29 + { {6,{{0,0,0,1},{0,0,1,1},{1,0,0,1},{1,0,1,1},{2,0,0,1},{2,0,1,1}}}, + {6,{{0,0,0,0},{0,0,1,0},{1,0,0,0},{1,0,1,0},{2,0,0,0},{2,0,1,0}}}, + {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, + {6,{{0,0,0,1},{1,0,0,1},{2,0,0,1},{3,0,0,1},{4,0,0,1},{5,0,0,1}}}, + {6,{{0,0,0,0},{1,0,0,0},{2,0,0,0},{3,0,0,0},{4,0,0,0},{5,0,0,0}}}, + {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, + {6,{{0,0,0,1},{0,0,1,0},{1,0,0,1},{1,0,1,0},{2,0,0,1},{2,0,1,0}}} + }, + + + // TDD Configuration Index 30 + { {1,{{0,1,0,1}}},{1,{{0,1,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,1,0,1}}}, {1,{{0,1,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,1,0,1}}}}, + + // TDD Configuration Index 31 + { {1,{{0,2,0,1}}},{1,{{0,2,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,2,0,1}}}, {1,{{0,2,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,2,0,1}}}}, + + // TDD Configuration Index 32 + { {1,{{0,1,1,1}}},{1,{{0,1,1,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,1,1,0}}}}, + + // TDD Configuration Index 33 + { {1,{{0,0,0,1}}},{1,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,0,0,1}}}, {1,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,0,0,1}}}}, + + // TDD Configuration Index 34 + { {1,{{0,0,1,1}}},{1,{{0,0,1,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,0,1,0}}}}, + + // TDD Configuration Index 35 + { {2,{{0,0,0,1},{0,0,1,1}}}, {2,{{0,0,0,0},{0,0,1,0}}}, {0,{{0,0,0,0},{0,0,0,0}}}, {2,{{0,0,0,1},{1,0,0,1}}}, {2,{{0,0,0,0},{1,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0}}}, {2,{{0,0,0,1},{0,0,1,0}}}}, + + // TDD Configuration Index 36 + { {3,{{0,0,0,1},{0,0,1,1},{1,0,0,1}}}, {3,{{0,0,0,0},{0,0,1,0},{1,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, {3,{{0,0,0,1},{1,0,0,1},{2,0,0,1}}}, {3,{{0,0,0,0},{1,0,0,0},{2,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, {3,{{0,0,0,1},{0,0,1,0},{1,0,0,1}}}}, + + // TDD Configuration Index 37 + { {4,{{0,0,0,1},{0,0,1,1},{1,0,0,1},{1,0,1,1}}}, {4,{{0,0,0,0},{0,0,1,0},{1,0,0,0},{1,0,1,0}}}, + {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, + {4,{{0,0,0,1},{1,0,0,1},{2,0,0,1},{3,0,0,1}}}, + {4,{{0,0,0,0},{1,0,0,0},{2,0,0,0},{3,0,0,0}}}, + {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, + {4,{{0,0,0,1},{0,0,1,0},{1,0,0,1},{1,0,1,0}}} + }, + + // TDD Configuration Index 38 + { {5,{{0,0,0,1},{0,0,1,1},{1,0,0,1},{1,0,1,1},{2,0,0,1}}}, {5,{{0,0,0,0},{0,0,1,0},{1,0,0,0},{1,0,1,0},{2,0,0,0}}}, + {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, {5,{{0,0,0,1},{1,0,0,1},{2,0,0,1},{3,0,0,1},{4,0,0,1}}}, + {5,{{0,0,0,0},{1,0,0,0},{2,0,0,0},{3,0,0,0},{4,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, + {5,{{0,0,0,1},{0,0,1,0},{1,0,0,1},{1,0,1,0},{2,0,0,1}}} + }, + + // TDD Configuration Index 39 + { {6,{{0,0,0,1},{0,0,1,1},{1,0,0,1},{1,0,1,1},{2,0,0,1},{2,0,1,1}}}, + {6,{{0,0,0,0},{0,0,1,0},{1,0,0,0},{1,0,1,0},{2,0,0,0},{2,0,1,0}}}, + {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, + {6,{{0,0,0,1},{1,0,0,1},{2,0,0,1},{3,0,0,1},{4,0,0,1},{5,0,0,1}}}, + {6,{{0,0,0,0},{1,0,0,0},{2,0,0,0},{3,0,0,0},{4,0,0,0},{5,0,0,0}}}, + {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, + {6,{{0,0,0,1},{0,0,1,0},{1,0,0,1},{1,0,1,0},{2,0,0,1},{2,0,1,0}}} + }, + + // TDD Configuration Index 40 + { {1,{{0,1,0,0}}},{0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,1,0,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,1,0,0}}}}, + // TDD Configuration Index 41 + { {1,{{0,2,0,0}}},{0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,2,0,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,2,0,0}}}}, + + // TDD Configuration Index 42 + { {1,{{0,1,1,0}}},{0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}}, + + // TDD Configuration Index 43 + { {1,{{0,0,0,0}}},{0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {1,{{0,0,0,0}}}}, + + // TDD Configuration Index 44 + { {1,{{0,0,1,0}}},{0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}, {0,{{0,0,0,0}}}}, + + // TDD Configuration Index 45 + { {2,{{0,0,0,0},{0,0,1,0}}}, {0,{{0,0,0,0},{0,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0}}}, {2,{{0,0,0,0},{1,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0}}}, {2,{{0,0,0,0},{1,0,0,0}}}}, + + // TDD Configuration Index 46 + { {3,{{0,0,0,0},{0,0,1,0},{1,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, {3,{{0,0,0,0},{1,0,0,0},{2,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, {3,{{0,0,0,0},{1,0,0,0},{2,0,0,0}}}}, + + // TDD Configuration Index 47 + { {4,{{0,0,0,0},{0,0,1,0},{1,0,0,0},{1,0,1,0}}}, {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, + {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, + {4,{{0,0,0,0},{1,0,0,0},{2,0,0,0},{3,0,0,0}}}, + {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, + {0,{{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}}, + {4,{{0,0,0,0},{1,0,0,0},{2,0,0,0},{3,0,0,0}}} + } +}; + + +uint8_t get_prach_fmt(int prach_ConfigIndex,int frame_type) { + if (frame_type == FDD) // FDD + return(prach_ConfigIndex>>4); + else { + if (prach_ConfigIndex < 20) + return (0); + + if (prach_ConfigIndex < 30) + return (1); + + if (prach_ConfigIndex < 40) + return (2); + + if (prach_ConfigIndex < 48) + return (3); + else + return (4); + } +} + +uint8_t get_prach_prb_offset(int frame_type, + int tdd_config, + int N_RB_UL, + uint8_t prach_ConfigIndex, + uint8_t n_ra_prboffset, + uint8_t tdd_mapindex, uint16_t Nf) { + uint8_t n_ra_prb; + uint8_t f_ra,t1_ra; + uint8_t prach_fmt = get_prach_fmt(prach_ConfigIndex,frame_type); + uint8_t Nsp=2; + + if (frame_type == TDD) { // TDD + if (tdd_preamble_map[prach_ConfigIndex][tdd_config].num_prach==0) { + LOG_E(PHY, "Illegal prach_ConfigIndex %"PRIu8"", prach_ConfigIndex); + return(-1); + } + + // adjust n_ra_prboffset for frequency multiplexing (p.36 36.211) + f_ra = tdd_preamble_map[prach_ConfigIndex][tdd_config].map[tdd_mapindex].f_ra; + + if (prach_fmt < 4) { + if ((f_ra&1) == 0) { + n_ra_prb = n_ra_prboffset + 6*(f_ra>>1); + } else { + n_ra_prb = N_RB_UL - 6 - n_ra_prboffset + 6*(f_ra>>1); + } + } else { + if ((tdd_config >2) && (tdd_config<6)) + Nsp = 2; + + t1_ra = tdd_preamble_map[prach_ConfigIndex][tdd_config].map[0].t1_ra; + + if ((((Nf&1)*(2-Nsp)+t1_ra)&1) == 0) { + n_ra_prb = 6*f_ra; + } else { + n_ra_prb = N_RB_UL - 6*(f_ra+1); + } + } + } else { //FDD + n_ra_prb = n_ra_prboffset; + } + + return(n_ra_prb); +} + +int is_prach_subframe0(int tdd_config,int frame_type,uint8_t prach_ConfigIndex,uint32_t frame, uint8_t subframe) { + uint8_t t0_ra; + uint8_t t1_ra; + uint8_t t2_ra; + int prach_mask = 0; + + if (frame_type == FDD) { //FDD + //implement Table 5.7.1-2 from 36.211 (Rel-10, p.41) + if ((((frame&1) == 1) && (subframe < 9)) || + (((frame&1) == 0) && (subframe == 9))) // This is an odd frame, ignore even-only PRACH frames + if (((prach_ConfigIndex&0xf)<3) || // 0,1,2,16,17,18,32,33,34,48,49,50 + ((prach_ConfigIndex&0x1f)==18) || // 18,50 + ((prach_ConfigIndex&0xf)==15)) // 15,47 + return(0); + + switch (prach_ConfigIndex&0x1f) { + case 0: + case 3: + if (subframe==1) prach_mask = 1; + + break; + + case 1: + case 4: + if (subframe==4) prach_mask = 1; + + break; + + case 2: + case 5: + if (subframe==7) prach_mask = 1; + + break; + + case 6: + if ((subframe==1) || (subframe==6)) prach_mask=1; + + break; + + case 7: + if ((subframe==2) || (subframe==7)) prach_mask=1; + + break; + + case 8: + if ((subframe==3) || (subframe==8)) prach_mask=1; + + break; + + case 9: + if ((subframe==1) || (subframe==4) || (subframe==7)) prach_mask=1; + + break; + + case 10: + if ((subframe==2) || (subframe==5) || (subframe==8)) prach_mask=1; + + break; + + case 11: + if ((subframe==3) || (subframe==6) || (subframe==9)) prach_mask=1; + + break; + + case 12: + if ((subframe&1)==0) prach_mask=1; + + break; + + case 13: + if ((subframe&1)==1) prach_mask=1; + + break; + + case 14: + prach_mask=1; + break; + + case 15: + if (subframe==9) prach_mask=1; + + break; + } + } else { // TDD + AssertFatal(prach_ConfigIndex<64, + "Illegal prach_ConfigIndex %d for ",prach_ConfigIndex); + AssertFatal(tdd_preamble_map[prach_ConfigIndex][tdd_config].num_prach>0, + "Illegal prach_ConfigIndex %d for ",prach_ConfigIndex); + t0_ra = tdd_preamble_map[prach_ConfigIndex][tdd_config].map[0].t0_ra; + t1_ra = tdd_preamble_map[prach_ConfigIndex][tdd_config].map[0].t1_ra; + t2_ra = tdd_preamble_map[prach_ConfigIndex][tdd_config].map[0].t2_ra; +#ifdef PRACH_DEBUG + LOG_I(PHY,"[PRACH] Checking for PRACH format (ConfigIndex %d) in TDD subframe %d (%d,%d,%d)\n", + prach_ConfigIndex, + subframe, + t0_ra,t1_ra,t2_ra); +#endif + + if ((((t0_ra == 1) && ((frame &1)==0))|| // frame is even and PRACH is in even frames + ((t0_ra == 2) && ((frame &1)==1))|| // frame is odd and PRACH is in odd frames + (t0_ra == 0)) && // PRACH is in all frames + (((subframe<5)&&(t1_ra==0)) || // PRACH is in 1st half-frame + (((subframe>4)&&(t1_ra==1))))) { // PRACH is in 2nd half-frame + if ((prach_ConfigIndex<48) && // PRACH only in normal UL subframe + (((subframe%5)-2)==t2_ra)) prach_mask=1; + else if ((prach_ConfigIndex>47) && (((subframe%5)-1)==t2_ra)) prach_mask=1; // PRACH can be in UpPTS + } + } + + return(prach_mask); +} + diff --git a/common/utils/lte/prach_utils.h b/common/utils/lte/prach_utils.h new file mode 100644 index 0000000000..995805fbd2 --- /dev/null +++ b/common/utils/lte/prach_utils.h @@ -0,0 +1,40 @@ +/* + * 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 common/utils/prach_utils.h +* \brief computation of some PRACH variables used in both MAC and PHY +* \author R. Knopp +* \date 2020 +* \version 0.1 +* \company Eurecom +* \email: raymond.knopp@eurecom.fr, florian.kaltenberger@eurecom.fr, oscar.tonelli@yahoo.it +* \note +* \warning +*/ +uint8_t get_prach_fmt(int prach_ConfigIndex,int frame_type); + +uint8_t get_prach_prb_offset(int frame_type, + int tdd_config, + int N_RB_UL, + uint8_t prach_ConfigIndex, + uint8_t n_ra_prboffset, + uint8_t tdd_mapindex, uint16_t Nf); +int is_prach_subframe0(int tdd_config,int frame_type,uint8_t prach_ConfigIndex,uint32_t frame, uint8_t subframe); From 881ac5491ca09a9366c1cf72ac48f2987a0397a3 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Fri, 25 Dec 2020 16:18:24 +0100 Subject: [PATCH 018/579] merge with develop --- openair1/PHY/INIT/lte_init.c | 2 ++ openair1/PHY/defs_eNB.h | 1 + openair1/SCHED/fapi_l1.c | 4 +++ openair1/SCHED/phy_procedures_lte_eNb.c | 3 +++ .../CONTROL_MODULES/MAC/flexran_agent_mac.c | 3 +++ .../MAC/flexran_agent_mac_internal.c | 3 +++ openair2/ENB_APP/NB_IoT_interface.c | 3 +++ openair2/ENB_APP/NB_IoT_interface.h | 1 + openair2/ENB_APP/enb_config.c | 2 ++ openair2/ENB_APP/enb_config.h | 1 - openair2/ENB_APP/flexran_agent.c | 3 +++ openair2/ENB_APP/flexran_agent_common.c | 3 +++ openair2/ENB_APP/flexran_agent_ran_api.c | 3 +++ openair2/LAYER2/MAC/mac_extern.h | 4 +++ openair2/PHY_INTERFACE/IF_Module.c | 2 ++ targets/RT/USER/lte-enb.c | 6 ++++- targets/RT/USER/lte-ru.c | 2 ++ targets/RT/USER/lte-softmodem.c | 27 ++++++++++++------- targets/RT/USER/lte-softmodem.h | 2 +- 19 files changed, 63 insertions(+), 12 deletions(-) diff --git a/openair1/PHY/INIT/lte_init.c b/openair1/PHY/INIT/lte_init.c index 8faa86c527..a60b060641 100644 --- a/openair1/PHY/INIT/lte_init.c +++ b/openair1/PHY/INIT/lte_init.c @@ -46,6 +46,8 @@ uint8_t dmrs1_tab[8] = { 0, 2, 3, 4, 6, 8, 9, 10 }; int N_RB_DL_array[6] = { 6, 15, 25, 50, 75, 100 }; +extern RAN_CONTEXT_t RC; + int l1_north_init_eNB () { int i,j; diff --git a/openair1/PHY/defs_eNB.h b/openair1/PHY/defs_eNB.h index f1021ead9b..c440ca6590 100644 --- a/openair1/PHY/defs_eNB.h +++ b/openair1/PHY/defs_eNB.h @@ -362,6 +362,7 @@ typedef struct L1_proc_t_s { pthread_t process_stats_thread; /// for waking up tx procedure RU_proc_t *ru_proc; + struct PHY_VARS_eNB_s *eNB; } L1_proc_t; diff --git a/openair1/SCHED/fapi_l1.c b/openair1/SCHED/fapi_l1.c index 96a073fbb8..4448a22ad2 100644 --- a/openair1/SCHED/fapi_l1.c +++ b/openair1/SCHED/fapi_l1.c @@ -32,11 +32,15 @@ #include "PHY/defs_eNB.h" #include "PHY/LTE_TRANSPORT/transport_proto.h" +#include "PHY/LTE_TRANSPORT/transport_extern.h" #include "SCHED/sched_eNB.h" #include "nfapi/oai_integration/vendor_ext.h" #include "nfapi_pnf_interface.h" #include "fapi_l1.h" +#include "common/ran_context.h" +extern RAN_CONTEXT_t RC; + int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req); int oai_nfapi_tx_req(nfapi_tx_request_t *tx_req); int oai_nfapi_hi_dci0_req(nfapi_hi_dci0_request_t *hi_dci0_req); diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c index a37f95bcb3..4e7be9106b 100644 --- a/openair1/SCHED/phy_procedures_lte_eNb.c +++ b/openair1/SCHED/phy_procedures_lte_eNb.c @@ -51,6 +51,9 @@ #define MBMS_NFAPI_SCHEDULER +#include "common/ran_context.h" +extern RAN_CONTEXT_t RC; + nfapi_ue_release_request_body_t release_rntis; int16_t get_hundred_times_delta_IF_eNB(PHY_VARS_eNB *eNB,uint16_t UE_id,uint8_t harq_pid, uint8_t bw_factor) { diff --git a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c index 7ca466e8ff..51e495b027 100644 --- a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c +++ b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c @@ -42,6 +42,9 @@ #include +#include "common/ran_context.h" +extern RAN_CONTEXT_t RC; + /*Array containing the Agent-MAC interfaces*/ AGENT_MAC_xface *agent_mac_xface[NUM_MAX_ENB]; diff --git a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c index 42246c3ebf..e05fa98854 100644 --- a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c +++ b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c @@ -33,6 +33,9 @@ #include "flexran_agent_mac_internal.h" #include "flexran_agent_mac_slice_verification.h" +#include "common/ran_context.h" +extern RAN_CONTEXT_t RC; + extern SLIST_HEAD(flexran_so_handle, flexran_agent_so_handle_s) flexran_handles[NUM_MAX_ENB]; diff --git a/openair2/ENB_APP/NB_IoT_interface.c b/openair2/ENB_APP/NB_IoT_interface.c index 7355233d71..8fc6de78af 100644 --- a/openair2/ENB_APP/NB_IoT_interface.c +++ b/openair2/ENB_APP/NB_IoT_interface.c @@ -35,6 +35,9 @@ #define NBIOT_INTERFACE_SOURCE #include "NB_IoT_interface.h" +#include "common/ran_context.h" +extern RAN_CONTEXT_t RC; + diff --git a/openair2/ENB_APP/NB_IoT_interface.h b/openair2/ENB_APP/NB_IoT_interface.h index b3454b077b..c13f6dd1cb 100644 --- a/openair2/ENB_APP/NB_IoT_interface.h +++ b/openair2/ENB_APP/NB_IoT_interface.h @@ -31,6 +31,7 @@ #define NBIOT_MODULENAME "NB_IoT" +#include "common/ran_context.h" typedef void(*RCConfig_NbIoT_f_t)(RAN_CONTEXT_t *RC); #define NBIOT_RCCONFIG_FNAME "RCConfig_NbIoT" diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c index de77d783c7..91372f6257 100644 --- a/openair2/ENB_APP/enb_config.c +++ b/openair2/ENB_APP/enb_config.c @@ -63,6 +63,8 @@ extern uint32_t to_earfcn_UL(int eutra_bandP, uint32_t ul_CarrierFreq, uint32_t extern char *parallel_config; extern char *worker_config; +RAN_CONTEXT_t RC; + void RCconfig_flexran() { /* get number of eNBs */ paramdef_t ENBSParams[] = ENBSPARAMS_DESC; diff --git a/openair2/ENB_APP/enb_config.h b/openair2/ENB_APP/enb_config.h index 4bc4f5bf22..b95bf90f70 100644 --- a/openair2/ENB_APP/enb_config.h +++ b/openair2/ENB_APP/enb_config.h @@ -100,7 +100,6 @@ typedef struct ru_config_s { uint8_t if_compress; } ru_config_t; -extern void RCconfig_RU(void); extern void RCconfig_flexran(void); extern void RCconfig_L1(void); extern void RCconfig_macrlc(int macrlc_has_f1[MAX_MAC_INST]); diff --git a/openair2/ENB_APP/flexran_agent.c b/openair2/ENB_APP/flexran_agent.c index 7d4546815f..ff9c7deb24 100644 --- a/openair2/ENB_APP/flexran_agent.c +++ b/openair2/ENB_APP/flexran_agent.c @@ -33,6 +33,9 @@ #include #include +#include "common/ran_context.h" +extern RAN_CONTEXT_t RC; + int agent_task_created = 0; /* * enb agent task mainly wakes up the tx thread for periodic and oneshot messages to the controller diff --git a/openair2/ENB_APP/flexran_agent_common.c b/openair2/ENB_APP/flexran_agent_common.c index abb5b57e0c..a32df6ea54 100644 --- a/openair2/ENB_APP/flexran_agent_common.c +++ b/openair2/ENB_APP/flexran_agent_common.c @@ -53,6 +53,9 @@ #include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h" #include "rrc_eNB_UE_context.h" +#include "common/ran_context.h" +extern RAN_CONTEXT_t RC; + /* * message primitives */ diff --git a/openair2/ENB_APP/flexran_agent_ran_api.c b/openair2/ENB_APP/flexran_agent_ran_api.c index d126012737..9d1a15e0c4 100644 --- a/openair2/ENB_APP/flexran_agent_ran_api.c +++ b/openair2/ENB_APP/flexran_agent_ran_api.c @@ -32,6 +32,9 @@ #include "s1ap_eNB_management_procedures.h" #include "openair2/LAYER2/MAC/slicing/slicing.h" +#include "common/ran_context.h" +extern RAN_CONTEXT_t RC; + static inline int phy_is_present(mid_t mod_id, uint8_t cc_id) { return RC.eNB && RC.eNB[mod_id] && RC.eNB[mod_id][cc_id]; } diff --git a/openair2/LAYER2/MAC/mac_extern.h b/openair2/LAYER2/MAC/mac_extern.h index cee6066a9e..b410978c8e 100644 --- a/openair2/LAYER2/MAC/mac_extern.h +++ b/openair2/LAYER2/MAC/mac_extern.h @@ -77,4 +77,8 @@ extern eNB_UE_STATS pre_scd_eNB_UE_stats[MAX_NUM_CCs][NUMBER_OF_UE_MAX]; extern mac_rlc_am_muilist_t rlc_am_mui; extern SCHEDULER_MODES global_scheduler_mode; + +#include "common/ran_context.h" +extern RAN_CONTEXT_t RC; + #endif //DEF_H diff --git a/openair2/PHY_INTERFACE/IF_Module.c b/openair2/PHY_INTERFACE/IF_Module.c index d98c603d78..32780b0706 100644 --- a/openair2/PHY_INTERFACE/IF_Module.c +++ b/openair2/PHY_INTERFACE/IF_Module.c @@ -19,6 +19,8 @@ extern int oai_nfapi_rx_ind(nfapi_rx_indication_t *ind); extern uint16_t sf_ahead; extern UL_RCC_IND_t UL_RCC_INFO; +extern RAN_CONTEXT_t RC; + uint16_t frame_cnt=0; void handle_rach(UL_IND_t *UL_info) { int i; diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c index 1347d75fb0..45d27627fc 100644 --- a/targets/RT/USER/lte-enb.c +++ b/targets/RT/USER/lte-enb.c @@ -96,6 +96,9 @@ #include "T.h" +#include "common/ran_context.h" +extern RAN_CONTEXT_t RC; + //#define DEBUG_THREADS 1 //#define USRP_DEBUG 1 @@ -323,7 +326,7 @@ static inline int rxtx(PHY_VARS_eNB *eNB, static void *L1_thread_tx(void *param) { L1_proc_t *eNB_proc = (L1_proc_t *)param; L1_rxtx_proc_t *proc = &eNB_proc->L1_proc_tx; - PHY_VARS_eNB *eNB = RC.eNB[0][proc->CC_id]; + PHY_VARS_eNB *eNB = eNB_proc->eNB; char thread_name[100]; sprintf(thread_name,"TXnp4_%d\n",&eNB->proc.L1_proc == proc ? 0 : 1); thread_top_init(thread_name,1,470000,500000,500000); @@ -858,6 +861,7 @@ void init_eNB_proc(int inst) { L1_proc_tx->instance_cnt = -1; L1_proc->instance_cnt_RUs = 0; L1_proc_tx->instance_cnt_RUs = 0; + proc->eNB = eNB; proc->instance_cnt_prach = -1; proc->instance_cnt_asynch_rxtx = -1; proc->instance_cnt_synch = -1; diff --git a/targets/RT/USER/lte-ru.c b/targets/RT/USER/lte-ru.c index 2c1d7f7508..a6c63ca8d0 100644 --- a/targets/RT/USER/lte-ru.c +++ b/targets/RT/USER/lte-ru.c @@ -77,6 +77,7 @@ static int DEFBFW[] = {0x00007fff}; #include "T.h" +#include "executables/softmodem-common.h" #define MBMS_EXPERIMENTAL @@ -3040,6 +3041,7 @@ RU_t **RCconfig_RU(int nb_RU,int nb_L1_inst,PHY_VARS_eNB ***eNB,uint64_t *ru_mas ru[j]->nb_rx = *(RUParamList.paramarray[j][RU_NB_RX_IDX].uptr); ru[j]->att_tx = *(RUParamList.paramarray[j][RU_ATT_TX_IDX].uptr); ru[j]->att_rx = *(RUParamList.paramarray[j][RU_ATT_RX_IDX].uptr); + *ru_mask= (*ru_mask)|(1<configured = 0; + for (int ru_id=0;ru_idnum_RU;ru_id++) { + int ru_idx = RC.eNB[enb_id][cc_id]->RU_list[ru_id]->idx; + RC.ru_mask |= (1 << ru_idx); + set_function_spec_param(RC.ru[ru_idx]); + } } - - RC.ru_mask |= (1 << ru->idx); - set_function_spec_param(RC.ru[enb_id]); /* reset the list of connected UEs in the MAC, since in this process with * loose all UEs (have to reconnect) */ init_UE_info(&RC.mac[enb_id]->UE_info); @@ -459,9 +462,15 @@ int restart_L1L2(module_id_t enb_id) { /* TODO XForms might need to be restarted, but it is currently (09/02/18) * broken, so we cannot test it */ wait_eNBs(); - init_RU_proc(ru); - ru->rf_map.card = 0; - ru->rf_map.chain = 0; /* CC_id + chain_offset;*/ + for (int cc_id=0;cc_idnum_RU;ru_id++) { + int ru_idx = RC.eNB[enb_id][cc_id]->RU_list[ru_id]->idx; + + init_RU_proc(RC.ru[ru_idx]); + RC.ru[ru_idx]->rf_map.card = 0; + RC.ru[ru_idx]->rf_map.chain = 0; /* CC_id + chain_offset;*/ + } + } wait_RUs(); init_eNB_afterRU(); printf("Sending sync to all threads\n"); @@ -574,7 +583,7 @@ int main ( int argc, char **argv ) /* We need to read RU configuration before FlexRAN starts so it knows what * splits to report. Actual RU start comes later. */ if (RC.nb_RU > 0 && NFAPI_MODE != NFAPI_MODE_VNF) { - RCconfig_RU(); + RC.ru = RCconfig_RU(RC.nb_RU,RC.nb_L1_inst,RC.eNB,&RC.ru_mask,&RC.ru_mutex,&RC.ru_cond); LOG_I(PHY, "number of L1 instances %d, number of RU %d, number of CPU cores %d\n", RC.nb_L1_inst, RC.nb_RU, get_nprocs()); @@ -677,7 +686,7 @@ int main ( int argc, char **argv ) // some initialization is necessary and init_ru_vnf do this. if (RC.nb_RU >0 && NFAPI_MODE!=NFAPI_MODE_VNF) { printf("Initializing RU threads\n"); - init_RU(get_softmodem_params()->rf_config_file,get_softmodem_params()->send_dmrs_sync); + init_RU(RC.ru,RC.nb_RU,RC.eNB,RC.nb_L1_inst,RC.nb_L1_CC,get_softmodem_params()->rf_config_file,get_softmodem_params()->send_dmrs_sync); for (ru_id=0; ru_idrf_map.card=0; diff --git a/targets/RT/USER/lte-softmodem.h b/targets/RT/USER/lte-softmodem.h index 1c537dabe3..35c428e107 100644 --- a/targets/RT/USER/lte-softmodem.h +++ b/targets/RT/USER/lte-softmodem.h @@ -171,7 +171,7 @@ extern void init_RU_proc(RU_t *ru); extern void stop_RU(int nb_ru); extern void kill_RU_proc(RU_t *ru); extern void set_function_spec_param(RU_t *ru); -extern void init_RU(char *, int send_dmrssync); +extern void init_RU(RU_t **rup,int nb_RU,PHY_VARS_eNB ***eNBp,int nb_L1,int *nb_CC,char *rf_config_file, int send_dmrssync); // In lte-ue.c extern int setup_ue_buffers(PHY_VARS_UE **phy_vars_ue, openair0_config_t *openair0_cfg); From 7620fe9b2d17ca5bba15e231bdca6f883797470b Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Fri, 25 Dec 2020 16:19:41 +0100 Subject: [PATCH 019/579] minor changes for oairu executabl --- cmake_targets/CMakeLists.txt | 2 +- executables/main_ru.c | 2 ++ openair2/ENB_APP/enb_config.h | 1 - targets/RT/USER/lte-ru.c | 1 + targets/RT/USER/lte-softmodem.c | 2 ++ 5 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 3387ac3feb..697887dc41 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -1650,7 +1650,6 @@ set(PHY_SRC_COMMON ${OPENAIR1_DIR}/PHY/CODING/viterbi_lte.c ${OPENAIR1_DIR}/PHY/INIT/init_top.c ${OPENAIR1_DIR}/PHY/INIT/lte_parms.c - ${OPENAIR1_DIR}/PHY/INIT/lte_param_init.c ${OPENAIR1_DIR}/PHY/TOOLS/cadd_vv.c ${OPENAIR1_DIR}/PHY/TOOLS/dfts_load.c ${OPENAIR1_DIR}/PHY/TOOLS/log2_approx.c @@ -3391,6 +3390,7 @@ foreach(myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim pr ${OPENAIR_DIR}/common/utils/backtrace.c ${OPENAIR_DIR}/common/utils/system.c ${OPENAIR_DIR}/common/utils/utils.c + ${OPENAIR1_DIR}/PHY/INIT/lte_param_init.c ${XFORMS_SOURCE} ${T_SOURCE} ${CONFIG_SOURCES} diff --git a/executables/main_ru.c b/executables/main_ru.c index 295c122bed..034c3132b6 100644 --- a/executables/main_ru.c +++ b/executables/main_ru.c @@ -81,6 +81,8 @@ extern void init_RU_proc(RU_t *ru); extern void kill_RU_proc(RU_t *ru); extern void set_function_spec_param(RU_t *ru); +int32_t uplink_frequency_offset[MAX_NUM_CCs][4]; + void exit_function(const char *file, const char *function, const int line, const char *s) { if (s != NULL) { diff --git a/openair2/ENB_APP/enb_config.h b/openair2/ENB_APP/enb_config.h index 4bc4f5bf22..b95bf90f70 100644 --- a/openair2/ENB_APP/enb_config.h +++ b/openair2/ENB_APP/enb_config.h @@ -100,7 +100,6 @@ typedef struct ru_config_s { uint8_t if_compress; } ru_config_t; -extern void RCconfig_RU(void); extern void RCconfig_flexran(void); extern void RCconfig_L1(void); extern void RCconfig_macrlc(int macrlc_has_f1[MAX_MAC_INST]); diff --git a/targets/RT/USER/lte-ru.c b/targets/RT/USER/lte-ru.c index 2c1d7f7508..f2d2a939cb 100644 --- a/targets/RT/USER/lte-ru.c +++ b/targets/RT/USER/lte-ru.c @@ -77,6 +77,7 @@ static int DEFBFW[] = {0x00007fff}; #include "T.h" +#include "executables/softmodem-common.h" #define MBMS_EXPERIMENTAL diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index f3177195fd..dde4adc49f 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -161,6 +161,8 @@ void sendFs6Ulharq(enum pckType type, int UEid, PHY_VARS_eNB *eNB, LTE_eNB_UCI * AssertFatal(false, "Must not be called in this context\n"); } +RU_t **RCconfig_RU(int nb_RU,int nb_L1_inst,PHY_VARS_eNB ***eNB,uint64_t *ru_mask,pthread_mutex_t *ru_mutex,pthread_cond_t *ru_cond); + extern void reset_opp_meas(void); extern void print_opp_meas(void); From b596e2abd2d6bd32f17ba6edb55d666a51212d9d Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Fri, 25 Dec 2020 16:55:29 +0100 Subject: [PATCH 020/579] added definition of usrp_tx_thread in oairu exectuable --- executables/main_ru.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/executables/main_ru.c b/executables/main_ru.c index 034c3132b6..b6a4273780 100644 --- a/executables/main_ru.c +++ b/executables/main_ru.c @@ -83,6 +83,8 @@ extern void set_function_spec_param(RU_t *ru); int32_t uplink_frequency_offset[MAX_NUM_CCs][4]; +int usrp_tx_thread=0; + void exit_function(const char *file, const char *function, const int line, const char *s) { if (s != NULL) { From d00b966d147f0e20cb36bf3063111fda9329f000 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Tue, 29 Dec 2020 08:15:36 +0100 Subject: [PATCH 021/579] finishing mere with constant_power branch. Testing OTA. --- cmake_targets/CMakeLists.txt | 4 ++++ cmake_targets/build_oai | 1 + cmake_targets/phy_simulators/CMakeLists.txt | 1 + openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c | 12 +++++++++++- openair1/SCHED/phy_procedures_lte_eNb.c | 14 ++++++++++++-- openair1/SIMULATION/LTE_PHY/dlsim.c | 1 + openair1/SIMULATION/LTE_PHY/ulsim.c | 17 ++++++++++++++--- openair2/RRC/LTE/defs_NB_IoT.h | 6 +++--- openair2/RRC/NR/nr_rrc_defs.h | 6 +++--- 9 files changed, 50 insertions(+), 12 deletions(-) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 69c43aa207..7f7cb53252 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -60,6 +60,8 @@ elseif (${RF_BOARD} STREQUAL "OAI_IRIS") endif (${RF_BOARD} STREQUAL "OAI_USRP") +message("RU=${RU}") + pkg_search_module(OPENPGM openpgm-5.1 openpgm-5.2) if(NOT ${OPENPGM_FOUND}) message("PACKAGE openpgm-5.1 is required by binaries such as oaisim: will fail later if this target is built") @@ -3396,6 +3398,8 @@ foreach(myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim pr ${OPENAIR_DIR}/common/utils/backtrace.c ${OPENAIR_DIR}/common/utils/system.c ${OPENAIR_DIR}/common/utils/utils.c + ${OPENAIR_DIR}/common/utils/lte/ue_power.c + ${OPENAIR_DIR}/common/utils/lte/prach_utils.c ${OPENAIR1_DIR}/PHY/INIT/lte_param_init.c ${XFORMS_SOURCE} ${T_SOURCE} diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai index 971dd27c56..a00008525a 100755 --- a/cmake_targets/build_oai +++ b/cmake_targets/build_oai @@ -301,6 +301,7 @@ function main() { shift 2;; -P | --phy_simulators) SIMUS_PHY=1 + RU=0 echo_info "Will compile dlsim, ulsim, ..." shift;; -S | --core_simulators) diff --git a/cmake_targets/phy_simulators/CMakeLists.txt b/cmake_targets/phy_simulators/CMakeLists.txt index 447e90bcab..f8c659959f 100644 --- a/cmake_targets/phy_simulators/CMakeLists.txt +++ b/cmake_targets/phy_simulators/CMakeLists.txt @@ -17,4 +17,5 @@ set ( UE_TIMING_TRACE False ) set ( USRP_REC_PLAY False ) set ( SKIP_SHARED_LIB_FLAG False ) set ( PHYSIM True) +set ( RU 0) include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt) diff --git a/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c b/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c index e3524b8912..9a80558ee7 100644 --- a/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c +++ b/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c @@ -1203,10 +1203,13 @@ void dump_ulsch(PHY_VARS_eNB *eNB,int frame,int subframe,uint8_t UE_id,int round uint8_t harq_pid; char fname[100],vname[100]; harq_pid = subframe2harq_pid(&eNB->frame_parms,frame,subframe); - LOG_UI(PHY,"Dumping ULSCH in subframe %d with harq_pid %d, round %d for NB_rb %d, TBS %d, Qm %d, N_symb %d\n", + LOG_UI(PHY,"Dumping ULSCH in subframe %d with harq_pid %d, round %d for NB_rb %d, first_rb %d, TBS %d, Qm %d, N_symb %d\n", subframe,harq_pid,round,eNB->ulsch[UE_id]->harq_processes[harq_pid]->nb_rb, + eNB->ulsch[UE_id]->harq_processes[harq_pid]->first_rb, eNB->ulsch[UE_id]->harq_processes[harq_pid]->TBS,eNB->ulsch[UE_id]->harq_processes[harq_pid]->Qm, eNB->ulsch[UE_id]->harq_processes[harq_pid]->Nsymb_pusch); + for (int aa=0;aaframe_parms.nb_antennas_rx;aa++) + LOG_UI(PHY,"ulsch_power[%d] %d, ulsch_noise_power[%d] %d\n",aa,dB_fixed_times10(eNB->pusch_vars[UE_id]->ulsch_power[aa]),aa,dB_fixed_times10(eNB->pusch_vars[UE_id]->ulsch_noise_power[aa])); sprintf(fname,"/tmp/ulsch_r%d_d",round); sprintf(vname,"/tmp/ulsch_r%d_dseq",round); LOG_UM(fname,vname,&eNB->ulsch[UE_id]->harq_processes[harq_pid]->d[0][96], @@ -1264,6 +1267,13 @@ void dump_ulsch(PHY_VARS_eNB *eNB,int frame,int subframe,uint8_t UE_id,int round sprintf(fname,"/tmp/ulsch0_rxF_comp0_r%d.m",round); sprintf(vname,"ulsch0_rxF_comp0_r%d",round); LOG_UM(fname,vname,&eNB->pusch_vars[UE_id]->rxdataF_comp[0][0],eNB->frame_parms.N_RB_UL*12*nsymb,1,1); + if (eNB->frame_parms.nb_antennas_rx>1) { + sprintf(fname,"/tmp/ulsch0_rxF_comp1_r%d.m",round); + sprintf(vname,"ulsch0_rxF_comp1_r%d",round); + LOG_UM(fname,vname,&eNB->pusch_vars[UE_id]->rxdataF_comp[1][0],eNB->frame_parms.N_RB_UL*12*nsymb,1,1); + + } + // LOG_M("ulsch_rxF_comp1.m","ulsch0_rxF_comp1",&eNB->pusch_vars[UE_id]->rxdataF_comp[0][1][0],eNB->frame_parms.N_RB_UL*12*nsymb,1,1); sprintf(fname,"/tmp/ulsch_rxF_llr_r%d.m",round); sprintf(vname,"ulsch_llr_r%d",round); diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c index a6d1802492..a9a7a25dcc 100644 --- a/openair1/SCHED/phy_procedures_lte_eNb.c +++ b/openair1/SCHED/phy_procedures_lte_eNb.c @@ -1473,6 +1473,16 @@ void pusch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) { ulsch_harq->V_UL_DAI, ulsch_harq->nb_rb>20 ? 1 : 0); stop_meas(&eNB->ulsch_decoding_stats); + int ulsch_id=-1; + for (ulsch_id=0;ulsch_idrnti == eNB->ulsch_stats[ulsch_id].rnti) break; + AssertFatal(ulsch_id>=0,"no ulsch_id found\n"); + + if (eNB->ulsch_stats[ulsch_id].round_trials[0]>100) { + dump_ulsch(eNB,frame,subframe,i,ulsch_harq->round); + AssertFatal(1==0,"exiting\n"); + } + } else if ((ulsch) && (ulsch->rnti>0) && @@ -1639,10 +1649,10 @@ void fill_rx_indication(PHY_VARS_eNB *eNB, else pdu->rx_indication_rel8.ul_cqi = (640 + SNRtimes10) / 5; - LOG_D(PHY,"[PUSCH %d] Frame %d Subframe %d Filling RX_indication with SNR %d (%d,%d,%d), timing_advance %d (update %d,sync_pos %d)\n", + LOG_I(PHY,"[PUSCH %d] Frame %d Subframe %d Filling RX_indication with SNR %d (%d,%d,%d), timing_advance %d (update %d,sync_pos %d)\n", harq_pid,frame,subframe,SNRtimes10,pdu->rx_indication_rel8.ul_cqi,dB_fixed_times10(total_power),dB_fixed_times10(avg_noise_power),pdu->rx_indication_rel8.timing_advance,timing_advance_update,sync_pos); for (int i=0;iframe_parms.nb_antennas_rx;i++) - LOG_D(PHY,"antenna %d: ulsch_power %d, noise_power %d\n",i,dB_fixed_times10(eNB->pusch_vars[ULSCH_id]->ulsch_power[i]),dB_fixed_times10(eNB->pusch_vars[ULSCH_id]->ulsch_noise_power[i])); + LOG_I(PHY,"antenna %d: ulsch_power %d, noise_power %d\n",i,dB_fixed_times10(eNB->pusch_vars[ULSCH_id]->ulsch_power[i]),dB_fixed_times10(eNB->pusch_vars[ULSCH_id]->ulsch_noise_power[i])); eNB->UL_INFO.rx_ind.rx_indication_body.number_of_pdus++; eNB->UL_INFO.rx_ind.sfn_sf = frame<<4 | subframe; diff --git a/openair1/SIMULATION/LTE_PHY/dlsim.c b/openair1/SIMULATION/LTE_PHY/dlsim.c index d3f55785c9..c6a4142edf 100644 --- a/openair1/SIMULATION/LTE_PHY/dlsim.c +++ b/openair1/SIMULATION/LTE_PHY/dlsim.c @@ -82,6 +82,7 @@ double DS_TDL = .03; static int cmpdouble(const void *p1, const void *p2) { return *(double *)p1 > *(double *)p2; } +RAN_CONTEXT_t RC; int emulate_rf = 0; int split73=0; diff --git a/openair1/SIMULATION/LTE_PHY/ulsim.c b/openair1/SIMULATION/LTE_PHY/ulsim.c index 0443cde738..e9de56fd84 100644 --- a/openair1/SIMULATION/LTE_PHY/ulsim.c +++ b/openair1/SIMULATION/LTE_PHY/ulsim.c @@ -84,7 +84,7 @@ static int cmpdouble(const void *p1, const void *p2) { return *(double *)p1 > *(double *)p2; } - +RAN_CONTEXT_t RC; int split73=0; void sendFs6Ul(PHY_VARS_eNB *eNB, int UE_id, int harq_pid, int segmentID, int16_t *data, int dataLen, int r_offset) { AssertFatal(false, "Must not be called in this context\n"); @@ -404,7 +404,7 @@ int main(int argc, char **argv) { printf("Detected cpu_freq %f GHz\n",cpu_freq_GHz); AssertFatal(load_configmodule(argc,argv,CONFIG_ENABLECMDLINEONLY) != NULL, "Cannot load configuration module, exiting\n"); logInit(); - set_glog(OAILOG_WARNING); + set_glog(OAILOG_INFO); T_stdout = 1; // enable these lines if you need debug info // however itti will catch all signals, so ctrl-c won't work anymore @@ -1137,6 +1137,15 @@ int main(int argc, char **argv) { sqrt(sigma2/2)*gaussdouble(0.0,1.0)); } } + if (n_frames==1) + for (i=0; iframe_parms.samples_per_tti; i++) { + for (aa=0; aaframe_parms.nb_antennas_rx; aa++) { + ((short *) &ru->common.rxdata[aa][eNB->frame_parms.samples_per_tti*(subframe+1)%10])[2*i] = + (short) (sqrt(sigma2/2)*gaussdouble(0.0,1.0)); + ((short *) &ru->common.rxdata[aa][eNB->frame_parms.samples_per_tti*(subframe+1)%10])[2*i+1] = + (short) (sqrt(sigma2/2)*gaussdouble(0.0,1.0)); + } + } if (n_frames<=10) { printf("rx_level Null symbol %f\n",10*log10((double)signal_energy((int *) @@ -1162,9 +1171,10 @@ int main(int argc, char **argv) { start_meas(&eNB->phy_proc_rx); ru->feprx = (get_thread_worker_conf() == WORKER_ENABLE) ? ru_fep_full_2thread : fep_full; ru->feprx(ru,subframe); + if (n_frames==1) lte_eNB_I0_measurements(eNB,(subframe+1)%10,0,1); + phy_procedures_eNB_uespec_RX(eNB,proc_rxtx); stop_meas(&eNB->phy_proc_rx); - if (cqi_flag > 0) { cqi_error = 0; @@ -1290,6 +1300,7 @@ int main(int argc, char **argv) { LOG_UDUMPMSG(SIM,dataArray(table_rx),table_rx->size,LOG_DUMP_DOUBLE,"The receiver raw data: \n"); } + dump_ulsch_stats(eNB); printf("\n**********rb: %d ***mcs : %d *********SNR = %f dB (%f): TX %u dB (gain %f dB), N0W %f dB, I0 %u dB, delta_IF %d [ (%d,%d) dB / (%u,%u) dB ]**************************\n", nb_rb,mcs,SNR,SNR2, tx_lev_dB, diff --git a/openair2/RRC/LTE/defs_NB_IoT.h b/openair2/RRC/LTE/defs_NB_IoT.h index 91dc7aafd4..4a4c9937e7 100644 --- a/openair2/RRC/LTE/defs_NB_IoT.h +++ b/openair2/RRC/LTE/defs_NB_IoT.h @@ -211,13 +211,13 @@ typedef struct RB_INFO_TABLE_ENTRY_NB_IoT_s { RB_INFO_NB_IoT Rb_info; uint8_t Active; uint32_t Next_check_frame; - uint8_t Status; + uint8_t status; } RB_INFO_TABLE_ENTRY_NB_IoT; typedef struct SRB_INFO_TABLE_ENTRY_NB_IoT_s { SRB_INFO_NB_IoT Srb_info; uint8_t Active; - uint8_t Status; + uint8_t status; uint32_t Next_check_frame; } SRB_INFO_TABLE_ENTRY_NB_IoT; @@ -269,7 +269,7 @@ typedef struct eNB_RRC_UE_NB_IoT_s { e_LTE_CipheringAlgorithm_r12 ciphering_algorithm; //Specs. TS 36.331 V14.1.0 pag 432 Change position of chipering enumerative w.r.t previous version e_LTE_SecurityAlgorithmConfig__integrityProtAlgorithm integrity_algorithm; - uint8_t Status; + uint8_t status; rnti_t rnti; uint64_t random_ue_identity; diff --git a/openair2/RRC/NR/nr_rrc_defs.h b/openair2/RRC/NR/nr_rrc_defs.h index 596180e793..a2eae8b2ec 100644 --- a/openair2/RRC/NR/nr_rrc_defs.h +++ b/openair2/RRC/NR/nr_rrc_defs.h @@ -238,13 +238,13 @@ typedef struct RB_INFO_TABLE_ENTRY_NR_s { NR_RB_INFO Rb_info; uint8_t Active; uint32_t Next_check_frame; - uint8_t Status; + uint8_t status; } NR_RB_INFO_TABLE_ENTRY; typedef struct SRB_INFO_TABLE_ENTRY_NR_s { NR_SRB_INFO Srb_info; uint8_t Active; - uint8_t Status; + uint8_t status; uint32_t Next_check_frame; } NR_SRB_INFO_TABLE_ENTRY; @@ -297,7 +297,7 @@ typedef struct gNB_RRC_UE_s { NR_CipheringAlgorithm_t ciphering_algorithm; e_NR_IntegrityProtAlgorithm integrity_algorithm; - uint8_t Status; + uint8_t status; rnti_t rnti; uint64_t random_ue_identity; From 1b95baaf4c99db7334d6b2a0a6ddf5326b60b20f Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Fri, 1 Jan 2021 21:45:23 +0100 Subject: [PATCH 022/579] update F1AP to R16.3.1. testing with OTA eNB --- cmake_targets/CMakeLists.txt | 10 +- openair1/PHY/INIT/lte_init.c | 10 +- openair1/PHY/LTE_TRANSPORT/transport_proto.h | 3 + openair1/PHY/LTE_TRANSPORT/uci_tools.c | 2 +- openair1/PHY/defs_eNB.h | 2 +- openair1/SCHED/fapi_l1.c | 24 +- openair1/SCHED/phy_procedures_lte_eNb.c | 149 +- openair2/COMMON/platform_constants.h | 12 - .../F1AP/MESSAGES/ASN1/R16.3.1/38473-g31.asn | 10721 ++++++++++++++++ .../ASN1/R16.3.1/F1AP-CommonDataTypes.asn | 32 + .../MESSAGES/ASN1/R16.3.1/F1AP-Constants.asn | 622 + .../MESSAGES/ASN1/R16.3.1/F1AP-Containers.asn | 178 + .../F1AP/MESSAGES/ASN1/R16.3.1/F1AP-IEs.asn | 5509 ++++++++ .../ASN1/R16.3.1/F1AP-PDU-Contents.asn | 3633 ++++++ .../ASN1/R16.3.1/F1AP-PDU-Descriptions.asn | 723 ++ openair2/F1AP/f1ap_common.h | 15 +- openair2/F1AP/f1ap_cu_interface_management.c | 50 +- openair2/F1AP/f1ap_cu_rrc_message_transfer.c | 27 +- openair2/F1AP/f1ap_cu_ue_context_management.c | 146 +- openair2/F1AP/f1ap_du_interface_management.c | 168 +- openair2/F1AP/f1ap_du_rrc_message_transfer.c | 6 +- openair2/F1AP/f1ap_du_ue_context_management.c | 13 +- openair2/RRC/LTE/rrc_eNB.c | 4 +- .../COMMON/EMM/MSG/CsServiceNotification.h | 2 +- targets/COMMON/openairinterface5g_limits.h | 24 +- 25 files changed, 21755 insertions(+), 330 deletions(-) create mode 100644 openair2/F1AP/MESSAGES/ASN1/R16.3.1/38473-g31.asn create mode 100644 openair2/F1AP/MESSAGES/ASN1/R16.3.1/F1AP-CommonDataTypes.asn create mode 100644 openair2/F1AP/MESSAGES/ASN1/R16.3.1/F1AP-Constants.asn create mode 100644 openair2/F1AP/MESSAGES/ASN1/R16.3.1/F1AP-Containers.asn create mode 100644 openair2/F1AP/MESSAGES/ASN1/R16.3.1/F1AP-IEs.asn create mode 100644 openair2/F1AP/MESSAGES/ASN1/R16.3.1/F1AP-PDU-Contents.asn create mode 100644 openair2/F1AP/MESSAGES/ASN1/R16.3.1/F1AP-PDU-Descriptions.asn diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 7f7cb53252..f390cc8109 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -804,12 +804,12 @@ add_dependencies(X2AP_ENB X2AP_LIB rrc_flag x2_flag) # F1AP ############## -add_list1_option(F1AP_RELEASE R15 "F1AP ASN.1 grammar version" R15) +add_list1_option(F1AP_RELEASE R16 "F1AP ASN.1 grammar version" R16) set(F1AP_DIR ${OPENAIR2_DIR}/F1AP) -if (${F1AP_RELEASE} STREQUAL "R15") - make_version(F1AP_VERSION 15 2 1) - set (ASN1RELDIR R15.2.1) -endif(${F1AP_RELEASE} STREQUAL "R15") +if (${F1AP_RELEASE} STREQUAL "R16") + make_version(F1AP_VERSION 16 3 1) + set (ASN1RELDIR R16.3.1) +endif(${F1AP_RELEASE} STREQUAL "R16") add_definitions(-DF1AP_VERSION=${F1AP_VERSION}) set(F1AP_ASN_DIR ${F1AP_DIR}/MESSAGES/ASN1/${ASN1RELDIR}) set(F1AP_ASN_FILES diff --git a/openair1/PHY/INIT/lte_init.c b/openair1/PHY/INIT/lte_init.c index 5cde7199aa..c0f6c2a39a 100644 --- a/openair1/PHY/INIT/lte_init.c +++ b/openair1/PHY/INIT/lte_init.c @@ -48,6 +48,14 @@ int N_RB_DL_array[6] = { 6, 15, 25, 50, 75, 100 }; extern RAN_CONTEXT_t RC; +void pdsch_procedures(PHY_VARS_eNB *eNB, + L1_rxtx_proc_t *proc, + int harq_pid, + LTE_eNB_DLSCH_t *dlsch, + LTE_eNB_DLSCH_t *dlsch1); + +void init_sss(void); + int l1_north_init_eNB () { int i,j; @@ -364,7 +372,7 @@ void fill_subframe_mask(PHY_VARS_eNB *eNB) { eNB->dlsch[0][0]->harq_ids[0][sf]=0; eNB->dlsch[0][0]->rnti=0x1234; dlsch_harq->nb_rb=48; - dlsch_harq->rb_alloc[0]=0xffffffffffff; + dlsch_harq->rb_alloc[0]=(uint32_t)0xffffffff; dlsch_harq->Qm=2; dlsch_harq->Nl=1; dlsch_harq->pdsch_start=1; diff --git a/openair1/PHY/LTE_TRANSPORT/transport_proto.h b/openair1/PHY/LTE_TRANSPORT/transport_proto.h index 2de4c2698b..786aaca6e3 100644 --- a/openair1/PHY/LTE_TRANSPORT/transport_proto.h +++ b/openair1/PHY/LTE_TRANSPORT/transport_proto.h @@ -520,6 +520,9 @@ int generate_eNB_ulsch_params_from_dci(PHY_VARS_eNB *PHY_vars_eNB, void dump_ulsch(PHY_VARS_eNB *phy_vars_eNB,int frame, int subframe, uint8_t UE_id,int round); +void dump_ulsch_stats(PHY_VARS_eNB *eNB,int frame); +void dump_uci_stats(PHY_VARS_eNB *eNB,int frame); + diff --git a/openair1/PHY/LTE_TRANSPORT/uci_tools.c b/openair1/PHY/LTE_TRANSPORT/uci_tools.c index f8ade9afc8..8a1ced6ea8 100644 --- a/openair1/PHY/LTE_TRANSPORT/uci_tools.c +++ b/openair1/PHY/LTE_TRANSPORT/uci_tools.c @@ -42,7 +42,7 @@ int16_t find_uci(uint16_t rnti, int frame, int subframe, PHY_VARS_eNB *eNB,find_ int16_t first_free_index=-1; AssertFatal(eNB!=NULL,"eNB is null\n"); - for (i=0; iuci_vars[i].active >0) && (eNB->uci_vars[i].rnti==rnti) && (eNB->uci_vars[i].frame==frame) && diff --git a/openair1/PHY/defs_eNB.h b/openair1/PHY/defs_eNB.h index 217f0edddb..f845997423 100644 --- a/openair1/PHY/defs_eNB.h +++ b/openair1/PHY/defs_eNB.h @@ -507,7 +507,7 @@ typedef struct PHY_VARS_eNB_s { LTE_eNB_MPDCCH mpdcch_vars[2]; LTE_eNB_PRACH prach_vars_br; LTE_eNB_COMMON common_vars; - LTE_eNB_UCI uci_vars[NUMBER_OF_UCI_VARS_MAX]; + LTE_eNB_UCI uci_vars[NUMBER_OF_UCI_MAX]; LTE_eNB_SRS srs_vars[NUMBER_OF_UE_MAX]; LTE_eNB_PBCH pbch; LTE_eNB_PUSCH *pusch_vars[NUMBER_OF_UE_MAX]; diff --git a/openair1/SCHED/fapi_l1.c b/openair1/SCHED/fapi_l1.c index 4448a22ad2..33cc154636 100644 --- a/openair1/SCHED/fapi_l1.c +++ b/openair1/SCHED/fapi_l1.c @@ -213,13 +213,13 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro UE_id = find_dlsch(rel8->rnti,eNB,SEARCH_EXIST_OR_FREE); - if( (UE_id<0) || (UE_id>=NUMBER_OF_UE_MAX) ) { + if( (UE_id<0) || (UE_id>=NUMBER_OF_DLSCH_MAX) ) { LOG_E(PHY,"illegal UE_id found!!! rnti %04x UE_id %d\n",rel8->rnti,UE_id); return; } //AssertFatal(UE_id!=-1,"no free or exiting dlsch_context\n"); - //AssertFatal(UE_id= %d(NUMBER_OF_UE_MAX)\n",UE_id,NUMBER_OF_UE_MAX); + //AssertFatal(UE_id= %d(NUMBER_OF_DLSCHMAX)\n",UE_id,NUMBER_OF_DLSCH_MAX); dlsch0 = eNB->dlsch[UE_id][0]; dlsch1 = eNB->dlsch[UE_id][1]; @@ -295,7 +295,7 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro if ((rel13->pdsch_payload_type <2) && (rel13->ue_type>0)) { // this is a BR/CE UE and SIB1-BR/SI-BR UE_id = find_dlsch(rel8->rnti,eNB,SEARCH_EXIST_OR_FREE); AssertFatal(UE_id!=-1,"no free or exiting dlsch_context\n"); - AssertFatal(UE_id= %d(NUMBER_OF_UE_MAX)\n",UE_id,NUMBER_OF_UE_MAX); + AssertFatal(UE_id= %d(NUMBER_OF_DLSCH_MAX)\n",UE_id,NUMBER_OF_DLSCH_MAX); dlsch0 = eNB->dlsch[UE_id][0]; dlsch0->harq_mask = 1; dlsch0_harq = dlsch0->harq_processes[0]; @@ -370,7 +370,7 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro } else { UE_id = find_dlsch(rel8->rnti,eNB,SEARCH_EXIST_OR_FREE); AssertFatal(UE_id!=-1,"no free or exiting dlsch_context\n"); - AssertFatal(UE_id= %d(NUMBER_OF_UE_MAX)\n",UE_id,NUMBER_OF_UE_MAX); + AssertFatal(UE_id= %d(NUMBER_OF_DLSCH_MAX)\n",UE_id,NUMBER_OF_DLSCH_MAX); dlsch0 = eNB->dlsch[UE_id][0]; dlsch1 = eNB->dlsch[UE_id][1]; dlsch0->sib1_br_flag=0; @@ -664,7 +664,7 @@ void handle_srs_pdu(PHY_VARS_eNB *eNB,nfapi_ul_config_request_pdu_t *ul_config_p if (NFAPI_MODE==NFAPI_MODE_VNF) return; - for (i=0; isoundingrs_ul_config_dedicated[i].active==1) continue; eNB->soundingrs_ul_config_dedicated[i].active = 1; @@ -680,7 +680,7 @@ void handle_srs_pdu(PHY_VARS_eNB *eNB,nfapi_ul_config_request_pdu_t *ul_config_p break; } - AssertFatal(ipdcch_vars[subframe&1].num_pdcch_symbols = number_pdcch_ofdm_symbols; eNB->pdcch_vars[subframe&1].num_dci = 0; eNB->phich_vars[subframe&1].num_hi = 0; @@ -815,8 +815,8 @@ void schedule_response(Sched_Rsp_t *Sched_INFO, L1_rxtx_proc_t *proc) { // clear DCI allocation maps for new subframe if (NFAPI_MODE!=NFAPI_MODE_VNF) - for (i=0; iulsch[i]) { + for (volatile int i=0; iulsch[i]!=NULL) { ulsch_harq = eNB->ulsch[i]->harq_processes[harq_pid]; ulsch_harq->dci_alloc=0; ulsch_harq->rar_alloc=0; @@ -824,7 +824,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO, L1_rxtx_proc_t *proc) { } } - for (i=0; idl_config_request_body.dl_config_pdu_list[i]; //LOG_D(PHY,"NFAPI: dl_pdu %d : type %d\n",i,dl_config_pdu->pdu_type); @@ -973,7 +973,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO, L1_rxtx_proc_t *proc) { } if (NFAPI_MODE!=NFAPI_MODE_VNF) - for (i=0; ihi_dci0_request_body.hi_dci0_pdu_list[i]; LOG_D(PHY,"NFAPI: hi_dci0_pdu %d : type %d\n",i,hi_dci0_req_pdu->pdu_type); @@ -1003,7 +1003,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO, L1_rxtx_proc_t *proc) { number_ul_pdu=0; } } else { - for (i=0; iul_config_request_body.ul_config_pdu_list[i]; LOG_D(PHY,"NFAPI: ul_pdu %d : type %d\n",i,ul_config_pdu->pdu_type); AssertFatal(ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_ULSCH_PDU_TYPE || diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c index a9a7a25dcc..78cca83e53 100644 --- a/openair1/SCHED/phy_procedures_lte_eNb.c +++ b/openair1/SCHED/phy_procedures_lte_eNb.c @@ -56,20 +56,20 @@ extern RAN_CONTEXT_t RC; nfapi_ue_release_request_body_t release_rntis; -int16_t get_hundred_times_delta_IF_eNB(PHY_VARS_eNB *eNB,uint16_t UE_id,uint8_t harq_pid, uint8_t bw_factor) { +int16_t get_hundred_times_delta_IF_eNB(PHY_VARS_eNB *eNB,uint16_t ULSCH_id,uint8_t harq_pid, uint8_t bw_factor) { uint32_t Nre,sumKr,MPR_x100,Kr,r; uint16_t beta_offset_pusch; - DevAssert( UE_id < NUMBER_OF_UE_MAX+1 ); + DevAssert( ULSCH_id < NUMBER_OF_ULSCH_MAX+1 ); DevAssert( harq_pid < 8 ); - Nre = eNB->ulsch[UE_id]->harq_processes[harq_pid]->Nsymb_initial * - eNB->ulsch[UE_id]->harq_processes[harq_pid]->nb_rb*12; + Nre = eNB->ulsch[ULSCH_id]->harq_processes[harq_pid]->Nsymb_initial * + eNB->ulsch[ULSCH_id]->harq_processes[harq_pid]->nb_rb*12; sumKr = 0; - for (r=0; rulsch[UE_id]->harq_processes[harq_pid]->C; r++) { - if (rulsch[UE_id]->harq_processes[harq_pid]->Cminus) - Kr = eNB->ulsch[UE_id]->harq_processes[harq_pid]->Kminus; + for (r=0; rulsch[ULSCH_id]->harq_processes[harq_pid]->C; r++) { + if (rulsch[ULSCH_id]->harq_processes[harq_pid]->Cminus) + Kr = eNB->ulsch[ULSCH_id]->harq_processes[harq_pid]->Kminus; else - Kr = eNB->ulsch[UE_id]->harq_processes[harq_pid]->Kplus; + Kr = eNB->ulsch[ULSCH_id]->harq_processes[harq_pid]->Kplus; sumKr += Kr; } @@ -82,14 +82,14 @@ int16_t get_hundred_times_delta_IF_eNB(PHY_VARS_eNB *eNB,uint16_t UE_id,uint8_t // FK 20140908 sumKr is only set after the ulsch_encoding beta_offset_pusch = 8; //(eNB->ulsch[UE_id]->harq_processes[harq_pid]->control_only == 1) ? eNB->ulsch[UE_id]->beta_offset_cqi_times8:8; - DevAssert( UE_id < NUMBER_OF_UE_MAX ); + DevAssert( ULSCH_id < NUMBER_OF_ULSCH_MAX ); //#warning "This condition happens sometimes. Need more investigation" // navid //DevAssert( MPR_x100/6 < 100 ); if (1==1) { //eNB->ul_power_control_dedicated[UE_id].deltaMCS_Enabled == 1) { // This is the formula from Section 5.1.1.1 in 36.213 10*log10(deltaIF_PUSCH = (2^(MPR*Ks)-1)*beta_offset_pusch) if (bw_factor == 1) { - uint8_t nb_rb = eNB->ulsch[UE_id]->harq_processes[harq_pid]->nb_rb; + uint8_t nb_rb = eNB->ulsch[ULSCH_id]->harq_processes[harq_pid]->nb_rb; return(hundred_times_delta_TF[MPR_x100/6]+10*dB_fixed_times10((beta_offset_pusch)>>3)) + hundred_times_log10_NPRB[nb_rb-1]; } else return(hundred_times_delta_TF[MPR_x100/6]+10*dB_fixed_times10((beta_offset_pusch)>>3)); @@ -100,21 +100,21 @@ int16_t get_hundred_times_delta_IF_eNB(PHY_VARS_eNB *eNB,uint16_t UE_id,uint8_t int16_t get_hundred_times_delta_IF_mac(module_id_t module_idP, uint8_t CC_id, rnti_t rnti, uint8_t harq_pid) { - int8_t UE_id; + int8_t ULSCH_id; if ((RC.eNB == NULL) || (module_idP > RC.nb_inst) || (CC_id > RC.nb_CC[module_idP])) { LOG_E(PHY,"get_UE_stats: No eNB found (or not allocated) for Mod_id %d,CC_id %d\n",module_idP,CC_id); return -1; } - UE_id = find_ulsch( rnti, RC.eNB[module_idP][CC_id],SEARCH_EXIST); + ULSCH_id = find_ulsch( rnti, RC.eNB[module_idP][CC_id],SEARCH_EXIST); - if (UE_id == -1) { + if (ULSCH_id == -1) { // not found return 0; } - return get_hundred_times_delta_IF_eNB( RC.eNB[module_idP][CC_id], UE_id, harq_pid, 0 ); + return get_hundred_times_delta_IF_eNB( RC.eNB[module_idP][CC_id], ULSCH_id, harq_pid, 0 ); } int oai_nfapi_rach_ind(nfapi_rach_indication_t *rach_ind); @@ -502,9 +502,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB, int do_meas) { int frame=proc->frame_tx; int subframe=proc->subframe_tx; - uint32_t i,aa; uint8_t harq_pid; - int16_t UE_id=0; uint8_t num_pdcch_symbols=0; uint8_t num_dci=0; uint8_t num_mdci = 0; @@ -519,11 +517,10 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB, VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX+(eNB->CC_id),1); if (do_meas==1) start_meas(&eNB->phy_proc_tx); - if (do_meas==1) start_meas(&eNB->dlsch_common_and_dci); // clear the transmit data array for the current subframe - for (aa = 0; aa < fp->nb_antenna_ports_eNB; aa++) { + for (int aa = 0; aa < fp->nb_antenna_ports_eNB; aa++) { if (eNB->use_DTX==0) memcpy(&eNB->common_vars.txdataF[aa][subframe * fp->ofdm_symbol_size * (fp->symbols_per_tti)], &eNB->subframe_mask[aa][subframe*fp->ofdm_symbol_size*fp->symbols_per_tti], @@ -563,7 +560,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB, ul_frame = pdcch_alloc2ul_frame (fp, frame, subframe); // clear previous allocation information for all UEs - for (i = 0; i < NUMBER_OF_UE_MAX; i++) { + for (volatile int i = 0; i < NUMBER_OF_DLSCH_MAX; i++) { if (eNB->dlsch[i][0]) eNB->dlsch[i][0]->subframe_tx[subframe] = 0; } @@ -572,7 +569,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB, //if ((ul_subframe < 10)&& // (subframe_select(fp,ul_subframe)==SF_UL)) { // This means that there is a potential UL subframe that will be scheduled here if (ul_subframe < 10) { // This means that there is a potential UL subframe that will be scheduled here - for (i=0; iulsch[i] && eNB->ulsch[i]->ue_type >0) harq_pid = 0; else @@ -658,9 +655,9 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB, // Now scan UE specific DLSCH LTE_eNB_DLSCH_t *dlsch0,*dlsch1; - for (UE_id=0; UE_iddlsch[(uint8_t)UE_id][0]; - dlsch1 = eNB->dlsch[(uint8_t)UE_id][1]; + for (int DLSCH_id=0; DLSCH_iddlsch[(uint8_t)DLSCH_id][0]; + dlsch1 = eNB->dlsch[(uint8_t)DLSCH_id][1]; if ((dlsch0)&&(dlsch0->rnti>0)&& #ifdef PHY_TX_THREAD @@ -670,12 +667,13 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB, #endif ) { // get harq_pid - harq_pid = dlsch0->harq_ids[frame%2][subframe]; + harq_pid = dlsch0->harq_ids[frame%2][subframe]; //AssertFatal(harq_pid>=0,"harq_pid is negative\n"); if((harq_pid < 0) || (harq_pid >= dlsch0->Mdlharq)) { + if (dlsch0->ue_type==0) - LOG_E(PHY,"harq_pid:%d corrupt must be 0-7 UE_id:%d frame:%d subframe:%d rnti:%x [ %1d.%1d.%1d.%1d.%1d.%1d.%1d.%1d\n", harq_pid,UE_id,frame,subframe,dlsch0->rnti, + LOG_E(PHY,"harq_pid:%d corrupt must be 0-7 DLSCH_id:%d frame:%d subframe:%d rnti:%x [ %1d.%1d.%1d.%1d.%1d.%1d.%1d.%1d\n", harq_pid,DLSCH_id,frame,subframe,dlsch0->rnti, dlsch0->harq_ids[frame%2][0], dlsch0->harq_ids[frame%2][1], dlsch0->harq_ids[frame%2][2], @@ -689,7 +687,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB, proc, harq_pid, dlsch0, - &eNB->UE_stats[(uint32_t)UE_id])) { + &eNB->UE_stats[(uint32_t)DLSCH_id])) { // if we generate dlsch, we must generate pdsch pdsch_procedures(eNB, proc, @@ -724,6 +722,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB, if (do_meas==1) stop_meas(&eNB->phy_proc_tx); } +/* This has to be updated with FAPI structures*/ void srs_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) { LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms; @@ -735,7 +734,7 @@ void srs_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) { // Do SRS processing // check if there is SRS and we have to use shortened format // TODO: check for exceptions in transmission of SRS together with ACK/NACK - for (i = 0; i < NUMBER_OF_UE_MAX; i++) { + for (i = 0; i < NUMBER_OF_SRS_MAX; i++) { if (eNB->soundingrs_ul_config_dedicated[i].active == 1) { if (lte_srs_channel_estimation (fp, &eNB->common_vars, &eNB->srs_vars[i], &eNB->soundingrs_ul_config_dedicated[i], subframe, 0 /*eNB_id */ )) { LOG_E (PHY, "problem processing SRS\n"); @@ -798,7 +797,7 @@ uci_procedures(PHY_VARS_eNB *eNB, LTE_eNB_UCI *uci = NULL; LTE_DL_FRAME_PARMS *fp = &(eNB->frame_parms); - for (int i = 0; i < NUMBER_OF_UCI_VARS_MAX; i++) { + for (int i = 0; i < NUMBER_OF_UCI_MAX; i++) { uci = &(eNB->uci_vars[i]); if ((uci->active == 1) && (uci->frame == frame) && (uci->subframe == subframe)) { @@ -1280,7 +1279,7 @@ uci_procedures(PHY_VARS_eNB *eNB, #ifdef DEBUG_PHY_PROC LOG_D (PHY, "[eNB %d][PDSCH %x] Frame %d subframe %d ACK/NAK metric 0 %d, metric 1 %d, (%d,%d)\n", eNB->Mod_id, - eNB->dlsch[UE_id][0]->rnti, frame, subframe, metric0, metric1, pucch_b0b1[0], pucch_b0b1[1]); + eNB->dlsch[DLSCH_id][0]->rnti, frame, subframe, metric0, metric1, pucch_b0b1[0], pucch_b0b1[1]); #endif } @@ -1303,7 +1302,7 @@ uci_procedures(PHY_VARS_eNB *eNB, } } } // end if ((uci->active == 1) && (uci->frame == frame) && (uci->subframe == subframe)) { - } // end loop for (int i = 0; i < NUMBER_OF_UE_MAX; i++) { + } // end loop for (int i = 0; i < NUMBER_OF_UCI_MAX; i++) { } void postDecode(L1_rxtx_proc_t *proc, notifiedFIFO_elt_t *req) { @@ -1415,7 +1414,7 @@ void pusch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) { const int frame = proc->frame_rx; uint32_t harq_pid0 = subframe2harq_pid(&eNB->frame_parms,frame,subframe); - for (i = 0; i < NUMBER_OF_UE_MAX; i++) { + for (i = 0; i < NUMBER_OF_ULSCH_MAX; i++) { ulsch = eNB->ulsch[i]; if (ulsch->ue_type > 0) harq_pid = 0; @@ -1496,7 +1495,7 @@ void pusch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) { ulsch->harq_mask &= ~(1 << harq_pid); LOG_W (PHY, "Removing stale ULSCH config for UE %x harq_pid %d (harq_mask is now 0x%2.2x)\n", ulsch->rnti, harq_pid, ulsch->harq_mask); } - } // for (i=0; inbDecode > 0) { notifiedFIFO_elt_t *req=pullTpool(proc->respDecode, proc->threadPool); @@ -1664,7 +1663,7 @@ void fill_rx_indication(PHY_VARS_eNB *eNB, * Release the harq process if its round is >= 'after_rounds' */ static void do_release_harq(PHY_VARS_eNB *eNB, - int UE_id, + int DLSCH_id, int tb, uint16_t frame, uint8_t subframe, @@ -1679,10 +1678,10 @@ static void do_release_harq(PHY_VARS_eNB *eNB, int harq_pid; int subframe_tx; int frame_tx; - AssertFatal(UE_id != -1, "No existing dlsch context\n"); - AssertFatal(UE_id < NUMBER_OF_UE_MAX, "Returned UE_id %d >= %d (NUMBER_OF_UE_MAX)\n", UE_id, NUMBER_OF_UE_MAX); - dlsch0 = eNB->dlsch[UE_id][0]; - dlsch1 = eNB->dlsch[UE_id][1]; + AssertFatal(DLSCH_id != -1, "No existing dlsch context\n"); + AssertFatal(DLSCH_id < NUMBER_OF_DLSCH_MAX, "Returned DLSCH_id %d >= %d (NUMBER_OF_DLSCH_MAX)\n", DLSCH_id, NUMBER_OF_DLSCH_MAX); + dlsch0 = eNB->dlsch[DLSCH_id][0]; + dlsch1 = eNB->dlsch[DLSCH_id][1]; if (eNB->frame_parms.frame_type == FDD) { subframe_tx = (subframe + 6) % 10; @@ -1781,13 +1780,13 @@ static void do_release_harq(PHY_VARS_eNB *eNB, } // end if TDD } -static void release_harq(PHY_VARS_eNB *eNB,int UE_id,int tb,uint16_t frame,uint8_t subframe,uint16_t mask, int is_ack) { +static void release_harq(PHY_VARS_eNB *eNB,int DLSCH_id,int tb,uint16_t frame,uint8_t subframe,uint16_t mask, int is_ack) { /* * Maximum number of DL transmissions = 4. * TODO: get the value from configuration. * If is_ack is true then we release immediately. The value -1 can be used for that. */ - do_release_harq(eNB, UE_id, tb, frame, subframe, mask, is_ack ? -1 : 4); + do_release_harq(eNB, DLSCH_id, tb, frame, subframe, mask, is_ack ? -1 : 4); } int getM(PHY_VARS_eNB *eNB,int frame,int subframe) { @@ -1867,14 +1866,14 @@ void fill_ulsch_cqi_indication (PHY_VARS_eNB *eNB, uint16_t frame, uint8_t subfr } void fill_ulsch_harq_indication (PHY_VARS_eNB *eNB, LTE_UL_eNB_HARQ_t *ulsch_harq, uint16_t rnti, int frame, int subframe, int bundling) { - int UE_id = find_dlsch(rnti,eNB,SEARCH_EXIST); + int DLSCH_id = find_dlsch(rnti,eNB,SEARCH_EXIST); - if( (UE_id<0) || (UE_id>=NUMBER_OF_UE_MAX) ) { - LOG_E(PHY,"illegal UE_id found!!! rnti %04x UE_id %d\n",rnti,UE_id); + if( (DLSCH_id<0) || (DLSCH_id>=NUMBER_OF_DLSCH_MAX) ) { + LOG_E(PHY,"illegal DLSCH_id found!!! rnti %04x DLSCH_id %d\n",rnti,DLSCH_id); return; } - //AssertFatal(UE_id>=0,"UE_id doesn't exist\n"); + //AssertFatal(DLSCH_id>=0,"DLSCH_id doesn't exist\n"); pthread_mutex_lock(&eNB->UL_INFO_mutex); nfapi_harq_indication_pdu_t *pdu = &eNB->UL_INFO.harq_ind.harq_indication_body.harq_pdu_list[eNB->UL_INFO.harq_ind.harq_indication_body.number_of_harqs]; int M; @@ -1896,7 +1895,7 @@ void fill_ulsch_harq_indication (PHY_VARS_eNB *eNB, LTE_UL_eNB_HARQ_t *ulsch_har AssertFatal (ulsch_harq->o_ACK[i] == 0 || ulsch_harq->o_ACK[i] == 1, "harq_ack[%d] is %d, should be 1,2 or 4\n", i, ulsch_harq->o_ACK[i]); pdu->harq_indication_fdd_rel13.harq_tb_n[i] = 2 - ulsch_harq->o_ACK[i]; // release DLSCH if needed - release_harq(eNB,UE_id,i,frame,subframe,0xffff, ulsch_harq->o_ACK[i] == 1); + release_harq(eNB,DLSCH_id,i,frame,subframe,0xffff, ulsch_harq->o_ACK[i] == 1); } } else { // TDD M = ul_ACK_subframe2_M (&eNB->frame_parms, subframe); @@ -1912,14 +1911,14 @@ void fill_ulsch_harq_indication (PHY_VARS_eNB *eNB, LTE_UL_eNB_HARQ_t *ulsch_har * We have to release the proper HARQ in case of ACK or NACK if max retransmission reached. * Basically, call release_harq with 1 as last argument when ACK and 0 when NACK. */ - release_harq(eNB,UE_id,i,frame,subframe,0xffff, ulsch_harq->o_ACK[i] == 1); + release_harq(eNB,DLSCH_id,i,frame,subframe,0xffff, ulsch_harq->o_ACK[i] == 1); - if (M==1 && ulsch_harq->O_ACK==1 && ulsch_harq->o_ACK[i] == 1) release_harq(eNB,UE_id,0,frame,subframe,0xffff, ulsch_harq->o_ACK[i] == 1); - else if (M==1 && ulsch_harq->O_ACK==2 && ulsch_harq->o_ACK[i] == 1) release_harq(eNB,UE_id,i,frame,subframe,0xffff, ulsch_harq->o_ACK[i] == 1); + if (M==1 && ulsch_harq->O_ACK==1 && ulsch_harq->o_ACK[i] == 1) release_harq(eNB,DLSCH_id,0,frame,subframe,0xffff, ulsch_harq->o_ACK[i] == 1); + else if (M==1 && ulsch_harq->O_ACK==2 && ulsch_harq->o_ACK[i] == 1) release_harq(eNB,DLSCH_id,i,frame,subframe,0xffff, ulsch_harq->o_ACK[i] == 1); else if (M>1 && ulsch_harq->o_ACK[i] == 1) { // spatial bundling - release_harq(eNB,UE_id,0,frame,subframe,1<o_ACK[i] == 1); - release_harq(eNB,UE_id,1,frame,subframe,1<o_ACK[i] == 1); + release_harq(eNB,DLSCH_id,0,frame,subframe,1<o_ACK[i] == 1); + release_harq(eNB,DLSCH_id,1,frame,subframe,1<o_ACK[i] == 1); } } } @@ -1935,10 +1934,10 @@ void fill_uci_harq_indication (int UEid, PHY_VARS_eNB *eNB, LTE_eNB_UCI *uci, in return; } - int UE_id=find_dlsch(uci->rnti,eNB,SEARCH_EXIST); + int DLSCH_id=find_dlsch(uci->rnti,eNB,SEARCH_EXIST); - //AssertFatal(UE_id>=0,"UE_id doesn't exist rnti:%x\n", uci->rnti); - if (UE_id < 0) { + //AssertFatal(DLSCH_id>=0,"DLSCH_id doesn't exist rnti:%x\n", uci->rnti); + if (DLSCH_id < 0) { LOG_E(PHY,"SFN/SF:%04d%d Unable to find rnti:%x do not send HARQ\n", frame, subframe, uci->rnti); return; } @@ -1978,7 +1977,7 @@ void fill_uci_harq_indication (int UEid, PHY_VARS_eNB *eNB, LTE_eNB_UCI *uci, in AssertFatal (harq_ack[0] == 1 || harq_ack[0] == 2 || harq_ack[0] == 4, "harq_ack[0] is %d, should be 1,2 or 4\n", harq_ack[0]); pdu->harq_indication_fdd_rel13.harq_tb_n[0] = harq_ack[0]; // release DLSCH if needed - release_harq(eNB,UE_id,0,frame,subframe,0xffff, harq_ack[0] == 1); + release_harq(eNB,DLSCH_id,0,frame,subframe,0xffff, harq_ack[0] == 1); } else if (uci->pucch_fmt == pucch_format1b) { pdu->harq_indication_fdd_rel13.tl.tag = NFAPI_HARQ_INDICATION_FDD_REL13_TAG; pdu->harq_indication_fdd_rel13.mode = 0; @@ -1988,8 +1987,8 @@ void fill_uci_harq_indication (int UEid, PHY_VARS_eNB *eNB, LTE_eNB_UCI *uci, in pdu->harq_indication_fdd_rel13.harq_tb_n[0] = harq_ack[0]; pdu->harq_indication_fdd_rel13.harq_tb_n[1] = harq_ack[1]; // release DLSCH if needed - release_harq(eNB,UE_id,0,frame,subframe,0xffff, harq_ack[0] == 1); - release_harq(eNB,UE_id,1,frame,subframe,0xffff, harq_ack[1] == 1); + release_harq(eNB,DLSCH_id,0,frame,subframe,0xffff, harq_ack[0] == 1); + release_harq(eNB,DLSCH_id,1,frame,subframe,0xffff, harq_ack[1] == 1); } else AssertFatal(1==0,"only format 1a/b for now, received %d\n",uci->pucch_fmt); } else { // TDD AssertFatal (tdd_mapping_mode == 0 || tdd_mapping_mode == 1 || tdd_mapping_mode == 2, "Illegal tdd_mapping_mode %d\n", tdd_mapping_mode); @@ -2007,7 +2006,7 @@ void fill_uci_harq_indication (int UEid, PHY_VARS_eNB *eNB, LTE_eNB_UCI *uci, in AssertFatal(harq_ack[0] == 1 || harq_ack[0] == 2 || harq_ack[0] == 4, "harq_ack[0] is %d, should be 1,2 or 4\n",harq_ack[0]); pdu->harq_indication_tdd_rel13.harq_data[0].bundling.value_0 = harq_ack[0]; // release all bundled DLSCH if needed - release_harq(eNB,UE_id,0,frame,subframe,0xffff, harq_ack[0] == 1); + release_harq(eNB,DLSCH_id,0,frame,subframe,0xffff, harq_ack[0] == 1); } else if (uci->pucch_fmt == pucch_format1b) { pdu->harq_indication_tdd_rel13.number_of_ack_nack = 2; AssertFatal(harq_ack[0] == 1 || harq_ack[0] == 2 || harq_ack[1] == 4, "harq_ack[0] is %d, should be 0,1 or 4\n",harq_ack[0]); @@ -2016,8 +2015,8 @@ void fill_uci_harq_indication (int UEid, PHY_VARS_eNB *eNB, LTE_eNB_UCI *uci, in pdu->harq_indication_tdd_rel13.harq_data[0].bundling.value_0 = harq_ack[0]; pdu->harq_indication_tdd_rel13.harq_data[1].bundling.value_0 = harq_ack[1]; // release all DLSCH if needed - release_harq(eNB,UE_id,0,frame,subframe,0xffff, harq_ack[0] == 1); - release_harq(eNB,UE_id,1,frame,subframe,0xffff, harq_ack[1] == 1); + release_harq(eNB,DLSCH_id,0,frame,subframe,0xffff, harq_ack[0] == 1); + release_harq(eNB,DLSCH_id,1,frame,subframe,0xffff, harq_ack[1] == 1); } break; @@ -2031,7 +2030,7 @@ void fill_uci_harq_indication (int UEid, PHY_VARS_eNB *eNB, LTE_eNB_UCI *uci, in AssertFatal(harq_ack[0] == 1 || harq_ack[0] == 2 || harq_ack[0] == 4, "harq_ack[0] is %d, should be 1,2 or 4\n",harq_ack[0]); pdu->harq_indication_tdd_rel13.harq_data[0].multiplex.value_0 = harq_ack[0]; // release all DLSCH if needed - release_harq(eNB,UE_id,0,frame,subframe,0xffff, harq_ack[0] == 1); + release_harq(eNB,DLSCH_id,0,frame,subframe,0xffff, harq_ack[0] == 1); } else if (uci->num_pucch_resources == 1 && uci->pucch_fmt == pucch_format1b) { pdu->harq_indication_tdd_rel13.tl.tag = NFAPI_HARQ_INDICATION_TDD_REL13_TAG; pdu->harq_indication_tdd_rel13.number_of_ack_nack = 2; @@ -2040,8 +2039,8 @@ void fill_uci_harq_indication (int UEid, PHY_VARS_eNB *eNB, LTE_eNB_UCI *uci, in pdu->harq_indication_tdd_rel13.harq_data[0].multiplex.value_0 = harq_ack[0]; pdu->harq_indication_tdd_rel13.harq_data[1].multiplex.value_0 = harq_ack[1]; // release all DLSCH if needed - release_harq(eNB,UE_id,0,frame,subframe,0xffff, harq_ack[0] == 1); - release_harq(eNB,UE_id,1,frame,subframe,0xffff, harq_ack[1] == 1); + release_harq(eNB,DLSCH_id,0,frame,subframe,0xffff, harq_ack[0] == 1); + release_harq(eNB,DLSCH_id,1,frame,subframe,0xffff, harq_ack[1] == 1); } else { // num_pucch_resources (M) > 1 pdu->harq_indication_tdd_rel13.tl.tag = NFAPI_HARQ_INDICATION_TDD_REL13_TAG; pdu->harq_indication_tdd_rel13.number_of_ack_nack = uci->num_pucch_resources; @@ -2053,8 +2052,8 @@ void fill_uci_harq_indication (int UEid, PHY_VARS_eNB *eNB, LTE_eNB_UCI *uci, in if (uci->num_pucch_resources == 4) pdu->harq_indication_tdd_rel13.harq_data[3].multiplex.value_0 = harq_ack[3]; // spatial-bundling in this case so release both HARQ if necessary - release_harq(eNB,UE_id,0,frame,subframe,tdd_multiplexing_mask, 1 /* force release? previous code was unconditional */); - release_harq(eNB,UE_id,1,frame,subframe,tdd_multiplexing_mask, 1 /* force release? previous code was unconditional */); + release_harq(eNB,DLSCH_id,0,frame,subframe,tdd_multiplexing_mask, 1 /* force release? previous code was unconditional */); + release_harq(eNB,DLSCH_id,1,frame,subframe,tdd_multiplexing_mask, 1 /* force release? previous code was unconditional */); } break; @@ -2078,8 +2077,8 @@ void fill_uci_harq_indication (int UEid, PHY_VARS_eNB *eNB, LTE_eNB_UCI *uci, in if (uci->num_pucch_resources == 1 || uci->num_pucch_resources == 4 || tdd_config5_sf2scheds == 1 || tdd_config5_sf2scheds == 4 || tdd_config5_sf2scheds == 7) { pdu->harq_indication_tdd_rel13.harq_data[0].bundling.value_0 = 1; - release_harq(eNB,UE_id,0,frame,subframe,0xffff, 1); - release_harq(eNB,UE_id,1,frame,subframe,0xffff, 1); + release_harq(eNB,DLSCH_id,0,frame,subframe,0xffff, 1); + release_harq(eNB,DLSCH_id,1,frame,subframe,0xffff, 1); } else { pdu->harq_indication_tdd_rel13.harq_data[0].bundling.value_0 = 0; } @@ -2090,8 +2089,8 @@ void fill_uci_harq_indication (int UEid, PHY_VARS_eNB *eNB, LTE_eNB_UCI *uci, in if (uci->num_pucch_resources == 2 || tdd_config5_sf2scheds == 2 || tdd_config5_sf2scheds == 5 || tdd_config5_sf2scheds == 8) { pdu->harq_indication_tdd_rel13.harq_data[0].bundling.value_0 = 1; - release_harq(eNB,UE_id,0,frame,subframe,0xffff, 1); - release_harq(eNB,UE_id,1,frame,subframe,0xffff, 1); + release_harq(eNB,DLSCH_id,0,frame,subframe,0xffff, 1); + release_harq(eNB,DLSCH_id,1,frame,subframe,0xffff, 1); } else { pdu->harq_indication_tdd_rel13.harq_data[0].bundling.value_0 = 0; } @@ -2102,8 +2101,8 @@ void fill_uci_harq_indication (int UEid, PHY_VARS_eNB *eNB, LTE_eNB_UCI *uci, in if (uci->num_pucch_resources == 3 || tdd_config5_sf2scheds == 3 || tdd_config5_sf2scheds == 6 || tdd_config5_sf2scheds == 9) { pdu->harq_indication_tdd_rel13.harq_data[0].bundling.value_0 = 1; - release_harq(eNB,UE_id,0,frame,subframe,0xffff, 1); - release_harq(eNB,UE_id,1,frame,subframe,0xffff, 1); + release_harq(eNB,DLSCH_id,0,frame,subframe,0xffff, 1); + release_harq(eNB,DLSCH_id,1,frame,subframe,0xffff, 1); } else { pdu->harq_indication_tdd_rel13.harq_data[0].bundling.value_0 = 0; } @@ -2120,7 +2119,7 @@ void fill_uci_harq_indication (int UEid, PHY_VARS_eNB *eNB, LTE_eNB_UCI *uci, in pthread_mutex_unlock(&eNB->UL_INFO_mutex); } -void fill_crc_indication (PHY_VARS_eNB *eNB, int UE_id, int frame, int subframe, uint8_t crc_flag) { +void fill_crc_indication (PHY_VARS_eNB *eNB, int ULSCH_id, int frame, int subframe, uint8_t crc_flag) { pthread_mutex_lock(&eNB->UL_INFO_mutex); nfapi_crc_indication_pdu_t *pdu = &eNB->UL_INFO.crc_ind.crc_indication_body.crc_pdu_list[eNB->UL_INFO.crc_ind.crc_indication_body.number_of_crcs]; eNB->UL_INFO.crc_ind.sfn_sf = frame<<4 | subframe; @@ -2129,7 +2128,7 @@ void fill_crc_indication (PHY_VARS_eNB *eNB, int UE_id, int frame, int subframe, pdu->instance_length = 0; // don't know what to do with this // pdu->rx_ue_information.handle = handle; pdu->rx_ue_information.tl.tag = NFAPI_RX_UE_INFORMATION_TAG; - pdu->rx_ue_information.rnti = eNB->ulsch[UE_id]->rnti; + pdu->rx_ue_information.rnti = eNB->ulsch[ULSCH_id]->rnti; pdu->crc_indication_rel8.tl.tag = NFAPI_CRC_INDICATION_REL8_TAG; pdu->crc_indication_rel8.crc_flag = crc_flag; eNB->UL_INFO.crc_ind.crc_indication_body.number_of_crcs++; @@ -2184,8 +2183,8 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) { // figure out a better way to choose slot_rx, 19 is ok for a particular TDD configuration with 30kHz SCS if ((frame&127) == 0 && subframe==3) { - dump_ulsch_stats(eNB); - dump_uci_stats(eNB); + dump_ulsch_stats(eNB,frame); + dump_uci_stats(eNB,frame); } // clear unused statistics after 2 seconds @@ -2221,7 +2220,7 @@ void release_rnti_of_phy(module_id_t mod_id) { eNB_PHY = RC.eNB[mod_id][CC_id]; rnti = release_rntis.ue_release_request_TLVs_list[i].rnti; - for (j=0; julsch[j]; if((ulsch != NULL) && (ulsch->rnti == rnti)) { @@ -2246,7 +2245,7 @@ void release_rnti_of_phy(module_id_t mod_id) { if (eNB_PHY->ulsch_stats[j].rnti == rnti) {eNB_PHY->ulsch_stats[j].rnti=0; break;} } - for(j=0; juci_vars[j].rnti == rnti) { LOG_I(PHY, "clean eNb uci_vars[%d] UE %x \n",j, rnti); memset(&eNB_PHY->uci_vars[i],0,sizeof(LTE_eNB_UCI)); diff --git a/openair2/COMMON/platform_constants.h b/openair2/COMMON/platform_constants.h index ff5d68b93b..e736328203 100644 --- a/openair2/COMMON/platform_constants.h +++ b/openair2/COMMON/platform_constants.h @@ -86,18 +86,6 @@ #define MAX_gNB 2 #endif -#define NUMBER_OF_DLSCH_MAX 16 -#define NUMBER_OF_ULSCH_MAX 16 -#define NUMBER_OF_SCH_STATS_MAX 16 - -#define NUMBER_OF_NR_DLSCH_MAX 2//16 -#define NUMBER_OF_NR_ULSCH_MAX 2//16 -#define NUMBER_OF_NR_SCH_STATS_MAX 16 - -#define NUMBER_OF_NR_PUCCH_MAX 16 -#define NUMBER_OF_NR_SR_MAX 16 -#define NUMBER_OF_NR_PDCCH_MAX 16 - #define MAX_MANAGED_ENB_PER_MOBILE 2 #define MAX_MANAGED_GNB_PER_MOBILE 2 diff --git a/openair2/F1AP/MESSAGES/ASN1/R16.3.1/38473-g31.asn b/openair2/F1AP/MESSAGES/ASN1/R16.3.1/38473-g31.asn new file mode 100644 index 0000000000..c821c52010 --- /dev/null +++ b/openair2/F1AP/MESSAGES/ASN1/R16.3.1/38473-g31.asn @@ -0,0 +1,10721 @@ +-- ASN1START +-- ************************************************************** +-- +-- Elementary Procedure definitions +-- +-- ************************************************************** + +F1AP-PDU-Descriptions { +itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) +ngran-access (22) modules (3) f1ap (3) version1 (1) f1ap-PDU-Descriptions (0)} + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +-- ************************************************************** +-- +-- IE parameter types from other modules. +-- +-- ************************************************************** + +IMPORTS + Criticality, + ProcedureCode + +FROM F1AP-CommonDataTypes + Reset, + ResetAcknowledge, + F1SetupRequest, + F1SetupResponse, + F1SetupFailure, + GNBDUConfigurationUpdate, + GNBDUConfigurationUpdateAcknowledge, + GNBDUConfigurationUpdateFailure, + GNBCUConfigurationUpdate, + GNBCUConfigurationUpdateAcknowledge, + GNBCUConfigurationUpdateFailure, + UEContextSetupRequest, + UEContextSetupResponse, + UEContextSetupFailure, + UEContextReleaseCommand, + UEContextReleaseComplete, + UEContextModificationRequest, + UEContextModificationResponse, + UEContextModificationFailure, + UEContextModificationRequired, + UEContextModificationConfirm, + ErrorIndication, + UEContextReleaseRequest, + DLRRCMessageTransfer, + ULRRCMessageTransfer, + GNBDUResourceCoordinationRequest, + GNBDUResourceCoordinationResponse, + PrivateMessage, + UEInactivityNotification, + InitialULRRCMessageTransfer, + SystemInformationDeliveryCommand, + Paging, + Notify, + WriteReplaceWarningRequest, + WriteReplaceWarningResponse, + PWSCancelRequest, + PWSCancelResponse, + PWSRestartIndication, + PWSFailureIndication, + GNBDUStatusIndication, + RRCDeliveryReport, + UEContextModificationRefuse, + F1RemovalRequest, + F1RemovalResponse, + F1RemovalFailure, + NetworkAccessRateReduction, + TraceStart, + DeactivateTrace, + DUCURadioInformationTransfer, + CUDURadioInformationTransfer, + BAPMappingConfiguration, + BAPMappingConfigurationAcknowledge, + GNBDUResourceConfiguration, + GNBDUResourceConfigurationAcknowledge, + IABTNLAddressRequest, + IABTNLAddressResponse, + IABUPConfigurationUpdateRequest, + IABUPConfigurationUpdateResponse, + IABUPConfigurationUpdateFailure, + ResourceStatusRequest, + ResourceStatusResponse, + ResourceStatusFailure, + ResourceStatusUpdate, + AccessAndMobilityIndication, + ReferenceTimeInformationReportingControl, + ReferenceTimeInformationReport, + AccessSuccess, + CellTrafficTrace, + PositioningMeasurementRequest, + PositioningMeasurementResponse, + PositioningMeasurementFailure, + PositioningAssistanceInformationControl, + PositioningAssistanceInformationFeedback, + PositioningMeasurementReport, + PositioningMeasurementAbort, + PositioningMeasurementFailureIndication, + PositioningMeasurementUpdate, + TRPInformationRequest, + TRPInformationResponse, + TRPInformationFailure, + PositioningInformationRequest, + PositioningInformationResponse, + PositioningInformationFailure, + PositioningActivationRequest, + PositioningActivationResponse, + PositioningActivationFailure, + PositioningDeactivation, + PositioningInformationUpdate, + E-CIDMeasurementInitiationRequest, + E-CIDMeasurementInitiationResponse, + E-CIDMeasurementInitiationFailure, + E-CIDMeasurementFailureIndication, + E-CIDMeasurementReport, + E-CIDMeasurementTerminationCommand + + + +FROM F1AP-PDU-Contents + id-Reset, + id-F1Setup, + id-gNBDUConfigurationUpdate, + id-gNBCUConfigurationUpdate, + id-UEContextSetup, + id-UEContextRelease, + id-UEContextModification, + id-UEContextModificationRequired, + id-ErrorIndication, + id-UEContextReleaseRequest, + id-DLRRCMessageTransfer, + id-ULRRCMessageTransfer, + id-GNBDUResourceCoordination, + id-privateMessage, + id-UEInactivityNotification, + id-InitialULRRCMessageTransfer, + id-SystemInformationDeliveryCommand, + id-Paging, + id-Notify, + id-WriteReplaceWarning, + id-PWSCancel, + id-PWSRestartIndication, + id-PWSFailureIndication, + id-GNBDUStatusIndication, + id-RRCDeliveryReport, + id-F1Removal, + id-NetworkAccessRateReduction, + id-TraceStart, + id-DeactivateTrace, + id-DUCURadioInformationTransfer, + id-CUDURadioInformationTransfer, + id-BAPMappingConfiguration, + id-GNBDUResourceConfiguration, + id-IABTNLAddressAllocation, + id-IABUPConfigurationUpdate, + id-resourceStatusReportingInitiation, + id-resourceStatusReporting, + id-accessAndMobilityIndication, + id-ReferenceTimeInformationReportingControl, + id-ReferenceTimeInformationReport, + id-accessSuccess, + id-cellTrafficTrace, + id-PositioningMeasurementExchange, + id-PositioningAssistanceInformationControl, + id-PositioningAssistanceInformationFeedback, + id-PositioningMeasurementReport, + id-PositioningMeasurementAbort, + id-PositioningMeasurementFailureIndication, + id-PositioningMeasurementUpdate, + id-TRPInformationExchange, + id-PositioningInformationExchange, + id-PositioningActivation, + id-PositioningDeactivation, + id-PositioningInformationUpdate, + id-E-CIDMeasurementInitiation, + id-E-CIDMeasurementFailureIndication, + id-E-CIDMeasurementReport, + id-E-CIDMeasurementTermination + + +FROM F1AP-Constants + + ProtocolIE-SingleContainer{}, + F1AP-PROTOCOL-IES + +FROM F1AP-Containers; + + +-- ************************************************************** +-- +-- Interface Elementary Procedure Class +-- +-- ************************************************************** + +F1AP-ELEMENTARY-PROCEDURE ::= CLASS { + &InitiatingMessage , + &SuccessfulOutcome OPTIONAL, + &UnsuccessfulOutcome OPTIONAL, + &procedureCode ProcedureCode UNIQUE, + &criticality Criticality DEFAULT ignore +} +WITH SYNTAX { + INITIATING MESSAGE &InitiatingMessage + [SUCCESSFUL OUTCOME &SuccessfulOutcome] + [UNSUCCESSFUL OUTCOME &UnsuccessfulOutcome] + PROCEDURE CODE &procedureCode + [CRITICALITY &criticality] +} + +-- ************************************************************** +-- +-- Interface PDU Definition +-- +-- ************************************************************** + +F1AP-PDU ::= CHOICE { + initiatingMessage InitiatingMessage, + successfulOutcome SuccessfulOutcome, + unsuccessfulOutcome UnsuccessfulOutcome, + choice-extension ProtocolIE-SingleContainer { { F1AP-PDU-ExtIEs} } +} + +F1AP-PDU-ExtIEs F1AP-PROTOCOL-IES ::= { -- this extension is not used + ... +} + +InitiatingMessage ::= SEQUENCE { + procedureCode F1AP-ELEMENTARY-PROCEDURE.&procedureCode ({F1AP-ELEMENTARY-PROCEDURES}), + criticality F1AP-ELEMENTARY-PROCEDURE.&criticality ({F1AP-ELEMENTARY-PROCEDURES}{@procedureCode}), + value F1AP-ELEMENTARY-PROCEDURE.&InitiatingMessage ({F1AP-ELEMENTARY-PROCEDURES}{@procedureCode}) +} + +SuccessfulOutcome ::= SEQUENCE { + procedureCode F1AP-ELEMENTARY-PROCEDURE.&procedureCode ({F1AP-ELEMENTARY-PROCEDURES}), + criticality F1AP-ELEMENTARY-PROCEDURE.&criticality ({F1AP-ELEMENTARY-PROCEDURES}{@procedureCode}), + value F1AP-ELEMENTARY-PROCEDURE.&SuccessfulOutcome ({F1AP-ELEMENTARY-PROCEDURES}{@procedureCode}) +} + +UnsuccessfulOutcome ::= SEQUENCE { + procedureCode F1AP-ELEMENTARY-PROCEDURE.&procedureCode ({F1AP-ELEMENTARY-PROCEDURES}), + criticality F1AP-ELEMENTARY-PROCEDURE.&criticality ({F1AP-ELEMENTARY-PROCEDURES}{@procedureCode}), + value F1AP-ELEMENTARY-PROCEDURE.&UnsuccessfulOutcome ({F1AP-ELEMENTARY-PROCEDURES}{@procedureCode}) +} + +-- ************************************************************** +-- +-- Interface Elementary Procedure List +-- +-- ************************************************************** + +F1AP-ELEMENTARY-PROCEDURES F1AP-ELEMENTARY-PROCEDURE ::= { + F1AP-ELEMENTARY-PROCEDURES-CLASS-1 | + F1AP-ELEMENTARY-PROCEDURES-CLASS-2, + ... +} + + +F1AP-ELEMENTARY-PROCEDURES-CLASS-1 F1AP-ELEMENTARY-PROCEDURE ::= { + reset | + f1Setup | + gNBDUConfigurationUpdate | + gNBCUConfigurationUpdate | + uEContextSetup | + uEContextRelease | + uEContextModification | + uEContextModificationRequired | + writeReplaceWarning | + pWSCancel | + gNBDUResourceCoordination | + f1Removal | + bAPMappingConfiguration | + gNBDUResourceConfiguration | + iABTNLAddressAllocation | + iABUPConfigurationUpdate | + resourceStatusReportingInitiation | + positioningMeasurementExchange | + tRPInformationExchange | + positioningInformationExchange | + positioningActivation | + e-CIDMeasurementInitiation, + ... +} + +F1AP-ELEMENTARY-PROCEDURES-CLASS-2 F1AP-ELEMENTARY-PROCEDURE ::= { + errorIndication | + uEContextReleaseRequest | + dLRRCMessageTransfer | + uLRRCMessageTransfer | + uEInactivityNotification | + privateMessage | + initialULRRCMessageTransfer | + systemInformationDelivery | + paging | + notify | + pWSRestartIndication | + pWSFailureIndication | + gNBDUStatusIndication | + rRCDeliveryReport | + networkAccessRateReduction | + traceStart | + deactivateTrace | + dUCURadioInformationTransfer | + cUDURadioInformationTransfer | + resourceStatusReporting | + accessAndMobilityIndication | + referenceTimeInformationReportingControl| + referenceTimeInformationReport | + accessSuccess | + cellTrafficTrace | + positioningAssistanceInformationControl | + positioningAssistanceInformationFeedback | + positioningMeasurementReport | + positioningMeasurementAbort | + positioningMeasurementFailureIndication | + positioningMeasurementUpdate | + positioningDeactivation | + e-CIDMeasurementFailureIndication | + e-CIDMeasurementReport | + e-CIDMeasurementTermination | + positioningInformationUpdate, + ... +} +-- ************************************************************** +-- +-- Interface Elementary Procedures +-- +-- ************************************************************** + +reset F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE Reset + SUCCESSFUL OUTCOME ResetAcknowledge + PROCEDURE CODE id-Reset + CRITICALITY reject +} + +f1Setup F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE F1SetupRequest + SUCCESSFUL OUTCOME F1SetupResponse + UNSUCCESSFUL OUTCOME F1SetupFailure + PROCEDURE CODE id-F1Setup + CRITICALITY reject +} + +gNBDUConfigurationUpdate F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE GNBDUConfigurationUpdate + SUCCESSFUL OUTCOME GNBDUConfigurationUpdateAcknowledge + UNSUCCESSFUL OUTCOME GNBDUConfigurationUpdateFailure + PROCEDURE CODE id-gNBDUConfigurationUpdate + CRITICALITY reject +} + +gNBCUConfigurationUpdate F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE GNBCUConfigurationUpdate + SUCCESSFUL OUTCOME GNBCUConfigurationUpdateAcknowledge + UNSUCCESSFUL OUTCOME GNBCUConfigurationUpdateFailure + PROCEDURE CODE id-gNBCUConfigurationUpdate + CRITICALITY reject +} + +uEContextSetup F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE UEContextSetupRequest + SUCCESSFUL OUTCOME UEContextSetupResponse + UNSUCCESSFUL OUTCOME UEContextSetupFailure + PROCEDURE CODE id-UEContextSetup + CRITICALITY reject +} + +uEContextRelease F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE UEContextReleaseCommand + SUCCESSFUL OUTCOME UEContextReleaseComplete + PROCEDURE CODE id-UEContextRelease + CRITICALITY reject +} + +uEContextModification F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE UEContextModificationRequest + SUCCESSFUL OUTCOME UEContextModificationResponse + UNSUCCESSFUL OUTCOME UEContextModificationFailure + PROCEDURE CODE id-UEContextModification + CRITICALITY reject +} + +uEContextModificationRequired F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE UEContextModificationRequired + SUCCESSFUL OUTCOME UEContextModificationConfirm + UNSUCCESSFUL OUTCOME UEContextModificationRefuse + PROCEDURE CODE id-UEContextModificationRequired + CRITICALITY reject +} + +writeReplaceWarning F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE WriteReplaceWarningRequest + SUCCESSFUL OUTCOME WriteReplaceWarningResponse + PROCEDURE CODE id-WriteReplaceWarning + CRITICALITY reject +} + +pWSCancel F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE PWSCancelRequest + SUCCESSFUL OUTCOME PWSCancelResponse + PROCEDURE CODE id-PWSCancel + CRITICALITY reject +} + +errorIndication F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE ErrorIndication + PROCEDURE CODE id-ErrorIndication + CRITICALITY ignore +} + +uEContextReleaseRequest F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE UEContextReleaseRequest + PROCEDURE CODE id-UEContextReleaseRequest + CRITICALITY ignore +} + + +initialULRRCMessageTransfer F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE InitialULRRCMessageTransfer + PROCEDURE CODE id-InitialULRRCMessageTransfer + CRITICALITY ignore +} + +dLRRCMessageTransfer F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE DLRRCMessageTransfer + PROCEDURE CODE id-DLRRCMessageTransfer + CRITICALITY ignore +} + +uLRRCMessageTransfer F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE ULRRCMessageTransfer + PROCEDURE CODE id-ULRRCMessageTransfer + CRITICALITY ignore +} + + +uEInactivityNotification F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE UEInactivityNotification + PROCEDURE CODE id-UEInactivityNotification + CRITICALITY ignore +} + +gNBDUResourceCoordination F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE GNBDUResourceCoordinationRequest + SUCCESSFUL OUTCOME GNBDUResourceCoordinationResponse + PROCEDURE CODE id-GNBDUResourceCoordination + CRITICALITY reject +} + +privateMessage F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE PrivateMessage + PROCEDURE CODE id-privateMessage + CRITICALITY ignore +} + +systemInformationDelivery F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE SystemInformationDeliveryCommand + PROCEDURE CODE id-SystemInformationDeliveryCommand + CRITICALITY ignore +} + + +paging F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE Paging + PROCEDURE CODE id-Paging + CRITICALITY ignore +} + +notify F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE Notify + PROCEDURE CODE id-Notify + CRITICALITY ignore +} + +networkAccessRateReduction F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE NetworkAccessRateReduction + PROCEDURE CODE id-NetworkAccessRateReduction + CRITICALITY ignore +} + + +pWSRestartIndication F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE PWSRestartIndication + PROCEDURE CODE id-PWSRestartIndication + CRITICALITY ignore +} + +pWSFailureIndication F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE PWSFailureIndication + PROCEDURE CODE id-PWSFailureIndication + CRITICALITY ignore +} + +gNBDUStatusIndication F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE GNBDUStatusIndication + PROCEDURE CODE id-GNBDUStatusIndication + CRITICALITY ignore +} + + +rRCDeliveryReport F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE RRCDeliveryReport + PROCEDURE CODE id-RRCDeliveryReport + CRITICALITY ignore +} + +f1Removal F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE F1RemovalRequest + SUCCESSFUL OUTCOME F1RemovalResponse + UNSUCCESSFUL OUTCOME F1RemovalFailure + PROCEDURE CODE id-F1Removal + CRITICALITY reject +} + +traceStart F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE TraceStart + PROCEDURE CODE id-TraceStart + CRITICALITY ignore +} + +deactivateTrace F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE DeactivateTrace + PROCEDURE CODE id-DeactivateTrace + CRITICALITY ignore +} + +dUCURadioInformationTransfer F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE DUCURadioInformationTransfer + PROCEDURE CODE id-DUCURadioInformationTransfer + CRITICALITY ignore +} + +cUDURadioInformationTransfer F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE CUDURadioInformationTransfer + PROCEDURE CODE id-CUDURadioInformationTransfer + CRITICALITY ignore +} + +bAPMappingConfiguration F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE BAPMappingConfiguration + SUCCESSFUL OUTCOME BAPMappingConfigurationAcknowledge + PROCEDURE CODE id-BAPMappingConfiguration + CRITICALITY reject +} + +gNBDUResourceConfiguration F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE GNBDUResourceConfiguration + SUCCESSFUL OUTCOME GNBDUResourceConfigurationAcknowledge + PROCEDURE CODE id-GNBDUResourceConfiguration + CRITICALITY reject +} + +iABTNLAddressAllocation F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE IABTNLAddressRequest + SUCCESSFUL OUTCOME IABTNLAddressResponse + PROCEDURE CODE id-IABTNLAddressAllocation + CRITICALITY reject +} + +iABUPConfigurationUpdate F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE IABUPConfigurationUpdateRequest + SUCCESSFUL OUTCOME IABUPConfigurationUpdateResponse + UNSUCCESSFUL OUTCOME IABUPConfigurationUpdateFailure + PROCEDURE CODE id-IABUPConfigurationUpdate + CRITICALITY reject +} + +resourceStatusReportingInitiation F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE ResourceStatusRequest + SUCCESSFUL OUTCOME ResourceStatusResponse + UNSUCCESSFUL OUTCOME ResourceStatusFailure + PROCEDURE CODE id-resourceStatusReportingInitiation + CRITICALITY reject +} + +resourceStatusReporting F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE ResourceStatusUpdate + PROCEDURE CODE id-resourceStatusReporting + CRITICALITY ignore +} + +accessAndMobilityIndication F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE AccessAndMobilityIndication + PROCEDURE CODE id-accessAndMobilityIndication + CRITICALITY ignore +} + +referenceTimeInformationReportingControl F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE ReferenceTimeInformationReportingControl + PROCEDURE CODE id-ReferenceTimeInformationReportingControl + CRITICALITY ignore +} + +referenceTimeInformationReport F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE ReferenceTimeInformationReport + PROCEDURE CODE id-ReferenceTimeInformationReport + CRITICALITY ignore +} + +accessSuccess F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE AccessSuccess + PROCEDURE CODE id-accessSuccess + CRITICALITY ignore +} + +cellTrafficTrace F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE CellTrafficTrace + PROCEDURE CODE id-cellTrafficTrace + CRITICALITY ignore +} + +positioningAssistanceInformationControl F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE PositioningAssistanceInformationControl + PROCEDURE CODE id-PositioningAssistanceInformationControl + CRITICALITY ignore +} + +positioningAssistanceInformationFeedback F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE PositioningAssistanceInformationFeedback + PROCEDURE CODE id-PositioningAssistanceInformationFeedback + CRITICALITY ignore +} + +positioningMeasurementExchange F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE PositioningMeasurementRequest + SUCCESSFUL OUTCOME PositioningMeasurementResponse + UNSUCCESSFUL OUTCOME PositioningMeasurementFailure + PROCEDURE CODE id-PositioningMeasurementExchange + CRITICALITY reject +} + +positioningMeasurementReport F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE PositioningMeasurementReport + PROCEDURE CODE id-PositioningMeasurementReport + CRITICALITY ignore +} + +positioningMeasurementAbort F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE PositioningMeasurementAbort + PROCEDURE CODE id-PositioningMeasurementAbort + CRITICALITY ignore +} + +positioningMeasurementFailureIndication F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE PositioningMeasurementFailureIndication + PROCEDURE CODE id-PositioningMeasurementFailureIndication + CRITICALITY ignore +} + +positioningMeasurementUpdate F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE PositioningMeasurementUpdate + PROCEDURE CODE id-PositioningMeasurementUpdate + CRITICALITY ignore +} + + +tRPInformationExchange F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE TRPInformationRequest + SUCCESSFUL OUTCOME TRPInformationResponse + UNSUCCESSFUL OUTCOME TRPInformationFailure + PROCEDURE CODE id-TRPInformationExchange + CRITICALITY reject +} + +positioningInformationExchange F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE PositioningInformationRequest + SUCCESSFUL OUTCOME PositioningInformationResponse + UNSUCCESSFUL OUTCOME PositioningInformationFailure + PROCEDURE CODE id-PositioningInformationExchange + CRITICALITY reject +} + +positioningActivation F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE PositioningActivationRequest + SUCCESSFUL OUTCOME PositioningActivationResponse + UNSUCCESSFUL OUTCOME PositioningActivationFailure + PROCEDURE CODE id-PositioningActivation + CRITICALITY reject +} + +positioningDeactivation F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE PositioningDeactivation + PROCEDURE CODE id-PositioningDeactivation + CRITICALITY ignore +} + +e-CIDMeasurementInitiation F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE E-CIDMeasurementInitiationRequest + SUCCESSFUL OUTCOME E-CIDMeasurementInitiationResponse + UNSUCCESSFUL OUTCOME E-CIDMeasurementInitiationFailure + PROCEDURE CODE id-E-CIDMeasurementInitiation + CRITICALITY reject +} + +e-CIDMeasurementFailureIndication F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE E-CIDMeasurementFailureIndication + PROCEDURE CODE id-E-CIDMeasurementFailureIndication + CRITICALITY ignore +} + +e-CIDMeasurementReport F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE E-CIDMeasurementReport + PROCEDURE CODE id-E-CIDMeasurementReport + CRITICALITY ignore +} + +e-CIDMeasurementTermination F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE E-CIDMeasurementTerminationCommand + PROCEDURE CODE id-E-CIDMeasurementTermination + CRITICALITY ignore +} + +positioningInformationUpdate F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE PositioningInformationUpdate + PROCEDURE CODE id-PositioningInformationUpdate + CRITICALITY ignore +} + + +END +-- ASN1STOP + +-- ASN1START +-- ************************************************************** +-- +-- PDU definitions for F1AP. +-- +-- ************************************************************** + +F1AP-PDU-Contents { +itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) +ngran-access (22) modules (3) f1ap (3) version1 (1) f1ap-PDU-Contents (1) } + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +-- ************************************************************** +-- +-- IE parameter types from other modules. +-- +-- ************************************************************** + +IMPORTS + Candidate-SpCell-Item, + Cause, + Cells-Failed-to-be-Activated-List-Item, + Cells-Status-Item, + Cells-to-be-Activated-List-Item, + Cells-to-be-Deactivated-List-Item, + CellULConfigured, + CriticalityDiagnostics, + C-RNTI, + CUtoDURRCInformation, + DRB-Activity-Item, + DRBID, + DRBs-FailedToBeModified-Item, + DRBs-FailedToBeSetup-Item, + DRBs-FailedToBeSetupMod-Item, + DRB-Notify-Item, + DRBs-ModifiedConf-Item, + DRBs-Modified-Item, + DRBs-Required-ToBeModified-Item, + DRBs-Required-ToBeReleased-Item, + DRBs-Setup-Item, + DRBs-SetupMod-Item, + DRBs-ToBeModified-Item, + DRBs-ToBeReleased-Item, + DRBs-ToBeSetup-Item, + DRBs-ToBeSetupMod-Item, + DRXCycle, + DRXConfigurationIndicator, + DUtoCURRCInformation, + EUTRANQoS, + ExecuteDuplication, + FullConfiguration, + GNB-CU-UE-F1AP-ID, + GNB-DU-UE-F1AP-ID, + GNB-DU-ID, + GNB-DU-Served-Cells-Item, + GNB-DU-System-Information, + GNB-CU-Name, + GNB-DU-Name, + InactivityMonitoringRequest, + InactivityMonitoringResponse, + LowerLayerPresenceStatusChange, + NotificationControl, + NRCGI, + NRPCI, + UEContextNotRetrievable, + Potential-SpCell-Item, + RAT-FrequencyPriorityInformation, + RequestedSRSTransmissionCharacteristics, + ResourceCoordinationTransferContainer, + RRCContainer, + RRCContainer-RRCSetupComplete, + RRCReconfigurationCompleteIndicator, + SCellIndex, + SCell-ToBeRemoved-Item, + SCell-ToBeSetup-Item, + SCell-ToBeSetupMod-Item, + SCell-FailedtoSetup-Item, + SCell-FailedtoSetupMod-Item, + ServCellIndex, + Served-Cell-Information, + Served-Cells-To-Add-Item, + Served-Cells-To-Delete-Item, + Served-Cells-To-Modify-Item, + ServingCellMO, + SRBID, + SRBs-FailedToBeSetup-Item, + SRBs-FailedToBeSetupMod-Item, + SRBs-Required-ToBeReleased-Item, + SRBs-ToBeReleased-Item, + SRBs-ToBeSetup-Item, + SRBs-ToBeSetupMod-Item, + SRBs-Modified-Item, + SRBs-Setup-Item, + SRBs-SetupMod-Item, + TimeToWait, + TransactionID, + TransmissionActionIndicator, + UE-associatedLogicalF1-ConnectionItem, + DUtoCURRCContainer, + PagingCell-Item, + SItype-List, + UEIdentityIndexValue, + GNB-CU-TNL-Association-Setup-Item, + GNB-CU-TNL-Association-Failed-To-Setup-Item, + GNB-CU-TNL-Association-To-Add-Item, + GNB-CU-TNL-Association-To-Remove-Item, + GNB-CU-TNL-Association-To-Update-Item, + MaskedIMEISV, + PagingDRX, + PagingPriority, + PagingIdentity, + Cells-to-be-Barred-Item, + PWSSystemInformation, + Broadcast-To-Be-Cancelled-Item, + Cells-Broadcast-Cancelled-Item, + NR-CGI-List-For-Restart-Item, + PWS-Failed-NR-CGI-Item, + RepetitionPeriod, + NumberofBroadcastRequest, + Cells-To-Be-Broadcast-Item, + Cells-Broadcast-Completed-Item, + Cancel-all-Warning-Messages-Indicator, + EUTRA-NR-CellResourceCoordinationReq-Container, + EUTRA-NR-CellResourceCoordinationReqAck-Container, + RequestType, + PLMN-Identity, + RLCFailureIndication, + UplinkTxDirectCurrentListInformation, + SULAccessIndication, + Protected-EUTRA-Resources-Item, + GNB-DUConfigurationQuery, + BitRate, + RRC-Version, + GNBDUOverloadInformation, + RRCDeliveryStatusRequest, + NeedforGap, + RRCDeliveryStatus, + ResourceCoordinationTransferInformation, + Dedicated-SIDelivery-NeededUE-Item, + Associated-SCell-Item, + IgnoreResourceCoordinationContainer, + PagingOrigin, + UAC-Assistance-Info, + RANUEID, + GNB-DU-TNL-Association-To-Remove-Item, + NotificationInformation, + TraceActivation, + TraceID, + Neighbour-Cell-Information-Item, + SymbolAllocInSlot, + NumDLULSymbols, + AdditionalRRMPriorityIndex, + DUCURadioInformationType, + CUDURadioInformationType, + Transport-Layer-Address-Info, + BHChannels-ToBeSetup-Item, + BHChannels-Setup-Item, + BHChannels-FailedToBeSetup-Item, + BHChannels-ToBeModified-Item, + BHChannels-ToBeReleased-Item, + BHChannels-ToBeSetupMod-Item, + BHChannels-FailedToBeModified-Item, + BHChannels-FailedToBeSetupMod-Item, + BHChannels-Modified-Item, + BHChannels-SetupMod-Item, + BHChannels-Required-ToBeReleased-Item, + BAPAddress, + BAPPathID, + BAPRoutingID, + BH-Routing-Information-Added-List-Item, + BH-Routing-Information-Removed-List-Item, + Child-Nodes-List, + Child-Nodes-List-Item, + Child-Node-Cells-List, + Child-Node-Cells-List-Item, + Activated-Cells-to-be-Updated-List, + Activated-Cells-to-be-Updated-List-Item, + UL-BH-Non-UP-Traffic-Mapping, + IABTNLAddressesRequested, + IABIPv6RequestType, + IAB-TNL-Addresses-To-Remove-Item, + IABTNLAddress, + IAB-Allocated-TNL-Address-Item, + IABv4AddressesRequested, + TrafficMappingInfo, + UL-UP-TNL-Information-to-Update-List-Item, + UL-UP-TNL-Address-to-Update-List-Item, + DL-UP-TNL-Address-to-Update-List-Item, + NRV2XServicesAuthorized, + LTEV2XServicesAuthorized, + NRUESidelinkAggregateMaximumBitrate, + LTEUESidelinkAggregateMaximumBitrate, + SLDRBs-SetupMod-Item, + SLDRBs-ModifiedConf-Item, + SLDRBID, + SLDRBs-FailedToBeModified-Item, + SLDRBs-FailedToBeSetup-Item, + SLDRBs-FailedToBeSetupMod-Item, + SLDRBs-Modified-Item, + SLDRBs-Required-ToBeModified-Item, + SLDRBs-Required-ToBeReleased-Item, + SLDRBs-Setup-Item, + SLDRBs-ToBeModified-Item, + SLDRBs-ToBeReleased-Item, + SLDRBs-ToBeSetup-Item, + SLDRBs-ToBeSetupMod-Item, + GNBCUMeasurementID, + GNBDUMeasurementID, + RegistrationRequest, + ReportCharacteristics, + CellToReportList, + HardwareLoadIndicator, + CellMeasurementResultList, + ReportingPeriodicity, + TNLCapacityIndicator, + RACHReportInformationList, + RLFReportInformationList, + ReportingRequestType, + TimeReferenceInformation, + ConditionalInterDUMobilityInformation, + ConditionalIntraDUMobilityInformation, + TargetCellList, + MDTPLMNList, + PrivacyIndicator, + TransportLayerAddress, + URI-address, + NID, + PosAssistance-Information, + PosBroadcast, + PositioningBroadcastCells, + RoutingID, + PosAssistanceInformationFailureList, + PosMeasurementQuantities, + PosMeasurementResultList, + PosMeasurementPeriodicity, + PosReportCharacteristics, + TRPInformationTypeItem, + TRPInformationItem, + LMF-MeasurementID, + RAN-MeasurementID, + SRSResourceSetID, + SRSSpatialRelation, + SRSResourceTrigger, + SRSConfiguration, + TRPList, + E-CID-MeasurementQuantities, + E-CID-MeasurementPeriodicity, + E-CID-MeasurementResult, + Cell-Portion-ID, + LMF-UE-MeasurementID, + RAN-UE-MeasurementID, + SFNInitialisationTime, + SystemFrameNumber, + SlotNumber, + AbortTransmission, + TRP-MeasurementRequestList, + MeasurementBeamInfoRequest, + E-CID-ReportCharacteristics, + Extended-GNB-CU-Name, + Extended-GNB-DU-Name + + + +FROM F1AP-IEs + + PrivateIE-Container{}, + ProtocolExtensionContainer{}, + ProtocolIE-Container{}, + ProtocolIE-ContainerPair{}, + ProtocolIE-SingleContainer{}, + F1AP-PRIVATE-IES, + F1AP-PROTOCOL-EXTENSION, + F1AP-PROTOCOL-IES, + F1AP-PROTOCOL-IES-PAIR + +FROM F1AP-Containers + + id-Candidate-SpCell-Item, + id-Candidate-SpCell-List, + id-Cause, + id-Cancel-all-Warning-Messages-Indicator, + id-Cells-Failed-to-be-Activated-List, + id-Cells-Failed-to-be-Activated-List-Item, + id-Cells-Status-Item, + id-Cells-Status-List, + id-Cells-to-be-Activated-List, + id-Cells-to-be-Activated-List-Item, + id-Cells-to-be-Deactivated-List, + id-Cells-to-be-Deactivated-List-Item, + id-ConfirmedUEID, + id-CriticalityDiagnostics, + id-C-RNTI, + id-CUtoDURRCInformation, + id-DRB-Activity-Item, + id-DRB-Activity-List, + id-DRBs-FailedToBeModified-Item, + id-DRBs-FailedToBeModified-List, + id-DRBs-FailedToBeSetup-Item, + id-DRBs-FailedToBeSetup-List, + id-DRBs-FailedToBeSetupMod-Item, + id-DRBs-FailedToBeSetupMod-List, + id-DRBs-ModifiedConf-Item, + id-DRBs-ModifiedConf-List, + id-DRBs-Modified-Item, + id-DRBs-Modified-List, + id-DRB-Notify-Item, + id-DRB-Notify-List, + id-DRBs-Required-ToBeModified-Item, + id-DRBs-Required-ToBeModified-List, + id-DRBs-Required-ToBeReleased-Item, + id-DRBs-Required-ToBeReleased-List, + id-DRBs-Setup-Item, + id-DRBs-Setup-List, + id-DRBs-SetupMod-Item, + id-DRBs-SetupMod-List, + id-DRBs-ToBeModified-Item, + id-DRBs-ToBeModified-List, + id-DRBs-ToBeReleased-Item, + id-DRBs-ToBeReleased-List, + id-DRBs-ToBeSetup-Item, + id-DRBs-ToBeSetup-List, + id-DRBs-ToBeSetupMod-Item, + id-DRBs-ToBeSetupMod-List, + id-DRXCycle, + id-DUtoCURRCInformation, + id-ExecuteDuplication, + id-FullConfiguration, + id-gNB-CU-UE-F1AP-ID, + id-gNB-DU-UE-F1AP-ID, + id-gNB-DU-ID, + id-GNB-DU-Served-Cells-Item, + id-gNB-DU-Served-Cells-List, + id-gNB-CU-Name, + id-gNB-DU-Name, + id-Extended-GNB-CU-Name, + id-Extended-GNB-DU-Name, + id-InactivityMonitoringRequest, + id-InactivityMonitoringResponse, + id-new-gNB-CU-UE-F1AP-ID, + id-new-gNB-DU-UE-F1AP-ID, + id-oldgNB-DU-UE-F1AP-ID, + id-PLMNAssistanceInfoForNetShar, + id-Potential-SpCell-Item, + id-Potential-SpCell-List, + id-RAT-FrequencyPriorityInformation, + id-RedirectedRRCmessage, + id-ResetType, + id-RequestedSRSTransmissionCharacteristics, + id-ResourceCoordinationTransferContainer, + id-RRCContainer, + id-RRCContainer-RRCSetupComplete, + id-RRCReconfigurationCompleteIndicator, + id-SCell-FailedtoSetup-List, + id-SCell-FailedtoSetup-Item, + id-SCell-FailedtoSetupMod-List, + id-SCell-FailedtoSetupMod-Item, + id-SCell-ToBeRemoved-Item, + id-SCell-ToBeRemoved-List, + id-SCell-ToBeSetup-Item, + id-SCell-ToBeSetup-List, + id-SCell-ToBeSetupMod-Item, + id-SCell-ToBeSetupMod-List, + id-SelectedPLMNID, + id-Served-Cells-To-Add-Item, + id-Served-Cells-To-Add-List, + id-Served-Cells-To-Delete-Item, + id-Served-Cells-To-Delete-List, + id-Served-Cells-To-Modify-Item, + id-Served-Cells-To-Modify-List, + id-ServCellIndex, + id-ServingCellMO, + id-SpCell-ID, + id-SpCellULConfigured, + id-SRBID, + id-SRBs-FailedToBeSetup-Item, + id-SRBs-FailedToBeSetup-List, + id-SRBs-FailedToBeSetupMod-Item, + id-SRBs-FailedToBeSetupMod-List, + id-SRBs-Required-ToBeReleased-Item, + id-SRBs-Required-ToBeReleased-List, + id-SRBs-ToBeReleased-Item, + id-SRBs-ToBeReleased-List, + id-SRBs-ToBeSetup-Item, + id-SRBs-ToBeSetup-List, + id-SRBs-ToBeSetupMod-Item, + id-SRBs-ToBeSetupMod-List, + id-SRBs-Modified-Item, + id-SRBs-Modified-List, + id-SRBs-Setup-Item, + id-SRBs-Setup-List, + id-SRBs-SetupMod-Item, + id-SRBs-SetupMod-List, + id-TimeToWait, + id-TransactionID, + id-TransmissionActionIndicator, + id-UEContextNotRetrievable, + id-UE-associatedLogicalF1-ConnectionItem, + id-UE-associatedLogicalF1-ConnectionListResAck, + id-DUtoCURRCContainer, + id-NRCGI, + id-PagingCell-Item, + id-PagingCell-List, + id-PagingDRX, + id-PagingPriority, + id-SItype-List, + id-UEIdentityIndexValue, + id-GNB-CU-TNL-Association-Setup-List, + id-GNB-CU-TNL-Association-Setup-Item, + id-GNB-CU-TNL-Association-Failed-To-Setup-List, + id-GNB-CU-TNL-Association-Failed-To-Setup-Item, + id-GNB-CU-TNL-Association-To-Add-Item, + id-GNB-CU-TNL-Association-To-Add-List, + id-GNB-CU-TNL-Association-To-Remove-Item, + id-GNB-CU-TNL-Association-To-Remove-List, + id-GNB-CU-TNL-Association-To-Update-Item, + id-GNB-CU-TNL-Association-To-Update-List, + id-MaskedIMEISV, + id-PagingIdentity, + id-Cells-to-be-Barred-List, + id-Cells-to-be-Barred-Item, + id-PWSSystemInformation, + id-RepetitionPeriod, + id-NumberofBroadcastRequest, + id-Cells-To-Be-Broadcast-List, + id-Cells-To-Be-Broadcast-Item, + id-Cells-Broadcast-Completed-List, + id-Cells-Broadcast-Completed-Item, + id-Broadcast-To-Be-Cancelled-List, + id-Broadcast-To-Be-Cancelled-Item, + id-Cells-Broadcast-Cancelled-List, + id-Cells-Broadcast-Cancelled-Item, + id-NR-CGI-List-For-Restart-List, + id-NR-CGI-List-For-Restart-Item, + id-PWS-Failed-NR-CGI-List, + id-PWS-Failed-NR-CGI-Item, + id-EUTRA-NR-CellResourceCoordinationReq-Container, + id-EUTRA-NR-CellResourceCoordinationReqAck-Container, + id-Protected-EUTRA-Resources-List, + id-RequestType, + id-ServingPLMN, + id-DRXConfigurationIndicator, + id-RLCFailureIndication, + id-UplinkTxDirectCurrentListInformation, + id-SULAccessIndication, + id-Protected-EUTRA-Resources-Item, + id-GNB-DUConfigurationQuery, + id-GNB-DU-UE-AMBR-UL, + id-GNB-CU-RRC-Version, + id-GNB-DU-RRC-Version, + id-GNBDUOverloadInformation, + id-NeedforGap, + id-RRCDeliveryStatusRequest, + id-RRCDeliveryStatus, + id-Dedicated-SIDelivery-NeededUE-List, + id-Dedicated-SIDelivery-NeededUE-Item, + id-ResourceCoordinationTransferInformation, + id-Associated-SCell-List, + id-Associated-SCell-Item, + id-IgnoreResourceCoordinationContainer, + id-UAC-Assistance-Info, + id-RANUEID, + id-PagingOrigin, + id-GNB-DU-TNL-Association-To-Remove-Item, + id-GNB-DU-TNL-Association-To-Remove-List, + id-NotificationInformation, + id-TraceActivation, + id-TraceID, + id-Neighbour-Cell-Information-List, + id-Neighbour-Cell-Information-Item, + id-SymbolAllocInSlot, + id-NumDLULSymbols, + id-AdditionalRRMPriorityIndex, + id-DUCURadioInformationType, + id-CUDURadioInformationType, + id-LowerLayerPresenceStatusChange, + id-Transport-Layer-Address-Info, + id-BHChannels-ToBeSetup-List, + id-BHChannels-ToBeSetup-Item, + id-BHChannels-Setup-List, + id-BHChannels-Setup-Item, + id-BHChannels-ToBeModified-Item, + id-BHChannels-ToBeModified-List, + id-BHChannels-ToBeReleased-Item, + id-BHChannels-ToBeReleased-List, + id-BHChannels-ToBeSetupMod-Item, + id-BHChannels-ToBeSetupMod-List, + id-BHChannels-FailedToBeSetup-Item, + id-BHChannels-FailedToBeSetup-List, + id-BHChannels-FailedToBeModified-Item, + id-BHChannels-FailedToBeModified-List, + id-BHChannels-FailedToBeSetupMod-Item, + id-BHChannels-FailedToBeSetupMod-List, + id-BHChannels-Modified-Item, + id-BHChannels-Modified-List, + id-BHChannels-SetupMod-Item, + id-BHChannels-SetupMod-List, + id-BHChannels-Required-ToBeReleased-Item, + id-BHChannels-Required-ToBeReleased-List, + id-BAPAddress, + id-ConfiguredBAPAddress, + id-BH-Routing-Information-Added-List, + id-BH-Routing-Information-Added-List-Item, + id-BH-Routing-Information-Removed-List, + id-BH-Routing-Information-Removed-List-Item, + id-UL-BH-Non-UP-Traffic-Mapping, + id-Child-Nodes-List, + id-Activated-Cells-to-be-Updated-List, + id-IABIPv6RequestType, + id-IAB-TNL-Addresses-To-Remove-List, + id-IAB-TNL-Addresses-To-Remove-Item, + id-IAB-Allocated-TNL-Address-List, + id-IAB-Allocated-TNL-Address-Item, + id-IABv4AddressesRequested, + id-TrafficMappingInformation, + id-UL-UP-TNL-Information-to-Update-List, + id-UL-UP-TNL-Information-to-Update-List-Item, + id-UL-UP-TNL-Address-to-Update-List, + id-UL-UP-TNL-Address-to-Update-List-Item, + id-DL-UP-TNL-Address-to-Update-List, + id-DL-UP-TNL-Address-to-Update-List-Item, + id-NRV2XServicesAuthorized, + id-LTEV2XServicesAuthorized, + id-NRUESidelinkAggregateMaximumBitrate, + id-LTEUESidelinkAggregateMaximumBitrate, + id-PC5LinkAMBR, + id-SLDRBs-FailedToBeModified-Item, + id-SLDRBs-FailedToBeModified-List, + id-SLDRBs-FailedToBeSetup-Item, + id-SLDRBs-FailedToBeSetup-List, + id-SLDRBs-Modified-Item, + id-SLDRBs-Modified-List, + id-SLDRBs-Required-ToBeModified-Item, + id-SLDRBs-Required-ToBeModified-List, + id-SLDRBs-Required-ToBeReleased-Item, + id-SLDRBs-Required-ToBeReleased-List, + id-SLDRBs-Setup-Item, + id-SLDRBs-Setup-List, + id-SLDRBs-ToBeModified-Item, + id-SLDRBs-ToBeModified-List, + id-SLDRBs-ToBeReleased-Item, + id-SLDRBs-ToBeReleased-List, + id-SLDRBs-ToBeSetup-Item, + id-SLDRBs-ToBeSetup-List, + id-SLDRBs-ToBeSetupMod-Item, + id-SLDRBs-ToBeSetupMod-List, + id-SLDRBs-SetupMod-List, + id-SLDRBs-FailedToBeSetupMod-List, + id-SLDRBs-SetupMod-Item, + id-SLDRBs-FailedToBeSetupMod-Item, + id-SLDRBs-ModifiedConf-List, + id-SLDRBs-ModifiedConf-Item, + id-gNBCUMeasurementID, + id-gNBDUMeasurementID, + id-RegistrationRequest, + id-ReportCharacteristics, + id-CellToReportList, + id-CellMeasurementResultList, + id-HardwareLoadIndicator, + id-ReportingPeriodicity, + id-TNLCapacityIndicator, + id-RACHReportInformationList, + id-RLFReportInformationList, + id-ReportingRequestType, + id-TimeReferenceInformation, + id-ConditionalInterDUMobilityInformation, + id-ConditionalIntraDUMobilityInformation, + id-targetCellsToCancel, + id-requestedTargetCellGlobalID, + id-TraceCollectionEntityIPAddress, + id-ManagementBasedMDTPLMNList, + id-PrivacyIndicator, + id-TraceCollectionEntityURI, + id-ServingNID, + id-PosAssistance-Information, + id-PosBroadcast, + id-PositioningBroadcastCells, + id-RoutingID, + id-PosAssistanceInformationFailureList, + id-PosMeasurementQuantities, + id-PosMeasurementResultList, + id-PosMeasurementPeriodicity, + id-PosReportCharacteristics, + id-TRPInformationTypeListTRPReq, + id-TRPInformationTypeItem, + id-TRPInformationListTRPResp, + id-TRPInformationItem, + id-LMF-MeasurementID, + id-RAN-MeasurementID, + id-SRSType, + id-ActivationTime, + id-AbortTransmission, + id-SRSConfiguration, + id-TRPList, + id-E-CID-MeasurementQuantities, + id-E-CID-MeasurementPeriodicity, + id-E-CID-MeasurementResult, + id-Cell-Portion-ID, + id-LMF-UE-MeasurementID, + id-RAN-UE-MeasurementID, + id-SFNInitialisationTime, + id-SystemFrameNumber, + id-SlotNumber, + id-TRP-MeasurementRequestList, + id-MeasurementBeamInfoRequest, + id-E-CID-ReportCharacteristics, + + maxCellingNBDU, + maxnoofCandidateSpCells, + maxnoofDRBs, + maxnoofErrors, + maxnoofIndividualF1ConnectionsToReset, + maxnoofPotentialSpCells, + maxnoofSCells, + maxnoofSRBs, + maxnoofPagingCells, + maxnoofTNLAssociations, + maxCellineNB, + maxnoofUEIDs, + maxnoofBHRLCChannels, + maxnoofRoutingEntries, + maxnoofChildIABNodes, + maxnoofServedCellsIAB, + maxnoofTLAsIAB, + maxnoofULUPTNLInformationforIAB, + maxnoofUPTNLAddresses, + maxnoofSLDRBs, + maxnoofTRPInfoTypes, + maxnoofTRPs + + + +FROM F1AP-Constants; + + +-- ************************************************************** +-- +-- RESET ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Reset +-- +-- ************************************************************** + +Reset ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {ResetIEs} }, + ... +} + +ResetIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-ResetType CRITICALITY reject TYPE ResetType PRESENCE mandatory }, + ... +} + +ResetType ::= CHOICE { + f1-Interface ResetAll, + partOfF1-Interface UE-associatedLogicalF1-ConnectionListRes, + choice-extension ProtocolIE-SingleContainer { { ResetType-ExtIEs} } +} + +ResetType-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + + +ResetAll ::= ENUMERATED { + reset-all, + ... +} + +UE-associatedLogicalF1-ConnectionListRes ::= SEQUENCE (SIZE(1.. maxnoofIndividualF1ConnectionsToReset)) OF ProtocolIE-SingleContainer { { UE-associatedLogicalF1-ConnectionItemRes } } + +UE-associatedLogicalF1-ConnectionItemRes F1AP-PROTOCOL-IES ::= { + { ID id-UE-associatedLogicalF1-ConnectionItem CRITICALITY reject TYPE UE-associatedLogicalF1-ConnectionItem PRESENCE mandatory}, + ... +} + + +-- ************************************************************** +-- +-- Reset Acknowledge +-- +-- ************************************************************** + +ResetAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {ResetAcknowledgeIEs} }, + ... +} + +ResetAcknowledgeIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-UE-associatedLogicalF1-ConnectionListResAck CRITICALITY ignore TYPE UE-associatedLogicalF1-ConnectionListResAck PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +UE-associatedLogicalF1-ConnectionListResAck ::= SEQUENCE (SIZE(1.. maxnoofIndividualF1ConnectionsToReset)) OF ProtocolIE-SingleContainer { { UE-associatedLogicalF1-ConnectionItemResAck } } + +UE-associatedLogicalF1-ConnectionItemResAck F1AP-PROTOCOL-IES ::= { + { ID id-UE-associatedLogicalF1-ConnectionItem CRITICALITY ignore TYPE UE-associatedLogicalF1-ConnectionItem PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- ERROR INDICATION ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Error Indication +-- +-- ************************************************************** + +ErrorIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ErrorIndicationIEs}}, + ... +} + +ErrorIndicationIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory}| + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY ignore TYPE GNB-CU-UE-F1AP-ID PRESENCE optional }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY ignore TYPE GNB-DU-UE-F1AP-ID PRESENCE optional }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- F1 SETUP ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- F1 Setup Request +-- +-- ************************************************************** + +F1SetupRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {F1SetupRequestIEs} }, + ... +} + +F1SetupRequestIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-gNB-DU-ID CRITICALITY reject TYPE GNB-DU-ID PRESENCE mandatory }| + { ID id-gNB-DU-Name CRITICALITY ignore TYPE GNB-DU-Name PRESENCE optional }| + { ID id-gNB-DU-Served-Cells-List CRITICALITY reject TYPE GNB-DU-Served-Cells-List PRESENCE optional }| + { ID id-GNB-DU-RRC-Version CRITICALITY reject TYPE RRC-Version PRESENCE mandatory }| + { ID id-Transport-Layer-Address-Info CRITICALITY ignore TYPE Transport-Layer-Address-Info PRESENCE optional }| + { ID id-BAPAddress CRITICALITY ignore TYPE BAPAddress PRESENCE optional }| + { ID id-Extended-GNB-CU-Name CRITICALITY ignore TYPE Extended-GNB-CU-Name PRESENCE optional }, + ... +} + + +GNB-DU-Served-Cells-List ::= SEQUENCE (SIZE(1.. maxCellingNBDU)) OF ProtocolIE-SingleContainer { { GNB-DU-Served-Cells-ItemIEs } } + +GNB-DU-Served-Cells-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-GNB-DU-Served-Cells-Item CRITICALITY reject TYPE GNB-DU-Served-Cells-Item PRESENCE mandatory }, + ... +} + + +-- ************************************************************** +-- +-- F1 Setup Response +-- +-- ************************************************************** + +F1SetupResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {F1SetupResponseIEs} }, + ... +} + + +F1SetupResponseIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-gNB-CU-Name CRITICALITY ignore TYPE GNB-CU-Name PRESENCE optional }| + { ID id-Cells-to-be-Activated-List CRITICALITY reject TYPE Cells-to-be-Activated-List PRESENCE optional }| + { ID id-GNB-CU-RRC-Version CRITICALITY reject TYPE RRC-Version PRESENCE mandatory }| + { ID id-Transport-Layer-Address-Info CRITICALITY ignore TYPE Transport-Layer-Address-Info PRESENCE optional }| + { ID id-UL-BH-Non-UP-Traffic-Mapping CRITICALITY reject TYPE UL-BH-Non-UP-Traffic-Mapping PRESENCE optional }| + { ID id-BAPAddress CRITICALITY ignore TYPE BAPAddress PRESENCE optional }| + { ID id-Extended-GNB-DU-Name CRITICALITY ignore TYPE Extended-GNB-DU-Name PRESENCE optional }, + ... +} + + +Cells-to-be-Activated-List ::= SEQUENCE (SIZE(1.. maxCellingNBDU)) OF ProtocolIE-SingleContainer { { Cells-to-be-Activated-List-ItemIEs } } + +Cells-to-be-Activated-List-ItemIEs F1AP-PROTOCOL-IES::= { + { ID id-Cells-to-be-Activated-List-Item CRITICALITY reject TYPE Cells-to-be-Activated-List-Item PRESENCE mandatory}, + ... +} + + + +-- ************************************************************** +-- +-- F1 Setup Failure +-- +-- ************************************************************** + +F1SetupFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {F1SetupFailureIEs} }, + ... +} + +F1SetupFailureIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-TimeToWait CRITICALITY ignore TYPE TimeToWait PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + + +-- ************************************************************** +-- +-- GNB-DU CONFIGURATION UPDATE ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- GNB-DU CONFIGURATION UPDATE +-- +-- ************************************************************** + +GNBDUConfigurationUpdate::= SEQUENCE { + protocolIEs ProtocolIE-Container { {GNBDUConfigurationUpdateIEs} }, + ... +} + +GNBDUConfigurationUpdateIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-Served-Cells-To-Add-List CRITICALITY reject TYPE Served-Cells-To-Add-List PRESENCE optional }| + { ID id-Served-Cells-To-Modify-List CRITICALITY reject TYPE Served-Cells-To-Modify-List PRESENCE optional }| + { ID id-Served-Cells-To-Delete-List CRITICALITY reject TYPE Served-Cells-To-Delete-List PRESENCE optional }| + { ID id-Cells-Status-List CRITICALITY reject TYPE Cells-Status-List PRESENCE optional }| + { ID id-Dedicated-SIDelivery-NeededUE-List CRITICALITY ignore TYPE Dedicated-SIDelivery-NeededUE-List PRESENCE optional }| + { ID id-gNB-DU-ID CRITICALITY reject TYPE GNB-DU-ID PRESENCE optional }| + { ID id-GNB-DU-TNL-Association-To-Remove-List CRITICALITY reject TYPE GNB-DU-TNL-Association-To-Remove-List PRESENCE optional }| + { ID id-Transport-Layer-Address-Info CRITICALITY ignore TYPE Transport-Layer-Address-Info PRESENCE optional }, + ... +} + +Served-Cells-To-Add-List ::= SEQUENCE (SIZE(1.. maxCellingNBDU)) OF ProtocolIE-SingleContainer { { Served-Cells-To-Add-ItemIEs } } +Served-Cells-To-Modify-List ::= SEQUENCE (SIZE(1.. maxCellingNBDU)) OF ProtocolIE-SingleContainer { { Served-Cells-To-Modify-ItemIEs } } +Served-Cells-To-Delete-List ::= SEQUENCE (SIZE(1.. maxCellingNBDU)) OF ProtocolIE-SingleContainer { { Served-Cells-To-Delete-ItemIEs } } +Cells-Status-List ::= SEQUENCE (SIZE(0.. maxCellingNBDU)) OF ProtocolIE-SingleContainer { { Cells-Status-ItemIEs } } + +Dedicated-SIDelivery-NeededUE-List::= SEQUENCE (SIZE(1.. maxnoofUEIDs)) OF ProtocolIE-SingleContainer { { Dedicated-SIDelivery-NeededUE-ItemIEs } } + +GNB-DU-TNL-Association-To-Remove-List ::= SEQUENCE (SIZE(1.. maxnoofTNLAssociations)) OF ProtocolIE-SingleContainer { { GNB-DU-TNL-Association-To-Remove-ItemIEs } } + + +Served-Cells-To-Add-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-Served-Cells-To-Add-Item CRITICALITY reject TYPE Served-Cells-To-Add-Item PRESENCE mandatory }, + ... +} + +Served-Cells-To-Modify-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-Served-Cells-To-Modify-Item CRITICALITY reject TYPE Served-Cells-To-Modify-Item PRESENCE mandatory }, + ... +} + +Served-Cells-To-Delete-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-Served-Cells-To-Delete-Item CRITICALITY reject TYPE Served-Cells-To-Delete-Item PRESENCE mandatory }, + ... +} + +Cells-Status-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-Cells-Status-Item CRITICALITY reject TYPE Cells-Status-Item PRESENCE mandatory }, + ... +} + +Dedicated-SIDelivery-NeededUE-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-Dedicated-SIDelivery-NeededUE-Item CRITICALITY ignore TYPE Dedicated-SIDelivery-NeededUE-Item PRESENCE mandatory }, + ... +} + +GNB-DU-TNL-Association-To-Remove-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-GNB-DU-TNL-Association-To-Remove-Item CRITICALITY reject TYPE GNB-DU-TNL-Association-To-Remove-Item PRESENCE mandatory }, + ... +} + + +-- ************************************************************** +-- +-- GNB-DU CONFIGURATION UPDATE ACKNOWLEDGE +-- +-- ************************************************************** + +GNBDUConfigurationUpdateAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {GNBDUConfigurationUpdateAcknowledgeIEs} }, + ... +} + + +GNBDUConfigurationUpdateAcknowledgeIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-Cells-to-be-Activated-List CRITICALITY reject TYPE Cells-to-be-Activated-List PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }| + { ID id-Cells-to-be-Deactivated-List CRITICALITY reject TYPE Cells-to-be-Deactivated-List PRESENCE optional }| + { ID id-Transport-Layer-Address-Info CRITICALITY ignore TYPE Transport-Layer-Address-Info PRESENCE optional }| + { ID id-UL-BH-Non-UP-Traffic-Mapping CRITICALITY reject TYPE UL-BH-Non-UP-Traffic-Mapping PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- GNB-DU CONFIGURATION UPDATE FAILURE +-- +-- ************************************************************** + +GNBDUConfigurationUpdateFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {GNBDUConfigurationUpdateFailureIEs} }, + ... +} + +GNBDUConfigurationUpdateFailureIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-TimeToWait CRITICALITY ignore TYPE TimeToWait PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- GNB-CU CONFIGURATION UPDATE ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- GNB-CU CONFIGURATION UPDATE +-- +-- ************************************************************** + +GNBCUConfigurationUpdate ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { GNBCUConfigurationUpdateIEs} }, + ... +} + +GNBCUConfigurationUpdateIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-Cells-to-be-Activated-List CRITICALITY reject TYPE Cells-to-be-Activated-List PRESENCE optional }| + { ID id-Cells-to-be-Deactivated-List CRITICALITY reject TYPE Cells-to-be-Deactivated-List PRESENCE optional }| + { ID id-GNB-CU-TNL-Association-To-Add-List CRITICALITY ignore TYPE GNB-CU-TNL-Association-To-Add-List PRESENCE optional }| + { ID id-GNB-CU-TNL-Association-To-Remove-List CRITICALITY ignore TYPE GNB-CU-TNL-Association-To-Remove-List PRESENCE optional }| + { ID id-GNB-CU-TNL-Association-To-Update-List CRITICALITY ignore TYPE GNB-CU-TNL-Association-To-Update-List PRESENCE optional }| + { ID id-Cells-to-be-Barred-List CRITICALITY ignore TYPE Cells-to-be-Barred-List PRESENCE optional }| + { ID id-Protected-EUTRA-Resources-List CRITICALITY reject TYPE Protected-EUTRA-Resources-List PRESENCE optional }| + { ID id-Neighbour-Cell-Information-List CRITICALITY ignore TYPE Neighbour-Cell-Information-List PRESENCE optional }| + { ID id-Transport-Layer-Address-Info CRITICALITY ignore TYPE Transport-Layer-Address-Info PRESENCE optional }| + { ID id-UL-BH-Non-UP-Traffic-Mapping CRITICALITY reject TYPE UL-BH-Non-UP-Traffic-Mapping PRESENCE optional }, + ... +} + +Cells-to-be-Deactivated-List ::= SEQUENCE (SIZE(1.. maxCellingNBDU)) OF ProtocolIE-SingleContainer { { Cells-to-be-Deactivated-List-ItemIEs } } +GNB-CU-TNL-Association-To-Add-List ::= SEQUENCE (SIZE(1.. maxnoofTNLAssociations)) OF ProtocolIE-SingleContainer { { GNB-CU-TNL-Association-To-Add-ItemIEs } } +GNB-CU-TNL-Association-To-Remove-List ::= SEQUENCE (SIZE(1.. maxnoofTNLAssociations)) OF ProtocolIE-SingleContainer { { GNB-CU-TNL-Association-To-Remove-ItemIEs } } +GNB-CU-TNL-Association-To-Update-List ::= SEQUENCE (SIZE(1.. maxnoofTNLAssociations)) OF ProtocolIE-SingleContainer { { GNB-CU-TNL-Association-To-Update-ItemIEs } } +Cells-to-be-Barred-List ::= SEQUENCE(SIZE(1.. maxCellingNBDU)) OF ProtocolIE-SingleContainer { { Cells-to-be-Barred-ItemIEs } } + + +Cells-to-be-Deactivated-List-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-Cells-to-be-Deactivated-List-Item CRITICALITY reject TYPE Cells-to-be-Deactivated-List-Item PRESENCE mandatory }, + ... +} + + +GNB-CU-TNL-Association-To-Add-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-GNB-CU-TNL-Association-To-Add-Item CRITICALITY ignore TYPE GNB-CU-TNL-Association-To-Add-Item PRESENCE mandatory }, + ... +} + +GNB-CU-TNL-Association-To-Remove-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-GNB-CU-TNL-Association-To-Remove-Item CRITICALITY ignore TYPE GNB-CU-TNL-Association-To-Remove-Item PRESENCE mandatory }, + ... +} + +GNB-CU-TNL-Association-To-Update-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-GNB-CU-TNL-Association-To-Update-Item CRITICALITY ignore TYPE GNB-CU-TNL-Association-To-Update-Item PRESENCE mandatory }, + ... +} + +Cells-to-be-Barred-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-Cells-to-be-Barred-Item CRITICALITY ignore TYPE Cells-to-be-Barred-Item PRESENCE mandatory }, + ... +} + +Protected-EUTRA-Resources-List ::= SEQUENCE (SIZE(1.. maxCellineNB)) OF ProtocolIE-SingleContainer { { Protected-EUTRA-Resources-ItemIEs } } +Protected-EUTRA-Resources-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-Protected-EUTRA-Resources-Item CRITICALITY reject TYPE Protected-EUTRA-Resources-Item PRESENCE mandatory}, + ... +} + +Neighbour-Cell-Information-List ::= SEQUENCE (SIZE(1.. maxCellingNBDU)) OF ProtocolIE-SingleContainer { { Neighbour-Cell-Information-ItemIEs } } +Neighbour-Cell-Information-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-Neighbour-Cell-Information-Item CRITICALITY ignore TYPE Neighbour-Cell-Information-Item PRESENCE mandatory}, + ... +} + +-- ************************************************************** +-- +-- GNB-CU CONFIGURATION UPDATE ACKNOWLEDGE +-- +-- ************************************************************** + +GNBCUConfigurationUpdateAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { GNBCUConfigurationUpdateAcknowledgeIEs} }, + ... +} + + +GNBCUConfigurationUpdateAcknowledgeIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-Cells-Failed-to-be-Activated-List CRITICALITY reject TYPE Cells-Failed-to-be-Activated-List PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }| + { ID id-GNB-CU-TNL-Association-Setup-List CRITICALITY ignore TYPE GNB-CU-TNL-Association-Setup-List PRESENCE optional }| + { ID id-GNB-CU-TNL-Association-Failed-To-Setup-List CRITICALITY ignore TYPE GNB-CU-TNL-Association-Failed-To-Setup-List PRESENCE optional }| + { ID id-Dedicated-SIDelivery-NeededUE-List CRITICALITY ignore TYPE Dedicated-SIDelivery-NeededUE-List PRESENCE optional }| + { ID id-Transport-Layer-Address-Info CRITICALITY ignore TYPE Transport-Layer-Address-Info PRESENCE optional }, + ... +} + +Cells-Failed-to-be-Activated-List ::= SEQUENCE (SIZE(1.. maxCellingNBDU)) OF ProtocolIE-SingleContainer { { Cells-Failed-to-be-Activated-List-ItemIEs } } +GNB-CU-TNL-Association-Setup-List ::= SEQUENCE (SIZE(1.. maxnoofTNLAssociations)) OF ProtocolIE-SingleContainer { { GNB-CU-TNL-Association-Setup-ItemIEs } } +GNB-CU-TNL-Association-Failed-To-Setup-List ::= SEQUENCE (SIZE(1.. maxnoofTNLAssociations)) OF ProtocolIE-SingleContainer { { GNB-CU-TNL-Association-Failed-To-Setup-ItemIEs } } + +Cells-Failed-to-be-Activated-List-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-Cells-Failed-to-be-Activated-List-Item CRITICALITY reject TYPE Cells-Failed-to-be-Activated-List-Item PRESENCE mandatory }, + ... +} + +GNB-CU-TNL-Association-Setup-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-GNB-CU-TNL-Association-Setup-Item CRITICALITY ignore TYPE GNB-CU-TNL-Association-Setup-Item PRESENCE mandatory }, + ... +} + + +GNB-CU-TNL-Association-Failed-To-Setup-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-GNB-CU-TNL-Association-Failed-To-Setup-Item CRITICALITY ignore TYPE GNB-CU-TNL-Association-Failed-To-Setup-Item PRESENCE mandatory }, + ... +} + + +-- ************************************************************** +-- +-- GNB-CU CONFIGURATION UPDATE FAILURE +-- +-- ************************************************************** + +GNBCUConfigurationUpdateFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { GNBCUConfigurationUpdateFailureIEs} }, + ... +} + +GNBCUConfigurationUpdateFailureIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-TimeToWait CRITICALITY ignore TYPE TimeToWait PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + + +-- ************************************************************** +-- +-- GNB-DU RESOURCE COORDINATION REQUEST +-- +-- ************************************************************** + +GNBDUResourceCoordinationRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{GNBDUResourceCoordinationRequest-IEs}}, + ... +} + +GNBDUResourceCoordinationRequest-IEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-RequestType CRITICALITY reject TYPE RequestType PRESENCE mandatory }| + { ID id-EUTRA-NR-CellResourceCoordinationReq-Container CRITICALITY reject TYPE EUTRA-NR-CellResourceCoordinationReq-Container PRESENCE mandatory}| + { ID id-IgnoreResourceCoordinationContainer CRITICALITY reject TYPE IgnoreResourceCoordinationContainer PRESENCE optional }, + ... +} + + +-- ************************************************************** +-- +-- GNB-DU RESOURCE COORDINATION RESPONSE +-- +-- ************************************************************** + +GNBDUResourceCoordinationResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{GNBDUResourceCoordinationResponse-IEs}}, + ... +} + +GNBDUResourceCoordinationResponse-IEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-EUTRA-NR-CellResourceCoordinationReqAck-Container CRITICALITY reject TYPE EUTRA-NR-CellResourceCoordinationReqAck-Container PRESENCE mandatory}, + ... +} + +-- ************************************************************** +-- +-- UE Context Setup ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- UE CONTEXT SETUP REQUEST +-- +-- ************************************************************** + +UEContextSetupRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UEContextSetupRequestIEs} }, + ... +} + +UEContextSetupRequestIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY ignore TYPE GNB-DU-UE-F1AP-ID PRESENCE optional }| + { ID id-SpCell-ID CRITICALITY reject TYPE NRCGI PRESENCE mandatory }| + { ID id-ServCellIndex CRITICALITY reject TYPE ServCellIndex PRESENCE mandatory }| + { ID id-SpCellULConfigured CRITICALITY ignore TYPE CellULConfigured PRESENCE optional }| + { ID id-CUtoDURRCInformation CRITICALITY reject TYPE CUtoDURRCInformation PRESENCE mandatory}| + { ID id-Candidate-SpCell-List CRITICALITY ignore TYPE Candidate-SpCell-List PRESENCE optional }| + { ID id-DRXCycle CRITICALITY ignore TYPE DRXCycle PRESENCE optional }| + { ID id-ResourceCoordinationTransferContainer CRITICALITY ignore TYPE ResourceCoordinationTransferContainer PRESENCE optional }| + { ID id-SCell-ToBeSetup-List CRITICALITY ignore TYPE SCell-ToBeSetup-List PRESENCE optional }| + { ID id-SRBs-ToBeSetup-List CRITICALITY reject TYPE SRBs-ToBeSetup-List PRESENCE optional }| + { ID id-DRBs-ToBeSetup-List CRITICALITY reject TYPE DRBs-ToBeSetup-List PRESENCE optional }| + { ID id-InactivityMonitoringRequest CRITICALITY reject TYPE InactivityMonitoringRequest PRESENCE optional }| + { ID id-RAT-FrequencyPriorityInformation CRITICALITY reject TYPE RAT-FrequencyPriorityInformation PRESENCE optional }| + { ID id-RRCContainer CRITICALITY ignore TYPE RRCContainer PRESENCE optional }| + { ID id-MaskedIMEISV CRITICALITY ignore TYPE MaskedIMEISV PRESENCE optional }| + { ID id-ServingPLMN CRITICALITY ignore TYPE PLMN-Identity PRESENCE optional }| + { ID id-GNB-DU-UE-AMBR-UL CRITICALITY ignore TYPE BitRate PRESENCE conditional }| + { ID id-RRCDeliveryStatusRequest CRITICALITY ignore TYPE RRCDeliveryStatusRequest PRESENCE optional }| + { ID id-ResourceCoordinationTransferInformation CRITICALITY ignore TYPE ResourceCoordinationTransferInformation PRESENCE optional }| + { ID id-ServingCellMO CRITICALITY ignore TYPE ServingCellMO PRESENCE optional }| + { ID id-new-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE optional }| + { ID id-RANUEID CRITICALITY ignore TYPE RANUEID PRESENCE optional }| + { ID id-TraceActivation CRITICALITY ignore TYPE TraceActivation PRESENCE optional }| + { ID id-AdditionalRRMPriorityIndex CRITICALITY ignore TYPE AdditionalRRMPriorityIndex PRESENCE optional }| + { ID id-BHChannels-ToBeSetup-List CRITICALITY reject TYPE BHChannels-ToBeSetup-List PRESENCE optional }| + { ID id-ConfiguredBAPAddress CRITICALITY reject TYPE BAPAddress PRESENCE optional }| + { ID id-NRV2XServicesAuthorized CRITICALITY ignore TYPE NRV2XServicesAuthorized PRESENCE optional }| + { ID id-LTEV2XServicesAuthorized CRITICALITY ignore TYPE LTEV2XServicesAuthorized PRESENCE optional }| + { ID id-NRUESidelinkAggregateMaximumBitrate CRITICALITY ignore TYPE NRUESidelinkAggregateMaximumBitrate PRESENCE optional }| + { ID id-LTEUESidelinkAggregateMaximumBitrate CRITICALITY ignore TYPE LTEUESidelinkAggregateMaximumBitrate PRESENCE optional }| + { ID id-PC5LinkAMBR CRITICALITY ignore TYPE BitRate PRESENCE optional}| + { ID id-SLDRBs-ToBeSetup-List CRITICALITY reject TYPE SLDRBs-ToBeSetup-List PRESENCE optional }| + { ID id-ConditionalInterDUMobilityInformation CRITICALITY reject TYPE ConditionalInterDUMobilityInformation PRESENCE optional}| + { ID id-ManagementBasedMDTPLMNList CRITICALITY ignore TYPE MDTPLMNList PRESENCE optional }| + { ID id-ServingNID CRITICALITY reject TYPE NID PRESENCE optional }, + ... +} + +Candidate-SpCell-List::= SEQUENCE (SIZE(1..maxnoofCandidateSpCells)) OF ProtocolIE-SingleContainer { { Candidate-SpCell-ItemIEs} } +SCell-ToBeSetup-List::= SEQUENCE (SIZE(1..maxnoofSCells)) OF ProtocolIE-SingleContainer { { SCell-ToBeSetup-ItemIEs} } +SRBs-ToBeSetup-List ::= SEQUENCE (SIZE(1..maxnoofSRBs)) OF ProtocolIE-SingleContainer { { SRBs-ToBeSetup-ItemIEs} } +DRBs-ToBeSetup-List ::= SEQUENCE (SIZE(1..maxnoofDRBs)) OF ProtocolIE-SingleContainer { { DRBs-ToBeSetup-ItemIEs} } +BHChannels-ToBeSetup-List ::= SEQUENCE (SIZE(1..maxnoofBHRLCChannels)) OF ProtocolIE-SingleContainer { { BHChannels-ToBeSetup-ItemIEs} } +SLDRBs-ToBeSetup-List ::= SEQUENCE (SIZE(1..maxnoofSLDRBs)) OF ProtocolIE-SingleContainer { { SLDRBs-ToBeSetup-ItemIEs} } + +Candidate-SpCell-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-Candidate-SpCell-Item CRITICALITY ignore TYPE Candidate-SpCell-Item PRESENCE mandatory }, + ... +} + + +SCell-ToBeSetup-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SCell-ToBeSetup-Item CRITICALITY ignore TYPE SCell-ToBeSetup-Item PRESENCE mandatory }, + ... +} + +SRBs-ToBeSetup-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SRBs-ToBeSetup-Item CRITICALITY reject TYPE SRBs-ToBeSetup-Item PRESENCE mandatory}, + ... +} + +DRBs-ToBeSetup-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-DRBs-ToBeSetup-Item CRITICALITY reject TYPE DRBs-ToBeSetup-Item PRESENCE mandatory}, + ... +} + +BHChannels-ToBeSetup-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-BHChannels-ToBeSetup-Item CRITICALITY reject TYPE BHChannels-ToBeSetup-Item PRESENCE mandatory}, + ... +} + +SLDRBs-ToBeSetup-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SLDRBs-ToBeSetup-Item CRITICALITY reject TYPE SLDRBs-ToBeSetup-Item PRESENCE mandatory}, + ... +} + +-- ************************************************************** +-- +-- UE CONTEXT SETUP RESPONSE +-- +-- ************************************************************** + +UEContextSetupResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UEContextSetupResponseIEs} }, + ... +} + + +UEContextSetupResponseIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-DUtoCURRCInformation CRITICALITY reject TYPE DUtoCURRCInformation PRESENCE mandatory }| + { ID id-C-RNTI CRITICALITY ignore TYPE C-RNTI PRESENCE optional }| + { ID id-ResourceCoordinationTransferContainer CRITICALITY ignore TYPE ResourceCoordinationTransferContainer PRESENCE optional }| + { ID id-FullConfiguration CRITICALITY reject TYPE FullConfiguration PRESENCE optional }| + { ID id-DRBs-Setup-List CRITICALITY ignore TYPE DRBs-Setup-List PRESENCE optional }| + { ID id-SRBs-FailedToBeSetup-List CRITICALITY ignore TYPE SRBs-FailedToBeSetup-List PRESENCE optional }| + { ID id-DRBs-FailedToBeSetup-List CRITICALITY ignore TYPE DRBs-FailedToBeSetup-List PRESENCE optional }| + { ID id-SCell-FailedtoSetup-List CRITICALITY ignore TYPE SCell-FailedtoSetup-List PRESENCE optional }| + { ID id-InactivityMonitoringResponse CRITICALITY reject TYPE InactivityMonitoringResponse PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }| + { ID id-SRBs-Setup-List CRITICALITY ignore TYPE SRBs-Setup-List PRESENCE optional }| + { ID id-BHChannels-Setup-List CRITICALITY ignore TYPE BHChannels-Setup-List PRESENCE optional }| + { ID id-BHChannels-FailedToBeSetup-List CRITICALITY ignore TYPE BHChannels-FailedToBeSetup-List PRESENCE optional }| + { ID id-SLDRBs-Setup-List CRITICALITY ignore TYPE SLDRBs-Setup-List PRESENCE optional }| + { ID id-SLDRBs-FailedToBeSetup-List CRITICALITY ignore TYPE SLDRBs-FailedToBeSetup-List PRESENCE optional }| + { ID id-requestedTargetCellGlobalID CRITICALITY reject TYPE NRCGI PRESENCE optional}, + ... +} + +DRBs-Setup-List ::= SEQUENCE (SIZE(1..maxnoofDRBs)) OF ProtocolIE-SingleContainer { { DRBs-Setup-ItemIEs} } + + +SRBs-FailedToBeSetup-List ::= SEQUENCE (SIZE(1..maxnoofSRBs)) OF ProtocolIE-SingleContainer { { SRBs-FailedToBeSetup-ItemIEs} } +DRBs-FailedToBeSetup-List ::= SEQUENCE (SIZE(1..maxnoofDRBs)) OF ProtocolIE-SingleContainer { { DRBs-FailedToBeSetup-ItemIEs} } +SCell-FailedtoSetup-List ::= SEQUENCE (SIZE(1..maxnoofSCells)) OF ProtocolIE-SingleContainer { { SCell-FailedtoSetup-ItemIEs} } +SRBs-Setup-List ::= SEQUENCE (SIZE(1..maxnoofSRBs)) OF ProtocolIE-SingleContainer { { SRBs-Setup-ItemIEs} } +BHChannels-Setup-List ::= SEQUENCE (SIZE(1..maxnoofBHRLCChannels)) OF ProtocolIE-SingleContainer { { BHChannels-Setup-ItemIEs} } +BHChannels-FailedToBeSetup-List ::= SEQUENCE (SIZE(1..maxnoofBHRLCChannels)) OF ProtocolIE-SingleContainer { { BHChannels-FailedToBeSetup-ItemIEs} } + +DRBs-Setup-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-DRBs-Setup-Item CRITICALITY ignore TYPE DRBs-Setup-Item PRESENCE mandatory}, + ... +} + +SRBs-Setup-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SRBs-Setup-Item CRITICALITY ignore TYPE SRBs-Setup-Item PRESENCE mandatory}, + ... +} + +SRBs-FailedToBeSetup-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SRBs-FailedToBeSetup-Item CRITICALITY ignore TYPE SRBs-FailedToBeSetup-Item PRESENCE mandatory}, + ... +} + + +DRBs-FailedToBeSetup-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-DRBs-FailedToBeSetup-Item CRITICALITY ignore TYPE DRBs-FailedToBeSetup-Item PRESENCE mandatory}, + ... +} + +SCell-FailedtoSetup-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SCell-FailedtoSetup-Item CRITICALITY ignore TYPE SCell-FailedtoSetup-Item PRESENCE mandatory}, + ... +} + +BHChannels-Setup-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-BHChannels-Setup-Item CRITICALITY ignore TYPE BHChannels-Setup-Item PRESENCE mandatory}, + ... +} + +BHChannels-FailedToBeSetup-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-BHChannels-FailedToBeSetup-Item CRITICALITY ignore TYPE BHChannels-FailedToBeSetup-Item PRESENCE mandatory}, + ... +} + +SLDRBs-Setup-List ::= SEQUENCE (SIZE(1..maxnoofSLDRBs)) OF ProtocolIE-SingleContainer { { SLDRBs-Setup-ItemIEs} } + +SLDRBs-FailedToBeSetup-List ::= SEQUENCE (SIZE(1..maxnoofSLDRBs)) OF ProtocolIE-SingleContainer { { SLDRBs-FailedToBeSetup-ItemIEs} } + +SLDRBs-Setup-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SLDRBs-Setup-Item CRITICALITY ignore TYPE SLDRBs-Setup-Item PRESENCE mandatory}, + ... +} + +SLDRBs-FailedToBeSetup-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SLDRBs-FailedToBeSetup-Item CRITICALITY ignore TYPE SLDRBs-FailedToBeSetup-Item PRESENCE mandatory}, + ... +} + +-- ************************************************************** +-- +-- UE CONTEXT SETUP FAILURE +-- +-- ************************************************************** + +UEContextSetupFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UEContextSetupFailureIEs} }, + ... +} + +UEContextSetupFailureIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY ignore TYPE GNB-DU-UE-F1AP-ID PRESENCE optional }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }| + { ID id-Potential-SpCell-List CRITICALITY ignore TYPE Potential-SpCell-List PRESENCE optional }| + { ID id-requestedTargetCellGlobalID CRITICALITY reject TYPE NRCGI PRESENCE optional}, + ... +} + +Potential-SpCell-List::= SEQUENCE (SIZE(0..maxnoofPotentialSpCells)) OF ProtocolIE-SingleContainer { { Potential-SpCell-ItemIEs} } + +Potential-SpCell-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-Potential-SpCell-Item CRITICALITY ignore TYPE Potential-SpCell-Item PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- UE Context Release Request ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- UE Context Release Request +-- +-- ************************************************************** + +UEContextReleaseRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ UEContextReleaseRequestIEs}}, + ... +} + +UEContextReleaseRequestIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-targetCellsToCancel CRITICALITY reject TYPE TargetCellList PRESENCE optional }, + ... +} + + +-- ************************************************************** +-- +-- UE Context Release (gNB-CU initiated) ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- UE CONTEXT RELEASE COMMAND +-- +-- ************************************************************** + +UEContextReleaseCommand ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UEContextReleaseCommandIEs} }, + ... +} + +UEContextReleaseCommandIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-RRCContainer CRITICALITY ignore TYPE RRCContainer PRESENCE optional }| + { ID id-SRBID CRITICALITY ignore TYPE SRBID PRESENCE conditional }| + { ID id-oldgNB-DU-UE-F1AP-ID CRITICALITY ignore TYPE GNB-DU-UE-F1AP-ID PRESENCE optional }| + { ID id-ExecuteDuplication CRITICALITY ignore TYPE ExecuteDuplication PRESENCE optional}| + { ID id-RRCDeliveryStatusRequest CRITICALITY ignore TYPE RRCDeliveryStatusRequest PRESENCE optional }| + { ID id-targetCellsToCancel CRITICALITY reject TYPE TargetCellList PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- UE CONTEXT RELEASE COMPLETE +-- +-- ************************************************************** + +UEContextReleaseComplete ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UEContextReleaseCompleteIEs} }, + ... +} + + +UEContextReleaseCompleteIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- UE Context Modification ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- UE CONTEXT MODIFICATION REQUEST +-- +-- ************************************************************** + +UEContextModificationRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UEContextModificationRequestIEs} }, + ... +} + +UEContextModificationRequestIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-SpCell-ID CRITICALITY ignore TYPE NRCGI PRESENCE optional }| + { ID id-ServCellIndex CRITICALITY reject TYPE ServCellIndex PRESENCE optional }| + { ID id-SpCellULConfigured CRITICALITY ignore TYPE CellULConfigured PRESENCE optional }| + { ID id-DRXCycle CRITICALITY ignore TYPE DRXCycle PRESENCE optional }| + { ID id-CUtoDURRCInformation CRITICALITY reject TYPE CUtoDURRCInformation PRESENCE optional }| + { ID id-TransmissionActionIndicator CRITICALITY ignore TYPE TransmissionActionIndicator PRESENCE optional }| + { ID id-ResourceCoordinationTransferContainer CRITICALITY ignore TYPE ResourceCoordinationTransferContainer PRESENCE optional }| + { ID id-RRCReconfigurationCompleteIndicator CRITICALITY ignore TYPE RRCReconfigurationCompleteIndicator PRESENCE optional }| + { ID id-RRCContainer CRITICALITY reject TYPE RRCContainer PRESENCE optional }| + { ID id-SCell-ToBeSetupMod-List CRITICALITY ignore TYPE SCell-ToBeSetupMod-List PRESENCE optional }| + { ID id-SCell-ToBeRemoved-List CRITICALITY ignore TYPE SCell-ToBeRemoved-List PRESENCE optional }| + { ID id-SRBs-ToBeSetupMod-List CRITICALITY reject TYPE SRBs-ToBeSetupMod-List PRESENCE optional }| + { ID id-DRBs-ToBeSetupMod-List CRITICALITY reject TYPE DRBs-ToBeSetupMod-List PRESENCE optional }| + { ID id-DRBs-ToBeModified-List CRITICALITY reject TYPE DRBs-ToBeModified-List PRESENCE optional }| + { ID id-SRBs-ToBeReleased-List CRITICALITY reject TYPE SRBs-ToBeReleased-List PRESENCE optional }| + { ID id-DRBs-ToBeReleased-List CRITICALITY reject TYPE DRBs-ToBeReleased-List PRESENCE optional }| + { ID id-InactivityMonitoringRequest CRITICALITY reject TYPE InactivityMonitoringRequest PRESENCE optional }| + { ID id-RAT-FrequencyPriorityInformation CRITICALITY reject TYPE RAT-FrequencyPriorityInformation PRESENCE optional }| + { ID id-DRXConfigurationIndicator CRITICALITY ignore TYPE DRXConfigurationIndicator PRESENCE optional }| + { ID id-RLCFailureIndication CRITICALITY ignore TYPE RLCFailureIndication PRESENCE optional }| + { ID id-UplinkTxDirectCurrentListInformation CRITICALITY ignore TYPE UplinkTxDirectCurrentListInformation PRESENCE optional }| + { ID id-GNB-DUConfigurationQuery CRITICALITY reject TYPE GNB-DUConfigurationQuery PRESENCE optional }| + { ID id-GNB-DU-UE-AMBR-UL CRITICALITY ignore TYPE BitRate PRESENCE optional }| + { ID id-ExecuteDuplication CRITICALITY ignore TYPE ExecuteDuplication PRESENCE optional}| + { ID id-RRCDeliveryStatusRequest CRITICALITY ignore TYPE RRCDeliveryStatusRequest PRESENCE optional }| + { ID id-ResourceCoordinationTransferInformation CRITICALITY ignore TYPE ResourceCoordinationTransferInformation PRESENCE optional }| + { ID id-ServingCellMO CRITICALITY ignore TYPE ServingCellMO PRESENCE optional }| + { ID id-NeedforGap CRITICALITY ignore TYPE NeedforGap PRESENCE optional }| + { ID id-FullConfiguration CRITICALITY reject TYPE FullConfiguration PRESENCE optional }| + { ID id-AdditionalRRMPriorityIndex CRITICALITY ignore TYPE AdditionalRRMPriorityIndex PRESENCE optional }| + { ID id-LowerLayerPresenceStatusChange CRITICALITY ignore TYPE LowerLayerPresenceStatusChange PRESENCE optional }| + { ID id-BHChannels-ToBeSetupMod-List CRITICALITY reject TYPE BHChannels-ToBeSetupMod-List PRESENCE optional }| + { ID id-BHChannels-ToBeModified-List CRITICALITY reject TYPE BHChannels-ToBeModified-List PRESENCE optional }| + { ID id-BHChannels-ToBeReleased-List CRITICALITY reject TYPE BHChannels-ToBeReleased-List PRESENCE optional }| + { ID id-NRV2XServicesAuthorized CRITICALITY ignore TYPE NRV2XServicesAuthorized PRESENCE optional }| + { ID id-LTEV2XServicesAuthorized CRITICALITY ignore TYPE LTEV2XServicesAuthorized PRESENCE optional }| + { ID id-NRUESidelinkAggregateMaximumBitrate CRITICALITY ignore TYPE NRUESidelinkAggregateMaximumBitrate PRESENCE optional }| + { ID id-LTEUESidelinkAggregateMaximumBitrate CRITICALITY ignore TYPE LTEUESidelinkAggregateMaximumBitrate PRESENCE optional }| + { ID id-PC5LinkAMBR CRITICALITY ignore TYPE BitRate PRESENCE optional}| + { ID id-SLDRBs-ToBeSetupMod-List CRITICALITY reject TYPE SLDRBs-ToBeSetupMod-List PRESENCE optional }| + { ID id-SLDRBs-ToBeModified-List CRITICALITY reject TYPE SLDRBs-ToBeModified-List PRESENCE optional }| + { ID id-SLDRBs-ToBeReleased-List CRITICALITY reject TYPE SLDRBs-ToBeReleased-List PRESENCE optional }| + { ID id-ConditionalIntraDUMobilityInformation CRITICALITY reject TYPE ConditionalIntraDUMobilityInformation PRESENCE optional}, + ... +} + +SCell-ToBeSetupMod-List::= SEQUENCE (SIZE(1..maxnoofSCells)) OF ProtocolIE-SingleContainer { { SCell-ToBeSetupMod-ItemIEs} } +SCell-ToBeRemoved-List::= SEQUENCE (SIZE(1..maxnoofSCells)) OF ProtocolIE-SingleContainer { { SCell-ToBeRemoved-ItemIEs} } +SRBs-ToBeSetupMod-List ::= SEQUENCE (SIZE(1..maxnoofSRBs)) OF ProtocolIE-SingleContainer { { SRBs-ToBeSetupMod-ItemIEs} } +DRBs-ToBeSetupMod-List ::= SEQUENCE (SIZE(1..maxnoofDRBs)) OF ProtocolIE-SingleContainer { { DRBs-ToBeSetupMod-ItemIEs} } +BHChannels-ToBeSetupMod-List ::= SEQUENCE (SIZE(1..maxnoofBHRLCChannels)) OF ProtocolIE-SingleContainer { { BHChannels-ToBeSetupMod-ItemIEs} } + +DRBs-ToBeModified-List ::= SEQUENCE (SIZE(1..maxnoofDRBs)) OF ProtocolIE-SingleContainer { { DRBs-ToBeModified-ItemIEs} } +BHChannels-ToBeModified-List ::= SEQUENCE (SIZE(1..maxnoofBHRLCChannels)) OF ProtocolIE-SingleContainer { { BHChannels-ToBeModified-ItemIEs} } +SRBs-ToBeReleased-List ::= SEQUENCE (SIZE(1..maxnoofSRBs)) OF ProtocolIE-SingleContainer { { SRBs-ToBeReleased-ItemIEs} } +DRBs-ToBeReleased-List ::= SEQUENCE (SIZE(1..maxnoofDRBs)) OF ProtocolIE-SingleContainer { { DRBs-ToBeReleased-ItemIEs} } +BHChannels-ToBeReleased-List ::= SEQUENCE (SIZE(1..maxnoofBHRLCChannels)) OF ProtocolIE-SingleContainer { { BHChannels-ToBeReleased-ItemIEs} } + +SCell-ToBeSetupMod-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SCell-ToBeSetupMod-Item CRITICALITY ignore TYPE SCell-ToBeSetupMod-Item PRESENCE mandatory }, + ... +} + +SCell-ToBeRemoved-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SCell-ToBeRemoved-Item CRITICALITY ignore TYPE SCell-ToBeRemoved-Item PRESENCE mandatory }, + ... +} + + +SRBs-ToBeSetupMod-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SRBs-ToBeSetupMod-Item CRITICALITY reject TYPE SRBs-ToBeSetupMod-Item PRESENCE mandatory}, + ... +} + + +DRBs-ToBeSetupMod-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-DRBs-ToBeSetupMod-Item CRITICALITY reject TYPE DRBs-ToBeSetupMod-Item PRESENCE mandatory}, + ... +} + +DRBs-ToBeModified-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-DRBs-ToBeModified-Item CRITICALITY reject TYPE DRBs-ToBeModified-Item PRESENCE mandatory}, + ... +} + + +SRBs-ToBeReleased-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SRBs-ToBeReleased-Item CRITICALITY reject TYPE SRBs-ToBeReleased-Item PRESENCE mandatory}, + ... +} + +DRBs-ToBeReleased-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-DRBs-ToBeReleased-Item CRITICALITY reject TYPE DRBs-ToBeReleased-Item PRESENCE mandatory}, + ... +} + +BHChannels-ToBeSetupMod-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-BHChannels-ToBeSetupMod-Item CRITICALITY reject TYPE BHChannels-ToBeSetupMod-Item PRESENCE mandatory}, + ... +} + +BHChannels-ToBeModified-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-BHChannels-ToBeModified-Item CRITICALITY reject TYPE BHChannels-ToBeModified-Item PRESENCE mandatory}, + ... +} + +BHChannels-ToBeReleased-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-BHChannels-ToBeReleased-Item CRITICALITY reject TYPE BHChannels-ToBeReleased-Item PRESENCE mandatory}, + ... +} + +SLDRBs-ToBeSetupMod-List ::= SEQUENCE (SIZE(1..maxnoofSLDRBs)) OF ProtocolIE-SingleContainer { { SLDRBs-ToBeSetupMod-ItemIEs} } +SLDRBs-ToBeModified-List ::= SEQUENCE (SIZE(1..maxnoofSLDRBs)) OF ProtocolIE-SingleContainer { { SLDRBs-ToBeModified-ItemIEs} } +SLDRBs-ToBeReleased-List ::= SEQUENCE (SIZE(1..maxnoofSLDRBs)) OF ProtocolIE-SingleContainer { { SLDRBs-ToBeReleased-ItemIEs} } + +SLDRBs-ToBeSetupMod-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SLDRBs-ToBeSetupMod-Item CRITICALITY reject TYPE SLDRBs-ToBeSetupMod-Item PRESENCE mandatory}, + ... +} + +SLDRBs-ToBeModified-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SLDRBs-ToBeModified-Item CRITICALITY reject TYPE SLDRBs-ToBeModified-Item PRESENCE mandatory}, + ... +} + +SLDRBs-ToBeReleased-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SLDRBs-ToBeReleased-Item CRITICALITY reject TYPE SLDRBs-ToBeReleased-Item PRESENCE mandatory}, + ... +} + +-- ************************************************************** +-- +-- UE CONTEXT MODIFICATION RESPONSE +-- +-- ************************************************************** + +UEContextModificationResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UEContextModificationResponseIEs} }, + ... +} + + +UEContextModificationResponseIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-ResourceCoordinationTransferContainer CRITICALITY ignore TYPE ResourceCoordinationTransferContainer PRESENCE optional }| + { ID id-DUtoCURRCInformation CRITICALITY reject TYPE DUtoCURRCInformation PRESENCE optional}| + { ID id-DRBs-SetupMod-List CRITICALITY ignore TYPE DRBs-SetupMod-List PRESENCE optional}| + { ID id-DRBs-Modified-List CRITICALITY ignore TYPE DRBs-Modified-List PRESENCE optional}| + { ID id-SRBs-FailedToBeSetupMod-List CRITICALITY ignore TYPE SRBs-FailedToBeSetupMod-List PRESENCE optional }| + { ID id-DRBs-FailedToBeSetupMod-List CRITICALITY ignore TYPE DRBs-FailedToBeSetupMod-List PRESENCE optional }| + { ID id-SCell-FailedtoSetupMod-List CRITICALITY ignore TYPE SCell-FailedtoSetupMod-List PRESENCE optional }| + { ID id-DRBs-FailedToBeModified-List CRITICALITY ignore TYPE DRBs-FailedToBeModified-List PRESENCE optional }| + { ID id-InactivityMonitoringResponse CRITICALITY reject TYPE InactivityMonitoringResponse PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }| + { ID id-C-RNTI CRITICALITY ignore TYPE C-RNTI PRESENCE optional }| + { ID id-Associated-SCell-List CRITICALITY ignore TYPE Associated-SCell-List PRESENCE optional }| + { ID id-SRBs-SetupMod-List CRITICALITY ignore TYPE SRBs-SetupMod-List PRESENCE optional }| + { ID id-SRBs-Modified-List CRITICALITY ignore TYPE SRBs-Modified-List PRESENCE optional }| + { ID id-FullConfiguration CRITICALITY reject TYPE FullConfiguration PRESENCE optional }| + { ID id-BHChannels-SetupMod-List CRITICALITY ignore TYPE BHChannels-SetupMod-List PRESENCE optional}| + { ID id-BHChannels-Modified-List CRITICALITY ignore TYPE BHChannels-Modified-List PRESENCE optional}| + { ID id-BHChannels-FailedToBeSetupMod-List CRITICALITY ignore TYPE BHChannels-FailedToBeSetupMod-List PRESENCE optional }| + { ID id-BHChannels-FailedToBeModified-List CRITICALITY ignore TYPE BHChannels-FailedToBeModified-List PRESENCE optional }| + { ID id-SLDRBs-SetupMod-List CRITICALITY ignore TYPE SLDRBs-SetupMod-List PRESENCE optional }| + { ID id-SLDRBs-Modified-List CRITICALITY ignore TYPE SLDRBs-Modified-List PRESENCE optional }| + { ID id-SLDRBs-FailedToBeSetupMod-List CRITICALITY ignore TYPE SLDRBs-FailedToBeSetupMod-List PRESENCE optional }| + { ID id-SLDRBs-FailedToBeModified-List CRITICALITY ignore TYPE SLDRBs-FailedToBeModified-List PRESENCE optional }| + { ID id-requestedTargetCellGlobalID CRITICALITY reject TYPE NRCGI PRESENCE optional}, + ... +} + + +DRBs-SetupMod-List ::= SEQUENCE (SIZE(1..maxnoofDRBs)) OF ProtocolIE-SingleContainer { { DRBs-SetupMod-ItemIEs} } +DRBs-Modified-List::= SEQUENCE (SIZE(1..maxnoofDRBs)) OF ProtocolIE-SingleContainer { { DRBs-Modified-ItemIEs } } +SRBs-SetupMod-List ::= SEQUENCE (SIZE(1..maxnoofSRBs)) OF ProtocolIE-SingleContainer { { SRBs-SetupMod-ItemIEs} } +SRBs-Modified-List ::= SEQUENCE (SIZE(1..maxnoofSRBs)) OF ProtocolIE-SingleContainer { { SRBs-Modified-ItemIEs } } +DRBs-FailedToBeModified-List ::= SEQUENCE (SIZE(1..maxnoofDRBs)) OF ProtocolIE-SingleContainer { { DRBs-FailedToBeModified-ItemIEs} } +SRBs-FailedToBeSetupMod-List ::= SEQUENCE (SIZE(1..maxnoofSRBs)) OF ProtocolIE-SingleContainer { { SRBs-FailedToBeSetupMod-ItemIEs} } +DRBs-FailedToBeSetupMod-List ::= SEQUENCE (SIZE(1..maxnoofDRBs)) OF ProtocolIE-SingleContainer { { DRBs-FailedToBeSetupMod-ItemIEs} } +SCell-FailedtoSetupMod-List ::= SEQUENCE (SIZE(1..maxnoofSCells)) OF ProtocolIE-SingleContainer { { SCell-FailedtoSetupMod-ItemIEs} } +BHChannels-SetupMod-List ::= SEQUENCE (SIZE(1..maxnoofBHRLCChannels)) OF ProtocolIE-SingleContainer { { BHChannels-SetupMod-ItemIEs} } +BHChannels-Modified-List ::= SEQUENCE (SIZE(1..maxnoofBHRLCChannels)) OF ProtocolIE-SingleContainer { { BHChannels-Modified-ItemIEs } } +BHChannels-FailedToBeModified-List ::= SEQUENCE (SIZE(1..maxnoofBHRLCChannels)) OF ProtocolIE-SingleContainer { { BHChannels-FailedToBeModified-ItemIEs} } +BHChannels-FailedToBeSetupMod-List ::= SEQUENCE (SIZE(1..maxnoofBHRLCChannels)) OF ProtocolIE-SingleContainer { { BHChannels-FailedToBeSetupMod-ItemIEs} } + +Associated-SCell-List ::= SEQUENCE (SIZE(1.. maxnoofSCells)) OF ProtocolIE-SingleContainer { { Associated-SCell-ItemIEs} } + +DRBs-SetupMod-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-DRBs-SetupMod-Item CRITICALITY ignore TYPE DRBs-SetupMod-Item PRESENCE mandatory}, + ... +} + + +DRBs-Modified-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-DRBs-Modified-Item CRITICALITY ignore TYPE DRBs-Modified-Item PRESENCE mandatory}, + ... +} + +SRBs-SetupMod-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SRBs-SetupMod-Item CRITICALITY ignore TYPE SRBs-SetupMod-Item PRESENCE mandatory}, + ... +} + + +SRBs-Modified-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SRBs-Modified-Item CRITICALITY ignore TYPE SRBs-Modified-Item PRESENCE mandatory}, + ... +} + +SRBs-FailedToBeSetupMod-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SRBs-FailedToBeSetupMod-Item CRITICALITY ignore TYPE SRBs-FailedToBeSetupMod-Item PRESENCE mandatory}, + ... +} + + +DRBs-FailedToBeSetupMod-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-DRBs-FailedToBeSetupMod-Item CRITICALITY ignore TYPE DRBs-FailedToBeSetupMod-Item PRESENCE mandatory}, + ... +} + + +DRBs-FailedToBeModified-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-DRBs-FailedToBeModified-Item CRITICALITY ignore TYPE DRBs-FailedToBeModified-Item PRESENCE mandatory}, + ... +} + +SCell-FailedtoSetupMod-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SCell-FailedtoSetupMod-Item CRITICALITY ignore TYPE SCell-FailedtoSetupMod-Item PRESENCE mandatory}, + ... +} + +Associated-SCell-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-Associated-SCell-Item CRITICALITY ignore TYPE Associated-SCell-Item PRESENCE mandatory}, + ... +} + +BHChannels-SetupMod-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-BHChannels-SetupMod-Item CRITICALITY ignore TYPE BHChannels-SetupMod-Item PRESENCE mandatory}, + ... +} + + +BHChannels-Modified-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-BHChannels-Modified-Item CRITICALITY ignore TYPE BHChannels-Modified-Item PRESENCE mandatory}, + ... +} + +BHChannels-FailedToBeSetupMod-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-BHChannels-FailedToBeSetupMod-Item CRITICALITY ignore TYPE BHChannels-FailedToBeSetupMod-Item PRESENCE mandatory}, + ... +} + +BHChannels-FailedToBeModified-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-BHChannels-FailedToBeModified-Item CRITICALITY ignore TYPE BHChannels-FailedToBeModified-Item PRESENCE mandatory}, + ... +} + +SLDRBs-SetupMod-List ::= SEQUENCE (SIZE(1..maxnoofSLDRBs)) OF ProtocolIE-SingleContainer { { SLDRBs-SetupMod-ItemIEs} } +SLDRBs-Modified-List ::= SEQUENCE (SIZE(1..maxnoofSLDRBs)) OF ProtocolIE-SingleContainer { { SLDRBs-Modified-ItemIEs } } +SLDRBs-FailedToBeModified-List ::= SEQUENCE (SIZE(1..maxnoofSLDRBs)) OF ProtocolIE-SingleContainer { { SLDRBs-FailedToBeModified-ItemIEs} } +SLDRBs-FailedToBeSetupMod-List ::= SEQUENCE (SIZE(1..maxnoofSLDRBs)) OF ProtocolIE-SingleContainer { { SLDRBs-FailedToBeSetupMod-ItemIEs} } + +SLDRBs-SetupMod-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SLDRBs-SetupMod-Item CRITICALITY ignore TYPE SLDRBs-SetupMod-Item PRESENCE mandatory}, + ... +} + +SLDRBs-Modified-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SLDRBs-Modified-Item CRITICALITY ignore TYPE SLDRBs-Modified-Item PRESENCE mandatory}, + ... +} + +SLDRBs-FailedToBeSetupMod-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SLDRBs-FailedToBeSetupMod-Item CRITICALITY ignore TYPE SLDRBs-FailedToBeSetupMod-Item PRESENCE mandatory}, + ... +} + +SLDRBs-FailedToBeModified-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SLDRBs-FailedToBeModified-Item CRITICALITY ignore TYPE SLDRBs-FailedToBeModified-Item PRESENCE mandatory}, + ... +} + +-- ************************************************************** +-- +-- UE CONTEXT MODIFICATION FAILURE +-- +-- ************************************************************** + +UEContextModificationFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UEContextModificationFailureIEs} }, + ... +} + +UEContextModificationFailureIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }| + { ID id-requestedTargetCellGlobalID CRITICALITY reject TYPE NRCGI PRESENCE optional}, + ... +} + + +-- ************************************************************** +-- +-- UE Context Modification Required (gNB-DU initiated) ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- UE CONTEXT MODIFICATION REQUIRED +-- +-- ************************************************************** + +UEContextModificationRequired ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UEContextModificationRequiredIEs} }, + ... +} + +UEContextModificationRequiredIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-ResourceCoordinationTransferContainer CRITICALITY ignore TYPE ResourceCoordinationTransferContainer PRESENCE optional }| + { ID id-DUtoCURRCInformation CRITICALITY reject TYPE DUtoCURRCInformation PRESENCE optional}| + { ID id-DRBs-Required-ToBeModified-List CRITICALITY reject TYPE DRBs-Required-ToBeModified-List PRESENCE optional}| + { ID id-SRBs-Required-ToBeReleased-List CRITICALITY reject TYPE SRBs-Required-ToBeReleased-List PRESENCE optional}| + { ID id-DRBs-Required-ToBeReleased-List CRITICALITY reject TYPE DRBs-Required-ToBeReleased-List PRESENCE optional}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-BHChannels-Required-ToBeReleased-List CRITICALITY reject TYPE BHChannels-Required-ToBeReleased-List PRESENCE optional}| + { ID id-SLDRBs-Required-ToBeModified-List CRITICALITY reject TYPE SLDRBs-Required-ToBeModified-List PRESENCE optional}| + { ID id-SLDRBs-Required-ToBeReleased-List CRITICALITY reject TYPE SLDRBs-Required-ToBeReleased-List PRESENCE optional}| + { ID id-targetCellsToCancel CRITICALITY reject TYPE TargetCellList PRESENCE optional}, + ... +} + +DRBs-Required-ToBeModified-List::= SEQUENCE (SIZE(1..maxnoofDRBs)) OF ProtocolIE-SingleContainer { { DRBs-Required-ToBeModified-ItemIEs } } +DRBs-Required-ToBeReleased-List::= SEQUENCE (SIZE(1..maxnoofDRBs)) OF ProtocolIE-SingleContainer { { DRBs-Required-ToBeReleased-ItemIEs } } + +SRBs-Required-ToBeReleased-List::= SEQUENCE (SIZE(1..maxnoofSRBs)) OF ProtocolIE-SingleContainer { { SRBs-Required-ToBeReleased-ItemIEs } } + +BHChannels-Required-ToBeReleased-List ::= SEQUENCE (SIZE(1..maxnoofBHRLCChannels)) OF ProtocolIE-SingleContainer { { BHChannels-Required-ToBeReleased-ItemIEs } } + +DRBs-Required-ToBeModified-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-DRBs-Required-ToBeModified-Item CRITICALITY reject TYPE DRBs-Required-ToBeModified-Item PRESENCE mandatory}, + ... +} + +DRBs-Required-ToBeReleased-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-DRBs-Required-ToBeReleased-Item CRITICALITY reject TYPE DRBs-Required-ToBeReleased-Item PRESENCE mandatory}, + ... +} + +SRBs-Required-ToBeReleased-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SRBs-Required-ToBeReleased-Item CRITICALITY reject TYPE SRBs-Required-ToBeReleased-Item PRESENCE mandatory}, + ... +} + +BHChannels-Required-ToBeReleased-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-BHChannels-Required-ToBeReleased-Item CRITICALITY reject TYPE BHChannels-Required-ToBeReleased-Item PRESENCE mandatory}, + ... +} + +SLDRBs-Required-ToBeModified-List::= SEQUENCE (SIZE(1..maxnoofSLDRBs)) OF ProtocolIE-SingleContainer { { SLDRBs-Required-ToBeModified-ItemIEs } } +SLDRBs-Required-ToBeReleased-List::= SEQUENCE (SIZE(1..maxnoofSLDRBs)) OF ProtocolIE-SingleContainer { { SLDRBs-Required-ToBeReleased-ItemIEs } } + +SLDRBs-Required-ToBeModified-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SLDRBs-Required-ToBeModified-Item CRITICALITY reject TYPE SLDRBs-Required-ToBeModified-Item PRESENCE mandatory}, + ... +} + +SLDRBs-Required-ToBeReleased-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SLDRBs-Required-ToBeReleased-Item CRITICALITY reject TYPE SLDRBs-Required-ToBeReleased-Item PRESENCE mandatory}, + ... +} + +-- ************************************************************** +-- +-- UE CONTEXT MODIFICATION CONFIRM +-- +-- ************************************************************** + +UEContextModificationConfirm::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UEContextModificationConfirmIEs} }, + ... +} + + +UEContextModificationConfirmIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-ResourceCoordinationTransferContainer CRITICALITY ignore TYPE ResourceCoordinationTransferContainer PRESENCE optional }| + { ID id-DRBs-ModifiedConf-List CRITICALITY ignore TYPE DRBs-ModifiedConf-List PRESENCE optional}| + { ID id-RRCContainer CRITICALITY ignore TYPE RRCContainer PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }| + { ID id-ExecuteDuplication CRITICALITY ignore TYPE ExecuteDuplication PRESENCE optional}| + { ID id-ResourceCoordinationTransferInformation CRITICALITY ignore TYPE ResourceCoordinationTransferInformation PRESENCE optional }| + { ID id-SLDRBs-ModifiedConf-List CRITICALITY ignore TYPE SLDRBs-ModifiedConf-List PRESENCE optional}, + ... +} + +DRBs-ModifiedConf-List::= SEQUENCE (SIZE(1..maxnoofDRBs)) OF ProtocolIE-SingleContainer { { DRBs-ModifiedConf-ItemIEs } } + +DRBs-ModifiedConf-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-DRBs-ModifiedConf-Item CRITICALITY ignore TYPE DRBs-ModifiedConf-Item PRESENCE mandatory}, + ... +} + +SLDRBs-ModifiedConf-List::= SEQUENCE (SIZE(1..maxnoofSLDRBs)) OF ProtocolIE-SingleContainer { { SLDRBs-ModifiedConf-ItemIEs } } + +SLDRBs-ModifiedConf-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SLDRBs-ModifiedConf-Item CRITICALITY ignore TYPE SLDRBs-ModifiedConf-Item PRESENCE mandatory}, + ... +} + +-- ************************************************************** +-- +-- UE CONTEXT MODIFICATION REFUSE +-- +-- ************************************************************** + +UEContextModificationRefuse::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UEContextModificationRefuseIEs} }, + ... +} + + +UEContextModificationRefuseIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + + +-- ************************************************************** +-- +-- WRITE-REPLACE WARNING ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Write-Replace Warning Request +-- +-- ************************************************************** + +WriteReplaceWarningRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {WriteReplaceWarningRequestIEs} }, + ... +} + +WriteReplaceWarningRequestIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-PWSSystemInformation CRITICALITY reject TYPE PWSSystemInformation PRESENCE mandatory }| + { ID id-RepetitionPeriod CRITICALITY reject TYPE RepetitionPeriod PRESENCE mandatory }| + { ID id-NumberofBroadcastRequest CRITICALITY reject TYPE NumberofBroadcastRequest PRESENCE mandatory }| + { ID id-Cells-To-Be-Broadcast-List CRITICALITY reject TYPE Cells-To-Be-Broadcast-List PRESENCE optional }, + ... +} + +Cells-To-Be-Broadcast-List ::= SEQUENCE (SIZE(1.. maxCellingNBDU)) OF ProtocolIE-SingleContainer { { Cells-To-Be-Broadcast-List-ItemIEs } } + +Cells-To-Be-Broadcast-List-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-Cells-To-Be-Broadcast-Item CRITICALITY reject TYPE Cells-To-Be-Broadcast-Item PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- Write-Replace Warning Response +-- +-- ************************************************************** + +WriteReplaceWarningResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {WriteReplaceWarningResponseIEs} }, + ... +} + +WriteReplaceWarningResponseIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-Cells-Broadcast-Completed-List CRITICALITY reject TYPE Cells-Broadcast-Completed-List PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }| + { ID id-Dedicated-SIDelivery-NeededUE-List CRITICALITY ignore TYPE Dedicated-SIDelivery-NeededUE-List PRESENCE optional }, + ... +} + +Cells-Broadcast-Completed-List ::= SEQUENCE (SIZE(1.. maxCellingNBDU)) OF ProtocolIE-SingleContainer { { Cells-Broadcast-Completed-List-ItemIEs } } + +Cells-Broadcast-Completed-List-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-Cells-Broadcast-Completed-Item CRITICALITY reject TYPE Cells-Broadcast-Completed-Item PRESENCE mandatory }, + ... +} + + +-- ************************************************************** +-- +-- PWS CANCEL ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- PWS Cancel Request +-- +-- ************************************************************** + +PWSCancelRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {PWSCancelRequestIEs} }, + ... +} + +PWSCancelRequestIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-NumberofBroadcastRequest CRITICALITY reject TYPE NumberofBroadcastRequest PRESENCE mandatory }| + { ID id-Broadcast-To-Be-Cancelled-List CRITICALITY reject TYPE Broadcast-To-Be-Cancelled-List PRESENCE optional }| + { ID id-Cancel-all-Warning-Messages-Indicator CRITICALITY reject TYPE Cancel-all-Warning-Messages-Indicator PRESENCE optional }| + { ID id-NotificationInformation CRITICALITY reject TYPE NotificationInformation PRESENCE optional}, + ... +} + +Broadcast-To-Be-Cancelled-List ::= SEQUENCE (SIZE(1.. maxCellingNBDU)) OF ProtocolIE-SingleContainer { { Broadcast-To-Be-Cancelled-List-ItemIEs } } + +Broadcast-To-Be-Cancelled-List-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-Broadcast-To-Be-Cancelled-Item CRITICALITY reject TYPE Broadcast-To-Be-Cancelled-Item PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- PWS Cancel Response +-- +-- ************************************************************** + +PWSCancelResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {PWSCancelResponseIEs} }, + ... +} + +PWSCancelResponseIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-Cells-Broadcast-Cancelled-List CRITICALITY reject TYPE Cells-Broadcast-Cancelled-List PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +Cells-Broadcast-Cancelled-List ::= SEQUENCE (SIZE(1.. maxCellingNBDU)) OF ProtocolIE-SingleContainer { { Cells-Broadcast-Cancelled-List-ItemIEs } } + +Cells-Broadcast-Cancelled-List-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-Cells-Broadcast-Cancelled-Item CRITICALITY reject TYPE Cells-Broadcast-Cancelled-Item PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- UE Inactivity Notification ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- UE Inactivity Notification +-- +-- ************************************************************** + +UEInactivityNotification ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ UEInactivityNotificationIEs}}, + ... +} + +UEInactivityNotificationIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-DRB-Activity-List CRITICALITY reject TYPE DRB-Activity-List PRESENCE mandatory } , + ... +} + +DRB-Activity-List::= SEQUENCE (SIZE(1..maxnoofDRBs)) OF ProtocolIE-SingleContainer { { DRB-Activity-ItemIEs } } + +DRB-Activity-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-DRB-Activity-Item CRITICALITY reject TYPE DRB-Activity-Item PRESENCE mandatory}, + ... +} + +-- ************************************************************** +-- +-- Initial UL RRC Message Transfer ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- INITIAL UL RRC Message Transfer +-- +-- ************************************************************** + +InitialULRRCMessageTransfer ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ InitialULRRCMessageTransferIEs}}, + ... +} + +InitialULRRCMessageTransferIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-NRCGI CRITICALITY reject TYPE NRCGI PRESENCE mandatory }| + { ID id-C-RNTI CRITICALITY reject TYPE C-RNTI PRESENCE mandatory }| + { ID id-RRCContainer CRITICALITY reject TYPE RRCContainer PRESENCE mandatory }| + { ID id-DUtoCURRCContainer CRITICALITY reject TYPE DUtoCURRCContainer PRESENCE optional }| + { ID id-SULAccessIndication CRITICALITY ignore TYPE SULAccessIndication PRESENCE optional }| + { ID id-TransactionID CRITICALITY ignore TYPE TransactionID PRESENCE mandatory }| + { ID id-RANUEID CRITICALITY ignore TYPE RANUEID PRESENCE optional }| + { ID id-RRCContainer-RRCSetupComplete CRITICALITY ignore TYPE RRCContainer-RRCSetupComplete PRESENCE optional }, + ... +} + + +-- ************************************************************** +-- +-- DL RRC Message Transfer ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- DL RRC Message Transfer +-- +-- ************************************************************** + +DLRRCMessageTransfer ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ DLRRCMessageTransferIEs}}, + ... +} + +DLRRCMessageTransferIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-oldgNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE optional }| + { ID id-SRBID CRITICALITY reject TYPE SRBID PRESENCE mandatory }| + { ID id-ExecuteDuplication CRITICALITY ignore TYPE ExecuteDuplication PRESENCE optional}| + { ID id-RRCContainer CRITICALITY reject TYPE RRCContainer PRESENCE mandatory }| + { ID id-RAT-FrequencyPriorityInformation CRITICALITY reject TYPE RAT-FrequencyPriorityInformation PRESENCE optional }| + { ID id-RRCDeliveryStatusRequest CRITICALITY ignore TYPE RRCDeliveryStatusRequest PRESENCE optional }| + { ID id-UEContextNotRetrievable CRITICALITY reject TYPE UEContextNotRetrievable PRESENCE optional }| + { ID id-RedirectedRRCmessage CRITICALITY reject TYPE OCTET STRING PRESENCE optional }| + { ID id-PLMNAssistanceInfoForNetShar CRITICALITY ignore TYPE PLMN-Identity PRESENCE optional }| + { ID id-new-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE optional }| + { ID id-AdditionalRRMPriorityIndex CRITICALITY ignore TYPE AdditionalRRMPriorityIndex PRESENCE optional }, + ... +} +-- ************************************************************** +-- +-- UL RRC Message Transfer ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- UL RRC Message Transfer +-- +-- ************************************************************** + +ULRRCMessageTransfer ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ ULRRCMessageTransferIEs}}, + ... +} + +ULRRCMessageTransferIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-SRBID CRITICALITY reject TYPE SRBID PRESENCE mandatory }| + { ID id-RRCContainer CRITICALITY reject TYPE RRCContainer PRESENCE mandatory }| + { ID id-SelectedPLMNID CRITICALITY reject TYPE PLMN-Identity PRESENCE optional }| + { ID id-new-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- PRIVATE MESSAGE +-- +-- ************************************************************** + +PrivateMessage ::= SEQUENCE { + privateIEs PrivateIE-Container {{PrivateMessage-IEs}}, + ... +} + +PrivateMessage-IEs F1AP-PRIVATE-IES ::= { + ... +} + + +-- ************************************************************** +-- +-- System Information ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- System information Delivery Command +-- +-- ************************************************************** + +SystemInformationDeliveryCommand ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ SystemInformationDeliveryCommandIEs}}, + ... +} + +SystemInformationDeliveryCommandIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-NRCGI CRITICALITY reject TYPE NRCGI PRESENCE mandatory }| + { ID id-SItype-List CRITICALITY reject TYPE SItype-List PRESENCE mandatory }| + { ID id-ConfirmedUEID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }, + ... +} + + +-- ************************************************************** +-- +-- Paging PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Paging +-- +-- ************************************************************** + +Paging ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ PagingIEs}}, + ... +} + +PagingIEs F1AP-PROTOCOL-IES ::= { + { ID id-UEIdentityIndexValue CRITICALITY reject TYPE UEIdentityIndexValue PRESENCE mandatory }| + { ID id-PagingIdentity CRITICALITY reject TYPE PagingIdentity PRESENCE mandatory }| + { ID id-PagingDRX CRITICALITY ignore TYPE PagingDRX PRESENCE optional }| + { ID id-PagingPriority CRITICALITY ignore TYPE PagingPriority PRESENCE optional }| + { ID id-PagingCell-List CRITICALITY ignore TYPE PagingCell-list PRESENCE mandatory }| + { ID id-PagingOrigin CRITICALITY ignore TYPE PagingOrigin PRESENCE optional }, + ... +} + +PagingCell-list::= SEQUENCE (SIZE(1.. maxnoofPagingCells)) OF ProtocolIE-SingleContainer { { PagingCell-ItemIEs } } + +PagingCell-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-PagingCell-Item CRITICALITY ignore TYPE PagingCell-Item PRESENCE mandatory} , + ... +} + + + +-- ************************************************************** +-- +-- Notify +-- +-- ************************************************************** + +Notify ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ NotifyIEs}}, + ... +} + +NotifyIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-DRB-Notify-List CRITICALITY reject TYPE DRB-Notify-List PRESENCE mandatory }, + ... +} + +DRB-Notify-List::= SEQUENCE (SIZE(1.. maxnoofDRBs)) OF ProtocolIE-SingleContainer { { DRB-Notify-ItemIEs } } + +DRB-Notify-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-DRB-Notify-Item CRITICALITY reject TYPE DRB-Notify-Item PRESENCE mandatory}, + ... +} + + +-- ************************************************************** +-- +-- NETWORK ACCESS RATE REDUCTION ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Network Access Rate Reduction +-- +-- ************************************************************** + +NetworkAccessRateReduction ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ NetworkAccessRateReductionIEs }}, + ... +} + +NetworkAccessRateReductionIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-UAC-Assistance-Info CRITICALITY reject TYPE UAC-Assistance-Info PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- PWS RESTART INDICATION ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- PWS Restart Indication +-- +-- ************************************************************** + +PWSRestartIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { PWSRestartIndicationIEs} }, + ... +} + +PWSRestartIndicationIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-NR-CGI-List-For-Restart-List CRITICALITY reject TYPE NR-CGI-List-For-Restart-List PRESENCE mandatory }, + ... +} + +NR-CGI-List-For-Restart-List ::= SEQUENCE (SIZE(1.. maxCellingNBDU)) OF ProtocolIE-SingleContainer { { NR-CGI-List-For-Restart-List-ItemIEs } } + +NR-CGI-List-For-Restart-List-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-NR-CGI-List-For-Restart-Item CRITICALITY reject TYPE NR-CGI-List-For-Restart-Item PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- PWS FAILURE INDICATION ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- PWS Failure Indication +-- +-- ************************************************************** + +PWSFailureIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { PWSFailureIndicationIEs} }, + ... +} + +PWSFailureIndicationIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-PWS-Failed-NR-CGI-List CRITICALITY reject TYPE PWS-Failed-NR-CGI-List PRESENCE optional }, + ... +} + +PWS-Failed-NR-CGI-List ::= SEQUENCE (SIZE(1.. maxCellingNBDU)) OF ProtocolIE-SingleContainer { { PWS-Failed-NR-CGI-List-ItemIEs } } + +PWS-Failed-NR-CGI-List-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-PWS-Failed-NR-CGI-Item CRITICALITY reject TYPE PWS-Failed-NR-CGI-Item PRESENCE mandatory }, + ... +} + + +-- ************************************************************** +-- +-- gNB-DU STATUS INDICATION ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- gNB-DU Status Indication +-- +-- ************************************************************** + +GNBDUStatusIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {GNBDUStatusIndicationIEs} }, + ... +} + +GNBDUStatusIndicationIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-GNBDUOverloadInformation CRITICALITY reject TYPE GNBDUOverloadInformation PRESENCE mandatory }, + ... +} + + + +-- ************************************************************** +-- +-- RRC Delivery Report ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- RRC Delivery Report +-- +-- ************************************************************** + +RRCDeliveryReport ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ RRCDeliveryReportIEs}}, + ... +} + +RRCDeliveryReportIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-RRCDeliveryStatus CRITICALITY ignore TYPE RRCDeliveryStatus PRESENCE mandatory }| + { ID id-SRBID CRITICALITY ignore TYPE SRBID PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- F1 Removal ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- F1 Removal Request +-- +-- ************************************************************** + +F1RemovalRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ F1RemovalRequestIEs }}, + ... +} + +F1RemovalRequestIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- F1 Removal Response +-- +-- ************************************************************** + +F1RemovalResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ F1RemovalResponseIEs }}, + ... +} + +F1RemovalResponseIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + + ... +} + +-- ************************************************************** +-- +-- F1 Removal Failure +-- +-- ************************************************************** + +F1RemovalFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ F1RemovalFailureIEs }}, + ... +} + +F1RemovalFailureIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + + ... +} + + +-- ************************************************************** +-- +-- TRACE ELEMENTARY PROCEDURES +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- TRACE START +-- +-- ************************************************************** + +TraceStart ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {TraceStartIEs} }, + ... +} + +TraceStartIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-TraceActivation CRITICALITY ignore TYPE TraceActivation PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- DEACTIVATE TRACE +-- +-- ************************************************************** + +DeactivateTrace ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {DeactivateTraceIEs} }, + ... +} + +DeactivateTraceIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-TraceID CRITICALITY ignore TYPE TraceID PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- CELL TRAFFIC TRACE +-- +-- ************************************************************** + +CellTrafficTrace ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {CellTrafficTraceIEs} }, + ... +} + +CellTrafficTraceIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + {ID id-TraceID CRITICALITY ignore TYPE TraceID PRESENCE mandatory }| + {ID id-TraceCollectionEntityIPAddress CRITICALITY ignore TYPE TransportLayerAddress PRESENCE mandatory }| + {ID id-PrivacyIndicator CRITICALITY ignore TYPE PrivacyIndicator PRESENCE optional }| + + {ID id-TraceCollectionEntityURI CRITICALITY ignore TYPE URI-address PRESENCE optional }, + ... + +} + +-- ************************************************************** +-- +-- DU-CU Radio Information Transfer ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- DU-CU Radio Information Transfer +-- +-- ************************************************************** + +DUCURadioInformationTransfer ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ DUCURadioInformationTransferIEs}}, + ... +} + +DUCURadioInformationTransferIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-DUCURadioInformationType CRITICALITY ignore TYPE DUCURadioInformationType PRESENCE mandatory }, + ... +} + + + +-- ************************************************************** +-- +-- CU-DU Radio Information Transfer ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- CU-DU Radio Information Transfer +-- +-- ************************************************************** + +CUDURadioInformationTransfer ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ CUDURadioInformationTransferIEs}}, + ... +} + +CUDURadioInformationTransferIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-CUDURadioInformationType CRITICALITY ignore TYPE CUDURadioInformationType PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- IAB PROCEDURES +-- +-- ************************************************************** +-- ************************************************************** +-- +-- BAP Mapping Configuration ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- BAP MAPPING CONFIGURATION +-- ************************************************************** + + +BAPMappingConfiguration ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {BAPMappingConfiguration-IEs} }, + ... + } + +BAPMappingConfiguration-IEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory}| + { ID id-BH-Routing-Information-Added-List CRITICALITY ignore TYPE BH-Routing-Information-Added-List PRESENCE optional}| + { ID id-BH-Routing-Information-Removed-List CRITICALITY ignore TYPE BH-Routing-Information-Removed-List PRESENCE optional}| + { ID id-TrafficMappingInformation CRITICALITY ignore TYPE TrafficMappingInfo PRESENCE optional}, + ... +} + +BH-Routing-Information-Added-List ::= SEQUENCE (SIZE(1.. maxnoofRoutingEntries)) OF ProtocolIE-SingleContainer { { BH-Routing-Information-Added-List-ItemIEs } } +BH-Routing-Information-Removed-List ::= SEQUENCE (SIZE(1.. maxnoofRoutingEntries)) OF ProtocolIE-SingleContainer { { BH-Routing-Information-Removed-List-ItemIEs } } + +BH-Routing-Information-Added-List-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-BH-Routing-Information-Added-List-Item CRITICALITY ignore TYPE BH-Routing-Information-Added-List-Item PRESENCE optional}, + ... +} + +BH-Routing-Information-Removed-List-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-BH-Routing-Information-Removed-List-Item CRITICALITY ignore TYPE BH-Routing-Information-Removed-List-Item PRESENCE optional}, + ... +} + + +-- ************************************************************** +-- +-- BAP MAPPING CONFIGURATION ACKNOWLEDGE +-- ************************************************************** + +BAPMappingConfigurationAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {BAPMappingConfigurationAcknowledge-IEs} }, + ... +} + +BAPMappingConfigurationAcknowledge-IEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}, + ... +} + + + +-- ************************************************************** +-- +-- GNB-DU Configuration ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- GNB-DU RESOURCE CONFIGURATION +-- ************************************************************** + + +GNBDUResourceConfiguration ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ GNBDUResourceConfigurationIEs}}, + ... +} + + +GNBDUResourceConfigurationIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-Activated-Cells-to-be-Updated-List CRITICALITY reject TYPE Activated-Cells-to-be-Updated-List PRESENCE optional}| + { ID id-Child-Nodes-List CRITICALITY reject TYPE Child-Nodes-List PRESENCE optional}, + ... +} + + + + +-- ************************************************************** +-- +-- GNB-DU RESOURCE CONFIGURATION ACKNOWLEDGE +-- ************************************************************** + + +GNBDUResourceConfigurationAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { GNBDUResourceConfigurationAcknowledgeIEs} }, + ... +} + + +GNBDUResourceConfigurationAcknowledgeIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- IAB TNL Address Allocation ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- IAB TNL ADDRESS REQUEST +-- ************************************************************** + + + +IABTNLAddressRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {IABTNLAddressRequestIEs} }, + ... +} + +IABTNLAddressRequestIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-IABv4AddressesRequested CRITICALITY reject TYPE IABv4AddressesRequested PRESENCE optional }| + { ID id-IABIPv6RequestType CRITICALITY reject TYPE IABIPv6RequestType PRESENCE optional }| + { ID id-IAB-TNL-Addresses-To-Remove-List CRITICALITY reject TYPE IAB-TNL-Addresses-To-Remove-List PRESENCE optional }, + ... +} + + +IAB-TNL-Addresses-To-Remove-List ::= SEQUENCE (SIZE(1..maxnoofTLAsIAB)) OF ProtocolIE-SingleContainer { { IAB-TNL-Addresses-To-Remove-ItemIEs } } + +IAB-TNL-Addresses-To-Remove-ItemIEs F1AP-PROTOCOL-IES::= { + { ID id-IAB-TNL-Addresses-To-Remove-Item CRITICALITY reject TYPE IAB-TNL-Addresses-To-Remove-Item PRESENCE mandatory}, + ... +} + + +-- ************************************************************** +-- +-- IAB TNL ADDRESS RESPONSE +-- ************************************************************** + + +IABTNLAddressResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {IABTNLAddressResponseIEs} }, + ... +} + + +IABTNLAddressResponseIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-IAB-Allocated-TNL-Address-List CRITICALITY reject TYPE IAB-Allocated-TNL-Address-List PRESENCE mandatory }, + ... +} + + +IAB-Allocated-TNL-Address-List ::= SEQUENCE (SIZE(1.. maxnoofTLAsIAB)) OF ProtocolIE-SingleContainer { { IAB-Allocated-TNL-Address-List-ItemIEs } } + + +IAB-Allocated-TNL-Address-List-ItemIEs F1AP-PROTOCOL-IES::= { + { ID id-IAB-Allocated-TNL-Address-Item CRITICALITY reject TYPE IAB-Allocated-TNL-Address-Item PRESENCE mandatory}, + ... +} + +-- ************************************************************** +-- +-- IAB UP Configuration Update ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- IAB UP Configuration Update Request +-- +-- ************************************************************** + +IABUPConfigurationUpdateRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { IABUPConfigurationUpdateRequestIEs} }, + ... +} + +IABUPConfigurationUpdateRequestIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-UL-UP-TNL-Information-to-Update-List CRITICALITY ignore TYPE UL-UP-TNL-Information-to-Update-List PRESENCE optional }| + { ID id-UL-UP-TNL-Address-to-Update-List CRITICALITY ignore TYPE UL-UP-TNL-Address-to-Update-List PRESENCE optional }, + ... +} + +UL-UP-TNL-Information-to-Update-List ::= SEQUENCE (SIZE(1.. maxnoofULUPTNLInformationforIAB)) OF ProtocolIE-SingleContainer { { UL-UP-TNL-Information-to-Update-List-ItemIEs } } + +UL-UP-TNL-Information-to-Update-List-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-UL-UP-TNL-Information-to-Update-List-Item CRITICALITY ignore TYPE UL-UP-TNL-Information-to-Update-List-Item PRESENCE optional}, + ... +} + +UL-UP-TNL-Address-to-Update-List ::= SEQUENCE (SIZE(1.. maxnoofUPTNLAddresses)) OF ProtocolIE-SingleContainer { { UL-UP-TNL-Address-to-Update-List-ItemIEs } } + +UL-UP-TNL-Address-to-Update-List-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-UL-UP-TNL-Address-to-Update-List-Item CRITICALITY ignore TYPE UL-UP-TNL-Address-to-Update-List-Item PRESENCE optional}, + ... +} + + +-- ************************************************************** +-- +-- IAB UP Configuration Update Response +-- +-- ************************************************************** + +IABUPConfigurationUpdateResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { IABUPConfigurationUpdateResponseIEs} }, + ... +} + +IABUPConfigurationUpdateResponseIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }| + { ID id-DL-UP-TNL-Address-to-Update-List CRITICALITY reject TYPE DL-UP-TNL-Address-to-Update-List PRESENCE optional }, + ... +} + +DL-UP-TNL-Address-to-Update-List ::= SEQUENCE (SIZE(1.. maxnoofUPTNLAddresses)) OF ProtocolIE-SingleContainer { { DL-UP-TNL-Address-to-Update-List-ItemIEs } } + +DL-UP-TNL-Address-to-Update-List-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-DL-UP-TNL-Address-to-Update-List-Item CRITICALITY ignore TYPE DL-UP-TNL-Address-to-Update-List-Item PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- IAB UP Configuration Update Failure +-- +-- ************************************************************** + +IABUPConfigurationUpdateFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { IABUPConfigurationUpdateFailureIEs} }, + ... +} + +IABUPConfigurationUpdateFailureIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-TimeToWait CRITICALITY ignore TYPE TimeToWait PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- Resource Status Reporting Initiation ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Resource Status Request +-- +-- ************************************************************** + +ResourceStatusRequest::= SEQUENCE { + protocolIEs ProtocolIE-Container { {ResourceStatusRequestIEs} }, + ... +} + +ResourceStatusRequestIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-gNBCUMeasurementID CRITICALITY reject TYPE GNBCUMeasurementID PRESENCE mandatory }| + { ID id-gNBDUMeasurementID CRITICALITY ignore TYPE GNBDUMeasurementID PRESENCE conditional }| + { ID id-RegistrationRequest CRITICALITY ignore TYPE RegistrationRequest PRESENCE mandatory }| + { ID id-ReportCharacteristics CRITICALITY ignore TYPE ReportCharacteristics PRESENCE conditional }| + { ID id-CellToReportList CRITICALITY ignore TYPE CellToReportList PRESENCE optional }| + { ID id-ReportingPeriodicity CRITICALITY ignore TYPE ReportingPeriodicity PRESENCE optional }, + ... +} + + +-- ************************************************************** +-- +-- Resource Status Response +-- +-- ************************************************************** + +ResourceStatusResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { ResourceStatusResponseIEs} }, + ... +} + + +ResourceStatusResponseIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-gNBCUMeasurementID CRITICALITY reject TYPE GNBCUMeasurementID PRESENCE mandatory }| + { ID id-gNBDUMeasurementID CRITICALITY ignore TYPE GNBDUMeasurementID PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + + +-- ************************************************************** +-- +-- Resource Status Failure +-- +-- ************************************************************** + +ResourceStatusFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { ResourceStatusFailureIEs} }, + ... +} + +ResourceStatusFailureIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-gNBCUMeasurementID CRITICALITY reject TYPE GNBCUMeasurementID PRESENCE mandatory }| + { ID id-gNBDUMeasurementID CRITICALITY ignore TYPE GNBDUMeasurementID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- Resource Status Reporting ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Resource Status Update +-- +-- ************************************************************** + +ResourceStatusUpdate ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ ResourceStatusUpdateIEs}}, + ... +} + +ResourceStatusUpdateIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-gNBCUMeasurementID CRITICALITY reject TYPE GNBCUMeasurementID PRESENCE mandatory }| + { ID id-gNBDUMeasurementID CRITICALITY ignore TYPE GNBDUMeasurementID PRESENCE mandatory }| + { ID id-HardwareLoadIndicator CRITICALITY ignore TYPE HardwareLoadIndicator PRESENCE optional }| + { ID id-TNLCapacityIndicator CRITICALITY ignore TYPE TNLCapacityIndicator PRESENCE optional }| + { ID id-CellMeasurementResultList CRITICALITY ignore TYPE CellMeasurementResultList PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- Access And Mobility Indication ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Access And Mobility Indication +-- +-- ************************************************************** + +AccessAndMobilityIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { AccessAndMobilityIndicationIEs} }, + ... +} + +AccessAndMobilityIndicationIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-RACHReportInformationList CRITICALITY ignore TYPE RACHReportInformationList PRESENCE optional }| + { ID id-RLFReportInformationList CRITICALITY ignore TYPE RLFReportInformationList PRESENCE optional }, + ... +} + + +-- ************************************************************** +-- +-- REFERENCE TIME INFORMATION REPORTING CONTROL +-- +-- ************************************************************** + +ReferenceTimeInformationReportingControl::= SEQUENCE { + protocolIEs ProtocolIE-Container { { ReferenceTimeInformationReportingControlIEs} }, + ... +} + +ReferenceTimeInformationReportingControlIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-ReportingRequestType CRITICALITY reject TYPE ReportingRequestType PRESENCE mandatory }, + ... +} + + +-- ************************************************************** +-- +-- REFERENCE TIME INFORMATION REPORT +-- +-- ************************************************************** + +ReferenceTimeInformationReport::= SEQUENCE { + protocolIEs ProtocolIE-Container { { ReferenceTimeInformationReportIEs} }, + ... +} + +ReferenceTimeInformationReportIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY ignore TYPE TransactionID PRESENCE mandatory }| + { ID id-TimeReferenceInformation CRITICALITY ignore TYPE TimeReferenceInformation PRESENCE mandatory }, + ... +} + + +-- ************************************************************** +-- +-- Access Success +-- +-- ************************************************************** + +AccessSuccess ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ AccessSuccessIEs}}, + ... +} + +AccessSuccessIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-NRCGI CRITICALITY reject TYPE NRCGI PRESENCE mandatory }, + ... +} + + +-- ************************************************************** +-- +-- POSITIONING ASSISTANCE INFORMATION CONTROL ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Positioning Assistance Information Control +-- +-- ************************************************************** + +PositioningAssistanceInformationControl ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ PositioningAssistanceInformationControlIEs}}, + ... +} + +PositioningAssistanceInformationControlIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-PosAssistance-Information CRITICALITY reject TYPE PosAssistance-Information PRESENCE optional}| + { ID id-PosBroadcast CRITICALITY reject TYPE PosBroadcast PRESENCE optional}| + { ID id-PositioningBroadcastCells CRITICALITY reject TYPE PositioningBroadcastCells PRESENCE optional}| + { ID id-RoutingID CRITICALITY reject TYPE RoutingID PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- POSITIONING ASSISTANCE INFORMATION FEEDBACK ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Positioning Assistance Information Feedback +-- +-- ************************************************************** + +PositioningAssistanceInformationFeedback ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ PositioningAssistanceInformationFeedbackIEs}}, + ... +} + +PositioningAssistanceInformationFeedbackIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-PosAssistanceInformationFailureList CRITICALITY reject TYPE PosAssistanceInformationFailureList PRESENCE optional}| + { ID id-PositioningBroadcastCells CRITICALITY reject TYPE PositioningBroadcastCells PRESENCE optional}| + { ID id-RoutingID CRITICALITY reject TYPE RoutingID PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- POSITONING MEASUREMENT EXCHANGE ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Positioning Measurement Request +-- +-- ************************************************************** + +PositioningMeasurementRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { PositioningMeasurementRequestIEs} }, + ... +} + +PositioningMeasurementRequestIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory}| + { ID id-LMF-MeasurementID CRITICALITY reject TYPE LMF-MeasurementID PRESENCE mandatory}| + { ID id-RAN-MeasurementID CRITICALITY reject TYPE RAN-MeasurementID PRESENCE mandatory}| + { ID id-TRP-MeasurementRequestList CRITICALITY reject TYPE TRP-MeasurementRequestList PRESENCE mandatory}| + { ID id-PosReportCharacteristics CRITICALITY reject TYPE PosReportCharacteristics PRESENCE mandatory}| + { ID id-PosMeasurementPeriodicity CRITICALITY reject TYPE PosMeasurementPeriodicity PRESENCE conditional }| + -- The above IE shall be present if the PosReportCharacteristics IE is set to “periodic” -- + { ID id-PosMeasurementQuantities CRITICALITY reject TYPE PosMeasurementQuantities PRESENCE mandatory}| + { ID id-SFNInitialisationTime CRITICALITY ignore TYPE SFNInitialisationTime PRESENCE optional }| + { ID id-SRSConfiguration CRITICALITY ignore TYPE SRSConfiguration PRESENCE optional}| + { ID id-MeasurementBeamInfoRequest CRITICALITY ignore TYPE MeasurementBeamInfoRequest PRESENCE optional }| + { ID id-SystemFrameNumber CRITICALITY ignore TYPE SystemFrameNumber PRESENCE optional}| + { ID id-SlotNumber CRITICALITY ignore TYPE SlotNumber PRESENCE optional}, + ... +} + + +-- ************************************************************** +-- +-- Positioning Measurement Response +-- +-- ************************************************************** + +PositioningMeasurementResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { PositioningMeasurementResponseIEs} }, + ... +} + + +PositioningMeasurementResponseIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory}| + { ID id-LMF-MeasurementID CRITICALITY reject TYPE LMF-MeasurementID PRESENCE mandatory}| + { ID id-RAN-MeasurementID CRITICALITY reject TYPE RAN-MeasurementID PRESENCE mandatory}| + { ID id-PosMeasurementResultList CRITICALITY reject TYPE PosMeasurementResultList PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + + +-- ************************************************************** +-- +-- Positioning Measurement Failure +-- +-- ************************************************************** + +PositioningMeasurementFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { PositioningMeasurementFailureIEs} }, + ... +} + +PositioningMeasurementFailureIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-LMF-MeasurementID CRITICALITY reject TYPE LMF-MeasurementID PRESENCE mandatory }| + { ID id-RAN-MeasurementID CRITICALITY reject TYPE RAN-MeasurementID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + + +-- ************************************************************** +-- +-- POSITIONING MEASUREMENT REPORT ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Positioning Measurement Report +-- +-- ************************************************************** + +PositioningMeasurementReport ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { PositioningMeasurementReportIEs} }, + ... +} + +PositioningMeasurementReportIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-LMF-MeasurementID CRITICALITY reject TYPE LMF-MeasurementID PRESENCE mandatory }| + { ID id-RAN-MeasurementID CRITICALITY reject TYPE RAN-MeasurementID PRESENCE mandatory }| + { ID id-PosMeasurementResultList CRITICALITY reject TYPE PosMeasurementResultList PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- POSITIONING MEASUREMENT ABORT ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Positioning Measurement Abort +-- +-- ************************************************************** + +PositioningMeasurementAbort ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { PositioningMeasurementAbortIEs} }, + ... +} + +PositioningMeasurementAbortIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-LMF-MeasurementID CRITICALITY reject TYPE LMF-MeasurementID PRESENCE mandatory }| + { ID id-RAN-MeasurementID CRITICALITY reject TYPE RAN-MeasurementID PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- POSITIONING MEASUREMENT FAILURE INDICATION ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Positioning Measurement Failure Indication +-- +-- ************************************************************** + +PositioningMeasurementFailureIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { PositioningMeasurementFailureIndicationIEs} }, + ... +} + +PositioningMeasurementFailureIndicationIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-LMF-MeasurementID CRITICALITY reject TYPE LMF-MeasurementID PRESENCE mandatory }| + { ID id-RAN-MeasurementID CRITICALITY reject TYPE RAN-MeasurementID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- POSITIONING MEASUREMENT UPDATE ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Positioning Measurement Update +-- +-- ************************************************************** + +PositioningMeasurementUpdate ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { PositioningMeasurementUpdateIEs} }, + ... +} + +PositioningMeasurementUpdateIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-LMF-MeasurementID CRITICALITY reject TYPE LMF-MeasurementID PRESENCE mandatory }| + { ID id-RAN-MeasurementID CRITICALITY reject TYPE RAN-MeasurementID PRESENCE mandatory }| + { ID id-SRSConfiguration CRITICALITY ignore TYPE SRSConfiguration PRESENCE optional}, + ... +} + + +-- ************************************************************** +-- +-- TRP INFORMATION EXCHANGE ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- TRP Information Request +-- +-- ************************************************************** + +TRPInformationRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { TRPInformationRequestIEs} }, + ... +} + +TRPInformationRequestIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-TRPList CRITICALITY ignore TYPE TRPList PRESENCE optional }| + { ID id-TRPInformationTypeListTRPReq CRITICALITY reject TYPE TRPInformationTypeListTRPReq PRESENCE mandatory }, + ... +} + +TRPInformationTypeListTRPReq ::= SEQUENCE (SIZE(1.. maxnoofTRPInfoTypes)) OF ProtocolIE-SingleContainer { { TRPInformationTypeItemTRPReq } } + +TRPInformationTypeItemTRPReq F1AP-PROTOCOL-IES ::= { + { ID id-TRPInformationTypeItem CRITICALITY reject TYPE TRPInformationTypeItem PRESENCE mandatory }, + ... +} + + +-- ************************************************************** +-- +-- TRP Information Response +-- +-- ************************************************************** + +TRPInformationResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { TRPInformationResponseIEs} }, + ... +} + +TRPInformationResponseIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-TRPInformationListTRPResp CRITICALITY ignore TYPE TRPInformationListTRPResp PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +TRPInformationListTRPResp ::= SEQUENCE (SIZE(1.. maxnoofTRPs)) OF ProtocolIE-SingleContainer { { TRPInformationItemTRPResp } } + +TRPInformationItemTRPResp F1AP-PROTOCOL-IES ::= { + { ID id-TRPInformationItem CRITICALITY ignore TYPE TRPInformationItem PRESENCE mandatory }, + ... +} + + +-- ************************************************************** +-- +-- TRP Information Failure +-- +-- ************************************************************** + +TRPInformationFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { TRPInformationFailureIEs} }, + ... +} + +TRPInformationFailureIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + + +-- ************************************************************** +-- +-- POSITIONING INFORMATION EXCHANGE ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Positioning Information Request +-- +-- ************************************************************** + +PositioningInformationRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { PositioningInformationRequestIEs} }, + ... +} + +PositioningInformationRequestIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-RequestedSRSTransmissionCharacteristics CRITICALITY ignore TYPE RequestedSRSTransmissionCharacteristics PRESENCE optional}, + ... +} + + +-- ************************************************************** +-- +-- Positioning Information Response +-- +-- ************************************************************** + +PositioningInformationResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { PositioningInformationResponseIEs} }, + ... +} + + +PositioningInformationResponseIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-SRSConfiguration CRITICALITY ignore TYPE SRSConfiguration PRESENCE optional}| + { ID id-SFNInitialisationTime CRITICALITY ignore TYPE SFNInitialisationTime PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + + +-- ************************************************************** +-- +-- Positioning Information Failure +-- +-- ************************************************************** + +PositioningInformationFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { PositioningInformationFailureIEs} }, + ... +} + +PositioningInformationFailureIEs F1AP-PROTOCOL-IES ::= { + + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + + +-- ************************************************************** +-- +-- POSITIONING ACTIVATION PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Positioning Activation Request +-- +-- ************************************************************** + +PositioningActivationRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { PositioningActivationRequestIEs} }, + ... +} + +PositioningActivationRequestIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-SRSType CRITICALITY reject TYPE SRSType PRESENCE mandatory }| + { ID id-ActivationTime CRITICALITY ignore TYPE SFNInitialisationTime PRESENCE optional }, + ... +} + +SRSType ::= CHOICE { + semipersistentSRS SemipersistentSRS, + aperiodicSRS AperiodicSRS, + choice-extension ProtocolIE-SingleContainer { { SRSType-ExtIEs} } +} + +SRSType-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +SemipersistentSRS ::= SEQUENCE { + sRSResourceSetID SRSResourceSetID, + sRSSpatialRelation SRSSpatialRelation OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {SemipersistentSRS-ExtIEs} } OPTIONAL, + ... +} + +SemipersistentSRS-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +AperiodicSRS ::= SEQUENCE { + aperiodic ENUMERATED {true, ...}, + sRSResourceTrigger SRSResourceTrigger OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {AperiodicSRS-ExtIEs} } OPTIONAL, + ... +} + +AperiodicSRS-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +-- ************************************************************** +-- +-- Positioning Activation Response +-- +-- ************************************************************** + +PositioningActivationResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { PositioningActivationResponseIEs} }, + ... +} + + +PositioningActivationResponseIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-SystemFrameNumber CRITICALITY ignore TYPE SystemFrameNumber PRESENCE optional }| + { ID id-SlotNumber CRITICALITY ignore TYPE SlotNumber PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + + + + +-- ************************************************************** +-- +-- Positioning Activation Failure +-- +-- ************************************************************** + +PositioningActivationFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { PositioningActivationFailureIEs} }, + ... +} + +PositioningActivationFailureIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + + +-- ************************************************************** +-- +-- POSITIONING DEACTIVATION PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Positioning Deactivation +-- +-- ************************************************************** + +PositioningDeactivation ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { PositioningDeactivationIEs} }, + ... +} + +PositioningDeactivationIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-AbortTransmission CRITICALITY ignore TYPE AbortTransmission PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- POSITIONING INFORMATION UPDATE PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Positioning Information Update +-- +-- ************************************************************** + +PositioningInformationUpdate ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { PositioningInformationUpdateIEs} }, + ... +} + + +PositioningInformationUpdateIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-SRSConfiguration CRITICALITY ignore TYPE SRSConfiguration PRESENCE optional}| + { ID id-SFNInitialisationTime CRITICALITY ignore TYPE SFNInitialisationTime PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- E-CID MEASUREMENT PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- E-CID Measurement Initiation Request +-- +-- ************************************************************** + +E-CIDMeasurementInitiationRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{E-CIDMeasurementInitiationRequest-IEs}}, + ... +} + +E-CIDMeasurementInitiationRequest-IEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-LMF-UE-MeasurementID CRITICALITY reject TYPE LMF-UE-MeasurementID PRESENCE mandatory }| + { ID id-RAN-UE-MeasurementID CRITICALITY reject TYPE RAN-UE-MeasurementID PRESENCE mandatory }| + { ID id-E-CID-ReportCharacteristics CRITICALITY reject TYPE E-CID-ReportCharacteristics PRESENCE mandatory }| + { ID id-E-CID-MeasurementPeriodicity CRITICALITY reject TYPE E-CID-MeasurementPeriodicity PRESENCE conditional }| +-- The above IE shall be present if the E-CID-ReportCharacteristics IE is set to “periodic” –- + { ID id-E-CID-MeasurementQuantities CRITICALITY reject TYPE E-CID-MeasurementQuantities PRESENCE mandatory}, + ... +} + +-- ************************************************************** +-- +-- E-CID Measurement Initiation Response +-- +-- ************************************************************** + +E-CIDMeasurementInitiationResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{E-CIDMeasurementInitiationResponse-IEs}}, + ... +} + +E-CIDMeasurementInitiationResponse-IEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY ignore TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY ignore TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-LMF-UE-MeasurementID CRITICALITY reject TYPE LMF-UE-MeasurementID PRESENCE mandatory }| + { ID id-RAN-UE-MeasurementID CRITICALITY reject TYPE RAN-UE-MeasurementID PRESENCE mandatory }| + { ID id-E-CID-MeasurementResult CRITICALITY ignore TYPE E-CID-MeasurementResult PRESENCE optional}| + { ID id-Cell-Portion-ID CRITICALITY ignore TYPE Cell-Portion-ID PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- E-CID Measurement Initiation Failure +-- +-- ************************************************************** + +E-CIDMeasurementInitiationFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{E-CIDMeasurementInitiationFailure-IEs}}, + ... +} + + +E-CIDMeasurementInitiationFailure-IEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY ignore TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY ignore TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-LMF-UE-MeasurementID CRITICALITY reject TYPE LMF-UE-MeasurementID PRESENCE mandatory }| + { ID id-RAN-UE-MeasurementID CRITICALITY reject TYPE RAN-UE-MeasurementID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- E-CID MEASUREMENT FAILURE INDICATION PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- E-CID Measurement Failure Indication +-- +-- ************************************************************** + +E-CIDMeasurementFailureIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{E-CIDMeasurementFailureIndication-IEs}}, + ... +} + + +E-CIDMeasurementFailureIndication-IEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY ignore TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY ignore TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-LMF-UE-MeasurementID CRITICALITY reject TYPE LMF-UE-MeasurementID PRESENCE mandatory }| + { ID id-RAN-UE-MeasurementID CRITICALITY reject TYPE RAN-UE-MeasurementID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}, + ... +} + +-- ************************************************************** +-- +-- E-CID MEASUREMENT REPORT PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- E-CID Measurement Report +-- +-- ************************************************************** + +E-CIDMeasurementReport ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{E-CIDMeasurementReport-IEs}}, + ... +} + + +E-CIDMeasurementReport-IEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY ignore TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY ignore TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-LMF-UE-MeasurementID CRITICALITY reject TYPE LMF-UE-MeasurementID PRESENCE mandatory }| + { ID id-RAN-UE-MeasurementID CRITICALITY reject TYPE RAN-UE-MeasurementID PRESENCE mandatory }| + { ID id-E-CID-MeasurementResult CRITICALITY ignore TYPE E-CID-MeasurementResult PRESENCE mandatory }| + { ID id-Cell-Portion-ID CRITICALITY ignore TYPE Cell-Portion-ID PRESENCE optional}, + + ... +} + +-- ************************************************************** +-- +-- E-CID MEASUREMENT TERMINATION PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- E-CID Measurement Termination Command +-- +-- ************************************************************** + + +E-CIDMeasurementTerminationCommand ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{E-CIDMeasurementTerminationCommand-IEs}}, + ... +} + + +E-CIDMeasurementTerminationCommand-IEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY ignore TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY ignore TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-LMF-UE-MeasurementID CRITICALITY reject TYPE LMF-UE-MeasurementID PRESENCE mandatory }| + { ID id-RAN-UE-MeasurementID CRITICALITY reject TYPE RAN-UE-MeasurementID PRESENCE mandatory }, + ... +} + + + +END +-- ASN1STOP + + +-- ASN1START +-- ************************************************************** +-- +-- Information Element Definitions +-- +-- ************************************************************** + +F1AP-IEs { +itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) +ngran-access (22) modules (3) f1ap (3) version1 (1) f1ap-IEs (2) } + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +IMPORTS + id-gNB-CUSystemInformation, + id-HandoverPreparationInformation, + id-TAISliceSupportList, + id-RANAC, + id-BearerTypeChange, + id-Cell-Direction, + id-Cell-Type, + id-CellGroupConfig, + id-AvailablePLMNList, + id-PDUSessionID, + id-ULPDUSessionAggregateMaximumBitRate, + id-DC-Based-Duplication-Configured, + id-DC-Based-Duplication-Activation, + id-Duplication-Activation, + id-DLPDCPSNLength, + id-ULPDCPSNLength, + id-RLC-Status, + id-MeasurementTimingConfiguration, + id-DRB-Information, + id-QoSFlowMappingIndication, + id-ServingCellMO, + id-RLCMode, + id-ExtendedServedPLMNs-List, + id-ExtendedAvailablePLMN-List, + id-DRX-LongCycleStartOffset, + id-SelectedBandCombinationIndex, + id-SelectedFeatureSetEntryIndex, + id-Ph-InfoSCG, + id-latest-RRC-Version-Enhanced, + id-RequestedBandCombinationIndex, + id-RequestedFeatureSetEntryIndex, + id-DRX-Config, + id-UEAssistanceInformation, + id-PDCCH-BlindDetectionSCG, + id-Requested-PDCCH-BlindDetectionSCG, + id-BPLMN-ID-Info-List, + id-NotificationInformation, + id-TNLAssociationTransportLayerAddressgNBDU, + id-portNumber, + id-AdditionalSIBMessageList, + id-IgnorePRACHConfiguration, + id-CG-Config, + id-Ph-InfoMCG, + id-AggressorgNBSetID, + id-VictimgNBSetID, + id-MeasGapSharingConfig, + id-systemInformationAreaID, + id-areaScope, + id-IntendedTDD-DL-ULConfig, + id-QosMonitoringRequest, + id-BHInfo, + id-IAB-Info-IAB-DU, + id-IAB-Info-IAB-donor-CU, + id-IAB-Barred, + id-SIB12-message, + id-SIB13-message, + id-SIB14-message, + id-UEAssistanceInformationEUTRA, + id-SL-PHY-MAC-RLC-Config, + id-SL-ConfigDedicatedEUTRA, + id-AlternativeQoSParaSetList, + id-CurrentQoSParaSetIndex, + id-CarrierList, + id-ULCarrierList, + id-FrequencyShift7p5khz, + id-SSB-PositionsInBurst, + id-NRPRACHConfig, + id-TDD-UL-DLConfigCommonNR, + id-CNPacketDelayBudgetDownlink, + id-CNPacketDelayBudgetUplink, + id-ExtendedPacketDelayBudget, + id-TSCTrafficCharacteristics, + id-AdditionalPDCPDuplicationTNL-List, + id-RLCDuplicationInformation, + id-AdditionalDuplicationIndication, + id-mdtConfiguration, + id-TraceCollectionEntityURI, + id-NID, + id-NPNSupportInfo, + id-NPNBroadcastInformation, + id-AvailableSNPN-ID-List, + id-SIB10-message, + id-RequestedP-MaxFR2, + id-DLCarrierList, + id-ExtendedTAISliceSupportList, + id-E-CID-MeasurementQuantities-Item, + id-ConfiguredTACIndication, + maxNRARFCN, + maxnoofErrors, + maxnoofBPLMNs, + maxnoofBPLMNsNR, + maxnoofDLUPTNLInformation, + maxnoofNrCellBands, + maxnoofULUPTNLInformation, + maxnoofQoSFlows, + maxnoofSliceItems, + maxnoofSIBTypes, + maxnoofSITypes, + maxCellineNB, + maxnoofExtendedBPLMNs, + maxnoofAdditionalSIBs, + maxnoofUACPLMNs, + maxnoofUACperPLMN, + maxCellingNBDU, + maxnoofTLAs, + maxnoofGTPTLAs, + maxnoofslots, + maxnoofNonUPTrafficMappings, + maxnoofServingCells, + maxnoofServedCellsIAB, + maxnoofChildIABNodes, + maxnoofIABSTCInfo, + maxnoofSymbols, + maxnoofDUFSlots, + maxnoofHSNASlots, + maxnoofEgressLinks, + maxnoofMappingEntries, + maxnoofDSInfo, + maxnoofQoSParaSets, + maxnoofPC5QoSFlows, + maxnoofSSBAreas, + maxnoofBPLMNsNR, + maxnoofNRSCSs, + maxnoofPhysicalResourceBlocks, + maxnoofPhysicalResourceBlocks-1, + maxnoofPRACHconfigs, + maxnoofRACHReports, + maxnoofRLFReports, + maxnoofAdditionalPDCPDuplicationTNL, + maxnoofRLCDuplicationState, + maxnoofCHOcells, + maxnoofMDTPLMNs, + maxnoofCAGsupported, + maxnoofNIDsupported, + maxnoofNRSCSs, + maxnoofPhysicalResourceBlocks, + maxnoofExtSliceItems, + maxnoofPosMeas, + maxnoofTRPInfoTypes, + maxnoofSRSTriggerStates, + maxnoofSpatialRelations, + maxnoBcastCell, + maxnoofTRPs, + maxnoofAngleInfo, + maxnooflcs-gcs-translation, + maxnoofPath, + maxnoofMeasE-CID, + maxnoofSSBs, + maxnoSRS-ResourceSets, + maxnoSRS-ResourcePerSet, + maxnoSRS-Carriers, + maxnoSCSs, + maxnoSRS-Resources, + maxnoSRS-PosResources, + maxnoSRS-PosResourceSets, + maxnoSRS-PosResourcePerSet, + maxnoofPRS-ResourceSets, + maxnoofPRS-ResourcesPerSet, + maxNoOfMeasTRPs, + maxnoofPRSresourceSets, + maxnoofPRSresources + + + +FROM F1AP-Constants + + Criticality, + ProcedureCode, + ProtocolIE-ID, + TriggeringMessage + +FROM F1AP-CommonDataTypes + + ProtocolExtensionContainer{}, + F1AP-PROTOCOL-EXTENSION, + ProtocolIE-SingleContainer{}, + F1AP-PROTOCOL-IES + +FROM F1AP-Containers; + +-- A + +AbortTransmission ::= CHOICE { + sRSResourceSetID SRSResourceSetID, + releaseALL NULL, + choice-extension ProtocolIE-SingleContainer { { AbortTransmission-ExtIEs } } +} + +AbortTransmission-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +AccessPointPosition ::= SEQUENCE { + latitudeSign ENUMERATED {north, south}, + latitude INTEGER (0..8388607), + longitude INTEGER (-8388608..8388607), + directionOfAltitude ENUMERATED {height, depth}, + altitude INTEGER (0..32767), + uncertaintySemi-major INTEGER (0..127), + uncertaintySemi-minor INTEGER (0..127), + orientationOfMajorAxis INTEGER (0..179), + uncertaintyAltitude INTEGER (0..127), + confidence INTEGER (0..100), + iE-Extensions ProtocolExtensionContainer { { AccessPointPosition-ExtIEs} } OPTIONAL +} + +AccessPointPosition-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Activated-Cells-to-be-Updated-List ::= SEQUENCE (SIZE(1..maxnoofServedCellsIAB)) OF Activated-Cells-to-be-Updated-List-Item + +Activated-Cells-to-be-Updated-List-Item ::= SEQUENCE{ + nRCGI NRCGI, + iAB-DU-Cell-Resource-Configuration-Mode-Info IAB-DU-Cell-Resource-Configuration-Mode-Info, + iE-Extensions ProtocolExtensionContainer { { Activated-Cells-to-be-Updated-List-Item-ExtIEs} } OPTIONAL +} + +Activated-Cells-to-be-Updated-List-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ActiveULBWP ::= SEQUENCE { + locationAndBandwidth INTEGER (0..37949,...), + subcarrierSpacing ENUMERATED {kHz15, kHz30, kHz60, kHz120,...}, + cyclicPrefix ENUMERATED {normal, extended}, + txDirectCurrentLocation INTEGER (0..3301,...), + shift7dot5kHz ENUMERATED {true, ...} OPTIONAL, + sRSConfig SRSConfig, + iE-Extensions ProtocolExtensionContainer { { ActiveULBWP-ExtIEs} } OPTIONAL +} + +ActiveULBWP-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +AdditionalDuplicationIndication ::= ENUMERATED { + three, + four, + ... +} + + +AdditionalPath-List::= SEQUENCE (SIZE(1..maxnoofPath)) OF AdditionalPath-Item + +AdditionalPath-Item ::=SEQUENCE { + relativePathDelay RelativePathDelay, + pathQuality TRPMeasurementQuality OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { AdditionalPath-Item-ExtIEs } } OPTIONAL +} + +AdditionalPath-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +AdditionalPDCPDuplicationTNL-List ::= SEQUENCE (SIZE(1..maxnoofAdditionalPDCPDuplicationTNL)) OF AdditionalPDCPDuplicationTNL-Item + +AdditionalPDCPDuplicationTNL-Item ::=SEQUENCE { + additionalPDCPDuplicationUPTNLInformation UPTransportLayerInformation, + iE-Extensions ProtocolExtensionContainer { { AdditionalPDCPDuplicationTNL-ItemExtIEs } } OPTIONAL, + ... +} + +AdditionalPDCPDuplicationTNL-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +AdditionalSIBMessageList ::= SEQUENCE (SIZE(1..maxnoofAdditionalSIBs)) OF AdditionalSIBMessageList-Item + +AdditionalSIBMessageList-Item ::= SEQUENCE { + additionalSIB OCTET STRING, + iE-Extensions ProtocolExtensionContainer { { AdditionalSIBMessageList-Item-ExtIEs} } OPTIONAL +} + +AdditionalSIBMessageList-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +AdditionalRRMPriorityIndex ::= BIT STRING (SIZE(32)) + +AggressorCellList ::= SEQUENCE (SIZE(1..maxCellingNBDU)) OF AggressorCellList-Item + +AggressorCellList-Item ::= SEQUENCE { + aggressorCell-ID NRCGI, + iE-Extensions ProtocolExtensionContainer { { AggressorCellList-Item-ExtIEs } } OPTIONAL +} + +AggressorCellList-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +AggressorgNBSetID ::= SEQUENCE { + aggressorgNBSetID GNBSetID, + iE-Extensions ProtocolExtensionContainer { { AggressorgNBSetID-ExtIEs } } OPTIONAL +} + +AggressorgNBSetID-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +AllocationAndRetentionPriority ::= SEQUENCE { + priorityLevel PriorityLevel, + pre-emptionCapability Pre-emptionCapability, + pre-emptionVulnerability Pre-emptionVulnerability, + iE-Extensions ProtocolExtensionContainer { {AllocationAndRetentionPriority-ExtIEs} } OPTIONAL, + ... +} + +AllocationAndRetentionPriority-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +AlternativeQoSParaSetList ::= SEQUENCE (SIZE(1..maxnoofQoSParaSets)) OF AlternativeQoSParaSetItem + +AlternativeQoSParaSetItem ::= SEQUENCE { + alternativeQoSParaSetIndex QoSParaSetIndex, + guaranteedFlowBitRateDL BitRate OPTIONAL, + guaranteedFlowBitRateUL BitRate OPTIONAL, + packetDelayBudget PacketDelayBudget OPTIONAL, + packetErrorRate PacketErrorRate OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {AlternativeQoSParaSetItem-ExtIEs} } OPTIONAL, + ... +} + +AlternativeQoSParaSetItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +AngleMeasurementQuality ::= SEQUENCE { + azimuthQuality INTEGER(0..255), + zenithQuality INTEGER(0..255) OPTIONAL, + resolution ENUMERATED{deg0dot1,...}, + iE-Extensions ProtocolExtensionContainer { { AngleMeasurementQuality-ExtIEs } } OPTIONAL +} + +AngleMeasurementQuality-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +AperiodicSRSResourceTriggerList ::= SEQUENCE (SIZE(1..maxnoofSRSTriggerStates)) OF AperiodicSRSResourceTrigger + +AperiodicSRSResourceTrigger ::= INTEGER (0..3, ...) + +Associated-SCell-Item ::= SEQUENCE { + sCell-ID NRCGI, + iE-Extensions ProtocolExtensionContainer { { Associated-SCell-ItemExtIEs } } OPTIONAL +} + +Associated-SCell-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +AvailablePLMNList ::= SEQUENCE (SIZE(1..maxnoofBPLMNs)) OF AvailablePLMNList-Item + +AvailablePLMNList-Item ::= SEQUENCE { + pLMNIdentity PLMN-Identity, + iE-Extensions ProtocolExtensionContainer { { AvailablePLMNList-Item-ExtIEs} } OPTIONAL +} + +AvailablePLMNList-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +AvailableSNPN-ID-List ::= SEQUENCE (SIZE(1..maxnoofNIDsupported)) OF AvailableSNPN-ID-List-Item + +AvailableSNPN-ID-List-Item ::= SEQUENCE { + pLMN-Identity PLMN-Identity, + availableNIDList BroadcastNIDList, + iE-Extensions ProtocolExtensionContainer { { AvailableSNPN-ID-List-ItemExtIEs} } OPTIONAL, + ... +} + +AvailableSNPN-ID-List-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +AveragingWindow ::= INTEGER (0..4095, ...) + +AreaScope ::= ENUMERATED {true, ...} + +-- B + +BandwidthSRS ::= CHOICE { + fR1 FR1-Bandwidth, + fR2 FR2-Bandwidth, + choice-extension ProtocolIE-SingleContainer {{ BandwidthSRS-ExtIEs }} +} + +BandwidthSRS-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + + +BAPAddress ::= BIT STRING (SIZE(10)) + +BAPCtrlPDUChannel ::= ENUMERATED {true, ...} + +BAPlayerBHRLCchannelMappingInfo ::= SEQUENCE { + bAPlayerBHRLCchannelMappingInfoToAdd BAPlayerBHRLCchannelMappingInfoList OPTIONAL, + bAPlayerBHRLCchannelMappingInfoToRemove MappingInformationtoRemove OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { BAPlayerBHRLCchannelMappingInfo-ExtIEs} } OPTIONAL, + ... +} + +BAPlayerBHRLCchannelMappingInfo-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +BAPlayerBHRLCchannelMappingInfoList ::= SEQUENCE (SIZE(1..maxnoofMappingEntries)) OF BAPlayerBHRLCchannelMappingInfo-Item + +BAPlayerBHRLCchannelMappingInfo-Item ::= SEQUENCE { + mappingInformationIndex MappingInformationIndex, + priorHopBAPAddress BAPAddress OPTIONAL, + ingressbHRLCChannelID BHRLCChannelID OPTIONAL, + nextHopBAPAddress BAPAddress OPTIONAL, + egressbHRLCChannelID BHRLCChannelID OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { BAPlayerBHRLCchannelMappingInfo-ItemExtIEs} } OPTIONAL, + ... +} + +BAPlayerBHRLCchannelMappingInfo-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +BAPPathID ::= BIT STRING (SIZE(10)) + +BAPRoutingID ::= SEQUENCE { + bAPAddress BAPAddress, + bAPPathID BAPPathID, + iE-Extensions ProtocolExtensionContainer { { BAPRoutingIDExtIEs } } OPTIONAL +} + +BAPRoutingIDExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +BitRate ::= INTEGER (0..4000000000000,...) + +BearerTypeChange ::= ENUMERATED {true, ...} + +BHRLCChannelID ::= BIT STRING (SIZE(16)) + +BHChannels-FailedToBeModified-Item ::= SEQUENCE { + bHRLCChannelID BHRLCChannelID, + cause Cause OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { BHChannels-FailedToBeModified-ItemExtIEs } } OPTIONAL +} + +BHChannels-FailedToBeModified-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +BHChannels-FailedToBeSetup-Item ::= SEQUENCE { + bHRLCChannelID BHRLCChannelID, + cause Cause OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { BHChannels-FailedToBeSetup-ItemExtIEs } } OPTIONAL +} + +BHChannels-FailedToBeSetup-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +BHChannels-FailedToBeSetupMod-Item ::= SEQUENCE { + bHRLCChannelID BHRLCChannelID, + cause Cause OPTIONAL , + iE-Extensions ProtocolExtensionContainer { { BHChannels-FailedToBeSetupMod-ItemExtIEs } } OPTIONAL +} + +BHChannels-FailedToBeSetupMod-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +BHChannels-Modified-Item ::= SEQUENCE { + bHRLCChannelID BHRLCChannelID, + iE-Extensions ProtocolExtensionContainer { { BHChannels-Modified-ItemExtIEs } } OPTIONAL +} + +BHChannels-Modified-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +BHChannels-Required-ToBeReleased-Item ::= SEQUENCE { + bHRLCChannelID BHRLCChannelID, + iE-Extensions ProtocolExtensionContainer { { BHChannels-Required-ToBeReleased-ItemExtIEs } } OPTIONAL +} + +BHChannels-Required-ToBeReleased-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +BHChannels-Setup-Item ::= SEQUENCE { + bHRLCChannelID BHRLCChannelID, + iE-Extensions ProtocolExtensionContainer { { BHChannels-Setup-ItemExtIEs } } OPTIONAL +} + +BHChannels-Setup-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +BHChannels-SetupMod-Item ::= SEQUENCE { + bHRLCChannelID BHRLCChannelID, + iE-Extensions ProtocolExtensionContainer { { BHChannels-SetupMod-ItemExtIEs } } OPTIONAL +} + +BHChannels-SetupMod-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +BHChannels-ToBeModified-Item ::= SEQUENCE { + bHRLCChannelID BHRLCChannelID, + bHQoSInformation BHQoSInformation, + rLCmode RLCMode OPTIONAL, + bAPCtrlPDUChannel BAPCtrlPDUChannel OPTIONAL, + trafficMappingInfo TrafficMappingInfo OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { BHChannels-ToBeModified-ItemExtIEs } } OPTIONAL +} + +BHChannels-ToBeModified-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +BHChannels-ToBeReleased-Item ::= SEQUENCE { + bHRLCChannelID BHRLCChannelID, + iE-Extensions ProtocolExtensionContainer { { BHChannels-ToBeReleased-ItemExtIEs } } OPTIONAL +} + +BHChannels-ToBeReleased-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +BHChannels-ToBeSetup-Item ::= SEQUENCE { + bHRLCChannelID BHRLCChannelID, + bHQoSInformation BHQoSInformation, + rLCmode RLCMode, + bAPCtrlPDUChannel BAPCtrlPDUChannel OPTIONAL, + trafficMappingInfo TrafficMappingInfo OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { BHChannels-ToBeSetup-ItemExtIEs } } OPTIONAL +} + +BHChannels-ToBeSetup-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +BHChannels-ToBeSetupMod-Item ::= SEQUENCE { + bHRLCChannelID BHRLCChannelID, + bHQoSInformation BHQoSInformation, + rLCmode RLCMode, + bAPCtrlPDUChannel BAPCtrlPDUChannel OPTIONAL, + trafficMappingInfo TrafficMappingInfo OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { BHChannels-ToBeSetupMod-ItemExtIEs } } OPTIONAL +} + +BHChannels-ToBeSetupMod-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +BHInfo ::= SEQUENCE { + bAProutingID BAPRoutingID OPTIONAL, + egressBHRLCCHList EgressBHRLCCHList OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { BHInfo-ExtIEs} } OPTIONAL +} + +BHInfo-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +BHQoSInformation ::= CHOICE { + bHRLCCHQoS QoSFlowLevelQoSParameters, + eUTRANBHRLCCHQoS EUTRANQoS, + cPTrafficType CPTrafficType, + choice-extension ProtocolIE-SingleContainer { { BHQoSInformation-ExtIEs} } +} + +BHQoSInformation-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +BH-Routing-Information-Added-List-Item ::= SEQUENCE { + bAPRoutingID BAPRoutingID, + nextHopBAPAddress BAPAddress, + iE-Extensions ProtocolExtensionContainer { { BH-Routing-Information-Added-List-ItemExtIEs} } OPTIONAL +} + +BH-Routing-Information-Added-List-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +BH-Routing-Information-Removed-List-Item ::= SEQUENCE { + bAPRoutingID BAPRoutingID, + iE-Extensions ProtocolExtensionContainer { { BH-Routing-Information-Removed-List-ItemExtIEs} } OPTIONAL +} + +BH-Routing-Information-Removed-List-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +BPLMN-ID-Info-List ::= SEQUENCE (SIZE(1..maxnoofBPLMNsNR)) OF BPLMN-ID-Info-Item + +BPLMN-ID-Info-Item ::= SEQUENCE { + pLMN-Identity-List AvailablePLMNList, + extended-PLMN-Identity-List ExtendedAvailablePLMN-List OPTIONAL, + fiveGS-TAC FiveGS-TAC OPTIONAL, + nr-cell-ID NRCellIdentity, + ranac RANAC OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { BPLMN-ID-Info-ItemExtIEs} } OPTIONAL, + ... +} + +BPLMN-ID-Info-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-ConfiguredTACIndication CRITICALITY ignore EXTENSION ConfiguredTACIndication PRESENCE optional }| + { ID id-NPNBroadcastInformation CRITICALITY reject EXTENSION NPNBroadcastInformation PRESENCE optional}, + ... +} + +ServedPLMNs-List ::= SEQUENCE (SIZE(1..maxnoofBPLMNs)) OF ServedPLMNs-Item + +ServedPLMNs-Item ::= SEQUENCE { + pLMN-Identity PLMN-Identity, + iE-Extensions ProtocolExtensionContainer { { ServedPLMNs-ItemExtIEs} } OPTIONAL, + ... +} + +ServedPLMNs-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { +{ ID id-TAISliceSupportList CRITICALITY ignore EXTENSION SliceSupportList PRESENCE optional }| +{ ID id-NPNSupportInfo CRITICALITY reject EXTENSION NPNSupportInfo PRESENCE optional }| +{ ID id-ExtendedTAISliceSupportList CRITICALITY reject EXTENSION ExtendedSliceSupportList PRESENCE optional }, + ... +} + +BroadcastCAGList ::= SEQUENCE (SIZE(1..maxnoofCAGsupported)) OF CAGID + +BroadcastNIDList ::= SEQUENCE (SIZE(1..maxnoofNIDsupported)) OF NID + +BroadcastSNPN-ID-List ::= SEQUENCE (SIZE(1..maxnoofNIDsupported)) OF BroadcastSNPN-ID-List-Item + +BroadcastSNPN-ID-List-Item ::= SEQUENCE { + pLMN-Identity PLMN-Identity, + broadcastNIDList BroadcastNIDList, + iE-Extensions ProtocolExtensionContainer { { BroadcastSNPN-ID-List-ItemExtIEs} } OPTIONAL, + ... +} + +BroadcastSNPN-ID-List-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +BroadcastPNI-NPN-ID-List ::= SEQUENCE (SIZE(1..maxnoofCAGsupported)) OF BroadcastPNI-NPN-ID-List-Item + +BroadcastPNI-NPN-ID-List-Item ::= SEQUENCE { + pLMN-Identity PLMN-Identity, + broadcastCAGList BroadcastCAGList, + iE-Extensions ProtocolExtensionContainer { { BroadcastPNI-NPN-ID-List-ItemExtIEs} } OPTIONAL, + ... +} + +BroadcastPNI-NPN-ID-List-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} +BurstArrivalTime ::= OCTET STRING + +-- C +CAGID ::= BIT STRING (SIZE(32)) + +Cancel-all-Warning-Messages-Indicator ::= ENUMERATED {true, ...} + +Candidate-SpCell-Item ::= SEQUENCE { + candidate-SpCell-ID NRCGI , + iE-Extensions ProtocolExtensionContainer { { Candidate-SpCell-ItemExtIEs } } OPTIONAL, + ... +} + +Candidate-SpCell-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +CapacityValue::= SEQUENCE { + capacityValue INTEGER (0..100), + sSBAreaCapacityValueList SSBAreaCapacityValueList OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { CapacityValue-ExtIEs} } OPTIONAL +} + +CapacityValue-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Cause ::= CHOICE { + radioNetwork CauseRadioNetwork, + transport CauseTransport, + protocol CauseProtocol, + misc CauseMisc, + choice-extension ProtocolIE-SingleContainer { { Cause-ExtIEs} } +} + +Cause-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +CauseMisc ::= ENUMERATED { + control-processing-overload, + not-enough-user-plane-processing-resources, + hardware-failure, + om-intervention, + unspecified, + ... +} + +CauseProtocol ::= ENUMERATED { + transfer-syntax-error, + abstract-syntax-error-reject, + abstract-syntax-error-ignore-and-notify, + message-not-compatible-with-receiver-state, + semantic-error, + abstract-syntax-error-falsely-constructed-message, + unspecified, + ... +} + +CauseRadioNetwork ::= ENUMERATED { + unspecified, + rl-failure-rlc, + unknown-or-already-allocated-gnb-cu-ue-f1ap-id, + unknown-or-already-allocated-gnb-du-ue-f1ap-id, + unknown-or-inconsistent-pair-of-ue-f1ap-id, + interaction-with-other-procedure, + not-supported-qci-Value, + action-desirable-for-radio-reasons, + no-radio-resources-available, + procedure-cancelled, + normal-release, + ..., + cell-not-available, + rl-failure-others, + ue-rejection, + resources-not-available-for-the-slice, + amf-initiated-abnormal-release, + release-due-to-pre-emption, + plmn-not-served-by-the-gNB-CU, + multiple-drb-id-instances, + unknown-drb-id, + multiple-bh-rlc-ch-id-instances, + unknown-bh-rlc-ch-id, + cho-cpc-resources-tobechanged, + nPN-not-supported, + nPN-access-denied, + gNB-CU-Cell-Capacity-Exceeded, + report-characteristics-empty, + existing-measurement-ID, + measurement-temporarily-not-available, + measurement-not-supported-for-the-object + +} + +CauseTransport ::= ENUMERATED { + unspecified, + transport-resource-unavailable, + ..., + unknown-TNL-address-for-IAB, + unknown-UP-TNL-information-for-IAB +} + +CellGroupConfig ::= OCTET STRING + +CellCapacityClassValue ::= INTEGER (1..100,...) + +Cell-Direction ::= ENUMERATED {dl-only, ul-only} + +CellMeasurementResultList ::= SEQUENCE (SIZE(1.. maxCellingNBDU)) OF CellMeasurementResultItem + +CellMeasurementResultItem ::= SEQUENCE { + cellID NRCGI, + radioResourceStatus RadioResourceStatus OPTIONAL, + compositeAvailableCapacityGroup CompositeAvailableCapacityGroup OPTIONAL, + sliceAvailableCapacity SliceAvailableCapacity OPTIONAL, + numberofActiveUEs NumberofActiveUEs OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { CellMeasurementResultItem-ExtIEs} } OPTIONAL +} + +CellMeasurementResultItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Cell-Portion-ID ::= INTEGER (0..4095,...) + +Cells-Failed-to-be-Activated-List-Item ::= SEQUENCE { + nRCGI NRCGI, + cause Cause, + iE-Extensions ProtocolExtensionContainer { { Cells-Failed-to-be-Activated-List-ItemExtIEs } } OPTIONAL, + ... +} + +Cells-Failed-to-be-Activated-List-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Cells-Status-Item ::= SEQUENCE { + nRCGI NRCGI, + service-status Service-Status, + iE-Extensions ProtocolExtensionContainer { { Cells-Status-ItemExtIEs } } OPTIONAL, + ... +} + +Cells-Status-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Cells-To-Be-Broadcast-Item ::= SEQUENCE { + nRCGI NRCGI, + iE-Extensions ProtocolExtensionContainer { { Cells-To-Be-Broadcast-ItemExtIEs } } OPTIONAL, + ... +} + +Cells-To-Be-Broadcast-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Cells-Broadcast-Completed-Item ::= SEQUENCE { + nRCGI NRCGI, + iE-Extensions ProtocolExtensionContainer { { Cells-Broadcast-Completed-ItemExtIEs } } OPTIONAL, + ... +} + +Cells-Broadcast-Completed-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Broadcast-To-Be-Cancelled-Item ::= SEQUENCE { + nRCGI NRCGI, + iE-Extensions ProtocolExtensionContainer { { Broadcast-To-Be-Cancelled-ItemExtIEs } } OPTIONAL, + ... +} + +Broadcast-To-Be-Cancelled-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +Cells-Broadcast-Cancelled-Item ::= SEQUENCE { + nRCGI NRCGI, + numberOfBroadcasts NumberOfBroadcasts, + iE-Extensions ProtocolExtensionContainer { { Cells-Broadcast-Cancelled-ItemExtIEs } } OPTIONAL, + ... +} + +Cells-Broadcast-Cancelled-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Cells-to-be-Activated-List-Item ::= SEQUENCE { + nRCGI NRCGI, + nRPCI NRPCI OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { Cells-to-be-Activated-List-ItemExtIEs} } OPTIONAL, + ... +} + +Cells-to-be-Activated-List-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-gNB-CUSystemInformation CRITICALITY reject EXTENSION GNB-CUSystemInformation PRESENCE optional }| + { ID id-AvailablePLMNList CRITICALITY ignore EXTENSION AvailablePLMNList PRESENCE optional }| + { ID id-ExtendedAvailablePLMN-List CRITICALITY ignore EXTENSION ExtendedAvailablePLMN-List PRESENCE optional }| + { ID id-IAB-Info-IAB-donor-CU CRITICALITY ignore EXTENSION IAB-Info-IAB-donor-CU PRESENCE optional}| + { ID id-AvailableSNPN-ID-List CRITICALITY ignore EXTENSION AvailableSNPN-ID-List PRESENCE optional }, + ... +} + +Cells-to-be-Deactivated-List-Item ::= SEQUENCE { + nRCGI NRCGI , + iE-Extensions ProtocolExtensionContainer { { Cells-to-be-Deactivated-List-ItemExtIEs } } OPTIONAL, + ... +} + +Cells-to-be-Deactivated-List-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Cells-to-be-Barred-Item::= SEQUENCE { + nRCGI NRCGI , + cellBarred CellBarred, + iE-Extensions ProtocolExtensionContainer { { Cells-to-be-Barred-Item-ExtIEs } } OPTIONAL +} + +Cells-to-be-Barred-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-IAB-Barred CRITICALITY ignore EXTENSION IAB-Barred PRESENCE optional }, + + ... +} + + +CellBarred ::= ENUMERATED {barred, not-barred, ...} + +CellSize ::= ENUMERATED {verysmall, small, medium, large, ...} + +CellToReportList ::= SEQUENCE (SIZE(1.. maxCellingNBDU)) OF CellToReportItem + +CellToReportItem ::= SEQUENCE { + cellID NRCGI, + sSBToReportList SSBToReportList OPTIONAL, + sliceToReportList SliceToReportList OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { CellToReportItem-ExtIEs} } OPTIONAL +} + +CellToReportItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +CellType ::= SEQUENCE { + cellSize CellSize, + iE-Extensions ProtocolExtensionContainer { {CellType-ExtIEs} } OPTIONAL, + ... +} + +CellType-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +CellULConfigured ::= ENUMERATED {none, ul, sul, ul-and-sul, ...} + +Child-Node-Cells-List ::= SEQUENCE (SIZE(1..maxnoofChildIABNodes)) OF Child-Node-Cells-List-Item + +Child-Node-Cells-List-Item ::= SEQUENCE{ + nRCGI NRCGI, + iAB-DU-Cell-Resource-Configuration-Mode-Info IAB-DU-Cell-Resource-Configuration-Mode-Info OPTIONAL, + iAB-STC-Info IAB-STC-Info OPTIONAL, + rACH-Config-Common RACH-Config-Common OPTIONAL, + rACH-Config-Common-IAB RACH-Config-Common-IAB OPTIONAL, + cSI-RS-Configuration OCTET STRING OPTIONAL, + sR-Configuration OCTET STRING OPTIONAL, + pDCCH-ConfigSIB1 OCTET STRING OPTIONAL, + sCS-Common OCTET STRING OPTIONAL, + multiplexingInfo MultiplexingInfo OPTIONAL, + iE-Extensions ProtocolExtensionContainer {{Child-Node-Cells-List-Item-ExtIEs}} OPTIONAL +} + +Child-Node-Cells-List-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Child-Nodes-List ::= SEQUENCE (SIZE(1..maxnoofChildIABNodes)) OF Child-Nodes-List-Item + +Child-Nodes-List-Item ::= SEQUENCE{ + gNB-CU-UE-F1AP-ID GNB-CU-UE-F1AP-ID, + gNB-DU-UE-F1AP-ID GNB-DU-UE-F1AP-ID, + child-Node-Cells-List Child-Node-Cells-List OPTIONAL, + iE-Extensions ProtocolExtensionContainer {{Child-Nodes-List-Item-ExtIEs}} OPTIONAL +} + +Child-Nodes-List-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +CHOtrigger-InterDU ::= ENUMERATED { + cho-initiation, + cho-replace, + ... +} + +CHOtrigger-IntraDU ::= ENUMERATED { + cho-initiation, + cho-replace, + cho-cancel, + ... +} + +CNUEPagingIdentity ::= CHOICE { + fiveG-S-TMSI BIT STRING (SIZE(48)), + choice-extension ProtocolIE-SingleContainer { { CNUEPagingIdentity-ExtIEs } } +} + +CNUEPagingIdentity-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +CompositeAvailableCapacityGroup ::= SEQUENCE { + compositeAvailableCapacityDownlink CompositeAvailableCapacity, + compositeAvailableCapacityUplink CompositeAvailableCapacity, + iE-Extensions ProtocolExtensionContainer { { CompositeAvailableCapacityGroup-ExtIEs} } OPTIONAL +} + +CompositeAvailableCapacityGroup-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +CompositeAvailableCapacity ::= SEQUENCE { + cellCapacityClassValue CellCapacityClassValue OPTIONAL, + capacityValue CapacityValue, + iE-Extensions ProtocolExtensionContainer { { CompositeAvailableCapacity-ExtIEs} } OPTIONAL +} + +CompositeAvailableCapacity-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ConditionalInterDUMobilityInformation ::= SEQUENCE { + cho-trigger CHOtrigger-InterDU, + targetgNB-DUUEF1APID GNB-DU-UE-F1AP-ID OPTIONAL + -- This IE shall be present if the cho-trigger IE is present and set to "cho-replace" --, + iE-Extensions ProtocolExtensionContainer { { ConditionalInterDUMobilityInformation-ExtIEs} } OPTIONAL, + ... +} + +ConditionalInterDUMobilityInformation-ExtIEs F1AP-PROTOCOL-EXTENSION ::={ + ... +} + +ConditionalIntraDUMobilityInformation ::= SEQUENCE { + cho-trigger CHOtrigger-IntraDU, + targetCellsTocancel TargetCellList OPTIONAL, + -- This IE may be present if the cho-trigger IE is present and set to "cho-cancel" + iE-Extensions ProtocolExtensionContainer { { ConditionalIntraDUMobilityInformation-ExtIEs} } OPTIONAL, + ... +} + +ConditionalIntraDUMobilityInformation-ExtIEs F1AP-PROTOCOL-EXTENSION ::={ + ... +} + +ConfiguredTACIndication ::= ENUMERATED { + true, + ... +} + + +CoordinateID ::= INTEGER (0..511, ...) + +CP-TransportLayerAddress ::= CHOICE { + endpoint-IP-address TransportLayerAddress, + endpoint-IP-address-and-port Endpoint-IP-address-and-port, + choice-extension ProtocolIE-SingleContainer { { CP-TransportLayerAddress-ExtIEs } } +} + +CP-TransportLayerAddress-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +CPTrafficType ::= INTEGER (1..3,...) + +CriticalityDiagnostics ::= SEQUENCE { + procedureCode ProcedureCode OPTIONAL, + triggeringMessage TriggeringMessage OPTIONAL, + procedureCriticality Criticality OPTIONAL, + transactionID TransactionID OPTIONAL, + iEsCriticalityDiagnostics CriticalityDiagnostics-IE-List OPTIONAL, + iE-Extensions ProtocolExtensionContainer {{CriticalityDiagnostics-ExtIEs}} OPTIONAL, + ... +} + +CriticalityDiagnostics-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +CriticalityDiagnostics-IE-List ::= SEQUENCE (SIZE (1.. maxnoofErrors)) OF CriticalityDiagnostics-IE-Item + +CriticalityDiagnostics-IE-Item ::= SEQUENCE { + iECriticality Criticality, + iE-ID ProtocolIE-ID, + typeOfError TypeOfError, + iE-Extensions ProtocolExtensionContainer {{CriticalityDiagnostics-IE-Item-ExtIEs}} OPTIONAL, + ... +} + +CriticalityDiagnostics-IE-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +C-RNTI ::= INTEGER (0..65535, ...) + +CUDURadioInformationType ::= CHOICE { + rIM CUDURIMInformation, + choice-extension ProtocolIE-SingleContainer { { CUDURadioInformationType-ExtIEs} } +} + +CUDURadioInformationType-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +CUDURIMInformation ::= SEQUENCE { + victimgNBSetID GNBSetID, + rIMRSDetectionStatus RIMRSDetectionStatus, + iE-Extensions ProtocolExtensionContainer { { CUDURIMInformation-ExtIEs} } OPTIONAL +} + +CUDURIMInformation-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +CUtoDURRCInformation ::= SEQUENCE { + cG-ConfigInfo CG-ConfigInfo OPTIONAL, + uE-CapabilityRAT-ContainerList UE-CapabilityRAT-ContainerList OPTIONAL, + measConfig MeasConfig OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { CUtoDURRCInformation-ExtIEs} } OPTIONAL, + ... +} + +CUtoDURRCInformation-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-HandoverPreparationInformation CRITICALITY ignore EXTENSION HandoverPreparationInformation PRESENCE optional }| + { ID id-CellGroupConfig CRITICALITY ignore EXTENSION CellGroupConfig PRESENCE optional }| + { ID id-MeasurementTimingConfiguration CRITICALITY ignore EXTENSION MeasurementTimingConfiguration PRESENCE optional }| + { ID id-UEAssistanceInformation CRITICALITY ignore EXTENSION UEAssistanceInformation PRESENCE optional }| + { ID id-CG-Config CRITICALITY ignore EXTENSION CG-Config PRESENCE optional }| + { ID id-UEAssistanceInformationEUTRA CRITICALITY ignore EXTENSION UEAssistanceInformationEUTRA PRESENCE optional }, + ... +} + +-- D + +DCBasedDuplicationConfigured::= ENUMERATED{true,..., false} + +Dedicated-SIDelivery-NeededUE-Item ::= SEQUENCE { + gNB-CU-UE-F1AP-ID GNB-CU-UE-F1AP-ID, + nRCGI NRCGI, + iE-Extensions ProtocolExtensionContainer { { DedicatedSIDeliveryNeededUE-Item-ExtIEs} } OPTIONAL, + ... +} + +DedicatedSIDeliveryNeededUE-Item-ExtIEs F1AP-PROTOCOL-EXTENSION::={ + ... +} + + +DL-PRS ::= SEQUENCE { + prsid INTEGER (0..255), + dl-PRSResourceSetID PRS-Resource-Set-ID, + dl-PRSResourceID PRS-Resource-ID OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {DL-PRS-ExtIEs} } OPTIONAL +} + +DL-PRS-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +DL-PRSMutingPattern ::= CHOICE { + two BIT STRING (SIZE(2)), + four BIT STRING (SIZE(4)), + six BIT STRING (SIZE(6)), + eight BIT STRING (SIZE(8)), + sixteen BIT STRING (SIZE(16)), + thirty-two BIT STRING (SIZE(32)), + choice-extension ProtocolIE-SingleContainer { { DL-PRSMutingPattern-ExtIEs } } +} + +DL-PRSMutingPattern-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +DLPRSResourceCoordinates ::= SEQUENCE { + listofDL-PRSResourceSetARP SEQUENCE (SIZE(1.. maxnoofPRS-ResourceSets)) OF DLPRSResourceSetARP, + iE-Extensions ProtocolExtensionContainer { { DLPRSResourceCoordinates-ExtIEs } } OPTIONAL +} + +DLPRSResourceCoordinates-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +DLPRSResourceSetARP ::= SEQUENCE { + dl-PRSResourceSetID INTEGER (0..7), + dL-PRSResourceSetARPLocation DL-PRSResourceSetARPLocation, + listofDL-PRSResourceARP SEQUENCE (SIZE(1.. maxnoofPRS-ResourcesPerSet)) OF DLPRSResourceARP, + iE-Extensions ProtocolExtensionContainer { { DLPRSResourceSetARP-ExtIEs } } OPTIONAL +} + +DLPRSResourceSetARP-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +DL-PRSResourceSetARPLocation ::= CHOICE { + relativeGeodeticLocation RelativeGeodeticLocation, + relativeCartesianLocation RelativeCartesianLocation, + choice-Extension ProtocolIE-SingleContainer { { DL-PRSResourceSetARPLocation-ExtIEs } } +} + +DL-PRSResourceSetARPLocation-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + + +DLPRSResourceARP ::= SEQUENCE { + dl-PRSResourceID INTEGER (0..63), + dL-PRSResourceARPLocation DL-PRSResourceARPLocation, + iE-Extensions ProtocolExtensionContainer { { DLPRSResourceARP-ExtIEs } } OPTIONAL +} + +DLPRSResourceARP-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +DL-PRSResourceARPLocation ::= CHOICE { + relativeGeodeticLocation RelativeGeodeticLocation, + relativeCartesianLocation RelativeCartesianLocation, + choice-Extension ProtocolIE-SingleContainer { { DL-PRSResourceARPLocation-ExtIEs } } +} + +DL-PRSResourceARPLocation-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +DL-UP-TNL-Address-to-Update-List-Item ::= SEQUENCE { + oldIPAdress TransportLayerAddress, + newIPAdress TransportLayerAddress, + iE-Extensions ProtocolExtensionContainer { { DL-UP-TNL-Address-to-Update-List-ItemExtIEs } } OPTIONAL, + ... +} + +DL-UP-TNL-Address-to-Update-List-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +DLUPTNLInformation-ToBeSetup-List ::= SEQUENCE (SIZE(1..maxnoofDLUPTNLInformation)) OF DLUPTNLInformation-ToBeSetup-Item + +DLUPTNLInformation-ToBeSetup-Item ::= SEQUENCE { + dLUPTNLInformation UPTransportLayerInformation , + iE-Extensions ProtocolExtensionContainer { { DLUPTNLInformation-ToBeSetup-ItemExtIEs } } OPTIONAL, + ... +} + +DLUPTNLInformation-ToBeSetup-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +DRB-Activity-Item ::= SEQUENCE { + dRBID DRBID, + dRB-Activity DRB-Activity OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { DRB-Activity-ItemExtIEs } } OPTIONAL, + ... +} + +DRB-Activity-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +DRB-Activity ::= ENUMERATED {active, not-active} + +DRBID ::= INTEGER (1..32, ...) + +DRBs-FailedToBeModified-Item ::= SEQUENCE { + dRBID DRBID , + cause Cause OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { DRBs-FailedToBeModified-ItemExtIEs } } OPTIONAL, + ... +} + +DRBs-FailedToBeModified-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +DRBs-FailedToBeSetup-Item ::= SEQUENCE { + dRBID DRBID, + cause Cause OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { DRBs-FailedToBeSetup-ItemExtIEs } } OPTIONAL, + ... +} + +DRBs-FailedToBeSetup-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +DRBs-FailedToBeSetupMod-Item ::= SEQUENCE { + dRBID DRBID , + cause Cause OPTIONAL , + iE-Extensions ProtocolExtensionContainer { { DRBs-FailedToBeSetupMod-ItemExtIEs } } OPTIONAL, + ... +} + +DRBs-FailedToBeSetupMod-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +DRB-Information ::= SEQUENCE { + dRB-QoS QoSFlowLevelQoSParameters, + sNSSAI SNSSAI, + notificationControl NotificationControl OPTIONAL, + flows-Mapped-To-DRB-List Flows-Mapped-To-DRB-List, + iE-Extensions ProtocolExtensionContainer { { DRB-Information-ItemExtIEs } } OPTIONAL +} + +DRB-Information-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +DRBs-Modified-Item ::= SEQUENCE { + dRBID DRBID, + lCID LCID OPTIONAL, + dLUPTNLInformation-ToBeSetup-List DLUPTNLInformation-ToBeSetup-List, + iE-Extensions ProtocolExtensionContainer { { DRBs-Modified-ItemExtIEs } } OPTIONAL, + ... +} + +DRBs-Modified-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-RLC-Status CRITICALITY ignore EXTENSION RLC-Status PRESENCE optional }| + { ID id-AdditionalPDCPDuplicationTNL-List CRITICALITY ignore EXTENSION AdditionalPDCPDuplicationTNL-List PRESENCE optional }, + ... +} + +DRBs-ModifiedConf-Item ::= SEQUENCE { + dRBID DRBID, + uLUPTNLInformation-ToBeSetup-List ULUPTNLInformation-ToBeSetup-List , + iE-Extensions ProtocolExtensionContainer { { DRBs-ModifiedConf-ItemExtIEs } } OPTIONAL, + ... +} + +DRBs-ModifiedConf-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-AdditionalPDCPDuplicationTNL-List CRITICALITY ignore EXTENSION AdditionalPDCPDuplicationTNL-List PRESENCE optional }, + ... +} + +DRB-Notify-Item ::= SEQUENCE { + dRBID DRBID, + notification-Cause Notification-Cause, + iE-Extensions ProtocolExtensionContainer { { DRB-Notify-ItemExtIEs } } OPTIONAL, + ... +} + +DRB-Notify-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-CurrentQoSParaSetIndex CRITICALITY ignore EXTENSION QoSParaSetNotifyIndex PRESENCE optional }, + ... +} + +DRBs-Required-ToBeModified-Item ::= SEQUENCE { + dRBID DRBID, + dLUPTNLInformation-ToBeSetup-List DLUPTNLInformation-ToBeSetup-List , + iE-Extensions ProtocolExtensionContainer { { DRBs-Required-ToBeModified-ItemExtIEs } } OPTIONAL, + ... +} + +DRBs-Required-ToBeModified-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-RLC-Status CRITICALITY ignore EXTENSION RLC-Status PRESENCE optional }| + { ID id-AdditionalPDCPDuplicationTNL-List CRITICALITY ignore EXTENSION AdditionalPDCPDuplicationTNL-List PRESENCE optional }, + ... +} + +DRBs-Required-ToBeReleased-Item ::= SEQUENCE { + dRBID DRBID, + iE-Extensions ProtocolExtensionContainer { { DRBs-Required-ToBeReleased-ItemExtIEs } } OPTIONAL, + ... +} + +DRBs-Required-ToBeReleased-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +DRBs-Setup-Item ::= SEQUENCE { + dRBID DRBID, + lCID LCID OPTIONAL, + dLUPTNLInformation-ToBeSetup-List DLUPTNLInformation-ToBeSetup-List , + iE-Extensions ProtocolExtensionContainer { { DRBs-Setup-ItemExtIEs } } OPTIONAL, + ... +} + +DRBs-Setup-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-AdditionalPDCPDuplicationTNL-List CRITICALITY ignore EXTENSION AdditionalPDCPDuplicationTNL-List PRESENCE optional }| + { ID id-RLCDuplicationInformation CRITICALITY ignore EXTENSION RLCDuplicationInformation PRESENCE optional}, ... +} + +DRBs-SetupMod-Item ::= SEQUENCE { + dRBID DRBID, + lCID LCID OPTIONAL, + dLUPTNLInformation-ToBeSetup-List DLUPTNLInformation-ToBeSetup-List , + iE-Extensions ProtocolExtensionContainer { { DRBs-SetupMod-ItemExtIEs } } OPTIONAL, + ... +} + +DRBs-SetupMod-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-AdditionalPDCPDuplicationTNL-List CRITICALITY ignore EXTENSION AdditionalPDCPDuplicationTNL-List PRESENCE optional }, + ... +} + + +DRBs-ToBeModified-Item ::= SEQUENCE { + dRBID DRBID, + qoSInformation QoSInformation OPTIONAL, + uLUPTNLInformation-ToBeSetup-List ULUPTNLInformation-ToBeSetup-List , + uLConfiguration ULConfiguration OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { DRBs-ToBeModified-ItemExtIEs } } OPTIONAL, + ... +} + +DRBs-ToBeModified-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-DLPDCPSNLength CRITICALITY ignore EXTENSION PDCPSNLength PRESENCE optional }| + { ID id-ULPDCPSNLength CRITICALITY ignore EXTENSION PDCPSNLength PRESENCE optional }| + {ID id-BearerTypeChange CRITICALITY ignore EXTENSION BearerTypeChange PRESENCE optional}| + { ID id-RLCMode CRITICALITY ignore EXTENSION RLCMode PRESENCE optional }| + { ID id-Duplication-Activation CRITICALITY reject EXTENSION DuplicationActivation PRESENCE optional }| + { ID id-DC-Based-Duplication-Configured CRITICALITY reject EXTENSION DCBasedDuplicationConfigured PRESENCE optional }| + { ID id-DC-Based-Duplication-Activation CRITICALITY reject EXTENSION DuplicationActivation PRESENCE optional }| + { ID id-AdditionalPDCPDuplicationTNL-List CRITICALITY ignore EXTENSION AdditionalPDCPDuplicationTNL-List PRESENCE optional }| + { ID id-RLCDuplicationInformation CRITICALITY ignore EXTENSION RLCDuplicationInformation PRESENCE optional}, + ... +} + +DRBs-ToBeReleased-Item ::= SEQUENCE { + dRBID DRBID, + iE-Extensions ProtocolExtensionContainer { { DRBs-ToBeReleased-ItemExtIEs } } OPTIONAL, + ... +} + +DRBs-ToBeReleased-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +DRBs-ToBeSetup-Item ::= SEQUENCE { + dRBID DRBID, + qoSInformation QoSInformation, + uLUPTNLInformation-ToBeSetup-List ULUPTNLInformation-ToBeSetup-List , + rLCMode RLCMode, + uLConfiguration ULConfiguration OPTIONAL, + duplicationActivation DuplicationActivation OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { DRBs-ToBeSetup-ItemExtIEs } } OPTIONAL, + ... +} + +DRBs-ToBeSetup-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-DC-Based-Duplication-Configured CRITICALITY reject EXTENSION DCBasedDuplicationConfigured PRESENCE optional }| + { ID id-DC-Based-Duplication-Activation CRITICALITY reject EXTENSION DuplicationActivation PRESENCE optional }| + { ID id-DLPDCPSNLength CRITICALITY ignore EXTENSION PDCPSNLength PRESENCE mandatory }| + { ID id-ULPDCPSNLength CRITICALITY ignore EXTENSION PDCPSNLength PRESENCE optional }| + { ID id-AdditionalPDCPDuplicationTNL-List CRITICALITY ignore EXTENSION AdditionalPDCPDuplicationTNL-List PRESENCE optional }, + ... +} + + +DRBs-ToBeSetupMod-Item ::= SEQUENCE { + dRBID DRBID, + qoSInformation QoSInformation, + uLUPTNLInformation-ToBeSetup-List ULUPTNLInformation-ToBeSetup-List, + rLCMode RLCMode, + uLConfiguration ULConfiguration OPTIONAL, + duplicationActivation DuplicationActivation OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { DRBs-ToBeSetupMod-ItemExtIEs } } OPTIONAL, + ... +} + +DRBs-ToBeSetupMod-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-DC-Based-Duplication-Configured CRITICALITY reject EXTENSION DCBasedDuplicationConfigured PRESENCE optional }| + { ID id-DC-Based-Duplication-Activation CRITICALITY reject EXTENSION DuplicationActivation PRESENCE optional }| + { ID id-DLPDCPSNLength CRITICALITY ignore EXTENSION PDCPSNLength PRESENCE optional }| + { ID id-ULPDCPSNLength CRITICALITY ignore EXTENSION PDCPSNLength PRESENCE optional }| + { ID id-AdditionalPDCPDuplicationTNL-List CRITICALITY ignore EXTENSION AdditionalPDCPDuplicationTNL-List PRESENCE optional }| + { ID id-RLCDuplicationInformation CRITICALITY ignore EXTENSION RLCDuplicationInformation PRESENCE optional}, + ... +} + +DRXCycle ::= SEQUENCE { + longDRXCycleLength LongDRXCycleLength, + shortDRXCycleLength ShortDRXCycleLength OPTIONAL, + shortDRXCycleTimer ShortDRXCycleTimer OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { DRXCycle-ExtIEs} } OPTIONAL, + ... +} + +DRXCycle-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +DRX-Config ::= OCTET STRING + +DRXConfigurationIndicator ::= ENUMERATED{ release, ...} + +DRX-LongCycleStartOffset ::= INTEGER (0..10239) + +DSInformationList ::= SEQUENCE (SIZE(0..maxnoofDSInfo)) OF DSCP + +DSCP ::= BIT STRING (SIZE (6)) + +DUtoCURRCContainer ::= OCTET STRING + +DUCURadioInformationType ::= CHOICE { + rIM DUCURIMInformation, + choice-extension ProtocolIE-SingleContainer { { DUCURadioInformationType-ExtIEs} } +} + +DUCURadioInformationType-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +DUCURIMInformation ::= SEQUENCE { + victimgNBSetID GNBSetID, + rIMRSDetectionStatus RIMRSDetectionStatus, + aggressorCellList AggressorCellList, + iE-Extensions ProtocolExtensionContainer { { DUCURIMInformation-ExtIEs} } OPTIONAL +} + +DUCURIMInformation-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +DUF-Slot-Config-Item ::= CHOICE { + explicitFormat ExplicitFormat, + implicitFormat ImplicitFormat, + choice-extension ProtocolIE-SingleContainer { { DUF-Slot-Config-Item-ExtIEs} } +} + +DUF-Slot-Config-Item-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} +DUF-Slot-Config-List ::= SEQUENCE (SIZE(1..maxnoofDUFSlots)) OF DUF-Slot-Config-Item + +DUFSlotformatIndex ::= INTEGER(0..254) + +DUFTransmissionPeriodicity ::= ENUMERATED { ms0p5, ms0p625, ms1, ms1p25, ms2, ms2p5, ms5, ms10, ...} + +DU-RX-MT-RX ::= ENUMERATED {supported, not-supported} + +DU-TX-MT-TX ::= ENUMERATED {supported, not-supported} + +DU-RX-MT-TX ::= ENUMERATED {supported, not-supported} + +DU-TX-MT-RX ::= ENUMERATED {supported, not-supported} + +DUtoCURRCInformation ::= SEQUENCE { + cellGroupConfig CellGroupConfig, + measGapConfig MeasGapConfig OPTIONAL, + requestedP-MaxFR1 OCTET STRING OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { DUtoCURRCInformation-ExtIEs} } OPTIONAL, + ... +} + +DUtoCURRCInformation-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-DRX-LongCycleStartOffset CRITICALITY ignore EXTENSION DRX-LongCycleStartOffset PRESENCE optional }| + { ID id-SelectedBandCombinationIndex CRITICALITY ignore EXTENSION SelectedBandCombinationIndex PRESENCE optional }| + { ID id-SelectedFeatureSetEntryIndex CRITICALITY ignore EXTENSION SelectedFeatureSetEntryIndex PRESENCE optional }| + { ID id-Ph-InfoSCG CRITICALITY ignore EXTENSION Ph-InfoSCG PRESENCE optional }| + { ID id-RequestedBandCombinationIndex CRITICALITY ignore EXTENSION RequestedBandCombinationIndex PRESENCE optional }| + { ID id-RequestedFeatureSetEntryIndex CRITICALITY ignore EXTENSION RequestedFeatureSetEntryIndex PRESENCE optional }| + { ID id-DRX-Config CRITICALITY ignore EXTENSION DRX-Config PRESENCE optional }| + { ID id-PDCCH-BlindDetectionSCG CRITICALITY ignore EXTENSION PDCCH-BlindDetectionSCG PRESENCE optional }| + { ID id-Requested-PDCCH-BlindDetectionSCG CRITICALITY ignore EXTENSION Requested-PDCCH-BlindDetectionSCG PRESENCE optional }| + { ID id-Ph-InfoMCG CRITICALITY ignore EXTENSION Ph-InfoMCG PRESENCE optional }| + { ID id-MeasGapSharingConfig CRITICALITY ignore EXTENSION MeasGapSharingConfig PRESENCE optional }| + { ID id-SL-PHY-MAC-RLC-Config CRITICALITY ignore EXTENSION SL-PHY-MAC-RLC-Config PRESENCE optional }| + { ID id-SL-ConfigDedicatedEUTRA CRITICALITY ignore EXTENSION SL-ConfigDedicatedEUTRA PRESENCE optional }| + { ID id-RequestedP-MaxFR2 CRITICALITY ignore EXTENSION RequestedP-MaxFR2 PRESENCE optional }, + ... +} + +DuplicationActivation ::= ENUMERATED{active,inactive,... } + +DuplicationIndication ::= ENUMERATED {true, ... , false } + +DuplicationState ::= ENUMERATED { + active, + inactive, + ... +} + +Dynamic5QIDescriptor ::= SEQUENCE { + qoSPriorityLevel INTEGER (1..127), + packetDelayBudget PacketDelayBudget, + packetErrorRate PacketErrorRate, + fiveQI INTEGER (0..255, ...) OPTIONAL, + delayCritical ENUMERATED {delay-critical, non-delay-critical} OPTIONAL, + -- C-ifGBRflow: This IE shall be present if the GBR QoS Flow Information IE is present in the QoS Flow Level QoS Parameters IE. + averagingWindow AveragingWindow OPTIONAL, + -- C-ifGBRflow: This IE shall be present if the GBR QoS Flow Information IE is present in the QoS Flow Level QoS Parameters IE. + maxDataBurstVolume MaxDataBurstVolume OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { Dynamic5QIDescriptor-ExtIEs } } OPTIONAL +} + +Dynamic5QIDescriptor-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-ExtendedPacketDelayBudget CRITICALITY ignore EXTENSION ExtendedPacketDelayBudget PRESENCE optional }| + { ID id-CNPacketDelayBudgetDownlink CRITICALITY ignore EXTENSION ExtendedPacketDelayBudget PRESENCE optional }| + { ID id-CNPacketDelayBudgetUplink CRITICALITY ignore EXTENSION ExtendedPacketDelayBudget PRESENCE optional }, + ... +} + +DynamicPQIDescriptor ::= SEQUENCE { + resourceType ENUMERATED {gbr, non-gbr, delay-critical-grb, ...} OPTIONAL, + qoSPriorityLevel INTEGER (1..8, ...), + packetDelayBudget PacketDelayBudget, + packetErrorRate PacketErrorRate, + averagingWindow AveragingWindow OPTIONAL, + -- C-ifGBRflow: This IE shall be present if the GBR QoS Flow Information IE is present in the QoS Flow Level QoS Parameters IE. + maxDataBurstVolume MaxDataBurstVolume OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { DynamicPQIDescriptor-ExtIEs } } OPTIONAL +} + +DynamicPQIDescriptor-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- E + +E-CID-MeasurementPeriodicity ::= ENUMERATED { + ms120, + ms240, + ms480, + ms640, + ms1024, + ms2048, + ms5120, + ms10240, + min1, + min6, + min12, + min30, + min60, + ... +} + +E-CID-MeasurementQuantities ::= SEQUENCE (SIZE (1.. maxnoofMeasE-CID)) OF ProtocolIE-SingleContainer { {E-CID-MeasurementQuantities-ItemIEs} } + +E-CID-MeasurementQuantities-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-E-CID-MeasurementQuantities-Item CRITICALITY reject TYPE E-CID-MeasurementQuantities-Item PRESENCE mandatory} +} + +E-CID-MeasurementQuantities-Item ::= SEQUENCE { + e-CIDmeasurementQuantitiesValue E-CID-MeasurementQuantitiesValue, + iE-Extensions ProtocolExtensionContainer { { E-CID-MeasurementQuantitiesValue-ExtIEs} } OPTIONAL +} + +E-CID-MeasurementQuantitiesValue-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-CID-MeasurementQuantitiesValue ::= ENUMERATED { + cell-Portion, + angleOfArrivalNR, + ... +} + +E-CID-MeasurementResult ::= SEQUENCE { + geographicalCoordinates GeographicalCoordinates OPTIONAL, + measuredResults-List E-CID-MeasuredResults-List OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { E-CID-MeasurementResult-ExtIEs} } OPTIONAL +} + +E-CID-MeasurementResult-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-CID-MeasuredResults-List ::= SEQUENCE (SIZE(1..maxnoofMeasE-CID)) OF E-CID-MeasuredResults-Item + +E-CID-MeasuredResults-Item ::= SEQUENCE { + e-CID-MeasuredResults-Value E-CID-MeasuredResults-Value, + iE-Extensions ProtocolExtensionContainer {{ E-CID-MeasuredResults-Item-ExtIEs }} OPTIONAL +} + +E-CID-MeasuredResults-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-CID-MeasuredResults-Value ::= CHOICE { + valueAngleofArrivalNR UL-AoA, + choice-extension ProtocolIE-SingleContainer { { E-CID-MeasuredResults-Value-ExtIEs} } +} + +E-CID-MeasuredResults-Value-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +E-CID-ReportCharacteristics ::= ENUMERATED { + onDemand, + periodic, + ... +} + +EgressBHRLCCHList ::= SEQUENCE (SIZE(1..maxnoofEgressLinks)) OF EgressBHRLCCHItem + +EgressBHRLCCHItem ::= SEQUENCE { + nextHopBAPAddress BAPAddress, + bHRLCChannelID BHRLCChannelID, + iE-Extensions ProtocolExtensionContainer {{EgressBHRLCCHItemExtIEs }} OPTIONAL +} + +EgressBHRLCCHItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Endpoint-IP-address-and-port ::=SEQUENCE { + endpointIPAddress TransportLayerAddress, + iE-Extensions ProtocolExtensionContainer { { Endpoint-IP-address-and-port-ExtIEs} } OPTIONAL +} + +Endpoint-IP-address-and-port-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-portNumber CRITICALITY reject EXTENSION PortNumber PRESENCE optional}, + ... +} + +ExtendedAvailablePLMN-List ::= SEQUENCE (SIZE(1..maxnoofExtendedBPLMNs)) OF ExtendedAvailablePLMN-Item + +ExtendedAvailablePLMN-Item ::= SEQUENCE { + pLMNIdentity PLMN-Identity, + iE-Extensions ProtocolExtensionContainer { { ExtendedAvailablePLMN-Item-ExtIEs} } OPTIONAL +} + +ExplicitFormat ::= SEQUENCE { + permutation Permutation, + noofDownlinkSymbols NoofDownlinkSymbols OPTIONAL, + noofUplinkSymbols NoofUplinkSymbols OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { ExplicitFormat-ExtIEs} } OPTIONAL +} + +ExplicitFormat-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ExtendedAvailablePLMN-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ExtendedServedPLMNs-List ::= SEQUENCE (SIZE(1.. maxnoofExtendedBPLMNs)) OF ExtendedServedPLMNs-Item + +ExtendedServedPLMNs-Item ::= SEQUENCE { + pLMN-Identity PLMN-Identity, + tAISliceSupportList SliceSupportList OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { ExtendedServedPLMNs-ItemExtIEs} } OPTIONAL, + ... +} + +ExtendedServedPLMNs-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-NPNSupportInfo CRITICALITY reject EXTENSION NPNSupportInfo PRESENCE optional }| +{ ID id-ExtendedTAISliceSupportList CRITICALITY reject EXTENSION ExtendedSliceSupportList PRESENCE optional }, + ... +} + +ExtendedSliceSupportList ::= SEQUENCE (SIZE(1.. maxnoofExtSliceItems)) OF SliceSupportItem + +EUTRACells-List ::= SEQUENCE (SIZE (1.. maxCellineNB)) OF EUTRACells-List-item + +EUTRACells-List-item ::= SEQUENCE { + eUTRA-Cell-ID EUTRA-Cell-ID, + served-EUTRA-Cells-Information Served-EUTRA-Cells-Information, + iE-Extensions ProtocolExtensionContainer { { EUTRACells-List-itemExtIEs } } OPTIONAL +} + +EUTRACells-List-itemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +EUTRA-Cell-ID ::= BIT STRING (SIZE(28)) + +EUTRA-Coex-FDD-Info ::= SEQUENCE { + uL-EARFCN ExtendedEARFCN OPTIONAL, + dL-EARFCN ExtendedEARFCN, + uL-Transmission-Bandwidth EUTRA-Transmission-Bandwidth OPTIONAL, + dL-Transmission-Bandwidth EUTRA-Transmission-Bandwidth, + iE-Extensions ProtocolExtensionContainer { {EUTRA-Coex-FDD-Info-ExtIEs} } OPTIONAL, + ... +} + +EUTRA-Coex-FDD-Info-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-ULCarrierList CRITICALITY ignore EXTENSION NRCarrierList PRESENCE optional }| + { ID id-DLCarrierList CRITICALITY ignore EXTENSION NRCarrierList PRESENCE optional }, + ... +} + +EUTRA-Coex-Mode-Info ::= CHOICE { + fDD EUTRA-Coex-FDD-Info, + tDD EUTRA-Coex-TDD-Info, + ... +} + +EUTRA-Coex-TDD-Info ::= SEQUENCE { + eARFCN ExtendedEARFCN, + transmission-Bandwidth EUTRA-Transmission-Bandwidth, + subframeAssignment EUTRA-SubframeAssignment, + specialSubframe-Info EUTRA-SpecialSubframe-Info, + iE-Extensions ProtocolExtensionContainer { {EUTRA-Coex-TDD-Info-ExtIEs} } OPTIONAL, + ... +} +EUTRA-Coex-TDD-Info-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} +EUTRA-CyclicPrefixDL ::= ENUMERATED { + normal, + extended, + ... +} + +EUTRA-CyclicPrefixUL ::= ENUMERATED { + normal, + extended, + ... +} + +EUTRA-PRACH-Configuration ::= SEQUENCE { + rootSequenceIndex INTEGER (0..837), + zeroCorrelationIndex INTEGER (0..15), + highSpeedFlag BOOLEAN, + prach-FreqOffset INTEGER (0..94), + prach-ConfigIndex INTEGER (0..63) OPTIONAL, + -- C-ifTDD: This IE shall be present if the EUTRA-Mode-Info IE in the Resource Coordination E-UTRA Cell Information IE is set to the value "TDD" + iE-Extensions ProtocolExtensionContainer { {EUTRA-PRACH-Configuration-ExtIEs} } OPTIONAL, + ... +} + +EUTRA-PRACH-Configuration-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +EUTRA-SpecialSubframe-Info ::= SEQUENCE { + specialSubframePatterns EUTRA-SpecialSubframePatterns, + cyclicPrefixDL EUTRA-CyclicPrefixDL, + cyclicPrefixUL EUTRA-CyclicPrefixUL, + iE-Extensions ProtocolExtensionContainer { { EUTRA-SpecialSubframe-Info-ExtIEs} } OPTIONAL, + ... +} + +EUTRA-SpecialSubframe-Info-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +EUTRA-SpecialSubframePatterns ::= ENUMERATED { + ssp0, + ssp1, + ssp2, + ssp3, + ssp4, + ssp5, + ssp6, + ssp7, + ssp8, + ssp9, + ssp10, + ... +} + +EUTRA-SubframeAssignment ::= ENUMERATED { + sa0, + sa1, + sa2, + sa3, + sa4, + sa5, + sa6, + ... +} + +EUTRA-Transmission-Bandwidth ::= ENUMERATED { + bw6, + bw15, + bw25, + bw50, + bw75, + bw100, + ... +} + +EUTRANQoS ::= SEQUENCE { + qCI QCI, + allocationAndRetentionPriority AllocationAndRetentionPriority, + gbrQosInformation GBR-QosInformation OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { EUTRANQoS-ExtIEs} } OPTIONAL, + ... +} + +EUTRANQoS-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ExecuteDuplication ::= ENUMERATED{true,...} + +ExtendedEARFCN ::= INTEGER (0..262143) + +EUTRA-Mode-Info ::= CHOICE { + eUTRAFDD EUTRA-FDD-Info, + eUTRATDD EUTRA-TDD-Info, + choice-extension ProtocolIE-SingleContainer { { EUTRA-Mode-Info-ExtIEs} } +} + +EUTRA-Mode-Info-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +EUTRA-NR-CellResourceCoordinationReq-Container ::= OCTET STRING + +EUTRA-NR-CellResourceCoordinationReqAck-Container ::= OCTET STRING + +EUTRA-FDD-Info ::= SEQUENCE { + uL-offsetToPointA OffsetToPointA, + dL-offsetToPointA OffsetToPointA, + iE-Extensions ProtocolExtensionContainer { {EUTRA-FDD-Info-ExtIEs} } OPTIONAL, + ... +} + +EUTRA-FDD-Info-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +EUTRA-TDD-Info ::= SEQUENCE { + offsetToPointA OffsetToPointA, + iE-Extensions ProtocolExtensionContainer { {EUTRA-TDD-Info-ExtIEs} } OPTIONAL, + ... +} + +EUTRA-TDD-Info-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +EventType ::= ENUMERATED { + on-demand, + periodic, + stop, + ... +} + +ExtendedPacketDelayBudget ::= INTEGER (1..65535, ...) + +-- F + +FDD-Info ::= SEQUENCE { + uL-NRFreqInfo NRFreqInfo, + dL-NRFreqInfo NRFreqInfo, + uL-Transmission-Bandwidth Transmission-Bandwidth, + dL-Transmission-Bandwidth Transmission-Bandwidth, + iE-Extensions ProtocolExtensionContainer { {FDD-Info-ExtIEs} } OPTIONAL, + ... +} + +FDD-Info-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +Flows-Mapped-To-DRB-List ::= SEQUENCE (SIZE(1.. maxnoofQoSFlows)) OF Flows-Mapped-To-DRB-Item + +Flows-Mapped-To-DRB-Item ::= SEQUENCE { + qoSFlowIdentifier QoSFlowIdentifier, + qoSFlowLevelQoSParameters QoSFlowLevelQoSParameters, + iE-Extensions ProtocolExtensionContainer { { Flows-Mapped-To-DRB-ItemExtIEs} } OPTIONAL +} + +Flows-Mapped-To-DRB-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + {ID id-QoSFlowMappingIndication CRITICALITY ignore EXTENSION QoSFlowMappingIndication PRESENCE optional}| + {ID id-TSCTrafficCharacteristics CRITICALITY ignore EXTENSION TSCTrafficCharacteristics PRESENCE optional}, + ... +} + +FR1-Bandwidth ::= ENUMERATED {bw5, bw10, bw20, bw40, bw50, bw80, bw100, ...} + +FR2-Bandwidth ::= ENUMERATED {bw50, bw100, bw200, bw400, ...} + +FreqBandNrItem ::= SEQUENCE { + freqBandIndicatorNr INTEGER (1..1024,...), + supportedSULBandList SEQUENCE (SIZE(0..maxnoofNrCellBands)) OF SupportedSULFreqBandItem, + iE-Extensions ProtocolExtensionContainer { {FreqBandNrItem-ExtIEs} } OPTIONAL, + ... +} + +FreqBandNrItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +FreqDomainLength ::= CHOICE { + l839 L839Info, + l139 L139Info, + choice-extension ProtocolIE-SingleContainer { {FreqDomainLength-ExtIEs} } +} + +FreqDomainLength-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +FrequencyShift7p5khz ::= ENUMERATED {false, true, ...} + +FullConfiguration ::= ENUMERATED {full, ...} + +FlowsMappedToSLDRB-List ::= SEQUENCE (SIZE(1.. maxnoofPC5QoSFlows)) OF FlowsMappedToSLDRB-Item + +FlowsMappedToSLDRB-Item ::= SEQUENCE { + pc5QoSFlowIdentifier PC5QoSFlowIdentifier, + iE-Extensions ProtocolExtensionContainer { {FlowsMappedToSLDRB-Item-ExtIEs} } OPTIONAL, + ... +} + +FlowsMappedToSLDRB-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- G + + +GBR-QosInformation ::= SEQUENCE { + e-RAB-MaximumBitrateDL BitRate, + e-RAB-MaximumBitrateUL BitRate, + e-RAB-GuaranteedBitrateDL BitRate, + e-RAB-GuaranteedBitrateUL BitRate, + iE-Extensions ProtocolExtensionContainer { { GBR-QosInformation-ExtIEs} } OPTIONAL, + ... +} + +GBR-QosInformation-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +GBR-QoSFlowInformation::= SEQUENCE { + maxFlowBitRateDownlink BitRate, + maxFlowBitRateUplink BitRate, + guaranteedFlowBitRateDownlink BitRate, + guaranteedFlowBitRateUplink BitRate, + maxPacketLossRateDownlink MaxPacketLossRate OPTIONAL, + maxPacketLossRateUplink MaxPacketLossRate OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { GBR-QosFlowInformation-ExtIEs} } OPTIONAL, + ... +} + +GBR-QosFlowInformation-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-AlternativeQoSParaSetList CRITICALITY ignore EXTENSION AlternativeQoSParaSetList PRESENCE optional }, + ... +} + +CG-Config ::= OCTET STRING + +GeographicalCoordinates ::= SEQUENCE { + tRPPositionDefinitionType TRPPositionDefinitionType, + dLPRSResourceCoordinates DLPRSResourceCoordinates OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { GeographicalCoordinates-ExtIEs } } OPTIONAL +} + +GeographicalCoordinates-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +GNBCUMeasurementID ::= INTEGER (0.. 4095, ...) + +GNBDUMeasurementID ::= INTEGER (0.. 4095, ...) + +GNB-CUSystemInformation::= SEQUENCE { + sibtypetobeupdatedlist SEQUENCE (SIZE(1.. maxnoofSIBTypes)) OF SibtypetobeupdatedListItem, + iE-Extensions ProtocolExtensionContainer { { GNB-CUSystemInformation-ExtIEs} } OPTIONAL, + ... +} + +GNB-CUSystemInformation-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + {ID id-systemInformationAreaID CRITICALITY ignore EXTENSION SystemInformationAreaID PRESENCE optional}, + ... +} + +GNB-CU-TNL-Association-Setup-Item::= SEQUENCE { + tNLAssociationTransportLayerAddress CP-TransportLayerAddress , + iE-Extensions ProtocolExtensionContainer { { GNB-CU-TNL-Association-Setup-Item-ExtIEs} } OPTIONAL +} + +GNB-CU-TNL-Association-Setup-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +GNB-CU-TNL-Association-Failed-To-Setup-Item ::= SEQUENCE { + tNLAssociationTransportLayerAddress CP-TransportLayerAddress , + cause Cause, + iE-Extensions ProtocolExtensionContainer { { GNB-CU-TNL-Association-Failed-To-Setup-Item-ExtIEs} } OPTIONAL +} + +GNB-CU-TNL-Association-Failed-To-Setup-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +GNB-CU-TNL-Association-To-Add-Item ::= SEQUENCE { + tNLAssociationTransportLayerAddress CP-TransportLayerAddress , + tNLAssociationUsage TNLAssociationUsage, + iE-Extensions ProtocolExtensionContainer { { GNB-CU-TNL-Association-To-Add-Item-ExtIEs} } OPTIONAL +} + +GNB-CU-TNL-Association-To-Add-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +GNB-CU-TNL-Association-To-Remove-Item::= SEQUENCE { + tNLAssociationTransportLayerAddress CP-TransportLayerAddress , + iE-Extensions ProtocolExtensionContainer { { GNB-CU-TNL-Association-To-Remove-Item-ExtIEs} } OPTIONAL +} + +GNB-CU-TNL-Association-To-Remove-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + {ID id-TNLAssociationTransportLayerAddressgNBDU CRITICALITY reject EXTENSION CP-TransportLayerAddress PRESENCE optional}, + ... +} + + +GNB-CU-TNL-Association-To-Update-Item::= SEQUENCE { + tNLAssociationTransportLayerAddress CP-TransportLayerAddress , + tNLAssociationUsage TNLAssociationUsage OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { GNB-CU-TNL-Association-To-Update-Item-ExtIEs} } OPTIONAL +} + +GNB-CU-TNL-Association-To-Update-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +GNB-CU-UE-F1AP-ID ::= INTEGER (0..4294967295) + +GNB-DU-Cell-Resource-Configuration ::= SEQUENCE { + subcarrierSpacing SubcarrierSpacing, + dUFTransmissionPeriodicity DUFTransmissionPeriodicity OPTIONAL, + dUF-Slot-Config-List DUF-Slot-Config-List OPTIONAL, + hSNATransmissionPeriodicity HSNATransmissionPeriodicity, + hNSASlotConfigList HSNASlotConfigList OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { GNB-DU-Cell-Resource-Configuration-ExtIEs } } OPTIONAL +} + +GNB-DU-Cell-Resource-Configuration-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +GNB-DU-UE-F1AP-ID ::= INTEGER (0..4294967295) + +GNB-DU-ID ::= INTEGER (0..68719476735) + +GNB-CU-Name ::= PrintableString(SIZE(1..150,...)) + +GNB-DU-Name ::= PrintableString(SIZE(1..150,...)) + +Extended-GNB-CU-Name ::= SEQUENCE { + gNB-CU-NameVisibleString GNB-CU-NameVisibleString OPTIONAL, + gNB-CU-NameUTF8String GNB-CU-NameUTF8String OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { Extended-GNB-CU-Name-ExtIEs } } OPTIONAL, + ... +} + +Extended-GNB-CU-Name-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +GNB-CU-NameVisibleString ::= VisibleString(SIZE(1..150,...)) + +GNB-CU-NameUTF8String ::= UTF8String(SIZE(1..150,...)) + +Extended-GNB-DU-Name ::= SEQUENCE { + gNB-DU-NameVisibleString GNB-DU-NameVisibleString OPTIONAL, + gNB-DU-NameUTF8String GNB-DU-NameUTF8String OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { Extended-GNB-DU-Name-ExtIEs } } OPTIONAL, + ... +} + +Extended-GNB-DU-Name-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +GNB-DU-NameVisibleString ::= VisibleString(SIZE(1..150,...)) + +GNB-DU-NameUTF8String ::= UTF8String(SIZE(1..150,...)) + + +GNB-DU-Served-Cells-Item ::= SEQUENCE { + served-Cell-Information Served-Cell-Information, + gNB-DU-System-Information GNB-DU-System-Information OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { GNB-DU-Served-Cells-ItemExtIEs} } OPTIONAL, + ... +} + +GNB-DU-Served-Cells-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +GNB-DU-System-Information ::= SEQUENCE { + mIB-message MIB-message, + sIB1-message SIB1-message, + iE-Extensions ProtocolExtensionContainer { { GNB-DU-System-Information-ExtIEs } } OPTIONAL, + ... +} + +GNB-DU-System-Information-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-SIB12-message CRITICALITY ignore EXTENSION SIB12-message PRESENCE optional}| + { ID id-SIB13-message CRITICALITY ignore EXTENSION SIB13-message PRESENCE optional}| + { ID id-SIB14-message CRITICALITY ignore EXTENSION SIB14-message PRESENCE optional}| + { ID id-SIB10-message CRITICALITY ignore EXTENSION SIB10-message PRESENCE optional}, + ... +} + +GNB-DUConfigurationQuery ::= ENUMERATED {true, ...} + +GNBDUOverloadInformation ::= ENUMERATED {overloaded, not-overloaded} + +GNB-DU-TNL-Association-To-Remove-Item::= SEQUENCE { + tNLAssociationTransportLayerAddress CP-TransportLayerAddress , + tNLAssociationTransportLayerAddressgNBCU CP-TransportLayerAddress OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { GNB-DU-TNL-Association-To-Remove-Item-ExtIEs} } OPTIONAL +} + +GNB-DU-TNL-Association-To-Remove-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +GNB-RxTxTimeDiff ::= SEQUENCE { + rxTxTimeDiff GNBRxTxTimeDiffMeas, + additionalPath-List AdditionalPath-List OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { GNB-RxTxTimeDiff-ExtIEs} } OPTIONAL +} + +GNB-RxTxTimeDiff-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + + ... +} + +GNBRxTxTimeDiffMeas ::= CHOICE { + k0 INTEGER (0.. 1970049), + k1 INTEGER (0.. 985025), + k2 INTEGER (0.. 492513), + k3 INTEGER (0.. 246257), + k4 INTEGER (0.. 123129), + k5 INTEGER (0.. 61565), + choice-extension ProtocolIE-SingleContainer { { GNBRxTxTimeDiffMeas-ExtIEs } } +} + +GNBRxTxTimeDiffMeas-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +GNBSetID ::= BIT STRING (SIZE(22)) + +GTP-TEID ::= OCTET STRING (SIZE (4)) + +GTPTLAs ::= SEQUENCE (SIZE(1.. maxnoofGTPTLAs)) OF GTPTLA-Item + + +GTPTLA-Item ::= SEQUENCE { + gTPTransportLayerAddress TransportLayerAddress, + iE-Extensions ProtocolExtensionContainer { { GTPTLA-Item-ExtIEs } } OPTIONAL +} + +GTPTLA-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +GTPTunnel ::= SEQUENCE { + transportLayerAddress TransportLayerAddress, + gTP-TEID GTP-TEID, + iE-Extensions ProtocolExtensionContainer { { GTPTunnel-ExtIEs } } OPTIONAL, + ... +} + +GTPTunnel-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- H + +HandoverPreparationInformation ::= OCTET STRING + +HardwareLoadIndicator ::= SEQUENCE { + dLHardwareLoadIndicator INTEGER (0..100, ...), + uLHardwareLoadIndicator INTEGER (0..100, ...), + iE-Extensions ProtocolExtensionContainer { { HardwareLoadIndicator-ExtIEs } } OPTIONAL, + ... +} + +HardwareLoadIndicator-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +HSNASlotConfigList ::= SEQUENCE (SIZE(1..maxnoofHSNASlots)) OF HSNASlotConfigItem + +HSNASlotConfigItem ::= SEQUENCE { + hSNADownlink HSNADownlink OPTIONAL, + hSNAUplink HSNAUplink OPTIONAL, + hSNAFlexible HSNAFlexible OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { HSNASlotConfigItem-ExtIEs } } OPTIONAL +} + +HSNASlotConfigItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} +HSNADownlink ::= ENUMERATED { hard, soft, notavailable } + +HSNAFlexible ::= ENUMERATED { hard, soft, notavailable } + +HSNAUplink ::= ENUMERATED { hard, soft, notavailable } + +HSNATransmissionPeriodicity ::= ENUMERATED { ms0p5, ms0p625, ms1, ms1p25, ms2, ms2p5, ms5, ms10, ms20, ms40, ms80, ms160, ...} + +-- I + +IAB-Barred ::= ENUMERATED {barred, not-barred, ...} + +IAB-Info-IAB-donor-CU ::= SEQUENCE{ + iAB-STC-Info IAB-STC-Info OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { IAB-Info-IAB-donor-CU-ExtIEs } } OPTIONAL +} + +IAB-Info-IAB-donor-CU-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +IAB-Info-IAB-DU ::= SEQUENCE{ + multiplexingInfo MultiplexingInfo OPTIONAL, + iAB-STC-Info IAB-STC-Info OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { IAB-Info-IAB-DU-ExtIEs } } OPTIONAL +} + +IAB-Info-IAB-DU-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +IAB-MT-Cell-List ::= SEQUENCE (SIZE(1..maxnoofServingCells)) OF IAB-MT-Cell-List-Item + +IAB-MT-Cell-List-Item ::= SEQUENCE { + nRCellIdentity NRCellIdentity, + dU-RX-MT-RX DU-RX-MT-RX, + dU-TX-MT-TX DU-TX-MT-TX, + dU-RX-MT-TX DU-RX-MT-TX, + dU-TX-MT-RX DU-TX-MT-RX, + iE-Extensions ProtocolExtensionContainer { { IAB-MT-Cell-List-Item-ExtIEs } } OPTIONAL +} + +IAB-MT-Cell-List-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +IAB-STC-Info ::= SEQUENCE{ + iAB-STC-Info-List IAB-STC-Info-List, + iE-Extensions ProtocolExtensionContainer { { IAB-STC-Info-ExtIEs } } OPTIONAL +} + +IAB-STC-Info-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +IAB-STC-Info-List ::= SEQUENCE (SIZE(1..maxnoofIABSTCInfo)) OF IAB-STC-Info-Item + +IAB-STC-Info-Item::= SEQUENCE { + sSB-freqInfo SSB-freqInfo, + sSB-subcarrierSpacing SSB-subcarrierSpacing, + sSB-transmissionPeriodicity SSB-transmissionPeriodicity, + sSB-transmissionTimingOffset SSB-transmissionTimingOffset, + sSB-transmissionBitmap SSB-transmissionBitmap, + iE-Extensions ProtocolExtensionContainer { { IAB-STC-Info-Item-ExtIEs } } OPTIONAL +} + +IAB-STC-Info-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +IAB-Allocated-TNL-Address-Item ::= SEQUENCE { + iABTNLAddress IABTNLAddress, + iABTNLAddressUsage IABTNLAddressUsage OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { IAB-Allocated-TNL-Address-Item-ExtIEs } } OPTIONAL +} + +IAB-Allocated-TNL-Address-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +IAB-DU-Cell-Resource-Configuration-Mode-Info ::= CHOICE { + fDD IAB-DU-Cell-Resource-Configuration-FDD-Info, + tDD IAB-DU-Cell-Resource-Configuration-TDD-Info, + choice-extension ProtocolIE-SingleContainer { { IAB-DU-Cell-Resource-Configuration-Mode-Info-ExtIEs} } +} + +IAB-DU-Cell-Resource-Configuration-Mode-Info-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +IAB-DU-Cell-Resource-Configuration-FDD-Info ::= SEQUENCE { + gNB-DU-Cell-Resource-Configuration-FDD-UL GNB-DU-Cell-Resource-Configuration, + gNB-DU-Cell-Resource-Configuration-FDD-DL GNB-DU-Cell-Resource-Configuration, + iE-Extensions ProtocolExtensionContainer { {IAB-DU-Cell-Resource-Configuration-FDD-Info-ExtIEs} } OPTIONAL, + ... +} + +IAB-DU-Cell-Resource-Configuration-FDD-Info-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +IAB-DU-Cell-Resource-Configuration-TDD-Info ::= SEQUENCE { + gNB-DU-Cell-Resourc-Configuration-TDD GNB-DU-Cell-Resource-Configuration, + iE-Extensions ProtocolExtensionContainer { {IAB-DU-Cell-Resource-Configuration-TDD-Info-ExtIEs} } OPTIONAL, + ... +} + +IAB-DU-Cell-Resource-Configuration-TDD-Info-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +IABIPv6RequestType ::= CHOICE { + iPv6Address IABTNLAddressesRequested, + iPv6Prefix IABTNLAddressesRequested, + choice-extension ProtocolIE-SingleContainer { { IABIPv6RequestType-ExtIEs} } +} + +IABIPv6RequestType-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +IABTNLAddress ::= CHOICE { + iPv4Address BIT STRING (SIZE(32)), + iPv6Address BIT STRING (SIZE(128)), + iPv6Prefix BIT STRING (SIZE(64)), + choice-extension ProtocolIE-SingleContainer { { IABTNLAddress-ExtIEs} } +} + +IABTNLAddress-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +IABTNLAddressesRequested ::= SEQUENCE { + tNLAddressesOrPrefixesRequestedAllTraffic INTEGER (1..256) OPTIONAL, + tNLAddressesOrPrefixesRequestedF1-C INTEGER (1..256) OPTIONAL, + tNLAddressesOrPrefixesRequestedF1-U INTEGER (1..256) OPTIONAL, + tNLAddressesOrPrefixesRequestedNoNF1 INTEGER (1..256) OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { IABTNLAddressesRequested-ExtIEs } } OPTIONAL +} + +IABTNLAddressesRequested-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +IAB-TNL-Addresses-To-Remove-Item ::= SEQUENCE { + iABTNLAddress IABTNLAddress, + iE-Extensions ProtocolExtensionContainer { { IAB-TNL-Addresses-To-Remove-Item-ExtIEs} } OPTIONAL +} + +IAB-TNL-Addresses-To-Remove-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +IABTNLAddressUsage ::= ENUMERATED { + f1-c, + f1-u, + non-f1, + ... +} + + +IABv4AddressesRequested ::= SEQUENCE { + iABv4AddressesRequested IABTNLAddressesRequested, + iE-Extensions ProtocolExtensionContainer { { IABv4AddressesRequested-ExtIEs} } OPTIONAL +} + +IABv4AddressesRequested-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ImplicitFormat ::= SEQUENCE { + dUFSlotformatIndex DUFSlotformatIndex, + iE-Extensions ProtocolExtensionContainer { { ImplicitFormat-ExtIEs } } OPTIONAL +} + +ImplicitFormat-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +IgnorePRACHConfiguration::= ENUMERATED { true,...} + +IgnoreResourceCoordinationContainer ::= ENUMERATED { yes,...} +InactivityMonitoringRequest ::= ENUMERATED { true,...} +InactivityMonitoringResponse ::= ENUMERATED { not-supported,...} +InterfacesToTrace ::= BIT STRING (SIZE(8)) + +IntendedTDD-DL-ULConfig ::= SEQUENCE { + nRSCS ENUMERATED { scs15, scs30, scs60, scs120,...}, + nRCP ENUMERATED { normal, extended,...}, + nRDLULTxPeriodicity ENUMERATED { ms0p5, ms0p625, ms1, ms1p25, ms2, ms2p5, ms3, ms4, ms5, ms10, ms20, ms40, ms60, ms80, ms100, ms120, ms140, ms160, ...}, + slot-Configuration-List Slot-Configuration-List, + iE-Extensions ProtocolExtensionContainer { {IntendedTDD-DL-ULConfig-ExtIEs} } OPTIONAL +} + +IntendedTDD-DL-ULConfig-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +IPHeaderInformation ::= SEQUENCE { + destinationIABTNLAddress IABTNLAddress, + dsInformationList DSInformationList OPTIONAL, + iPv6FlowLabel BIT STRING (SIZE (20)) OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { IPHeaderInformation-ItemExtIEs} } OPTIONAL, + ... +} + +IPHeaderInformation-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +IPtolayer2TrafficMappingInfo ::= SEQUENCE { + iPtolayer2TrafficMappingInfoToAdd IPtolayer2TrafficMappingInfoList OPTIONAL, + iPtolayer2TrafficMappingInfoToRemove MappingInformationtoRemove OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { IPtolayer2TrafficMappingInfo-ItemExtIEs} } OPTIONAL, + ... +} + +IPtolayer2TrafficMappingInfoList ::= SEQUENCE (SIZE(1..maxnoofMappingEntries)) OF IPtolayer2TrafficMappingInfo-Item + +IPtolayer2TrafficMappingInfo-Item ::= SEQUENCE { + mappingInformationIndex MappingInformationIndex, + iPHeaderInformation IPHeaderInformation, + bHInfo BHInfo, iE-Extensions ProtocolExtensionContainer { { IPtolayer2TrafficMappingInfo-ItemExtIEs} } OPTIONAL, + ... +} + +IPtolayer2TrafficMappingInfo-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- J + +-- K + +-- L + +L139Info ::= SEQUENCE { + msg1SCS ENUMERATED {scs15, scs30, scs60, scs120, ...}, + rootSequenceIndex INTEGER (0..137) OPTIONAL, + iE-Extension ProtocolExtensionContainer { {L139Info-ExtIEs} } OPTIONAL, + ... +} + +L139Info-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +L839Info ::= SEQUENCE { + rootSequenceIndex INTEGER (0..837), + restrictedSetConfig ENUMERATED {unrestrictedSet, restrictedSetTypeA, + restrictedSetTypeB, ...}, + iE-Extension ProtocolExtensionContainer { {L839Info-ExtIEs} } OPTIONAL, + ... +} + +L839Info-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +LCID ::= INTEGER (1..32, ...) + + +LCStoGCSTranslationList ::= SEQUENCE (SIZE (1.. maxnooflcs-gcs-translation)) OF LCStoGCSTranslation + +LCStoGCSTranslation ::= SEQUENCE { + alpha INTEGER (0..359), + alpha-fine INTEGER (0..9), + beta INTEGER (0..359), + beta-fine INTEGER (0..9), + gamma INTEGER (0..359), + gamma-fine INTEGER (0..9), + iE-Extensions ProtocolExtensionContainer { {LCStoGCSTranslation-ExtIEs} } OPTIONAL +} + +LCStoGCSTranslation-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +LMF-MeasurementID ::= INTEGER (1.. 65536, ...) + +LMF-UE-MeasurementID ::= INTEGER (1.. 256, ...) + +LocationUncertainty ::= SEQUENCE { + horizontalUncertainty INTEGER (0..255), + horizontalConfidence INTEGER (0..100), + verticalUncertainty INTEGER (0..255), + verticalConfidence INTEGER (0..100), + iE-Extensions ProtocolExtensionContainer { { LocationUncertainty-ExtIEs} } OPTIONAL +} + +LocationUncertainty-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +LongDRXCycleLength ::= ENUMERATED +{ms10, ms20, ms32, ms40, ms60, ms64, ms70, ms80, ms128, ms160, ms256, ms320, ms512, ms640, ms1024, ms1280, ms2048, ms2560, ms5120, ms10240, ...} + +LowerLayerPresenceStatusChange ::= ENUMERATED { + suspend-lower-layers, + resume-lower-layers, + ... + +} + +LTEUESidelinkAggregateMaximumBitrate ::= SEQUENCE { + uELTESidelinkAggregateMaximumBitrate BitRate, + iE-Extensions ProtocolExtensionContainer { {LTEUESidelinkAggregateMaximumBitrate-ExtIEs} } OPTIONAL +} + +LTEUESidelinkAggregateMaximumBitrate-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +LTEV2XServicesAuthorized ::= SEQUENCE { + vehicleUE VehicleUE OPTIONAL, + pedestrianUE PedestrianUE OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {LTEV2XServicesAuthorized-ExtIEs} } OPTIONAL +} + +LTEV2XServicesAuthorized-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- M + +MappingInformationIndex ::= BIT STRING (SIZE (26)) + +MappingInformationtoRemove ::= SEQUENCE (SIZE(1..maxnoofMappingEntries)) OF MappingInformationIndex + +MaskedIMEISV ::= BIT STRING (SIZE (64)) + +MaxDataBurstVolume ::= INTEGER (0..4095, ..., 4096.. 2000000) +MaxPacketLossRate ::= INTEGER (0..1000) + +MIB-message ::= OCTET STRING + +MeasConfig ::= OCTET STRING + +MeasGapConfig ::= OCTET STRING + +MeasGapSharingConfig ::= OCTET STRING + +MeasurementBeamInfoRequest ::= ENUMERATED {true, ...} + +MeasurementBeamInfo ::= SEQUENCE { + pRS-Resource-ID PRS-Resource-ID OPTIONAL, + pRS-Resource-Set-ID PRS-Resource-Set-ID OPTIONAL, + sSB-Index SSB-Index OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { MeasurementBeamInfo-ExtIEs} } OPTIONAL +} + +MeasurementBeamInfo-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +MeasurementTimingConfiguration ::= OCTET STRING + +MessageIdentifier ::= BIT STRING (SIZE (16)) + +MultiplexingInfo ::= SEQUENCE{ + iAB-MT-Cell-List IAB-MT-Cell-List, + iE-Extensions ProtocolExtensionContainer { {MultiplexingInfo-ExtIEs} } OPTIONAL +} + +MultiplexingInfo-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +M2Configuration ::= ENUMERATED {true, ...} + + +M5Configuration ::= SEQUENCE { + m5period M5period, + m5-links-to-log M5-Links-to-log, + iE-Extensions ProtocolExtensionContainer { { M5Configuration-ExtIEs} } OPTIONAL, + ... +} + +M5Configuration-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +M5period ::= ENUMERATED { ms1024, ms2048, ms5120, ms10240, min1, ... } + +M5-Links-to-log ::= ENUMERATED {uplink, downlink, both-uplink-and-downlink, ...} + + +M6Configuration ::= SEQUENCE { + m6report-Interval M6report-Interval, + m6-links-to-log M6-Links-to-log, + iE-Extensions ProtocolExtensionContainer { { M6Configuration-ExtIEs} } OPTIONAL, + ... +} + +M6Configuration-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +M6report-Interval ::= ENUMERATED { ms120, ms240, ms640, ms1024, ms2048, ms5120, ms10240, ms20480, ms40960, min1, min6, min12, min30, ... } + + + +M6-Links-to-log ::= ENUMERATED {uplink, downlink, both-uplink-and-downlink, ...} + + +M7Configuration ::= SEQUENCE { + m7period M7period, + m7-links-to-log M7-Links-to-log, + iE-Extensions ProtocolExtensionContainer { { M7Configuration-ExtIEs} } OPTIONAL, + ... +} + +M7Configuration-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +M7period ::= INTEGER(1..60, ...) + +M7-Links-to-log ::= ENUMERATED {downlink, ...} + +MDT-Activation ::= ENUMERATED { + immediate-MDT-only, + immediate-MDT-and-Trace, + ... +} + +MDTConfiguration ::= SEQUENCE { + mdt-Activation MDT-Activation, + measurementsToActivate MeasurementsToActivate, + m2Configuration M2Configuration OPTIONAL, + -- C-ifM2: This IE shall be present if the Measurements to Activate IE has the second bit set to "1". + m5Configuration M5Configuration OPTIONAL, + -- C-ifM5: This IE shall be present if the Measurements to Activate IE has the fifth bit set to "1". + m6Configuration M6Configuration OPTIONAL, + -- C-ifM6: This IE shall be present if the Measurements to Activate IE has the seventh bit set to "1". + m7Configuration M7Configuration OPTIONAL, + -- C-ifM7: This IE shall be present if the Measurements to Activate IE has the eighth bit set to "1". + iE-Extensions ProtocolExtensionContainer { { MDTConfiguration-ExtIEs} } OPTIONAL, + ... +} +MDTConfiguration-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +MDTPLMNList ::= SEQUENCE (SIZE(1..maxnoofMDTPLMNs)) OF PLMN-Identity + + +MeasuredResultsValue ::= CHOICE { + uL-AngleOfArrival UL-AoA, + uL-SRS-RSRP UL-SRS-RSRP, + uL-RTOA UL-RTOA-Measurement, + gNB-RxTxTimeDiff GNB-RxTxTimeDiff, + choice-extension ProtocolIE-SingleContainer { { MeasuredResultsValue-ExtIEs } } +} + +MeasuredResultsValue-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +MeasurementsToActivate ::= BIT STRING (SIZE (8)) + +-- N + +NeedforGap::= ENUMERATED {true, ...} + +Neighbour-Cell-Information-Item ::= SEQUENCE { + nRCGI NRCGI, + intendedTDD-DL-ULConfig IntendedTDD-DL-ULConfig OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { Neighbour-Cell-Information-ItemExtIEs } } OPTIONAL +} + +Neighbour-Cell-Information-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +NGRANAllocationAndRetentionPriority ::= SEQUENCE { + priorityLevel PriorityLevel, + pre-emptionCapability Pre-emptionCapability, + pre-emptionVulnerability Pre-emptionVulnerability, + iE-Extensions ProtocolExtensionContainer { {NGRANAllocationAndRetentionPriority-ExtIEs} } OPTIONAL +} + +NGRANAllocationAndRetentionPriority-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +NGRANHighAccuracyAccessPointPosition ::= SEQUENCE { + latitude INTEGER (-2147483648.. 2147483647), + longitude INTEGER (-2147483648.. 2147483647), + altitude INTEGER (-64000..1280000), + uncertaintySemi-major INTEGER (0..255), + uncertaintySemi-minor INTEGER (0..255), + orientationOfMajorAxis INTEGER (0..179), + horizontalConfidence INTEGER (0..100), + uncertaintyAltitude INTEGER (0..255), + verticalConfidence INTEGER (0..100), + + iE-Extensions ProtocolExtensionContainer { { NGRANHighAccuracyAccessPointPosition-ExtIEs} } OPTIONAL +} + +NGRANHighAccuracyAccessPointPosition-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +NID ::= BIT STRING (SIZE(44)) + +NR-CGI-List-For-Restart-Item ::= SEQUENCE { + nRCGI NRCGI, + iE-Extensions ProtocolExtensionContainer { { NR-CGI-List-For-Restart-ItemExtIEs } } OPTIONAL, + ... +} + +NR-CGI-List-For-Restart-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +NR-PRSBeamInformation ::= SEQUENCE { + nR-PRSBeamInformationList NR-PRSBeamInformationList, + lCStoGCSTranslationList LCStoGCSTranslationList, + iE-Extensions ProtocolExtensionContainer { { NR-PRSBeamInformation-ExtIEs } } OPTIONAL +} + +NR-PRSBeamInformation-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +NR-PRSBeamInformationList ::= SEQUENCE (SIZE(1.. maxnoofPRS-ResourceSets)) OF NR-PRSBeamInformationItem + +NR-PRSBeamInformationItem ::= SEQUENCE { + pRSResourceSetID INTEGER (0..7), + pRSAngleList PRSAngleList, + iE-Extensions ProtocolExtensionContainer { { NR-PRSBeamInformationItem-ExtIEs } } OPTIONAL +} + +NR-PRSBeamInformationItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +NonDynamic5QIDescriptor ::= SEQUENCE { + fiveQI INTEGER (0..255, ...), + qoSPriorityLevel INTEGER (1..127) OPTIONAL, + averagingWindow AveragingWindow OPTIONAL, + maxDataBurstVolume MaxDataBurstVolume OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { NonDynamic5QIDescriptor-ExtIEs } } OPTIONAL +} + +NonDynamic5QIDescriptor-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-CNPacketDelayBudgetDownlink CRITICALITY ignore EXTENSION ExtendedPacketDelayBudget PRESENCE optional }| + { ID id-CNPacketDelayBudgetUplink CRITICALITY ignore EXTENSION ExtendedPacketDelayBudget PRESENCE optional }, + ... +} + +NonDynamicPQIDescriptor ::= SEQUENCE { + fiveQI INTEGER (0..255, ...), + qoSPriorityLevel INTEGER (1..8, ...) OPTIONAL, + averagingWindow AveragingWindow OPTIONAL, + maxDataBurstVolume MaxDataBurstVolume OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { NonDynamicPQIDescriptor-ExtIEs } } OPTIONAL +} + +NonDynamicPQIDescriptor-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +NonUPTrafficType ::= ENUMERATED {ue-associated, non-ue-associated, non-f1, bap-control-pdu,...} + +NoofDownlinkSymbols ::= INTEGER (0..14) + +NoofUplinkSymbols ::= INTEGER (0..14) + +Notification-Cause ::= ENUMERATED {fulfilled, not-fulfilled, ...} + +NotificationControl ::= ENUMERATED {active, not-active, ...} + +NotificationInformation ::= SEQUENCE { + message-Identifier MessageIdentifier, + serialNumber SerialNumber, + iE-Extensions ProtocolExtensionContainer { { NotificationInformationExtIEs} } OPTIONAL, + ... +} + +NotificationInformationExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +NPNBroadcastInformation ::= CHOICE { + sNPN-Broadcast-Information NPN-Broadcast-Information-SNPN, + pNI-NPN-Broadcast-Information NPN-Broadcast-Information-PNI-NPN, + choice-extension ProtocolIE-SingleContainer { {NPNBroadcastInformation-ExtIEs} } +} + +NPNBroadcastInformation-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +NPN-Broadcast-Information-SNPN ::= SEQUENCE { + broadcastSNPNID-List BroadcastSNPN-ID-List, + iE-Extension ProtocolExtensionContainer { {NPN-Broadcast-Information-SNPN-ExtIEs} } OPTIONAL, + ... +} + +NPN-Broadcast-Information-SNPN-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} +NPN-Broadcast-Information-PNI-NPN ::= SEQUENCE { + broadcastPNI-NPN-ID-Information BroadcastPNI-NPN-ID-List, + iE-Extension ProtocolExtensionContainer { {NPN-Broadcast-Information-PNI-NPN-ExtIEs} } OPTIONAL, + ... +} + +NPN-Broadcast-Information-PNI-NPN-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +NPNSupportInfo ::= CHOICE { + sNPN-Information NID, + choice-extension ProtocolIE-SingleContainer { { NPNSupportInfo-ExtIEs } } +} + +NPNSupportInfo-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +NRCarrierList ::= SEQUENCE (SIZE(1..maxnoofNRSCSs)) OF NRCarrierItem + +NRCarrierItem ::= SEQUENCE { + carrierSCS NRSCS, + offsetToCarrier INTEGER (0..2199, ...), + carrierBandwidth INTEGER (0..maxnoofPhysicalResourceBlocks, ...), + iE-Extension ProtocolExtensionContainer { {NRCarrierItem-ExtIEs} } OPTIONAL, + ... +} + +NRCarrierItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +NRFreqInfo ::= SEQUENCE { + nRARFCN INTEGER (0..maxNRARFCN), + sul-Information SUL-Information OPTIONAL, + freqBandListNr SEQUENCE (SIZE(1..maxnoofNrCellBands)) OF FreqBandNrItem, + iE-Extensions ProtocolExtensionContainer { { NRFreqInfoExtIEs} } OPTIONAL, + ... +} + +NRFreqInfoExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-FrequencyShift7p5khz CRITICALITY ignore EXTENSION FrequencyShift7p5khz PRESENCE optional }, + ... +} + +NRCGI ::= SEQUENCE { + pLMN-Identity PLMN-Identity, + nRCellIdentity NRCellIdentity, + iE-Extensions ProtocolExtensionContainer { {NRCGI-ExtIEs} } OPTIONAL, + ... +} + +NRCGI-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +NR-Mode-Info ::= CHOICE { + fDD FDD-Info, + tDD TDD-Info, + choice-extension ProtocolIE-SingleContainer { { NR-Mode-Info-ExtIEs} } +} + +NR-Mode-Info-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + + + +NRPRACHConfig ::= SEQUENCE { + ulPRACHConfigList NRPRACHConfigList OPTIONAL, + sulPRACHConfigList NRPRACHConfigList OPTIONAL, + iE-Extension ProtocolExtensionContainer { {NRPRACHConfig-ExtIEs} } OPTIONAL, + ... +} + +NRPRACHConfig-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +NRCellIdentity ::= BIT STRING (SIZE(36)) + +NRNRB ::= ENUMERATED { nrb11, nrb18, nrb24, nrb25, nrb31, nrb32, nrb38, nrb51, nrb52, nrb65, nrb66, nrb78, nrb79, nrb93, nrb106, nrb107, nrb121, nrb132, nrb133, nrb135, nrb160, nrb162, nrb189, nrb216, nrb217, nrb245, nrb264, nrb270, nrb273, ...} + +NRPCI ::= INTEGER(0..1007) + + +NRPRACHConfigList ::= SEQUENCE (SIZE(0..maxnoofPRACHconfigs)) OF NRPRACHConfigItem + +NRPRACHConfigItem ::= SEQUENCE { + nRSCS NRSCS, + prachFreqStartfromCarrier INTEGER (0..maxnoofPhysicalResourceBlocks-1, ...), + msg1FDM ENUMERATED {one, two, four, eight, ...}, + parchConfigIndex INTEGER (0..255, ...), + ssb-perRACH-Occasion ENUMERATED {oneEighth, oneFourth, oneHalf, one, + two, four, eight, sixteen, ...}, + freqDomainLength FreqDomainLength, + zeroCorrelZoneConfig INTEGER (0..15), + iE-Extension ProtocolExtensionContainer { { NRPRACHConfigItem-ExtIEs} } OPTIONAL, + ... +} + +NRPRACHConfigItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +NRSCS ::= ENUMERATED { scs15, scs30, scs60, scs120, ...} + +NRUERLFReportContainer ::= OCTET STRING + +NumberofActiveUEs ::= INTEGER(0..16777215, ...) + +NumberOfBroadcasts ::= INTEGER (0..65535) + +NumberofBroadcastRequest ::= INTEGER (0..65535) + +NumDLULSymbols ::= SEQUENCE { + numDLSymbols INTEGER (0..13, ...), + numULSymbols INTEGER (0..13, ...), + iE-Extensions ProtocolExtensionContainer { { NumDLULSymbols-ExtIEs} } OPTIONAL +} + +NumDLULSymbols-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +NRV2XServicesAuthorized ::= SEQUENCE { + vehicleUE VehicleUE OPTIONAL, + pedestrianUE PedestrianUE OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {NRV2XServicesAuthorized-ExtIEs} } OPTIONAL +} + +NRV2XServicesAuthorized-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +NRUESidelinkAggregateMaximumBitrate ::= SEQUENCE { + uENRSidelinkAggregateMaximumBitrate BitRate, + iE-Extensions ProtocolExtensionContainer { {NRUESidelinkAggregateMaximumBitrate-ExtIEs} } OPTIONAL +} + +NRUESidelinkAggregateMaximumBitrate-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +NZP-CSI-RS-ResourceID::= INTEGER (0..191, ...) + + +-- O + +OffsetToPointA ::= INTEGER (0..2199,...) + + +-- P + +PacketDelayBudget ::= INTEGER (0..1023, ...) + +PacketErrorRate ::= SEQUENCE { + pER-Scalar PER-Scalar, + pER-Exponent PER-Exponent, + iE-Extensions ProtocolExtensionContainer { {PacketErrorRate-ExtIEs} } OPTIONAL, + ... +} + +PacketErrorRate-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PER-Scalar ::= INTEGER (0..9, ...) +PER-Exponent ::= INTEGER (0..9, ...) + +PagingCell-Item ::= SEQUENCE { + nRCGI NRCGI , + iE-Extensions ProtocolExtensionContainer { { PagingCell-ItemExtIEs } } OPTIONAL +} + +PagingCell-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PagingDRX ::= ENUMERATED { + v32, + v64, + v128, + v256, + ... +} + +PagingIdentity ::= CHOICE { + rANUEPagingIdentity RANUEPagingIdentity, + cNUEPagingIdentity CNUEPagingIdentity, + choice-extension ProtocolIE-SingleContainer { { PagingIdentity-ExtIEs } } +} + +PagingIdentity-ExtIEs F1AP-PROTOCOL-IES::= { + ... +} + +PagingOrigin ::= ENUMERATED { non-3gpp, ...} + +PagingPriority ::= ENUMERATED { priolevel1, priolevel2, priolevel3, priolevel4, priolevel5, priolevel6, priolevel7, priolevel8,...} + + +RelativePathDelay ::= CHOICE { + k0 INTEGER (0..16351,...), + k1 INTEGER (0..8176,...), + k2 INTEGER (0..4088,...), + k3 INTEGER (0..2044,...), + k4 INTEGER (0..1022,...), + k5 INTEGER (0..511,...), + choice-extension ProtocolIE-SingleContainer { { RelativePathDelay-ExtIEs } } +} + +RelativePathDelay-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +PathlossReferenceInfo ::= SEQUENCE { + pathlossReferenceSignal PathlossReferenceSignal, + iE-Extensions ProtocolExtensionContainer { {PathlossReferenceInfo-ExtIEs} } OPTIONAL +} + +PathlossReferenceInfo-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PathlossReferenceSignal ::= CHOICE { + sSB SSB, + dL-PRS DL-PRS, + choice-extension ProtocolIE-SingleContainer {{PathlossReferenceSignal-ExtIEs }} +} + +PathlossReferenceSignal-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +PC5QoSFlowIdentifier ::= INTEGER (1..2048) + +PC5-QoS-Characteristics ::= CHOICE { + non-Dynamic-PQI NonDynamicPQIDescriptor, + dynamic-PQI DynamicPQIDescriptor, + choice-extension ProtocolIE-SingleContainer { { PC5-QoS-Characteristics-ExtIEs } } +} + +PC5-QoS-Characteristics-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + + +PC5QoSParameters ::= SEQUENCE { + pC5-QoS-Characteristics PC5-QoS-Characteristics, + pC5-QoS-Flow-Bit-Rates PC5FlowBitRates OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { PC5QoSParameters-ExtIEs } } OPTIONAL, + ... +} + +PC5QoSParameters-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PC5FlowBitRates ::= SEQUENCE { + guaranteedFlowBitRate BitRate, + maximumFlowBitRate BitRate, + iE-Extensions ProtocolExtensionContainer { { PC5FlowBitRates-ExtIEs } } OPTIONAL, + ... +} + +PC5FlowBitRates-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PDCCH-BlindDetectionSCG ::= OCTET STRING + +PDCP-SN ::= INTEGER (0..4095) + +PDCPSNLength ::= ENUMERATED { twelve-bits,eighteen-bits,...} + +PDUSessionID ::= INTEGER (0..255) + +ReportingPeriodicityValue ::= INTEGER (0..512, ...) + +Periodicity ::= INTEGER (0..640000, ...) + +PeriodicitySRS ::= ENUMERATED { ms0p125, ms0p25, ms0p5, ms0p625, ms1, ms1p25, ms2, ms2p5, ms4, ms5, ms8, ms10, ms16, ms20, ms32, ms40, ms64, ms80, ms160, ms320, ms640, ms1280, ms2560, ms5120, ms10240, ...} + +PeriodicityList ::= SEQUENCE (SIZE(1.. maxnoSRS-ResourcePerSet)) OF PeriodicityList-Item + +PeriodicityList-Item ::= SEQUENCE { + periodicitySRS PeriodicitySRS, + iE-Extensions ProtocolExtensionContainer { { PeriodicityList-ItemExtIEs} } OPTIONAL +} + +PeriodicityList-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +Permutation ::= ENUMERATED {dfu, ufd, ...} + +Ph-InfoMCG ::= OCTET STRING + +Ph-InfoSCG ::= OCTET STRING + +PLMN-Identity ::= OCTET STRING (SIZE(3)) + +PortNumber ::= BIT STRING (SIZE (16)) + + +PosAssistance-Information ::= OCTET STRING + +PosAssistanceInformationFailureList ::= OCTET STRING + +PosBroadcast ::= ENUMERATED { + start, + stop, + ... +} + +PositioningBroadcastCells ::= SEQUENCE (SIZE (1..maxnoBcastCell)) OF NRCGI + +PosMeasurementPeriodicity ::= ENUMERATED +{ms120, ms240, ms480, ms640, ms1024, ms2048, ms5120, ms10240, min1, min6, min12, min30, min60, ...} + + +PosMeasurementQuantities ::= SEQUENCE (SIZE(1.. maxnoofPosMeas)) OF PosMeasurementQuantities-Item + +PosMeasurementQuantities-Item ::= SEQUENCE { + posMeasurementType PosMeasurementType, + timingReportingGranularityFactor INTEGER (0..5) OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { PosMeasurementQuantities-ItemExtIEs} } OPTIONAL +} + +PosMeasurementQuantities-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PosMeasurementResult ::= SEQUENCE (SIZE (1.. maxnoofPosMeas)) OF PosMeasurementResultItem + +PosMeasurementResultItem ::= SEQUENCE { + measuredResultsValue MeasuredResultsValue, + timeStamp TimeStamp, + measurementQuality TRPMeasurementQuality OPTIONAL, + measurementBeamInfo MeasurementBeamInfo OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { PosMeasurementResultItemExtIEs } } OPTIONAL +} + +PosMeasurementResultItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PosMeasurementResultList ::= SEQUENCE (SIZE(1.. maxNoOfMeasTRPs)) OF PosMeasurementResultList-Item + +PosMeasurementResultList-Item ::= SEQUENCE { + posMeasurementResult PosMeasurementResult, + tRPID TRPID, + iE-Extensions ProtocolExtensionContainer { { PosMeasurementResultList-ItemExtIEs} } OPTIONAL +} + +PosMeasurementResultList-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PosMeasurementType ::= ENUMERATED { + gnb-rx-tx, + ul-srs-rsrp, + ul-aoa, + ul-rtoa, + ... +} + +PosReportCharacteristics ::= ENUMERATED { + ondemand, + periodic, + ... +} + +PosResourceSetType ::= CHOICE { + periodic PosResourceSetTypePR, + semi-persistent PosResourceSetTypeSP, + aperiodic PosResourceSetTypeAP, + choice-extension ProtocolIE-SingleContainer {{ PosResourceSetType-ExtIEs }} +} + +PosResourceSetType-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +PosResourceSetTypePR ::= SEQUENCE { + posperiodicSet ENUMERATED{true, ...}, + iE-Extensions ProtocolExtensionContainer { { PosResourceSetTypePR-ExtIEs} } OPTIONAL +} + +PosResourceSetTypePR-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PosResourceSetTypeSP ::= SEQUENCE { + possemi-persistentSet ENUMERATED{true, ...}, + iE-Extensions ProtocolExtensionContainer { { PosResourceSetTypeSP-ExtIEs} } OPTIONAL +} + +PosResourceSetTypeSP-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PosResourceSetTypeAP ::= SEQUENCE { + sRSResourceTrigger-List INTEGER(1..3), + iE-Extensions ProtocolExtensionContainer { { PosResourceSetTypeAP-ExtIEs} } OPTIONAL +} + +PosResourceSetTypeAP-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PosSRSResourceID-List ::= SEQUENCE (SIZE (1..maxnoSRS-PosResourcePerSet)) OF SRSPosResourceID + +PosSRSResource-Item ::= SEQUENCE { + srs-PosResourceId SRSPosResourceID, + transmissionCombPos TransmissionCombPos, + startPosition INTEGER (0..13), + nrofSymbols ENUMERATED {n1, n2, n4, n8, n12}, + freqDomainShift INTEGER (0..268), + c-SRS INTEGER (0..63), + groupOrSequenceHopping ENUMERATED { neither, groupHopping, sequenceHopping }, + resourceTypePos ResourceTypePos, + sequenceId INTEGER (0.. 65535), + spatialRelationPos SpatialRelationPos OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { PosSRSResource-Item-ExtIEs} } OPTIONAL +} + +PosSRSResource-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PosSRSResource-List ::= SEQUENCE (SIZE (1..maxnoSRS-PosResources)) OF PosSRSResource-Item + +PosSRSResourceSet-Item ::= SEQUENCE { + possrsResourceSetID INTEGER(0..15), + possRSResourceID-List PosSRSResourceID-List, + posresourceSetType PosResourceSetType, + iE-Extensions ProtocolExtensionContainer { { PosSRSResourceSet-Item-ExtIEs} } OPTIONAL +} + +PosSRSResourceSet-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PosSRSResourceSet-List ::= SEQUENCE (SIZE (1..maxnoSRS-PosResourceSets)) OF PosSRSResourceSet-Item + +PrimaryPathIndication ::= ENUMERATED { + true, + false, + ... +} + +Pre-emptionCapability ::= ENUMERATED { + shall-not-trigger-pre-emption, + may-trigger-pre-emption +} + +Pre-emptionVulnerability ::= ENUMERATED { + not-pre-emptable, + pre-emptable +} + +PriorityLevel ::= INTEGER { spare (0), highest (1), lowest (14), no-priority (15) } (0..15) + +ProtectedEUTRAResourceIndication ::= OCTET STRING + +Protected-EUTRA-Resources-Item ::= SEQUENCE { + spectrumSharingGroupID SpectrumSharingGroupID, + eUTRACells-List EUTRACells-List, + iE-Extensions ProtocolExtensionContainer { { Protected-EUTRA-Resources-ItemExtIEs } } OPTIONAL +} + +Protected-EUTRA-Resources-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PRSConfiguration ::= SEQUENCE { + pRSResourceSet-List PRSResourceSet-List, + iE-Extensions ProtocolExtensionContainer { { PRSConfiguration-ExtIEs } } OPTIONAL +} + +PRSConfiguration-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PRSInformationPos ::= SEQUENCE { + pRS-IDPos INTEGER(0..255) OPTIONAL, + pRS-Resource-Set-IDPos INTEGER(0..7), + pRS-Resource-IDPos INTEGER(0..63), + iE-Extensions ProtocolExtensionContainer { { PRSInformationPos-ExtIEs} } OPTIONAL +} + +PRSInformationPos-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Potential-SpCell-Item ::= SEQUENCE { + potential-SpCell-ID NRCGI , + iE-Extensions ProtocolExtensionContainer { { Potential-SpCell-ItemExtIEs } } OPTIONAL, + ... +} + +Potential-SpCell-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +PRSAngleList ::= SEQUENCE (SIZE(1.. maxnoofPRS-ResourcesPerSet)) OF PRSAngleItem + +PRSAngleItem ::= SEQUENCE { + nR-PRS-Azimuth INTEGER (0..359), + nR-PRS-Azimuth-fine INTEGER (0..9), + nR-PRS-Elevation INTEGER (0..180), + nR-PRS-Elevation-fine INTEGER (0..9), + iE-Extensions ProtocolExtensionContainer { { PRSAngleItem-ItemExtIEs } } OPTIONAL +} + +PRSAngleItem-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PRSMuting::= SEQUENCE { + pRSMutingOption1 PRSMutingOption1, + pRSMutingOption2 PRSMutingOption2, + iE-Extensions ProtocolExtensionContainer { { PRSMuting-ExtIEs} } OPTIONAL +} + +PRSMuting-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PRSMutingOption1 ::= SEQUENCE { + mutingPattern DL-PRSMutingPattern, + mutingBitRepetitionFactor ENUMERATED{rf1,rf2,rf4,rf8,...}, + iE-Extensions ProtocolExtensionContainer { { PRSMutingOption1-ExtIEs} } OPTIONAL +} + +PRSMutingOption1-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PRSMutingOption2 ::= SEQUENCE { + mutingPattern DL-PRSMutingPattern, + iE-Extensions ProtocolExtensionContainer { { PRSMutingOption2-ExtIEs} } OPTIONAL +} + +PRSMutingOption2-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PRS-Resource-ID ::= INTEGER (0..63) + +PRSResource-List::= SEQUENCE (SIZE (1..maxnoofPRSresources)) OF PRSResource-Item + +PRSResource-Item ::= SEQUENCE { + pRSResourceID INTEGER(0..63), + sequenceID INTEGER(0..4095,...), + rEOffset INTEGER(0..11), + resourceSlotOffset INTEGER(0..511,...), + resourceSymbolOffset INTEGER(0..12,...), + qCLInfo PRSResource-QCLInfo OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { PRSResource-Item-ExtIEs} } OPTIONAL +} + +PRSResource-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PRSResource-QCLInfo ::= SEQUENCE { + qCLSourceSSBIndex INTEGER(0..63) OPTIONAL, + qCLSourcePRSInfo PRSResource-QCLSourcePRSInfo OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { PRSResource-QCLInfo-ExtIEs} } OPTIONAL, + ... +} +PRSResource-QCLInfo-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PRSResource-QCLSourcePRSInfo ::= SEQUENCE { + qCLSourcePRSResourceSetID INTEGER(0..7), + qCLSourcePRSResourceID INTEGER(0..63) OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { PRSResource-QCLSourcePRSInfo-ExtIEs} } OPTIONAL +} + +PRSResource-QCLSourcePRSInfo-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PRS-Resource-Set-ID ::= INTEGER(0..7) + +PRSResourceSet-List ::= SEQUENCE (SIZE (1.. maxnoofPRSresourceSets)) OF PRSResourceSet-Item +PRSResourceSet-Item ::= SEQUENCE { + pRSResourceSetID PRS-Resource-Set-ID, + subcarrierSpacing ENUMERATED{kHz15, kHz30, kHz60, kHz120, ...}, + pRSbandwidth INTEGER(1..63), + startPRB INTEGER(0..2176), + pointA INTEGER (0..3279165), + combSize ENUMERATED{n2, n4, n6, n12, ...}, + cPType ENUMERATED{normal, extended, ...}, + resourceSetPeriodicity ENUMERATED{n4,n5,n8,n10,n16,n20,n32,n40,n64,n80,n160,n320,n640,n1280,n2560,n5120,n10240,n20480,n40960, n81920,...}, + resourceSetSlotOffset INTEGER(0..81919,...), + resourceRepetitionFactor ENUMERATED{rf1,rf2,rf4,rf6,rf8,rf16,rf32,...}, + resourceTimeGap ENUMERATED{tg1,tg2,tg4,tg8,tg16,tg32,...}, + resourceNumberofSymbols ENUMERATED{n2,n4,n6,n12,...}, + pRSMuting PRSMuting OPTIONAL, + pRSResourceTransmitPower INTEGER(-60..50), + pRSResource-List PRSResource-List, + iE-Extensions ProtocolExtensionContainer { { PRSResourceSet-Item-ExtIEs} } OPTIONAL +} + +PRSResourceSet-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PWS-Failed-NR-CGI-Item ::= SEQUENCE { + nRCGI NRCGI, + numberOfBroadcasts NumberOfBroadcasts, + iE-Extensions ProtocolExtensionContainer { { PWS-Failed-NR-CGI-ItemExtIEs } } OPTIONAL, + ... +} + +PWS-Failed-NR-CGI-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PWSSystemInformation ::= SEQUENCE { + sIBtype SIBType-PWS, + sIBmessage OCTET STRING, + iE-Extensions ProtocolExtensionContainer { { PWSSystemInformationExtIEs } } OPTIONAL, + ... +} + +PWSSystemInformationExtIEs F1AP-PROTOCOL-EXTENSION ::= { + {ID id-NotificationInformation CRITICALITY ignore EXTENSION NotificationInformation PRESENCE optional}| + { ID id-AdditionalSIBMessageList CRITICALITY reject EXTENSION AdditionalSIBMessageList PRESENCE optional}, + ... +} + +PrivacyIndicator ::= ENUMERATED {immediate-MDT, logged-MDT, ...} + +-- Q + +QCI ::= INTEGER (0..255) + +QoS-Characteristics ::= CHOICE { + non-Dynamic-5QI NonDynamic5QIDescriptor, + dynamic-5QI Dynamic5QIDescriptor, + choice-extension ProtocolIE-SingleContainer { { QoS-Characteristics-ExtIEs } } +} + +QoS-Characteristics-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +QoSFlowIdentifier ::= INTEGER (0..63) + +QoSFlowLevelQoSParameters ::= SEQUENCE { + qoS-Characteristics QoS-Characteristics, + nGRANallocationRetentionPriority NGRANAllocationAndRetentionPriority, + gBR-QoS-Flow-Information GBR-QoSFlowInformation OPTIONAL, + reflective-QoS-Attribute ENUMERATED {subject-to, ...} OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { QoSFlowLevelQoSParameters-ExtIEs } } OPTIONAL +} + +QoSFlowLevelQoSParameters-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-PDUSessionID CRITICALITY ignore EXTENSION PDUSessionID PRESENCE optional}| + { ID id-ULPDUSessionAggregateMaximumBitRate CRITICALITY ignore EXTENSION BitRate PRESENCE optional}| + { ID id-QosMonitoringRequest CRITICALITY ignore EXTENSION QosMonitoringRequest PRESENCE optional}, + ... +} + +QoSFlowMappingIndication ::= ENUMERATED {ul,dl,...} + +QoSInformation ::= CHOICE { + eUTRANQoS EUTRANQoS, + choice-extension ProtocolIE-SingleContainer { { QoSInformation-ExtIEs} } +} + +QoSInformation-ExtIEs F1AP-PROTOCOL-IES ::= { + { ID id-DRB-Information CRITICALITY ignore TYPE DRB-Information PRESENCE mandatory}, + ... +} + +QosMonitoringRequest ::= ENUMERATED {ul, dl, both, ...} + +QoSParaSetIndex ::= INTEGER (1..8, ...) + +QoSParaSetNotifyIndex ::= INTEGER (0..8, ...) + +-- R + +RACH-Config-Common ::= OCTET STRING + +RACH-Config-Common-IAB ::= OCTET STRING + +RACHReportContainer::= OCTET STRING + +RACHReportInformationList ::= SEQUENCE (SIZE(1.. maxnoofRACHReports)) OF RACHReportInformationItem + +RACHReportInformationItem ::= SEQUENCE { + rACHReportContainer RACHReportContainer, + uEAssitantIdentifier GNB-DU-UE-F1AP-ID OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { RACHReportInformationItem-ExtIEs} } OPTIONAL, + ... +} + +RACHReportInformationItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + + +RadioResourceStatus ::= SEQUENCE { + sSBAreaRadioResourceStatusList SSBAreaRadioResourceStatusList, + iE-Extensions ProtocolExtensionContainer { { RadioResourceStatus-ExtIEs} } OPTIONAL +} + +RadioResourceStatus-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +RANAC ::= INTEGER (0..255) + +RAN-MeasurementID ::= INTEGER (1.. 65536, ...) + +RAN-UE-MeasurementID ::= INTEGER (1.. 256, ...) + +RANUEID ::= OCTET STRING (SIZE (8)) + +RANUEPagingIdentity ::= SEQUENCE { + iRNTI BIT STRING (SIZE(40)), + iE-Extensions ProtocolExtensionContainer { { RANUEPagingIdentity-ExtIEs } } OPTIONAL} + +RANUEPagingIdentity-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +RAT-FrequencyPriorityInformation::= CHOICE { + eNDC SubscriberProfileIDforRFP, + nGRAN RAT-FrequencySelectionPriority, + choice-extension ProtocolIE-SingleContainer { { RAT-FrequencyPriorityInformation-ExtIEs} } +} + +RAT-FrequencyPriorityInformation-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +RAT-FrequencySelectionPriority::= INTEGER (1.. 256, ...) + +Reestablishment-Indication ::= ENUMERATED { + reestablished, + ... +} + +ReferencePoint ::= CHOICE { + coordinateID CoordinateID, + referencePointCoordinate AccessPointPosition, + referencePointCoordinateHA NGRANHighAccuracyAccessPointPosition, + choice-Extension ProtocolIE-SingleContainer { { ReferencePoint-ExtIEs} } +} + +ReferencePoint-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +ReferenceSFN ::= INTEGER (0..1023) + +ReferenceSignal ::= CHOICE { + nZP-CSI-RS NZP-CSI-RS-ResourceID, + sSB SSB, + sRS SRSResourceID, + positioningSRS SRSPosResourceID, + dL-PRS DL-PRS, + choice-extension ProtocolIE-SingleContainer {{ReferenceSignal-ExtIEs }} +} + +ReferenceSignal-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +RelativeCartesianLocation ::= SEQUENCE { + xYZunit ENUMERATED {mm, cm, dm, ...}, + xvalue INTEGER (-65536..65535), + yvalue INTEGER (-65536..65535), + zvalue INTEGER (-32768..32767), + locationUncertainty LocationUncertainty, + iE-Extensions ProtocolExtensionContainer { { RelativeCartesianLocation-ExtIEs} } OPTIONAL +} + +RelativeCartesianLocation-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +RelativeGeodeticLocation ::= SEQUENCE { + milli-Arc-SecondUnits ENUMERATED {zerodot03, zerodot3, three, ...}, + heightUnits ENUMERATED {mm, cm, m, ...}, + deltaLatitude INTEGER (-1024.. 1023), + deltaLongitude INTEGER (-1024.. 1023), + deltaHeight INTEGER (-1024.. 1023), + locationUncertainty LocationUncertainty, + iE-extensions ProtocolExtensionContainer {{RelativeGeodeticLocation-ExtIEs }} OPTIONAL +} + +RelativeGeodeticLocation-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ReferenceTime ::= OCTET STRING + +RegistrationRequest ::= ENUMERATED{start, stop, add, ...} + +ReportCharacteristics ::= BIT STRING (SIZE(32)) + +ReportingPeriodicity ::= ENUMERATED{ms500, ms1000, ms2000, ms5000, ms10000, ...} + +RequestedBandCombinationIndex ::= OCTET STRING + +RequestedFeatureSetEntryIndex ::= OCTET STRING + +RequestedP-MaxFR2 ::= OCTET STRING + +Requested-PDCCH-BlindDetectionSCG ::= OCTET STRING + + +RequestedSRSTransmissionCharacteristics ::= SEQUENCE { + numberOfTransmissions INTEGER (0..500, ...) OPTIONAL, + resourceType ENUMERATED {periodic, semi-persistent, aperiodic,...}, + bandwidthSRS BandwidthSRS, + sRSResourceSetList SRSResourceSetList OPTIONAL, + sSBInformation SSBInformation OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { RequestedSRSTransmissionCharacteristics-ExtIEs} } OPTIONAL +} + +RequestedSRSTransmissionCharacteristics-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +RequestType ::= ENUMERATED {offer, execution, ...} + +ResourceCoordinationEUTRACellInfo ::= SEQUENCE { + eUTRA-Mode-Info EUTRA-Coex-Mode-Info, + eUTRA-PRACH-Configuration EUTRA-PRACH-Configuration, + iE-Extensions ProtocolExtensionContainer { { ResourceCoordinationEUTRACellInfo-ExtIEs } } OPTIONAL, + ... +} + +ResourceCoordinationEUTRACellInfo-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + {ID id-IgnorePRACHConfiguration CRITICALITY reject EXTENSION IgnorePRACHConfiguration PRESENCE optional }, + ... +} + +ResourceCoordinationTransferInformation ::= SEQUENCE { + meNB-Cell-ID EUTRA-Cell-ID, + resourceCoordinationEUTRACellInfo ResourceCoordinationEUTRACellInfo OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { ResourceCoordinationTransferInformation-ExtIEs } } OPTIONAL, + ... +} + +ResourceCoordinationTransferInformation-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ResourceCoordinationTransferContainer ::= OCTET STRING + +ResourceSetType ::= CHOICE { + periodic ResourceSetTypePeriodic, + semi-persistent ResourceSetTypeSemi-persistent, + aperiodic ResourceSetTypeAperiodic, + choice-extension ProtocolIE-SingleContainer {{ ResourceSetType-ExtIEs }} +} + +ResourceSetType-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +ResourceSetTypePeriodic ::= SEQUENCE { + periodicSet ENUMERATED{true, ...}, + iE-Extensions ProtocolExtensionContainer { { ResourceSetTypePeriodic-ExtIEs} } OPTIONAL +} + +ResourceSetTypePeriodic-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ResourceSetTypeSemi-persistent ::= SEQUENCE { + semi-persistentSet ENUMERATED{true, ...}, + iE-Extensions ProtocolExtensionContainer { { ResourceSetTypeSemi-persistent-ExtIEs} } OPTIONAL +} + +ResourceSetTypeSemi-persistent-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ResourceSetTypeAperiodic ::= SEQUENCE { + sRSResourceTrigger-List INTEGER(1..3), + slotoffset INTEGER(1..32), + iE-Extensions ProtocolExtensionContainer { { ResourceSetTypeAperiodic-ExtIEs} } OPTIONAL +} + +ResourceSetTypeAperiodic-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +RepetitionPeriod ::= INTEGER (0..131071, ...) + +ReportingRequestType ::= SEQUENCE { + eventType EventType, + reportingPeriodicityValue ReportingPeriodicityValue OPTIONAL, + -- C-ifEventTypeisPeriodic: This IE shall be present if the Event Type IE is set to "periodic" in the Event Type IE. + iE-Extensions ProtocolExtensionContainer { {ReportingRequestType-ExtIEs} } OPTIONAL +} + +ReportingRequestType-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ResourceType ::= CHOICE { + periodic ResourceTypePeriodic, + semi-persistent ResourceTypeSemi-persistent, + aperiodic ResourceTypeAperiodic, + choice-extension ProtocolIE-SingleContainer {{ ResourceType-ExtIEs }} +} + +ResourceType-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +ResourceTypePeriodic ::= SEQUENCE { + periodicity ENUMERATED{slot1, slot2, slot4, slot5, slot8, slot10, slot16, slot20, slot32, slot40, slot64, slot80, slot160, slot320, slot640, slot1280, slot2560, ...}, + offset INTEGER(0..2559, ...), + iE-Extensions ProtocolExtensionContainer { { ResourceTypePeriodic-ExtIEs} } OPTIONAL +} + +ResourceTypePeriodic-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ResourceTypeSemi-persistent ::= SEQUENCE { + periodicity ENUMERATED{slot1, slot2, slot4, slot5, slot8, slot10, slot16, slot20, slot32, slot40, slot64, slot80, slot160, slot320, slot640, slot1280, slot2560, ...}, + offset INTEGER(0..2559, ...), + iE-Extensions ProtocolExtensionContainer { { ResourceTypeSemi-persistent-ExtIEs} } OPTIONAL +} + +ResourceTypeSemi-persistent-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ResourceTypeAperiodic ::= SEQUENCE { + aperiodicResourceType ENUMERATED{true, ...}, + iE-Extensions ProtocolExtensionContainer { { ResourceTypeAperiodic-ExtIEs} } OPTIONAL +} + +ResourceTypeAperiodic-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ResourceTypePos ::= CHOICE { + periodic ResourceTypePeriodicPos, + semi-persistent ResourceTypeSemi-persistentPos, + aperiodic ResourceTypeAperiodicPos, + choice-extension ProtocolIE-SingleContainer {{ ResourceTypePos-ExtIEs }} +} + +ResourceTypePos-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +ResourceTypePeriodicPos ::= SEQUENCE { + periodicity ENUMERATED{slot1, slot2, slot4, slot5, slot8, slot10, slot16, slot20, slot32, slot40, slot64, slot80, slot160, slot320, slot640, slot1280, slot2560, slot5120, slot10240, slot20480, slot40960, slot81920, ...}, + offset INTEGER(0..81919, ...), + iE-Extensions ProtocolExtensionContainer { { ResourceTypePeriodicPos-ExtIEs} } OPTIONAL +} + +ResourceTypePeriodicPos-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ResourceTypeSemi-persistentPos ::= SEQUENCE { + periodicity ENUMERATED{slot1, slot2, slot4, slot5, slot8, slot10, slot16, slot20, slot32, slot40, slot64, slot80, slot160, slot320, slot640, slot1280, slot2560, slot5120, slot10240, slot20480, slot40960, slot81920, ...}, + offset INTEGER(0..81919, ...), + iE-Extensions ProtocolExtensionContainer { { ResourceTypeSemi-persistentPos-ExtIEs} } OPTIONAL +} + +ResourceTypeSemi-persistentPos-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ResourceTypeAperiodicPos ::= SEQUENCE { + slotOffset INTEGER (1..32), + iE-Extensions ProtocolExtensionContainer { { ResourceTypeAperiodicPos-ExtIEs} } OPTIONAL +} + +ResourceTypeAperiodicPos-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +RLCDuplicationInformation ::= SEQUENCE { + rLCDuplicationStateList RLCDuplicationStateList, + primaryPathIndication PrimaryPathIndication OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {RLCDuplicationInformation-ExtIEs} } OPTIONAL +} + +RLCDuplicationInformation-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +RLCDuplicationStateList ::= SEQUENCE (SIZE(1..maxnoofRLCDuplicationState)) OF RLCDuplicationState-Item + +RLCDuplicationState-Item ::=SEQUENCE { + duplicationState DuplicationState, + iE-Extensions ProtocolExtensionContainer { {RLCDuplicationState-Item-ExtIEs } } OPTIONAL, + ... +} + + +RLCDuplicationState-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +RLCFailureIndication ::= SEQUENCE { + assocatedLCID LCID, + iE-Extensions ProtocolExtensionContainer { {RLCFailureIndication-ExtIEs} } OPTIONAL +} + +RLCFailureIndication-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +RLCMode ::= ENUMERATED { + rlc-am, + rlc-um-bidirectional, + rlc-um-unidirectional-ul, + rlc-um-unidirectional-dl, + ... +} + +RLC-Status ::= SEQUENCE { + reestablishment-Indication Reestablishment-Indication, + iE-Extensions ProtocolExtensionContainer { { RLC-Status-ExtIEs } } OPTIONAL, + ... +} + +RLC-Status-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +RLFReportInformationList ::= SEQUENCE (SIZE(1.. maxnoofRLFReports)) OF RLFReportInformationItem + +RLFReportInformationItem ::= SEQUENCE { + nRUERLFReportContainer NRUERLFReportContainer, + uEAssitantIdentifier GNB-DU-UE-F1AP-ID OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { RLFReportInformationItem-ExtIEs} } OPTIONAL, + ... +} + +RLFReportInformationItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +RIMRSDetectionStatus ::= ENUMERATED {rs-detected, rs-disappeared, ...} + +RRCContainer ::= OCTET STRING + +RRCContainer-RRCSetupComplete ::= OCTET STRING + +RRCDeliveryStatus ::= SEQUENCE { + delivery-status PDCP-SN, + triggering-message PDCP-SN, + iE-Extensions ProtocolExtensionContainer { { RRCDeliveryStatus-ExtIEs } } OPTIONAL} + +RRCDeliveryStatus-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +RRCDeliveryStatusRequest ::= ENUMERATED {true, ...} + +RRCReconfigurationCompleteIndicator ::= ENUMERATED { + true, + ..., + failure +} + +RRC-Version ::= SEQUENCE { + latest-RRC-Version BIT STRING (SIZE(3)), + iE-Extensions ProtocolExtensionContainer { { RRC-Version-ExtIEs } } OPTIONAL} + +RRC-Version-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + {ID id-latest-RRC-Version-Enhanced CRITICALITY ignore EXTENSION OCTET STRING (SIZE(3)) PRESENCE optional }, + ... +} + +RoutingID ::= OCTET STRING + +-- S + +SCell-FailedtoSetup-Item ::= SEQUENCE { + sCell-ID NRCGI , + cause Cause OPTIONAL , + iE-Extensions ProtocolExtensionContainer { { SCell-FailedtoSetup-ItemExtIEs } } OPTIONAL, + ... +} + +SCell-FailedtoSetup-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SCell-FailedtoSetupMod-Item ::= SEQUENCE { + sCell-ID NRCGI , + cause Cause OPTIONAL , + iE-Extensions ProtocolExtensionContainer { { SCell-FailedtoSetupMod-ItemExtIEs } } OPTIONAL, + ... +} + +SCell-FailedtoSetupMod-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SCell-ToBeRemoved-Item ::= SEQUENCE { + sCell-ID NRCGI , + iE-Extensions ProtocolExtensionContainer { { SCell-ToBeRemoved-ItemExtIEs } } OPTIONAL, + ... +} + +SCell-ToBeRemoved-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SCell-ToBeSetup-Item ::= SEQUENCE { + sCell-ID NRCGI , + sCellIndex SCellIndex, + sCellULConfigured CellULConfigured OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { SCell-ToBeSetup-ItemExtIEs } } OPTIONAL, + ... +} + +SCell-ToBeSetup-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-ServingCellMO CRITICALITY ignore EXTENSION ServingCellMO PRESENCE optional }, + ... +} + +SCell-ToBeSetupMod-Item ::= SEQUENCE { + sCell-ID NRCGI , + sCellIndex SCellIndex, + sCellULConfigured CellULConfigured OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { SCell-ToBeSetupMod-ItemExtIEs } } OPTIONAL, + ... +} + +SCell-ToBeSetupMod-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-ServingCellMO CRITICALITY ignore EXTENSION ServingCellMO PRESENCE optional }, + ... +} + +SCellIndex ::=INTEGER (1..31, ...) + +SCS-SpecificCarrier ::= SEQUENCE { + offsetToCarrier INTEGER (0..2199,...), + subcarrierSpacing ENUMERATED {kHz15, kHz30, kHz60, kHz120,...}, + carrierBandwidth INTEGER (0..275,...), + iE-Extensions ProtocolExtensionContainer { { SCS-SpecificCarrier-ExtIEs } } OPTIONAL +} + +SCS-SpecificCarrier-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Search-window-information ::= SEQUENCE { + expectedPropagationDelay INTEGER (-3841..3841,...), + delayUncertainty INTEGER (1..246,...), + iE-Extensions ProtocolExtensionContainer { { Search-window-information-ExtIEs } } OPTIONAL +} + +Search-window-information-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SerialNumber ::= BIT STRING (SIZE (16)) + +SIBType-PWS ::=INTEGER (6..8, ...) + +SelectedBandCombinationIndex ::= OCTET STRING + +SelectedFeatureSetEntryIndex ::= OCTET STRING + +CG-ConfigInfo ::= OCTET STRING + +ServCellIndex ::= INTEGER (0..31, ...) + +ServingCellMO ::= INTEGER (1..64, ...) + +Served-Cell-Information ::= SEQUENCE { + nRCGI NRCGI, + nRPCI NRPCI, + fiveGS-TAC FiveGS-TAC OPTIONAL, + configured-EPS-TAC Configured-EPS-TAC OPTIONAL, + servedPLMNs ServedPLMNs-List, + nR-Mode-Info NR-Mode-Info, + measurementTimingConfiguration OCTET STRING, + iE-Extensions ProtocolExtensionContainer { {Served-Cell-Information-ExtIEs} } OPTIONAL, + ... +} + +Served-Cell-Information-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-RANAC CRITICALITY ignore EXTENSION RANAC PRESENCE optional }| + { ID id-ExtendedServedPLMNs-List CRITICALITY ignore EXTENSION ExtendedServedPLMNs-List PRESENCE optional }| + { ID id-Cell-Direction CRITICALITY ignore EXTENSION Cell-Direction PRESENCE optional }| + { ID id-BPLMN-ID-Info-List CRITICALITY ignore EXTENSION BPLMN-ID-Info-List PRESENCE optional }| + { ID id-Cell-Type CRITICALITY ignore EXTENSION CellType PRESENCE optional}| + { ID id-ConfiguredTACIndication CRITICALITY ignore EXTENSION ConfiguredTACIndication PRESENCE optional }| + { ID id-AggressorgNBSetID CRITICALITY ignore EXTENSION AggressorgNBSetID PRESENCE optional}| + { ID id-VictimgNBSetID CRITICALITY ignore EXTENSION VictimgNBSetID PRESENCE optional}| + { ID id-IAB-Info-IAB-DU CRITICALITY ignore EXTENSION IAB-Info-IAB-DU PRESENCE optional}| + { ID id-SSB-PositionsInBurst CRITICALITY ignore EXTENSION SSB-PositionsInBurst PRESENCE optional }| + { ID id-NRPRACHConfig CRITICALITY ignore EXTENSION NRPRACHConfig PRESENCE optional }, + ... +} + +Served-Cells-To-Add-Item ::= SEQUENCE { + served-Cell-Information Served-Cell-Information, + gNB-DU-System-Information GNB-DU-System-Information OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { Served-Cells-To-Add-ItemExtIEs} } OPTIONAL, + ... +} + +Served-Cells-To-Add-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Served-Cells-To-Delete-Item ::= SEQUENCE { + oldNRCGI NRCGI , + iE-Extensions ProtocolExtensionContainer { { Served-Cells-To-Delete-ItemExtIEs } } OPTIONAL, + ... +} + +Served-Cells-To-Delete-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Served-Cells-To-Modify-Item ::= SEQUENCE { + oldNRCGI NRCGI , + served-Cell-Information Served-Cell-Information , + gNB-DU-System-Information GNB-DU-System-Information OPTIONAL , + iE-Extensions ProtocolExtensionContainer { { Served-Cells-To-Modify-ItemExtIEs } } OPTIONAL, + ... +} + +Served-Cells-To-Modify-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Served-EUTRA-Cells-Information::= SEQUENCE { + eUTRA-Mode-Info EUTRA-Mode-Info, + protectedEUTRAResourceIndication ProtectedEUTRAResourceIndication, + iE-Extensions ProtocolExtensionContainer { {Served-EUTRA-Cell-Information-ExtIEs} } OPTIONAL, + ... +} + +Served-EUTRA-Cell-Information-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Service-State ::= ENUMERATED { + in-service, + out-of-service, + ... +} + +Service-Status ::= SEQUENCE { + service-state Service-State, + switchingOffOngoing ENUMERATED {true, ...} OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { Service-Status-ExtIEs } } OPTIONAL, + ... +} + +Service-Status-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +SFNInitialisationTime ::= BIT STRING (SIZE (64)) + +ShortDRXCycleLength ::= ENUMERATED {ms2, ms3, ms4, ms5, ms6, ms7, ms8, ms10, ms14, ms16, ms20, ms30, ms32, ms35, ms40, ms64, ms80, ms128, ms160, ms256, ms320, ms512, ms640, ...} + +ShortDRXCycleTimer ::= INTEGER (1..16) + +SIB1-message ::= OCTET STRING + +SIB10-message ::= OCTET STRING + +SIB12-message ::= OCTET STRING + +SIB13-message ::= OCTET STRING + +SIB14-message ::= OCTET STRING + +SItype ::= INTEGER (1..32, ...) + +SItype-List ::= SEQUENCE (SIZE(1.. maxnoofSITypes)) OF SItype-Item + +SItype-Item ::= SEQUENCE { + sItype SItype , + iE-Extensions ProtocolExtensionContainer { { SItype-ItemExtIEs } } OPTIONAL +} + +SItype-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SibtypetobeupdatedListItem ::= SEQUENCE { + sIBtype INTEGER (2..32,...), + sIBmessage OCTET STRING, + valueTag INTEGER (0..31,...), + iE-Extensions ProtocolExtensionContainer { { SibtypetobeupdatedListItem-ExtIEs } } OPTIONAL, + ... +} + +SibtypetobeupdatedListItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + {ID id-areaScope CRITICALITY ignore EXTENSION AreaScope PRESENCE optional}, + ... +} + +SLDRBID ::= INTEGER (1..512, ...) + +SLDRBInformation ::= SEQUENCE { + sLDRB-QoS PC5QoSParameters, + flowsMappedToSLDRB-List FlowsMappedToSLDRB-List, + ... +} + +SLDRBs-FailedToBeModified-Item ::= SEQUENCE { + sLDRBID SLDRBID , + cause Cause OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { SLDRBs-FailedToBeModified-ItemExtIEs } } OPTIONAL +} + +SLDRBs-FailedToBeModified-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SLDRBs-FailedToBeSetup-Item ::= SEQUENCE { + sLDRBID SLDRBID, + cause Cause OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { SLDRBs-FailedToBeSetup-ItemExtIEs } } OPTIONAL +} + +SLDRBs-FailedToBeSetup-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SLDRBs-FailedToBeSetupMod-Item ::= SEQUENCE { + sLDRBID SLDRBID , + cause Cause OPTIONAL , + iE-Extensions ProtocolExtensionContainer { { SLDRBs-FailedToBeSetupMod-ItemExtIEs } } OPTIONAL +} + +SLDRBs-FailedToBeSetupMod-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SLDRBs-Modified-Item ::= SEQUENCE { + sLDRBID SLDRBID, + iE-Extensions ProtocolExtensionContainer { { SLDRBs-Modified-ItemExtIEs } } OPTIONAL +} + +SLDRBs-Modified-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SLDRBs-ModifiedConf-Item ::= SEQUENCE { + sLDRBID SLDRBID, + iE-Extensions ProtocolExtensionContainer { { SLDRBs-ModifiedConf-ItemExtIEs } } OPTIONAL +} + +SLDRBs-ModifiedConf-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SLDRBs-Required-ToBeModified-Item ::= SEQUENCE { + sLDRBID SLDRBID, + iE-Extensions ProtocolExtensionContainer { { SLDRBs-Required-ToBeModified-ItemExtIEs } } OPTIONAL +} + +SLDRBs-Required-ToBeModified-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SLDRBs-Required-ToBeReleased-Item ::= SEQUENCE { + sLDRBID SLDRBID, + iE-Extensions ProtocolExtensionContainer { { SLDRBs-Required-ToBeReleased-ItemExtIEs } } OPTIONAL +} + +SLDRBs-Required-ToBeReleased-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SLDRBs-Setup-Item ::= SEQUENCE { + sLDRBID SLDRBID, + iE-Extensions ProtocolExtensionContainer { { SLDRBs-Setup-ItemExtIEs } } OPTIONAL +} + +SLDRBs-Setup-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SLDRBs-SetupMod-Item ::= SEQUENCE { + sLDRBID SLDRBID, + iE-Extensions ProtocolExtensionContainer { { SLDRBs-SetupMod-ItemExtIEs } } OPTIONAL +} + +SLDRBs-SetupMod-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SLDRBs-ToBeModified-Item ::= SEQUENCE { + sLDRBID SLDRBID, + sLDRBInformation SLDRBInformation OPTIONAL, + rLCMode RLCMode OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { SLDRBs-ToBeModified-ItemExtIEs } } OPTIONAL +} + +SLDRBs-ToBeModified-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SLDRBs-ToBeReleased-Item ::= SEQUENCE { + sLDRBID SLDRBID, + iE-Extensions ProtocolExtensionContainer { { SLDRBs-ToBeReleased-ItemExtIEs } } OPTIONAL +} + +SLDRBs-ToBeReleased-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SLDRBs-ToBeSetup-Item ::= SEQUENCE { + sLDRBID SLDRBID, + sLDRBInformation SLDRBInformation, + rLCMode RLCMode, + + iE-Extensions ProtocolExtensionContainer { { SLDRBs-ToBeSetup-ItemExtIEs } } OPTIONAL +} + +SLDRBs-ToBeSetup-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SLDRBs-ToBeSetupMod-Item ::= SEQUENCE { + sLDRBID SLDRBID, + sLDRBInformation SLDRBInformation, + rLCMode RLCMode OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { SLDRBs-ToBeSetupMod-ItemExtIEs } } OPTIONAL +} + +SLDRBs-ToBeSetupMod-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SL-PHY-MAC-RLC-Config ::= OCTET STRING + +SL-ConfigDedicatedEUTRA ::= OCTET STRING + +SliceAvailableCapacity ::= SEQUENCE { + sliceAvailableCapacityList SliceAvailableCapacityList, + iE-Extensions ProtocolExtensionContainer { { SliceAvailableCapacity-ExtIEs} } OPTIONAL +} + +SliceAvailableCapacity-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SliceAvailableCapacityList ::= SEQUENCE (SIZE(1.. maxnoofBPLMNsNR)) OF SliceAvailableCapacityItem + +SliceAvailableCapacityItem ::= SEQUENCE { + pLMNIdentity PLMN-Identity, + sNSSAIAvailableCapacity-List SNSSAIAvailableCapacity-List, + iE-Extensions ProtocolExtensionContainer { { SliceAvailableCapacityItem-ExtIEs} } OPTIONAL +} + +SliceAvailableCapacityItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SNSSAIAvailableCapacity-List ::= SEQUENCE (SIZE(1.. maxnoofSliceItems)) OF SNSSAIAvailableCapacity-Item + +SNSSAIAvailableCapacity-Item ::= SEQUENCE { + sNSSAI SNSSAI, + sliceAvailableCapacityValueDownlink INTEGER (0..100) OPTIONAL, + sliceAvailableCapacityValueUplink INTEGER (0..100) OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { SNSSAIAvailableCapacity-Item-ExtIEs } } OPTIONAL +} + +SNSSAIAvailableCapacity-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SliceSupportList ::= SEQUENCE (SIZE(1.. maxnoofSliceItems)) OF SliceSupportItem + +SliceSupportItem ::= SEQUENCE { + sNSSAI SNSSAI, + iE-Extensions ProtocolExtensionContainer { { SliceSupportItem-ExtIEs } } OPTIONAL +} + +SliceSupportItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SliceToReportList ::= SEQUENCE (SIZE(1.. maxnoofBPLMNsNR)) OF SliceToReportItem + +SliceToReportItem ::= SEQUENCE { + pLMNIdentity PLMN-Identity, + sNSSAIlist SNSSAI-list, + iE-Extensions ProtocolExtensionContainer { { SliceToReportItem-ExtIEs} } OPTIONAL +} + +SliceToReportItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SlotNumber ::= INTEGER (0..79) + +SNSSAI-list ::= SEQUENCE (SIZE(1.. maxnoofSliceItems)) OF SNSSAI-Item + +SNSSAI-Item ::= SEQUENCE { + sNSSAI SNSSAI, + iE-Extensions ProtocolExtensionContainer { { SNSSAI-Item-ExtIEs } } OPTIONAL +} + +SNSSAI-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Slot-Configuration-List ::= SEQUENCE (SIZE(1.. maxnoofslots)) OF Slot-Configuration-Item + +Slot-Configuration-Item ::= SEQUENCE { + slotIndex INTEGER (0..5119, ...), + symbolAllocInSlot SymbolAllocInSlot, + iE-Extensions ProtocolExtensionContainer { { Slot-Configuration-ItemExtIEs } } OPTIONAL +} + +Slot-Configuration-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +SNSSAI ::= SEQUENCE { + sST OCTET STRING (SIZE(1)), + sD OCTET STRING (SIZE(3)) OPTIONAL , + iE-Extensions ProtocolExtensionContainer { { SNSSAI-ExtIEs } } OPTIONAL +} + +SNSSAI-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SpatialDirectionInformation ::= SEQUENCE { + nR-PRSBeamInformation NR-PRSBeamInformation, + iE-Extensions ProtocolExtensionContainer { { SpatialDirectionInformation-ExtIEs } } OPTIONAL +} + +SpatialDirectionInformation-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SpatialRelationInfo ::= SEQUENCE { + spatialRelationforResourceID SpatialRelationforResourceID, + iE-Extensions ProtocolExtensionContainer { {SpatialRelationInfo-ExtIEs} } OPTIONAL +} + +SpatialRelationInfo-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SpatialRelationforResourceID ::= SEQUENCE (SIZE(1..maxnoofSpatialRelations)) OF SpatialRelationforResourceIDItem + +SpatialRelationforResourceIDItem ::= SEQUENCE { + referenceSignal ReferenceSignal, + iE-Extensions ProtocolExtensionContainer { {SpatialRelationforResourceIDItem-ExtIEs} } OPTIONAL +} + +SpatialRelationforResourceIDItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SpatialRelationPos ::= CHOICE { + sSBPos SSBPos, + pRSInformationPos PRSInformationPos, + choice-extension ProtocolIE-SingleContainer {{ SpatialInformationPos-ExtIEs }} +} + +SpatialInformationPos-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +SpectrumSharingGroupID ::= INTEGER (1..maxCellineNB) + +SRBID ::= INTEGER (0..3, ...) + +SRBs-FailedToBeSetup-Item ::= SEQUENCE { + sRBID SRBID , + cause Cause OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { SRBs-FailedToBeSetup-ItemExtIEs } } OPTIONAL, + ... +} + +SRBs-FailedToBeSetup-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SRBs-FailedToBeSetupMod-Item ::= SEQUENCE { + sRBID SRBID , + cause Cause OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { SRBs-FailedToBeSetupMod-ItemExtIEs } } OPTIONAL, + ... +} + +SRBs-FailedToBeSetupMod-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SRBs-Modified-Item ::= SEQUENCE { + sRBID SRBID, + lCID LCID, + iE-Extensions ProtocolExtensionContainer { { SRBs-Modified-ItemExtIEs } } OPTIONAL, + ... +} + +SRBs-Modified-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SRBs-Required-ToBeReleased-Item ::= SEQUENCE { + sRBID SRBID, + iE-Extensions ProtocolExtensionContainer { { SRBs-Required-ToBeReleased-ItemExtIEs } } OPTIONAL, + ... +} + +SRBs-Required-ToBeReleased-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SRBs-Setup-Item ::= SEQUENCE { + sRBID SRBID, + lCID LCID, + iE-Extensions ProtocolExtensionContainer { { SRBs-Setup-ItemExtIEs } } OPTIONAL, + ... +} + +SRBs-Setup-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SRBs-SetupMod-Item ::= SEQUENCE { + sRBID SRBID, + lCID LCID, + iE-Extensions ProtocolExtensionContainer { { SRBs-SetupMod-ItemExtIEs } } OPTIONAL, + ... +} + +SRBs-SetupMod-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SRBs-ToBeReleased-Item ::= SEQUENCE { + sRBID SRBID, + iE-Extensions ProtocolExtensionContainer { { SRBs-ToBeReleased-ItemExtIEs } } OPTIONAL, + ... +} + +SRBs-ToBeReleased-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SRBs-ToBeSetup-Item ::= SEQUENCE { + sRBID SRBID , + duplicationIndication DuplicationIndication OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { SRBs-ToBeSetup-ItemExtIEs } } OPTIONAL, + ... +} + +SRBs-ToBeSetup-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-AdditionalDuplicationIndication CRITICALITY ignore EXTENSION AdditionalDuplicationIndication PRESENCE optional }, + ... +} + +SRBs-ToBeSetupMod-Item ::= SEQUENCE { + sRBID SRBID, + duplicationIndication DuplicationIndication OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { SRBs-ToBeSetupMod-ItemExtIEs } } OPTIONAL, + ... +} + +SRBs-ToBeSetupMod-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-AdditionalDuplicationIndication CRITICALITY ignore EXTENSION AdditionalDuplicationIndication PRESENCE optional }, + ... +} + +SRSCarrier-List ::= SEQUENCE (SIZE(1.. maxnoSRS-Carriers)) OF SRSCarrier-List-Item + +SRSCarrier-List-Item ::= SEQUENCE { + pointA INTEGER (0..3279165,...), + uplinkChannelBW-PerSCS-List UplinkChannelBW-PerSCS-List, + activeULBWP ActiveULBWP, + pci NRPCI, + iE-Extensions ProtocolExtensionContainer { { SRSCarrier-List-Item-ExtIEs } } OPTIONAL +} + +SRSCarrier-List-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SRSConfig ::= SEQUENCE { + sRSResource-List SRSResource-List OPTIONAL, + posSRSResource-List PosSRSResource-List OPTIONAL, + sRSResourceSet-List SRSResourceSet-List OPTIONAL, + posSRSResourceSet-List PosSRSResourceSet-List OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { SRSConfig-ExtIEs } } OPTIONAL +} + +SRSConfig-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SRSConfiguration ::= SEQUENCE { + sRSCarrier-List SRSCarrier-List, + iE-Extensions ProtocolExtensionContainer { { SRSConfiguration-ExtIEs } } OPTIONAL +} + +SRSConfiguration-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SRSPosResourceID ::= INTEGER (0..63, ...) + +SRSResource::= SEQUENCE { + sRSResourceID SRSResourceID, + nrofSRS-Ports ENUMERATED {port1, ports2, ports4}, + transmissionComb TransmissionComb, + startPosition INTEGER (0..13), + nrofSymbols ENUMERATED {n1, n2, n4}, + repetitionFactor ENUMERATED {n1, n2, n4}, + freqDomainPosition INTEGER (0..67), + freqDomainShift INTEGER (0..268), + c-SRS INTEGER (0..63), + b-SRS INTEGER (0..3), + b-hop INTEGER (0..3), + groupOrSequenceHopping ENUMERATED { neither, groupHopping, sequenceHopping }, + resourceType ResourceType, + slotOffset INTEGER (0..2559), + sequenceId INTEGER (0..1023), + iE-Extensions ProtocolExtensionContainer { { SRSResource-ExtIEs } } OPTIONAL +} + +SRSResource-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SRSResourceID ::= INTEGER (0..63, ...) + +SRSResourceID-List::= SEQUENCE (SIZE (1..maxnoSRS-ResourcePerSet)) OF SRSResourceID + +SRSResource-List ::= SEQUENCE (SIZE (1..maxnoSRS-Resources)) OF SRSResource + +SRSResourceSet::= SEQUENCE { + sRSResourceSetID SRSResourceSetID, + sRSResourceID-List SRSResourceID-List, + resourceSetType ResourceSetType, + iE-Extensions ProtocolExtensionContainer { { SRSResourceSet-ExtIEs } } OPTIONAL +} + +SRSResourceSet-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SRSResourceSetID ::= INTEGER (0..15, ...) + +SRSResourceSetList ::= SEQUENCE (SIZE(1.. maxnoSRS-ResourceSets)) OF SRSResourceSetItem + +SRSResourceSetItem ::= SEQUENCE { + numSRSresourcesperset INTEGER (1..16, ...) OPTIONAL, + periodicityList PeriodicityList OPTIONAL, + spatialRelationInfo SpatialRelationInfo OPTIONAL, + pathlossReferenceInfo PathlossReferenceInfo OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { SRSResourceSetItemExtIEs } } OPTIONAL +} + +SRSResourceSetItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SRSResourceSet-List ::= SEQUENCE (SIZE (1..maxnoSRS-ResourceSets)) OF SRSResourceSet + +SRSResourceTrigger ::= SEQUENCE { + aperiodicSRSResourceTriggerList AperiodicSRSResourceTriggerList, + iE-Extensions ProtocolExtensionContainer { {SRSResourceTrigger-ExtIEs} } OPTIONAL +} + +SRSResourceTrigger-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SRSSpatialRelation ::= SEQUENCE { + spatialRelationforResourceID SpatialRelationforResourceID, + iE-Extensions ProtocolExtensionContainer { {SRSSpatialRelation-ExtIEs} } OPTIONAL +} + +SRSSpatialRelation-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SSB ::= SEQUENCE { + pCI-NR NRPCI, + ssb-index SSB-Index OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {SSB-ExtIEs} } OPTIONAL +} + +SSB-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SSB-freqInfo ::= INTEGER (0..maxNRARFCN) + +SSB-Index ::= INTEGER(0..63) + +SSBPos ::= SEQUENCE { + pCI-NR NRPCI OPTIONAL, + ssb-index SSB-Index, + iE-Extensions ProtocolExtensionContainer { {SSBPos-ExtIEs} } OPTIONAL +} + +SSBPos-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SSB-subcarrierSpacing ::= ENUMERATED {kHz15, kHz30, kHz120, kHz240, spare3, spare2, spare1, ...} + +SSB-transmissionPeriodicity ::= ENUMERATED {sf10, sf20, sf40, sf80, sf160, sf320, sf640, ...} + +SSB-transmissionTimingOffset ::= INTEGER (0..127, ...) + +SSB-transmissionBitmap ::= CHOICE { + shortBitmap BIT STRING (SIZE (4)), + mediumBitmap BIT STRING (SIZE (8)), + longBitmap BIT STRING (SIZE (64)), + choice-extension ProtocolIE-SingleContainer { { SSB-transmisisonBitmap-ExtIEs} } +} + +SSB-transmisisonBitmap-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +SSBAreaCapacityValueList ::= SEQUENCE (SIZE(1.. maxnoofSSBAreas)) OF SSBAreaCapacityValueItem + +SSBAreaCapacityValueItem ::= SEQUENCE { + sSBIndex INTEGER(0..63), + sSBAreaCapacityValue INTEGER (0..100), + iE-Extensions ProtocolExtensionContainer { { SSBAreaCapacityValueItem-ExtIEs} } OPTIONAL +} + +SSBAreaCapacityValueItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SSBAreaRadioResourceStatusList::= SEQUENCE (SIZE(1.. maxnoofSSBAreas)) OF SSBAreaRadioResourceStatusItem + +SSBAreaRadioResourceStatusItem::= SEQUENCE { + sSBIndex INTEGER(0..63), + sSBAreaDLGBRPRBusage INTEGER (0..100), + sSBAreaULGBRPRBusage INTEGER (0..100), + sSBAreaDLnon-GBRPRBusage INTEGER (0..100), + sSBAreaULnon-GBRPRBusage INTEGER (0..100), + sSBAreaDLTotalPRBusage INTEGER (0..100), + sSBAreaULTotalPRBusage INTEGER (0..100), + dLschedulingPDCCHCCEusage INTEGER (0..100) OPTIONAL, + uLschedulingPDCCHCCEusage INTEGER (0..100) OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { SSBAreaRadioResourceStatusItem-ExtIEs} } OPTIONAL +} + +SSBAreaRadioResourceStatusItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SSBInformation ::= SEQUENCE { + sSBInformationList SSBInformationList, + iE-Extensions ProtocolExtensionContainer { { SSBInformation-ExtIEs } } OPTIONAL +} + +SSBInformation-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SSBInformationList ::= SEQUENCE (SIZE(1.. maxnoofSSBs)) OF SSBInformationItem + +SSBInformationItem ::= SEQUENCE { + sSB-Configuration SSB-TF-Configuration, + pCI-NR NRPCI, + iE-Extensions ProtocolExtensionContainer { { SSBInformationItem-ExtIEs } } OPTIONAL +} + +SSBInformationItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SSB-PositionsInBurst ::= CHOICE { + shortBitmap BIT STRING (SIZE (4)), + mediumBitmap BIT STRING (SIZE (8)), + longBitmap BIT STRING (SIZE (64)), + choice-extension ProtocolIE-SingleContainer { {SSB-PositionsInBurst-ExtIEs} } +} + +SSB-PositionsInBurst-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +SSB-TF-Configuration ::= SEQUENCE { + sSB-frequency INTEGER (0..3279165), + sSB-subcarrier-spacing ENUMERATED {kHz15, kHz30, kHz60, kHz120, kHz240, ...}, + sSB-Transmit-power INTEGER (-60..50), + sSB-periodicity ENUMERATED {ms5, ms10, ms20, ms40, ms80, ms160, ...}, + sSB-half-frame-offset INTEGER(0..1), + sSB-SFN-offset INTEGER(0..15), + sSB-position-in-burst SSB-PositionsInBurst OPTIONAL, + sFNInitialisationTime SFNInitialisationTime OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { SSB-TF-Configuration-ExtIEs} } OPTIONAL +} + +SSB-TF-Configuration-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +SSBToReportList ::= SEQUENCE (SIZE(1.. maxnoofSSBAreas)) OF SSBToReportItem + +SSBToReportItem ::= SEQUENCE { + sSBIndex INTEGER(0..63), + iE-Extensions ProtocolExtensionContainer { { SSBToReportItem-ExtIEs} } OPTIONAL +} + +SSBToReportItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SUL-Information ::= SEQUENCE { + sUL-NRARFCN INTEGER (0..maxNRARFCN), + sUL-transmission-Bandwidth Transmission-Bandwidth, + iE-Extensions ProtocolExtensionContainer { { SUL-InformationExtIEs} } OPTIONAL, + ... +} + +SUL-InformationExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-CarrierList CRITICALITY ignore EXTENSION NRCarrierList PRESENCE optional }| + { ID id-FrequencyShift7p5khz CRITICALITY ignore EXTENSION FrequencyShift7p5khz PRESENCE optional }, + ... +} + +SubcarrierSpacing ::= ENUMERATED { kHz15, kHz30, kHz60, kHz120, kHz240, spare3, spare2, spare1, ...} + +SubscriberProfileIDforRFP ::= INTEGER (1..256, ...) + +SULAccessIndication ::= ENUMERATED {true,...} + + +SupportedSULFreqBandItem ::= SEQUENCE { + freqBandIndicatorNr INTEGER (1..1024,...), + iE-Extensions ProtocolExtensionContainer { { SupportedSULFreqBandItem-ExtIEs} } OPTIONAL, + ... +} + +SupportedSULFreqBandItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SymbolAllocInSlot ::= CHOICE { + all-DL NULL, + all-UL NULL, + both-DL-and-UL NumDLULSymbols, + choice-extension ProtocolIE-SingleContainer { { SymbolAllocInSlot-ExtIEs } } +} + +SymbolAllocInSlot-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +SystemFrameNumber ::= INTEGER (0..1023) + +SystemInformationAreaID ::=BIT STRING (SIZE (24)) + +-- T + +FiveGS-TAC ::= OCTET STRING (SIZE(3)) + +Configured-EPS-TAC ::= OCTET STRING (SIZE(2)) + +TargetCellList ::= SEQUENCE (SIZE(1..maxnoofCHOcells)) OF TargetCellList-Item + +TargetCellList-Item ::= SEQUENCE { + target-cell NRCGI, + iE-Extensions ProtocolExtensionContainer { { TargetCellList-Item-ExtIEs} } OPTIONAL +} + +TargetCellList-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TDD-Info ::= SEQUENCE { + nRFreqInfo NRFreqInfo, + transmission-Bandwidth Transmission-Bandwidth, + iE-Extensions ProtocolExtensionContainer { {TDD-Info-ExtIEs} } OPTIONAL, + ... +} + +TDD-Info-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + {ID id-IntendedTDD-DL-ULConfig CRITICALITY ignore EXTENSION IntendedTDD-DL-ULConfig PRESENCE optional}| + {ID id-TDD-UL-DLConfigCommonNR CRITICALITY ignore EXTENSION TDD-UL-DLConfigCommonNR PRESENCE optional }| + {ID id-CarrierList CRITICALITY ignore EXTENSION NRCarrierList PRESENCE optional }, + ... +} + +TDD-UL-DLConfigCommonNR ::= OCTET STRING + +TimeReferenceInformation ::= SEQUENCE { + referenceTime ReferenceTime, + referenceSFN ReferenceSFN, + uncertainty Uncertainty, + timeInformationType TimeInformationType, + iE-Extensions ProtocolExtensionContainer { {TimeReferenceInformation-ExtIEs} } OPTIONAL +} + +TimeReferenceInformation-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TimeInformationType ::= ENUMERATED {localClock} + +TimeStamp ::= SEQUENCE { + systemFrameNumber SystemFrameNumber, + slotIndex TimeStampSlotIndex, + measurementTime SFNInitialisationTime OPTIONAL, + iE-Extension ProtocolExtensionContainer { { TimeStamp-ExtIEs} } OPTIONAL +} + +TimeStamp-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TimeStampSlotIndex ::= CHOICE { + sCS-15 INTEGER(0..9), + sCS-30 INTEGER(0..19), + sCS-60 INTEGER(0..39), + sCS-120 INTEGER(0..79), + choice-extension ProtocolIE-SingleContainer { { TimeStampSlotIndex-ExtIEs} } +} + +TimeStampSlotIndex-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +TimeToWait ::= ENUMERATED {v1s, v2s, v5s, v10s, v20s, v60s, ...} + +TimingMeasurementQuality ::= SEQUENCE { + measurementQuality INTEGER(0..31), + resolution ENUMERATED{m0dot1, m1, m10, m30, ...}, + iE-Extensions ProtocolExtensionContainer { { TimingMeasurementQuality-ExtIEs} } OPTIONAL +} + +TimingMeasurementQuality-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TNLAssociationUsage ::= ENUMERATED { + ue, + non-ue, + both, + ... +} + +TNLCapacityIndicator::= SEQUENCE { + dLTNLOfferedCapacity INTEGER (1.. 16777216,...), + dLTNLAvailableCapacity INTEGER (0.. 100,...), + uLTNLOfferedCapacity INTEGER (1.. 16777216,...), + uLTNLAvailableCapacity INTEGER (0.. 100,...), + iE-Extensions ProtocolExtensionContainer { { TNLCapacityIndicator-ExtIEs} } OPTIONAL +} + +TNLCapacityIndicator-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TraceActivation ::= SEQUENCE { + traceID TraceID, + interfacesToTrace InterfacesToTrace, + traceDepth TraceDepth, + traceCollectionEntityIPAddress TransportLayerAddress, + iE-Extensions ProtocolExtensionContainer { {TraceActivation-ExtIEs} } OPTIONAL +} + +TraceActivation-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + {ID id-mdtConfiguration CRITICALITY ignore EXTENSION MDTConfiguration PRESENCE optional}| + {ID id-TraceCollectionEntityURI CRITICALITY ignore EXTENSION URI-address PRESENCE optional }, + ... +} + +TraceDepth ::= ENUMERATED { + minimum, + medium, + maximum, + minimumWithoutVendorSpecificExtension, + mediumWithoutVendorSpecificExtension, + maximumWithoutVendorSpecificExtension, + ... +} + +TraceID ::= OCTET STRING (SIZE(8)) + +TrafficMappingInfo ::= CHOICE { + iPtolayer2TrafficMappingInfo IPtolayer2TrafficMappingInfo, + bAPlayerBHRLCchannelMappingInfo BAPlayerBHRLCchannelMappingInfo, + choice-extension ProtocolIE-SingleContainer { { TrafficMappingInfo-ExtIEs} } +} + +TrafficMappingInfo-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +TransportLayerAddress ::= BIT STRING (SIZE(1..160, ...)) + +TransactionID ::= INTEGER (0..255, ...) + +Transmission-Bandwidth ::= SEQUENCE { + nRSCS NRSCS, + nRNRB NRNRB, + iE-Extensions ProtocolExtensionContainer { { Transmission-Bandwidth-ExtIEs} } OPTIONAL, + ... +} + +Transmission-Bandwidth-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TransmissionComb ::= CHOICE { + n2 SEQUENCE { + combOffset-n2 INTEGER (0..1), + cyclicShift-n2 INTEGER (0..7) + }, + n4 SEQUENCE { + combOffset-n4 INTEGER (0..3), + cyclicShift-n4 INTEGER (0..11) + }, + choice-extension ProtocolIE-SingleContainer { { TransmissionComb-ExtIEs} } +} +TransmissionComb-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +TransmissionCombPos ::= CHOICE { + n2 SEQUENCE { + combOffset-n2 INTEGER (0..1), + cyclicShift-n2 INTEGER (0..7) + }, + n4 SEQUENCE { + combOffset-n4 INTEGER (0..3), + cyclicShift-n4 INTEGER (0..11) + }, + n8 SEQUENCE { + combOffset-n8 INTEGER (0..7), + cyclicShift-n8 INTEGER (0..5) + }, + + choice-extension ProtocolIE-SingleContainer { { TransmissionCombPos-ExtIEs} } +} +TransmissionCombPos-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +Transport-UP-Layer-Address-Info-To-Add-List ::= SEQUENCE (SIZE(1.. maxnoofTLAs)) OF Transport-UP-Layer-Address-Info-To-Add-Item + +Transport-UP-Layer-Address-Info-To-Add-Item ::= SEQUENCE { + iP-SecTransportLayerAddress TransportLayerAddress, + gTPTransportLayerAddressToAdd GTPTLAs OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { Transport-UP-Layer-Address-Info-To-Add-ItemExtIEs } } OPTIONAL +} + +Transport-UP-Layer-Address-Info-To-Add-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Transport-UP-Layer-Address-Info-To-Remove-List ::= SEQUENCE (SIZE(1.. maxnoofTLAs)) OF Transport-UP-Layer-Address-Info-To-Remove-Item + +Transport-UP-Layer-Address-Info-To-Remove-Item ::= SEQUENCE { + iP-SecTransportLayerAddress TransportLayerAddress, + gTPTransportLayerAddressToRemove GTPTLAs OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { Transport-UP-Layer-Address-Info-To-Remove-ItemExtIEs } } OPTIONAL +} + +Transport-UP-Layer-Address-Info-To-Remove-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TransmissionActionIndicator ::= ENUMERATED {stop, ..., restart } + +TRPID ::= INTEGER (0.. maxnoofTRPs, ...) + +TRPInformation ::= SEQUENCE { + tRPID TRPID, + tRPInformationTypeResponseList TRPInformationTypeResponseList, + iE-Extensions ProtocolExtensionContainer { { TRPInformation-ExtIEs } } OPTIONAL +} + +TRPInformation-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TRPInformationItem ::= SEQUENCE { + tRPInformation TRPInformation, + iE-Extensions ProtocolExtensionContainer { { TRPInformationItem-ExtIEs } } OPTIONAL +} + +TRPInformationItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TRPInformationTypeItem ::= ENUMERATED { + nrPCI, + nG-RAN-CGI, + arfcn, + pRSConfig, + sSBConfig, + sFNInitTime, + spatialDirectInfo, + geoCoord, +...} + + +TRPInformationTypeResponseList ::= SEQUENCE (SIZE(1.. maxnoofTRPInfoTypes)) OF TRPInformationTypeResponseItem + +TRPInformationTypeResponseItem ::= CHOICE { + pCI-NR NRPCI, + nG-RAN-CGI NRCGI, + nRARFCN INTEGER (0..maxNRARFCN), + pRSConfiguration PRSConfiguration, + sSBinformation SSBInformation, + sFNInitialisationTime SFNInitialisationTime, + spatialDirectionInformation SpatialDirectionInformation, + geographicalCoordinates GeographicalCoordinates, + choice-extension ProtocolIE-SingleContainer { { TRPInformationTypeResponseItem-ExtIEs} } +} + +TRPInformationTypeResponseItem-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + + +TRPList ::= SEQUENCE (SIZE(1.. maxnoofTRPs)) OF TRPListItem + +TRPListItem ::= SEQUENCE { + tRPID TRPID, + iE-Extensions ProtocolExtensionContainer { { TRPListItem-ExtIEs } } OPTIONAL +} + +TRPListItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TRPMeasurementQuality ::= SEQUENCE { + tRPmeasurementQuality-Item TRPMeasurementQuality-Item, + iE-Extensions ProtocolExtensionContainer { {TRPMeasurementQuality-ExtIEs} } OPTIONAL +} + +TRPMeasurementQuality-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TRPMeasurementQuality-Item ::= CHOICE { + timingMeasurementQuality TimingMeasurementQuality, + angleMeasurementQuality AngleMeasurementQuality, + choice-extension ProtocolIE-SingleContainer { { TRPMeasurementQuality-Item-ExtIEs } } +} + +TRPMeasurementQuality-Item-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +TRP-MeasurementRequestList ::= SEQUENCE (SIZE (1..maxNoOfMeasTRPs)) OF TRP-MeasurementRequestItem + +TRP-MeasurementRequestItem ::= SEQUENCE { + tRPID TRPID, + search-window-information Search-window-information OPTIONAL, + iE-extensions ProtocolExtensionContainer { { TRP-MeasurementRequestItem-ExtIEs } } OPTIONAL +} + +TRP-MeasurementRequestItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TRPPositionDefinitionType ::= CHOICE { + direct TRPPositionDirect, + referenced TRPPositionReferenced, + choice-extension ProtocolIE-SingleContainer { { TRPPositionDefinitionType-ExtIEs } } +} + +TRPPositionDefinitionType-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +TRPPositionDirect ::= SEQUENCE { + accuracy TRPPositionDirectAccuracy, + iE-extensions ProtocolExtensionContainer { { TRPPositionDirect-ExtIEs } } OPTIONAL +} + +TRPPositionDirect-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TRPPositionDirectAccuracy ::= CHOICE { + tRPPosition AccessPointPosition, + tRPHAposition NGRANHighAccuracyAccessPointPosition, + choice-extension ProtocolIE-SingleContainer { { TRPPositionDirectAccuracy-ExtIEs } } +} + +TRPPositionDirectAccuracy-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +TRPPositionReferenced ::= SEQUENCE { + referencePoint ReferencePoint, + referencePointType TRPReferencePointType, + iE-extensions ProtocolExtensionContainer { { TRPPositionReferenced-ExtIEs } } OPTIONAL +} + +TRPPositionReferenced-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TRPReferencePointType ::= CHOICE { + tRPPositionRelativeGeodetic RelativeGeodeticLocation, + tRPPositionRelativeCartesian RelativeCartesianLocation, + choice-extension ProtocolIE-SingleContainer { { TRPReferencePointType-ExtIEs } } +} + +TRPReferencePointType-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +TypeOfError ::= ENUMERATED { + not-understood, + missing, + ... +} + +Transport-Layer-Address-Info ::= SEQUENCE { + transport-UP-Layer-Address-Info-To-Add-List Transport-UP-Layer-Address-Info-To-Add-List OPTIONAL, + transport-UP-Layer-Address-Info-To-Remove-List Transport-UP-Layer-Address-Info-To-Remove-List OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { Transport-Layer-Address-Info-ExtIEs } } OPTIONAL +} + +Transport-Layer-Address-Info-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TSCAssistanceInformation ::= SEQUENCE { + periodicity Periodicity, + burstArrivalTime BurstArrivalTime OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {TSCAssistanceInformation-ExtIEs} } OPTIONAL, + ... +} + +TSCAssistanceInformation-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TSCTrafficCharacteristics ::= SEQUENCE { + tSCAssistanceInformationDL TSCAssistanceInformation OPTIONAL, + tSCAssistanceInformationUL TSCAssistanceInformation OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {TSCTrafficCharacteristics-ExtIEs} } OPTIONAL, + ... +} + +TSCTrafficCharacteristics-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- U +UAC-Assistance-Info ::= SEQUENCE { + uACPLMN-List UACPLMN-List, + iE-Extensions ProtocolExtensionContainer { { UAC-Assistance-InfoExtIEs} } OPTIONAL +} + +UAC-Assistance-InfoExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +UACPLMN-List ::= SEQUENCE (SIZE(1..maxnoofUACPLMNs)) OF UACPLMN-Item + +UACPLMN-Item::= SEQUENCE { + pLMNIdentity PLMN-Identity, + uACType-List UACType-List, iE-Extensions ProtocolExtensionContainer { { UACPLMN-Item-ExtIEs} } OPTIONAL +} + +UACPLMN-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-NID CRITICALITY ignore EXTENSION NID PRESENCE optional }, + ... +} + +UACType-List ::= SEQUENCE (SIZE(1..maxnoofUACperPLMN)) OF UACType-Item + +UACType-Item::= SEQUENCE { + uACReductionIndication UACReductionIndication, + uACCategoryType UACCategoryType, + iE-Extensions ProtocolExtensionContainer { { UACType-Item-ExtIEs } } OPTIONAL +} + +UACType-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +UACCategoryType ::= CHOICE { + uACstandardized UACAction, + uACOperatorDefined UACOperatorDefined, + choice-extension ProtocolIE-SingleContainer { { UACCategoryType-ExtIEs } } +} + +UACCategoryType-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +UACOperatorDefined ::= SEQUENCE { + accessCategory INTEGER (32..63,...), + accessIdentity BIT STRING (SIZE(7)), + iE-Extensions ProtocolExtensionContainer { { UACOperatorDefined-ExtIEs} } OPTIONAL +} + +UACOperatorDefined-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +UACAction ::= ENUMERATED { + reject-non-emergency-mo-dt, + reject-rrc-cr-signalling, + permit-emergency-sessions-and-mobile-terminated-services-only, + permit-high-priority-sessions-and-mobile-terminated-services-only, + ... +} + +UACReductionIndication ::= INTEGER (0..100) + + +UE-associatedLogicalF1-ConnectionItem ::= SEQUENCE { + gNB-CU-UE-F1AP-ID GNB-CU-UE-F1AP-ID OPTIONAL, + gNB-DU-UE-F1AP-ID GNB-DU-UE-F1AP-ID OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { UE-associatedLogicalF1-ConnectionItemExtIEs} } OPTIONAL, + ... +} + +UEAssistanceInformation ::= OCTET STRING + +UEAssistanceInformationEUTRA ::= OCTET STRING + +UE-associatedLogicalF1-ConnectionItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +UE-CapabilityRAT-ContainerList::= OCTET STRING + +UEContextNotRetrievable ::= ENUMERATED {true, ...} + +UEIdentityIndexValue ::= CHOICE { + indexLength10 BIT STRING (SIZE (10)), + choice-extension ProtocolIE-SingleContainer { {UEIdentityIndexValueChoice-ExtIEs} } +} + +UEIdentityIndexValueChoice-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +UL-AoA ::= SEQUENCE { + azimuthAoA INTEGER (0..3599), + zenithAoA INTEGER (0..1799) OPTIONAL, + angleCoordinateSystem ENUMERATED {lCS, gCS} OPTIONAL, + iE-extensions ProtocolExtensionContainer { { UL-AoA-ExtIEs } } +} + +UL-AoA-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +UL-BH-Non-UP-Traffic-Mapping ::= SEQUENCE { + uL-BH-Non-UP-Traffic-Mapping-List UL-BH-Non-UP-Traffic-Mapping-List, + iE-Extensions ProtocolExtensionContainer { { UL-BH-Non-UP-Traffic-Mapping-ExtIEs } } OPTIONAL +} + +UL-BH-Non-UP-Traffic-Mapping-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +UL-BH-Non-UP-Traffic-Mapping-List ::= SEQUENCE (SIZE(1..maxnoofNonUPTrafficMappings)) OF UL-BH-Non-UP-Traffic-Mapping-Item + +UL-BH-Non-UP-Traffic-Mapping-Item ::= SEQUENCE { + nonUPTrafficType NonUPTrafficType, + bHInfo BHInfo, + iE-Extensions ProtocolExtensionContainer { { UL-BH-Non-UP-Traffic-Mapping-ItemExtIEs } } OPTIONAL +} + +UL-BH-Non-UP-Traffic-Mapping-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ULConfiguration ::= SEQUENCE { + uLUEConfiguration ULUEConfiguration, + iE-Extensions ProtocolExtensionContainer { { ULConfigurationExtIEs } } OPTIONAL, + ... +} +ULConfigurationExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +UL-RTOA-Measurement ::= SEQUENCE { + uL-RTOA-MeasurementItem UL-RTOA-MeasurementItem, + additionalPath-List AdditionalPath-List OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { UL-RTOA-Measurement-ExtIEs } } OPTIONAL +} + +UL-RTOA-Measurement-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +UL-RTOA-MeasurementItem ::= CHOICE { + k0 INTEGER (0..1970049), + k1 INTEGER (0..985025), + k2 INTEGER (0..492513), + k3 INTEGER (0..246257), + k4 INTEGER (0..123129), + k5 INTEGER (0..61565), + choice-extension ProtocolIE-SingleContainer { { UL-RTOA-MeasurementItem-ExtIEs } } +} + +UL-RTOA-MeasurementItem-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +UL-SRS-RSRP ::= INTEGER (0..127) + +ULUEConfiguration ::= ENUMERATED {no-data, shared, only, ...} + +UL-UP-TNL-Information-to-Update-List-Item ::= SEQUENCE { + uLUPTNLInformation UPTransportLayerInformation, + newULUPTNLInformation UPTransportLayerInformation OPTIONAL, + bHInfo BHInfo, + iE-Extensions ProtocolExtensionContainer { { UL-UP-TNL-Information-to-Update-List-ItemExtIEs } } OPTIONAL, + ... +} + +UL-UP-TNL-Information-to-Update-List-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +UL-UP-TNL-Address-to-Update-List-Item ::= SEQUENCE { + oldIPAdress TransportLayerAddress, + newIPAdress TransportLayerAddress, + iE-Extensions ProtocolExtensionContainer { { UL-UP-TNL-Address-to-Update-List-ItemExtIEs } } OPTIONAL, + ... +} + +UL-UP-TNL-Address-to-Update-List-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ULUPTNLInformation-ToBeSetup-List ::= SEQUENCE (SIZE(1..maxnoofULUPTNLInformation)) OF ULUPTNLInformation-ToBeSetup-Item + +ULUPTNLInformation-ToBeSetup-Item ::=SEQUENCE { + uLUPTNLInformation UPTransportLayerInformation, + iE-Extensions ProtocolExtensionContainer { { ULUPTNLInformation-ToBeSetup-ItemExtIEs } } OPTIONAL, + ... +} + +ULUPTNLInformation-ToBeSetup-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-BHInfo CRITICALITY ignore EXTENSION BHInfo PRESENCE optional }, + ... +} + +Uncertainty ::= INTEGER (0..32767, ...) + +UplinkChannelBW-PerSCS-List ::= SEQUENCE (SIZE (1..maxnoSCSs)) OF SCS-SpecificCarrier + +UplinkTxDirectCurrentListInformation ::= OCTET STRING + +UPTransportLayerInformation ::= CHOICE { + gTPTunnel GTPTunnel, + choice-extension ProtocolIE-SingleContainer { { UPTransportLayerInformation-ExtIEs} } +} + +UPTransportLayerInformation-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +URI-address ::= VisibleString + +-- V + +VictimgNBSetID ::= SEQUENCE { + victimgNBSetID GNBSetID, + iE-Extensions ProtocolExtensionContainer { { VictimgNBSetID-ExtIEs } } OPTIONAL +} + +VictimgNBSetID-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +VehicleUE ::= ENUMERATED { + authorized, + not-authorized, + ... +} + +PedestrianUE ::= ENUMERATED { + authorized, + not-authorized, + ... +} + +-- W + +-- X + +-- Y + +-- Z + +END +-- ASN1STOP + +-- ASN1START +-- ************************************************************** +-- +-- Common definitions +-- +-- ************************************************************** + +F1AP-CommonDataTypes { +itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) +ngran-access (22) modules (3) f1ap (3) version1 (1) f1ap-CommonDataTypes (3) } + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +Criticality ::= ENUMERATED { reject, ignore, notify } + +Presence ::= ENUMERATED { optional, conditional, mandatory } + +PrivateIE-ID ::= CHOICE { + local INTEGER (0..65535), + global OBJECT IDENTIFIER +} + +ProcedureCode ::= INTEGER (0..255) + +ProtocolExtensionID ::= INTEGER (0..65535) + +ProtocolIE-ID ::= INTEGER (0..65535) + +TriggeringMessage ::= ENUMERATED { initiating-message, successful-outcome, unsuccessful-outcome } + +END +-- ASN1STOP + +-- ASN1START +-- ************************************************************** +-- +-- Constant definitions +-- +-- ************************************************************** + +F1AP-Constants { +itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) +ngran-access (22) modules (3) f1ap (3) version1 (1) f1ap-Constants (4) } + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +-- ************************************************************** +-- +-- IE parameter types from other modules. +-- +-- ************************************************************** + +IMPORTS + ProcedureCode, + ProtocolIE-ID + +FROM F1AP-CommonDataTypes; + + +-- ************************************************************** +-- +-- Elementary Procedures +-- +-- ************************************************************** + +id-Reset ProcedureCode ::= 0 +id-F1Setup ProcedureCode ::= 1 +id-ErrorIndication ProcedureCode ::= 2 +id-gNBDUConfigurationUpdate ProcedureCode ::= 3 +id-gNBCUConfigurationUpdate ProcedureCode ::= 4 +id-UEContextSetup ProcedureCode ::= 5 +id-UEContextRelease ProcedureCode ::= 6 +id-UEContextModification ProcedureCode ::= 7 +id-UEContextModificationRequired ProcedureCode ::= 8 +id-UEMobilityCommand ProcedureCode ::= 9 +id-UEContextReleaseRequest ProcedureCode ::= 10 +id-InitialULRRCMessageTransfer ProcedureCode ::= 11 +id-DLRRCMessageTransfer ProcedureCode ::= 12 +id-ULRRCMessageTransfer ProcedureCode ::= 13 +id-privateMessage ProcedureCode ::= 14 +id-UEInactivityNotification ProcedureCode ::= 15 +id-GNBDUResourceCoordination ProcedureCode ::= 16 +id-SystemInformationDeliveryCommand ProcedureCode ::= 17 +id-Paging ProcedureCode ::= 18 +id-Notify ProcedureCode ::= 19 +id-WriteReplaceWarning ProcedureCode ::= 20 +id-PWSCancel ProcedureCode ::= 21 +id-PWSRestartIndication ProcedureCode ::= 22 +id-PWSFailureIndication ProcedureCode ::= 23 +id-GNBDUStatusIndication ProcedureCode ::= 24 +id-RRCDeliveryReport ProcedureCode ::= 25 +id-F1Removal ProcedureCode ::= 26 +id-NetworkAccessRateReduction ProcedureCode ::= 27 +id-TraceStart ProcedureCode ::= 28 +id-DeactivateTrace ProcedureCode ::= 29 +id-DUCURadioInformationTransfer ProcedureCode ::= 30 +id-CUDURadioInformationTransfer ProcedureCode ::= 31 +id-BAPMappingConfiguration ProcedureCode ::= 32 +id-GNBDUResourceConfiguration ProcedureCode ::= 33 +id-IABTNLAddressAllocation ProcedureCode ::= 34 +id-IABUPConfigurationUpdate ProcedureCode ::= 35 +id-resourceStatusReportingInitiation ProcedureCode ::= 36 +id-resourceStatusReporting ProcedureCode ::= 37 +id-accessAndMobilityIndication ProcedureCode ::= 38 +id-accessSuccess ProcedureCode ::= 39 +id-cellTrafficTrace ProcedureCode ::= 40 +id-PositioningMeasurementExchange ProcedureCode ::= 41 +id-PositioningAssistanceInformationControl ProcedureCode ::= 42 +id-PositioningAssistanceInformationFeedback ProcedureCode ::= 43 +id-PositioningMeasurementReport ProcedureCode ::= 44 +id-PositioningMeasurementAbort ProcedureCode ::= 45 +id-PositioningMeasurementFailureIndication ProcedureCode ::= 46 +id-PositioningMeasurementUpdate ProcedureCode ::= 47 +id-TRPInformationExchange ProcedureCode ::= 48 +id-PositioningInformationExchange ProcedureCode ::= 49 +id-PositioningActivation ProcedureCode ::= 50 +id-PositioningDeactivation ProcedureCode ::= 51 +id-E-CIDMeasurementInitiation ProcedureCode ::= 52 +id-E-CIDMeasurementFailureIndication ProcedureCode ::= 53 +id-E-CIDMeasurementReport ProcedureCode ::= 54 +id-E-CIDMeasurementTermination ProcedureCode ::= 55 +id-PositioningInformationUpdate ProcedureCode ::= 56 +id-ReferenceTimeInformationReport ProcedureCode ::= 57 +id-ReferenceTimeInformationReportingControl ProcedureCode ::= 58 + + + +-- ************************************************************** +-- +-- Extension constants +-- +-- ************************************************************** + +maxPrivateIEs INTEGER ::= 65535 +maxProtocolExtensions INTEGER ::= 65535 +maxProtocolIEs INTEGER ::= 65535 +-- ************************************************************** +-- +-- Lists +-- +-- ************************************************************** + +maxNRARFCN INTEGER ::= 3279165 +maxnoofErrors INTEGER ::= 256 +maxnoofIndividualF1ConnectionsToReset INTEGER ::= 65536 +maxCellingNBDU INTEGER ::= 512 +maxnoofSCells INTEGER ::= 32 +maxnoofSRBs INTEGER ::= 8 +maxnoofDRBs INTEGER ::= 64 +maxnoofULUPTNLInformation INTEGER ::= 2 +maxnoofDLUPTNLInformation INTEGER ::= 2 +maxnoofBPLMNs INTEGER ::= 6 +maxnoofCandidateSpCells INTEGER ::= 64 +maxnoofPotentialSpCells INTEGER ::= 64 +maxnoofNrCellBands INTEGER ::= 32 +maxnoofSIBTypes INTEGER ::= 32 +maxnoofSITypes INTEGER ::= 32 +maxnoofPagingCells INTEGER ::= 512 +maxnoofTNLAssociations INTEGER ::= 32 +maxnoofQoSFlows INTEGER ::= 64 +maxnoofSliceItems INTEGER ::= 1024 +maxCellineNB INTEGER ::= 256 +maxnoofExtendedBPLMNs INTEGER ::= 6 +maxnoofUEIDs INTEGER ::= 65536 +maxnoofBPLMNsNR INTEGER ::= 12 +maxnoofUACPLMNs INTEGER ::= 12 +maxnoofUACperPLMN INTEGER ::= 64 +maxnoofAdditionalSIBs INTEGER ::= 63 +maxnoofslots INTEGER ::= 5120 +maxnoofTLAs INTEGER ::= 16 +maxnoofGTPTLAs INTEGER ::= 16 +maxnoofBHRLCChannels INTEGER ::= 65536 +maxnoofRoutingEntries INTEGER ::= 1024 +maxnoofIABSTCInfo INTEGER ::= 45 +maxnoofSymbols INTEGER ::= 14 +maxnoofServingCells INTEGER ::= 32 +maxnoofDUFSlots INTEGER ::= 320 +maxnoofHSNASlots INTEGER ::= 5120 +maxnoofServedCellsIAB INTEGER ::= 512 +maxnoofChildIABNodes INTEGER ::= 1024 +maxnoofNonUPTrafficMappings INTEGER ::= 32 +maxnoofTLAsIAB INTEGER ::= 1024 +maxnoofMappingEntries INTEGER ::= 67108864 +maxnoofDSInfo INTEGER ::= 64 +maxnoofEgressLinks INTEGER ::= 2 +maxnoofULUPTNLInformationforIAB INTEGER ::= 32678 +maxnoofUPTNLAddresses INTEGER ::= 8 +maxnoofSLDRBs INTEGER ::= 512 +maxnoofQoSParaSets INTEGER ::= 8 +maxnoofPC5QoSFlows INTEGER ::= 2048 +maxnoofSSBAreas INTEGER ::= 64 +maxnoofPhysicalResourceBlocks INTEGER ::= 275 +maxnoofPhysicalResourceBlocks-1 INTEGER ::= 274 +maxnoofPRACHconfigs INTEGER ::= 16 +maxnoofRACHReports INTEGER ::= 64 +maxnoofRLFReports INTEGER ::= 64 +maxnoofAdditionalPDCPDuplicationTNL INTEGER ::= 2 +maxnoofRLCDuplicationState INTEGER ::= 3 +maxnoofCHOcells INTEGER ::= 8 +maxnoofMDTPLMNs INTEGER ::= 16 +maxnoofCAGsupported INTEGER ::= 12 +maxnoofNIDsupported INTEGER ::= 12 +maxnoofNRSCSs INTEGER ::= 5 +maxnoofExtSliceItems INTEGER ::= 65535 +maxnoofPosMeas INTEGER ::= 16384 +maxnoofTRPInfoTypes INTEGER ::= 64 +maxnoofTRPs INTEGER ::= 65535 +maxnoofSRSTriggerStates INTEGER ::= 3 +maxnoofSpatialRelations INTEGER ::= 64 +maxnoBcastCell INTEGER ::= 16384 +maxnoofAngleInfo INTEGER ::= 65535 +maxnooflcs-gcs-translation INTEGER ::= 3 +maxnoofPath INTEGER ::= 2 +maxnoofMeasE-CID INTEGER ::= 64 +maxnoofSSBs INTEGER ::= 255 +maxnoSRS-ResourceSets INTEGER ::= 16 +maxnoSRS-ResourcePerSet INTEGER ::= 16 +maxnoSRS-Carriers INTEGER ::= 32 +maxnoSCSs INTEGER ::= 5 +maxnoSRS-Resources INTEGER ::= 64 +maxnoSRS-PosResources INTEGER ::= 64 +maxnoSRS-PosResourceSets INTEGER ::= 16 +maxnoSRS-PosResourcePerSet INTEGER ::= 16 +maxnoofPRS-ResourceSets INTEGER ::= 2 +maxnoofPRS-ResourcesPerSet INTEGER ::= 64 +maxNoOfMeasTRPs INTEGER ::= 64 +maxnoofPRSresourceSets INTEGER ::= 8 +maxnoofPRSresources INTEGER ::= 64 + + + +-- ************************************************************** +-- +-- IEs +-- +-- ************************************************************** + +id-Cause ProtocolIE-ID ::= 0 +id-Cells-Failed-to-be-Activated-List ProtocolIE-ID ::= 1 +id-Cells-Failed-to-be-Activated-List-Item ProtocolIE-ID ::= 2 +id-Cells-to-be-Activated-List ProtocolIE-ID ::= 3 +id-Cells-to-be-Activated-List-Item ProtocolIE-ID ::= 4 +id-Cells-to-be-Deactivated-List ProtocolIE-ID ::= 5 +id-Cells-to-be-Deactivated-List-Item ProtocolIE-ID ::= 6 +id-CriticalityDiagnostics ProtocolIE-ID ::= 7 +id-CUtoDURRCInformation ProtocolIE-ID ::= 9 +id-DRBs-FailedToBeModified-Item ProtocolIE-ID ::= 12 +id-DRBs-FailedToBeModified-List ProtocolIE-ID ::= 13 +id-DRBs-FailedToBeSetup-Item ProtocolIE-ID ::= 14 +id-DRBs-FailedToBeSetup-List ProtocolIE-ID ::= 15 +id-DRBs-FailedToBeSetupMod-Item ProtocolIE-ID ::= 16 +id-DRBs-FailedToBeSetupMod-List ProtocolIE-ID ::= 17 +id-DRBs-ModifiedConf-Item ProtocolIE-ID ::= 18 +id-DRBs-ModifiedConf-List ProtocolIE-ID ::= 19 +id-DRBs-Modified-Item ProtocolIE-ID ::= 20 +id-DRBs-Modified-List ProtocolIE-ID ::= 21 +id-DRBs-Required-ToBeModified-Item ProtocolIE-ID ::= 22 +id-DRBs-Required-ToBeModified-List ProtocolIE-ID ::= 23 +id-DRBs-Required-ToBeReleased-Item ProtocolIE-ID ::= 24 +id-DRBs-Required-ToBeReleased-List ProtocolIE-ID ::= 25 +id-DRBs-Setup-Item ProtocolIE-ID ::= 26 +id-DRBs-Setup-List ProtocolIE-ID ::= 27 +id-DRBs-SetupMod-Item ProtocolIE-ID ::= 28 +id-DRBs-SetupMod-List ProtocolIE-ID ::= 29 +id-DRBs-ToBeModified-Item ProtocolIE-ID ::= 30 +id-DRBs-ToBeModified-List ProtocolIE-ID ::= 31 +id-DRBs-ToBeReleased-Item ProtocolIE-ID ::= 32 +id-DRBs-ToBeReleased-List ProtocolIE-ID ::= 33 +id-DRBs-ToBeSetup-Item ProtocolIE-ID ::= 34 +id-DRBs-ToBeSetup-List ProtocolIE-ID ::= 35 +id-DRBs-ToBeSetupMod-Item ProtocolIE-ID ::= 36 +id-DRBs-ToBeSetupMod-List ProtocolIE-ID ::= 37 +id-DRXCycle ProtocolIE-ID ::= 38 +id-DUtoCURRCInformation ProtocolIE-ID ::= 39 +id-gNB-CU-UE-F1AP-ID ProtocolIE-ID ::= 40 +id-gNB-DU-UE-F1AP-ID ProtocolIE-ID ::= 41 +id-gNB-DU-ID ProtocolIE-ID ::= 42 +id-GNB-DU-Served-Cells-Item ProtocolIE-ID ::= 43 +id-gNB-DU-Served-Cells-List ProtocolIE-ID ::= 44 +id-gNB-DU-Name ProtocolIE-ID ::= 45 +id-NRCellID ProtocolIE-ID ::= 46 +id-oldgNB-DU-UE-F1AP-ID ProtocolIE-ID ::= 47 +id-ResetType ProtocolIE-ID ::= 48 +id-ResourceCoordinationTransferContainer ProtocolIE-ID ::= 49 +id-RRCContainer ProtocolIE-ID ::= 50 +id-SCell-ToBeRemoved-Item ProtocolIE-ID ::= 51 +id-SCell-ToBeRemoved-List ProtocolIE-ID ::= 52 +id-SCell-ToBeSetup-Item ProtocolIE-ID ::= 53 +id-SCell-ToBeSetup-List ProtocolIE-ID ::= 54 +id-SCell-ToBeSetupMod-Item ProtocolIE-ID ::= 55 +id-SCell-ToBeSetupMod-List ProtocolIE-ID ::= 56 +id-Served-Cells-To-Add-Item ProtocolIE-ID ::= 57 +id-Served-Cells-To-Add-List ProtocolIE-ID ::= 58 +id-Served-Cells-To-Delete-Item ProtocolIE-ID ::= 59 +id-Served-Cells-To-Delete-List ProtocolIE-ID ::= 60 +id-Served-Cells-To-Modify-Item ProtocolIE-ID ::= 61 +id-Served-Cells-To-Modify-List ProtocolIE-ID ::= 62 +id-SpCell-ID ProtocolIE-ID ::= 63 +id-SRBID ProtocolIE-ID ::= 64 +id-SRBs-FailedToBeSetup-Item ProtocolIE-ID ::= 65 +id-SRBs-FailedToBeSetup-List ProtocolIE-ID ::= 66 +id-SRBs-FailedToBeSetupMod-Item ProtocolIE-ID ::= 67 +id-SRBs-FailedToBeSetupMod-List ProtocolIE-ID ::= 68 +id-SRBs-Required-ToBeReleased-Item ProtocolIE-ID ::= 69 +id-SRBs-Required-ToBeReleased-List ProtocolIE-ID ::= 70 +id-SRBs-ToBeReleased-Item ProtocolIE-ID ::= 71 +id-SRBs-ToBeReleased-List ProtocolIE-ID ::= 72 +id-SRBs-ToBeSetup-Item ProtocolIE-ID ::= 73 +id-SRBs-ToBeSetup-List ProtocolIE-ID ::= 74 +id-SRBs-ToBeSetupMod-Item ProtocolIE-ID ::= 75 +id-SRBs-ToBeSetupMod-List ProtocolIE-ID ::= 76 +id-TimeToWait ProtocolIE-ID ::= 77 +id-TransactionID ProtocolIE-ID ::= 78 +id-TransmissionActionIndicator ProtocolIE-ID ::= 79 +id-UE-associatedLogicalF1-ConnectionItem ProtocolIE-ID ::= 80 +id-UE-associatedLogicalF1-ConnectionListResAck ProtocolIE-ID ::= 81 +id-gNB-CU-Name ProtocolIE-ID ::= 82 +id-SCell-FailedtoSetup-List ProtocolIE-ID ::= 83 +id-SCell-FailedtoSetup-Item ProtocolIE-ID ::= 84 +id-SCell-FailedtoSetupMod-List ProtocolIE-ID ::= 85 +id-SCell-FailedtoSetupMod-Item ProtocolIE-ID ::= 86 +id-RRCReconfigurationCompleteIndicator ProtocolIE-ID ::= 87 +id-Cells-Status-Item ProtocolIE-ID ::= 88 +id-Cells-Status-List ProtocolIE-ID ::= 89 +id-Candidate-SpCell-List ProtocolIE-ID ::= 90 +id-Candidate-SpCell-Item ProtocolIE-ID ::= 91 +id-Potential-SpCell-List ProtocolIE-ID ::= 92 +id-Potential-SpCell-Item ProtocolIE-ID ::= 93 +id-FullConfiguration ProtocolIE-ID ::= 94 +id-C-RNTI ProtocolIE-ID ::= 95 +id-SpCellULConfigured ProtocolIE-ID ::= 96 +id-InactivityMonitoringRequest ProtocolIE-ID ::= 97 +id-InactivityMonitoringResponse ProtocolIE-ID ::= 98 +id-DRB-Activity-Item ProtocolIE-ID ::= 99 +id-DRB-Activity-List ProtocolIE-ID ::= 100 +id-EUTRA-NR-CellResourceCoordinationReq-Container ProtocolIE-ID ::= 101 +id-EUTRA-NR-CellResourceCoordinationReqAck-Container ProtocolIE-ID ::= 102 +id-Protected-EUTRA-Resources-List ProtocolIE-ID ::= 105 +id-RequestType ProtocolIE-ID ::= 106 +id-ServCellIndex ProtocolIE-ID ::= 107 +id-RAT-FrequencyPriorityInformation ProtocolIE-ID ::= 108 +id-ExecuteDuplication ProtocolIE-ID ::= 109 +id-NRCGI ProtocolIE-ID ::= 111 +id-PagingCell-Item ProtocolIE-ID ::= 112 +id-PagingCell-List ProtocolIE-ID ::= 113 +id-PagingDRX ProtocolIE-ID ::= 114 +id-PagingPriority ProtocolIE-ID ::= 115 +id-SItype-List ProtocolIE-ID ::= 116 +id-UEIdentityIndexValue ProtocolIE-ID ::= 117 +id-gNB-CUSystemInformation ProtocolIE-ID ::= 118 +id-HandoverPreparationInformation ProtocolIE-ID ::= 119 +id-GNB-CU-TNL-Association-To-Add-Item ProtocolIE-ID ::= 120 +id-GNB-CU-TNL-Association-To-Add-List ProtocolIE-ID ::= 121 +id-GNB-CU-TNL-Association-To-Remove-Item ProtocolIE-ID ::= 122 +id-GNB-CU-TNL-Association-To-Remove-List ProtocolIE-ID ::= 123 +id-GNB-CU-TNL-Association-To-Update-Item ProtocolIE-ID ::= 124 +id-GNB-CU-TNL-Association-To-Update-List ProtocolIE-ID ::= 125 +id-MaskedIMEISV ProtocolIE-ID ::= 126 +id-PagingIdentity ProtocolIE-ID ::= 127 +id-DUtoCURRCContainer ProtocolIE-ID ::= 128 +id-Cells-to-be-Barred-List ProtocolIE-ID ::= 129 +id-Cells-to-be-Barred-Item ProtocolIE-ID ::= 130 +id-TAISliceSupportList ProtocolIE-ID ::= 131 +id-GNB-CU-TNL-Association-Setup-List ProtocolIE-ID ::= 132 +id-GNB-CU-TNL-Association-Setup-Item ProtocolIE-ID ::= 133 +id-GNB-CU-TNL-Association-Failed-To-Setup-List ProtocolIE-ID ::= 134 +id-GNB-CU-TNL-Association-Failed-To-Setup-Item ProtocolIE-ID ::= 135 +id-DRB-Notify-Item ProtocolIE-ID ::= 136 +id-DRB-Notify-List ProtocolIE-ID ::= 137 +id-NotficationControl ProtocolIE-ID ::= 138 +id-RANAC ProtocolIE-ID ::= 139 +id-PWSSystemInformation ProtocolIE-ID ::= 140 +id-RepetitionPeriod ProtocolIE-ID ::= 141 +id-NumberofBroadcastRequest ProtocolIE-ID ::= 142 +id-Cells-To-Be-Broadcast-List ProtocolIE-ID ::= 144 +id-Cells-To-Be-Broadcast-Item ProtocolIE-ID ::= 145 +id-Cells-Broadcast-Completed-List ProtocolIE-ID ::= 146 +id-Cells-Broadcast-Completed-Item ProtocolIE-ID ::= 147 +id-Broadcast-To-Be-Cancelled-List ProtocolIE-ID ::= 148 +id-Broadcast-To-Be-Cancelled-Item ProtocolIE-ID ::= 149 +id-Cells-Broadcast-Cancelled-List ProtocolIE-ID ::= 150 +id-Cells-Broadcast-Cancelled-Item ProtocolIE-ID ::= 151 +id-NR-CGI-List-For-Restart-List ProtocolIE-ID ::= 152 +id-NR-CGI-List-For-Restart-Item ProtocolIE-ID ::= 153 +id-PWS-Failed-NR-CGI-List ProtocolIE-ID ::= 154 +id-PWS-Failed-NR-CGI-Item ProtocolIE-ID ::= 155 +id-ConfirmedUEID ProtocolIE-ID ::= 156 +id-Cancel-all-Warning-Messages-Indicator ProtocolIE-ID ::= 157 +id-GNB-DU-UE-AMBR-UL ProtocolIE-ID ::= 158 +id-DRXConfigurationIndicator ProtocolIE-ID ::= 159 +id-RLC-Status ProtocolIE-ID ::= 160 +id-DLPDCPSNLength ProtocolIE-ID ::= 161 +id-GNB-DUConfigurationQuery ProtocolIE-ID ::= 162 +id-MeasurementTimingConfiguration ProtocolIE-ID ::= 163 +id-DRB-Information ProtocolIE-ID ::= 164 +id-ServingPLMN ProtocolIE-ID ::= 165 +id-Protected-EUTRA-Resources-Item ProtocolIE-ID ::= 168 +id-GNB-CU-RRC-Version ProtocolIE-ID ::= 170 +id-GNB-DU-RRC-Version ProtocolIE-ID ::= 171 +id-GNBDUOverloadInformation ProtocolIE-ID ::= 172 +id-CellGroupConfig ProtocolIE-ID ::= 173 +id-RLCFailureIndication ProtocolIE-ID ::= 174 +id-UplinkTxDirectCurrentListInformation ProtocolIE-ID ::= 175 +id-DC-Based-Duplication-Configured ProtocolIE-ID ::= 176 +id-DC-Based-Duplication-Activation ProtocolIE-ID ::= 177 +id-SULAccessIndication ProtocolIE-ID ::= 178 +id-AvailablePLMNList ProtocolIE-ID ::= 179 +id-PDUSessionID ProtocolIE-ID ::= 180 +id-ULPDUSessionAggregateMaximumBitRate ProtocolIE-ID ::= 181 +id-ServingCellMO ProtocolIE-ID ::= 182 +id-QoSFlowMappingIndication ProtocolIE-ID ::= 183 +id-RRCDeliveryStatusRequest ProtocolIE-ID ::= 184 +id-RRCDeliveryStatus ProtocolIE-ID ::= 185 +id-BearerTypeChange ProtocolIE-ID ::= 186 +id-RLCMode ProtocolIE-ID ::= 187 +id-Duplication-Activation ProtocolIE-ID ::= 188 +id-Dedicated-SIDelivery-NeededUE-List ProtocolIE-ID ::= 189 +id-Dedicated-SIDelivery-NeededUE-Item ProtocolIE-ID ::= 190 +id-DRX-LongCycleStartOffset ProtocolIE-ID ::= 191 +id-ULPDCPSNLength ProtocolIE-ID ::= 192 +id-SelectedBandCombinationIndex ProtocolIE-ID ::= 193 +id-SelectedFeatureSetEntryIndex ProtocolIE-ID ::= 194 +id-ResourceCoordinationTransferInformation ProtocolIE-ID ::= 195 +id-ExtendedServedPLMNs-List ProtocolIE-ID ::= 196 +id-ExtendedAvailablePLMN-List ProtocolIE-ID ::= 197 +id-Associated-SCell-List ProtocolIE-ID ::= 198 +id-latest-RRC-Version-Enhanced ProtocolIE-ID ::= 199 +id-Associated-SCell-Item ProtocolIE-ID ::= 200 +id-Cell-Direction ProtocolIE-ID ::= 201 +id-SRBs-Setup-List ProtocolIE-ID ::= 202 +id-SRBs-Setup-Item ProtocolIE-ID ::= 203 +id-SRBs-SetupMod-List ProtocolIE-ID ::= 204 +id-SRBs-SetupMod-Item ProtocolIE-ID ::= 205 +id-SRBs-Modified-List ProtocolIE-ID ::= 206 +id-SRBs-Modified-Item ProtocolIE-ID ::= 207 +id-Ph-InfoSCG ProtocolIE-ID ::= 208 +id-RequestedBandCombinationIndex ProtocolIE-ID ::= 209 +id-RequestedFeatureSetEntryIndex ProtocolIE-ID ::= 210 +id-RequestedP-MaxFR2 ProtocolIE-ID ::= 211 +id-DRX-Config ProtocolIE-ID ::= 212 +id-IgnoreResourceCoordinationContainer ProtocolIE-ID ::= 213 +id-UEAssistanceInformation ProtocolIE-ID ::= 214 +id-NeedforGap ProtocolIE-ID ::= 215 +id-PagingOrigin ProtocolIE-ID ::= 216 +id-new-gNB-CU-UE-F1AP-ID ProtocolIE-ID ::= 217 +id-RedirectedRRCmessage ProtocolIE-ID ::= 218 +id-new-gNB-DU-UE-F1AP-ID ProtocolIE-ID ::= 219 +id-NotificationInformation ProtocolIE-ID ::= 220 +id-PLMNAssistanceInfoForNetShar ProtocolIE-ID ::= 221 +id-UEContextNotRetrievable ProtocolIE-ID ::= 222 +id-BPLMN-ID-Info-List ProtocolIE-ID ::= 223 +id-SelectedPLMNID ProtocolIE-ID ::= 224 +id-UAC-Assistance-Info ProtocolIE-ID ::= 225 +id-RANUEID ProtocolIE-ID ::= 226 +id-GNB-DU-TNL-Association-To-Remove-Item ProtocolIE-ID ::= 227 +id-GNB-DU-TNL-Association-To-Remove-List ProtocolIE-ID ::= 228 +id-TNLAssociationTransportLayerAddressgNBDU ProtocolIE-ID ::= 229 +id-portNumber ProtocolIE-ID ::= 230 +id-AdditionalSIBMessageList ProtocolIE-ID ::= 231 +id-Cell-Type ProtocolIE-ID ::= 232 +id-IgnorePRACHConfiguration ProtocolIE-ID ::= 233 +id-CG-Config ProtocolIE-ID ::= 234 +id-PDCCH-BlindDetectionSCG ProtocolIE-ID ::= 235 +id-Requested-PDCCH-BlindDetectionSCG ProtocolIE-ID ::= 236 +id-Ph-InfoMCG ProtocolIE-ID ::= 237 +id-MeasGapSharingConfig ProtocolIE-ID ::= 238 +id-systemInformationAreaID ProtocolIE-ID ::= 239 +id-areaScope ProtocolIE-ID ::= 240 +id-RRCContainer-RRCSetupComplete ProtocolIE-ID ::= 241 +id-TraceActivation ProtocolIE-ID ::= 242 +id-TraceID ProtocolIE-ID ::= 243 +id-Neighbour-Cell-Information-List ProtocolIE-ID ::= 244 +id-SymbolAllocInSlot ProtocolIE-ID ::= 246 +id-NumDLULSymbols ProtocolIE-ID ::= 247 +id-AdditionalRRMPriorityIndex ProtocolIE-ID ::= 248 +id-DUCURadioInformationType ProtocolIE-ID ::= 249 +id-CUDURadioInformationType ProtocolIE-ID ::= 250 +id-AggressorgNBSetID ProtocolIE-ID ::= 251 +id-VictimgNBSetID ProtocolIE-ID ::= 252 +id-LowerLayerPresenceStatusChange ProtocolIE-ID ::= 253 +id-Transport-Layer-Address-Info ProtocolIE-ID ::= 254 +id-Neighbour-Cell-Information-Item ProtocolIE-ID ::= 255 +id-IntendedTDD-DL-ULConfig ProtocolIE-ID ::= 256 +id-QosMonitoringRequest ProtocolIE-ID ::= 257 +id-BHChannels-ToBeSetup-List ProtocolIE-ID ::= 258 +id-BHChannels-ToBeSetup-Item ProtocolIE-ID ::= 259 +id-BHChannels-Setup-List ProtocolIE-ID ::= 260 +id-BHChannels-Setup-Item ProtocolIE-ID ::= 261 +id-BHChannels-ToBeModified-Item ProtocolIE-ID ::= 262 +id-BHChannels-ToBeModified-List ProtocolIE-ID ::= 263 +id-BHChannels-ToBeReleased-Item ProtocolIE-ID ::= 264 +id-BHChannels-ToBeReleased-List ProtocolIE-ID ::= 265 +id-BHChannels-ToBeSetupMod-Item ProtocolIE-ID ::= 266 +id-BHChannels-ToBeSetupMod-List ProtocolIE-ID ::= 267 +id-BHChannels-FailedToBeModified-Item ProtocolIE-ID ::= 268 +id-BHChannels-FailedToBeModified-List ProtocolIE-ID ::= 269 +id-BHChannels-FailedToBeSetupMod-Item ProtocolIE-ID ::= 270 +id-BHChannels-FailedToBeSetupMod-List ProtocolIE-ID ::= 271 +id-BHChannels-Modified-Item ProtocolIE-ID ::= 272 +id-BHChannels-Modified-List ProtocolIE-ID ::= 273 +id-BHChannels-SetupMod-Item ProtocolIE-ID ::= 274 +id-BHChannels-SetupMod-List ProtocolIE-ID ::= 275 +id-BHChannels-Required-ToBeReleased-Item ProtocolIE-ID ::= 276 +id-BHChannels-Required-ToBeReleased-List ProtocolIE-ID ::= 277 +id-BHChannels-FailedToBeSetup-Item ProtocolIE-ID ::= 278 +id-BHChannels-FailedToBeSetup-List ProtocolIE-ID ::= 279 +id-BHInfo ProtocolIE-ID ::= 280 +id-BAPAddress ProtocolIE-ID ::= 281 +id-ConfiguredBAPAddress ProtocolIE-ID ::= 282 +id-BH-Routing-Information-Added-List ProtocolIE-ID ::= 283 +id-BH-Routing-Information-Added-List-Item ProtocolIE-ID ::= 284 +id-BH-Routing-Information-Removed-List ProtocolIE-ID ::= 285 +id-BH-Routing-Information-Removed-List-Item ProtocolIE-ID ::= 286 +id-UL-BH-Non-UP-Traffic-Mapping ProtocolIE-ID ::= 287 +id-Activated-Cells-to-be-Updated-List ProtocolIE-ID ::= 288 +id-Child-Nodes-List ProtocolIE-ID ::= 289 +id-IAB-Info-IAB-DU ProtocolIE-ID ::= 290 +id-IAB-Info-IAB-donor-CU ProtocolIE-ID ::= 291 +id-IAB-TNL-Addresses-To-Remove-List ProtocolIE-ID ::= 292 +id-IAB-TNL-Addresses-To-Remove-Item ProtocolIE-ID ::= 293 +id-IAB-Allocated-TNL-Address-List ProtocolIE-ID ::= 294 +id-IAB-Allocated-TNL-Address-Item ProtocolIE-ID ::= 295 +id-IABIPv6RequestType ProtocolIE-ID ::= 296 +id-IABv4AddressesRequested ProtocolIE-ID ::= 297 +id-IAB-Barred ProtocolIE-ID ::= 298 +id-TrafficMappingInformation ProtocolIE-ID ::= 299 +id-UL-UP-TNL-Information-to-Update-List ProtocolIE-ID ::= 300 +id-UL-UP-TNL-Information-to-Update-List-Item ProtocolIE-ID ::= 301 +id-UL-UP-TNL-Address-to-Update-List ProtocolIE-ID ::= 302 +id-UL-UP-TNL-Address-to-Update-List-Item ProtocolIE-ID ::= 303 +id-DL-UP-TNL-Address-to-Update-List ProtocolIE-ID ::= 304 +id-DL-UP-TNL-Address-to-Update-List-Item ProtocolIE-ID ::= 305 +id-NRV2XServicesAuthorized ProtocolIE-ID ::= 306 +id-LTEV2XServicesAuthorized ProtocolIE-ID ::= 307 +id-NRUESidelinkAggregateMaximumBitrate ProtocolIE-ID ::= 308 +id-LTEUESidelinkAggregateMaximumBitrate ProtocolIE-ID ::= 309 +id-SIB12-message ProtocolIE-ID ::= 310 +id-SIB13-message ProtocolIE-ID ::= 311 +id-SIB14-message ProtocolIE-ID ::= 312 +id-SLDRBs-FailedToBeModified-Item ProtocolIE-ID ::= 313 +id-SLDRBs-FailedToBeModified-List ProtocolIE-ID ::= 314 +id-SLDRBs-FailedToBeSetup-Item ProtocolIE-ID ::= 315 +id-SLDRBs-FailedToBeSetup-List ProtocolIE-ID ::= 316 +id-SLDRBs-Modified-Item ProtocolIE-ID ::= 317 +id-SLDRBs-Modified-List ProtocolIE-ID ::= 318 +id-SLDRBs-Required-ToBeModified-Item ProtocolIE-ID ::= 319 +id-SLDRBs-Required-ToBeModified-List ProtocolIE-ID ::= 320 +id-SLDRBs-Required-ToBeReleased-Item ProtocolIE-ID ::= 321 +id-SLDRBs-Required-ToBeReleased-List ProtocolIE-ID ::= 322 +id-SLDRBs-Setup-Item ProtocolIE-ID ::= 323 +id-SLDRBs-Setup-List ProtocolIE-ID ::= 324 +id-SLDRBs-ToBeModified-Item ProtocolIE-ID ::= 325 +id-SLDRBs-ToBeModified-List ProtocolIE-ID ::= 326 +id-SLDRBs-ToBeReleased-Item ProtocolIE-ID ::= 327 +id-SLDRBs-ToBeReleased-List ProtocolIE-ID ::= 328 +id-SLDRBs-ToBeSetup-Item ProtocolIE-ID ::= 329 +id-SLDRBs-ToBeSetup-List ProtocolIE-ID ::= 330 +id-SLDRBs-ToBeSetupMod-Item ProtocolIE-ID ::= 331 +id-SLDRBs-ToBeSetupMod-List ProtocolIE-ID ::= 332 +id-SLDRBs-SetupMod-List ProtocolIE-ID ::= 333 +id-SLDRBs-FailedToBeSetupMod-List ProtocolIE-ID ::= 334 +id-SLDRBs-SetupMod-Item ProtocolIE-ID ::= 335 +id-SLDRBs-FailedToBeSetupMod-Item ProtocolIE-ID ::= 336 +id-SLDRBs-ModifiedConf-List ProtocolIE-ID ::= 337 +id-SLDRBs-ModifiedConf-Item ProtocolIE-ID ::= 338 +id-UEAssistanceInformationEUTRA ProtocolIE-ID ::= 339 +id-PC5LinkAMBR ProtocolIE-ID ::= 340 +id-SL-PHY-MAC-RLC-Config ProtocolIE-ID ::= 341 +id-SL-ConfigDedicatedEUTRA ProtocolIE-ID ::= 342 +id-AlternativeQoSParaSetList ProtocolIE-ID ::= 343 +id-CurrentQoSParaSetIndex ProtocolIE-ID ::= 344 +id-gNBCUMeasurementID ProtocolIE-ID ::= 345 +id-gNBDUMeasurementID ProtocolIE-ID ::= 346 +id-RegistrationRequest ProtocolIE-ID ::= 347 +id-ReportCharacteristics ProtocolIE-ID ::= 348 +id-CellToReportList ProtocolIE-ID ::= 349 +id-CellMeasurementResultList ProtocolIE-ID ::= 350 +id-HardwareLoadIndicator ProtocolIE-ID ::= 351 +id-ReportingPeriodicity ProtocolIE-ID ::= 352 +id-TNLCapacityIndicator ProtocolIE-ID ::= 353 +id-CarrierList ProtocolIE-ID ::= 354 +id-ULCarrierList ProtocolIE-ID ::= 355 +id-FrequencyShift7p5khz ProtocolIE-ID ::= 356 +id-SSB-PositionsInBurst ProtocolIE-ID ::= 357 +id-NRPRACHConfig ProtocolIE-ID ::= 358 +id-RACHReportInformationList ProtocolIE-ID ::= 359 +id-RLFReportInformationList ProtocolIE-ID ::= 360 +id-TDD-UL-DLConfigCommonNR ProtocolIE-ID ::= 361 +id-CNPacketDelayBudgetDownlink ProtocolIE-ID ::= 362 +id-ExtendedPacketDelayBudget ProtocolIE-ID ::= 363 +id-TSCTrafficCharacteristics ProtocolIE-ID ::= 364 +id-ReportingRequestType ProtocolIE-ID ::= 365 +id-TimeReferenceInformation ProtocolIE-ID ::= 366 +id-CNPacketDelayBudgetUplink ProtocolIE-ID ::= 369 +id-AdditionalPDCPDuplicationTNL-List ProtocolIE-ID ::= 370 +id-RLCDuplicationInformation ProtocolIE-ID ::= 371 +id-AdditionalDuplicationIndication ProtocolIE-ID ::= 372 +id-ConditionalInterDUMobilityInformation ProtocolIE-ID ::= 373 +id-ConditionalIntraDUMobilityInformation ProtocolIE-ID ::= 374 +id-targetCellsToCancel ProtocolIE-ID ::= 375 +id-requestedTargetCellGlobalID ProtocolIE-ID ::= 376 +id-ManagementBasedMDTPLMNList ProtocolIE-ID ::= 377 +id-TraceCollectionEntityIPAddress ProtocolIE-ID ::= 378 +id-PrivacyIndicator ProtocolIE-ID ::= 379 +id-TraceCollectionEntityURI ProtocolIE-ID ::= 380 +id-mdtConfiguration ProtocolIE-ID ::= 381 +id-ServingNID ProtocolIE-ID ::= 382 +id-NPNBroadcastInformation ProtocolIE-ID ::= 383 +id-NPNSupportInfo ProtocolIE-ID ::= 384 +id-NID ProtocolIE-ID ::= 385 +id-AvailableSNPN-ID-List ProtocolIE-ID ::= 386 +id-SIB10-message ProtocolIE-ID ::= 387 +id-DLCarrierList ProtocolIE-ID ::= 389 + id-ExtendedTAISliceSupportList ProtocolIE-ID ::= 390 +id-RequestedSRSTransmissionCharacteristics ProtocolIE-ID ::= 391 +id-PosAssistance-Information ProtocolIE-ID ::= 392 +id-PosBroadcast ProtocolIE-ID ::= 393 +id-RoutingID ProtocolIE-ID ::= 394 +id-PosAssistanceInformationFailureList ProtocolIE-ID ::= 395 +id-PosMeasurementQuantities ProtocolIE-ID ::= 396 +id-PosMeasurementResultList ProtocolIE-ID ::= 397 +id-TRPInformationTypeListTRPReq ProtocolIE-ID ::= 398 +id-TRPInformationTypeItem ProtocolIE-ID ::= 399 +id-TRPInformationListTRPResp ProtocolIE-ID ::= 400 +id-TRPInformationItem ProtocolIE-ID ::= 401 +id-LMF-MeasurementID ProtocolIE-ID ::= 402 +id-SRSType ProtocolIE-ID ::= 403 +id-ActivationTime ProtocolIE-ID ::= 404 +id-AbortTransmission ProtocolIE-ID ::= 405 +id-PositioningBroadcastCells ProtocolIE-ID ::= 406 +id-SRSConfiguration ProtocolIE-ID ::= 407 +id-PosReportCharacteristics ProtocolIE-ID ::= 408 +id-PosMeasurementPeriodicity ProtocolIE-ID ::= 409 +id-TRPList ProtocolIE-ID ::= 410 +id-RAN-MeasurementID ProtocolIE-ID ::= 411 +id-LMF-UE-MeasurementID ProtocolIE-ID ::= 412 +id-RAN-UE-MeasurementID ProtocolIE-ID ::= 413 +id-E-CID-MeasurementQuantities ProtocolIE-ID ::= 414 +id-E-CID-MeasurementQuantities-Item ProtocolIE-ID ::= 415 +id-E-CID-MeasurementPeriodicity ProtocolIE-ID ::= 416 +id-E-CID-MeasurementResult ProtocolIE-ID ::= 417 +id-Cell-Portion-ID ProtocolIE-ID ::= 418 +id-SFNInitialisationTime ProtocolIE-ID ::= 419 +id-SystemFrameNumber ProtocolIE-ID ::= 420 +id-SlotNumber ProtocolIE-ID ::= 421 +id-TRP-MeasurementRequestList ProtocolIE-ID ::= 422 +id-MeasurementBeamInfoRequest ProtocolIE-ID ::= 423 +id-E-CID-ReportCharacteristics ProtocolIE-ID ::= 424 +id-ConfiguredTACIndication ProtocolIE-ID ::= 425 +id-Extended-GNB-DU-Name ProtocolIE-ID ::= 426 +id-Extended-GNB-CU-Name ProtocolIE-ID ::= 427 + + +END +-- ASN1STOP + +-- ASN1START +-- ************************************************************** +-- +-- Container definitions +-- +-- ************************************************************** + +F1AP-Containers { +itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) +ngran-access (22) modules (3) f1ap (3) version1 (1) f1ap-Containers (5) } + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +-- ************************************************************** +-- +-- IE parameter types from other modules. +-- +-- ************************************************************** + +IMPORTS + Criticality, + Presence, + PrivateIE-ID, + ProtocolExtensionID, + ProtocolIE-ID + +FROM F1AP-CommonDataTypes + maxPrivateIEs, + maxProtocolExtensions, + maxProtocolIEs + +FROM F1AP-Constants; + +-- ************************************************************** +-- +-- Class Definition for Protocol IEs +-- +-- ************************************************************** + +F1AP-PROTOCOL-IES ::= CLASS { + &id ProtocolIE-ID UNIQUE, + &criticality Criticality, + &Value, + &presence Presence +} +WITH SYNTAX { + ID &id + CRITICALITY &criticality + TYPE &Value + PRESENCE &presence +} + +-- ************************************************************** +-- +-- Class Definition for Protocol IEs +-- +-- ************************************************************** + +F1AP-PROTOCOL-IES-PAIR ::= CLASS { + &id ProtocolIE-ID UNIQUE, + &firstCriticality Criticality, + &FirstValue, + &secondCriticality Criticality, + &SecondValue, + &presence Presence +} +WITH SYNTAX { + ID &id + FIRST CRITICALITY &firstCriticality + FIRST TYPE &FirstValue + SECOND CRITICALITY &secondCriticality + SECOND TYPE &SecondValue + PRESENCE &presence +} + +-- ************************************************************** +-- +-- Class Definition for Protocol Extensions +-- +-- ************************************************************** + +F1AP-PROTOCOL-EXTENSION ::= CLASS { + &id ProtocolExtensionID UNIQUE, + &criticality Criticality, + &Extension, + &presence Presence +} +WITH SYNTAX { + ID &id + CRITICALITY &criticality + EXTENSION &Extension + PRESENCE &presence +} + +-- ************************************************************** +-- +-- Class Definition for Private IEs +-- +-- ************************************************************** + +F1AP-PRIVATE-IES ::= CLASS { + &id PrivateIE-ID, + &criticality Criticality, + &Value, + &presence Presence +} +WITH SYNTAX { + ID &id + CRITICALITY &criticality + TYPE &Value + PRESENCE &presence +} + +-- ************************************************************** +-- +-- Container for Protocol IEs +-- +-- ************************************************************** + +ProtocolIE-Container {F1AP-PROTOCOL-IES : IEsSetParam} ::= + SEQUENCE (SIZE (0..maxProtocolIEs)) OF + ProtocolIE-Field {{IEsSetParam}} + +ProtocolIE-SingleContainer {F1AP-PROTOCOL-IES : IEsSetParam} ::= + ProtocolIE-Field {{IEsSetParam}} + +ProtocolIE-Field {F1AP-PROTOCOL-IES : IEsSetParam} ::= SEQUENCE { + id F1AP-PROTOCOL-IES.&id ({IEsSetParam}), + criticality F1AP-PROTOCOL-IES.&criticality ({IEsSetParam}{@id}), + value F1AP-PROTOCOL-IES.&Value ({IEsSetParam}{@id}) +} + +-- ************************************************************** +-- +-- Container for Protocol IE Pairs +-- +-- ************************************************************** + +ProtocolIE-ContainerPair {F1AP-PROTOCOL-IES-PAIR : IEsSetParam} ::= + SEQUENCE (SIZE (0..maxProtocolIEs)) OF + ProtocolIE-FieldPair {{IEsSetParam}} + +ProtocolIE-FieldPair {F1AP-PROTOCOL-IES-PAIR : IEsSetParam} ::= SEQUENCE { + id F1AP-PROTOCOL-IES-PAIR.&id ({IEsSetParam}), + firstCriticality F1AP-PROTOCOL-IES-PAIR.&firstCriticality ({IEsSetParam}{@id}), + firstValue F1AP-PROTOCOL-IES-PAIR.&FirstValue ({IEsSetParam}{@id}), + secondCriticality F1AP-PROTOCOL-IES-PAIR.&secondCriticality ({IEsSetParam}{@id}), + secondValue F1AP-PROTOCOL-IES-PAIR.&SecondValue ({IEsSetParam}{@id}) +} + +-- ************************************************************** +-- +-- Container for Protocol Extensions +-- +-- ************************************************************** + +ProtocolExtensionContainer {F1AP-PROTOCOL-EXTENSION : ExtensionSetParam} ::= + SEQUENCE (SIZE (1..maxProtocolExtensions)) OF + ProtocolExtensionField {{ExtensionSetParam}} + +ProtocolExtensionField {F1AP-PROTOCOL-EXTENSION : ExtensionSetParam} ::= SEQUENCE { + id F1AP-PROTOCOL-EXTENSION.&id ({ExtensionSetParam}), + criticality F1AP-PROTOCOL-EXTENSION.&criticality ({ExtensionSetParam}{@id}), + extensionValue F1AP-PROTOCOL-EXTENSION.&Extension ({ExtensionSetParam}{@id}) +} + +-- ************************************************************** +-- +-- Container for Private IEs +-- +-- ************************************************************** + +PrivateIE-Container {F1AP-PRIVATE-IES : IEsSetParam } ::= + SEQUENCE (SIZE (1.. maxPrivateIEs)) OF + PrivateIE-Field {{IEsSetParam}} + +PrivateIE-Field {F1AP-PRIVATE-IES : IEsSetParam} ::= SEQUENCE { + id F1AP-PRIVATE-IES.&id ({IEsSetParam}), + criticality F1AP-PRIVATE-IES.&criticality ({IEsSetParam}{@id}), + value F1AP-PRIVATE-IES.&Value ({IEsSetParam}{@id}) +} + +END +-- ASN1STOP diff --git a/openair2/F1AP/MESSAGES/ASN1/R16.3.1/F1AP-CommonDataTypes.asn b/openair2/F1AP/MESSAGES/ASN1/R16.3.1/F1AP-CommonDataTypes.asn new file mode 100644 index 0000000000..da3092376e --- /dev/null +++ b/openair2/F1AP/MESSAGES/ASN1/R16.3.1/F1AP-CommonDataTypes.asn @@ -0,0 +1,32 @@ +-- ************************************************************** +-- +-- Common definitions +-- +-- ************************************************************** + +F1AP-CommonDataTypes { +itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) +ngran-access (22) modules (3) f1ap (3) version1 (1) f1ap-CommonDataTypes (3) } + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +Criticality ::= ENUMERATED { reject, ignore, notify } + +Presence ::= ENUMERATED { optional, conditional, mandatory } + +PrivateIE-ID ::= CHOICE { + local INTEGER (0..65535), + global OBJECT IDENTIFIER +} + +ProcedureCode ::= INTEGER (0..255) + +ProtocolExtensionID ::= INTEGER (0..65535) + +ProtocolIE-ID ::= INTEGER (0..65535) + +TriggeringMessage ::= ENUMERATED { initiating-message, successful-outcome, unsuccessful-outcome } + +END diff --git a/openair2/F1AP/MESSAGES/ASN1/R16.3.1/F1AP-Constants.asn b/openair2/F1AP/MESSAGES/ASN1/R16.3.1/F1AP-Constants.asn new file mode 100644 index 0000000000..9b5a3dd624 --- /dev/null +++ b/openair2/F1AP/MESSAGES/ASN1/R16.3.1/F1AP-Constants.asn @@ -0,0 +1,622 @@ +-- ************************************************************** +-- +-- Constant definitions +-- +-- ************************************************************** + +F1AP-Constants { +itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) +ngran-access (22) modules (3) f1ap (3) version1 (1) f1ap-Constants (4) } + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +-- ************************************************************** +-- +-- IE parameter types from other modules. +-- +-- ************************************************************** + +IMPORTS + ProcedureCode, + ProtocolIE-ID + +FROM F1AP-CommonDataTypes; + + +-- ************************************************************** +-- +-- Elementary Procedures +-- +-- ************************************************************** + +id-Reset ProcedureCode ::= 0 +id-F1Setup ProcedureCode ::= 1 +id-ErrorIndication ProcedureCode ::= 2 +id-gNBDUConfigurationUpdate ProcedureCode ::= 3 +id-gNBCUConfigurationUpdate ProcedureCode ::= 4 +id-UEContextSetup ProcedureCode ::= 5 +id-UEContextRelease ProcedureCode ::= 6 +id-UEContextModification ProcedureCode ::= 7 +id-UEContextModificationRequired ProcedureCode ::= 8 +id-UEMobilityCommand ProcedureCode ::= 9 +id-UEContextReleaseRequest ProcedureCode ::= 10 +id-InitialULRRCMessageTransfer ProcedureCode ::= 11 +id-DLRRCMessageTransfer ProcedureCode ::= 12 +id-ULRRCMessageTransfer ProcedureCode ::= 13 +id-privateMessage ProcedureCode ::= 14 +id-UEInactivityNotification ProcedureCode ::= 15 +id-GNBDUResourceCoordination ProcedureCode ::= 16 +id-SystemInformationDeliveryCommand ProcedureCode ::= 17 +id-Paging ProcedureCode ::= 18 +id-Notify ProcedureCode ::= 19 +id-WriteReplaceWarning ProcedureCode ::= 20 +id-PWSCancel ProcedureCode ::= 21 +id-PWSRestartIndication ProcedureCode ::= 22 +id-PWSFailureIndication ProcedureCode ::= 23 +id-GNBDUStatusIndication ProcedureCode ::= 24 +id-RRCDeliveryReport ProcedureCode ::= 25 +id-F1Removal ProcedureCode ::= 26 +id-NetworkAccessRateReduction ProcedureCode ::= 27 +id-TraceStart ProcedureCode ::= 28 +id-DeactivateTrace ProcedureCode ::= 29 +id-DUCURadioInformationTransfer ProcedureCode ::= 30 +id-CUDURadioInformationTransfer ProcedureCode ::= 31 +id-BAPMappingConfiguration ProcedureCode ::= 32 +id-GNBDUResourceConfiguration ProcedureCode ::= 33 +id-IABTNLAddressAllocation ProcedureCode ::= 34 +id-IABUPConfigurationUpdate ProcedureCode ::= 35 +id-resourceStatusReportingInitiation ProcedureCode ::= 36 +id-resourceStatusReporting ProcedureCode ::= 37 +id-accessAndMobilityIndication ProcedureCode ::= 38 +id-accessSuccess ProcedureCode ::= 39 +id-cellTrafficTrace ProcedureCode ::= 40 +id-PositioningMeasurementExchange ProcedureCode ::= 41 +id-PositioningAssistanceInformationControl ProcedureCode ::= 42 +id-PositioningAssistanceInformationFeedback ProcedureCode ::= 43 +id-PositioningMeasurementReport ProcedureCode ::= 44 +id-PositioningMeasurementAbort ProcedureCode ::= 45 +id-PositioningMeasurementFailureIndication ProcedureCode ::= 46 +id-PositioningMeasurementUpdate ProcedureCode ::= 47 +id-TRPInformationExchange ProcedureCode ::= 48 +id-PositioningInformationExchange ProcedureCode ::= 49 +id-PositioningActivation ProcedureCode ::= 50 +id-PositioningDeactivation ProcedureCode ::= 51 +id-E-CIDMeasurementInitiation ProcedureCode ::= 52 +id-E-CIDMeasurementFailureIndication ProcedureCode ::= 53 +id-E-CIDMeasurementReport ProcedureCode ::= 54 +id-E-CIDMeasurementTermination ProcedureCode ::= 55 +id-PositioningInformationUpdate ProcedureCode ::= 56 +id-ReferenceTimeInformationReport ProcedureCode ::= 57 +id-ReferenceTimeInformationReportingControl ProcedureCode ::= 58 + + + +-- ************************************************************** +-- +-- Extension constants +-- +-- ************************************************************** + +maxPrivateIEs INTEGER ::= 65535 +maxProtocolExtensions INTEGER ::= 65535 +maxProtocolIEs INTEGER ::= 65535 +-- ************************************************************** +-- +-- Lists +-- +-- ************************************************************** + +maxNRARFCN INTEGER ::= 3279165 +maxnoofErrors INTEGER ::= 256 +maxnoofIndividualF1ConnectionsToReset INTEGER ::= 65536 +maxCellingNBDU INTEGER ::= 512 +maxnoofSCells INTEGER ::= 32 +maxnoofSRBs INTEGER ::= 8 +maxnoofDRBs INTEGER ::= 64 +maxnoofULUPTNLInformation INTEGER ::= 2 +maxnoofDLUPTNLInformation INTEGER ::= 2 +maxnoofBPLMNs INTEGER ::= 6 +maxnoofCandidateSpCells INTEGER ::= 64 +maxnoofPotentialSpCells INTEGER ::= 64 +maxnoofNrCellBands INTEGER ::= 32 +maxnoofSIBTypes INTEGER ::= 32 +maxnoofSITypes INTEGER ::= 32 +maxnoofPagingCells INTEGER ::= 512 +maxnoofTNLAssociations INTEGER ::= 32 +maxnoofQoSFlows INTEGER ::= 64 +maxnoofSliceItems INTEGER ::= 1024 +maxCellineNB INTEGER ::= 256 +maxnoofExtendedBPLMNs INTEGER ::= 6 +maxnoofUEIDs INTEGER ::= 65536 +maxnoofBPLMNsNR INTEGER ::= 12 +maxnoofUACPLMNs INTEGER ::= 12 +maxnoofUACperPLMN INTEGER ::= 64 +maxnoofAdditionalSIBs INTEGER ::= 63 +maxnoofslots INTEGER ::= 5120 +maxnoofTLAs INTEGER ::= 16 +maxnoofGTPTLAs INTEGER ::= 16 +maxnoofBHRLCChannels INTEGER ::= 65536 +maxnoofRoutingEntries INTEGER ::= 1024 +maxnoofIABSTCInfo INTEGER ::= 45 +maxnoofSymbols INTEGER ::= 14 +maxnoofServingCells INTEGER ::= 32 +maxnoofDUFSlots INTEGER ::= 320 +maxnoofHSNASlots INTEGER ::= 5120 +maxnoofServedCellsIAB INTEGER ::= 512 +maxnoofChildIABNodes INTEGER ::= 1024 +maxnoofNonUPTrafficMappings INTEGER ::= 32 +maxnoofTLAsIAB INTEGER ::= 1024 +maxnoofMappingEntries INTEGER ::= 67108864 +maxnoofDSInfo INTEGER ::= 64 +maxnoofEgressLinks INTEGER ::= 2 +maxnoofULUPTNLInformationforIAB INTEGER ::= 32678 +maxnoofUPTNLAddresses INTEGER ::= 8 +maxnoofSLDRBs INTEGER ::= 512 +maxnoofQoSParaSets INTEGER ::= 8 +maxnoofPC5QoSFlows INTEGER ::= 2048 +maxnoofSSBAreas INTEGER ::= 64 +maxnoofPhysicalResourceBlocks INTEGER ::= 275 +maxnoofPhysicalResourceBlocks-1 INTEGER ::= 274 +maxnoofPRACHconfigs INTEGER ::= 16 +maxnoofRACHReports INTEGER ::= 64 +maxnoofRLFReports INTEGER ::= 64 +maxnoofAdditionalPDCPDuplicationTNL INTEGER ::= 2 +maxnoofRLCDuplicationState INTEGER ::= 3 +maxnoofCHOcells INTEGER ::= 8 +maxnoofMDTPLMNs INTEGER ::= 16 +maxnoofCAGsupported INTEGER ::= 12 +maxnoofNIDsupported INTEGER ::= 12 +maxnoofNRSCSs INTEGER ::= 5 +maxnoofExtSliceItems INTEGER ::= 65535 +maxnoofPosMeas INTEGER ::= 16384 +maxnoofTRPInfoTypes INTEGER ::= 64 +maxnoofTRPs INTEGER ::= 65535 +maxnoofSRSTriggerStates INTEGER ::= 3 +maxnoofSpatialRelations INTEGER ::= 64 +maxnoBcastCell INTEGER ::= 16384 +maxnoofAngleInfo INTEGER ::= 65535 +maxnooflcs-gcs-translation INTEGER ::= 3 +maxnoofPath INTEGER ::= 2 +maxnoofMeasE-CID INTEGER ::= 64 +maxnoofSSBs INTEGER ::= 255 +maxnoSRS-ResourceSets INTEGER ::= 16 +maxnoSRS-ResourcePerSet INTEGER ::= 16 +maxnoSRS-Carriers INTEGER ::= 32 +maxnoSCSs INTEGER ::= 5 +maxnoSRS-Resources INTEGER ::= 64 +maxnoSRS-PosResources INTEGER ::= 64 +maxnoSRS-PosResourceSets INTEGER ::= 16 +maxnoSRS-PosResourcePerSet INTEGER ::= 16 +maxnoofPRS-ResourceSets INTEGER ::= 2 +maxnoofPRS-ResourcesPerSet INTEGER ::= 64 +maxNoOfMeasTRPs INTEGER ::= 64 +maxnoofPRSresourceSets INTEGER ::= 8 +maxnoofPRSresources INTEGER ::= 64 + + + +-- ************************************************************** +-- +-- IEs +-- +-- ************************************************************** + +id-Cause ProtocolIE-ID ::= 0 +id-Cells-Failed-to-be-Activated-List ProtocolIE-ID ::= 1 +id-Cells-Failed-to-be-Activated-List-Item ProtocolIE-ID ::= 2 +id-Cells-to-be-Activated-List ProtocolIE-ID ::= 3 +id-Cells-to-be-Activated-List-Item ProtocolIE-ID ::= 4 +id-Cells-to-be-Deactivated-List ProtocolIE-ID ::= 5 +id-Cells-to-be-Deactivated-List-Item ProtocolIE-ID ::= 6 +id-CriticalityDiagnostics ProtocolIE-ID ::= 7 +id-CUtoDURRCInformation ProtocolIE-ID ::= 9 +id-DRBs-FailedToBeModified-Item ProtocolIE-ID ::= 12 +id-DRBs-FailedToBeModified-List ProtocolIE-ID ::= 13 +id-DRBs-FailedToBeSetup-Item ProtocolIE-ID ::= 14 +id-DRBs-FailedToBeSetup-List ProtocolIE-ID ::= 15 +id-DRBs-FailedToBeSetupMod-Item ProtocolIE-ID ::= 16 +id-DRBs-FailedToBeSetupMod-List ProtocolIE-ID ::= 17 +id-DRBs-ModifiedConf-Item ProtocolIE-ID ::= 18 +id-DRBs-ModifiedConf-List ProtocolIE-ID ::= 19 +id-DRBs-Modified-Item ProtocolIE-ID ::= 20 +id-DRBs-Modified-List ProtocolIE-ID ::= 21 +id-DRBs-Required-ToBeModified-Item ProtocolIE-ID ::= 22 +id-DRBs-Required-ToBeModified-List ProtocolIE-ID ::= 23 +id-DRBs-Required-ToBeReleased-Item ProtocolIE-ID ::= 24 +id-DRBs-Required-ToBeReleased-List ProtocolIE-ID ::= 25 +id-DRBs-Setup-Item ProtocolIE-ID ::= 26 +id-DRBs-Setup-List ProtocolIE-ID ::= 27 +id-DRBs-SetupMod-Item ProtocolIE-ID ::= 28 +id-DRBs-SetupMod-List ProtocolIE-ID ::= 29 +id-DRBs-ToBeModified-Item ProtocolIE-ID ::= 30 +id-DRBs-ToBeModified-List ProtocolIE-ID ::= 31 +id-DRBs-ToBeReleased-Item ProtocolIE-ID ::= 32 +id-DRBs-ToBeReleased-List ProtocolIE-ID ::= 33 +id-DRBs-ToBeSetup-Item ProtocolIE-ID ::= 34 +id-DRBs-ToBeSetup-List ProtocolIE-ID ::= 35 +id-DRBs-ToBeSetupMod-Item ProtocolIE-ID ::= 36 +id-DRBs-ToBeSetupMod-List ProtocolIE-ID ::= 37 +id-DRXCycle ProtocolIE-ID ::= 38 +id-DUtoCURRCInformation ProtocolIE-ID ::= 39 +id-gNB-CU-UE-F1AP-ID ProtocolIE-ID ::= 40 +id-gNB-DU-UE-F1AP-ID ProtocolIE-ID ::= 41 +id-gNB-DU-ID ProtocolIE-ID ::= 42 +id-GNB-DU-Served-Cells-Item ProtocolIE-ID ::= 43 +id-gNB-DU-Served-Cells-List ProtocolIE-ID ::= 44 +id-gNB-DU-Name ProtocolIE-ID ::= 45 +id-NRCellID ProtocolIE-ID ::= 46 +id-oldgNB-DU-UE-F1AP-ID ProtocolIE-ID ::= 47 +id-ResetType ProtocolIE-ID ::= 48 +id-ResourceCoordinationTransferContainer ProtocolIE-ID ::= 49 +id-RRCContainer ProtocolIE-ID ::= 50 +id-SCell-ToBeRemoved-Item ProtocolIE-ID ::= 51 +id-SCell-ToBeRemoved-List ProtocolIE-ID ::= 52 +id-SCell-ToBeSetup-Item ProtocolIE-ID ::= 53 +id-SCell-ToBeSetup-List ProtocolIE-ID ::= 54 +id-SCell-ToBeSetupMod-Item ProtocolIE-ID ::= 55 +id-SCell-ToBeSetupMod-List ProtocolIE-ID ::= 56 +id-Served-Cells-To-Add-Item ProtocolIE-ID ::= 57 +id-Served-Cells-To-Add-List ProtocolIE-ID ::= 58 +id-Served-Cells-To-Delete-Item ProtocolIE-ID ::= 59 +id-Served-Cells-To-Delete-List ProtocolIE-ID ::= 60 +id-Served-Cells-To-Modify-Item ProtocolIE-ID ::= 61 +id-Served-Cells-To-Modify-List ProtocolIE-ID ::= 62 +id-SpCell-ID ProtocolIE-ID ::= 63 +id-SRBID ProtocolIE-ID ::= 64 +id-SRBs-FailedToBeSetup-Item ProtocolIE-ID ::= 65 +id-SRBs-FailedToBeSetup-List ProtocolIE-ID ::= 66 +id-SRBs-FailedToBeSetupMod-Item ProtocolIE-ID ::= 67 +id-SRBs-FailedToBeSetupMod-List ProtocolIE-ID ::= 68 +id-SRBs-Required-ToBeReleased-Item ProtocolIE-ID ::= 69 +id-SRBs-Required-ToBeReleased-List ProtocolIE-ID ::= 70 +id-SRBs-ToBeReleased-Item ProtocolIE-ID ::= 71 +id-SRBs-ToBeReleased-List ProtocolIE-ID ::= 72 +id-SRBs-ToBeSetup-Item ProtocolIE-ID ::= 73 +id-SRBs-ToBeSetup-List ProtocolIE-ID ::= 74 +id-SRBs-ToBeSetupMod-Item ProtocolIE-ID ::= 75 +id-SRBs-ToBeSetupMod-List ProtocolIE-ID ::= 76 +id-TimeToWait ProtocolIE-ID ::= 77 +id-TransactionID ProtocolIE-ID ::= 78 +id-TransmissionActionIndicator ProtocolIE-ID ::= 79 +id-UE-associatedLogicalF1-ConnectionItem ProtocolIE-ID ::= 80 +id-UE-associatedLogicalF1-ConnectionListResAck ProtocolIE-ID ::= 81 +id-gNB-CU-Name ProtocolIE-ID ::= 82 +id-SCell-FailedtoSetup-List ProtocolIE-ID ::= 83 +id-SCell-FailedtoSetup-Item ProtocolIE-ID ::= 84 +id-SCell-FailedtoSetupMod-List ProtocolIE-ID ::= 85 +id-SCell-FailedtoSetupMod-Item ProtocolIE-ID ::= 86 +id-RRCReconfigurationCompleteIndicator ProtocolIE-ID ::= 87 +id-Cells-Status-Item ProtocolIE-ID ::= 88 +id-Cells-Status-List ProtocolIE-ID ::= 89 +id-Candidate-SpCell-List ProtocolIE-ID ::= 90 +id-Candidate-SpCell-Item ProtocolIE-ID ::= 91 +id-Potential-SpCell-List ProtocolIE-ID ::= 92 +id-Potential-SpCell-Item ProtocolIE-ID ::= 93 +id-FullConfiguration ProtocolIE-ID ::= 94 +id-C-RNTI ProtocolIE-ID ::= 95 +id-SpCellULConfigured ProtocolIE-ID ::= 96 +id-InactivityMonitoringRequest ProtocolIE-ID ::= 97 +id-InactivityMonitoringResponse ProtocolIE-ID ::= 98 +id-DRB-Activity-Item ProtocolIE-ID ::= 99 +id-DRB-Activity-List ProtocolIE-ID ::= 100 +id-EUTRA-NR-CellResourceCoordinationReq-Container ProtocolIE-ID ::= 101 +id-EUTRA-NR-CellResourceCoordinationReqAck-Container ProtocolIE-ID ::= 102 +id-Protected-EUTRA-Resources-List ProtocolIE-ID ::= 105 +id-RequestType ProtocolIE-ID ::= 106 +id-ServCellIndex ProtocolIE-ID ::= 107 +id-RAT-FrequencyPriorityInformation ProtocolIE-ID ::= 108 +id-ExecuteDuplication ProtocolIE-ID ::= 109 +id-NRCGI ProtocolIE-ID ::= 111 +id-PagingCell-Item ProtocolIE-ID ::= 112 +id-PagingCell-List ProtocolIE-ID ::= 113 +id-PagingDRX ProtocolIE-ID ::= 114 +id-PagingPriority ProtocolIE-ID ::= 115 +id-SItype-List ProtocolIE-ID ::= 116 +id-UEIdentityIndexValue ProtocolIE-ID ::= 117 +id-gNB-CUSystemInformation ProtocolIE-ID ::= 118 +id-HandoverPreparationInformation ProtocolIE-ID ::= 119 +id-GNB-CU-TNL-Association-To-Add-Item ProtocolIE-ID ::= 120 +id-GNB-CU-TNL-Association-To-Add-List ProtocolIE-ID ::= 121 +id-GNB-CU-TNL-Association-To-Remove-Item ProtocolIE-ID ::= 122 +id-GNB-CU-TNL-Association-To-Remove-List ProtocolIE-ID ::= 123 +id-GNB-CU-TNL-Association-To-Update-Item ProtocolIE-ID ::= 124 +id-GNB-CU-TNL-Association-To-Update-List ProtocolIE-ID ::= 125 +id-MaskedIMEISV ProtocolIE-ID ::= 126 +id-PagingIdentity ProtocolIE-ID ::= 127 +id-DUtoCURRCContainer ProtocolIE-ID ::= 128 +id-Cells-to-be-Barred-List ProtocolIE-ID ::= 129 +id-Cells-to-be-Barred-Item ProtocolIE-ID ::= 130 +id-TAISliceSupportList ProtocolIE-ID ::= 131 +id-GNB-CU-TNL-Association-Setup-List ProtocolIE-ID ::= 132 +id-GNB-CU-TNL-Association-Setup-Item ProtocolIE-ID ::= 133 +id-GNB-CU-TNL-Association-Failed-To-Setup-List ProtocolIE-ID ::= 134 +id-GNB-CU-TNL-Association-Failed-To-Setup-Item ProtocolIE-ID ::= 135 +id-DRB-Notify-Item ProtocolIE-ID ::= 136 +id-DRB-Notify-List ProtocolIE-ID ::= 137 +id-NotficationControl ProtocolIE-ID ::= 138 +id-RANAC ProtocolIE-ID ::= 139 +id-PWSSystemInformation ProtocolIE-ID ::= 140 +id-RepetitionPeriod ProtocolIE-ID ::= 141 +id-NumberofBroadcastRequest ProtocolIE-ID ::= 142 +id-Cells-To-Be-Broadcast-List ProtocolIE-ID ::= 144 +id-Cells-To-Be-Broadcast-Item ProtocolIE-ID ::= 145 +id-Cells-Broadcast-Completed-List ProtocolIE-ID ::= 146 +id-Cells-Broadcast-Completed-Item ProtocolIE-ID ::= 147 +id-Broadcast-To-Be-Cancelled-List ProtocolIE-ID ::= 148 +id-Broadcast-To-Be-Cancelled-Item ProtocolIE-ID ::= 149 +id-Cells-Broadcast-Cancelled-List ProtocolIE-ID ::= 150 +id-Cells-Broadcast-Cancelled-Item ProtocolIE-ID ::= 151 +id-NR-CGI-List-For-Restart-List ProtocolIE-ID ::= 152 +id-NR-CGI-List-For-Restart-Item ProtocolIE-ID ::= 153 +id-PWS-Failed-NR-CGI-List ProtocolIE-ID ::= 154 +id-PWS-Failed-NR-CGI-Item ProtocolIE-ID ::= 155 +id-ConfirmedUEID ProtocolIE-ID ::= 156 +id-Cancel-all-Warning-Messages-Indicator ProtocolIE-ID ::= 157 +id-GNB-DU-UE-AMBR-UL ProtocolIE-ID ::= 158 +id-DRXConfigurationIndicator ProtocolIE-ID ::= 159 +id-RLC-Status ProtocolIE-ID ::= 160 +id-DLPDCPSNLength ProtocolIE-ID ::= 161 +id-GNB-DUConfigurationQuery ProtocolIE-ID ::= 162 +id-MeasurementTimingConfiguration ProtocolIE-ID ::= 163 +id-DRB-Information ProtocolIE-ID ::= 164 +id-ServingPLMN ProtocolIE-ID ::= 165 +id-Protected-EUTRA-Resources-Item ProtocolIE-ID ::= 168 +id-GNB-CU-RRC-Version ProtocolIE-ID ::= 170 +id-GNB-DU-RRC-Version ProtocolIE-ID ::= 171 +id-GNBDUOverloadInformation ProtocolIE-ID ::= 172 +id-CellGroupConfig ProtocolIE-ID ::= 173 +id-RLCFailureIndication ProtocolIE-ID ::= 174 +id-UplinkTxDirectCurrentListInformation ProtocolIE-ID ::= 175 +id-DC-Based-Duplication-Configured ProtocolIE-ID ::= 176 +id-DC-Based-Duplication-Activation ProtocolIE-ID ::= 177 +id-SULAccessIndication ProtocolIE-ID ::= 178 +id-AvailablePLMNList ProtocolIE-ID ::= 179 +id-PDUSessionID ProtocolIE-ID ::= 180 +id-ULPDUSessionAggregateMaximumBitRate ProtocolIE-ID ::= 181 +id-ServingCellMO ProtocolIE-ID ::= 182 +id-QoSFlowMappingIndication ProtocolIE-ID ::= 183 +id-RRCDeliveryStatusRequest ProtocolIE-ID ::= 184 +id-RRCDeliveryStatus ProtocolIE-ID ::= 185 +id-BearerTypeChange ProtocolIE-ID ::= 186 +id-RLCMode ProtocolIE-ID ::= 187 +id-Duplication-Activation ProtocolIE-ID ::= 188 +id-Dedicated-SIDelivery-NeededUE-List ProtocolIE-ID ::= 189 +id-Dedicated-SIDelivery-NeededUE-Item ProtocolIE-ID ::= 190 +id-DRX-LongCycleStartOffset ProtocolIE-ID ::= 191 +id-ULPDCPSNLength ProtocolIE-ID ::= 192 +id-SelectedBandCombinationIndex ProtocolIE-ID ::= 193 +id-SelectedFeatureSetEntryIndex ProtocolIE-ID ::= 194 +id-ResourceCoordinationTransferInformation ProtocolIE-ID ::= 195 +id-ExtendedServedPLMNs-List ProtocolIE-ID ::= 196 +id-ExtendedAvailablePLMN-List ProtocolIE-ID ::= 197 +id-Associated-SCell-List ProtocolIE-ID ::= 198 +id-latest-RRC-Version-Enhanced ProtocolIE-ID ::= 199 +id-Associated-SCell-Item ProtocolIE-ID ::= 200 +id-Cell-Direction ProtocolIE-ID ::= 201 +id-SRBs-Setup-List ProtocolIE-ID ::= 202 +id-SRBs-Setup-Item ProtocolIE-ID ::= 203 +id-SRBs-SetupMod-List ProtocolIE-ID ::= 204 +id-SRBs-SetupMod-Item ProtocolIE-ID ::= 205 +id-SRBs-Modified-List ProtocolIE-ID ::= 206 +id-SRBs-Modified-Item ProtocolIE-ID ::= 207 +id-Ph-InfoSCG ProtocolIE-ID ::= 208 +id-RequestedBandCombinationIndex ProtocolIE-ID ::= 209 +id-RequestedFeatureSetEntryIndex ProtocolIE-ID ::= 210 +id-RequestedP-MaxFR2 ProtocolIE-ID ::= 211 +id-DRX-Config ProtocolIE-ID ::= 212 +id-IgnoreResourceCoordinationContainer ProtocolIE-ID ::= 213 +id-UEAssistanceInformation ProtocolIE-ID ::= 214 +id-NeedforGap ProtocolIE-ID ::= 215 +id-PagingOrigin ProtocolIE-ID ::= 216 +id-new-gNB-CU-UE-F1AP-ID ProtocolIE-ID ::= 217 +id-RedirectedRRCmessage ProtocolIE-ID ::= 218 +id-new-gNB-DU-UE-F1AP-ID ProtocolIE-ID ::= 219 +id-NotificationInformation ProtocolIE-ID ::= 220 +id-PLMNAssistanceInfoForNetShar ProtocolIE-ID ::= 221 +id-UEContextNotRetrievable ProtocolIE-ID ::= 222 +id-BPLMN-ID-Info-List ProtocolIE-ID ::= 223 +id-SelectedPLMNID ProtocolIE-ID ::= 224 +id-UAC-Assistance-Info ProtocolIE-ID ::= 225 +id-RANUEID ProtocolIE-ID ::= 226 +id-GNB-DU-TNL-Association-To-Remove-Item ProtocolIE-ID ::= 227 +id-GNB-DU-TNL-Association-To-Remove-List ProtocolIE-ID ::= 228 +id-TNLAssociationTransportLayerAddressgNBDU ProtocolIE-ID ::= 229 +id-portNumber ProtocolIE-ID ::= 230 +id-AdditionalSIBMessageList ProtocolIE-ID ::= 231 +id-Cell-Type ProtocolIE-ID ::= 232 +id-IgnorePRACHConfiguration ProtocolIE-ID ::= 233 +id-CG-Config ProtocolIE-ID ::= 234 +id-PDCCH-BlindDetectionSCG ProtocolIE-ID ::= 235 +id-Requested-PDCCH-BlindDetectionSCG ProtocolIE-ID ::= 236 +id-Ph-InfoMCG ProtocolIE-ID ::= 237 +id-MeasGapSharingConfig ProtocolIE-ID ::= 238 +id-systemInformationAreaID ProtocolIE-ID ::= 239 +id-areaScope ProtocolIE-ID ::= 240 +id-RRCContainer-RRCSetupComplete ProtocolIE-ID ::= 241 +id-TraceActivation ProtocolIE-ID ::= 242 +id-TraceID ProtocolIE-ID ::= 243 +id-Neighbour-Cell-Information-List ProtocolIE-ID ::= 244 +id-SymbolAllocInSlot ProtocolIE-ID ::= 246 +id-NumDLULSymbols ProtocolIE-ID ::= 247 +id-AdditionalRRMPriorityIndex ProtocolIE-ID ::= 248 +id-DUCURadioInformationType ProtocolIE-ID ::= 249 +id-CUDURadioInformationType ProtocolIE-ID ::= 250 +id-AggressorgNBSetID ProtocolIE-ID ::= 251 +id-VictimgNBSetID ProtocolIE-ID ::= 252 +id-LowerLayerPresenceStatusChange ProtocolIE-ID ::= 253 +id-Transport-Layer-Address-Info ProtocolIE-ID ::= 254 +id-Neighbour-Cell-Information-Item ProtocolIE-ID ::= 255 +id-IntendedTDD-DL-ULConfig ProtocolIE-ID ::= 256 +id-QosMonitoringRequest ProtocolIE-ID ::= 257 +id-BHChannels-ToBeSetup-List ProtocolIE-ID ::= 258 +id-BHChannels-ToBeSetup-Item ProtocolIE-ID ::= 259 +id-BHChannels-Setup-List ProtocolIE-ID ::= 260 +id-BHChannels-Setup-Item ProtocolIE-ID ::= 261 +id-BHChannels-ToBeModified-Item ProtocolIE-ID ::= 262 +id-BHChannels-ToBeModified-List ProtocolIE-ID ::= 263 +id-BHChannels-ToBeReleased-Item ProtocolIE-ID ::= 264 +id-BHChannels-ToBeReleased-List ProtocolIE-ID ::= 265 +id-BHChannels-ToBeSetupMod-Item ProtocolIE-ID ::= 266 +id-BHChannels-ToBeSetupMod-List ProtocolIE-ID ::= 267 +id-BHChannels-FailedToBeModified-Item ProtocolIE-ID ::= 268 +id-BHChannels-FailedToBeModified-List ProtocolIE-ID ::= 269 +id-BHChannels-FailedToBeSetupMod-Item ProtocolIE-ID ::= 270 +id-BHChannels-FailedToBeSetupMod-List ProtocolIE-ID ::= 271 +id-BHChannels-Modified-Item ProtocolIE-ID ::= 272 +id-BHChannels-Modified-List ProtocolIE-ID ::= 273 +id-BHChannels-SetupMod-Item ProtocolIE-ID ::= 274 +id-BHChannels-SetupMod-List ProtocolIE-ID ::= 275 +id-BHChannels-Required-ToBeReleased-Item ProtocolIE-ID ::= 276 +id-BHChannels-Required-ToBeReleased-List ProtocolIE-ID ::= 277 +id-BHChannels-FailedToBeSetup-Item ProtocolIE-ID ::= 278 +id-BHChannels-FailedToBeSetup-List ProtocolIE-ID ::= 279 +id-BHInfo ProtocolIE-ID ::= 280 +id-BAPAddress ProtocolIE-ID ::= 281 +id-ConfiguredBAPAddress ProtocolIE-ID ::= 282 +id-BH-Routing-Information-Added-List ProtocolIE-ID ::= 283 +id-BH-Routing-Information-Added-List-Item ProtocolIE-ID ::= 284 +id-BH-Routing-Information-Removed-List ProtocolIE-ID ::= 285 +id-BH-Routing-Information-Removed-List-Item ProtocolIE-ID ::= 286 +id-UL-BH-Non-UP-Traffic-Mapping ProtocolIE-ID ::= 287 +id-Activated-Cells-to-be-Updated-List ProtocolIE-ID ::= 288 +id-Child-Nodes-List ProtocolIE-ID ::= 289 +id-IAB-Info-IAB-DU ProtocolIE-ID ::= 290 +id-IAB-Info-IAB-donor-CU ProtocolIE-ID ::= 291 +id-IAB-TNL-Addresses-To-Remove-List ProtocolIE-ID ::= 292 +id-IAB-TNL-Addresses-To-Remove-Item ProtocolIE-ID ::= 293 +id-IAB-Allocated-TNL-Address-List ProtocolIE-ID ::= 294 +id-IAB-Allocated-TNL-Address-Item ProtocolIE-ID ::= 295 +id-IABIPv6RequestType ProtocolIE-ID ::= 296 +id-IABv4AddressesRequested ProtocolIE-ID ::= 297 +id-IAB-Barred ProtocolIE-ID ::= 298 +id-TrafficMappingInformation ProtocolIE-ID ::= 299 +id-UL-UP-TNL-Information-to-Update-List ProtocolIE-ID ::= 300 +id-UL-UP-TNL-Information-to-Update-List-Item ProtocolIE-ID ::= 301 +id-UL-UP-TNL-Address-to-Update-List ProtocolIE-ID ::= 302 +id-UL-UP-TNL-Address-to-Update-List-Item ProtocolIE-ID ::= 303 +id-DL-UP-TNL-Address-to-Update-List ProtocolIE-ID ::= 304 +id-DL-UP-TNL-Address-to-Update-List-Item ProtocolIE-ID ::= 305 +id-NRV2XServicesAuthorized ProtocolIE-ID ::= 306 +id-LTEV2XServicesAuthorized ProtocolIE-ID ::= 307 +id-NRUESidelinkAggregateMaximumBitrate ProtocolIE-ID ::= 308 +id-LTEUESidelinkAggregateMaximumBitrate ProtocolIE-ID ::= 309 +id-SIB12-message ProtocolIE-ID ::= 310 +id-SIB13-message ProtocolIE-ID ::= 311 +id-SIB14-message ProtocolIE-ID ::= 312 +id-SLDRBs-FailedToBeModified-Item ProtocolIE-ID ::= 313 +id-SLDRBs-FailedToBeModified-List ProtocolIE-ID ::= 314 +id-SLDRBs-FailedToBeSetup-Item ProtocolIE-ID ::= 315 +id-SLDRBs-FailedToBeSetup-List ProtocolIE-ID ::= 316 +id-SLDRBs-Modified-Item ProtocolIE-ID ::= 317 +id-SLDRBs-Modified-List ProtocolIE-ID ::= 318 +id-SLDRBs-Required-ToBeModified-Item ProtocolIE-ID ::= 319 +id-SLDRBs-Required-ToBeModified-List ProtocolIE-ID ::= 320 +id-SLDRBs-Required-ToBeReleased-Item ProtocolIE-ID ::= 321 +id-SLDRBs-Required-ToBeReleased-List ProtocolIE-ID ::= 322 +id-SLDRBs-Setup-Item ProtocolIE-ID ::= 323 +id-SLDRBs-Setup-List ProtocolIE-ID ::= 324 +id-SLDRBs-ToBeModified-Item ProtocolIE-ID ::= 325 +id-SLDRBs-ToBeModified-List ProtocolIE-ID ::= 326 +id-SLDRBs-ToBeReleased-Item ProtocolIE-ID ::= 327 +id-SLDRBs-ToBeReleased-List ProtocolIE-ID ::= 328 +id-SLDRBs-ToBeSetup-Item ProtocolIE-ID ::= 329 +id-SLDRBs-ToBeSetup-List ProtocolIE-ID ::= 330 +id-SLDRBs-ToBeSetupMod-Item ProtocolIE-ID ::= 331 +id-SLDRBs-ToBeSetupMod-List ProtocolIE-ID ::= 332 +id-SLDRBs-SetupMod-List ProtocolIE-ID ::= 333 +id-SLDRBs-FailedToBeSetupMod-List ProtocolIE-ID ::= 334 +id-SLDRBs-SetupMod-Item ProtocolIE-ID ::= 335 +id-SLDRBs-FailedToBeSetupMod-Item ProtocolIE-ID ::= 336 +id-SLDRBs-ModifiedConf-List ProtocolIE-ID ::= 337 +id-SLDRBs-ModifiedConf-Item ProtocolIE-ID ::= 338 +id-UEAssistanceInformationEUTRA ProtocolIE-ID ::= 339 +id-PC5LinkAMBR ProtocolIE-ID ::= 340 +id-SL-PHY-MAC-RLC-Config ProtocolIE-ID ::= 341 +id-SL-ConfigDedicatedEUTRA ProtocolIE-ID ::= 342 +id-AlternativeQoSParaSetList ProtocolIE-ID ::= 343 +id-CurrentQoSParaSetIndex ProtocolIE-ID ::= 344 +id-gNBCUMeasurementID ProtocolIE-ID ::= 345 +id-gNBDUMeasurementID ProtocolIE-ID ::= 346 +id-RegistrationRequest ProtocolIE-ID ::= 347 +id-ReportCharacteristics ProtocolIE-ID ::= 348 +id-CellToReportList ProtocolIE-ID ::= 349 +id-CellMeasurementResultList ProtocolIE-ID ::= 350 +id-HardwareLoadIndicator ProtocolIE-ID ::= 351 +id-ReportingPeriodicity ProtocolIE-ID ::= 352 +id-TNLCapacityIndicator ProtocolIE-ID ::= 353 +id-CarrierList ProtocolIE-ID ::= 354 +id-ULCarrierList ProtocolIE-ID ::= 355 +id-FrequencyShift7p5khz ProtocolIE-ID ::= 356 +id-SSB-PositionsInBurst ProtocolIE-ID ::= 357 +id-NRPRACHConfig ProtocolIE-ID ::= 358 +id-RACHReportInformationList ProtocolIE-ID ::= 359 +id-RLFReportInformationList ProtocolIE-ID ::= 360 +id-TDD-UL-DLConfigCommonNR ProtocolIE-ID ::= 361 +id-CNPacketDelayBudgetDownlink ProtocolIE-ID ::= 362 +id-ExtendedPacketDelayBudget ProtocolIE-ID ::= 363 +id-TSCTrafficCharacteristics ProtocolIE-ID ::= 364 +id-ReportingRequestType ProtocolIE-ID ::= 365 +id-TimeReferenceInformation ProtocolIE-ID ::= 366 +id-CNPacketDelayBudgetUplink ProtocolIE-ID ::= 369 +id-AdditionalPDCPDuplicationTNL-List ProtocolIE-ID ::= 370 +id-RLCDuplicationInformation ProtocolIE-ID ::= 371 +id-AdditionalDuplicationIndication ProtocolIE-ID ::= 372 +id-ConditionalInterDUMobilityInformation ProtocolIE-ID ::= 373 +id-ConditionalIntraDUMobilityInformation ProtocolIE-ID ::= 374 +id-targetCellsToCancel ProtocolIE-ID ::= 375 +id-requestedTargetCellGlobalID ProtocolIE-ID ::= 376 +id-ManagementBasedMDTPLMNList ProtocolIE-ID ::= 377 +id-TraceCollectionEntityIPAddress ProtocolIE-ID ::= 378 +id-PrivacyIndicator ProtocolIE-ID ::= 379 +id-TraceCollectionEntityURI ProtocolIE-ID ::= 380 +id-mdtConfiguration ProtocolIE-ID ::= 381 +id-ServingNID ProtocolIE-ID ::= 382 +id-NPNBroadcastInformation ProtocolIE-ID ::= 383 +id-NPNSupportInfo ProtocolIE-ID ::= 384 +id-NID ProtocolIE-ID ::= 385 +id-AvailableSNPN-ID-List ProtocolIE-ID ::= 386 +id-SIB10-message ProtocolIE-ID ::= 387 +id-DLCarrierList ProtocolIE-ID ::= 389 + id-ExtendedTAISliceSupportList ProtocolIE-ID ::= 390 +id-RequestedSRSTransmissionCharacteristics ProtocolIE-ID ::= 391 +id-PosAssistance-Information ProtocolIE-ID ::= 392 +id-PosBroadcast ProtocolIE-ID ::= 393 +id-RoutingID ProtocolIE-ID ::= 394 +id-PosAssistanceInformationFailureList ProtocolIE-ID ::= 395 +id-PosMeasurementQuantities ProtocolIE-ID ::= 396 +id-PosMeasurementResultList ProtocolIE-ID ::= 397 +id-TRPInformationTypeListTRPReq ProtocolIE-ID ::= 398 +id-TRPInformationTypeItem ProtocolIE-ID ::= 399 +id-TRPInformationListTRPResp ProtocolIE-ID ::= 400 +id-TRPInformationItem ProtocolIE-ID ::= 401 +id-LMF-MeasurementID ProtocolIE-ID ::= 402 +id-SRSType ProtocolIE-ID ::= 403 +id-ActivationTime ProtocolIE-ID ::= 404 +id-AbortTransmission ProtocolIE-ID ::= 405 +id-PositioningBroadcastCells ProtocolIE-ID ::= 406 +id-SRSConfiguration ProtocolIE-ID ::= 407 +id-PosReportCharacteristics ProtocolIE-ID ::= 408 +id-PosMeasurementPeriodicity ProtocolIE-ID ::= 409 +id-TRPList ProtocolIE-ID ::= 410 +id-RAN-MeasurementID ProtocolIE-ID ::= 411 +id-LMF-UE-MeasurementID ProtocolIE-ID ::= 412 +id-RAN-UE-MeasurementID ProtocolIE-ID ::= 413 +id-E-CID-MeasurementQuantities ProtocolIE-ID ::= 414 +id-E-CID-MeasurementQuantities-Item ProtocolIE-ID ::= 415 +id-E-CID-MeasurementPeriodicity ProtocolIE-ID ::= 416 +id-E-CID-MeasurementResult ProtocolIE-ID ::= 417 +id-Cell-Portion-ID ProtocolIE-ID ::= 418 +id-SFNInitialisationTime ProtocolIE-ID ::= 419 +id-SystemFrameNumber ProtocolIE-ID ::= 420 +id-SlotNumber ProtocolIE-ID ::= 421 +id-TRP-MeasurementRequestList ProtocolIE-ID ::= 422 +id-MeasurementBeamInfoRequest ProtocolIE-ID ::= 423 +id-E-CID-ReportCharacteristics ProtocolIE-ID ::= 424 +id-ConfiguredTACIndication ProtocolIE-ID ::= 425 +id-Extended-GNB-DU-Name ProtocolIE-ID ::= 426 +id-Extended-GNB-CU-Name ProtocolIE-ID ::= 427 + + +END diff --git a/openair2/F1AP/MESSAGES/ASN1/R16.3.1/F1AP-Containers.asn b/openair2/F1AP/MESSAGES/ASN1/R16.3.1/F1AP-Containers.asn new file mode 100644 index 0000000000..72c6d6e551 --- /dev/null +++ b/openair2/F1AP/MESSAGES/ASN1/R16.3.1/F1AP-Containers.asn @@ -0,0 +1,178 @@ +F1AP-Containers { +itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) +ngran-access (22) modules (3) f1ap (3) version1 (1) f1ap-Containers (5) } + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +-- ************************************************************** +-- +-- IE parameter types from other modules. +-- +-- ************************************************************** + +IMPORTS + Criticality, + Presence, + PrivateIE-ID, + ProtocolExtensionID, + ProtocolIE-ID + +FROM F1AP-CommonDataTypes + maxPrivateIEs, + maxProtocolExtensions, + maxProtocolIEs + +FROM F1AP-Constants; + +-- ************************************************************** +-- +-- Class Definition for Protocol IEs +-- +-- ************************************************************** + +F1AP-PROTOCOL-IES ::= CLASS { + &id ProtocolIE-ID UNIQUE, + &criticality Criticality, + &Value, + &presence Presence +} +WITH SYNTAX { + ID &id + CRITICALITY &criticality + TYPE &Value + PRESENCE &presence +} + +-- ************************************************************** +-- +-- Class Definition for Protocol IEs +-- +-- ************************************************************** + +F1AP-PROTOCOL-IES-PAIR ::= CLASS { + &id ProtocolIE-ID UNIQUE, + &firstCriticality Criticality, + &FirstValue, + &secondCriticality Criticality, + &SecondValue, + &presence Presence +} +WITH SYNTAX { + ID &id + FIRST CRITICALITY &firstCriticality + FIRST TYPE &FirstValue + SECOND CRITICALITY &secondCriticality + SECOND TYPE &SecondValue + PRESENCE &presence +} + +-- ************************************************************** +-- +-- Class Definition for Protocol Extensions +-- +-- ************************************************************** + +F1AP-PROTOCOL-EXTENSION ::= CLASS { + &id ProtocolExtensionID UNIQUE, + &criticality Criticality, + &Extension, + &presence Presence +} +WITH SYNTAX { + ID &id + CRITICALITY &criticality + EXTENSION &Extension + PRESENCE &presence +} + +-- ************************************************************** +-- +-- Class Definition for Private IEs +-- +-- ************************************************************** + +F1AP-PRIVATE-IES ::= CLASS { + &id PrivateIE-ID, + &criticality Criticality, + &Value, + &presence Presence +} +WITH SYNTAX { + ID &id + CRITICALITY &criticality + TYPE &Value + PRESENCE &presence +} + +-- ************************************************************** +-- +-- Container for Protocol IEs +-- +-- ************************************************************** + +ProtocolIE-Container {F1AP-PROTOCOL-IES : IEsSetParam} ::= + SEQUENCE (SIZE (0..maxProtocolIEs)) OF + ProtocolIE-Field {{IEsSetParam}} + +ProtocolIE-SingleContainer {F1AP-PROTOCOL-IES : IEsSetParam} ::= + ProtocolIE-Field {{IEsSetParam}} + +ProtocolIE-Field {F1AP-PROTOCOL-IES : IEsSetParam} ::= SEQUENCE { + id F1AP-PROTOCOL-IES.&id ({IEsSetParam}), + criticality F1AP-PROTOCOL-IES.&criticality ({IEsSetParam}{@id}), + value F1AP-PROTOCOL-IES.&Value ({IEsSetParam}{@id}) +} + +-- ************************************************************** +-- +-- Container for Protocol IE Pairs +-- +-- ************************************************************** + +ProtocolIE-ContainerPair {F1AP-PROTOCOL-IES-PAIR : IEsSetParam} ::= + SEQUENCE (SIZE (0..maxProtocolIEs)) OF + ProtocolIE-FieldPair {{IEsSetParam}} + +ProtocolIE-FieldPair {F1AP-PROTOCOL-IES-PAIR : IEsSetParam} ::= SEQUENCE { + id F1AP-PROTOCOL-IES-PAIR.&id ({IEsSetParam}), + firstCriticality F1AP-PROTOCOL-IES-PAIR.&firstCriticality ({IEsSetParam}{@id}), + firstValue F1AP-PROTOCOL-IES-PAIR.&FirstValue ({IEsSetParam}{@id}), + secondCriticality F1AP-PROTOCOL-IES-PAIR.&secondCriticality ({IEsSetParam}{@id}), + secondValue F1AP-PROTOCOL-IES-PAIR.&SecondValue ({IEsSetParam}{@id}) +} + +-- ************************************************************** +-- +-- Container for Protocol Extensions +-- +-- ************************************************************** + +ProtocolExtensionContainer {F1AP-PROTOCOL-EXTENSION : ExtensionSetParam} ::= + SEQUENCE (SIZE (1..maxProtocolExtensions)) OF + ProtocolExtensionField {{ExtensionSetParam}} + +ProtocolExtensionField {F1AP-PROTOCOL-EXTENSION : ExtensionSetParam} ::= SEQUENCE { + id F1AP-PROTOCOL-EXTENSION.&id ({ExtensionSetParam}), + criticality F1AP-PROTOCOL-EXTENSION.&criticality ({ExtensionSetParam}{@id}), + extensionValue F1AP-PROTOCOL-EXTENSION.&Extension ({ExtensionSetParam}{@id}) +} + +-- ************************************************************** +-- +-- Container for Private IEs +-- +-- ************************************************************** + +PrivateIE-Container {F1AP-PRIVATE-IES : IEsSetParam } ::= + SEQUENCE (SIZE (1.. maxPrivateIEs)) OF + PrivateIE-Field {{IEsSetParam}} + +PrivateIE-Field {F1AP-PRIVATE-IES : IEsSetParam} ::= SEQUENCE { + id F1AP-PRIVATE-IES.&id ({IEsSetParam}), + criticality F1AP-PRIVATE-IES.&criticality ({IEsSetParam}{@id}), + value F1AP-PRIVATE-IES.&Value ({IEsSetParam}{@id}) +} + +END diff --git a/openair2/F1AP/MESSAGES/ASN1/R16.3.1/F1AP-IEs.asn b/openair2/F1AP/MESSAGES/ASN1/R16.3.1/F1AP-IEs.asn new file mode 100644 index 0000000000..3e02e1b27e --- /dev/null +++ b/openair2/F1AP/MESSAGES/ASN1/R16.3.1/F1AP-IEs.asn @@ -0,0 +1,5509 @@ +-- ************************************************************** +-- +-- Information Element Definitions +-- +-- ************************************************************** + +F1AP-IEs { +itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) +ngran-access (22) modules (3) f1ap (3) version1 (1) f1ap-IEs (2) } + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +IMPORTS + id-gNB-CUSystemInformation, + id-HandoverPreparationInformation, + id-TAISliceSupportList, + id-RANAC, + id-BearerTypeChange, + id-Cell-Direction, + id-Cell-Type, + id-CellGroupConfig, + id-AvailablePLMNList, + id-PDUSessionID, + id-ULPDUSessionAggregateMaximumBitRate, + id-DC-Based-Duplication-Configured, + id-DC-Based-Duplication-Activation, + id-Duplication-Activation, + id-DLPDCPSNLength, + id-ULPDCPSNLength, + id-RLC-Status, + id-MeasurementTimingConfiguration, + id-DRB-Information, + id-QoSFlowMappingIndication, + id-ServingCellMO, + id-RLCMode, + id-ExtendedServedPLMNs-List, + id-ExtendedAvailablePLMN-List, + id-DRX-LongCycleStartOffset, + id-SelectedBandCombinationIndex, + id-SelectedFeatureSetEntryIndex, + id-Ph-InfoSCG, + id-latest-RRC-Version-Enhanced, + id-RequestedBandCombinationIndex, + id-RequestedFeatureSetEntryIndex, + id-DRX-Config, + id-UEAssistanceInformation, + id-PDCCH-BlindDetectionSCG, + id-Requested-PDCCH-BlindDetectionSCG, + id-BPLMN-ID-Info-List, + id-NotificationInformation, + id-TNLAssociationTransportLayerAddressgNBDU, + id-portNumber, + id-AdditionalSIBMessageList, + id-IgnorePRACHConfiguration, + id-CG-Config, + id-Ph-InfoMCG, + id-AggressorgNBSetID, + id-VictimgNBSetID, + id-MeasGapSharingConfig, + id-systemInformationAreaID, + id-areaScope, + id-IntendedTDD-DL-ULConfig, + id-QosMonitoringRequest, + id-BHInfo, + id-IAB-Info-IAB-DU, + id-IAB-Info-IAB-donor-CU, + id-IAB-Barred, + id-SIB12-message, + id-SIB13-message, + id-SIB14-message, + id-UEAssistanceInformationEUTRA, + id-SL-PHY-MAC-RLC-Config, + id-SL-ConfigDedicatedEUTRA, + id-AlternativeQoSParaSetList, + id-CurrentQoSParaSetIndex, + id-CarrierList, + id-ULCarrierList, + id-FrequencyShift7p5khz, + id-SSB-PositionsInBurst, + id-NRPRACHConfig, + id-TDD-UL-DLConfigCommonNR, + id-CNPacketDelayBudgetDownlink, + id-CNPacketDelayBudgetUplink, + id-ExtendedPacketDelayBudget, + id-TSCTrafficCharacteristics, + id-AdditionalPDCPDuplicationTNL-List, + id-RLCDuplicationInformation, + id-AdditionalDuplicationIndication, + id-mdtConfiguration, + id-TraceCollectionEntityURI, + id-NID, + id-NPNSupportInfo, + id-NPNBroadcastInformation, + id-AvailableSNPN-ID-List, + id-SIB10-message, + id-RequestedP-MaxFR2, + id-DLCarrierList, + id-ExtendedTAISliceSupportList, + id-E-CID-MeasurementQuantities-Item, + id-ConfiguredTACIndication, + maxNRARFCN, + maxnoofErrors, + maxnoofBPLMNs, + maxnoofBPLMNsNR, + maxnoofDLUPTNLInformation, + maxnoofNrCellBands, + maxnoofULUPTNLInformation, + maxnoofQoSFlows, + maxnoofSliceItems, + maxnoofSIBTypes, + maxnoofSITypes, + maxCellineNB, + maxnoofExtendedBPLMNs, + maxnoofAdditionalSIBs, + maxnoofUACPLMNs, + maxnoofUACperPLMN, + maxCellingNBDU, + maxnoofTLAs, + maxnoofGTPTLAs, + maxnoofslots, + maxnoofNonUPTrafficMappings, + maxnoofServingCells, + maxnoofServedCellsIAB, + maxnoofChildIABNodes, + maxnoofIABSTCInfo, + maxnoofSymbols, + maxnoofDUFSlots, + maxnoofHSNASlots, + maxnoofEgressLinks, + maxnoofMappingEntries, + maxnoofDSInfo, + maxnoofQoSParaSets, + maxnoofPC5QoSFlows, + maxnoofSSBAreas, + maxnoofBPLMNsNR, + maxnoofNRSCSs, + maxnoofPhysicalResourceBlocks, + maxnoofPhysicalResourceBlocks-1, + maxnoofPRACHconfigs, + maxnoofRACHReports, + maxnoofRLFReports, + maxnoofAdditionalPDCPDuplicationTNL, + maxnoofRLCDuplicationState, + maxnoofCHOcells, + maxnoofMDTPLMNs, + maxnoofCAGsupported, + maxnoofNIDsupported, + maxnoofNRSCSs, + maxnoofPhysicalResourceBlocks, + maxnoofExtSliceItems, + maxnoofPosMeas, + maxnoofTRPInfoTypes, + maxnoofSRSTriggerStates, + maxnoofSpatialRelations, + maxnoBcastCell, + maxnoofTRPs, + maxnoofAngleInfo, + maxnooflcs-gcs-translation, + maxnoofPath, + maxnoofMeasE-CID, + maxnoofSSBs, + maxnoSRS-ResourceSets, + maxnoSRS-ResourcePerSet, + maxnoSRS-Carriers, + maxnoSCSs, + maxnoSRS-Resources, + maxnoSRS-PosResources, + maxnoSRS-PosResourceSets, + maxnoSRS-PosResourcePerSet, + maxnoofPRS-ResourceSets, + maxnoofPRS-ResourcesPerSet, + maxNoOfMeasTRPs, + maxnoofPRSresourceSets, + maxnoofPRSresources + + + +FROM F1AP-Constants + + Criticality, + ProcedureCode, + ProtocolIE-ID, + TriggeringMessage + +FROM F1AP-CommonDataTypes + + ProtocolExtensionContainer{}, + F1AP-PROTOCOL-EXTENSION, + ProtocolIE-SingleContainer{}, + F1AP-PROTOCOL-IES + +FROM F1AP-Containers; + +-- A + +AbortTransmission ::= CHOICE { + sRSResourceSetID SRSResourceSetID, + releaseALL NULL, + choice-extension ProtocolIE-SingleContainer { { AbortTransmission-ExtIEs } } +} + +AbortTransmission-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +AccessPointPosition ::= SEQUENCE { + latitudeSign ENUMERATED {north, south}, + latitude INTEGER (0..8388607), + longitude INTEGER (-8388608..8388607), + directionOfAltitude ENUMERATED {height, depth}, + altitude INTEGER (0..32767), + uncertaintySemi-major INTEGER (0..127), + uncertaintySemi-minor INTEGER (0..127), + orientationOfMajorAxis INTEGER (0..179), + uncertaintyAltitude INTEGER (0..127), + confidence INTEGER (0..100), + iE-Extensions ProtocolExtensionContainer { { AccessPointPosition-ExtIEs} } OPTIONAL +} + +AccessPointPosition-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Activated-Cells-to-be-Updated-List ::= SEQUENCE (SIZE(1..maxnoofServedCellsIAB)) OF Activated-Cells-to-be-Updated-List-Item + +Activated-Cells-to-be-Updated-List-Item ::= SEQUENCE{ + nRCGI NRCGI, + iAB-DU-Cell-Resource-Configuration-Mode-Info IAB-DU-Cell-Resource-Configuration-Mode-Info, + iE-Extensions ProtocolExtensionContainer { { Activated-Cells-to-be-Updated-List-Item-ExtIEs} } OPTIONAL +} + +Activated-Cells-to-be-Updated-List-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ActiveULBWP ::= SEQUENCE { + locationAndBandwidth INTEGER (0..37949,...), + subcarrierSpacing ENUMERATED {kHz15, kHz30, kHz60, kHz120,...}, + cyclicPrefix ENUMERATED {normal, extended}, + txDirectCurrentLocation INTEGER (0..3301,...), + shift7dot5kHz ENUMERATED {true, ...} OPTIONAL, + sRSConfig SRSConfig, + iE-Extensions ProtocolExtensionContainer { { ActiveULBWP-ExtIEs} } OPTIONAL +} + +ActiveULBWP-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +AdditionalDuplicationIndication ::= ENUMERATED { + three, + four, + ... +} + + +AdditionalPath-List::= SEQUENCE (SIZE(1..maxnoofPath)) OF AdditionalPath-Item + +AdditionalPath-Item ::=SEQUENCE { + relativePathDelay RelativePathDelay, + pathQuality TRPMeasurementQuality OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { AdditionalPath-Item-ExtIEs } } OPTIONAL +} + +AdditionalPath-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +AdditionalPDCPDuplicationTNL-List ::= SEQUENCE (SIZE(1..maxnoofAdditionalPDCPDuplicationTNL)) OF AdditionalPDCPDuplicationTNL-Item + +AdditionalPDCPDuplicationTNL-Item ::=SEQUENCE { + additionalPDCPDuplicationUPTNLInformation UPTransportLayerInformation, + iE-Extensions ProtocolExtensionContainer { { AdditionalPDCPDuplicationTNL-ItemExtIEs } } OPTIONAL, + ... +} + +AdditionalPDCPDuplicationTNL-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +AdditionalSIBMessageList ::= SEQUENCE (SIZE(1..maxnoofAdditionalSIBs)) OF AdditionalSIBMessageList-Item + +AdditionalSIBMessageList-Item ::= SEQUENCE { + additionalSIB OCTET STRING, + iE-Extensions ProtocolExtensionContainer { { AdditionalSIBMessageList-Item-ExtIEs} } OPTIONAL +} + +AdditionalSIBMessageList-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +AdditionalRRMPriorityIndex ::= BIT STRING (SIZE(32)) + +AggressorCellList ::= SEQUENCE (SIZE(1..maxCellingNBDU)) OF AggressorCellList-Item + +AggressorCellList-Item ::= SEQUENCE { + aggressorCell-ID NRCGI, + iE-Extensions ProtocolExtensionContainer { { AggressorCellList-Item-ExtIEs } } OPTIONAL +} + +AggressorCellList-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +AggressorgNBSetID ::= SEQUENCE { + aggressorgNBSetID GNBSetID, + iE-Extensions ProtocolExtensionContainer { { AggressorgNBSetID-ExtIEs } } OPTIONAL +} + +AggressorgNBSetID-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +AllocationAndRetentionPriority ::= SEQUENCE { + priorityLevel PriorityLevel, + pre-emptionCapability Pre-emptionCapability, + pre-emptionVulnerability Pre-emptionVulnerability, + iE-Extensions ProtocolExtensionContainer { {AllocationAndRetentionPriority-ExtIEs} } OPTIONAL, + ... +} + +AllocationAndRetentionPriority-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +AlternativeQoSParaSetList ::= SEQUENCE (SIZE(1..maxnoofQoSParaSets)) OF AlternativeQoSParaSetItem + +AlternativeQoSParaSetItem ::= SEQUENCE { + alternativeQoSParaSetIndex QoSParaSetIndex, + guaranteedFlowBitRateDL BitRate OPTIONAL, + guaranteedFlowBitRateUL BitRate OPTIONAL, + packetDelayBudget PacketDelayBudget OPTIONAL, + packetErrorRate PacketErrorRate OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {AlternativeQoSParaSetItem-ExtIEs} } OPTIONAL, + ... +} + +AlternativeQoSParaSetItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +AngleMeasurementQuality ::= SEQUENCE { + azimuthQuality INTEGER(0..255), + zenithQuality INTEGER(0..255) OPTIONAL, + resolution ENUMERATED{deg0dot1,...}, + iE-Extensions ProtocolExtensionContainer { { AngleMeasurementQuality-ExtIEs } } OPTIONAL +} + +AngleMeasurementQuality-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +AperiodicSRSResourceTriggerList ::= SEQUENCE (SIZE(1..maxnoofSRSTriggerStates)) OF AperiodicSRSResourceTrigger + +AperiodicSRSResourceTrigger ::= INTEGER (0..3, ...) + +Associated-SCell-Item ::= SEQUENCE { + sCell-ID NRCGI, + iE-Extensions ProtocolExtensionContainer { { Associated-SCell-ItemExtIEs } } OPTIONAL +} + +Associated-SCell-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +AvailablePLMNList ::= SEQUENCE (SIZE(1..maxnoofBPLMNs)) OF AvailablePLMNList-Item + +AvailablePLMNList-Item ::= SEQUENCE { + pLMNIdentity PLMN-Identity, + iE-Extensions ProtocolExtensionContainer { { AvailablePLMNList-Item-ExtIEs} } OPTIONAL +} + +AvailablePLMNList-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +AvailableSNPN-ID-List ::= SEQUENCE (SIZE(1..maxnoofNIDsupported)) OF AvailableSNPN-ID-List-Item + +AvailableSNPN-ID-List-Item ::= SEQUENCE { + pLMN-Identity PLMN-Identity, + availableNIDList BroadcastNIDList, + iE-Extensions ProtocolExtensionContainer { { AvailableSNPN-ID-List-ItemExtIEs} } OPTIONAL, + ... +} + +AvailableSNPN-ID-List-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +AveragingWindow ::= INTEGER (0..4095, ...) + +AreaScope ::= ENUMERATED {true, ...} + +-- B + +BandwidthSRS ::= CHOICE { + fR1 FR1-Bandwidth, + fR2 FR2-Bandwidth, + choice-extension ProtocolIE-SingleContainer {{ BandwidthSRS-ExtIEs }} +} + +BandwidthSRS-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + + +BAPAddress ::= BIT STRING (SIZE(10)) + +BAPCtrlPDUChannel ::= ENUMERATED {true, ...} + +BAPlayerBHRLCchannelMappingInfo ::= SEQUENCE { + bAPlayerBHRLCchannelMappingInfoToAdd BAPlayerBHRLCchannelMappingInfoList OPTIONAL, + bAPlayerBHRLCchannelMappingInfoToRemove MappingInformationtoRemove OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { BAPlayerBHRLCchannelMappingInfo-ExtIEs} } OPTIONAL, + ... +} + +BAPlayerBHRLCchannelMappingInfo-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +BAPlayerBHRLCchannelMappingInfoList ::= SEQUENCE (SIZE(1..maxnoofMappingEntries)) OF BAPlayerBHRLCchannelMappingInfo-Item + +BAPlayerBHRLCchannelMappingInfo-Item ::= SEQUENCE { + mappingInformationIndex MappingInformationIndex, + priorHopBAPAddress BAPAddress OPTIONAL, + ingressbHRLCChannelID BHRLCChannelID OPTIONAL, + nextHopBAPAddress BAPAddress OPTIONAL, + egressbHRLCChannelID BHRLCChannelID OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { BAPlayerBHRLCchannelMappingInfo-ItemExtIEs} } OPTIONAL, + ... +} + +BAPlayerBHRLCchannelMappingInfo-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +BAPPathID ::= BIT STRING (SIZE(10)) + +BAPRoutingID ::= SEQUENCE { + bAPAddress BAPAddress, + bAPPathID BAPPathID, + iE-Extensions ProtocolExtensionContainer { { BAPRoutingIDExtIEs } } OPTIONAL +} + +BAPRoutingIDExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +BitRate ::= INTEGER (0..4000000000000,...) + +BearerTypeChange ::= ENUMERATED {true, ...} + +BHRLCChannelID ::= BIT STRING (SIZE(16)) + +BHChannels-FailedToBeModified-Item ::= SEQUENCE { + bHRLCChannelID BHRLCChannelID, + cause Cause OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { BHChannels-FailedToBeModified-ItemExtIEs } } OPTIONAL +} + +BHChannels-FailedToBeModified-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +BHChannels-FailedToBeSetup-Item ::= SEQUENCE { + bHRLCChannelID BHRLCChannelID, + cause Cause OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { BHChannels-FailedToBeSetup-ItemExtIEs } } OPTIONAL +} + +BHChannels-FailedToBeSetup-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +BHChannels-FailedToBeSetupMod-Item ::= SEQUENCE { + bHRLCChannelID BHRLCChannelID, + cause Cause OPTIONAL , + iE-Extensions ProtocolExtensionContainer { { BHChannels-FailedToBeSetupMod-ItemExtIEs } } OPTIONAL +} + +BHChannels-FailedToBeSetupMod-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +BHChannels-Modified-Item ::= SEQUENCE { + bHRLCChannelID BHRLCChannelID, + iE-Extensions ProtocolExtensionContainer { { BHChannels-Modified-ItemExtIEs } } OPTIONAL +} + +BHChannels-Modified-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +BHChannels-Required-ToBeReleased-Item ::= SEQUENCE { + bHRLCChannelID BHRLCChannelID, + iE-Extensions ProtocolExtensionContainer { { BHChannels-Required-ToBeReleased-ItemExtIEs } } OPTIONAL +} + +BHChannels-Required-ToBeReleased-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +BHChannels-Setup-Item ::= SEQUENCE { + bHRLCChannelID BHRLCChannelID, + iE-Extensions ProtocolExtensionContainer { { BHChannels-Setup-ItemExtIEs } } OPTIONAL +} + +BHChannels-Setup-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +BHChannels-SetupMod-Item ::= SEQUENCE { + bHRLCChannelID BHRLCChannelID, + iE-Extensions ProtocolExtensionContainer { { BHChannels-SetupMod-ItemExtIEs } } OPTIONAL +} + +BHChannels-SetupMod-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +BHChannels-ToBeModified-Item ::= SEQUENCE { + bHRLCChannelID BHRLCChannelID, + bHQoSInformation BHQoSInformation, + rLCmode RLCMode OPTIONAL, + bAPCtrlPDUChannel BAPCtrlPDUChannel OPTIONAL, + trafficMappingInfo TrafficMappingInfo OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { BHChannels-ToBeModified-ItemExtIEs } } OPTIONAL +} + +BHChannels-ToBeModified-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +BHChannels-ToBeReleased-Item ::= SEQUENCE { + bHRLCChannelID BHRLCChannelID, + iE-Extensions ProtocolExtensionContainer { { BHChannels-ToBeReleased-ItemExtIEs } } OPTIONAL +} + +BHChannels-ToBeReleased-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +BHChannels-ToBeSetup-Item ::= SEQUENCE { + bHRLCChannelID BHRLCChannelID, + bHQoSInformation BHQoSInformation, + rLCmode RLCMode, + bAPCtrlPDUChannel BAPCtrlPDUChannel OPTIONAL, + trafficMappingInfo TrafficMappingInfo OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { BHChannels-ToBeSetup-ItemExtIEs } } OPTIONAL +} + +BHChannels-ToBeSetup-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +BHChannels-ToBeSetupMod-Item ::= SEQUENCE { + bHRLCChannelID BHRLCChannelID, + bHQoSInformation BHQoSInformation, + rLCmode RLCMode, + bAPCtrlPDUChannel BAPCtrlPDUChannel OPTIONAL, + trafficMappingInfo TrafficMappingInfo OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { BHChannels-ToBeSetupMod-ItemExtIEs } } OPTIONAL +} + +BHChannels-ToBeSetupMod-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +BHInfo ::= SEQUENCE { + bAProutingID BAPRoutingID OPTIONAL, + egressBHRLCCHList EgressBHRLCCHList OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { BHInfo-ExtIEs} } OPTIONAL +} + +BHInfo-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +BHQoSInformation ::= CHOICE { + bHRLCCHQoS QoSFlowLevelQoSParameters, + eUTRANBHRLCCHQoS EUTRANQoS, + cPTrafficType CPTrafficType, + choice-extension ProtocolIE-SingleContainer { { BHQoSInformation-ExtIEs} } +} + +BHQoSInformation-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +BH-Routing-Information-Added-List-Item ::= SEQUENCE { + bAPRoutingID BAPRoutingID, + nextHopBAPAddress BAPAddress, + iE-Extensions ProtocolExtensionContainer { { BH-Routing-Information-Added-List-ItemExtIEs} } OPTIONAL +} + +BH-Routing-Information-Added-List-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +BH-Routing-Information-Removed-List-Item ::= SEQUENCE { + bAPRoutingID BAPRoutingID, + iE-Extensions ProtocolExtensionContainer { { BH-Routing-Information-Removed-List-ItemExtIEs} } OPTIONAL +} + +BH-Routing-Information-Removed-List-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +BPLMN-ID-Info-List ::= SEQUENCE (SIZE(1..maxnoofBPLMNsNR)) OF BPLMN-ID-Info-Item + +BPLMN-ID-Info-Item ::= SEQUENCE { + pLMN-Identity-List AvailablePLMNList, + extended-PLMN-Identity-List ExtendedAvailablePLMN-List OPTIONAL, + fiveGS-TAC FiveGS-TAC OPTIONAL, + nr-cell-ID NRCellIdentity, + ranac RANAC OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { BPLMN-ID-Info-ItemExtIEs} } OPTIONAL, + ... +} + +BPLMN-ID-Info-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-ConfiguredTACIndication CRITICALITY ignore EXTENSION ConfiguredTACIndication PRESENCE optional }| + { ID id-NPNBroadcastInformation CRITICALITY reject EXTENSION NPNBroadcastInformation PRESENCE optional}, + ... +} + +ServedPLMNs-List ::= SEQUENCE (SIZE(1..maxnoofBPLMNs)) OF ServedPLMNs-Item + +ServedPLMNs-Item ::= SEQUENCE { + pLMN-Identity PLMN-Identity, + iE-Extensions ProtocolExtensionContainer { { ServedPLMNs-ItemExtIEs} } OPTIONAL, + ... +} + +ServedPLMNs-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { +{ ID id-TAISliceSupportList CRITICALITY ignore EXTENSION SliceSupportList PRESENCE optional }| +{ ID id-NPNSupportInfo CRITICALITY reject EXTENSION NPNSupportInfo PRESENCE optional }| +{ ID id-ExtendedTAISliceSupportList CRITICALITY reject EXTENSION ExtendedSliceSupportList PRESENCE optional }, + ... +} + +BroadcastCAGList ::= SEQUENCE (SIZE(1..maxnoofCAGsupported)) OF CAGID + +BroadcastNIDList ::= SEQUENCE (SIZE(1..maxnoofNIDsupported)) OF NID + +BroadcastSNPN-ID-List ::= SEQUENCE (SIZE(1..maxnoofNIDsupported)) OF BroadcastSNPN-ID-List-Item + +BroadcastSNPN-ID-List-Item ::= SEQUENCE { + pLMN-Identity PLMN-Identity, + broadcastNIDList BroadcastNIDList, + iE-Extensions ProtocolExtensionContainer { { BroadcastSNPN-ID-List-ItemExtIEs} } OPTIONAL, + ... +} + +BroadcastSNPN-ID-List-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +BroadcastPNI-NPN-ID-List ::= SEQUENCE (SIZE(1..maxnoofCAGsupported)) OF BroadcastPNI-NPN-ID-List-Item + +BroadcastPNI-NPN-ID-List-Item ::= SEQUENCE { + pLMN-Identity PLMN-Identity, + broadcastCAGList BroadcastCAGList, + iE-Extensions ProtocolExtensionContainer { { BroadcastPNI-NPN-ID-List-ItemExtIEs} } OPTIONAL, + ... +} + +BroadcastPNI-NPN-ID-List-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} +BurstArrivalTime ::= OCTET STRING + +-- C +CAGID ::= BIT STRING (SIZE(32)) + +Cancel-all-Warning-Messages-Indicator ::= ENUMERATED {true, ...} + +Candidate-SpCell-Item ::= SEQUENCE { + candidate-SpCell-ID NRCGI , + iE-Extensions ProtocolExtensionContainer { { Candidate-SpCell-ItemExtIEs } } OPTIONAL, + ... +} + +Candidate-SpCell-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +CapacityValue::= SEQUENCE { + capacityValue INTEGER (0..100), + sSBAreaCapacityValueList SSBAreaCapacityValueList OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { CapacityValue-ExtIEs} } OPTIONAL +} + +CapacityValue-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Cause ::= CHOICE { + radioNetwork CauseRadioNetwork, + transport CauseTransport, + protocol CauseProtocol, + misc CauseMisc, + choice-extension ProtocolIE-SingleContainer { { Cause-ExtIEs} } +} + +Cause-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +CauseMisc ::= ENUMERATED { + control-processing-overload, + not-enough-user-plane-processing-resources, + hardware-failure, + om-intervention, + unspecified, + ... +} + +CauseProtocol ::= ENUMERATED { + transfer-syntax-error, + abstract-syntax-error-reject, + abstract-syntax-error-ignore-and-notify, + message-not-compatible-with-receiver-state, + semantic-error, + abstract-syntax-error-falsely-constructed-message, + unspecified, + ... +} + +CauseRadioNetwork ::= ENUMERATED { + unspecified, + rl-failure-rlc, + unknown-or-already-allocated-gnb-cu-ue-f1ap-id, + unknown-or-already-allocated-gnb-du-ue-f1ap-id, + unknown-or-inconsistent-pair-of-ue-f1ap-id, + interaction-with-other-procedure, + not-supported-qci-Value, + action-desirable-for-radio-reasons, + no-radio-resources-available, + procedure-cancelled, + normal-release, + ..., + cell-not-available, + rl-failure-others, + ue-rejection, + resources-not-available-for-the-slice, + amf-initiated-abnormal-release, + release-due-to-pre-emption, + plmn-not-served-by-the-gNB-CU, + multiple-drb-id-instances, + unknown-drb-id, + multiple-bh-rlc-ch-id-instances, + unknown-bh-rlc-ch-id, + cho-cpc-resources-tobechanged, + nPN-not-supported, + nPN-access-denied, + gNB-CU-Cell-Capacity-Exceeded, + report-characteristics-empty, + existing-measurement-ID, + measurement-temporarily-not-available, + measurement-not-supported-for-the-object + +} + +CauseTransport ::= ENUMERATED { + unspecified, + transport-resource-unavailable, + ..., + unknown-TNL-address-for-IAB, + unknown-UP-TNL-information-for-IAB +} + +CellGroupConfig ::= OCTET STRING + +CellCapacityClassValue ::= INTEGER (1..100,...) + +Cell-Direction ::= ENUMERATED {dl-only, ul-only} + +CellMeasurementResultList ::= SEQUENCE (SIZE(1.. maxCellingNBDU)) OF CellMeasurementResultItem + +CellMeasurementResultItem ::= SEQUENCE { + cellID NRCGI, + radioResourceStatus RadioResourceStatus OPTIONAL, + compositeAvailableCapacityGroup CompositeAvailableCapacityGroup OPTIONAL, + sliceAvailableCapacity SliceAvailableCapacity OPTIONAL, + numberofActiveUEs NumberofActiveUEs OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { CellMeasurementResultItem-ExtIEs} } OPTIONAL +} + +CellMeasurementResultItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Cell-Portion-ID ::= INTEGER (0..4095,...) + +Cells-Failed-to-be-Activated-List-Item ::= SEQUENCE { + nRCGI NRCGI, + cause Cause, + iE-Extensions ProtocolExtensionContainer { { Cells-Failed-to-be-Activated-List-ItemExtIEs } } OPTIONAL, + ... +} + +Cells-Failed-to-be-Activated-List-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Cells-Status-Item ::= SEQUENCE { + nRCGI NRCGI, + service-status Service-Status, + iE-Extensions ProtocolExtensionContainer { { Cells-Status-ItemExtIEs } } OPTIONAL, + ... +} + +Cells-Status-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Cells-To-Be-Broadcast-Item ::= SEQUENCE { + nRCGI NRCGI, + iE-Extensions ProtocolExtensionContainer { { Cells-To-Be-Broadcast-ItemExtIEs } } OPTIONAL, + ... +} + +Cells-To-Be-Broadcast-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Cells-Broadcast-Completed-Item ::= SEQUENCE { + nRCGI NRCGI, + iE-Extensions ProtocolExtensionContainer { { Cells-Broadcast-Completed-ItemExtIEs } } OPTIONAL, + ... +} + +Cells-Broadcast-Completed-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Broadcast-To-Be-Cancelled-Item ::= SEQUENCE { + nRCGI NRCGI, + iE-Extensions ProtocolExtensionContainer { { Broadcast-To-Be-Cancelled-ItemExtIEs } } OPTIONAL, + ... +} + +Broadcast-To-Be-Cancelled-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +Cells-Broadcast-Cancelled-Item ::= SEQUENCE { + nRCGI NRCGI, + numberOfBroadcasts NumberOfBroadcasts, + iE-Extensions ProtocolExtensionContainer { { Cells-Broadcast-Cancelled-ItemExtIEs } } OPTIONAL, + ... +} + +Cells-Broadcast-Cancelled-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Cells-to-be-Activated-List-Item ::= SEQUENCE { + nRCGI NRCGI, + nRPCI NRPCI OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { Cells-to-be-Activated-List-ItemExtIEs} } OPTIONAL, + ... +} + +Cells-to-be-Activated-List-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-gNB-CUSystemInformation CRITICALITY reject EXTENSION GNB-CUSystemInformation PRESENCE optional }| + { ID id-AvailablePLMNList CRITICALITY ignore EXTENSION AvailablePLMNList PRESENCE optional }| + { ID id-ExtendedAvailablePLMN-List CRITICALITY ignore EXTENSION ExtendedAvailablePLMN-List PRESENCE optional }| + { ID id-IAB-Info-IAB-donor-CU CRITICALITY ignore EXTENSION IAB-Info-IAB-donor-CU PRESENCE optional}| + { ID id-AvailableSNPN-ID-List CRITICALITY ignore EXTENSION AvailableSNPN-ID-List PRESENCE optional }, + ... +} + +Cells-to-be-Deactivated-List-Item ::= SEQUENCE { + nRCGI NRCGI , + iE-Extensions ProtocolExtensionContainer { { Cells-to-be-Deactivated-List-ItemExtIEs } } OPTIONAL, + ... +} + +Cells-to-be-Deactivated-List-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Cells-to-be-Barred-Item::= SEQUENCE { + nRCGI NRCGI , + cellBarred CellBarred, + iE-Extensions ProtocolExtensionContainer { { Cells-to-be-Barred-Item-ExtIEs } } OPTIONAL +} + +Cells-to-be-Barred-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-IAB-Barred CRITICALITY ignore EXTENSION IAB-Barred PRESENCE optional }, + + ... +} + + +CellBarred ::= ENUMERATED {barred, not-barred, ...} + +CellSize ::= ENUMERATED {verysmall, small, medium, large, ...} + +CellToReportList ::= SEQUENCE (SIZE(1.. maxCellingNBDU)) OF CellToReportItem + +CellToReportItem ::= SEQUENCE { + cellID NRCGI, + sSBToReportList SSBToReportList OPTIONAL, + sliceToReportList SliceToReportList OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { CellToReportItem-ExtIEs} } OPTIONAL +} + +CellToReportItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +CellType ::= SEQUENCE { + cellSize CellSize, + iE-Extensions ProtocolExtensionContainer { {CellType-ExtIEs} } OPTIONAL, + ... +} + +CellType-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +CellULConfigured ::= ENUMERATED {none, ul, sul, ul-and-sul, ...} + +Child-Node-Cells-List ::= SEQUENCE (SIZE(1..maxnoofChildIABNodes)) OF Child-Node-Cells-List-Item + +Child-Node-Cells-List-Item ::= SEQUENCE{ + nRCGI NRCGI, + iAB-DU-Cell-Resource-Configuration-Mode-Info IAB-DU-Cell-Resource-Configuration-Mode-Info OPTIONAL, + iAB-STC-Info IAB-STC-Info OPTIONAL, + rACH-Config-Common RACH-Config-Common OPTIONAL, + rACH-Config-Common-IAB RACH-Config-Common-IAB OPTIONAL, + cSI-RS-Configuration OCTET STRING OPTIONAL, + sR-Configuration OCTET STRING OPTIONAL, + pDCCH-ConfigSIB1 OCTET STRING OPTIONAL, + sCS-Common OCTET STRING OPTIONAL, + multiplexingInfo MultiplexingInfo OPTIONAL, + iE-Extensions ProtocolExtensionContainer {{Child-Node-Cells-List-Item-ExtIEs}} OPTIONAL +} + +Child-Node-Cells-List-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Child-Nodes-List ::= SEQUENCE (SIZE(1..maxnoofChildIABNodes)) OF Child-Nodes-List-Item + +Child-Nodes-List-Item ::= SEQUENCE{ + gNB-CU-UE-F1AP-ID GNB-CU-UE-F1AP-ID, + gNB-DU-UE-F1AP-ID GNB-DU-UE-F1AP-ID, + child-Node-Cells-List Child-Node-Cells-List OPTIONAL, + iE-Extensions ProtocolExtensionContainer {{Child-Nodes-List-Item-ExtIEs}} OPTIONAL +} + +Child-Nodes-List-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +CHOtrigger-InterDU ::= ENUMERATED { + cho-initiation, + cho-replace, + ... +} + +CHOtrigger-IntraDU ::= ENUMERATED { + cho-initiation, + cho-replace, + cho-cancel, + ... +} + +CNUEPagingIdentity ::= CHOICE { + fiveG-S-TMSI BIT STRING (SIZE(48)), + choice-extension ProtocolIE-SingleContainer { { CNUEPagingIdentity-ExtIEs } } +} + +CNUEPagingIdentity-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +CompositeAvailableCapacityGroup ::= SEQUENCE { + compositeAvailableCapacityDownlink CompositeAvailableCapacity, + compositeAvailableCapacityUplink CompositeAvailableCapacity, + iE-Extensions ProtocolExtensionContainer { { CompositeAvailableCapacityGroup-ExtIEs} } OPTIONAL +} + +CompositeAvailableCapacityGroup-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +CompositeAvailableCapacity ::= SEQUENCE { + cellCapacityClassValue CellCapacityClassValue OPTIONAL, + capacityValue CapacityValue, + iE-Extensions ProtocolExtensionContainer { { CompositeAvailableCapacity-ExtIEs} } OPTIONAL +} + +CompositeAvailableCapacity-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ConditionalInterDUMobilityInformation ::= SEQUENCE { + cho-trigger CHOtrigger-InterDU, + targetgNB-DUUEF1APID GNB-DU-UE-F1AP-ID OPTIONAL + -- This IE shall be present if the cho-trigger IE is present and set to "cho-replace" --, + iE-Extensions ProtocolExtensionContainer { { ConditionalInterDUMobilityInformation-ExtIEs} } OPTIONAL, + ... +} + +ConditionalInterDUMobilityInformation-ExtIEs F1AP-PROTOCOL-EXTENSION ::={ + ... +} + +ConditionalIntraDUMobilityInformation ::= SEQUENCE { + cho-trigger CHOtrigger-IntraDU, + targetCellsTocancel TargetCellList OPTIONAL, + -- This IE may be present if the cho-trigger IE is present and set to "cho-cancel" + iE-Extensions ProtocolExtensionContainer { { ConditionalIntraDUMobilityInformation-ExtIEs} } OPTIONAL, + ... +} + +ConditionalIntraDUMobilityInformation-ExtIEs F1AP-PROTOCOL-EXTENSION ::={ + ... +} + +ConfiguredTACIndication ::= ENUMERATED { + true, + ... +} + + +CoordinateID ::= INTEGER (0..511, ...) + +CP-TransportLayerAddress ::= CHOICE { + endpoint-IP-address TransportLayerAddress, + endpoint-IP-address-and-port Endpoint-IP-address-and-port, + choice-extension ProtocolIE-SingleContainer { { CP-TransportLayerAddress-ExtIEs } } +} + +CP-TransportLayerAddress-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +CPTrafficType ::= INTEGER (1..3,...) + +CriticalityDiagnostics ::= SEQUENCE { + procedureCode ProcedureCode OPTIONAL, + triggeringMessage TriggeringMessage OPTIONAL, + procedureCriticality Criticality OPTIONAL, + transactionID TransactionID OPTIONAL, + iEsCriticalityDiagnostics CriticalityDiagnostics-IE-List OPTIONAL, + iE-Extensions ProtocolExtensionContainer {{CriticalityDiagnostics-ExtIEs}} OPTIONAL, + ... +} + +CriticalityDiagnostics-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +CriticalityDiagnostics-IE-List ::= SEQUENCE (SIZE (1.. maxnoofErrors)) OF CriticalityDiagnostics-IE-Item + +CriticalityDiagnostics-IE-Item ::= SEQUENCE { + iECriticality Criticality, + iE-ID ProtocolIE-ID, + typeOfError TypeOfError, + iE-Extensions ProtocolExtensionContainer {{CriticalityDiagnostics-IE-Item-ExtIEs}} OPTIONAL, + ... +} + +CriticalityDiagnostics-IE-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +C-RNTI ::= INTEGER (0..65535, ...) + +CUDURadioInformationType ::= CHOICE { + rIM CUDURIMInformation, + choice-extension ProtocolIE-SingleContainer { { CUDURadioInformationType-ExtIEs} } +} + +CUDURadioInformationType-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +CUDURIMInformation ::= SEQUENCE { + victimgNBSetID GNBSetID, + rIMRSDetectionStatus RIMRSDetectionStatus, + iE-Extensions ProtocolExtensionContainer { { CUDURIMInformation-ExtIEs} } OPTIONAL +} + +CUDURIMInformation-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +CUtoDURRCInformation ::= SEQUENCE { + cG-ConfigInfo CG-ConfigInfo OPTIONAL, + uE-CapabilityRAT-ContainerList UE-CapabilityRAT-ContainerList OPTIONAL, + measConfig MeasConfig OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { CUtoDURRCInformation-ExtIEs} } OPTIONAL, + ... +} + +CUtoDURRCInformation-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-HandoverPreparationInformation CRITICALITY ignore EXTENSION HandoverPreparationInformation PRESENCE optional }| + { ID id-CellGroupConfig CRITICALITY ignore EXTENSION CellGroupConfig PRESENCE optional }| + { ID id-MeasurementTimingConfiguration CRITICALITY ignore EXTENSION MeasurementTimingConfiguration PRESENCE optional }| + { ID id-UEAssistanceInformation CRITICALITY ignore EXTENSION UEAssistanceInformation PRESENCE optional }| + { ID id-CG-Config CRITICALITY ignore EXTENSION CG-Config PRESENCE optional }| + { ID id-UEAssistanceInformationEUTRA CRITICALITY ignore EXTENSION UEAssistanceInformationEUTRA PRESENCE optional }, + ... +} + +-- D + +DCBasedDuplicationConfigured::= ENUMERATED{true,..., false} + +Dedicated-SIDelivery-NeededUE-Item ::= SEQUENCE { + gNB-CU-UE-F1AP-ID GNB-CU-UE-F1AP-ID, + nRCGI NRCGI, + iE-Extensions ProtocolExtensionContainer { { DedicatedSIDeliveryNeededUE-Item-ExtIEs} } OPTIONAL, + ... +} + +DedicatedSIDeliveryNeededUE-Item-ExtIEs F1AP-PROTOCOL-EXTENSION::={ + ... +} + + +DL-PRS ::= SEQUENCE { + prsid INTEGER (0..255), + dl-PRSResourceSetID PRS-Resource-Set-ID, + dl-PRSResourceID PRS-Resource-ID OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {DL-PRS-ExtIEs} } OPTIONAL +} + +DL-PRS-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +DL-PRSMutingPattern ::= CHOICE { + two BIT STRING (SIZE(2)), + four BIT STRING (SIZE(4)), + six BIT STRING (SIZE(6)), + eight BIT STRING (SIZE(8)), + sixteen BIT STRING (SIZE(16)), + thirty-two BIT STRING (SIZE(32)), + choice-extension ProtocolIE-SingleContainer { { DL-PRSMutingPattern-ExtIEs } } +} + +DL-PRSMutingPattern-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +DLPRSResourceCoordinates ::= SEQUENCE { + listofDL-PRSResourceSetARP SEQUENCE (SIZE(1.. maxnoofPRS-ResourceSets)) OF DLPRSResourceSetARP, + iE-Extensions ProtocolExtensionContainer { { DLPRSResourceCoordinates-ExtIEs } } OPTIONAL +} + +DLPRSResourceCoordinates-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +DLPRSResourceSetARP ::= SEQUENCE { + dl-PRSResourceSetID INTEGER (0..7), + dL-PRSResourceSetARPLocation DL-PRSResourceSetARPLocation, + listofDL-PRSResourceARP SEQUENCE (SIZE(1.. maxnoofPRS-ResourcesPerSet)) OF DLPRSResourceARP, + iE-Extensions ProtocolExtensionContainer { { DLPRSResourceSetARP-ExtIEs } } OPTIONAL +} + +DLPRSResourceSetARP-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +DL-PRSResourceSetARPLocation ::= CHOICE { + relativeGeodeticLocation RelativeGeodeticLocation, + relativeCartesianLocation RelativeCartesianLocation, + choice-Extension ProtocolIE-SingleContainer { { DL-PRSResourceSetARPLocation-ExtIEs } } +} + +DL-PRSResourceSetARPLocation-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + + +DLPRSResourceARP ::= SEQUENCE { + dl-PRSResourceID INTEGER (0..63), + dL-PRSResourceARPLocation DL-PRSResourceARPLocation, + iE-Extensions ProtocolExtensionContainer { { DLPRSResourceARP-ExtIEs } } OPTIONAL +} + +DLPRSResourceARP-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +DL-PRSResourceARPLocation ::= CHOICE { + relativeGeodeticLocation RelativeGeodeticLocation, + relativeCartesianLocation RelativeCartesianLocation, + choice-Extension ProtocolIE-SingleContainer { { DL-PRSResourceARPLocation-ExtIEs } } +} + +DL-PRSResourceARPLocation-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +DL-UP-TNL-Address-to-Update-List-Item ::= SEQUENCE { + oldIPAdress TransportLayerAddress, + newIPAdress TransportLayerAddress, + iE-Extensions ProtocolExtensionContainer { { DL-UP-TNL-Address-to-Update-List-ItemExtIEs } } OPTIONAL, + ... +} + +DL-UP-TNL-Address-to-Update-List-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +DLUPTNLInformation-ToBeSetup-List ::= SEQUENCE (SIZE(1..maxnoofDLUPTNLInformation)) OF DLUPTNLInformation-ToBeSetup-Item + +DLUPTNLInformation-ToBeSetup-Item ::= SEQUENCE { + dLUPTNLInformation UPTransportLayerInformation , + iE-Extensions ProtocolExtensionContainer { { DLUPTNLInformation-ToBeSetup-ItemExtIEs } } OPTIONAL, + ... +} + +DLUPTNLInformation-ToBeSetup-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +DRB-Activity-Item ::= SEQUENCE { + dRBID DRBID, + dRB-Activity DRB-Activity OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { DRB-Activity-ItemExtIEs } } OPTIONAL, + ... +} + +DRB-Activity-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +DRB-Activity ::= ENUMERATED {active, not-active} + +DRBID ::= INTEGER (1..32, ...) + +DRBs-FailedToBeModified-Item ::= SEQUENCE { + dRBID DRBID , + cause Cause OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { DRBs-FailedToBeModified-ItemExtIEs } } OPTIONAL, + ... +} + +DRBs-FailedToBeModified-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +DRBs-FailedToBeSetup-Item ::= SEQUENCE { + dRBID DRBID, + cause Cause OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { DRBs-FailedToBeSetup-ItemExtIEs } } OPTIONAL, + ... +} + +DRBs-FailedToBeSetup-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +DRBs-FailedToBeSetupMod-Item ::= SEQUENCE { + dRBID DRBID , + cause Cause OPTIONAL , + iE-Extensions ProtocolExtensionContainer { { DRBs-FailedToBeSetupMod-ItemExtIEs } } OPTIONAL, + ... +} + +DRBs-FailedToBeSetupMod-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +DRB-Information ::= SEQUENCE { + dRB-QoS QoSFlowLevelQoSParameters, + sNSSAI SNSSAI, + notificationControl NotificationControl OPTIONAL, + flows-Mapped-To-DRB-List Flows-Mapped-To-DRB-List, + iE-Extensions ProtocolExtensionContainer { { DRB-Information-ItemExtIEs } } OPTIONAL +} + +DRB-Information-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +DRBs-Modified-Item ::= SEQUENCE { + dRBID DRBID, + lCID LCID OPTIONAL, + dLUPTNLInformation-ToBeSetup-List DLUPTNLInformation-ToBeSetup-List, + iE-Extensions ProtocolExtensionContainer { { DRBs-Modified-ItemExtIEs } } OPTIONAL, + ... +} + +DRBs-Modified-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-RLC-Status CRITICALITY ignore EXTENSION RLC-Status PRESENCE optional }| + { ID id-AdditionalPDCPDuplicationTNL-List CRITICALITY ignore EXTENSION AdditionalPDCPDuplicationTNL-List PRESENCE optional }, + ... +} + +DRBs-ModifiedConf-Item ::= SEQUENCE { + dRBID DRBID, + uLUPTNLInformation-ToBeSetup-List ULUPTNLInformation-ToBeSetup-List , + iE-Extensions ProtocolExtensionContainer { { DRBs-ModifiedConf-ItemExtIEs } } OPTIONAL, + ... +} + +DRBs-ModifiedConf-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-AdditionalPDCPDuplicationTNL-List CRITICALITY ignore EXTENSION AdditionalPDCPDuplicationTNL-List PRESENCE optional }, + ... +} + +DRB-Notify-Item ::= SEQUENCE { + dRBID DRBID, + notification-Cause Notification-Cause, + iE-Extensions ProtocolExtensionContainer { { DRB-Notify-ItemExtIEs } } OPTIONAL, + ... +} + +DRB-Notify-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-CurrentQoSParaSetIndex CRITICALITY ignore EXTENSION QoSParaSetNotifyIndex PRESENCE optional }, + ... +} + +DRBs-Required-ToBeModified-Item ::= SEQUENCE { + dRBID DRBID, + dLUPTNLInformation-ToBeSetup-List DLUPTNLInformation-ToBeSetup-List , + iE-Extensions ProtocolExtensionContainer { { DRBs-Required-ToBeModified-ItemExtIEs } } OPTIONAL, + ... +} + +DRBs-Required-ToBeModified-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-RLC-Status CRITICALITY ignore EXTENSION RLC-Status PRESENCE optional }| + { ID id-AdditionalPDCPDuplicationTNL-List CRITICALITY ignore EXTENSION AdditionalPDCPDuplicationTNL-List PRESENCE optional }, + ... +} + +DRBs-Required-ToBeReleased-Item ::= SEQUENCE { + dRBID DRBID, + iE-Extensions ProtocolExtensionContainer { { DRBs-Required-ToBeReleased-ItemExtIEs } } OPTIONAL, + ... +} + +DRBs-Required-ToBeReleased-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +DRBs-Setup-Item ::= SEQUENCE { + dRBID DRBID, + lCID LCID OPTIONAL, + dLUPTNLInformation-ToBeSetup-List DLUPTNLInformation-ToBeSetup-List , + iE-Extensions ProtocolExtensionContainer { { DRBs-Setup-ItemExtIEs } } OPTIONAL, + ... +} + +DRBs-Setup-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-AdditionalPDCPDuplicationTNL-List CRITICALITY ignore EXTENSION AdditionalPDCPDuplicationTNL-List PRESENCE optional }| + { ID id-RLCDuplicationInformation CRITICALITY ignore EXTENSION RLCDuplicationInformation PRESENCE optional}, ... +} + +DRBs-SetupMod-Item ::= SEQUENCE { + dRBID DRBID, + lCID LCID OPTIONAL, + dLUPTNLInformation-ToBeSetup-List DLUPTNLInformation-ToBeSetup-List , + iE-Extensions ProtocolExtensionContainer { { DRBs-SetupMod-ItemExtIEs } } OPTIONAL, + ... +} + +DRBs-SetupMod-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-AdditionalPDCPDuplicationTNL-List CRITICALITY ignore EXTENSION AdditionalPDCPDuplicationTNL-List PRESENCE optional }, + ... +} + + +DRBs-ToBeModified-Item ::= SEQUENCE { + dRBID DRBID, + qoSInformation QoSInformation OPTIONAL, + uLUPTNLInformation-ToBeSetup-List ULUPTNLInformation-ToBeSetup-List , + uLConfiguration ULConfiguration OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { DRBs-ToBeModified-ItemExtIEs } } OPTIONAL, + ... +} + +DRBs-ToBeModified-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-DLPDCPSNLength CRITICALITY ignore EXTENSION PDCPSNLength PRESENCE optional }| + { ID id-ULPDCPSNLength CRITICALITY ignore EXTENSION PDCPSNLength PRESENCE optional }| + {ID id-BearerTypeChange CRITICALITY ignore EXTENSION BearerTypeChange PRESENCE optional}| + { ID id-RLCMode CRITICALITY ignore EXTENSION RLCMode PRESENCE optional }| + { ID id-Duplication-Activation CRITICALITY reject EXTENSION DuplicationActivation PRESENCE optional }| + { ID id-DC-Based-Duplication-Configured CRITICALITY reject EXTENSION DCBasedDuplicationConfigured PRESENCE optional }| + { ID id-DC-Based-Duplication-Activation CRITICALITY reject EXTENSION DuplicationActivation PRESENCE optional }| + { ID id-AdditionalPDCPDuplicationTNL-List CRITICALITY ignore EXTENSION AdditionalPDCPDuplicationTNL-List PRESENCE optional }| + { ID id-RLCDuplicationInformation CRITICALITY ignore EXTENSION RLCDuplicationInformation PRESENCE optional}, + ... +} + +DRBs-ToBeReleased-Item ::= SEQUENCE { + dRBID DRBID, + iE-Extensions ProtocolExtensionContainer { { DRBs-ToBeReleased-ItemExtIEs } } OPTIONAL, + ... +} + +DRBs-ToBeReleased-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +DRBs-ToBeSetup-Item ::= SEQUENCE { + dRBID DRBID, + qoSInformation QoSInformation, + uLUPTNLInformation-ToBeSetup-List ULUPTNLInformation-ToBeSetup-List , + rLCMode RLCMode, + uLConfiguration ULConfiguration OPTIONAL, + duplicationActivation DuplicationActivation OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { DRBs-ToBeSetup-ItemExtIEs } } OPTIONAL, + ... +} + +DRBs-ToBeSetup-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-DC-Based-Duplication-Configured CRITICALITY reject EXTENSION DCBasedDuplicationConfigured PRESENCE optional }| + { ID id-DC-Based-Duplication-Activation CRITICALITY reject EXTENSION DuplicationActivation PRESENCE optional }| + { ID id-DLPDCPSNLength CRITICALITY ignore EXTENSION PDCPSNLength PRESENCE mandatory }| + { ID id-ULPDCPSNLength CRITICALITY ignore EXTENSION PDCPSNLength PRESENCE optional }| + { ID id-AdditionalPDCPDuplicationTNL-List CRITICALITY ignore EXTENSION AdditionalPDCPDuplicationTNL-List PRESENCE optional }, + ... +} + + +DRBs-ToBeSetupMod-Item ::= SEQUENCE { + dRBID DRBID, + qoSInformation QoSInformation, + uLUPTNLInformation-ToBeSetup-List ULUPTNLInformation-ToBeSetup-List, + rLCMode RLCMode, + uLConfiguration ULConfiguration OPTIONAL, + duplicationActivation DuplicationActivation OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { DRBs-ToBeSetupMod-ItemExtIEs } } OPTIONAL, + ... +} + +DRBs-ToBeSetupMod-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-DC-Based-Duplication-Configured CRITICALITY reject EXTENSION DCBasedDuplicationConfigured PRESENCE optional }| + { ID id-DC-Based-Duplication-Activation CRITICALITY reject EXTENSION DuplicationActivation PRESENCE optional }| + { ID id-DLPDCPSNLength CRITICALITY ignore EXTENSION PDCPSNLength PRESENCE optional }| + { ID id-ULPDCPSNLength CRITICALITY ignore EXTENSION PDCPSNLength PRESENCE optional }| + { ID id-AdditionalPDCPDuplicationTNL-List CRITICALITY ignore EXTENSION AdditionalPDCPDuplicationTNL-List PRESENCE optional }| + { ID id-RLCDuplicationInformation CRITICALITY ignore EXTENSION RLCDuplicationInformation PRESENCE optional}, + ... +} + +DRXCycle ::= SEQUENCE { + longDRXCycleLength LongDRXCycleLength, + shortDRXCycleLength ShortDRXCycleLength OPTIONAL, + shortDRXCycleTimer ShortDRXCycleTimer OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { DRXCycle-ExtIEs} } OPTIONAL, + ... +} + +DRXCycle-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +DRX-Config ::= OCTET STRING + +DRXConfigurationIndicator ::= ENUMERATED{ release, ...} + +DRX-LongCycleStartOffset ::= INTEGER (0..10239) + +DSInformationList ::= SEQUENCE (SIZE(0..maxnoofDSInfo)) OF DSCP + +DSCP ::= BIT STRING (SIZE (6)) + +DUtoCURRCContainer ::= OCTET STRING + +DUCURadioInformationType ::= CHOICE { + rIM DUCURIMInformation, + choice-extension ProtocolIE-SingleContainer { { DUCURadioInformationType-ExtIEs} } +} + +DUCURadioInformationType-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +DUCURIMInformation ::= SEQUENCE { + victimgNBSetID GNBSetID, + rIMRSDetectionStatus RIMRSDetectionStatus, + aggressorCellList AggressorCellList, + iE-Extensions ProtocolExtensionContainer { { DUCURIMInformation-ExtIEs} } OPTIONAL +} + +DUCURIMInformation-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +DUF-Slot-Config-Item ::= CHOICE { + explicitFormat ExplicitFormat, + implicitFormat ImplicitFormat, + choice-extension ProtocolIE-SingleContainer { { DUF-Slot-Config-Item-ExtIEs} } +} + +DUF-Slot-Config-Item-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} +DUF-Slot-Config-List ::= SEQUENCE (SIZE(1..maxnoofDUFSlots)) OF DUF-Slot-Config-Item + +DUFSlotformatIndex ::= INTEGER(0..254) + +DUFTransmissionPeriodicity ::= ENUMERATED { ms0p5, ms0p625, ms1, ms1p25, ms2, ms2p5, ms5, ms10, ...} + +DU-RX-MT-RX ::= ENUMERATED {supported, not-supported} + +DU-TX-MT-TX ::= ENUMERATED {supported, not-supported} + +DU-RX-MT-TX ::= ENUMERATED {supported, not-supported} + +DU-TX-MT-RX ::= ENUMERATED {supported, not-supported} + +DUtoCURRCInformation ::= SEQUENCE { + cellGroupConfig CellGroupConfig, + measGapConfig MeasGapConfig OPTIONAL, + requestedP-MaxFR1 OCTET STRING OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { DUtoCURRCInformation-ExtIEs} } OPTIONAL, + ... +} + +DUtoCURRCInformation-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-DRX-LongCycleStartOffset CRITICALITY ignore EXTENSION DRX-LongCycleStartOffset PRESENCE optional }| + { ID id-SelectedBandCombinationIndex CRITICALITY ignore EXTENSION SelectedBandCombinationIndex PRESENCE optional }| + { ID id-SelectedFeatureSetEntryIndex CRITICALITY ignore EXTENSION SelectedFeatureSetEntryIndex PRESENCE optional }| + { ID id-Ph-InfoSCG CRITICALITY ignore EXTENSION Ph-InfoSCG PRESENCE optional }| + { ID id-RequestedBandCombinationIndex CRITICALITY ignore EXTENSION RequestedBandCombinationIndex PRESENCE optional }| + { ID id-RequestedFeatureSetEntryIndex CRITICALITY ignore EXTENSION RequestedFeatureSetEntryIndex PRESENCE optional }| + { ID id-DRX-Config CRITICALITY ignore EXTENSION DRX-Config PRESENCE optional }| + { ID id-PDCCH-BlindDetectionSCG CRITICALITY ignore EXTENSION PDCCH-BlindDetectionSCG PRESENCE optional }| + { ID id-Requested-PDCCH-BlindDetectionSCG CRITICALITY ignore EXTENSION Requested-PDCCH-BlindDetectionSCG PRESENCE optional }| + { ID id-Ph-InfoMCG CRITICALITY ignore EXTENSION Ph-InfoMCG PRESENCE optional }| + { ID id-MeasGapSharingConfig CRITICALITY ignore EXTENSION MeasGapSharingConfig PRESENCE optional }| + { ID id-SL-PHY-MAC-RLC-Config CRITICALITY ignore EXTENSION SL-PHY-MAC-RLC-Config PRESENCE optional }| + { ID id-SL-ConfigDedicatedEUTRA CRITICALITY ignore EXTENSION SL-ConfigDedicatedEUTRA PRESENCE optional }| + { ID id-RequestedP-MaxFR2 CRITICALITY ignore EXTENSION RequestedP-MaxFR2 PRESENCE optional }, + ... +} + +DuplicationActivation ::= ENUMERATED{active,inactive,... } + +DuplicationIndication ::= ENUMERATED {true, ... , false } + +DuplicationState ::= ENUMERATED { + active, + inactive, + ... +} + +Dynamic5QIDescriptor ::= SEQUENCE { + qoSPriorityLevel INTEGER (1..127), + packetDelayBudget PacketDelayBudget, + packetErrorRate PacketErrorRate, + fiveQI INTEGER (0..255, ...) OPTIONAL, + delayCritical ENUMERATED {delay-critical, non-delay-critical} OPTIONAL, + -- C-ifGBRflow: This IE shall be present if the GBR QoS Flow Information IE is present in the QoS Flow Level QoS Parameters IE. + averagingWindow AveragingWindow OPTIONAL, + -- C-ifGBRflow: This IE shall be present if the GBR QoS Flow Information IE is present in the QoS Flow Level QoS Parameters IE. + maxDataBurstVolume MaxDataBurstVolume OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { Dynamic5QIDescriptor-ExtIEs } } OPTIONAL +} + +Dynamic5QIDescriptor-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-ExtendedPacketDelayBudget CRITICALITY ignore EXTENSION ExtendedPacketDelayBudget PRESENCE optional }| + { ID id-CNPacketDelayBudgetDownlink CRITICALITY ignore EXTENSION ExtendedPacketDelayBudget PRESENCE optional }| + { ID id-CNPacketDelayBudgetUplink CRITICALITY ignore EXTENSION ExtendedPacketDelayBudget PRESENCE optional }, + ... +} + +DynamicPQIDescriptor ::= SEQUENCE { + resourceType ENUMERATED {gbr, non-gbr, delay-critical-grb, ...} OPTIONAL, + qoSPriorityLevel INTEGER (1..8, ...), + packetDelayBudget PacketDelayBudget, + packetErrorRate PacketErrorRate, + averagingWindow AveragingWindow OPTIONAL, + -- C-ifGBRflow: This IE shall be present if the GBR QoS Flow Information IE is present in the QoS Flow Level QoS Parameters IE. + maxDataBurstVolume MaxDataBurstVolume OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { DynamicPQIDescriptor-ExtIEs } } OPTIONAL +} + +DynamicPQIDescriptor-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- E + +E-CID-MeasurementPeriodicity ::= ENUMERATED { + ms120, + ms240, + ms480, + ms640, + ms1024, + ms2048, + ms5120, + ms10240, + min1, + min6, + min12, + min30, + min60, + ... +} + +E-CID-MeasurementQuantities ::= SEQUENCE (SIZE (1.. maxnoofMeasE-CID)) OF ProtocolIE-SingleContainer { {E-CID-MeasurementQuantities-ItemIEs} } + +E-CID-MeasurementQuantities-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-E-CID-MeasurementQuantities-Item CRITICALITY reject TYPE E-CID-MeasurementQuantities-Item PRESENCE mandatory} +} + +E-CID-MeasurementQuantities-Item ::= SEQUENCE { + e-CIDmeasurementQuantitiesValue E-CID-MeasurementQuantitiesValue, + iE-Extensions ProtocolExtensionContainer { { E-CID-MeasurementQuantitiesValue-ExtIEs} } OPTIONAL +} + +E-CID-MeasurementQuantitiesValue-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-CID-MeasurementQuantitiesValue ::= ENUMERATED { + cell-Portion, + angleOfArrivalNR, + ... +} + +E-CID-MeasurementResult ::= SEQUENCE { + geographicalCoordinates GeographicalCoordinates OPTIONAL, + measuredResults-List E-CID-MeasuredResults-List OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { E-CID-MeasurementResult-ExtIEs} } OPTIONAL +} + +E-CID-MeasurementResult-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-CID-MeasuredResults-List ::= SEQUENCE (SIZE(1..maxnoofMeasE-CID)) OF E-CID-MeasuredResults-Item + +E-CID-MeasuredResults-Item ::= SEQUENCE { + e-CID-MeasuredResults-Value E-CID-MeasuredResults-Value, + iE-Extensions ProtocolExtensionContainer {{ E-CID-MeasuredResults-Item-ExtIEs }} OPTIONAL +} + +E-CID-MeasuredResults-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +E-CID-MeasuredResults-Value ::= CHOICE { + valueAngleofArrivalNR UL-AoA, + choice-extension ProtocolIE-SingleContainer { { E-CID-MeasuredResults-Value-ExtIEs} } +} + +E-CID-MeasuredResults-Value-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +E-CID-ReportCharacteristics ::= ENUMERATED { + onDemand, + periodic, + ... +} + +EgressBHRLCCHList ::= SEQUENCE (SIZE(1..maxnoofEgressLinks)) OF EgressBHRLCCHItem + +EgressBHRLCCHItem ::= SEQUENCE { + nextHopBAPAddress BAPAddress, + bHRLCChannelID BHRLCChannelID, + iE-Extensions ProtocolExtensionContainer {{EgressBHRLCCHItemExtIEs }} OPTIONAL +} + +EgressBHRLCCHItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Endpoint-IP-address-and-port ::=SEQUENCE { + endpointIPAddress TransportLayerAddress, + iE-Extensions ProtocolExtensionContainer { { Endpoint-IP-address-and-port-ExtIEs} } OPTIONAL +} + +Endpoint-IP-address-and-port-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-portNumber CRITICALITY reject EXTENSION PortNumber PRESENCE optional}, + ... +} + +ExtendedAvailablePLMN-List ::= SEQUENCE (SIZE(1..maxnoofExtendedBPLMNs)) OF ExtendedAvailablePLMN-Item + +ExtendedAvailablePLMN-Item ::= SEQUENCE { + pLMNIdentity PLMN-Identity, + iE-Extensions ProtocolExtensionContainer { { ExtendedAvailablePLMN-Item-ExtIEs} } OPTIONAL +} + +ExplicitFormat ::= SEQUENCE { + permutation Permutation, + noofDownlinkSymbols NoofDownlinkSymbols OPTIONAL, + noofUplinkSymbols NoofUplinkSymbols OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { ExplicitFormat-ExtIEs} } OPTIONAL +} + +ExplicitFormat-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ExtendedAvailablePLMN-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ExtendedServedPLMNs-List ::= SEQUENCE (SIZE(1.. maxnoofExtendedBPLMNs)) OF ExtendedServedPLMNs-Item + +ExtendedServedPLMNs-Item ::= SEQUENCE { + pLMN-Identity PLMN-Identity, + tAISliceSupportList SliceSupportList OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { ExtendedServedPLMNs-ItemExtIEs} } OPTIONAL, + ... +} + +ExtendedServedPLMNs-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-NPNSupportInfo CRITICALITY reject EXTENSION NPNSupportInfo PRESENCE optional }| +{ ID id-ExtendedTAISliceSupportList CRITICALITY reject EXTENSION ExtendedSliceSupportList PRESENCE optional }, + ... +} + +ExtendedSliceSupportList ::= SEQUENCE (SIZE(1.. maxnoofExtSliceItems)) OF SliceSupportItem + +EUTRACells-List ::= SEQUENCE (SIZE (1.. maxCellineNB)) OF EUTRACells-List-item + +EUTRACells-List-item ::= SEQUENCE { + eUTRA-Cell-ID EUTRA-Cell-ID, + served-EUTRA-Cells-Information Served-EUTRA-Cells-Information, + iE-Extensions ProtocolExtensionContainer { { EUTRACells-List-itemExtIEs } } OPTIONAL +} + +EUTRACells-List-itemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +EUTRA-Cell-ID ::= BIT STRING (SIZE(28)) + +EUTRA-Coex-FDD-Info ::= SEQUENCE { + uL-EARFCN ExtendedEARFCN OPTIONAL, + dL-EARFCN ExtendedEARFCN, + uL-Transmission-Bandwidth EUTRA-Transmission-Bandwidth OPTIONAL, + dL-Transmission-Bandwidth EUTRA-Transmission-Bandwidth, + iE-Extensions ProtocolExtensionContainer { {EUTRA-Coex-FDD-Info-ExtIEs} } OPTIONAL, + ... +} + +EUTRA-Coex-FDD-Info-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-ULCarrierList CRITICALITY ignore EXTENSION NRCarrierList PRESENCE optional }| + { ID id-DLCarrierList CRITICALITY ignore EXTENSION NRCarrierList PRESENCE optional }, + ... +} + +EUTRA-Coex-Mode-Info ::= CHOICE { + fDD EUTRA-Coex-FDD-Info, + tDD EUTRA-Coex-TDD-Info, + ... +} + +EUTRA-Coex-TDD-Info ::= SEQUENCE { + eARFCN ExtendedEARFCN, + transmission-Bandwidth EUTRA-Transmission-Bandwidth, + subframeAssignment EUTRA-SubframeAssignment, + specialSubframe-Info EUTRA-SpecialSubframe-Info, + iE-Extensions ProtocolExtensionContainer { {EUTRA-Coex-TDD-Info-ExtIEs} } OPTIONAL, + ... +} +EUTRA-Coex-TDD-Info-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} +EUTRA-CyclicPrefixDL ::= ENUMERATED { + normal, + extended, + ... +} + +EUTRA-CyclicPrefixUL ::= ENUMERATED { + normal, + extended, + ... +} + +EUTRA-PRACH-Configuration ::= SEQUENCE { + rootSequenceIndex INTEGER (0..837), + zeroCorrelationIndex INTEGER (0..15), + highSpeedFlag BOOLEAN, + prach-FreqOffset INTEGER (0..94), + prach-ConfigIndex INTEGER (0..63) OPTIONAL, + -- C-ifTDD: This IE shall be present if the EUTRA-Mode-Info IE in the Resource Coordination E-UTRA Cell Information IE is set to the value "TDD" + iE-Extensions ProtocolExtensionContainer { {EUTRA-PRACH-Configuration-ExtIEs} } OPTIONAL, + ... +} + +EUTRA-PRACH-Configuration-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +EUTRA-SpecialSubframe-Info ::= SEQUENCE { + specialSubframePatterns EUTRA-SpecialSubframePatterns, + cyclicPrefixDL EUTRA-CyclicPrefixDL, + cyclicPrefixUL EUTRA-CyclicPrefixUL, + iE-Extensions ProtocolExtensionContainer { { EUTRA-SpecialSubframe-Info-ExtIEs} } OPTIONAL, + ... +} + +EUTRA-SpecialSubframe-Info-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +EUTRA-SpecialSubframePatterns ::= ENUMERATED { + ssp0, + ssp1, + ssp2, + ssp3, + ssp4, + ssp5, + ssp6, + ssp7, + ssp8, + ssp9, + ssp10, + ... +} + +EUTRA-SubframeAssignment ::= ENUMERATED { + sa0, + sa1, + sa2, + sa3, + sa4, + sa5, + sa6, + ... +} + +EUTRA-Transmission-Bandwidth ::= ENUMERATED { + bw6, + bw15, + bw25, + bw50, + bw75, + bw100, + ... +} + +EUTRANQoS ::= SEQUENCE { + qCI QCI, + allocationAndRetentionPriority AllocationAndRetentionPriority, + gbrQosInformation GBR-QosInformation OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { EUTRANQoS-ExtIEs} } OPTIONAL, + ... +} + +EUTRANQoS-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ExecuteDuplication ::= ENUMERATED{true,...} + +ExtendedEARFCN ::= INTEGER (0..262143) + +EUTRA-Mode-Info ::= CHOICE { + eUTRAFDD EUTRA-FDD-Info, + eUTRATDD EUTRA-TDD-Info, + choice-extension ProtocolIE-SingleContainer { { EUTRA-Mode-Info-ExtIEs} } +} + +EUTRA-Mode-Info-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +EUTRA-NR-CellResourceCoordinationReq-Container ::= OCTET STRING + +EUTRA-NR-CellResourceCoordinationReqAck-Container ::= OCTET STRING + +EUTRA-FDD-Info ::= SEQUENCE { + uL-offsetToPointA OffsetToPointA, + dL-offsetToPointA OffsetToPointA, + iE-Extensions ProtocolExtensionContainer { {EUTRA-FDD-Info-ExtIEs} } OPTIONAL, + ... +} + +EUTRA-FDD-Info-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +EUTRA-TDD-Info ::= SEQUENCE { + offsetToPointA OffsetToPointA, + iE-Extensions ProtocolExtensionContainer { {EUTRA-TDD-Info-ExtIEs} } OPTIONAL, + ... +} + +EUTRA-TDD-Info-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +EventType ::= ENUMERATED { + on-demand, + periodic, + stop, + ... +} + +ExtendedPacketDelayBudget ::= INTEGER (1..65535, ...) + +-- F + +FDD-Info ::= SEQUENCE { + uL-NRFreqInfo NRFreqInfo, + dL-NRFreqInfo NRFreqInfo, + uL-Transmission-Bandwidth Transmission-Bandwidth, + dL-Transmission-Bandwidth Transmission-Bandwidth, + iE-Extensions ProtocolExtensionContainer { {FDD-Info-ExtIEs} } OPTIONAL, + ... +} + +FDD-Info-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +Flows-Mapped-To-DRB-List ::= SEQUENCE (SIZE(1.. maxnoofQoSFlows)) OF Flows-Mapped-To-DRB-Item + +Flows-Mapped-To-DRB-Item ::= SEQUENCE { + qoSFlowIdentifier QoSFlowIdentifier, + qoSFlowLevelQoSParameters QoSFlowLevelQoSParameters, + iE-Extensions ProtocolExtensionContainer { { Flows-Mapped-To-DRB-ItemExtIEs} } OPTIONAL +} + +Flows-Mapped-To-DRB-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + {ID id-QoSFlowMappingIndication CRITICALITY ignore EXTENSION QoSFlowMappingIndication PRESENCE optional}| + {ID id-TSCTrafficCharacteristics CRITICALITY ignore EXTENSION TSCTrafficCharacteristics PRESENCE optional}, + ... +} + +FR1-Bandwidth ::= ENUMERATED {bw5, bw10, bw20, bw40, bw50, bw80, bw100, ...} + +FR2-Bandwidth ::= ENUMERATED {bw50, bw100, bw200, bw400, ...} + +FreqBandNrItem ::= SEQUENCE { + freqBandIndicatorNr INTEGER (1..1024,...), + supportedSULBandList SEQUENCE (SIZE(0..maxnoofNrCellBands)) OF SupportedSULFreqBandItem, + iE-Extensions ProtocolExtensionContainer { {FreqBandNrItem-ExtIEs} } OPTIONAL, + ... +} + +FreqBandNrItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +FreqDomainLength ::= CHOICE { + l839 L839Info, + l139 L139Info, + choice-extension ProtocolIE-SingleContainer { {FreqDomainLength-ExtIEs} } +} + +FreqDomainLength-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +FrequencyShift7p5khz ::= ENUMERATED {false, true, ...} + +FullConfiguration ::= ENUMERATED {full, ...} + +FlowsMappedToSLDRB-List ::= SEQUENCE (SIZE(1.. maxnoofPC5QoSFlows)) OF FlowsMappedToSLDRB-Item + +FlowsMappedToSLDRB-Item ::= SEQUENCE { + pc5QoSFlowIdentifier PC5QoSFlowIdentifier, + iE-Extensions ProtocolExtensionContainer { {FlowsMappedToSLDRB-Item-ExtIEs} } OPTIONAL, + ... +} + +FlowsMappedToSLDRB-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- G + + +GBR-QosInformation ::= SEQUENCE { + e-RAB-MaximumBitrateDL BitRate, + e-RAB-MaximumBitrateUL BitRate, + e-RAB-GuaranteedBitrateDL BitRate, + e-RAB-GuaranteedBitrateUL BitRate, + iE-Extensions ProtocolExtensionContainer { { GBR-QosInformation-ExtIEs} } OPTIONAL, + ... +} + +GBR-QosInformation-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +GBR-QoSFlowInformation::= SEQUENCE { + maxFlowBitRateDownlink BitRate, + maxFlowBitRateUplink BitRate, + guaranteedFlowBitRateDownlink BitRate, + guaranteedFlowBitRateUplink BitRate, + maxPacketLossRateDownlink MaxPacketLossRate OPTIONAL, + maxPacketLossRateUplink MaxPacketLossRate OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { GBR-QosFlowInformation-ExtIEs} } OPTIONAL, + ... +} + +GBR-QosFlowInformation-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-AlternativeQoSParaSetList CRITICALITY ignore EXTENSION AlternativeQoSParaSetList PRESENCE optional }, + ... +} + +CG-Config ::= OCTET STRING + +GeographicalCoordinates ::= SEQUENCE { + tRPPositionDefinitionType TRPPositionDefinitionType, + dLPRSResourceCoordinates DLPRSResourceCoordinates OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { GeographicalCoordinates-ExtIEs } } OPTIONAL +} + +GeographicalCoordinates-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +GNBCUMeasurementID ::= INTEGER (0.. 4095, ...) + +GNBDUMeasurementID ::= INTEGER (0.. 4095, ...) + +GNB-CUSystemInformation::= SEQUENCE { + sibtypetobeupdatedlist SEQUENCE (SIZE(1.. maxnoofSIBTypes)) OF SibtypetobeupdatedListItem, + iE-Extensions ProtocolExtensionContainer { { GNB-CUSystemInformation-ExtIEs} } OPTIONAL, + ... +} + +GNB-CUSystemInformation-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + {ID id-systemInformationAreaID CRITICALITY ignore EXTENSION SystemInformationAreaID PRESENCE optional}, + ... +} + +GNB-CU-TNL-Association-Setup-Item::= SEQUENCE { + tNLAssociationTransportLayerAddress CP-TransportLayerAddress , + iE-Extensions ProtocolExtensionContainer { { GNB-CU-TNL-Association-Setup-Item-ExtIEs} } OPTIONAL +} + +GNB-CU-TNL-Association-Setup-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +GNB-CU-TNL-Association-Failed-To-Setup-Item ::= SEQUENCE { + tNLAssociationTransportLayerAddress CP-TransportLayerAddress , + cause Cause, + iE-Extensions ProtocolExtensionContainer { { GNB-CU-TNL-Association-Failed-To-Setup-Item-ExtIEs} } OPTIONAL +} + +GNB-CU-TNL-Association-Failed-To-Setup-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +GNB-CU-TNL-Association-To-Add-Item ::= SEQUENCE { + tNLAssociationTransportLayerAddress CP-TransportLayerAddress , + tNLAssociationUsage TNLAssociationUsage, + iE-Extensions ProtocolExtensionContainer { { GNB-CU-TNL-Association-To-Add-Item-ExtIEs} } OPTIONAL +} + +GNB-CU-TNL-Association-To-Add-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +GNB-CU-TNL-Association-To-Remove-Item::= SEQUENCE { + tNLAssociationTransportLayerAddress CP-TransportLayerAddress , + iE-Extensions ProtocolExtensionContainer { { GNB-CU-TNL-Association-To-Remove-Item-ExtIEs} } OPTIONAL +} + +GNB-CU-TNL-Association-To-Remove-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + {ID id-TNLAssociationTransportLayerAddressgNBDU CRITICALITY reject EXTENSION CP-TransportLayerAddress PRESENCE optional}, + ... +} + + +GNB-CU-TNL-Association-To-Update-Item::= SEQUENCE { + tNLAssociationTransportLayerAddress CP-TransportLayerAddress , + tNLAssociationUsage TNLAssociationUsage OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { GNB-CU-TNL-Association-To-Update-Item-ExtIEs} } OPTIONAL +} + +GNB-CU-TNL-Association-To-Update-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +GNB-CU-UE-F1AP-ID ::= INTEGER (0..4294967295) + +GNB-DU-Cell-Resource-Configuration ::= SEQUENCE { + subcarrierSpacing SubcarrierSpacing, + dUFTransmissionPeriodicity DUFTransmissionPeriodicity OPTIONAL, + dUF-Slot-Config-List DUF-Slot-Config-List OPTIONAL, + hSNATransmissionPeriodicity HSNATransmissionPeriodicity, + hNSASlotConfigList HSNASlotConfigList OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { GNB-DU-Cell-Resource-Configuration-ExtIEs } } OPTIONAL +} + +GNB-DU-Cell-Resource-Configuration-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +GNB-DU-UE-F1AP-ID ::= INTEGER (0..4294967295) + +GNB-DU-ID ::= INTEGER (0..68719476735) + +GNB-CU-Name ::= PrintableString(SIZE(1..150,...)) + +GNB-DU-Name ::= PrintableString(SIZE(1..150,...)) + +Extended-GNB-CU-Name ::= SEQUENCE { + gNB-CU-NameVisibleString GNB-CU-NameVisibleString OPTIONAL, + gNB-CU-NameUTF8String GNB-CU-NameUTF8String OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { Extended-GNB-CU-Name-ExtIEs } } OPTIONAL, + ... +} + +Extended-GNB-CU-Name-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +GNB-CU-NameVisibleString ::= VisibleString(SIZE(1..150,...)) + +GNB-CU-NameUTF8String ::= UTF8String(SIZE(1..150,...)) + +Extended-GNB-DU-Name ::= SEQUENCE { + gNB-DU-NameVisibleString GNB-DU-NameVisibleString OPTIONAL, + gNB-DU-NameUTF8String GNB-DU-NameUTF8String OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { Extended-GNB-DU-Name-ExtIEs } } OPTIONAL, + ... +} + +Extended-GNB-DU-Name-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +GNB-DU-NameVisibleString ::= VisibleString(SIZE(1..150,...)) + +GNB-DU-NameUTF8String ::= UTF8String(SIZE(1..150,...)) + + +GNB-DU-Served-Cells-Item ::= SEQUENCE { + served-Cell-Information Served-Cell-Information, + gNB-DU-System-Information GNB-DU-System-Information OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { GNB-DU-Served-Cells-ItemExtIEs} } OPTIONAL, + ... +} + +GNB-DU-Served-Cells-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +GNB-DU-System-Information ::= SEQUENCE { + mIB-message MIB-message, + sIB1-message SIB1-message, + iE-Extensions ProtocolExtensionContainer { { GNB-DU-System-Information-ExtIEs } } OPTIONAL, + ... +} + +GNB-DU-System-Information-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-SIB12-message CRITICALITY ignore EXTENSION SIB12-message PRESENCE optional}| + { ID id-SIB13-message CRITICALITY ignore EXTENSION SIB13-message PRESENCE optional}| + { ID id-SIB14-message CRITICALITY ignore EXTENSION SIB14-message PRESENCE optional}| + { ID id-SIB10-message CRITICALITY ignore EXTENSION SIB10-message PRESENCE optional}, + ... +} + +GNB-DUConfigurationQuery ::= ENUMERATED {true, ...} + +GNBDUOverloadInformation ::= ENUMERATED {overloaded, not-overloaded} + +GNB-DU-TNL-Association-To-Remove-Item::= SEQUENCE { + tNLAssociationTransportLayerAddress CP-TransportLayerAddress , + tNLAssociationTransportLayerAddressgNBCU CP-TransportLayerAddress OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { GNB-DU-TNL-Association-To-Remove-Item-ExtIEs} } OPTIONAL +} + +GNB-DU-TNL-Association-To-Remove-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +GNB-RxTxTimeDiff ::= SEQUENCE { + rxTxTimeDiff GNBRxTxTimeDiffMeas, + additionalPath-List AdditionalPath-List OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { GNB-RxTxTimeDiff-ExtIEs} } OPTIONAL +} + +GNB-RxTxTimeDiff-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + + ... +} + +GNBRxTxTimeDiffMeas ::= CHOICE { + k0 INTEGER (0.. 1970049), + k1 INTEGER (0.. 985025), + k2 INTEGER (0.. 492513), + k3 INTEGER (0.. 246257), + k4 INTEGER (0.. 123129), + k5 INTEGER (0.. 61565), + choice-extension ProtocolIE-SingleContainer { { GNBRxTxTimeDiffMeas-ExtIEs } } +} + +GNBRxTxTimeDiffMeas-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +GNBSetID ::= BIT STRING (SIZE(22)) + +GTP-TEID ::= OCTET STRING (SIZE (4)) + +GTPTLAs ::= SEQUENCE (SIZE(1.. maxnoofGTPTLAs)) OF GTPTLA-Item + + +GTPTLA-Item ::= SEQUENCE { + gTPTransportLayerAddress TransportLayerAddress, + iE-Extensions ProtocolExtensionContainer { { GTPTLA-Item-ExtIEs } } OPTIONAL +} + +GTPTLA-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +GTPTunnel ::= SEQUENCE { + transportLayerAddress TransportLayerAddress, + gTP-TEID GTP-TEID, + iE-Extensions ProtocolExtensionContainer { { GTPTunnel-ExtIEs } } OPTIONAL, + ... +} + +GTPTunnel-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- H + +HandoverPreparationInformation ::= OCTET STRING + +HardwareLoadIndicator ::= SEQUENCE { + dLHardwareLoadIndicator INTEGER (0..100, ...), + uLHardwareLoadIndicator INTEGER (0..100, ...), + iE-Extensions ProtocolExtensionContainer { { HardwareLoadIndicator-ExtIEs } } OPTIONAL, + ... +} + +HardwareLoadIndicator-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +HSNASlotConfigList ::= SEQUENCE (SIZE(1..maxnoofHSNASlots)) OF HSNASlotConfigItem + +HSNASlotConfigItem ::= SEQUENCE { + hSNADownlink HSNADownlink OPTIONAL, + hSNAUplink HSNAUplink OPTIONAL, + hSNAFlexible HSNAFlexible OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { HSNASlotConfigItem-ExtIEs } } OPTIONAL +} + +HSNASlotConfigItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} +HSNADownlink ::= ENUMERATED { hard, soft, notavailable } + +HSNAFlexible ::= ENUMERATED { hard, soft, notavailable } + +HSNAUplink ::= ENUMERATED { hard, soft, notavailable } + +HSNATransmissionPeriodicity ::= ENUMERATED { ms0p5, ms0p625, ms1, ms1p25, ms2, ms2p5, ms5, ms10, ms20, ms40, ms80, ms160, ...} + +-- I + +IAB-Barred ::= ENUMERATED {barred, not-barred, ...} + +IAB-Info-IAB-donor-CU ::= SEQUENCE{ + iAB-STC-Info IAB-STC-Info OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { IAB-Info-IAB-donor-CU-ExtIEs } } OPTIONAL +} + +IAB-Info-IAB-donor-CU-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +IAB-Info-IAB-DU ::= SEQUENCE{ + multiplexingInfo MultiplexingInfo OPTIONAL, + iAB-STC-Info IAB-STC-Info OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { IAB-Info-IAB-DU-ExtIEs } } OPTIONAL +} + +IAB-Info-IAB-DU-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +IAB-MT-Cell-List ::= SEQUENCE (SIZE(1..maxnoofServingCells)) OF IAB-MT-Cell-List-Item + +IAB-MT-Cell-List-Item ::= SEQUENCE { + nRCellIdentity NRCellIdentity, + dU-RX-MT-RX DU-RX-MT-RX, + dU-TX-MT-TX DU-TX-MT-TX, + dU-RX-MT-TX DU-RX-MT-TX, + dU-TX-MT-RX DU-TX-MT-RX, + iE-Extensions ProtocolExtensionContainer { { IAB-MT-Cell-List-Item-ExtIEs } } OPTIONAL +} + +IAB-MT-Cell-List-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +IAB-STC-Info ::= SEQUENCE{ + iAB-STC-Info-List IAB-STC-Info-List, + iE-Extensions ProtocolExtensionContainer { { IAB-STC-Info-ExtIEs } } OPTIONAL +} + +IAB-STC-Info-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +IAB-STC-Info-List ::= SEQUENCE (SIZE(1..maxnoofIABSTCInfo)) OF IAB-STC-Info-Item + +IAB-STC-Info-Item::= SEQUENCE { + sSB-freqInfo SSB-freqInfo, + sSB-subcarrierSpacing SSB-subcarrierSpacing, + sSB-transmissionPeriodicity SSB-transmissionPeriodicity, + sSB-transmissionTimingOffset SSB-transmissionTimingOffset, + sSB-transmissionBitmap SSB-transmissionBitmap, + iE-Extensions ProtocolExtensionContainer { { IAB-STC-Info-Item-ExtIEs } } OPTIONAL +} + +IAB-STC-Info-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +IAB-Allocated-TNL-Address-Item ::= SEQUENCE { + iABTNLAddress IABTNLAddress, + iABTNLAddressUsage IABTNLAddressUsage OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { IAB-Allocated-TNL-Address-Item-ExtIEs } } OPTIONAL +} + +IAB-Allocated-TNL-Address-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +IAB-DU-Cell-Resource-Configuration-Mode-Info ::= CHOICE { + fDD IAB-DU-Cell-Resource-Configuration-FDD-Info, + tDD IAB-DU-Cell-Resource-Configuration-TDD-Info, + choice-extension ProtocolIE-SingleContainer { { IAB-DU-Cell-Resource-Configuration-Mode-Info-ExtIEs} } +} + +IAB-DU-Cell-Resource-Configuration-Mode-Info-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +IAB-DU-Cell-Resource-Configuration-FDD-Info ::= SEQUENCE { + gNB-DU-Cell-Resource-Configuration-FDD-UL GNB-DU-Cell-Resource-Configuration, + gNB-DU-Cell-Resource-Configuration-FDD-DL GNB-DU-Cell-Resource-Configuration, + iE-Extensions ProtocolExtensionContainer { {IAB-DU-Cell-Resource-Configuration-FDD-Info-ExtIEs} } OPTIONAL, + ... +} + +IAB-DU-Cell-Resource-Configuration-FDD-Info-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +IAB-DU-Cell-Resource-Configuration-TDD-Info ::= SEQUENCE { + gNB-DU-Cell-Resourc-Configuration-TDD GNB-DU-Cell-Resource-Configuration, + iE-Extensions ProtocolExtensionContainer { {IAB-DU-Cell-Resource-Configuration-TDD-Info-ExtIEs} } OPTIONAL, + ... +} + +IAB-DU-Cell-Resource-Configuration-TDD-Info-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +IABIPv6RequestType ::= CHOICE { + iPv6Address IABTNLAddressesRequested, + iPv6Prefix IABTNLAddressesRequested, + choice-extension ProtocolIE-SingleContainer { { IABIPv6RequestType-ExtIEs} } +} + +IABIPv6RequestType-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +IABTNLAddress ::= CHOICE { + iPv4Address BIT STRING (SIZE(32)), + iPv6Address BIT STRING (SIZE(128)), + iPv6Prefix BIT STRING (SIZE(64)), + choice-extension ProtocolIE-SingleContainer { { IABTNLAddress-ExtIEs} } +} + +IABTNLAddress-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +IABTNLAddressesRequested ::= SEQUENCE { + tNLAddressesOrPrefixesRequestedAllTraffic INTEGER (1..256) OPTIONAL, + tNLAddressesOrPrefixesRequestedF1-C INTEGER (1..256) OPTIONAL, + tNLAddressesOrPrefixesRequestedF1-U INTEGER (1..256) OPTIONAL, + tNLAddressesOrPrefixesRequestedNoNF1 INTEGER (1..256) OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { IABTNLAddressesRequested-ExtIEs } } OPTIONAL +} + +IABTNLAddressesRequested-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +IAB-TNL-Addresses-To-Remove-Item ::= SEQUENCE { + iABTNLAddress IABTNLAddress, + iE-Extensions ProtocolExtensionContainer { { IAB-TNL-Addresses-To-Remove-Item-ExtIEs} } OPTIONAL +} + +IAB-TNL-Addresses-To-Remove-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +IABTNLAddressUsage ::= ENUMERATED { + f1-c, + f1-u, + non-f1, + ... +} + + +IABv4AddressesRequested ::= SEQUENCE { + iABv4AddressesRequested IABTNLAddressesRequested, + iE-Extensions ProtocolExtensionContainer { { IABv4AddressesRequested-ExtIEs} } OPTIONAL +} + +IABv4AddressesRequested-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ImplicitFormat ::= SEQUENCE { + dUFSlotformatIndex DUFSlotformatIndex, + iE-Extensions ProtocolExtensionContainer { { ImplicitFormat-ExtIEs } } OPTIONAL +} + +ImplicitFormat-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +IgnorePRACHConfiguration::= ENUMERATED { true,...} + +IgnoreResourceCoordinationContainer ::= ENUMERATED { yes,...} +InactivityMonitoringRequest ::= ENUMERATED { true,...} +InactivityMonitoringResponse ::= ENUMERATED { not-supported,...} +InterfacesToTrace ::= BIT STRING (SIZE(8)) + +IntendedTDD-DL-ULConfig ::= SEQUENCE { + nRSCS ENUMERATED { scs15, scs30, scs60, scs120,...}, + nRCP ENUMERATED { normal, extended,...}, + nRDLULTxPeriodicity ENUMERATED { ms0p5, ms0p625, ms1, ms1p25, ms2, ms2p5, ms3, ms4, ms5, ms10, ms20, ms40, ms60, ms80, ms100, ms120, ms140, ms160, ...}, + slot-Configuration-List Slot-Configuration-List, + iE-Extensions ProtocolExtensionContainer { {IntendedTDD-DL-ULConfig-ExtIEs} } OPTIONAL +} + +IntendedTDD-DL-ULConfig-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +IPHeaderInformation ::= SEQUENCE { + destinationIABTNLAddress IABTNLAddress, + dsInformationList DSInformationList OPTIONAL, + iPv6FlowLabel BIT STRING (SIZE (20)) OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { IPHeaderInformation-ItemExtIEs} } OPTIONAL, + ... +} + +IPHeaderInformation-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +IPtolayer2TrafficMappingInfo ::= SEQUENCE { + iPtolayer2TrafficMappingInfoToAdd IPtolayer2TrafficMappingInfoList OPTIONAL, + iPtolayer2TrafficMappingInfoToRemove MappingInformationtoRemove OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { IPtolayer2TrafficMappingInfo-ItemExtIEs} } OPTIONAL, + ... +} + +IPtolayer2TrafficMappingInfoList ::= SEQUENCE (SIZE(1..maxnoofMappingEntries)) OF IPtolayer2TrafficMappingInfo-Item + +IPtolayer2TrafficMappingInfo-Item ::= SEQUENCE { + mappingInformationIndex MappingInformationIndex, + iPHeaderInformation IPHeaderInformation, + bHInfo BHInfo, iE-Extensions ProtocolExtensionContainer { { IPtolayer2TrafficMappingInfo-ItemExtIEs} } OPTIONAL, + ... +} + +IPtolayer2TrafficMappingInfo-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- J + +-- K + +-- L + +L139Info ::= SEQUENCE { + msg1SCS ENUMERATED {scs15, scs30, scs60, scs120, ...}, + rootSequenceIndex INTEGER (0..137) OPTIONAL, + iE-Extension ProtocolExtensionContainer { {L139Info-ExtIEs} } OPTIONAL, + ... +} + +L139Info-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +L839Info ::= SEQUENCE { + rootSequenceIndex INTEGER (0..837), + restrictedSetConfig ENUMERATED {unrestrictedSet, restrictedSetTypeA, + restrictedSetTypeB, ...}, + iE-Extension ProtocolExtensionContainer { {L839Info-ExtIEs} } OPTIONAL, + ... +} + +L839Info-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +LCID ::= INTEGER (1..32, ...) + + +LCStoGCSTranslationList ::= SEQUENCE (SIZE (1.. maxnooflcs-gcs-translation)) OF LCStoGCSTranslation + +LCStoGCSTranslation ::= SEQUENCE { + alpha INTEGER (0..359), + alpha-fine INTEGER (0..9), + beta INTEGER (0..359), + beta-fine INTEGER (0..9), + gamma INTEGER (0..359), + gamma-fine INTEGER (0..9), + iE-Extensions ProtocolExtensionContainer { {LCStoGCSTranslation-ExtIEs} } OPTIONAL +} + +LCStoGCSTranslation-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +LMF-MeasurementID ::= INTEGER (1.. 65536, ...) + +LMF-UE-MeasurementID ::= INTEGER (1.. 256, ...) + +LocationUncertainty ::= SEQUENCE { + horizontalUncertainty INTEGER (0..255), + horizontalConfidence INTEGER (0..100), + verticalUncertainty INTEGER (0..255), + verticalConfidence INTEGER (0..100), + iE-Extensions ProtocolExtensionContainer { { LocationUncertainty-ExtIEs} } OPTIONAL +} + +LocationUncertainty-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +LongDRXCycleLength ::= ENUMERATED +{ms10, ms20, ms32, ms40, ms60, ms64, ms70, ms80, ms128, ms160, ms256, ms320, ms512, ms640, ms1024, ms1280, ms2048, ms2560, ms5120, ms10240, ...} + +LowerLayerPresenceStatusChange ::= ENUMERATED { + suspend-lower-layers, + resume-lower-layers, + ... + +} + +LTEUESidelinkAggregateMaximumBitrate ::= SEQUENCE { + uELTESidelinkAggregateMaximumBitrate BitRate, + iE-Extensions ProtocolExtensionContainer { {LTEUESidelinkAggregateMaximumBitrate-ExtIEs} } OPTIONAL +} + +LTEUESidelinkAggregateMaximumBitrate-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +LTEV2XServicesAuthorized ::= SEQUENCE { + vehicleUE VehicleUE OPTIONAL, + pedestrianUE PedestrianUE OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {LTEV2XServicesAuthorized-ExtIEs} } OPTIONAL +} + +LTEV2XServicesAuthorized-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- M + +MappingInformationIndex ::= BIT STRING (SIZE (26)) + +MappingInformationtoRemove ::= SEQUENCE (SIZE(1..maxnoofMappingEntries)) OF MappingInformationIndex + +MaskedIMEISV ::= BIT STRING (SIZE (64)) + +MaxDataBurstVolume ::= INTEGER (0..4095, ..., 4096.. 2000000) +MaxPacketLossRate ::= INTEGER (0..1000) + +MIB-message ::= OCTET STRING + +MeasConfig ::= OCTET STRING + +MeasGapConfig ::= OCTET STRING + +MeasGapSharingConfig ::= OCTET STRING + +MeasurementBeamInfoRequest ::= ENUMERATED {true, ...} + +MeasurementBeamInfo ::= SEQUENCE { + pRS-Resource-ID PRS-Resource-ID OPTIONAL, + pRS-Resource-Set-ID PRS-Resource-Set-ID OPTIONAL, + sSB-Index SSB-Index OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { MeasurementBeamInfo-ExtIEs} } OPTIONAL +} + +MeasurementBeamInfo-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +MeasurementTimingConfiguration ::= OCTET STRING + +MessageIdentifier ::= BIT STRING (SIZE (16)) + +MultiplexingInfo ::= SEQUENCE{ + iAB-MT-Cell-List IAB-MT-Cell-List, + iE-Extensions ProtocolExtensionContainer { {MultiplexingInfo-ExtIEs} } OPTIONAL +} + +MultiplexingInfo-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +M2Configuration ::= ENUMERATED {true, ...} + + +M5Configuration ::= SEQUENCE { + m5period M5period, + m5-links-to-log M5-Links-to-log, + iE-Extensions ProtocolExtensionContainer { { M5Configuration-ExtIEs} } OPTIONAL, + ... +} + +M5Configuration-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +M5period ::= ENUMERATED { ms1024, ms2048, ms5120, ms10240, min1, ... } + +M5-Links-to-log ::= ENUMERATED {uplink, downlink, both-uplink-and-downlink, ...} + + +M6Configuration ::= SEQUENCE { + m6report-Interval M6report-Interval, + m6-links-to-log M6-Links-to-log, + iE-Extensions ProtocolExtensionContainer { { M6Configuration-ExtIEs} } OPTIONAL, + ... +} + +M6Configuration-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +M6report-Interval ::= ENUMERATED { ms120, ms240, ms640, ms1024, ms2048, ms5120, ms10240, ms20480, ms40960, min1, min6, min12, min30, ... } + + + +M6-Links-to-log ::= ENUMERATED {uplink, downlink, both-uplink-and-downlink, ...} + + +M7Configuration ::= SEQUENCE { + m7period M7period, + m7-links-to-log M7-Links-to-log, + iE-Extensions ProtocolExtensionContainer { { M7Configuration-ExtIEs} } OPTIONAL, + ... +} + +M7Configuration-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +M7period ::= INTEGER(1..60, ...) + +M7-Links-to-log ::= ENUMERATED {downlink, ...} + +MDT-Activation ::= ENUMERATED { + immediate-MDT-only, + immediate-MDT-and-Trace, + ... +} + +MDTConfiguration ::= SEQUENCE { + mdt-Activation MDT-Activation, + measurementsToActivate MeasurementsToActivate, + m2Configuration M2Configuration OPTIONAL, + -- C-ifM2: This IE shall be present if the Measurements to Activate IE has the second bit set to "1". + m5Configuration M5Configuration OPTIONAL, + -- C-ifM5: This IE shall be present if the Measurements to Activate IE has the fifth bit set to "1". + m6Configuration M6Configuration OPTIONAL, + -- C-ifM6: This IE shall be present if the Measurements to Activate IE has the seventh bit set to "1". + m7Configuration M7Configuration OPTIONAL, + -- C-ifM7: This IE shall be present if the Measurements to Activate IE has the eighth bit set to "1". + iE-Extensions ProtocolExtensionContainer { { MDTConfiguration-ExtIEs} } OPTIONAL, + ... +} +MDTConfiguration-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +MDTPLMNList ::= SEQUENCE (SIZE(1..maxnoofMDTPLMNs)) OF PLMN-Identity + + +MeasuredResultsValue ::= CHOICE { + uL-AngleOfArrival UL-AoA, + uL-SRS-RSRP UL-SRS-RSRP, + uL-RTOA UL-RTOA-Measurement, + gNB-RxTxTimeDiff GNB-RxTxTimeDiff, + choice-extension ProtocolIE-SingleContainer { { MeasuredResultsValue-ExtIEs } } +} + +MeasuredResultsValue-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +MeasurementsToActivate ::= BIT STRING (SIZE (8)) + +-- N + +NeedforGap::= ENUMERATED {true, ...} + +Neighbour-Cell-Information-Item ::= SEQUENCE { + nRCGI NRCGI, + intendedTDD-DL-ULConfig IntendedTDD-DL-ULConfig OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { Neighbour-Cell-Information-ItemExtIEs } } OPTIONAL +} + +Neighbour-Cell-Information-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +NGRANAllocationAndRetentionPriority ::= SEQUENCE { + priorityLevel PriorityLevel, + pre-emptionCapability Pre-emptionCapability, + pre-emptionVulnerability Pre-emptionVulnerability, + iE-Extensions ProtocolExtensionContainer { {NGRANAllocationAndRetentionPriority-ExtIEs} } OPTIONAL +} + +NGRANAllocationAndRetentionPriority-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +NGRANHighAccuracyAccessPointPosition ::= SEQUENCE { + latitude INTEGER (-2147483648.. 2147483647), + longitude INTEGER (-2147483648.. 2147483647), + altitude INTEGER (-64000..1280000), + uncertaintySemi-major INTEGER (0..255), + uncertaintySemi-minor INTEGER (0..255), + orientationOfMajorAxis INTEGER (0..179), + horizontalConfidence INTEGER (0..100), + uncertaintyAltitude INTEGER (0..255), + verticalConfidence INTEGER (0..100), + + iE-Extensions ProtocolExtensionContainer { { NGRANHighAccuracyAccessPointPosition-ExtIEs} } OPTIONAL +} + +NGRANHighAccuracyAccessPointPosition-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +NID ::= BIT STRING (SIZE(44)) + +NR-CGI-List-For-Restart-Item ::= SEQUENCE { + nRCGI NRCGI, + iE-Extensions ProtocolExtensionContainer { { NR-CGI-List-For-Restart-ItemExtIEs } } OPTIONAL, + ... +} + +NR-CGI-List-For-Restart-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +NR-PRSBeamInformation ::= SEQUENCE { + nR-PRSBeamInformationList NR-PRSBeamInformationList, + lCStoGCSTranslationList LCStoGCSTranslationList, + iE-Extensions ProtocolExtensionContainer { { NR-PRSBeamInformation-ExtIEs } } OPTIONAL +} + +NR-PRSBeamInformation-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +NR-PRSBeamInformationList ::= SEQUENCE (SIZE(1.. maxnoofPRS-ResourceSets)) OF NR-PRSBeamInformationItem + +NR-PRSBeamInformationItem ::= SEQUENCE { + pRSResourceSetID INTEGER (0..7), + pRSAngleList PRSAngleList, + iE-Extensions ProtocolExtensionContainer { { NR-PRSBeamInformationItem-ExtIEs } } OPTIONAL +} + +NR-PRSBeamInformationItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +NonDynamic5QIDescriptor ::= SEQUENCE { + fiveQI INTEGER (0..255, ...), + qoSPriorityLevel INTEGER (1..127) OPTIONAL, + averagingWindow AveragingWindow OPTIONAL, + maxDataBurstVolume MaxDataBurstVolume OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { NonDynamic5QIDescriptor-ExtIEs } } OPTIONAL +} + +NonDynamic5QIDescriptor-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-CNPacketDelayBudgetDownlink CRITICALITY ignore EXTENSION ExtendedPacketDelayBudget PRESENCE optional }| + { ID id-CNPacketDelayBudgetUplink CRITICALITY ignore EXTENSION ExtendedPacketDelayBudget PRESENCE optional }, + ... +} + +NonDynamicPQIDescriptor ::= SEQUENCE { + fiveQI INTEGER (0..255, ...), + qoSPriorityLevel INTEGER (1..8, ...) OPTIONAL, + averagingWindow AveragingWindow OPTIONAL, + maxDataBurstVolume MaxDataBurstVolume OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { NonDynamicPQIDescriptor-ExtIEs } } OPTIONAL +} + +NonDynamicPQIDescriptor-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +NonUPTrafficType ::= ENUMERATED {ue-associated, non-ue-associated, non-f1, bap-control-pdu,...} + +NoofDownlinkSymbols ::= INTEGER (0..14) + +NoofUplinkSymbols ::= INTEGER (0..14) + +Notification-Cause ::= ENUMERATED {fulfilled, not-fulfilled, ...} + +NotificationControl ::= ENUMERATED {active, not-active, ...} + +NotificationInformation ::= SEQUENCE { + message-Identifier MessageIdentifier, + serialNumber SerialNumber, + iE-Extensions ProtocolExtensionContainer { { NotificationInformationExtIEs} } OPTIONAL, + ... +} + +NotificationInformationExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +NPNBroadcastInformation ::= CHOICE { + sNPN-Broadcast-Information NPN-Broadcast-Information-SNPN, + pNI-NPN-Broadcast-Information NPN-Broadcast-Information-PNI-NPN, + choice-extension ProtocolIE-SingleContainer { {NPNBroadcastInformation-ExtIEs} } +} + +NPNBroadcastInformation-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +NPN-Broadcast-Information-SNPN ::= SEQUENCE { + broadcastSNPNID-List BroadcastSNPN-ID-List, + iE-Extension ProtocolExtensionContainer { {NPN-Broadcast-Information-SNPN-ExtIEs} } OPTIONAL, + ... +} + +NPN-Broadcast-Information-SNPN-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} +NPN-Broadcast-Information-PNI-NPN ::= SEQUENCE { + broadcastPNI-NPN-ID-Information BroadcastPNI-NPN-ID-List, + iE-Extension ProtocolExtensionContainer { {NPN-Broadcast-Information-PNI-NPN-ExtIEs} } OPTIONAL, + ... +} + +NPN-Broadcast-Information-PNI-NPN-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +NPNSupportInfo ::= CHOICE { + sNPN-Information NID, + choice-extension ProtocolIE-SingleContainer { { NPNSupportInfo-ExtIEs } } +} + +NPNSupportInfo-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +NRCarrierList ::= SEQUENCE (SIZE(1..maxnoofNRSCSs)) OF NRCarrierItem + +NRCarrierItem ::= SEQUENCE { + carrierSCS NRSCS, + offsetToCarrier INTEGER (0..2199, ...), + carrierBandwidth INTEGER (0..maxnoofPhysicalResourceBlocks, ...), + iE-Extension ProtocolExtensionContainer { {NRCarrierItem-ExtIEs} } OPTIONAL, + ... +} + +NRCarrierItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +NRFreqInfo ::= SEQUENCE { + nRARFCN INTEGER (0..maxNRARFCN), + sul-Information SUL-Information OPTIONAL, + freqBandListNr SEQUENCE (SIZE(1..maxnoofNrCellBands)) OF FreqBandNrItem, + iE-Extensions ProtocolExtensionContainer { { NRFreqInfoExtIEs} } OPTIONAL, + ... +} + +NRFreqInfoExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-FrequencyShift7p5khz CRITICALITY ignore EXTENSION FrequencyShift7p5khz PRESENCE optional }, + ... +} + +NRCGI ::= SEQUENCE { + pLMN-Identity PLMN-Identity, + nRCellIdentity NRCellIdentity, + iE-Extensions ProtocolExtensionContainer { {NRCGI-ExtIEs} } OPTIONAL, + ... +} + +NRCGI-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +NR-Mode-Info ::= CHOICE { + fDD FDD-Info, + tDD TDD-Info, + choice-extension ProtocolIE-SingleContainer { { NR-Mode-Info-ExtIEs} } +} + +NR-Mode-Info-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + + + +NRPRACHConfig ::= SEQUENCE { + ulPRACHConfigList NRPRACHConfigList OPTIONAL, + sulPRACHConfigList NRPRACHConfigList OPTIONAL, + iE-Extension ProtocolExtensionContainer { {NRPRACHConfig-ExtIEs} } OPTIONAL, + ... +} + +NRPRACHConfig-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +NRCellIdentity ::= BIT STRING (SIZE(36)) + +NRNRB ::= ENUMERATED { nrb11, nrb18, nrb24, nrb25, nrb31, nrb32, nrb38, nrb51, nrb52, nrb65, nrb66, nrb78, nrb79, nrb93, nrb106, nrb107, nrb121, nrb132, nrb133, nrb135, nrb160, nrb162, nrb189, nrb216, nrb217, nrb245, nrb264, nrb270, nrb273, ...} + +NRPCI ::= INTEGER(0..1007) + + +NRPRACHConfigList ::= SEQUENCE (SIZE(0..maxnoofPRACHconfigs)) OF NRPRACHConfigItem + +NRPRACHConfigItem ::= SEQUENCE { + nRSCS NRSCS, + prachFreqStartfromCarrier INTEGER (0..maxnoofPhysicalResourceBlocks-1, ...), + msg1FDM ENUMERATED {one, two, four, eight, ...}, + parchConfigIndex INTEGER (0..255, ...), + ssb-perRACH-Occasion ENUMERATED {oneEighth, oneFourth, oneHalf, one, + two, four, eight, sixteen, ...}, + freqDomainLength FreqDomainLength, + zeroCorrelZoneConfig INTEGER (0..15), + iE-Extension ProtocolExtensionContainer { { NRPRACHConfigItem-ExtIEs} } OPTIONAL, + ... +} + +NRPRACHConfigItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +NRSCS ::= ENUMERATED { scs15, scs30, scs60, scs120, ...} + +NRUERLFReportContainer ::= OCTET STRING + +NumberofActiveUEs ::= INTEGER(0..16777215, ...) + +NumberOfBroadcasts ::= INTEGER (0..65535) + +NumberofBroadcastRequest ::= INTEGER (0..65535) + +NumDLULSymbols ::= SEQUENCE { + numDLSymbols INTEGER (0..13, ...), + numULSymbols INTEGER (0..13, ...), + iE-Extensions ProtocolExtensionContainer { { NumDLULSymbols-ExtIEs} } OPTIONAL +} + +NumDLULSymbols-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +NRV2XServicesAuthorized ::= SEQUENCE { + vehicleUE VehicleUE OPTIONAL, + pedestrianUE PedestrianUE OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {NRV2XServicesAuthorized-ExtIEs} } OPTIONAL +} + +NRV2XServicesAuthorized-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +NRUESidelinkAggregateMaximumBitrate ::= SEQUENCE { + uENRSidelinkAggregateMaximumBitrate BitRate, + iE-Extensions ProtocolExtensionContainer { {NRUESidelinkAggregateMaximumBitrate-ExtIEs} } OPTIONAL +} + +NRUESidelinkAggregateMaximumBitrate-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +NZP-CSI-RS-ResourceID::= INTEGER (0..191, ...) + + +-- O + +OffsetToPointA ::= INTEGER (0..2199,...) + + +-- P + +PacketDelayBudget ::= INTEGER (0..1023, ...) + +PacketErrorRate ::= SEQUENCE { + pER-Scalar PER-Scalar, + pER-Exponent PER-Exponent, + iE-Extensions ProtocolExtensionContainer { {PacketErrorRate-ExtIEs} } OPTIONAL, + ... +} + +PacketErrorRate-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PER-Scalar ::= INTEGER (0..9, ...) +PER-Exponent ::= INTEGER (0..9, ...) + +PagingCell-Item ::= SEQUENCE { + nRCGI NRCGI , + iE-Extensions ProtocolExtensionContainer { { PagingCell-ItemExtIEs } } OPTIONAL +} + +PagingCell-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PagingDRX ::= ENUMERATED { + v32, + v64, + v128, + v256, + ... +} + +PagingIdentity ::= CHOICE { + rANUEPagingIdentity RANUEPagingIdentity, + cNUEPagingIdentity CNUEPagingIdentity, + choice-extension ProtocolIE-SingleContainer { { PagingIdentity-ExtIEs } } +} + +PagingIdentity-ExtIEs F1AP-PROTOCOL-IES::= { + ... +} + +PagingOrigin ::= ENUMERATED { non-3gpp, ...} + +PagingPriority ::= ENUMERATED { priolevel1, priolevel2, priolevel3, priolevel4, priolevel5, priolevel6, priolevel7, priolevel8,...} + + +RelativePathDelay ::= CHOICE { + k0 INTEGER (0..16351,...), + k1 INTEGER (0..8176,...), + k2 INTEGER (0..4088,...), + k3 INTEGER (0..2044,...), + k4 INTEGER (0..1022,...), + k5 INTEGER (0..511,...), + choice-extension ProtocolIE-SingleContainer { { RelativePathDelay-ExtIEs } } +} + +RelativePathDelay-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +PathlossReferenceInfo ::= SEQUENCE { + pathlossReferenceSignal PathlossReferenceSignal, + iE-Extensions ProtocolExtensionContainer { {PathlossReferenceInfo-ExtIEs} } OPTIONAL +} + +PathlossReferenceInfo-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PathlossReferenceSignal ::= CHOICE { + sSB SSB, + dL-PRS DL-PRS, + choice-extension ProtocolIE-SingleContainer {{PathlossReferenceSignal-ExtIEs }} +} + +PathlossReferenceSignal-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +PC5QoSFlowIdentifier ::= INTEGER (1..2048) + +PC5-QoS-Characteristics ::= CHOICE { + non-Dynamic-PQI NonDynamicPQIDescriptor, + dynamic-PQI DynamicPQIDescriptor, + choice-extension ProtocolIE-SingleContainer { { PC5-QoS-Characteristics-ExtIEs } } +} + +PC5-QoS-Characteristics-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + + +PC5QoSParameters ::= SEQUENCE { + pC5-QoS-Characteristics PC5-QoS-Characteristics, + pC5-QoS-Flow-Bit-Rates PC5FlowBitRates OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { PC5QoSParameters-ExtIEs } } OPTIONAL, + ... +} + +PC5QoSParameters-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PC5FlowBitRates ::= SEQUENCE { + guaranteedFlowBitRate BitRate, + maximumFlowBitRate BitRate, + iE-Extensions ProtocolExtensionContainer { { PC5FlowBitRates-ExtIEs } } OPTIONAL, + ... +} + +PC5FlowBitRates-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PDCCH-BlindDetectionSCG ::= OCTET STRING + +PDCP-SN ::= INTEGER (0..4095) + +PDCPSNLength ::= ENUMERATED { twelve-bits,eighteen-bits,...} + +PDUSessionID ::= INTEGER (0..255) + +ReportingPeriodicityValue ::= INTEGER (0..512, ...) + +Periodicity ::= INTEGER (0..640000, ...) + +PeriodicitySRS ::= ENUMERATED { ms0p125, ms0p25, ms0p5, ms0p625, ms1, ms1p25, ms2, ms2p5, ms4, ms5, ms8, ms10, ms16, ms20, ms32, ms40, ms64, ms80, ms160, ms320, ms640, ms1280, ms2560, ms5120, ms10240, ...} + +PeriodicityList ::= SEQUENCE (SIZE(1.. maxnoSRS-ResourcePerSet)) OF PeriodicityList-Item + +PeriodicityList-Item ::= SEQUENCE { + periodicitySRS PeriodicitySRS, + iE-Extensions ProtocolExtensionContainer { { PeriodicityList-ItemExtIEs} } OPTIONAL +} + +PeriodicityList-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +Permutation ::= ENUMERATED {dfu, ufd, ...} + +Ph-InfoMCG ::= OCTET STRING + +Ph-InfoSCG ::= OCTET STRING + +PLMN-Identity ::= OCTET STRING (SIZE(3)) + +PortNumber ::= BIT STRING (SIZE (16)) + + +PosAssistance-Information ::= OCTET STRING + +PosAssistanceInformationFailureList ::= OCTET STRING + +PosBroadcast ::= ENUMERATED { + start, + stop, + ... +} + +PositioningBroadcastCells ::= SEQUENCE (SIZE (1..maxnoBcastCell)) OF NRCGI + +PosMeasurementPeriodicity ::= ENUMERATED +{ms120, ms240, ms480, ms640, ms1024, ms2048, ms5120, ms10240, min1, min6, min12, min30, min60, ...} + + +PosMeasurementQuantities ::= SEQUENCE (SIZE(1.. maxnoofPosMeas)) OF PosMeasurementQuantities-Item + +PosMeasurementQuantities-Item ::= SEQUENCE { + posMeasurementType PosMeasurementType, + timingReportingGranularityFactor INTEGER (0..5) OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { PosMeasurementQuantities-ItemExtIEs} } OPTIONAL +} + +PosMeasurementQuantities-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PosMeasurementResult ::= SEQUENCE (SIZE (1.. maxnoofPosMeas)) OF PosMeasurementResultItem + +PosMeasurementResultItem ::= SEQUENCE { + measuredResultsValue MeasuredResultsValue, + timeStamp TimeStamp, + measurementQuality TRPMeasurementQuality OPTIONAL, + measurementBeamInfo MeasurementBeamInfo OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { PosMeasurementResultItemExtIEs } } OPTIONAL +} + +PosMeasurementResultItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PosMeasurementResultList ::= SEQUENCE (SIZE(1.. maxNoOfMeasTRPs)) OF PosMeasurementResultList-Item + +PosMeasurementResultList-Item ::= SEQUENCE { + posMeasurementResult PosMeasurementResult, + tRPID TRPID, + iE-Extensions ProtocolExtensionContainer { { PosMeasurementResultList-ItemExtIEs} } OPTIONAL +} + +PosMeasurementResultList-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PosMeasurementType ::= ENUMERATED { + gnb-rx-tx, + ul-srs-rsrp, + ul-aoa, + ul-rtoa, + ... +} + +PosReportCharacteristics ::= ENUMERATED { + ondemand, + periodic, + ... +} + +PosResourceSetType ::= CHOICE { + periodic PosResourceSetTypePR, + semi-persistent PosResourceSetTypeSP, + aperiodic PosResourceSetTypeAP, + choice-extension ProtocolIE-SingleContainer {{ PosResourceSetType-ExtIEs }} +} + +PosResourceSetType-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +PosResourceSetTypePR ::= SEQUENCE { + posperiodicSet ENUMERATED{true, ...}, + iE-Extensions ProtocolExtensionContainer { { PosResourceSetTypePR-ExtIEs} } OPTIONAL +} + +PosResourceSetTypePR-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PosResourceSetTypeSP ::= SEQUENCE { + possemi-persistentSet ENUMERATED{true, ...}, + iE-Extensions ProtocolExtensionContainer { { PosResourceSetTypeSP-ExtIEs} } OPTIONAL +} + +PosResourceSetTypeSP-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PosResourceSetTypeAP ::= SEQUENCE { + sRSResourceTrigger-List INTEGER(1..3), + iE-Extensions ProtocolExtensionContainer { { PosResourceSetTypeAP-ExtIEs} } OPTIONAL +} + +PosResourceSetTypeAP-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PosSRSResourceID-List ::= SEQUENCE (SIZE (1..maxnoSRS-PosResourcePerSet)) OF SRSPosResourceID + +PosSRSResource-Item ::= SEQUENCE { + srs-PosResourceId SRSPosResourceID, + transmissionCombPos TransmissionCombPos, + startPosition INTEGER (0..13), + nrofSymbols ENUMERATED {n1, n2, n4, n8, n12}, + freqDomainShift INTEGER (0..268), + c-SRS INTEGER (0..63), + groupOrSequenceHopping ENUMERATED { neither, groupHopping, sequenceHopping }, + resourceTypePos ResourceTypePos, + sequenceId INTEGER (0.. 65535), + spatialRelationPos SpatialRelationPos OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { PosSRSResource-Item-ExtIEs} } OPTIONAL +} + +PosSRSResource-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PosSRSResource-List ::= SEQUENCE (SIZE (1..maxnoSRS-PosResources)) OF PosSRSResource-Item + +PosSRSResourceSet-Item ::= SEQUENCE { + possrsResourceSetID INTEGER(0..15), + possRSResourceID-List PosSRSResourceID-List, + posresourceSetType PosResourceSetType, + iE-Extensions ProtocolExtensionContainer { { PosSRSResourceSet-Item-ExtIEs} } OPTIONAL +} + +PosSRSResourceSet-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PosSRSResourceSet-List ::= SEQUENCE (SIZE (1..maxnoSRS-PosResourceSets)) OF PosSRSResourceSet-Item + +PrimaryPathIndication ::= ENUMERATED { + true, + false, + ... +} + +Pre-emptionCapability ::= ENUMERATED { + shall-not-trigger-pre-emption, + may-trigger-pre-emption +} + +Pre-emptionVulnerability ::= ENUMERATED { + not-pre-emptable, + pre-emptable +} + +PriorityLevel ::= INTEGER { spare (0), highest (1), lowest (14), no-priority (15) } (0..15) + +ProtectedEUTRAResourceIndication ::= OCTET STRING + +Protected-EUTRA-Resources-Item ::= SEQUENCE { + spectrumSharingGroupID SpectrumSharingGroupID, + eUTRACells-List EUTRACells-List, + iE-Extensions ProtocolExtensionContainer { { Protected-EUTRA-Resources-ItemExtIEs } } OPTIONAL +} + +Protected-EUTRA-Resources-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PRSConfiguration ::= SEQUENCE { + pRSResourceSet-List PRSResourceSet-List, + iE-Extensions ProtocolExtensionContainer { { PRSConfiguration-ExtIEs } } OPTIONAL +} + +PRSConfiguration-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PRSInformationPos ::= SEQUENCE { + pRS-IDPos INTEGER(0..255) OPTIONAL, + pRS-Resource-Set-IDPos INTEGER(0..7), + pRS-Resource-IDPos INTEGER(0..63), + iE-Extensions ProtocolExtensionContainer { { PRSInformationPos-ExtIEs} } OPTIONAL +} + +PRSInformationPos-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Potential-SpCell-Item ::= SEQUENCE { + potential-SpCell-ID NRCGI , + iE-Extensions ProtocolExtensionContainer { { Potential-SpCell-ItemExtIEs } } OPTIONAL, + ... +} + +Potential-SpCell-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +PRSAngleList ::= SEQUENCE (SIZE(1.. maxnoofPRS-ResourcesPerSet)) OF PRSAngleItem + +PRSAngleItem ::= SEQUENCE { + nR-PRS-Azimuth INTEGER (0..359), + nR-PRS-Azimuth-fine INTEGER (0..9), + nR-PRS-Elevation INTEGER (0..180), + nR-PRS-Elevation-fine INTEGER (0..9), + iE-Extensions ProtocolExtensionContainer { { PRSAngleItem-ItemExtIEs } } OPTIONAL +} + +PRSAngleItem-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PRSMuting::= SEQUENCE { + pRSMutingOption1 PRSMutingOption1, + pRSMutingOption2 PRSMutingOption2, + iE-Extensions ProtocolExtensionContainer { { PRSMuting-ExtIEs} } OPTIONAL +} + +PRSMuting-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PRSMutingOption1 ::= SEQUENCE { + mutingPattern DL-PRSMutingPattern, + mutingBitRepetitionFactor ENUMERATED{rf1,rf2,rf4,rf8,...}, + iE-Extensions ProtocolExtensionContainer { { PRSMutingOption1-ExtIEs} } OPTIONAL +} + +PRSMutingOption1-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PRSMutingOption2 ::= SEQUENCE { + mutingPattern DL-PRSMutingPattern, + iE-Extensions ProtocolExtensionContainer { { PRSMutingOption2-ExtIEs} } OPTIONAL +} + +PRSMutingOption2-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PRS-Resource-ID ::= INTEGER (0..63) + +PRSResource-List::= SEQUENCE (SIZE (1..maxnoofPRSresources)) OF PRSResource-Item + +PRSResource-Item ::= SEQUENCE { + pRSResourceID INTEGER(0..63), + sequenceID INTEGER(0..4095,...), + rEOffset INTEGER(0..11), + resourceSlotOffset INTEGER(0..511,...), + resourceSymbolOffset INTEGER(0..12,...), + qCLInfo PRSResource-QCLInfo OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { PRSResource-Item-ExtIEs} } OPTIONAL +} + +PRSResource-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PRSResource-QCLInfo ::= SEQUENCE { + qCLSourceSSBIndex INTEGER(0..63) OPTIONAL, + qCLSourcePRSInfo PRSResource-QCLSourcePRSInfo OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { PRSResource-QCLInfo-ExtIEs} } OPTIONAL, + ... +} +PRSResource-QCLInfo-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PRSResource-QCLSourcePRSInfo ::= SEQUENCE { + qCLSourcePRSResourceSetID INTEGER(0..7), + qCLSourcePRSResourceID INTEGER(0..63) OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { PRSResource-QCLSourcePRSInfo-ExtIEs} } OPTIONAL +} + +PRSResource-QCLSourcePRSInfo-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PRS-Resource-Set-ID ::= INTEGER(0..7) + +PRSResourceSet-List ::= SEQUENCE (SIZE (1.. maxnoofPRSresourceSets)) OF PRSResourceSet-Item +PRSResourceSet-Item ::= SEQUENCE { + pRSResourceSetID PRS-Resource-Set-ID, + subcarrierSpacing ENUMERATED{kHz15, kHz30, kHz60, kHz120, ...}, + pRSbandwidth INTEGER(1..63), + startPRB INTEGER(0..2176), + pointA INTEGER (0..3279165), + combSize ENUMERATED{n2, n4, n6, n12, ...}, + cPType ENUMERATED{normal, extended, ...}, + resourceSetPeriodicity ENUMERATED{n4,n5,n8,n10,n16,n20,n32,n40,n64,n80,n160,n320,n640,n1280,n2560,n5120,n10240,n20480,n40960, n81920,...}, + resourceSetSlotOffset INTEGER(0..81919,...), + resourceRepetitionFactor ENUMERATED{rf1,rf2,rf4,rf6,rf8,rf16,rf32,...}, + resourceTimeGap ENUMERATED{tg1,tg2,tg4,tg8,tg16,tg32,...}, + resourceNumberofSymbols ENUMERATED{n2,n4,n6,n12,...}, + pRSMuting PRSMuting OPTIONAL, + pRSResourceTransmitPower INTEGER(-60..50), + pRSResource-List PRSResource-List, + iE-Extensions ProtocolExtensionContainer { { PRSResourceSet-Item-ExtIEs} } OPTIONAL +} + +PRSResourceSet-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PWS-Failed-NR-CGI-Item ::= SEQUENCE { + nRCGI NRCGI, + numberOfBroadcasts NumberOfBroadcasts, + iE-Extensions ProtocolExtensionContainer { { PWS-Failed-NR-CGI-ItemExtIEs } } OPTIONAL, + ... +} + +PWS-Failed-NR-CGI-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +PWSSystemInformation ::= SEQUENCE { + sIBtype SIBType-PWS, + sIBmessage OCTET STRING, + iE-Extensions ProtocolExtensionContainer { { PWSSystemInformationExtIEs } } OPTIONAL, + ... +} + +PWSSystemInformationExtIEs F1AP-PROTOCOL-EXTENSION ::= { + {ID id-NotificationInformation CRITICALITY ignore EXTENSION NotificationInformation PRESENCE optional}| + { ID id-AdditionalSIBMessageList CRITICALITY reject EXTENSION AdditionalSIBMessageList PRESENCE optional}, + ... +} + +PrivacyIndicator ::= ENUMERATED {immediate-MDT, logged-MDT, ...} + +-- Q + +QCI ::= INTEGER (0..255) + +QoS-Characteristics ::= CHOICE { + non-Dynamic-5QI NonDynamic5QIDescriptor, + dynamic-5QI Dynamic5QIDescriptor, + choice-extension ProtocolIE-SingleContainer { { QoS-Characteristics-ExtIEs } } +} + +QoS-Characteristics-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +QoSFlowIdentifier ::= INTEGER (0..63) + +QoSFlowLevelQoSParameters ::= SEQUENCE { + qoS-Characteristics QoS-Characteristics, + nGRANallocationRetentionPriority NGRANAllocationAndRetentionPriority, + gBR-QoS-Flow-Information GBR-QoSFlowInformation OPTIONAL, + reflective-QoS-Attribute ENUMERATED {subject-to, ...} OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { QoSFlowLevelQoSParameters-ExtIEs } } OPTIONAL +} + +QoSFlowLevelQoSParameters-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-PDUSessionID CRITICALITY ignore EXTENSION PDUSessionID PRESENCE optional}| + { ID id-ULPDUSessionAggregateMaximumBitRate CRITICALITY ignore EXTENSION BitRate PRESENCE optional}| + { ID id-QosMonitoringRequest CRITICALITY ignore EXTENSION QosMonitoringRequest PRESENCE optional}, + ... +} + +QoSFlowMappingIndication ::= ENUMERATED {ul,dl,...} + +QoSInformation ::= CHOICE { + eUTRANQoS EUTRANQoS, + choice-extension ProtocolIE-SingleContainer { { QoSInformation-ExtIEs} } +} + +QoSInformation-ExtIEs F1AP-PROTOCOL-IES ::= { + { ID id-DRB-Information CRITICALITY ignore TYPE DRB-Information PRESENCE mandatory}, + ... +} + +QosMonitoringRequest ::= ENUMERATED {ul, dl, both, ...} + +QoSParaSetIndex ::= INTEGER (1..8, ...) + +QoSParaSetNotifyIndex ::= INTEGER (0..8, ...) + +-- R + +RACH-Config-Common ::= OCTET STRING + +RACH-Config-Common-IAB ::= OCTET STRING + +RACHReportContainer::= OCTET STRING + +RACHReportInformationList ::= SEQUENCE (SIZE(1.. maxnoofRACHReports)) OF RACHReportInformationItem + +RACHReportInformationItem ::= SEQUENCE { + rACHReportContainer RACHReportContainer, + uEAssitantIdentifier GNB-DU-UE-F1AP-ID OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { RACHReportInformationItem-ExtIEs} } OPTIONAL, + ... +} + +RACHReportInformationItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + + +RadioResourceStatus ::= SEQUENCE { + sSBAreaRadioResourceStatusList SSBAreaRadioResourceStatusList, + iE-Extensions ProtocolExtensionContainer { { RadioResourceStatus-ExtIEs} } OPTIONAL +} + +RadioResourceStatus-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +RANAC ::= INTEGER (0..255) + +RAN-MeasurementID ::= INTEGER (1.. 65536, ...) + +RAN-UE-MeasurementID ::= INTEGER (1.. 256, ...) + +RANUEID ::= OCTET STRING (SIZE (8)) + +RANUEPagingIdentity ::= SEQUENCE { + iRNTI BIT STRING (SIZE(40)), + iE-Extensions ProtocolExtensionContainer { { RANUEPagingIdentity-ExtIEs } } OPTIONAL} + +RANUEPagingIdentity-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +RAT-FrequencyPriorityInformation::= CHOICE { + eNDC SubscriberProfileIDforRFP, + nGRAN RAT-FrequencySelectionPriority, + choice-extension ProtocolIE-SingleContainer { { RAT-FrequencyPriorityInformation-ExtIEs} } +} + +RAT-FrequencyPriorityInformation-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +RAT-FrequencySelectionPriority::= INTEGER (1.. 256, ...) + +Reestablishment-Indication ::= ENUMERATED { + reestablished, + ... +} + +ReferencePoint ::= CHOICE { + coordinateID CoordinateID, + referencePointCoordinate AccessPointPosition, + referencePointCoordinateHA NGRANHighAccuracyAccessPointPosition, + choice-Extension ProtocolIE-SingleContainer { { ReferencePoint-ExtIEs} } +} + +ReferencePoint-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +ReferenceSFN ::= INTEGER (0..1023) + +ReferenceSignal ::= CHOICE { + nZP-CSI-RS NZP-CSI-RS-ResourceID, + sSB SSB, + sRS SRSResourceID, + positioningSRS SRSPosResourceID, + dL-PRS DL-PRS, + choice-extension ProtocolIE-SingleContainer {{ReferenceSignal-ExtIEs }} +} + +ReferenceSignal-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +RelativeCartesianLocation ::= SEQUENCE { + xYZunit ENUMERATED {mm, cm, dm, ...}, + xvalue INTEGER (-65536..65535), + yvalue INTEGER (-65536..65535), + zvalue INTEGER (-32768..32767), + locationUncertainty LocationUncertainty, + iE-Extensions ProtocolExtensionContainer { { RelativeCartesianLocation-ExtIEs} } OPTIONAL +} + +RelativeCartesianLocation-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +RelativeGeodeticLocation ::= SEQUENCE { + milli-Arc-SecondUnits ENUMERATED {zerodot03, zerodot3, three, ...}, + heightUnits ENUMERATED {mm, cm, m, ...}, + deltaLatitude INTEGER (-1024.. 1023), + deltaLongitude INTEGER (-1024.. 1023), + deltaHeight INTEGER (-1024.. 1023), + locationUncertainty LocationUncertainty, + iE-extensions ProtocolExtensionContainer {{RelativeGeodeticLocation-ExtIEs }} OPTIONAL +} + +RelativeGeodeticLocation-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ReferenceTime ::= OCTET STRING + +RegistrationRequest ::= ENUMERATED{start, stop, add, ...} + +ReportCharacteristics ::= BIT STRING (SIZE(32)) + +ReportingPeriodicity ::= ENUMERATED{ms500, ms1000, ms2000, ms5000, ms10000, ...} + +RequestedBandCombinationIndex ::= OCTET STRING + +RequestedFeatureSetEntryIndex ::= OCTET STRING + +RequestedP-MaxFR2 ::= OCTET STRING + +Requested-PDCCH-BlindDetectionSCG ::= OCTET STRING + + +RequestedSRSTransmissionCharacteristics ::= SEQUENCE { + numberOfTransmissions INTEGER (0..500, ...) OPTIONAL, + resourceType ENUMERATED {periodic, semi-persistent, aperiodic,...}, + bandwidthSRS BandwidthSRS, + sRSResourceSetList SRSResourceSetList OPTIONAL, + sSBInformation SSBInformation OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { RequestedSRSTransmissionCharacteristics-ExtIEs} } OPTIONAL +} + +RequestedSRSTransmissionCharacteristics-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +RequestType ::= ENUMERATED {offer, execution, ...} + +ResourceCoordinationEUTRACellInfo ::= SEQUENCE { + eUTRA-Mode-Info EUTRA-Coex-Mode-Info, + eUTRA-PRACH-Configuration EUTRA-PRACH-Configuration, + iE-Extensions ProtocolExtensionContainer { { ResourceCoordinationEUTRACellInfo-ExtIEs } } OPTIONAL, + ... +} + +ResourceCoordinationEUTRACellInfo-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + {ID id-IgnorePRACHConfiguration CRITICALITY reject EXTENSION IgnorePRACHConfiguration PRESENCE optional }, + ... +} + +ResourceCoordinationTransferInformation ::= SEQUENCE { + meNB-Cell-ID EUTRA-Cell-ID, + resourceCoordinationEUTRACellInfo ResourceCoordinationEUTRACellInfo OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { ResourceCoordinationTransferInformation-ExtIEs } } OPTIONAL, + ... +} + +ResourceCoordinationTransferInformation-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ResourceCoordinationTransferContainer ::= OCTET STRING + +ResourceSetType ::= CHOICE { + periodic ResourceSetTypePeriodic, + semi-persistent ResourceSetTypeSemi-persistent, + aperiodic ResourceSetTypeAperiodic, + choice-extension ProtocolIE-SingleContainer {{ ResourceSetType-ExtIEs }} +} + +ResourceSetType-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +ResourceSetTypePeriodic ::= SEQUENCE { + periodicSet ENUMERATED{true, ...}, + iE-Extensions ProtocolExtensionContainer { { ResourceSetTypePeriodic-ExtIEs} } OPTIONAL +} + +ResourceSetTypePeriodic-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ResourceSetTypeSemi-persistent ::= SEQUENCE { + semi-persistentSet ENUMERATED{true, ...}, + iE-Extensions ProtocolExtensionContainer { { ResourceSetTypeSemi-persistent-ExtIEs} } OPTIONAL +} + +ResourceSetTypeSemi-persistent-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ResourceSetTypeAperiodic ::= SEQUENCE { + sRSResourceTrigger-List INTEGER(1..3), + slotoffset INTEGER(1..32), + iE-Extensions ProtocolExtensionContainer { { ResourceSetTypeAperiodic-ExtIEs} } OPTIONAL +} + +ResourceSetTypeAperiodic-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +RepetitionPeriod ::= INTEGER (0..131071, ...) + +ReportingRequestType ::= SEQUENCE { + eventType EventType, + reportingPeriodicityValue ReportingPeriodicityValue OPTIONAL, + -- C-ifEventTypeisPeriodic: This IE shall be present if the Event Type IE is set to "periodic" in the Event Type IE. + iE-Extensions ProtocolExtensionContainer { {ReportingRequestType-ExtIEs} } OPTIONAL +} + +ReportingRequestType-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ResourceType ::= CHOICE { + periodic ResourceTypePeriodic, + semi-persistent ResourceTypeSemi-persistent, + aperiodic ResourceTypeAperiodic, + choice-extension ProtocolIE-SingleContainer {{ ResourceType-ExtIEs }} +} + +ResourceType-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +ResourceTypePeriodic ::= SEQUENCE { + periodicity ENUMERATED{slot1, slot2, slot4, slot5, slot8, slot10, slot16, slot20, slot32, slot40, slot64, slot80, slot160, slot320, slot640, slot1280, slot2560, ...}, + offset INTEGER(0..2559, ...), + iE-Extensions ProtocolExtensionContainer { { ResourceTypePeriodic-ExtIEs} } OPTIONAL +} + +ResourceTypePeriodic-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ResourceTypeSemi-persistent ::= SEQUENCE { + periodicity ENUMERATED{slot1, slot2, slot4, slot5, slot8, slot10, slot16, slot20, slot32, slot40, slot64, slot80, slot160, slot320, slot640, slot1280, slot2560, ...}, + offset INTEGER(0..2559, ...), + iE-Extensions ProtocolExtensionContainer { { ResourceTypeSemi-persistent-ExtIEs} } OPTIONAL +} + +ResourceTypeSemi-persistent-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ResourceTypeAperiodic ::= SEQUENCE { + aperiodicResourceType ENUMERATED{true, ...}, + iE-Extensions ProtocolExtensionContainer { { ResourceTypeAperiodic-ExtIEs} } OPTIONAL +} + +ResourceTypeAperiodic-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ResourceTypePos ::= CHOICE { + periodic ResourceTypePeriodicPos, + semi-persistent ResourceTypeSemi-persistentPos, + aperiodic ResourceTypeAperiodicPos, + choice-extension ProtocolIE-SingleContainer {{ ResourceTypePos-ExtIEs }} +} + +ResourceTypePos-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +ResourceTypePeriodicPos ::= SEQUENCE { + periodicity ENUMERATED{slot1, slot2, slot4, slot5, slot8, slot10, slot16, slot20, slot32, slot40, slot64, slot80, slot160, slot320, slot640, slot1280, slot2560, slot5120, slot10240, slot20480, slot40960, slot81920, ...}, + offset INTEGER(0..81919, ...), + iE-Extensions ProtocolExtensionContainer { { ResourceTypePeriodicPos-ExtIEs} } OPTIONAL +} + +ResourceTypePeriodicPos-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ResourceTypeSemi-persistentPos ::= SEQUENCE { + periodicity ENUMERATED{slot1, slot2, slot4, slot5, slot8, slot10, slot16, slot20, slot32, slot40, slot64, slot80, slot160, slot320, slot640, slot1280, slot2560, slot5120, slot10240, slot20480, slot40960, slot81920, ...}, + offset INTEGER(0..81919, ...), + iE-Extensions ProtocolExtensionContainer { { ResourceTypeSemi-persistentPos-ExtIEs} } OPTIONAL +} + +ResourceTypeSemi-persistentPos-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ResourceTypeAperiodicPos ::= SEQUENCE { + slotOffset INTEGER (1..32), + iE-Extensions ProtocolExtensionContainer { { ResourceTypeAperiodicPos-ExtIEs} } OPTIONAL +} + +ResourceTypeAperiodicPos-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +RLCDuplicationInformation ::= SEQUENCE { + rLCDuplicationStateList RLCDuplicationStateList, + primaryPathIndication PrimaryPathIndication OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {RLCDuplicationInformation-ExtIEs} } OPTIONAL +} + +RLCDuplicationInformation-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +RLCDuplicationStateList ::= SEQUENCE (SIZE(1..maxnoofRLCDuplicationState)) OF RLCDuplicationState-Item + +RLCDuplicationState-Item ::=SEQUENCE { + duplicationState DuplicationState, + iE-Extensions ProtocolExtensionContainer { {RLCDuplicationState-Item-ExtIEs } } OPTIONAL, + ... +} + + +RLCDuplicationState-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +RLCFailureIndication ::= SEQUENCE { + assocatedLCID LCID, + iE-Extensions ProtocolExtensionContainer { {RLCFailureIndication-ExtIEs} } OPTIONAL +} + +RLCFailureIndication-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +RLCMode ::= ENUMERATED { + rlc-am, + rlc-um-bidirectional, + rlc-um-unidirectional-ul, + rlc-um-unidirectional-dl, + ... +} + +RLC-Status ::= SEQUENCE { + reestablishment-Indication Reestablishment-Indication, + iE-Extensions ProtocolExtensionContainer { { RLC-Status-ExtIEs } } OPTIONAL, + ... +} + +RLC-Status-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +RLFReportInformationList ::= SEQUENCE (SIZE(1.. maxnoofRLFReports)) OF RLFReportInformationItem + +RLFReportInformationItem ::= SEQUENCE { + nRUERLFReportContainer NRUERLFReportContainer, + uEAssitantIdentifier GNB-DU-UE-F1AP-ID OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { RLFReportInformationItem-ExtIEs} } OPTIONAL, + ... +} + +RLFReportInformationItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +RIMRSDetectionStatus ::= ENUMERATED {rs-detected, rs-disappeared, ...} + +RRCContainer ::= OCTET STRING + +RRCContainer-RRCSetupComplete ::= OCTET STRING + +RRCDeliveryStatus ::= SEQUENCE { + delivery-status PDCP-SN, + triggering-message PDCP-SN, + iE-Extensions ProtocolExtensionContainer { { RRCDeliveryStatus-ExtIEs } } OPTIONAL} + +RRCDeliveryStatus-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +RRCDeliveryStatusRequest ::= ENUMERATED {true, ...} + +RRCReconfigurationCompleteIndicator ::= ENUMERATED { + true, + ..., + failure +} + +RRC-Version ::= SEQUENCE { + latest-RRC-Version BIT STRING (SIZE(3)), + iE-Extensions ProtocolExtensionContainer { { RRC-Version-ExtIEs } } OPTIONAL} + +RRC-Version-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + {ID id-latest-RRC-Version-Enhanced CRITICALITY ignore EXTENSION OCTET STRING (SIZE(3)) PRESENCE optional }, + ... +} + +RoutingID ::= OCTET STRING + +-- S + +SCell-FailedtoSetup-Item ::= SEQUENCE { + sCell-ID NRCGI , + cause Cause OPTIONAL , + iE-Extensions ProtocolExtensionContainer { { SCell-FailedtoSetup-ItemExtIEs } } OPTIONAL, + ... +} + +SCell-FailedtoSetup-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SCell-FailedtoSetupMod-Item ::= SEQUENCE { + sCell-ID NRCGI , + cause Cause OPTIONAL , + iE-Extensions ProtocolExtensionContainer { { SCell-FailedtoSetupMod-ItemExtIEs } } OPTIONAL, + ... +} + +SCell-FailedtoSetupMod-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SCell-ToBeRemoved-Item ::= SEQUENCE { + sCell-ID NRCGI , + iE-Extensions ProtocolExtensionContainer { { SCell-ToBeRemoved-ItemExtIEs } } OPTIONAL, + ... +} + +SCell-ToBeRemoved-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SCell-ToBeSetup-Item ::= SEQUENCE { + sCell-ID NRCGI , + sCellIndex SCellIndex, + sCellULConfigured CellULConfigured OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { SCell-ToBeSetup-ItemExtIEs } } OPTIONAL, + ... +} + +SCell-ToBeSetup-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-ServingCellMO CRITICALITY ignore EXTENSION ServingCellMO PRESENCE optional }, + ... +} + +SCell-ToBeSetupMod-Item ::= SEQUENCE { + sCell-ID NRCGI , + sCellIndex SCellIndex, + sCellULConfigured CellULConfigured OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { SCell-ToBeSetupMod-ItemExtIEs } } OPTIONAL, + ... +} + +SCell-ToBeSetupMod-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-ServingCellMO CRITICALITY ignore EXTENSION ServingCellMO PRESENCE optional }, + ... +} + +SCellIndex ::=INTEGER (1..31, ...) + +SCS-SpecificCarrier ::= SEQUENCE { + offsetToCarrier INTEGER (0..2199,...), + subcarrierSpacing ENUMERATED {kHz15, kHz30, kHz60, kHz120,...}, + carrierBandwidth INTEGER (0..275,...), + iE-Extensions ProtocolExtensionContainer { { SCS-SpecificCarrier-ExtIEs } } OPTIONAL +} + +SCS-SpecificCarrier-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Search-window-information ::= SEQUENCE { + expectedPropagationDelay INTEGER (-3841..3841,...), + delayUncertainty INTEGER (1..246,...), + iE-Extensions ProtocolExtensionContainer { { Search-window-information-ExtIEs } } OPTIONAL +} + +Search-window-information-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SerialNumber ::= BIT STRING (SIZE (16)) + +SIBType-PWS ::=INTEGER (6..8, ...) + +SelectedBandCombinationIndex ::= OCTET STRING + +SelectedFeatureSetEntryIndex ::= OCTET STRING + +CG-ConfigInfo ::= OCTET STRING + +ServCellIndex ::= INTEGER (0..31, ...) + +ServingCellMO ::= INTEGER (1..64, ...) + +Served-Cell-Information ::= SEQUENCE { + nRCGI NRCGI, + nRPCI NRPCI, + fiveGS-TAC FiveGS-TAC OPTIONAL, + configured-EPS-TAC Configured-EPS-TAC OPTIONAL, + servedPLMNs ServedPLMNs-List, + nR-Mode-Info NR-Mode-Info, + measurementTimingConfiguration OCTET STRING, + iE-Extensions ProtocolExtensionContainer { {Served-Cell-Information-ExtIEs} } OPTIONAL, + ... +} + +Served-Cell-Information-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-RANAC CRITICALITY ignore EXTENSION RANAC PRESENCE optional }| + { ID id-ExtendedServedPLMNs-List CRITICALITY ignore EXTENSION ExtendedServedPLMNs-List PRESENCE optional }| + { ID id-Cell-Direction CRITICALITY ignore EXTENSION Cell-Direction PRESENCE optional }| + { ID id-BPLMN-ID-Info-List CRITICALITY ignore EXTENSION BPLMN-ID-Info-List PRESENCE optional }| + { ID id-Cell-Type CRITICALITY ignore EXTENSION CellType PRESENCE optional}| + { ID id-ConfiguredTACIndication CRITICALITY ignore EXTENSION ConfiguredTACIndication PRESENCE optional }| + { ID id-AggressorgNBSetID CRITICALITY ignore EXTENSION AggressorgNBSetID PRESENCE optional}| + { ID id-VictimgNBSetID CRITICALITY ignore EXTENSION VictimgNBSetID PRESENCE optional}| + { ID id-IAB-Info-IAB-DU CRITICALITY ignore EXTENSION IAB-Info-IAB-DU PRESENCE optional}| + { ID id-SSB-PositionsInBurst CRITICALITY ignore EXTENSION SSB-PositionsInBurst PRESENCE optional }| + { ID id-NRPRACHConfig CRITICALITY ignore EXTENSION NRPRACHConfig PRESENCE optional }, + ... +} + +Served-Cells-To-Add-Item ::= SEQUENCE { + served-Cell-Information Served-Cell-Information, + gNB-DU-System-Information GNB-DU-System-Information OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { Served-Cells-To-Add-ItemExtIEs} } OPTIONAL, + ... +} + +Served-Cells-To-Add-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Served-Cells-To-Delete-Item ::= SEQUENCE { + oldNRCGI NRCGI , + iE-Extensions ProtocolExtensionContainer { { Served-Cells-To-Delete-ItemExtIEs } } OPTIONAL, + ... +} + +Served-Cells-To-Delete-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Served-Cells-To-Modify-Item ::= SEQUENCE { + oldNRCGI NRCGI , + served-Cell-Information Served-Cell-Information , + gNB-DU-System-Information GNB-DU-System-Information OPTIONAL , + iE-Extensions ProtocolExtensionContainer { { Served-Cells-To-Modify-ItemExtIEs } } OPTIONAL, + ... +} + +Served-Cells-To-Modify-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Served-EUTRA-Cells-Information::= SEQUENCE { + eUTRA-Mode-Info EUTRA-Mode-Info, + protectedEUTRAResourceIndication ProtectedEUTRAResourceIndication, + iE-Extensions ProtocolExtensionContainer { {Served-EUTRA-Cell-Information-ExtIEs} } OPTIONAL, + ... +} + +Served-EUTRA-Cell-Information-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Service-State ::= ENUMERATED { + in-service, + out-of-service, + ... +} + +Service-Status ::= SEQUENCE { + service-state Service-State, + switchingOffOngoing ENUMERATED {true, ...} OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { Service-Status-ExtIEs } } OPTIONAL, + ... +} + +Service-Status-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +SFNInitialisationTime ::= BIT STRING (SIZE (64)) + +ShortDRXCycleLength ::= ENUMERATED {ms2, ms3, ms4, ms5, ms6, ms7, ms8, ms10, ms14, ms16, ms20, ms30, ms32, ms35, ms40, ms64, ms80, ms128, ms160, ms256, ms320, ms512, ms640, ...} + +ShortDRXCycleTimer ::= INTEGER (1..16) + +SIB1-message ::= OCTET STRING + +SIB10-message ::= OCTET STRING + +SIB12-message ::= OCTET STRING + +SIB13-message ::= OCTET STRING + +SIB14-message ::= OCTET STRING + +SItype ::= INTEGER (1..32, ...) + +SItype-List ::= SEQUENCE (SIZE(1.. maxnoofSITypes)) OF SItype-Item + +SItype-Item ::= SEQUENCE { + sItype SItype , + iE-Extensions ProtocolExtensionContainer { { SItype-ItemExtIEs } } OPTIONAL +} + +SItype-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SibtypetobeupdatedListItem ::= SEQUENCE { + sIBtype INTEGER (2..32,...), + sIBmessage OCTET STRING, + valueTag INTEGER (0..31,...), + iE-Extensions ProtocolExtensionContainer { { SibtypetobeupdatedListItem-ExtIEs } } OPTIONAL, + ... +} + +SibtypetobeupdatedListItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + {ID id-areaScope CRITICALITY ignore EXTENSION AreaScope PRESENCE optional}, + ... +} + +SLDRBID ::= INTEGER (1..512, ...) + +SLDRBInformation ::= SEQUENCE { + sLDRB-QoS PC5QoSParameters, + flowsMappedToSLDRB-List FlowsMappedToSLDRB-List, + ... +} + +SLDRBs-FailedToBeModified-Item ::= SEQUENCE { + sLDRBID SLDRBID , + cause Cause OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { SLDRBs-FailedToBeModified-ItemExtIEs } } OPTIONAL +} + +SLDRBs-FailedToBeModified-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SLDRBs-FailedToBeSetup-Item ::= SEQUENCE { + sLDRBID SLDRBID, + cause Cause OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { SLDRBs-FailedToBeSetup-ItemExtIEs } } OPTIONAL +} + +SLDRBs-FailedToBeSetup-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SLDRBs-FailedToBeSetupMod-Item ::= SEQUENCE { + sLDRBID SLDRBID , + cause Cause OPTIONAL , + iE-Extensions ProtocolExtensionContainer { { SLDRBs-FailedToBeSetupMod-ItemExtIEs } } OPTIONAL +} + +SLDRBs-FailedToBeSetupMod-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SLDRBs-Modified-Item ::= SEQUENCE { + sLDRBID SLDRBID, + iE-Extensions ProtocolExtensionContainer { { SLDRBs-Modified-ItemExtIEs } } OPTIONAL +} + +SLDRBs-Modified-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SLDRBs-ModifiedConf-Item ::= SEQUENCE { + sLDRBID SLDRBID, + iE-Extensions ProtocolExtensionContainer { { SLDRBs-ModifiedConf-ItemExtIEs } } OPTIONAL +} + +SLDRBs-ModifiedConf-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SLDRBs-Required-ToBeModified-Item ::= SEQUENCE { + sLDRBID SLDRBID, + iE-Extensions ProtocolExtensionContainer { { SLDRBs-Required-ToBeModified-ItemExtIEs } } OPTIONAL +} + +SLDRBs-Required-ToBeModified-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SLDRBs-Required-ToBeReleased-Item ::= SEQUENCE { + sLDRBID SLDRBID, + iE-Extensions ProtocolExtensionContainer { { SLDRBs-Required-ToBeReleased-ItemExtIEs } } OPTIONAL +} + +SLDRBs-Required-ToBeReleased-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SLDRBs-Setup-Item ::= SEQUENCE { + sLDRBID SLDRBID, + iE-Extensions ProtocolExtensionContainer { { SLDRBs-Setup-ItemExtIEs } } OPTIONAL +} + +SLDRBs-Setup-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SLDRBs-SetupMod-Item ::= SEQUENCE { + sLDRBID SLDRBID, + iE-Extensions ProtocolExtensionContainer { { SLDRBs-SetupMod-ItemExtIEs } } OPTIONAL +} + +SLDRBs-SetupMod-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SLDRBs-ToBeModified-Item ::= SEQUENCE { + sLDRBID SLDRBID, + sLDRBInformation SLDRBInformation OPTIONAL, + rLCMode RLCMode OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { SLDRBs-ToBeModified-ItemExtIEs } } OPTIONAL +} + +SLDRBs-ToBeModified-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SLDRBs-ToBeReleased-Item ::= SEQUENCE { + sLDRBID SLDRBID, + iE-Extensions ProtocolExtensionContainer { { SLDRBs-ToBeReleased-ItemExtIEs } } OPTIONAL +} + +SLDRBs-ToBeReleased-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SLDRBs-ToBeSetup-Item ::= SEQUENCE { + sLDRBID SLDRBID, + sLDRBInformation SLDRBInformation, + rLCMode RLCMode, + + iE-Extensions ProtocolExtensionContainer { { SLDRBs-ToBeSetup-ItemExtIEs } } OPTIONAL +} + +SLDRBs-ToBeSetup-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SLDRBs-ToBeSetupMod-Item ::= SEQUENCE { + sLDRBID SLDRBID, + sLDRBInformation SLDRBInformation, + rLCMode RLCMode OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { SLDRBs-ToBeSetupMod-ItemExtIEs } } OPTIONAL +} + +SLDRBs-ToBeSetupMod-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SL-PHY-MAC-RLC-Config ::= OCTET STRING + +SL-ConfigDedicatedEUTRA ::= OCTET STRING + +SliceAvailableCapacity ::= SEQUENCE { + sliceAvailableCapacityList SliceAvailableCapacityList, + iE-Extensions ProtocolExtensionContainer { { SliceAvailableCapacity-ExtIEs} } OPTIONAL +} + +SliceAvailableCapacity-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SliceAvailableCapacityList ::= SEQUENCE (SIZE(1.. maxnoofBPLMNsNR)) OF SliceAvailableCapacityItem + +SliceAvailableCapacityItem ::= SEQUENCE { + pLMNIdentity PLMN-Identity, + sNSSAIAvailableCapacity-List SNSSAIAvailableCapacity-List, + iE-Extensions ProtocolExtensionContainer { { SliceAvailableCapacityItem-ExtIEs} } OPTIONAL +} + +SliceAvailableCapacityItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SNSSAIAvailableCapacity-List ::= SEQUENCE (SIZE(1.. maxnoofSliceItems)) OF SNSSAIAvailableCapacity-Item + +SNSSAIAvailableCapacity-Item ::= SEQUENCE { + sNSSAI SNSSAI, + sliceAvailableCapacityValueDownlink INTEGER (0..100) OPTIONAL, + sliceAvailableCapacityValueUplink INTEGER (0..100) OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { SNSSAIAvailableCapacity-Item-ExtIEs } } OPTIONAL +} + +SNSSAIAvailableCapacity-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SliceSupportList ::= SEQUENCE (SIZE(1.. maxnoofSliceItems)) OF SliceSupportItem + +SliceSupportItem ::= SEQUENCE { + sNSSAI SNSSAI, + iE-Extensions ProtocolExtensionContainer { { SliceSupportItem-ExtIEs } } OPTIONAL +} + +SliceSupportItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SliceToReportList ::= SEQUENCE (SIZE(1.. maxnoofBPLMNsNR)) OF SliceToReportItem + +SliceToReportItem ::= SEQUENCE { + pLMNIdentity PLMN-Identity, + sNSSAIlist SNSSAI-list, + iE-Extensions ProtocolExtensionContainer { { SliceToReportItem-ExtIEs} } OPTIONAL +} + +SliceToReportItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SlotNumber ::= INTEGER (0..79) + +SNSSAI-list ::= SEQUENCE (SIZE(1.. maxnoofSliceItems)) OF SNSSAI-Item + +SNSSAI-Item ::= SEQUENCE { + sNSSAI SNSSAI, + iE-Extensions ProtocolExtensionContainer { { SNSSAI-Item-ExtIEs } } OPTIONAL +} + +SNSSAI-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Slot-Configuration-List ::= SEQUENCE (SIZE(1.. maxnoofslots)) OF Slot-Configuration-Item + +Slot-Configuration-Item ::= SEQUENCE { + slotIndex INTEGER (0..5119, ...), + symbolAllocInSlot SymbolAllocInSlot, + iE-Extensions ProtocolExtensionContainer { { Slot-Configuration-ItemExtIEs } } OPTIONAL +} + +Slot-Configuration-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +SNSSAI ::= SEQUENCE { + sST OCTET STRING (SIZE(1)), + sD OCTET STRING (SIZE(3)) OPTIONAL , + iE-Extensions ProtocolExtensionContainer { { SNSSAI-ExtIEs } } OPTIONAL +} + +SNSSAI-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SpatialDirectionInformation ::= SEQUENCE { + nR-PRSBeamInformation NR-PRSBeamInformation, + iE-Extensions ProtocolExtensionContainer { { SpatialDirectionInformation-ExtIEs } } OPTIONAL +} + +SpatialDirectionInformation-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SpatialRelationInfo ::= SEQUENCE { + spatialRelationforResourceID SpatialRelationforResourceID, + iE-Extensions ProtocolExtensionContainer { {SpatialRelationInfo-ExtIEs} } OPTIONAL +} + +SpatialRelationInfo-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SpatialRelationforResourceID ::= SEQUENCE (SIZE(1..maxnoofSpatialRelations)) OF SpatialRelationforResourceIDItem + +SpatialRelationforResourceIDItem ::= SEQUENCE { + referenceSignal ReferenceSignal, + iE-Extensions ProtocolExtensionContainer { {SpatialRelationforResourceIDItem-ExtIEs} } OPTIONAL +} + +SpatialRelationforResourceIDItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SpatialRelationPos ::= CHOICE { + sSBPos SSBPos, + pRSInformationPos PRSInformationPos, + choice-extension ProtocolIE-SingleContainer {{ SpatialInformationPos-ExtIEs }} +} + +SpatialInformationPos-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +SpectrumSharingGroupID ::= INTEGER (1..maxCellineNB) + +SRBID ::= INTEGER (0..3, ...) + +SRBs-FailedToBeSetup-Item ::= SEQUENCE { + sRBID SRBID , + cause Cause OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { SRBs-FailedToBeSetup-ItemExtIEs } } OPTIONAL, + ... +} + +SRBs-FailedToBeSetup-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SRBs-FailedToBeSetupMod-Item ::= SEQUENCE { + sRBID SRBID , + cause Cause OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { SRBs-FailedToBeSetupMod-ItemExtIEs } } OPTIONAL, + ... +} + +SRBs-FailedToBeSetupMod-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SRBs-Modified-Item ::= SEQUENCE { + sRBID SRBID, + lCID LCID, + iE-Extensions ProtocolExtensionContainer { { SRBs-Modified-ItemExtIEs } } OPTIONAL, + ... +} + +SRBs-Modified-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SRBs-Required-ToBeReleased-Item ::= SEQUENCE { + sRBID SRBID, + iE-Extensions ProtocolExtensionContainer { { SRBs-Required-ToBeReleased-ItemExtIEs } } OPTIONAL, + ... +} + +SRBs-Required-ToBeReleased-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SRBs-Setup-Item ::= SEQUENCE { + sRBID SRBID, + lCID LCID, + iE-Extensions ProtocolExtensionContainer { { SRBs-Setup-ItemExtIEs } } OPTIONAL, + ... +} + +SRBs-Setup-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SRBs-SetupMod-Item ::= SEQUENCE { + sRBID SRBID, + lCID LCID, + iE-Extensions ProtocolExtensionContainer { { SRBs-SetupMod-ItemExtIEs } } OPTIONAL, + ... +} + +SRBs-SetupMod-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SRBs-ToBeReleased-Item ::= SEQUENCE { + sRBID SRBID, + iE-Extensions ProtocolExtensionContainer { { SRBs-ToBeReleased-ItemExtIEs } } OPTIONAL, + ... +} + +SRBs-ToBeReleased-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SRBs-ToBeSetup-Item ::= SEQUENCE { + sRBID SRBID , + duplicationIndication DuplicationIndication OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { SRBs-ToBeSetup-ItemExtIEs } } OPTIONAL, + ... +} + +SRBs-ToBeSetup-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-AdditionalDuplicationIndication CRITICALITY ignore EXTENSION AdditionalDuplicationIndication PRESENCE optional }, + ... +} + +SRBs-ToBeSetupMod-Item ::= SEQUENCE { + sRBID SRBID, + duplicationIndication DuplicationIndication OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { SRBs-ToBeSetupMod-ItemExtIEs } } OPTIONAL, + ... +} + +SRBs-ToBeSetupMod-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-AdditionalDuplicationIndication CRITICALITY ignore EXTENSION AdditionalDuplicationIndication PRESENCE optional }, + ... +} + +SRSCarrier-List ::= SEQUENCE (SIZE(1.. maxnoSRS-Carriers)) OF SRSCarrier-List-Item + +SRSCarrier-List-Item ::= SEQUENCE { + pointA INTEGER (0..3279165,...), + uplinkChannelBW-PerSCS-List UplinkChannelBW-PerSCS-List, + activeULBWP ActiveULBWP, + pci NRPCI, + iE-Extensions ProtocolExtensionContainer { { SRSCarrier-List-Item-ExtIEs } } OPTIONAL +} + +SRSCarrier-List-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SRSConfig ::= SEQUENCE { + sRSResource-List SRSResource-List OPTIONAL, + posSRSResource-List PosSRSResource-List OPTIONAL, + sRSResourceSet-List SRSResourceSet-List OPTIONAL, + posSRSResourceSet-List PosSRSResourceSet-List OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { SRSConfig-ExtIEs } } OPTIONAL +} + +SRSConfig-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SRSConfiguration ::= SEQUENCE { + sRSCarrier-List SRSCarrier-List, + iE-Extensions ProtocolExtensionContainer { { SRSConfiguration-ExtIEs } } OPTIONAL +} + +SRSConfiguration-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SRSPosResourceID ::= INTEGER (0..63, ...) + +SRSResource::= SEQUENCE { + sRSResourceID SRSResourceID, + nrofSRS-Ports ENUMERATED {port1, ports2, ports4}, + transmissionComb TransmissionComb, + startPosition INTEGER (0..13), + nrofSymbols ENUMERATED {n1, n2, n4}, + repetitionFactor ENUMERATED {n1, n2, n4}, + freqDomainPosition INTEGER (0..67), + freqDomainShift INTEGER (0..268), + c-SRS INTEGER (0..63), + b-SRS INTEGER (0..3), + b-hop INTEGER (0..3), + groupOrSequenceHopping ENUMERATED { neither, groupHopping, sequenceHopping }, + resourceType ResourceType, + slotOffset INTEGER (0..2559), + sequenceId INTEGER (0..1023), + iE-Extensions ProtocolExtensionContainer { { SRSResource-ExtIEs } } OPTIONAL +} + +SRSResource-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SRSResourceID ::= INTEGER (0..63, ...) + +SRSResourceID-List::= SEQUENCE (SIZE (1..maxnoSRS-ResourcePerSet)) OF SRSResourceID + +SRSResource-List ::= SEQUENCE (SIZE (1..maxnoSRS-Resources)) OF SRSResource + +SRSResourceSet::= SEQUENCE { + sRSResourceSetID SRSResourceSetID, + sRSResourceID-List SRSResourceID-List, + resourceSetType ResourceSetType, + iE-Extensions ProtocolExtensionContainer { { SRSResourceSet-ExtIEs } } OPTIONAL +} + +SRSResourceSet-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SRSResourceSetID ::= INTEGER (0..15, ...) + +SRSResourceSetList ::= SEQUENCE (SIZE(1.. maxnoSRS-ResourceSets)) OF SRSResourceSetItem + +SRSResourceSetItem ::= SEQUENCE { + numSRSresourcesperset INTEGER (1..16, ...) OPTIONAL, + periodicityList PeriodicityList OPTIONAL, + spatialRelationInfo SpatialRelationInfo OPTIONAL, + pathlossReferenceInfo PathlossReferenceInfo OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { SRSResourceSetItemExtIEs } } OPTIONAL +} + +SRSResourceSetItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SRSResourceSet-List ::= SEQUENCE (SIZE (1..maxnoSRS-ResourceSets)) OF SRSResourceSet + +SRSResourceTrigger ::= SEQUENCE { + aperiodicSRSResourceTriggerList AperiodicSRSResourceTriggerList, + iE-Extensions ProtocolExtensionContainer { {SRSResourceTrigger-ExtIEs} } OPTIONAL +} + +SRSResourceTrigger-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SRSSpatialRelation ::= SEQUENCE { + spatialRelationforResourceID SpatialRelationforResourceID, + iE-Extensions ProtocolExtensionContainer { {SRSSpatialRelation-ExtIEs} } OPTIONAL +} + +SRSSpatialRelation-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SSB ::= SEQUENCE { + pCI-NR NRPCI, + ssb-index SSB-Index OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {SSB-ExtIEs} } OPTIONAL +} + +SSB-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SSB-freqInfo ::= INTEGER (0..maxNRARFCN) + +SSB-Index ::= INTEGER(0..63) + +SSBPos ::= SEQUENCE { + pCI-NR NRPCI OPTIONAL, + ssb-index SSB-Index, + iE-Extensions ProtocolExtensionContainer { {SSBPos-ExtIEs} } OPTIONAL +} + +SSBPos-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SSB-subcarrierSpacing ::= ENUMERATED {kHz15, kHz30, kHz120, kHz240, spare3, spare2, spare1, ...} + +SSB-transmissionPeriodicity ::= ENUMERATED {sf10, sf20, sf40, sf80, sf160, sf320, sf640, ...} + +SSB-transmissionTimingOffset ::= INTEGER (0..127, ...) + +SSB-transmissionBitmap ::= CHOICE { + shortBitmap BIT STRING (SIZE (4)), + mediumBitmap BIT STRING (SIZE (8)), + longBitmap BIT STRING (SIZE (64)), + choice-extension ProtocolIE-SingleContainer { { SSB-transmisisonBitmap-ExtIEs} } +} + +SSB-transmisisonBitmap-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +SSBAreaCapacityValueList ::= SEQUENCE (SIZE(1.. maxnoofSSBAreas)) OF SSBAreaCapacityValueItem + +SSBAreaCapacityValueItem ::= SEQUENCE { + sSBIndex INTEGER(0..63), + sSBAreaCapacityValue INTEGER (0..100), + iE-Extensions ProtocolExtensionContainer { { SSBAreaCapacityValueItem-ExtIEs} } OPTIONAL +} + +SSBAreaCapacityValueItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SSBAreaRadioResourceStatusList::= SEQUENCE (SIZE(1.. maxnoofSSBAreas)) OF SSBAreaRadioResourceStatusItem + +SSBAreaRadioResourceStatusItem::= SEQUENCE { + sSBIndex INTEGER(0..63), + sSBAreaDLGBRPRBusage INTEGER (0..100), + sSBAreaULGBRPRBusage INTEGER (0..100), + sSBAreaDLnon-GBRPRBusage INTEGER (0..100), + sSBAreaULnon-GBRPRBusage INTEGER (0..100), + sSBAreaDLTotalPRBusage INTEGER (0..100), + sSBAreaULTotalPRBusage INTEGER (0..100), + dLschedulingPDCCHCCEusage INTEGER (0..100) OPTIONAL, + uLschedulingPDCCHCCEusage INTEGER (0..100) OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { SSBAreaRadioResourceStatusItem-ExtIEs} } OPTIONAL +} + +SSBAreaRadioResourceStatusItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SSBInformation ::= SEQUENCE { + sSBInformationList SSBInformationList, + iE-Extensions ProtocolExtensionContainer { { SSBInformation-ExtIEs } } OPTIONAL +} + +SSBInformation-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SSBInformationList ::= SEQUENCE (SIZE(1.. maxnoofSSBs)) OF SSBInformationItem + +SSBInformationItem ::= SEQUENCE { + sSB-Configuration SSB-TF-Configuration, + pCI-NR NRPCI, + iE-Extensions ProtocolExtensionContainer { { SSBInformationItem-ExtIEs } } OPTIONAL +} + +SSBInformationItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SSB-PositionsInBurst ::= CHOICE { + shortBitmap BIT STRING (SIZE (4)), + mediumBitmap BIT STRING (SIZE (8)), + longBitmap BIT STRING (SIZE (64)), + choice-extension ProtocolIE-SingleContainer { {SSB-PositionsInBurst-ExtIEs} } +} + +SSB-PositionsInBurst-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +SSB-TF-Configuration ::= SEQUENCE { + sSB-frequency INTEGER (0..3279165), + sSB-subcarrier-spacing ENUMERATED {kHz15, kHz30, kHz60, kHz120, kHz240, ...}, + sSB-Transmit-power INTEGER (-60..50), + sSB-periodicity ENUMERATED {ms5, ms10, ms20, ms40, ms80, ms160, ...}, + sSB-half-frame-offset INTEGER(0..1), + sSB-SFN-offset INTEGER(0..15), + sSB-position-in-burst SSB-PositionsInBurst OPTIONAL, + sFNInitialisationTime SFNInitialisationTime OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { SSB-TF-Configuration-ExtIEs} } OPTIONAL +} + +SSB-TF-Configuration-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +SSBToReportList ::= SEQUENCE (SIZE(1.. maxnoofSSBAreas)) OF SSBToReportItem + +SSBToReportItem ::= SEQUENCE { + sSBIndex INTEGER(0..63), + iE-Extensions ProtocolExtensionContainer { { SSBToReportItem-ExtIEs} } OPTIONAL +} + +SSBToReportItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SUL-Information ::= SEQUENCE { + sUL-NRARFCN INTEGER (0..maxNRARFCN), + sUL-transmission-Bandwidth Transmission-Bandwidth, + iE-Extensions ProtocolExtensionContainer { { SUL-InformationExtIEs} } OPTIONAL, + ... +} + +SUL-InformationExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-CarrierList CRITICALITY ignore EXTENSION NRCarrierList PRESENCE optional }| + { ID id-FrequencyShift7p5khz CRITICALITY ignore EXTENSION FrequencyShift7p5khz PRESENCE optional }, + ... +} + +SubcarrierSpacing ::= ENUMERATED { kHz15, kHz30, kHz60, kHz120, kHz240, spare3, spare2, spare1, ...} + +SubscriberProfileIDforRFP ::= INTEGER (1..256, ...) + +SULAccessIndication ::= ENUMERATED {true,...} + + +SupportedSULFreqBandItem ::= SEQUENCE { + freqBandIndicatorNr INTEGER (1..1024,...), + iE-Extensions ProtocolExtensionContainer { { SupportedSULFreqBandItem-ExtIEs} } OPTIONAL, + ... +} + +SupportedSULFreqBandItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +SymbolAllocInSlot ::= CHOICE { + all-DL NULL, + all-UL NULL, + both-DL-and-UL NumDLULSymbols, + choice-extension ProtocolIE-SingleContainer { { SymbolAllocInSlot-ExtIEs } } +} + +SymbolAllocInSlot-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +SystemFrameNumber ::= INTEGER (0..1023) + +SystemInformationAreaID ::=BIT STRING (SIZE (24)) + +-- T + +FiveGS-TAC ::= OCTET STRING (SIZE(3)) + +Configured-EPS-TAC ::= OCTET STRING (SIZE(2)) + +TargetCellList ::= SEQUENCE (SIZE(1..maxnoofCHOcells)) OF TargetCellList-Item + +TargetCellList-Item ::= SEQUENCE { + target-cell NRCGI, + iE-Extensions ProtocolExtensionContainer { { TargetCellList-Item-ExtIEs} } OPTIONAL +} + +TargetCellList-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TDD-Info ::= SEQUENCE { + nRFreqInfo NRFreqInfo, + transmission-Bandwidth Transmission-Bandwidth, + iE-Extensions ProtocolExtensionContainer { {TDD-Info-ExtIEs} } OPTIONAL, + ... +} + +TDD-Info-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + {ID id-IntendedTDD-DL-ULConfig CRITICALITY ignore EXTENSION IntendedTDD-DL-ULConfig PRESENCE optional}| + {ID id-TDD-UL-DLConfigCommonNR CRITICALITY ignore EXTENSION TDD-UL-DLConfigCommonNR PRESENCE optional }| + {ID id-CarrierList CRITICALITY ignore EXTENSION NRCarrierList PRESENCE optional }, + ... +} + +TDD-UL-DLConfigCommonNR ::= OCTET STRING + +TimeReferenceInformation ::= SEQUENCE { + referenceTime ReferenceTime, + referenceSFN ReferenceSFN, + uncertainty Uncertainty, + timeInformationType TimeInformationType, + iE-Extensions ProtocolExtensionContainer { {TimeReferenceInformation-ExtIEs} } OPTIONAL +} + +TimeReferenceInformation-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TimeInformationType ::= ENUMERATED {localClock} + +TimeStamp ::= SEQUENCE { + systemFrameNumber SystemFrameNumber, + slotIndex TimeStampSlotIndex, + measurementTime SFNInitialisationTime OPTIONAL, + iE-Extension ProtocolExtensionContainer { { TimeStamp-ExtIEs} } OPTIONAL +} + +TimeStamp-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TimeStampSlotIndex ::= CHOICE { + sCS-15 INTEGER(0..9), + sCS-30 INTEGER(0..19), + sCS-60 INTEGER(0..39), + sCS-120 INTEGER(0..79), + choice-extension ProtocolIE-SingleContainer { { TimeStampSlotIndex-ExtIEs} } +} + +TimeStampSlotIndex-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +TimeToWait ::= ENUMERATED {v1s, v2s, v5s, v10s, v20s, v60s, ...} + +TimingMeasurementQuality ::= SEQUENCE { + measurementQuality INTEGER(0..31), + resolution ENUMERATED{m0dot1, m1, m10, m30, ...}, + iE-Extensions ProtocolExtensionContainer { { TimingMeasurementQuality-ExtIEs} } OPTIONAL +} + +TimingMeasurementQuality-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TNLAssociationUsage ::= ENUMERATED { + ue, + non-ue, + both, + ... +} + +TNLCapacityIndicator::= SEQUENCE { + dLTNLOfferedCapacity INTEGER (1.. 16777216,...), + dLTNLAvailableCapacity INTEGER (0.. 100,...), + uLTNLOfferedCapacity INTEGER (1.. 16777216,...), + uLTNLAvailableCapacity INTEGER (0.. 100,...), + iE-Extensions ProtocolExtensionContainer { { TNLCapacityIndicator-ExtIEs} } OPTIONAL +} + +TNLCapacityIndicator-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TraceActivation ::= SEQUENCE { + traceID TraceID, + interfacesToTrace InterfacesToTrace, + traceDepth TraceDepth, + traceCollectionEntityIPAddress TransportLayerAddress, + iE-Extensions ProtocolExtensionContainer { {TraceActivation-ExtIEs} } OPTIONAL +} + +TraceActivation-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + {ID id-mdtConfiguration CRITICALITY ignore EXTENSION MDTConfiguration PRESENCE optional}| + {ID id-TraceCollectionEntityURI CRITICALITY ignore EXTENSION URI-address PRESENCE optional }, + ... +} + +TraceDepth ::= ENUMERATED { + minimum, + medium, + maximum, + minimumWithoutVendorSpecificExtension, + mediumWithoutVendorSpecificExtension, + maximumWithoutVendorSpecificExtension, + ... +} + +TraceID ::= OCTET STRING (SIZE(8)) + +TrafficMappingInfo ::= CHOICE { + iPtolayer2TrafficMappingInfo IPtolayer2TrafficMappingInfo, + bAPlayerBHRLCchannelMappingInfo BAPlayerBHRLCchannelMappingInfo, + choice-extension ProtocolIE-SingleContainer { { TrafficMappingInfo-ExtIEs} } +} + +TrafficMappingInfo-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +TransportLayerAddress ::= BIT STRING (SIZE(1..160, ...)) + +TransactionID ::= INTEGER (0..255, ...) + +Transmission-Bandwidth ::= SEQUENCE { + nRSCS NRSCS, + nRNRB NRNRB, + iE-Extensions ProtocolExtensionContainer { { Transmission-Bandwidth-ExtIEs} } OPTIONAL, + ... +} + +Transmission-Bandwidth-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TransmissionComb ::= CHOICE { + n2 SEQUENCE { + combOffset-n2 INTEGER (0..1), + cyclicShift-n2 INTEGER (0..7) + }, + n4 SEQUENCE { + combOffset-n4 INTEGER (0..3), + cyclicShift-n4 INTEGER (0..11) + }, + choice-extension ProtocolIE-SingleContainer { { TransmissionComb-ExtIEs} } +} +TransmissionComb-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +TransmissionCombPos ::= CHOICE { + n2 SEQUENCE { + combOffset-n2 INTEGER (0..1), + cyclicShift-n2 INTEGER (0..7) + }, + n4 SEQUENCE { + combOffset-n4 INTEGER (0..3), + cyclicShift-n4 INTEGER (0..11) + }, + n8 SEQUENCE { + combOffset-n8 INTEGER (0..7), + cyclicShift-n8 INTEGER (0..5) + }, + + choice-extension ProtocolIE-SingleContainer { { TransmissionCombPos-ExtIEs} } +} +TransmissionCombPos-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +Transport-UP-Layer-Address-Info-To-Add-List ::= SEQUENCE (SIZE(1.. maxnoofTLAs)) OF Transport-UP-Layer-Address-Info-To-Add-Item + +Transport-UP-Layer-Address-Info-To-Add-Item ::= SEQUENCE { + iP-SecTransportLayerAddress TransportLayerAddress, + gTPTransportLayerAddressToAdd GTPTLAs OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { Transport-UP-Layer-Address-Info-To-Add-ItemExtIEs } } OPTIONAL +} + +Transport-UP-Layer-Address-Info-To-Add-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Transport-UP-Layer-Address-Info-To-Remove-List ::= SEQUENCE (SIZE(1.. maxnoofTLAs)) OF Transport-UP-Layer-Address-Info-To-Remove-Item + +Transport-UP-Layer-Address-Info-To-Remove-Item ::= SEQUENCE { + iP-SecTransportLayerAddress TransportLayerAddress, + gTPTransportLayerAddressToRemove GTPTLAs OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { Transport-UP-Layer-Address-Info-To-Remove-ItemExtIEs } } OPTIONAL +} + +Transport-UP-Layer-Address-Info-To-Remove-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TransmissionActionIndicator ::= ENUMERATED {stop, ..., restart } + +TRPID ::= INTEGER (0.. maxnoofTRPs, ...) + +TRPInformation ::= SEQUENCE { + tRPID TRPID, + tRPInformationTypeResponseList TRPInformationTypeResponseList, + iE-Extensions ProtocolExtensionContainer { { TRPInformation-ExtIEs } } OPTIONAL +} + +TRPInformation-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TRPInformationItem ::= SEQUENCE { + tRPInformation TRPInformation, + iE-Extensions ProtocolExtensionContainer { { TRPInformationItem-ExtIEs } } OPTIONAL +} + +TRPInformationItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TRPInformationTypeItem ::= ENUMERATED { + nrPCI, + nG-RAN-CGI, + arfcn, + pRSConfig, + sSBConfig, + sFNInitTime, + spatialDirectInfo, + geoCoord, +...} + + +TRPInformationTypeResponseList ::= SEQUENCE (SIZE(1.. maxnoofTRPInfoTypes)) OF TRPInformationTypeResponseItem + +TRPInformationTypeResponseItem ::= CHOICE { + pCI-NR NRPCI, + nG-RAN-CGI NRCGI, + nRARFCN INTEGER (0..maxNRARFCN), + pRSConfiguration PRSConfiguration, + sSBinformation SSBInformation, + sFNInitialisationTime SFNInitialisationTime, + spatialDirectionInformation SpatialDirectionInformation, + geographicalCoordinates GeographicalCoordinates, + choice-extension ProtocolIE-SingleContainer { { TRPInformationTypeResponseItem-ExtIEs} } +} + +TRPInformationTypeResponseItem-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + + +TRPList ::= SEQUENCE (SIZE(1.. maxnoofTRPs)) OF TRPListItem + +TRPListItem ::= SEQUENCE { + tRPID TRPID, + iE-Extensions ProtocolExtensionContainer { { TRPListItem-ExtIEs } } OPTIONAL +} + +TRPListItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TRPMeasurementQuality ::= SEQUENCE { + tRPmeasurementQuality-Item TRPMeasurementQuality-Item, + iE-Extensions ProtocolExtensionContainer { {TRPMeasurementQuality-ExtIEs} } OPTIONAL +} + +TRPMeasurementQuality-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TRPMeasurementQuality-Item ::= CHOICE { + timingMeasurementQuality TimingMeasurementQuality, + angleMeasurementQuality AngleMeasurementQuality, + choice-extension ProtocolIE-SingleContainer { { TRPMeasurementQuality-Item-ExtIEs } } +} + +TRPMeasurementQuality-Item-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +TRP-MeasurementRequestList ::= SEQUENCE (SIZE (1..maxNoOfMeasTRPs)) OF TRP-MeasurementRequestItem + +TRP-MeasurementRequestItem ::= SEQUENCE { + tRPID TRPID, + search-window-information Search-window-information OPTIONAL, + iE-extensions ProtocolExtensionContainer { { TRP-MeasurementRequestItem-ExtIEs } } OPTIONAL +} + +TRP-MeasurementRequestItem-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TRPPositionDefinitionType ::= CHOICE { + direct TRPPositionDirect, + referenced TRPPositionReferenced, + choice-extension ProtocolIE-SingleContainer { { TRPPositionDefinitionType-ExtIEs } } +} + +TRPPositionDefinitionType-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +TRPPositionDirect ::= SEQUENCE { + accuracy TRPPositionDirectAccuracy, + iE-extensions ProtocolExtensionContainer { { TRPPositionDirect-ExtIEs } } OPTIONAL +} + +TRPPositionDirect-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TRPPositionDirectAccuracy ::= CHOICE { + tRPPosition AccessPointPosition, + tRPHAposition NGRANHighAccuracyAccessPointPosition, + choice-extension ProtocolIE-SingleContainer { { TRPPositionDirectAccuracy-ExtIEs } } +} + +TRPPositionDirectAccuracy-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +TRPPositionReferenced ::= SEQUENCE { + referencePoint ReferencePoint, + referencePointType TRPReferencePointType, + iE-extensions ProtocolExtensionContainer { { TRPPositionReferenced-ExtIEs } } OPTIONAL +} + +TRPPositionReferenced-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TRPReferencePointType ::= CHOICE { + tRPPositionRelativeGeodetic RelativeGeodeticLocation, + tRPPositionRelativeCartesian RelativeCartesianLocation, + choice-extension ProtocolIE-SingleContainer { { TRPReferencePointType-ExtIEs } } +} + +TRPReferencePointType-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +TypeOfError ::= ENUMERATED { + not-understood, + missing, + ... +} + +Transport-Layer-Address-Info ::= SEQUENCE { + transport-UP-Layer-Address-Info-To-Add-List Transport-UP-Layer-Address-Info-To-Add-List OPTIONAL, + transport-UP-Layer-Address-Info-To-Remove-List Transport-UP-Layer-Address-Info-To-Remove-List OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { Transport-Layer-Address-Info-ExtIEs } } OPTIONAL +} + +Transport-Layer-Address-Info-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TSCAssistanceInformation ::= SEQUENCE { + periodicity Periodicity, + burstArrivalTime BurstArrivalTime OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {TSCAssistanceInformation-ExtIEs} } OPTIONAL, + ... +} + +TSCAssistanceInformation-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +TSCTrafficCharacteristics ::= SEQUENCE { + tSCAssistanceInformationDL TSCAssistanceInformation OPTIONAL, + tSCAssistanceInformationUL TSCAssistanceInformation OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {TSCTrafficCharacteristics-ExtIEs} } OPTIONAL, + ... +} + +TSCTrafficCharacteristics-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +-- U +UAC-Assistance-Info ::= SEQUENCE { + uACPLMN-List UACPLMN-List, + iE-Extensions ProtocolExtensionContainer { { UAC-Assistance-InfoExtIEs} } OPTIONAL +} + +UAC-Assistance-InfoExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +UACPLMN-List ::= SEQUENCE (SIZE(1..maxnoofUACPLMNs)) OF UACPLMN-Item + +UACPLMN-Item::= SEQUENCE { + pLMNIdentity PLMN-Identity, + uACType-List UACType-List, iE-Extensions ProtocolExtensionContainer { { UACPLMN-Item-ExtIEs} } OPTIONAL +} + +UACPLMN-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-NID CRITICALITY ignore EXTENSION NID PRESENCE optional }, + ... +} + +UACType-List ::= SEQUENCE (SIZE(1..maxnoofUACperPLMN)) OF UACType-Item + +UACType-Item::= SEQUENCE { + uACReductionIndication UACReductionIndication, + uACCategoryType UACCategoryType, + iE-Extensions ProtocolExtensionContainer { { UACType-Item-ExtIEs } } OPTIONAL +} + +UACType-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +UACCategoryType ::= CHOICE { + uACstandardized UACAction, + uACOperatorDefined UACOperatorDefined, + choice-extension ProtocolIE-SingleContainer { { UACCategoryType-ExtIEs } } +} + +UACCategoryType-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +UACOperatorDefined ::= SEQUENCE { + accessCategory INTEGER (32..63,...), + accessIdentity BIT STRING (SIZE(7)), + iE-Extensions ProtocolExtensionContainer { { UACOperatorDefined-ExtIEs} } OPTIONAL +} + +UACOperatorDefined-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +UACAction ::= ENUMERATED { + reject-non-emergency-mo-dt, + reject-rrc-cr-signalling, + permit-emergency-sessions-and-mobile-terminated-services-only, + permit-high-priority-sessions-and-mobile-terminated-services-only, + ... +} + +UACReductionIndication ::= INTEGER (0..100) + + +UE-associatedLogicalF1-ConnectionItem ::= SEQUENCE { + gNB-CU-UE-F1AP-ID GNB-CU-UE-F1AP-ID OPTIONAL, + gNB-DU-UE-F1AP-ID GNB-DU-UE-F1AP-ID OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { UE-associatedLogicalF1-ConnectionItemExtIEs} } OPTIONAL, + ... +} + +UEAssistanceInformation ::= OCTET STRING + +UEAssistanceInformationEUTRA ::= OCTET STRING + +UE-associatedLogicalF1-ConnectionItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +UE-CapabilityRAT-ContainerList::= OCTET STRING + +UEContextNotRetrievable ::= ENUMERATED {true, ...} + +UEIdentityIndexValue ::= CHOICE { + indexLength10 BIT STRING (SIZE (10)), + choice-extension ProtocolIE-SingleContainer { {UEIdentityIndexValueChoice-ExtIEs} } +} + +UEIdentityIndexValueChoice-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +UL-AoA ::= SEQUENCE { + azimuthAoA INTEGER (0..3599), + zenithAoA INTEGER (0..1799) OPTIONAL, + angleCoordinateSystem ENUMERATED {lCS, gCS} OPTIONAL, + iE-extensions ProtocolExtensionContainer { { UL-AoA-ExtIEs } } +} + +UL-AoA-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +UL-BH-Non-UP-Traffic-Mapping ::= SEQUENCE { + uL-BH-Non-UP-Traffic-Mapping-List UL-BH-Non-UP-Traffic-Mapping-List, + iE-Extensions ProtocolExtensionContainer { { UL-BH-Non-UP-Traffic-Mapping-ExtIEs } } OPTIONAL +} + +UL-BH-Non-UP-Traffic-Mapping-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +UL-BH-Non-UP-Traffic-Mapping-List ::= SEQUENCE (SIZE(1..maxnoofNonUPTrafficMappings)) OF UL-BH-Non-UP-Traffic-Mapping-Item + +UL-BH-Non-UP-Traffic-Mapping-Item ::= SEQUENCE { + nonUPTrafficType NonUPTrafficType, + bHInfo BHInfo, + iE-Extensions ProtocolExtensionContainer { { UL-BH-Non-UP-Traffic-Mapping-ItemExtIEs } } OPTIONAL +} + +UL-BH-Non-UP-Traffic-Mapping-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ULConfiguration ::= SEQUENCE { + uLUEConfiguration ULUEConfiguration, + iE-Extensions ProtocolExtensionContainer { { ULConfigurationExtIEs } } OPTIONAL, + ... +} +ULConfigurationExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +UL-RTOA-Measurement ::= SEQUENCE { + uL-RTOA-MeasurementItem UL-RTOA-MeasurementItem, + additionalPath-List AdditionalPath-List OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { UL-RTOA-Measurement-ExtIEs } } OPTIONAL +} + +UL-RTOA-Measurement-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +UL-RTOA-MeasurementItem ::= CHOICE { + k0 INTEGER (0..1970049), + k1 INTEGER (0..985025), + k2 INTEGER (0..492513), + k3 INTEGER (0..246257), + k4 INTEGER (0..123129), + k5 INTEGER (0..61565), + choice-extension ProtocolIE-SingleContainer { { UL-RTOA-MeasurementItem-ExtIEs } } +} + +UL-RTOA-MeasurementItem-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +UL-SRS-RSRP ::= INTEGER (0..127) + +ULUEConfiguration ::= ENUMERATED {no-data, shared, only, ...} + +UL-UP-TNL-Information-to-Update-List-Item ::= SEQUENCE { + uLUPTNLInformation UPTransportLayerInformation, + newULUPTNLInformation UPTransportLayerInformation OPTIONAL, + bHInfo BHInfo, + iE-Extensions ProtocolExtensionContainer { { UL-UP-TNL-Information-to-Update-List-ItemExtIEs } } OPTIONAL, + ... +} + +UL-UP-TNL-Information-to-Update-List-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +UL-UP-TNL-Address-to-Update-List-Item ::= SEQUENCE { + oldIPAdress TransportLayerAddress, + newIPAdress TransportLayerAddress, + iE-Extensions ProtocolExtensionContainer { { UL-UP-TNL-Address-to-Update-List-ItemExtIEs } } OPTIONAL, + ... +} + +UL-UP-TNL-Address-to-Update-List-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +ULUPTNLInformation-ToBeSetup-List ::= SEQUENCE (SIZE(1..maxnoofULUPTNLInformation)) OF ULUPTNLInformation-ToBeSetup-Item + +ULUPTNLInformation-ToBeSetup-Item ::=SEQUENCE { + uLUPTNLInformation UPTransportLayerInformation, + iE-Extensions ProtocolExtensionContainer { { ULUPTNLInformation-ToBeSetup-ItemExtIEs } } OPTIONAL, + ... +} + +ULUPTNLInformation-ToBeSetup-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + { ID id-BHInfo CRITICALITY ignore EXTENSION BHInfo PRESENCE optional }, + ... +} + +Uncertainty ::= INTEGER (0..32767, ...) + +UplinkChannelBW-PerSCS-List ::= SEQUENCE (SIZE (1..maxnoSCSs)) OF SCS-SpecificCarrier + +UplinkTxDirectCurrentListInformation ::= OCTET STRING + +UPTransportLayerInformation ::= CHOICE { + gTPTunnel GTPTunnel, + choice-extension ProtocolIE-SingleContainer { { UPTransportLayerInformation-ExtIEs} } +} + +UPTransportLayerInformation-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +URI-address ::= VisibleString + +-- V + +VictimgNBSetID ::= SEQUENCE { + victimgNBSetID GNBSetID, + iE-Extensions ProtocolExtensionContainer { { VictimgNBSetID-ExtIEs } } OPTIONAL +} + +VictimgNBSetID-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +VehicleUE ::= ENUMERATED { + authorized, + not-authorized, + ... +} + +PedestrianUE ::= ENUMERATED { + authorized, + not-authorized, + ... +} + +-- W + +-- X + +-- Y + +-- Z + +END diff --git a/openair2/F1AP/MESSAGES/ASN1/R16.3.1/F1AP-PDU-Contents.asn b/openair2/F1AP/MESSAGES/ASN1/R16.3.1/F1AP-PDU-Contents.asn new file mode 100644 index 0000000000..ba6351eddd --- /dev/null +++ b/openair2/F1AP/MESSAGES/ASN1/R16.3.1/F1AP-PDU-Contents.asn @@ -0,0 +1,3633 @@ +-- ************************************************************** +-- +-- PDU definitions for F1AP. +-- +-- ************************************************************** + +F1AP-PDU-Contents { +itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) +ngran-access (22) modules (3) f1ap (3) version1 (1) f1ap-PDU-Contents (1) } + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +-- ************************************************************** +-- +-- IE parameter types from other modules. +-- +-- ************************************************************** + +IMPORTS + Candidate-SpCell-Item, + Cause, + Cells-Failed-to-be-Activated-List-Item, + Cells-Status-Item, + Cells-to-be-Activated-List-Item, + Cells-to-be-Deactivated-List-Item, + CellULConfigured, + CriticalityDiagnostics, + C-RNTI, + CUtoDURRCInformation, + DRB-Activity-Item, + DRBID, + DRBs-FailedToBeModified-Item, + DRBs-FailedToBeSetup-Item, + DRBs-FailedToBeSetupMod-Item, + DRB-Notify-Item, + DRBs-ModifiedConf-Item, + DRBs-Modified-Item, + DRBs-Required-ToBeModified-Item, + DRBs-Required-ToBeReleased-Item, + DRBs-Setup-Item, + DRBs-SetupMod-Item, + DRBs-ToBeModified-Item, + DRBs-ToBeReleased-Item, + DRBs-ToBeSetup-Item, + DRBs-ToBeSetupMod-Item, + DRXCycle, + DRXConfigurationIndicator, + DUtoCURRCInformation, + EUTRANQoS, + ExecuteDuplication, + FullConfiguration, + GNB-CU-UE-F1AP-ID, + GNB-DU-UE-F1AP-ID, + GNB-DU-ID, + GNB-DU-Served-Cells-Item, + GNB-DU-System-Information, + GNB-CU-Name, + GNB-DU-Name, + InactivityMonitoringRequest, + InactivityMonitoringResponse, + LowerLayerPresenceStatusChange, + NotificationControl, + NRCGI, + NRPCI, + UEContextNotRetrievable, + Potential-SpCell-Item, + RAT-FrequencyPriorityInformation, + RequestedSRSTransmissionCharacteristics, + ResourceCoordinationTransferContainer, + RRCContainer, + RRCContainer-RRCSetupComplete, + RRCReconfigurationCompleteIndicator, + SCellIndex, + SCell-ToBeRemoved-Item, + SCell-ToBeSetup-Item, + SCell-ToBeSetupMod-Item, + SCell-FailedtoSetup-Item, + SCell-FailedtoSetupMod-Item, + ServCellIndex, + Served-Cell-Information, + Served-Cells-To-Add-Item, + Served-Cells-To-Delete-Item, + Served-Cells-To-Modify-Item, + ServingCellMO, + SRBID, + SRBs-FailedToBeSetup-Item, + SRBs-FailedToBeSetupMod-Item, + SRBs-Required-ToBeReleased-Item, + SRBs-ToBeReleased-Item, + SRBs-ToBeSetup-Item, + SRBs-ToBeSetupMod-Item, + SRBs-Modified-Item, + SRBs-Setup-Item, + SRBs-SetupMod-Item, + TimeToWait, + TransactionID, + TransmissionActionIndicator, + UE-associatedLogicalF1-ConnectionItem, + DUtoCURRCContainer, + PagingCell-Item, + SItype-List, + UEIdentityIndexValue, + GNB-CU-TNL-Association-Setup-Item, + GNB-CU-TNL-Association-Failed-To-Setup-Item, + GNB-CU-TNL-Association-To-Add-Item, + GNB-CU-TNL-Association-To-Remove-Item, + GNB-CU-TNL-Association-To-Update-Item, + MaskedIMEISV, + PagingDRX, + PagingPriority, + PagingIdentity, + Cells-to-be-Barred-Item, + PWSSystemInformation, + Broadcast-To-Be-Cancelled-Item, + Cells-Broadcast-Cancelled-Item, + NR-CGI-List-For-Restart-Item, + PWS-Failed-NR-CGI-Item, + RepetitionPeriod, + NumberofBroadcastRequest, + Cells-To-Be-Broadcast-Item, + Cells-Broadcast-Completed-Item, + Cancel-all-Warning-Messages-Indicator, + EUTRA-NR-CellResourceCoordinationReq-Container, + EUTRA-NR-CellResourceCoordinationReqAck-Container, + RequestType, + PLMN-Identity, + RLCFailureIndication, + UplinkTxDirectCurrentListInformation, + SULAccessIndication, + Protected-EUTRA-Resources-Item, + GNB-DUConfigurationQuery, + BitRate, + RRC-Version, + GNBDUOverloadInformation, + RRCDeliveryStatusRequest, + NeedforGap, + RRCDeliveryStatus, + ResourceCoordinationTransferInformation, + Dedicated-SIDelivery-NeededUE-Item, + Associated-SCell-Item, + IgnoreResourceCoordinationContainer, + PagingOrigin, + UAC-Assistance-Info, + RANUEID, + GNB-DU-TNL-Association-To-Remove-Item, + NotificationInformation, + TraceActivation, + TraceID, + Neighbour-Cell-Information-Item, + SymbolAllocInSlot, + NumDLULSymbols, + AdditionalRRMPriorityIndex, + DUCURadioInformationType, + CUDURadioInformationType, + Transport-Layer-Address-Info, + BHChannels-ToBeSetup-Item, + BHChannels-Setup-Item, + BHChannels-FailedToBeSetup-Item, + BHChannels-ToBeModified-Item, + BHChannels-ToBeReleased-Item, + BHChannels-ToBeSetupMod-Item, + BHChannels-FailedToBeModified-Item, + BHChannels-FailedToBeSetupMod-Item, + BHChannels-Modified-Item, + BHChannels-SetupMod-Item, + BHChannels-Required-ToBeReleased-Item, + BAPAddress, + BAPPathID, + BAPRoutingID, + BH-Routing-Information-Added-List-Item, + BH-Routing-Information-Removed-List-Item, + Child-Nodes-List, + Child-Nodes-List-Item, + Child-Node-Cells-List, + Child-Node-Cells-List-Item, + Activated-Cells-to-be-Updated-List, + Activated-Cells-to-be-Updated-List-Item, + UL-BH-Non-UP-Traffic-Mapping, + IABTNLAddressesRequested, + IABIPv6RequestType, + IAB-TNL-Addresses-To-Remove-Item, + IABTNLAddress, + IAB-Allocated-TNL-Address-Item, + IABv4AddressesRequested, + TrafficMappingInfo, + UL-UP-TNL-Information-to-Update-List-Item, + UL-UP-TNL-Address-to-Update-List-Item, + DL-UP-TNL-Address-to-Update-List-Item, + NRV2XServicesAuthorized, + LTEV2XServicesAuthorized, + NRUESidelinkAggregateMaximumBitrate, + LTEUESidelinkAggregateMaximumBitrate, + SLDRBs-SetupMod-Item, + SLDRBs-ModifiedConf-Item, + SLDRBID, + SLDRBs-FailedToBeModified-Item, + SLDRBs-FailedToBeSetup-Item, + SLDRBs-FailedToBeSetupMod-Item, + SLDRBs-Modified-Item, + SLDRBs-Required-ToBeModified-Item, + SLDRBs-Required-ToBeReleased-Item, + SLDRBs-Setup-Item, + SLDRBs-ToBeModified-Item, + SLDRBs-ToBeReleased-Item, + SLDRBs-ToBeSetup-Item, + SLDRBs-ToBeSetupMod-Item, + GNBCUMeasurementID, + GNBDUMeasurementID, + RegistrationRequest, + ReportCharacteristics, + CellToReportList, + HardwareLoadIndicator, + CellMeasurementResultList, + ReportingPeriodicity, + TNLCapacityIndicator, + RACHReportInformationList, + RLFReportInformationList, + ReportingRequestType, + TimeReferenceInformation, + ConditionalInterDUMobilityInformation, + ConditionalIntraDUMobilityInformation, + TargetCellList, + MDTPLMNList, + PrivacyIndicator, + TransportLayerAddress, + URI-address, + NID, + PosAssistance-Information, + PosBroadcast, + PositioningBroadcastCells, + RoutingID, + PosAssistanceInformationFailureList, + PosMeasurementQuantities, + PosMeasurementResultList, + PosMeasurementPeriodicity, + PosReportCharacteristics, + TRPInformationTypeItem, + TRPInformationItem, + LMF-MeasurementID, + RAN-MeasurementID, + SRSResourceSetID, + SRSSpatialRelation, + SRSResourceTrigger, + SRSConfiguration, + TRPList, + E-CID-MeasurementQuantities, + E-CID-MeasurementPeriodicity, + E-CID-MeasurementResult, + Cell-Portion-ID, + LMF-UE-MeasurementID, + RAN-UE-MeasurementID, + SFNInitialisationTime, + SystemFrameNumber, + SlotNumber, + AbortTransmission, + TRP-MeasurementRequestList, + MeasurementBeamInfoRequest, + E-CID-ReportCharacteristics, + Extended-GNB-CU-Name, + Extended-GNB-DU-Name + + + +FROM F1AP-IEs + + PrivateIE-Container{}, + ProtocolExtensionContainer{}, + ProtocolIE-Container{}, + ProtocolIE-ContainerPair{}, + ProtocolIE-SingleContainer{}, + F1AP-PRIVATE-IES, + F1AP-PROTOCOL-EXTENSION, + F1AP-PROTOCOL-IES, + F1AP-PROTOCOL-IES-PAIR + +FROM F1AP-Containers + + id-Candidate-SpCell-Item, + id-Candidate-SpCell-List, + id-Cause, + id-Cancel-all-Warning-Messages-Indicator, + id-Cells-Failed-to-be-Activated-List, + id-Cells-Failed-to-be-Activated-List-Item, + id-Cells-Status-Item, + id-Cells-Status-List, + id-Cells-to-be-Activated-List, + id-Cells-to-be-Activated-List-Item, + id-Cells-to-be-Deactivated-List, + id-Cells-to-be-Deactivated-List-Item, + id-ConfirmedUEID, + id-CriticalityDiagnostics, + id-C-RNTI, + id-CUtoDURRCInformation, + id-DRB-Activity-Item, + id-DRB-Activity-List, + id-DRBs-FailedToBeModified-Item, + id-DRBs-FailedToBeModified-List, + id-DRBs-FailedToBeSetup-Item, + id-DRBs-FailedToBeSetup-List, + id-DRBs-FailedToBeSetupMod-Item, + id-DRBs-FailedToBeSetupMod-List, + id-DRBs-ModifiedConf-Item, + id-DRBs-ModifiedConf-List, + id-DRBs-Modified-Item, + id-DRBs-Modified-List, + id-DRB-Notify-Item, + id-DRB-Notify-List, + id-DRBs-Required-ToBeModified-Item, + id-DRBs-Required-ToBeModified-List, + id-DRBs-Required-ToBeReleased-Item, + id-DRBs-Required-ToBeReleased-List, + id-DRBs-Setup-Item, + id-DRBs-Setup-List, + id-DRBs-SetupMod-Item, + id-DRBs-SetupMod-List, + id-DRBs-ToBeModified-Item, + id-DRBs-ToBeModified-List, + id-DRBs-ToBeReleased-Item, + id-DRBs-ToBeReleased-List, + id-DRBs-ToBeSetup-Item, + id-DRBs-ToBeSetup-List, + id-DRBs-ToBeSetupMod-Item, + id-DRBs-ToBeSetupMod-List, + id-DRXCycle, + id-DUtoCURRCInformation, + id-ExecuteDuplication, + id-FullConfiguration, + id-gNB-CU-UE-F1AP-ID, + id-gNB-DU-UE-F1AP-ID, + id-gNB-DU-ID, + id-GNB-DU-Served-Cells-Item, + id-gNB-DU-Served-Cells-List, + id-gNB-CU-Name, + id-gNB-DU-Name, + id-Extended-GNB-CU-Name, + id-Extended-GNB-DU-Name, + id-InactivityMonitoringRequest, + id-InactivityMonitoringResponse, + id-new-gNB-CU-UE-F1AP-ID, + id-new-gNB-DU-UE-F1AP-ID, + id-oldgNB-DU-UE-F1AP-ID, + id-PLMNAssistanceInfoForNetShar, + id-Potential-SpCell-Item, + id-Potential-SpCell-List, + id-RAT-FrequencyPriorityInformation, + id-RedirectedRRCmessage, + id-ResetType, + id-RequestedSRSTransmissionCharacteristics, + id-ResourceCoordinationTransferContainer, + id-RRCContainer, + id-RRCContainer-RRCSetupComplete, + id-RRCReconfigurationCompleteIndicator, + id-SCell-FailedtoSetup-List, + id-SCell-FailedtoSetup-Item, + id-SCell-FailedtoSetupMod-List, + id-SCell-FailedtoSetupMod-Item, + id-SCell-ToBeRemoved-Item, + id-SCell-ToBeRemoved-List, + id-SCell-ToBeSetup-Item, + id-SCell-ToBeSetup-List, + id-SCell-ToBeSetupMod-Item, + id-SCell-ToBeSetupMod-List, + id-SelectedPLMNID, + id-Served-Cells-To-Add-Item, + id-Served-Cells-To-Add-List, + id-Served-Cells-To-Delete-Item, + id-Served-Cells-To-Delete-List, + id-Served-Cells-To-Modify-Item, + id-Served-Cells-To-Modify-List, + id-ServCellIndex, + id-ServingCellMO, + id-SpCell-ID, + id-SpCellULConfigured, + id-SRBID, + id-SRBs-FailedToBeSetup-Item, + id-SRBs-FailedToBeSetup-List, + id-SRBs-FailedToBeSetupMod-Item, + id-SRBs-FailedToBeSetupMod-List, + id-SRBs-Required-ToBeReleased-Item, + id-SRBs-Required-ToBeReleased-List, + id-SRBs-ToBeReleased-Item, + id-SRBs-ToBeReleased-List, + id-SRBs-ToBeSetup-Item, + id-SRBs-ToBeSetup-List, + id-SRBs-ToBeSetupMod-Item, + id-SRBs-ToBeSetupMod-List, + id-SRBs-Modified-Item, + id-SRBs-Modified-List, + id-SRBs-Setup-Item, + id-SRBs-Setup-List, + id-SRBs-SetupMod-Item, + id-SRBs-SetupMod-List, + id-TimeToWait, + id-TransactionID, + id-TransmissionActionIndicator, + id-UEContextNotRetrievable, + id-UE-associatedLogicalF1-ConnectionItem, + id-UE-associatedLogicalF1-ConnectionListResAck, + id-DUtoCURRCContainer, + id-NRCGI, + id-PagingCell-Item, + id-PagingCell-List, + id-PagingDRX, + id-PagingPriority, + id-SItype-List, + id-UEIdentityIndexValue, + id-GNB-CU-TNL-Association-Setup-List, + id-GNB-CU-TNL-Association-Setup-Item, + id-GNB-CU-TNL-Association-Failed-To-Setup-List, + id-GNB-CU-TNL-Association-Failed-To-Setup-Item, + id-GNB-CU-TNL-Association-To-Add-Item, + id-GNB-CU-TNL-Association-To-Add-List, + id-GNB-CU-TNL-Association-To-Remove-Item, + id-GNB-CU-TNL-Association-To-Remove-List, + id-GNB-CU-TNL-Association-To-Update-Item, + id-GNB-CU-TNL-Association-To-Update-List, + id-MaskedIMEISV, + id-PagingIdentity, + id-Cells-to-be-Barred-List, + id-Cells-to-be-Barred-Item, + id-PWSSystemInformation, + id-RepetitionPeriod, + id-NumberofBroadcastRequest, + id-Cells-To-Be-Broadcast-List, + id-Cells-To-Be-Broadcast-Item, + id-Cells-Broadcast-Completed-List, + id-Cells-Broadcast-Completed-Item, + id-Broadcast-To-Be-Cancelled-List, + id-Broadcast-To-Be-Cancelled-Item, + id-Cells-Broadcast-Cancelled-List, + id-Cells-Broadcast-Cancelled-Item, + id-NR-CGI-List-For-Restart-List, + id-NR-CGI-List-For-Restart-Item, + id-PWS-Failed-NR-CGI-List, + id-PWS-Failed-NR-CGI-Item, + id-EUTRA-NR-CellResourceCoordinationReq-Container, + id-EUTRA-NR-CellResourceCoordinationReqAck-Container, + id-Protected-EUTRA-Resources-List, + id-RequestType, + id-ServingPLMN, + id-DRXConfigurationIndicator, + id-RLCFailureIndication, + id-UplinkTxDirectCurrentListInformation, + id-SULAccessIndication, + id-Protected-EUTRA-Resources-Item, + id-GNB-DUConfigurationQuery, + id-GNB-DU-UE-AMBR-UL, + id-GNB-CU-RRC-Version, + id-GNB-DU-RRC-Version, + id-GNBDUOverloadInformation, + id-NeedforGap, + id-RRCDeliveryStatusRequest, + id-RRCDeliveryStatus, + id-Dedicated-SIDelivery-NeededUE-List, + id-Dedicated-SIDelivery-NeededUE-Item, + id-ResourceCoordinationTransferInformation, + id-Associated-SCell-List, + id-Associated-SCell-Item, + id-IgnoreResourceCoordinationContainer, + id-UAC-Assistance-Info, + id-RANUEID, + id-PagingOrigin, + id-GNB-DU-TNL-Association-To-Remove-Item, + id-GNB-DU-TNL-Association-To-Remove-List, + id-NotificationInformation, + id-TraceActivation, + id-TraceID, + id-Neighbour-Cell-Information-List, + id-Neighbour-Cell-Information-Item, + id-SymbolAllocInSlot, + id-NumDLULSymbols, + id-AdditionalRRMPriorityIndex, + id-DUCURadioInformationType, + id-CUDURadioInformationType, + id-LowerLayerPresenceStatusChange, + id-Transport-Layer-Address-Info, + id-BHChannels-ToBeSetup-List, + id-BHChannels-ToBeSetup-Item, + id-BHChannels-Setup-List, + id-BHChannels-Setup-Item, + id-BHChannels-ToBeModified-Item, + id-BHChannels-ToBeModified-List, + id-BHChannels-ToBeReleased-Item, + id-BHChannels-ToBeReleased-List, + id-BHChannels-ToBeSetupMod-Item, + id-BHChannels-ToBeSetupMod-List, + id-BHChannels-FailedToBeSetup-Item, + id-BHChannels-FailedToBeSetup-List, + id-BHChannels-FailedToBeModified-Item, + id-BHChannels-FailedToBeModified-List, + id-BHChannels-FailedToBeSetupMod-Item, + id-BHChannels-FailedToBeSetupMod-List, + id-BHChannels-Modified-Item, + id-BHChannels-Modified-List, + id-BHChannels-SetupMod-Item, + id-BHChannels-SetupMod-List, + id-BHChannels-Required-ToBeReleased-Item, + id-BHChannels-Required-ToBeReleased-List, + id-BAPAddress, + id-ConfiguredBAPAddress, + id-BH-Routing-Information-Added-List, + id-BH-Routing-Information-Added-List-Item, + id-BH-Routing-Information-Removed-List, + id-BH-Routing-Information-Removed-List-Item, + id-UL-BH-Non-UP-Traffic-Mapping, + id-Child-Nodes-List, + id-Activated-Cells-to-be-Updated-List, + id-IABIPv6RequestType, + id-IAB-TNL-Addresses-To-Remove-List, + id-IAB-TNL-Addresses-To-Remove-Item, + id-IAB-Allocated-TNL-Address-List, + id-IAB-Allocated-TNL-Address-Item, + id-IABv4AddressesRequested, + id-TrafficMappingInformation, + id-UL-UP-TNL-Information-to-Update-List, + id-UL-UP-TNL-Information-to-Update-List-Item, + id-UL-UP-TNL-Address-to-Update-List, + id-UL-UP-TNL-Address-to-Update-List-Item, + id-DL-UP-TNL-Address-to-Update-List, + id-DL-UP-TNL-Address-to-Update-List-Item, + id-NRV2XServicesAuthorized, + id-LTEV2XServicesAuthorized, + id-NRUESidelinkAggregateMaximumBitrate, + id-LTEUESidelinkAggregateMaximumBitrate, + id-PC5LinkAMBR, + id-SLDRBs-FailedToBeModified-Item, + id-SLDRBs-FailedToBeModified-List, + id-SLDRBs-FailedToBeSetup-Item, + id-SLDRBs-FailedToBeSetup-List, + id-SLDRBs-Modified-Item, + id-SLDRBs-Modified-List, + id-SLDRBs-Required-ToBeModified-Item, + id-SLDRBs-Required-ToBeModified-List, + id-SLDRBs-Required-ToBeReleased-Item, + id-SLDRBs-Required-ToBeReleased-List, + id-SLDRBs-Setup-Item, + id-SLDRBs-Setup-List, + id-SLDRBs-ToBeModified-Item, + id-SLDRBs-ToBeModified-List, + id-SLDRBs-ToBeReleased-Item, + id-SLDRBs-ToBeReleased-List, + id-SLDRBs-ToBeSetup-Item, + id-SLDRBs-ToBeSetup-List, + id-SLDRBs-ToBeSetupMod-Item, + id-SLDRBs-ToBeSetupMod-List, + id-SLDRBs-SetupMod-List, + id-SLDRBs-FailedToBeSetupMod-List, + id-SLDRBs-SetupMod-Item, + id-SLDRBs-FailedToBeSetupMod-Item, + id-SLDRBs-ModifiedConf-List, + id-SLDRBs-ModifiedConf-Item, + id-gNBCUMeasurementID, + id-gNBDUMeasurementID, + id-RegistrationRequest, + id-ReportCharacteristics, + id-CellToReportList, + id-CellMeasurementResultList, + id-HardwareLoadIndicator, + id-ReportingPeriodicity, + id-TNLCapacityIndicator, + id-RACHReportInformationList, + id-RLFReportInformationList, + id-ReportingRequestType, + id-TimeReferenceInformation, + id-ConditionalInterDUMobilityInformation, + id-ConditionalIntraDUMobilityInformation, + id-targetCellsToCancel, + id-requestedTargetCellGlobalID, + id-TraceCollectionEntityIPAddress, + id-ManagementBasedMDTPLMNList, + id-PrivacyIndicator, + id-TraceCollectionEntityURI, + id-ServingNID, + id-PosAssistance-Information, + id-PosBroadcast, + id-PositioningBroadcastCells, + id-RoutingID, + id-PosAssistanceInformationFailureList, + id-PosMeasurementQuantities, + id-PosMeasurementResultList, + id-PosMeasurementPeriodicity, + id-PosReportCharacteristics, + id-TRPInformationTypeListTRPReq, + id-TRPInformationTypeItem, + id-TRPInformationListTRPResp, + id-TRPInformationItem, + id-LMF-MeasurementID, + id-RAN-MeasurementID, + id-SRSType, + id-ActivationTime, + id-AbortTransmission, + id-SRSConfiguration, + id-TRPList, + id-E-CID-MeasurementQuantities, + id-E-CID-MeasurementPeriodicity, + id-E-CID-MeasurementResult, + id-Cell-Portion-ID, + id-LMF-UE-MeasurementID, + id-RAN-UE-MeasurementID, + id-SFNInitialisationTime, + id-SystemFrameNumber, + id-SlotNumber, + id-TRP-MeasurementRequestList, + id-MeasurementBeamInfoRequest, + id-E-CID-ReportCharacteristics, + + maxCellingNBDU, + maxnoofCandidateSpCells, + maxnoofDRBs, + maxnoofErrors, + maxnoofIndividualF1ConnectionsToReset, + maxnoofPotentialSpCells, + maxnoofSCells, + maxnoofSRBs, + maxnoofPagingCells, + maxnoofTNLAssociations, + maxCellineNB, + maxnoofUEIDs, + maxnoofBHRLCChannels, + maxnoofRoutingEntries, + maxnoofChildIABNodes, + maxnoofServedCellsIAB, + maxnoofTLAsIAB, + maxnoofULUPTNLInformationforIAB, + maxnoofUPTNLAddresses, + maxnoofSLDRBs, + maxnoofTRPInfoTypes, + maxnoofTRPs + + + +FROM F1AP-Constants; + + +-- ************************************************************** +-- +-- RESET ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Reset +-- +-- ************************************************************** + +Reset ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {ResetIEs} }, + ... +} + +ResetIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-ResetType CRITICALITY reject TYPE ResetType PRESENCE mandatory }, + ... +} + +ResetType ::= CHOICE { + f1-Interface ResetAll, + partOfF1-Interface UE-associatedLogicalF1-ConnectionListRes, + choice-extension ProtocolIE-SingleContainer { { ResetType-ExtIEs} } +} + +ResetType-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + + +ResetAll ::= ENUMERATED { + reset-all, + ... +} + +UE-associatedLogicalF1-ConnectionListRes ::= SEQUENCE (SIZE(1.. maxnoofIndividualF1ConnectionsToReset)) OF ProtocolIE-SingleContainer { { UE-associatedLogicalF1-ConnectionItemRes } } + +UE-associatedLogicalF1-ConnectionItemRes F1AP-PROTOCOL-IES ::= { + { ID id-UE-associatedLogicalF1-ConnectionItem CRITICALITY reject TYPE UE-associatedLogicalF1-ConnectionItem PRESENCE mandatory}, + ... +} + + +-- ************************************************************** +-- +-- Reset Acknowledge +-- +-- ************************************************************** + +ResetAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {ResetAcknowledgeIEs} }, + ... +} + +ResetAcknowledgeIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-UE-associatedLogicalF1-ConnectionListResAck CRITICALITY ignore TYPE UE-associatedLogicalF1-ConnectionListResAck PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +UE-associatedLogicalF1-ConnectionListResAck ::= SEQUENCE (SIZE(1.. maxnoofIndividualF1ConnectionsToReset)) OF ProtocolIE-SingleContainer { { UE-associatedLogicalF1-ConnectionItemResAck } } + +UE-associatedLogicalF1-ConnectionItemResAck F1AP-PROTOCOL-IES ::= { + { ID id-UE-associatedLogicalF1-ConnectionItem CRITICALITY ignore TYPE UE-associatedLogicalF1-ConnectionItem PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- ERROR INDICATION ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Error Indication +-- +-- ************************************************************** + +ErrorIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ErrorIndicationIEs}}, + ... +} + +ErrorIndicationIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory}| + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY ignore TYPE GNB-CU-UE-F1AP-ID PRESENCE optional }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY ignore TYPE GNB-DU-UE-F1AP-ID PRESENCE optional }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- F1 SETUP ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- F1 Setup Request +-- +-- ************************************************************** + +F1SetupRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {F1SetupRequestIEs} }, + ... +} + +F1SetupRequestIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-gNB-DU-ID CRITICALITY reject TYPE GNB-DU-ID PRESENCE mandatory }| + { ID id-gNB-DU-Name CRITICALITY ignore TYPE GNB-DU-Name PRESENCE optional }| + { ID id-gNB-DU-Served-Cells-List CRITICALITY reject TYPE GNB-DU-Served-Cells-List PRESENCE optional }| + { ID id-GNB-DU-RRC-Version CRITICALITY reject TYPE RRC-Version PRESENCE mandatory }| + { ID id-Transport-Layer-Address-Info CRITICALITY ignore TYPE Transport-Layer-Address-Info PRESENCE optional }| + { ID id-BAPAddress CRITICALITY ignore TYPE BAPAddress PRESENCE optional }| + { ID id-Extended-GNB-CU-Name CRITICALITY ignore TYPE Extended-GNB-CU-Name PRESENCE optional }, + ... +} + + +GNB-DU-Served-Cells-List ::= SEQUENCE (SIZE(1.. maxCellingNBDU)) OF ProtocolIE-SingleContainer { { GNB-DU-Served-Cells-ItemIEs } } + +GNB-DU-Served-Cells-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-GNB-DU-Served-Cells-Item CRITICALITY reject TYPE GNB-DU-Served-Cells-Item PRESENCE mandatory }, + ... +} + + +-- ************************************************************** +-- +-- F1 Setup Response +-- +-- ************************************************************** + +F1SetupResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {F1SetupResponseIEs} }, + ... +} + + +F1SetupResponseIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-gNB-CU-Name CRITICALITY ignore TYPE GNB-CU-Name PRESENCE optional }| + { ID id-Cells-to-be-Activated-List CRITICALITY reject TYPE Cells-to-be-Activated-List PRESENCE optional }| + { ID id-GNB-CU-RRC-Version CRITICALITY reject TYPE RRC-Version PRESENCE mandatory }| + { ID id-Transport-Layer-Address-Info CRITICALITY ignore TYPE Transport-Layer-Address-Info PRESENCE optional }| + { ID id-UL-BH-Non-UP-Traffic-Mapping CRITICALITY reject TYPE UL-BH-Non-UP-Traffic-Mapping PRESENCE optional }| + { ID id-BAPAddress CRITICALITY ignore TYPE BAPAddress PRESENCE optional }| + { ID id-Extended-GNB-DU-Name CRITICALITY ignore TYPE Extended-GNB-DU-Name PRESENCE optional }, + ... +} + + +Cells-to-be-Activated-List ::= SEQUENCE (SIZE(1.. maxCellingNBDU)) OF ProtocolIE-SingleContainer { { Cells-to-be-Activated-List-ItemIEs } } + +Cells-to-be-Activated-List-ItemIEs F1AP-PROTOCOL-IES::= { + { ID id-Cells-to-be-Activated-List-Item CRITICALITY reject TYPE Cells-to-be-Activated-List-Item PRESENCE mandatory}, + ... +} + + + +-- ************************************************************** +-- +-- F1 Setup Failure +-- +-- ************************************************************** + +F1SetupFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {F1SetupFailureIEs} }, + ... +} + +F1SetupFailureIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-TimeToWait CRITICALITY ignore TYPE TimeToWait PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + + +-- ************************************************************** +-- +-- GNB-DU CONFIGURATION UPDATE ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- GNB-DU CONFIGURATION UPDATE +-- +-- ************************************************************** + +GNBDUConfigurationUpdate::= SEQUENCE { + protocolIEs ProtocolIE-Container { {GNBDUConfigurationUpdateIEs} }, + ... +} + +GNBDUConfigurationUpdateIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-Served-Cells-To-Add-List CRITICALITY reject TYPE Served-Cells-To-Add-List PRESENCE optional }| + { ID id-Served-Cells-To-Modify-List CRITICALITY reject TYPE Served-Cells-To-Modify-List PRESENCE optional }| + { ID id-Served-Cells-To-Delete-List CRITICALITY reject TYPE Served-Cells-To-Delete-List PRESENCE optional }| + { ID id-Cells-Status-List CRITICALITY reject TYPE Cells-Status-List PRESENCE optional }| + { ID id-Dedicated-SIDelivery-NeededUE-List CRITICALITY ignore TYPE Dedicated-SIDelivery-NeededUE-List PRESENCE optional }| + { ID id-gNB-DU-ID CRITICALITY reject TYPE GNB-DU-ID PRESENCE optional }| + { ID id-GNB-DU-TNL-Association-To-Remove-List CRITICALITY reject TYPE GNB-DU-TNL-Association-To-Remove-List PRESENCE optional }| + { ID id-Transport-Layer-Address-Info CRITICALITY ignore TYPE Transport-Layer-Address-Info PRESENCE optional }, + ... +} + +Served-Cells-To-Add-List ::= SEQUENCE (SIZE(1.. maxCellingNBDU)) OF ProtocolIE-SingleContainer { { Served-Cells-To-Add-ItemIEs } } +Served-Cells-To-Modify-List ::= SEQUENCE (SIZE(1.. maxCellingNBDU)) OF ProtocolIE-SingleContainer { { Served-Cells-To-Modify-ItemIEs } } +Served-Cells-To-Delete-List ::= SEQUENCE (SIZE(1.. maxCellingNBDU)) OF ProtocolIE-SingleContainer { { Served-Cells-To-Delete-ItemIEs } } +Cells-Status-List ::= SEQUENCE (SIZE(0.. maxCellingNBDU)) OF ProtocolIE-SingleContainer { { Cells-Status-ItemIEs } } + +Dedicated-SIDelivery-NeededUE-List::= SEQUENCE (SIZE(1.. maxnoofUEIDs)) OF ProtocolIE-SingleContainer { { Dedicated-SIDelivery-NeededUE-ItemIEs } } + +GNB-DU-TNL-Association-To-Remove-List ::= SEQUENCE (SIZE(1.. maxnoofTNLAssociations)) OF ProtocolIE-SingleContainer { { GNB-DU-TNL-Association-To-Remove-ItemIEs } } + + +Served-Cells-To-Add-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-Served-Cells-To-Add-Item CRITICALITY reject TYPE Served-Cells-To-Add-Item PRESENCE mandatory }, + ... +} + +Served-Cells-To-Modify-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-Served-Cells-To-Modify-Item CRITICALITY reject TYPE Served-Cells-To-Modify-Item PRESENCE mandatory }, + ... +} + +Served-Cells-To-Delete-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-Served-Cells-To-Delete-Item CRITICALITY reject TYPE Served-Cells-To-Delete-Item PRESENCE mandatory }, + ... +} + +Cells-Status-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-Cells-Status-Item CRITICALITY reject TYPE Cells-Status-Item PRESENCE mandatory }, + ... +} + +Dedicated-SIDelivery-NeededUE-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-Dedicated-SIDelivery-NeededUE-Item CRITICALITY ignore TYPE Dedicated-SIDelivery-NeededUE-Item PRESENCE mandatory }, + ... +} + +GNB-DU-TNL-Association-To-Remove-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-GNB-DU-TNL-Association-To-Remove-Item CRITICALITY reject TYPE GNB-DU-TNL-Association-To-Remove-Item PRESENCE mandatory }, + ... +} + + +-- ************************************************************** +-- +-- GNB-DU CONFIGURATION UPDATE ACKNOWLEDGE +-- +-- ************************************************************** + +GNBDUConfigurationUpdateAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {GNBDUConfigurationUpdateAcknowledgeIEs} }, + ... +} + + +GNBDUConfigurationUpdateAcknowledgeIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-Cells-to-be-Activated-List CRITICALITY reject TYPE Cells-to-be-Activated-List PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }| + { ID id-Cells-to-be-Deactivated-List CRITICALITY reject TYPE Cells-to-be-Deactivated-List PRESENCE optional }| + { ID id-Transport-Layer-Address-Info CRITICALITY ignore TYPE Transport-Layer-Address-Info PRESENCE optional }| + { ID id-UL-BH-Non-UP-Traffic-Mapping CRITICALITY reject TYPE UL-BH-Non-UP-Traffic-Mapping PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- GNB-DU CONFIGURATION UPDATE FAILURE +-- +-- ************************************************************** + +GNBDUConfigurationUpdateFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {GNBDUConfigurationUpdateFailureIEs} }, + ... +} + +GNBDUConfigurationUpdateFailureIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-TimeToWait CRITICALITY ignore TYPE TimeToWait PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- GNB-CU CONFIGURATION UPDATE ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- GNB-CU CONFIGURATION UPDATE +-- +-- ************************************************************** + +GNBCUConfigurationUpdate ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { GNBCUConfigurationUpdateIEs} }, + ... +} + +GNBCUConfigurationUpdateIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-Cells-to-be-Activated-List CRITICALITY reject TYPE Cells-to-be-Activated-List PRESENCE optional }| + { ID id-Cells-to-be-Deactivated-List CRITICALITY reject TYPE Cells-to-be-Deactivated-List PRESENCE optional }| + { ID id-GNB-CU-TNL-Association-To-Add-List CRITICALITY ignore TYPE GNB-CU-TNL-Association-To-Add-List PRESENCE optional }| + { ID id-GNB-CU-TNL-Association-To-Remove-List CRITICALITY ignore TYPE GNB-CU-TNL-Association-To-Remove-List PRESENCE optional }| + { ID id-GNB-CU-TNL-Association-To-Update-List CRITICALITY ignore TYPE GNB-CU-TNL-Association-To-Update-List PRESENCE optional }| + { ID id-Cells-to-be-Barred-List CRITICALITY ignore TYPE Cells-to-be-Barred-List PRESENCE optional }| + { ID id-Protected-EUTRA-Resources-List CRITICALITY reject TYPE Protected-EUTRA-Resources-List PRESENCE optional }| + { ID id-Neighbour-Cell-Information-List CRITICALITY ignore TYPE Neighbour-Cell-Information-List PRESENCE optional }| + { ID id-Transport-Layer-Address-Info CRITICALITY ignore TYPE Transport-Layer-Address-Info PRESENCE optional }| + { ID id-UL-BH-Non-UP-Traffic-Mapping CRITICALITY reject TYPE UL-BH-Non-UP-Traffic-Mapping PRESENCE optional }, + ... +} + +Cells-to-be-Deactivated-List ::= SEQUENCE (SIZE(1.. maxCellingNBDU)) OF ProtocolIE-SingleContainer { { Cells-to-be-Deactivated-List-ItemIEs } } +GNB-CU-TNL-Association-To-Add-List ::= SEQUENCE (SIZE(1.. maxnoofTNLAssociations)) OF ProtocolIE-SingleContainer { { GNB-CU-TNL-Association-To-Add-ItemIEs } } +GNB-CU-TNL-Association-To-Remove-List ::= SEQUENCE (SIZE(1.. maxnoofTNLAssociations)) OF ProtocolIE-SingleContainer { { GNB-CU-TNL-Association-To-Remove-ItemIEs } } +GNB-CU-TNL-Association-To-Update-List ::= SEQUENCE (SIZE(1.. maxnoofTNLAssociations)) OF ProtocolIE-SingleContainer { { GNB-CU-TNL-Association-To-Update-ItemIEs } } +Cells-to-be-Barred-List ::= SEQUENCE(SIZE(1.. maxCellingNBDU)) OF ProtocolIE-SingleContainer { { Cells-to-be-Barred-ItemIEs } } + + +Cells-to-be-Deactivated-List-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-Cells-to-be-Deactivated-List-Item CRITICALITY reject TYPE Cells-to-be-Deactivated-List-Item PRESENCE mandatory }, + ... +} + + +GNB-CU-TNL-Association-To-Add-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-GNB-CU-TNL-Association-To-Add-Item CRITICALITY ignore TYPE GNB-CU-TNL-Association-To-Add-Item PRESENCE mandatory }, + ... +} + +GNB-CU-TNL-Association-To-Remove-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-GNB-CU-TNL-Association-To-Remove-Item CRITICALITY ignore TYPE GNB-CU-TNL-Association-To-Remove-Item PRESENCE mandatory }, + ... +} + +GNB-CU-TNL-Association-To-Update-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-GNB-CU-TNL-Association-To-Update-Item CRITICALITY ignore TYPE GNB-CU-TNL-Association-To-Update-Item PRESENCE mandatory }, + ... +} + +Cells-to-be-Barred-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-Cells-to-be-Barred-Item CRITICALITY ignore TYPE Cells-to-be-Barred-Item PRESENCE mandatory }, + ... +} + +Protected-EUTRA-Resources-List ::= SEQUENCE (SIZE(1.. maxCellineNB)) OF ProtocolIE-SingleContainer { { Protected-EUTRA-Resources-ItemIEs } } +Protected-EUTRA-Resources-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-Protected-EUTRA-Resources-Item CRITICALITY reject TYPE Protected-EUTRA-Resources-Item PRESENCE mandatory}, + ... +} + +Neighbour-Cell-Information-List ::= SEQUENCE (SIZE(1.. maxCellingNBDU)) OF ProtocolIE-SingleContainer { { Neighbour-Cell-Information-ItemIEs } } +Neighbour-Cell-Information-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-Neighbour-Cell-Information-Item CRITICALITY ignore TYPE Neighbour-Cell-Information-Item PRESENCE mandatory}, + ... +} + +-- ************************************************************** +-- +-- GNB-CU CONFIGURATION UPDATE ACKNOWLEDGE +-- +-- ************************************************************** + +GNBCUConfigurationUpdateAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { GNBCUConfigurationUpdateAcknowledgeIEs} }, + ... +} + + +GNBCUConfigurationUpdateAcknowledgeIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-Cells-Failed-to-be-Activated-List CRITICALITY reject TYPE Cells-Failed-to-be-Activated-List PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }| + { ID id-GNB-CU-TNL-Association-Setup-List CRITICALITY ignore TYPE GNB-CU-TNL-Association-Setup-List PRESENCE optional }| + { ID id-GNB-CU-TNL-Association-Failed-To-Setup-List CRITICALITY ignore TYPE GNB-CU-TNL-Association-Failed-To-Setup-List PRESENCE optional }| + { ID id-Dedicated-SIDelivery-NeededUE-List CRITICALITY ignore TYPE Dedicated-SIDelivery-NeededUE-List PRESENCE optional }| + { ID id-Transport-Layer-Address-Info CRITICALITY ignore TYPE Transport-Layer-Address-Info PRESENCE optional }, + ... +} + +Cells-Failed-to-be-Activated-List ::= SEQUENCE (SIZE(1.. maxCellingNBDU)) OF ProtocolIE-SingleContainer { { Cells-Failed-to-be-Activated-List-ItemIEs } } +GNB-CU-TNL-Association-Setup-List ::= SEQUENCE (SIZE(1.. maxnoofTNLAssociations)) OF ProtocolIE-SingleContainer { { GNB-CU-TNL-Association-Setup-ItemIEs } } +GNB-CU-TNL-Association-Failed-To-Setup-List ::= SEQUENCE (SIZE(1.. maxnoofTNLAssociations)) OF ProtocolIE-SingleContainer { { GNB-CU-TNL-Association-Failed-To-Setup-ItemIEs } } + +Cells-Failed-to-be-Activated-List-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-Cells-Failed-to-be-Activated-List-Item CRITICALITY reject TYPE Cells-Failed-to-be-Activated-List-Item PRESENCE mandatory }, + ... +} + +GNB-CU-TNL-Association-Setup-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-GNB-CU-TNL-Association-Setup-Item CRITICALITY ignore TYPE GNB-CU-TNL-Association-Setup-Item PRESENCE mandatory }, + ... +} + + +GNB-CU-TNL-Association-Failed-To-Setup-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-GNB-CU-TNL-Association-Failed-To-Setup-Item CRITICALITY ignore TYPE GNB-CU-TNL-Association-Failed-To-Setup-Item PRESENCE mandatory }, + ... +} + + +-- ************************************************************** +-- +-- GNB-CU CONFIGURATION UPDATE FAILURE +-- +-- ************************************************************** + +GNBCUConfigurationUpdateFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { GNBCUConfigurationUpdateFailureIEs} }, + ... +} + +GNBCUConfigurationUpdateFailureIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-TimeToWait CRITICALITY ignore TYPE TimeToWait PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + + +-- ************************************************************** +-- +-- GNB-DU RESOURCE COORDINATION REQUEST +-- +-- ************************************************************** + +GNBDUResourceCoordinationRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{GNBDUResourceCoordinationRequest-IEs}}, + ... +} + +GNBDUResourceCoordinationRequest-IEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-RequestType CRITICALITY reject TYPE RequestType PRESENCE mandatory }| + { ID id-EUTRA-NR-CellResourceCoordinationReq-Container CRITICALITY reject TYPE EUTRA-NR-CellResourceCoordinationReq-Container PRESENCE mandatory}| + { ID id-IgnoreResourceCoordinationContainer CRITICALITY reject TYPE IgnoreResourceCoordinationContainer PRESENCE optional }, + ... +} + + +-- ************************************************************** +-- +-- GNB-DU RESOURCE COORDINATION RESPONSE +-- +-- ************************************************************** + +GNBDUResourceCoordinationResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{GNBDUResourceCoordinationResponse-IEs}}, + ... +} + +GNBDUResourceCoordinationResponse-IEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-EUTRA-NR-CellResourceCoordinationReqAck-Container CRITICALITY reject TYPE EUTRA-NR-CellResourceCoordinationReqAck-Container PRESENCE mandatory}, + ... +} + +-- ************************************************************** +-- +-- UE Context Setup ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- UE CONTEXT SETUP REQUEST +-- +-- ************************************************************** + +UEContextSetupRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UEContextSetupRequestIEs} }, + ... +} + +UEContextSetupRequestIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY ignore TYPE GNB-DU-UE-F1AP-ID PRESENCE optional }| + { ID id-SpCell-ID CRITICALITY reject TYPE NRCGI PRESENCE mandatory }| + { ID id-ServCellIndex CRITICALITY reject TYPE ServCellIndex PRESENCE mandatory }| + { ID id-SpCellULConfigured CRITICALITY ignore TYPE CellULConfigured PRESENCE optional }| + { ID id-CUtoDURRCInformation CRITICALITY reject TYPE CUtoDURRCInformation PRESENCE mandatory}| + { ID id-Candidate-SpCell-List CRITICALITY ignore TYPE Candidate-SpCell-List PRESENCE optional }| + { ID id-DRXCycle CRITICALITY ignore TYPE DRXCycle PRESENCE optional }| + { ID id-ResourceCoordinationTransferContainer CRITICALITY ignore TYPE ResourceCoordinationTransferContainer PRESENCE optional }| + { ID id-SCell-ToBeSetup-List CRITICALITY ignore TYPE SCell-ToBeSetup-List PRESENCE optional }| + { ID id-SRBs-ToBeSetup-List CRITICALITY reject TYPE SRBs-ToBeSetup-List PRESENCE optional }| + { ID id-DRBs-ToBeSetup-List CRITICALITY reject TYPE DRBs-ToBeSetup-List PRESENCE optional }| + { ID id-InactivityMonitoringRequest CRITICALITY reject TYPE InactivityMonitoringRequest PRESENCE optional }| + { ID id-RAT-FrequencyPriorityInformation CRITICALITY reject TYPE RAT-FrequencyPriorityInformation PRESENCE optional }| + { ID id-RRCContainer CRITICALITY ignore TYPE RRCContainer PRESENCE optional }| + { ID id-MaskedIMEISV CRITICALITY ignore TYPE MaskedIMEISV PRESENCE optional }| + { ID id-ServingPLMN CRITICALITY ignore TYPE PLMN-Identity PRESENCE optional }| + { ID id-GNB-DU-UE-AMBR-UL CRITICALITY ignore TYPE BitRate PRESENCE conditional }| + { ID id-RRCDeliveryStatusRequest CRITICALITY ignore TYPE RRCDeliveryStatusRequest PRESENCE optional }| + { ID id-ResourceCoordinationTransferInformation CRITICALITY ignore TYPE ResourceCoordinationTransferInformation PRESENCE optional }| + { ID id-ServingCellMO CRITICALITY ignore TYPE ServingCellMO PRESENCE optional }| + { ID id-new-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE optional }| + { ID id-RANUEID CRITICALITY ignore TYPE RANUEID PRESENCE optional }| + { ID id-TraceActivation CRITICALITY ignore TYPE TraceActivation PRESENCE optional }| + { ID id-AdditionalRRMPriorityIndex CRITICALITY ignore TYPE AdditionalRRMPriorityIndex PRESENCE optional }| + { ID id-BHChannels-ToBeSetup-List CRITICALITY reject TYPE BHChannels-ToBeSetup-List PRESENCE optional }| + { ID id-ConfiguredBAPAddress CRITICALITY reject TYPE BAPAddress PRESENCE optional }| + { ID id-NRV2XServicesAuthorized CRITICALITY ignore TYPE NRV2XServicesAuthorized PRESENCE optional }| + { ID id-LTEV2XServicesAuthorized CRITICALITY ignore TYPE LTEV2XServicesAuthorized PRESENCE optional }| + { ID id-NRUESidelinkAggregateMaximumBitrate CRITICALITY ignore TYPE NRUESidelinkAggregateMaximumBitrate PRESENCE optional }| + { ID id-LTEUESidelinkAggregateMaximumBitrate CRITICALITY ignore TYPE LTEUESidelinkAggregateMaximumBitrate PRESENCE optional }| + { ID id-PC5LinkAMBR CRITICALITY ignore TYPE BitRate PRESENCE optional}| + { ID id-SLDRBs-ToBeSetup-List CRITICALITY reject TYPE SLDRBs-ToBeSetup-List PRESENCE optional }| + { ID id-ConditionalInterDUMobilityInformation CRITICALITY reject TYPE ConditionalInterDUMobilityInformation PRESENCE optional}| + { ID id-ManagementBasedMDTPLMNList CRITICALITY ignore TYPE MDTPLMNList PRESENCE optional }| + { ID id-ServingNID CRITICALITY reject TYPE NID PRESENCE optional }, + ... +} + +Candidate-SpCell-List::= SEQUENCE (SIZE(1..maxnoofCandidateSpCells)) OF ProtocolIE-SingleContainer { { Candidate-SpCell-ItemIEs} } +SCell-ToBeSetup-List::= SEQUENCE (SIZE(1..maxnoofSCells)) OF ProtocolIE-SingleContainer { { SCell-ToBeSetup-ItemIEs} } +SRBs-ToBeSetup-List ::= SEQUENCE (SIZE(1..maxnoofSRBs)) OF ProtocolIE-SingleContainer { { SRBs-ToBeSetup-ItemIEs} } +DRBs-ToBeSetup-List ::= SEQUENCE (SIZE(1..maxnoofDRBs)) OF ProtocolIE-SingleContainer { { DRBs-ToBeSetup-ItemIEs} } +BHChannels-ToBeSetup-List ::= SEQUENCE (SIZE(1..maxnoofBHRLCChannels)) OF ProtocolIE-SingleContainer { { BHChannels-ToBeSetup-ItemIEs} } +SLDRBs-ToBeSetup-List ::= SEQUENCE (SIZE(1..maxnoofSLDRBs)) OF ProtocolIE-SingleContainer { { SLDRBs-ToBeSetup-ItemIEs} } + +Candidate-SpCell-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-Candidate-SpCell-Item CRITICALITY ignore TYPE Candidate-SpCell-Item PRESENCE mandatory }, + ... +} + + +SCell-ToBeSetup-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SCell-ToBeSetup-Item CRITICALITY ignore TYPE SCell-ToBeSetup-Item PRESENCE mandatory }, + ... +} + +SRBs-ToBeSetup-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SRBs-ToBeSetup-Item CRITICALITY reject TYPE SRBs-ToBeSetup-Item PRESENCE mandatory}, + ... +} + +DRBs-ToBeSetup-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-DRBs-ToBeSetup-Item CRITICALITY reject TYPE DRBs-ToBeSetup-Item PRESENCE mandatory}, + ... +} + +BHChannels-ToBeSetup-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-BHChannels-ToBeSetup-Item CRITICALITY reject TYPE BHChannels-ToBeSetup-Item PRESENCE mandatory}, + ... +} + +SLDRBs-ToBeSetup-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SLDRBs-ToBeSetup-Item CRITICALITY reject TYPE SLDRBs-ToBeSetup-Item PRESENCE mandatory}, + ... +} + +-- ************************************************************** +-- +-- UE CONTEXT SETUP RESPONSE +-- +-- ************************************************************** + +UEContextSetupResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UEContextSetupResponseIEs} }, + ... +} + + +UEContextSetupResponseIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-DUtoCURRCInformation CRITICALITY reject TYPE DUtoCURRCInformation PRESENCE mandatory }| + { ID id-C-RNTI CRITICALITY ignore TYPE C-RNTI PRESENCE optional }| + { ID id-ResourceCoordinationTransferContainer CRITICALITY ignore TYPE ResourceCoordinationTransferContainer PRESENCE optional }| + { ID id-FullConfiguration CRITICALITY reject TYPE FullConfiguration PRESENCE optional }| + { ID id-DRBs-Setup-List CRITICALITY ignore TYPE DRBs-Setup-List PRESENCE optional }| + { ID id-SRBs-FailedToBeSetup-List CRITICALITY ignore TYPE SRBs-FailedToBeSetup-List PRESENCE optional }| + { ID id-DRBs-FailedToBeSetup-List CRITICALITY ignore TYPE DRBs-FailedToBeSetup-List PRESENCE optional }| + { ID id-SCell-FailedtoSetup-List CRITICALITY ignore TYPE SCell-FailedtoSetup-List PRESENCE optional }| + { ID id-InactivityMonitoringResponse CRITICALITY reject TYPE InactivityMonitoringResponse PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }| + { ID id-SRBs-Setup-List CRITICALITY ignore TYPE SRBs-Setup-List PRESENCE optional }| + { ID id-BHChannels-Setup-List CRITICALITY ignore TYPE BHChannels-Setup-List PRESENCE optional }| + { ID id-BHChannels-FailedToBeSetup-List CRITICALITY ignore TYPE BHChannels-FailedToBeSetup-List PRESENCE optional }| + { ID id-SLDRBs-Setup-List CRITICALITY ignore TYPE SLDRBs-Setup-List PRESENCE optional }| + { ID id-SLDRBs-FailedToBeSetup-List CRITICALITY ignore TYPE SLDRBs-FailedToBeSetup-List PRESENCE optional }| + { ID id-requestedTargetCellGlobalID CRITICALITY reject TYPE NRCGI PRESENCE optional}, + ... +} + +DRBs-Setup-List ::= SEQUENCE (SIZE(1..maxnoofDRBs)) OF ProtocolIE-SingleContainer { { DRBs-Setup-ItemIEs} } + + +SRBs-FailedToBeSetup-List ::= SEQUENCE (SIZE(1..maxnoofSRBs)) OF ProtocolIE-SingleContainer { { SRBs-FailedToBeSetup-ItemIEs} } +DRBs-FailedToBeSetup-List ::= SEQUENCE (SIZE(1..maxnoofDRBs)) OF ProtocolIE-SingleContainer { { DRBs-FailedToBeSetup-ItemIEs} } +SCell-FailedtoSetup-List ::= SEQUENCE (SIZE(1..maxnoofSCells)) OF ProtocolIE-SingleContainer { { SCell-FailedtoSetup-ItemIEs} } +SRBs-Setup-List ::= SEQUENCE (SIZE(1..maxnoofSRBs)) OF ProtocolIE-SingleContainer { { SRBs-Setup-ItemIEs} } +BHChannels-Setup-List ::= SEQUENCE (SIZE(1..maxnoofBHRLCChannels)) OF ProtocolIE-SingleContainer { { BHChannels-Setup-ItemIEs} } +BHChannels-FailedToBeSetup-List ::= SEQUENCE (SIZE(1..maxnoofBHRLCChannels)) OF ProtocolIE-SingleContainer { { BHChannels-FailedToBeSetup-ItemIEs} } + +DRBs-Setup-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-DRBs-Setup-Item CRITICALITY ignore TYPE DRBs-Setup-Item PRESENCE mandatory}, + ... +} + +SRBs-Setup-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SRBs-Setup-Item CRITICALITY ignore TYPE SRBs-Setup-Item PRESENCE mandatory}, + ... +} + +SRBs-FailedToBeSetup-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SRBs-FailedToBeSetup-Item CRITICALITY ignore TYPE SRBs-FailedToBeSetup-Item PRESENCE mandatory}, + ... +} + + +DRBs-FailedToBeSetup-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-DRBs-FailedToBeSetup-Item CRITICALITY ignore TYPE DRBs-FailedToBeSetup-Item PRESENCE mandatory}, + ... +} + +SCell-FailedtoSetup-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SCell-FailedtoSetup-Item CRITICALITY ignore TYPE SCell-FailedtoSetup-Item PRESENCE mandatory}, + ... +} + +BHChannels-Setup-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-BHChannels-Setup-Item CRITICALITY ignore TYPE BHChannels-Setup-Item PRESENCE mandatory}, + ... +} + +BHChannels-FailedToBeSetup-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-BHChannels-FailedToBeSetup-Item CRITICALITY ignore TYPE BHChannels-FailedToBeSetup-Item PRESENCE mandatory}, + ... +} + +SLDRBs-Setup-List ::= SEQUENCE (SIZE(1..maxnoofSLDRBs)) OF ProtocolIE-SingleContainer { { SLDRBs-Setup-ItemIEs} } + +SLDRBs-FailedToBeSetup-List ::= SEQUENCE (SIZE(1..maxnoofSLDRBs)) OF ProtocolIE-SingleContainer { { SLDRBs-FailedToBeSetup-ItemIEs} } + +SLDRBs-Setup-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SLDRBs-Setup-Item CRITICALITY ignore TYPE SLDRBs-Setup-Item PRESENCE mandatory}, + ... +} + +SLDRBs-FailedToBeSetup-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SLDRBs-FailedToBeSetup-Item CRITICALITY ignore TYPE SLDRBs-FailedToBeSetup-Item PRESENCE mandatory}, + ... +} + +-- ************************************************************** +-- +-- UE CONTEXT SETUP FAILURE +-- +-- ************************************************************** + +UEContextSetupFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UEContextSetupFailureIEs} }, + ... +} + +UEContextSetupFailureIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY ignore TYPE GNB-DU-UE-F1AP-ID PRESENCE optional }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }| + { ID id-Potential-SpCell-List CRITICALITY ignore TYPE Potential-SpCell-List PRESENCE optional }| + { ID id-requestedTargetCellGlobalID CRITICALITY reject TYPE NRCGI PRESENCE optional}, + ... +} + +Potential-SpCell-List::= SEQUENCE (SIZE(0..maxnoofPotentialSpCells)) OF ProtocolIE-SingleContainer { { Potential-SpCell-ItemIEs} } + +Potential-SpCell-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-Potential-SpCell-Item CRITICALITY ignore TYPE Potential-SpCell-Item PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- UE Context Release Request ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- UE Context Release Request +-- +-- ************************************************************** + +UEContextReleaseRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ UEContextReleaseRequestIEs}}, + ... +} + +UEContextReleaseRequestIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-targetCellsToCancel CRITICALITY reject TYPE TargetCellList PRESENCE optional }, + ... +} + + +-- ************************************************************** +-- +-- UE Context Release (gNB-CU initiated) ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- UE CONTEXT RELEASE COMMAND +-- +-- ************************************************************** + +UEContextReleaseCommand ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UEContextReleaseCommandIEs} }, + ... +} + +UEContextReleaseCommandIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-RRCContainer CRITICALITY ignore TYPE RRCContainer PRESENCE optional }| + { ID id-SRBID CRITICALITY ignore TYPE SRBID PRESENCE conditional }| + { ID id-oldgNB-DU-UE-F1AP-ID CRITICALITY ignore TYPE GNB-DU-UE-F1AP-ID PRESENCE optional }| + { ID id-ExecuteDuplication CRITICALITY ignore TYPE ExecuteDuplication PRESENCE optional}| + { ID id-RRCDeliveryStatusRequest CRITICALITY ignore TYPE RRCDeliveryStatusRequest PRESENCE optional }| + { ID id-targetCellsToCancel CRITICALITY reject TYPE TargetCellList PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- UE CONTEXT RELEASE COMPLETE +-- +-- ************************************************************** + +UEContextReleaseComplete ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UEContextReleaseCompleteIEs} }, + ... +} + + +UEContextReleaseCompleteIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- UE Context Modification ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- UE CONTEXT MODIFICATION REQUEST +-- +-- ************************************************************** + +UEContextModificationRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UEContextModificationRequestIEs} }, + ... +} + +UEContextModificationRequestIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-SpCell-ID CRITICALITY ignore TYPE NRCGI PRESENCE optional }| + { ID id-ServCellIndex CRITICALITY reject TYPE ServCellIndex PRESENCE optional }| + { ID id-SpCellULConfigured CRITICALITY ignore TYPE CellULConfigured PRESENCE optional }| + { ID id-DRXCycle CRITICALITY ignore TYPE DRXCycle PRESENCE optional }| + { ID id-CUtoDURRCInformation CRITICALITY reject TYPE CUtoDURRCInformation PRESENCE optional }| + { ID id-TransmissionActionIndicator CRITICALITY ignore TYPE TransmissionActionIndicator PRESENCE optional }| + { ID id-ResourceCoordinationTransferContainer CRITICALITY ignore TYPE ResourceCoordinationTransferContainer PRESENCE optional }| + { ID id-RRCReconfigurationCompleteIndicator CRITICALITY ignore TYPE RRCReconfigurationCompleteIndicator PRESENCE optional }| + { ID id-RRCContainer CRITICALITY reject TYPE RRCContainer PRESENCE optional }| + { ID id-SCell-ToBeSetupMod-List CRITICALITY ignore TYPE SCell-ToBeSetupMod-List PRESENCE optional }| + { ID id-SCell-ToBeRemoved-List CRITICALITY ignore TYPE SCell-ToBeRemoved-List PRESENCE optional }| + { ID id-SRBs-ToBeSetupMod-List CRITICALITY reject TYPE SRBs-ToBeSetupMod-List PRESENCE optional }| + { ID id-DRBs-ToBeSetupMod-List CRITICALITY reject TYPE DRBs-ToBeSetupMod-List PRESENCE optional }| + { ID id-DRBs-ToBeModified-List CRITICALITY reject TYPE DRBs-ToBeModified-List PRESENCE optional }| + { ID id-SRBs-ToBeReleased-List CRITICALITY reject TYPE SRBs-ToBeReleased-List PRESENCE optional }| + { ID id-DRBs-ToBeReleased-List CRITICALITY reject TYPE DRBs-ToBeReleased-List PRESENCE optional }| + { ID id-InactivityMonitoringRequest CRITICALITY reject TYPE InactivityMonitoringRequest PRESENCE optional }| + { ID id-RAT-FrequencyPriorityInformation CRITICALITY reject TYPE RAT-FrequencyPriorityInformation PRESENCE optional }| + { ID id-DRXConfigurationIndicator CRITICALITY ignore TYPE DRXConfigurationIndicator PRESENCE optional }| + { ID id-RLCFailureIndication CRITICALITY ignore TYPE RLCFailureIndication PRESENCE optional }| + { ID id-UplinkTxDirectCurrentListInformation CRITICALITY ignore TYPE UplinkTxDirectCurrentListInformation PRESENCE optional }| + { ID id-GNB-DUConfigurationQuery CRITICALITY reject TYPE GNB-DUConfigurationQuery PRESENCE optional }| + { ID id-GNB-DU-UE-AMBR-UL CRITICALITY ignore TYPE BitRate PRESENCE optional }| + { ID id-ExecuteDuplication CRITICALITY ignore TYPE ExecuteDuplication PRESENCE optional}| + { ID id-RRCDeliveryStatusRequest CRITICALITY ignore TYPE RRCDeliveryStatusRequest PRESENCE optional }| + { ID id-ResourceCoordinationTransferInformation CRITICALITY ignore TYPE ResourceCoordinationTransferInformation PRESENCE optional }| + { ID id-ServingCellMO CRITICALITY ignore TYPE ServingCellMO PRESENCE optional }| + { ID id-NeedforGap CRITICALITY ignore TYPE NeedforGap PRESENCE optional }| + { ID id-FullConfiguration CRITICALITY reject TYPE FullConfiguration PRESENCE optional }| + { ID id-AdditionalRRMPriorityIndex CRITICALITY ignore TYPE AdditionalRRMPriorityIndex PRESENCE optional }| + { ID id-LowerLayerPresenceStatusChange CRITICALITY ignore TYPE LowerLayerPresenceStatusChange PRESENCE optional }| + { ID id-BHChannels-ToBeSetupMod-List CRITICALITY reject TYPE BHChannels-ToBeSetupMod-List PRESENCE optional }| + { ID id-BHChannels-ToBeModified-List CRITICALITY reject TYPE BHChannels-ToBeModified-List PRESENCE optional }| + { ID id-BHChannels-ToBeReleased-List CRITICALITY reject TYPE BHChannels-ToBeReleased-List PRESENCE optional }| + { ID id-NRV2XServicesAuthorized CRITICALITY ignore TYPE NRV2XServicesAuthorized PRESENCE optional }| + { ID id-LTEV2XServicesAuthorized CRITICALITY ignore TYPE LTEV2XServicesAuthorized PRESENCE optional }| + { ID id-NRUESidelinkAggregateMaximumBitrate CRITICALITY ignore TYPE NRUESidelinkAggregateMaximumBitrate PRESENCE optional }| + { ID id-LTEUESidelinkAggregateMaximumBitrate CRITICALITY ignore TYPE LTEUESidelinkAggregateMaximumBitrate PRESENCE optional }| + { ID id-PC5LinkAMBR CRITICALITY ignore TYPE BitRate PRESENCE optional}| + { ID id-SLDRBs-ToBeSetupMod-List CRITICALITY reject TYPE SLDRBs-ToBeSetupMod-List PRESENCE optional }| + { ID id-SLDRBs-ToBeModified-List CRITICALITY reject TYPE SLDRBs-ToBeModified-List PRESENCE optional }| + { ID id-SLDRBs-ToBeReleased-List CRITICALITY reject TYPE SLDRBs-ToBeReleased-List PRESENCE optional }| + { ID id-ConditionalIntraDUMobilityInformation CRITICALITY reject TYPE ConditionalIntraDUMobilityInformation PRESENCE optional}, + ... +} + +SCell-ToBeSetupMod-List::= SEQUENCE (SIZE(1..maxnoofSCells)) OF ProtocolIE-SingleContainer { { SCell-ToBeSetupMod-ItemIEs} } +SCell-ToBeRemoved-List::= SEQUENCE (SIZE(1..maxnoofSCells)) OF ProtocolIE-SingleContainer { { SCell-ToBeRemoved-ItemIEs} } +SRBs-ToBeSetupMod-List ::= SEQUENCE (SIZE(1..maxnoofSRBs)) OF ProtocolIE-SingleContainer { { SRBs-ToBeSetupMod-ItemIEs} } +DRBs-ToBeSetupMod-List ::= SEQUENCE (SIZE(1..maxnoofDRBs)) OF ProtocolIE-SingleContainer { { DRBs-ToBeSetupMod-ItemIEs} } +BHChannels-ToBeSetupMod-List ::= SEQUENCE (SIZE(1..maxnoofBHRLCChannels)) OF ProtocolIE-SingleContainer { { BHChannels-ToBeSetupMod-ItemIEs} } + +DRBs-ToBeModified-List ::= SEQUENCE (SIZE(1..maxnoofDRBs)) OF ProtocolIE-SingleContainer { { DRBs-ToBeModified-ItemIEs} } +BHChannels-ToBeModified-List ::= SEQUENCE (SIZE(1..maxnoofBHRLCChannels)) OF ProtocolIE-SingleContainer { { BHChannels-ToBeModified-ItemIEs} } +SRBs-ToBeReleased-List ::= SEQUENCE (SIZE(1..maxnoofSRBs)) OF ProtocolIE-SingleContainer { { SRBs-ToBeReleased-ItemIEs} } +DRBs-ToBeReleased-List ::= SEQUENCE (SIZE(1..maxnoofDRBs)) OF ProtocolIE-SingleContainer { { DRBs-ToBeReleased-ItemIEs} } +BHChannels-ToBeReleased-List ::= SEQUENCE (SIZE(1..maxnoofBHRLCChannels)) OF ProtocolIE-SingleContainer { { BHChannels-ToBeReleased-ItemIEs} } + +SCell-ToBeSetupMod-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SCell-ToBeSetupMod-Item CRITICALITY ignore TYPE SCell-ToBeSetupMod-Item PRESENCE mandatory }, + ... +} + +SCell-ToBeRemoved-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SCell-ToBeRemoved-Item CRITICALITY ignore TYPE SCell-ToBeRemoved-Item PRESENCE mandatory }, + ... +} + + +SRBs-ToBeSetupMod-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SRBs-ToBeSetupMod-Item CRITICALITY reject TYPE SRBs-ToBeSetupMod-Item PRESENCE mandatory}, + ... +} + + +DRBs-ToBeSetupMod-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-DRBs-ToBeSetupMod-Item CRITICALITY reject TYPE DRBs-ToBeSetupMod-Item PRESENCE mandatory}, + ... +} + +DRBs-ToBeModified-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-DRBs-ToBeModified-Item CRITICALITY reject TYPE DRBs-ToBeModified-Item PRESENCE mandatory}, + ... +} + + +SRBs-ToBeReleased-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SRBs-ToBeReleased-Item CRITICALITY reject TYPE SRBs-ToBeReleased-Item PRESENCE mandatory}, + ... +} + +DRBs-ToBeReleased-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-DRBs-ToBeReleased-Item CRITICALITY reject TYPE DRBs-ToBeReleased-Item PRESENCE mandatory}, + ... +} + +BHChannels-ToBeSetupMod-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-BHChannels-ToBeSetupMod-Item CRITICALITY reject TYPE BHChannels-ToBeSetupMod-Item PRESENCE mandatory}, + ... +} + +BHChannels-ToBeModified-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-BHChannels-ToBeModified-Item CRITICALITY reject TYPE BHChannels-ToBeModified-Item PRESENCE mandatory}, + ... +} + +BHChannels-ToBeReleased-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-BHChannels-ToBeReleased-Item CRITICALITY reject TYPE BHChannels-ToBeReleased-Item PRESENCE mandatory}, + ... +} + +SLDRBs-ToBeSetupMod-List ::= SEQUENCE (SIZE(1..maxnoofSLDRBs)) OF ProtocolIE-SingleContainer { { SLDRBs-ToBeSetupMod-ItemIEs} } +SLDRBs-ToBeModified-List ::= SEQUENCE (SIZE(1..maxnoofSLDRBs)) OF ProtocolIE-SingleContainer { { SLDRBs-ToBeModified-ItemIEs} } +SLDRBs-ToBeReleased-List ::= SEQUENCE (SIZE(1..maxnoofSLDRBs)) OF ProtocolIE-SingleContainer { { SLDRBs-ToBeReleased-ItemIEs} } + +SLDRBs-ToBeSetupMod-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SLDRBs-ToBeSetupMod-Item CRITICALITY reject TYPE SLDRBs-ToBeSetupMod-Item PRESENCE mandatory}, + ... +} + +SLDRBs-ToBeModified-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SLDRBs-ToBeModified-Item CRITICALITY reject TYPE SLDRBs-ToBeModified-Item PRESENCE mandatory}, + ... +} + +SLDRBs-ToBeReleased-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SLDRBs-ToBeReleased-Item CRITICALITY reject TYPE SLDRBs-ToBeReleased-Item PRESENCE mandatory}, + ... +} + +-- ************************************************************** +-- +-- UE CONTEXT MODIFICATION RESPONSE +-- +-- ************************************************************** + +UEContextModificationResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UEContextModificationResponseIEs} }, + ... +} + + +UEContextModificationResponseIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-ResourceCoordinationTransferContainer CRITICALITY ignore TYPE ResourceCoordinationTransferContainer PRESENCE optional }| + { ID id-DUtoCURRCInformation CRITICALITY reject TYPE DUtoCURRCInformation PRESENCE optional}| + { ID id-DRBs-SetupMod-List CRITICALITY ignore TYPE DRBs-SetupMod-List PRESENCE optional}| + { ID id-DRBs-Modified-List CRITICALITY ignore TYPE DRBs-Modified-List PRESENCE optional}| + { ID id-SRBs-FailedToBeSetupMod-List CRITICALITY ignore TYPE SRBs-FailedToBeSetupMod-List PRESENCE optional }| + { ID id-DRBs-FailedToBeSetupMod-List CRITICALITY ignore TYPE DRBs-FailedToBeSetupMod-List PRESENCE optional }| + { ID id-SCell-FailedtoSetupMod-List CRITICALITY ignore TYPE SCell-FailedtoSetupMod-List PRESENCE optional }| + { ID id-DRBs-FailedToBeModified-List CRITICALITY ignore TYPE DRBs-FailedToBeModified-List PRESENCE optional }| + { ID id-InactivityMonitoringResponse CRITICALITY reject TYPE InactivityMonitoringResponse PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }| + { ID id-C-RNTI CRITICALITY ignore TYPE C-RNTI PRESENCE optional }| + { ID id-Associated-SCell-List CRITICALITY ignore TYPE Associated-SCell-List PRESENCE optional }| + { ID id-SRBs-SetupMod-List CRITICALITY ignore TYPE SRBs-SetupMod-List PRESENCE optional }| + { ID id-SRBs-Modified-List CRITICALITY ignore TYPE SRBs-Modified-List PRESENCE optional }| + { ID id-FullConfiguration CRITICALITY reject TYPE FullConfiguration PRESENCE optional }| + { ID id-BHChannels-SetupMod-List CRITICALITY ignore TYPE BHChannels-SetupMod-List PRESENCE optional}| + { ID id-BHChannels-Modified-List CRITICALITY ignore TYPE BHChannels-Modified-List PRESENCE optional}| + { ID id-BHChannels-FailedToBeSetupMod-List CRITICALITY ignore TYPE BHChannels-FailedToBeSetupMod-List PRESENCE optional }| + { ID id-BHChannels-FailedToBeModified-List CRITICALITY ignore TYPE BHChannels-FailedToBeModified-List PRESENCE optional }| + { ID id-SLDRBs-SetupMod-List CRITICALITY ignore TYPE SLDRBs-SetupMod-List PRESENCE optional }| + { ID id-SLDRBs-Modified-List CRITICALITY ignore TYPE SLDRBs-Modified-List PRESENCE optional }| + { ID id-SLDRBs-FailedToBeSetupMod-List CRITICALITY ignore TYPE SLDRBs-FailedToBeSetupMod-List PRESENCE optional }| + { ID id-SLDRBs-FailedToBeModified-List CRITICALITY ignore TYPE SLDRBs-FailedToBeModified-List PRESENCE optional }| + { ID id-requestedTargetCellGlobalID CRITICALITY reject TYPE NRCGI PRESENCE optional}, + ... +} + + +DRBs-SetupMod-List ::= SEQUENCE (SIZE(1..maxnoofDRBs)) OF ProtocolIE-SingleContainer { { DRBs-SetupMod-ItemIEs} } +DRBs-Modified-List::= SEQUENCE (SIZE(1..maxnoofDRBs)) OF ProtocolIE-SingleContainer { { DRBs-Modified-ItemIEs } } +SRBs-SetupMod-List ::= SEQUENCE (SIZE(1..maxnoofSRBs)) OF ProtocolIE-SingleContainer { { SRBs-SetupMod-ItemIEs} } +SRBs-Modified-List ::= SEQUENCE (SIZE(1..maxnoofSRBs)) OF ProtocolIE-SingleContainer { { SRBs-Modified-ItemIEs } } +DRBs-FailedToBeModified-List ::= SEQUENCE (SIZE(1..maxnoofDRBs)) OF ProtocolIE-SingleContainer { { DRBs-FailedToBeModified-ItemIEs} } +SRBs-FailedToBeSetupMod-List ::= SEQUENCE (SIZE(1..maxnoofSRBs)) OF ProtocolIE-SingleContainer { { SRBs-FailedToBeSetupMod-ItemIEs} } +DRBs-FailedToBeSetupMod-List ::= SEQUENCE (SIZE(1..maxnoofDRBs)) OF ProtocolIE-SingleContainer { { DRBs-FailedToBeSetupMod-ItemIEs} } +SCell-FailedtoSetupMod-List ::= SEQUENCE (SIZE(1..maxnoofSCells)) OF ProtocolIE-SingleContainer { { SCell-FailedtoSetupMod-ItemIEs} } +BHChannels-SetupMod-List ::= SEQUENCE (SIZE(1..maxnoofBHRLCChannels)) OF ProtocolIE-SingleContainer { { BHChannels-SetupMod-ItemIEs} } +BHChannels-Modified-List ::= SEQUENCE (SIZE(1..maxnoofBHRLCChannels)) OF ProtocolIE-SingleContainer { { BHChannels-Modified-ItemIEs } } +BHChannels-FailedToBeModified-List ::= SEQUENCE (SIZE(1..maxnoofBHRLCChannels)) OF ProtocolIE-SingleContainer { { BHChannels-FailedToBeModified-ItemIEs} } +BHChannels-FailedToBeSetupMod-List ::= SEQUENCE (SIZE(1..maxnoofBHRLCChannels)) OF ProtocolIE-SingleContainer { { BHChannels-FailedToBeSetupMod-ItemIEs} } + +Associated-SCell-List ::= SEQUENCE (SIZE(1.. maxnoofSCells)) OF ProtocolIE-SingleContainer { { Associated-SCell-ItemIEs} } + +DRBs-SetupMod-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-DRBs-SetupMod-Item CRITICALITY ignore TYPE DRBs-SetupMod-Item PRESENCE mandatory}, + ... +} + + +DRBs-Modified-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-DRBs-Modified-Item CRITICALITY ignore TYPE DRBs-Modified-Item PRESENCE mandatory}, + ... +} + +SRBs-SetupMod-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SRBs-SetupMod-Item CRITICALITY ignore TYPE SRBs-SetupMod-Item PRESENCE mandatory}, + ... +} + + +SRBs-Modified-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SRBs-Modified-Item CRITICALITY ignore TYPE SRBs-Modified-Item PRESENCE mandatory}, + ... +} + +SRBs-FailedToBeSetupMod-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SRBs-FailedToBeSetupMod-Item CRITICALITY ignore TYPE SRBs-FailedToBeSetupMod-Item PRESENCE mandatory}, + ... +} + + +DRBs-FailedToBeSetupMod-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-DRBs-FailedToBeSetupMod-Item CRITICALITY ignore TYPE DRBs-FailedToBeSetupMod-Item PRESENCE mandatory}, + ... +} + + +DRBs-FailedToBeModified-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-DRBs-FailedToBeModified-Item CRITICALITY ignore TYPE DRBs-FailedToBeModified-Item PRESENCE mandatory}, + ... +} + +SCell-FailedtoSetupMod-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SCell-FailedtoSetupMod-Item CRITICALITY ignore TYPE SCell-FailedtoSetupMod-Item PRESENCE mandatory}, + ... +} + +Associated-SCell-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-Associated-SCell-Item CRITICALITY ignore TYPE Associated-SCell-Item PRESENCE mandatory}, + ... +} + +BHChannels-SetupMod-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-BHChannels-SetupMod-Item CRITICALITY ignore TYPE BHChannels-SetupMod-Item PRESENCE mandatory}, + ... +} + + +BHChannels-Modified-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-BHChannels-Modified-Item CRITICALITY ignore TYPE BHChannels-Modified-Item PRESENCE mandatory}, + ... +} + +BHChannels-FailedToBeSetupMod-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-BHChannels-FailedToBeSetupMod-Item CRITICALITY ignore TYPE BHChannels-FailedToBeSetupMod-Item PRESENCE mandatory}, + ... +} + +BHChannels-FailedToBeModified-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-BHChannels-FailedToBeModified-Item CRITICALITY ignore TYPE BHChannels-FailedToBeModified-Item PRESENCE mandatory}, + ... +} + +SLDRBs-SetupMod-List ::= SEQUENCE (SIZE(1..maxnoofSLDRBs)) OF ProtocolIE-SingleContainer { { SLDRBs-SetupMod-ItemIEs} } +SLDRBs-Modified-List ::= SEQUENCE (SIZE(1..maxnoofSLDRBs)) OF ProtocolIE-SingleContainer { { SLDRBs-Modified-ItemIEs } } +SLDRBs-FailedToBeModified-List ::= SEQUENCE (SIZE(1..maxnoofSLDRBs)) OF ProtocolIE-SingleContainer { { SLDRBs-FailedToBeModified-ItemIEs} } +SLDRBs-FailedToBeSetupMod-List ::= SEQUENCE (SIZE(1..maxnoofSLDRBs)) OF ProtocolIE-SingleContainer { { SLDRBs-FailedToBeSetupMod-ItemIEs} } + +SLDRBs-SetupMod-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SLDRBs-SetupMod-Item CRITICALITY ignore TYPE SLDRBs-SetupMod-Item PRESENCE mandatory}, + ... +} + +SLDRBs-Modified-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SLDRBs-Modified-Item CRITICALITY ignore TYPE SLDRBs-Modified-Item PRESENCE mandatory}, + ... +} + +SLDRBs-FailedToBeSetupMod-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SLDRBs-FailedToBeSetupMod-Item CRITICALITY ignore TYPE SLDRBs-FailedToBeSetupMod-Item PRESENCE mandatory}, + ... +} + +SLDRBs-FailedToBeModified-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SLDRBs-FailedToBeModified-Item CRITICALITY ignore TYPE SLDRBs-FailedToBeModified-Item PRESENCE mandatory}, + ... +} + +-- ************************************************************** +-- +-- UE CONTEXT MODIFICATION FAILURE +-- +-- ************************************************************** + +UEContextModificationFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UEContextModificationFailureIEs} }, + ... +} + +UEContextModificationFailureIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }| + { ID id-requestedTargetCellGlobalID CRITICALITY reject TYPE NRCGI PRESENCE optional}, + ... +} + + +-- ************************************************************** +-- +-- UE Context Modification Required (gNB-DU initiated) ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- UE CONTEXT MODIFICATION REQUIRED +-- +-- ************************************************************** + +UEContextModificationRequired ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UEContextModificationRequiredIEs} }, + ... +} + +UEContextModificationRequiredIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-ResourceCoordinationTransferContainer CRITICALITY ignore TYPE ResourceCoordinationTransferContainer PRESENCE optional }| + { ID id-DUtoCURRCInformation CRITICALITY reject TYPE DUtoCURRCInformation PRESENCE optional}| + { ID id-DRBs-Required-ToBeModified-List CRITICALITY reject TYPE DRBs-Required-ToBeModified-List PRESENCE optional}| + { ID id-SRBs-Required-ToBeReleased-List CRITICALITY reject TYPE SRBs-Required-ToBeReleased-List PRESENCE optional}| + { ID id-DRBs-Required-ToBeReleased-List CRITICALITY reject TYPE DRBs-Required-ToBeReleased-List PRESENCE optional}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-BHChannels-Required-ToBeReleased-List CRITICALITY reject TYPE BHChannels-Required-ToBeReleased-List PRESENCE optional}| + { ID id-SLDRBs-Required-ToBeModified-List CRITICALITY reject TYPE SLDRBs-Required-ToBeModified-List PRESENCE optional}| + { ID id-SLDRBs-Required-ToBeReleased-List CRITICALITY reject TYPE SLDRBs-Required-ToBeReleased-List PRESENCE optional}| + { ID id-targetCellsToCancel CRITICALITY reject TYPE TargetCellList PRESENCE optional}, + ... +} + +DRBs-Required-ToBeModified-List::= SEQUENCE (SIZE(1..maxnoofDRBs)) OF ProtocolIE-SingleContainer { { DRBs-Required-ToBeModified-ItemIEs } } +DRBs-Required-ToBeReleased-List::= SEQUENCE (SIZE(1..maxnoofDRBs)) OF ProtocolIE-SingleContainer { { DRBs-Required-ToBeReleased-ItemIEs } } + +SRBs-Required-ToBeReleased-List::= SEQUENCE (SIZE(1..maxnoofSRBs)) OF ProtocolIE-SingleContainer { { SRBs-Required-ToBeReleased-ItemIEs } } + +BHChannels-Required-ToBeReleased-List ::= SEQUENCE (SIZE(1..maxnoofBHRLCChannels)) OF ProtocolIE-SingleContainer { { BHChannels-Required-ToBeReleased-ItemIEs } } + +DRBs-Required-ToBeModified-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-DRBs-Required-ToBeModified-Item CRITICALITY reject TYPE DRBs-Required-ToBeModified-Item PRESENCE mandatory}, + ... +} + +DRBs-Required-ToBeReleased-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-DRBs-Required-ToBeReleased-Item CRITICALITY reject TYPE DRBs-Required-ToBeReleased-Item PRESENCE mandatory}, + ... +} + +SRBs-Required-ToBeReleased-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SRBs-Required-ToBeReleased-Item CRITICALITY reject TYPE SRBs-Required-ToBeReleased-Item PRESENCE mandatory}, + ... +} + +BHChannels-Required-ToBeReleased-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-BHChannels-Required-ToBeReleased-Item CRITICALITY reject TYPE BHChannels-Required-ToBeReleased-Item PRESENCE mandatory}, + ... +} + +SLDRBs-Required-ToBeModified-List::= SEQUENCE (SIZE(1..maxnoofSLDRBs)) OF ProtocolIE-SingleContainer { { SLDRBs-Required-ToBeModified-ItemIEs } } +SLDRBs-Required-ToBeReleased-List::= SEQUENCE (SIZE(1..maxnoofSLDRBs)) OF ProtocolIE-SingleContainer { { SLDRBs-Required-ToBeReleased-ItemIEs } } + +SLDRBs-Required-ToBeModified-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SLDRBs-Required-ToBeModified-Item CRITICALITY reject TYPE SLDRBs-Required-ToBeModified-Item PRESENCE mandatory}, + ... +} + +SLDRBs-Required-ToBeReleased-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SLDRBs-Required-ToBeReleased-Item CRITICALITY reject TYPE SLDRBs-Required-ToBeReleased-Item PRESENCE mandatory}, + ... +} + +-- ************************************************************** +-- +-- UE CONTEXT MODIFICATION CONFIRM +-- +-- ************************************************************** + +UEContextModificationConfirm::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UEContextModificationConfirmIEs} }, + ... +} + + +UEContextModificationConfirmIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-ResourceCoordinationTransferContainer CRITICALITY ignore TYPE ResourceCoordinationTransferContainer PRESENCE optional }| + { ID id-DRBs-ModifiedConf-List CRITICALITY ignore TYPE DRBs-ModifiedConf-List PRESENCE optional}| + { ID id-RRCContainer CRITICALITY ignore TYPE RRCContainer PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }| + { ID id-ExecuteDuplication CRITICALITY ignore TYPE ExecuteDuplication PRESENCE optional}| + { ID id-ResourceCoordinationTransferInformation CRITICALITY ignore TYPE ResourceCoordinationTransferInformation PRESENCE optional }| + { ID id-SLDRBs-ModifiedConf-List CRITICALITY ignore TYPE SLDRBs-ModifiedConf-List PRESENCE optional}, + ... +} + +DRBs-ModifiedConf-List::= SEQUENCE (SIZE(1..maxnoofDRBs)) OF ProtocolIE-SingleContainer { { DRBs-ModifiedConf-ItemIEs } } + +DRBs-ModifiedConf-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-DRBs-ModifiedConf-Item CRITICALITY ignore TYPE DRBs-ModifiedConf-Item PRESENCE mandatory}, + ... +} + +SLDRBs-ModifiedConf-List::= SEQUENCE (SIZE(1..maxnoofSLDRBs)) OF ProtocolIE-SingleContainer { { SLDRBs-ModifiedConf-ItemIEs } } + +SLDRBs-ModifiedConf-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-SLDRBs-ModifiedConf-Item CRITICALITY ignore TYPE SLDRBs-ModifiedConf-Item PRESENCE mandatory}, + ... +} + +-- ************************************************************** +-- +-- UE CONTEXT MODIFICATION REFUSE +-- +-- ************************************************************** + +UEContextModificationRefuse::= SEQUENCE { + protocolIEs ProtocolIE-Container { { UEContextModificationRefuseIEs} }, + ... +} + + +UEContextModificationRefuseIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + + +-- ************************************************************** +-- +-- WRITE-REPLACE WARNING ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Write-Replace Warning Request +-- +-- ************************************************************** + +WriteReplaceWarningRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {WriteReplaceWarningRequestIEs} }, + ... +} + +WriteReplaceWarningRequestIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-PWSSystemInformation CRITICALITY reject TYPE PWSSystemInformation PRESENCE mandatory }| + { ID id-RepetitionPeriod CRITICALITY reject TYPE RepetitionPeriod PRESENCE mandatory }| + { ID id-NumberofBroadcastRequest CRITICALITY reject TYPE NumberofBroadcastRequest PRESENCE mandatory }| + { ID id-Cells-To-Be-Broadcast-List CRITICALITY reject TYPE Cells-To-Be-Broadcast-List PRESENCE optional }, + ... +} + +Cells-To-Be-Broadcast-List ::= SEQUENCE (SIZE(1.. maxCellingNBDU)) OF ProtocolIE-SingleContainer { { Cells-To-Be-Broadcast-List-ItemIEs } } + +Cells-To-Be-Broadcast-List-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-Cells-To-Be-Broadcast-Item CRITICALITY reject TYPE Cells-To-Be-Broadcast-Item PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- Write-Replace Warning Response +-- +-- ************************************************************** + +WriteReplaceWarningResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {WriteReplaceWarningResponseIEs} }, + ... +} + +WriteReplaceWarningResponseIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-Cells-Broadcast-Completed-List CRITICALITY reject TYPE Cells-Broadcast-Completed-List PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }| + { ID id-Dedicated-SIDelivery-NeededUE-List CRITICALITY ignore TYPE Dedicated-SIDelivery-NeededUE-List PRESENCE optional }, + ... +} + +Cells-Broadcast-Completed-List ::= SEQUENCE (SIZE(1.. maxCellingNBDU)) OF ProtocolIE-SingleContainer { { Cells-Broadcast-Completed-List-ItemIEs } } + +Cells-Broadcast-Completed-List-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-Cells-Broadcast-Completed-Item CRITICALITY reject TYPE Cells-Broadcast-Completed-Item PRESENCE mandatory }, + ... +} + + +-- ************************************************************** +-- +-- PWS CANCEL ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- PWS Cancel Request +-- +-- ************************************************************** + +PWSCancelRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {PWSCancelRequestIEs} }, + ... +} + +PWSCancelRequestIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-NumberofBroadcastRequest CRITICALITY reject TYPE NumberofBroadcastRequest PRESENCE mandatory }| + { ID id-Broadcast-To-Be-Cancelled-List CRITICALITY reject TYPE Broadcast-To-Be-Cancelled-List PRESENCE optional }| + { ID id-Cancel-all-Warning-Messages-Indicator CRITICALITY reject TYPE Cancel-all-Warning-Messages-Indicator PRESENCE optional }| + { ID id-NotificationInformation CRITICALITY reject TYPE NotificationInformation PRESENCE optional}, + ... +} + +Broadcast-To-Be-Cancelled-List ::= SEQUENCE (SIZE(1.. maxCellingNBDU)) OF ProtocolIE-SingleContainer { { Broadcast-To-Be-Cancelled-List-ItemIEs } } + +Broadcast-To-Be-Cancelled-List-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-Broadcast-To-Be-Cancelled-Item CRITICALITY reject TYPE Broadcast-To-Be-Cancelled-Item PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- PWS Cancel Response +-- +-- ************************************************************** + +PWSCancelResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {PWSCancelResponseIEs} }, + ... +} + +PWSCancelResponseIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-Cells-Broadcast-Cancelled-List CRITICALITY reject TYPE Cells-Broadcast-Cancelled-List PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +Cells-Broadcast-Cancelled-List ::= SEQUENCE (SIZE(1.. maxCellingNBDU)) OF ProtocolIE-SingleContainer { { Cells-Broadcast-Cancelled-List-ItemIEs } } + +Cells-Broadcast-Cancelled-List-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-Cells-Broadcast-Cancelled-Item CRITICALITY reject TYPE Cells-Broadcast-Cancelled-Item PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- UE Inactivity Notification ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- UE Inactivity Notification +-- +-- ************************************************************** + +UEInactivityNotification ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ UEInactivityNotificationIEs}}, + ... +} + +UEInactivityNotificationIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-DRB-Activity-List CRITICALITY reject TYPE DRB-Activity-List PRESENCE mandatory } , + ... +} + +DRB-Activity-List::= SEQUENCE (SIZE(1..maxnoofDRBs)) OF ProtocolIE-SingleContainer { { DRB-Activity-ItemIEs } } + +DRB-Activity-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-DRB-Activity-Item CRITICALITY reject TYPE DRB-Activity-Item PRESENCE mandatory}, + ... +} + +-- ************************************************************** +-- +-- Initial UL RRC Message Transfer ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- INITIAL UL RRC Message Transfer +-- +-- ************************************************************** + +InitialULRRCMessageTransfer ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ InitialULRRCMessageTransferIEs}}, + ... +} + +InitialULRRCMessageTransferIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-NRCGI CRITICALITY reject TYPE NRCGI PRESENCE mandatory }| + { ID id-C-RNTI CRITICALITY reject TYPE C-RNTI PRESENCE mandatory }| + { ID id-RRCContainer CRITICALITY reject TYPE RRCContainer PRESENCE mandatory }| + { ID id-DUtoCURRCContainer CRITICALITY reject TYPE DUtoCURRCContainer PRESENCE optional }| + { ID id-SULAccessIndication CRITICALITY ignore TYPE SULAccessIndication PRESENCE optional }| + { ID id-TransactionID CRITICALITY ignore TYPE TransactionID PRESENCE mandatory }| + { ID id-RANUEID CRITICALITY ignore TYPE RANUEID PRESENCE optional }| + { ID id-RRCContainer-RRCSetupComplete CRITICALITY ignore TYPE RRCContainer-RRCSetupComplete PRESENCE optional }, + ... +} + + +-- ************************************************************** +-- +-- DL RRC Message Transfer ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- DL RRC Message Transfer +-- +-- ************************************************************** + +DLRRCMessageTransfer ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ DLRRCMessageTransferIEs}}, + ... +} + +DLRRCMessageTransferIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-oldgNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE optional }| + { ID id-SRBID CRITICALITY reject TYPE SRBID PRESENCE mandatory }| + { ID id-ExecuteDuplication CRITICALITY ignore TYPE ExecuteDuplication PRESENCE optional}| + { ID id-RRCContainer CRITICALITY reject TYPE RRCContainer PRESENCE mandatory }| + { ID id-RAT-FrequencyPriorityInformation CRITICALITY reject TYPE RAT-FrequencyPriorityInformation PRESENCE optional }| + { ID id-RRCDeliveryStatusRequest CRITICALITY ignore TYPE RRCDeliveryStatusRequest PRESENCE optional }| + { ID id-UEContextNotRetrievable CRITICALITY reject TYPE UEContextNotRetrievable PRESENCE optional }| + { ID id-RedirectedRRCmessage CRITICALITY reject TYPE OCTET STRING PRESENCE optional }| + { ID id-PLMNAssistanceInfoForNetShar CRITICALITY ignore TYPE PLMN-Identity PRESENCE optional }| + { ID id-new-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE optional }| + { ID id-AdditionalRRMPriorityIndex CRITICALITY ignore TYPE AdditionalRRMPriorityIndex PRESENCE optional }, + ... +} +-- ************************************************************** +-- +-- UL RRC Message Transfer ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- UL RRC Message Transfer +-- +-- ************************************************************** + +ULRRCMessageTransfer ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ ULRRCMessageTransferIEs}}, + ... +} + +ULRRCMessageTransferIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-SRBID CRITICALITY reject TYPE SRBID PRESENCE mandatory }| + { ID id-RRCContainer CRITICALITY reject TYPE RRCContainer PRESENCE mandatory }| + { ID id-SelectedPLMNID CRITICALITY reject TYPE PLMN-Identity PRESENCE optional }| + { ID id-new-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- PRIVATE MESSAGE +-- +-- ************************************************************** + +PrivateMessage ::= SEQUENCE { + privateIEs PrivateIE-Container {{PrivateMessage-IEs}}, + ... +} + +PrivateMessage-IEs F1AP-PRIVATE-IES ::= { + ... +} + + +-- ************************************************************** +-- +-- System Information ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- System information Delivery Command +-- +-- ************************************************************** + +SystemInformationDeliveryCommand ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ SystemInformationDeliveryCommandIEs}}, + ... +} + +SystemInformationDeliveryCommandIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-NRCGI CRITICALITY reject TYPE NRCGI PRESENCE mandatory }| + { ID id-SItype-List CRITICALITY reject TYPE SItype-List PRESENCE mandatory }| + { ID id-ConfirmedUEID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }, + ... +} + + +-- ************************************************************** +-- +-- Paging PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Paging +-- +-- ************************************************************** + +Paging ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ PagingIEs}}, + ... +} + +PagingIEs F1AP-PROTOCOL-IES ::= { + { ID id-UEIdentityIndexValue CRITICALITY reject TYPE UEIdentityIndexValue PRESENCE mandatory }| + { ID id-PagingIdentity CRITICALITY reject TYPE PagingIdentity PRESENCE mandatory }| + { ID id-PagingDRX CRITICALITY ignore TYPE PagingDRX PRESENCE optional }| + { ID id-PagingPriority CRITICALITY ignore TYPE PagingPriority PRESENCE optional }| + { ID id-PagingCell-List CRITICALITY ignore TYPE PagingCell-list PRESENCE mandatory }| + { ID id-PagingOrigin CRITICALITY ignore TYPE PagingOrigin PRESENCE optional }, + ... +} + +PagingCell-list::= SEQUENCE (SIZE(1.. maxnoofPagingCells)) OF ProtocolIE-SingleContainer { { PagingCell-ItemIEs } } + +PagingCell-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-PagingCell-Item CRITICALITY ignore TYPE PagingCell-Item PRESENCE mandatory} , + ... +} + + + +-- ************************************************************** +-- +-- Notify +-- +-- ************************************************************** + +Notify ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ NotifyIEs}}, + ... +} + +NotifyIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-DRB-Notify-List CRITICALITY reject TYPE DRB-Notify-List PRESENCE mandatory }, + ... +} + +DRB-Notify-List::= SEQUENCE (SIZE(1.. maxnoofDRBs)) OF ProtocolIE-SingleContainer { { DRB-Notify-ItemIEs } } + +DRB-Notify-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-DRB-Notify-Item CRITICALITY reject TYPE DRB-Notify-Item PRESENCE mandatory}, + ... +} + + +-- ************************************************************** +-- +-- NETWORK ACCESS RATE REDUCTION ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Network Access Rate Reduction +-- +-- ************************************************************** + +NetworkAccessRateReduction ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ NetworkAccessRateReductionIEs }}, + ... +} + +NetworkAccessRateReductionIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-UAC-Assistance-Info CRITICALITY reject TYPE UAC-Assistance-Info PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- PWS RESTART INDICATION ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- PWS Restart Indication +-- +-- ************************************************************** + +PWSRestartIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { PWSRestartIndicationIEs} }, + ... +} + +PWSRestartIndicationIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-NR-CGI-List-For-Restart-List CRITICALITY reject TYPE NR-CGI-List-For-Restart-List PRESENCE mandatory }, + ... +} + +NR-CGI-List-For-Restart-List ::= SEQUENCE (SIZE(1.. maxCellingNBDU)) OF ProtocolIE-SingleContainer { { NR-CGI-List-For-Restart-List-ItemIEs } } + +NR-CGI-List-For-Restart-List-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-NR-CGI-List-For-Restart-Item CRITICALITY reject TYPE NR-CGI-List-For-Restart-Item PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- PWS FAILURE INDICATION ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- PWS Failure Indication +-- +-- ************************************************************** + +PWSFailureIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { PWSFailureIndicationIEs} }, + ... +} + +PWSFailureIndicationIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-PWS-Failed-NR-CGI-List CRITICALITY reject TYPE PWS-Failed-NR-CGI-List PRESENCE optional }, + ... +} + +PWS-Failed-NR-CGI-List ::= SEQUENCE (SIZE(1.. maxCellingNBDU)) OF ProtocolIE-SingleContainer { { PWS-Failed-NR-CGI-List-ItemIEs } } + +PWS-Failed-NR-CGI-List-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-PWS-Failed-NR-CGI-Item CRITICALITY reject TYPE PWS-Failed-NR-CGI-Item PRESENCE mandatory }, + ... +} + + +-- ************************************************************** +-- +-- gNB-DU STATUS INDICATION ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- gNB-DU Status Indication +-- +-- ************************************************************** + +GNBDUStatusIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {GNBDUStatusIndicationIEs} }, + ... +} + +GNBDUStatusIndicationIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-GNBDUOverloadInformation CRITICALITY reject TYPE GNBDUOverloadInformation PRESENCE mandatory }, + ... +} + + + +-- ************************************************************** +-- +-- RRC Delivery Report ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- RRC Delivery Report +-- +-- ************************************************************** + +RRCDeliveryReport ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ RRCDeliveryReportIEs}}, + ... +} + +RRCDeliveryReportIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-RRCDeliveryStatus CRITICALITY ignore TYPE RRCDeliveryStatus PRESENCE mandatory }| + { ID id-SRBID CRITICALITY ignore TYPE SRBID PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- F1 Removal ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- F1 Removal Request +-- +-- ************************************************************** + +F1RemovalRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ F1RemovalRequestIEs }}, + ... +} + +F1RemovalRequestIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- F1 Removal Response +-- +-- ************************************************************** + +F1RemovalResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ F1RemovalResponseIEs }}, + ... +} + +F1RemovalResponseIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + + ... +} + +-- ************************************************************** +-- +-- F1 Removal Failure +-- +-- ************************************************************** + +F1RemovalFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ F1RemovalFailureIEs }}, + ... +} + +F1RemovalFailureIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + + ... +} + + +-- ************************************************************** +-- +-- TRACE ELEMENTARY PROCEDURES +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- TRACE START +-- +-- ************************************************************** + +TraceStart ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {TraceStartIEs} }, + ... +} + +TraceStartIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-TraceActivation CRITICALITY ignore TYPE TraceActivation PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- DEACTIVATE TRACE +-- +-- ************************************************************** + +DeactivateTrace ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {DeactivateTraceIEs} }, + ... +} + +DeactivateTraceIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-TraceID CRITICALITY ignore TYPE TraceID PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- CELL TRAFFIC TRACE +-- +-- ************************************************************** + +CellTrafficTrace ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {CellTrafficTraceIEs} }, + ... +} + +CellTrafficTraceIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + {ID id-TraceID CRITICALITY ignore TYPE TraceID PRESENCE mandatory }| + {ID id-TraceCollectionEntityIPAddress CRITICALITY ignore TYPE TransportLayerAddress PRESENCE mandatory }| + {ID id-PrivacyIndicator CRITICALITY ignore TYPE PrivacyIndicator PRESENCE optional }| + + {ID id-TraceCollectionEntityURI CRITICALITY ignore TYPE URI-address PRESENCE optional }, + ... + +} + +-- ************************************************************** +-- +-- DU-CU Radio Information Transfer ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- DU-CU Radio Information Transfer +-- +-- ************************************************************** + +DUCURadioInformationTransfer ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ DUCURadioInformationTransferIEs}}, + ... +} + +DUCURadioInformationTransferIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-DUCURadioInformationType CRITICALITY ignore TYPE DUCURadioInformationType PRESENCE mandatory }, + ... +} + + + +-- ************************************************************** +-- +-- CU-DU Radio Information Transfer ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- CU-DU Radio Information Transfer +-- +-- ************************************************************** + +CUDURadioInformationTransfer ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ CUDURadioInformationTransferIEs}}, + ... +} + +CUDURadioInformationTransferIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-CUDURadioInformationType CRITICALITY ignore TYPE CUDURadioInformationType PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- IAB PROCEDURES +-- +-- ************************************************************** +-- ************************************************************** +-- +-- BAP Mapping Configuration ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- BAP MAPPING CONFIGURATION +-- ************************************************************** + + +BAPMappingConfiguration ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {BAPMappingConfiguration-IEs} }, + ... + } + +BAPMappingConfiguration-IEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory}| + { ID id-BH-Routing-Information-Added-List CRITICALITY ignore TYPE BH-Routing-Information-Added-List PRESENCE optional}| + { ID id-BH-Routing-Information-Removed-List CRITICALITY ignore TYPE BH-Routing-Information-Removed-List PRESENCE optional}| + { ID id-TrafficMappingInformation CRITICALITY ignore TYPE TrafficMappingInfo PRESENCE optional}, + ... +} + +BH-Routing-Information-Added-List ::= SEQUENCE (SIZE(1.. maxnoofRoutingEntries)) OF ProtocolIE-SingleContainer { { BH-Routing-Information-Added-List-ItemIEs } } +BH-Routing-Information-Removed-List ::= SEQUENCE (SIZE(1.. maxnoofRoutingEntries)) OF ProtocolIE-SingleContainer { { BH-Routing-Information-Removed-List-ItemIEs } } + +BH-Routing-Information-Added-List-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-BH-Routing-Information-Added-List-Item CRITICALITY ignore TYPE BH-Routing-Information-Added-List-Item PRESENCE optional}, + ... +} + +BH-Routing-Information-Removed-List-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-BH-Routing-Information-Removed-List-Item CRITICALITY ignore TYPE BH-Routing-Information-Removed-List-Item PRESENCE optional}, + ... +} + + +-- ************************************************************** +-- +-- BAP MAPPING CONFIGURATION ACKNOWLEDGE +-- ************************************************************** + +BAPMappingConfigurationAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {BAPMappingConfigurationAcknowledge-IEs} }, + ... +} + +BAPMappingConfigurationAcknowledge-IEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}, + ... +} + + + +-- ************************************************************** +-- +-- GNB-DU Configuration ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- GNB-DU RESOURCE CONFIGURATION +-- ************************************************************** + + +GNBDUResourceConfiguration ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ GNBDUResourceConfigurationIEs}}, + ... +} + + +GNBDUResourceConfigurationIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-Activated-Cells-to-be-Updated-List CRITICALITY reject TYPE Activated-Cells-to-be-Updated-List PRESENCE optional}| + { ID id-Child-Nodes-List CRITICALITY reject TYPE Child-Nodes-List PRESENCE optional}, + ... +} + + + + +-- ************************************************************** +-- +-- GNB-DU RESOURCE CONFIGURATION ACKNOWLEDGE +-- ************************************************************** + + +GNBDUResourceConfigurationAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { GNBDUResourceConfigurationAcknowledgeIEs} }, + ... +} + + +GNBDUResourceConfigurationAcknowledgeIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- IAB TNL Address Allocation ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- IAB TNL ADDRESS REQUEST +-- ************************************************************** + + + +IABTNLAddressRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {IABTNLAddressRequestIEs} }, + ... +} + +IABTNLAddressRequestIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-IABv4AddressesRequested CRITICALITY reject TYPE IABv4AddressesRequested PRESENCE optional }| + { ID id-IABIPv6RequestType CRITICALITY reject TYPE IABIPv6RequestType PRESENCE optional }| + { ID id-IAB-TNL-Addresses-To-Remove-List CRITICALITY reject TYPE IAB-TNL-Addresses-To-Remove-List PRESENCE optional }, + ... +} + + +IAB-TNL-Addresses-To-Remove-List ::= SEQUENCE (SIZE(1..maxnoofTLAsIAB)) OF ProtocolIE-SingleContainer { { IAB-TNL-Addresses-To-Remove-ItemIEs } } + +IAB-TNL-Addresses-To-Remove-ItemIEs F1AP-PROTOCOL-IES::= { + { ID id-IAB-TNL-Addresses-To-Remove-Item CRITICALITY reject TYPE IAB-TNL-Addresses-To-Remove-Item PRESENCE mandatory}, + ... +} + + +-- ************************************************************** +-- +-- IAB TNL ADDRESS RESPONSE +-- ************************************************************** + + +IABTNLAddressResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {IABTNLAddressResponseIEs} }, + ... +} + + +IABTNLAddressResponseIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-IAB-Allocated-TNL-Address-List CRITICALITY reject TYPE IAB-Allocated-TNL-Address-List PRESENCE mandatory }, + ... +} + + +IAB-Allocated-TNL-Address-List ::= SEQUENCE (SIZE(1.. maxnoofTLAsIAB)) OF ProtocolIE-SingleContainer { { IAB-Allocated-TNL-Address-List-ItemIEs } } + + +IAB-Allocated-TNL-Address-List-ItemIEs F1AP-PROTOCOL-IES::= { + { ID id-IAB-Allocated-TNL-Address-Item CRITICALITY reject TYPE IAB-Allocated-TNL-Address-Item PRESENCE mandatory}, + ... +} + +-- ************************************************************** +-- +-- IAB UP Configuration Update ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- IAB UP Configuration Update Request +-- +-- ************************************************************** + +IABUPConfigurationUpdateRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { IABUPConfigurationUpdateRequestIEs} }, + ... +} + +IABUPConfigurationUpdateRequestIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-UL-UP-TNL-Information-to-Update-List CRITICALITY ignore TYPE UL-UP-TNL-Information-to-Update-List PRESENCE optional }| + { ID id-UL-UP-TNL-Address-to-Update-List CRITICALITY ignore TYPE UL-UP-TNL-Address-to-Update-List PRESENCE optional }, + ... +} + +UL-UP-TNL-Information-to-Update-List ::= SEQUENCE (SIZE(1.. maxnoofULUPTNLInformationforIAB)) OF ProtocolIE-SingleContainer { { UL-UP-TNL-Information-to-Update-List-ItemIEs } } + +UL-UP-TNL-Information-to-Update-List-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-UL-UP-TNL-Information-to-Update-List-Item CRITICALITY ignore TYPE UL-UP-TNL-Information-to-Update-List-Item PRESENCE optional}, + ... +} + +UL-UP-TNL-Address-to-Update-List ::= SEQUENCE (SIZE(1.. maxnoofUPTNLAddresses)) OF ProtocolIE-SingleContainer { { UL-UP-TNL-Address-to-Update-List-ItemIEs } } + +UL-UP-TNL-Address-to-Update-List-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-UL-UP-TNL-Address-to-Update-List-Item CRITICALITY ignore TYPE UL-UP-TNL-Address-to-Update-List-Item PRESENCE optional}, + ... +} + + +-- ************************************************************** +-- +-- IAB UP Configuration Update Response +-- +-- ************************************************************** + +IABUPConfigurationUpdateResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { IABUPConfigurationUpdateResponseIEs} }, + ... +} + +IABUPConfigurationUpdateResponseIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }| + { ID id-DL-UP-TNL-Address-to-Update-List CRITICALITY reject TYPE DL-UP-TNL-Address-to-Update-List PRESENCE optional }, + ... +} + +DL-UP-TNL-Address-to-Update-List ::= SEQUENCE (SIZE(1.. maxnoofUPTNLAddresses)) OF ProtocolIE-SingleContainer { { DL-UP-TNL-Address-to-Update-List-ItemIEs } } + +DL-UP-TNL-Address-to-Update-List-ItemIEs F1AP-PROTOCOL-IES ::= { + { ID id-DL-UP-TNL-Address-to-Update-List-Item CRITICALITY ignore TYPE DL-UP-TNL-Address-to-Update-List-Item PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- IAB UP Configuration Update Failure +-- +-- ************************************************************** + +IABUPConfigurationUpdateFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { IABUPConfigurationUpdateFailureIEs} }, + ... +} + +IABUPConfigurationUpdateFailureIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-TimeToWait CRITICALITY ignore TYPE TimeToWait PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- Resource Status Reporting Initiation ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Resource Status Request +-- +-- ************************************************************** + +ResourceStatusRequest::= SEQUENCE { + protocolIEs ProtocolIE-Container { {ResourceStatusRequestIEs} }, + ... +} + +ResourceStatusRequestIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-gNBCUMeasurementID CRITICALITY reject TYPE GNBCUMeasurementID PRESENCE mandatory }| + { ID id-gNBDUMeasurementID CRITICALITY ignore TYPE GNBDUMeasurementID PRESENCE conditional }| + { ID id-RegistrationRequest CRITICALITY ignore TYPE RegistrationRequest PRESENCE mandatory }| + { ID id-ReportCharacteristics CRITICALITY ignore TYPE ReportCharacteristics PRESENCE conditional }| + { ID id-CellToReportList CRITICALITY ignore TYPE CellToReportList PRESENCE optional }| + { ID id-ReportingPeriodicity CRITICALITY ignore TYPE ReportingPeriodicity PRESENCE optional }, + ... +} + + +-- ************************************************************** +-- +-- Resource Status Response +-- +-- ************************************************************** + +ResourceStatusResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { ResourceStatusResponseIEs} }, + ... +} + + +ResourceStatusResponseIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-gNBCUMeasurementID CRITICALITY reject TYPE GNBCUMeasurementID PRESENCE mandatory }| + { ID id-gNBDUMeasurementID CRITICALITY ignore TYPE GNBDUMeasurementID PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + + +-- ************************************************************** +-- +-- Resource Status Failure +-- +-- ************************************************************** + +ResourceStatusFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { ResourceStatusFailureIEs} }, + ... +} + +ResourceStatusFailureIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-gNBCUMeasurementID CRITICALITY reject TYPE GNBCUMeasurementID PRESENCE mandatory }| + { ID id-gNBDUMeasurementID CRITICALITY ignore TYPE GNBDUMeasurementID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- Resource Status Reporting ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Resource Status Update +-- +-- ************************************************************** + +ResourceStatusUpdate ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ ResourceStatusUpdateIEs}}, + ... +} + +ResourceStatusUpdateIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-gNBCUMeasurementID CRITICALITY reject TYPE GNBCUMeasurementID PRESENCE mandatory }| + { ID id-gNBDUMeasurementID CRITICALITY ignore TYPE GNBDUMeasurementID PRESENCE mandatory }| + { ID id-HardwareLoadIndicator CRITICALITY ignore TYPE HardwareLoadIndicator PRESENCE optional }| + { ID id-TNLCapacityIndicator CRITICALITY ignore TYPE TNLCapacityIndicator PRESENCE optional }| + { ID id-CellMeasurementResultList CRITICALITY ignore TYPE CellMeasurementResultList PRESENCE optional }, + ... +} + +-- ************************************************************** +-- +-- Access And Mobility Indication ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Access And Mobility Indication +-- +-- ************************************************************** + +AccessAndMobilityIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { AccessAndMobilityIndicationIEs} }, + ... +} + +AccessAndMobilityIndicationIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-RACHReportInformationList CRITICALITY ignore TYPE RACHReportInformationList PRESENCE optional }| + { ID id-RLFReportInformationList CRITICALITY ignore TYPE RLFReportInformationList PRESENCE optional }, + ... +} + + +-- ************************************************************** +-- +-- REFERENCE TIME INFORMATION REPORTING CONTROL +-- +-- ************************************************************** + +ReferenceTimeInformationReportingControl::= SEQUENCE { + protocolIEs ProtocolIE-Container { { ReferenceTimeInformationReportingControlIEs} }, + ... +} + +ReferenceTimeInformationReportingControlIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-ReportingRequestType CRITICALITY reject TYPE ReportingRequestType PRESENCE mandatory }, + ... +} + + +-- ************************************************************** +-- +-- REFERENCE TIME INFORMATION REPORT +-- +-- ************************************************************** + +ReferenceTimeInformationReport::= SEQUENCE { + protocolIEs ProtocolIE-Container { { ReferenceTimeInformationReportIEs} }, + ... +} + +ReferenceTimeInformationReportIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY ignore TYPE TransactionID PRESENCE mandatory }| + { ID id-TimeReferenceInformation CRITICALITY ignore TYPE TimeReferenceInformation PRESENCE mandatory }, + ... +} + + +-- ************************************************************** +-- +-- Access Success +-- +-- ************************************************************** + +AccessSuccess ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ AccessSuccessIEs}}, + ... +} + +AccessSuccessIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-NRCGI CRITICALITY reject TYPE NRCGI PRESENCE mandatory }, + ... +} + + +-- ************************************************************** +-- +-- POSITIONING ASSISTANCE INFORMATION CONTROL ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Positioning Assistance Information Control +-- +-- ************************************************************** + +PositioningAssistanceInformationControl ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ PositioningAssistanceInformationControlIEs}}, + ... +} + +PositioningAssistanceInformationControlIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-PosAssistance-Information CRITICALITY reject TYPE PosAssistance-Information PRESENCE optional}| + { ID id-PosBroadcast CRITICALITY reject TYPE PosBroadcast PRESENCE optional}| + { ID id-PositioningBroadcastCells CRITICALITY reject TYPE PositioningBroadcastCells PRESENCE optional}| + { ID id-RoutingID CRITICALITY reject TYPE RoutingID PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- POSITIONING ASSISTANCE INFORMATION FEEDBACK ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Positioning Assistance Information Feedback +-- +-- ************************************************************** + +PositioningAssistanceInformationFeedback ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ PositioningAssistanceInformationFeedbackIEs}}, + ... +} + +PositioningAssistanceInformationFeedbackIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-PosAssistanceInformationFailureList CRITICALITY reject TYPE PosAssistanceInformationFailureList PRESENCE optional}| + { ID id-PositioningBroadcastCells CRITICALITY reject TYPE PositioningBroadcastCells PRESENCE optional}| + { ID id-RoutingID CRITICALITY reject TYPE RoutingID PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- POSITONING MEASUREMENT EXCHANGE ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Positioning Measurement Request +-- +-- ************************************************************** + +PositioningMeasurementRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { PositioningMeasurementRequestIEs} }, + ... +} + +PositioningMeasurementRequestIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory}| + { ID id-LMF-MeasurementID CRITICALITY reject TYPE LMF-MeasurementID PRESENCE mandatory}| + { ID id-RAN-MeasurementID CRITICALITY reject TYPE RAN-MeasurementID PRESENCE mandatory}| + { ID id-TRP-MeasurementRequestList CRITICALITY reject TYPE TRP-MeasurementRequestList PRESENCE mandatory}| + { ID id-PosReportCharacteristics CRITICALITY reject TYPE PosReportCharacteristics PRESENCE mandatory}| + { ID id-PosMeasurementPeriodicity CRITICALITY reject TYPE PosMeasurementPeriodicity PRESENCE conditional }| + -- The above IE shall be present if the PosReportCharacteristics IE is set to “periodic” -- + { ID id-PosMeasurementQuantities CRITICALITY reject TYPE PosMeasurementQuantities PRESENCE mandatory}| + { ID id-SFNInitialisationTime CRITICALITY ignore TYPE SFNInitialisationTime PRESENCE optional }| + { ID id-SRSConfiguration CRITICALITY ignore TYPE SRSConfiguration PRESENCE optional}| + { ID id-MeasurementBeamInfoRequest CRITICALITY ignore TYPE MeasurementBeamInfoRequest PRESENCE optional }| + { ID id-SystemFrameNumber CRITICALITY ignore TYPE SystemFrameNumber PRESENCE optional}| + { ID id-SlotNumber CRITICALITY ignore TYPE SlotNumber PRESENCE optional}, + ... +} + + +-- ************************************************************** +-- +-- Positioning Measurement Response +-- +-- ************************************************************** + +PositioningMeasurementResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { PositioningMeasurementResponseIEs} }, + ... +} + + +PositioningMeasurementResponseIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory}| + { ID id-LMF-MeasurementID CRITICALITY reject TYPE LMF-MeasurementID PRESENCE mandatory}| + { ID id-RAN-MeasurementID CRITICALITY reject TYPE RAN-MeasurementID PRESENCE mandatory}| + { ID id-PosMeasurementResultList CRITICALITY reject TYPE PosMeasurementResultList PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + + +-- ************************************************************** +-- +-- Positioning Measurement Failure +-- +-- ************************************************************** + +PositioningMeasurementFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { PositioningMeasurementFailureIEs} }, + ... +} + +PositioningMeasurementFailureIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-LMF-MeasurementID CRITICALITY reject TYPE LMF-MeasurementID PRESENCE mandatory }| + { ID id-RAN-MeasurementID CRITICALITY reject TYPE RAN-MeasurementID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + + +-- ************************************************************** +-- +-- POSITIONING MEASUREMENT REPORT ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Positioning Measurement Report +-- +-- ************************************************************** + +PositioningMeasurementReport ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { PositioningMeasurementReportIEs} }, + ... +} + +PositioningMeasurementReportIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-LMF-MeasurementID CRITICALITY reject TYPE LMF-MeasurementID PRESENCE mandatory }| + { ID id-RAN-MeasurementID CRITICALITY reject TYPE RAN-MeasurementID PRESENCE mandatory }| + { ID id-PosMeasurementResultList CRITICALITY reject TYPE PosMeasurementResultList PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- POSITIONING MEASUREMENT ABORT ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Positioning Measurement Abort +-- +-- ************************************************************** + +PositioningMeasurementAbort ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { PositioningMeasurementAbortIEs} }, + ... +} + +PositioningMeasurementAbortIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-LMF-MeasurementID CRITICALITY reject TYPE LMF-MeasurementID PRESENCE mandatory }| + { ID id-RAN-MeasurementID CRITICALITY reject TYPE RAN-MeasurementID PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- POSITIONING MEASUREMENT FAILURE INDICATION ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Positioning Measurement Failure Indication +-- +-- ************************************************************** + +PositioningMeasurementFailureIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { PositioningMeasurementFailureIndicationIEs} }, + ... +} + +PositioningMeasurementFailureIndicationIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-LMF-MeasurementID CRITICALITY reject TYPE LMF-MeasurementID PRESENCE mandatory }| + { ID id-RAN-MeasurementID CRITICALITY reject TYPE RAN-MeasurementID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- POSITIONING MEASUREMENT UPDATE ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Positioning Measurement Update +-- +-- ************************************************************** + +PositioningMeasurementUpdate ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { PositioningMeasurementUpdateIEs} }, + ... +} + +PositioningMeasurementUpdateIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-LMF-MeasurementID CRITICALITY reject TYPE LMF-MeasurementID PRESENCE mandatory }| + { ID id-RAN-MeasurementID CRITICALITY reject TYPE RAN-MeasurementID PRESENCE mandatory }| + { ID id-SRSConfiguration CRITICALITY ignore TYPE SRSConfiguration PRESENCE optional}, + ... +} + + +-- ************************************************************** +-- +-- TRP INFORMATION EXCHANGE ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- TRP Information Request +-- +-- ************************************************************** + +TRPInformationRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { TRPInformationRequestIEs} }, + ... +} + +TRPInformationRequestIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-TRPList CRITICALITY ignore TYPE TRPList PRESENCE optional }| + { ID id-TRPInformationTypeListTRPReq CRITICALITY reject TYPE TRPInformationTypeListTRPReq PRESENCE mandatory }, + ... +} + +TRPInformationTypeListTRPReq ::= SEQUENCE (SIZE(1.. maxnoofTRPInfoTypes)) OF ProtocolIE-SingleContainer { { TRPInformationTypeItemTRPReq } } + +TRPInformationTypeItemTRPReq F1AP-PROTOCOL-IES ::= { + { ID id-TRPInformationTypeItem CRITICALITY reject TYPE TRPInformationTypeItem PRESENCE mandatory }, + ... +} + + +-- ************************************************************** +-- +-- TRP Information Response +-- +-- ************************************************************** + +TRPInformationResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { TRPInformationResponseIEs} }, + ... +} + +TRPInformationResponseIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-TRPInformationListTRPResp CRITICALITY ignore TYPE TRPInformationListTRPResp PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +TRPInformationListTRPResp ::= SEQUENCE (SIZE(1.. maxnoofTRPs)) OF ProtocolIE-SingleContainer { { TRPInformationItemTRPResp } } + +TRPInformationItemTRPResp F1AP-PROTOCOL-IES ::= { + { ID id-TRPInformationItem CRITICALITY ignore TYPE TRPInformationItem PRESENCE mandatory }, + ... +} + + +-- ************************************************************** +-- +-- TRP Information Failure +-- +-- ************************************************************** + +TRPInformationFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { TRPInformationFailureIEs} }, + ... +} + +TRPInformationFailureIEs F1AP-PROTOCOL-IES ::= { + { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + + +-- ************************************************************** +-- +-- POSITIONING INFORMATION EXCHANGE ELEMENTARY PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Positioning Information Request +-- +-- ************************************************************** + +PositioningInformationRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { PositioningInformationRequestIEs} }, + ... +} + +PositioningInformationRequestIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-RequestedSRSTransmissionCharacteristics CRITICALITY ignore TYPE RequestedSRSTransmissionCharacteristics PRESENCE optional}, + ... +} + + +-- ************************************************************** +-- +-- Positioning Information Response +-- +-- ************************************************************** + +PositioningInformationResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { PositioningInformationResponseIEs} }, + ... +} + + +PositioningInformationResponseIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-SRSConfiguration CRITICALITY ignore TYPE SRSConfiguration PRESENCE optional}| + { ID id-SFNInitialisationTime CRITICALITY ignore TYPE SFNInitialisationTime PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + + +-- ************************************************************** +-- +-- Positioning Information Failure +-- +-- ************************************************************** + +PositioningInformationFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { PositioningInformationFailureIEs} }, + ... +} + +PositioningInformationFailureIEs F1AP-PROTOCOL-IES ::= { + + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + + +-- ************************************************************** +-- +-- POSITIONING ACTIVATION PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Positioning Activation Request +-- +-- ************************************************************** + +PositioningActivationRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { PositioningActivationRequestIEs} }, + ... +} + +PositioningActivationRequestIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-SRSType CRITICALITY reject TYPE SRSType PRESENCE mandatory }| + { ID id-ActivationTime CRITICALITY ignore TYPE SFNInitialisationTime PRESENCE optional }, + ... +} + +SRSType ::= CHOICE { + semipersistentSRS SemipersistentSRS, + aperiodicSRS AperiodicSRS, + choice-extension ProtocolIE-SingleContainer { { SRSType-ExtIEs} } +} + +SRSType-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + +SemipersistentSRS ::= SEQUENCE { + sRSResourceSetID SRSResourceSetID, + sRSSpatialRelation SRSSpatialRelation OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {SemipersistentSRS-ExtIEs} } OPTIONAL, + ... +} + +SemipersistentSRS-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +AperiodicSRS ::= SEQUENCE { + aperiodic ENUMERATED {true, ...}, + sRSResourceTrigger SRSResourceTrigger OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {AperiodicSRS-ExtIEs} } OPTIONAL, + ... +} + +AperiodicSRS-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + + +-- ************************************************************** +-- +-- Positioning Activation Response +-- +-- ************************************************************** + +PositioningActivationResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { PositioningActivationResponseIEs} }, + ... +} + + +PositioningActivationResponseIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-SystemFrameNumber CRITICALITY ignore TYPE SystemFrameNumber PRESENCE optional }| + { ID id-SlotNumber CRITICALITY ignore TYPE SlotNumber PRESENCE optional }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + + + + +-- ************************************************************** +-- +-- Positioning Activation Failure +-- +-- ************************************************************** + +PositioningActivationFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { PositioningActivationFailureIEs} }, + ... +} + +PositioningActivationFailureIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + + +-- ************************************************************** +-- +-- POSITIONING DEACTIVATION PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Positioning Deactivation +-- +-- ************************************************************** + +PositioningDeactivation ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { PositioningDeactivationIEs} }, + ... +} + +PositioningDeactivationIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-AbortTransmission CRITICALITY ignore TYPE AbortTransmission PRESENCE mandatory }, + ... +} + +-- ************************************************************** +-- +-- POSITIONING INFORMATION UPDATE PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- Positioning Information Update +-- +-- ************************************************************** + +PositioningInformationUpdate ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { PositioningInformationUpdateIEs} }, + ... +} + + +PositioningInformationUpdateIEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-SRSConfiguration CRITICALITY ignore TYPE SRSConfiguration PRESENCE optional}| + { ID id-SFNInitialisationTime CRITICALITY ignore TYPE SFNInitialisationTime PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- E-CID MEASUREMENT PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- E-CID Measurement Initiation Request +-- +-- ************************************************************** + +E-CIDMeasurementInitiationRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{E-CIDMeasurementInitiationRequest-IEs}}, + ... +} + +E-CIDMeasurementInitiationRequest-IEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY reject TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY reject TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-LMF-UE-MeasurementID CRITICALITY reject TYPE LMF-UE-MeasurementID PRESENCE mandatory }| + { ID id-RAN-UE-MeasurementID CRITICALITY reject TYPE RAN-UE-MeasurementID PRESENCE mandatory }| + { ID id-E-CID-ReportCharacteristics CRITICALITY reject TYPE E-CID-ReportCharacteristics PRESENCE mandatory }| + { ID id-E-CID-MeasurementPeriodicity CRITICALITY reject TYPE E-CID-MeasurementPeriodicity PRESENCE conditional }| +-- The above IE shall be present if the E-CID-ReportCharacteristics IE is set to “periodic” –- + { ID id-E-CID-MeasurementQuantities CRITICALITY reject TYPE E-CID-MeasurementQuantities PRESENCE mandatory}, + ... +} + +-- ************************************************************** +-- +-- E-CID Measurement Initiation Response +-- +-- ************************************************************** + +E-CIDMeasurementInitiationResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{E-CIDMeasurementInitiationResponse-IEs}}, + ... +} + +E-CIDMeasurementInitiationResponse-IEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY ignore TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY ignore TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-LMF-UE-MeasurementID CRITICALITY reject TYPE LMF-UE-MeasurementID PRESENCE mandatory }| + { ID id-RAN-UE-MeasurementID CRITICALITY reject TYPE RAN-UE-MeasurementID PRESENCE mandatory }| + { ID id-E-CID-MeasurementResult CRITICALITY ignore TYPE E-CID-MeasurementResult PRESENCE optional}| + { ID id-Cell-Portion-ID CRITICALITY ignore TYPE Cell-Portion-ID PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- E-CID Measurement Initiation Failure +-- +-- ************************************************************** + +E-CIDMeasurementInitiationFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{E-CIDMeasurementInitiationFailure-IEs}}, + ... +} + + +E-CIDMeasurementInitiationFailure-IEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY ignore TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY ignore TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-LMF-UE-MeasurementID CRITICALITY reject TYPE LMF-UE-MeasurementID PRESENCE mandatory }| + { ID id-RAN-UE-MeasurementID CRITICALITY reject TYPE RAN-UE-MeasurementID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}, + ... +} + +-- ************************************************************** +-- +-- E-CID MEASUREMENT FAILURE INDICATION PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- E-CID Measurement Failure Indication +-- +-- ************************************************************** + +E-CIDMeasurementFailureIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{E-CIDMeasurementFailureIndication-IEs}}, + ... +} + + +E-CIDMeasurementFailureIndication-IEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY ignore TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY ignore TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-LMF-UE-MeasurementID CRITICALITY reject TYPE LMF-UE-MeasurementID PRESENCE mandatory }| + { ID id-RAN-UE-MeasurementID CRITICALITY reject TYPE RAN-UE-MeasurementID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}, + ... +} + +-- ************************************************************** +-- +-- E-CID MEASUREMENT REPORT PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- E-CID Measurement Report +-- +-- ************************************************************** + +E-CIDMeasurementReport ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{E-CIDMeasurementReport-IEs}}, + ... +} + + +E-CIDMeasurementReport-IEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY ignore TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY ignore TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-LMF-UE-MeasurementID CRITICALITY reject TYPE LMF-UE-MeasurementID PRESENCE mandatory }| + { ID id-RAN-UE-MeasurementID CRITICALITY reject TYPE RAN-UE-MeasurementID PRESENCE mandatory }| + { ID id-E-CID-MeasurementResult CRITICALITY ignore TYPE E-CID-MeasurementResult PRESENCE mandatory }| + { ID id-Cell-Portion-ID CRITICALITY ignore TYPE Cell-Portion-ID PRESENCE optional}, + + ... +} + +-- ************************************************************** +-- +-- E-CID MEASUREMENT TERMINATION PROCEDURE +-- +-- ************************************************************** + +-- ************************************************************** +-- +-- E-CID Measurement Termination Command +-- +-- ************************************************************** + + +E-CIDMeasurementTerminationCommand ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{E-CIDMeasurementTerminationCommand-IEs}}, + ... +} + + +E-CIDMeasurementTerminationCommand-IEs F1AP-PROTOCOL-IES ::= { + { ID id-gNB-CU-UE-F1AP-ID CRITICALITY ignore TYPE GNB-CU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-gNB-DU-UE-F1AP-ID CRITICALITY ignore TYPE GNB-DU-UE-F1AP-ID PRESENCE mandatory }| + { ID id-LMF-UE-MeasurementID CRITICALITY reject TYPE LMF-UE-MeasurementID PRESENCE mandatory }| + { ID id-RAN-UE-MeasurementID CRITICALITY reject TYPE RAN-UE-MeasurementID PRESENCE mandatory }, + ... +} + + + +END diff --git a/openair2/F1AP/MESSAGES/ASN1/R16.3.1/F1AP-PDU-Descriptions.asn b/openair2/F1AP/MESSAGES/ASN1/R16.3.1/F1AP-PDU-Descriptions.asn new file mode 100644 index 0000000000..6ec795ab10 --- /dev/null +++ b/openair2/F1AP/MESSAGES/ASN1/R16.3.1/F1AP-PDU-Descriptions.asn @@ -0,0 +1,723 @@ +-- ************************************************************** +-- +-- Elementary Procedure definitions +-- +-- ************************************************************** + +F1AP-PDU-Descriptions { +itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) +ngran-access (22) modules (3) f1ap (3) version1 (1) f1ap-PDU-Descriptions (0)} + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +-- ************************************************************** +-- +-- IE parameter types from other modules. +-- +-- ************************************************************** + +IMPORTS + Criticality, + ProcedureCode + +FROM F1AP-CommonDataTypes + Reset, + ResetAcknowledge, + F1SetupRequest, + F1SetupResponse, + F1SetupFailure, + GNBDUConfigurationUpdate, + GNBDUConfigurationUpdateAcknowledge, + GNBDUConfigurationUpdateFailure, + GNBCUConfigurationUpdate, + GNBCUConfigurationUpdateAcknowledge, + GNBCUConfigurationUpdateFailure, + UEContextSetupRequest, + UEContextSetupResponse, + UEContextSetupFailure, + UEContextReleaseCommand, + UEContextReleaseComplete, + UEContextModificationRequest, + UEContextModificationResponse, + UEContextModificationFailure, + UEContextModificationRequired, + UEContextModificationConfirm, + ErrorIndication, + UEContextReleaseRequest, + DLRRCMessageTransfer, + ULRRCMessageTransfer, + GNBDUResourceCoordinationRequest, + GNBDUResourceCoordinationResponse, + PrivateMessage, + UEInactivityNotification, + InitialULRRCMessageTransfer, + SystemInformationDeliveryCommand, + Paging, + Notify, + WriteReplaceWarningRequest, + WriteReplaceWarningResponse, + PWSCancelRequest, + PWSCancelResponse, + PWSRestartIndication, + PWSFailureIndication, + GNBDUStatusIndication, + RRCDeliveryReport, + UEContextModificationRefuse, + F1RemovalRequest, + F1RemovalResponse, + F1RemovalFailure, + NetworkAccessRateReduction, + TraceStart, + DeactivateTrace, + DUCURadioInformationTransfer, + CUDURadioInformationTransfer, + BAPMappingConfiguration, + BAPMappingConfigurationAcknowledge, + GNBDUResourceConfiguration, + GNBDUResourceConfigurationAcknowledge, + IABTNLAddressRequest, + IABTNLAddressResponse, + IABUPConfigurationUpdateRequest, + IABUPConfigurationUpdateResponse, + IABUPConfigurationUpdateFailure, + ResourceStatusRequest, + ResourceStatusResponse, + ResourceStatusFailure, + ResourceStatusUpdate, + AccessAndMobilityIndication, + ReferenceTimeInformationReportingControl, + ReferenceTimeInformationReport, + AccessSuccess, + CellTrafficTrace, + PositioningMeasurementRequest, + PositioningMeasurementResponse, + PositioningMeasurementFailure, + PositioningAssistanceInformationControl, + PositioningAssistanceInformationFeedback, + PositioningMeasurementReport, + PositioningMeasurementAbort, + PositioningMeasurementFailureIndication, + PositioningMeasurementUpdate, + TRPInformationRequest, + TRPInformationResponse, + TRPInformationFailure, + PositioningInformationRequest, + PositioningInformationResponse, + PositioningInformationFailure, + PositioningActivationRequest, + PositioningActivationResponse, + PositioningActivationFailure, + PositioningDeactivation, + PositioningInformationUpdate, + E-CIDMeasurementInitiationRequest, + E-CIDMeasurementInitiationResponse, + E-CIDMeasurementInitiationFailure, + E-CIDMeasurementFailureIndication, + E-CIDMeasurementReport, + E-CIDMeasurementTerminationCommand + + + +FROM F1AP-PDU-Contents + id-Reset, + id-F1Setup, + id-gNBDUConfigurationUpdate, + id-gNBCUConfigurationUpdate, + id-UEContextSetup, + id-UEContextRelease, + id-UEContextModification, + id-UEContextModificationRequired, + id-ErrorIndication, + id-UEContextReleaseRequest, + id-DLRRCMessageTransfer, + id-ULRRCMessageTransfer, + id-GNBDUResourceCoordination, + id-privateMessage, + id-UEInactivityNotification, + id-InitialULRRCMessageTransfer, + id-SystemInformationDeliveryCommand, + id-Paging, + id-Notify, + id-WriteReplaceWarning, + id-PWSCancel, + id-PWSRestartIndication, + id-PWSFailureIndication, + id-GNBDUStatusIndication, + id-RRCDeliveryReport, + id-F1Removal, + id-NetworkAccessRateReduction, + id-TraceStart, + id-DeactivateTrace, + id-DUCURadioInformationTransfer, + id-CUDURadioInformationTransfer, + id-BAPMappingConfiguration, + id-GNBDUResourceConfiguration, + id-IABTNLAddressAllocation, + id-IABUPConfigurationUpdate, + id-resourceStatusReportingInitiation, + id-resourceStatusReporting, + id-accessAndMobilityIndication, + id-ReferenceTimeInformationReportingControl, + id-ReferenceTimeInformationReport, + id-accessSuccess, + id-cellTrafficTrace, + id-PositioningMeasurementExchange, + id-PositioningAssistanceInformationControl, + id-PositioningAssistanceInformationFeedback, + id-PositioningMeasurementReport, + id-PositioningMeasurementAbort, + id-PositioningMeasurementFailureIndication, + id-PositioningMeasurementUpdate, + id-TRPInformationExchange, + id-PositioningInformationExchange, + id-PositioningActivation, + id-PositioningDeactivation, + id-PositioningInformationUpdate, + id-E-CIDMeasurementInitiation, + id-E-CIDMeasurementFailureIndication, + id-E-CIDMeasurementReport, + id-E-CIDMeasurementTermination + + +FROM F1AP-Constants + + ProtocolIE-SingleContainer{}, + F1AP-PROTOCOL-IES + +FROM F1AP-Containers; + + +-- ************************************************************** +-- +-- Interface Elementary Procedure Class +-- +-- ************************************************************** + +F1AP-ELEMENTARY-PROCEDURE ::= CLASS { + &InitiatingMessage , + &SuccessfulOutcome OPTIONAL, + &UnsuccessfulOutcome OPTIONAL, + &procedureCode ProcedureCode UNIQUE, + &criticality Criticality DEFAULT ignore +} +WITH SYNTAX { + INITIATING MESSAGE &InitiatingMessage + [SUCCESSFUL OUTCOME &SuccessfulOutcome] + [UNSUCCESSFUL OUTCOME &UnsuccessfulOutcome] + PROCEDURE CODE &procedureCode + [CRITICALITY &criticality] +} + +-- ************************************************************** +-- +-- Interface PDU Definition +-- +-- ************************************************************** + +F1AP-PDU ::= CHOICE { + initiatingMessage InitiatingMessage, + successfulOutcome SuccessfulOutcome, + unsuccessfulOutcome UnsuccessfulOutcome, + choice-extension ProtocolIE-SingleContainer { { F1AP-PDU-ExtIEs} } +} + +F1AP-PDU-ExtIEs F1AP-PROTOCOL-IES ::= { -- this extension is not used + ... +} + +InitiatingMessage ::= SEQUENCE { + procedureCode F1AP-ELEMENTARY-PROCEDURE.&procedureCode ({F1AP-ELEMENTARY-PROCEDURES}), + criticality F1AP-ELEMENTARY-PROCEDURE.&criticality ({F1AP-ELEMENTARY-PROCEDURES}{@procedureCode}), + value F1AP-ELEMENTARY-PROCEDURE.&InitiatingMessage ({F1AP-ELEMENTARY-PROCEDURES}{@procedureCode}) +} + +SuccessfulOutcome ::= SEQUENCE { + procedureCode F1AP-ELEMENTARY-PROCEDURE.&procedureCode ({F1AP-ELEMENTARY-PROCEDURES}), + criticality F1AP-ELEMENTARY-PROCEDURE.&criticality ({F1AP-ELEMENTARY-PROCEDURES}{@procedureCode}), + value F1AP-ELEMENTARY-PROCEDURE.&SuccessfulOutcome ({F1AP-ELEMENTARY-PROCEDURES}{@procedureCode}) +} + +UnsuccessfulOutcome ::= SEQUENCE { + procedureCode F1AP-ELEMENTARY-PROCEDURE.&procedureCode ({F1AP-ELEMENTARY-PROCEDURES}), + criticality F1AP-ELEMENTARY-PROCEDURE.&criticality ({F1AP-ELEMENTARY-PROCEDURES}{@procedureCode}), + value F1AP-ELEMENTARY-PROCEDURE.&UnsuccessfulOutcome ({F1AP-ELEMENTARY-PROCEDURES}{@procedureCode}) +} + +-- ************************************************************** +-- +-- Interface Elementary Procedure List +-- +-- ************************************************************** + +F1AP-ELEMENTARY-PROCEDURES F1AP-ELEMENTARY-PROCEDURE ::= { + F1AP-ELEMENTARY-PROCEDURES-CLASS-1 | + F1AP-ELEMENTARY-PROCEDURES-CLASS-2, + ... +} + + +F1AP-ELEMENTARY-PROCEDURES-CLASS-1 F1AP-ELEMENTARY-PROCEDURE ::= { + reset | + f1Setup | + gNBDUConfigurationUpdate | + gNBCUConfigurationUpdate | + uEContextSetup | + uEContextRelease | + uEContextModification | + uEContextModificationRequired | + writeReplaceWarning | + pWSCancel | + gNBDUResourceCoordination | + f1Removal | + bAPMappingConfiguration | + gNBDUResourceConfiguration | + iABTNLAddressAllocation | + iABUPConfigurationUpdate | + resourceStatusReportingInitiation | + positioningMeasurementExchange | + tRPInformationExchange | + positioningInformationExchange | + positioningActivation | + e-CIDMeasurementInitiation, + ... +} + +F1AP-ELEMENTARY-PROCEDURES-CLASS-2 F1AP-ELEMENTARY-PROCEDURE ::= { + errorIndication | + uEContextReleaseRequest | + dLRRCMessageTransfer | + uLRRCMessageTransfer | + uEInactivityNotification | + privateMessage | + initialULRRCMessageTransfer | + systemInformationDelivery | + paging | + notify | + pWSRestartIndication | + pWSFailureIndication | + gNBDUStatusIndication | + rRCDeliveryReport | + networkAccessRateReduction | + traceStart | + deactivateTrace | + dUCURadioInformationTransfer | + cUDURadioInformationTransfer | + resourceStatusReporting | + accessAndMobilityIndication | + referenceTimeInformationReportingControl| + referenceTimeInformationReport | + accessSuccess | + cellTrafficTrace | + positioningAssistanceInformationControl | + positioningAssistanceInformationFeedback | + positioningMeasurementReport | + positioningMeasurementAbort | + positioningMeasurementFailureIndication | + positioningMeasurementUpdate | + positioningDeactivation | + e-CIDMeasurementFailureIndication | + e-CIDMeasurementReport | + e-CIDMeasurementTermination | + positioningInformationUpdate, + ... +} +-- ************************************************************** +-- +-- Interface Elementary Procedures +-- +-- ************************************************************** + +reset F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE Reset + SUCCESSFUL OUTCOME ResetAcknowledge + PROCEDURE CODE id-Reset + CRITICALITY reject +} + +f1Setup F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE F1SetupRequest + SUCCESSFUL OUTCOME F1SetupResponse + UNSUCCESSFUL OUTCOME F1SetupFailure + PROCEDURE CODE id-F1Setup + CRITICALITY reject +} + +gNBDUConfigurationUpdate F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE GNBDUConfigurationUpdate + SUCCESSFUL OUTCOME GNBDUConfigurationUpdateAcknowledge + UNSUCCESSFUL OUTCOME GNBDUConfigurationUpdateFailure + PROCEDURE CODE id-gNBDUConfigurationUpdate + CRITICALITY reject +} + +gNBCUConfigurationUpdate F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE GNBCUConfigurationUpdate + SUCCESSFUL OUTCOME GNBCUConfigurationUpdateAcknowledge + UNSUCCESSFUL OUTCOME GNBCUConfigurationUpdateFailure + PROCEDURE CODE id-gNBCUConfigurationUpdate + CRITICALITY reject +} + +uEContextSetup F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE UEContextSetupRequest + SUCCESSFUL OUTCOME UEContextSetupResponse + UNSUCCESSFUL OUTCOME UEContextSetupFailure + PROCEDURE CODE id-UEContextSetup + CRITICALITY reject +} + +uEContextRelease F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE UEContextReleaseCommand + SUCCESSFUL OUTCOME UEContextReleaseComplete + PROCEDURE CODE id-UEContextRelease + CRITICALITY reject +} + +uEContextModification F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE UEContextModificationRequest + SUCCESSFUL OUTCOME UEContextModificationResponse + UNSUCCESSFUL OUTCOME UEContextModificationFailure + PROCEDURE CODE id-UEContextModification + CRITICALITY reject +} + +uEContextModificationRequired F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE UEContextModificationRequired + SUCCESSFUL OUTCOME UEContextModificationConfirm + UNSUCCESSFUL OUTCOME UEContextModificationRefuse + PROCEDURE CODE id-UEContextModificationRequired + CRITICALITY reject +} + +writeReplaceWarning F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE WriteReplaceWarningRequest + SUCCESSFUL OUTCOME WriteReplaceWarningResponse + PROCEDURE CODE id-WriteReplaceWarning + CRITICALITY reject +} + +pWSCancel F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE PWSCancelRequest + SUCCESSFUL OUTCOME PWSCancelResponse + PROCEDURE CODE id-PWSCancel + CRITICALITY reject +} + +errorIndication F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE ErrorIndication + PROCEDURE CODE id-ErrorIndication + CRITICALITY ignore +} + +uEContextReleaseRequest F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE UEContextReleaseRequest + PROCEDURE CODE id-UEContextReleaseRequest + CRITICALITY ignore +} + + +initialULRRCMessageTransfer F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE InitialULRRCMessageTransfer + PROCEDURE CODE id-InitialULRRCMessageTransfer + CRITICALITY ignore +} + +dLRRCMessageTransfer F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE DLRRCMessageTransfer + PROCEDURE CODE id-DLRRCMessageTransfer + CRITICALITY ignore +} + +uLRRCMessageTransfer F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE ULRRCMessageTransfer + PROCEDURE CODE id-ULRRCMessageTransfer + CRITICALITY ignore +} + + +uEInactivityNotification F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE UEInactivityNotification + PROCEDURE CODE id-UEInactivityNotification + CRITICALITY ignore +} + +gNBDUResourceCoordination F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE GNBDUResourceCoordinationRequest + SUCCESSFUL OUTCOME GNBDUResourceCoordinationResponse + PROCEDURE CODE id-GNBDUResourceCoordination + CRITICALITY reject +} + +privateMessage F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE PrivateMessage + PROCEDURE CODE id-privateMessage + CRITICALITY ignore +} + +systemInformationDelivery F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE SystemInformationDeliveryCommand + PROCEDURE CODE id-SystemInformationDeliveryCommand + CRITICALITY ignore +} + + +paging F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE Paging + PROCEDURE CODE id-Paging + CRITICALITY ignore +} + +notify F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE Notify + PROCEDURE CODE id-Notify + CRITICALITY ignore +} + +networkAccessRateReduction F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE NetworkAccessRateReduction + PROCEDURE CODE id-NetworkAccessRateReduction + CRITICALITY ignore +} + + +pWSRestartIndication F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE PWSRestartIndication + PROCEDURE CODE id-PWSRestartIndication + CRITICALITY ignore +} + +pWSFailureIndication F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE PWSFailureIndication + PROCEDURE CODE id-PWSFailureIndication + CRITICALITY ignore +} + +gNBDUStatusIndication F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE GNBDUStatusIndication + PROCEDURE CODE id-GNBDUStatusIndication + CRITICALITY ignore +} + + +rRCDeliveryReport F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE RRCDeliveryReport + PROCEDURE CODE id-RRCDeliveryReport + CRITICALITY ignore +} + +f1Removal F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE F1RemovalRequest + SUCCESSFUL OUTCOME F1RemovalResponse + UNSUCCESSFUL OUTCOME F1RemovalFailure + PROCEDURE CODE id-F1Removal + CRITICALITY reject +} + +traceStart F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE TraceStart + PROCEDURE CODE id-TraceStart + CRITICALITY ignore +} + +deactivateTrace F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE DeactivateTrace + PROCEDURE CODE id-DeactivateTrace + CRITICALITY ignore +} + +dUCURadioInformationTransfer F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE DUCURadioInformationTransfer + PROCEDURE CODE id-DUCURadioInformationTransfer + CRITICALITY ignore +} + +cUDURadioInformationTransfer F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE CUDURadioInformationTransfer + PROCEDURE CODE id-CUDURadioInformationTransfer + CRITICALITY ignore +} + +bAPMappingConfiguration F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE BAPMappingConfiguration + SUCCESSFUL OUTCOME BAPMappingConfigurationAcknowledge + PROCEDURE CODE id-BAPMappingConfiguration + CRITICALITY reject +} + +gNBDUResourceConfiguration F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE GNBDUResourceConfiguration + SUCCESSFUL OUTCOME GNBDUResourceConfigurationAcknowledge + PROCEDURE CODE id-GNBDUResourceConfiguration + CRITICALITY reject +} + +iABTNLAddressAllocation F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE IABTNLAddressRequest + SUCCESSFUL OUTCOME IABTNLAddressResponse + PROCEDURE CODE id-IABTNLAddressAllocation + CRITICALITY reject +} + +iABUPConfigurationUpdate F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE IABUPConfigurationUpdateRequest + SUCCESSFUL OUTCOME IABUPConfigurationUpdateResponse + UNSUCCESSFUL OUTCOME IABUPConfigurationUpdateFailure + PROCEDURE CODE id-IABUPConfigurationUpdate + CRITICALITY reject +} + +resourceStatusReportingInitiation F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE ResourceStatusRequest + SUCCESSFUL OUTCOME ResourceStatusResponse + UNSUCCESSFUL OUTCOME ResourceStatusFailure + PROCEDURE CODE id-resourceStatusReportingInitiation + CRITICALITY reject +} + +resourceStatusReporting F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE ResourceStatusUpdate + PROCEDURE CODE id-resourceStatusReporting + CRITICALITY ignore +} + +accessAndMobilityIndication F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE AccessAndMobilityIndication + PROCEDURE CODE id-accessAndMobilityIndication + CRITICALITY ignore +} + +referenceTimeInformationReportingControl F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE ReferenceTimeInformationReportingControl + PROCEDURE CODE id-ReferenceTimeInformationReportingControl + CRITICALITY ignore +} + +referenceTimeInformationReport F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE ReferenceTimeInformationReport + PROCEDURE CODE id-ReferenceTimeInformationReport + CRITICALITY ignore +} + +accessSuccess F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE AccessSuccess + PROCEDURE CODE id-accessSuccess + CRITICALITY ignore +} + +cellTrafficTrace F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE CellTrafficTrace + PROCEDURE CODE id-cellTrafficTrace + CRITICALITY ignore +} + +positioningAssistanceInformationControl F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE PositioningAssistanceInformationControl + PROCEDURE CODE id-PositioningAssistanceInformationControl + CRITICALITY ignore +} + +positioningAssistanceInformationFeedback F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE PositioningAssistanceInformationFeedback + PROCEDURE CODE id-PositioningAssistanceInformationFeedback + CRITICALITY ignore +} + +positioningMeasurementExchange F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE PositioningMeasurementRequest + SUCCESSFUL OUTCOME PositioningMeasurementResponse + UNSUCCESSFUL OUTCOME PositioningMeasurementFailure + PROCEDURE CODE id-PositioningMeasurementExchange + CRITICALITY reject +} + +positioningMeasurementReport F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE PositioningMeasurementReport + PROCEDURE CODE id-PositioningMeasurementReport + CRITICALITY ignore +} + +positioningMeasurementAbort F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE PositioningMeasurementAbort + PROCEDURE CODE id-PositioningMeasurementAbort + CRITICALITY ignore +} + +positioningMeasurementFailureIndication F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE PositioningMeasurementFailureIndication + PROCEDURE CODE id-PositioningMeasurementFailureIndication + CRITICALITY ignore +} + +positioningMeasurementUpdate F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE PositioningMeasurementUpdate + PROCEDURE CODE id-PositioningMeasurementUpdate + CRITICALITY ignore +} + + +tRPInformationExchange F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE TRPInformationRequest + SUCCESSFUL OUTCOME TRPInformationResponse + UNSUCCESSFUL OUTCOME TRPInformationFailure + PROCEDURE CODE id-TRPInformationExchange + CRITICALITY reject +} + +positioningInformationExchange F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE PositioningInformationRequest + SUCCESSFUL OUTCOME PositioningInformationResponse + UNSUCCESSFUL OUTCOME PositioningInformationFailure + PROCEDURE CODE id-PositioningInformationExchange + CRITICALITY reject +} + +positioningActivation F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE PositioningActivationRequest + SUCCESSFUL OUTCOME PositioningActivationResponse + UNSUCCESSFUL OUTCOME PositioningActivationFailure + PROCEDURE CODE id-PositioningActivation + CRITICALITY reject +} + +positioningDeactivation F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE PositioningDeactivation + PROCEDURE CODE id-PositioningDeactivation + CRITICALITY ignore +} + +e-CIDMeasurementInitiation F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE E-CIDMeasurementInitiationRequest + SUCCESSFUL OUTCOME E-CIDMeasurementInitiationResponse + UNSUCCESSFUL OUTCOME E-CIDMeasurementInitiationFailure + PROCEDURE CODE id-E-CIDMeasurementInitiation + CRITICALITY reject +} + +e-CIDMeasurementFailureIndication F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE E-CIDMeasurementFailureIndication + PROCEDURE CODE id-E-CIDMeasurementFailureIndication + CRITICALITY ignore +} + +e-CIDMeasurementReport F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE E-CIDMeasurementReport + PROCEDURE CODE id-E-CIDMeasurementReport + CRITICALITY ignore +} + +e-CIDMeasurementTermination F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE E-CIDMeasurementTerminationCommand + PROCEDURE CODE id-E-CIDMeasurementTermination + CRITICALITY ignore +} + +positioningInformationUpdate F1AP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE PositioningInformationUpdate + PROCEDURE CODE id-PositioningInformationUpdate + CRITICALITY ignore +} + + +END diff --git a/openair2/F1AP/f1ap_common.h b/openair2/F1AP/f1ap_common.h index ee57a7ec83..7781a78412 100644 --- a/openair2/F1AP/f1ap_common.h +++ b/openair2/F1AP/f1ap_common.h @@ -46,7 +46,6 @@ inline void ASN_DEBUG(const char *fmt, ...); #endif -#include "F1AP_Active-Cells-List.h" #include "F1AP_RAT-FrequencyPriorityInformation.h" #include "F1AP_DLUPTNLInformation-ToBeSetup-Item.h" #include "F1AP_PrivateMessage.h" @@ -55,6 +54,7 @@ inline void ASN_DEBUG(const char *fmt, ...); #include "F1AP_NRPCI.h" #include "F1AP_Transmission-Bandwidth.h" #include "F1AP_SIB1-message.h" +#include "F1AP_SibtypetobeupdatedListItem.h" #include "F1AP_GNBCUConfigurationUpdateAcknowledge.h" #include "F1AP_DRBs-Setup-Item.h" #include "F1AP_EUTRA-NR-CellResourceCoordinationReqAck-Container.h" @@ -75,7 +75,6 @@ inline void ASN_DEBUG(const char *fmt, ...); #include "F1AP_DRBs-Required-ToBeModified-Item.h" #include "F1AP_BitRate.h" #include "F1AP_SRBs-ToBeSetup-List.h" -#include "F1AP_ConcurrentWarningMessageIndicator.h" #include "F1AP_CriticalityDiagnostics-IE-Item.h" #include "F1AP_GNB-CU-TNL-Association-To-Update-List.h" #include "F1AP_DRB-Notify-List.h" @@ -85,6 +84,7 @@ inline void ASN_DEBUG(const char *fmt, ...); #include "F1AP_PWS-Failed-NR-CGI-List.h" #include "F1AP_InitialULRRCMessageTransfer.h" #include "F1AP_Served-Cell-Information.h" +#include "F1AP_ServedPLMNs-Item.h" #include "F1AP_Served-EUTRA-Cells-Information.h" #include "F1AP_Cells-Broadcast-Cancelled-Item.h" #include "F1AP_F1SetupRequest.h" @@ -128,13 +128,11 @@ inline void ASN_DEBUG(const char *fmt, ...); #include "F1AP_TransactionID.h" #include "F1AP_AllocationAndRetentionPriority.h" #include "F1AP_ShortDRXCycleLength.h" -#include "F1AP_BroadcastPLMNs-Item.h" #include "F1AP_DRB-Information.h" #include "F1AP_TimeToWait.h" #include "F1AP_NonDynamic5QIDescriptor.h" #include "F1AP_C-RNTI.h" #include "F1AP_MIB-message.h" -#include "F1AP_SIBtype-Item.h" #include "F1AP_Served-Cells-To-Modify-List.h" #include "F1AP_NRCGI.h" #include "F1AP_DuplicationActivation.h" @@ -187,6 +185,7 @@ inline void ASN_DEBUG(const char *fmt, ...); #include "F1AP_CellULConfigured.h" #include "F1AP_DRB-Activity.h" #include "F1AP_GNB-CU-TNL-Association-Failed-To-Setup-Item.h" +#include "F1AP_ProtocolIE-ID.h" #include "F1AP_PrivateIE-ID.h" #include "F1AP_WriteReplaceWarningResponse.h" #include "F1AP_CauseMisc.h" @@ -231,9 +230,7 @@ inline void ASN_DEBUG(const char *fmt, ...); #include "F1AP_SUL-Information.h" #include "F1AP_CriticalityDiagnostics-IE-List.h" #include "F1AP_EUTRA-FDD-Info.h" -#include "F1AP_BroadcastPLMNs-List.h" #include "F1AP_Served-Cells-To-Delete-Item.h" -#include "F1AP_ListofEUTRACellsinGNBDUCoordination.h" #include "F1AP_Candidate-SpCell-Item.h" #include "F1AP_Cells-To-Be-Broadcast-List.h" #include "F1AP_ULRRCMessageTransfer.h" @@ -255,7 +252,6 @@ inline void ASN_DEBUG(const char *fmt, ...); #include "F1AP_SRBs-ToBeReleased-List.h" #include "F1AP_MeasGapConfig.h" #include "F1AP_NR-Mode-Info.h" -#include "F1AP_Active-Cells-Item.h" #include "F1AP_Protected-EUTRA-Resources-List.h" #include "F1AP_SRBs-FailedToBeSetup-Item.h" #include "F1AP_ResetAll.h" @@ -287,7 +283,6 @@ inline void ASN_DEBUG(const char *fmt, ...); #include "F1AP_UEContextReleaseRequest.h" #include "F1AP_GNB-DU-Name.h" #include "F1AP_DRBs-ToBeModified-Item.h" -#include "F1AP_SIBtype-List.h" #include "F1AP_EUTRA-NR-CellResourceCoordinationReq-Container.h" #include "F1AP_DRBs-SetupMod-List.h" #include "F1AP_DRBs-Required-ToBeModified-List.h" @@ -296,7 +291,6 @@ inline void ASN_DEBUG(const char *fmt, ...); #include "F1AP_PacketDelayBudget.h" #include "F1AP_GNBCUConfigurationUpdate.h" #include "F1AP_Cells-Broadcast-Completed-Item.h" -#include "F1AP_RRCRconfigurationCompleteIndicator.h" #include "F1AP_PagingPriority.h" #include "F1AP_Cells-Failed-to-be-Activated-List.h" #include "F1AP_Endpoint-IP-address-and-port.h" @@ -306,7 +300,6 @@ inline void ASN_DEBUG(const char *fmt, ...); #include "F1AP_ResetType.h" #include "F1AP_FDD-Info.h" #include "F1AP_DLUPTNLInformation-ToBeSetup-List.h" -#include "F1AP_QoSFlowIndicator.h" #include "F1AP_NR-CGI-List-For-Restart-List.h" #include "F1AP_F1SetupResponse.h" #include "F1AP_UEContextSetupResponse.h" @@ -325,7 +318,6 @@ inline void ASN_DEBUG(const char *fmt, ...); #include "F1AP_Cells-to-be-Barred-List.h" #include "F1AP_Presence.h" #include "F1AP_CellBarred.h" -#include "F1AP_SIBtype.h" #include "F1AP_RequestType.h" #include "F1AP_NRFreqInfo.h" #include "F1AP_Potential-SpCell-Item.h" @@ -348,7 +340,6 @@ inline void ASN_DEBUG(const char *fmt, ...); #include "F1AP_GBR-QoSFlowInformation.h" #include "F1AP_SCellIndex.h" #include "F1AP_DRBs-SetupMod-Item.h" -#include "F1AP_TransmissionStopIndicator.h" #include "F1AP_UEContextSetupFailure.h" #include "F1AP_DRBs-FailedToBeModified-List.h" #include "F1AP_DRBs-FailedToBeSetupMod-Item.h" diff --git a/openair2/F1AP/f1ap_cu_interface_management.c b/openair2/F1AP/f1ap_cu_interface_management.c index 48c5c2de11..a96d9807de 100644 --- a/openair2/F1AP/f1ap_cu_interface_management.c +++ b/openair2/F1AP/f1ap_cu_interface_management.c @@ -139,10 +139,11 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance, served_celles_item_p = &(((F1AP_GNB_DU_Served_Cells_ItemIEs_t *)ie->value.choice.GNB_DU_Served_Cells_List.list.array[i])->value.choice.GNB_DU_Served_Cells_Item); /* tac */ - OCTET_STRING_TO_INT16(&(served_celles_item_p->served_Cell_Information.fiveGS_TAC), F1AP_SETUP_REQ(message_p).tac[i]); - LOG_D(F1AP, "F1AP_SETUP_REQ(message_p).tac[%d] %d \n", - i, F1AP_SETUP_REQ(message_p).tac[i]); - + if (served_celles_item_p->served_Cell_Information.fiveGS_TAC) { + OCTET_STRING_TO_INT16(served_celles_item_p->served_Cell_Information.fiveGS_TAC, F1AP_SETUP_REQ(message_p).tac[i]); + LOG_D(F1AP, "F1AP_SETUP_REQ(message_p).tac[%d] %d \n", + i, F1AP_SETUP_REQ(message_p).tac[i]); + } /* - nRCGI */ TBCD_TO_MCC_MNC(&(served_celles_item_p->served_Cell_Information.nRCGI.pLMN_Identity), F1AP_SETUP_REQ(message_p).mcc[i], F1AP_SETUP_REQ(message_p).mnc[i], @@ -356,20 +357,30 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance, //for (int n = 0; n < f1ap_setup_resp->SI_container_length[i][0]; n++) // printf("%02x ", f1ap_setup_resp->SI_container[i][0][n]); //printf("\n"); - OCTET_STRING_fromBuf(&gNB_CUSystemInformation->sImessage, - (const char*)f1ap_setup_resp->SI_container[i][0], - f1ap_setup_resp->SI_container_length[i][0]); - LOG_D(F1AP, "f1ap_setup_resp->SI_container_length = %d \n", f1ap_setup_resp->SI_container_length[0][0]); + for (int sIBtype=2;sIBtype<33;sIBtype++) { + if (f1ap_setup_resp->SI_container[i][sIBtype]!=NULL) { + AssertFatal(sIBtype < 6 || sIBtype == 9, "Illegal SI type %d\n",sIBtype); + F1AP_SibtypetobeupdatedListItem_t *sib_item = calloc(1,sizeof(*sib_item)); + memset((void*)sib_item,0,sizeof(*sib_item)); + sib_item->sIBtype = sIBtype; + OCTET_STRING_fromBuf(&sib_item->sIBmessage, + (const char*)f1ap_setup_resp->SI_container[i][sIBtype], + f1ap_setup_resp->SI_container_length[i][sIBtype]); + + LOG_D(F1AP, "f1ap_setup_resp->SI_container_length[%d][%d] = %d \n", i,sIBtype,f1ap_setup_resp->SI_container_length[i][sIBtype]); + ASN_SEQUENCE_ADD(&gNB_CUSystemInformation->sibtypetobeupdatedlist.list,sib_item); + } + } cells_to_be_activated_list_itemExtIEs->extensionValue.choice.GNB_CUSystemInformation = *gNB_CUSystemInformation; - F1AP_ProtocolExtensionContainer_160P9_t p_160P9_t; - memset((void *)&p_160P9_t, 0, sizeof(F1AP_ProtocolExtensionContainer_160P9_t)); + F1AP_ProtocolExtensionContainer_154P112_t p_154P112_t; + memset((void *)&p_154P112_t, 0, sizeof(F1AP_ProtocolExtensionContainer_154P112_t)); - ASN_SEQUENCE_ADD(&p_160P9_t.list, + ASN_SEQUENCE_ADD(&p_154P112_t.list, cells_to_be_activated_list_itemExtIEs); - cells_to_be_activated_list_item.iE_Extensions = (struct F1AP_ProtocolExtensionContainer*)&p_160P9_t; + cells_to_be_activated_list_item.iE_Extensions = (struct F1AP_ProtocolExtensionContainer*)&p_154P112_t; free(gNB_CUSystemInformation); gNB_CUSystemInformation = NULL; @@ -829,17 +840,13 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, module_id_t du_mod_ protected_eutra_resources_item_ies = (F1AP_Protected_EUTRA_Resources_ItemIEs_t *)calloc(1, sizeof(F1AP_Protected_EUTRA_Resources_ItemIEs_t)); protected_eutra_resources_item_ies->id = F1AP_ProtocolIE_ID_id_Protected_EUTRA_Resources_List; protected_eutra_resources_item_ies->criticality = F1AP_Criticality_reject; - protected_eutra_resources_item_ies->value.present = F1AP_Protected_EUTRA_Resources_ItemIEs__value_PR_SpectrumSharingGroupID; - protected_eutra_resources_item_ies->value.choice.SpectrumSharingGroupID = 1L; - + protected_eutra_resources_item_ies->value.present = F1AP_Protected_EUTRA_Resources_ItemIEs__value_PR_Protected_EUTRA_Resources_Item; + ((F1AP_Protected_EUTRA_Resources_Item_t*)&protected_eutra_resources_item_ies->value.choice.Protected_EUTRA_Resources_Item)->spectrumSharingGroupID = 123L; + memset(&protected_eutra_resources_item_ies->value.choice.Protected_EUTRA_Resources_Item,0, + sizeof(F1AP_Protected_EUTRA_Resources_Item_t)); ASN_SEQUENCE_ADD(&ie->value.choice.Protected_EUTRA_Resources_List.list, protected_eutra_resources_item_ies); - /* 8.2 ListofEUTRACellsinGNBDUCoordination */ - protected_eutra_resources_item_ies = (F1AP_Protected_EUTRA_Resources_ItemIEs_t *)calloc(1, sizeof(F1AP_Protected_EUTRA_Resources_ItemIEs_t)); - protected_eutra_resources_item_ies->id = F1AP_ProtocolIE_ID_id_Protected_EUTRA_Resources_List; - protected_eutra_resources_item_ies->criticality = F1AP_Criticality_reject; - protected_eutra_resources_item_ies->value.present = F1AP_Protected_EUTRA_Resources_ItemIEs__value_PR_ListofEUTRACellsinGNBDUCoordination; - +/* F1AP_Served_EUTRA_Cells_Information_t served_eutra_cells_information; memset((void *)&served_eutra_cells_information, 0, sizeof(F1AP_Served_EUTRA_Cells_Information_t)); @@ -870,6 +877,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, module_id_t du_mod_ ASN_SEQUENCE_ADD(&protected_eutra_resources_item_ies->value.choice.ListofEUTRACellsinGNBDUCoordination.list, &served_eutra_cells_information); ASN_SEQUENCE_ADD(&ie->value.choice.Protected_EUTRA_Resources_List.list, protected_eutra_resources_item_ies); +*/ } ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); diff --git a/openair2/F1AP/f1ap_cu_rrc_message_transfer.c b/openair2/F1AP/f1ap_cu_rrc_message_transfer.c index 9bd04cc5e8..bccd1fe714 100644 --- a/openair2/F1AP/f1ap_cu_rrc_message_transfer.c +++ b/openair2/F1AP/f1ap_cu_rrc_message_transfer.c @@ -109,7 +109,7 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance, /* RNTI */ F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_InitialULRRCMessageTransferIEs_t, ie, container, F1AP_ProtocolIE_ID_id_C_RNTI, true); - BUFFER_TO_INT16(ie->value.choice.C_RNTI.buf, rnti); + rnti = ie->value.choice.C_RNTI; /* RRC Container */ F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_InitialULRRCMessageTransferIEs_t, ie, container, @@ -260,19 +260,22 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance, /* optional */ /* c7. RAT_FrequencyPriorityInformation */ /* TODO */ - if (0) { - ie = (F1AP_DLRRCMessageTransferIEs_t *)calloc(1, sizeof(F1AP_DLRRCMessageTransferIEs_t)); - ie->id = F1AP_ProtocolIE_ID_id_RAT_FrequencyPriorityInformation; - ie->criticality = F1AP_Criticality_reject; - ie->value.present = F1AP_DLRRCMessageTransferIEs__value_PR_RAT_FrequencyPriorityInformation; - - ie->value.choice.RAT_FrequencyPriorityInformation.present = F1AP_RAT_FrequencyPriorityInformation_PR_subscriberProfileIDforRFP; - ie->value.choice.RAT_FrequencyPriorityInformation.choice.subscriberProfileIDforRFP = 123L; - + int endc=1; + ie = (F1AP_DLRRCMessageTransferIEs_t *)calloc(1, sizeof(F1AP_DLRRCMessageTransferIEs_t)); + ie->id = F1AP_ProtocolIE_ID_id_RAT_FrequencyPriorityInformation; + ie->criticality = F1AP_Criticality_reject; + ie->value.present = F1AP_DLRRCMessageTransferIEs__value_PR_RAT_FrequencyPriorityInformation; + if (endc==1) { + ie->value.choice.RAT_FrequencyPriorityInformation.present = F1AP_RAT_FrequencyPriorityInformation_PR_eNDC; + ie->value.choice.RAT_FrequencyPriorityInformation.choice.eNDC = 123L; + } + else { + ie->value.choice.RAT_FrequencyPriorityInformation.present = F1AP_RAT_FrequencyPriorityInformation_PR_nGRAN; + ie->value.choice.RAT_FrequencyPriorityInformation.choice.nGRAN = 11L; + } //ie->value.choice.RAT_FrequencyPriorityInformation.present = F1AP_RAT_FrequencyPriorityInformation_PR_rAT_FrequencySelectionPriority; //ie->value.choice.RAT_FrequencyPriorityInformation.choice.rAT_FrequencySelectionPriority = 123L; - ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); - } + ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); /* encode */ if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { diff --git a/openair2/F1AP/f1ap_cu_ue_context_management.c b/openair2/F1AP/f1ap_cu_ue_context_management.c index 789ce4c715..1857678ce9 100644 --- a/openair2/F1AP/f1ap_cu_ue_context_management.c +++ b/openair2/F1AP/f1ap_cu_ue_context_management.c @@ -108,7 +108,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, /* mandatory */ /* c4. ServCellIndex */ ie = (F1AP_UEContextSetupRequestIEs_t *)calloc(1, sizeof(F1AP_UEContextSetupRequestIEs_t)); - ie->id = F1AP_ProtocolIE_ID_id_ServCellndex; + ie->id = F1AP_ProtocolIE_ID_id_ServCellIndex; ie->criticality = F1AP_Criticality_reject; ie->value.present = F1AP_UEContextSetupRequestIEs__value_PR_ServCellIndex; ie->value.choice.ServCellIndex = 2; @@ -379,75 +379,86 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, } } else { - /* 12.1.2 dRB_Information */ - drbs_toBeSetup_item.qoSInformation.present = F1AP_QoSInformation_PR_dRB_Information; - drbs_toBeSetup_item.qoSInformation.choice.dRB_Information = (F1AP_DRB_Information_t *)calloc(1, sizeof(F1AP_DRB_Information_t)); - + /* 12.1.2 DRB_Information */ + drbs_toBeSetup_item.qoSInformation.present = F1AP_QoSInformation_PR_choice_extension; + + F1AP_QoSInformation_ExtIEs_t *ie; + ie = (F1AP_QoSInformation_ExtIEs_t *)calloc(1, sizeof(F1AP_QoS_Characteristics_ExtIEs_t)); + ie->id = F1AP_ProtocolIE_ID_id_DRB_Information; + ie->criticality = F1AP_Criticality_reject; + ie->value.present = F1AP_QoSInformation_ExtIEs__value_PR_DRB_Information; + F1AP_DRB_Information_t *DRB_Information = &ie->value.choice.DRB_Information; + + drbs_toBeSetup_item.qoSInformation.choice.choice_extension = (struct F1AP_ProtocolIE_SingleContainer*)ie; + + /* 12.1.2.1 dRB_QoS */ { /* qoS_Characteristics */ { int some_decide_qoS_characteristics = 1; // BK: Need Check if (some_decide_qoS_characteristics) { - drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.present = F1AP_QoS_Characteristics_PR_non_Dynamic_5QI; - drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.choice.non_Dynamic_5QI = (F1AP_NonDynamic5QIDescriptor_t *)calloc(1, sizeof(F1AP_NonDynamic5QIDescriptor_t)); + DRB_Information->dRB_QoS.qoS_Characteristics.present = F1AP_QoS_Characteristics_PR_non_Dynamic_5QI; + DRB_Information->dRB_QoS.qoS_Characteristics.choice.non_Dynamic_5QI = (F1AP_NonDynamic5QIDescriptor_t *)calloc(1, sizeof(F1AP_NonDynamic5QIDescriptor_t)); /* fiveQI */ - drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.choice.non_Dynamic_5QI->fiveQI = 1L; + DRB_Information->dRB_QoS.qoS_Characteristics.choice.non_Dynamic_5QI->fiveQI = 1L; /* OPTIONAL */ /* qoSPriorityLevel */ if (0) { - drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.choice.non_Dynamic_5QI->qoSPriorityLevel = (long *)calloc(1, sizeof(long)); - *drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.choice.non_Dynamic_5QI->qoSPriorityLevel = 1L; + DRB_Information->dRB_QoS.qoS_Characteristics.choice.non_Dynamic_5QI->qoSPriorityLevel = (long *)calloc(1, sizeof(long)); + *DRB_Information->dRB_QoS.qoS_Characteristics.choice.non_Dynamic_5QI->qoSPriorityLevel = 1L; } /* OPTIONAL */ /* averagingWindow */ if (0) { - drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.choice.non_Dynamic_5QI->averagingWindow = (F1AP_AveragingWindow_t *)calloc(1, sizeof(F1AP_AveragingWindow_t)); - *drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.choice.non_Dynamic_5QI->averagingWindow = 1L; + DRB_Information->dRB_QoS.qoS_Characteristics.choice.non_Dynamic_5QI->averagingWindow = (F1AP_AveragingWindow_t *)calloc(1, sizeof(F1AP_AveragingWindow_t)); + *DRB_Information->dRB_QoS.qoS_Characteristics.choice.non_Dynamic_5QI->averagingWindow = 1L; } /* OPTIONAL */ /* maxDataBurstVolume */ if (0) { - drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.choice.non_Dynamic_5QI->maxDataBurstVolume = (F1AP_MaxDataBurstVolume_t *)calloc(1, sizeof(F1AP_MaxDataBurstVolume_t)); - *drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.choice.non_Dynamic_5QI->maxDataBurstVolume = 1L; + DRB_Information->dRB_QoS.qoS_Characteristics.choice.non_Dynamic_5QI->maxDataBurstVolume = (F1AP_MaxDataBurstVolume_t *)calloc(1, sizeof(F1AP_MaxDataBurstVolume_t)); + *DRB_Information->dRB_QoS.qoS_Characteristics.choice.non_Dynamic_5QI->maxDataBurstVolume = 1L; } } else { - drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.present = F1AP_QoS_Characteristics_PR_dynamic_5QI; - drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI = (F1AP_Dynamic5QIDescriptor_t *)calloc(1, sizeof(F1AP_Dynamic5QIDescriptor_t)); + DRB_Information->dRB_QoS.qoS_Characteristics.present = F1AP_QoS_Characteristics_PR_dynamic_5QI; + DRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI = (F1AP_Dynamic5QIDescriptor_t *)calloc(1, sizeof(F1AP_Dynamic5QIDescriptor_t)); /* qoSPriorityLevel */ - drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->qoSPriorityLevel = 1L; + DRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->qoSPriorityLevel = 1L; /* packetDelayBudget */ - drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->packetDelayBudget = 1L; + DRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->packetDelayBudget = 1L; /* packetErrorRate */ - drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->packetErrorRate = 1L; + DRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->packetErrorRate.pER_Scalar = 1L; + DRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->packetErrorRate.pER_Exponent = 6L; + /* OPTIONAL */ /* delayCritical */ if (0) { - drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->delayCritical = (long *)calloc(1, sizeof(long)); - *drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->delayCritical = 1L; + DRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->delayCritical = (long *)calloc(1, sizeof(long)); + *DRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->delayCritical = 1L; } /* OPTIONAL */ /* averagingWindow */ if (0) { - drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->averagingWindow = (F1AP_AveragingWindow_t *)calloc(1, sizeof(F1AP_AveragingWindow_t)); - *drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->averagingWindow = 1L; + DRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->averagingWindow = (F1AP_AveragingWindow_t *)calloc(1, sizeof(F1AP_AveragingWindow_t)); + *DRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->averagingWindow = 1L; } /* OPTIONAL */ /* maxDataBurstVolume */ if (0) { - drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->maxDataBurstVolume = (F1AP_MaxDataBurstVolume_t *)calloc(1, sizeof(F1AP_MaxDataBurstVolume_t)); - *drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->maxDataBurstVolume = 1L; + DRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->maxDataBurstVolume = (F1AP_MaxDataBurstVolume_t *)calloc(1, sizeof(F1AP_MaxDataBurstVolume_t)); + *DRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->maxDataBurstVolume = 1L; } } // if some_decide_qoS_characteristics @@ -456,32 +467,32 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, /* nGRANallocationRetentionPriority */ { - drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.nGRANallocationRetentionPriority.priorityLevel = F1AP_PriorityLevel_highest; // enum - drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.nGRANallocationRetentionPriority.pre_emptionCapability = F1AP_Pre_emptionCapability_shall_not_trigger_pre_emption; // enum - drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.nGRANallocationRetentionPriority.pre_emptionVulnerability = F1AP_Pre_emptionVulnerability_not_pre_emptable; // enum + DRB_Information->dRB_QoS.nGRANallocationRetentionPriority.priorityLevel = F1AP_PriorityLevel_highest; // enum + DRB_Information->dRB_QoS.nGRANallocationRetentionPriority.pre_emptionCapability = F1AP_Pre_emptionCapability_shall_not_trigger_pre_emption; // enum + DRB_Information->dRB_QoS.nGRANallocationRetentionPriority.pre_emptionVulnerability = F1AP_Pre_emptionVulnerability_not_pre_emptable; // enum } // nGRANallocationRetentionPriority /* OPTIONAL */ /* gBR_QoS_Flow_Information */ if (0) { - drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.gBR_QoS_Flow_Information = (F1AP_GBR_QoSFlowInformation_t *)calloc(1, sizeof(F1AP_GBR_QoSFlowInformation_t)); - asn_long2INTEGER(&drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.gBR_QoS_Flow_Information->maxFlowBitRateDownlink, 1L); - asn_long2INTEGER(&drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.gBR_QoS_Flow_Information->maxFlowBitRateUplink, 1L); - asn_long2INTEGER(&drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.gBR_QoS_Flow_Information->guaranteedFlowBitRateDownlink, 1L); - asn_long2INTEGER(&drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.gBR_QoS_Flow_Information->guaranteedFlowBitRateUplink, 1L); + DRB_Information->dRB_QoS.gBR_QoS_Flow_Information = (F1AP_GBR_QoSFlowInformation_t *)calloc(1, sizeof(F1AP_GBR_QoSFlowInformation_t)); + asn_long2INTEGER(&DRB_Information->dRB_QoS.gBR_QoS_Flow_Information->maxFlowBitRateDownlink, 1L); + asn_long2INTEGER(&DRB_Information->dRB_QoS.gBR_QoS_Flow_Information->maxFlowBitRateUplink, 1L); + asn_long2INTEGER(&DRB_Information->dRB_QoS.gBR_QoS_Flow_Information->guaranteedFlowBitRateDownlink, 1L); + asn_long2INTEGER(&DRB_Information->dRB_QoS.gBR_QoS_Flow_Information->guaranteedFlowBitRateUplink, 1L); /* OPTIONAL */ /* maxPacketLossRateDownlink */ if (0) { - drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.gBR_QoS_Flow_Information->maxPacketLossRateDownlink = (F1AP_MaxPacketLossRate_t *)calloc(1, sizeof(F1AP_MaxPacketLossRate_t)); - *drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.gBR_QoS_Flow_Information->maxPacketLossRateDownlink = 1L; + DRB_Information->dRB_QoS.gBR_QoS_Flow_Information->maxPacketLossRateDownlink = (F1AP_MaxPacketLossRate_t *)calloc(1, sizeof(F1AP_MaxPacketLossRate_t)); + *DRB_Information->dRB_QoS.gBR_QoS_Flow_Information->maxPacketLossRateDownlink = 1L; } /* OPTIONAL */ /* maxPacketLossRateUplink */ if (0) { - drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.gBR_QoS_Flow_Information->maxPacketLossRateUplink = (F1AP_MaxPacketLossRate_t *)calloc(1, sizeof(F1AP_MaxPacketLossRate_t)); - *drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.gBR_QoS_Flow_Information->maxPacketLossRateUplink = 1L; + DRB_Information->dRB_QoS.gBR_QoS_Flow_Information->maxPacketLossRateUplink = (F1AP_MaxPacketLossRate_t *)calloc(1, sizeof(F1AP_MaxPacketLossRate_t)); + *DRB_Information->dRB_QoS.gBR_QoS_Flow_Information->maxPacketLossRateUplink = 1L; } } @@ -489,8 +500,8 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, /* OPTIONAL */ /* reflective_QoS_Attribute */ if (0) { - drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.reflective_QoS_Attribute = (long *)calloc(1, sizeof(long)); - *drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.reflective_QoS_Attribute = 1L; + DRB_Information->dRB_QoS.reflective_QoS_Attribute = (long *)calloc(1, sizeof(long)); + *DRB_Information->dRB_QoS.reflective_QoS_Attribute = 1L; } } // dRB_QoS @@ -498,21 +509,21 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, /* 12.1.2.2 sNSSAI */ { /* sST */ - OCTET_STRING_fromBuf(&drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->sNSSAI.sST, "asdsa1d32sa1d31asd31as", + OCTET_STRING_fromBuf(&DRB_Information->sNSSAI.sST, "asdsa1d32sa1d31asd31as", strlen("asdsa1d32sa1d31asd31as")); /* OPTIONAL */ /* sD */ if (0) { - drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->sNSSAI.sD = (OCTET_STRING_t *)calloc(1, sizeof(OCTET_STRING_t)); - OCTET_STRING_fromBuf(drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->sNSSAI.sD, "asdsa1d32sa1d31asd31as", + DRB_Information->sNSSAI.sD = (OCTET_STRING_t *)calloc(1, sizeof(OCTET_STRING_t)); + OCTET_STRING_fromBuf(DRB_Information->sNSSAI.sD, "asdsa1d32sa1d31asd31as", strlen("asdsa1d32sa1d31asd31as")); } } /* OPTIONAL */ /* 12.1.2.3 notificationControl */ if (0) { - drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->notificationControl = (F1AP_NotificationControl_t *)calloc(1, sizeof(F1AP_NotificationControl_t)); - *drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->notificationControl = F1AP_NotificationControl_active; // enum + DRB_Information->notificationControl = (F1AP_NotificationControl_t *)calloc(1, sizeof(F1AP_NotificationControl_t)); + *DRB_Information->notificationControl = F1AP_NotificationControl_active; // enum } /* 12.1.2.4 flows_Mapped_To_DRB_List */ // BK: need verifiy @@ -523,7 +534,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, memset((void *)&flows_mapped_to_drb_item, 0, sizeof(F1AP_Flows_Mapped_To_DRB_Item_t)); /* qoSFlowIndicator */ - flows_mapped_to_drb_item.qoSFlowIndicator = 1L; + flows_mapped_to_drb_item.qoSFlowIdentifier = 1L; /* qoSFlowLevelQoSParameters */ { @@ -569,8 +580,8 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.qoS_Characteristics.choice.dynamic_5QI->packetDelayBudget = 1L; /* packetErrorRate */ - flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.qoS_Characteristics.choice.dynamic_5QI->packetErrorRate = 1L; - + flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.qoS_Characteristics.choice.dynamic_5QI->packetErrorRate.pER_Scalar = 1L; + flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.qoS_Characteristics.choice.dynamic_5QI->packetErrorRate.pER_Exponent = 6L; /* OPTIONAL */ /* delayCritical */ if (0) { @@ -637,7 +648,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, } // qoSFlowLevelQoSParameters // BK: need check - ASN_SEQUENCE_ADD(&drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->flows_Mapped_To_DRB_List.list, &flows_mapped_to_drb_item); + ASN_SEQUENCE_ADD(&DRB_Information->flows_Mapped_To_DRB_List.list, &flows_mapped_to_drb_item); } } // if some_decide_qos @@ -672,7 +683,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, drbs_toBeSetup_item.rLCMode = F1AP_RLCMode_rlc_am; break; default: - drbs_toBeSetup_item.rLCMode = F1AP_RLCMode_rlc_um; + drbs_toBeSetup_item.rLCMode = F1AP_RLCMode_rlc_um_bidirectional; } /* OPTIONAL */ @@ -716,13 +727,13 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ie->criticality = F1AP_Criticality_reject; ie->value.present = F1AP_UEContextSetupRequestIEs__value_PR_RAT_FrequencyPriorityInformation; - int some_decide_rat = 1; // BK: Need Check - if (some_decide_rat) { - ie->value.choice.RAT_FrequencyPriorityInformation.present = F1AP_RAT_FrequencyPriorityInformation_PR_subscriberProfileIDforRFP; - ie->value.choice.RAT_FrequencyPriorityInformation.choice.subscriberProfileIDforRFP = 11L; + int endc = 1; // RK: Get this from somewhere ... + if (endc) { + ie->value.choice.RAT_FrequencyPriorityInformation.present = F1AP_RAT_FrequencyPriorityInformation_PR_eNDC; + ie->value.choice.RAT_FrequencyPriorityInformation.choice.eNDC = 11L; } else { - ie->value.choice.RAT_FrequencyPriorityInformation.present = F1AP_RAT_FrequencyPriorityInformation_PR_rAT_FrequencySelectionPriority; - ie->value.choice.RAT_FrequencyPriorityInformation.choice.rAT_FrequencySelectionPriority = 11L; + ie->value.choice.RAT_FrequencyPriorityInformation.present = F1AP_RAT_FrequencyPriorityInformation_PR_nGRAN; + ie->value.choice.RAT_FrequencyPriorityInformation.choice.nGRAN = 11L; } ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); } @@ -1070,7 +1081,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) { /* mandatory */ /* c4. ServCellIndex */ ie = (F1AP_UEContextModificationRequestIEs_t *)calloc(1, sizeof(F1AP_UEContextModificationRequestIEs_t)); - ie->id = F1AP_ProtocolIE_ID_id_ServCellndex; + ie->id = F1AP_ProtocolIE_ID_id_ServCellIndex; ie->criticality = F1AP_Criticality_reject; ie->value.present = F1AP_UEContextModificationRequestIEs__value_PR_ServCellIndex; ie->value.choice.ServCellIndex = 5L; @@ -1114,13 +1125,13 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) { } /* optional */ - /* c6. TransmissionStopIndicator */ + /* c6. TransmissionActionIndicator */ if (1) { ie = (F1AP_UEContextModificationRequestIEs_t *)calloc(1, sizeof(F1AP_UEContextModificationRequestIEs_t)); - ie->id = F1AP_ProtocolIE_ID_id_TransmissionStopIndicator; + ie->id = F1AP_ProtocolIE_ID_id_TransmissionActionIndicator; ie->criticality = F1AP_Criticality_ignore; - ie->value.present = F1AP_UEContextModificationRequestIEs__value_PR_TransmissionStopIndicator; - ie->value.choice.TransmissionStopIndicator = F1AP_TransmissionStopIndicator_true; + ie->value.present = F1AP_UEContextModificationRequestIEs__value_PR_TransmissionActionIndicator; + ie->value.choice.TransmissionActionIndicator = F1AP_TransmissionActionIndicator_stop; ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); } @@ -1140,10 +1151,10 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) { /* c7. RRCRconfigurationCompleteIndicator */ if (1) { ie = (F1AP_UEContextModificationRequestIEs_t *)calloc(1, sizeof(F1AP_UEContextModificationRequestIEs_t)); - ie->id = F1AP_ProtocolIE_ID_id_RRCRconfigurationCompleteIndicator; + ie->id = F1AP_ProtocolIE_ID_id_RRCReconfigurationCompleteIndicator; ie->criticality = F1AP_Criticality_ignore; - ie->value.present = F1AP_UEContextModificationRequestIEs__value_PR_RRCRconfigurationCompleteIndicator; - ie->value.choice.RRCRconfigurationCompleteIndicator = F1AP_RRCRconfigurationCompleteIndicator_true; + ie->value.present = F1AP_UEContextModificationRequestIEs__value_PR_RRCReconfigurationCompleteIndicator; + ie->value.choice.RRCReconfigurationCompleteIndicator = F1AP_RRCReconfigurationCompleteIndicator_true; ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); } @@ -1325,7 +1336,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) { } /* rLCMode */ - drbs_toBeSetupMod_item.rLCMode = F1AP_RLCMode_rlc_um; // enum + drbs_toBeSetupMod_item.rLCMode = F1AP_RLCMode_rlc_um_bidirectional; // enum /* OPTIONAL */ /* ULConfiguration */ @@ -1366,9 +1377,10 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) { drbs_toBeModified_item.dRBID = 30L; /* qoSInformation */ - drbs_toBeModified_item.qoSInformation.present = F1AP_QoSInformation_PR_eUTRANQoS; - drbs_toBeModified_item.qoSInformation.choice.eUTRANQoS = (F1AP_EUTRANQoS_t *)calloc(1, sizeof(F1AP_EUTRANQoS_t)); - drbs_toBeModified_item.qoSInformation.choice.eUTRANQoS->qCI = 254L; + drbs_toBeModified_item.qoSInformation =calloc(1,sizeof(*drbs_toBeModified_item.qoSInformation)); + drbs_toBeModified_item.qoSInformation->present = F1AP_QoSInformation_PR_eUTRANQoS; + drbs_toBeModified_item.qoSInformation->choice.eUTRANQoS = (F1AP_EUTRANQoS_t *)calloc(1, sizeof(F1AP_EUTRANQoS_t)); + drbs_toBeModified_item.qoSInformation->choice.eUTRANQoS->qCI = 254L; /* ULTunnels_ToBeModified_List */ int j = 0; diff --git a/openair2/F1AP/f1ap_du_interface_management.c b/openair2/F1AP/f1ap_du_interface_management.c index 341c050f55..a4b90bbcaf 100644 --- a/openair2/F1AP/f1ap_du_interface_management.c +++ b/openair2/F1AP/f1ap_du_interface_management.c @@ -95,7 +95,6 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) { uint8_t *buffer; uint32_t len; int i = 0; - int j = 0; /* Create */ /* 0. pdu Type */ @@ -189,7 +188,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) { served_cell_information.nRPCI = f1ap_du_data->nr_pci[i]; // int 0..1007 /* - fiveGS_TAC */ - OCTET_STRING_fromBuf(&served_cell_information.fiveGS_TAC, + OCTET_STRING_fromBuf(served_cell_information.fiveGS_TAC, (const char*)&f1ap_du_data->tac[i], 3); @@ -201,19 +200,11 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) { 2); } - /* - broadcast PLMNs */ - // RK: add the num_available_broadcast_PLMNs to the message - int num_available_broadcast_PLMNs = 1; //f1ap_du_data->num_available_broadcast_PLMNs; - LOG_D(F1AP, "num_available_broadcast_PLMNs = %d \n", num_available_broadcast_PLMNs); - for (j=0; - j PLMN BroadcastPLMNs Item */ - F1AP_BroadcastPLMNs_Item_t *broadcastPLMNs_Item = (F1AP_BroadcastPLMNs_Item_t *)calloc(1, sizeof(F1AP_BroadcastPLMNs_Item_t)); - //MCC_MNC_TO_PLMNID(208, 95, 2, &broadcastPLMNs_Item->pLMN_Identity); - MCC_MNC_TO_PLMNID(f1ap_du_data->mcc[i], f1ap_du_data->mnc[i], f1ap_du_data->mnc_digit_length[i], &broadcastPLMNs_Item->pLMN_Identity); - ASN_SEQUENCE_ADD(&served_cell_information.servedPLMNs.list, broadcastPLMNs_Item); - } + /* servedPLMN information */ + F1AP_ServedPLMNs_Item_t *servedPLMN_item = calloc(1,sizeof(*servedPLMN_item)); + memset(servedPLMN_item,0,sizeof(*servedPLMN_item)); + MCC_MNC_TO_PLMNID(f1ap_du_data->mcc[i], f1ap_du_data->mnc[i], f1ap_du_data->mnc_digit_length[i], &servedPLMN_item->pLMN_Identity); + ASN_SEQUENCE_ADD(&served_cell_information.servedPLMNs.list, servedPLMN_item); // // /* - CHOICE NR-MODE-Info */ F1AP_NR_Mode_Info_t nR_Mode_Info; @@ -503,27 +494,59 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance, F1AP_SETUP_RESP (msg_p).nr_cellid[i]); F1AP_SETUP_RESP (msg_p).nrpci[i] = *cell->nRPCI; - F1AP_ProtocolExtensionContainer_160P9_t *ext = (F1AP_ProtocolExtensionContainer_160P9_t *)cell->iE_Extensions; - AssertFatal(ext!=NULL,"Extension for SI is null\n"); - F1AP_SETUP_RESP (msg_p).num_SI[i] = ext->list.count; - AssertFatal(ext->list.count==1,"At least one SI message should be there, and only 1 for now!\n"); - LOG_D(F1AP, "F1AP: F1Setup-Resp Cell %d MCC %d MNC %d NRCellid %lx num_si %d\n", - i, F1AP_SETUP_RESP (msg_p).mcc[i], F1AP_SETUP_RESP (msg_p).mnc[i], - F1AP_SETUP_RESP (msg_p).nr_cellid[i], F1AP_SETUP_RESP (msg_p).num_SI[i]); - for (int si =0;si < ext->list.count;si++) { - size_t size = ext->list.array[si]->extensionValue.choice.GNB_CUSystemInformation.sImessage.size; - F1AP_SETUP_RESP (msg_p).SI_container_length[i][si] = size; - LOG_D(F1AP, "F1AP: F1Setup-Resp SI_container_length[%d][%d] %ld bytes\n", i, si, size); - F1AP_SETUP_RESP (msg_p).SI_container[i][si] = malloc(F1AP_SETUP_RESP (msg_p).SI_container_length[i][si]); - - memcpy((void*)F1AP_SETUP_RESP (msg_p).SI_container[i][si], - (void*)ext->list.array[si]->extensionValue.choice.GNB_CUSystemInformation.sImessage.buf, - F1AP_SETUP_RESP (msg_p).SI_container_length[i][si]); - } - } - break; - } - } + F1AP_ProtocolExtensionContainer_154P112_t *ext = (F1AP_ProtocolExtensionContainer_154P112_t *)cell->iE_Extensions; + AssertFatal(ext!=NULL,"Extension is null\n"); + for (int cnt=0;cntlist.count;cnt++) { + F1AP_Cells_to_be_Activated_List_ItemExtIEs_t *cells_to_be_activated_list_itemExtIEs=(F1AP_Cells_to_be_Activated_List_ItemExtIEs_t *)ext->list.array[cnt]; + switch (cells_to_be_activated_list_itemExtIEs->id) { +/* + case F1AP_Cells_to_be_Activated_List_ItemExtIEs__extensionValue_PR_NOTHING: + case F1AP_Cells_to_be_Activated_List_ItemExtIEs__extensionValue_PR_GNB_CUSystemInformation, + case F1AP_Cells_to_be_Activated_List_ItemExtIEs__extensionValue_PR_AvailablePLMNList, + case F1AP_Cells_to_be_Activated_List_ItemExtIEs__extensionValue_PR_ExtendedAvailablePLMN_List, + case F1AP_Cells_to_be_Activated_List_ItemExtIEs__extensionValue_PR_IAB_Info_IAB_donor_CU, + case F1AP_Cells_to_be_Activated_List_ItemExtIEs__extensionValue_PR_AvailableSNPN_ID_List +*/ + case F1AP_ProtocolIE_ID_id_gNB_CUSystemInformation: + { + F1AP_GNB_CUSystemInformation_t *gNB_CUSystemInformation = (F1AP_GNB_CUSystemInformation_t*)&cells_to_be_activated_list_itemExtIEs->extensionValue.choice.GNB_CUSystemInformation; + F1AP_SETUP_RESP (msg_p).num_SI[i] = gNB_CUSystemInformation->sibtypetobeupdatedlist.list.count; + AssertFatal(ext->list.count==1,"At least one SI message should be there, and only 1 for now!\n"); + LOG_D(F1AP, "F1AP: F1Setup-Resp Cell %d MCC %d MNC %d NRCellid %lx num_si %d\n", + i, F1AP_SETUP_RESP (msg_p).mcc[i], F1AP_SETUP_RESP (msg_p).mnc[i], + F1AP_SETUP_RESP (msg_p).nr_cellid[i], F1AP_SETUP_RESP (msg_p).num_SI[i]); + for (int si =0;si < gNB_CUSystemInformation->sibtypetobeupdatedlist.list.count;si++) { + F1AP_SibtypetobeupdatedListItem_t *sib_item = gNB_CUSystemInformation->sibtypetobeupdatedlist.list.array[si]; + size_t size = sib_item->sIBmessage.size; + F1AP_SETUP_RESP (msg_p).SI_container_length[i][si] = size; + LOG_D(F1AP, "F1AP: F1Setup-Resp SI_container_length[%d][%d] %ld bytes\n", i, (int)sib_item->sIBtype, size); + F1AP_SETUP_RESP (msg_p).SI_container[i][si] = malloc(F1AP_SETUP_RESP (msg_p).SI_container_length[i][si]); + memcpy((void*)F1AP_SETUP_RESP (msg_p).SI_container[i][sib_item->sIBtype], + (void*)sib_item->sIBmessage.buf, + size); + } + } + break; + case F1AP_ProtocolIE_ID_id_AvailablePLMNList: + AssertFatal(1==0,"F1AP_ProtocolIE_ID_id_AvailablePLMNList not supported yet\n"); + break; + case F1AP_ProtocolIE_ID_id_ExtendedAvailablePLMN_List: + AssertFatal(1==0,"F1AP_ProtocolIE_ID_id_AvailablePLMNList not supported yet\n"); + break; + case F1AP_ProtocolIE_ID_id_IAB_Info_IAB_donor_CU: + AssertFatal(1==0,"F1AP_ProtocolIE_ID_id_AvailablePLMNList not supported yet\n"); + break; + case F1AP_ProtocolIE_ID_id_AvailableSNPN_ID_List: + AssertFatal(1==0,"F1AP_ProtocolIE_ID_id_AvailablePLMNList not supported yet\n"); + break; + default: + AssertFatal(1==0,"F1AP_ProtocolIE_ID_id %d unknown\n",(int)cells_to_be_activated_list_itemExtIEs->id); + break; + } + } // for (cnt=... + } // for (cells_to_activate... + } // switch ie + } // for IE AssertFatal(TransactionId!=-1,"TransactionId was not sent\n"); AssertFatal(num_cells_to_activate>0,"No cells activated\n"); F1AP_SETUP_RESP (msg_p).num_cells_to_activate = num_cells_to_activate; @@ -635,7 +658,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance, served_cell_information.nRPCI = f1ap_setup_req->nr_pci[i]; // int 0..1007 /* - fiveGS_TAC */ - OCTET_STRING_fromBuf(&served_cell_information.fiveGS_TAC, + OCTET_STRING_fromBuf(served_cell_information.fiveGS_TAC, (const char *) &f1ap_setup_req->tac[i], 3); @@ -647,17 +670,11 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance, 2); } - /* - broadcast PLMNs */ - int maxnoofBPLMNS = 1; - for (i=0; - i PLMN BroadcastPLMNs Item */ - F1AP_BroadcastPLMNs_Item_t *broadcastPLMNs_Item = (F1AP_BroadcastPLMNs_Item_t *)calloc(1, sizeof(F1AP_BroadcastPLMNs_Item_t)); - //memset((void *)&broadcastPLMNs_Item, 0, sizeof(F1AP_BroadcastPLMNs_Item_t)); - MCC_MNC_TO_PLMNID(f1ap_setup_req->mcc[i], f1ap_setup_req->mnc[i], f1ap_setup_req->mnc_digit_length[i], &broadcastPLMNs_Item->pLMN_Identity); - ASN_SEQUENCE_ADD(&served_cell_information.servedPLMNs.list, broadcastPLMNs_Item); - } + F1AP_ServedPLMNs_Item_t *servedPLMN_item = calloc(1,sizeof(*servedPLMN_item)); + memset(servedPLMN_item,0,sizeof(*servedPLMN_item)); + MCC_MNC_TO_PLMNID(f1ap_du_data->mcc[i], f1ap_du_data->mnc[i], f1ap_du_data->mnc_digit_length[i], &servedPLMN_item->pLMN_Identity); + ASN_SEQUENCE_ADD(&served_cell_information.servedPLMNs.list, servedPLMN_item); + // // /* - CHOICE NR-MODE-Info */ F1AP_NR_Mode_Info_t nR_Mode_Info; @@ -803,7 +820,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance, served_cell_information.nRPCI = f1ap_setup_req->nr_pci[i]; // int 0..1007 /* - fiveGS_TAC */ - OCTET_STRING_fromBuf(&served_cell_information.fiveGS_TAC, + OCTET_STRING_fromBuf(served_cell_information.fiveGS_TAC, (const char *) &f1ap_setup_req->tac[i], 3); @@ -815,17 +832,12 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance, 2); } - /* - broadcast PLMNs */ - int maxnoofBPLMNS = 1; - for (i=0; - i PLMN BroadcastPLMNs Item */ - F1AP_BroadcastPLMNs_Item_t *broadcastPLMNs_Item = (F1AP_BroadcastPLMNs_Item_t *)calloc(1, sizeof(F1AP_BroadcastPLMNs_Item_t)); - //memset((void *)&broadcastPLMNs_Item, 0, sizeof(F1AP_BroadcastPLMNs_Item_t)); - MCC_MNC_TO_PLMNID(f1ap_setup_req->mcc[i], f1ap_setup_req->mnc[i], f1ap_setup_req->mnc_digit_length[i], &broadcastPLMNs_Item->pLMN_Identity); - ASN_SEQUENCE_ADD(&served_cell_information.servedPLMNs.list, broadcastPLMNs_Item); - } + F1AP_ServedPLMNs_Item_t *servedPLMN_item = calloc(1,sizeof(*servedPLMN_item)); + memset(servedPLMN_item,0,sizeof(*servedPLMN_item)); + MCC_MNC_TO_PLMNID(f1ap_du_data->mcc[i], f1ap_du_data->mnc[i], f1ap_du_data->mnc_digit_length[i], &servedPLMN_item->pLMN_Identity); + ASN_SEQUENCE_ADD(&served_cell_information.servedPLMNs.list, servedPLMN_item); + + // // /* - CHOICE NR-MODE-Info */ F1AP_NR_Mode_Info_t nR_Mode_Info; @@ -963,42 +975,6 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance, ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); - /* mandatory */ - /* c5. Active_Cells_List */ - ie = (F1AP_GNBDUConfigurationUpdateIEs_t *)calloc(1, sizeof(F1AP_GNBDUConfigurationUpdateIEs_t)); - ie->id = F1AP_ProtocolIE_ID_id_Active_Cells_List; - ie->criticality = F1AP_Criticality_reject; - ie->value.present = F1AP_GNBDUConfigurationUpdateIEs__value_PR_Active_Cells_List; - - for (i=0; - i<1; - i++) { - // - F1AP_Active_Cells_ItemIEs_t *active_cells_item_ies; - active_cells_item_ies = (F1AP_Active_Cells_ItemIEs_t *)calloc(1, sizeof(F1AP_Active_Cells_ItemIEs_t)); - active_cells_item_ies->id = F1AP_ProtocolIE_ID_id_Active_Cells_Item; - active_cells_item_ies->criticality = F1AP_Criticality_reject; - active_cells_item_ies->value.present = F1AP_Active_Cells_ItemIEs__value_PR_Active_Cells_Item; - - F1AP_Active_Cells_Item_t active_cells_item; - memset((void *)&active_cells_item, 0, sizeof(F1AP_Active_Cells_Item_t)); - - /* 3.1 oldNRCGI */ - F1AP_NRCGI_t nRCGI; - memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t)); - MCC_MNC_TO_PLMNID(f1ap_setup_req->mcc[i], f1ap_setup_req->mnc[i], f1ap_setup_req->mnc_digit_length[i], - &nRCGI.pLMN_Identity); - NR_CELL_ID_TO_BIT_STRING(f1ap_setup_req->nr_cellid[i], &nRCGI.nRCellIdentity); - active_cells_item.nRCGI = nRCGI; - - /* ADD */ - active_cells_item_ies->value.choice.Active_Cells_Item = active_cells_item; - - ASN_SEQUENCE_ADD(&ie->value.choice.Active_Cells_List.list, - active_cells_item_ies); - } - ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); - if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { LOG_E(F1AP, "Failed to encode F1 setup request\n"); diff --git a/openair2/F1AP/f1ap_du_rrc_message_transfer.c b/openair2/F1AP/f1ap_du_rrc_message_transfer.c index 6953588818..479f0210a2 100644 --- a/openair2/F1AP/f1ap_du_rrc_message_transfer.c +++ b/openair2/F1AP/f1ap_du_rrc_message_transfer.c @@ -161,10 +161,10 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, F1AP_ProtocolIE_ID_id_RAT_FrequencyPriorityInformation, true); switch(ie->value.choice.RAT_FrequencyPriorityInformation.present) { - case F1AP_RAT_FrequencyPriorityInformation_PR_subscriberProfileIDforRFP: + case F1AP_RAT_FrequencyPriorityInformation_PR_eNDC: //subscriberProfileIDforRFP = ie->value.choice.RAT_FrequencyPriorityInformation.choice.subscriberProfileIDforRFP; break; - case F1AP_RAT_FrequencyPriorityInformation_PR_rAT_FrequencySelectionPriority: + case F1AP_RAT_FrequencyPriorityInformation_PR_nGRAN: //rAT_FrequencySelectionPriority = ie->value.choice.RAT_FrequencyPriorityInformation.choice.rAT_FrequencySelectionPriority; break; default: @@ -836,7 +836,7 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP, ie->id = F1AP_ProtocolIE_ID_id_C_RNTI; ie->criticality = F1AP_Criticality_reject; ie->value.present = F1AP_InitialULRRCMessageTransferIEs__value_PR_C_RNTI; - C_RNTI_TO_BIT_STRING(rntiP, &ie->value.choice.C_RNTI); + ie->value.choice.C_RNTI=rntiP; ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); /* mandatory */ diff --git a/openair2/F1AP/f1ap_du_ue_context_management.c b/openair2/F1AP/f1ap_du_ue_context_management.c index bae59a509e..94ab318dbf 100644 --- a/openair2/F1AP/f1ap_du_ue_context_management.c +++ b/openair2/F1AP/f1ap_du_ue_context_management.c @@ -91,7 +91,7 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance, BIT_STRING_TO_NR_CELL_IDENTITY(&ie->value.choice.NRCGI.nRCellIdentity, f1ap_ue_context_setup_req->nr_cellid); /* ServCellIndex */ F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextSetupRequestIEs_t, ie, container, - F1AP_ProtocolIE_ID_id_ServCellndex, true); + F1AP_ProtocolIE_ID_id_ServCellIndex, true); f1ap_ue_context_setup_req->servCellIndex = ie->value.choice.ServCellIndex; /* optional */ /* CellULConfigured */ @@ -227,7 +227,8 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance) { ie->id = F1AP_ProtocolIE_ID_id_C_RNTI; ie->criticality = F1AP_Criticality_ignore; ie->value.present = F1AP_UEContextSetupResponseIEs__value_PR_C_RNTI; - C_RNTI_TO_BIT_STRING(rntiP, &ie->value.choice.C_RNTI); + //C_RNTI_TO_BIT_STRING(rntiP, &ie->value.choice.C_RNTI); + ie->value.choice.C_RNTI=rntiP; ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); } @@ -1016,7 +1017,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) { srbs_failedToBeSetupMod_item.sRBID = 50L; srbs_failedToBeSetupMod_item.cause = (F1AP_Cause_t *)calloc(1, sizeof(F1AP_Cause_t)); srbs_failedToBeSetupMod_item.cause->present = F1AP_Cause_PR_radioNetwork; - srbs_failedToBeSetupMod_item.cause->choice.radioNetwork = F1AP_CauseRadioNetwork_unknown_or_already_allocated_gnd_du_ue_f1ap_id; + srbs_failedToBeSetupMod_item.cause->choice.radioNetwork = F1AP_CauseRadioNetwork_unknown_or_already_allocated_gnb_du_ue_f1ap_id; /* ADD */ srbs_failedToBeSetupMod_item_ies->value.choice.SRBs_FailedToBeSetupMod_Item = srbs_failedToBeSetupMod_item; ASN_SEQUENCE_ADD(&ie->value.choice.SRBs_FailedToBeSetupMod_List.list, @@ -1047,7 +1048,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) { drbs_failedToBeSetupMod_item.dRBID = 30L; drbs_failedToBeSetupMod_item.cause = (F1AP_Cause_t *)calloc(1, sizeof(F1AP_Cause_t)); drbs_failedToBeSetupMod_item.cause->present = F1AP_Cause_PR_radioNetwork; - drbs_failedToBeSetupMod_item.cause->choice.radioNetwork = F1AP_CauseRadioNetwork_unknown_or_already_allocated_gnd_du_ue_f1ap_id; + drbs_failedToBeSetupMod_item.cause->choice.radioNetwork = F1AP_CauseRadioNetwork_unknown_or_already_allocated_gnb_du_ue_f1ap_id; /* ADD */ drbs_failedToBeSetupMod_item_ies->value.choice.DRBs_FailedToBeSetupMod_Item = drbs_failedToBeSetupMod_item; ASN_SEQUENCE_ADD(&ie->value.choice.DRBs_FailedToBeSetupMod_List.list, @@ -1083,7 +1084,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) { scell_failedtoSetupMod_item.sCell_ID = nRCGI; scell_failedtoSetupMod_item.cause = (F1AP_Cause_t *)calloc(1, sizeof(F1AP_Cause_t)); scell_failedtoSetupMod_item.cause->present = F1AP_Cause_PR_radioNetwork; - scell_failedtoSetupMod_item.cause->choice.radioNetwork = F1AP_CauseRadioNetwork_unknown_or_already_allocated_gnd_du_ue_f1ap_id; + scell_failedtoSetupMod_item.cause->choice.radioNetwork = F1AP_CauseRadioNetwork_unknown_or_already_allocated_gnb_du_ue_f1ap_id; /* ADD */ scell_failedtoSetupMod_item_ies->value.choice.SCell_FailedtoSetupMod_Item = scell_failedtoSetupMod_item; ASN_SEQUENCE_ADD(&ie->value.choice.SCell_FailedtoSetupMod_List.list, @@ -1114,7 +1115,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) { drbs_failedToBeModified_item.dRBID = 30L; drbs_failedToBeModified_item.cause = (F1AP_Cause_t *)calloc(1, sizeof(F1AP_Cause_t)); drbs_failedToBeModified_item.cause->present = F1AP_Cause_PR_radioNetwork; - drbs_failedToBeModified_item.cause->choice.radioNetwork = F1AP_CauseRadioNetwork_unknown_or_already_allocated_gnd_du_ue_f1ap_id; + drbs_failedToBeModified_item.cause->choice.radioNetwork = F1AP_CauseRadioNetwork_unknown_or_already_allocated_gnb_du_ue_f1ap_id; /* ADD */ drbs_failedToBeModified_item_ies->value.choice.DRBs_FailedToBeModified_Item = drbs_failedToBeModified_item; ASN_SEQUENCE_ADD(&ie->value.choice.DRBs_FailedToBeModified_List.list, diff --git a/openair2/RRC/LTE/rrc_eNB.c b/openair2/RRC/LTE/rrc_eNB.c index 18b7173a08..94c0babfc0 100644 --- a/openair2/RRC/LTE/rrc_eNB.c +++ b/openair2/RRC/LTE/rrc_eNB.c @@ -1055,7 +1055,7 @@ void release_UE_in_freeList(module_id_t mod_id) { if (id>=0) clean_eNb_dlsch(eNB_PHY->dlsch[id][0]); // clean UCI entries for rnti - for (i=0; iuci_vars[i].rnti == rnti) { LOG_I(MAC, "clean eNb uci_vars[%d] UE %x \n",i, rnti); memset(&eNB_PHY->uci_vars[i],0,sizeof(LTE_eNB_UCI)); @@ -1089,7 +1089,7 @@ void release_UE_in_freeList(module_id_t mod_id) { clean_eNb_ulsch(ulsch); } - for (i=0; iuci_vars[i].rnti == rnti) { LOG_I(MAC, "clean eNb uci_vars[%d] UE %x \n",i, rnti); memset(&eNB_PHY->uci_vars[i],0,sizeof(LTE_eNB_UCI)); diff --git a/openair3/NAS/COMMON/EMM/MSG/CsServiceNotification.h b/openair3/NAS/COMMON/EMM/MSG/CsServiceNotification.h index c173d3b729..4bed349327 100644 --- a/openair3/NAS/COMMON/EMM/MSG/CsServiceNotification.h +++ b/openair3/NAS/COMMON/EMM/MSG/CsServiceNotification.h @@ -26,7 +26,7 @@ #include "ProtocolDiscriminator.h" #include "SecurityHeaderType.h" #include "MessageType.h" -#include "PagingIdentity.h" +#include "NasPagingIdentity.h" #include "Cli.h" #include "SsCode.h" #include "LcsIndicator.h" diff --git a/targets/COMMON/openairinterface5g_limits.h b/targets/COMMON/openairinterface5g_limits.h index ad98a6091b..d10306b4b2 100644 --- a/targets/COMMON/openairinterface5g_limits.h +++ b/targets/COMMON/openairinterface5g_limits.h @@ -6,23 +6,41 @@ # define NUMBER_OF_gNB_MAX 1 # define NUMBER_OF_RU_MAX 2 # define NUMBER_OF_NR_RU_MAX 2 +# define NUMBER_OF_UCI_MAX 16 +# define NUMBER_OF_ULSCH_MAX 16 +# define NUMBER_OF_DLSCH_MAX 16 +# define NUMBER_OF_SRS_MAX 16 +# define NUMBER_OF_NR_ULSCH_MAX 16 +# define NUMBER_OF_NR_DLSCH_MAX 16 +# define NUMBER_OF_NR_UCI_MAX 16 +# define nUMBER_OF_NR_SRS_MAX 16 +# define NUMBER_OF_DLSCH_MAX 16 +# define NUMBER_OF_ULSCH_MAX 16 +# define NUMBER_OF_SCH_STATS_MAX 16 + +# define NUMBER_OF_NR_SCH_STATS_MAX 16 + +# define NUMBER_OF_NR_PUCCH_MAX 16 +# define NUMBER_OF_NR_SR_MAX 16 +# define NUMBER_OF_NR_PDCCH_MAX 16 + +#define MAX_MANAGED_ENB_PER_MOBILE 2 +#define MAX_MANAGED_GNB_PER_MOBILE 2 + # ifndef PHYSIM # ifndef UE_EXPANSION # define NUMBER_OF_UE_MAX 4 # define NUMBER_OF_NR_UE_MAX 4 -# define NUMBER_OF_UCI_VARS_MAX 14 # define NUMBER_OF_CONNECTED_eNB_MAX 1 # define NUMBER_OF_CONNECTED_gNB_MAX 1 # else # define NUMBER_OF_UE_MAX 256 -# define NUMBER_OF_UCI_VARS_MAX 256 # define NUMBER_OF_CONNECTED_eNB_MAX 1 # define NUMBER_OF_CONNECTED_gNB_MAX 1 # endif # else # define NUMBER_OF_UE_MAX 4 # define NUMBER_OF_NR_UE_MAX 4 -# define NUMBER_OF_UCI_VARS_MAX 56 # define NUMBER_OF_CONNECTED_eNB_MAX 1 # define NUMBER_OF_CONNECTED_gNB_MAX 1 # endif From 7cbf24d36c5539c0af86869733c3a8249607bef8 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Sun, 3 Jan 2021 12:28:24 +0100 Subject: [PATCH 023/579] updates for tracing --- openair1/PHY/INIT/lte_init.c | 97 +++++++++---------- .../PHY/LTE_ESTIMATION/lte_eNB_measurements.c | 42 ++++---- openair1/PHY/LTE_TRANSPORT/dlsch_coding.c | 15 +-- openair1/PHY/LTE_TRANSPORT/pucch.c | 5 +- openair1/PHY/LTE_TRANSPORT/transport_common.h | 2 +- openair1/PHY/defs_eNB.h | 32 +++--- openair1/SCHED/phy_procedures_lte_eNb.c | 7 +- openair2/LAYER2/MAC/eNB_scheduler_fairRR.c | 4 +- openair2/LAYER2/MAC/mac.h | 3 +- openair2/RRC/LTE/rrc_eNB.c | 4 +- openair3/NAS/COMMON/IES/NasPagingIdentity.h | 43 ++++++++ targets/COMMON/openairinterface5g_limits.h | 6 +- targets/RT/USER/lte-enb.c | 47 ++++----- 13 files changed, 171 insertions(+), 136 deletions(-) create mode 100644 openair3/NAS/COMMON/IES/NasPagingIdentity.h diff --git a/openair1/PHY/INIT/lte_init.c b/openair1/PHY/INIT/lte_init.c index c0f6c2a39a..9e791123e3 100644 --- a/openair1/PHY/INIT/lte_init.c +++ b/openair1/PHY/INIT/lte_init.c @@ -456,13 +456,13 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB, } // Channel estimates for SRS - for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) { - srs_vars[UE_id].srs_ch_estimates = (int32_t **) malloc16 (64 * sizeof (int32_t *)); - srs_vars[UE_id].srs_ch_estimates_time = (int32_t **) malloc16 (64 * sizeof (int32_t *)); + for (int srs_id = 0; srs_id < NUMBER_OF_SRS_MAX; srs_id++) { + srs_vars[srs_id].srs_ch_estimates = (int32_t **) malloc16 (64 * sizeof (int32_t *)); + srs_vars[srs_id].srs_ch_estimates_time = (int32_t **) malloc16 (64 * sizeof (int32_t *)); for (i = 0; i < 64; i++) { - srs_vars[UE_id].srs_ch_estimates[i] = (int32_t *) malloc16_clear (sizeof (int32_t) * fp->ofdm_symbol_size); - srs_vars[UE_id].srs_ch_estimates_time[i] = (int32_t *) malloc16_clear (sizeof (int32_t) * fp->ofdm_symbol_size * 2); + srs_vars[srs_id].srs_ch_estimates[i] = (int32_t *) malloc16_clear (sizeof (int32_t) * fp->ofdm_symbol_size); + srs_vars[srs_id].srs_ch_estimates_time[i] = (int32_t *) malloc16_clear (sizeof (int32_t) * fp->ofdm_symbol_size * 2); } } //UE_id @@ -470,8 +470,8 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB, init_ulsch_power_LUT (); // SRS - for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) { - srs_vars[UE_id].srs = (int32_t *) malloc16_clear (2 * fp->ofdm_symbol_size * sizeof (int32_t)); + for (int srs_id = 0; srs_id < NUMBER_OF_SRS_MAX; srs_id++) { + srs_vars[srs_id].srs = (int32_t *) malloc16_clear (2 * fp->ofdm_symbol_size * sizeof (int32_t)); } // PRACH @@ -504,34 +504,33 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB, LOG_D(PHY,"[INIT] prach_vars->rxsigF[%d] = %p\n",i,prach_vars->rxsigF[i]); }*/ - for (UE_id=0; UE_idrxdataF_ext = (int32_t **) malloc16 (2 * sizeof (int32_t *)); - pusch_vars[UE_id]->rxdataF_ext2 = (int32_t **) malloc16 (2 * sizeof (int32_t *)); - pusch_vars[UE_id]->drs_ch_estimates = (int32_t **) malloc16 (2 * sizeof (int32_t *)); - pusch_vars[UE_id]->drs_ch_estimates_time = (int32_t **) malloc16 (2 * sizeof (int32_t *)); - pusch_vars[UE_id]->rxdataF_comp = (int32_t **) malloc16 (2 * sizeof (int32_t *)); - pusch_vars[UE_id]->ul_ch_mag = (int32_t **) malloc16 (2 * sizeof (int32_t *)); - pusch_vars[UE_id]->ul_ch_magb = (int32_t **) malloc16 (2 * sizeof (int32_t *)); + pusch_vars[ULSCH_id] = (LTE_eNB_PUSCH *) malloc16_clear (NUMBER_OF_ULSCH_MAX * sizeof (LTE_eNB_PUSCH)); + pusch_vars[ULSCH_id]->rxdataF_ext = (int32_t **) malloc16 (2 * sizeof (int32_t *)); + pusch_vars[ULSCH_id]->rxdataF_ext2 = (int32_t **) malloc16 (2 * sizeof (int32_t *)); + pusch_vars[ULSCH_id]->drs_ch_estimates = (int32_t **) malloc16 (2 * sizeof (int32_t *)); + pusch_vars[ULSCH_id]->drs_ch_estimates_time = (int32_t **) malloc16 (2 * sizeof (int32_t *)); + pusch_vars[ULSCH_id]->rxdataF_comp = (int32_t **) malloc16 (2 * sizeof (int32_t *)); + pusch_vars[ULSCH_id]->ul_ch_mag = (int32_t **) malloc16 (2 * sizeof (int32_t *)); + pusch_vars[ULSCH_id]->ul_ch_magb = (int32_t **) malloc16 (2 * sizeof (int32_t *)); AssertFatal (fp->ofdm_symbol_size > 127, "fp->ofdm_symbol_size %d<128\n", fp->ofdm_symbol_size); AssertFatal (fp->symbols_per_tti > 11, "fp->symbols_per_tti %d < 12\n", fp->symbols_per_tti); AssertFatal (fp->N_RB_UL > 5, "fp->N_RB_UL %d < 6\n", fp->N_RB_UL); for (i = 0; i < 2; i++) { - // RK 2 times because of output format of FFT! // FIXME We should get rid of this - pusch_vars[UE_id]->rxdataF_ext[i] = (int32_t *)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti ); - pusch_vars[UE_id]->rxdataF_ext2[i] = (int32_t *)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti ); - pusch_vars[UE_id]->drs_ch_estimates[i] = (int32_t *)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti ); - pusch_vars[UE_id]->drs_ch_estimates_time[i] = (int32_t *)malloc16_clear( 2*sizeof(int32_t)*fp->ofdm_symbol_size ); - pusch_vars[UE_id]->rxdataF_comp[i] = (int32_t *)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti ); - pusch_vars[UE_id]->ul_ch_mag[i] = (int32_t *)malloc16_clear( fp->symbols_per_tti*sizeof(int32_t)*fp->N_RB_UL*12 ); - pusch_vars[UE_id]->ul_ch_magb[i] = (int32_t *)malloc16_clear( fp->symbols_per_tti*sizeof(int32_t)*fp->N_RB_UL*12 ); + pusch_vars[ULSCH_id]->rxdataF_ext[i] = (int32_t *)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti ); + + pusch_vars[ULSCH_id]->drs_ch_estimates[i] = (int32_t *)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti ); + pusch_vars[ULSCH_id]->drs_ch_estimates_time[i] = (int32_t *)malloc16_clear( 2*sizeof(int32_t)*fp->ofdm_symbol_size ); + pusch_vars[ULSCH_id]->rxdataF_comp[i] = (int32_t *)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti ); + pusch_vars[ULSCH_id]->ul_ch_mag[i] = (int32_t *)malloc16_clear( fp->symbols_per_tti*sizeof(int32_t)*fp->N_RB_UL*12 ); + pusch_vars[ULSCH_id]->ul_ch_magb[i] = (int32_t *)malloc16_clear( fp->symbols_per_tti*sizeof(int32_t)*fp->N_RB_UL*12 ); } - pusch_vars[UE_id]->llr = (int16_t *)malloc16_clear( (8*((3*8*6144)+12))*sizeof(int16_t) ); - } //UE_id + pusch_vars[ULSCH_id]->llr = (int16_t *)malloc16_clear( (8*((3*8*6144)+12))*sizeof(int16_t) ); + } //ULSCH_id for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) eNB->UE_stats_ptr[UE_id] = &eNB->UE_stats[UE_id]; @@ -561,19 +560,19 @@ void phy_free_lte_eNB(PHY_VARS_eNB *eNB) { free_and_zero(common_vars->rxdataF); // Channel estimates for SRS - for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) { + for (int srs_id = 0; srs_id < NUMBER_OF_SRS_MAX; srs_id++) { for (i=0; i<64; i++) { - free_and_zero(srs_vars[UE_id].srs_ch_estimates[i]); - free_and_zero(srs_vars[UE_id].srs_ch_estimates_time[i]); + free_and_zero(srs_vars[srs_id].srs_ch_estimates[i]); + free_and_zero(srs_vars[srs_id].srs_ch_estimates_time[i]); } - free_and_zero(srs_vars[UE_id].srs_ch_estimates); - free_and_zero(srs_vars[UE_id].srs_ch_estimates_time); + free_and_zero(srs_vars[srs_id].srs_ch_estimates); + free_and_zero(srs_vars[srs_id].srs_ch_estimates_time); } //UE_id free_ul_ref_sigs(); - for (UE_id=0; UE_idprachF); @@ -591,26 +590,26 @@ void phy_free_lte_eNB(PHY_VARS_eNB *eNB) { free_and_zero(prach_vars_br->prachF); free_and_zero(prach_vars->rxsigF[0]); - for (UE_id=0; UE_idrxdataF_ext[i]); - free_and_zero(pusch_vars[UE_id]->rxdataF_ext2[i]); - free_and_zero(pusch_vars[UE_id]->drs_ch_estimates[i]); - free_and_zero(pusch_vars[UE_id]->drs_ch_estimates_time[i]); - free_and_zero(pusch_vars[UE_id]->rxdataF_comp[i]); - free_and_zero(pusch_vars[UE_id]->ul_ch_mag[i]); - free_and_zero(pusch_vars[UE_id]->ul_ch_magb[i]); + free_and_zero(pusch_vars[ULSCH_id]->rxdataF_ext[i]); + free_and_zero(pusch_vars[ULSCH_id]->rxdataF_ext2[i]); + free_and_zero(pusch_vars[ULSCH_id]->drs_ch_estimates[i]); + free_and_zero(pusch_vars[ULSCH_id]->drs_ch_estimates_time[i]); + free_and_zero(pusch_vars[ULSCH_id]->rxdataF_comp[i]); + free_and_zero(pusch_vars[ULSCH_id]->ul_ch_mag[i]); + free_and_zero(pusch_vars[ULSCH_id]->ul_ch_magb[i]); } - free_and_zero(pusch_vars[UE_id]->rxdataF_ext); - free_and_zero(pusch_vars[UE_id]->rxdataF_ext2); - free_and_zero(pusch_vars[UE_id]->drs_ch_estimates); - free_and_zero(pusch_vars[UE_id]->drs_ch_estimates_time); - free_and_zero(pusch_vars[UE_id]->rxdataF_comp); - free_and_zero(pusch_vars[UE_id]->ul_ch_mag); - free_and_zero(pusch_vars[UE_id]->ul_ch_magb); - free_and_zero(pusch_vars[UE_id]->llr); - free_and_zero(pusch_vars[UE_id]); + free_and_zero(pusch_vars[ULSCH_id]->rxdataF_ext); + free_and_zero(pusch_vars[ULSCH_id]->rxdataF_ext2); + free_and_zero(pusch_vars[ULSCH_id]->drs_ch_estimates); + free_and_zero(pusch_vars[ULSCH_id]->drs_ch_estimates_time); + free_and_zero(pusch_vars[ULSCH_id]->rxdataF_comp); + free_and_zero(pusch_vars[ULSCH_id]->ul_ch_mag); + free_and_zero(pusch_vars[ULSCH_id]->ul_ch_magb); + free_and_zero(pusch_vars[ULSCH_id]->llr); + free_and_zero(pusch_vars[ULSCH_id]); } //UE_id for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) eNB->UE_stats_ptr[UE_id] = NULL; diff --git a/openair1/PHY/LTE_ESTIMATION/lte_eNB_measurements.c b/openair1/PHY/LTE_ESTIMATION/lte_eNB_measurements.c index 2d79158920..a4ae65e642 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_eNB_measurements.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_eNB_measurements.c @@ -121,12 +121,12 @@ void lte_eNB_I0_measurements(PHY_VARS_eNB *eNB, void lte_eNB_srs_measurements(PHY_VARS_eNB *eNB, module_id_t eNB_id, - module_id_t UE_id, + module_id_t srs_id, unsigned char init_averaging) { LTE_DL_FRAME_PARMS *frame_parms = &eNB->frame_parms; PHY_MEASUREMENTS_eNB *measurements = &eNB->measurements; - LTE_eNB_SRS *srs_vars = &eNB->srs_vars[UE_id]; + LTE_eNB_SRS *srs_vars = &eNB->srs_vars[srs_id]; int32_t aarx,rx_power_correction; int32_t rx_power; @@ -136,7 +136,7 @@ void lte_eNB_srs_measurements(PHY_VARS_eNB *eNB, //printf("Running eNB_srs_measurements for eNB_id %d\n",eNB_id); if (init_averaging == 1) - rx_power_avg_eNB[UE_id] = 0; + rx_power_avg_eNB[srs_id] = 0; rx_power = 0; @@ -152,24 +152,24 @@ void lte_eNB_srs_measurements(PHY_VARS_eNB *eNB, for (aarx=0; aarxnb_antennas_rx; aarx++) { - measurements->rx_spatial_power[UE_id][0][aarx] = + measurements->rx_spatial_power[srs_id][0][aarx] = ((signal_energy_nodc(&srs_vars->srs_ch_estimates[aarx][frame_parms->first_carrier_offset], (frame_parms->N_RB_DL*6)) + signal_energy_nodc(&srs_vars->srs_ch_estimates[aarx][1], (frame_parms->N_RB_DL*6)))*rx_power_correction) - measurements->n0_power[aarx]; - measurements->rx_spatial_power[UE_id][0][aarx]<<=1; // because of noise only in odd samples + measurements->rx_spatial_power[srs_id][0][aarx]<<=1; // because of noise only in odd samples - measurements->rx_spatial_power_dB[UE_id][0][aarx] = (unsigned short) dB_fixed(measurements->rx_spatial_power[UE_id][0][aarx]); + measurements->rx_spatial_power_dB[srs_id][0][aarx] = (unsigned short) dB_fixed(measurements->rx_spatial_power[srs_id][0][aarx]); - measurements->wideband_cqi[UE_id][aarx] = measurements->rx_spatial_power[UE_id][0][aarx]; + measurements->wideband_cqi[srs_id][aarx] = measurements->rx_spatial_power[srs_id][0][aarx]; // measurements->rx_power[UE_id][aarx]/=frame_parms->nb_antennas_tx; - measurements->wideband_cqi_dB[UE_id][aarx] = (unsigned short) dB_fixed(measurements->wideband_cqi[UE_id][aarx]); - rx_power += measurements->wideband_cqi[UE_id][aarx]; + measurements->wideband_cqi_dB[srs_id][aarx] = (unsigned short) dB_fixed(measurements->wideband_cqi[srs_id][aarx]); + rx_power += measurements->wideband_cqi[srs_id][aarx]; // measurements->rx_avg_power_dB[UE_id] += measurements->rx_power_dB[UE_id][aarx]; } @@ -177,14 +177,14 @@ void lte_eNB_srs_measurements(PHY_VARS_eNB *eNB, // measurements->rx_avg_power_dB[UE_id]/=frame_parms->nb_antennas_rx; if (init_averaging == 0) - rx_power_avg_eNB[UE_id] = ((k1*rx_power_avg_eNB[UE_id]) + (k2*rx_power))>>10; + rx_power_avg_eNB[srs_id] = ((k1*rx_power_avg_eNB[srs_id]) + (k2*rx_power))>>10; else - rx_power_avg_eNB[UE_id] = rx_power; + rx_power_avg_eNB[srs_id] = rx_power; - measurements->wideband_cqi_tot[UE_id] = dB_fixed2(rx_power,2*measurements->n0_power_tot); + measurements->wideband_cqi_tot[srs_id] = dB_fixed2(rx_power,2*measurements->n0_power_tot); // times 2 since we have noise only in the odd carriers of the srs comb - measurements->rx_rssi_dBm[UE_id] = (int32_t)dB_fixed(rx_power_avg_eNB[UE_id])-eNB->rx_total_gain_dB; + measurements->rx_rssi_dBm[srs_id] = (int32_t)dB_fixed(rx_power_avg_eNB[srs_id])-eNB->rx_total_gain_dB; @@ -200,21 +200,21 @@ void lte_eNB_srs_measurements(PHY_VARS_eNB *eNB, else if (rb>12) ul_ch = &srs_vars->srs_ch_estimates[aarx][6 + (rb-13)*12]; else { - measurements->subband_cqi_dB[UE_id][aarx][rb] = 0; + measurements->subband_cqi_dB[srs_id][aarx][rb] = 0; continue; } // cqi if (aarx==0) - measurements->subband_cqi_tot[UE_id][rb]=0; + measurements->subband_cqi_tot[srs_id][rb]=0; - measurements->subband_cqi[UE_id][aarx][rb] = (signal_energy_nodc(ul_ch,12))*rx_power_correction - measurements->n0_power[aarx]; + measurements->subband_cqi[srs_id][aarx][rb] = (signal_energy_nodc(ul_ch,12))*rx_power_correction - measurements->n0_power[aarx]; - if (measurements->subband_cqi[UE_id][aarx][rb] < 0) - measurements->subband_cqi[UE_id][aarx][rb]=0; + if (measurements->subband_cqi[srs_id][aarx][rb] < 0) + measurements->subband_cqi[srs_id][aarx][rb]=0; - measurements->subband_cqi_tot[UE_id][rb] += measurements->subband_cqi[UE_id][aarx][rb]; - measurements->subband_cqi_dB[UE_id][aarx][rb] = dB_fixed2(measurements->subband_cqi[UE_id][aarx][rb], + measurements->subband_cqi_tot[srs_id][rb] += measurements->subband_cqi[srs_id][aarx][rb]; + measurements->subband_cqi_dB[srs_id][aarx][rb] = dB_fixed2(measurements->subband_cqi[srs_id][aarx][rb], 2*measurements->n0_power[aarx]); // 2*n0_power since we have noise from the odd carriers in the comb of the srs @@ -225,7 +225,7 @@ void lte_eNB_srs_measurements(PHY_VARS_eNB *eNB, for (rb=0; rbN_RB_DL; rb++) { - measurements->subband_cqi_tot_dB[UE_id][rb] = dB_fixed2(measurements->subband_cqi_tot[UE_id][rb], + measurements->subband_cqi_tot_dB[srs_id][rb] = dB_fixed2(measurements->subband_cqi_tot[srs_id][rb], measurements->n0_power_tot); /* if (measurements->subband_cqi_tot_dB[UE_id][rb] == 65) diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c b/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c index bba402d34a..550ec0a3e8 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c @@ -96,6 +96,7 @@ void free_eNB_dlsch(LTE_eNB_DLSCH_t *dlsch) { } + LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo, unsigned char Mdlharq, uint32_t Nsoft, @@ -160,7 +161,7 @@ LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo, for (i=0; iharq_processes[i] = (LTE_DL_eNB_HARQ_t *)malloc16(sizeof(LTE_DL_eNB_HARQ_t)); - LOG_T(PHY, "Required mem size %d (bw scaling %d), dlsch->harq_processes[%d] %p\n", + LOG_I(PHY, "Required DLSCH mem size %d (bw scaling %d), dlsch->harq_processes[%d] %p\n", MAX_DLSCH_PAYLOAD_BYTES/bw_scaling,bw_scaling, i,dlsch->harq_processes[i]); if (dlsch->harq_processes[i]) { @@ -169,9 +170,9 @@ LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo, dlsch->harq_processes[i]->b = (unsigned char *)malloc16(MAX_DLSCH_PAYLOAD_BYTES/bw_scaling); if (dlsch->harq_processes[i]->b) { - bzero(dlsch->harq_processes[i]->b,MAX_DLSCH_PAYLOAD_BYTES/bw_scaling); + memset(dlsch->harq_processes[i]->b,0,MAX_DLSCH_PAYLOAD_BYTES/bw_scaling); } else { - printf("Can't get b\n"); + AssertFatal(1==0,"Can't get b\n"); exit_flag=1; } @@ -181,15 +182,15 @@ LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo, dlsch->harq_processes[i]->c[r] = (uint8_t *)malloc16(((r==0)?8:0) + 3+ 768); if (dlsch->harq_processes[i]->c[r]) { - bzero(dlsch->harq_processes[i]->c[r],((r==0)?8:0) + 3+ 768); + memset(dlsch->harq_processes[i]->c[r],0,((r==0)?8:0) + 3+ 768); } else { - printf("Can't get c\n"); + AssertFatal(1==0,"Can't get c\n"); exit_flag=2; } } } } else { - printf("Can't get harq_p %d\n",i); + AssertFatal(1==0,"Can't get harq_p %d\n",i); exit_flag=3; } } @@ -203,7 +204,7 @@ LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo, } } - LOG_D(PHY,"new_eNB_dlsch exit flag %d, size of %ld\n", + LOG_I(PHY,"new_eNB_dlsch exit flag %d, size of %ld\n", exit_flag, sizeof(LTE_eNB_DLSCH_t)); free_eNB_dlsch(dlsch); return(NULL); diff --git a/openair1/PHY/LTE_TRANSPORT/pucch.c b/openair1/PHY/LTE_TRANSPORT/pucch.c index 627d51314c..fd7e7bad76 100644 --- a/openair1/PHY/LTE_TRANSPORT/pucch.c +++ b/openair1/PHY/LTE_TRANSPORT/pucch.c @@ -79,11 +79,14 @@ void dump_uci_stats(PHY_VARS_eNB *eNB,int frame) { dB_fixed(uci_stats->pucch1_high_stat[0]), dB_fixed(uci_stats->pucch1_high_stat[1])); - LOG_I(PHY,"UCI RNTI %x: pucch1a_trials %d, pucch1a_stat (%d,%d) pucch1ab_DTX %d\n", + LOG_I(PHY,"UCI RNTI %x: pucch1a_trials %d, pucch1a_stat (%d,%d), pucch1b_trials %d, pucch1b_stat (%d,%d) pucch1ab_DTX %d\n", uci_stats->rnti, uci_stats->pucch1a_trials, uci_stats->current_pucch1a_stat_re, uci_stats->current_pucch1a_stat_im, + uci_stats->pucch1b_trials, + uci_stats->current_pucch1b_stat_re, + uci_stats->current_pucch1b_stat_im, uci_stats->pucch1ab_DTX); } diff --git a/openair1/PHY/LTE_TRANSPORT/transport_common.h b/openair1/PHY/LTE_TRANSPORT/transport_common.h index 44cc2be352..7c1065736d 100644 --- a/openair1/PHY/LTE_TRANSPORT/transport_common.h +++ b/openair1/PHY/LTE_TRANSPORT/transport_common.h @@ -57,7 +57,7 @@ // maximum of 3 segments before each coding block if data length exceeds 6144 bits. -#define MAX_NUM_DLSCH_SEGMENTS 16 +#define MAX_NUM_DLSCH_SEGMENTS 13 #define MAX_NUM_ULSCH_SEGMENTS MAX_NUM_DLSCH_SEGMENTS #define MAX_DLSCH_PAYLOAD_BYTES (MAX_NUM_DLSCH_SEGMENTS*768) #define MAX_ULSCH_PAYLOAD_BYTES (MAX_NUM_ULSCH_SEGMENTS*768) diff --git a/openair1/PHY/defs_eNB.h b/openair1/PHY/defs_eNB.h index f845997423..a2caba8dfd 100644 --- a/openair1/PHY/defs_eNB.h +++ b/openair1/PHY/defs_eNB.h @@ -396,30 +396,30 @@ typedef struct { short n0_subband_power_avg_dB; // eNB measurements (per user) //! estimated received spatial signal power (linear) - unsigned int rx_spatial_power[NUMBER_OF_UE_MAX][2][2]; + unsigned int rx_spatial_power[NUMBER_OF_SRS_MAX][2][2]; //! estimated received spatial signal power (dB) - unsigned short rx_spatial_power_dB[NUMBER_OF_UE_MAX][2][2]; + unsigned short rx_spatial_power_dB[NUMBER_OF_SRS_MAX][2][2]; //! estimated rssi (dBm) - short rx_rssi_dBm[NUMBER_OF_UE_MAX]; + short rx_rssi_dBm[NUMBER_OF_SRS_MAX]; //! estimated correlation (wideband linear) between spatial channels (computed in dlsch_demodulation) - int rx_correlation[NUMBER_OF_UE_MAX][2]; + int rx_correlation[NUMBER_OF_SRS_MAX][2]; //! estimated correlation (wideband dB) between spatial channels (computed in dlsch_demodulation) - int rx_correlation_dB[NUMBER_OF_UE_MAX][2]; + int rx_correlation_dB[NUMBER_OF_SRS_MAX][2]; /// Wideband CQI (= SINR) - int wideband_cqi[NUMBER_OF_UE_MAX][MAX_NUM_RU_PER_eNB]; + int wideband_cqi[NUMBER_OF_SRS_MAX][MAX_NUM_RU_PER_eNB]; /// Wideband CQI in dB (= SINR dB) - int wideband_cqi_dB[NUMBER_OF_UE_MAX][MAX_NUM_RU_PER_eNB]; + int wideband_cqi_dB[NUMBER_OF_SRS_MAX][MAX_NUM_RU_PER_eNB]; /// Wideband CQI (sum of all RX antennas, in dB) - char wideband_cqi_tot[NUMBER_OF_UE_MAX]; + char wideband_cqi_tot[NUMBER_OF_SRS_MAX]; /// Subband CQI per RX antenna and RB (= SINR) - int subband_cqi[NUMBER_OF_UE_MAX][MAX_NUM_RU_PER_eNB][100]; + int subband_cqi[NUMBER_OF_SRS_MAX][MAX_NUM_RU_PER_eNB][100]; /// Total Subband CQI and RB (= SINR) int subband_cqi_tot[NUMBER_OF_UE_MAX][100]; /// Subband CQI in dB and RB (= SINR dB) - int subband_cqi_dB[NUMBER_OF_UE_MAX][MAX_NUM_RU_PER_eNB][100]; + int subband_cqi_dB[NUMBER_OF_SRS_MAX][MAX_NUM_RU_PER_eNB][100]; /// Total Subband CQI and RB - int subband_cqi_tot_dB[NUMBER_OF_UE_MAX][100]; + int subband_cqi_tot_dB[NUMBER_OF_SRS_MAX][100]; /// PRACH background noise level int prach_I0; } PHY_MEASUREMENTS_eNB; @@ -508,12 +508,12 @@ typedef struct PHY_VARS_eNB_s { LTE_eNB_PRACH prach_vars_br; LTE_eNB_COMMON common_vars; LTE_eNB_UCI uci_vars[NUMBER_OF_UCI_MAX]; - LTE_eNB_SRS srs_vars[NUMBER_OF_UE_MAX]; + LTE_eNB_SRS srs_vars[NUMBER_OF_SRS_MAX]; LTE_eNB_PBCH pbch; - LTE_eNB_PUSCH *pusch_vars[NUMBER_OF_UE_MAX]; + LTE_eNB_PUSCH *pusch_vars[NUMBER_OF_ULSCH_MAX]; LTE_eNB_PRACH prach_vars; - LTE_eNB_DLSCH_t *dlsch[NUMBER_OF_UE_MAX][2]; // Nusers times two spatial streams - LTE_eNB_ULSCH_t *ulsch[NUMBER_OF_UE_MAX+1]; // Nusers + number of RA + LTE_eNB_DLSCH_t *dlsch[NUMBER_OF_DLSCH_MAX][2]; // Num active DLSCH contexts times two spatial streams + LTE_eNB_ULSCH_t *ulsch[NUMBER_OF_ULSCH_MAX]; // Num active ULSCH contexts LTE_eNB_DLSCH_t *dlsch_SI,*dlsch_ra,*dlsch_p; LTE_eNB_DLSCH_t *dlsch_MCH; LTE_eNB_DLSCH_t *dlsch_PCH; @@ -524,7 +524,7 @@ typedef struct PHY_VARS_eNB_s { uint32_t lte_gold_table[20][2][14]; /// UE-specific reference symbols (p=5), TM 7 - uint32_t lte_gold_uespec_port5_table[NUMBER_OF_UE_MAX][20][38]; + uint32_t lte_gold_uespec_port5_table[NUMBER_OF_DLSCH_MAX][20][38]; /// UE-specific reference symbols (p=7...14), TM 8/9/10 uint32_t lte_gold_uespec_table[2][20][2][21]; diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c index 78cca83e53..89b3dea7d6 100644 --- a/openair1/SCHED/phy_procedures_lte_eNb.c +++ b/openair1/SCHED/phy_procedures_lte_eNb.c @@ -1472,6 +1472,7 @@ void pusch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) { ulsch_harq->V_UL_DAI, ulsch_harq->nb_rb>20 ? 1 : 0); stop_meas(&eNB->ulsch_decoding_stats); +/* int ulsch_id=-1; for (ulsch_id=0;ulsch_idrnti == eNB->ulsch_stats[ulsch_id].rnti) break; @@ -1481,7 +1482,7 @@ void pusch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) { dump_ulsch(eNB,frame,subframe,i,ulsch_harq->round); AssertFatal(1==0,"exiting\n"); } - +*/ } else if ((ulsch) && (ulsch->rnti>0) && @@ -1648,10 +1649,10 @@ void fill_rx_indication(PHY_VARS_eNB *eNB, else pdu->rx_indication_rel8.ul_cqi = (640 + SNRtimes10) / 5; - LOG_I(PHY,"[PUSCH %d] Frame %d Subframe %d Filling RX_indication with SNR %d (%d,%d,%d), timing_advance %d (update %d,sync_pos %d)\n", + LOG_D(PHY,"[PUSCH %d] Frame %d Subframe %d Filling RX_indication with SNR %d (%d,%d,%d), timing_advance %d (update %d,sync_pos %d)\n", harq_pid,frame,subframe,SNRtimes10,pdu->rx_indication_rel8.ul_cqi,dB_fixed_times10(total_power),dB_fixed_times10(avg_noise_power),pdu->rx_indication_rel8.timing_advance,timing_advance_update,sync_pos); for (int i=0;iframe_parms.nb_antennas_rx;i++) - LOG_I(PHY,"antenna %d: ulsch_power %d, noise_power %d\n",i,dB_fixed_times10(eNB->pusch_vars[ULSCH_id]->ulsch_power[i]),dB_fixed_times10(eNB->pusch_vars[ULSCH_id]->ulsch_noise_power[i])); + LOG_D(PHY,"antenna %d: ulsch_power %d, noise_power %d\n",i,dB_fixed_times10(eNB->pusch_vars[ULSCH_id]->ulsch_power[i]),dB_fixed_times10(eNB->pusch_vars[ULSCH_id]->ulsch_noise_power[i])); eNB->UL_INFO.rx_ind.rx_indication_body.number_of_pdus++; eNB->UL_INFO.rx_ind.sfn_sf = frame<<4 | subframe; diff --git a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c index 2dcde6c852..59c7bf1ef2 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c @@ -1968,10 +1968,10 @@ schedule_ue_spec_fairRR(module_id_t module_idP, UE_info->UE_template[CC_id][UE_id].pucch_tpc_tx_frame=frameP; UE_info->UE_template[CC_id][UE_id].pucch_tpc_tx_subframe=subframeP; - if (snr > target_snr + 4) { + if (snr > target_snr + PUSCH_PCHYST) { tpc = 0; //-1 ue_sched_ctl->pucch_tpc_accumulated[CC_id]--; - } else if (snr < target_snr - 4) { + } else if (snr < target_snr - PUSCH_PCHYST) { tpc = 2; //+1 ue_sched_ctl->pucch_tpc_accumulated[CC_id]++; } else { diff --git a/openair2/LAYER2/MAC/mac.h b/openair2/LAYER2/MAC/mac.h index 30714bd5a9..55cb06c28f 100644 --- a/openair2/LAYER2/MAC/mac.h +++ b/openair2/LAYER2/MAC/mac.h @@ -143,7 +143,8 @@ #define MAX_SUPPORTED_BW 4 /*!\brief CQI values range from 1 to 15 (4 bits) */ #define CQI_VALUE_RANGE 16 - +/*!\brief Hysteresis of PUSCH power control loop */ +#define PUSCH_PCHYST 1 /*!\brief value for indicating BSR Timer is not running */ #define MAC_UE_BSR_TIMER_NOT_RUNNING (0xFFFF) diff --git a/openair2/RRC/LTE/rrc_eNB.c b/openair2/RRC/LTE/rrc_eNB.c index 94c0babfc0..5c6daaff09 100644 --- a/openair2/RRC/LTE/rrc_eNB.c +++ b/openair2/RRC/LTE/rrc_eNB.c @@ -8270,7 +8270,7 @@ rrc_eNB_decode_dcch( ASN_STRUCT_FREE(asn_DEF_NR_UE_NR_Capability,ue_context_p->ue_context.UE_Capability_nr); ue_context_p->ue_context.UE_Capability_nr = 0; } - + LOG_I(RRC,"Received NR_UE_Capabilities\n"); dec_rval = uper_decode(NULL, &asn_DEF_NR_UE_NR_Capability, (void **)&ue_context_p->ue_context.UE_Capability_nr, @@ -8295,6 +8295,8 @@ rrc_eNB_decode_dcch( if (ul_dcch_msg->message.choice.c1.choice.ueCapabilityInformation.criticalExtensions.choice.c1.choice.ueCapabilityInformation_r8.ue_CapabilityRAT_ContainerList.list.array[i]->rat_Type == LTE_RAT_Type_eutra_nr) { + LOG_I(RRC,"Received UE_Capabilities_MRDC\n"); + if(ue_context_p->ue_context.UE_Capability_MRDC) { ASN_STRUCT_FREE(asn_DEF_NR_UE_MRDC_Capability,ue_context_p->ue_context.UE_Capability_MRDC); ue_context_p->ue_context.UE_Capability_MRDC = 0; diff --git a/openair3/NAS/COMMON/IES/NasPagingIdentity.h b/openair3/NAS/COMMON/IES/NasPagingIdentity.h new file mode 100644 index 0000000000..e94a6a803a --- /dev/null +++ b/openair3/NAS/COMMON/IES/NasPagingIdentity.h @@ -0,0 +1,43 @@ +/* + * 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 + */ + +#include +#include +#include + +#include "OctetString.h" + +#ifndef PAGING_IDENTITY_H_ +#define PAGING_IDENTITY_H_ + +#define PAGING_IDENTITY_MINIMUM_LENGTH 2 +#define PAGING_IDENTITY_MAXIMUM_LENGTH 2 + +typedef uint8_t PagingIdentity; + +int encode_paging_identity(PagingIdentity *pagingidentity, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_paging_identity_xml(PagingIdentity *pagingidentity, uint8_t iei); + +int decode_paging_identity(PagingIdentity *pagingidentity, uint8_t iei, uint8_t *buffer, uint32_t len); + +#endif /* PAGING IDENTITY_H_ */ + diff --git a/targets/COMMON/openairinterface5g_limits.h b/targets/COMMON/openairinterface5g_limits.h index d10306b4b2..b40871b25c 100644 --- a/targets/COMMON/openairinterface5g_limits.h +++ b/targets/COMMON/openairinterface5g_limits.h @@ -7,15 +7,13 @@ # define NUMBER_OF_RU_MAX 2 # define NUMBER_OF_NR_RU_MAX 2 # define NUMBER_OF_UCI_MAX 16 -# define NUMBER_OF_ULSCH_MAX 16 -# define NUMBER_OF_DLSCH_MAX 16 +# define NUMBER_OF_ULSCH_MAX 8 +# define NUMBER_OF_DLSCH_MAX 8 # define NUMBER_OF_SRS_MAX 16 # define NUMBER_OF_NR_ULSCH_MAX 16 # define NUMBER_OF_NR_DLSCH_MAX 16 # define NUMBER_OF_NR_UCI_MAX 16 # define nUMBER_OF_NR_SRS_MAX 16 -# define NUMBER_OF_DLSCH_MAX 16 -# define NUMBER_OF_ULSCH_MAX 16 # define NUMBER_OF_SCH_STATS_MAX 16 # define NUMBER_OF_NR_SCH_STATS_MAX 16 diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c index 73a32ca1a5..8d50eceb67 100644 --- a/targets/RT/USER/lte-enb.c +++ b/targets/RT/USER/lte-enb.c @@ -1067,60 +1067,47 @@ void print_opp_meas(void) { void free_transport(PHY_VARS_eNB *eNB) { - for (int i=0; idlsch[i][j]); - - LOG_D(PHY, "Freeing Transport Channel Buffer for ULSCH, UE %d\n",i); - free_eNB_ulsch(eNB->ulsch[1+i]); } - - free_eNB_ulsch(eNB->ulsch[0]); + for (int i=0;iulsch[i]); + } } void init_transport(PHY_VARS_eNB *eNB) { - int i; - int j; LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms; LOG_I(PHY, "Initialise transport\n"); if (NFAPI_MODE!=NFAPI_MODE_VNF) { - for (i=0; idlsch[i][j] = new_eNB_dlsch(1,8,NSOFT,fp->N_RB_DL,0,fp); - + LOG_I(PHY,"eNB->dlsch[%d][%d] %p\n",i,j,eNB->dlsch[i][j]); if (!eNB->dlsch[i][j]) { - LOG_E(PHY,"Can't get eNB dlsch structures for UE %d \n", i); + LOG_E(PHY,"Can't get eNB dlsch structures for DLSCH %d \n", i); exit(-1); } else { eNB->dlsch[i][j]->rnti=0; LOG_D(PHY,"dlsch[%d][%d] => %p rnti:%d\n",i,j,eNB->dlsch[i][j], eNB->dlsch[i][j]->rnti); } } + } + for (int i=0;iulsch[1+i] = new_eNB_ulsch(MAX_TURBO_ITERATIONS,fp->N_RB_UL, 0); + LOG_I(PHY,"Allocating Transport Channel Buffer for ULSCH %d/%d\n",i,NUMBER_OF_ULSCH_MAX); + eNB->ulsch[i] = new_eNB_ulsch(MAX_TURBO_ITERATIONS,fp->N_RB_UL, 0); - if (!eNB->ulsch[1+i]) { + if (!eNB->ulsch[i]) { LOG_E(PHY,"Can't get eNB ulsch structures\n"); exit(-1); } - - // this is the transmission mode for the signalling channels - // this will be overwritten with the real transmission mode by the RRC once the UE is connected - eNB->transmission_mode[i] = fp->nb_antenna_ports_eNB==1 ? 1 : 2; - } - - // ULSCH for RA - eNB->ulsch[0] = new_eNB_ulsch(MAX_TURBO_ITERATIONS, fp->N_RB_UL, 0); - - if (!eNB->ulsch[0]) { - LOG_E(PHY,"Can't get eNB ulsch structures\n"); - exit(-1); } eNB->dlsch_SI = new_eNB_dlsch(1,8,NSOFT,fp->N_RB_DL, 0, fp); @@ -1133,7 +1120,7 @@ void init_transport(PHY_VARS_eNB *eNB) { eNB->rx_total_gain_dB=130; - for(i=0; imu_mimo_mode[i].dl_pow_off = 2; eNB->check_for_total_transmissions = 0; From 09a63cb998de7e64d0427a50df7448334c191f5b Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Tue, 5 Jan 2021 22:46:41 +0100 Subject: [PATCH 024/579] logging and unitary compilations --- openair1/SIMULATION/LTE_PHY/dlsim.c | 3 ++- openair1/SIMULATION/LTE_PHY/ulsim.c | 2 +- openair2/LAYER2/MAC/eNB_scheduler.c | 11 +++++++++++ openair2/LAYER2/MAC/eNB_scheduler_fairRR.c | 13 ++++++++----- openair2/LAYER2/MAC/eNB_scheduler_ulsch.c | 3 ++- openair2/LAYER2/MAC/mac.h | 16 ++++++++++++++++ 6 files changed, 40 insertions(+), 8 deletions(-) diff --git a/openair1/SIMULATION/LTE_PHY/dlsim.c b/openair1/SIMULATION/LTE_PHY/dlsim.c index c6a4142edf..5d5d146049 100644 --- a/openair1/SIMULATION/LTE_PHY/dlsim.c +++ b/openair1/SIMULATION/LTE_PHY/dlsim.c @@ -935,9 +935,10 @@ int main(int argc, char **argv) { NB_RB = conv_nprb(0,DLSCH_RB_ALLOC,N_RB_DL); } else { - if (rballocset==0) NB_RB = 8; + if (rballocset==0) NB_RB = 2+TPC; else NB_RB = DLSCH_RB_ALLOC; + printf("Common PDSCH: NB_RB = %d\n",NB_RB); AssertFatal(NB_RB <= N_RB_DL,"illegal NB_RB %d\n",NB_RB); } diff --git a/openair1/SIMULATION/LTE_PHY/ulsim.c b/openair1/SIMULATION/LTE_PHY/ulsim.c index e9de56fd84..7f60cd5ab9 100644 --- a/openair1/SIMULATION/LTE_PHY/ulsim.c +++ b/openair1/SIMULATION/LTE_PHY/ulsim.c @@ -1300,7 +1300,7 @@ int main(int argc, char **argv) { LOG_UDUMPMSG(SIM,dataArray(table_rx),table_rx->size,LOG_DUMP_DOUBLE,"The receiver raw data: \n"); } - dump_ulsch_stats(eNB); + dump_ulsch_stats(eNB,0); printf("\n**********rb: %d ***mcs : %d *********SNR = %f dB (%f): TX %u dB (gain %f dB), N0W %f dB, I0 %u dB, delta_IF %d [ (%d,%d) dB / (%u,%u) dB ]**************************\n", nb_rb,mcs,SNR,SNR2, tx_lev_dB, diff --git a/openair2/LAYER2/MAC/eNB_scheduler.c b/openair2/LAYER2/MAC/eNB_scheduler.c index 82db9ba8d3..86704c816a 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler.c +++ b/openair2/LAYER2/MAC/eNB_scheduler.c @@ -603,6 +603,17 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, UE_scheduling_control->dl_cqi[CC_id], (5 * UE_scheduling_control->pusch_snr[CC_id] - 640) / 10, UE_scheduling_control->pucch_tpc_accumulated[CC_id], (5 * UE_scheduling_control->pucch1_snr[CC_id] - 640) / 10, UE_scheduling_control->pusch_tpc_accumulated[CC_id]); + LOG_I(MAC," ULSCH rounds %d/%d/%d/%d, DLSCH rounds %d/%d/%d/%d, ULSCH errors %d, DLSCH errors %d\n", + UE_info->eNB_UE_stats[CC_id][UE_id].ulsch_rounds[0], + UE_info->eNB_UE_stats[CC_id][UE_id].ulsch_rounds[1], + UE_info->eNB_UE_stats[CC_id][UE_id].ulsch_rounds[2], + UE_info->eNB_UE_stats[CC_id][UE_id].ulsch_rounds[3], + UE_info->eNB_UE_stats[CC_id][UE_id].dlsch_rounds[0], + UE_info->eNB_UE_stats[CC_id][UE_id].dlsch_rounds[1], + UE_info->eNB_UE_stats[CC_id][UE_id].dlsch_rounds[2], + UE_info->eNB_UE_stats[CC_id][UE_id].dlsch_rounds[3], + UE_info->eNB_UE_stats[CC_id][UE_id].ulsch_errors, + UE_info->eNB_UE_stats[CC_id][UE_id].dlsch_errors); } RC.eNB[module_idP][CC_id]->pusch_stats_bsr[UE_id][(frameP * 10) + subframeP] = -63; diff --git a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c index 59c7bf1ef2..6f5cace879 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c @@ -1495,7 +1495,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP, subframeP, S_DL_SCHEDULED, rnti); - //eNB_UE_stats->dlsch_trials[round]++; + UE_info->eNB_UE_stats[CC_id][UE_id].dlsch_rounds[round]++; UE_info->eNB_UE_stats[CC_id][UE_id].num_retransmission += 1; UE_info->eNB_UE_stats[CC_id][UE_id].rbs_used_retx = nb_rb; UE_info->eNB_UE_stats[CC_id][UE_id].total_rbs_used_retx += nb_rb; @@ -1936,6 +1936,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP, // store stats eNB->eNB_stats[CC_id].dlsch_bytes_tx+=sdu_length_total; eNB->eNB_stats[CC_id].dlsch_pdus_tx+=1; + UE_info->eNB_UE_stats[CC_id][UE_id].dlsch_rounds[0]++; UE_info->eNB_UE_stats[CC_id][UE_id].rbs_used = nb_rb; UE_info->eNB_UE_stats[CC_id][UE_id].total_rbs_used += nb_rb; UE_info->eNB_UE_stats[CC_id][UE_id].dlsch_mcs1=eNB_UE_stats->dlsch_mcs1; @@ -1968,10 +1969,10 @@ schedule_ue_spec_fairRR(module_id_t module_idP, UE_info->UE_template[CC_id][UE_id].pucch_tpc_tx_frame=frameP; UE_info->UE_template[CC_id][UE_id].pucch_tpc_tx_subframe=subframeP; - if (snr > target_snr + PUSCH_PCHYST) { + if (snr > target_snr + PUCCH_PCHYST) { tpc = 0; //-1 ue_sched_ctl->pucch_tpc_accumulated[CC_id]--; - } else if (snr < target_snr - PUSCH_PCHYST) { + } else if (snr < target_snr - PUCCH_PCHYST) { tpc = 2; //+1 ue_sched_ctl->pucch_tpc_accumulated[CC_id]++; } else { @@ -3051,10 +3052,10 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP, UE_template->pusch_tpc_tx_frame=frameP; UE_template->pusch_tpc_tx_subframe=subframeP; - if (snr > target_snr + 4) { + if (snr > target_snr + PUSCH_PCHYST) { tpc = 0; //-1 UE_sched_ctrl->pusch_tpc_accumulated[CC_id]--; - } else if (snr < target_snr - 4) { + } else if (snr < target_snr - PUSCH_PCHYST) { tpc = 2; //+1 UE_sched_ctrl->pusch_tpc_accumulated[CC_id]++; } else { @@ -3080,6 +3081,7 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP, UE_sched_ctrl->cqi_req_timer); ndi = 1-UE_template->oldNDI_UL[harq_pid]; UE_template->oldNDI_UL[harq_pid]=ndi; + UE_info->eNB_UE_stats[CC_id][UE_id].ulsch_rounds[0]++; UE_info->eNB_UE_stats[CC_id][UE_id].snr = snr; UE_info->eNB_UE_stats[CC_id][UE_id].target_snr = target_snr; UE_info->eNB_UE_stats[CC_id][UE_id].ulsch_mcs1=UE_template->pre_assigned_mcs_ul; @@ -3257,6 +3259,7 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP, T_INT(round)); UE_info->eNB_UE_stats[CC_id][UE_id].snr = snr; UE_info->eNB_UE_stats[CC_id][UE_id].target_snr = target_snr; + uint8_t mcs_rv = 0; if(rvidx_tab[round&3]==1) { diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c index b941f60458..7e00897474 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c @@ -204,7 +204,7 @@ rx_sdu(const module_id_t enb_mod_idP, if (UE_scheduling_control->round_UL[CC_idP][harq_pid] == 3) { UE_scheduling_control->ul_scheduled &= (~(1 << harq_pid)); UE_scheduling_control->round_UL[CC_idP][harq_pid] = 0; - + UE_info->eNB_UE_stats[CC_idP][UE_id].ulsch_errors++; if (UE_scheduling_control->ul_consecutive_errors++ == 10) { UE_scheduling_control->ul_failure_timer = 1; } @@ -221,6 +221,7 @@ rx_sdu(const module_id_t enb_mod_idP, } } else { UE_scheduling_control->round_UL[CC_idP][harq_pid]++; + UE_info->eNB_UE_stats[CC_idP][UE_id].ulsch_rounds[UE_scheduling_control->round_UL[CC_idP][harq_pid]]++; } /* CDRX UL HARQ timers */ diff --git a/openair2/LAYER2/MAC/mac.h b/openair2/LAYER2/MAC/mac.h index 55cb06c28f..bf8db987d3 100644 --- a/openair2/LAYER2/MAC/mac.h +++ b/openair2/LAYER2/MAC/mac.h @@ -145,6 +145,8 @@ #define CQI_VALUE_RANGE 16 /*!\brief Hysteresis of PUSCH power control loop */ #define PUSCH_PCHYST 1 +/*!\brief Hysteresis of PUCCH power control loop */ +#define PUCCH_PCHYST 1 /*!\brief value for indicating BSR Timer is not running */ #define MAC_UE_BSR_TIMER_NOT_RUNNING (0xFFFF) @@ -615,6 +617,8 @@ typedef struct { // here for RX // + + uint32_t ulsch_rounds[4]; uint32_t ulsch_bitrate; // uint32_t ulsch_bytes_rx; @@ -684,6 +688,17 @@ typedef struct { // Length of SDU Got from LC DL uint32_t sdu_length_tx[NB_RB_MAX]; + int lc_bytes_tx[64]; + int dlsch_rounds[8]; + int dlsch_errors; + int dlsch_total_bytes; + + int lc_bytes_rx[64]; + int ulsch_rounds[8]; + int ulsch_errors; + int ulsch_total_bytes_scheduled; + int ulsch_total_bytes_rx; + /// overall // @@ -1324,6 +1339,7 @@ typedef struct { uint8_t FeMBMS_flag; } COMMON_channels_t; /*! \brief top level eNB MAC structure */ + typedef struct eNB_MAC_INST_s { /// Ethernet parameters for northbound midhaul interface eth_params_t eth_params_n; From 6b5e4e924d42c738e308c7ad1d7098f8befb7bd8 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Wed, 6 Jan 2021 11:07:54 +0100 Subject: [PATCH 025/579] added usrp-tx-thread to lte modem --- executables/softmodem-common.h | 4 ++++ targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp | 5 +++-- targets/RT/USER/lte-ru.c | 15 +++++++++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/executables/softmodem-common.h b/executables/softmodem-common.h index f8e9b0959f..396cb32853 100644 --- a/executables/softmodem-common.h +++ b/executables/softmodem-common.h @@ -86,6 +86,8 @@ extern "C" #define CONFIG_HLP_EMULATE_RF "Emulated RF enabled(disable by defult)\n" #define CONFIG_HLP_PARALLEL_CMD "three config for level of parallelism 'PARALLEL_SINGLE_THREAD', 'PARALLEL_RU_L1_SPLIT', or 'PARALLEL_RU_L1_TRX_SPLIT'\n" #define CONFIG_HLP_WORKER_CMD "two option for worker 'WORKER_DISABLE' or 'WORKER_ENABLE'\n" +#define CONFIG_HLP_USRP_THREAD "having extra thead for usrp tx\n" + #define CONFIG_HLP_NOS1 "Disable s1 interface\n" #define CONFIG_HLP_RFSIM "Run in rf simulator mode (also known as basic simulator)\n" #define CONFIG_HLP_NOKRNMOD "(noS1 only): Use tun instead of namesh module \n" @@ -139,6 +141,7 @@ extern "C" {"nokrnmod", CONFIG_HLP_NOKRNMOD, PARAMFLAG_BOOL, uptr:&nokrnmod, defintval:0, TYPE_INT, 0}, \ {"nbiot-disable", CONFIG_HLP_DISABLNBIOT, PARAMFLAG_BOOL, uptr:&nonbiot, defuintval:0, TYPE_INT, 0}, \ {"use-256qam-table", CONFIG_HLP_256QAM, PARAMFLAG_BOOL, iptr:&USE_256QAM_TABLE, defintval:0, TYPE_INT, 0}, \ + {"usrp-tx-thread-config", CONFIG_HLP_USRP_THREAD, 0, iptr:&usrp_tx_thread, defstrval:0, TYPE_INT, 0}, \ } @@ -236,6 +239,7 @@ extern char *get_softmodem_function(uint64_t *sofmodemfunc_mask_ptr); extern void set_softmodem_sighandler(void); extern uint64_t downlink_frequency[MAX_NUM_CCs][4]; extern int32_t uplink_frequency_offset[MAX_NUM_CCs][4]; +extern int usrp_tx_thread; #ifdef __cplusplus } #endif diff --git a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp index 80b0255ff3..0c544acf19 100644 --- a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp +++ b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp @@ -464,6 +464,7 @@ VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_BEAM_SWITCHI write_package[end].buff[i] = buff[i]; write_thread->count_write++; write_thread->end = (write_thread->end + 1)% MAX_WRITE_THREAD_PACKAGE; + LOG_I(HW,"Signaling TX TS %llu\n",(unsigned long long)timestamp); pthread_cond_signal(&write_thread->cond_write); pthread_mutex_unlock(&write_thread->mutex_write); return 0; @@ -1263,7 +1264,7 @@ extern "C" { LOG_I(HW,"Actual time source %s...\n",s->usrp->get_time_source(0).c_str()); sleep(1); // create tx & rx streamer - uhd::stream_args_t stream_args_rx("sc16", "sc12"); + uhd::stream_args_t stream_args_rx("sc16", "sc16"); int samples=openair0_cfg[0].sample_rate; int max=s->usrp->get_rx_stream(stream_args_rx)->get_max_num_samps(); samples/=10000; @@ -1280,7 +1281,7 @@ extern "C" { stream_args_rx.channels.push_back(i); s->rx_stream = s->usrp->get_rx_stream(stream_args_rx); - uhd::stream_args_t stream_args_tx("sc16", "sc12"); + uhd::stream_args_t stream_args_tx("sc16", "sc16"); for (int i = 0; icond_FH1); AssertFatal((ret=pthread_mutex_unlock(&proc->mutex_FH1))==0,"mutex_unlock returns %d\n",ret); + if(usrp_tx_thread == 1){ + if (ru->start_write_thread){ + if(ru->start_write_thread(ru) != 0){ + LOG_E(HW,"Could not start tx write thread\n"); + } + else{ + LOG_I(PHY,"tx write thread ready\n"); + } + } + } + while (!oai_exit) { if (ru->if_south != LOCAL_RF && ru->is_slave==1) { ru->wait_cnt = 100; @@ -2174,6 +2185,9 @@ void reset_proc(RU_t *ru) { for (i=0; i<10; i++) proc->symbol_mask[i]=0; } +int start_write_thread(RU_t *ru) { + return(ru->rfdevice.trx_write_init(&ru->rfdevice)); +} void init_RU_proc(RU_t *ru) { int i=0; @@ -2536,6 +2550,7 @@ void set_function_spec_param(RU_t *ru) { ru->fh_north_out = NULL; // no outgoing fronthaul to north ru->start_if = NULL; // no if interface ru->rfdevice.host_type = RAU_HOST; + ru->start_write_thread = start_write_thread; } ru->fh_south_in = rx_rf; // local synchronous RF RX From 2368633642f067be3ba67ee9c2b1a736c4863027 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Sat, 9 Jan 2021 07:13:13 +0100 Subject: [PATCH 026/579] testing of LTE with 2x2 20 MHz TDD on N310. Modifications in pipelined threading --- executables/nr-gnb.c | 3 +- targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp | 18 +++++-- targets/RT/USER/lte-enb.c | 23 +++++---- targets/RT/USER/lte-ru.c | 52 +++++++++++--------- 4 files changed, 57 insertions(+), 39 deletions(-) diff --git a/executables/nr-gnb.c b/executables/nr-gnb.c index be9261a117..2aa9635af2 100644 --- a/executables/nr-gnb.c +++ b/executables/nr-gnb.c @@ -588,10 +588,9 @@ int wakeup_tx(PHY_VARS_gNB *gNB,int frame_rx,int slot_rx,int frame_tx,int slot_t VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX1_UE,1); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX1_UE,0); // the thread can now be woken up - // the thread can now be woken up + AssertFatal((ret=pthread_mutex_unlock(&L1_proc_tx->mutex))==0,"mutex_unlock returns %d\n",ret); AssertFatal(pthread_cond_signal(&L1_proc_tx->cond) == 0, "ERROR pthread_cond_signal for gNB L1 thread\n"); - AssertFatal((ret=pthread_mutex_unlock(&L1_proc_tx->mutex))==0,"mutex_unlock returns %d\n",ret); return(0); } diff --git a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp index 0c544acf19..fd73086168 100644 --- a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp +++ b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp @@ -464,7 +464,7 @@ VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_BEAM_SWITCHI write_package[end].buff[i] = buff[i]; write_thread->count_write++; write_thread->end = (write_thread->end + 1)% MAX_WRITE_THREAD_PACKAGE; - LOG_I(HW,"Signaling TX TS %llu\n",(unsigned long long)timestamp); + LOG_D(HW,"Signaling TX TS %llu\n",(unsigned long long)timestamp); pthread_cond_signal(&write_thread->cond_write); pthread_mutex_unlock(&write_thread->mutex_write); return 0; @@ -638,9 +638,21 @@ static int trx_usrp_read(openair0_device *device, openair0_timestamp *ptimestamp // receive multiple channels (e.g. RF A and RF B) std::vector buff_ptrs; - for (int i=0; irx_stream->recv(buff_ptrs, nsamps, s->rx_md); + while (samples_received != nsamps) { + for (int i=0; irx_stream->recv(buff_ptrs,nsamps-samples_received, s->rx_md); + + + if ((s->wait_for_first_pps == 0) && (s->rx_md.error_code!=uhd::rx_metadata_t::ERROR_CODE_NONE)) + break; + + if ((s->wait_for_first_pps == 1) && (samples_received != nsamps)) { + printf("sleep...\n"); //usleep(100); + } + } + if (samples_received == nsamps) s->wait_for_first_pps=0; } else { // receive a single channel (e.g. from connector RF A) samples_received=0; diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c index 8d50eceb67..03ef480131 100644 --- a/targets/RT/USER/lte-enb.c +++ b/targets/RT/USER/lte-enb.c @@ -355,21 +355,21 @@ static void *L1_thread_tx(void *param) { LOG_D(PHY,"L1 TX processing %d.%d\n",proc->frame_tx,proc->subframe_tx); phy_procedures_eNB_TX(eNB, proc, 1); AssertFatal((ret= pthread_mutex_lock( &proc->mutex ))==0,"error locking L1_proc_tx mutex, return %d\n",ret); - VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_L1_PROC_TX_IC,proc->instance_cnt); int subframe_tx = proc->subframe_tx; int frame_tx = proc->frame_tx; uint64_t timestamp_tx = proc->timestamp_tx; proc->instance_cnt = -1; + VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_L1_PROC_TX_IC,proc->instance_cnt); LOG_D(PHY,"L1 TX signaling done for %d.%d\n",proc->frame_tx,proc->subframe_tx); // the thread can now be woken up LOG_D(PHY,"L1_thread_tx: signaling completion in %d.%d\n",proc->frame_tx,proc->subframe_tx); + AssertFatal((ret= pthread_mutex_unlock( &proc->mutex ))==0,"error unlocking L1_proc_tx mutex, return %d\n",ret); if (pthread_cond_signal(&proc->cond) != 0) { LOG_E( PHY, "[eNB] ERROR pthread_cond_signal for eNB TXnp4 thread\n"); exit_fun( "ERROR pthread_cond_signal" ); } - AssertFatal((ret= pthread_mutex_unlock( &proc->mutex ))==0,"error unlocking L1_proc_tx mutex, return %d\n",ret); wakeup_txfh(eNB,proc,frame_tx,subframe_tx,timestamp_tx); } @@ -408,7 +408,7 @@ static void *L1_thread( void *param ) { LOG_I(PHY,"thread rxtx created id=%ld\n", syscall(__NR_gettid)); while (!oai_exit) { - VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RXTX0+(proc->subframe_rx&1), 0 ); + VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RXTX0, 0 ); T(T_ENB_MASTER_TICK, T_INT(0), T_INT(proc->frame_rx), T_INT(proc->subframe_rx)); LOG_D(PHY,"L1RX waiting for RU RX\n"); @@ -416,7 +416,7 @@ static void *L1_thread( void *param ) { LOG_D(PHY,"L1RX starting in %d.%d\n",proc->frame_rx,proc->subframe_rx); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_CPUID_ENB_THREAD_RXTX,sched_getcpu()); - VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RXTX0+(proc->subframe_rx&1), 1 ); + VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RXTX0, 1 ); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_TX0_ENB,proc->subframe_tx); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_RX0_ENB,proc->subframe_rx); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_ENB,proc->frame_tx); @@ -430,6 +430,8 @@ static void *L1_thread( void *param ) { LOG_D(PHY,"L1 RX %d.%d done\n",proc->frame_rx,proc->subframe_rx); + if (release_thread(&proc->mutex,&proc->instance_cnt,thread_name)<0) break; + VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_L1_PROC_IC, proc->instance_cnt); if (NFAPI_MODE!=NFAPI_MODE_VNF) { if(get_thread_parallel_conf() == PARALLEL_RU_L1_TRX_SPLIT) wakeup_tx(eNB,proc->frame_rx,proc->subframe_rx,proc->frame_tx,proc->subframe_tx,proc->timestamp_tx); else if(get_thread_parallel_conf() == PARALLEL_RU_L1_SPLIT) { @@ -438,9 +440,7 @@ static void *L1_thread( void *param ) { } } - if (release_thread(&proc->mutex,&proc->instance_cnt,thread_name)<0) break; } // while !oai_exit - VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RXTX0+(proc->subframe_rx&1), 0 ); LOG_D(PHY, " *** Exiting eNB thread RXn_TXnp4\n"); eNB_thread_rxtx_status = 0; @@ -532,10 +532,10 @@ int wakeup_txfh(PHY_VARS_eNB *eNB, ru_proc->tti_tx = subframe_tx; ru_proc->frame_tx = frame_tx; LOG_D(PHY,"L1 TX Waking up TX FH (2) %d.%d\n",frame_tx,subframe_tx); + AssertFatal((ret=pthread_mutex_unlock(&ru_proc->mutex_eNBs))==0,"mutex_unlock returned %d\n",ret); // the thread can now be woken up AssertFatal(pthread_cond_signal(&ru_proc->cond_eNBs) == 0, "[eNB] ERROR pthread_cond_signal for eNB TXnp4 thread\n"); - AssertFatal((ret=pthread_mutex_unlock(&ru_proc->mutex_eNBs))==0,"mutex_unlock returned %d\n",ret); } return(0); @@ -560,7 +560,6 @@ int wakeup_tx(PHY_VARS_eNB *eNB, } LOG_D(PHY,"L1 RX Got signal that TX %d.%d is done\n",L1_proc_tx->frame_tx,L1_proc_tx->subframe_tx); - VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_L1_PROC_TX_IC,L1_proc_tx->instance_cnt); L1_proc_tx->instance_cnt = 0; VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_L1_PROC_TX_IC,L1_proc_tx->instance_cnt); L1_proc_tx->subframe_rx = subframe_rx; @@ -570,8 +569,9 @@ int wakeup_tx(PHY_VARS_eNB *eNB, L1_proc_tx->timestamp_tx = timestamp_tx; // the thread can now be woken up LOG_D(PHY,"L1 RX Waking up L1 TX %d.%d\n",L1_proc->frame_tx,L1_proc->subframe_tx); - AssertFatal(pthread_cond_signal(&L1_proc_tx->cond) == 0, "ERROR pthread_cond_signal for eNB L1 thread tx\n"); AssertFatal((ret=pthread_mutex_unlock(&L1_proc_tx->mutex))==0,"mutex_unlock returns %d\n",ret); + + AssertFatal(pthread_cond_signal(&L1_proc_tx->cond) == 0, "ERROR pthread_cond_signal for eNB L1 thread tx\n"); return(0); } @@ -595,6 +595,8 @@ int wakeup_rxtx(PHY_VARS_eNB *eNB, } ++L1_proc->instance_cnt; + VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_L1_PROC_IC, L1_proc->instance_cnt); + // We have just received and processed the common part of a subframe, say n. // TS_rx is the last received timestamp (start of 1st slot), TS_tx is the desired // transmitted timestamp of the next TX slot (first). @@ -612,6 +614,8 @@ int wakeup_rxtx(PHY_VARS_eNB *eNB, VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_WAKEUP_RXTX_TX_RU+ru->idx, L1_proc->frame_tx); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_WAKEUP_RXTX_TX_RU+ru->idx, L1_proc->subframe_tx); + AssertFatal((ret=pthread_mutex_unlock( &L1_proc->mutex))==0,"mutex_unlock return %d\n",ret); + // the thread can now be woken up if (pthread_cond_signal(&L1_proc->cond) != 0) { LOG_E( PHY, "[eNB] ERROR pthread_cond_signal for eNB RXn-TXnp4 thread\n"); @@ -619,7 +623,6 @@ int wakeup_rxtx(PHY_VARS_eNB *eNB, return(-1); } - AssertFatal((ret=pthread_mutex_unlock( &L1_proc->mutex))==0,"mutex_unlock return %d\n",ret); return(0); } diff --git a/targets/RT/USER/lte-ru.c b/targets/RT/USER/lte-ru.c index 87747b17a3..639190aaf0 100644 --- a/targets/RT/USER/lte-ru.c +++ b/targets/RT/USER/lte-ru.c @@ -648,7 +648,7 @@ void rx_rf(RU_t *ru, proc->tti_rx = (proc->timestamp_rx / fp->samples_per_tti)%10; // synchronize first reception to frame 0 subframe 0 - if (ru->fh_north_asynch_in == NULL) { + if (get_thread_parallel_conf() == PARALLEL_SINGLE_THREAD && ru->fh_north_asynch_in == NULL) { #ifdef PHY_TX_THREAD proc->timestamp_phy_tx = proc->timestamp_rx+((sf_ahead-1)*fp->samples_per_tti); proc->subframe_phy_tx = (proc->tti_rx+(sf_ahead-1))%10; @@ -676,16 +676,12 @@ void rx_rf(RU_t *ru, proc->frame_rx, proc->tti_rx); - // dump VCD output for first RU in list - if (ru->idx == 0) { - VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX0_RU, proc->frame_rx ); - VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_RX0_RU, proc->tti_rx ); + } - if (ru->fh_north_asynch_in == NULL) { - VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_RU, proc->frame_tx ); - VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_TX0_RU, proc->tti_tx ); - } - } + // dump VCD output for first RU in list + if (ru->idx == 0) { + VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX0_RU, proc->frame_rx ); + VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_RX0_RU, proc->tti_rx ); } if (proc->first_rx == 0) { @@ -776,6 +772,7 @@ void tx_rf(RU_t *ru, /* add fail safe for late command */ if(late_control!=STATE_BURST_NORMAL) { //stop burst + LOG_E(PHY,"%d.%d late_control : %d\n",frame,subframe,late_control); switch (late_control) { case STATE_BURST_TERMINATE: flags=10; // end of burst and no time spec @@ -804,12 +801,12 @@ void tx_rf(RU_t *ru, break; } } - - /* add fail safe for late command end */ VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_RU, frame); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_TX0_RU, subframe); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, (timestamp-ru->openair0_cfg.tx_sample_advance)&0xffffffff ); - VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 1 ); + + /* add fail safe for late command end */ + VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 1 ); // prepare tx buffer pointers txs = ru->rfdevice.trx_write_func(&ru->rfdevice, timestamp+ru->ts_offset-ru->openair0_cfg.tx_sample_advance-sf_extension, @@ -827,7 +824,7 @@ void tx_rf(RU_t *ru, VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 0 ); // AssertFatal(txs == siglen+sf_extension,"TX : Timeout (sent %d/%d)\n",txs, siglen); - if( (txs != siglen+sf_extension) && (late_control==STATE_BURST_NORMAL) ) { /* add fail safe for late command */ + if( usrp_tx_thread == 0 && (txs != siglen+sf_extension) && (late_control==STATE_BURST_NORMAL) ) { /* add fail safe for late command */ late_control=STATE_BURST_TERMINATE; LOG_E(PHY,"TX : Timeout (sent %d/%d) state =%d\n",txs, siglen,late_control); } @@ -1510,36 +1507,43 @@ static void *ru_thread_tx( void *param ) { LOG_D(PHY,"ru_thread_tx (ru %d): Waiting for TX processing\n",ru->idx); // wait until eNBs are finished subframe RX n and TX n+4 wait_on_condition(&proc->mutex_eNBs,&proc->cond_eNBs,&proc->instance_cnt_eNBs,"ru_thread_tx"); - LOG_D(PHY,"ru_thread_tx: TX in %d.%d\n",ru->proc.frame_tx,ru->proc.tti_tx); + ret = pthread_mutex_lock(&proc->mutex_eNBs); + AssertFatal(ret == 0,"mutex_lock return %d\n",ret); + int frame_tx=proc->frame_tx; + int tti_tx =proc->tti_tx; + uint64_t timestamp_tx = proc->timestamp_tx; + ret = pthread_mutex_unlock(&proc->mutex_eNBs); + AssertFatal(ret == 0,"mutex_lock returns %d\n",ret); + if (oai_exit) break; // do TX front-end processing if needed (precoding and/or IDFTs) - if (ru->feptx_prec) ru->feptx_prec(ru,proc->frame_tx,proc->tti_tx); + if (ru->feptx_prec) ru->feptx_prec(ru,frame_tx,tti_tx); // do OFDM if needed - if ((ru->fh_north_asynch_in == NULL) && (ru->feptx_ofdm)) ru->feptx_ofdm(ru,proc->frame_tx,proc->tti_tx); + if ((ru->fh_north_asynch_in == NULL) && (ru->feptx_ofdm)) ru->feptx_ofdm(ru,frame_tx,tti_tx); if(!(ru->emulate_rf)) { //if(!emulate_rf){ // do outgoing fronthaul (south) if needed - if ((ru->fh_north_asynch_in == NULL) && (ru->fh_south_out)) ru->fh_south_out(ru,proc->frame_tx,proc->tti_tx,proc->timestamp_tx); + if ((ru->fh_north_asynch_in == NULL) && (ru->fh_south_out)) ru->fh_south_out(ru,frame_tx,tti_tx,timestamp_tx); if (ru->fh_north_out) ru->fh_north_out(ru); } else { for (int i=0; inb_tx; i++) { - if(proc->frame_tx == 2) { - sprintf(filename,"txdataF%d_frame%d_sf%d.m",i,proc->frame_tx,proc->tti_tx); + if(frame_tx == 2) { + sprintf(filename,"txdataF%d_frame%d_sf%d.m",i,frame_tx,tti_tx); LOG_M(filename,"txdataF_frame",ru->common.txdataF_BF[i],fp->symbols_per_tti*fp->ofdm_symbol_size, 1, 1); } - if(proc->frame_tx == 2 && proc->tti_tx==0) { - sprintf(filename,"txdata%d_frame%d.m",i,proc->frame_tx); + if(frame_tx == 2 && tti_tx==0) { + sprintf(filename,"txdata%d_frame%d.m",i,frame_tx); LOG_M(filename,"txdata_frame",ru->common.txdata[i],fp->samples_per_tti*10, 1, 1); } } } - LOG_D(PHY,"ru_thread_tx: releasing RU TX in %d.%d\n", proc->frame_tx, proc->tti_tx); + LOG_D(PHY,"ru_thread_tx: releasing RU TX in %d.%d\n", frame_tx, tti_tx); release_thread(&proc->mutex_eNBs,&proc->instance_cnt_eNBs,"ru_thread_tx"); for(int i = 0; inum_eNB; i++) { @@ -1571,7 +1575,7 @@ static void *ru_thread_tx( void *param ) { AssertFatal((ret=pthread_mutex_unlock(&eNB_proc->mutex_RU_tx))==0,"mutex_unlock returns %d\n",ret); AssertFatal((ret=pthread_mutex_lock( &L1_proc->mutex_RUs))==0,"mutex_lock returns %d\n",ret); L1_proc->instance_cnt_RUs = 0; - LOG_D(PHY,"ru_thread_tx: Signaling RU TX done in %d.%d\n", proc->frame_tx, proc->tti_tx); + LOG_D(PHY,"ru_thread_tx: Signaling RU TX done in %d.%d\n", frame_tx, tti_tx); // the thread can now be woken up LOG_D(PHY,"ru_thread_tx: clearing mask and Waking up L1 thread\n"); From 630b609db91b339568984415f58d8ce55dd5101b Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Sat, 9 Jan 2021 10:32:02 +0100 Subject: [PATCH 027/579] level shifting on RX for X300/N300, reduced to give ~25 dB noise level in eNB RX 2 ANT TX/RX for USRP, updates --- targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp | 26 ++++++++++++++------ targets/RT/USER/lte-ru.c | 1 + 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp index fd73086168..12d67fa624 100644 --- a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp +++ b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp @@ -634,7 +634,19 @@ static int trx_usrp_read(openair0_device *device, openair0_timestamp *ptimestamp int16x8_t buff_tmp[2][nsamps2]; #endif - if (cc>1) { + int rxshift; + switch (device->type) { + case USRP_B200_DEV: + rxshift=4; + break; + case USRP_X300_DEV: + case USRP_N300_DEV: + rxshift=2; + break; + default: + AssertFatal(1==0,"Shouldn't be here\n"); + } + if (cc>1) { // receive multiple channels (e.g. RF A and RF B) std::vector buff_ptrs; @@ -653,7 +665,7 @@ static int trx_usrp_read(openair0_device *device, openair0_timestamp *ptimestamp } } if (samples_received == nsamps) s->wait_for_first_pps=0; - } else { + } else { // receive a single channel (e.g. from connector RF A) samples_received=0; @@ -679,17 +691,17 @@ static int trx_usrp_read(openair0_device *device, openair0_timestamp *ptimestamp // FK: in some cases the buffer might not be 32 byte aligned, so we cannot use avx2 if ((((uintptr_t) buff[i])&0x1F)==0) { - ((__m256i *)buff[i])[j] = _mm256_srai_epi16(buff_tmp[i][j],4); + ((__m256i *)buff[i])[j] = _mm256_srai_epi16(buff_tmp[i][j],rxshift); } else { - ((__m128i *)buff[i])[2*j] = _mm_srai_epi16(((__m128i *)buff_tmp[i])[2*j],4); - ((__m128i *)buff[i])[2*j+1] = _mm_srai_epi16(((__m128i *)buff_tmp[i])[2*j+1],4); + ((__m128i *)buff[i])[2*j] = _mm_srai_epi16(((__m128i *)buff_tmp[i])[2*j],rxshift); + ((__m128i *)buff[i])[2*j+1] = _mm_srai_epi16(((__m128i *)buff_tmp[i])[2*j+1],rxshift); } #else - ((__m128i *)buff[i])[j] = _mm_srai_epi16(buff_tmp[i][j],4); + ((__m128i *)buff[i])[j] = _mm_srai_epi16(buff_tmp[i][j],rxshift); #endif #elif defined(__arm__) - ((int16x8_t *)buff[i])[j] = vshrq_n_s16(buff_tmp[i][j],4); + ((int16x8_t *)buff[i])[j] = vshrq_n_s16(buff_tmp[i][j],rxshift); #endif } } diff --git a/targets/RT/USER/lte-ru.c b/targets/RT/USER/lte-ru.c index 639190aaf0..a9bd7f8c7b 100644 --- a/targets/RT/USER/lte-ru.c +++ b/targets/RT/USER/lte-ru.c @@ -804,6 +804,7 @@ void tx_rf(RU_t *ru, VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_RU, frame); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_TX0_RU, subframe); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, (timestamp-ru->openair0_cfg.tx_sample_advance)&0xffffffff ); + VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_WRITE_FLAGS,flags); /* add fail safe for late command end */ VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 1 ); From 672ae1e3a28f9a3c96edaf5849f1f776c9ead34e Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Sun, 10 Jan 2021 11:40:22 +0100 Subject: [PATCH 028/579] added nr/eutra-nr request to first UECapabilityEnquiry message --- openair2/RRC/LTE/MESSAGES/asn1_msg.c | 105 +++++++++++++++------------ 1 file changed, 58 insertions(+), 47 deletions(-) diff --git a/openair2/RRC/LTE/MESSAGES/asn1_msg.c b/openair2/RRC/LTE/MESSAGES/asn1_msg.c index 61bce26b2c..a9c1b62535 100644 --- a/openair2/RRC/LTE/MESSAGES/asn1_msg.c +++ b/openair2/RRC/LTE/MESSAGES/asn1_msg.c @@ -3220,56 +3220,65 @@ uint8_t do_UECapabilityEnquiry( const protocol_ctxt_t *const ctxt_pP, dl_dcch_msg.message.choice.c1.choice.ueCapabilityEnquiry.criticalExtensions.choice.c1.choice.ueCapabilityEnquiry_r8.ue_CapabilityRequest.list.count=0; ASN_SEQUENCE_ADD(&dl_dcch_msg.message.choice.c1.choice.ueCapabilityEnquiry.criticalExtensions.choice.c1.choice.ueCapabilityEnquiry_r8.ue_CapabilityRequest.list, &rat); - - /* request NR configuration */ + LTE_RAT_Type_t rat_nr=LTE_RAT_Type_nr; + LTE_RAT_Type_t rat_eutra_nr=LTE_RAT_Type_eutra_nr; LTE_UECapabilityEnquiry_r8_IEs_t *r8 = &dl_dcch_msg.message.choice.c1.choice.ueCapabilityEnquiry.criticalExtensions.choice.c1.choice.ueCapabilityEnquiry_r8; LTE_UECapabilityEnquiry_v8a0_IEs_t r8_a0; LTE_UECapabilityEnquiry_v1180_IEs_t r11_80; LTE_UECapabilityEnquiry_v1310_IEs_t r13_10; LTE_UECapabilityEnquiry_v1430_IEs_t r14_30; LTE_UECapabilityEnquiry_v1510_IEs_t r15_10; - - memset(&r8_a0, 0, sizeof(r8_a0)); - memset(&r11_80, 0, sizeof(r11_80)); - memset(&r13_10, 0, sizeof(r13_10)); - memset(&r14_30, 0, sizeof(r14_30)); - memset(&r15_10, 0, sizeof(r15_10)); - - r8->nonCriticalExtension = &r8_a0; - r8_a0.nonCriticalExtension = &r11_80; - r11_80.nonCriticalExtension = &r13_10; - r13_10.nonCriticalExtension = &r14_30; - r14_30.nonCriticalExtension = &r15_10; - - /* TODO: no hardcoded values here */ - - nsa_band_list = (NR_FreqBandList_t *)calloc(1, sizeof(NR_FreqBandList_t)); - - nsa_band = (NR_FreqBandInformation_t *) calloc(1,sizeof(NR_FreqBandInformation_t)); - nsa_band->present = NR_FreqBandInformation_PR_bandInformationEUTRA; - nsa_band->choice.bandInformationEUTRA = (NR_FreqBandInformationEUTRA_t *) calloc(1, sizeof(NR_FreqBandInformationEUTRA_t)); - nsa_band->choice.bandInformationEUTRA->bandEUTRA = eutra_band; - ASN_SEQUENCE_ADD(&nsa_band_list->list, nsa_band); - - nsa_band = (NR_FreqBandInformation_t *) calloc(1,sizeof(NR_FreqBandInformation_t)); - nsa_band->present = NR_FreqBandInformation_PR_bandInformationNR; - nsa_band->choice.bandInformationNR = (NR_FreqBandInformationNR_t *) calloc(1, sizeof(NR_FreqBandInformationNR_t)); - if(nr_band > 0) - nsa_band->choice.bandInformationNR->bandNR = nr_band; - else - nsa_band->choice.bandInformationNR->bandNR = 78; - ASN_SEQUENCE_ADD(&nsa_band_list->list, nsa_band); - OCTET_STRING_t req_freq; - //unsigned char req_freq_buf[5] = { 0x00, 0x20, 0x1a, 0x02, 0x68 }; // bands 7 & nr78 - unsigned char req_freq_buf[1024]; - enc_rval = uper_encode_to_buffer(&asn_DEF_NR_FreqBandList, - NULL, - (void *)nsa_band_list, - req_freq_buf, - 1024); - xer_fprint(stdout, &asn_DEF_NR_FreqBandList, (void *)nsa_band_list); + if (nr_band>0) { + + ASN_SEQUENCE_ADD(&dl_dcch_msg.message.choice.c1.choice.ueCapabilityEnquiry.criticalExtensions.choice.c1.choice.ueCapabilityEnquiry_r8.ue_CapabilityRequest.list, + &rat_nr); + ASN_SEQUENCE_ADD(&dl_dcch_msg.message.choice.c1.choice.ueCapabilityEnquiry.criticalExtensions.choice.c1.choice.ueCapabilityEnquiry_r8.ue_CapabilityRequest.list, + &rat_eutra_nr); + + /* request NR configuration */ + + memset(&r8_a0, 0, sizeof(r8_a0)); + memset(&r11_80, 0, sizeof(r11_80)); + memset(&r13_10, 0, sizeof(r13_10)); + memset(&r14_30, 0, sizeof(r14_30)); + memset(&r15_10, 0, sizeof(r15_10)); + + r8->nonCriticalExtension = &r8_a0; + r8_a0.nonCriticalExtension = &r11_80; + r11_80.nonCriticalExtension = &r13_10; + r13_10.nonCriticalExtension = &r14_30; + r14_30.nonCriticalExtension = &r15_10; + + /* TODO: no hardcoded values here */ + + nsa_band_list = (NR_FreqBandList_t *)calloc(1, sizeof(NR_FreqBandList_t)); + + nsa_band = (NR_FreqBandInformation_t *) calloc(1,sizeof(NR_FreqBandInformation_t)); + nsa_band->present = NR_FreqBandInformation_PR_bandInformationEUTRA; + nsa_band->choice.bandInformationEUTRA = (NR_FreqBandInformationEUTRA_t *) calloc(1, sizeof(NR_FreqBandInformationEUTRA_t)); + nsa_band->choice.bandInformationEUTRA->bandEUTRA = eutra_band; + ASN_SEQUENCE_ADD(&nsa_band_list->list, nsa_band); + + nsa_band = (NR_FreqBandInformation_t *) calloc(1,sizeof(NR_FreqBandInformation_t)); + nsa_band->present = NR_FreqBandInformation_PR_bandInformationNR; + nsa_band->choice.bandInformationNR = (NR_FreqBandInformationNR_t *) calloc(1, sizeof(NR_FreqBandInformationNR_t)); + //if(nr_band > 0) + nsa_band->choice.bandInformationNR->bandNR = nr_band; + //else + // nsa_band->choice.bandInformationNR->bandNR = 78; + ASN_SEQUENCE_ADD(&nsa_band_list->list, nsa_band); + + //unsigned char req_freq_buf[5] = { 0x00, 0x20, 0x1a, 0x02, 0x68 }; // bands 7 & nr78 + unsigned char req_freq_buf[1024]; + enc_rval = uper_encode_to_buffer(&asn_DEF_NR_FreqBandList, + NULL, + (void *)nsa_band_list, + req_freq_buf, + 1024); + + xer_fprint(stdout, &asn_DEF_NR_FreqBandList, (void *)nsa_band_list); @@ -3280,14 +3289,16 @@ uint8_t do_UECapabilityEnquiry( const protocol_ctxt_t *const ctxt_pP, //0x01, 0x60, 0x18, 0x05, 0x80, 0xc0, 0x04, 0x04, 0xc1, 0x2c, 0x10, 0x08, 0x20, 0x30, 0x40, 0xe0, 0x82, 0x40, 0x28, 0x80, 0x9a // }; - req_freq.buf = req_freq_buf; - req_freq.size = (enc_rval.encoded+7)/8; + req_freq.buf = req_freq_buf; + req_freq.size = (enc_rval.encoded+7)/8; // req_freq.size = 21; - r15_10.requestedFreqBandsNR_MRDC_r15 = &req_freq; - if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { - xer_fprint(stdout, &asn_DEF_LTE_DL_DCCH_Message, (void *)&dl_dcch_msg); + r15_10.requestedFreqBandsNR_MRDC_r15 = &req_freq; + // Add request for eutra-nr } +// if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { + xer_fprint(stdout, &asn_DEF_LTE_DL_DCCH_Message, (void *)&dl_dcch_msg); +// } enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_DL_DCCH_Message, NULL, From 50c70bc31646fe780729885677a67a7918fed93d Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Tue, 12 Jan 2021 13:51:04 +0100 Subject: [PATCH 029/579] writing L1/L2 stats to files rather than screen --- openair1/PHY/LTE_TRANSPORT/pucch.c | 17 +++++--- openair1/PHY/LTE_TRANSPORT/transport_proto.h | 4 +- openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c | 19 ++++---- openair1/PHY/defs_eNB.h | 2 + openair1/SCHED/phy_procedures_lte_eNb.c | 6 --- openair2/LAYER2/MAC/eNB_scheduler.c | 21 --------- openair2/LAYER2/MAC/mac.h | 2 + openair2/LAYER2/MAC/main.c | 46 ++++++++++++++++++++ targets/RT/USER/lte-enb.c | 15 +++++++ 9 files changed, 89 insertions(+), 43 deletions(-) diff --git a/openair1/PHY/LTE_TRANSPORT/pucch.c b/openair1/PHY/LTE_TRANSPORT/pucch.c index fd7e7bad76..9418ace334 100644 --- a/openair1/PHY/LTE_TRANSPORT/pucch.c +++ b/openair1/PHY/LTE_TRANSPORT/pucch.c @@ -65,21 +65,24 @@ int16_t cfo_pucch_ep[24*6] = {24278,-22005,29621,-14010,32412,-4808,32412,4807,2 -void dump_uci_stats(PHY_VARS_eNB *eNB,int frame) { +void dump_uci_stats(FILE *fd,PHY_VARS_eNB *eNB,int frame) { - for (int i=0;iuci_stats[i].rnti>0) { eNB_UCI_STATS_t *uci_stats = &eNB->uci_stats[i]; - LOG_I(PHY,"UCI RNTI %x: pucch1_trials %d, pucch1_thres %d dB, current pucch1_stat %d dB,positive SR count %d\n", + strpos+=sprintf(output+strpos,"UCI RNTI %x: pucch1_trials %d, pucch1_thres %d dB, current pucch1_stat %d dB,positive SR count %d\n", uci_stats->rnti,uci_stats->pucch1_trials,uci_stats->pucch1_thres,dB_fixed(uci_stats->current_pucch1_stat),uci_stats->pucch1_positive_SR); - LOG_I(PHY,"UCI RNTI %x: pucch1_low (%d,%d)dB pucch1_high (%d,%d)dB\n", + strpos+=sprintf(output+strpos,"UCI RNTI %x: pucch1_low (%d,%d)dB pucch1_high (%d,%d)dB\n", uci_stats->rnti, dB_fixed(uci_stats->pucch1_low_stat[0]), dB_fixed(uci_stats->pucch1_low_stat[1]), dB_fixed(uci_stats->pucch1_high_stat[0]), dB_fixed(uci_stats->pucch1_high_stat[1])); - LOG_I(PHY,"UCI RNTI %x: pucch1a_trials %d, pucch1a_stat (%d,%d), pucch1b_trials %d, pucch1b_stat (%d,%d) pucch1ab_DTX %d\n", + strpos+=sprintf(output+strpos,"UCI RNTI %x: pucch1a_trials %d, pucch1a_stat (%d,%d), pucch1b_trials %d, pucch1b_stat (%d,%d) pucch1ab_DTX %d\n", uci_stats->rnti, uci_stats->pucch1a_trials, uci_stats->current_pucch1a_stat_re, @@ -89,7 +92,9 @@ void dump_uci_stats(PHY_VARS_eNB *eNB,int frame) { uci_stats->current_pucch1b_stat_im, uci_stats->pucch1ab_DTX); } - + } + if (fd) fprintf(fd,"%s",output); + else printf("%s",output); } /* PUCCH format3 >> */ /* SubCarrier Demap */ diff --git a/openair1/PHY/LTE_TRANSPORT/transport_proto.h b/openair1/PHY/LTE_TRANSPORT/transport_proto.h index 786aaca6e3..3caa1df05a 100644 --- a/openair1/PHY/LTE_TRANSPORT/transport_proto.h +++ b/openair1/PHY/LTE_TRANSPORT/transport_proto.h @@ -520,8 +520,8 @@ int generate_eNB_ulsch_params_from_dci(PHY_VARS_eNB *PHY_vars_eNB, void dump_ulsch(PHY_VARS_eNB *phy_vars_eNB,int frame, int subframe, uint8_t UE_id,int round); -void dump_ulsch_stats(PHY_VARS_eNB *eNB,int frame); -void dump_uci_stats(PHY_VARS_eNB *eNB,int frame); +void dump_ulsch_stats(FILE *fd,PHY_VARS_eNB *eNB,int frame); +void dump_uci_stats(FILE *fd,PHY_VARS_eNB *eNB,int frame); diff --git a/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c b/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c index 17f95f31ce..137ffcb219 100644 --- a/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c +++ b/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c @@ -1116,16 +1116,18 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB, return(ret); } +#define STATSTRLEN 16384 +void dump_ulsch_stats(FILE *fd,PHY_VARS_eNB *eNB,int frame) { -void dump_ulsch_stats(PHY_VARS_eNB *eNB,int frame) { - + char output[16384]; + int stroff=0; for (int i=0;iulsch_stats[i].rnti>0) { - for (int aa=0;aaframe_parms.nb_antennas_rx;aa++) - LOG_I(PHY,"ULSCH RNTI %x: ulsch_power[%d] %d, ulsch_noise_power[%d] %d\n", + for (int aa=0;aaframe_parms.nb_antennas_rx;aa++) + stroff+=sprintf(output+stroff,"ULSCH RNTI %x: ulsch_power[%d] %d, ulsch_noise_power[%d] %d\n", eNB->ulsch_stats[i].rnti, aa,eNB->ulsch_stats[i].ulsch_power[aa],aa,eNB->ulsch_stats[i].ulsch_noise_power[aa]); - - LOG_I(PHY,"ULSCH RNTI %x: round_trials %d(%1.1e):%d(%1.1e):%d(%1.1e):%d\n", + AssertFatal(stroff<(STATSTRLEN-1000),"Increase STATSTRLEN\n"); + stroff+=sprintf(output+stroff,"ULSCH RNTI %x: round_trials %d(%1.1e):%d(%1.1e):%d(%1.1e):%d\n", eNB->ulsch_stats[i].rnti, eNB->ulsch_stats[i].round_trials[0], (double)eNB->ulsch_stats[i].round_trials[1]/eNB->ulsch_stats[i].round_trials[0], @@ -1134,7 +1136,7 @@ void dump_ulsch_stats(PHY_VARS_eNB *eNB,int frame) { eNB->ulsch_stats[i].round_trials[2], (double)eNB->ulsch_stats[i].round_trials[3]/eNB->ulsch_stats[i].round_trials[0], eNB->ulsch_stats[i].round_trials[3]); - LOG_I(PHY,"ULSCH RNTI %x: current_Qm %d, current_G %d, current_TBS %d, current_rate %f,current_RI %d, timing_offset %d, total_bytes RX/SCHED %d/%d\n", + stroff+=sprintf(output+stroff,"ULSCH RNTI %x: current_Qm %d, current_G %d, current_TBS %d, current_rate %f,current_RI %d, timing_offset %d, total_bytes RX/SCHED %d/%d\n", eNB->ulsch_stats[i].rnti, eNB->ulsch_stats[i].current_Qm, eNB->ulsch_stats[i].current_G, @@ -1145,7 +1147,8 @@ void dump_ulsch_stats(PHY_VARS_eNB *eNB,int frame) { eNB->ulsch_stats[i].total_bytes_rx, eNB->ulsch_stats[i].total_bytes_tx); } - + if (fd) fprintf(fd,"%s",output); + else printf("%s",output); } void clear_ulsch_stats(PHY_VARS_eNB *eNB) { diff --git a/openair1/PHY/defs_eNB.h b/openair1/PHY/defs_eNB.h index a2caba8dfd..bae072d532 100644 --- a/openair1/PHY/defs_eNB.h +++ b/openair1/PHY/defs_eNB.h @@ -362,6 +362,8 @@ typedef struct L1_proc_t_s { L1_rxtx_proc_t L1_proc,L1_proc_tx; /// stats thread pthread descriptor pthread_t process_stats_thread; + /// L1 stats pthread descriptor + pthread_t L1_stats_thread; /// for waking up tx procedure RU_proc_t *ru_proc; struct PHY_VARS_eNB_s *eNB; diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c index 89b3dea7d6..898dfb62aa 100644 --- a/openair1/SCHED/phy_procedures_lte_eNb.c +++ b/openair1/SCHED/phy_procedures_lte_eNb.c @@ -2182,12 +2182,6 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) { LOG_I (PHY, "max_I0 %d (rb %d), min_I0 %d (rb %d), avg I0 %d\n", max_I0, amax, min_I0, amin, eNB->measurements.n0_subband_power_avg_dB); } - // figure out a better way to choose slot_rx, 19 is ok for a particular TDD configuration with 30kHz SCS - if ((frame&127) == 0 && subframe==3) { - dump_ulsch_stats(eNB,frame); - dump_uci_stats(eNB,frame); - } - // clear unused statistics after 2 seconds for (int i=0;iulsch_stats[i].frame <= frame) { diff --git a/openair2/LAYER2/MAC/eNB_scheduler.c b/openair2/LAYER2/MAC/eNB_scheduler.c index 86704c816a..492bbbddf2 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler.c +++ b/openair2/LAYER2/MAC/eNB_scheduler.c @@ -595,27 +595,6 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, CC_id = UE_PCCID(module_idP, UE_id); UE_scheduling_control = &(UE_info->UE_sched_ctrl[UE_id]); - if (((frameP & 127) == 0) && (subframeP == 0)) { - LOG_I(MAC,"UE rnti %x : %s, PHR %d dB DL CQI %d PUSCH SNR %d (TPC accum %d) PUCCH SNR %d (TPC accum %d)\n", - rnti, - UE_scheduling_control->ul_out_of_sync == 0 ? "in synch" : "out of sync", - UE_info->UE_template[CC_id][UE_id].phr_info, - UE_scheduling_control->dl_cqi[CC_id], - (5 * UE_scheduling_control->pusch_snr[CC_id] - 640) / 10, UE_scheduling_control->pucch_tpc_accumulated[CC_id], - (5 * UE_scheduling_control->pucch1_snr[CC_id] - 640) / 10, UE_scheduling_control->pusch_tpc_accumulated[CC_id]); - LOG_I(MAC," ULSCH rounds %d/%d/%d/%d, DLSCH rounds %d/%d/%d/%d, ULSCH errors %d, DLSCH errors %d\n", - UE_info->eNB_UE_stats[CC_id][UE_id].ulsch_rounds[0], - UE_info->eNB_UE_stats[CC_id][UE_id].ulsch_rounds[1], - UE_info->eNB_UE_stats[CC_id][UE_id].ulsch_rounds[2], - UE_info->eNB_UE_stats[CC_id][UE_id].ulsch_rounds[3], - UE_info->eNB_UE_stats[CC_id][UE_id].dlsch_rounds[0], - UE_info->eNB_UE_stats[CC_id][UE_id].dlsch_rounds[1], - UE_info->eNB_UE_stats[CC_id][UE_id].dlsch_rounds[2], - UE_info->eNB_UE_stats[CC_id][UE_id].dlsch_rounds[3], - UE_info->eNB_UE_stats[CC_id][UE_id].ulsch_errors, - UE_info->eNB_UE_stats[CC_id][UE_id].dlsch_errors); - } - RC.eNB[module_idP][CC_id]->pusch_stats_bsr[UE_id][(frameP * 10) + subframeP] = -63; if (UE_id == UE_info->list.head) { diff --git a/openair2/LAYER2/MAC/mac.h b/openair2/LAYER2/MAC/mac.h index bf8db987d3..160d84e1c0 100644 --- a/openair2/LAYER2/MAC/mac.h +++ b/openair2/LAYER2/MAC/mac.h @@ -1433,6 +1433,8 @@ typedef struct eNB_MAC_INST_s { int32_t puSch10xSnr; int32_t puCch10xSnr; + + pthread_t mac_stats_thread; } eNB_MAC_INST; /* diff --git a/openair2/LAYER2/MAC/main.c b/openair2/LAYER2/MAC/main.c index af6d1a7ac3..86f2bf0af1 100644 --- a/openair2/LAYER2/MAC/main.c +++ b/openair2/LAYER2/MAC/main.c @@ -40,8 +40,51 @@ #include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h" #include "common/ran_context.h" #include "intertask_interface.h" +#include extern RAN_CONTEXT_t RC; +extern int oai_exit; + +void *mac_stats_thread(void *param) { + eNB_MAC_INST *mac = (eNB_MAC_INST *)param; + FILE *fd; + UE_info_t *UE_info = &(mac->UE_info); + + while (!oai_exit) { + sleep(1); + fd=fopen("MAC_stats.log","w+"); + AssertFatal(fd!=NULL,"Cannot open MAC_stats.log\n"); + + for (int UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) { + if (UE_info->active[UE_id]) { + int rnti = UE_RNTI(mac->Mod_id, UE_id); + int CC_id = UE_PCCID(mac->Mod_id, UE_id); + UE_sched_ctrl_t *UE_scheduling_control = &(UE_info->UE_sched_ctrl[UE_id]); + + fprintf(fd,"UE rnti %x : %s, PHR %d dB DL CQI %d PUSCH SNR %d (TPC accum %d) PUCCH SNR %d (TPC accum %d)\n", + rnti, + UE_scheduling_control->ul_out_of_sync == 0 ? "in synch" : "out of sync", + UE_info->UE_template[CC_id][UE_id].phr_info, + UE_scheduling_control->dl_cqi[CC_id], + (5 * UE_scheduling_control->pusch_snr[CC_id] - 640) / 10, UE_scheduling_control->pucch_tpc_accumulated[CC_id], + (5 * UE_scheduling_control->pucch1_snr[CC_id] - 640) / 10, UE_scheduling_control->pusch_tpc_accumulated[CC_id]); + fprintf(fd," ULSCH rounds %d/%d/%d/%d, DLSCH rounds %d/%d/%d/%d, ULSCH errors %d, DLSCH errors %d\n", + UE_info->eNB_UE_stats[CC_id][UE_id].ulsch_rounds[0], + UE_info->eNB_UE_stats[CC_id][UE_id].ulsch_rounds[1], + UE_info->eNB_UE_stats[CC_id][UE_id].ulsch_rounds[2], + UE_info->eNB_UE_stats[CC_id][UE_id].ulsch_rounds[3], + UE_info->eNB_UE_stats[CC_id][UE_id].dlsch_rounds[0], + UE_info->eNB_UE_stats[CC_id][UE_id].dlsch_rounds[1], + UE_info->eNB_UE_stats[CC_id][UE_id].dlsch_rounds[2], + UE_info->eNB_UE_stats[CC_id][UE_id].dlsch_rounds[3], + UE_info->eNB_UE_stats[CC_id][UE_id].ulsch_errors, + UE_info->eNB_UE_stats[CC_id][UE_id].dlsch_errors); + } + } + fclose(fd); + } + return(NULL); +} void init_UE_info(UE_info_t *UE_info) { @@ -128,6 +171,9 @@ void mac_top_init_eNB(void) pdcp_layer_init(); rrc_init_global_param(); + + for (i=0;imac_stats_thread,NULL,mac_stats_thread,(void*)mac[i]); + } void mac_init_cell_params(int Mod_idP, int CC_idP) diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c index 03ef480131..208e8fba2d 100644 --- a/targets/RT/USER/lte-enb.c +++ b/targets/RT/USER/lte-enb.c @@ -846,6 +846,20 @@ static void *process_stats_thread(void *param) { return(NULL); } +void *L1_stats_thread(void *param) { + PHY_VARS_eNB *eNB = (PHY_VARS_eNB *)param; + wait_sync("L1_stats_thread"); + FILE *fd; + while (!oai_exit) { + sleep(1); + fd=fopen("L1_stats.log","w"); + AssertFatal(fd!=NULL,"Cannot open L1_stats.log\n"); + dump_ulsch_stats(fd,eNB,eNB->proc.L1_proc_tx.frame_tx); + dump_uci_stats(fd,eNB,eNB->proc.L1_proc_tx.frame_tx); + fclose(fd); + } + return(NULL); +} void init_eNB_proc(int inst) { /*int i=0;*/ @@ -940,6 +954,7 @@ void init_eNB_proc(int inst) { AssertFatal(proc->instance_cnt_prach == -1,"instance_cnt_prach = %d\n",proc->instance_cnt_prach); if (opp_enabled == 1) pthread_create(&proc->process_stats_thread,NULL,process_stats_thread,(void *)eNB); + pthread_create(&proc->L1_stats_thread,NULL,L1_stats_thread,(void*)eNB); } //for multiple CCs: setup master and slaves From c3a9d018a8bfc5f9ed90536fae65f64c68b14500 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Thu, 14 Jan 2021 14:19:25 +0100 Subject: [PATCH 030/579] PDCP statistics logs, ulsim updates after recent changes --- .../PHY/LTE_ESTIMATION/lte_eNB_measurements.c | 26 +++++++++- openair1/PHY/LTE_TRANSPORT/dci_tools.c | 16 +++---- openair1/PHY/LTE_TRANSPORT/transport_proto.h | 6 +-- openair1/PHY/LTE_TRANSPORT/uci_tools.c | 7 ++- openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c | 3 +- openair1/SCHED/phy_procedures_lte_eNb.c | 41 +++++----------- openair1/SCHED/prach_procedures.c | 2 +- openair1/SIMULATION/LTE_PHY/ulsim.c | 5 +- openair2/LAYER2/MAC/eNB_scheduler_fairRR.c | 2 +- openair2/LAYER2/PDCP_v10.1.0/pdcp.c | 47 ++++++++++++++++++- openair2/RRC/LTE/rrc_eNB.c | 1 - targets/RT/USER/lte-enb.c | 1 + 12 files changed, 104 insertions(+), 53 deletions(-) diff --git a/openair1/PHY/LTE_ESTIMATION/lte_eNB_measurements.c b/openair1/PHY/LTE_ESTIMATION/lte_eNB_measurements.c index a4ae65e642..1518d42b31 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_eNB_measurements.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_eNB_measurements.c @@ -32,6 +32,30 @@ int32_t rx_power_avg_eNB[3]; +void dump_I0_stats(FILE *fd,PHY_VARS_eNB *eNB) { + + + int min_I0=1000,max_I0=0; + int amin=0,amax=0; + for (int i=0; iframe_parms.N_RB_UL; i++) { + if (i==(eNB->frame_parms.N_RB_UL>>1) - 1) i+=2; + + if (eNB->measurements.n0_subband_power_tot_dB[i]measurements.n0_subband_power_tot_dB[i]; amin=i;} + + if (eNB->measurements.n0_subband_power_tot_dB[i]>max_I0) {max_I0 = eNB->measurements.n0_subband_power_tot_dB[i]; amax=i;} + } + + for (int i=0; iframe_parms.N_RB_UL; i++) { + fprintf(fd,"%2d.",eNB->measurements.n0_subband_power_tot_dB[i]-eNB->measurements.n0_subband_power_avg_dB); + if (i%25 == 24) fprintf(fd,"\n"); + } + + fprintf(fd,"\nmax_I0 %d (rb %d), min_I0 %d (rb %d), avg I0 %d\n", max_I0, amax, min_I0, amin, eNB->measurements.n0_subband_power_avg_dB); + + fprintf(fd,"prach_I0 = %d.%d dB\n",eNB->measurements.prach_I0/10,eNB->measurements.prach_I0%10); + + +} void lte_eNB_I0_measurements(PHY_VARS_eNB *eNB, int subframe, module_id_t eNB_id, @@ -87,7 +111,7 @@ void lte_eNB_I0_measurements(PHY_VARS_eNB *eNB, nb_rb++; for (aarx=0; aarxnb_antennas_rx; aarx++) { measurements->n0_subband_power[aarx][rb] = 0; - for (int s=0;s<14-(frame_parms->Ncp<<1);s++) { + for (int s=0;s<(14-(frame_parms->Ncp<<1));s++) { // select the 7th symbol in an uplink subframe offset = offset0 + (s*frame_parms->ofdm_symbol_size); ul_ch = &common_vars->rxdataF[aarx][offset]; diff --git a/openair1/PHY/LTE_TRANSPORT/dci_tools.c b/openair1/PHY/LTE_TRANSPORT/dci_tools.c index dea0c27911..47afad9d0a 100644 --- a/openair1/PHY/LTE_TRANSPORT/dci_tools.c +++ b/openair1/PHY/LTE_TRANSPORT/dci_tools.c @@ -53,12 +53,11 @@ //#undef LOG_D //#define LOG_D(A,B...) printf(B) -int16_t find_dlsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type) { - uint16_t i; - int16_t first_free_index=-1; +int find_dlsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type) { + int first_free_index=-1; AssertFatal(eNB!=NULL,"eNB is null\n"); - for (i=0; idlsch[i]!=NULL,"eNB->dlsch[%d] is null\n",i); AssertFatal(eNB->dlsch[i]!=NULL,"eNB->dlsch[%d][0] is null\n",i); LOG_D(PHY,"searching for rnti %x : UE index %d=> harq_mask %x, rnti %x, first_free_index %d\n", rnti,i,eNB->dlsch[i][0]->harq_mask,eNB->dlsch[i][0]->rnti,first_free_index); @@ -78,12 +77,11 @@ int16_t find_dlsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type) { } -int16_t find_ulsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type) { - uint16_t i; - int16_t first_free_index=-1; +int find_ulsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type) { + int first_free_index=-1; AssertFatal(eNB!=NULL,"eNB is null\n"); - for (i=0; iulsch[i]!=NULL,"eNB->ulsch[%d] is null\n",i); if ((eNB->ulsch[i]->harq_mask >0) && @@ -1955,7 +1953,7 @@ void fill_dci0(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_proc_t *proc, if(frame_parms->frame_type == TDD) { UE_id = find_ulsch(pdu->dci_pdu_rel8.rnti, eNB,SEARCH_EXIST_OR_FREE); - if(UE_id != -1) { + if(UE_id >=0 -1 || UE_id < NUMBER_OF_ULSCH_MAX) { eNB->ulsch[UE_id]->harq_processes[pdu->dci_pdu_rel8.harq_pid]->V_UL_DAI = dai +1; } } diff --git a/openair1/PHY/LTE_TRANSPORT/transport_proto.h b/openair1/PHY/LTE_TRANSPORT/transport_proto.h index 3caa1df05a..0a8b03ff38 100644 --- a/openair1/PHY/LTE_TRANSPORT/transport_proto.h +++ b/openair1/PHY/LTE_TRANSPORT/transport_proto.h @@ -690,11 +690,11 @@ void conv_eMTC_rballoc(uint16_t resource_block_coding, uint32_t N_RB_DL, uint32_t *rb_alloc); -int16_t find_dlsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type); +int find_dlsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type); -int16_t find_ulsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type); +int find_ulsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type); -int16_t find_uci(uint16_t rnti, int frame, int subframe, PHY_VARS_eNB *eNB,find_type_t type); +int find_uci(uint16_t rnti, int frame, int subframe, PHY_VARS_eNB *eNB,find_type_t type); uint32_t lte_gold_generic(uint32_t *x1, uint32_t *x2, uint8_t reset); diff --git a/openair1/PHY/LTE_TRANSPORT/uci_tools.c b/openair1/PHY/LTE_TRANSPORT/uci_tools.c index 8a1ced6ea8..ae039bec2a 100644 --- a/openair1/PHY/LTE_TRANSPORT/uci_tools.c +++ b/openair1/PHY/LTE_TRANSPORT/uci_tools.c @@ -37,12 +37,11 @@ //#define DEBUG_UCI 1 -int16_t find_uci(uint16_t rnti, int frame, int subframe, PHY_VARS_eNB *eNB,find_type_t type) { - uint16_t i; - int16_t first_free_index=-1; +int find_uci(uint16_t rnti, int frame, int subframe, PHY_VARS_eNB *eNB,find_type_t type) { + int first_free_index=-1; AssertFatal(eNB!=NULL,"eNB is null\n"); - for (i=0; iuci_vars[i].active >0) && (eNB->uci_vars[i].rnti==rnti) && (eNB->uci_vars[i].frame==frame) && diff --git a/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c b/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c index 137ffcb219..9fed3120e8 100644 --- a/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c +++ b/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c @@ -1147,8 +1147,7 @@ void dump_ulsch_stats(FILE *fd,PHY_VARS_eNB *eNB,int frame) { eNB->ulsch_stats[i].total_bytes_rx, eNB->ulsch_stats[i].total_bytes_tx); } - if (fd) fprintf(fd,"%s",output); - else printf("%s",output); + fprintf(fd,"%s",output); } void clear_ulsch_stats(PHY_VARS_eNB *eNB) { diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c index 898dfb62aa..3b18f6cdce 100644 --- a/openair1/SCHED/phy_procedures_lte_eNb.c +++ b/openair1/SCHED/phy_procedures_lte_eNb.c @@ -1416,6 +1416,7 @@ void pusch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) { for (i = 0; i < NUMBER_OF_ULSCH_MAX; i++) { ulsch = eNB->ulsch[i]; + if (!ulsch) continue; if (ulsch->ue_type > 0) harq_pid = 0; else harq_pid=harq_pid0; @@ -1424,10 +1425,9 @@ void pusch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) { if (ulsch->rnti>0) LOG_D(PHY,"eNB->ulsch[%d]->harq_processes[harq_pid:%d] SFN/SF:%04d%d: PUSCH procedures, UE %d/%x ulsch_harq[status:%d SFN/SF:%04d%d handled:%d]\n", i, harq_pid, frame,subframe,i,ulsch->rnti, - ulsch_harq->status, ulsch_harq->frame, ulsch_harq->subframe, ulsch_harq->handled); + ulsch_harq->status, ulsch_harq->frame, ulsch_harq->subframe, ulsch_harq->handled); - if ((ulsch) && - (ulsch->rnti>0) && + if ((ulsch->rnti>0) && (ulsch_harq->status == ACTIVE) && ((ulsch_harq->frame == frame) || (ulsch_harq->repetition_number >1) ) && ((ulsch_harq->subframe == subframe) || (ulsch_harq->repetition_number >1) ) && @@ -2168,19 +2168,6 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) { } lte_eNB_I0_measurements (eNB, subframe, 0, eNB->first_run_I0_measurements); - int min_I0=1000,max_I0=0; - int amin=0,amax=0; - if ((frame==0) && (subframe==3)) { - for (int i=0; iframe_parms.N_RB_UL; i++) { - if (i==(eNB->frame_parms.N_RB_UL>>1) - 1) i+=2; - - if (eNB->measurements.n0_subband_power_tot_dB[i]measurements.n0_subband_power_tot_dB[i]; amin=i;} - - if (eNB->measurements.n0_subband_power_tot_dB[i]>max_I0) {max_I0 = eNB->measurements.n0_subband_power_tot_dB[i]; amax=i;} - } - - LOG_I (PHY, "max_I0 %d (rb %d), min_I0 %d (rb %d), avg I0 %d\n", max_I0, amax, min_I0, amin, eNB->measurements.n0_subband_power_avg_dB); - } // clear unused statistics after 2 seconds for (int i=0;iulsch[j]; - - if((ulsch != NULL) && (ulsch->rnti == rnti)) { - LOG_I(PHY, "clean_eNb_ulsch ulsch[%d] UE %x\n", j, rnti); - clean_eNb_ulsch(ulsch); - } + for (j=0; jdlsch[j][0]; @@ -2231,13 +2212,15 @@ void release_rnti_of_phy(module_id_t mod_id) { } } - ulsch = eNB_PHY->ulsch[j]; + for (j=0;julsch[j]; - if((ulsch != NULL) && (ulsch->rnti == rnti)) { - LOG_I(PHY, "clean_eNb_ulsch ulsch[%d] UE %x\n", j, rnti); - clean_eNb_ulsch(ulsch); - for (j=0;julsch_stats[j].rnti == rnti) {eNB_PHY->ulsch_stats[j].rnti=0; break;} + if((ulsch != NULL) && (ulsch->rnti == rnti)) { + LOG_I(PHY, "clean_eNb_ulsch ulsch[%d] UE %x\n", j, rnti); + clean_eNb_ulsch(ulsch); + for (j=0;julsch_stats[j].rnti == rnti) {eNB_PHY->ulsch_stats[j].rnti=0; break;} + } } for(j=0; jmeasurements.prach_I0 = ((eNB->measurements.prach_I0*900)>>10) + ((avg_preamble_energy[0]*124)>>10); - if (frame==0) LOG_I(PHY,"prach_I0 = %d.%d dB\n",eNB->measurements.prach_I0/10,eNB->measurements.prach_I0%10); + if (frame==0) LOG_D(PHY,"prach_I0 = %d.%d dB\n",eNB->measurements.prach_I0/10,eNB->measurements.prach_I0%10); if (eNB->prach_energy_counter < 100) eNB->prach_energy_counter++; } diff --git a/openair1/SIMULATION/LTE_PHY/ulsim.c b/openair1/SIMULATION/LTE_PHY/ulsim.c index 7f60cd5ab9..5e4749322f 100644 --- a/openair1/SIMULATION/LTE_PHY/ulsim.c +++ b/openair1/SIMULATION/LTE_PHY/ulsim.c @@ -1214,6 +1214,9 @@ int main(int argc, char **argv) { eNB->ulsch[0]->harq_processes[harq_pid]->uci_format,0,eNB->frame_parms.N_RB_DL); dump_ulsch(eNB,eNB->proc.frame_rx,subframe,0,round); + dump_I0_stats(stdout,eNB); + dump_ulsch_stats(stdout,eNB,0); + exit(-1); } @@ -1300,7 +1303,7 @@ int main(int argc, char **argv) { LOG_UDUMPMSG(SIM,dataArray(table_rx),table_rx->size,LOG_DUMP_DOUBLE,"The receiver raw data: \n"); } - dump_ulsch_stats(eNB,0); + dump_ulsch_stats(NULL,eNB,0); printf("\n**********rb: %d ***mcs : %d *********SNR = %f dB (%f): TX %u dB (gain %f dB), N0W %f dB, I0 %u dB, delta_IF %d [ (%d,%d) dB / (%u,%u) dB ]**************************\n", nb_rb,mcs,SNR,SNR2, tx_lev_dB, diff --git a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c index 6f5cace879..7f5df6d185 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c @@ -2646,7 +2646,7 @@ void ulsch_scheduler_pre_processor_fairRR(module_id_t module_idP, tbs = get_TBS_UL(mcs,rb_table[rb_table_index]); tx_power= estimate_ue_tx_power(0,tbs*8,rb_table[rb_table_index],0,cc->Ncp,0); } - if (rb_table[rb_table_index]>40) LOG_I(MAC,"bytes_to_schedule %d, nb_rb %d tx_power %d PHR %d\n", + if (rb_table[rb_table_index]>40) LOG_D(MAC,"bytes_to_schedule %d, nb_rb %d tx_power %d PHR %d\n", bytes_to_schedule,rb_table[rb_table_index], estimate_ue_tx_power(0,tbs*8,rb_table[rb_table_index],0,cc->Ncp,0), UE_template->phr_info); diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c index 9b6de7c168..12973607d0 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c @@ -57,7 +57,7 @@ #include "openair2/RRC/NAS/nas_config.h" #include "intertask_interface.h" #include "openair3/S1AP/s1ap_eNB.h" - +#include # include "gtpv1u_eNB_task.h" # include "gtpv1u.h" @@ -87,6 +87,51 @@ hash_table_t *pdcp_coll_p = NULL; /* pdcp module parameters and related functions*/ static pdcp_params_t pdcp_params= {0,NULL}; +extern volatile int oai_exit; + +pthread_t pdcp_stats_thread_desc; + +void *pdcp_stats_thread(void *param) { + + FILE *fd; + + while (!oai_exit) { + sleep(1); + + fd=fopen("PDCP_stats.log","w+"); + AssertFatal(fd!=NULL,"Cannot open MAC_stats.log\n"); + int drb_id=3; + for (int UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) { + if (pdcp_enb[0].rnti[UE_id]>0) { + fprintf(fd,"UE CRNTI %x: tx_window %dms, tx_bytes %d, tx_bytes_w %d, tx_bytes_tmp_w %d\n", + pdcp_enb[0].rnti[UE_id], + Pdcp_stats_tx_window_ms[0][UE_id], + Pdcp_stats_tx_bytes[0][UE_id][drb_id], + Pdcp_stats_tx_bytes_w[0][UE_id][drb_id], + Pdcp_stats_tx_bytes_tmp_w[0][UE_id][drb_id]); + fprintf(fd," tx %d, tx_w %d, tx_tmp_w %d, tx_sn %d, tx throughput %d\n", + Pdcp_stats_tx[0][UE_id][drb_id], + Pdcp_stats_tx_w[0][UE_id][drb_id], + Pdcp_stats_tx_tmp_w[0][UE_id][drb_id], + Pdcp_stats_tx_sn[0][UE_id][drb_id], + Pdcp_stats_tx_throughput_w[0][UE_id][drb_id]); + fprintf(fd," rx_window %dms, rx_bytes %d, rx_bytes_w %d, rx_bytes_tmp_w %d\n", + Pdcp_stats_rx_window_ms[MAX_eNB][MAX_MOBILES_PER_ENB], + Pdcp_stats_rx_bytes[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX], + Pdcp_stats_rx_bytes_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX], + Pdcp_stats_rx_bytes_tmp_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX]); + fprintf(fd," rx %d, rx_w %d, rx_tmp_w %d, rx_sn %d, rx goodput %d\n", + Pdcp_stats_rx[0][UE_id][drb_id], + Pdcp_stats_rx_w[0][UE_id][drb_id], + Pdcp_stats_rx_tmp_w[0][UE_id][drb_id], + Pdcp_stats_rx_sn[0][UE_id][drb_id], + Pdcp_stats_rx_goodput_w[0][UE_id][drb_id]); + + } + } + } +} + uint64_t get_pdcp_optmask(void) { return pdcp_params.optmask; } diff --git a/openair2/RRC/LTE/rrc_eNB.c b/openair2/RRC/LTE/rrc_eNB.c index 5c6daaff09..8c9a727b2e 100644 --- a/openair2/RRC/LTE/rrc_eNB.c +++ b/openair2/RRC/LTE/rrc_eNB.c @@ -4641,7 +4641,6 @@ rrc_eNB_process_MeasurementReport( case 7: LOG_D(RRC, "NR event frame %d subframe %d\n", ctxt_pP->frame, ctxt_pP->subframe); - printf("NR event frame %d subframe %d\n", ctxt_pP->frame, ctxt_pP->subframe); break; default: diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c index 208e8fba2d..10e050bc5d 100644 --- a/targets/RT/USER/lte-enb.c +++ b/targets/RT/USER/lte-enb.c @@ -854,6 +854,7 @@ void *L1_stats_thread(void *param) { sleep(1); fd=fopen("L1_stats.log","w"); AssertFatal(fd!=NULL,"Cannot open L1_stats.log\n"); + dump_I0_stats(fd,eNB); dump_ulsch_stats(fd,eNB,eNB->proc.L1_proc_tx.frame_tx); dump_uci_stats(fd,eNB,eNB->proc.L1_proc_tx.frame_tx); fclose(fd); From db90feea5312dd4daaac29a6845a8822b14f4053 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Thu, 14 Jan 2021 23:16:14 +0100 Subject: [PATCH 031/579] PDCP throughput statistics in log --- openair1/PHY/LTE_TRANSPORT/dci_tools.c | 2 +- openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c | 2 +- openair1/SCHED/prach_procedures.c | 2 +- openair2/LAYER2/MAC/eNB_scheduler_RA.c | 2 +- openair2/LAYER2/MAC/eNB_scheduler_dlsch.c | 11 +++-- openair2/LAYER2/MAC/eNB_scheduler_ulsch.c | 9 ++-- openair2/LAYER2/PDCP_v10.1.0/pdcp.c | 46 +++++++++------------ 7 files changed, 32 insertions(+), 42 deletions(-) diff --git a/openair1/PHY/LTE_TRANSPORT/dci_tools.c b/openair1/PHY/LTE_TRANSPORT/dci_tools.c index 47afad9d0a..b0d4c07eae 100644 --- a/openair1/PHY/LTE_TRANSPORT/dci_tools.c +++ b/openair1/PHY/LTE_TRANSPORT/dci_tools.c @@ -533,7 +533,7 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB, dlsch0->harq_mask |= (1 << rel8->harq_process); - if (rel8->rnti != SI_RNTI) LOG_I(PHY,"DCI 1A: round %d, mcs %d, TBS %d, rballoc %x, rv %d, rnti %x, harq process %d\n",dlsch0_harq->round,rel8->mcs_1,dlsch0_harq->TBS,rel8->resource_block_coding, + if (rel8->rnti != SI_RNTI) LOG_D(PHY,"DCI 1A: round %d, mcs %d, TBS %d, rballoc %x, rv %d, rnti %x, harq process %d\n",dlsch0_harq->round,rel8->mcs_1,dlsch0_harq->TBS,rel8->resource_block_coding, rel8->redundancy_version_1,rel8->rnti,rel8->harq_process); break; diff --git a/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c b/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c index 9fed3120e8..d3da61370a 100644 --- a/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c +++ b/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c @@ -1122,7 +1122,7 @@ void dump_ulsch_stats(FILE *fd,PHY_VARS_eNB *eNB,int frame) { char output[16384]; int stroff=0; for (int i=0;iulsch_stats[i].rnti>0) { + if (eNB->ulsch_stats[i].rnti>0 && eNB->ulsch_stats[i].round_trials[0]>100) { for (int aa=0;aaframe_parms.nb_antennas_rx;aa++) stroff+=sprintf(output+stroff,"ULSCH RNTI %x: ulsch_power[%d] %d, ulsch_noise_power[%d] %d\n", eNB->ulsch_stats[i].rnti, aa,eNB->ulsch_stats[i].ulsch_power[aa],aa,eNB->ulsch_stats[i].ulsch_noise_power[aa]); diff --git a/openair1/SCHED/prach_procedures.c b/openair1/SCHED/prach_procedures.c index 6c034b70f0..593cfcb1dc 100644 --- a/openair1/SCHED/prach_procedures.c +++ b/openair1/SCHED/prach_procedures.c @@ -146,7 +146,7 @@ void prach_procedures(PHY_VARS_eNB *eNB, } else { if ((eNB->prach_energy_counter == 100) && (max_preamble_energy[0] > eNB->measurements.prach_I0+eNB->prach_DTX_threshold)) { - LOG_I(PHY,"[eNB %d/%d][RAPROC] Frame %d, subframe %d Initiating RA procedure with preamble %d, energy %d.%d dB, delay %d\n", + LOG_D(PHY,"[eNB %d/%d][RAPROC] Frame %d, subframe %d Initiating RA procedure with preamble %d, energy %d.%d dB, delay %d\n", eNB->Mod_id, eNB->CC_id, frame, diff --git a/openair2/LAYER2/MAC/eNB_scheduler_RA.c b/openair2/LAYER2/MAC/eNB_scheduler_RA.c index 273da77609..4ca6ad1248 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_RA.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_RA.c @@ -1295,7 +1295,7 @@ initiate_ra_proc(module_id_t module_idP, prach_ParametersListCE_r13 = &ext4_prach->prach_ParametersListCE_r13; } - LOG_I(MAC, + LOG_D(MAC, "[eNB %d][RAPROC] CC_id %d Frame %d, Subframe %d Initiating RA procedure for preamble index %d, timing offset %d\n", module_idP, CC_id, frameP, subframeP, preamble_index, timing_offset); LOG_D(MAC, diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c index 3dfab5baba..ad00b6bca8 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c @@ -651,7 +651,7 @@ schedule_ue_spec(module_id_t module_idP, eNB_UE_stats->rrc_status = mac_eNB_get_rrc_status(module_idP, rnti); eNB_UE_stats->harq_pid = harq_pid; eNB_UE_stats->harq_round = round_DL; - + eNB_UE_stats->dlsch_rounds[round_DL&7]++; if (eNB_UE_stats->rrc_status < RRC_RECONFIGURED) { ue_sched_ctrl->uplane_inactivity_timer = 0; } @@ -792,7 +792,6 @@ schedule_ue_spec(module_id_t module_idP, // No TX request for retransmission (check if null request for FAPI) } - //eNB_UE_stats->dlsch_trials[round]++; eNB_UE_stats->num_retransmission += 1; eNB_UE_stats->rbs_used_retx = nb_rb; eNB_UE_stats->total_rbs_used_retx += nb_rb; @@ -1064,10 +1063,10 @@ schedule_ue_spec(module_id_t module_idP, ue_template->pucch_tpc_tx_frame = frameP; ue_template->pucch_tpc_tx_subframe = subframeP; - if (snr > target_snr + 4) { + if (snr > target_snr + PUCCH_PCHYST) { tpc = 0; //-1 ue_sched_ctrl->pucch_tpc_accumulated[CC_id]--; - } else if (snr < target_snr - 4) { + } else if (snr < target_snr - PUCCH_PCHYST) { tpc = 2; //+1 ue_sched_ctrl->pucch_tpc_accumulated[CC_id]--; } else { @@ -1701,9 +1700,9 @@ schedule_ue_spec_br(module_id_t module_idP, UE_info->UE_template[CC_id][UE_id].pucch_tpc_tx_frame = frameP; UE_info->UE_template[CC_id][UE_id].pucch_tpc_tx_subframe = subframeP; - if (snr > target_snr + 4) { + if (snr > target_snr + PUCCH_PCHYST) { tpc = 0; //-1 - } else if (snr < target_snr - 4) { + } else if (snr < target_snr - PUCCH_PCHYST) { tpc = 2; //+1 } else { tpc = 1; //0 diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c index 7e00897474..013861c585 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c @@ -273,7 +273,7 @@ rx_sdu(const module_id_t enb_mod_idP, AssertFatal(mac->common_channels[CC_idP].radioResourceConfigCommon->rach_ConfigCommon.maxHARQ_Msg3Tx > 1, "maxHARQ %d should be greater than 1\n", (int) mac->common_channels[CC_idP].radioResourceConfigCommon->rach_ConfigCommon.maxHARQ_Msg3Tx); - LOG_I(MAC, "[eNB %d][PUSCH %d] CC_id %d [RAPROC Msg3] Received ULSCH sdu (%s) round %d from PHY (rnti %x, RA_id %d) ul_cqi %d, timing advance %d\n", + LOG_D(MAC, "[eNB %d][PUSCH %d] CC_id %d [RAPROC Msg3] Received ULSCH sdu (%s) round %d from PHY (rnti %x, RA_id %d) ul_cqi %d, timing advance %d\n", enb_mod_idP, harq_pid, CC_idP, @@ -1430,10 +1430,10 @@ schedule_ulsch_rnti(module_id_t module_idP, UE_template_ptr->pusch_tpc_tx_frame = frameP; UE_template_ptr->pusch_tpc_tx_subframe = subframeP; - if (snr > target_snr + 4) { + if (snr > target_snr + PUSCH_PCHYST) { tpc = 0; // -1 UE_sched_ctrl_ptr->pusch_tpc_accumulated[CC_id]--; - } else if (snr < target_snr - 4) { + } else if (snr < target_snr - PUSCH_PCHYST) { tpc = 2; // +1 UE_sched_ctrl_ptr->pusch_tpc_accumulated[CC_id]++; } @@ -1501,6 +1501,7 @@ schedule_ulsch_rnti(module_id_t module_idP, const uint8_t ndi = 1 - UE_template_ptr->oldNDI_UL[harq_pid]; // NDI: new data indicator const uint8_t mcs = UE_template_ptr->pre_assigned_mcs_ul; UE_template_ptr->oldNDI_UL[harq_pid] = ndi; + UE_info->eNB_UE_stats[CC_id][UE_id].ulsch_rounds[0]++; UE_info->eNB_UE_stats[CC_id][UE_id].snr = snr; UE_info->eNB_UE_stats[CC_id][UE_id].target_snr = target_snr; UE_template_ptr->mcs_UL[harq_pid] = mcs; @@ -1522,8 +1523,6 @@ schedule_ulsch_rnti(module_id_t module_idP, UE_info->eNB_UE_stats[CC_id][UE_id].ulsch_mcs2 = mcs; - while (rb_table[rb_table_index] > 45 && rb_table_index > 0) - rb_table_index--; UE_template_ptr->TBS_UL[harq_pid] = get_TBS_UL(mcs, rb_table[rb_table_index]); UE_info->eNB_UE_stats[CC_id][UE_id].total_rbs_used_rx += rb_table[rb_table_index]; diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c index 12973607d0..e69b436c65 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c @@ -94,7 +94,12 @@ pthread_t pdcp_stats_thread_desc; void *pdcp_stats_thread(void *param) { FILE *fd; - + int old_byte_cnt[MAX_MOBILES_PER_ENB][NB_RB_MAX],old_byte_cnt_rx[MAX_MOBILES_PER_ENB][NB_RB_MAX]; + for (int i=0;i0) { - fprintf(fd,"UE CRNTI %x: tx_window %dms, tx_bytes %d, tx_bytes_w %d, tx_bytes_tmp_w %d\n", - pdcp_enb[0].rnti[UE_id], - Pdcp_stats_tx_window_ms[0][UE_id], + fprintf(fd,"PDCP: CRNTI %x, DRB %d: tx_bytes %d, DL Throughput %e\n", + pdcp_enb[0].rnti[UE_id],drb_id, Pdcp_stats_tx_bytes[0][UE_id][drb_id], - Pdcp_stats_tx_bytes_w[0][UE_id][drb_id], - Pdcp_stats_tx_bytes_tmp_w[0][UE_id][drb_id]); - fprintf(fd," tx %d, tx_w %d, tx_tmp_w %d, tx_sn %d, tx throughput %d\n", - Pdcp_stats_tx[0][UE_id][drb_id], - Pdcp_stats_tx_w[0][UE_id][drb_id], - Pdcp_stats_tx_tmp_w[0][UE_id][drb_id], - Pdcp_stats_tx_sn[0][UE_id][drb_id], - Pdcp_stats_tx_throughput_w[0][UE_id][drb_id]); - fprintf(fd," rx_window %dms, rx_bytes %d, rx_bytes_w %d, rx_bytes_tmp_w %d\n", - Pdcp_stats_rx_window_ms[MAX_eNB][MAX_MOBILES_PER_ENB], - Pdcp_stats_rx_bytes[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX], - Pdcp_stats_rx_bytes_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX], - Pdcp_stats_rx_bytes_tmp_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX]); - fprintf(fd," rx %d, rx_w %d, rx_tmp_w %d, rx_sn %d, rx goodput %d\n", - Pdcp_stats_rx[0][UE_id][drb_id], - Pdcp_stats_rx_w[0][UE_id][drb_id], - Pdcp_stats_rx_tmp_w[0][UE_id][drb_id], - Pdcp_stats_rx_sn[0][UE_id][drb_id], - Pdcp_stats_rx_goodput_w[0][UE_id][drb_id]); - - } + (double)((Pdcp_stats_tx_bytes[0][UE_id][drb_id]-old_byte_cnt[UE_id][drb_id])<<3)); + fprintf(fd," rx_bytes %d, UL Throughput %e\n", + Pdcp_stats_rx_bytes[0][UE_id][drb_id], + (double)((Pdcp_stats_rx_bytes[0][UE_id][drb_id]-old_byte_cnt_rx[UE_id][drb_id])<<3)); + } + } + fclose(fd); } - } + return(NULL); } uint64_t get_pdcp_optmask(void) { @@ -512,7 +502,7 @@ boolean_t pdcp_data_req( break; } - //LOG_I(PDCP,"ueid %d lcid %d tx seq num %d\n", pdcp_uid, rb_idP+rb_offset, current_sn); + LOG_D(PDCP,"ueid %d lcid %d tx seq num %d\n", pdcp_uid, (int)(rb_idP+rb_offset), current_sn); Pdcp_stats_tx[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]++; Pdcp_stats_tx_tmp_w[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]++; Pdcp_stats_tx_bytes[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]+=sdu_buffer_sizeP; @@ -2342,6 +2332,8 @@ uint64_t pdcp_module_init( uint64_t pdcp_optmask ) { LOG_E(PDCP, "ENB pdcp will not use tun interface\n"); } + pthread_create(&pdcp_stats_thread_desc,NULL,pdcp_stats_thread,NULL); + return pdcp_params.optmask ; } From a7ac979a5756c974d3b8781cd221bf658ae58de3 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Thu, 14 Jan 2021 23:32:52 +0100 Subject: [PATCH 032/579] stats adjustment --- openair2/LAYER2/MAC/eNB_scheduler_fairRR.c | 2 +- openair2/LAYER2/PDCP_v10.1.0/pdcp.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c index 7f5df6d185..eef380b13a 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c @@ -1893,7 +1893,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP, //#ifdef DEBUG_eNB_SCHEDULER if (ta_update != 31) { - LOG_I(MAC, + LOG_D(MAC, "[eNB %d][DLSCH] Frame %d Generate header for UE_id %d on CC_id %d: sdu_length_total %d, num_sdus %d, sdu_lengths[0] %d, sdu_lcids[0] %d => payload offset %d,timing advance value : %d, padding %d,post_padding %d,(mcs %d, TBS %d, nb_rb %d),header_dcch %d, header_dtch %d\n", module_idP, frameP, UE_id, CC_id, sdu_length_total, num_sdus, sdu_lengths[0], diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c index e69b436c65..028eaaea12 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c @@ -115,6 +115,8 @@ void *pdcp_stats_thread(void *param) { fprintf(fd," rx_bytes %d, UL Throughput %e\n", Pdcp_stats_rx_bytes[0][UE_id][drb_id], (double)((Pdcp_stats_rx_bytes[0][UE_id][drb_id]-old_byte_cnt_rx[UE_id][drb_id])<<3)); + old_byte_cnt[UE_id][drb_id]=Pdcp_stats_tx_bytes[0][UE_id][drb_id]; + old_byte_cnt_rx[UE_id][drb_id]=Pdcp_stats_rx_bytes[0][UE_id][drb_id]; } } fclose(fd); From ce71c409035c85ccd623ccb7f34259365b9c776d Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Mon, 18 Jan 2021 09:56:26 +0100 Subject: [PATCH 033/579] added RRC stats --- openair2/RRC/LTE/MESSAGES/asn1_msg.c | 5 - openair2/RRC/LTE/rrc_eNB.c | 355 ++++++++++++++++++++++----- 2 files changed, 288 insertions(+), 72 deletions(-) diff --git a/openair2/RRC/LTE/MESSAGES/asn1_msg.c b/openair2/RRC/LTE/MESSAGES/asn1_msg.c index a9c1b62535..2259fcb21e 100644 --- a/openair2/RRC/LTE/MESSAGES/asn1_msg.c +++ b/openair2/RRC/LTE/MESSAGES/asn1_msg.c @@ -3232,11 +3232,6 @@ uint8_t do_UECapabilityEnquiry( const protocol_ctxt_t *const ctxt_pP, if (nr_band>0) { - ASN_SEQUENCE_ADD(&dl_dcch_msg.message.choice.c1.choice.ueCapabilityEnquiry.criticalExtensions.choice.c1.choice.ueCapabilityEnquiry_r8.ue_CapabilityRequest.list, - &rat_nr); - ASN_SEQUENCE_ADD(&dl_dcch_msg.message.choice.c1.choice.ueCapabilityEnquiry.criticalExtensions.choice.c1.choice.ueCapabilityEnquiry_r8.ue_CapabilityRequest.list, - &rat_eutra_nr); - /* request NR configuration */ memset(&r8_a0, 0, sizeof(r8_a0)); diff --git a/openair2/RRC/LTE/rrc_eNB.c b/openair2/RRC/LTE/rrc_eNB.c index 8c9a727b2e..b33b324313 100644 --- a/openair2/RRC/LTE/rrc_eNB.c +++ b/openair2/RRC/LTE/rrc_eNB.c @@ -4665,6 +4665,9 @@ rrc_eNB_process_MeasurementReport( ue_context_pP->ue_context.gnb_x2_assoc_id = -1; // set when receiving X2AP_ENDC_SGNB_ADDITION_REQ_ACK if(is_en_dc_supported(ue_context_pP->ue_context.UE_Capability)) { + + AssertFatal(measResults2->measResultNeighCells!=NULL,"no measResultNeighCells, shouldn't happen!\n"); + AssertFatal(measResults2->measResultNeighCells->present==LTE_MeasResults__measResultNeighCells_PR_measResultNeighCellListNR_r15,"field is not LTE_MeasResults__measResultNeighCells_PR_measResultNeighCellListNR_r15"); /** to add gNB as Secondary node CG-ConfigInfo to be added as per 36.423 r15 **/ if(encode_CG_ConfigInfo(enc_buf,sizeof(enc_buf),ue_context_pP,&enc_size) == RRC_OK) LOG_I(RRC,"CG-ConfigInfo encoded successfully\n"); @@ -4675,7 +4678,29 @@ rrc_eNB_process_MeasurementReport( memcpy(X2AP_ENDC_SGNB_ADDITION_REQ(msg).rrc_buffer,enc_buf,enc_size); X2AP_ENDC_SGNB_ADDITION_REQ(msg).rrc_buffer_size = enc_size; X2AP_ENDC_SGNB_ADDITION_REQ(msg).target_physCellId - = measResults2->measResultNeighCells->choice.measResultListEUTRA.list.array[0]->physCellId; + = measResults2->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->pci_r15; + ue_context_pP->ue_context.measResults->measResultNeighCells->present = LTE_MeasResults__measResultNeighCells_PR_measResultNeighCellListNR_r15; + ue_context_pP->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->pci_r15 + = measResults2->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->pci_r15; + if (!ue_context_pP->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrpResult_r15) + ue_context_pP->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrpResult_r15=calloc(1,sizeof(LTE_RSRP_RangeNR_r15_t)); + if (!ue_context_pP->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrpResult_r15) + ue_context_pP->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrqResult_r15=calloc(1,sizeof(LTE_RSRQ_RangeNR_r15_t)); + *ue_context_pP->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrpResult_r15 = *measResults2->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrpResult_r15; + *ue_context_pP->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrqResult_r15 = *measResults2->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrqResult_r15; + if (measResults2->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultRS_IndexList_r15) { + if (!ue_context_pP->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultRS_IndexList_r15) { + ue_context_pP->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultRS_IndexList_r15 = calloc(1,sizeof(struct LTE_MeasResultSSB_IndexList_r15)); + memset(&ue_context_pP->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultRS_IndexList_r15,0,sizeof(struct LTE_MeasResultSSB_IndexList_r15)); + ASN_SEQUENCE_ADD(ue_context_pP->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultRS_IndexList_r15, + measResults2->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultRS_IndexList_r15->list.array[0]); + } + else { + ue_context_pP->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultRS_IndexList_r15->list.array[0]->ssb_Index_r15 = + measResults2->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultRS_IndexList_r15->list.array[0]->ssb_Index_r15; + } + } + //For the moment we have a single E-RAB which will be the one to be added to the gNB //Not sure how to select bearers to be added if there are multiple. X2AP_ENDC_SGNB_ADDITION_REQ(msg).nb_e_rabs_tobeadded = 1; @@ -7657,7 +7682,204 @@ rrc_eNB_decode_ccch( return rval; } +#define NCE nonCriticalExtension + +static void +get_ue_Category( + LTE_UE_EUTRA_Capability_t *c, + long *catDL, + long *catUL +) +{ + if (c != NULL) { // v8.6 + *catDL=c->ue_Category; *catUL=c->ue_Category; + struct LTE_UE_EUTRA_Capability_v920_IEs *c92=c->NCE; + if (c92 != NULL) { // v9.2 + struct LTE_UE_EUTRA_Capability_v940_IEs *c94=c92->NCE; + if (c94 != NULL) { // v9.4 + struct LTE_UE_EUTRA_Capability_v1020_IEs *c102=c94->NCE; + if (c102 != NULL) { // v10.2 + if (c102->ue_Category_v1020) {*catDL=*c102->ue_Category_v1020;*catUL=*c102->ue_Category_v1020;} + struct LTE_UE_EUTRA_Capability_v1060_IEs *c106=c102->NCE; + if (c106 != NULL) { // v10.6 + struct LTE_UE_EUTRA_Capability_v1090_IEs *c109=c106->NCE; + if (c109 != NULL) { // v10.9 + struct LTE_UE_EUTRA_Capability_v1130_IEs *c113=c109->NCE; + if (c113 != NULL) { // v11.3 + struct LTE_UE_EUTRA_Capability_v1170_IEs *c117=c113->NCE; + if (c117 != NULL) { // v11.7 + if (c117->ue_Category_v1170) {*catDL=*c117->ue_Category_v1170; + struct LTE_UE_EUTRA_Capability_v1180_IEs *c118=c117->NCE; + if (c118 != NULL) { // v11.8 + struct LTE_UE_EUTRA_Capability_v11a0_IEs *c11a=c118->NCE; + if (c11a != NULL) { // v11.a + if (c11a->ue_Category_v11a0) {*catDL=*c11a->ue_Category_v11a0;*catUL=*c11a->ue_Category_v11a0;} + struct LTE_UE_EUTRA_Capability_v1250_IEs *c125=c11a->NCE; + if (c125 != NULL) { // v12.5 + if (c125->ue_CategoryDL_r12) *catDL=*c125->ue_CategoryDL_r12; + if (c125->ue_CategoryUL_r12) *catUL=*c125->ue_CategoryUL_r12; + struct LTE_UE_EUTRA_Capability_v1260_IEs *c126=c125->NCE; + if (c126 != NULL) { // v12.6 + if (c126->ue_CategoryDL_v1260) *catDL=*c126->ue_CategoryDL_v1260; + struct LTE_UE_EUTRA_Capability_v1270_IEs *c127=c126->NCE; + if (c127 != NULL) { // v12.7 + struct LTE_UE_EUTRA_Capability_v1280_IEs *c128=c127->NCE; + if (c128 != NULL) { // v12.8 + struct LTE_UE_EUTRA_Capability_v1310_IEs *c131=c128->NCE; + if (c131 != NULL) { // v13.1 + if (c131->ue_CategoryDL_v1310 && *c131->ue_CategoryDL_v1310 == 0) *catDL=17; + if (c131->ue_CategoryDL_v1310 && *c131->ue_CategoryDL_v1310 == 1) *catDL=-1; + if (c131->ue_CategoryUL_v1310 && *c131->ue_CategoryUL_v1310 == 0) *catUL=14; + if (c131->ue_CategoryUL_v1310 && *c131->ue_CategoryUL_v1310 == 1) *catUL=-1; + struct LTE_UE_EUTRA_Capability_v1320_IEs *c132=c131->NCE; + if (c132 != NULL) { //v13.2 + struct LTE_UE_EUTRA_Capability_v1330_IEs *c133=c132->NCE; + if (c133 != NULL) { // v13.3 + if (c133->ue_CategoryDL_v1330) *catDL=*c133->ue_CategoryDL_v1330; + struct LTE_UE_EUTRA_Capability_v1340_IEs *c134=c133->NCE; + if (c134 != NULL) { // v13.4 + if (c134->ue_CategoryUL_v1340) *catUL=*c134->ue_CategoryUL_v1340; + struct LTE_UE_EUTRA_Capability_v1350_IEs *c135=c134->NCE; + if (c135 != NULL) { // v13.5 + if (c135->ue_CategoryDL_v1350) *catDL=99; // Cat 1Bis + if (c135->ue_CategoryUL_v1350) *catUL=99; // Cat 1Bis + struct LTE_UE_EUTRA_Capability_v1360_IEs *c136=c135->NCE; + if (c136 != NULL) { // v13.6 + struct LTE_UE_EUTRA_Capability_v1430_IEs *c143=c136->NCE; + if (c143 != NULL) { // v14.3 + if (c143->ue_CategoryDL_v1430 && *c143->ue_CategoryDL_v1430 == LTE_UE_EUTRA_Capability_v1430_IEs__ue_CategoryDL_v1430_m2) *catDL=-2; + if (c143->ue_CategoryUL_v1430 && *c143->ue_CategoryUL_v1430 == LTE_UE_EUTRA_Capability_v1430_IEs__ue_CategoryDL_v1430_m2) *catUL=-2; + if (c143->ue_CategoryUL_v1430) *catUL=16+*c143->ue_CategoryDL_v1430; + if (c143->ue_CategoryUL_v1430b)*catUL=21; + struct LTE_UE_EUTRA_Capability_v1440_IEs *c144=c143->NCE; + if (c144 != NULL) { // v14.4 + struct LTE_UE_EUTRA_Capability_v1450_IEs *c145=c144->NCE; + if (c145 != NULL) { // v14.5 + if (c145->ue_CategoryDL_v1450) *catDL=*c145->ue_CategoryDL_v1450; + struct LTE_UE_EUTRA_Capability_v1460_IEs *c146=c145->NCE; + if (c146 != NULL) { // v14.6 + if (c146->ue_CategoryDL_v1460) *catDL=*c146->ue_CategoryDL_v1460; + struct LTE_UE_EUTRA_Capability_v1510_IEs *c151=c146->NCE; + if (c151 != NULL) { // v15.1 + struct LTE_UE_EUTRA_Capability_v1520_IEs *c152=c151->NCE; + if (c152 != NULL) { // v15.20 + struct LTE_UE_EUTRA_Capability_v1530_IEs *c153=c152->NCE; + if (c153 != NULL) { // v15.30 + if (c153->ue_CategoryDL_v1530) *catDL=*c153->ue_CategoryDL_v1530; + if (c153->ue_CategoryUL_v1530) *catUL=*c153->ue_CategoryUL_v1530; + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } +} + +static int +is_ul_64QAM_supported( + LTE_UE_EUTRA_Capability_t *c +) //----------------------------------------------------------------------------- +{ + return c != NULL // R8 + && c->NCE != NULL // R92 + && c->NCE->NCE != NULL // R94 + && c->NCE->NCE->NCE != NULL // R102 + && c->NCE->NCE->NCE->NCE != NULL // R106 + && c->NCE->NCE->NCE->NCE->NCE != NULL // R109 + && c->NCE->NCE->NCE->NCE->NCE->NCE != NULL // R113 + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL // R117 + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL // R118 + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL // R11a + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL // R125 + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->rf_Parameters_v1250 != NULL + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->rf_Parameters_v1250->supportedBandListEUTRA_v1250 != NULL + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->rf_Parameters_v1250->supportedBandListEUTRA_v1250->list.array != NULL + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->rf_Parameters_v1250->supportedBandListEUTRA_v1250->list.array[0]->ul_64QAM_r12 != NULL + && *c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->rf_Parameters_v1250->supportedBandListEUTRA_v1250->list.array[0]->ul_64QAM_r12==LTE_SupportedBandEUTRA_v1250__ul_64QAM_r12_supported; +} + +static int +is_dl_256QAM_supported( + LTE_UE_EUTRA_Capability_t *c +) +//----------------------------------------------------------------------------- +{ + return c != NULL // R8 + && c->NCE != NULL // R92 + && c->NCE->NCE != NULL // R94 + && c->NCE->NCE->NCE != NULL // R102 + && c->NCE->NCE->NCE->NCE != NULL // R106 + && c->NCE->NCE->NCE->NCE->NCE != NULL // R109 + && c->NCE->NCE->NCE->NCE->NCE->NCE != NULL // R113 + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL // R117 + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL // R118 + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL // R11a + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL // R125 + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->rf_Parameters_v1250->supportedBandListEUTRA_v1250 != NULL + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->rf_Parameters_v1250->supportedBandListEUTRA_v1250->list.array != NULL + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->rf_Parameters_v1250->supportedBandListEUTRA_v1250->list.array[0]->dl_256QAM_r12 != NULL + && *c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->rf_Parameters_v1250->supportedBandListEUTRA_v1250->list.array[0]->dl_256QAM_r12==LTE_SupportedBandEUTRA_v1250__dl_256QAM_r12_supported; + +} +static int +is_ul_256QAM_supported( + LTE_UE_EUTRA_Capability_t *c +) +//----------------------------------------------------------------------------- +{ + return c != NULL // R8 + && c->NCE != NULL // R92 + && c->NCE->NCE != NULL // R94 + && c->NCE->NCE->NCE != NULL // R102 + && c->NCE->NCE->NCE->NCE != NULL // R106 + && c->NCE->NCE->NCE->NCE->NCE != NULL // R109 + && c->NCE->NCE->NCE->NCE->NCE->NCE != NULL // R113 + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL // R117 + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL // R118 + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL // R11a + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL // R125 + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL // R126 + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL // 127 + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL // 128 + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL //131 + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL //132 + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL //133 + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL //134 + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL //135 + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL //136 + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL //143 + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->rf_Parameters_v1430 != NULL + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->rf_Parameters_v1430->supportedBandCombination_v1430 != NULL + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->rf_Parameters_v1430->supportedBandCombination_v1430->list.array != NULL + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->rf_Parameters_v1430->supportedBandCombination_v1430->list.array[0]->bandParameterList_v1430 != NULL + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->rf_Parameters_v1430->supportedBandCombination_v1430->list.array[0]->bandParameterList_v1430->list.array != NULL + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->rf_Parameters_v1430->supportedBandCombination_v1430->list.array[0]->bandParameterList_v1430->list.array[0]->ul_256QAM_r14!=NULL + && *c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->rf_Parameters_v1430->supportedBandCombination_v1430->list.array[0]->bandParameterList_v1430->list.array[0]->ul_256QAM_r14==LTE_BandParameters_v1430__ul_256QAM_r14_supported; +} + static int is_en_dc_supported( LTE_UE_EUTRA_Capability_t *c @@ -7667,32 +7889,31 @@ is_en_dc_supported( /* to be refined - check that the eNB is connected to a gNB, check that * the bands supported by the UE include the band of the gNB */ -#define NCE nonCriticalExtension - return c != NULL - && c->NCE != NULL - && c->NCE->NCE != NULL - && c->NCE->NCE->NCE != NULL - && c->NCE->NCE->NCE->NCE != NULL - && c->NCE->NCE->NCE->NCE->NCE != NULL - && c->NCE->NCE->NCE->NCE->NCE->NCE != NULL - && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL - && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL - && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL - && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL - && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL - && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL - && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL - && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL - && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL - && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL - && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL - && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL - && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL - && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL - && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL - && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL - && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL - && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL + return c != NULL // R8 + && c->NCE != NULL // R92 + && c->NCE->NCE != NULL // R94 + && c->NCE->NCE->NCE != NULL // R102 + && c->NCE->NCE->NCE->NCE != NULL // R106 + && c->NCE->NCE->NCE->NCE->NCE != NULL // R109 + && c->NCE->NCE->NCE->NCE->NCE->NCE != NULL // R113 + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL // R117 + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL // R118 + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL // R11a + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL // R125 + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL // R126 + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL // 127 + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL // 128 + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL //131 + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL //132 + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL //133 + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL //134 + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL //135 + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL //136 + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL //143 + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL //144 + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL //145 + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL //146 + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL //151 && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->irat_ParametersNR_r15 != NULL && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->irat_ParametersNR_r15->en_DC_r15 != NULL && *c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->irat_ParametersNR_r15->en_DC_r15 == @@ -8853,10 +9074,6 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) { struct rrc_eNB_ue_context_s *ue_to_be_removed[NUMBER_OF_UE_MAX]; int removed_ue_count = 0; int cur_ue; -#ifdef LOCALIZATION - double estimated_distance = 0; - protocol_ctxt_t ctxt; -#endif MessageDef *msg; VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_RX_TX, VCD_FUNCTION_IN); @@ -8868,22 +9085,51 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) { } // check for UL failure or for UE to be released + FILE *fd; + if ((ctxt_pP->frame&127) == 0 && ctxt_pP->subframe ==0) + fd=fopen("RRC_stats.log","w+"); + RB_FOREACH(ue_context_p, rrc_ue_tree_s, &(RC.rrc[ctxt_pP->module_id]->rrc_ue_head)) { ctxt_pP->rnti = ue_context_p->ue_id_rnti; - if ((ctxt_pP->frame == 0) && (ctxt_pP->subframe == 0)) { - if (ue_context_p->ue_context.Initialue_identity_s_TMSI.presence == TRUE) { - LOG_I(RRC, "UE rnti %x: S-TMSI %x failure timer %d/8\n", - ue_context_p->ue_context.rnti, - ue_context_p->ue_context.Initialue_identity_s_TMSI.m_tmsi, - ue_context_p->ue_context.ul_failure_timer); - } else { - LOG_I(RRC, "UE rnti %x failure timer %d/8\n", - ue_context_p->ue_context.rnti, - ue_context_p->ue_context.ul_failure_timer); + if ((ctxt_pP->frame&127) == 0 && ctxt_pP->subframe ==0) { + if (fd) { + if (ue_context_p->ue_context.Initialue_identity_s_TMSI.presence == TRUE) { + fprintf(fd,"RRC UE rnti %x: S-TMSI %x failure timer %d/8\n", + ue_context_p->ue_context.rnti, + ue_context_p->ue_context.Initialue_identity_s_TMSI.m_tmsi, + ue_context_p->ue_context.ul_failure_timer); + } else { + fprintf(fd,"RRC UE rnti %x failure timer %d/8\n", + ue_context_p->ue_context.rnti, + ue_context_p->ue_context.ul_failure_timer); + } + + if (ue_context_p->ue_context.UE_Capability) { + long catDL,catUL; + get_ue_Category(ue_context_p->ue_context.UE_Capability,&catDL,&catUL); + fprintf(fd,"RRC UE cap: CatDL %ld, CatUL %ld, 64QAM UL %s, 256 QAM DL %s, 256 QAM UL %s, ENDC %s,\n", + catDL,catUL, + is_ul_64QAM_supported(ue_context_p->ue_context.UE_Capability) == 1 ? "yes" : "no", + is_dl_256QAM_supported(ue_context_p->ue_context.UE_Capability) == 1 ? "yes" : "no", + is_ul_256QAM_supported(ue_context_p->ue_context.UE_Capability) == 1 ? "yes" : "no", + is_en_dc_supported(ue_context_p->ue_context.UE_Capability) == 1 ? "yes" : "no"); + } + fprintf(fd, "RRC PCell RSRP %ld, RSRQ %ld\n", ue_context_p->ue_context.measResults->measResultPCell.rsrpResult-140, + ue_context_p->ue_context.measResults->measResultPCell.rsrqResult/2 - 20); + if (ue_context_p->ue_context.measResults->measResultNeighCells && + ue_context_p->ue_context.measResults->measResultNeighCells->present == LTE_MeasResults__measResultNeighCells_PR_measResultNeighCellListNR_r15) { + + fprintf(fd,"NR_pci %ld\n",ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->pci_r15); + if(ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrpResult_r15) + fprintf(fd,"NR_rsrp %ld\n",*ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrpResult_r15-140); + if (ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrqResult_r15) + fprintf(fd,"NR_rsrq %ld\n",*ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrqResult_r15/2 - 20); + if (ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultRS_IndexList_r15) + fprintf(fd,"NR_ssb_index %ld\n",ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultRS_IndexList_r15->list.array[0]->ssb_Index_r15); + } } } - if (ue_context_p->ue_context.ul_failure_timer > 0) { ue_context_p->ue_context.ul_failure_timer++; @@ -9075,31 +9321,6 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) { } } -#ifdef RRC_LOCALIZATION - /* for the localization, only primary CC_id might be relevant*/ - gettimeofday(&ts, NULL); - current_timestamp_ms = ts.tv_sec * 1000 + ts.tv_usec / 1000; - ref_timestamp_ms = RC.rrc[ctxt_pP->module_id]->reference_timestamp_ms; - RB_FOREACH(ue_context_p, rrc_ue_tree_s, &(RC.rrc[ctxt_pP->module_id]->rrc_ue_head)) { - ctxt = *ctxt_pP; - ctxt.rnti = ue_context_p->ue_context.rnti; - estimated_distance = rrc_get_estimated_ue_distance(&ctxt, CC_id, RC.rrc[ctxt_pP->module_id]->loc_type); - - if ((current_timestamp_ms - ref_timestamp_ms > RC.rrc[ctxt_pP->module_id]->aggregation_period_ms) && - estimated_distance != -1) { - LOG_D(LOCALIZE, "RRC [UE/id %d -> eNB/id %d] timestamp %d frame %d estimated r = %f\n", - ctxt.rnti, - ctxt_pP->module_id, - current_timestamp_ms, - ctxt_pP->frame, - estimated_distance); - LOG_D(LOCALIZE, "RRC status %d\n", - ue_context_p->ue_context.Status); - push_front(&RC.rrc[ctxt_pP->module_id]->loc_list, estimated_distance); - RC.rrc[ctxt_pP->module_id]->reference_timestamp_ms = current_timestamp_ms; - } // end if - } // end RB_FOREACH -#endif (void)ts; /* remove gcc warning "unused variable" */ (void)ref_timestamp_ms; /* remove gcc warning "unused variable" */ (void)current_timestamp_ms; /* remove gcc warning "unused variable" */ From 1b23148ea2915f2daa94c90673d541c79c5fb2eb Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Mon, 18 Jan 2021 12:08:24 +0100 Subject: [PATCH 034/579] bugfix in RRC stats file creation --- openair1/PHY/LTE_TRANSPORT/pbch.c | 1 + openair2/RRC/LTE/rrc_eNB.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/openair1/PHY/LTE_TRANSPORT/pbch.c b/openair1/PHY/LTE_TRANSPORT/pbch.c index dfa990269e..8e9a968827 100644 --- a/openair1/PHY/LTE_TRANSPORT/pbch.c +++ b/openair1/PHY/LTE_TRANSPORT/pbch.c @@ -72,6 +72,7 @@ int allocate_pbch_REs_in_RB(LTE_DL_FRAME_PARMS *frame_parms, first_re=0; last_re=12; + for (re=first_re; reframe&127) == 0 && ctxt_pP->subframe ==0) fd=fopen("RRC_stats.log","w+"); From 241726e34351e7f3ce07cec2be221ff8d91095f2 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Tue, 19 Jan 2021 14:14:57 +0100 Subject: [PATCH 035/579] minor changes for logging --- openair1/SCHED/phy_procedures_lte_eNb.c | 8 +++---- openair2/LAYER2/MAC/main.c | 2 +- openair2/RRC/LTE/rrc_eNB.c | 29 +++++++++++++++---------- targets/RT/USER/lte-enb.c | 5 ++--- 4 files changed, 24 insertions(+), 20 deletions(-) diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c index 3b18f6cdce..0b9dffad16 100644 --- a/openair1/SCHED/phy_procedures_lte_eNb.c +++ b/openair1/SCHED/phy_procedures_lte_eNb.c @@ -2172,16 +2172,16 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) { // clear unused statistics after 2 seconds for (int i=0;iulsch_stats[i].frame <= frame) { - if ((eNB->ulsch_stats[i].frame + 200) < frame) eNB->ulsch_stats[i].rnti = 0; + if ((eNB->ulsch_stats[i].frame + 200) < frame) memset(&eNB->ulsch_stats[i],0,sizeof(eNB->ulsch_stats[i])); } else { - if (eNB->ulsch_stats[i].frame + 200 < (frame+1024)) eNB->ulsch_stats[i].rnti = 0; + if (eNB->ulsch_stats[i].frame + 200 < (frame+1024)) memset(&eNB->ulsch_stats[i],0,sizeof(eNB->ulsch_stats[i])); } if (eNB->uci_stats[i].frame <= frame) { - if ((eNB->uci_stats[i].frame + 200) < frame) eNB->uci_stats[i].rnti = 0; + if ((eNB->uci_stats[i].frame + 200) < frame) memset(&eNB->uci_stats[i],0,sizeof(eNB->uci_stats[i])); } else { - if (eNB->uci_stats[i].frame + 200 < (frame+1024)) eNB->uci_stats[i].rnti = 0; + if (eNB->uci_stats[i].frame + 200 < (frame+1024)) memset(&eNB->uci_stats[i],0,sizeof(eNB->uci_stats[i])); } } diff --git a/openair2/LAYER2/MAC/main.c b/openair2/LAYER2/MAC/main.c index 86f2bf0af1..dde51bfe31 100644 --- a/openair2/LAYER2/MAC/main.c +++ b/openair2/LAYER2/MAC/main.c @@ -61,7 +61,7 @@ void *mac_stats_thread(void *param) { int CC_id = UE_PCCID(mac->Mod_id, UE_id); UE_sched_ctrl_t *UE_scheduling_control = &(UE_info->UE_sched_ctrl[UE_id]); - fprintf(fd,"UE rnti %x : %s, PHR %d dB DL CQI %d PUSCH SNR %d (TPC accum %d) PUCCH SNR %d (TPC accum %d)\n", + fprintf(fd,"\nMAC UE rnti %x : %s, PHR %d dB DL CQI %d PUSCH SNR %d (TPC accum %d) PUCCH SNR %d (TPC accum %d)\n", rnti, UE_scheduling_control->ul_out_of_sync == 0 ? "in synch" : "out of sync", UE_info->UE_template[CC_id][UE_id].phr_info, diff --git a/openair2/RRC/LTE/rrc_eNB.c b/openair2/RRC/LTE/rrc_eNB.c index da21dc8329..c01901982d 100644 --- a/openair2/RRC/LTE/rrc_eNB.c +++ b/openair2/RRC/LTE/rrc_eNB.c @@ -7749,7 +7749,7 @@ get_ue_Category( if (c143 != NULL) { // v14.3 if (c143->ue_CategoryDL_v1430 && *c143->ue_CategoryDL_v1430 == LTE_UE_EUTRA_Capability_v1430_IEs__ue_CategoryDL_v1430_m2) *catDL=-2; if (c143->ue_CategoryUL_v1430 && *c143->ue_CategoryUL_v1430 == LTE_UE_EUTRA_Capability_v1430_IEs__ue_CategoryDL_v1430_m2) *catUL=-2; - if (c143->ue_CategoryUL_v1430) *catUL=16+*c143->ue_CategoryDL_v1430; + if (c143->ue_CategoryUL_v1430) *catUL=16+*c143->ue_CategoryUL_v1430; if (c143->ue_CategoryUL_v1430b)*catUL=21; struct LTE_UE_EUTRA_Capability_v1440_IEs *c144=c143->NCE; if (c144 != NULL) { // v14.4 @@ -9115,18 +9115,20 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) { is_ul_256QAM_supported(ue_context_p->ue_context.UE_Capability) == 1 ? "yes" : "no", is_en_dc_supported(ue_context_p->ue_context.UE_Capability) == 1 ? "yes" : "no"); } - fprintf(fd, "RRC PCell RSRP %ld, RSRQ %ld\n", ue_context_p->ue_context.measResults->measResultPCell.rsrpResult-140, - ue_context_p->ue_context.measResults->measResultPCell.rsrqResult/2 - 20); - if (ue_context_p->ue_context.measResults->measResultNeighCells && - ue_context_p->ue_context.measResults->measResultNeighCells->present == LTE_MeasResults__measResultNeighCells_PR_measResultNeighCellListNR_r15) { + if (ue_context_p->ue_context.measResults) { + fprintf(fd, "RRC PCell RSRP %ld, RSRQ %ld\n", ue_context_p->ue_context.measResults->measResultPCell.rsrpResult-140, + ue_context_p->ue_context.measResults->measResultPCell.rsrqResult/2 - 20); + if (ue_context_p->ue_context.measResults->measResultNeighCells && + ue_context_p->ue_context.measResults->measResultNeighCells->present == LTE_MeasResults__measResultNeighCells_PR_measResultNeighCellListNR_r15) { - fprintf(fd,"NR_pci %ld\n",ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->pci_r15); - if(ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrpResult_r15) - fprintf(fd,"NR_rsrp %ld\n",*ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrpResult_r15-140); - if (ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrqResult_r15) - fprintf(fd,"NR_rsrq %ld\n",*ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrqResult_r15/2 - 20); - if (ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultRS_IndexList_r15) - fprintf(fd,"NR_ssb_index %ld\n",ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultRS_IndexList_r15->list.array[0]->ssb_Index_r15); + fprintf(fd,"NR_pci %ld\n",ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->pci_r15); + if(ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrpResult_r15) + fprintf(fd,"NR_rsrp %ld\n",*ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrpResult_r15-140); + if (ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrqResult_r15) + fprintf(fd,"NR_rsrq %ld\n",*ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrqResult_r15/2 - 20); + if (ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultRS_IndexList_r15) + fprintf(fd,"NR_ssb_index %ld\n",ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultRS_IndexList_r15->list.array[0]->ssb_Index_r15); + } } } } @@ -9321,6 +9323,9 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) { } } + if (fd!=NULL) fclose(fd); + + (void)ts; /* remove gcc warning "unused variable" */ (void)ref_timestamp_ms; /* remove gcc warning "unused variable" */ (void)current_timestamp_ms; /* remove gcc warning "unused variable" */ diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c index 10e050bc5d..307b990c3b 100644 --- a/targets/RT/USER/lte-enb.c +++ b/targets/RT/USER/lte-enb.c @@ -548,12 +548,11 @@ int wakeup_tx(PHY_VARS_eNB *eNB, int frame_tx, int subframe_tx, uint64_t timestamp_tx) { - L1_rxtx_proc_t *L1_proc = &eNB->proc.L1_proc; L1_rxtx_proc_t *L1_proc_tx = &eNB->proc.L1_proc_tx; int ret; LOG_D(PHY,"ENTERED wakeup_tx (IC %d)\n",L1_proc_tx->instance_cnt); AssertFatal((ret = pthread_mutex_lock(&L1_proc_tx->mutex))==0,"mutex_lock returns %d\n",ret); - LOG_D(PHY,"L1 RX %d.%d Waiting to wake up L1 TX %d.%d (IC L1TX %d)\n",L1_proc->frame_rx,L1_proc->subframe_rx,L1_proc->frame_tx,L1_proc->subframe_tx,L1_proc_tx->instance_cnt); + LOG_D(PHY,"L1 RX %d.%d Waiting to wake up L1 TX %d.%d (IC L1TX %d)\n",frame_rx,subframe_rx,frame_tx,subframe_tx,L1_proc_tx->instance_cnt); while(L1_proc_tx->instance_cnt == 0) { pthread_cond_wait(&L1_proc_tx->cond,&L1_proc_tx->mutex); @@ -568,7 +567,7 @@ int wakeup_tx(PHY_VARS_eNB *eNB, L1_proc_tx->frame_tx = frame_tx; L1_proc_tx->timestamp_tx = timestamp_tx; // the thread can now be woken up - LOG_D(PHY,"L1 RX Waking up L1 TX %d.%d\n",L1_proc->frame_tx,L1_proc->subframe_tx); + LOG_D(PHY,"L1 RX Waking up L1 TX %d.%d\n",frame_tx,subframe_tx); AssertFatal((ret=pthread_mutex_unlock(&L1_proc_tx->mutex))==0,"mutex_unlock returns %d\n",ret); AssertFatal(pthread_cond_signal(&L1_proc_tx->cond) == 0, "ERROR pthread_cond_signal for eNB L1 thread tx\n"); From ea59a774fec5ecef47da41d65566e287c18fd16a Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Thu, 21 Jan 2021 09:31:20 +0100 Subject: [PATCH 036/579] gtwave traces --- targets/RT/USER/eNB_usrp.gtkw | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/targets/RT/USER/eNB_usrp.gtkw b/targets/RT/USER/eNB_usrp.gtkw index 074e3b1324..b407953b57 100644 --- a/targets/RT/USER/eNB_usrp.gtkw +++ b/targets/RT/USER/eNB_usrp.gtkw @@ -1,13 +1,13 @@ [*] [*] GTKWave Analyzer v3.3.66 (w)1999-2015 BSI -[*] Sun May 19 21:39:57 2019 +[*] Wed Jan 20 05:55:49 2021 [*] -[dumpfile] "/tmp/openair_dump_eNB.vcd" -[dumpfile_mtime] "Sun May 19 21:30:25 2019" -[dumpfile_size] 11590554 -[savefile] "/home/sphex/raymond/openairinterface5g/targets/RT/USER/eNB_usrp.gtkw" -[timestart] 7629910000 -[size] 1840 795 +[dumpfile] "/home/eurecom/raymond/openair_eNB_dump.vcd" +[dumpfile_mtime] "Wed Jan 20 05:52:03 2021" +[dumpfile_size] 74759060 +[savefile] "/home/eurecom/raymond/openairinterface5g_2/openairinterface5g/targets/RT/USER/eNB_usrp.gtkw" +[timestart] 32439070000 +[size] 1892 841 [pos] -1 -1 *-21.832302 7639830000 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 [sst_width] 386 @@ -22,11 +22,13 @@ variables.trx_ts[63:0] variables.trx_tst[63:0] @28 functions.eNB_thread_rxtx0 +@421 +variables.l1_proc_tx_ic[63:0] +@420 +variables.l1_proc_ic[63:0] @24 variables.frame_number_RX0_RU[63:0] -@25 variables.tti_number_RX0_RU[63:0] -@24 variables.frame_number_TX0_RU[63:0] variables.tti_number_TX0_RU[63:0] @28 From 1ed284add5f06c11e586c971c73cbef08fac377b Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Thu, 21 Jan 2021 10:03:48 +0100 Subject: [PATCH 037/579] bugfix in UECapability parsin --- openair2/RRC/LTE/rrc_eNB.c | 1 + 1 file changed, 1 insertion(+) diff --git a/openair2/RRC/LTE/rrc_eNB.c b/openair2/RRC/LTE/rrc_eNB.c index c01901982d..468fb8aa40 100644 --- a/openair2/RRC/LTE/rrc_eNB.c +++ b/openair2/RRC/LTE/rrc_eNB.c @@ -7838,6 +7838,7 @@ is_dl_256QAM_supported( && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL // R118 && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL // R11a && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE != NULL // R125 + && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->rf_Parameters_v1250 != NULL && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->rf_Parameters_v1250->supportedBandListEUTRA_v1250 != NULL && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->rf_Parameters_v1250->supportedBandListEUTRA_v1250->list.array != NULL && c->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->NCE->rf_Parameters_v1250->supportedBandListEUTRA_v1250->list.array[0]->dl_256QAM_r12 != NULL From f8aa85644f7a9c52b47a52f5c5618e88610578b4 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Thu, 21 Jan 2021 11:51:40 +0100 Subject: [PATCH 038/579] bugfix in UCI statistics --- cmake_targets/CMakeLists.txt | 2 ++ executables/nr-softmodem.c | 5 +++++ openair1/PHY/LTE_TRANSPORT/pucch.c | 5 +++-- openair2/GNB_APP/gnb_config.c | 1 + openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c | 2 +- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 2 +- openair2/RRC/NR/rrc_gNB.c | 2 +- openair2/RRC/NR/rrc_gNB_NGAP.c | 2 +- 8 files changed, 15 insertions(+), 6 deletions(-) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index f390cc8109..73d9c68242 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -3066,6 +3066,8 @@ add_executable(nr-softmodem ${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c ${OPENAIR_DIR}/common/utils/utils.c ${OPENAIR_DIR}/common/utils/system.c + ${OPENAIR_DIR}/common/utils/lte/ue_power.c + ${OPENAIR_DIR}/common/utils/lte/prach_utils.c ${OPENAIR_DIR}/common/utils/nr/nr_common.c ${GTPU_need_ITTI} ${XFORMSINTERFACE_SOURCE} diff --git a/executables/nr-softmodem.c b/executables/nr-softmodem.c index fb757a9f47..d7e821dfcb 100644 --- a/executables/nr-softmodem.c +++ b/executables/nr-softmodem.c @@ -167,10 +167,15 @@ uint32_t target_ul_mcs = 20; uint32_t timing_advance = 0; uint64_t num_missed_slots=0; // counter for the number of missed slots +#include int split73=0; void sendFs6Ul(PHY_VARS_eNB *eNB, int UE_id, int harq_pid, int segmentID, int16_t *data, int dataLen, int r_offset) { AssertFatal(false, "Must not be called in this context\n"); } +void sendFs6Ulharq(enum pckType type, int UEid, PHY_VARS_eNB *eNB, LTE_eNB_UCI *uci, int frame, int subframe, uint8_t *harq_ack, uint8_t tdd_mapping_mode, uint16_t tdd_multiplexing_mask, uint16_t rnti, int32_t stat) { + AssertFatal(false, "Must not be called in this context\n"); +} + extern void reset_opp_meas(void); extern void print_opp_meas(void); diff --git a/openair1/PHY/LTE_TRANSPORT/pucch.c b/openair1/PHY/LTE_TRANSPORT/pucch.c index 9418ace334..eb70e6f991 100644 --- a/openair1/PHY/LTE_TRANSPORT/pucch.c +++ b/openair1/PHY/LTE_TRANSPORT/pucch.c @@ -843,11 +843,12 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, if(fmt!=pucch_format3) { /* PUCCH format3 */ eNB_UCI_STATS_t *first_uci_stats=NULL; + LOG_I(PHY,"Getting UCI stats, UCI_id %d\n",UCI_id); for (int i=0;iuci_stats[i].rnti == eNB->ulsch[UCI_id]->rnti) { + if (eNB->uci_stats[i].rnti == eNB->uci_vars[UCI_id].rnti) { uci_stats = &eNB->uci_stats[i]; break; - } else if (eNB->uci_stats[i].rnti == 0) first_uci_stats = &eNB->uci_stats[i]; + } else if (first_uci_stats == NULL && eNB->uci_stats[i].rnti == 0) first_uci_stats = &eNB->uci_stats[i]; if (uci_stats == NULL) { uci_stats=first_uci_stats; uci_stats->rnti = eNB->ulsch[UCI_id]->rnti;} diff --git a/openair2/GNB_APP/gnb_config.c b/openair2/GNB_APP/gnb_config.c index 9e7048247b..ee03ce7dbf 100644 --- a/openair2/GNB_APP/gnb_config.c +++ b/openair2/GNB_APP/gnb_config.c @@ -35,6 +35,7 @@ #include "assertions.h" #include "gnb_config.h" #include "gnb_paramdef.h" +#include "enb_paramdef.h" #include "UTIL/OTG/otg.h" #include "UTIL/OTG/otg_externs.h" #include "intertask_interface.h" diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index 2b90551e78..b269002012 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -647,7 +647,7 @@ void nr_schedule_ue_spec(module_id_t module_id, retInfo->numDmrsCdmGrpsNoData); /* we do not have to do anything, since we do not require to get data * from RLC, encode MAC CEs, or copy data to FAPI structures */ - LOG_W(MAC, + LOG_D(MAC, "%d.%2d DL retransmission UE %d/RNTI %04x HARQ PID %d round %d NDI %d\n", frame, slot, diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 75b00ea6ba..bfd1587ffe 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -627,7 +627,7 @@ void nr_schedule_ulsch(module_id_t module_id, if (cur_harq->round == 0) { UE_info->mac_stats[UE_id].ulsch_total_bytes_scheduled += sched_pusch->tb_size; } else { - LOG_W(MAC, + LOG_D(MAC, "%d.%2d UL retransmission RNTI %04x sched %d.%2d HARQ PID %d round %d NDI %d\n", frame, slot, diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index 9bc95b216b..d796eff239 100644 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -472,7 +472,7 @@ rrc_gNB_process_RRCSetupComplete( LOG_I(NR_RRC, PROTOCOL_NR_RRC_CTXT_UE_FMT" [RAPROC] Logical Channel UL-DCCH, " "processing NR_RRCSetupComplete from UE (SRB1 Active)\n", PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP)); ue_context_pP->ue_context.Srb1.Active = 1; - ue_context_pP->ue_context.Status = NR_RRC_CONNECTED; + ue_context_pP->ue_context.status = NR_RRC_CONNECTED; if (AMF_MODE_ENABLED) { rrc_gNB_send_NGAP_NAS_FIRST_REQ(ctxt_pP, ue_context_pP, rrcSetupComplete); diff --git a/openair2/RRC/NR/rrc_gNB_NGAP.c b/openair2/RRC/NR/rrc_gNB_NGAP.c index 1d0cfef89c..11207e2e63 100644 --- a/openair2/RRC/NR/rrc_gNB_NGAP.c +++ b/openair2/RRC/NR/rrc_gNB_NGAP.c @@ -372,7 +372,7 @@ rrc_gNB_process_NGAP_INITIAL_CONTEXT_SETUP_REQ( } // in case, send the S1SP initial context response if it is not sent with the attach complete message - if (ue_context_p->ue_context.Status == NR_RRC_RECONFIGURED) { + if (ue_context_p->ue_context.status == NR_RRC_RECONFIGURED) { LOG_I(NR_RRC, "Sending rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP, cause %ld\n", ue_context_p->ue_context.reestablishment_cause); rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP(&ctxt,ue_context_p); } From ed10f077cfc9f99732a89397745e3a944a6bc81b Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Thu, 21 Jan 2021 13:45:33 +0100 Subject: [PATCH 039/579] bug in uci stats handling --- openair1/PHY/LTE_TRANSPORT/pucch.c | 1 - openair1/SCHED/fapi_l1.c | 4 ++-- openair1/SCHED/phy_procedures_lte_eNb.c | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/openair1/PHY/LTE_TRANSPORT/pucch.c b/openair1/PHY/LTE_TRANSPORT/pucch.c index eb70e6f991..576cdefde6 100644 --- a/openair1/PHY/LTE_TRANSPORT/pucch.c +++ b/openair1/PHY/LTE_TRANSPORT/pucch.c @@ -843,7 +843,6 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, if(fmt!=pucch_format3) { /* PUCCH format3 */ eNB_UCI_STATS_t *first_uci_stats=NULL; - LOG_I(PHY,"Getting UCI stats, UCI_id %d\n",UCI_id); for (int i=0;iuci_stats[i].rnti == eNB->uci_vars[UCI_id].rnti) { uci_stats = &eNB->uci_stats[i]; diff --git a/openair1/SCHED/fapi_l1.c b/openair1/SCHED/fapi_l1.c index 33cc154636..2f31f08498 100644 --- a/openair1/SCHED/fapi_l1.c +++ b/openair1/SCHED/fapi_l1.c @@ -600,7 +600,7 @@ void handle_uci_sr_pdu(PHY_VARS_eNB *eNB, uci->frame = frame; uci->subframe = subframe; uci->rnti = ul_config_pdu->uci_sr_pdu.ue_information.ue_information_rel8.rnti; - uci->ue_id = find_ulsch(ul_config_pdu->uci_sr_pdu.ue_information.ue_information_rel8.rnti,eNB,SEARCH_EXIST_OR_FREE); + uci->ue_id = find_ulsch(ul_config_pdu->uci_sr_pdu.ue_information.ue_information_rel8.rnti,eNB,SEARCH_EXIST_OR_FREE); uci->type = SR; uci->pucch_fmt = pucch_format1; uci->num_antenna_ports = 1; @@ -626,7 +626,7 @@ void handle_uci_sr_harq_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request_ uci->frame = frame; uci->subframe = subframe; uci->rnti = ul_config_pdu->uci_sr_harq_pdu.ue_information.ue_information_rel8.rnti; - uci->ue_id = find_ulsch(ul_config_pdu->uci_sr_harq_pdu.ue_information.ue_information_rel8.rnti,eNB,SEARCH_EXIST_OR_FREE); + uci->ue_id = find_ulsch(ul_config_pdu->uci_sr_harq_pdu.ue_information.ue_information_rel8.rnti,eNB,SEARCH_EXIST_OR_FREE); uci->type = HARQ_SR; uci->num_antenna_ports = 1; uci->num_pucch_resources = 1; diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c index 0b9dffad16..0ccbb13ef2 100644 --- a/openair1/SCHED/phy_procedures_lte_eNb.c +++ b/openair1/SCHED/phy_procedures_lte_eNb.c @@ -854,7 +854,7 @@ uci_procedures(PHY_VARS_eNB *eNB, int pucch1_thres = (uci->ue_type == 0) ? eNB->pucch1_DTX_threshold : eNB->pucch1_DTX_threshold_emtc[0]; metric_SR = rx_pucch(eNB, uci->pucch_fmt, - uci->ue_id, + i,//uci->ue_id, uci->n_pucch_1_0_sr[0], 0, // n2_pucch uci->srs_active, // shortened format From c15f67c7f28583d0773b0c9af556720a863ff293 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Fri, 22 Jan 2021 07:26:13 +0100 Subject: [PATCH 040/579] mutex unlock after cond_signal --- targets/RT/USER/lte-enb.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c index 307b990c3b..ad1a9ac54a 100644 --- a/targets/RT/USER/lte-enb.c +++ b/targets/RT/USER/lte-enb.c @@ -363,12 +363,10 @@ static void *L1_thread_tx(void *param) { LOG_D(PHY,"L1 TX signaling done for %d.%d\n",proc->frame_tx,proc->subframe_tx); // the thread can now be woken up LOG_D(PHY,"L1_thread_tx: signaling completion in %d.%d\n",proc->frame_tx,proc->subframe_tx); + + AssertFatal((ret=pthread_cond_signal(&proc->cond))== 0, "ERROR pthread_cond_signal for eNB TXnp4 thread ret %d\n",ret); AssertFatal((ret= pthread_mutex_unlock( &proc->mutex ))==0,"error unlocking L1_proc_tx mutex, return %d\n",ret); - if (pthread_cond_signal(&proc->cond) != 0) { - LOG_E( PHY, "[eNB] ERROR pthread_cond_signal for eNB TXnp4 thread\n"); - exit_fun( "ERROR pthread_cond_signal" ); - } wakeup_txfh(eNB,proc,frame_tx,subframe_tx,timestamp_tx); } @@ -532,10 +530,11 @@ int wakeup_txfh(PHY_VARS_eNB *eNB, ru_proc->tti_tx = subframe_tx; ru_proc->frame_tx = frame_tx; LOG_D(PHY,"L1 TX Waking up TX FH (2) %d.%d\n",frame_tx,subframe_tx); - AssertFatal((ret=pthread_mutex_unlock(&ru_proc->mutex_eNBs))==0,"mutex_unlock returned %d\n",ret); // the thread can now be woken up AssertFatal(pthread_cond_signal(&ru_proc->cond_eNBs) == 0, "[eNB] ERROR pthread_cond_signal for eNB TXnp4 thread\n"); + AssertFatal((ret=pthread_mutex_unlock(&ru_proc->mutex_eNBs))==0,"mutex_unlock returned %d\n",ret); + } return(0); @@ -568,9 +567,10 @@ int wakeup_tx(PHY_VARS_eNB *eNB, L1_proc_tx->timestamp_tx = timestamp_tx; // the thread can now be woken up LOG_D(PHY,"L1 RX Waking up L1 TX %d.%d\n",frame_tx,subframe_tx); - AssertFatal((ret=pthread_mutex_unlock(&L1_proc_tx->mutex))==0,"mutex_unlock returns %d\n",ret); AssertFatal(pthread_cond_signal(&L1_proc_tx->cond) == 0, "ERROR pthread_cond_signal for eNB L1 thread tx\n"); + AssertFatal((ret=pthread_mutex_unlock(&L1_proc_tx->mutex))==0,"mutex_unlock returns %d\n",ret); + return(0); } @@ -613,14 +613,11 @@ int wakeup_rxtx(PHY_VARS_eNB *eNB, VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_WAKEUP_RXTX_TX_RU+ru->idx, L1_proc->frame_tx); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_WAKEUP_RXTX_TX_RU+ru->idx, L1_proc->subframe_tx); - AssertFatal((ret=pthread_mutex_unlock( &L1_proc->mutex))==0,"mutex_unlock return %d\n",ret); // the thread can now be woken up - if (pthread_cond_signal(&L1_proc->cond) != 0) { - LOG_E( PHY, "[eNB] ERROR pthread_cond_signal for eNB RXn-TXnp4 thread\n"); - exit_fun( "ERROR pthread_cond_signal" ); - return(-1); - } + AssertFatal((ret=pthread_cond_signal(&L1_proc->cond))== 0, "ERROR pthread_cond_signal for eNB RXn-TXnp4 thread, ret %d\n",ret); + AssertFatal((ret=pthread_mutex_unlock( &L1_proc->mutex))==0,"mutex_unlock return %d\n",ret); + return(0); } From 5294bc4fe3add7901f733de56f767a2a832e600a Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Sat, 23 Jan 2021 15:04:11 +0100 Subject: [PATCH 041/579] warnings and unitary simulation bulding --- openair1/PHY/CODING/TESTBENCH/ldpctest.c | 5 +++-- openair1/PHY/INIT/nr_init_ue.c | 3 ++- openair1/PHY/LTE_TRANSPORT/pucch.c | 2 +- openair1/PHY/impl_defs_nr.h | 1 + openair1/SIMULATION/NR_PHY/dlsim.c | 1 + openair1/SIMULATION/NR_PHY/ulsim.c | 2 ++ openair2/RRC/LTE/MESSAGES/asn1_msg.c | 2 -- openair2/RRC/LTE/rrc_eNB.c | 4 ++-- targets/RT/USER/eNB_usrp.gtkw | 13 +++++++------ 9 files changed, 19 insertions(+), 14 deletions(-) diff --git a/openair1/PHY/CODING/TESTBENCH/ldpctest.c b/openair1/PHY/CODING/TESTBENCH/ldpctest.c index b42ac6e4c8..fb0955f045 100644 --- a/openair1/PHY/CODING/TESTBENCH/ldpctest.c +++ b/openair1/PHY/CODING/TESTBENCH/ldpctest.c @@ -28,7 +28,8 @@ #include "PHY/CODING/nrLDPC_extern.h" #include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h" #include "openair1/PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_decoder_LYC.h" -#define MAX_NUM_DLSCH_SEGMENTS 16 +#include "openair1/PHY/defs_nr_common.h" + #define MAX_BLOCK_LENGTH 8448 #ifndef malloc16 @@ -118,7 +119,7 @@ int test_ldpc(short No_iteration, opp_enabled=1; cpu_freq_GHz = get_cpu_freq_GHz(); //short test_input[block_length]; - unsigned char *test_input[MAX_NUM_DLSCH_SEGMENTS]={NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL};; + unsigned char *test_input[MAX_NUM_NR_DLSCH_SEGMENTS]={NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL};; //short *c; //padded codeword unsigned char *estimated_output[MAX_NUM_DLSCH_SEGMENTS]; unsigned char *estimated_output_bit[MAX_NUM_DLSCH_SEGMENTS]; diff --git a/openair1/PHY/INIT/nr_init_ue.c b/openair1/PHY/INIT/nr_init_ue.c index ff1b00e65e..5371640751 100644 --- a/openair1/PHY/INIT/nr_init_ue.c +++ b/openair1/PHY/INIT/nr_init_ue.c @@ -28,6 +28,7 @@ #include "TDD-Config.h" #include "MBSFN-SubframeConfigList.h"*/ #include "openair1/PHY/defs_RU.h" +#include "openair1/PHY/impl_defs_nr.h" #include "common/utils/LOG/vcd_signal_dumper.h" #include "assertions.h" #include @@ -505,7 +506,7 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, } for (i=0;iPDSCH_Config.pdsch_TimeDomainResourceAllocation[i] = (NR_PDSCH_TimeDomainResourceAllocation_t *)malloc16(sizeof(NR_PDSCH_TimeDomainResourceAllocation_t)); + ue->PDSCH_Config.pdsch_TimeDomainResourceAllocation[i] = (PDSCH_TimeDomainResourceAllocation_t *)malloc16(sizeof(PDSCH_TimeDomainResourceAllocation_t)); ue->PDSCH_Config.pdsch_TimeDomainResourceAllocation[i]->mappingType = typeA; } diff --git a/openair1/PHY/LTE_TRANSPORT/pucch.c b/openair1/PHY/LTE_TRANSPORT/pucch.c index 576cdefde6..f2fa77ecad 100644 --- a/openair1/PHY/LTE_TRANSPORT/pucch.c +++ b/openair1/PHY/LTE_TRANSPORT/pucch.c @@ -849,7 +849,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, break; } else if (first_uci_stats == NULL && eNB->uci_stats[i].rnti == 0) first_uci_stats = &eNB->uci_stats[i]; - if (uci_stats == NULL) { uci_stats=first_uci_stats; uci_stats->rnti = eNB->ulsch[UCI_id]->rnti;} + if (uci_stats == NULL) { uci_stats=first_uci_stats; uci_stats->rnti = eNB->uci_vars[UCI_id].rnti;} AssertFatal(uci_stats!=NULL,"No stat index found\n"); uci_stats->frame = frame; diff --git a/openair1/PHY/impl_defs_nr.h b/openair1/PHY/impl_defs_nr.h index 90193f2166..0b5893f574 100644 --- a/openair1/PHY/impl_defs_nr.h +++ b/openair1/PHY/impl_defs_nr.h @@ -455,6 +455,7 @@ typedef struct { */ maxNrofCodeWordsScheduledByDCI_t maxNrofCodeWordsScheduledByDCI; + PDSCH_TimeDomainResourceAllocation_t *pdsch_TimeDomainResourceAllocation[MAX_NR_OF_DL_ALLOCATIONS]; } PDSCH_Config_t; diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index 19dd861c56..56587b8d20 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -84,6 +84,7 @@ int sl_ahead=0; uint8_t nfapi_mode = 0; uint64_t downlink_frequency[MAX_NUM_CCs][4]; +int usrp_tx_thread = 0; // dummy functions int dummy_nr_ue_ul_indication(nr_uplink_indication_t *ul_info) { return(0); } diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c index bc29419afb..76f81564d8 100644 --- a/openair1/SIMULATION/NR_PHY/ulsim.c +++ b/openair1/SIMULATION/NR_PHY/ulsim.c @@ -141,6 +141,8 @@ double s_re1[122880],s_im1[122880],r_re1[122880],r_im1[122880]; double r_re2[122880],r_im2[122880]; double r_re3[122880],r_im3[122880]; +int usrp_tx_thread=0; + int main(int argc, char **argv) { char c; diff --git a/openair2/RRC/LTE/MESSAGES/asn1_msg.c b/openair2/RRC/LTE/MESSAGES/asn1_msg.c index 2259fcb21e..2eddd08390 100644 --- a/openair2/RRC/LTE/MESSAGES/asn1_msg.c +++ b/openair2/RRC/LTE/MESSAGES/asn1_msg.c @@ -3220,8 +3220,6 @@ uint8_t do_UECapabilityEnquiry( const protocol_ctxt_t *const ctxt_pP, dl_dcch_msg.message.choice.c1.choice.ueCapabilityEnquiry.criticalExtensions.choice.c1.choice.ueCapabilityEnquiry_r8.ue_CapabilityRequest.list.count=0; ASN_SEQUENCE_ADD(&dl_dcch_msg.message.choice.c1.choice.ueCapabilityEnquiry.criticalExtensions.choice.c1.choice.ueCapabilityEnquiry_r8.ue_CapabilityRequest.list, &rat); - LTE_RAT_Type_t rat_nr=LTE_RAT_Type_nr; - LTE_RAT_Type_t rat_eutra_nr=LTE_RAT_Type_eutra_nr; LTE_UECapabilityEnquiry_r8_IEs_t *r8 = &dl_dcch_msg.message.choice.c1.choice.ueCapabilityEnquiry.criticalExtensions.choice.c1.choice.ueCapabilityEnquiry_r8; LTE_UECapabilityEnquiry_v8a0_IEs_t r8_a0; LTE_UECapabilityEnquiry_v1180_IEs_t r11_80; diff --git a/openair2/RRC/LTE/rrc_eNB.c b/openair2/RRC/LTE/rrc_eNB.c index 468fb8aa40..0b1dd399cf 100644 --- a/openair2/RRC/LTE/rrc_eNB.c +++ b/openair2/RRC/LTE/rrc_eNB.c @@ -1283,7 +1283,7 @@ rrc_eNB_generate_UECapabilityEnquiry( T(T_ENB_RRC_UE_CAPABILITY_ENQUIRY, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti)); int16_t eutra_band = RC.rrc[ctxt_pP->module_id]->configuration.eutra_band[0]; - uint32_t nr_band = RC.rrc[ctxt_pP->module_id]->nr_neigh_freq_band[0][0]; + uint32_t nr_band = 78;//RC.rrc[ctxt_pP->module_id]->nr_neigh_freq_band[0][0]; size = do_UECapabilityEnquiry( ctxt_pP, buffer, @@ -1333,7 +1333,7 @@ rrc_eNB_generate_NR_UECapabilityEnquiry( T(T_ENB_RRC_UE_CAPABILITY_ENQUIRY, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti)); int16_t eutra_band = RC.rrc[ctxt_pP->module_id]->configuration.eutra_band[0]; - uint32_t nr_band = RC.rrc[ctxt_pP->module_id]->nr_neigh_freq_band[0][0]; + uint32_t nr_band = 78;//RC.rrc[ctxt_pP->module_id]->nr_neigh_freq_band[0][0]; size = do_NR_UECapabilityEnquiry( ctxt_pP, buffer, diff --git a/targets/RT/USER/eNB_usrp.gtkw b/targets/RT/USER/eNB_usrp.gtkw index b407953b57..bb2f5f8973 100644 --- a/targets/RT/USER/eNB_usrp.gtkw +++ b/targets/RT/USER/eNB_usrp.gtkw @@ -1,12 +1,12 @@ [*] [*] GTKWave Analyzer v3.3.66 (w)1999-2015 BSI -[*] Wed Jan 20 05:55:49 2021 +[*] Thu Jan 21 13:54:47 2021 [*] [dumpfile] "/home/eurecom/raymond/openair_eNB_dump.vcd" -[dumpfile_mtime] "Wed Jan 20 05:52:03 2021" -[dumpfile_size] 74759060 +[dumpfile_mtime] "Thu Jan 21 13:51:28 2021" +[dumpfile_size] 335122 [savefile] "/home/eurecom/raymond/openairinterface5g_2/openairinterface5g/targets/RT/USER/eNB_usrp.gtkw" -[timestart] 32439070000 +[timestart] 11468800000 [size] 1892 841 [pos] -1 -1 *-21.832302 7639830000 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 @@ -20,11 +20,12 @@ functions.trx_write @24 variables.trx_ts[63:0] variables.trx_tst[63:0] +@25 +variables.trx_write_flags[63:0] @28 functions.eNB_thread_rxtx0 -@421 -variables.l1_proc_tx_ic[63:0] @420 +variables.l1_proc_tx_ic[63:0] variables.l1_proc_ic[63:0] @24 variables.frame_number_RX0_RU[63:0] From e82ef88e72c99bedc650a93c57af3f75934c8b62 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Sun, 24 Jan 2021 13:27:10 +0100 Subject: [PATCH 042/579] builds are succesful (eNB,UE,gNB,nrUE,physim) --- cmake_targets/CMakeLists.txt | 3 - openair2/RRC/NR_UE/rrc_UE.c | 4 +- targets/RT/USER/lte-softmodem.h | 2 - targets/RT/USER/lte-ue.c | 18 +- targets/RT/USER/lte-uesoftmodem.c | 18 +- targets/RT/USER/rfsim.c | 490 ------------------------------ 6 files changed, 9 insertions(+), 526 deletions(-) delete mode 100644 targets/RT/USER/rfsim.c diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index e9abb9bf67..a1c73024be 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -3004,9 +3004,6 @@ add_executable(lte-uesoftmodem ${OPENAIR_TARGETS}/RT/USER/lte-ue.c ${OPENAIR_TARGETS}/RT/USER/lte-uesoftmodem.c ${OPENAIR_DIR}/executables/softmodem-common.c - ${OPENAIR_TARGETS}/RT/USER/lte-ru.c - ${OPENAIR_TARGETS}/RT/USER/ru_control.c - ${OPENAIR_TARGETS}/RT/USER/rfsim.c ${OPENAIR_TARGETS}/COMMON/create_tasks_ue.c ${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c ${OPENAIR_TARGETS}/ARCH/COMMON/record_player.c diff --git a/openair2/RRC/NR_UE/rrc_UE.c b/openair2/RRC/NR_UE/rrc_UE.c index 093ecdf788..4efaa624b5 100755 --- a/openair2/RRC/NR_UE/rrc_UE.c +++ b/openair2/RRC/NR_UE/rrc_UE.c @@ -1831,7 +1831,7 @@ nr_rrc_ue_establish_srb1( { // add descriptor from RRC PDU NR_UE_rrc_inst[ue_mod_idP].Srb1[gNB_index].Active = 1; - NR_UE_rrc_inst[ue_mod_idP].Srb1[gNB_index].Status = RADIO_CONFIG_OK;//RADIO CFG + NR_UE_rrc_inst[ue_mod_idP].Srb1[gNB_index].status = RADIO_CONFIG_OK;//RADIO CFG NR_UE_rrc_inst[ue_mod_idP].Srb1[gNB_index].Srb_info.Srb_id = 1; LOG_I(NR_RRC, "[UE %d], CONFIG_SRB1 %d corresponding to gNB_index %d\n", ue_mod_idP, DCCH, gNB_index); return(0); @@ -1849,7 +1849,7 @@ nr_rrc_ue_establish_srb2( { // add descriptor from RRC PDU NR_UE_rrc_inst[ue_mod_idP].Srb2[gNB_index].Active = 1; - NR_UE_rrc_inst[ue_mod_idP].Srb2[gNB_index].Status = RADIO_CONFIG_OK;//RADIO CFG + NR_UE_rrc_inst[ue_mod_idP].Srb2[gNB_index].status = RADIO_CONFIG_OK;//RADIO CFG NR_UE_rrc_inst[ue_mod_idP].Srb2[gNB_index].Srb_info.Srb_id = 2; LOG_I(NR_RRC, "[UE %d], CONFIG_SRB2 %d corresponding to gNB_index %d\n", ue_mod_idP, DCCH1, gNB_index); return(0); diff --git a/targets/RT/USER/lte-softmodem.h b/targets/RT/USER/lte-softmodem.h index 35c428e107..a1b261f263 100644 --- a/targets/RT/USER/lte-softmodem.h +++ b/targets/RT/USER/lte-softmodem.h @@ -97,7 +97,6 @@ /*-------------------------------------------------------------------------------------------------------------------------------------------------------*/ #define CMDLINE_UEPARAMS_DESC { \ - {"siml1", CONFIG_HLP_SIML1, PARAMFLAG_BOOL, iptr:&simL1flag, defintval:0, TYPE_INT, 0}, \ {"U", CONFIG_HLP_NUMUE, 0, u16ptr:&NB_UE_INST, defuintval:1, TYPE_UINT16, 0}, \ {"ue-rxgain", CONFIG_HLP_UERXG, 0, dblptr:&(rx_gain[0][0]), defdblval:130, TYPE_DOUBLE, 0}, \ {"ue-rxgain-off", CONFIG_HLP_UERXGOFF, 0, dblptr:&rx_gain_off, defdblval:0, TYPE_DOUBLE, 0}, \ @@ -199,7 +198,6 @@ extern void init_te_thread(PHY_VARS_eNB *); extern void kill_td_thread(PHY_VARS_eNB *); extern void kill_te_thread(PHY_VARS_eNB *); -extern void RCConfig_sim(void); extern void init_ocm(void); extern void init_ue_devices(PHY_VARS_UE *); diff --git a/targets/RT/USER/lte-ue.c b/targets/RT/USER/lte-ue.c index 0962bb6a2d..a7fff21980 100644 --- a/targets/RT/USER/lte-ue.c +++ b/targets/RT/USER/lte-ue.c @@ -283,13 +283,7 @@ void init_UE(int nb_inst, LOG_I(PHY,"Allocating UE context %d\n",inst); - if ( !IS_SOFTMODEM_SIML1 ) PHY_vars_UE_g[inst][0] = init_ue_vars(fp0,inst,0); - else { - // needed for memcopy below. these are not used in the RU, but needed for UE - RC.ru[0]->frame_parms->nb_antennas_rx = fp0->nb_antennas_rx; - RC.ru[0]->frame_parms->nb_antennas_tx = fp0->nb_antennas_tx; - PHY_vars_UE_g[inst][0] = init_ue_vars(RC.ru[0]->frame_parms,inst,0); - } + PHY_vars_UE_g[inst][0] = init_ue_vars(fp0,inst,0); // turn off timing control loop in UE PHY_vars_UE_g[inst][0]->no_timing_correction = timing_correction; @@ -371,17 +365,13 @@ void init_UE(int nb_inst, */ UE->N_TA_offset = 0; - if (IS_SOFTMODEM_SIML1 ) init_ue_devices(UE); - LOG_I(PHY,"Intializing UE Threads for instance %d (%p,%p)...\n",inst,PHY_vars_UE_g[inst],PHY_vars_UE_g[inst][0]); init_UE_threads(inst); - if (!IS_SOFTMODEM_SIML1 ) { - ret = openair0_device_load(&(UE->rfdevice), &openair0_cfg[0]); + ret = openair0_device_load(&(UE->rfdevice), &openair0_cfg[0]); - if (ret !=0) { - exit_fun("Error loading device library"); - } + if (ret !=0) { + exit_fun("Error loading device library"); } UE->rfdevice.host_type = RAU_HOST; diff --git a/targets/RT/USER/lte-uesoftmodem.c b/targets/RT/USER/lte-uesoftmodem.c index 2bf2314f1b..c507d782fa 100644 --- a/targets/RT/USER/lte-uesoftmodem.c +++ b/targets/RT/USER/lte-uesoftmodem.c @@ -193,6 +193,9 @@ int oaisim_flag=0; */ uint8_t abstraction_flag=0; +// needed for pdcp.c +RAN_CONTEXT_t RC; + /* forward declarations */ void set_default_frame_parms(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs]); @@ -286,7 +289,6 @@ static void get_options(void) { int dumpframe=0; int timingadv=0; uint8_t nfapi_mode = NFAPI_MONOLITHIC; - int simL1flag =0; set_default_frame_parms(frame_parms); CONFIG_SETRTFLAG(CONFIG_NOEXITONHELP); @@ -300,8 +302,6 @@ static void get_options(void) { config_process_cmdline( cmdline_ueparams,sizeof(cmdline_ueparams)/sizeof(paramdef_t),NULL); nfapi_setmode(nfapi_mode); - if (simL1flag) - set_softmodem_optmask(SOFTMODEM_SIML1_BIT); if (loopfile != NULL) { printf("Input file for hardware emulation: %s",loopfile); @@ -574,11 +574,6 @@ int main( int argc, char **argv ) { EPC_MODE_ENABLED = !IS_SOFTMODEM_NOS1; printf("Running with %d UE instances\n",NB_UE_INST); - if (NB_UE_INST > 1 && (!IS_SOFTMODEM_SIML1) && NFAPI_MODE!=NFAPI_UE_STUB_PNF) { - printf("Running with more than 1 UE instance and simL1 is not active, this will result in undefined behaviour for now, exiting.\n"); - abort(); - } - // Checking option of nums_ue_thread. if(NB_THREAD_INST < 1) { printf("Running with 0 UE rxtx thread, exiting.\n"); @@ -649,9 +644,6 @@ int main( int argc, char **argv ) { } } else init_openair0(frame_parms[0],(int)rx_gain[0][0]); - if (IS_SOFTMODEM_SIML1 ) { - RCConfig_sim(); - } cpuf=get_cpu_freq_GHz(); @@ -753,10 +745,6 @@ int main( int argc, char **argv ) { //p_exmimo_config->framing.tdd_config = TXRXSWITCH_TESTRX; - if (IS_SOFTMODEM_SIML1 ) { - init_ocm(); - PHY_vars_UE_g[0][0]->no_timing_correction = 1; - } if(IS_SOFTMODEM_DOFORMS) load_softscope("ue",NULL); diff --git a/targets/RT/USER/rfsim.c b/targets/RT/USER/rfsim.c deleted file mode 100644 index eb380b9518..0000000000 --- a/targets/RT/USER/rfsim.c +++ /dev/null @@ -1,490 +0,0 @@ -/* - * 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 rfsim.c -* \brief function for simulated RF device -* \author R. Knopp -* \date 2018 -* \version 1.0 -* \company Eurecom -* \email: openair_tech@eurecom.fr -* \note -* \warning -*/ - - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "assertions.h" -#include "rfsim.h" -#include "openair1/SIMULATION/TOOLS/sim.h" -#include "enb_config.h" -#include "enb_paramdef.h" -#include "platform_constants.h" -#include "common/config/config_paramdesc.h" -#include "common/config/config_userapi.h" -#include "common/ran_context.h" -#include "PHY/defs_UE.h" -#include "PHY/defs_eNB.h" -#include "PHY/defs_RU.h" -#include "common/utils/LOG/vcd_signal_dumper.h" - -RAN_CONTEXT_t RC; -extern PHY_VARS_UE ***PHY_vars_UE_g; - - -// put all of these in a common structure after -sim_t sim; - - -void init_ru_devices(void); - -void init_RU(char *,int send_dmrssync); - -void *rfsim_top(void *n_frames); - -void wait_RUs(void) { - int i; - // wait for all RUs to be configured over fronthaul - pthread_mutex_lock(&RC.ru_mutex); - - while (RC.ru_mask>0) { - pthread_cond_wait(&RC.ru_cond,&RC.ru_mutex); - } - - pthread_mutex_unlock(&RC.ru_mutex); - - // copy frame parameters from RU to UEs - for (i=0; iframe_parms->samples_per_tti + RC.ru[0]->frame_parms->ofdm_symbol_size + RC.ru[0]->frame_parms->nb_prefix_samples0; - } - - for (int ru_id=0; ru_idframe_parms->samples_per_tti; - - printf("RUs are ready, let's go\n"); -} - -void wait_eNBs(void) { - return; -} - - -void RCConfig_sim(void) { - paramlist_def_t RUParamList = {CONFIG_STRING_RU_LIST,NULL,0}; - // Get num RU instances - config_getlist( &RUParamList,NULL,0, NULL); - RC.nb_RU = RUParamList.numelt; - AssertFatal(RC.nb_RU>0,"we need at least 1 RU for simulation\n"); - printf("returned with %d rus\n",RC.nb_RU); - init_RU(NULL,0); - printf("Waiting for RUs to get set up\n"); - wait_RUs(); - init_ru_devices(); - static int nframes = 100000; - AssertFatal(0 == pthread_create(&sim.rfsim_thread, - NULL, - rfsim_top, - (void *)&nframes), ""); -} - - - -int ru_trx_start(openair0_device *device) { - return(0); -} - -void ru_trx_end(openair0_device *device) { - return; -} - -int ru_trx_stop(openair0_device *device) { - return(0); -} -int UE_trx_start(openair0_device *device) { - return(0); -} -void UE_trx_end(openair0_device *device) { - return; -} -int UE_trx_stop(openair0_device *device) { - return(0); -} -int ru_trx_set_freq(openair0_device *device, openair0_config_t *openair0_cfg, int dummy) { - return(0); -} -int ru_trx_set_gains(openair0_device *device, openair0_config_t *openair0_cfg) { - return(0); -} -int UE_trx_set_freq(openair0_device *device, openair0_config_t *openair0_cfg, int dummy) { - return(0); -} -int UE_trx_set_gains(openair0_device *device, openair0_config_t *openair0_cfg) { - return(0); -} - -extern pthread_mutex_t subframe_mutex; -extern int subframe_ru_mask,subframe_UE_mask; - - -int ru_trx_read(openair0_device *device, openair0_timestamp *ptimestamp, void **buff, int nsamps, int cc) { - int ru_id = device->Mod_id; - int CC_id = device->CC_id; - int subframe; - int sample_count=0; - *ptimestamp = sim.last_ru_rx_timestamp[ru_id][CC_id]; - LOG_D(SIM,"RU_trx_read nsamps %d TS(%llu,%llu) => subframe %d\n",nsamps, - (unsigned long long)sim.current_ru_rx_timestamp[ru_id][CC_id], - (unsigned long long)sim.last_ru_rx_timestamp[ru_id][CC_id], - (int)((*ptimestamp/RC.ru[ru_id]->frame_parms->samples_per_tti)%10)); - - // if we're at a subframe boundary generate UL signals for this ru - - while (sample_countframe_parms->samples_per_tti)%10; - - if (subframe_select(RC.ru[ru_id]->frame_parms,subframe) != SF_DL || RC.ru[ru_id]->frame_parms->frame_type == FDD) { - LOG_D(SIM,"RU_trx_read generating UL subframe %d (Ts %llu, current TS %llu)\n", - subframe,(unsigned long long)*ptimestamp, - (unsigned long long)sim.current_ru_rx_timestamp[ru_id][CC_id]); - VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_SIM_DO_UL_SIGNAL,1); - do_UL_sig(&sim, - subframe, - 0, // abstraction_flag - RC.ru[ru_id]->frame_parms, - 0, // frame is only used for abstraction - ru_id, - CC_id); - VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_SIM_DO_UL_SIGNAL,0); - } - - sim.last_ru_rx_timestamp[ru_id][CC_id] += RC.ru[ru_id]->frame_parms->samples_per_tti; - sample_count += RC.ru[ru_id]->frame_parms->samples_per_tti; - } - - return(nsamps); -} - -int UE_trx_read(openair0_device *device, openair0_timestamp *ptimestamp, void **buff, int nsamps, int cc) { - VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_SIM_UE_TRX_READ,1); - int UE_id = device->Mod_id; - int CC_id = device->CC_id; - int subframe; - int sample_count=0; - int read_size; - int sptti = PHY_vars_UE_g[UE_id][CC_id]->frame_parms.samples_per_tti; - *ptimestamp = sim.last_UE_rx_timestamp[UE_id][CC_id]; - LOG_D(PHY,"UE %d DL simulation 0: UE_trx_read nsamps %d TS %llu (%llu, offset %d) antenna %d\n", - UE_id, - nsamps, - (unsigned long long)sim.current_UE_rx_timestamp[UE_id][CC_id], - (unsigned long long)sim.last_UE_rx_timestamp[UE_id][CC_id], - (int)(sim.last_UE_rx_timestamp[UE_id][CC_id]%sptti), - cc); - - if (nsamps < sptti) - read_size = nsamps; - else - read_size = sptti; - - while (sample_countframe_parms, - UE_id, - CC_id); - VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_SIM_DO_DL_SIGNAL,0); - LOG_D(PHY,"UE %d: DL simulation 6: UE_trx_read @ TS %"PRIi64" (%"PRIi64")=> frame %d, subframe %d\n", - UE_id, sim.current_UE_rx_timestamp[UE_id][CC_id], - sim.last_UE_rx_timestamp[UE_id][CC_id], - (int)((sim.last_UE_rx_timestamp[UE_id][CC_id]/(sptti*10))&1023), - subframe); - sim.last_UE_rx_timestamp[UE_id][CC_id] += read_size; - sample_count += read_size; - } - - VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_SIM_UE_TRX_READ,0); - return(nsamps); -} - - -int ru_trx_write(openair0_device *device,openair0_timestamp timestamp, void **buff, int nsamps, int cc, int flags) { - int ru_id = device->Mod_id; - LTE_DL_FRAME_PARMS *frame_parms = RC.ru[ru_id]->frame_parms; - pthread_mutex_lock(&sim.subframe_mutex); - LOG_D(SIM,"[TXPATH] ru_trx_write: RU %d mask %d\n",ru_id,sim.subframe_ru_mask); - pthread_mutex_unlock(&sim.subframe_mutex); - // compute amplitude of TX signal from first symbol in subframe - // note: assumes that the packet is an entire subframe - sim.ru_amp[ru_id] = 0; - - for (int aa=0; aanb_tx; aa++) { - sim.ru_amp[ru_id] += (double)signal_energy((int32_t *)buff[aa],frame_parms->ofdm_symbol_size)/(12*frame_parms->N_RB_DL); - } - - sim.ru_amp[ru_id] = sqrt(sim.ru_amp[ru_id]); - LOG_D(PHY,"Setting amp for RU %d to %f (%d)\n",ru_id,sim.ru_amp[ru_id], dB_fixed((double)signal_energy((int32_t *)buff[0],frame_parms->ofdm_symbol_size))); - // tell top-level we are done - pthread_mutex_lock(&sim.subframe_mutex); - sim.subframe_ru_mask|=(1<rfdevice.Mod_id = ru_id; - ru->rfdevice.CC_id = 0; - ru->rfdevice.trx_start_func = ru_trx_start; - ru->rfdevice.trx_read_func = ru_trx_read; - ru->rfdevice.trx_write_func = ru_trx_write; - ru->rfdevice.trx_end_func = ru_trx_end; - ru->rfdevice.trx_stop_func = ru_trx_stop; - ru->rfdevice.trx_set_freq_func = ru_trx_set_freq; - ru->rfdevice.trx_set_gains_func = ru_trx_set_gains; - sim.last_ru_rx_timestamp[ru_id][0] = 0; - } -} - -void init_ue_devices(PHY_VARS_UE *UE) { - AssertFatal(UE!=NULL,"UE context is not allocated\n"); - printf("Initializing UE %d.%d\n",UE->Mod_id,UE->CC_id); - UE->rfdevice.Mod_id = UE->Mod_id; - UE->rfdevice.CC_id = UE->CC_id; - UE->rfdevice.trx_start_func = UE_trx_start; - UE->rfdevice.trx_read_func = UE_trx_read; - UE->rfdevice.trx_write_func = UE_trx_write; - UE->rfdevice.trx_end_func = UE_trx_end; - UE->rfdevice.trx_stop_func = UE_trx_stop; - UE->rfdevice.trx_set_freq_func = UE_trx_set_freq; - UE->rfdevice.trx_set_gains_func = UE_trx_set_gains; - sim.last_UE_rx_timestamp[UE->Mod_id][UE->CC_id] = 0; -} - -void init_ocm(void) { - module_id_t UE_id, ru_id; - int CC_id; - double DS_TDL = .03; - randominit(0); - set_taus_seed(0); - init_channelmod(); - double snr_dB = channelmod_get_snr_dB(); - double sinr_dB = channelmod_get_sinr_dB(); - init_channel_vars ();//fp, &s_re, &s_im, &r_re, &r_im, &r_re0, &r_im0); - // initialize channel descriptors - LOG_I(PHY,"Initializing channel descriptors (nb_RU %d, nb_UE %d)\n",RC.nb_RU,NB_UE_INST); - - for (ru_id = 0; ru_id < RC.nb_RU; ru_id++) { - for (UE_id = 0; UE_id < NB_UE_INST; UE_id++) { - for (CC_id=0; CC_idframe_parms->N_RB_DL); - sim.RU2UE[ru_id][UE_id][CC_id] = - new_channel_desc_scm(RC.ru[ru_id]->nb_tx, - PHY_vars_UE_g[UE_id][CC_id]->frame_parms.nb_antennas_rx, - AWGN, - N_RB2sampling_rate(RC.ru[ru_id]->frame_parms->N_RB_DL), - N_RB2channel_bandwidth(RC.ru[ru_id]->frame_parms->N_RB_DL), - DS_TDL, - 0.0, - 0, - 0); - random_channel(sim.RU2UE[ru_id][UE_id][CC_id],0); - LOG_D(OCM,"[SIM] Initializing channel (%s) from UE %d to ru %d\n", "AWGN", UE_id, ru_id); - - sim.UE2RU[UE_id][ru_id][CC_id] = - new_channel_desc_scm(PHY_vars_UE_g[UE_id][CC_id]->frame_parms.nb_antennas_tx, - RC.ru[ru_id]->nb_rx, - AWGN, - N_RB2sampling_rate(RC.ru[ru_id]->frame_parms->N_RB_UL), - N_RB2channel_bandwidth(RC.ru[ru_id]->frame_parms->N_RB_UL), - DS_TDL, - 0.0, - 0, - 0); - random_channel(sim.UE2RU[UE_id][ru_id][CC_id],0); - // to make channel reciprocal uncomment following line instead of previous. However this only works for SISO at the moment. For MIMO the channel would need to be transposed. - //UE2RU[UE_id][ru_id] = RU2UE[ru_id][UE_id]; - AssertFatal(sim.RU2UE[ru_id][UE_id][CC_id]!=NULL,"RU2UE[%d][%d][%d] is null\n",ru_id,UE_id,CC_id); - AssertFatal(sim.UE2RU[UE_id][ru_id][CC_id]!=NULL,"UE2RU[%d][%d][%d] is null\n",UE_id,ru_id,CC_id); - - //pathloss: -132.24 dBm/15kHz RE + target SNR - eNB TX power per RE - if (ru_id == (UE_id % RC.nb_RU)) { - sim.RU2UE[ru_id][UE_id][CC_id]->path_loss_dB = -132.24 + snr_dB - RC.ru[ru_id]->frame_parms->pdsch_config_common.referenceSignalPower; - sim.UE2RU[UE_id][ru_id][CC_id]->path_loss_dB = -132.24 + snr_dB - RC.ru[ru_id]->frame_parms->pdsch_config_common.referenceSignalPower; - } else { - sim.RU2UE[ru_id][UE_id][CC_id]->path_loss_dB = -132.24 + sinr_dB - RC.ru[ru_id]->frame_parms->pdsch_config_common.referenceSignalPower; - sim.UE2RU[UE_id][ru_id][CC_id]->path_loss_dB = -132.24 + sinr_dB - RC.ru[ru_id]->frame_parms->pdsch_config_common.referenceSignalPower; - } - - LOG_I(OCM,"Path loss from eNB %d to UE %d (CCid %d)=> %f dB (eNB TX %d, SNR %f)\n",ru_id,UE_id,CC_id, - sim.RU2UE[ru_id][UE_id][CC_id]->path_loss_dB, - RC.ru[ru_id]->frame_parms->pdsch_config_common.referenceSignalPower, - snr_dB); - } - } - } -} - - -void update_ocm(double snr_dB,double sinr_dB) { - module_id_t UE_id, ru_id; - int CC_id; - - for (ru_id = 0; ru_id < RC.nb_RU; ru_id++) { - for (UE_id = 0; UE_id < NB_UE_INST; UE_id++) { - for (CC_id=0; CC_idpath_loss_dB = -132.24 + snr_dB - RC.ru[ru_id]->frame_parms->pdsch_config_common.referenceSignalPower; - sim.UE2RU[UE_id][ru_id][CC_id]->path_loss_dB = -132.24 + snr_dB - RC.ru[ru_id]->frame_parms->pdsch_config_common.referenceSignalPower; - } else { - sim.RU2UE[ru_id][UE_id][CC_id]->path_loss_dB = -132.24 + sinr_dB - RC.ru[ru_id]->frame_parms->pdsch_config_common.referenceSignalPower; - sim.UE2RU[UE_id][ru_id][CC_id]->path_loss_dB = -132.24 + sinr_dB - RC.ru[ru_id]->frame_parms->pdsch_config_common.referenceSignalPower; - } - - LOG_D(OCM,"Path loss from eNB %d to UE %d (CCid %d)=> %f dB (eNB TX %d, SNR %f)\n",ru_id,UE_id,CC_id, - sim.RU2UE[ru_id][UE_id][CC_id]->path_loss_dB, - RC.ru[ru_id]->frame_parms->pdsch_config_common.referenceSignalPower, - snr_dB); - } - } - } -} - - -void init_channel_vars(void) { - int i; - memset(sim.RU_output_mask,0,sizeof(int)*NUMBER_OF_UE_MAX); - - for (i=0; iframe_parms,(sf+4)%10)!=SF_UL) ? sim.subframe_ru_mask : ((1<frame_parms->frame_type == FDD || subframe_select(RC.ru[0]->frame_parms,(sf+4)%10)!=SF_DL) ? sim.subframe_UE_mask : ((1<frame_parms->samples_per_tti; - LOG_D(SIM,"RU %d/%d: TS %"PRIi64"\n",ru_id,CC_id,sim.current_ru_rx_timestamp[ru_id][CC_id]); - } - - for (int UE_inst = 0; UE_instframe_parms.samples_per_tti; - LOG_D(SIM,"UE %d/%d: TS %"PRIi64"\n",UE_inst,CC_id,sim.current_UE_rx_timestamp[UE_inst][CC_id]); - } - - if (oai_exit == 1) return((void *)NULL); - } - } - - return((void *)NULL); -} From 86cab23b74687d373c8df3903cbec5a01c9dd487 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Sun, 24 Jan 2021 22:23:33 +0100 Subject: [PATCH 043/579] fixed build with --mu --- targets/RT/USER/lte-ru.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/targets/RT/USER/lte-ru.c b/targets/RT/USER/lte-ru.c index a9bd7f8c7b..e6d40fcf40 100644 --- a/targets/RT/USER/lte-ru.c +++ b/targets/RT/USER/lte-ru.c @@ -116,10 +116,15 @@ extern const char ru_if_types[MAX_RU_IF_TYPES][20]; #if defined(PRE_SCD_THREAD) +#include "common/ran_context.h" +#include "nfapi/oai_integration/vendor_ext.h" +#include "openair2/LAYER2/MAC/mac_extern.h" extern uint8_t dlsch_ue_select_tbl_in_use; void init_ru_vnf(void); + extern RAN_CONTEXT_t RC; #endif +RU_t **RCconfig_RU(int nb_RU,int nb_L1_inst,PHY_VARS_eNB ***eNB,uint64_t *ru_mask,pthread_mutex_t *ru_mutex,pthread_cond_t *ru_cond); /*************************************************************/ /* Functions to attach and configure RRU */ @@ -2457,15 +2462,15 @@ void kill_RU_proc(RU_t *ru) { void init_precoding_weights(RU_t **rup,int nb_RU,PHY_VARS_eNB *eNB) { - int layer,ru_id,aa,re,ue,tb; + int layer,ru_id,aa,re,tb; LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms; RU_t *ru; LTE_eNB_DLSCH_t *dlsch; // init precoding weigths - for (ue=0; uedlsch[ue][tb]; + dlsch = eNB->dlsch[dlsch_id][tb]; for (layer=0; layer<4; layer++) { int nb_tx=0; @@ -2807,11 +2812,11 @@ void init_ru_vnf(void) { dlsch_ue_select_tbl_in_use = 1; // create status mask RC.ru_mask = 0; - pthread_mutex_init(ru->ru_mutex,NULL); - pthread_cond_init(ru->ru_cond,NULL); + pthread_mutex_init(&RC.ru_mutex,NULL); + pthread_cond_init(&RC.ru_cond,NULL); // read in configuration file) LOG_I(PHY,"configuring RU from file\n"); - RCconfig_RU(); + RC.ru = RCconfig_RU(RC.nb_RU,RC.nb_L1_inst,RC.eNB,&RC.ru_mask,&RC.ru_mutex,&RC.ru_cond); LOG_I(PHY,"number of L1 instances %d, number of RU %d, number of CPU cores %d\n",RC.nb_L1_inst,RC.nb_RU,get_nprocs()); if (RC.nb_CC != 0) From 9f52fd4ae722d5e4b7be67c71b581955d927e77b Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Mon, 25 Jan 2021 10:02:15 +0100 Subject: [PATCH 044/579] removed warnings on lte-softmodem compilation --- openair1/PHY/INIT/nr_init_ru.c | 1 + openair1/PHY/INIT/phy_init.h | 1 + openair1/PHY/LTE_ESTIMATION/lte_estimation.h | 1 + openair1/PHY/LTE_TRANSPORT/dci_tools.c | 2 +- openair1/PHY/LTE_TRANSPORT/if5_tools.c | 2 +- openair1/PHY/LTE_TRANSPORT/prach.c | 2 +- openair2/LAYER2/PROTO_AGENT/proto_agent_common.c | 7 +++++++ openair3/NAS/COMMON/IES/NasPagingIdentity.h | 4 ++-- targets/RT/USER/lte-enb.c | 1 + 9 files changed, 16 insertions(+), 5 deletions(-) diff --git a/openair1/PHY/INIT/nr_init_ru.c b/openair1/PHY/INIT/nr_init_ru.c index 5c82584469..ad387f0151 100644 --- a/openair1/PHY/INIT/nr_init_ru.c +++ b/openair1/PHY/INIT/nr_init_ru.c @@ -29,6 +29,7 @@ #include "assertions.h" #include #include "openair1/PHY/defs_RU.h" +#include "openair1/PHY/NR_TRANSPORT/nr_transport_proto.h" extern const char ru_if_types[MAX_RU_IF_TYPES][20]; diff --git a/openair1/PHY/INIT/phy_init.h b/openair1/PHY/INIT/phy_init.h index 9c474264c8..2cbf926a4d 100644 --- a/openair1/PHY/INIT/phy_init.h +++ b/openair1/PHY/INIT/phy_init.h @@ -408,6 +408,7 @@ void init_nr_transport(PHY_VARS_gNB *gNB); void init_dfts(void); +void fill_subframe_mask(PHY_VARS_eNB *eNB); /** @} */ #endif diff --git a/openair1/PHY/LTE_ESTIMATION/lte_estimation.h b/openair1/PHY/LTE_ESTIMATION/lte_estimation.h index fc40280853..4b28ffc466 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_estimation.h +++ b/openair1/PHY/LTE_ESTIMATION/lte_estimation.h @@ -289,5 +289,6 @@ void freq_equalization(LTE_DL_FRAME_PARMS *frame_parms, unsigned char Qm); +void dump_I0_stats(FILE *fd,PHY_VARS_eNB *eNB); /** @} */ #endif diff --git a/openair1/PHY/LTE_TRANSPORT/dci_tools.c b/openair1/PHY/LTE_TRANSPORT/dci_tools.c index b0d4c07eae..89adabb189 100644 --- a/openair1/PHY/LTE_TRANSPORT/dci_tools.c +++ b/openair1/PHY/LTE_TRANSPORT/dci_tools.c @@ -474,7 +474,7 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB, ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->harq_pid = rel8->harq_process; ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->dai = rel8->downlink_assignment_index; ((DCI1A_20MHz_TDD_1_6_t *)dci_pdu)->padding = 0; - LOG_D(PHY,"TDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",rel8->mcs_1,rel8->resource_block_coding,rel8->redundancy_version_1,NPRB); + //LOG_D(PHY,"TDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",rel8->mcs_1,rel8->resource_block_coding,rel8->redundancy_version_1,NPRB); } else { dci_alloc->dci_length = sizeof_DCI1A_20MHz_FDD_t; ((DCI1A_20MHz_FDD_t *)dci_pdu)->type = 1; diff --git a/openair1/PHY/LTE_TRANSPORT/if5_tools.c b/openair1/PHY/LTE_TRANSPORT/if5_tools.c index ad28902c5e..e2bec337aa 100644 --- a/openair1/PHY/LTE_TRANSPORT/if5_tools.c +++ b/openair1/PHY/LTE_TRANSPORT/if5_tools.c @@ -1469,7 +1469,7 @@ void recv_IF5(RU_t *ru, openair0_timestamp *proc_timestamp, int subframe, uint16 // HYPOTHESIS: first packet per subframe has lowest timestamp of subframe // should detect out of order and act accordingly .... AssertFatal(aid==0 || aid==1,"aid %d != 0 or 1\n",aid); - LOG_D(PHY,"rxp[%d] %p, dest %p, offset %d (%lld,%lld)\n",aid,rxp[aid],rxp[aid]+(timestamp[packet_id]-timestamp[0]),(int)(timestamp[packet_id]-timestamp[0]),timestamp[packet_id],timestamp[0]); + LOG_D(PHY,"rxp[%d] %p, dest %p, offset %d (%llu,%llu)\n",aid,rxp[aid],rxp[aid]+(timestamp[packet_id]-timestamp[0]),(int)(timestamp[packet_id]-timestamp[0]),(long long unsigned int)timestamp[packet_id],(long long unsigned int)timestamp[0]); memcpy((void*)(rxp[aid]+(timestamp[packet_id]-timestamp[0])), (void*)temp_rx, spp_eth<<2); diff --git a/openair1/PHY/LTE_TRANSPORT/prach.c b/openair1/PHY/LTE_TRANSPORT/prach.c index 51f4b87684..30ceaff4e8 100644 --- a/openair1/PHY/LTE_TRANSPORT/prach.c +++ b/openair1/PHY/LTE_TRANSPORT/prach.c @@ -85,7 +85,7 @@ void rx_prach0(PHY_VARS_eNB *eNB, uint8_t aa; int32_t lev; int16_t levdB; - int fft_size,log2_ifft_size; + int fft_size=0,log2_ifft_size; int16_t prach_ifft_tmp[2048*2] __attribute__((aligned(32))); int32_t *prach_ifft=(int32_t *)NULL; int32_t **prach_ifftp=(int32_t **)NULL; diff --git a/openair2/LAYER2/PROTO_AGENT/proto_agent_common.c b/openair2/LAYER2/PROTO_AGENT/proto_agent_common.c index 6e343343cd..68c83106c9 100644 --- a/openair2/LAYER2/PROTO_AGENT/proto_agent_common.c +++ b/openair2/LAYER2/PROTO_AGENT/proto_agent_common.c @@ -500,6 +500,13 @@ error: return -1; } +boolean_t pdcp_data_ind( + const protocol_ctxt_t *const ctxt_pP, + const srb_flag_t srb_flagP, + const MBMS_flag_t MBMS_flagP, + const rb_id_t rb_id, + const sdu_size_t sdu_buffer_size, + mem_block_t *const sdu_buffer); int proto_agent_pdcp_data_ind_process(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg) { boolean_t result = 0; diff --git a/openair3/NAS/COMMON/IES/NasPagingIdentity.h b/openair3/NAS/COMMON/IES/NasPagingIdentity.h index e94a6a803a..3e03128006 100644 --- a/openair3/NAS/COMMON/IES/NasPagingIdentity.h +++ b/openair3/NAS/COMMON/IES/NasPagingIdentity.h @@ -25,8 +25,8 @@ #include "OctetString.h" -#ifndef PAGING_IDENTITY_H_ -#define PAGING_IDENTITY_H_ +#ifndef NASPAGING_IDENTITY_H_ +#define NASPAGING_IDENTITY_H_ #define PAGING_IDENTITY_MINIMUM_LENGTH 2 #define PAGING_IDENTITY_MAXIMUM_LENGTH 2 diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c index ad1a9ac54a..7e8b971e5d 100644 --- a/targets/RT/USER/lte-enb.c +++ b/targets/RT/USER/lte-enb.c @@ -70,6 +70,7 @@ #include "PHY/LTE_TRANSPORT/if4_tools.h" #include "PHY/LTE_TRANSPORT/if5_tools.h" +#include "PHY/LTE_ESTIMATION/lte_estimation.h" #include "PHY/phy_extern.h" From bbe6db03dd5811b89bd9c3f8f475f55c585db0ad Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Mon, 25 Jan 2021 10:36:54 +0100 Subject: [PATCH 045/579] removed some cppcheck errors --- executables/nr-gnb.c | 2 +- openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c | 10 +++------- targets/ARCH/ETHERNET/USERSPACE/LIB/eth_udp.c | 2 +- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/executables/nr-gnb.c b/executables/nr-gnb.c index 2aa9635af2..e9d527c7ea 100644 --- a/executables/nr-gnb.c +++ b/executables/nr-gnb.c @@ -872,7 +872,7 @@ void init_gNB_proc(int inst) { gNB->threadPool = (tpool_t*)malloc(sizeof(tpool_t)); gNB->respDecode = (notifiedFIFO_t*) malloc(sizeof(notifiedFIFO_t)); int numCPU = sysconf(_SC_NPROCESSORS_ONLN); - uint32_t num_threads_pusch; + uint32_t num_threads_pusch=2; paramdef_t PUSCHThreads[] = NUM_THREADS_DESC; config_get( PUSCHThreads,sizeof(PUSCHThreads)/sizeof(paramdef_t),NULL); int threadCnt = min(numCPU, num_threads_pusch); diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c b/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c index c6a4e4f990..aba4a464f2 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c @@ -2978,7 +2978,7 @@ int allocate_REs_in_RB_MCH_khz_1dot25(int32_t **txdataF, case 2: //QPSK - LOG_D(PHY,"%d : %d,%d => ",tti_offset,((int16_t*)&txdataF[0][tti_offset])[0],((int16_t*)&txdataF[0][tti_offset])[1]); + LOG_D(PHY,"%d : %d,%d => ",tti_offset,((int16_t*)&txdataF[0][tti_offset])[0],((int16_t*)&txdataF[0][tti_offset])[1]); ((int16_t*)&txdataF[0][tti_offset])[0] = (x0[*jj]==1) ? (-gain_lin_QPSK) : gain_lin_QPSK; //I //b_i *jj = *jj + 1; @@ -3080,7 +3080,7 @@ int mch_modulation_khz_1dot25(int32_t **txdataF, uint8_t skip_dc=0; uint8_t mod_order = dlsch->harq_processes[0]->Qm; int16_t qam16_table_a[4],qam64_table_a[8];//,qam16_table_b[4],qam64_table_b[8]; - int16_t *qam_table_s; + int16_t *qam_table_s=qam16_table_a; nsymb_pmch = 1; nsymb = (frame_parms->Ncp == NORMAL) ? 14 : 12; @@ -3123,12 +3123,8 @@ int mch_modulation_khz_1dot25(int32_t **txdataF, } - if (mod_order == 4) - qam_table_s = qam16_table_a; - else if (mod_order == 6) + if (mod_order == 6) qam_table_s = qam64_table_a; - else - qam_table_s = NULL; //LOG_I(PHY,"Allocated rb %d, subframe_offset %d,amp %d\n",rb,subframe_offset,amp); allocate_REs_in_RB_MCH_khz_1dot25(txdataF, diff --git a/targets/ARCH/ETHERNET/USERSPACE/LIB/eth_udp.c b/targets/ARCH/ETHERNET/USERSPACE/LIB/eth_udp.c index e9c2d0ec88..ee0dce48f0 100644 --- a/targets/ARCH/ETHERNET/USERSPACE/LIB/eth_udp.c +++ b/targets/ARCH/ETHERNET/USERSPACE/LIB/eth_udp.c @@ -413,7 +413,7 @@ int trx_eth_read_udp(openair0_device *device, openair0_timestamp *timestamp, voi char *temp_rx0 = ((char *)&temp_rx[1])-APP_HEADER_SIZE_BYTES; #endif #elif defined(__arm__) || defined(__aarch64__) - int nsamps2 = (payload_size>>4)+1 + int nsamps2 = (payload_size>>4)+1; int16x8_t temp_rx[nsamps2]; char *temp_rx0 = ((char *)&temp_rx[1])-APP_HEADER_SIZE_BYTES; #else From f04846cf4f6f1749a79cd5c925682580666d9acf Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Tue, 26 Jan 2021 13:25:07 +0100 Subject: [PATCH 046/579] 2 and 4 antenna testing with ulsim functional. >=3 dB gains from 2 to 4 antennas on SCM channels --- cmake_targets/CMakeLists.txt | 2 +- openair1/PHY/INIT/lte_init.c | 4 +- .../PHY/LTE_ESTIMATION/lte_adjust_sync_eNB.c | 4 +- .../lte_ul_channel_estimation.c | 8 +- .../PHY/LTE_TRANSPORT/ulsch_demodulation.c | 138 ++++++++++-------- openair1/SIMULATION/LTE_PHY/ulsim.c | 17 +-- openair1/SIMULATION/TOOLS/multipath_channel.c | 41 +++--- openair1/SIMULATION/TOOLS/sim.h | 16 +- 8 files changed, 121 insertions(+), 109 deletions(-) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index a1c73024be..86a8b41299 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -852,7 +852,7 @@ endif (${RU} STREQUAL 0) # Hardware dependant options ################################### -add_list1_option(NB_ANTENNAS_RX "2" "Number of antennas in reception" "1" "2" "4") +add_list1_option(NB_ANTENNAS_RX "4" "Number of antennas in reception" "1" "2" "4") add_list1_option(NB_ANTENNAS_TX "4" "Number of antennas in transmission" "1" "2" "4") add_list2_option(RF_BOARD "EXMIMO" "RF head type" "None" "OAI_USRP" "OAI_BLADERF" "OAI_LMSSDR" "OAI_SIMU") diff --git a/openair1/PHY/INIT/lte_init.c b/openair1/PHY/INIT/lte_init.c index 9e791123e3..10d6f85637 100644 --- a/openair1/PHY/INIT/lte_init.c +++ b/openair1/PHY/INIT/lte_init.c @@ -518,7 +518,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB, AssertFatal (fp->symbols_per_tti > 11, "fp->symbols_per_tti %d < 12\n", fp->symbols_per_tti); AssertFatal (fp->N_RB_UL > 5, "fp->N_RB_UL %d < 6\n", fp->N_RB_UL); - for (i = 0; i < 2; i++) { + for (i = 0; i < fp->nb_antennas_rx; i++) { // FIXME We should get rid of this pusch_vars[ULSCH_id]->rxdataF_ext[i] = (int32_t *)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti ); @@ -591,7 +591,7 @@ void phy_free_lte_eNB(PHY_VARS_eNB *eNB) { free_and_zero(prach_vars->rxsigF[0]); for (int ULSCH_id=0; ULSCH_idnb_antennas_rx; i++) { free_and_zero(pusch_vars[ULSCH_id]->rxdataF_ext[i]); free_and_zero(pusch_vars[ULSCH_id]->rxdataF_ext2[i]); free_and_zero(pusch_vars[ULSCH_id]->drs_ch_estimates[i]); diff --git a/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync_eNB.c b/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync_eNB.c index 31f0816de8..8d66b7d535 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync_eNB.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync_eNB.c @@ -121,8 +121,8 @@ int lte_est_timing_advance_pusch(LTE_DL_FRAME_PARMS *frame_parms, int sync_pos = 0;//(frame_parms->ofdm_symbol_size-cyclic_shift*frame_parms->ofdm_symbol_size/12)%(frame_parms->ofdm_symbol_size); AssertFatal(frame_parms->ofdm_symbol_size > 127,"frame_parms->ofdm_symbol_size %d<128\n",frame_parms->ofdm_symbol_size); - AssertFatal(frame_parms->nb_antennas_rx >0 && frame_parms->nb_antennas_rx<3,"frame_parms->nb_antennas_rx %d not in [0,1]\n", - frame_parms->nb_antennas_rx); + AssertFatal(frame_parms->nb_antennas_rx >0 && frame_parms->nb_antennas_rx<=NB_ANTENNAS_RX,"frame_parms->nb_antennas_rx %d not in [1...%d]\n", + frame_parms->nb_antennas_rx,NB_ANTENNAS_RX); for (i = 0; i < frame_parms->ofdm_symbol_size; i++) { temp = 0; diff --git a/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c b/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c index 7007230138..4754a176cc 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c @@ -42,10 +42,10 @@ extern int16_t *ul_ref_sigs_rx[30][2][34]; int32_t lte_ul_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms, L1_rxtx_proc_t *proc, - LTE_eNB_ULSCH_t * ulsch, - int32_t **ul_ch_estimates, - int32_t **ul_ch_estimates_time, - int32_t **rxdataF_ext, + LTE_eNB_ULSCH_t * ulsch, + int32_t **ul_ch_estimates, + int32_t **ul_ch_estimates_time, + int32_t **rxdataF_ext, module_id_t UE_id, unsigned char l, unsigned char Ns) { diff --git a/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c b/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c index 9a80558ee7..d8b251d6e6 100644 --- a/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c +++ b/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c @@ -630,11 +630,15 @@ void ulsch_detection_mrc(LTE_DL_FRAME_PARMS *frame_parms, uint8_t symbol, uint16_t nb_rb) { #if defined(__x86_64__) || defined(__i386__) - __m128i *rxdataF_comp128_0,*ul_ch_mag128_0,*ul_ch_mag128_0b; - __m128i *rxdataF_comp128_1,*ul_ch_mag128_1,*ul_ch_mag128_1b; + __m128i *rxdataF_comp128_0=NULL,*ul_ch_mag128_0=NULL,*ul_ch_mag128_0b=NULL; + __m128i *rxdataF_comp128_1=NULL,*ul_ch_mag128_1=NULL,*ul_ch_mag128_1b=NULL; + __m128i *rxdataF_comp128_2=NULL,*ul_ch_mag128_2=NULL,*ul_ch_mag128_2b=NULL; + __m128i *rxdataF_comp128_3=NULL,*ul_ch_mag128_3=NULL,*ul_ch_mag128_3b=NULL; #elif defined(__arm__) int16x8_t *rxdataF_comp128_0,*ul_ch_mag128_0,*ul_ch_mag128_0b; int16x8_t *rxdataF_comp128_1,*ul_ch_mag128_1,*ul_ch_mag128_1b; + int16x8_t *rxdataF_comp128_2,*ul_ch_mag128_2,*ul_ch_mag128_2b; + int16x8_t *rxdataF_comp128_3,*ul_ch_mag128_3,*ul_ch_mag128_3b; #endif int32_t i; @@ -646,15 +650,39 @@ void ulsch_detection_mrc(LTE_DL_FRAME_PARMS *frame_parms, ul_ch_mag128_1 = (__m128i *)&ul_ch_mag[1][symbol*frame_parms->N_RB_DL*12]; ul_ch_mag128_0b = (__m128i *)&ul_ch_magb[0][symbol*frame_parms->N_RB_DL*12]; ul_ch_mag128_1b = (__m128i *)&ul_ch_magb[1][symbol*frame_parms->N_RB_DL*12]; - - // MRC on each re of rb, both on MF output and magnitude (for 16QAM/64QAM llr computation) - for (i=0; inb_antennas_rx>2) { + rxdataF_comp128_2 = (__m128i *)&rxdataF_comp[2][symbol*frame_parms->N_RB_DL*12]; + ul_ch_mag128_2 = (__m128i *)&ul_ch_mag[2][symbol*frame_parms->N_RB_DL*12]; + ul_ch_mag128_2b = (__m128i *)&ul_ch_magb[2][symbol*frame_parms->N_RB_DL*12]; + } + if (frame_parms->nb_antennas_rx>3) { + rxdataF_comp128_3 = (__m128i *)&rxdataF_comp[3][symbol*frame_parms->N_RB_DL*12]; + ul_ch_mag128_3 = (__m128i *)&ul_ch_mag[3][symbol*frame_parms->N_RB_DL*12]; + ul_ch_mag128_3b = (__m128i *)&ul_ch_magb[3][symbol*frame_parms->N_RB_DL*12]; } + // MRC on each re of rb, both on MF output and magnitude (for 16QAM/64QAM llr computation) + if (frame_parms->nb_antennas_rx==2) + for (i=0; inb_antennas_rx==3) + for (i=0; inb_antennas_rx==4) + for (i=0; iN_RB_DL*12]; rxdataF_comp128_1 = (int16x8_t *)&rxdataF_comp[1][symbol*frame_parms->N_RB_DL*12]; @@ -796,7 +824,7 @@ void ulsch_channel_compensation(int32_t **rxdataF_ext, mmtmpU0 = _mm_srai_epi32(mmtmpU0,output_shift); mmtmpU1 = _mm_packs_epi32(mmtmpU0,mmtmpU0); ul_ch_mag128[2] = _mm_unpacklo_epi16(mmtmpU1,mmtmpU1); - LOG_D(PHY,"comp: symbol %d rb %d => %d,%d,%d (output_shift %d)\n",symbol,rb,*((int16_t *)&ul_ch_mag128[0]),*((int16_t *)&ul_ch_mag128[1]),*((int16_t *)&ul_ch_mag128[2]),output_shift); + //LOG_I(PHY,"comp: ant %d symbol %d rb %d => %d,%d,%d (output_shift %d)\n",aarx,symbol,rb,*((int16_t *)&ul_ch_mag128[0]),*((int16_t *)&ul_ch_mag128[1]),*((int16_t *)&ul_ch_mag128[2]),output_shift); #elif defined(__arm__) mmtmpU0 = vmull_s16(ul_ch128[0], ul_ch128[0]); mmtmpU0 = vqshlq_s32(vqaddq_s32(mmtmpU0,vrev64q_s32(mmtmpU0)),-output_shift128); @@ -835,6 +863,7 @@ void ulsch_channel_compensation(int32_t **rxdataF_ext, // print_ints("c1",&mmtmpU3); rxdataF_comp128[0] = _mm_packs_epi32(mmtmpU2,mmtmpU3); /* + LOG_I(PHY,"Antenna %d:",aarx); print_shorts("rx:",&rxdataF128[0]); print_shorts("ch:",&ul_ch128[0]); print_shorts("pack:",&rxdataF_comp128[0]); @@ -852,9 +881,12 @@ void ulsch_channel_compensation(int32_t **rxdataF_ext, mmtmpU2 = _mm_unpacklo_epi32(mmtmpU0,mmtmpU1); mmtmpU3 = _mm_unpackhi_epi32(mmtmpU0,mmtmpU1); rxdataF_comp128[1] = _mm_packs_epi32(mmtmpU2,mmtmpU3); - // print_shorts("rx:",rxdataF128[1]); - // print_shorts("ch:",ul_ch128[1]); - // print_shorts("pack:",rxdataF_comp128[1]); + /* + LOG_I(PHY,"Antenna %d:",aarx); + print_shorts("rx:",&rxdataF128[1]); + print_shorts("ch:",&ul_ch128[1]); + print_shorts("pack:",&rxdataF_comp128[1]); + */ // multiply by conjugated channel mmtmpU0 = _mm_madd_epi16(ul_ch128[2],rxdataF128[2]); // mmtmpU0 contains real part of 4 consecutive outputs (32-bit) @@ -868,9 +900,12 @@ void ulsch_channel_compensation(int32_t **rxdataF_ext, mmtmpU2 = _mm_unpacklo_epi32(mmtmpU0,mmtmpU1); mmtmpU3 = _mm_unpackhi_epi32(mmtmpU0,mmtmpU1); rxdataF_comp128[2] = _mm_packs_epi32(mmtmpU2,mmtmpU3); - // print_shorts("rx:",rxdataF128[2]); - // print_shorts("ch:",ul_ch128[2]); - // print_shorts("pack:",rxdataF_comp128[2]); + /* + LOG_I(PHY,"Antenna %d:",aarx); + print_shorts("rx:",&rxdataF128[2]); + print_shorts("ch:",&ul_ch128[2]); + print_shorts("pack:",&rxdataF_comp128[2]); + */ // Add a jitter to compensate for the saturation in "packs" resulting in a bias on the DC after IDFT rxdataF_comp128[0] = _mm_add_epi16(rxdataF_comp128[0],(*(__m128i *)&jitter[0])); rxdataF_comp128[1] = _mm_add_epi16(rxdataF_comp128[1],(*(__m128i *)&jitter[0])); @@ -1096,7 +1131,7 @@ void rx_ulsch(PHY_VARS_eNB *eNB, avgs = cmax(avgs,avgU[aarx]); // log2_maxh = 4+(log2_approx(avgs)/2); - log2_maxh = (log2_approx(avgs)/2)+ log2_approx(frame_parms->nb_antennas_rx-1)+4; + log2_maxh = (log2_approx(avgs)/2); //+ log2_approx(frame_parms->nb_antennas_rx-1)+4; LOG_D(PHY,"[ULSCH] log2_maxh = %d (%d,%d)\n",log2_maxh,avgU[0],avgs); for (l=0; l<(frame_parms->symbols_per_tti-ulsch[UE_id]->harq_processes[harq_pid]->srs_active); l++) { @@ -1216,62 +1251,41 @@ void dump_ulsch(PHY_VARS_eNB *eNB,int frame,int subframe,uint8_t UE_id,int round eNB->ulsch[UE_id]->harq_processes[harq_pid]->Kplus*3,1,0); if (eNB->common_vars.rxdata) { - sprintf(fname,"/tmp/rxsig0_r%d.m",round); - sprintf(vname,"rxs0_r%d",round); - LOG_UM(fname,vname, &eNB->common_vars.rxdata[0][0],eNB->frame_parms.samples_per_tti*10,1,1); + for (int aarx=0;aarxframe_parms.nb_antennas_rx;aarx++) { + sprintf(fname,"/tmp/rxsig%d_r%d.m",aarx,round); + sprintf(vname,"rxs%d_r%d",aarx,round); + LOG_UM(fname,vname, &eNB->common_vars.rxdata[aarx][0],eNB->frame_parms.samples_per_tti*10,1,1); - if (eNB->frame_parms.nb_antennas_rx>1) - if (eNB->common_vars.rxdata) { - sprintf(fname,"/tmp/rxsig1_r%d.m",round); - sprintf(vname,"rxs1_r%d",round); - LOG_UM(fname,vname, &eNB->common_vars.rxdata[1][0],eNB->frame_parms.samples_per_tti*10,1,1); - } + } } - - sprintf(fname,"/tmp/rxsigF0_r%d.m",round); - sprintf(vname,"rxsF0_r%d",round); - LOG_UM(fname,vname, (void *)&eNB->common_vars.rxdataF[0][0],eNB->frame_parms.ofdm_symbol_size*nsymb,1,1); - - if (eNB->frame_parms.nb_antennas_rx>1) { - sprintf(fname,"/tmp/rxsigF1_r%d.m",round); - sprintf(vname,"rxsF1_r%d",round); - LOG_UM(vname,fname, &eNB->common_vars.rxdataF[1][0],eNB->frame_parms.ofdm_symbol_size*nsymb,1,1); + if (eNB->common_vars.rxdataF) { + for (int aarx=0;aarxframe_parms.nb_antennas_rx;aarx++) { + sprintf(fname,"/tmp/rxsigF%d_r%d.m",aarx,round); + sprintf(vname,"rxsF%d_r%d",aarx,round); + LOG_UM(fname,vname, (void *)&eNB->common_vars.rxdataF[aarx][0],eNB->frame_parms.ofdm_symbol_size*nsymb,1,1); + } } - - sprintf(fname,"/tmp/rxsigF0_ext_r%d.m",round); - sprintf(vname,"rxsF0_ext_r%d",round); - LOG_UM(fname,vname, &eNB->pusch_vars[UE_id]->rxdataF_ext[0][0],eNB->frame_parms.N_RB_UL*12*nsymb,1,1); - - if (eNB->frame_parms.nb_antennas_rx>1) { - sprintf(fname,"/tmp/rxsigF1_ext_r%d.m",round); - sprintf(vname,"rxsF1_ext_r%d",round); - LOG_UM(fname,vname,&eNB->pusch_vars[UE_id]->rxdataF_ext[1][0],eNB->frame_parms.N_RB_UL*12*nsymb,1,1); + if (eNB->pusch_vars[UE_id]->rxdataF_ext) { + for (int aarx=0;aarxframe_parms.nb_antennas_rx;aarx++) { + sprintf(fname,"/tmp/rxsigF%d_ext_r%d.m",aarx,round); + sprintf(vname,"rxsF%d_ext_r%d",aarx,round); + LOG_UM(fname,vname, &eNB->pusch_vars[UE_id]->rxdataF_ext[aarx][0],eNB->frame_parms.N_RB_UL*12*nsymb,1,1); + } } - /* if (eNB->srs_vars[UE_id].srs_ch_estimates) LOG_UM("/tmp/srs_est0.m","srsest0",eNB->srs_vars[UE_id].srs_ch_estimates[0],eNB->frame_parms.ofdm_symbol_size,1,1); if (eNB->frame_parms.nb_antennas_rx>1) if (eNB->srs_vars[UE_id].srs_ch_estimates) LOG_UM("/tmp/srs_est1.m","srsest1",eNB->srs_vars[UE_id].srs_ch_estimates[1],eNB->frame_parms.ofdm_symbol_size,1,1); */ - sprintf(fname,"/tmp/drs_est0_r%d.m",round); - sprintf(vname,"drsest0_r%d",round); - LOG_UM(fname,vname,eNB->pusch_vars[UE_id]->drs_ch_estimates[0],eNB->frame_parms.N_RB_UL*12*nsymb,1,1); - - if (eNB->frame_parms.nb_antennas_rx>1) { - sprintf(fname,"/tmp/drs_est1_r%d.m",round); - sprintf(vname,"drsest1_r%d",round); - LOG_UM(fname,vname,eNB->pusch_vars[UE_id]->drs_ch_estimates[1],eNB->frame_parms.N_RB_UL*12*nsymb,1,1); - } - - sprintf(fname,"/tmp/ulsch0_rxF_comp0_r%d.m",round); - sprintf(vname,"ulsch0_rxF_comp0_r%d",round); - LOG_UM(fname,vname,&eNB->pusch_vars[UE_id]->rxdataF_comp[0][0],eNB->frame_parms.N_RB_UL*12*nsymb,1,1); - if (eNB->frame_parms.nb_antennas_rx>1) { - sprintf(fname,"/tmp/ulsch0_rxF_comp1_r%d.m",round); - sprintf(vname,"ulsch0_rxF_comp1_r%d",round); - LOG_UM(fname,vname,&eNB->pusch_vars[UE_id]->rxdataF_comp[1][0],eNB->frame_parms.N_RB_UL*12*nsymb,1,1); + for (int aarx=0;aarxframe_parms.nb_antennas_rx;aarx++) { + sprintf(fname,"/tmp/drs_est%d_r%d.m",aarx,round); + sprintf(vname,"drsest%d_r%d",aarx,round); + LOG_UM(fname,vname,eNB->pusch_vars[UE_id]->drs_ch_estimates[aarx],eNB->frame_parms.N_RB_UL*12*nsymb,1,1); + sprintf(fname,"/tmp/ulsch%d_rxF_comp0_r%d.m",aarx,round); + sprintf(vname,"ulsch_rxF%d_comp0_r%d",aarx,round); + LOG_UM(fname,vname,&eNB->pusch_vars[UE_id]->rxdataF_comp[aarx][0],eNB->frame_parms.N_RB_UL*12*nsymb,1,1); } // LOG_M("ulsch_rxF_comp1.m","ulsch0_rxF_comp1",&eNB->pusch_vars[UE_id]->rxdataF_comp[0][1][0],eNB->frame_parms.N_RB_UL*12*nsymb,1,1); diff --git a/openair1/SIMULATION/LTE_PHY/ulsim.c b/openair1/SIMULATION/LTE_PHY/ulsim.c index 5e4749322f..9d3798a418 100644 --- a/openair1/SIMULATION/LTE_PHY/ulsim.c +++ b/openair1/SIMULATION/LTE_PHY/ulsim.c @@ -342,7 +342,6 @@ int main(int argc, char **argv) { int UE_id = 0; static int nb_rb=25,first_rb=0,mcs=0,round=0; //unsigned char l; - static int awgn_flag = 0 ; SCM_t channel_model=Rice1; unsigned char *input_buffer=0,harq_pid; unsigned short input_buffer_length; @@ -1087,14 +1086,12 @@ int main(int argc, char **argv) { } } - if (awgn_flag == 0) { - if (UE2eNB->max_Doppler == 0) { - multipath_channel(UE2eNB,s_re,s_im,r_re,r_im, - eNB->frame_parms.samples_per_tti,hold_channel,0); - } else { - multipath_tv_channel(UE2eNB,s_re,s_im,r_re,r_im, - 2*eNB->frame_parms.samples_per_tti,hold_channel); - } + if (UE2eNB->max_Doppler == 0) { + multipath_channel(UE2eNB,s_re,s_im,r_re,r_im, + eNB->frame_parms.samples_per_tti,hold_channel,0); + } else { + multipath_tv_channel(UE2eNB,s_re,s_im,r_re,r_im, + 2*eNB->frame_parms.samples_per_tti,hold_channel); } if(abstx) { @@ -1303,7 +1300,7 @@ int main(int argc, char **argv) { LOG_UDUMPMSG(SIM,dataArray(table_rx),table_rx->size,LOG_DUMP_DOUBLE,"The receiver raw data: \n"); } - dump_ulsch_stats(NULL,eNB,0); + dump_ulsch_stats(stdout,eNB,0); printf("\n**********rb: %d ***mcs : %d *********SNR = %f dB (%f): TX %u dB (gain %f dB), N0W %f dB, I0 %u dB, delta_IF %d [ (%d,%d) dB / (%u,%u) dB ]**************************\n", nb_rb,mcs,SNR,SNR2, tx_lev_dB, diff --git a/openair1/SIMULATION/TOOLS/multipath_channel.c b/openair1/SIMULATION/TOOLS/multipath_channel.c index 683526a8f0..3608eb7da2 100644 --- a/openair1/SIMULATION/TOOLS/multipath_channel.c +++ b/openair1/SIMULATION/TOOLS/multipath_channel.c @@ -39,13 +39,13 @@ uint8_t multipath_channel_nosigconv(channel_desc_t *desc) //#define CHANNEL_SSE #ifdef CHANNEL_SSE void multipath_channel(channel_desc_t *desc, - double tx_sig_re[2][30720*2], - double tx_sig_im[2][30720*2], - double rx_sig_re[2][30720*2], - double rx_sig_im[2][30720*2], + double tx_sig_re[NB_ANTENNAS_TX][30720*2], + double tx_sig_im[NB_ANTENANS_TX][30720*2], + double rx_sig_re[NB_ANTENNAS_RX][30720*2], + double rx_sig_im[NB_ANTENNAS_RX][30720*2], uint32_t length, uint8_t keep_channel, - int log_channel) + int log_channel) { int i,ii,j,l; @@ -146,13 +146,13 @@ void multipath_channel(channel_desc_t *desc, #else void multipath_channel(channel_desc_t *desc, - double *tx_sig_re[2], - double *tx_sig_im[2], - double *rx_sig_re[2], - double *rx_sig_im[2], + double *tx_sig_re[NB_ANTENNAS_TX], + double *tx_sig_im[NB_ANTENNAS_TX], + double *rx_sig_re[NB_ANTENNAS_RX], + double *rx_sig_im[NB_ANTENNAS_RX], uint32_t length, uint8_t keep_channel, - int log_channel) + int log_channel) { int i,ii,j,l; @@ -198,21 +198,22 @@ void multipath_channel(channel_desc_t *desc, rx_tmp.x += (tx.x * desc->ch[ii+(j*desc->nb_rx)][l].x) - (tx.y * desc->ch[ii+(j*desc->nb_rx)][l].y); rx_tmp.y += (tx.y * desc->ch[ii+(j*desc->nb_rx)][l].x) + (tx.x * desc->ch[ii+(j*desc->nb_rx)][l].y); - if (i==0 && log_channel == 1) { - printf("channel[%d][%d][%d] = %f dB (%e,%e)\n",ii,j,l,10*log10(pow(desc->ch[ii+(j*desc->nb_rx)][l].x,2.0)+pow(desc->ch[ii+(j*desc->nb_rx)][l].y,2.0)), - desc->ch[ii+(j*desc->nb_rx)][l].x, - desc->ch[ii+(j*desc->nb_rx)][l].y); - } + + if (i==0 && log_channel == 1) { + printf("channel[%d][%d][%d] = %f dB (%e,%e)\n",ii,j,l,10*log10(pow(desc->ch[ii+(j*desc->nb_rx)][l].x,2.0)+pow(desc->ch[ii+(j*desc->nb_rx)][l].y,2.0)), + desc->ch[ii+(j*desc->nb_rx)][l].x, + desc->ch[ii+(j*desc->nb_rx)][l].y); + } } //l } // j rx_sig_re[ii][i+dd] = rx_tmp.x*path_loss; rx_sig_im[ii][i+dd] = rx_tmp.y*path_loss; - - /* if ((ii==0)&&((i%32)==0)) { - printf("%p %p %f,%f => %e,%e\n",rx_sig_re[ii],rx_sig_im[ii],rx_tmp.x,rx_tmp.y,rx_sig_re[ii][i-dd],rx_sig_im[ii][i-dd]); - }*/ - +#ifdef DEBUG_CHANNEL + if ((i%32)==0) { + printf("rx aa %d: %p %p %f,%f => %e,%e\n",ii,rx_sig_re[ii],rx_sig_im[ii],rx_tmp.x,rx_tmp.y,rx_sig_re[ii][i-dd],rx_sig_im[ii][i-dd]); + } +#endif //rx_sig_re[ii][i] = sqrt(.5)*(tx_sig_re[0][i] + tx_sig_re[1][i]); //rx_sig_im[ii][i] = sqrt(.5)*(tx_sig_im[0][i] + tx_sig_im[1][i]); diff --git a/openair1/SIMULATION/TOOLS/sim.h b/openair1/SIMULATION/TOOLS/sim.h index 55a78e9778..5ba45cef81 100644 --- a/openair1/SIMULATION/TOOLS/sim.h +++ b/openair1/SIMULATION/TOOLS/sim.h @@ -300,10 +300,10 @@ void set_channeldesc_owner(channel_desc_t *cdesc, channelmod_moduleid_t module_i int random_channel(channel_desc_t *desc, uint8_t abstraction_flag); /**\fn void multipath_channel(channel_desc_t *desc, - double tx_sig_re[2], - double tx_sig_im[2], - double rx_sig_re[2], - double rx_sig_im[2], + double tx_sig_re[NB_ANTENNAS_TX], + double tx_sig_im[NB_ANTENANS_TX], + double rx_sig_re[NB_ANTENNAS_RX], + double rx_sig_im[NB_ANTENNAS_RX], uint32_t length, uint8_t keep_channel, int log_channel) @@ -320,10 +320,10 @@ int random_channel(channel_desc_t *desc, uint8_t abstraction_flag); */ void multipath_channel(channel_desc_t *desc, - double *tx_sig_re[2], - double *tx_sig_im[2], - double *rx_sig_re[2], - double *rx_sig_im[2], + double *tx_sig_re[NB_ANTENNAS_TX], + double *tx_sig_im[NB_ANTENNAS_TX], + double *rx_sig_re[NB_ANTENNAS_RX], + double *rx_sig_im[NB_ANTENNAS_RX], uint32_t length, uint8_t keep_channel, int log_channel); From e16f769174173d564e1d21c09a35f5babb780371 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Tue, 26 Jan 2021 15:33:22 +0100 Subject: [PATCH 047/579] CI: try to optimize the file system usage when building in the CI VM env. Increased the VM memory of one to allow linking Signed-off-by: Raphael Defosseux --- ci-scripts/buildOnVM.sh | 3 +++ ci-scripts/oai-ci-vm-tool | 1 + cmake_targets/tools/build_helper | 11 +++++++++++ 3 files changed, 15 insertions(+) diff --git a/ci-scripts/buildOnVM.sh b/ci-scripts/buildOnVM.sh index 861cab0782..0ba00ce07f 100755 --- a/ci-scripts/buildOnVM.sh +++ b/ci-scripts/buildOnVM.sh @@ -158,6 +158,9 @@ function build_on_vm { echo "cd tmp" >> $VM_CMDS echo "echo \"unzip -qq -DD ../localZip.zip\"" >> $VM_CMDS echo "unzip -qq -DD ../localZip.zip" >> $VM_CMDS + # Trying to make some room on filesystem before building + echo "rm ../localZip.zip" >> $VM_CMDS + echo "export CI_ENV=True" >> $VM_CMDS if [[ "$VM_NAME" == *"-cppcheck"* ]] then echo "mkdir cmake_targets/log" >> $VM_CMDS diff --git a/ci-scripts/oai-ci-vm-tool b/ci-scripts/oai-ci-vm-tool index 9b9fe462f1..b7a11f21ee 100755 --- a/ci-scripts/oai-ci-vm-tool +++ b/ci-scripts/oai-ci-vm-tool @@ -172,6 +172,7 @@ function setvar_usage { function variant__v1__enb_usrp { NB_PATTERN_FILES=9 BUILD_OPTIONS="--eNB -w USRP --mu" + VM_MEMORY=3072 } function variant__v2__basic_sim { diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index 674d4a0cac..977827b0c9 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -273,6 +273,10 @@ install_protobuf_from_source(){ make -j`nproc` $SUDO make install $SUDO ldconfig + if [[ -v CI_ENV ]]; then + cd /tmp + $SUDO rm -rf protobuf* + fi ) >& $protobuf_install_log } @@ -295,6 +299,10 @@ install_protobuf_c_from_source(){ make -j`nproc` $SUDO make install $SUDO ldconfig + if [[ -v CI_ENV ]]; then + cd /tmp + $SUDO rm -rf protobuf* + fi ) >& $protobuf_c_install_log } @@ -831,6 +839,9 @@ install_asn1c_from_source(){ $SUDO make install cd - $SUDO ldconfig + if [[ -v CI_ENV ]]; then + $SUDO rm -rf /tmp/asn1c + fi ) > $asn1_install_log 2>&1 } From 184f09538429a33d264d90a943eacc7689c0d2e1 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Wed, 27 Jan 2021 11:56:11 +0100 Subject: [PATCH 048/579] bugfix in EN-DC measurement reporting trace collection --- openair2/RRC/LTE/rrc_eNB.c | 2 ++ targets/RT/USER/eNB_usrp.gtkw | 14 ++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/openair2/RRC/LTE/rrc_eNB.c b/openair2/RRC/LTE/rrc_eNB.c index 0b1dd399cf..b4325f6495 100644 --- a/openair2/RRC/LTE/rrc_eNB.c +++ b/openair2/RRC/LTE/rrc_eNB.c @@ -4679,6 +4679,8 @@ rrc_eNB_process_MeasurementReport( X2AP_ENDC_SGNB_ADDITION_REQ(msg).rrc_buffer_size = enc_size; X2AP_ENDC_SGNB_ADDITION_REQ(msg).target_physCellId = measResults2->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->pci_r15; + if (ue_context_pP->ue_context.measResults->measResultNeighCells==NULL) + ue_context_pP->ue_context.measResults->measResultNeighCells = calloc(1,sizeof(*ue_context_pP->ue_context.measResults->measResultNeighCells)); ue_context_pP->ue_context.measResults->measResultNeighCells->present = LTE_MeasResults__measResultNeighCells_PR_measResultNeighCellListNR_r15; ue_context_pP->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->pci_r15 = measResults2->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->pci_r15; diff --git a/targets/RT/USER/eNB_usrp.gtkw b/targets/RT/USER/eNB_usrp.gtkw index bb2f5f8973..8f3aeaac62 100644 --- a/targets/RT/USER/eNB_usrp.gtkw +++ b/targets/RT/USER/eNB_usrp.gtkw @@ -1,13 +1,13 @@ [*] [*] GTKWave Analyzer v3.3.66 (w)1999-2015 BSI -[*] Thu Jan 21 13:54:47 2021 +[*] Tue Jan 26 21:45:57 2021 [*] -[dumpfile] "/home/eurecom/raymond/openair_eNB_dump.vcd" -[dumpfile_mtime] "Thu Jan 21 13:51:28 2021" -[dumpfile_size] 335122 +[dumpfile] "/home/eurecom/raymond/gtkw/openair_dump_eNB.vcd" +[dumpfile_mtime] "Tue Jan 26 21:26:33 2021" +[dumpfile_size] 180869253 [savefile] "/home/eurecom/raymond/openairinterface5g_2/openairinterface5g/targets/RT/USER/eNB_usrp.gtkw" [timestart] 11468800000 -[size] 1892 841 +[size] 1693 785 [pos] -1 -1 *-21.832302 7639830000 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 [sst_width] 386 @@ -16,11 +16,13 @@ [sst_vpaned_height] 303 @28 functions.trx_read +@29 +functions.trx_write_thread +@28 functions.trx_write @24 variables.trx_ts[63:0] variables.trx_tst[63:0] -@25 variables.trx_write_flags[63:0] @28 functions.eNB_thread_rxtx0 From 28cd23887ebb5d7e981df0defb2cec10470de233 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 27 Jan 2021 15:43:48 +0100 Subject: [PATCH 049/579] Update NR Measurements periodically, remove rsrq typo --- openair2/RRC/LTE/rrc_eNB.c | 49 ++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/openair2/RRC/LTE/rrc_eNB.c b/openair2/RRC/LTE/rrc_eNB.c index b4325f6495..0446ebd075 100644 --- a/openair2/RRC/LTE/rrc_eNB.c +++ b/openair2/RRC/LTE/rrc_eNB.c @@ -4679,29 +4679,6 @@ rrc_eNB_process_MeasurementReport( X2AP_ENDC_SGNB_ADDITION_REQ(msg).rrc_buffer_size = enc_size; X2AP_ENDC_SGNB_ADDITION_REQ(msg).target_physCellId = measResults2->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->pci_r15; - if (ue_context_pP->ue_context.measResults->measResultNeighCells==NULL) - ue_context_pP->ue_context.measResults->measResultNeighCells = calloc(1,sizeof(*ue_context_pP->ue_context.measResults->measResultNeighCells)); - ue_context_pP->ue_context.measResults->measResultNeighCells->present = LTE_MeasResults__measResultNeighCells_PR_measResultNeighCellListNR_r15; - ue_context_pP->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->pci_r15 - = measResults2->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->pci_r15; - if (!ue_context_pP->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrpResult_r15) - ue_context_pP->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrpResult_r15=calloc(1,sizeof(LTE_RSRP_RangeNR_r15_t)); - if (!ue_context_pP->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrpResult_r15) - ue_context_pP->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrqResult_r15=calloc(1,sizeof(LTE_RSRQ_RangeNR_r15_t)); - *ue_context_pP->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrpResult_r15 = *measResults2->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrpResult_r15; - *ue_context_pP->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrqResult_r15 = *measResults2->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrqResult_r15; - if (measResults2->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultRS_IndexList_r15) { - if (!ue_context_pP->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultRS_IndexList_r15) { - ue_context_pP->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultRS_IndexList_r15 = calloc(1,sizeof(struct LTE_MeasResultSSB_IndexList_r15)); - memset(&ue_context_pP->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultRS_IndexList_r15,0,sizeof(struct LTE_MeasResultSSB_IndexList_r15)); - ASN_SEQUENCE_ADD(ue_context_pP->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultRS_IndexList_r15, - measResults2->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultRS_IndexList_r15->list.array[0]); - } - else { - ue_context_pP->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultRS_IndexList_r15->list.array[0]->ssb_Index_r15 = - measResults2->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultRS_IndexList_r15->list.array[0]->ssb_Index_r15; - } - } //For the moment we have a single E-RAB which will be the one to be added to the gNB //Not sure how to select bearers to be added if there are multiple. @@ -4723,6 +4700,32 @@ rrc_eNB_process_MeasurementReport( return; } } + + if (!ue_context_pP->ue_context.measResults->measResultNeighCells) { + ue_context_pP->ue_context.measResults->measResultNeighCells = calloc(1,sizeof(*ue_context_pP->ue_context.measResults->measResultNeighCells)); + ue_context_pP->ue_context.measResults->measResultNeighCells->present = LTE_MeasResults__measResultNeighCells_PR_measResultNeighCellListNR_r15; + ue_context_pP->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array = calloc(1, sizeof(ue_context_pP->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array)); + ue_context_pP->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0] = calloc(1, sizeof(*ue_context_pP->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array)); + ue_context_pP->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.count = 1; + } + struct LTE_MeasResultCellNR_r15 *ueCtxtMeasResultCellNR_r15 = ue_context_pP->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]; + const struct LTE_MeasResultCellNR_r15 *measNeighCellNR0 = measResults2->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]; + ueCtxtMeasResultCellNR_r15->pci_r15 = measNeighCellNR0->pci_r15; + if (!ueCtxtMeasResultCellNR_r15->measResultCell_r15.rsrpResult_r15) + ueCtxtMeasResultCellNR_r15->measResultCell_r15.rsrpResult_r15 = calloc(1, sizeof(*ueCtxtMeasResultCellNR_r15->measResultCell_r15.rsrpResult_r15)); + if (!ueCtxtMeasResultCellNR_r15->measResultCell_r15.rsrqResult_r15) + ueCtxtMeasResultCellNR_r15->measResultCell_r15.rsrqResult_r15 = calloc(1, sizeof(*ueCtxtMeasResultCellNR_r15->measResultCell_r15.rsrqResult_r15)); + *ueCtxtMeasResultCellNR_r15->measResultCell_r15.rsrpResult_r15 = *measNeighCellNR0->measResultCell_r15.rsrpResult_r15; + *ueCtxtMeasResultCellNR_r15->measResultCell_r15.rsrqResult_r15 = *measNeighCellNR0->measResultCell_r15.rsrqResult_r15; + if (measNeighCellNR0->measResultRS_IndexList_r15) { + if (!ueCtxtMeasResultCellNR_r15->measResultRS_IndexList_r15) { + ueCtxtMeasResultCellNR_r15->measResultRS_IndexList_r15 = calloc(1,sizeof(*ueCtxtMeasResultCellNR_r15->measResultRS_IndexList_r15)); + ueCtxtMeasResultCellNR_r15->measResultRS_IndexList_r15->list.array = calloc(1, sizeof(ueCtxtMeasResultCellNR_r15->measResultRS_IndexList_r15->list.array)); + ueCtxtMeasResultCellNR_r15->measResultRS_IndexList_r15->list.array[0] = calloc(1, sizeof(*ueCtxtMeasResultCellNR_r15->measResultRS_IndexList_r15->list.array)); + ueCtxtMeasResultCellNR_r15->measResultRS_IndexList_r15->list.count = 1; + } + ueCtxtMeasResultCellNR_r15->measResultRS_IndexList_r15->list.array[0]->ssb_Index_r15 = measNeighCellNR0->measResultRS_IndexList_r15->list.array[0]->ssb_Index_r15; + } } if (measResults2->measResultNeighCells == NULL) From 89657f20e6c32d4bc20d40184e3c310aa9e7d414 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Wed, 27 Jan 2021 21:03:47 +0100 Subject: [PATCH 050/579] testing with N310 4x4 eNB 20 MHz --- .../PHY/LTE_ESTIMATION/lte_adjust_sync_eNB.c | 4 +- .../PHY/LTE_ESTIMATION/lte_eNB_measurements.c | 29 ++++---- openair1/PHY/LTE_TRANSPORT/pucch.c | 68 +++++++++---------- targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp | 10 +-- targets/RT/USER/lte-enb.c | 5 ++ 5 files changed, 61 insertions(+), 55 deletions(-) diff --git a/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync_eNB.c b/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync_eNB.c index 8d66b7d535..aac8e71828 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync_eNB.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync_eNB.c @@ -121,8 +121,8 @@ int lte_est_timing_advance_pusch(LTE_DL_FRAME_PARMS *frame_parms, int sync_pos = 0;//(frame_parms->ofdm_symbol_size-cyclic_shift*frame_parms->ofdm_symbol_size/12)%(frame_parms->ofdm_symbol_size); AssertFatal(frame_parms->ofdm_symbol_size > 127,"frame_parms->ofdm_symbol_size %d<128\n",frame_parms->ofdm_symbol_size); - AssertFatal(frame_parms->nb_antennas_rx >0 && frame_parms->nb_antennas_rx<=NB_ANTENNAS_RX,"frame_parms->nb_antennas_rx %d not in [1...%d]\n", - frame_parms->nb_antennas_rx,NB_ANTENNAS_RX); + AssertFatal(frame_parms->nb_antennas_rx >0 && frame_parms->nb_antennas_rx<=4,"frame_parms->nb_antennas_rx %d not in [1...%d]\n", + frame_parms->nb_antennas_rx,4); for (i = 0; i < frame_parms->ofdm_symbol_size; i++) { temp = 0; diff --git a/openair1/PHY/LTE_ESTIMATION/lte_eNB_measurements.c b/openair1/PHY/LTE_ESTIMATION/lte_eNB_measurements.c index 1518d42b31..7eeeb998ba 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_eNB_measurements.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_eNB_measurements.c @@ -112,34 +112,33 @@ void lte_eNB_I0_measurements(PHY_VARS_eNB *eNB, for (aarx=0; aarxnb_antennas_rx; aarx++) { measurements->n0_subband_power[aarx][rb] = 0; for (int s=0;s<(14-(frame_parms->Ncp<<1));s++) { - // select the 7th symbol in an uplink subframe - offset = offset0 + (s*frame_parms->ofdm_symbol_size); - ul_ch = &common_vars->rxdataF[aarx][offset]; - len = 12; + offset = offset0 + (s*frame_parms->ofdm_symbol_size); + ul_ch = &common_vars->rxdataF[aarx][offset]; + len = 12; // just do first half of middle PRB for odd number of PRBs - if (((frame_parms->N_RB_UL&1) == 1) && - (rb==(frame_parms->N_RB_UL>>1))) { - len=6; - } + if (((frame_parms->N_RB_UL&1) == 1) && + (rb==(frame_parms->N_RB_UL>>1))) { + len=6; + } - AssertFatal(ul_ch, "RX signal buffer (freq) problem"); + AssertFatal(ul_ch, "RX signal buffer (freq) problem"); - measurements->n0_subband_power[aarx][rb] += signal_energy_nodc(ul_ch,len); + measurements->n0_subband_power[aarx][rb] += signal_energy_nodc(ul_ch,len); - } + } // symbol measurements->n0_subband_power[aarx][rb]/=(14-(frame_parms->Ncp<<1)); measurements->n0_subband_power_dB[aarx][rb] = dB_fixed(measurements->n0_subband_power[aarx][rb]); n0_power_tot += measurements->n0_subband_power[aarx][rb]; - } + } //antenna n0_power_tot/=frame_parms->nb_antennas_rx; n0_power_tot2 += n0_power_tot; - measurements->n0_subband_power_tot_dB[rb] = dB_fixed(n0_power_tot/frame_parms->nb_antennas_rx); + measurements->n0_subband_power_tot_dB[rb] = dB_fixed(n0_power_tot); measurements->n0_subband_power_tot_dBm[rb] = measurements->n0_subband_power_tot_dB[rb] - eNB->rx_total_gain_dB - dB_fixed(frame_parms->N_RB_UL); - } - } + } //rb not used in subframe + } //rb if (nb_rb>0) measurements->n0_subband_power_avg_dB = dB_fixed(n0_power_tot2/nb_rb); } diff --git a/openair1/PHY/LTE_TRANSPORT/pucch.c b/openair1/PHY/LTE_TRANSPORT/pucch.c index f2fa77ecad..81f668488e 100644 --- a/openair1/PHY/LTE_TRANSPORT/pucch.c +++ b/openair1/PHY/LTE_TRANSPORT/pucch.c @@ -99,7 +99,7 @@ void dump_uci_stats(FILE *fd,PHY_VARS_eNB *eNB,int frame) { /* PUCCH format3 >> */ /* SubCarrier Demap */ uint16_t pucchfmt3_subCarrierDeMapping( PHY_VARS_eNB *eNB, - int16_t SubCarrierDeMapData[NB_ANTENNAS_RX][14][12][2], + int16_t SubCarrierDeMapData[4][14][12][2], uint16_t n3_pucch ) { LTE_eNB_COMMON *eNB_common_vars = &eNB->common_vars; LTE_DL_FRAME_PARMS *frame_parms = &eNB->frame_parms; @@ -149,8 +149,8 @@ uint16_t pucchfmt3_subCarrierDeMapping( PHY_VARS_eNB *eNB, } /* cyclic shift hopping remove */ -uint16_t pucchfmt3_Baseseq_csh_remove( int16_t SubCarrierDeMapData[NB_ANTENNAS_RX][14][12][2], - int16_t CshData_fmt3[NB_ANTENNAS_RX][14][12][2], +uint16_t pucchfmt3_Baseseq_csh_remove( int16_t SubCarrierDeMapData[4][14][12][2], + int16_t CshData_fmt3[4][14][12][2], LTE_DL_FRAME_PARMS *frame_parms, uint8_t subframe, uint8_t ncs_cell[20][7] ) { @@ -200,9 +200,9 @@ const int16_t TBL_3_SF5_GEN_N_DASH_NS[MAXROW_TBL_SF5_OS_IDX] = {0,3,6,8,10}; const int16_t TBL_3_SF4_GEN_N_DASH_NS[MAXROW_TBL_SF4_OS_IDX] = {0,3,6,9}; /* Channel estimation */ -uint16_t pucchfmt3_ChannelEstimation( int16_t SubCarrierDeMapData[NB_ANTENNAS_RX][14][12][2], - double delta_theta[NB_ANTENNAS_RX][12], - int16_t ChestValue[NB_ANTENNAS_RX][2][12][2], +uint16_t pucchfmt3_ChannelEstimation( int16_t SubCarrierDeMapData[4][14][12][2], + double delta_theta[4][12], + int16_t ChestValue[4][2][12][2], int16_t *Interpw, uint8_t subframe, uint8_t shortened_format, @@ -214,12 +214,12 @@ uint16_t pucchfmt3_ChannelEstimation( int16_t SubCarrierDeMapData[NB_ANTENNAS_RX int16_t np, np_n, ip_ind=-1; //int16_t npucch_sf; int16_t calctmp[2]; - int16_t BsCshData[NB_ANTENNAS_RX][D_NSYM1SF][D_NSC1RB][2]; - //int16_t delta_theta_calctmp[NB_ANTENNAS_RX][4][D_NSC1RB][2], delta_theta_comp[NB_ANTENNAS_RX][D_NSC1RB][2]; - int16_t delta_theta_comp[NB_ANTENNAS_RX][D_NSC1RB][2]; - int16_t CsData_allavg[NB_ANTENNAS_RX][14][2]; - int16_t CsData_temp[NB_ANTENNAS_RX][D_NSYM1SF][D_NSC1RB][2]; - int32_t IP_CsData_allsfavg[NB_ANTENNAS_RX][14][4][2]; + int16_t BsCshData[4][D_NSYM1SF][D_NSC1RB][2]; + //int16_t delta_theta_calctmp[4][4][D_NSC1RB][2], delta_theta_comp[4][D_NSC1RB][2]; + int16_t delta_theta_comp[4][D_NSC1RB][2]; + int16_t CsData_allavg[4][14][2]; + int16_t CsData_temp[4][D_NSYM1SF][D_NSC1RB][2]; + int32_t IP_CsData_allsfavg[4][14][4][2]; int32_t IP_allavg[D_NPUCCH_SF5]; //int16_t temp_ch[2]; int16_t m[NUMBER_OF_UE_MAX], m_self=0, same_m_number; @@ -463,9 +463,9 @@ uint16_t pucchfmt3_ChannelEstimation( int16_t SubCarrierDeMapData[NB_ANTENNAS_RX } /* Channel Equalization */ -uint16_t pucchfmt3_Equalization( int16_t CshData_fmt3[NB_ANTENNAS_RX][14][12][2], - int16_t ChdetAfterValue_fmt3[NB_ANTENNAS_RX][14][12][2], - int16_t ChestValue[NB_ANTENNAS_RX][2][12][2], +uint16_t pucchfmt3_Equalization( int16_t CshData_fmt3[4][14][12][2], + int16_t ChdetAfterValue_fmt3[4][14][12][2], + int16_t ChestValue[4][2][12][2], LTE_DL_FRAME_PARMS *frame_parms) { int16_t aa, sltNo, symNo, k; @@ -488,9 +488,9 @@ uint16_t pucchfmt3_Equalization( int16_t CshData_fmt3[NB_ANTENNAS_RX][14][12][2] } /* Frequency deviation remove AFC */ -uint16_t pucchfmt3_FrqDevRemove( int16_t ChdetAfterValue_fmt3[NB_ANTENNAS_RX][14][12][2], - double delta_theta[NB_ANTENNAS_RX][12], - int16_t RemoveFrqDev_fmt3[NB_ANTENNAS_RX][2][5][12][2], +uint16_t pucchfmt3_FrqDevRemove( int16_t ChdetAfterValue_fmt3[4][14][12][2], + double delta_theta[4][12], + int16_t RemoveFrqDev_fmt3[4][2][5][12][2], LTE_DL_FRAME_PARMS *frame_parms ) { int16_t aa, sltNo, symNo1slt, k, n; double calctmp[2]; @@ -540,8 +540,8 @@ const int16_t TBL_3_SF4[MAXROW_TBL_SF4_fmt3][MAXCLM_TBL_SF4][2] = { }; /* orthogonal sequence remove */ -uint16_t pucchfmt3_OrthSeqRemove( int16_t RemoveFrqDev_fmt3[NB_ANTENNAS_RX][2][5][12][2], - int16_t Fmt3xDataRmvOrth[NB_ANTENNAS_RX][2][5][12][2], +uint16_t pucchfmt3_OrthSeqRemove( int16_t RemoveFrqDev_fmt3[4][2][5][12][2], + int16_t Fmt3xDataRmvOrth[4][2][5][12][2], uint8_t shortened_format, uint16_t n3_pucch, LTE_DL_FRAME_PARMS *frame_parms ) { @@ -587,7 +587,7 @@ uint16_t pucchfmt3_OrthSeqRemove( int16_t RemoveFrqDev_fmt3[NB_ANTENNAS_RX][2][5 } /* averaging antenna */ -uint16_t pucchfmt3_AvgAnt( int16_t Fmt3xDataRmvOrth[NB_ANTENNAS_RX][2][5][12][2], +uint16_t pucchfmt3_AvgAnt( int16_t Fmt3xDataRmvOrth[4][2][5][12][2], int16_t Fmt3xDataAvgAnt[2][5][12][2], uint8_t shortened_format, LTE_DL_FRAME_PARMS *frame_parms ) { @@ -775,7 +775,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, uint32_t u,v,n,aa; uint32_t z[12*14]; int16_t *zptr; - int16_t rxcomp[NB_ANTENNAS_RX][2*12*14]; + int16_t rxcomp[4][2*12*14]; uint8_t ns,N_UL_symb,nsymb,n_oc,n_oc0,n_oc1; uint8_t c = (frame_parms->Ncp==0) ? 3 : 2; int16_t nprime,nprime0,nprime1; @@ -786,12 +786,12 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, int16_t tmp_re,tmp_im,W_re=0,W_im=0; int16_t *rxptr; uint32_t symbol_offset; - int16_t stat0_ref_re[NB_ANTENNAS_RX],stat0_ref_im[NB_ANTENNAS_RX],stat1_ref_re[NB_ANTENNAS_RX],stat1_ref_im[NB_ANTENNAS_RX],*cfo; - int16_t chest0_re[NB_ANTENNAS_RX][12],chest0_im[NB_ANTENNAS_RX][12]; - int16_t chest1_re[NB_ANTENNAS_RX][12],chest1_im[NB_ANTENNAS_RX][12]; + int16_t stat0_ref_re[4],stat0_ref_im[4],stat1_ref_re[4],stat1_ref_im[4],*cfo; + int16_t chest0_re[4][12],chest0_im[4][12]; + int16_t chest1_re[4][12],chest1_im[4][12]; int32_t chest_mag; - int32_t stat0_re[NB_ANTENNAS_RX],stat1_re[NB_ANTENNAS_RX],stat0_im[NB_ANTENNAS_RX],stat1_im[NB_ANTENNAS_RX]; - uint32_t stat0[NB_ANTENNAS_RX],stat1[NB_ANTENNAS_RX],stat_max=0,stat0_max[NB_ANTENNAS_RX],stat1_max[NB_ANTENNAS_RX]; + int32_t stat0_re[4],stat1_re[4],stat0_im[4],stat1_im[4]; + uint32_t stat0[4],stat1[4],stat_max=0,stat0_max[4],stat1_max[4]; uint8_t log2_maxh; uint8_t deltaPUCCH_Shift = frame_parms->pucch_config_common.deltaPUCCH_Shift; uint8_t NRB2 = frame_parms->pucch_config_common.nRB_CQI; @@ -803,13 +803,13 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, int chL; /* PUCCH format3 >> */ uint16_t Ret = 0; - int16_t SubCarrierDeMapData[NB_ANTENNAS_RX][14][12][2]; //[Antenna][Symbol][Subcarrier][Complex] - int16_t CshData_fmt3[NB_ANTENNAS_RX][14][12][2]; //[Antenna][Symbol][Subcarrier][Complex] - double delta_theta[NB_ANTENNAS_RX][12]; //[Antenna][Subcarrier][Complex] - int16_t ChestValue[NB_ANTENNAS_RX][2][12][2]; //[Antenna][Slot][Subcarrier][Complex] - int16_t ChdetAfterValue_fmt3[NB_ANTENNAS_RX][14][12][2]; //[Antenna][Symbol][Subcarrier][Complex] - int16_t RemoveFrqDev_fmt3[NB_ANTENNAS_RX][2][5][12][2]; //[Antenna][Slot][PUCCH_Symbol][Subcarrier][Complex] - int16_t Fmt3xDataRmvOrth[NB_ANTENNAS_RX][2][5][12][2]; //[Antenna][Slot][PUCCH_Symbol][Subcarrier][Complex] + int16_t SubCarrierDeMapData[4][14][12][2]; //[Antenna][Symbol][Subcarrier][Complex] + int16_t CshData_fmt3[4][14][12][2]; //[Antenna][Symbol][Subcarrier][Complex] + double delta_theta[4][12]; //[Antenna][Subcarrier][Complex] + int16_t ChestValue[4][2][12][2]; //[Antenna][Slot][Subcarrier][Complex] + int16_t ChdetAfterValue_fmt3[4][14][12][2]; //[Antenna][Symbol][Subcarrier][Complex] + int16_t RemoveFrqDev_fmt3[4][2][5][12][2]; //[Antenna][Slot][PUCCH_Symbol][Subcarrier][Complex] + int16_t Fmt3xDataRmvOrth[4][2][5][12][2]; //[Antenna][Slot][PUCCH_Symbol][Subcarrier][Complex] int16_t Fmt3xDataAvgAnt[2][5][12][2]; //[Slot][PUCCH_Symbol][Subcarrier][Complex] int16_t Fmt3xDataAvgSym[2][12][2]; //[Slot][Subcarrier][Complex] int16_t IFFTOutData_Fmt3[2][12][2]; //[Slot][Subcarrier][Complex] diff --git a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp index 12d67fa624..091a508616 100644 --- a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp +++ b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp @@ -624,14 +624,14 @@ static int trx_usrp_read(openair0_device *device, openair0_timestamp *ptimestamp #if defined(__x86_64) || defined(__i386__) #ifdef __AVX2__ nsamps2 = (nsamps+7)>>3; - __m256i buff_tmp[2][nsamps2]; + __m256i buff_tmp[4][nsamps2]; #else nsamps2 = (nsamps+3)>>2; - __m128i buff_tmp[2][nsamps2]; + __m128i buff_tmp[4][nsamps2]; #endif #elif defined(__arm__) nsamps2 = (nsamps+3)>>2; - int16x8_t buff_tmp[2][nsamps2]; + int16x8_t buff_tmp[4][nsamps2]; #endif int rxshift; @@ -1301,8 +1301,10 @@ extern "C" { LOG_I(HW,"rx_max_num_samps %zu\n", s->usrp->get_rx_stream(stream_args_rx)->get_max_num_samps()); - for (int i = 0; irx_stream = s->usrp->get_rx_stream(stream_args_rx); uhd::stream_args_t stream_args_tx("sc16", "sc16"); diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c index 7e8b971e5d..29a029e8d8 100644 --- a/targets/RT/USER/lte-enb.c +++ b/targets/RT/USER/lte-enb.c @@ -551,6 +551,8 @@ int wakeup_tx(PHY_VARS_eNB *eNB, L1_rxtx_proc_t *L1_proc_tx = &eNB->proc.L1_proc_tx; int ret; LOG_D(PHY,"ENTERED wakeup_tx (IC %d)\n",L1_proc_tx->instance_cnt); + // check if subframe is a has TX else return + if (subframe_select(&eNB->frame_parms,subframe_tx) == SF_UL) return 0; AssertFatal((ret = pthread_mutex_lock(&L1_proc_tx->mutex))==0,"mutex_lock returns %d\n",ret); LOG_D(PHY,"L1 RX %d.%d Waiting to wake up L1 TX %d.%d (IC L1TX %d)\n",frame_rx,subframe_rx,frame_tx,subframe_tx,L1_proc_tx->instance_cnt); @@ -591,7 +593,10 @@ int wakeup_rxtx(PHY_VARS_eNB *eNB, if (L1_proc->instance_cnt == 0) { // L1_thread is busy so abort the subframe AssertFatal((ret=pthread_mutex_unlock( &L1_proc->mutex))==0,"mutex_unlock return %d\n",ret); LOG_W(PHY,"L1_thread isn't ready in %d.%d, aborting RX processing\n",ru_proc->frame_rx,ru_proc->tti_rx); + AssertFatal(1==0,"L1_thread isn't ready in %d.%d (L1RX %d.%d), aborting RX, exiting\n", + ru_proc->frame_rx,ru_proc->tti_rx,L1_proc->frame_rx,L1_proc->subframe_rx); return(0); + } ++L1_proc->instance_cnt; From 616eb6700f30abb9500a764000a20f5856e09150 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Wed, 27 Jan 2021 23:40:34 +0100 Subject: [PATCH 051/579] NR RSRP/RSRQ conversion routines --- .../PHY/LTE_ESTIMATION/lte_eNB_measurements.c | 2 +- openair2/RRC/LTE/rrc_eNB.c | 46 +++++++++++++++++-- 2 files changed, 44 insertions(+), 4 deletions(-) diff --git a/openair1/PHY/LTE_ESTIMATION/lte_eNB_measurements.c b/openair1/PHY/LTE_ESTIMATION/lte_eNB_measurements.c index 1518d42b31..d83b022458 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_eNB_measurements.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_eNB_measurements.c @@ -135,7 +135,7 @@ void lte_eNB_I0_measurements(PHY_VARS_eNB *eNB, } n0_power_tot/=frame_parms->nb_antennas_rx; n0_power_tot2 += n0_power_tot; - measurements->n0_subband_power_tot_dB[rb] = dB_fixed(n0_power_tot/frame_parms->nb_antennas_rx); + measurements->n0_subband_power_tot_dB[rb] = dB_fixed(n0_power_tot); measurements->n0_subband_power_tot_dBm[rb] = measurements->n0_subband_power_tot_dB[rb] - eNB->rx_total_gain_dB - dB_fixed(frame_parms->N_RB_UL); } diff --git a/openair2/RRC/LTE/rrc_eNB.c b/openair2/RRC/LTE/rrc_eNB.c index 0446ebd075..ebc1c86cf2 100644 --- a/openair2/RRC/LTE/rrc_eNB.c +++ b/openair2/RRC/LTE/rrc_eNB.c @@ -1283,7 +1283,7 @@ rrc_eNB_generate_UECapabilityEnquiry( T(T_ENB_RRC_UE_CAPABILITY_ENQUIRY, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti)); int16_t eutra_band = RC.rrc[ctxt_pP->module_id]->configuration.eutra_band[0]; - uint32_t nr_band = 78;//RC.rrc[ctxt_pP->module_id]->nr_neigh_freq_band[0][0]; + uint32_t nr_band = RC.rrc[ctxt_pP->module_id]->nr_neigh_freq_band[0][0]; size = do_UECapabilityEnquiry( ctxt_pP, buffer, @@ -3441,6 +3441,7 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t ASN_SEQUENCE_ADD(&ReportConfig_list->list, ReportConfig_A5); if (ue_context_pP->ue_context.does_nr) { + LOG_I(RRC,"Configuring measurement for NR cell\n"); ReportConfig_NR->reportConfigId = 7; ReportConfig_NR->reportConfig.present = LTE_ReportConfigToAddMod__reportConfig_PR_reportConfigInterRAT; ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.triggerType.present = LTE_ReportConfigInterRAT__triggerType_PR_event; @@ -7927,6 +7928,45 @@ is_en_dc_supported( #undef NCE } +int to_nr_rsrpq(long rsrpq_result,int nr_band) { + + switch(nr_band) { + case 1: // A + case 70: + case 74: + case 34: + case 38: + case 39: + case 40: + case 50: + case 51: + return((rsrpq_result*10)-1180); + case 66: // B + return((rsrpq_result*10)-1175); + case 77: // C + case 78: + case 79: + return((rsrpq_result*10)-1170); + case 28: // D + return((rsrpq_result*10)-1165); + case 2: + case 5: + case 7: + case 41: // E + return((rsrpq_result*10)-1160); + case 3: // G + case 8: + case 12: + case 20: + case 71: + return((rsrpq_result*10)-1150); + case 25: // H + return((rsrpq_result*10)-1145); + default: + AssertFatal(1==0,"Illegal NR band %d\n",nr_band); + } +} + //----------------------------------------------------------------------------- int rrc_eNB_decode_dcch( @@ -9129,9 +9169,9 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) { fprintf(fd,"NR_pci %ld\n",ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->pci_r15); if(ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrpResult_r15) - fprintf(fd,"NR_rsrp %ld\n",*ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrpResult_r15-140); + fprintf(fd,"NR_rsrp %f dB\n",to_nr_rsrpq(*ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrpResult_r15,RC.rrc[ctxt_pP->module_id]->nr_neigh_freq_band[0][0])/10.0); if (ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrqResult_r15) - fprintf(fd,"NR_rsrq %ld\n",*ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrqResult_r15/2 - 20); + fprintf(fd,"NR_rsrq %f dB\n",to_nr_rsrpq(*ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrqResult_r15,RC.rrc[ctxt_pP->module_id]->nr_neigh_freq_band[0][0])/10.0); if (ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultRS_IndexList_r15) fprintf(fd,"NR_ssb_index %ld\n",ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultRS_IndexList_r15->list.array[0]->ssb_Index_r15); } From 78f14bc9a4b9cba42da0886fdae742f55ce42a1c Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Thu, 28 Jan 2021 21:53:24 +0100 Subject: [PATCH 052/579] fixed build for oairu executable. tested with sirius/phoenix --- cmake_targets/CMakeLists.txt | 1 + openair1/PHY/INIT/nr_init_ru.c | 2 +- openair1/SIMULATION/TOOLS/random_channel.c | 2 +- openair1/SIMULATION/TOOLS/sim.h | 1 - targets/RT/USER/rfsim.h | 40 ---------------------- 5 files changed, 3 insertions(+), 43 deletions(-) delete mode 100644 targets/RT/USER/rfsim.h diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index a1c73024be..41a51eec1e 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -2986,6 +2986,7 @@ add_executable(oairu ${CONFIG_SOURCES} ${OPENAIR_DIR}/common/utils/utils.c ${OPENAIR_DIR}/common/utils/system.c + ${OPENAIR_DIR}/common/utils/lte/prach_utils.c ${SHLIB_LOADER_SOURCES} ) target_link_libraries (oairu diff --git a/openair1/PHY/INIT/nr_init_ru.c b/openair1/PHY/INIT/nr_init_ru.c index ad387f0151..7a16a29bb0 100644 --- a/openair1/PHY/INIT/nr_init_ru.c +++ b/openair1/PHY/INIT/nr_init_ru.c @@ -29,7 +29,7 @@ #include "assertions.h" #include #include "openair1/PHY/defs_RU.h" -#include "openair1/PHY/NR_TRANSPORT/nr_transport_proto.h" +//#include "openair1/PHY/NR_TRANSPORT/nr_transport_proto.h" extern const char ru_if_types[MAX_RU_IF_TYPES][20]; diff --git a/openair1/SIMULATION/TOOLS/random_channel.c b/openair1/SIMULATION/TOOLS/random_channel.c index 8c063fadc0..357ac0db85 100644 --- a/openair1/SIMULATION/TOOLS/random_channel.c +++ b/openair1/SIMULATION/TOOLS/random_channel.c @@ -1961,7 +1961,7 @@ static int channelmod_modify_cmd(char *buff, int debug, telnet_printfunc_t prnt) display_channelmodel(defined_channels[cd_id],debug,prnt); free(param); free(value); - random_channel(defined_channels[cd_id],false); + random_channel(defined_channels[cd_id],0); } return CMDSTATUS_FOUND; } diff --git a/openair1/SIMULATION/TOOLS/sim.h b/openair1/SIMULATION/TOOLS/sim.h index 55a78e9778..d9f3175cc0 100644 --- a/openair1/SIMULATION/TOOLS/sim.h +++ b/openair1/SIMULATION/TOOLS/sim.h @@ -472,7 +472,6 @@ uint16_t LUTSin[ResolSinCos+1]; void InitSinLUT( void ); void phase_noise(double ts, int16_t * InRe, int16_t * InIm); -#include "targets/RT/USER/rfsim.h" void do_DL_sig(sim_t *sim, uint16_t subframe, diff --git a/targets/RT/USER/rfsim.h b/targets/RT/USER/rfsim.h deleted file mode 100644 index 801ab5eb56..0000000000 --- a/targets/RT/USER/rfsim.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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 - */ -#ifndef __RFSIM__H__ -#define __RFSIM__H__ -#include "lte-softmodem.h" -#include "openair1/SIMULATION/TOOLS/sim.h" -#include "platform_constants.h" -#include "common/ran_context.h" -#include "PHY/defs_UE.h" -#include "PHY/defs_eNB.h" - -void init_ocm(void); - -void update_ocm(double snr_dB,double sinr_dB); - -//extern pthread_mutex_t async_server_lock; -//extern pthread_cond_t async_server_notify; -//extern int async_server_shutdown; - -void init_channel_vars(void); - -#endif From 579a573b909bff0af4663f146c51005357c52708 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Sat, 30 Jan 2021 22:34:16 +0100 Subject: [PATCH 053/579] unitary simulations build --- .../CODING/TESTBENCH/coding_unitary_defs.h | 53 +++++++++++++++++++ openair1/PHY/CODING/TESTBENCH/ldpctest.c | 6 +-- openair1/PHY/CODING/TESTBENCH/polartest.c | 6 +-- .../PHY/CODING/TESTBENCH/smallblocktest.c | 5 +- openair1/PHY/INIT/lte_init.c | 1 + openair1/SIMULATION/LTE_PHY/dlsim.c | 2 +- openair1/SIMULATION/LTE_PHY/ulsim.c | 2 + openair1/SIMULATION/NR_PHY/dlsim.c | 2 + openair1/SIMULATION/NR_PHY/prachsim.c | 2 +- openair1/SIMULATION/NR_PHY/pucchsim.c | 1 + openair1/SIMULATION/NR_PHY/ulsim.c | 1 + openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 1 + 12 files changed, 67 insertions(+), 15 deletions(-) create mode 100644 openair1/PHY/CODING/TESTBENCH/coding_unitary_defs.h diff --git a/openair1/PHY/CODING/TESTBENCH/coding_unitary_defs.h b/openair1/PHY/CODING/TESTBENCH/coding_unitary_defs.h new file mode 100644 index 0000000000..f77ffff2eb --- /dev/null +++ b/openair1/PHY/CODING/TESTBENCH/coding_unitary_defs.h @@ -0,0 +1,53 @@ +/* + * 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 + */ + +#ifndef __CODING_UNITARY_DEFS__h__ +#define __CODING_UNITARY_DEFS__h__ +int oai_exit=0; +unsigned int NB_UE_INST = 1; +#include "openair1/PHY/defs_UE.h" +PHY_VARS_UE ***PHY_vars_UE_g; +#include "common/ran_context.h" +RAN_CONTEXT_t RC; + +void exit_function(const char* file, const char* function, const int line, const char *s) { + const char * msg= s==NULL ? "no comment": s; + printf("Exiting at: %s:%d %s(), %s\n", file, line, function, msg); + exit(-1); +} + +signed char quantize(double D, double x, unsigned char B) { + double qxd; + short maxlev; + qxd = floor(x / D); + maxlev = 1 << (B - 1); //(char)(pow(2,B-1)); + + if (qxd <= -maxlev) + qxd = -maxlev; + else if (qxd >= maxlev) + qxd = maxlev - 1; + + return ((char) qxd); +} + + +#endif + diff --git a/openair1/PHY/CODING/TESTBENCH/ldpctest.c b/openair1/PHY/CODING/TESTBENCH/ldpctest.c index fb0955f045..c2ecc6e89f 100644 --- a/openair1/PHY/CODING/TESTBENCH/ldpctest.c +++ b/openair1/PHY/CODING/TESTBENCH/ldpctest.c @@ -26,9 +26,10 @@ #include "assertions.h" #include "SIMULATION/TOOLS/sim.h" #include "PHY/CODING/nrLDPC_extern.h" -#include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h" +//#include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h" #include "openair1/PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_decoder_LYC.h" #include "openair1/PHY/defs_nr_common.h" +#include "coding_unitary_defs.h" #define MAX_BLOCK_LENGTH 8448 @@ -82,9 +83,6 @@ typedef struct { int n_iter_max; } n_iter_stats_t; -RAN_CONTEXT_t RC; -PHY_VARS_UE ***PHY_vars_UE_g; -uint16_t NB_UE_INST = 1; nrLDPC_encoderfunc_t encoder_orig; short lift_size[51]= {2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,18,20,22,24,26,28,30,32,36,40,44,48,52,56,60,64,72,80,88,96,104,112,120,128,144,160,176,192,208,224,240,256,288,320,352,384}; diff --git a/openair1/PHY/CODING/TESTBENCH/polartest.c b/openair1/PHY/CODING/TESTBENCH/polartest.c index d9adf3e24f..1943bc1798 100644 --- a/openair1/PHY/CODING/TESTBENCH/polartest.c +++ b/openair1/PHY/CODING/TESTBENCH/polartest.c @@ -11,16 +11,12 @@ #include "PHY/CODING/nrPolar_tools/nr_polar_uci_defs.h" #include "PHY/CODING/coding_defs.h" #include "SIMULATION/TOOLS/sim.h" -#include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h" //#include "common/utils/LOG/log.h" - +#include "coding_unitary_defs.h" //#define DEBUG_DCI_POLAR_PARAMS //#define DEBUG_POLAR_TIMING //#define DEBUG_POLARTEST -RAN_CONTEXT_t RC; -PHY_VARS_UE ***PHY_vars_UE_g; -uint16_t NB_UE_INST = 1; int main(int argc, char *argv[]) { diff --git a/openair1/PHY/CODING/TESTBENCH/smallblocktest.c b/openair1/PHY/CODING/TESTBENCH/smallblocktest.c index 02d5dc64e0..e8c3460fec 100644 --- a/openair1/PHY/CODING/TESTBENCH/smallblocktest.c +++ b/openair1/PHY/CODING/TESTBENCH/smallblocktest.c @@ -1,13 +1,10 @@ #include #include "SIMULATION/TOOLS/sim.h" #include "PHY/CODING/nrSmallBlock/nr_small_block_defs.h" -#include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h" +#include "coding_unitary_defs.h" //#define DEBUG_SMALLBLOCKTEST -RAN_CONTEXT_t RC; -PHY_VARS_UE ***PHY_vars_UE_g; -uint16_t NB_UE_INST = 1; int main(int argc, char *argv[]) { diff --git a/openair1/PHY/INIT/lte_init.c b/openair1/PHY/INIT/lte_init.c index 9e791123e3..084e614352 100644 --- a/openair1/PHY/INIT/lte_init.c +++ b/openair1/PHY/INIT/lte_init.c @@ -46,6 +46,7 @@ uint8_t dmrs1_tab[8] = { 0, 2, 3, 4, 6, 8, 9, 10 }; int N_RB_DL_array[6] = { 6, 15, 25, 50, 75, 100 }; +#include "common/ran_context.h" extern RAN_CONTEXT_t RC; void pdsch_procedures(PHY_VARS_eNB *eNB, diff --git a/openair1/SIMULATION/LTE_PHY/dlsim.c b/openair1/SIMULATION/LTE_PHY/dlsim.c index 5d5d146049..00e83159c0 100644 --- a/openair1/SIMULATION/LTE_PHY/dlsim.c +++ b/openair1/SIMULATION/LTE_PHY/dlsim.c @@ -60,7 +60,7 @@ #include "dummy_functions.c" #include "executables/thread-common.h" #include "executables/split_headers.h" - +#include "common/ran_context.h" void feptx_ofdm(RU_t *ru, int frame, int subframe); void feptx_prec(RU_t *ru, int frame, int subframe); diff --git a/openair1/SIMULATION/LTE_PHY/ulsim.c b/openair1/SIMULATION/LTE_PHY/ulsim.c index 5e4749322f..bb1c4fc006 100644 --- a/openair1/SIMULATION/LTE_PHY/ulsim.c +++ b/openair1/SIMULATION/LTE_PHY/ulsim.c @@ -55,6 +55,8 @@ #include "executables/thread-common.h" #include "targets/RT/USER/lte-softmodem.h" #include "executables/split_headers.h" +#include "common/ran_context.h" +#include "PHY/LTE_ESTIMATION/lte_estimation.h" double cpuf; #define inMicroS(a) (((double)(a))/(cpu_freq_GHz*1000.0)) diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index 56587b8d20..fd3c2c521b 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -69,6 +69,8 @@ #include #include +#include + LCHAN_DESC DCCH_LCHAN_DESC,DTCH_DL_LCHAN_DESC,DTCH_UL_LCHAN_DESC; rlc_info_t Rlc_info_um,Rlc_info_am_config; diff --git a/openair1/SIMULATION/NR_PHY/prachsim.c b/openair1/SIMULATION/NR_PHY/prachsim.c index f679a14d13..59a9dd4803 100644 --- a/openair1/SIMULATION/NR_PHY/prachsim.c +++ b/openair1/SIMULATION/NR_PHY/prachsim.c @@ -47,7 +47,7 @@ #include "OCG_vars.h" #include #include - +#include #define NR_PRACH_DEBUG 1 #define PRACH_WRITE_OUTPUT_DEBUG 1 diff --git a/openair1/SIMULATION/NR_PHY/pucchsim.c b/openair1/SIMULATION/NR_PHY/pucchsim.c index a96a62f656..637bc76d92 100644 --- a/openair1/SIMULATION/NR_PHY/pucchsim.c +++ b/openair1/SIMULATION/NR_PHY/pucchsim.c @@ -46,6 +46,7 @@ #include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h" #include "openair1/SIMULATION/NR_PHY/nr_dummy_functions.c" + PHY_VARS_gNB *gNB; PHY_VARS_NR_UE *UE; RAN_CONTEXT_t RC; diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c index 76f81564d8..3a36007f0f 100644 --- a/openair1/SIMULATION/NR_PHY/ulsim.c +++ b/openair1/SIMULATION/NR_PHY/ulsim.c @@ -63,6 +63,7 @@ #include #include +#include //#define DEBUG_ULSIM LCHAN_DESC DCCH_LCHAN_DESC,DTCH_DL_LCHAN_DESC,DTCH_UL_LCHAN_DESC; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index e15963f355..db82a95271 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -41,6 +41,7 @@ #include "UTIL/OPT/opt.h" #include "SIMULATION/TOOLS/sim.h" // for taus +#include extern RAN_CONTEXT_t RC; extern const uint8_t nr_slots_per_frame[5]; extern uint16_t sl_ahead; From 9a71d5550eb456305e14dd89358298c9cc6873a5 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Sat, 30 Jan 2021 23:27:25 +0100 Subject: [PATCH 054/579] build of eNB/gNB/UE/nrUE --- cmake_targets/build_oai | 1 + executables/main-fs6.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai index a00008525a..72590168b6 100755 --- a/cmake_targets/build_oai +++ b/cmake_targets/build_oai @@ -246,6 +246,7 @@ function main() { shift;; --eNBocp) eNBocp=1 + RU=0 echo_info "Will compile OCP eNB" shift;; --gNB) diff --git a/executables/main-fs6.c b/executables/main-fs6.c index 5283ce5eaa..438edb4044 100644 --- a/executables/main-fs6.c +++ b/executables/main-fs6.c @@ -750,7 +750,7 @@ void phy_procedures_eNB_uespec_RX_fromsplit(uint8_t *bufferZone, int nbBlocks,PH recvFs6Ul(bufferZone, nbBlocks, eNB, ul_propa); // dirty memory allocation in OAI... - for (int i = 0; i < NUMBER_OF_UCI_VARS_MAX; i++) + for (int i = 0; i < NUMBER_OF_UCI_MAX; i++) if ( eNB->uci_vars[i].frame == proc->frame_rx && eNB->uci_vars[i].subframe == proc->subframe_rx ) eNB->uci_vars[i].active=0; @@ -1145,7 +1145,7 @@ void appendFs6DLUEcch(uint8_t *bufferZone, PHY_VARS_eNB *eNB, int frame, int sub commonUDP_t *newUDPheader=(commonUDP_t *) firstFreeByte; bool first_UE=true; - for (int i = 0; i < NUMBER_OF_UCI_VARS_MAX; i++) { + for (int i = 0; i < NUMBER_OF_UCI_MAX; i++) { LTE_eNB_UCI *uci = &(eNB->uci_vars[i]); if ((uci->active == 1) && (uci->frame == frame) && (uci->subframe == subframe)) { From 849c5e0c8663f82cee967135ce88aa2d44db9085 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Sun, 31 Jan 2021 21:46:58 +0100 Subject: [PATCH 055/579] F1_SETUP tested --- openair2/ENB_APP/enb_app.c | 2 ++ openair2/ENB_APP/enb_config.c | 21 ++++++++++++-------- openair2/F1AP/f1ap_cu_interface_management.c | 20 ++++++++++--------- openair2/F1AP/f1ap_du_interface_management.c | 15 +++++++------- openair2/F1AP/f1ap_encoder.c | 8 ++------ openair2/RRC/LTE/rrc_eNB.c | 13 ++++++------ 6 files changed, 42 insertions(+), 37 deletions(-) diff --git a/openair2/ENB_APP/enb_app.c b/openair2/ENB_APP/enb_app.c index 1d001022d2..15955f80c8 100644 --- a/openair2/ENB_APP/enb_app.c +++ b/openair2/ENB_APP/enb_app.c @@ -244,6 +244,8 @@ void *eNB_app_task(void *args_p) { } + LOG_I(ENB_APP,"TASK_ENB_APP is ready\n"); + do { // Wait for a message itti_receive_msg (TASK_ENB_APP, &msg_p); diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c index 91372f6257..9d8040bc21 100644 --- a/openair2/ENB_APP/enb_config.c +++ b/openair2/ENB_APP/enb_config.c @@ -1991,7 +1991,7 @@ int RCconfig_DU_F1(MessageDef *msg_p, uint32_t i) { F1AP_SETUP_REQ (msg_p).nr_mode_info[k].tdd.nrb = rrc->carrier[0].mib.message.dl_Bandwidth; F1AP_SETUP_REQ (msg_p).nr_mode_info[k].tdd.num_frequency_bands = 1; F1AP_SETUP_REQ (msg_p).nr_mode_info[k].tdd.nr_band[0] = rrc->carrier[0].sib1->freqBandIndicator; - F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.sul_active = 0; + F1AP_SETUP_REQ (msg_p).nr_mode_info[k].tdd.sul_active = 0; } else { LOG_I(ENB_APP,"ngran_DU: Configuring Cell %d for FDD\n",k); F1AP_SETUP_REQ (msg_p).fdd_flag = 1; @@ -2716,12 +2716,13 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) { "value of X2ParamList.numelt %d must be lower than X2AP_MAX_NB_ENB_IP_ADDRESS %d value: reconsider to increase X2AP_MAX_NB_ENB_IP_ADDRESS\n", X2ParamList.numelt,X2AP_MAX_NB_ENB_IP_ADDRESS); X2AP_REGISTER_ENB_REQ (msg_p).nb_x2 = 0; - + LOG_I(X2AP,"X2ParamList.numelt %d\n",X2ParamList.numelt); for (l = 0; l < X2ParamList.numelt; l++) { X2AP_REGISTER_ENB_REQ (msg_p).nb_x2 += 1; strcpy(X2AP_REGISTER_ENB_REQ (msg_p).target_enb_x2_ip_address[l].ipv4_address,*(X2ParamList.paramarray[l][ENB_X2_IPV4_ADDRESS_IDX].strptr)); strcpy(X2AP_REGISTER_ENB_REQ (msg_p).target_enb_x2_ip_address[l].ipv6_address,*(X2ParamList.paramarray[l][ENB_X2_IPV6_ADDRESS_IDX].strptr)); + LOG_I(X2AP,"registering with ip : %s\n",*(X2ParamList.paramarray[l][ENB_X2_IPV4_ADDRESS_IDX].strptr)); if (strcmp(*(X2ParamList.paramarray[l][ENB_X2_IP_ADDRESS_PREFERENCE_IDX].strptr), "ipv4") == 0) { X2AP_REGISTER_ENB_REQ (msg_p).target_enb_x2_ip_address[l].ipv4 = 1; X2AP_REGISTER_ENB_REQ (msg_p).target_enb_x2_ip_address[l].ipv6 = 0; @@ -2901,7 +2902,7 @@ void extract_and_decode_SI(int inst,int si_ind,uint8_t *si_container,int si_cont eNB_RRC_INST *rrc = RC.rrc[inst]; rrc_eNB_carrier_data_t *carrier = &rrc->carrier[0]; LTE_BCCH_DL_SCH_Message_t *bcch_message ; - AssertFatal(si_ind==0,"Can only handle a single SI block for now\n"); + AssertFatal(si_ind==2,"Can only handle a single SI block for now\n"); LOG_I(ENB_APP, "rrc inst %d: Trying to decode SI block %d @ %p, length %d\n",inst,si_ind,si_container,si_container_length); // point to first SI block bcch_message = &carrier->systemInformation; @@ -3088,15 +3089,19 @@ void handle_f1ap_setup_resp(f1ap_setup_resp_t *resp) { (check_plmn_identity(carrier, resp->mcc[j], resp->mnc[j], resp->mnc_digit_length[j])>0 && resp->nrpci[j] == carrier->physCellId)) { // copy system information and decode it - for (si_ind=0; si_indnum_SI[j]; si_ind++) { + for (si_ind=2; si_ind<10; si_ind++) { //printf("SI %d size %d: ", si_ind, resp->SI_container_length[j][si_ind]); //for (int n=0;nSI_container_length[j][si_ind];n++) // printf("%02x ",resp->SI_container[j][si_ind][n]); //printf("\n"); - extract_and_decode_SI(i, - si_ind, - resp->SI_container[j][si_ind], - resp->SI_container_length[j][si_ind]); + if (si_ind==6) si_ind=9; + if (resp->SI_container[j][si_ind] != NULL) { + extract_and_decode_SI(i, + si_ind, + resp->SI_container[j][si_ind], + resp->SI_container_length[j][si_ind]); + } + } // perform MAC/L1 common configuration diff --git a/openair2/F1AP/f1ap_cu_interface_management.c b/openair2/F1AP/f1ap_cu_interface_management.c index a96d9807de..e0358e8447 100644 --- a/openair2/F1AP/f1ap_cu_interface_management.c +++ b/openair2/F1AP/f1ap_cu_interface_management.c @@ -357,18 +357,20 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance, //for (int n = 0; n < f1ap_setup_resp->SI_container_length[i][0]; n++) // printf("%02x ", f1ap_setup_resp->SI_container[i][0][n]); //printf("\n"); - - for (int sIBtype=2;sIBtype<33;sIBtype++) { - if (f1ap_setup_resp->SI_container[i][sIBtype]!=NULL) { - AssertFatal(sIBtype < 6 || sIBtype == 9, "Illegal SI type %d\n",sIBtype); + for (int j=2; + j<10; + j++) { + if (j==6) j=9; + if (f1ap_setup_resp->SI_container[i][j]!=NULL) { + LOG_I(F1AP,"SETUP RESP: SI %d, Type %d\n",i,j); + AssertFatal((j < 6) || (j == 9), "Illegal SI type %d\n",j); F1AP_SibtypetobeupdatedListItem_t *sib_item = calloc(1,sizeof(*sib_item)); - memset((void*)sib_item,0,sizeof(*sib_item)); - sib_item->sIBtype = sIBtype; + sib_item->sIBtype = j; OCTET_STRING_fromBuf(&sib_item->sIBmessage, - (const char*)f1ap_setup_resp->SI_container[i][sIBtype], - f1ap_setup_resp->SI_container_length[i][sIBtype]); + (const char*)f1ap_setup_resp->SI_container[i][j], + f1ap_setup_resp->SI_container_length[i][j]); - LOG_D(F1AP, "f1ap_setup_resp->SI_container_length[%d][%d] = %d \n", i,sIBtype,f1ap_setup_resp->SI_container_length[i][sIBtype]); + LOG_I(F1AP, "f1ap_setup_resp->SI_container_length[%d][%d] = %d \n", i,j,f1ap_setup_resp->SI_container_length[i][j]); ASN_SEQUENCE_ADD(&gNB_CUSystemInformation->sibtypetobeupdatedlist.list,sib_item); } } diff --git a/openair2/F1AP/f1ap_du_interface_management.c b/openair2/F1AP/f1ap_du_interface_management.c index a4b90bbcaf..a092cbd8cb 100644 --- a/openair2/F1AP/f1ap_du_interface_management.c +++ b/openair2/F1AP/f1ap_du_interface_management.c @@ -228,7 +228,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) { /* FDD.1.3 freqBandListNr */ int fdd_ul_num_available_freq_Bands = f1ap_du_data->nr_mode_info[i].fdd.ul_num_frequency_bands; - LOG_D(F1AP, "fdd_ul_num_available_freq_Bands = %d \n", fdd_ul_num_available_freq_Bands); + LOG_I(F1AP, "fdd_ul_num_available_freq_Bands = %d \n", fdd_ul_num_available_freq_Bands); int fdd_ul_j; for (fdd_ul_j=0; fdd_ul_jnr_mode_info[i].fdd.dl_num_frequency_bands; - LOG_D(F1AP, "fdd_dl_num_available_freq_Bands = %d \n", fdd_dl_num_available_freq_Bands); + LOG_I(F1AP, "fdd_dl_num_available_freq_Bands = %d \n", fdd_dl_num_available_freq_Bands); int fdd_dl_j; for (fdd_dl_j=0; fdd_dl_jnr_mode_info[i].tdd.num_frequency_bands; - LOG_D(F1AP, "tdd_num_available_freq_Bands = %d \n", tdd_num_available_freq_Bands); + LOG_I(F1AP, "tdd_num_available_freq_Bands = %d \n", tdd_num_available_freq_Bands); + AssertFatal(tdd_num_available_freq_Bands > 0, "should have at least one TDD band available\n"); int j; for (j=0; jsibtypetobeupdatedlist.list.count;si++) { F1AP_SibtypetobeupdatedListItem_t *sib_item = gNB_CUSystemInformation->sibtypetobeupdatedlist.list.array[si]; size_t size = sib_item->sIBmessage.size; - F1AP_SETUP_RESP (msg_p).SI_container_length[i][si] = size; - LOG_D(F1AP, "F1AP: F1Setup-Resp SI_container_length[%d][%d] %ld bytes\n", i, (int)sib_item->sIBtype, size); - F1AP_SETUP_RESP (msg_p).SI_container[i][si] = malloc(F1AP_SETUP_RESP (msg_p).SI_container_length[i][si]); + F1AP_SETUP_RESP (msg_p).SI_container_length[i][sib_item->sIBtype] = size; + LOG_I(F1AP, "F1AP: F1Setup-Resp SI_container_length[%d][%d] %ld bytes\n", i, (int)sib_item->sIBtype, size); + F1AP_SETUP_RESP (msg_p).SI_container[i][sib_item->sIBtype] = malloc(size); memcpy((void*)F1AP_SETUP_RESP (msg_p).SI_container[i][sib_item->sIBtype], (void*)sib_item->sIBmessage.buf, size); @@ -565,7 +566,7 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance, LOG_D(F1AP, "Sending F1AP_SETUP_RESP ITTI message to ENB_APP with assoc_id (%d->%d)\n", assoc_id,ENB_MODULE_ID_TO_INSTANCE(assoc_id)); - itti_send_msg_to_task(TASK_ENB_APP, ENB_MODULE_ID_TO_INSTANCE(assoc_id), msg_p); + itti_send_msg_to_task(TASK_ENB_APP, instance, msg_p); return 0; } diff --git a/openair2/F1AP/f1ap_encoder.c b/openair2/F1AP/f1ap_encoder.c index e448690139..6e5f0f4e49 100644 --- a/openair2/F1AP/f1ap_encoder.c +++ b/openair2/F1AP/f1ap_encoder.c @@ -84,12 +84,8 @@ int f1ap_encode_pdu(F1AP_F1AP_PDU_t *pdu, uint8_t **buffer, uint32_t *length) LOG_E(F1AP, "----------------- ASN1 ENCODER PRINT END----------------- \n"); } - encoded = aper_encode_to_new_buffer(&asn_DEF_F1AP_F1AP_PDU, 0, pdu, (void **)buffer); - - if (encoded < 0) { - LOG_E(F1AP, "Failed to encode F1AP message\n"); - return -1; - } + AssertFatal((encoded = aper_encode_to_new_buffer(&asn_DEF_F1AP_F1AP_PDU, 0, pdu, (void **)buffer))>0, + "Failed to encode F1AP message\n"); *length = encoded; diff --git a/openair2/RRC/LTE/rrc_eNB.c b/openair2/RRC/LTE/rrc_eNB.c index ebc1c86cf2..0a0096a988 100644 --- a/openair2/RRC/LTE/rrc_eNB.c +++ b/openair2/RRC/LTE/rrc_eNB.c @@ -8914,14 +8914,13 @@ void handle_f1_setup_req(f1ap_setup_req_t *f1_setup_req) { F1AP_SETUP_RESP (msg_p).nr_cellid[cu_cell_ind] = rrc->nr_cellid; F1AP_SETUP_RESP (msg_p).nrpci[cu_cell_ind] = f1_setup_req->nr_pci[i]; int num_SI= 0; - if (rrc->carrier[0].SIB23) { - F1AP_SETUP_RESP (msg_p).SI_container[cu_cell_ind][num_SI] = rrc->carrier[0].SIB23; - F1AP_SETUP_RESP (msg_p).SI_container_length[cu_cell_ind][num_SI] = rrc->carrier[0].sizeof_SIB23; - //printf("SI %d size %d: ", 0, F1AP_SETUP_RESP(msg_p).SI_container_length[j][num_SI]); - //for (int n = 0; n < F1AP_SETUP_RESP(msg_p).SI_container_length[j][num_SI]; n++) - // printf("%02x ", F1AP_SETUP_RESP(msg_p).SI_container[0][num_SI][n]); - //printf("\n"); + F1AP_SETUP_RESP (msg_p).SI_container[cu_cell_ind][2+num_SI] = rrc->carrier[0].SIB23; + F1AP_SETUP_RESP (msg_p).SI_container_length[cu_cell_ind][2+num_SI] = rrc->carrier[0].sizeof_SIB23; + printf("SI %d size %d: ", 0, F1AP_SETUP_RESP(msg_p).SI_container_length[j][2+num_SI]); + for (int n = 0; n < F1AP_SETUP_RESP(msg_p).SI_container_length[j][2+num_SI]; n++) + printf("%02x ", F1AP_SETUP_RESP(msg_p).SI_container[0][2+num_SI][n]); + printf("\n"); num_SI++; } From 3cb689298738a42e2d03663ffbd4da4476678fd8 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Tue, 2 Feb 2021 11:15:13 +0100 Subject: [PATCH 056/579] CU/DU tested with phoenix + B38 RRU (CU and DU via lo) --- openair2/ENB_APP/MACRLC_paramdef.h | 16 +++++++++------- openair2/ENB_APP/enb_config.c | 1 + openair2/F1AP/f1ap_du_task.c | 2 +- openair2/LAYER2/MAC/eNB_scheduler_RA.c | 6 +++--- openair2/LAYER2/MAC/eNB_scheduler_fairRR.c | 15 ++++++++++----- openair2/LAYER2/MAC/eNB_scheduler_ulsch.c | 4 ++-- openair2/LAYER2/MAC/mac.h | 1 + 7 files changed, 27 insertions(+), 18 deletions(-) diff --git a/openair2/ENB_APP/MACRLC_paramdef.h b/openair2/ENB_APP/MACRLC_paramdef.h index fcee6142f0..6c2b8be912 100644 --- a/openair2/ENB_APP/MACRLC_paramdef.h +++ b/openair2/ENB_APP/MACRLC_paramdef.h @@ -56,10 +56,10 @@ #define CONFIG_STRING_MACRLC_LOCAL_S_PORTD "local_s_portd" #define CONFIG_STRING_MACRLC_REMOTE_S_PORTD "remote_s_portd" #define CONFIG_STRING_MACRLC_SCHED_MODE "scheduler_mode" -#define CONFIG_MACRLC_PUSCH10xSNR "puSch10xSnr" -#define CONFIG_MACRLC_PUCCH10xSNR "puCch10xSnr" +#define CONFIG_STRING_MACRLC_PUSCH10xSNR "puSch10xSnr" +#define CONFIG_STRING_MACRLC_PUCCH10xSNR "puCch10xSnr" #define CONFIG_STRING_MACRLC_DEFAULT_SCHED_DL_ALGO "default_sched_dl_algo" - +#define CONFIG_STRING_MACRLC_UE_MULTIPLE_MAX "ue_multiple_max" /*-------------------------------------------------------------------------------------------------------------------------------------------------------*/ /* MacRLC configuration parameters */ /* optname helpstr paramflags XXXptr defXXXval type numelt */ @@ -83,10 +83,11 @@ {CONFIG_STRING_MACRLC_LOCAL_S_PORTD, NULL, 0, uptr:NULL, defintval:50021, TYPE_UINT, 0}, \ {CONFIG_STRING_MACRLC_REMOTE_S_PORTD, NULL, 0, uptr:NULL, defintval:50021, TYPE_UINT, 0}, \ {CONFIG_STRING_MACRLC_SCHED_MODE, NULL, 0, strptr:NULL, defstrval:"default", TYPE_STRING, 0}, \ -{CONFIG_MACRLC_PUSCH10xSNR, NULL, 0, iptr:NULL, defintval:200, TYPE_INT, 0}, \ -{CONFIG_MACRLC_PUCCH10xSNR, NULL, 0, iptr:NULL, defintval:200, TYPE_INT, 0}, \ -{CONFIG_STRING_MACRLC_DEFAULT_SCHED_DL_ALGO, NULL, 0, strptr:NULL, defstrval:"round_robin_dl", TYPE_STRING, 0}, \ -} +{CONFIG_STRING_MACRLC_PUSCH10xSNR, NULL, 0, iptr:NULL, defintval:200, TYPE_INT, 0}, \ +{CONFIG_STRING_MACRLC_PUCCH10xSNR, NULL, 0, iptr:NULL, defintval:200, TYPE_INT, 0}, \ +{CONFIG_STRING_MACRLC_DEFAULT_SCHED_DL_ALGO, NULL, 0, strptr:NULL, defstrval:"round_robin_dl", TYPE_STRING, 0}, \ +{CONFIG_STRING_MACRLC_UE_MULTIPLE_MAX, NULL, 0, iptr:NULL, defintval:4, TYPE_INT, 0}} + #define MACRLC_CC_IDX 0 #define MACRLC_TRANSPORT_N_PREFERENCE_IDX 1 #define MACRLC_LOCAL_N_IF_NAME_IDX 2 @@ -108,6 +109,7 @@ #define MACRLC_PUSCH10xSNR_IDX 18 #define MACRLC_PUCCH10xSNR_IDX 19 #define MACRLC_DEFAULT_SCHED_DL_ALGO_IDX 20 +#define MACRLC_UE_MULTIPLE_MAX_IDX 21 /*---------------------------------------------------------------------------------------------------------------------------------------------------------*/ #endif diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c index 9d8040bc21..69b6c50ed0 100644 --- a/openair2/ENB_APP/enb_config.c +++ b/openair2/ENB_APP/enb_config.c @@ -216,6 +216,7 @@ void RCconfig_macrlc(int macrlc_has_f1[MAX_MAC_INST]) { for (j = 0; j < RC.nb_macrlc_inst; j++) { RC.mac[j]->puSch10xSnr = *(MacRLC_ParamList.paramarray[j][MACRLC_PUSCH10xSNR_IDX ].iptr); RC.mac[j]->puCch10xSnr = *(MacRLC_ParamList.paramarray[j][MACRLC_PUCCH10xSNR_IDX ].iptr); + RC.mac[j]->ue_multiple_max = *(MacRLC_ParamList.paramarray[j][MACRLC_UE_MULTIPLE_MAX_IDX ].iptr); RC.nb_mac_CC[j] = *(MacRLC_ParamList.paramarray[j][MACRLC_CC_IDX].iptr); if (strcmp(*(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_N_PREFERENCE_IDX].strptr), "local_RRC") == 0) { diff --git a/openair2/F1AP/f1ap_du_task.c b/openair2/F1AP/f1ap_du_task.c index 566391ac7a..4ab1bc5c27 100644 --- a/openair2/F1AP/f1ap_du_task.c +++ b/openair2/F1AP/f1ap_du_task.c @@ -86,7 +86,7 @@ void du_task_handle_sctp_association_resp(instance_t instance, sctp_new_associat DevAssert(sctp_new_association_resp != NULL); if (sctp_new_association_resp->sctp_state != SCTP_STATE_ESTABLISHED) { - LOG_W(F1AP, "Received unsuccessful result for SCTP association (%u), instance %d, cnx_id %u\n", + LOG_E(F1AP, "Received unsuccessful result for SCTP association (%u), instance %d, cnx_id %u\n", sctp_new_association_resp->sctp_state, instance, sctp_new_association_resp->ulp_cnx_id); diff --git a/openair2/LAYER2/MAC/eNB_scheduler_RA.c b/openair2/LAYER2/MAC/eNB_scheduler_RA.c index 4ca6ad1248..ded66eb3fe 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_RA.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_RA.c @@ -908,7 +908,7 @@ generate_Msg4(module_id_t module_idP, } // rach_resource_type > 0 else { // This is normal LTE case - LOG_I(MAC, "generate_Msg4 ra->Msg4_frame SFN/SF: %d.%d, frameP SFN/SF: %d.%d FOR eNB_Mod: %d \n", ra->Msg4_frame, ra->Msg4_subframe, frameP, subframeP, module_idP); + LOG_D(MAC, "generate_Msg4 ra->Msg4_frame SFN/SF: %d.%d, frameP SFN/SF: %d.%d FOR eNB_Mod: %d \n", ra->Msg4_frame, ra->Msg4_subframe, frameP, subframeP, module_idP); if ((ra->Msg4_frame == frameP) && (ra->Msg4_subframe == subframeP)) { // Get RRCConnectionSetup for Piggyback @@ -925,7 +925,7 @@ generate_Msg4(module_id_t module_idP, module_idP, CC_idP, frameP, subframeP, UE_id, rrc_sdu_length); // AssertFatal(rrc_sdu_length > 0, // "[MAC][eNB Scheduler] CCCH not allocated, rrc_sdu_length: %d\n", rrc_sdu_length); - LOG_I(MAC,"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Generating Msg4 with RRC Piggyback (RNTI %x)\n", + LOG_D(MAC,"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Generating Msg4 with RRC Piggyback (RNTI %x)\n", module_idP, CC_idP, frameP, subframeP, ra->rnti); /// Choose first 4 RBs for Msg4, should really check that these are free! first_rb = 0; @@ -1093,7 +1093,7 @@ generate_Msg4(module_id_t module_idP, } } // CCE Allocation feasible } else { - LOG_I(MAC, + LOG_D(MAC, "eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Delaying Msg4 for RRC Piggyback (RNTI %x)\n", module_idP, CC_idP, frameP, subframeP, ra->rnti); ra->Msg4_subframe ++; diff --git a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c index eef380b13a..ce9102f785 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c @@ -193,7 +193,7 @@ void dlsch_scheduler_pre_ue_select_fairRR( // Initialization for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) { - dlsch_ue_max_num[CC_id] = (uint16_t)RC.rrc[module_idP]->configuration.radioresourceconfig[CC_id].ue_multiple_max; + dlsch_ue_max_num[CC_id] = eNB->ue_multiple_max; // save origin DL PDU number DL_req = &eNB->DL_req[CC_id].dl_config_request_body; saved_dlsch_dci[CC_id] = DL_req->number_pdu; @@ -2216,7 +2216,7 @@ void ulsch_scheduler_pre_ue_select_fairRR( //save ulsch dci number saved_ulsch_dci[CC_id] = eNB->HI_DCI0_req[CC_id][subframeP].hi_dci0_request_body.number_of_dci; // maximum multiplicity number - ulsch_ue_max_num[CC_id] =RC.rrc[module_idP]->configuration.radioresourceconfig[CC_id].ue_multiple_max; + ulsch_ue_max_num[CC_id] =eNB->ue_multiple_max; cc_id_flag[CC_id] = 0; ue_first_num[CC_id] = 0; ul_inactivity_num[CC_id] = 0; @@ -2243,6 +2243,7 @@ void ulsch_scheduler_pre_ue_select_fairRR( // UL DCI HI_DCI0_req = &eNB->HI_DCI0_req[CC_id][subframeP].hi_dci0_request_body; + if ( (ulsch_ue_select[CC_id].ue_num >= ulsch_ue_max_num[CC_id]) || (cc_id_flag[CC_id] == 1) ) { cc_id_flag[CC_id] = 1; HI_DCI0_req->number_of_dci = saved_ulsch_dci[CC_id]; @@ -2257,12 +2258,14 @@ void ulsch_scheduler_pre_ue_select_fairRR( } } + cc = &eNB->common_channels[CC_id]; //harq_pid harq_pid = subframe2harqpid(cc,(frameP+(sched_subframePUE_sched_ctrl[UE_id].round_UL[CC_id][harq_pid]; + if ( round > 0 ) { hi_dci0_pdu = &HI_DCI0_req->hi_dci0_pdu_list[HI_DCI0_req->number_of_dci+HI_DCI0_req->number_of_hi]; format_flag = 2; @@ -2290,6 +2293,7 @@ void ulsch_scheduler_pre_ue_select_fairRR( if (bytes_to_schedule < 0) bytes_to_schedule = 0; + if ( UE_id > last_ulsch_ue_id[CC_id] && ((ulsch_ue_select[CC_id].ue_num+ue_first_num[CC_id]) < ulsch_ue_max_num[CC_id]) ) { if ( bytes_to_schedule > 0 ) { first_ue_id[CC_id][ue_first_num[CC_id]]= UE_id; @@ -2307,7 +2311,7 @@ void ulsch_scheduler_pre_ue_select_fairRR( UE_sched_ctl = &UE_info->UE_sched_ctrl[UE_id]; rrc_status = mac_eNB_get_rrc_status(module_idP, rnti); - + LOG_D(MAC,"%d.%d : rnti %x rrc_status %d, ul_inactivity %d, ul_scheduled %d\n", frameP,subframeP,rnti,rrc_status,UE_sched_ctl->ul_inactivity_timer,UE_sched_ctl->ul_scheduled); if ( ((UE_sched_ctl->ul_inactivity_timer>20)&&(UE_sched_ctl->ul_scheduled==0)) || ((UE_sched_ctl->ul_inactivity_timer>10)&&(UE_sched_ctl->ul_scheduled==0)&&(rrc_status < RRC_CONNECTED)) || ((UE_sched_ctl->cqi_req_timer>300)&&((rrc_status >= RRC_CONNECTED))) ) { @@ -2417,6 +2421,7 @@ void ulsch_scheduler_pre_ue_select_fairRR( if (bytes_to_schedule < 0) bytes_to_schedule = 0; rrc_status = mac_eNB_get_rrc_status(module_idP, rnti); + if ( (bytes_to_schedule > 0) || (UE_info->UE_template[CC_id][UE_id].ul_SR > 0) || ((UE_sched_ctl->ul_inactivity_timer>20)&&(UE_sched_ctl->ul_scheduled==0)) || ((UE_sched_ctl->ul_inactivity_timer>10)&&(UE_sched_ctl->ul_scheduled==0)&&(rrc_status < RRC_CONNECTED)) || @@ -2892,7 +2897,7 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP, nfapi_hi_dci0_request_pdu_t *hi_dci0_pdu; nfapi_ul_config_request_body_t *ul_req_tmp; nfapi_ul_config_ulsch_harq_information *ulsch_harq_information; - LOG_D(MAC,"entering ulsch preprocesor\n"); + LOG_D(MAC,"entering ulsch preprocesor for %d.%d\n",sched_frame,sched_subframeP); ulsch_scheduler_pre_processor_fairRR(module_idP, frameP, subframeP, @@ -3103,7 +3108,7 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP, T_INT(UE_template->TBS_UL[harq_pid]), T_INT(ndi)); if (mac_eNB_get_rrc_status(module_idP,rnti) < RRC_CONNECTED) - LOG_D(MAC,"[eNB %d][PUSCH %d/%x] CC_id %d Frame %d subframeP %d Scheduled UE %d (mcs %d, first rb %d, nb_rb %d, rb_table_index %d, TBS %d, harq_pid %d)\n", + LOG_I(MAC,"[eNB %d][PUSCH %d/%x] CC_id %d Frame %d subframeP %d Scheduled UE %d (mcs %d, first rb %d, nb_rb %d, rb_table_index %d, TBS %d, harq_pid %d)\n", module_idP,harq_pid,rnti,CC_id,frameP,subframeP,UE_id,UE_template->mcs_UL[harq_pid], first_rb[CC_id],rb_table[rb_table_index], rb_table_index,UE_template->TBS_UL[harq_pid],harq_pid); diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c index 013861c585..48eacd2a59 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c @@ -410,7 +410,7 @@ rx_sdu(const module_id_t enb_mod_idP, /* Receiving CRNTI means that the current rnti has to go away */ if (old_UE_id != -1) { if (mac_eNB_get_rrc_status(enb_mod_idP,old_rnti) == RRC_HO_EXECUTION) { - LOG_I(MAC, "[eNB %d] Frame %d, Subframe %d CC_id %d : (rnti %x UE_id %d) Handover case\n", + LOG_D(MAC, "[eNB %d] Frame %d, Subframe %d CC_id %d : (rnti %x UE_id %d) Handover case\n", enb_mod_idP, frameP, subframeP, @@ -474,7 +474,7 @@ rx_sdu(const module_id_t enb_mod_idP, /* Received a new rnti */ if (ret == 0) { ra->state = MSGCRNTI; - LOG_I(MAC, "[eNB %d] Frame %d, Subframe %d CC_id %d : (rnti %x UE_id %d) Received rnti(Msg4)\n", + LOG_D(MAC, "[eNB %d] Frame %d, Subframe %d CC_id %d : (rnti %x UE_id %d) Received rnti(Msg4)\n", enb_mod_idP, frameP, subframeP, diff --git a/openair2/LAYER2/MAC/mac.h b/openair2/LAYER2/MAC/mac.h index 160d84e1c0..c8d632619f 100644 --- a/openair2/LAYER2/MAC/mac.h +++ b/openair2/LAYER2/MAC/mac.h @@ -1434,6 +1434,7 @@ typedef struct eNB_MAC_INST_s { int32_t puSch10xSnr; int32_t puCch10xSnr; + int ue_multiple_max; pthread_t mac_stats_thread; } eNB_MAC_INST; From 6ae26ee6dc84780ac338545a9e16c96577033a26 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Tue, 2 Feb 2021 20:45:46 +0100 Subject: [PATCH 057/579] minor changes after merge --- openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c | 6 +++--- openair1/SCHED/fapi_l1.c | 2 +- openair1/SCHED/phy_procedures_lte_eNb.c | 14 +++++++------- openair2/LAYER2/MAC/eNB_scheduler_fairRR.c | 4 ++-- openair2/LAYER2/MAC/main.c | 4 ++-- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c b/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c index 08a7e5a7af..b15a165077 100644 --- a/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c +++ b/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c @@ -1084,11 +1084,11 @@ void rx_ulsch(PHY_VARS_eNB *eNB, pusch_vars->ulsch_power[i] = signal_energy_nodc(pusch_vars->drs_ch_estimates[i], ulsch[UE_id]->harq_processes[harq_pid]->nb_rb*12)/correction_factor; LOG_D(PHY,"%4.4d.%d power harq_pid %d rb %2.2d TBS %2.2d (MPR_times_Ks %d correction %d) power %d dBtimes10\n", proc->frame_rx, proc->subframe_rx, harq_pid, - ulsch[UE_id]->harq_processes[harq_pid]->nb_rb, ulsch[UE_id]->harq_processes[harq_pid]->TBS,MPR_times_100Ks,correction_factor,dB_fixed_times10(pusch_vars->ulsch_power[i])); + ulsch[UE_id]->harq_processes[harq_pid]->nb_rb, ulsch[UE_id]->harq_processes[harq_pid]->TBS,MPR_times_100Ks,correction_factor,dB_fixed_x10(pusch_vars->ulsch_power[i])); pusch_vars->ulsch_noise_power[i]=0; for (int rb=0;rbharq_processes[harq_pid]->nb_rb;rb++) pusch_vars->ulsch_noise_power[i]+=eNB->measurements.n0_subband_power[i][rb]/ulsch[UE_id]->harq_processes[harq_pid]->nb_rb; - LOG_D(PHY,"noise power[%d] %d\n",i,dB_fixed_times10(pusch_vars->ulsch_noise_power[i])); + LOG_D(PHY,"noise power[%d] %d\n",i,dB_fixed_x10(pusch_vars->ulsch_noise_power[i])); /* Check this modification w.r.t to new PUSCH modifications //symbol 3 int symbol_offset = frame_parms->N_RB_UL*12*(3 - frame_parms->Ncp); @@ -1239,7 +1239,7 @@ void dump_ulsch(PHY_VARS_eNB *eNB,int frame,int subframe,uint8_t UE_id,int round eNB->ulsch[UE_id]->harq_processes[harq_pid]->TBS,eNB->ulsch[UE_id]->harq_processes[harq_pid]->Qm, eNB->ulsch[UE_id]->harq_processes[harq_pid]->Nsymb_pusch); for (int aa=0;aaframe_parms.nb_antennas_rx;aa++) - LOG_UI(PHY,"ulsch_power[%d] %d, ulsch_noise_power[%d] %d\n",aa,dB_fixed_times10(eNB->pusch_vars[UE_id]->ulsch_power[aa]),aa,dB_fixed_times10(eNB->pusch_vars[UE_id]->ulsch_noise_power[aa])); + LOG_UI(PHY,"ulsch_power[%d] %d, ulsch_noise_power[%d] %d\n",aa,dB_fixed_x10(eNB->pusch_vars[UE_id]->ulsch_power[aa]),aa,dB_fixed_x10(eNB->pusch_vars[UE_id]->ulsch_noise_power[aa])); sprintf(fname,"/tmp/ulsch_r%d_d",round); sprintf(vname,"/tmp/ulsch_r%d_dseq",round); LOG_UM(fname,vname,&eNB->ulsch[UE_id]->harq_processes[harq_pid]->d[0][96], diff --git a/openair1/SCHED/fapi_l1.c b/openair1/SCHED/fapi_l1.c index 3d67c0034f..40717a917d 100644 --- a/openair1/SCHED/fapi_l1.c +++ b/openair1/SCHED/fapi_l1.c @@ -997,7 +997,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO, L1_rxtx_proc_t *proc) { if (NFAPI_MODE!=NFAPI_MONOLITHIC) { if (number_ul_pdu>0) { uint8_t ulsch_pdu_num = 0; - for (i=0; iul_config_request_body.ul_config_pdu_list[i].pdu_type == NFAPI_UL_CONFIG_ULSCH_PDU_TYPE) || (UL_req->ul_config_request_body.ul_config_pdu_list[i].pdu_type == NFAPI_UL_CONFIG_ULSCH_CQI_RI_PDU_TYPE) || (UL_req->ul_config_request_body.ul_config_pdu_list[i].pdu_type == NFAPI_UL_CONFIG_ULSCH_HARQ_PDU_TYPE) || diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c index 7d7f64d9db..3fc77703cb 100644 --- a/openair1/SCHED/phy_procedures_lte_eNb.c +++ b/openair1/SCHED/phy_procedures_lte_eNb.c @@ -90,7 +90,7 @@ int16_t get_hundred_times_delta_IF_eNB(PHY_VARS_eNB *eNB,uint16_t ULSCH_id,uint8 // This is the formula from Section 5.1.1.1 in 36.213 10*log10(deltaIF_PUSCH = (2^(MPR*Ks)-1)*beta_offset_pusch) if (bw_factor == 1) { uint8_t nb_rb = eNB->ulsch[ULSCH_id]->harq_processes[harq_pid]->nb_rb; - return(hundred_times_delta_TF[MPR_x100/6]+10*dB_fixed_times10((beta_offset_pusch)>>3)) + hundred_times_log10_NPRB[nb_rb-1]; + return(hundred_times_delta_TF[MPR_x100/6]+10*dB_fixed_x10((beta_offset_pusch)>>3)) + hundred_times_log10_NPRB[nb_rb-1]; } else return(hundred_times_delta_TF[MPR_x100/6]+10*dB_fixed_x10((beta_offset_pusch)>>3)); } else { @@ -1391,8 +1391,8 @@ void postDecode(L1_rxtx_proc_t *proc, notifiedFIFO_elt_t *req) { if (eNB->ulsch_stats[j].rnti == ulsch->rnti) { eNB->ulsch_stats[j].total_bytes_rx+=ulsch_harq->TBS; for (int aa=0;aaframe_parms.nb_antennas_rx;aa++) { - eNB->ulsch_stats[j].ulsch_power[aa] = dB_fixed_times10(eNB->pusch_vars[rdata->UEid]->ulsch_power[aa]); - eNB->ulsch_stats[j].ulsch_noise_power[aa] = dB_fixed_times10(eNB->pusch_vars[rdata->UEid]->ulsch_noise_power[aa]); + eNB->ulsch_stats[j].ulsch_power[aa] = dB_fixed_x10(eNB->pusch_vars[rdata->UEid]->ulsch_power[aa]); + eNB->ulsch_stats[j].ulsch_noise_power[aa] = dB_fixed_x10(eNB->pusch_vars[rdata->UEid]->ulsch_noise_power[aa]); } break; } @@ -1641,8 +1641,8 @@ void fill_rx_indication(PHY_VARS_eNB *eNB, total_power+=(eNB->pusch_vars[ULSCH_id]->ulsch_power[i]); avg_noise_power+=(eNB->pusch_vars[ULSCH_id]->ulsch_noise_power[i])/eNB->frame_parms.nb_antennas_rx; } - int SNRtimes10 = dB_fixed_times10(total_power) - - dB_fixed_times10(avg_noise_power); + int SNRtimes10 = dB_fixed_x10(total_power) - + dB_fixed_x10(avg_noise_power); if (SNRtimes10 < -640) pdu->rx_indication_rel8.ul_cqi = 0; @@ -1652,9 +1652,9 @@ void fill_rx_indication(PHY_VARS_eNB *eNB, pdu->rx_indication_rel8.ul_cqi = (640 + SNRtimes10) / 5; LOG_D(PHY,"[PUSCH %d] Frame %d Subframe %d Filling RX_indication with SNR %d (%d,%d,%d), timing_advance %d (update %d,sync_pos %d)\n", - harq_pid,frame,subframe,SNRtimes10,pdu->rx_indication_rel8.ul_cqi,dB_fixed_times10(total_power),dB_fixed_times10(avg_noise_power),pdu->rx_indication_rel8.timing_advance,timing_advance_update,sync_pos); + harq_pid,frame,subframe,SNRtimes10,pdu->rx_indication_rel8.ul_cqi,dB_fixed_x10(total_power),dB_fixed_x10(avg_noise_power),pdu->rx_indication_rel8.timing_advance,timing_advance_update,sync_pos); for (int i=0;iframe_parms.nb_antennas_rx;i++) - LOG_D(PHY,"antenna %d: ulsch_power %d, noise_power %d\n",i,dB_fixed_times10(eNB->pusch_vars[ULSCH_id]->ulsch_power[i]),dB_fixed_times10(eNB->pusch_vars[ULSCH_id]->ulsch_noise_power[i])); + LOG_D(PHY,"antenna %d: ulsch_power %d, noise_power %d\n",i,dB_fixed_x10(eNB->pusch_vars[ULSCH_id]->ulsch_power[i]),dB_fixed_x10(eNB->pusch_vars[ULSCH_id]->ulsch_noise_power[i])); eNB->UL_INFO.rx_ind.rx_indication_body.number_of_pdus++; eNB->UL_INFO.rx_ind.sfn_sf = frame<<4 | subframe; diff --git a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c index 52b3310f87..48f0eede31 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c @@ -2329,7 +2329,7 @@ void ulsch_scheduler_pre_ue_select_fairRR( UE_sched_ctl = &UE_info->UE_sched_ctrl[UE_id]; rrc_status = mac_eNB_get_rrc_status(module_idP, rnti); - ((UE_sched_ctl->ul_inactivity_timer>10)&&(UE_sched_ctl->ul_scheduled==0)&&(rrc_status < RRC_CONNECTED)) || + if ( ((UE_sched_ctl->ul_inactivity_timer>10)&&(UE_sched_ctl->ul_scheduled==0)&&(rrc_status < RRC_CONNECTED)) || ((UE_sched_ctl->cqi_req_timer>64)&&((rrc_status >= RRC_CONNECTED))) ) { first_ue_id[CC_id][ue_first_num[CC_id]]= UE_id; first_ue_total[CC_id] [ue_first_num[CC_id]] = 0; @@ -3214,7 +3214,7 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP, T_INT(UE_template->TBS_UL[harq_pid]), T_INT(ndi)); if (mac_eNB_get_rrc_status(module_idP,rnti) < RRC_CONNECTED) - LOG_I(MAC,"[eNB %d][PUSCH %d/%x] CC_id %d Frame %d subframeP %d Scheduled UE %d (mcs %d, first rb %d, nb_rb %d, rb_table_index %d, TBS %d, harq_pid %d)\n", + LOG_D(MAC,"[eNB %d][PUSCH %d/%x] CC_id %d Frame %d subframeP %d Scheduled UE %d (mcs %d, first rb %d, nb_rb %d, rb_table_index %d, TBS %d, harq_pid %d)\n", module_idP,harq_pid,rnti,CC_id,frameP,subframeP,UE_id,UE_template->mcs_UL[harq_pid], first_rb[CC_id],rb_table[rb_table_index], rb_table_index,UE_template->TBS_UL[harq_pid],harq_pid); diff --git a/openair2/LAYER2/MAC/main.c b/openair2/LAYER2/MAC/main.c index 7858bdc0ae..8d5186a1be 100644 --- a/openair2/LAYER2/MAC/main.c +++ b/openair2/LAYER2/MAC/main.c @@ -66,8 +66,8 @@ void *mac_stats_thread(void *param) { UE_scheduling_control->ul_out_of_sync == 0 ? "in synch" : "out of sync", UE_info->UE_template[CC_id][UE_id].phr_info, UE_scheduling_control->dl_cqi[CC_id], - (5 * UE_scheduling_control->pusch_snr[CC_id] - 640) / 10, UE_scheduling_control->pucch_tpc_accumulated[CC_id], - (5 * UE_scheduling_control->pucch1_snr[CC_id] - 640) / 10, UE_scheduling_control->pusch_tpc_accumulated[CC_id]); + UE_scheduling_control->pusch_snr[CC_id], UE_scheduling_control->pucch_tpc_accumulated[CC_id], + UE_scheduling_control->pucch1_snr[CC_id], UE_scheduling_control->pusch_tpc_accumulated[CC_id]); fprintf(fd," ULSCH rounds %d/%d/%d/%d, DLSCH rounds %d/%d/%d/%d, ULSCH errors %d, DLSCH errors %d\n", UE_info->eNB_UE_stats[CC_id][UE_id].ulsch_rounds[0], UE_info->eNB_UE_stats[CC_id][UE_id].ulsch_rounds[1], From 4a4636d202b80653c1b9eeb2935ccabf5a57142d Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Tue, 2 Feb 2021 20:58:29 +0100 Subject: [PATCH 058/579] more minor changes --- openair1/PHY/LTE_TRANSPORT/dci_tools.c | 8 ++++---- openair1/SCHED/fapi_l1.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/openair1/PHY/LTE_TRANSPORT/dci_tools.c b/openair1/PHY/LTE_TRANSPORT/dci_tools.c index 702e17456e..7919661bb8 100644 --- a/openair1/PHY/LTE_TRANSPORT/dci_tools.c +++ b/openair1/PHY/LTE_TRANSPORT/dci_tools.c @@ -57,7 +57,7 @@ int find_dlsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type) { int first_free_index=-1; AssertFatal(eNB!=NULL,"eNB is null\n"); - for (int i=0; idlsch[i]!=NULL,"eNB->dlsch[%d] is null\n",i); AssertFatal(eNB->dlsch[i]!=NULL,"eNB->dlsch[%d][0] is null\n",i); LOG_D(PHY,"searching for rnti %x : UE index %d=> harq_mask %x, rnti %x, first_free_index %d\n", rnti,i,eNB->dlsch[i][0]->harq_mask,eNB->dlsch[i][0]->rnti,first_free_index); @@ -81,7 +81,7 @@ int find_ulsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type) { int first_free_index=-1; AssertFatal(eNB!=NULL,"eNB is null\n"); - for (int i=0; iulsch[i]!=NULL,"eNB->ulsch[%d] is null\n",i); if ((eNB->ulsch[i]->harq_mask >0) && @@ -299,7 +299,7 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB, UE_id = find_dlsch(rel8->rnti,eNB,SEARCH_EXIST_OR_FREE); - if( (UE_id<0) || (UE_id>=NUMBER_OF_UE_MAX) ) { + if( (UE_id<0) || (UE_id>=NUMBER_OF_DLSCH_MAX) ) { LOG_E(PHY,"illegal UE_id found!!! rnti %04x UE_id %d\n",rel8->rnti,UE_id); return; } @@ -1548,7 +1548,7 @@ void fill_mdci_and_dlsch(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,mDCI_ALLOC_t *dc dci_alloc->i0 = rel13->initial_transmission_sf_io; UE_id = find_dlsch (rel13->rnti, eNB, SEARCH_EXIST_OR_FREE); AssertFatal (UE_id != -1, "no free or exiting dlsch_context\n"); - AssertFatal (UE_id < NUMBER_OF_UE_MAX, "returned UE_id %d >= %d(NUMBER_OF_UE_MAX)\n", UE_id, NUMBER_OF_UE_MAX); + AssertFatal (UE_id < NUMBER_OF_DLSCH_MAX, "returned UE_id %d >= %d(NUMBER_OF_DLSCH_MAX)\n", UE_id, NUMBER_OF_DLSCH_MAX); dlsch0 = eNB->dlsch[UE_id][0]; dlsch0_harq = dlsch0->harq_processes[rel13->harq_process]; dci_alloc->ra_flag = 0; diff --git a/openair1/SCHED/fapi_l1.c b/openair1/SCHED/fapi_l1.c index 40717a917d..272ac4cb99 100644 --- a/openair1/SCHED/fapi_l1.c +++ b/openair1/SCHED/fapi_l1.c @@ -815,7 +815,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO, L1_rxtx_proc_t *proc) { // clear DCI allocation maps for new subframe if (NFAPI_MODE!=NFAPI_MODE_VNF) - for (volatile int i=0; iulsch[i]!=NULL) { ulsch_harq = eNB->ulsch[i]->harq_processes[harq_pid]; ulsch_harq->dci_alloc=0; From 2e59e05b66b1c258b933f51eb596a594b0faebcf Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Tue, 2 Feb 2021 23:20:20 +0100 Subject: [PATCH 059/579] set eNB->use_DTX=1, TM2 now works again. Need to fix this option when multiple TX antenna ports are used --- openair1/PHY/INIT/lte_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openair1/PHY/INIT/lte_init.c b/openair1/PHY/INIT/lte_init.c index 084e614352..962778874a 100644 --- a/openair1/PHY/INIT/lte_init.c +++ b/openair1/PHY/INIT/lte_init.c @@ -436,7 +436,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB, eNB->first_run_I0_measurements = 1; ///This flag used to be static. With multiple eNBs this does no longer work, hence we put it in the structure. However it has to be initialized with 1, which is performed here. - eNB->use_DTX=0; + eNB->use_DTX=1; if (NFAPI_MODE!=NFAPI_MODE_VNF) { common_vars->rxdata = (int32_t **)NULL; common_vars->txdataF = (int32_t **)malloc16(NB_ANTENNA_PORTS_ENB*sizeof(int32_t *)); @@ -452,7 +452,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB, LOG_I(PHY,"[INIT] common_vars->txdataF[%d] = %p (%lu bytes)\n", i,common_vars->txdataF[i], fp->ofdm_symbol_size*fp->symbols_per_tti*10*sizeof(int32_t)); - if (inb_antenna_ports_eNB) eNB->subframe_mask[i] = malloc16_clear(fp->ofdm_symbol_size*fp->symbols_per_tti*10*sizeof(int32_t) ); + if (eNB->use_DTX==0 && inb_antenna_ports_eNB) eNB->subframe_mask[i] = malloc16_clear(fp->ofdm_symbol_size*fp->symbols_per_tti*10*sizeof(int32_t) ); } } From b81b6181e013e53764075a55160603e65ea05196 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Wed, 3 Feb 2021 13:58:43 +0100 Subject: [PATCH 060/579] CI: migrating to oairu target on RRU machines Signed-off-by: Raphael Defosseux --- ci-scripts/ran.py | 14 +++++++++----- ci-scripts/xml_files/multi_rru_band38_build.xml | 10 +++++----- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index 774d7f19c6..4d5c608bbe 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -127,12 +127,16 @@ class RANManagement(): result = re.search('--eNBocp', self.Build_eNB_args) if result is not None: self.air_interface[self.eNB_instance] = 'ocp-enb' - else: - result = re.search('--gNB', self.Build_eNB_args) + else: + result = re.search('--RU', self.Build_eNB_args) if result is not None: - self.air_interface[self.eNB_instance] = 'nr-softmodem' + self.air_interface[self.eNB_instance] = 'oairu' else: - self.air_interface[self.eNB_instance] = 'lte-softmodem' + result = re.search('--gNB', self.Build_eNB_args) + if result is not None: + self.air_interface[self.eNB_instance] = 'nr-softmodem' + else: + self.air_interface[self.eNB_instance] = 'lte-softmodem' # Worakround for some servers, we need to erase completely the workspace if self.Build_eNB_forced_workspace_cleanup: @@ -293,7 +297,7 @@ class RANManagement(): mySSH.open(self.eNBIPAddress, self.eNBUserName, self.eNBPassword) mySSH.command('cd ' + self.eNBSourceCodePath + '/cmake_targets', '\$', 5) #-qq quiet / -u update orcreate files - mySSH.command('unzip -u -qq -DD tmp_build' + testcaseId + '.zip', '\$', 5) + mySSH.command('unzip -o -u -qq -DD tmp_build' + testcaseId + '.zip', '\$', 5) mySSH.command('rm -f tmp_build' + testcaseId + '.zip', '\$', 5) mySSH.close() else: diff --git a/ci-scripts/xml_files/multi_rru_band38_build.xml b/ci-scripts/xml_files/multi_rru_band38_build.xml index ba45eab10a..1370a3a396 100644 --- a/ci-scripts/xml_files/multi_rru_band38_build.xml +++ b/ci-scripts/xml_files/multi_rru_band38_build.xml @@ -26,7 +26,7 @@ wrench 010101 010102 010103 - 000101 000102 000103 + 000102 000103 000101 @@ -50,7 +50,7 @@ Build_eNB Build Master RRU - -w USRP -c --eNB --ninja + -w USRP -c --RU --ninja 1 1 True @@ -59,7 +59,7 @@ WaitEndBuild_eNB Wait for end of Build Master RRU - -w USRP -c --eNB --ninja + -w USRP -c --RU --ninja 1 1 @@ -67,7 +67,7 @@ Build_eNB Build Slave RRU - -w USRP -c --eNB --ninja + -w USRP -c --RU --ninja 2 2 True @@ -76,7 +76,7 @@ WaitEndBuild_eNB Wait for end of Build Slave RRU - -w USRP -c --eNB --ninja + -w USRP -c --RU --ninja 2 2 From b3341ed1ca8dc39f8f790010b1147d3865940f28 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Thu, 4 Feb 2021 15:19:02 +0100 Subject: [PATCH 061/579] CI: fix false negative in HTML report Signed-off-by: Raphael Defosseux --- ci-scripts/reportTestLocally.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci-scripts/reportTestLocally.sh b/ci-scripts/reportTestLocally.sh index 8562f4b2de..1e6fc6e12b 100755 --- a/ci-scripts/reportTestLocally.sh +++ b/ci-scripts/reportTestLocally.sh @@ -309,14 +309,14 @@ function report_test { NB_ENB_GOT_SYNC=`egrep -c "got sync" $ENB_LOG` NB_UE_GOT_SYNC=`egrep -c "got sync" $UE_LOG` NB_ENB_SYNCED_WITH_UE=`egrep -c "got UE capabilities for UE" $ENB_LOG` - if [ $NB_ENB_GOT_SYNC -eq 1 ] && [ $NB_UE_GOT_SYNC -eq 2 ] && [ $NB_ENB_SYNCED_WITH_UE -eq 1 ] + if [ $NB_ENB_GOT_SYNC -gt 0 ] && [ $NB_UE_GOT_SYNC -eq 2 ] && [ $NB_ENB_SYNCED_WITH_UE -eq 1 ] then echo " OK" >> ./test_simulator_results.html else echo " KO" >> ./test_simulator_results.html fi echo "
" >> ./test_simulator_results.html
-                    if [ $NB_ENB_GOT_SYNC -eq 1 ]
+                    if [ $NB_ENB_GOT_SYNC -gt 0 ]
                     then
                         echo "- eNB --> got sync" >> ./test_simulator_results.html
                     else

From addd891a2f80b5c75c0688e3f41da4b922d17552 Mon Sep 17 00:00:00 2001
From: Raymond Knopp 
Date: Sat, 6 Feb 2021 14:55:13 +0100
Subject: [PATCH 062/579] testing on outdoor network

---
 openair1/PHY/LTE_TRANSPORT/pucch.c         | 17 +++++++++--------
 openair1/PHY/defs_eNB.h                    |  3 ++-
 openair2/LAYER2/MAC/eNB_scheduler_fairRR.c |  7 ++-----
 openair2/LAYER2/MAC/eNB_scheduler_ulsch.c  |  4 ++--
 openair2/LAYER2/MAC/mac.h                  |  2 +-
 openair2/RRC/LTE/MESSAGES/asn1_msg.c       |  2 +-
 openair2/RRC/LTE/rrc_eNB.c                 |  2 +-
 7 files changed, 18 insertions(+), 19 deletions(-)

diff --git a/openair1/PHY/LTE_TRANSPORT/pucch.c b/openair1/PHY/LTE_TRANSPORT/pucch.c
index ae666910ea..6088eb182d 100644
--- a/openair1/PHY/LTE_TRANSPORT/pucch.c
+++ b/openair1/PHY/LTE_TRANSPORT/pucch.c
@@ -73,17 +73,17 @@ void dump_uci_stats(FILE *fd,PHY_VARS_eNB *eNB,int frame) {
   for (int i=0;iuci_stats[i].rnti>0) {
       eNB_UCI_STATS_t *uci_stats = &eNB->uci_stats[i];
-      strpos+=sprintf(output+strpos,"UCI RNTI %x: pucch1_trials %d, pucch1_thres %d dB, current pucch1_stat %d dB,positive SR count %d\n",
-	uci_stats->rnti,uci_stats->pucch1_trials,uci_stats->pucch1_thres,dB_fixed(uci_stats->current_pucch1_stat),uci_stats->pucch1_positive_SR);
-      strpos+=sprintf(output+strpos,"UCI RNTI %x: pucch1_low (%d,%d)dB pucch1_high (%d,%d)dB\n",
-	    uci_stats->rnti,
+      strpos+=sprintf(output+strpos,"UCI %d RNTI %x: pucch1_trials %d, pucch1_n0 %d dB, pucch1_thres %d dB, current pucch1_stat_pos %d dB, current pucch1_stat_neg %d dB, positive SR count %d\n",
+	i,uci_stats->rnti,uci_stats->pucch1_trials,eNB->measurements.n0_pucch_dB/*max(eNB->measurements.n0_subband_power_tot_dB[0], eNB->measurements.n0_subband_power_tot_dB[eNB->frame_parms.N_RB_UL-1])*/,uci_stats->pucch1_thres,dB_fixed(uci_stats->current_pucch1_stat_pos),dB_fixed(uci_stats->current_pucch1_stat_neg),uci_stats->pucch1_positive_SR);
+      strpos+=sprintf(output+strpos,"UCI %d RNTI %x: pucch1_low (%d,%d)dB pucch1_high (%d,%d)dB\n",
+	    i,uci_stats->rnti,
             dB_fixed(uci_stats->pucch1_low_stat[0]),
             dB_fixed(uci_stats->pucch1_low_stat[1]),
             dB_fixed(uci_stats->pucch1_high_stat[0]),
             dB_fixed(uci_stats->pucch1_high_stat[1]));
       
-      strpos+=sprintf(output+strpos,"UCI RNTI %x: pucch1a_trials %d, pucch1a_stat (%d,%d), pucch1b_trials %d, pucch1b_stat (%d,%d) pucch1ab_DTX %d\n",
-            uci_stats->rnti,
+      strpos+=sprintf(output+strpos,"UCI %d RNTI %x: pucch1a_trials %d, pucch1a_stat (%d,%d), pucch1b_trials %d, pucch1b_stat (%d,%d) pucch1ab_DTX %d\n",
+            i,uci_stats->rnti,
             uci_stats->pucch1a_trials,
             uci_stats->current_pucch1a_stat_re,
             uci_stats->current_pucch1a_stat_im,
@@ -902,7 +902,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
   static int first_call = 1;
   LTE_eNB_COMMON *common_vars = &eNB->common_vars;
   LTE_DL_FRAME_PARMS *frame_parms = &eNB->frame_parms;
-  int8_t sigma2_dB = eNB->measurements.n0_pucch_dB;
+  int8_t sigma2_dB = /*max(eNB->measurements.n0_subband_power_tot_dB[0], eNB->measurements.n0_subband_power_tot_dB[eNB->frame_parms.N_RB_UL-1]); */eNB->measurements.n0_pucch_dB;
 
   uint32_t u,v,n,aa;
   uint32_t z[12*14];
@@ -1276,13 +1276,14 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
       // This is a moving average of the PUCCH1 statistics conditioned on being above or below the threshold
       if (sigma2_dB<(dB_fixed(stat_max)-pucch1_thres))  {
         *payload = 1;
-        uci_stats->current_pucch1_stat = stat_max;
+        uci_stats->current_pucch1_stat_pos = stat_max;
         for (int aa=0;aanb_antennas_rx;aa++) {
           uci_stats->pucch1_low_stat[aa]=stat0_max[aa];
           uci_stats->pucch1_high_stat[aa]=stat1_max[aa];
           uci_stats->pucch1_positive_SR++;
         }
       } else {
+        uci_stats->current_pucch1_stat_neg = stat_max;
         *payload = 0;
       }
 
diff --git a/openair1/PHY/defs_eNB.h b/openair1/PHY/defs_eNB.h
index 0de4e6bb77..32022c2f23 100644
--- a/openair1/PHY/defs_eNB.h
+++ b/openair1/PHY/defs_eNB.h
@@ -449,7 +449,8 @@ typedef struct {
   int frame;
   int pucch1_trials;
   int pucch1_thres;
-  int current_pucch1_stat;
+  int current_pucch1_stat_pos;
+  int current_pucch1_stat_neg;
   int pucch1_positive_SR;
   int pucch1_low_stat[4];
   int pucch1_high_stat[4];
diff --git a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c
index 48f0eede31..c11c40662f 100644
--- a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c
+++ b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c
@@ -2729,10 +2729,6 @@ void ulsch_scheduler_pre_processor_fairRR(module_id_t module_idP,
               tbs = get_TBS_UL(mcs,rb_table[rb_table_index]);
               tx_power= estimate_ue_tx_power(0,tbs*8,rb_table[rb_table_index],0,cc->Ncp,0);
             }
-            if (rb_table[rb_table_index]>40) LOG_D(MAC,"bytes_to_schedule %d, nb_rb %d tx_power %d PHR %d\n",
-                  bytes_to_schedule,rb_table[rb_table_index],
-                  estimate_ue_tx_power(0,tbs*8,rb_table[rb_table_index],0,cc->Ncp,0),
-                  UE_template->phr_info);
             if ( rb_table[rb_table_index]<3 ) {
               rb_table_index=2;
             }
@@ -2773,10 +2769,11 @@ void ulsch_scheduler_pre_processor_fairRR(module_id_t module_idP,
               UE_info->UE_template[CC_id][UE_id].pre_assigned_mcs_ul = 10;
             } else {
               // assigne RBS( 3 RBs)
+
               first_rb[CC_id] = first_rb[CC_id] + 3;
               UE_info->UE_template[CC_id][UE_id].pre_allocated_nb_rb_ul = 3;
               UE_info->UE_template[CC_id][UE_id].pre_allocated_rb_table_index_ul = 2;
-              UE_info->UE_template[CC_id][UE_id].pre_assigned_mcs_ul = 10;
+              UE_info->UE_template[CC_id][UE_id].pre_assigned_mcs_ul = 10; 
             }
           }
         } else if ( ulsch_ue_select[CC_id].list[ulsch_ue_num].ue_priority  == SCH_UL_INACTIVE ) {
diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
index 87227877e0..d505abe4c1 100644
--- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
+++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
@@ -430,7 +430,7 @@ rx_sdu(const module_id_t enb_mod_idP,
       case CRNTI:
         old_rnti = (((uint16_t) payload_ptr[0]) << 8) + payload_ptr[1];
         old_UE_id = find_UE_id(enb_mod_idP, old_rnti);
-        LOG_D(MAC, "[eNB %d] Frame %d, Subframe %d CC_id %d MAC CE_LCID %d (ce %d/%d): CRNTI %x (UE_id %d) in Msg3\n",
+        LOG_I(MAC, "[eNB %d] Frame %d, Subframe %d CC_id %d MAC CE_LCID %d (ce %d/%d): CRNTI %x (UE_id %d) in Msg3\n",
               enb_mod_idP,
               frameP,
               subframeP,
@@ -508,7 +508,7 @@ rx_sdu(const module_id_t enb_mod_idP,
               /* Received a new rnti */
               if (ret == 0) {
                 ra->state = MSGCRNTI;
-                LOG_D(MAC, "[eNB %d] Frame %d, Subframe %d CC_id %d : (rnti %x UE_id %d) Received rnti(Msg4)\n",
+                LOG_I(MAC, "[eNB %d] Frame %d, Subframe %d CC_id %d : (rnti %x UE_id %d) Received rnti(Msg4)\n",
                       enb_mod_idP,
                       frameP,
                       subframeP,
diff --git a/openair2/LAYER2/MAC/mac.h b/openair2/LAYER2/MAC/mac.h
index f3528d78b7..3d42febb20 100644
--- a/openair2/LAYER2/MAC/mac.h
+++ b/openair2/LAYER2/MAC/mac.h
@@ -83,7 +83,7 @@
 
 #define MAX_MAC_INST 16
 #define BCCH_PAYLOAD_SIZE_MAX 128
-#define CCCH_PAYLOAD_SIZE_MAX 128
+#define CCCH_PAYLOAD_SIZE_MAX 512 
 #define PCCH_PAYLOAD_SIZE_MAX 128
 #define RAR_PAYLOAD_SIZE_MAX 128
 
diff --git a/openair2/RRC/LTE/MESSAGES/asn1_msg.c b/openair2/RRC/LTE/MESSAGES/asn1_msg.c
index 2eddd08390..ce26aeef87 100644
--- a/openair2/RRC/LTE/MESSAGES/asn1_msg.c
+++ b/openair2/RRC/LTE/MESSAGES/asn1_msg.c
@@ -2728,7 +2728,7 @@ do_RRCConnectionSetup(
   //  assign_enum(&physicalConfigDedicated2->schedulingRequestConfig->choice.setup.dsr_TransMax,
   //SchedulingRequestConfig__setup__dsr_TransMax_n4);
   //  assign_enum(&physicalConfigDedicated2->schedulingRequestConfig->choice.setup.dsr_TransMax = SchedulingRequestConfig__setup__dsr_TransMax_n4;
-  physicalConfigDedicated2->schedulingRequestConfig->choice.setup.dsr_TransMax = LTE_SchedulingRequestConfig__setup__dsr_TransMax_n4;
+  physicalConfigDedicated2->schedulingRequestConfig->choice.setup.dsr_TransMax = LTE_SchedulingRequestConfig__setup__dsr_TransMax_n64;
   rrcConnectionSetup->rrc_TransactionIdentifier = Transaction_id;
   rrcConnectionSetup->criticalExtensions.present = LTE_RRCConnectionSetup__criticalExtensions_PR_c1;
   rrcConnectionSetup->criticalExtensions.choice.c1.present = LTE_RRCConnectionSetup__criticalExtensions__c1_PR_rrcConnectionSetup_r8 ;
diff --git a/openair2/RRC/LTE/rrc_eNB.c b/openair2/RRC/LTE/rrc_eNB.c
index 4f00ef3a92..8a9472935b 100644
--- a/openair2/RRC/LTE/rrc_eNB.c
+++ b/openair2/RRC/LTE/rrc_eNB.c
@@ -5804,7 +5804,7 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
   //SchedulingRequestConfig__setup__dsr_TransMax_n4);
   //  assign_enum(&physicalConfigDedicated2->schedulingRequestConfig->choice.setup.dsr_TransMax = SchedulingRequestConfig__setup__dsr_TransMax_n4;
   physicalConfigDedicated2->schedulingRequestConfig->choice.setup.dsr_TransMax =
-    LTE_SchedulingRequestConfig__setup__dsr_TransMax_n4;
+    LTE_SchedulingRequestConfig__setup__dsr_TransMax_n64;
   LOG_D(RRC,
         "handover_config [FRAME %05d][RRC_eNB][MOD %02d][][--- MAC_CONFIG_REQ  (SRB1 UE %x) --->][MAC_eNB][MOD %02d][]\n",
         ctxt_pP->frame, ctxt_pP->module_id, ue_context_pP->ue_context.rnti, ctxt_pP->module_id);

From edff477050b85554b8a0ed46154e6c92d9ac6a98 Mon Sep 17 00:00:00 2001
From: Raymond Knopp 
Date: Sun, 7 Feb 2021 09:40:22 +0100
Subject: [PATCH 063/579] reduced 5G memory limits for CI

---
 openair1/PHY/INIT/lte_init_ue.c               |   1 +
 openair1/PHY/INIT/nr_init_ru.c                |   3 +-
 openair1/PHY/LTE_TRANSPORT/dci_tools.c        |   5 +-
 openair1/PHY/LTE_TRANSPORT/prach_common.c     | 180 ------------------
 openair1/PHY/LTE_UE_TRANSPORT/prach_ue.c      |   5 +-
 .../PHY/LTE_UE_TRANSPORT/transport_proto_ue.h |   5 -
 openair1/SIMULATION/LTE_PHY/ulsim.c           |   2 +-
 openair2/LAYER2/NR_MAC_COMMON/nr_mac.h        |   2 +-
 targets/COMMON/openairinterface5g_limits.h    |   4 +-
 9 files changed, 13 insertions(+), 194 deletions(-)

diff --git a/openair1/PHY/INIT/lte_init_ue.c b/openair1/PHY/INIT/lte_init_ue.c
index 25a93adaf9..b756735816 100644
--- a/openair1/PHY/INIT/lte_init_ue.c
+++ b/openair1/PHY/INIT/lte_init_ue.c
@@ -39,6 +39,7 @@ void init_7_5KHz(void);
 
 uint8_t dmrs1_tab_ue[8] = {0,2,3,4,6,8,9,10};
 
+void init_sss(void);
 
 void phy_config_sib1_ue(module_id_t Mod_id,int CC_id,
                         uint8_t eNB_id,
diff --git a/openair1/PHY/INIT/nr_init_ru.c b/openair1/PHY/INIT/nr_init_ru.c
index 7a16a29bb0..02ce4e6ec2 100644
--- a/openair1/PHY/INIT/nr_init_ru.c
+++ b/openair1/PHY/INIT/nr_init_ru.c
@@ -29,7 +29,8 @@
 #include "assertions.h"
 #include 
 #include "openair1/PHY/defs_RU.h"
-//#include "openair1/PHY/NR_TRANSPORT/nr_transport_proto.h"
+
+void init_prach_ru_list(RU_t *ru);
 
 extern const char ru_if_types[MAX_RU_IF_TYPES][20];
 
diff --git a/openair1/PHY/LTE_TRANSPORT/dci_tools.c b/openair1/PHY/LTE_TRANSPORT/dci_tools.c
index 7919661bb8..f11a39e249 100644
--- a/openair1/PHY/LTE_TRANSPORT/dci_tools.c
+++ b/openair1/PHY/LTE_TRANSPORT/dci_tools.c
@@ -58,8 +58,7 @@ int find_dlsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type) {
   AssertFatal(eNB!=NULL,"eNB is null\n");
 
   for (int i=0; idlsch[i]!=NULL,"eNB->dlsch[%d] is null\n",i);
-    AssertFatal(eNB->dlsch[i]!=NULL,"eNB->dlsch[%d][0] is null\n",i);
+    if (eNB->dlsch[i][0] == NULL) continue;
     LOG_D(PHY,"searching for rnti %x : UE index %d=> harq_mask %x, rnti %x, first_free_index %d\n", rnti,i,eNB->dlsch[i][0]->harq_mask,eNB->dlsch[i][0]->rnti,first_free_index);
 
     if ((eNB->dlsch[i][0]->harq_mask >0) &&
@@ -82,7 +81,7 @@ int find_ulsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type) {
   AssertFatal(eNB!=NULL,"eNB is null\n");
 
   for (int i=0; iulsch[i]!=NULL,"eNB->ulsch[%d] is null\n",i);
+    if (eNB->ulsch[i]==NULL) continue;
 
     if ((eNB->ulsch[i]->harq_mask >0) &&
         (eNB->ulsch[i]->rnti==rnti))       return i;
diff --git a/openair1/PHY/LTE_TRANSPORT/prach_common.c b/openair1/PHY/LTE_TRANSPORT/prach_common.c
index db5d524140..e366e8edbc 100644
--- a/openair1/PHY/LTE_TRANSPORT/prach_common.c
+++ b/openair1/PHY/LTE_TRANSPORT/prach_common.c
@@ -380,186 +380,6 @@ uint8_t get_fid_prach_tdd(module_id_t Mod_id,uint8_t tdd_map_index) {
   LTE_DL_FRAME_PARMS *fp = &PHY_vars_UE_g[Mod_id][0]->frame_parms;
   return(tdd_preamble_map[fp->prach_config_common.prach_ConfigInfo.prach_ConfigIndex][fp->tdd_config].map[tdd_map_index].f_ra);
 }
-/*
-uint8_t get_prach_fmt(uint8_t prach_ConfigIndex,lte_frame_type_t frame_type) {
-  if (frame_type == FDD) // FDD
-    return(prach_ConfigIndex>>4);
-  else {
-    if (prach_ConfigIndex < 20)
-      return (0);
-
-    if (prach_ConfigIndex < 30)
-      return (1);
-
-    if (prach_ConfigIndex < 40)
-      return (2);
-
-    if (prach_ConfigIndex < 48)
-      return (3);
-    else
-      return (4);
-  }
-}
-
-uint8_t get_prach_prb_offset(LTE_DL_FRAME_PARMS *frame_parms,
-                             uint8_t prach_ConfigIndex,
-                             uint8_t n_ra_prboffset,
-                             uint8_t tdd_mapindex, uint16_t Nf) {
-  lte_frame_type_t frame_type         = frame_parms->frame_type;
-  uint8_t tdd_config         = frame_parms->tdd_config;
-  uint8_t n_ra_prb;
-  uint8_t f_ra,t1_ra;
-  uint8_t prach_fmt = get_prach_fmt(prach_ConfigIndex,frame_type);
-  uint8_t Nsp=2;
-
-  if (frame_type == TDD) { // TDD
-    if (tdd_preamble_map[prach_ConfigIndex][tdd_config].num_prach==0) {
-      LOG_E(PHY, "Illegal prach_ConfigIndex %"PRIu8"", prach_ConfigIndex);
-      return(-1);
-    }
-
-    // adjust n_ra_prboffset for frequency multiplexing (p.36 36.211)
-    f_ra = tdd_preamble_map[prach_ConfigIndex][tdd_config].map[tdd_mapindex].f_ra;
-
-    if (prach_fmt < 4) {
-      if ((f_ra&1) == 0) {
-        n_ra_prb = n_ra_prboffset + 6*(f_ra>>1);
-      } else {
-        n_ra_prb = frame_parms->N_RB_UL - 6 - n_ra_prboffset + 6*(f_ra>>1);
-      }
-    } else {
-      if ((tdd_config >2) && (tdd_config<6))
-        Nsp = 2;
-
-      t1_ra = tdd_preamble_map[prach_ConfigIndex][tdd_config].map[0].t1_ra;
-
-      if ((((Nf&1)*(2-Nsp)+t1_ra)&1) == 0) {
-        n_ra_prb = 6*f_ra;
-      } else {
-        n_ra_prb = frame_parms->N_RB_UL - 6*(f_ra+1);
-      }
-    }
-  } else { //FDD
-    n_ra_prb = n_ra_prboffset;
-  }
-
-  return(n_ra_prb);
-}
-
-int is_prach_subframe0(LTE_DL_FRAME_PARMS *frame_parms,uint8_t prach_ConfigIndex,uint32_t frame, uint8_t subframe) {
-  //  uint8_t prach_ConfigIndex  = frame_parms->prach_config_common.prach_ConfigInfo.prach_ConfigIndex;
-  uint8_t tdd_config         = frame_parms->tdd_config;
-  uint8_t t0_ra;
-  uint8_t t1_ra;
-  uint8_t t2_ra;
-  int prach_mask = 0;
-
-  if (frame_parms->frame_type == FDD) { //FDD
-    //implement Table 5.7.1-2 from 36.211 (Rel-10, p.41)
-    if ((((frame&1) == 1) && (subframe < 9)) ||
-        (((frame&1) == 0) && (subframe == 9)))  // This is an odd frame, ignore even-only PRACH frames
-      if (((prach_ConfigIndex&0xf)<3) || // 0,1,2,16,17,18,32,33,34,48,49,50
-          ((prach_ConfigIndex&0x1f)==18) || // 18,50
-          ((prach_ConfigIndex&0xf)==15))   // 15,47
-        return(0);
-
-    switch (prach_ConfigIndex&0x1f) {
-      case 0:
-      case 3:
-        if (subframe==1) prach_mask = 1;
-
-        break;
-
-      case 1:
-      case 4:
-        if (subframe==4) prach_mask = 1;
-
-        break;
-
-      case 2:
-      case 5:
-        if (subframe==7) prach_mask = 1;
-
-        break;
-
-      case 6:
-        if ((subframe==1) || (subframe==6)) prach_mask=1;
-
-        break;
-
-      case 7:
-        if ((subframe==2) || (subframe==7)) prach_mask=1;
-
-        break;
-
-      case 8:
-        if ((subframe==3) || (subframe==8)) prach_mask=1;
-
-        break;
-
-      case 9:
-        if ((subframe==1) || (subframe==4) || (subframe==7)) prach_mask=1;
-
-        break;
-
-      case 10:
-        if ((subframe==2) || (subframe==5) || (subframe==8)) prach_mask=1;
-
-        break;
-
-      case 11:
-        if ((subframe==3) || (subframe==6) || (subframe==9)) prach_mask=1;
-
-        break;
-
-      case 12:
-        if ((subframe&1)==0) prach_mask=1;
-
-        break;
-
-      case 13:
-        if ((subframe&1)==1) prach_mask=1;
-
-        break;
-
-      case 14:
-        prach_mask=1;
-        break;
-
-      case 15:
-        if (subframe==9) prach_mask=1;
-
-        break;
-    }
-  } else { // TDD
-    AssertFatal(prach_ConfigIndex<64,
-                "Illegal prach_ConfigIndex %d for ",prach_ConfigIndex);
-    AssertFatal(tdd_preamble_map[prach_ConfigIndex][tdd_config].num_prach>0,
-                "Illegal prach_ConfigIndex %d for ",prach_ConfigIndex);
-    t0_ra = tdd_preamble_map[prach_ConfigIndex][tdd_config].map[0].t0_ra;
-    t1_ra = tdd_preamble_map[prach_ConfigIndex][tdd_config].map[0].t1_ra;
-    t2_ra = tdd_preamble_map[prach_ConfigIndex][tdd_config].map[0].t2_ra;
-#ifdef PRACH_DEBUG
-    LOG_I(PHY,"[PRACH] Checking for PRACH format (ConfigIndex %d) in TDD subframe %d (%d,%d,%d)\n",
-          prach_ConfigIndex,
-          subframe,
-          t0_ra,t1_ra,t2_ra);
-#endif
-
-    if ((((t0_ra == 1) && ((frame &1)==0))||  // frame is even and PRACH is in even frames
-         ((t0_ra == 2) && ((frame &1)==1))||  // frame is odd and PRACH is in odd frames
-         (t0_ra == 0)) &&                                // PRACH is in all frames
-        (((subframe<5)&&(t1_ra==0)) ||                   // PRACH is in 1st half-frame
-         (((subframe>4)&&(t1_ra==1))))) {                // PRACH is in 2nd half-frame
-      if ((prach_ConfigIndex<48) &&                          // PRACH only in normal UL subframe
-          (((subframe%5)-2)==t2_ra)) prach_mask=1;
-      else if ((prach_ConfigIndex>47) && (((subframe%5)-1)==t2_ra)) prach_mask=1;      // PRACH can be in UpPTS
-    }
-  }
-
-  return(prach_mask);
-}
-*/
 
 int is_prach_subframe(LTE_DL_FRAME_PARMS *frame_parms, uint32_t frame, uint8_t subframe) {
   uint8_t prach_ConfigIndex  = frame_parms->prach_config_common.prach_ConfigInfo.prach_ConfigIndex;
diff --git a/openair1/PHY/LTE_UE_TRANSPORT/prach_ue.c b/openair1/PHY/LTE_UE_TRANSPORT/prach_ue.c
index ab7c2b9091..929f63e9fc 100644
--- a/openair1/PHY/LTE_UE_TRANSPORT/prach_ue.c
+++ b/openair1/PHY/LTE_UE_TRANSPORT/prach_ue.c
@@ -41,6 +41,7 @@
 #include "common/utils/LOG/vcd_signal_dumper.h"
 
 #include "../LTE_TRANSPORT/prach_extern.h"
+#include "common/utils/lte/prach_utils.h"
 
 //#define PRACH_DEBUG 1
 
@@ -115,7 +116,9 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
     NCS = NCS_restricted[Ncs_config];
   }
 
-  n_ra_prb = get_prach_prb_offset(&(ue->frame_parms),
+  n_ra_prb = get_prach_prb_offset(ue->frame_parms.frame_type,
+				  ue->frame_parms.tdd_config,
+				  ue->frame_parms.N_RB_UL,
                                   ue->frame_parms.prach_config_common.prach_ConfigInfo.prach_ConfigIndex,
                                   ue->frame_parms.prach_config_common.prach_ConfigInfo.prach_FreqOffset,
                                   tdd_mapindex, Nf);
diff --git a/openair1/PHY/LTE_UE_TRANSPORT/transport_proto_ue.h b/openair1/PHY/LTE_UE_TRANSPORT/transport_proto_ue.h
index 3299401443..7ab795cae9 100644
--- a/openair1/PHY/LTE_UE_TRANSPORT/transport_proto_ue.h
+++ b/openair1/PHY/LTE_UE_TRANSPORT/transport_proto_ue.h
@@ -1740,10 +1740,5 @@ double computeRhoB_UE(PDSCH_CONFIG_DEDICATED  *pdsch_config_dedicated,
   LTE_UE_DLSCH_t *dlsch_ue);
 */
 
-uint8_t get_prach_prb_offset(LTE_DL_FRAME_PARMS *frame_parms,
-                             uint8_t prach_ConfigIndex,
-                             uint8_t n_ra_prboffset,
-                             uint8_t tdd_mapindex, uint16_t Nf);
-
 /**@}*/
 #endif
diff --git a/openair1/SIMULATION/LTE_PHY/ulsim.c b/openair1/SIMULATION/LTE_PHY/ulsim.c
index 0bb4c8fe2e..2e9fe1a772 100644
--- a/openair1/SIMULATION/LTE_PHY/ulsim.c
+++ b/openair1/SIMULATION/LTE_PHY/ulsim.c
@@ -1304,7 +1304,7 @@ int main(int argc, char **argv) {
         LOG_UDUMPMSG(SIM,dataArray(table_rx),table_rx->size,LOG_DUMP_DOUBLE,"The receiver raw data: \n");
       }
 
-      dump_ulsch_stats(NULL,eNB,0);
+      dump_ulsch_stats(stdout,eNB,0);
       printf("\n**********rb: %d ***mcs : %d  *********SNR = %f dB (%f): TX %u dB (gain %f dB), N0W %f dB, I0 %u dB, delta_IF %d [ (%d,%d) dB / (%u,%u) dB ]**************************\n",
              nb_rb,mcs,SNR,SNR2,
              tx_lev_dB,
diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac.h b/openair2/LAYER2/NR_MAC_COMMON/nr_mac.h
index d8583167dd..a7e2598c12 100644
--- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac.h
+++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac.h
@@ -41,7 +41,7 @@
 
 #define NR_BCCH_BCH 5    // MIB
 
-#define CCCH_PAYLOAD_SIZE_MAX 128
+#define CCCH_PAYLOAD_SIZE_MAX 512 
 
 #define RAR_PAYLOAD_SIZE_MAX  128
 
diff --git a/targets/COMMON/openairinterface5g_limits.h b/targets/COMMON/openairinterface5g_limits.h
index b40871b25c..de1502112b 100644
--- a/targets/COMMON/openairinterface5g_limits.h
+++ b/targets/COMMON/openairinterface5g_limits.h
@@ -10,8 +10,8 @@
 #        define NUMBER_OF_ULSCH_MAX 8
 #        define NUMBER_OF_DLSCH_MAX 8 
 #        define NUMBER_OF_SRS_MAX 16
-#        define NUMBER_OF_NR_ULSCH_MAX 16
-#        define NUMBER_OF_NR_DLSCH_MAX 16
+#        define NUMBER_OF_NR_ULSCH_MAX 8
+#        define NUMBER_OF_NR_DLSCH_MAX 8
 #        define NUMBER_OF_NR_UCI_MAX 16
 #        define nUMBER_OF_NR_SRS_MAX 16
 #        define NUMBER_OF_SCH_STATS_MAX 16

From 008f9060a1163d3b37f80f169f6c0291ef74938a Mon Sep 17 00:00:00 2001
From: Raymond Knopp 
Date: Sun, 7 Feb 2021 14:14:28 +0100
Subject: [PATCH 064/579] unitary simulators tested

---
 openair1/PHY/INIT/nr_init.c           | 2 +-
 openair1/SIMULATION/NR_PHY/prachsim.c | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/openair1/PHY/INIT/nr_init.c b/openair1/PHY/INIT/nr_init.c
index 9897a4d399..ce0f340c24 100644
--- a/openair1/PHY/INIT/nr_init.c
+++ b/openair1/PHY/INIT/nr_init.c
@@ -554,7 +554,7 @@ void init_nr_transport(PHY_VARS_gNB *gNB) {
 
   for (i=0; iif_south       = LOCAL_RF;
   ru->nb_tx          = n_tx;
   ru->nb_rx          = n_rx;
-
+  ru->num_gNB        = 1;
+  ru->gNB_list[0]    = gNB;
   gNB->gNB_config.carrier_config.num_tx_ant.value = 1;
   gNB->gNB_config.carrier_config.num_rx_ant.value = 1;
   if (mu==1)

From 1bf9ea6d230e9a8ee31bdafb7c970008673f2fff Mon Sep 17 00:00:00 2001
From: Raymond Knopp 
Date: Sun, 7 Feb 2021 22:01:41 +0100
Subject: [PATCH 065/579] fixed NR build issues after merge with develop

---
 openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c | 2 ++
 openair2/RRC/NR/rrc_gNB.c                   | 8 ++++----
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
index 0a6af58dee..7c94dd28f4 100644
--- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
@@ -51,6 +51,8 @@
 #include "asn1_conversions.h"
 #include "SIMULATION/TOOLS/sim.h" // for taus
 
+#include 
+
 static prach_association_pattern_t prach_assoc_pattern;
 static ssb_list_info_t ssb_list;
 
diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c
index 3a20905e11..c19d074524 100755
--- a/openair2/RRC/NR/rrc_gNB.c
+++ b/openair2/RRC/NR/rrc_gNB.c
@@ -1104,7 +1104,7 @@ rrc_gNB_process_RRCConnectionReestablishmentComplete(
 
   uint8_t next_xid = rrc_gNB_get_next_transaction_identifier(ctxt_pP->module_id);
   int ret = 0;
-  ue_context_pP->ue_context.Status = NR_RRC_CONNECTED;
+  ue_context_pP->ue_context.status = NR_RRC_CONNECTED;
   ue_context_pP->ue_context.ue_rrc_inactivity_timer = 1; // set rrc inactivity when UE goes into RRC_CONNECTED
   ue_context_pP->ue_context.reestablishment_xid = next_xid;
   SRB_configList2 = &ue_context_pP->ue_context.SRB_configList2[xid];
@@ -1594,7 +1594,7 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t    *const ctxt_pP,
           }
 #endif
           //c-plane not end
-          if((ue_context_p->ue_context.Status != NR_RRC_RECONFIGURED) && (ue_context_p->ue_context.reestablishment_cause == NR_ReestablishmentCause_spare1)) {
+          if((ue_context_p->ue_context.status != NR_RRC_RECONFIGURED) && (ue_context_p->ue_context.reestablishment_cause == NR_ReestablishmentCause_spare1)) {
             LOG_E(NR_RRC,
                   PROTOCOL_NR_RRC_CTXT_UE_FMT" NR_RRCReestablishmentRequest (UE %x c-plane is not end), RRC establishment failed \n",
                   PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP),c_rnti);
@@ -1606,9 +1606,9 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t    *const ctxt_pP,
             LOG_E(NR_RRC,
                   PROTOCOL_NR_RRC_CTXT_UE_FMT" RRRCReconfigurationComplete(Previous) don't receive, delete the Previous UE,\nprevious Status %d, new Status NR_RRC_RECONFIGURED\n",
                   PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP),
-                  ue_context_p->ue_context.Status
+                  ue_context_p->ue_context.status
                   );
-            ue_context_p->ue_context.Status = NR_RRC_RECONFIGURED;
+            ue_context_p->ue_context.status = NR_RRC_RECONFIGURED;
             protocol_ctxt_t  ctxt_old_p;
             PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt_old_p,
                                           ctxt_pP->instance,

From 4d47e3da96378e373c5aeb2c9472800e7036b25b Mon Sep 17 00:00:00 2001
From: Raymond Knopp 
Date: Mon, 8 Feb 2021 15:27:37 +0100
Subject: [PATCH 066/579] IF4p5 testing. seems to work again with fixes after
 merge with develop

---
 targets/RT/USER/lte-enb.c | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c
index f55071e2c9..f65d8486c7 100644
--- a/targets/RT/USER/lte-enb.c
+++ b/targets/RT/USER/lte-enb.c
@@ -1155,7 +1155,7 @@ void init_transport(PHY_VARS_eNB *eNB) {
 
 
 void init_eNB_afterRU(void) {
-  int inst,CC_id,ru_id,i,aa;
+  int inst,CC_id,i,aa;
   PHY_VARS_eNB *eNB;
   LOG_I(PHY,"%s() RC.nb_inst:%d\n", __FUNCTION__, RC.nb_inst);
 
@@ -1165,13 +1165,14 @@ void init_eNB_afterRU(void) {
     for (CC_id=0; CC_idnum_RU>0,"Number of RU attached to eNB %d is zero\n",eNB->Mod_id);
-
+     // map antennas and PRACH signals to eNB RX
       LOG_I(PHY,"Mapping RX ports from %d RUs to eNB %d\n",eNB->num_RU,eNB->Mod_id);
       eNB->frame_parms.nb_antennas_rx       = 0;
+      LOG_I(PHY,"eNB->num_RU:%d\n", eNB->num_RU);     
+      AssertFatal(eNB->num_RU>0,"Number of RU attached to eNB %d is      zero\n",eNB->Mod_id);
+      for (int ru_id=0,aa=0; ru_idnum_RU; ru_id++) 
+         eNB->frame_parms.nb_antennas_rx    += eNB->RU_list[ru_id]->nb_rx;
+      phy_init_lte_eNB(eNB,0,0);
       LOG_I(PHY,"Overwriting eNB->prach_vars.rxsigF[0]:%p\n", eNB->prach_vars.rxsigF[0]);
       eNB->prach_vars.rxsigF[0] = (int16_t **)malloc16(64*sizeof(int16_t *));
 
@@ -1180,10 +1181,8 @@ void init_eNB_afterRU(void) {
         eNB->prach_vars_br.rxsigF[ce_level] = (int16_t **)malloc16(64*sizeof(int16_t *));
       }
 
-      LOG_I(PHY,"eNB->num_RU:%d\n", eNB->num_RU);
 
-      for (ru_id=0,aa=0; ru_idnum_RU; ru_id++) {
-        eNB->frame_parms.nb_antennas_rx    += eNB->RU_list[ru_id]->nb_rx;
+      for (int ru_id=0,aa=0; ru_idnum_RU; ru_id++) {
 
         AssertFatal(eNB->RU_list[ru_id]->common.rxdataF!=NULL,
                     "RU %d : common.rxdataF is NULL\n",
@@ -1231,7 +1230,7 @@ void init_eNB_afterRU(void) {
     init_eNB_proc(inst);
   }
 
-  for (ru_id=0; ru_idwakeup_rxtx         = wakeup_rxtx;
     RC.ru[ru_id]->wakeup_prach_eNB    = wakeup_prach_eNB;

From 199ce8ac55f0e1df5af1298038ccac4607d3d459 Mon Sep 17 00:00:00 2001
From: Raymond Knopp 
Date: Mon, 8 Feb 2021 20:58:48 +0100
Subject: [PATCH 067/579] fixed segfault in ulsim when trials > 1000

---
 openair1/SIMULATION/LTE_PHY/ulsim.c | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/openair1/SIMULATION/LTE_PHY/ulsim.c b/openair1/SIMULATION/LTE_PHY/ulsim.c
index ee1ba07576..310fd7b233 100644
--- a/openair1/SIMULATION/LTE_PHY/ulsim.c
+++ b/openair1/SIMULATION/LTE_PHY/ulsim.c
@@ -1275,14 +1275,16 @@ int main(int argc, char **argv) {
         if (t_rx > 2000 )
           n_rx_dropped++;
 
-        appendVarArray(table_tx, &t_tx);
-        appendVarArray(table_tx_ifft, &t_tx_ifft);
-        appendVarArray(table_tx_mod, &t_tx_mod );
-        appendVarArray(table_tx_enc, &t_tx_enc );
-        appendVarArray(table_rx, &t_rx );
-        appendVarArray(table_rx_fft, &t_rx_fft );
-        appendVarArray(table_rx_demod, &t_rx_demod );
-        appendVarArray(table_rx_dec, &t_rx_dec );
+        if (trials < 1000) {
+         appendVarArray(table_tx, &t_tx);
+         appendVarArray(table_tx_ifft, &t_tx_ifft);
+         appendVarArray(table_tx_mod, &t_tx_mod );
+         appendVarArray(table_tx_enc, &t_tx_enc );
+         appendVarArray(table_rx, &t_rx );
+         appendVarArray(table_rx_fft, &t_rx_fft );
+         appendVarArray(table_rx_demod, &t_rx_demod );
+         appendVarArray(table_rx_dec, &t_rx_dec );
+       }
       }   //trials
 
       // sort table

From 37ef411c2eea255ab7f62ab7661bb7307984b4e0 Mon Sep 17 00:00:00 2001
From: Raymond Knopp 
Date: Wed, 10 Feb 2021 14:14:29 +0100
Subject: [PATCH 068/579] traces for fairRR scheduler

---
 openair2/LAYER2/MAC/eNB_scheduler_fairRR.c |  4 +--
 openair2/LAYER2/MAC/main.c                 | 38 +++++++++++++++++++---
 targets/RT/USER/lte-enb.c                  |  3 +-
 3 files changed, 38 insertions(+), 7 deletions(-)

diff --git a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c
index c11c40662f..ffdd22ca5e 100644
--- a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c
+++ b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c
@@ -2769,12 +2769,12 @@ void ulsch_scheduler_pre_processor_fairRR(module_id_t module_idP,
               UE_info->UE_template[CC_id][UE_id].pre_assigned_mcs_ul = 10;
             } else {
               // assigne RBS( 3 RBs)
-
+/*
               first_rb[CC_id] = first_rb[CC_id] + 3;
               UE_info->UE_template[CC_id][UE_id].pre_allocated_nb_rb_ul = 3;
               UE_info->UE_template[CC_id][UE_id].pre_allocated_rb_table_index_ul = 2;
               UE_info->UE_template[CC_id][UE_id].pre_assigned_mcs_ul = 10; 
-            }
+*/            }
           }
         } else if ( ulsch_ue_select[CC_id].list[ulsch_ue_num].ue_priority  == SCH_UL_INACTIVE ) {
           // assigne RBS( 3 RBs)
diff --git a/openair2/LAYER2/MAC/main.c b/openair2/LAYER2/MAC/main.c
index 8d5186a1be..6f5bccbaf7 100644
--- a/openair2/LAYER2/MAC/main.c
+++ b/openair2/LAYER2/MAC/main.c
@@ -61,14 +61,42 @@ void *mac_stats_thread(void *param) {
         int CC_id = UE_PCCID(mac->Mod_id, UE_id);
         UE_sched_ctrl_t *UE_scheduling_control = &(UE_info->UE_sched_ctrl[UE_id]);
 
-      fprintf(fd,"\nMAC UE rnti %x : %s, PHR %d dB DL CQI %d PUSCH SNR %d (TPC accum %d)  PUCCH SNR %d (TPC accum %d)\n",
+        double total_bler;
+        if(UE_scheduling_control->pusch_rx_num[CC_id] == 0 && UE_scheduling_control->pusch_rx_error_num[CC_id] == 0) {
+          total_bler = 0;
+        }
+        else {
+          total_bler = (double)UE_scheduling_control->pusch_rx_error_num[CC_id] / (double)(UE_scheduling_control->pusch_rx_error_num[CC_id] + UE_scheduling_control->pusch_rx_num[CC_id]) * 100;
+        }
+        fprintf(fd,"MAC UE rnti %x : %s, PHR %d DLCQI %d PUSCH %d PUCCH %d RLC disc %d UL-stat rcv %lu err %lu bler %lf mcsoff %d bsr %u sched %u tbs %lu cnt %u , DL-stat tbs %lu cnt %u rb %u buf %u 1st %u ret %u ri %d\n",
               rnti,
               UE_scheduling_control->ul_out_of_sync == 0 ? "in synch" : "out of sync",
               UE_info->UE_template[CC_id][UE_id].phr_info,
               UE_scheduling_control->dl_cqi[CC_id],
-              UE_scheduling_control->pusch_snr[CC_id], UE_scheduling_control->pucch_tpc_accumulated[CC_id],
-              UE_scheduling_control->pucch1_snr[CC_id], UE_scheduling_control->pusch_tpc_accumulated[CC_id]);
-      fprintf(fd,"              ULSCH rounds %d/%d/%d/%d, DLSCH rounds %d/%d/%d/%d, ULSCH errors %d, DLSCH errors %d\n",
+              UE_scheduling_control->pusch_snr/*_avg*/[CC_id],
+              UE_scheduling_control->pucch1_snr[CC_id],
+              UE_scheduling_control->rlc_out_of_resources_cnt,
+              UE_scheduling_control->pusch_rx_num[CC_id],
+              UE_scheduling_control->pusch_rx_error_num[CC_id],
+              total_bler,
+              UE_scheduling_control->mcs_offset[CC_id],
+              UE_info->UE_template[CC_id][UE_id].estimated_ul_buffer,
+              UE_info->UE_template[CC_id][UE_id].scheduled_ul_bytes,
+              UE_info->eNB_UE_stats[CC_id][UE_id].total_pdu_bytes_rx,
+              UE_info->eNB_UE_stats[CC_id][UE_id].total_num_pdus_rx,
+              UE_info->eNB_UE_stats[CC_id][UE_id].total_pdu_bytes,
+              UE_info->eNB_UE_stats[CC_id][UE_id].total_num_pdus,
+              UE_info->eNB_UE_stats[CC_id][UE_id].total_rbs_used,
+#if defined(PRE_SCD_THREAD)
+              UE_info->UE_template[CC_id][UE_id].dl_buffer_total,
+#else
+              0,
+#endif
+              UE_scheduling_control->first_cnt[CC_id],
+              UE_scheduling_control->ret_cnt[CC_id],
+              UE_scheduling_control->aperiodic_ri_received[CC_id]
+        );
+        fprintf(fd,"              ULSCH rounds %d/%d/%d/%d, DLSCH rounds %d/%d/%d/%d, ULSCH errors %d, DLSCH errors %d\n",
               UE_info->eNB_UE_stats[CC_id][UE_id].ulsch_rounds[0],
               UE_info->eNB_UE_stats[CC_id][UE_id].ulsch_rounds[1],
               UE_info->eNB_UE_stats[CC_id][UE_id].ulsch_rounds[2],
@@ -79,6 +107,8 @@ void *mac_stats_thread(void *param) {
               UE_info->eNB_UE_stats[CC_id][UE_id].dlsch_rounds[3],
               UE_info->eNB_UE_stats[CC_id][UE_id].ulsch_errors,
               UE_info->eNB_UE_stats[CC_id][UE_id].dlsch_errors);
+
+
       }
     }
     fclose(fd);
diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c
index f65d8486c7..8a49d542e1 100644
--- a/targets/RT/USER/lte-enb.c
+++ b/targets/RT/USER/lte-enb.c
@@ -593,8 +593,9 @@ int wakeup_rxtx(PHY_VARS_eNB *eNB,
   if (L1_proc->instance_cnt == 0) { // L1_thread is busy so abort the subframe
     AssertFatal((ret=pthread_mutex_unlock( &L1_proc->mutex))==0,"mutex_unlock return %d\n",ret);
     LOG_W(PHY,"L1_thread isn't ready in %d.%d, aborting RX processing\n",ru_proc->frame_rx,ru_proc->tti_rx);
-    AssertFatal(1==0,"L1_thread isn't ready in %d.%d (L1RX %d.%d), aborting RX, exiting\n",
+/*    AssertFatal(1==0,"L1_thread isn't ready in %d.%d (L1RX %d.%d), aborting RX, exiting\n",
       ru_proc->frame_rx,ru_proc->tti_rx,L1_proc->frame_rx,L1_proc->subframe_rx);
+*/
     return(0);
    
   }

From a30eabbe218763b67bf9b995d32f1a008dfde14e Mon Sep 17 00:00:00 2001
From: Raymond Knopp 
Date: Thu, 11 Feb 2021 13:43:25 +0100
Subject: [PATCH 069/579] OTA testing 4G, configuration parameters for fairRR
 scheduler and common parameters for both fairRR and default

---
 cmake_targets/tools/build_helper           |  3 ++-
 openair2/ENB_APP/MACRLC_paramdef.h         | 14 +++++++++++++-
 openair2/ENB_APP/enb_config.c              |  4 ++++
 openair2/F1AP/f1ap_du_task.c               |  2 +-
 openair2/LAYER2/MAC/eNB_scheduler_fairRR.c | 21 +++++++++++----------
 openair2/LAYER2/MAC/mac.h                  |  8 ++++++++
 openair2/LAYER2/MAC/pre_processor.c        | 19 +++++++++----------
 targets/RT/USER/lte-enb.c                  |  4 ++--
 8 files changed, 50 insertions(+), 25 deletions(-)

diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper
index 977827b0c9..aa1859cf37 100755
--- a/cmake_targets/tools/build_helper
+++ b/cmake_targets/tools/build_helper
@@ -113,6 +113,7 @@ check_supported_distribution() {
         "rhel7.6")     return 0 ;;
         "rhel7.7")     return 0 ;;
         "rhel7.8")     return 0 ;;
+	"rhel7.9")     return 0 ;;
         "rhel8.2")     return 0 ;;
         "rhel8.3")     return 0 ;;
         "rhel8.4")     return 0 ;;
@@ -315,7 +316,7 @@ install_usrp_uhd_driver_from_source(){
     rm -rf /tmp/uhd
     git clone https://github.com/EttusResearch/uhd.git
     cd uhd
-    git checkout tags/v4.0.0.0
+    git checkout tags/v3.14.0.0
     mkdir -p host/build
     cd host/build
     $CMAKE ../
diff --git a/openair2/ENB_APP/MACRLC_paramdef.h b/openair2/ENB_APP/MACRLC_paramdef.h
index 6c2b8be912..742e27f65a 100644
--- a/openair2/ENB_APP/MACRLC_paramdef.h
+++ b/openair2/ENB_APP/MACRLC_paramdef.h
@@ -60,6 +60,10 @@
 #define CONFIG_STRING_MACRLC_PUCCH10xSNR                   "puCch10xSnr"
 #define CONFIG_STRING_MACRLC_DEFAULT_SCHED_DL_ALGO         "default_sched_dl_algo"
 #define CONFIG_STRING_MACRLC_UE_MULTIPLE_MAX               "ue_multiple_max"
+#define CONFIG_STRING_MACRLC_USE_MCS_OFFSET                "use_mcs_offset"
+#define CONFIG_STRING_MACRLC_BLER_TARGET_LOWER             "bler_target_lower"
+#define CONFIG_STRING_MACRLC_BLER_TARGET_UPPER             "bler_target_upper"
+#define CONFIG_STRING_MACRLC_MAX_UL_RB_INDEX               "max_ul_rb_index"
 /*-------------------------------------------------------------------------------------------------------------------------------------------------------*/
 /*                                            MacRLC  configuration parameters                                                                           */
 /*   optname                                            helpstr   paramflags    XXXptr              defXXXval                  type           numelt     */
@@ -86,7 +90,11 @@
 {CONFIG_STRING_MACRLC_PUSCH10xSNR,                       NULL,     0,          iptr:NULL,           defintval:200,             TYPE_INT,      0},        \
 {CONFIG_STRING_MACRLC_PUCCH10xSNR,  	                 NULL,     0,          iptr:NULL,           defintval:200,             TYPE_INT,      0},        \
 {CONFIG_STRING_MACRLC_DEFAULT_SCHED_DL_ALGO,             NULL,     0,          strptr:NULL,         defstrval:"round_robin_dl", TYPE_STRING,  0},        \
-{CONFIG_STRING_MACRLC_UE_MULTIPLE_MAX,                   NULL,     0,          iptr:NULL,           defintval:4,               TYPE_INT,      0}}
+{CONFIG_STRING_MACRLC_UE_MULTIPLE_MAX,                   NULL,     0,          iptr:NULL,           defintval:4,               TYPE_INT,      0},        \
+{CONFIG_STRING_MACRLC_USE_MCS_OFFSET,                    NULL,     0,          iptr:NULL,           defintval:1,               TYPE_INT,      0},        \
+{CONFIG_STRING_MACRLC_BLER_TARGET_LOWER,                 NULL,     0,          iptr:NULL,           defdblval:.5,               TYPE_DOUBLE,      0}, \
+{CONFIG_STRING_MACRLC_BLER_TARGET_UPPER,                 NULL,     0,          iptr:NULL,           defdblval:2,               TYPE_DOUBLE,      0}, \
+{CONFIG_STRING_MACRLC_MAX_UL_RB_INDEX,                   NULL,     0,          iptr:NULL,           defintval:22,              TYPE_INT, 0}}
 
 #define MACRLC_CC_IDX                                          0
 #define MACRLC_TRANSPORT_N_PREFERENCE_IDX                      1
@@ -110,6 +118,10 @@
 #define MACRLC_PUCCH10xSNR_IDX                                 19 
 #define MACRLC_DEFAULT_SCHED_DL_ALGO_IDX                       20
 #define MACRLC_UE_MULTIPLE_MAX_IDX                             21
+#define MACRLC_USE_MCS_OFFSET_IDX                              22
+#define MACRLC_BLER_TARGET_LOWER_IDX                           23
+#define MACRLC_BLER_TARGET_UPPER_IDX                           24
+#define MACRLC_MAX_UL_RB_INDEX_IDX                             25
 /*---------------------------------------------------------------------------------------------------------------------------------------------------------*/
 
 #endif
diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c
index bcde55ca53..c95cc1554a 100644
--- a/openair2/ENB_APP/enb_config.c
+++ b/openair2/ENB_APP/enb_config.c
@@ -220,6 +220,10 @@ void RCconfig_macrlc(int macrlc_has_f1[MAX_MAC_INST]) {
       RC.mac[j]->puSch10xSnr = *(MacRLC_ParamList.paramarray[j][MACRLC_PUSCH10xSNR_IDX ].iptr);
       RC.mac[j]->puCch10xSnr = *(MacRLC_ParamList.paramarray[j][MACRLC_PUCCH10xSNR_IDX ].iptr);
       RC.mac[j]->ue_multiple_max = *(MacRLC_ParamList.paramarray[j][MACRLC_UE_MULTIPLE_MAX_IDX ].iptr);
+      RC.mac[j]->use_mcs_offset = *(MacRLC_ParamList.paramarray[j][MACRLC_USE_MCS_OFFSET_IDX ].iptr);
+      RC.mac[j]->bler_lower = *(MacRLC_ParamList.paramarray[j][MACRLC_BLER_TARGET_LOWER_IDX ].dblptr);
+      RC.mac[j]->bler_upper = *(MacRLC_ParamList.paramarray[j][MACRLC_BLER_TARGET_UPPER_IDX ].dblptr);
+      RC.mac[j]->max_ul_rb_index = *(MacRLC_ParamList.paramarray[j][MACRLC_MAX_UL_RB_INDEX_IDX ].iptr);
       RC.nb_mac_CC[j] = *(MacRLC_ParamList.paramarray[j][MACRLC_CC_IDX].iptr);
 
       if (strcmp(*(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_N_PREFERENCE_IDX].strptr), "local_RRC") == 0) {
diff --git a/openair2/F1AP/f1ap_du_task.c b/openair2/F1AP/f1ap_du_task.c
index 7cb2b13c25..c8aa4a6119 100644
--- a/openair2/F1AP/f1ap_du_task.c
+++ b/openair2/F1AP/f1ap_du_task.c
@@ -88,7 +88,7 @@ void du_task_handle_sctp_association_resp(instance_t instance, sctp_new_associat
   if (sctp_new_association_resp->sctp_state != SCTP_STATE_ESTABLISHED) {
     LOG_E(F1AP, "Received unsuccessful result for SCTP association (%u), instance %d, cnx_id %u\n",
               sctp_new_association_resp->sctp_state,
-              instance,
+              (int)instance,
               sctp_new_association_resp->ulp_cnx_id);
 
       //f1ap_handle_setup_message(instance, sctp_new_association_resp->sctp_state == SCTP_STATE_SHUTDOWN);
diff --git a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c
index ffdd22ca5e..e9f0b807c4 100644
--- a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c
+++ b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c
@@ -2684,19 +2684,20 @@ void ulsch_scheduler_pre_processor_fairRR(module_id_t module_idP,
           UE_info->UE_sched_ctrl[UE_id].pusch_rx_num_old[CC_id] = UE_info->UE_sched_ctrl[UE_id].pusch_rx_num[CC_id];
           UE_info->UE_sched_ctrl[UE_id].pusch_rx_error_num_old[CC_id] = UE_info->UE_sched_ctrl[UE_id].pusch_rx_error_num[CC_id];
 
-          if(bler < 0.5) {
-            if(UE_info->UE_sched_ctrl[UE_id].mcs_offset[CC_id] !=0) {
-              UE_info->UE_sched_ctrl[UE_id].mcs_offset[CC_id]--;
+          if (eNB->use_mcs_offset == 1) {
+            if(bler < eNB->bler_lower) {
+              if(UE_info->UE_sched_ctrl[UE_id].mcs_offset[CC_id] !=0) {
+                UE_info->UE_sched_ctrl[UE_id].mcs_offset[CC_id]--;
+              }
             }
-          }
-          if(bler >= 2) {
-            UE_info->UE_sched_ctrl[UE_id].mcs_offset[CC_id]++;
-            if(UE_info->UE_sched_ctrl[UE_id].mcs_offset[CC_id] >= 20) {
-              UE_info->UE_sched_ctrl[UE_id].mcs_offset[CC_id]=20;
+            if(bler >= eNB->bler_upper) {
+              UE_info->UE_sched_ctrl[UE_id].mcs_offset[CC_id]++;
+              if(UE_info->UE_sched_ctrl[UE_id].mcs_offset[CC_id] >= 20) {
+                UE_info->UE_sched_ctrl[UE_id].mcs_offset[CC_id]=20;
+              }
             }
           }
         }
-
         snr = UE_info->UE_sched_ctrl[UE_id].pusch_snr_avg[CC_id];
  
         mcs = 20 - UE_info->UE_sched_ctrl[UE_id].mcs_offset[CC_id];
@@ -2724,7 +2725,7 @@ void ulsch_scheduler_pre_processor_fairRR(module_id_t module_idP,
             }
 
             while ( (tbs < bytes_to_schedule) && (rb_table[rb_table_index]<(N_RB_UL-num_pucch_rb-first_rb[CC_id])) &&
-                    ((UE_template->phr_info - tx_power) > 0) && (rb_table_index < 32 )) {
+                    ((UE_template->phr_info - tx_power) > 0) && (rb_table_index < eNB->max_ul_rb_index )) {
               rb_table_index++;
               tbs = get_TBS_UL(mcs,rb_table[rb_table_index]);
               tx_power= estimate_ue_tx_power(0,tbs*8,rb_table[rb_table_index],0,cc->Ncp,0);
diff --git a/openair2/LAYER2/MAC/mac.h b/openair2/LAYER2/MAC/mac.h
index 3d42febb20..a04e3b12cc 100644
--- a/openair2/LAYER2/MAC/mac.h
+++ b/openair2/LAYER2/MAC/mac.h
@@ -1453,7 +1453,15 @@ typedef struct eNB_MAC_INST_s {
   int32_t puSch10xSnr;
   int32_t puCch10xSnr;
 
+  int max_ul_rb_index;
+
   int ue_multiple_max;
+
+  int use_mcs_offset;
+
+  double bler_lower;
+
+  double bler_upper;
   pthread_t mac_stats_thread;
 } eNB_MAC_INST;
 
diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c
index 73b84c5a4c..bb892c7efe 100644
--- a/openair2/LAYER2/MAC/pre_processor.c
+++ b/openair2/LAYER2/MAC/pre_processor.c
@@ -801,7 +801,7 @@ int rr_ul_run(module_id_t Mod_id,
   AssertFatal(num_contig_rb <= 2, "cannot handle more than two contiguous RB regions\n");
   UE_info_t *UE_info = &RC.mac[Mod_id]->UE_info;
   const int max_rb = num_contig_rb > 1 ? MAX(rbs[0].length, rbs[1].length) : rbs[0].length;
-
+  eNB_MAC_INST *mac = RC.mac[Mod_id];
   /* for every UE: check whether we have to handle a retransmission (and
    * allocate, if so). If not, compute how much RBs this UE would need */
   int rb_idx_required[MAX_MOBILES_PER_ENB];
@@ -809,7 +809,7 @@ int rr_ul_run(module_id_t Mod_id,
   int num_ue_req = 0;
   for (int UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) {
     UE_TEMPLATE *UE_template = &UE_info->UE_template[CC_id][UE_id];
-    uint8_t harq_pid = subframe2harqpid(&RC.mac[Mod_id]->common_channels[CC_id],
+    uint8_t harq_pid = subframe2harqpid(&mac->common_channels[CC_id],
                                         sched_frame, sched_subframe);
     if (UE_info->UE_sched_ctrl[UE_id].round_UL[CC_id][harq_pid] > 0) {
       /* this UE has a retransmission, allocate it right away */
@@ -845,11 +845,11 @@ int rr_ul_run(module_id_t Mod_id,
         }
       } else {
         LOG_W(MAC,
-              "cannot allocate UL retransmission for UE %d (nb_rb %d)\n",
-              UE_id,
-              nb_rb);
+              "%d.%d cannot allocate UL retransmission for UE %d (nb_rb %d, rbs0.length %d, rbs1.length %d,rbs0.start %d,rbs1.start %d)\n",
+              sched_frame,sched_subframe,UE_id,
+              nb_rb, rbs[0].length,rbs[1].length,rbs[0].start,rbs[1].start);
         UE_template->pre_dci_ul_pdu_idx = -1; // do not need CCE
-        RC.mac[Mod_id]->HI_DCI0_req[CC_id][subframe].hi_dci0_request_body.number_of_dci--;
+        mac->HI_DCI0_req[CC_id][subframe].hi_dci0_request_body.number_of_dci--;
         continue;
       }
       LOG_D(MAC, "%4d.%d UE %d retx %d RBs at start %d\n",
@@ -895,10 +895,9 @@ int rr_ul_run(module_id_t Mod_id,
         &tx_power);
 
     UE_template->pre_assigned_mcs_ul = mcs;
-    /* rb_idx_given >= 22: apparently the PHY cannot support more than 48
-     * RBs in the uplink. Hence, we limit every UE to 48 RBs, which is at
-     * index 22 */
-    rb_idx_required[UE_id] = min(22, rb_table_index);
+    /* rb_idx_given >= MAX index: limit RBs to value in configuration file 
+     * RBs in the uplink.  */
+    rb_idx_required[UE_id] = min(mac->max_ul_rb_index, rb_table_index);
     //UE_template->pre_allocated_nb_rb_ul = rb_table[rb_table_index];
     /* only print log when PHR changed */
     static int phr = 0;
diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c
index 8a49d542e1..1f28e5a7c8 100644
--- a/targets/RT/USER/lte-enb.c
+++ b/targets/RT/USER/lte-enb.c
@@ -1156,7 +1156,7 @@ void init_transport(PHY_VARS_eNB *eNB) {
 
 
 void init_eNB_afterRU(void) {
-  int inst,CC_id,i,aa;
+  int inst,CC_id,i;
   PHY_VARS_eNB *eNB;
   LOG_I(PHY,"%s() RC.nb_inst:%d\n", __FUNCTION__, RC.nb_inst);
 
@@ -1171,7 +1171,7 @@ void init_eNB_afterRU(void) {
       eNB->frame_parms.nb_antennas_rx       = 0;
       LOG_I(PHY,"eNB->num_RU:%d\n", eNB->num_RU);     
       AssertFatal(eNB->num_RU>0,"Number of RU attached to eNB %d is      zero\n",eNB->Mod_id);
-      for (int ru_id=0,aa=0; ru_idnum_RU; ru_id++) 
+      for (int ru_id=0; ru_idnum_RU; ru_id++) 
          eNB->frame_parms.nb_antennas_rx    += eNB->RU_list[ru_id]->nb_rx;
       phy_init_lte_eNB(eNB,0,0);
       LOG_I(PHY,"Overwriting eNB->prach_vars.rxsigF[0]:%p\n", eNB->prach_vars.rxsigF[0]);

From 5b865df202554410286b16d2f01e19729860603d Mon Sep 17 00:00:00 2001
From: Raymond Knopp 
Date: Sun, 14 Feb 2021 14:05:16 +0100
Subject: [PATCH 070/579] fixed for oairu target after merge with develop

---
 .../pnf/public_inc/nfapi_pnf_interface.h      |  2 +-
 openair1/PHY/defs_eNB.h                       | 52 ++++++++++++++++
 openair1/SCHED/fapi_l1.c                      |  3 +-
 openair1/SCHED/fapi_l1.h                      |  2 +-
 openair1/SCHED/sched_common.h                 |  2 +-
 openair1/SCHED/sched_eNB.h                    |  2 +-
 openair2/PHY_INTERFACE/IF_Module.c            |  2 +-
 openair2/PHY_INTERFACE/IF_Module.h            | 59 ++-----------------
 targets/RT/USER/lte-enb.c                     |  2 +-
 9 files changed, 64 insertions(+), 62 deletions(-)

diff --git a/nfapi/open-nFAPI/pnf/public_inc/nfapi_pnf_interface.h b/nfapi/open-nFAPI/pnf/public_inc/nfapi_pnf_interface.h
index d169177d6b..08d451f5fb 100644
--- a/nfapi/open-nFAPI/pnf/public_inc/nfapi_pnf_interface.h
+++ b/nfapi/open-nFAPI/pnf/public_inc/nfapi_pnf_interface.h
@@ -25,7 +25,7 @@ extern "C" {
 #include "nfapi_interface.h"
 #include "debug.h"
 #include 
-
+#include 
 #include 
 
 /*! This enum is used to describe the states of the pnf 
diff --git a/openair1/PHY/defs_eNB.h b/openair1/PHY/defs_eNB.h
index 32022c2f23..030d50bc04 100644
--- a/openair1/PHY/defs_eNB.h
+++ b/openair1/PHY/defs_eNB.h
@@ -217,6 +217,58 @@ typedef struct {
   int ret;
 } td_params;
 
+/// Context data structure for RX/TX portion of subframe processing
+typedef struct {
+  /// Component Carrier index
+  uint8_t              CC_id;
+  /// timestamp transmitted to HW
+  openair0_timestamp timestamp_tx;
+  openair0_timestamp timestamp_rx;
+  /// subframe to act upon for transmission
+  int subframe_tx;
+  /// subframe to act upon for reception
+  int subframe_rx;
+  /// frame to act upon for transmission
+  int frame_tx;
+  /// frame to act upon for reception
+  int frame_rx;
+  int frame_prach;
+  int subframe_prach;
+  int frame_prach_br;
+  int subframe_prach_br;
+  /// \brief Instance count for RXn-TXnp4 processing thread.
+  /// \internal This variable is protected by \ref mutex_rxtx.
+  int instance_cnt;
+  /// pthread structure for RXn-TXnp4 processing thread
+  pthread_t pthread;
+  /// pthread attributes for RXn-TXnp4 processing thread
+  pthread_attr_t attr;
+  /// condition variable for tx processing thread
+  pthread_cond_t cond;
+  /// mutex for RXn-TXnp4 processing thread
+  pthread_mutex_t mutex;
+  /// scheduling parameters for RXn-TXnp4 thread
+  struct sched_param sched_param_rxtx;
+
+  /// \internal This variable is protected by \ref mutex_RUs.
+  int instance_cnt_RUs;
+  /// condition variable for tx processing thread
+  pthread_cond_t cond_RUs;
+  /// mutex for RXn-TXnp4 processing thread
+  pthread_mutex_t mutex_RUs;
+  tpool_t *threadPool;
+  int nbEncode;
+  int nbDecode;
+  notifiedFIFO_t *respEncode;
+  notifiedFIFO_t *respDecode;
+    pthread_mutex_t mutex_emulateRF;
+  int instance_cnt_emulateRF;
+  pthread_t pthread_emulateRF;
+  pthread_attr_t attr_emulateRF;
+  pthread_cond_t cond_emulateRF;
+  int first_rx;
+} L1_rxtx_proc_t;
+
 typedef struct {
   struct PHY_VARS_eNB_s *eNB;
   LTE_eNB_DLSCH_t *dlsch;
diff --git a/openair1/SCHED/fapi_l1.c b/openair1/SCHED/fapi_l1.c
index 272ac4cb99..ecfec02193 100644
--- a/openair1/SCHED/fapi_l1.c
+++ b/openair1/SCHED/fapi_l1.c
@@ -749,7 +749,8 @@ void handle_nfapi_ul_pdu(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
   }
 }
 
-void schedule_response(Sched_Rsp_t *Sched_INFO, L1_rxtx_proc_t *proc) {
+void schedule_response(Sched_Rsp_t *Sched_INFO, void *arg) {
+  L1_rxtx_proc_t *proc = (L1_rxtx_proc_t *)arg;
   PHY_VARS_eNB *eNB;
   // copy data from L2 interface into L1 structures
   module_id_t               Mod_id       = Sched_INFO->module_id;
diff --git a/openair1/SCHED/fapi_l1.h b/openair1/SCHED/fapi_l1.h
index a122e36782..b8f0ae1dd8 100644
--- a/openair1/SCHED/fapi_l1.h
+++ b/openair1/SCHED/fapi_l1.h
@@ -80,4 +80,4 @@ void handle_uci_harq_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request_pdu
 
 void handle_srs_pdu(PHY_VARS_eNB *eNB,nfapi_ul_config_request_pdu_t *ul_config_pdu,uint16_t frame,uint8_t subframe);
 
-void schedule_response(Sched_Rsp_t *Sched_INFO, L1_rxtx_proc_t *proc);
+void schedule_response(Sched_Rsp_t *Sched_INFO, void *proc);
diff --git a/openair1/SCHED/sched_common.h b/openair1/SCHED/sched_common.h
index f3e43d516e..c9fc338686 100644
--- a/openair1/SCHED/sched_common.h
+++ b/openair1/SCHED/sched_common.h
@@ -311,7 +311,7 @@ void get_cqipmiri_params(PHY_VARS_UE *ue,uint8_t eNB_id);
 
 int8_t get_PHR(uint8_t Mod_id, uint8_t CC_id, uint8_t eNB_index);
 
-void schedule_response(Sched_Rsp_t *Sched_INFO, L1_rxtx_proc_t *proc);
+void schedule_response(Sched_Rsp_t *Sched_INFO, void *proc);
 
 LTE_eNB_UE_stats* get_UE_stats(uint8_t Mod_id, uint8_t CC_id,uint16_t rnti);
 
diff --git a/openair1/SCHED/sched_eNB.h b/openair1/SCHED/sched_eNB.h
index f04bec2e5c..de987b0ac7 100644
--- a/openair1/SCHED/sched_eNB.h
+++ b/openair1/SCHED/sched_eNB.h
@@ -193,7 +193,7 @@ int8_t find_ue_ulsch(uint16_t rnti, PHY_VARS_eNB *phy_vars_eNB);
 
 
 
-void schedule_response(Sched_Rsp_t *Sched_INFO, L1_rxtx_proc_t *proc);
+void schedule_response(Sched_Rsp_t *Sched_INFO, void *proc);
 
 LTE_eNB_UE_stats *get_UE_stats(uint8_t Mod_id, uint8_t CC_id,uint16_t rnti);
 
diff --git a/openair2/PHY_INTERFACE/IF_Module.c b/openair2/PHY_INTERFACE/IF_Module.c
index 32780b0706..fea23207db 100644
--- a/openair2/PHY_INTERFACE/IF_Module.c
+++ b/openair2/PHY_INTERFACE/IF_Module.c
@@ -687,7 +687,7 @@ static void dump_dl(Sched_Rsp_t *d) {
 /* debug utility functions end                                              */
 /****************************************************************************/
 
-void UL_indication(UL_IND_t *UL_info, L1_rxtx_proc_t *proc) {
+void UL_indication(UL_IND_t *UL_info, void *proc) {
   AssertFatal(UL_info!=NULL,"UL_INFO is null\n");
 #ifdef DUMP_FAPI
   dump_ul(UL_info);
diff --git a/openair2/PHY_INTERFACE/IF_Module.h b/openair2/PHY_INTERFACE/IF_Module.h
index 1470cbc006..e9279b57b1 100644
--- a/openair2/PHY_INTERFACE/IF_Module.h
+++ b/openair2/PHY_INTERFACE/IF_Module.h
@@ -135,64 +135,13 @@ typedef struct {
     uint8_t Mod_id;
     int CC_id;
     nfapi_config_request_t *cfg;
-}PHY_Config_t;
+} PHY_Config_t;
 #include 
-/// Context data structure for RX/TX portion of subframe processing
-typedef struct {
-  /// Component Carrier index
-  uint8_t              CC_id;
-  /// timestamp transmitted to HW
-  openair0_timestamp timestamp_tx;
-  openair0_timestamp timestamp_rx;
-  /// subframe to act upon for transmission
-  int subframe_tx;
-  /// subframe to act upon for reception
-  int subframe_rx;
-  /// frame to act upon for transmission
-  int frame_tx;
-  /// frame to act upon for reception
-  int frame_rx;
-  int frame_prach;
-  int subframe_prach;
-  int frame_prach_br;
-  int subframe_prach_br;
-  /// \brief Instance count for RXn-TXnp4 processing thread.
-  /// \internal This variable is protected by \ref mutex_rxtx.
-  int instance_cnt;
-  /// pthread structure for RXn-TXnp4 processing thread
-  pthread_t pthread;
-  /// pthread attributes for RXn-TXnp4 processing thread
-  pthread_attr_t attr;
-  /// condition variable for tx processing thread
-  pthread_cond_t cond;
-  /// mutex for RXn-TXnp4 processing thread
-  pthread_mutex_t mutex;
-  /// scheduling parameters for RXn-TXnp4 thread
-  struct sched_param sched_param_rxtx;
-
-  /// \internal This variable is protected by \ref mutex_RUs.
-  int instance_cnt_RUs;
-  /// condition variable for tx processing thread
-  pthread_cond_t cond_RUs;
-  /// mutex for RXn-TXnp4 processing thread
-  pthread_mutex_t mutex_RUs;
-  tpool_t *threadPool;
-  int nbEncode;
-  int nbDecode;
-  notifiedFIFO_t *respEncode;
-  notifiedFIFO_t *respDecode;
-    pthread_mutex_t mutex_emulateRF;
-  int instance_cnt_emulateRF;
-  pthread_t pthread_emulateRF;
-  pthread_attr_t attr_emulateRF;
-  pthread_cond_t cond_emulateRF;
-  int first_rx;
-} L1_rxtx_proc_t;
 
 typedef struct IF_Module_s{
 //define the function pointer
-  void (*UL_indication)(UL_IND_t *UL_INFO, L1_rxtx_proc_t *proc);
-  void (*schedule_response)(Sched_Rsp_t *Sched_INFO, L1_rxtx_proc_t *proc);
+  void (*UL_indication)(UL_IND_t *UL_INFO, void *proc);
+  void (*schedule_response)(Sched_Rsp_t *Sched_INFO, void *proc);
   void (*PHY_config_req)(PHY_Config_t* config_INFO);
 
   void (*PHY_config_update_sib2_req)(PHY_Config_t* config_INFO);
@@ -209,7 +158,7 @@ void IF_Module_kill(int Mod_id);
 
 /*Interface for uplink, transmitting the Preamble(list), ULSCH SDU, NAK, Tick (trigger scheduler)
  */
-void UL_indication(UL_IND_t *UL_INFO, L1_rxtx_proc_t *proc);
+void UL_indication(UL_IND_t *UL_INFO, void *proc);
 
 /*Interface for Downlink, transmitting the DLSCH SDU, DCI SDU*/
 void Schedule_Response(Sched_Rsp_t *Sched_INFO);
diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c
index 1f28e5a7c8..c6d3d2c026 100644
--- a/targets/RT/USER/lte-enb.c
+++ b/targets/RT/USER/lte-enb.c
@@ -265,7 +265,7 @@ static inline int rxtx(PHY_VARS_eNB *eNB,
   eNB->UL_INFO.subframe  = proc->subframe_rx;
   eNB->UL_INFO.module_id = eNB->Mod_id;
   eNB->UL_INFO.CC_id     = eNB->CC_id;
-  eNB->if_inst->UL_indication(&eNB->UL_INFO, proc);
+  eNB->if_inst->UL_indication(&eNB->UL_INFO, (void*)proc);
   AssertFatal((ret= pthread_mutex_unlock(&eNB->UL_INFO_mutex))==0,"error unlocking UL_INFO_mutex, return %d\n",ret);
   /* this conflict resolution may be totally wrong, to be tested */
   /* CONFLICT RESOLUTION: BEGIN */

From b67a3502b8c8d57faa9a096baa3be498430efb47 Mon Sep 17 00:00:00 2001
From: Raymond Knopp 
Date: Sun, 14 Feb 2021 14:06:05 +0100
Subject: [PATCH 071/579] commit before merge

---
 openair1/PHY/LTE_TRANSPORT/if4_tools.c         | 2 +-
 openair1/PHY/LTE_UE_TRANSPORT/transport_ue.h   | 2 ++
 openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h | 4 ++--
 openair1/PHY/defs_eNB.h                        | 1 -
 openair1/PHY/defs_gNB.h                        | 1 -
 openair2/PHY_INTERFACE/IF_Module.h             | 1 -
 6 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/openair1/PHY/LTE_TRANSPORT/if4_tools.c b/openair1/PHY/LTE_TRANSPORT/if4_tools.c
index f4029f67ca..8ec8713394 100644
--- a/openair1/PHY/LTE_TRANSPORT/if4_tools.c
+++ b/openair1/PHY/LTE_TRANSPORT/if4_tools.c
@@ -35,7 +35,7 @@
 #include "PHY/defs_RU.h"
 #include "PHY/TOOLS/alaw_lut.h"
 //#include "PHY/phy_extern.h"
-#include "SCHED/sched_eNB.h"
+//#include "SCHED/sched_eNB.h"
 
 //#include "targets/ARCH/ETHERNET/USERSPACE/LIB/if_defs.h"
 #include "targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.h"
diff --git a/openair1/PHY/LTE_UE_TRANSPORT/transport_ue.h b/openair1/PHY/LTE_UE_TRANSPORT/transport_ue.h
index 4c433a5683..6b84a5f969 100644
--- a/openair1/PHY/LTE_UE_TRANSPORT/transport_ue.h
+++ b/openair1/PHY/LTE_UE_TRANSPORT/transport_ue.h
@@ -36,9 +36,11 @@
 #include "../LTE_TRANSPORT/mdci.h"
 #include "../LTE_TRANSPORT/uci_common.h"
 #include "../LTE_TRANSPORT/transport_common.h"
+/*
 #ifndef STANDALONE_COMPILE
 #include "UTIL/LISTS/list.h"
 #endif
+*/
 
 #include "../LTE_TRANSPORT/transport_common.h"
 
diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h
index 464bcfcfba..3922ee1c41 100644
--- a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h
+++ b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h
@@ -38,10 +38,10 @@
 
 //#include "PHY/defs_nr_UE.h"
 #include "../NR_TRANSPORT/nr_transport_common_proto.h"
-#ifndef STANDALONE_COMPILE
+/*#ifndef STANDALONE_COMPILE
 #include "UTIL/LISTS/list.h"
 #endif
-
+*/
 #include "openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h"
 
 
diff --git a/openair1/PHY/defs_eNB.h b/openair1/PHY/defs_eNB.h
index 32022c2f23..9f3c092b63 100644
--- a/openair1/PHY/defs_eNB.h
+++ b/openair1/PHY/defs_eNB.h
@@ -65,7 +65,6 @@
 #include "platform_types.h"
 #include "PHY/LTE_TRANSPORT/transport_common.h"
 #include "PHY/LTE_TRANSPORT/transport_eNB.h"
-#include "openair2/PHY_INTERFACE/IF_Module.h"
 #include "openairinterface5g_limits.h"
 
 
diff --git a/openair1/PHY/defs_gNB.h b/openair1/PHY/defs_gNB.h
index b7923adb0b..63c0583bc8 100644
--- a/openair1/PHY/defs_gNB.h
+++ b/openair1/PHY/defs_gNB.h
@@ -36,7 +36,6 @@
 #include "defs_eNB.h"
 #include "defs_nr_common.h"
 #include "CODING/nrPolar_tools/nr_polar_pbch_defs.h"
-#include "openair2/NR_PHY_INTERFACE/NR_IF_Module.h"
 #include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
 #include "PHY/impl_defs_top.h"
 #include "PHY/defs_common.h"
diff --git a/openair2/PHY_INTERFACE/IF_Module.h b/openair2/PHY_INTERFACE/IF_Module.h
index 1470cbc006..632617eb93 100644
--- a/openair2/PHY_INTERFACE/IF_Module.h
+++ b/openair2/PHY_INTERFACE/IF_Module.h
@@ -37,7 +37,6 @@
 #include 
 //#include "openair1/PHY/LTE_TRANSPORT/transport_eNB.h"
 #include "nfapi_interface.h"
-#include "platform_constants.h"
 #include "platform_types.h"
 #include 
 

From a135f261b268e014e08e37965f7528ff627c3459 Mon Sep 17 00:00:00 2001
From: Raymond Knopp 
Date: Sun, 14 Feb 2021 17:59:28 +0100
Subject: [PATCH 072/579] adjust includes for oairu target. Now test
 X-Ysoftmodem on another machine

---
 cmake_targets/CMakeLists.txt                  |  4 ++++
 openair1/PHY/LTE_ESTIMATION/lte_sync_time.c   |  1 -
 openair1/PHY/LTE_TRANSPORT/dci_tools_common.c |  2 --
 openair1/PHY/LTE_TRANSPORT/pucch_common.c     |  1 -
 openair1/PHY/defs_eNB.h                       |  1 +
 openair1/PHY/defs_gNB.h                       |  1 +
 openair1/SCHED/prach_procedures.c             |  1 -
 openair2/COMMON/platform_constants.h          | 11 +++++++++--
 8 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt
index 44020698a4..cb28fc869d 100644
--- a/cmake_targets/CMakeLists.txt
+++ b/cmake_targets/CMakeLists.txt
@@ -1039,6 +1039,10 @@ add_boolean_option(DEBUG_PHY_PROC          False "Enable debugging of PHY layer
 add_boolean_option(DEBUG_DLSCH             False "Enable debugging of DLSCH physical layer channel")
 add_boolean_option(MEX                     False "Enabling compilation with mex")
 
+if (${RU} STREQUAL 0)
+add_boolean_option(HAVE_RRC                True "Enable RRC includes")
+endif (${RU} STREQUAL 0)
+
 ##########################
 # NAS LAYER OPTIONS
 ##########################
diff --git a/openair1/PHY/LTE_ESTIMATION/lte_sync_time.c b/openair1/PHY/LTE_ESTIMATION/lte_sync_time.c
index b3b8bc9bef..614927a455 100644
--- a/openair1/PHY/LTE_ESTIMATION/lte_sync_time.c
+++ b/openair1/PHY/LTE_ESTIMATION/lte_sync_time.c
@@ -29,7 +29,6 @@
 #include 
 #include "PHY/defs_UE.h"
 #include "PHY/phy_extern_ue.h"
-#include "PHY_INTERFACE/phy_interface.h"
 #include "PHY/LTE_REFSIG/lte_refsig.h"
 
 // Note: this is for prototype of generate_drs_pusch (OTA synchronization of RRUs)
diff --git a/openair1/PHY/LTE_TRANSPORT/dci_tools_common.c b/openair1/PHY/LTE_TRANSPORT/dci_tools_common.c
index d9533072f8..64e74ebfbf 100644
--- a/openair1/PHY/LTE_TRANSPORT/dci_tools_common.c
+++ b/openair1/PHY/LTE_TRANSPORT/dci_tools_common.c
@@ -32,7 +32,6 @@
 
 #include "PHY/defs_eNB.h"
 #include "PHY/phy_extern.h"
-#include "SCHED/sched_eNB.h"
 #ifdef DEBUG_DCI_TOOLS
 #include "PHY/phy_vars.h"
 #endif
@@ -43,7 +42,6 @@
 //#define DEBUG_HARQ
 
 
-#include "LAYER2/MAC/mac.h"
 
 //#define DEBUG_DCI
 
diff --git a/openair1/PHY/LTE_TRANSPORT/pucch_common.c b/openair1/PHY/LTE_TRANSPORT/pucch_common.c
index 5b939b08d2..d7a500d5f7 100644
--- a/openair1/PHY/LTE_TRANSPORT/pucch_common.c
+++ b/openair1/PHY/LTE_TRANSPORT/pucch_common.c
@@ -31,7 +31,6 @@
 */
 #include "PHY/defs_eNB.h"
 #include "PHY/phy_extern.h" 
-#include "LAYER2/MAC/mac.h"
 
 #include "common/utils/LOG/vcd_signal_dumper.h"
 #include "common/utils/LOG/log.h"
diff --git a/openair1/PHY/defs_eNB.h b/openair1/PHY/defs_eNB.h
index a3c45256e8..030d50bc04 100644
--- a/openair1/PHY/defs_eNB.h
+++ b/openair1/PHY/defs_eNB.h
@@ -65,6 +65,7 @@
 #include "platform_types.h"
 #include "PHY/LTE_TRANSPORT/transport_common.h"
 #include "PHY/LTE_TRANSPORT/transport_eNB.h"
+#include "openair2/PHY_INTERFACE/IF_Module.h"
 #include "openairinterface5g_limits.h"
 
 
diff --git a/openair1/PHY/defs_gNB.h b/openair1/PHY/defs_gNB.h
index 63c0583bc8..b7923adb0b 100644
--- a/openair1/PHY/defs_gNB.h
+++ b/openair1/PHY/defs_gNB.h
@@ -36,6 +36,7 @@
 #include "defs_eNB.h"
 #include "defs_nr_common.h"
 #include "CODING/nrPolar_tools/nr_polar_pbch_defs.h"
+#include "openair2/NR_PHY_INTERFACE/NR_IF_Module.h"
 #include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
 #include "PHY/impl_defs_top.h"
 #include "PHY/defs_common.h"
diff --git a/openair1/SCHED/prach_procedures.c b/openair1/SCHED/prach_procedures.c
index 593cfcb1dc..4d0fe428e8 100644
--- a/openair1/SCHED/prach_procedures.c
+++ b/openair1/SCHED/prach_procedures.c
@@ -31,7 +31,6 @@
  */
 
 #include "PHY/defs_eNB.h"
-#include "SCHED/sched_eNB.h"
 #include "nfapi_interface.h"
 #include "fapi_l1.h"
 #include "nfapi_pnf.h"
diff --git a/openair2/COMMON/platform_constants.h b/openair2/COMMON/platform_constants.h
index ba406dd736..41a5879522 100644
--- a/openair2/COMMON/platform_constants.h
+++ b/openair2/COMMON/platform_constants.h
@@ -28,12 +28,19 @@
 
  ***************************************************************************/
 
-#include "LTE_asn_constant.h"
-#include "NR_asn_constant.h"
 
 #ifndef __PLATFORM_CONSTANTS_H__
 #    define __PLATFORM_CONSTANTS_H__
 
+#ifdef HAVE_RRC
+#include "LTE_asn_constant.h"
+#include "NR_asn_constant.h"
+#else 
+#define LTE_maxDRB 14
+#define LTE_maxDRB_NB_r13 5
+#define NR_MAXDRB 14
+#endif
+
 #ifdef JUMBO_FRAME
   #define NL_MAX_PAYLOAD 18000  /* this should cover the max mtu size*/
 #else

From d77f9ad0962d11e9068739b219b6ed26bbcae5ae Mon Sep 17 00:00:00 2001
From: Raymond Knopp 
Date: Mon, 15 Feb 2021 08:13:15 +0100
Subject: [PATCH 073/579] build oairu ok

---
 cmake_targets/CMakeLists.txt         | 8 ++++----
 openair2/COMMON/platform_constants.h | 2 +-
 openair2/UTIL/OTG/otg_defs.h         | 9 ++-------
 3 files changed, 7 insertions(+), 12 deletions(-)

diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt
index cb28fc869d..f4942b7c31 100644
--- a/cmake_targets/CMakeLists.txt
+++ b/cmake_targets/CMakeLists.txt
@@ -432,6 +432,9 @@ set(asn1_generated_dir ${OPENAIR_BIN_DIR})
 set(protoc_call "${OPENAIR_CMAKE}/tools/generate_protobuf")
 set(protobuf_generated_dir ${OPENAIR_BIN_DIR})
 
+if (${RU} STREQUAL 1)
+add_definitions(-DNO_RRC)
+endif (${RU} STREQUAL 1)
 
 # RRC
 ######
@@ -1039,10 +1042,6 @@ add_boolean_option(DEBUG_PHY_PROC          False "Enable debugging of PHY layer
 add_boolean_option(DEBUG_DLSCH             False "Enable debugging of DLSCH physical layer channel")
 add_boolean_option(MEX                     False "Enabling compilation with mex")
 
-if (${RU} STREQUAL 0)
-add_boolean_option(HAVE_RRC                True "Enable RRC includes")
-endif (${RU} STREQUAL 0)
-
 ##########################
 # NAS LAYER OPTIONS
 ##########################
@@ -3011,6 +3010,7 @@ target_link_libraries (oairu
   
 target_link_libraries (oairu pthread m ${CONFIG_LIB} rt ${CMAKE_DL_LIBS} ${T_LIB})
 
+
 # lte-uesoftmodem is  UE implementation
 #######################################
 
diff --git a/openair2/COMMON/platform_constants.h b/openair2/COMMON/platform_constants.h
index 41a5879522..f1e6271ed8 100644
--- a/openair2/COMMON/platform_constants.h
+++ b/openair2/COMMON/platform_constants.h
@@ -32,7 +32,7 @@
 #ifndef __PLATFORM_CONSTANTS_H__
 #    define __PLATFORM_CONSTANTS_H__
 
-#ifdef HAVE_RRC
+#ifndef NO_RRC
 #include "LTE_asn_constant.h"
 #include "NR_asn_constant.h"
 #else 
diff --git a/openair2/UTIL/OTG/otg_defs.h b/openair2/UTIL/OTG/otg_defs.h
index 6c9944014f..af0260587f 100644
--- a/openair2/UTIL/OTG/otg_defs.h
+++ b/openair2/UTIL/OTG/otg_defs.h
@@ -34,13 +34,8 @@
 # define __OTG_DEFS_H__
 
 /* \brief To define the NUMBER_OF_eNB_MAX and MAX_MOBILES_PER_ENB */
-#if STANDALONE==1
-	#include "openairinterface5g_limits.h"
-#else
-	// impl_defs_top.h includes openairinterface5g_limits.h
-	#include "PHY/impl_defs_top.h"
-#endif
-
+#include "openairinterface5g_limits.h"
+#include 
 #include "otg_config.h"
 
 /**

From b19377138737ac4f0543c7ea1abe648791e81b84 Mon Sep 17 00:00:00 2001
From: Raymond Knopp 
Date: Wed, 17 Feb 2021 15:34:49 +0100
Subject: [PATCH 074/579] 12-bit frequency-domain equalizer LUT. fix for
 log2_maxh in ULSCH receiver

---
 openair1/PHY/INIT/lte_init.c                  |  1 +
 .../PHY/LTE_ESTIMATION/freq_equalization.c    | 20 +++++++++++--------
 openair1/PHY/LTE_ESTIMATION/lte_estimation.h  |  1 +
 .../PHY/LTE_TRANSPORT/ulsch_demodulation.c    |  4 +---
 4 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/openair1/PHY/INIT/lte_init.c b/openair1/PHY/INIT/lte_init.c
index 178e9ef302..606cd0407d 100644
--- a/openair1/PHY/INIT/lte_init.c
+++ b/openair1/PHY/INIT/lte_init.c
@@ -425,6 +425,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
   generate_phich_reg_mapping (fp);
   init_sss();
 
+  init_fde();
   for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) {
     eNB->first_run_timing_advance[UE_id] =
       1;   ///This flag used to be static. With multiple eNBs this does no longer work, hence we put it in the structure. However it has to be initialized with 1, which is performed here.
diff --git a/openair1/PHY/LTE_ESTIMATION/freq_equalization.c b/openair1/PHY/LTE_ESTIMATION/freq_equalization.c
index cbf987623c..4f561238c6 100644
--- a/openair1/PHY/LTE_ESTIMATION/freq_equalization.c
+++ b/openair1/PHY/LTE_ESTIMATION/freq_equalization.c
@@ -22,8 +22,8 @@
 #include "PHY/defs_eNB.h"
 #include "PHY/sse_intrin.h"
 
-// This is 512/(1:256) in __m128i format
-int16_t inv_ch[256*8] = {512,512,512,512,512,512,512,512,
+// This is 4096/(1:4096) in __m128i format
+__m128i inv_ch[4096];/* = {512,512,512,512,512,512,512,512,
                          256,256,256,256,256,256,256,256,
                          170,170,170,170,170,170,170,170,
                          128,128,128,128,128,128,128,128,
@@ -279,7 +279,11 @@ int16_t inv_ch[256*8] = {512,512,512,512,512,512,512,512,
                          2,2,2,2,2,2,2,2,
                          2,2,2,2,2,2,2,2,
                          2,2,2,2,2,2,2,2,
-                        };
+                        };*/
+
+void init_fde() {
+  for (int i=1;i<4096;i++) inv_ch[i] = _mm_set1_epi16(4096/i);
+}
 
 void freq_equalization(LTE_DL_FRAME_PARMS *frame_parms,
                        int32_t **rxdataF_comp,
@@ -312,12 +316,12 @@ void freq_equalization(LTE_DL_FRAME_PARMS *frame_parms,
 
     amp=(*((int16_t*)&ul_ch_mag128[re]));
 
-    if (amp>255)
-      amp=255;
+    if (amp>4095)
+      amp=4095;
 
-    //     printf("freq_eq: symbol %d re %d => %d,%d,%d, (%d) (%d,%d) => ",symbol,re,*((int16_t*)(&ul_ch_mag128[re])),amp,inv_ch[8*amp],*((int16_t*)(&ul_ch_mag128[re]))*inv_ch[8*amp],*(int16_t*)&(rxdataF_comp128[re]),*(1+(int16_t*)&(rxdataF_comp128[re])));
+    //printf("freq_eq: symbol %d re %d => mag %d,amp %d,inv %d, prod %d (%d,%d)\n",symbol,re,*((int16_t*)(&ul_ch_mag128[re])),amp,_mm_extract_epi16(inv_ch[amp],0),(*((int16_t*)(&ul_ch_mag128[re]))*_mm_extract_epi16(inv_ch[amp],0))>>3,*(int16_t*)&(rxdataF_comp128[re]),*(1+(int16_t*)&(rxdataF_comp128[re])));
 #if defined(__x86_64__) || defined(__i386__)
-    rxdataF_comp128[re] = _mm_mullo_epi16(rxdataF_comp128[re],*((__m128i *)&inv_ch[8*amp]));
+    rxdataF_comp128[re] = _mm_srai_epi16(_mm_mullo_epi16(rxdataF_comp128[re],inv_ch[amp]),3);
 
     if (Qm==4)
       ul_ch_mag128[re]  = _mm_set1_epi16(324);  // this is 512*2/sqrt(10)
@@ -326,7 +330,7 @@ void freq_equalization(LTE_DL_FRAME_PARMS *frame_parms,
       ul_ch_magb128[re] = _mm_set1_epi16(158);  // this is 512*2/sqrt(42)
     }
 #elif defined(__arm__)
-    rxdataF_comp128[re] = vmulq_s16(rxdataF_comp128[re],*((int16x8_t *)&inv_ch[8*amp]));
+    rxdataF_comp128[re] = vmulq_s16(rxdataF_comp128[re],inv_ch[amp]);
 
     if (Qm==4)
       ul_ch_mag128[re]  = vdupq_n_s16(324);  // this is 512*2/sqrt(10)
diff --git a/openair1/PHY/LTE_ESTIMATION/lte_estimation.h b/openair1/PHY/LTE_ESTIMATION/lte_estimation.h
index 4b28ffc466..6ba901e29f 100644
--- a/openair1/PHY/LTE_ESTIMATION/lte_estimation.h
+++ b/openair1/PHY/LTE_ESTIMATION/lte_estimation.h
@@ -288,6 +288,7 @@ void freq_equalization(LTE_DL_FRAME_PARMS *frame_parms,
                        unsigned short Msc_RS,
                        unsigned char Qm);
 
+void init_fde(void);
 
 void dump_I0_stats(FILE *fd,PHY_VARS_eNB *eNB);
 /** @} */
diff --git a/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c b/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c
index ecc792b15f..3529df8e44 100644
--- a/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c
+++ b/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c
@@ -514,7 +514,6 @@ void ulsch_16qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
   for (i=0; i<(nb_rb*3); i++) {
 #if defined(__x86_64__) || defined(__i386__)
     mmtmpU0 = _mm_abs_epi16(rxF[i]);
-    //    print_shorts("tmp0",&tmp0);
     mmtmpU0 = _mm_subs_epi16(ch_mag[i],mmtmpU0);
     (*llrp128)[0] = _mm_unpacklo_epi32(rxF[i],mmtmpU0);
     (*llrp128)[1] = _mm_unpackhi_epi32(rxF[i],mmtmpU0);
@@ -1160,8 +1159,7 @@ void rx_ulsch(PHY_VARS_eNB *eNB,
   for (aarx=0; aarxnb_antennas_rx; aarx++)
     avgs = cmax(avgs,avgU[aarx]);
 
-  //      log2_maxh = 4+(log2_approx(avgs)/2);
-  log2_maxh = (log2_approx(avgs)/2); //+ log2_approx(frame_parms->nb_antennas_rx-1)+4;
+  log2_maxh = 4+(log2_approx(avgs)/2); 
   LOG_D(PHY,"[ULSCH] log2_maxh = %d (%d,%d)\n",log2_maxh,avgU[0],avgs);
 
   for (l=0; l<(frame_parms->symbols_per_tti-ulsch[UE_id]->harq_processes[harq_pid]->srs_active); l++) {

From 7fa5d4188f5c7b873610bab9025cf26c09005801 Mon Sep 17 00:00:00 2001
From: Raymond Knopp 
Date: Wed, 17 Feb 2021 18:41:23 +0100
Subject: [PATCH 075/579] added include to suppress warning

---
 openair1/PHY/INIT/lte_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/openair1/PHY/INIT/lte_init.c b/openair1/PHY/INIT/lte_init.c
index 606cd0407d..df5ee7c5f6 100644
--- a/openair1/PHY/INIT/lte_init.c
+++ b/openair1/PHY/INIT/lte_init.c
@@ -35,7 +35,7 @@
 #include "assertions.h"
 #include 
 #include "nfapi/oai_integration/vendor_ext.h"
-
+#include 
 extern uint32_t from_earfcn(int eutra_bandP,uint32_t dl_earfcn);
 extern int32_t get_uldl_offset(int eutra_bandP);
 

From f8e6e1fd851b44621ceb27e9e8a48e0afc0372d2 Mon Sep 17 00:00:00 2001
From: Raymond Knopp 
Date: Fri, 19 Feb 2021 21:57:54 +0100
Subject: [PATCH 076/579] bugfix in PHR, addition of configuration parameters
 for MAC scheduler

---
 openair2/ENB_APP/MACRLC_paramdef.h        |  4 ++--
 openair2/ENB_APP/enb_config.c             | 14 +++++++++++---
 openair2/LAYER2/MAC/eNB_scheduler_ulsch.c |  3 ++-
 openair2/LAYER2/MAC/main.c                |  7 +++++--
 4 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/openair2/ENB_APP/MACRLC_paramdef.h b/openair2/ENB_APP/MACRLC_paramdef.h
index 742e27f65a..11cbe445b8 100644
--- a/openair2/ENB_APP/MACRLC_paramdef.h
+++ b/openair2/ENB_APP/MACRLC_paramdef.h
@@ -92,8 +92,8 @@
 {CONFIG_STRING_MACRLC_DEFAULT_SCHED_DL_ALGO,             NULL,     0,          strptr:NULL,         defstrval:"round_robin_dl", TYPE_STRING,  0},        \
 {CONFIG_STRING_MACRLC_UE_MULTIPLE_MAX,                   NULL,     0,          iptr:NULL,           defintval:4,               TYPE_INT,      0},        \
 {CONFIG_STRING_MACRLC_USE_MCS_OFFSET,                    NULL,     0,          iptr:NULL,           defintval:1,               TYPE_INT,      0},        \
-{CONFIG_STRING_MACRLC_BLER_TARGET_LOWER,                 NULL,     0,          iptr:NULL,           defdblval:.5,               TYPE_DOUBLE,      0}, \
-{CONFIG_STRING_MACRLC_BLER_TARGET_UPPER,                 NULL,     0,          iptr:NULL,           defdblval:2,               TYPE_DOUBLE,      0}, \
+{CONFIG_STRING_MACRLC_BLER_TARGET_LOWER,                 NULL,     0,          dblptr:NULL,           defdblval:.5,               TYPE_DOUBLE,      0}, \
+{CONFIG_STRING_MACRLC_BLER_TARGET_UPPER,                 NULL,     0,          dblptr:NULL,           defdblval:2,               TYPE_DOUBLE,      0}, \
 {CONFIG_STRING_MACRLC_MAX_UL_RB_INDEX,                   NULL,     0,          iptr:NULL,           defintval:22,              TYPE_INT, 0}}
 
 #define MACRLC_CC_IDX                                          0
diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c
index c95cc1554a..592bd8ec8a 100644
--- a/openair2/ENB_APP/enb_config.c
+++ b/openair2/ENB_APP/enb_config.c
@@ -225,12 +225,20 @@ void RCconfig_macrlc(int macrlc_has_f1[MAX_MAC_INST]) {
       RC.mac[j]->bler_upper = *(MacRLC_ParamList.paramarray[j][MACRLC_BLER_TARGET_UPPER_IDX ].dblptr);
       RC.mac[j]->max_ul_rb_index = *(MacRLC_ParamList.paramarray[j][MACRLC_MAX_UL_RB_INDEX_IDX ].iptr);
       RC.nb_mac_CC[j] = *(MacRLC_ParamList.paramarray[j][MACRLC_CC_IDX].iptr);
-
+      LOG_I(ENB_APP,"MAC instance %d parameters : pusch_snr %lf, pucch_snr %lf, ue_multiple_max %d, use_mcs_offset %d, bler_lower %lf, bler_upper %lf,max_ul_rb_index %d\n",
+	j,
+	RC.mac[j]->puSch10xSnr/10.0,
+	RC.mac[j]->puCch10xSnr/10.0,
+	RC.mac[j]->ue_multiple_max,
+	RC.mac[j]->use_mcs_offset,
+	RC.mac[j]->bler_lower,
+	RC.mac[j]->bler_upper,
+	RC.mac[j]->max_ul_rb_index);
       if (strcmp(*(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_N_PREFERENCE_IDX].strptr), "local_RRC") == 0) {
         // check number of instances is same as RRC/PDCP
-        printf("Configuring local RRC for MACRLC\n");
+        LOG_I(ENB_APP,"Configuring local RRC for MACRLC\n");
       } else if (strcmp(*(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_N_PREFERENCE_IDX].strptr), "f1") == 0) {
-        printf("Configuring F1 interfaces for MACRLC\n");
+        LOG_I(ENB_APP,"Configuring F1 interfaces for MACRLC\n");
         RC.mac[j]->eth_params_n.local_if_name            = strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_IF_NAME_IDX].strptr));
         RC.mac[j]->eth_params_n.my_addr                  = strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_ADDRESS_IDX].strptr));
         RC.mac[j]->eth_params_n.remote_addr              = strdup(*(MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_N_ADDRESS_IDX].strptr));
diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
index d505abe4c1..c83cc1d9d3 100644
--- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
+++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
@@ -409,7 +409,8 @@ rx_sdu(const module_id_t enb_mod_idP,
     switch (rx_ces[i]) {  // implement and process PHR + CRNTI + BSR
       case POWER_HEADROOM:
         if (UE_id != -1) {
-          UE_template_ptr->phr_info = (payload_ptr[0] & 0x3f) - PHR_MAPPING_OFFSET + (int8_t)(hundred_times_log10_NPRB[UE_template_ptr->nb_rb_ul[harq_pid] - 1] / 100);
+          /*UE_template_ptr->phr_info = (payload_ptr[0] & 0x3f) - PHR_MAPPING_OFFSET + (int8_t)(hundred_times_log10_NPRB[UE_template_ptr->nb_rb_ul[harq_pid] - 1] / 100);i*/
+	  UE_template_ptr->phr_info = (payload_ptr[0] & 0x3f) - PHR_MAPPING_OFFSET + estimate_ue_tx_power(0,sdu_lenP*8,UE_template_ptr->nb_rb_ul[harq_pid],0,mac->common_channels[CC_idP].Ncp,0);
 
           if (UE_template_ptr->phr_info > 40) {
             UE_template_ptr->phr_info = 40;
diff --git a/openair2/LAYER2/MAC/main.c b/openair2/LAYER2/MAC/main.c
index 6f5bccbaf7..a4e924c68b 100644
--- a/openair2/LAYER2/MAC/main.c
+++ b/openair2/LAYER2/MAC/main.c
@@ -68,7 +68,7 @@ void *mac_stats_thread(void *param) {
         else {
           total_bler = (double)UE_scheduling_control->pusch_rx_error_num[CC_id] / (double)(UE_scheduling_control->pusch_rx_error_num[CC_id] + UE_scheduling_control->pusch_rx_num[CC_id]) * 100;
         }
-        fprintf(fd,"MAC UE rnti %x : %s, PHR %d DLCQI %d PUSCH %d PUCCH %d RLC disc %d UL-stat rcv %lu err %lu bler %lf mcsoff %d bsr %u sched %u tbs %lu cnt %u , DL-stat tbs %lu cnt %u rb %u buf %u 1st %u ret %u ri %d\n",
+        fprintf(fd,"MAC UE rnti %x : %s, PHR %d DLCQI %d PUSCH %d PUCCH %d RLC disc %d UL-stat rcv %lu err %lu bler %lf (%lf/%lf) total_bler %lf mcsoff %d pre_allocated nb_rb %d, mcs %d, bsr %u sched %u tbs %lu cnt %u , DL-stat tbs %lu cnt %u rb %u buf %u 1st %u ret %u ri %d\n",
               rnti,
               UE_scheduling_control->ul_out_of_sync == 0 ? "in synch" : "out of sync",
               UE_info->UE_template[CC_id][UE_id].phr_info,
@@ -78,8 +78,11 @@ void *mac_stats_thread(void *param) {
               UE_scheduling_control->rlc_out_of_resources_cnt,
               UE_scheduling_control->pusch_rx_num[CC_id],
               UE_scheduling_control->pusch_rx_error_num[CC_id],
-              total_bler,
+              UE_scheduling_control->pusch_bler[CC_id],
+              mac->bler_lower,mac->bler_upper,total_bler,
               UE_scheduling_control->mcs_offset[CC_id],
+              UE_info->UE_template[CC_id][UE_id].pre_allocated_nb_rb_ul,
+              UE_info->UE_template[CC_id][UE_id].pre_assigned_mcs_ul,
               UE_info->UE_template[CC_id][UE_id].estimated_ul_buffer,
               UE_info->UE_template[CC_id][UE_id].scheduled_ul_bytes,
               UE_info->eNB_UE_stats[CC_id][UE_id].total_pdu_bytes_rx,

From 305902da424cf1c0a9eecfc07897beda1c0c7d45 Mon Sep 17 00:00:00 2001
From: Robert Schmidt 
Date: Sat, 20 Feb 2021 15:43:02 +0100
Subject: [PATCH 077/579] Correctly allocate memory for NR measurement array

---
 openair2/RRC/LTE/rrc_eNB.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/openair2/RRC/LTE/rrc_eNB.c b/openair2/RRC/LTE/rrc_eNB.c
index e9b68c1614..0cb15817f5 100644
--- a/openair2/RRC/LTE/rrc_eNB.c
+++ b/openair2/RRC/LTE/rrc_eNB.c
@@ -4698,8 +4698,8 @@ rrc_eNB_process_MeasurementReport(
     if (!ue_context_pP->ue_context.measResults->measResultNeighCells) {
       ue_context_pP->ue_context.measResults->measResultNeighCells = calloc(1,sizeof(*ue_context_pP->ue_context.measResults->measResultNeighCells));
       ue_context_pP->ue_context.measResults->measResultNeighCells->present = LTE_MeasResults__measResultNeighCells_PR_measResultNeighCellListNR_r15;
-      ue_context_pP->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array = calloc(1, sizeof(ue_context_pP->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array));
-      ue_context_pP->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0] = calloc(1, sizeof(*ue_context_pP->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array));
+      ue_context_pP->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array = calloc(1, sizeof(*ue_context_pP->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array));
+      ue_context_pP->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0] = calloc(1, sizeof(*ue_context_pP->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]));
       ue_context_pP->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.count = 1;
     }
     struct LTE_MeasResultCellNR_r15 *ueCtxtMeasResultCellNR_r15 = ue_context_pP->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0];

From 596b54bcbeb151a26b07f26abe5d32c3250eab6c Mon Sep 17 00:00:00 2001
From: Raymond Knopp 
Date: Mon, 22 Feb 2021 21:47:12 +0100
Subject: [PATCH 078/579] synchronization for oairu

---
 executables/main_ru.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/executables/main_ru.c b/executables/main_ru.c
index b6a4273780..a1f70a12ae 100644
--- a/executables/main_ru.c
+++ b/executables/main_ru.c
@@ -342,6 +342,11 @@ int main ( int argc, char **argv )
   LOG_I(PHY, "Starting ru_thread , is_slave %d, send_dmrs %d\n", ru->is_slave, ru->generate_dmrs_sync);
   init_RU_proc(ru);
 
+  pthread_mutex_lock(&ru_mutex);
+  while (ru_mask>0) 
+    pthread_cond_wait(&ru_cond,&ru_mutex);
+  pthread_mutex_unlock(&ru_mutex);
+  LOG_I(PHY,"RU configured, unlocking threads\n"); 
   config_sync_var=0;
   pthread_mutex_lock(&sync_mutex);
   sync_var=0;

From 9f35010ea3e95929e3cf37d95a871eae791eb57b Mon Sep 17 00:00:00 2001
From: Raymond Knopp 
Date: Tue, 23 Feb 2021 10:19:05 +0100
Subject: [PATCH 079/579] changes for multi-RRU OTA synch

---
 targets/RT/USER/lte-enb.c |  2 +-
 targets/RT/USER/lte-ru.c  | 32 ++++++++++++++++----------------
 2 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c
index c6d3d2c026..ea8e138e6e 100644
--- a/targets/RT/USER/lte-enb.c
+++ b/targets/RT/USER/lte-enb.c
@@ -585,7 +585,7 @@ int wakeup_rxtx(PHY_VARS_eNB *eNB,
   L1_rxtx_proc_t *L1_proc=&proc->L1_proc;
   LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms;
   int ret;
-  LOG_D(PHY,"ENTERED wakeup_rxtx, %d.%d\n",ru_proc->frame_rx,ru_proc->tti_rx);
+  LOG_I(PHY,"ENTERED wakeup_rxtx, %d.%d\n",ru_proc->frame_rx,ru_proc->tti_rx);
   // wake up TX for subframe n+sl_ahead
   // lock the TX mutex and make sure the thread is ready
   AssertFatal((ret=pthread_mutex_lock(&L1_proc->mutex)) == 0,"mutex_lock returns %d\n", ret);
diff --git a/targets/RT/USER/lte-ru.c b/targets/RT/USER/lte-ru.c
index e6d40fcf40..657457eebd 100644
--- a/targets/RT/USER/lte-ru.c
+++ b/targets/RT/USER/lte-ru.c
@@ -150,7 +150,7 @@ static inline void fh_if4p5_south_out(RU_t *ru,
                                       uint64_t timestamp) {
   if (ru->idx == 0) VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, ru->proc.timestamp_tx&0xffffffff );
 
-  LOG_D(PHY,"ENTERED fh_if4p5_south_out   Sending IF4p5 for frame %d subframe %d ru %d\n",ru->proc.frame_tx,ru->proc.tti_tx,ru->idx);
+  LOG_I(PHY,"ENTERED fh_if4p5_south_out   Sending IF4p5 for frame %d subframe %d ru %d\n",ru->proc.frame_tx,ru->proc.tti_tx,ru->idx);
 
   if (subframe_select(ru->frame_parms, subframe)!=SF_UL) {
     send_IF4p5(ru, frame, subframe, IF4p5_PDLFFT);
@@ -224,7 +224,7 @@ void fh_if4p5_south_in(RU_t *ru,
   if (proc->symbol_mask[*subframe]idx,*frame,*subframe,f,sf,symbol_number);
+      LOG_I(PHY,"fh_if4p5_south_in (%s/%d): RU %d, frame %d, subframe %d, f %d, sf %d, symbol %d\n",packet_type == IF4p5_PULFFT ? "PULFFT" : "PULTICK",packet_type,ru->idx,*frame,*subframe,f,sf,symbol_number);
 
       if (oai_exit == 1 || ru->cmd== STOP_RU) break;
 
@@ -1126,7 +1126,7 @@ void wakeup_L1s(RU_t *ru) {
   PHY_VARS_eNB *eNB       = eNB_list[0];
   L1_proc_t *proc         = &eNB->proc;
   struct timespec t;
-  LOG_D(PHY, "wakeup_L1s (num %d) for RU %d (%d.%d) ru->eNB_top:%p\n", ru->num_eNB, ru->idx, ru->proc.frame_rx, ru->proc.tti_rx, ru->eNB_top);
+  LOG_I(PHY, "wakeup_L1s (num %d) for RU %d (%d.%d) ru->eNB_top:%p\n", ru->num_eNB, ru->idx, ru->proc.frame_rx, ru->proc.tti_rx, ru->eNB_top);
   char string[20];
   sprintf(string, "Incoming RU %d", ru->idx);
 
@@ -1151,13 +1151,13 @@ void wakeup_L1s(RU_t *ru) {
   for (int i=0; inum_RU; i++) {
     if (eNB->RU_list[i]->wait_cnt==1 && ru->proc.tti_rx!=9) eNB->RU_list[i]->wait_cnt=0;
 
-    LOG_D(PHY,"RU %d has frame %d and subframe %d, state %s\n",
+    LOG_I(PHY,"RU %d has frame %d and subframe %d, state %s\n",
           eNB->RU_list[i]->idx, eNB->RU_list[i]->proc.frame_rx, eNB->RU_list[i]->proc.tti_rx, ru_states[eNB->RU_list[i]->state]);
 
     if (ru == eNB->RU_list[i] && eNB->RU_list[i]->wait_cnt == 0) {
       //AssertFatal((proc->RU_mask&(1<Mod_id,ru->proc.frame_rx,ru->proc.tti_rx,ru->idx,eNB->num_RU,proc->RU_mask);
       proc->RU_mask[ru->proc.tti_rx] |= (1<RU_list[i]->state == RU_SYNC ||*/(eNB->RU_list[i]->is_slave==1 && eNB->RU_list[i]->wait_cnt>0 && ru!=eNB->RU_list[i] && ru->is_slave==0) ) {
+    } else if (eNB->RU_list[i]->state == RU_SYNC ||(eNB->RU_list[i]->is_slave==1 && eNB->RU_list[i]->wait_cnt>0 && ru!=eNB->RU_list[i] /*&& ru->is_slave==0*/) ) {
       proc->RU_mask[ru->proc.tti_rx] |= (1<Mod_id,eNB_proc->frame_rx,eNB_proc->subframe_rx,ru->idx,eNB->num_RU,eNB_proc->RU_mask_tx);
 
           eNB_proc->RU_mask_tx |= (1<RU_list[j]->state==RU_SYNC ||*/ (eNB->RU_list[j]->is_slave==1 && eNB->RU_list[j]->wait_cnt>0 && ru!=eNB->RU_list[j] && ru->is_slave==0)) {
+        } else if (eNB->RU_list[j]->state==RU_SYNC ||(eNB->RU_list[j]->is_slave==1 && eNB->RU_list[j]->wait_cnt>0 && ru!=eNB->RU_list[j])) {
           eNB_proc->RU_mask_tx |= (1<openair0_cfg.time_source = unset;
       }      
 
+      LOG_I(PHY,"RU %d is_slave=%s\n",j,*(RUParamList.paramarray[j][RU_IS_SLAVE_IDX].strptr));
+
+      if (strcmp(*(RUParamList.paramarray[j][RU_IS_SLAVE_IDX].strptr), "yes") == 0) ru[j]->is_slave=1;
+      else ru[j]->is_slave=0;
+
+      LOG_I(PHY,"RU %d ota_sync_enabled=%s\n",j,*(RUParamList.paramarray[j][RU_OTA_SYNC_ENABLE_IDX].strptr));
+
+      if (strcmp(*(RUParamList.paramarray[j][RU_OTA_SYNC_ENABLE_IDX].strptr), "yes") == 0) ru[j]->ota_sync_enable=1;
+      else ru[j]->ota_sync_enable=0;
+
       if (strcmp(*(RUParamList.paramarray[j][RU_LOCAL_RF_IDX].strptr), "yes") == 0) {
         if ( !(config_isparamset(RUParamList.paramarray[j],RU_LOCAL_IF_NAME_IDX)) ) {
           ru[j]->if_south                        = LOCAL_RF;
@@ -3005,16 +3015,6 @@ RU_t **RCconfig_RU(int nb_RU,int nb_L1_inst,PHY_VARS_eNB ***eNB,uint64_t *ru_mas
             ru[j]->eth_params.transp_preference    = ETH_RAW_IF4p5_MODE;
             LOG_I(PHY,"Setting function for RU %d to NGFI_RRU_IF4p5 (raw)\n",j);
           }
-
-          LOG_I(PHY,"RU %d is_slave=%s\n",j,*(RUParamList.paramarray[j][RU_IS_SLAVE_IDX].strptr));
-
-          if (strcmp(*(RUParamList.paramarray[j][RU_IS_SLAVE_IDX].strptr), "yes") == 0) ru[j]->is_slave=1;
-          else ru[j]->is_slave=0;
-
-          LOG_I(PHY,"RU %d ota_sync_enabled=%s\n",j,*(RUParamList.paramarray[j][RU_OTA_SYNC_ENABLE_IDX].strptr));
-
-          if (strcmp(*(RUParamList.paramarray[j][RU_OTA_SYNC_ENABLE_IDX].strptr), "yes") == 0) ru[j]->ota_sync_enable=1;
-          else ru[j]->ota_sync_enable=0;
         }
 
         ru[j]->max_pdschReferenceSignalPower     = *(RUParamList.paramarray[j][RU_MAX_RS_EPRE_IDX].uptr);;

From d5cff2c3c3427225a9af7e5a95f9a23f5984c22e Mon Sep 17 00:00:00 2001
From: Raymond Knopp 
Date: Tue, 23 Feb 2021 14:07:12 +0100
Subject: [PATCH 080/579] nfapi_setmode dummy for oairu exectuable

---
 executables/main_ru.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/executables/main_ru.c b/executables/main_ru.c
index a1f70a12ae..7b0e0696b2 100644
--- a/executables/main_ru.c
+++ b/executables/main_ru.c
@@ -85,6 +85,7 @@ int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
 
 int usrp_tx_thread=0;
 
+void nfapi_setmode(nfapi_mode_t nfapi_mode) { return; }
 void exit_function(const char *file, const char *function, const int line, const char *s) {
 
   if (s != NULL) {

From 787cc6e90dc81fbe9534d1560699ce911fc050e1 Mon Sep 17 00:00:00 2001
From: Sakthivel Velumani 
Date: Wed, 10 Mar 2021 21:28:50 +0100
Subject: [PATCH 081/579] Pipeline process thread1: RX thread2: TX

---
 executables/nr-ue.c       | 104 +++++++++++++++++---------------------
 openair1/PHY/defs_nr_UE.h |   2 +
 2 files changed, 49 insertions(+), 57 deletions(-)

diff --git a/executables/nr-ue.c b/executables/nr-ue.c
index 6be23582b1..e821229cab 100644
--- a/executables/nr-ue.c
+++ b/executables/nr-ue.c
@@ -316,7 +316,16 @@ static void UE_synch(void *arg) {
   }
 }
 
-void processSlotTX( PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc) {
+typedef struct processingData_s {
+  UE_nr_rxtx_proc_t proc;
+  PHY_VARS_NR_UE    *UE;
+}  processingData_t;
+
+void processSlotTX(void *arg) {
+
+  processingData_t *rxtxD = (processingData_t *) arg;
+  UE_nr_rxtx_proc_t *proc = &rxtxD->proc;
+  PHY_VARS_NR_UE    *UE   = rxtxD->UE;
   fapi_nr_config_request_t *cfg = &UE->nrUE_config;
   int tx_slot_type = nr_ue_slot_select(cfg, proc->frame_tx, proc->nr_slot_tx);
   uint8_t gNB_id = 0;
@@ -345,10 +354,14 @@ void processSlotTX( PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc) {
       phy_procedures_nrUE_TX(UE,proc,0);
     }
   }
+  ue_ta_procedures(UE, proc->nr_slot_tx, proc->frame_tx);
 }
 
-void processSlotRX( PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc) {
+void processSlotRX(void *arg) {
 
+  processingData_t *rxtxD = (processingData_t *) arg;
+  UE_nr_rxtx_proc_t *proc = &rxtxD->proc;
+  PHY_VARS_NR_UE    *UE   = rxtxD->UE;
   fapi_nr_config_request_t *cfg = &UE->nrUE_config;
   int rx_slot_type = nr_ue_slot_select(cfg, proc->frame_rx, proc->nr_slot_rx);
   uint8_t gNB_id = 0;
@@ -378,6 +391,13 @@ void processSlotRX( PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc) {
     }
   }
 
+  notifiedFIFO_elt_t *res;
+  res = pullTpool(UE->txFifo,&(get_nrUE_params()->Tpool));
+  processingData_t *curMsg=(processingData_t *)NotifiedFifoData(res);
+  *curMsg = *rxtxD;
+  res->key = proc->nr_slot_rx;
+  pushTpool(&(get_nrUE_params()->Tpool), res);
+
 }
 
 /*!
@@ -388,23 +408,17 @@ void processSlotRX( PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc) {
  * \returns a pointer to an int. The storage is not on the heap and must not be freed.
  */
 
-typedef struct processingData_s {
-  UE_nr_rxtx_proc_t proc;
-  PHY_VARS_NR_UE    *UE;
-}  processingData_t;
-
-void UE_processing(void *arg) {
-  processingData_t *rxtxD = (processingData_t *) arg;
-  UE_nr_rxtx_proc_t *proc = &rxtxD->proc;
-  PHY_VARS_NR_UE    *UE   = rxtxD->UE;
-  int slot_tx = proc->nr_slot_tx;
-  int frame_tx = proc->frame_tx;
-
-  processSlotRX(UE, proc);
-  processSlotTX(UE, proc);
-  ue_ta_procedures(UE, slot_tx, frame_tx);
-
-}
+//void UE_processing(void *arg) {
+//  processingData_t *rxtxD = (processingData_t *) arg;
+//  UE_nr_rxtx_proc_t *proc = &rxtxD->proc;
+//  PHY_VARS_NR_UE    *UE   = rxtxD->UE;
+//  int slot_tx = proc->nr_slot_tx;
+//  int frame_tx = proc->frame_tx;
+//
+//  processSlotRX(UE, proc);
+//  processSlotTX(UE, proc);
+//
+//}
 
 void dummyWrite(PHY_VARS_NR_UE *UE,openair0_timestamp timestamp, int writeBlockSize) {
   void *dummy_tx[UE->frame_parms.nb_antennas_tx];
@@ -521,19 +535,25 @@ void *UE_thread(void *arg) {
   AssertFatal(0== openair0_device_load(&(UE->rfdevice), &openair0_cfg[0]), "");
   UE->rfdevice.host_type = RAU_HOST;
   AssertFatal(UE->rfdevice.trx_start_func(&UE->rfdevice) == 0, "Could not start the device\n");
+
   notifiedFIFO_t nf;
   initNotifiedFIFO(&nf);
+
+  notifiedFIFO_t rxFifo;
+  UE->rxFifo = &rxFifo;
+  initNotifiedFIFO(&rxFifo);
+  pushNotifiedFIFO_nothreadSafe(&rxFifo, newNotifiedFIFO_elt(sizeof(processingData_t), 0,&rxFifo,processSlotRX));
+
+  notifiedFIFO_t txFifo;
+  UE->txFifo = &txFifo;
+  initNotifiedFIFO(&txFifo);
+  pushNotifiedFIFO_nothreadSafe(&txFifo, newNotifiedFIFO_elt(sizeof(processingData_t), 0,&txFifo,processSlotTX));
+
   int nbSlotProcessing=0;
   int thread_idx=0;
-  notifiedFIFO_t freeBlocks;
-  initNotifiedFIFO_nothreadSafe(&freeBlocks);
   NR_UE_MAC_INST_t *mac = get_mac_inst(0);
   int timing_advance = UE->timing_advance;
 
-  for (int i=0; iframe_parms.slots_per_frame;
   int absolute_slot=0, decoded_frame_rx=INT_MAX, trashed_frames=0;
@@ -602,7 +622,7 @@ void *UE_thread(void *arg) {
     thread_idx = absolute_slot % RX_NB_TH;
     int slot_nr = absolute_slot % nb_slot_frame;
     notifiedFIFO_elt_t *msgToPush;
-    AssertFatal((msgToPush=pullNotifiedFIFO_nothreadSafe(&freeBlocks)) != NULL,"chained list failure");
+    AssertFatal((msgToPush=pullTpool(&rxFifo,&(get_nrUE_params()->Tpool))) != NULL,"chained list failure");
     processingData_t *curMsg=(processingData_t *)NotifiedFifoData(msgToPush);
     curMsg->UE=UE;
     // update thread index for received subframe
@@ -672,20 +692,7 @@ void *UE_thread(void *arg) {
                                 UE->frame_parms.get_samples_slot_timestamp(slot_nr,
                                 &UE->frame_parms,DURATION_RX_TO_TX) - firstSymSamp;
 
-    notifiedFIFO_elt_t *res;
-
-    while (nbSlotProcessing >= RX_NB_TH) {
-      res=pullTpool(&nf, &(get_nrUE_params()->Tpool));
-      nbSlotProcessing--;
-      processingData_t *tmp=(processingData_t *)res->msgData;
-
-      if (tmp->proc.decoded_frame_rx != -1)
-        decoded_frame_rx=(((mac->mib->systemFrameNumber.buf[0] >> mac->mib->systemFrameNumber.bits_unused)<<4) | tmp->proc.decoded_frame_rx);
-      else 
-         decoded_frame_rx=-1;
-
-      pushNotifiedFIFO_nothreadSafe(&freeBlocks,res);
-    }
+    decoded_frame_rx=-1;
 
     if (  decoded_frame_rx>0 && decoded_frame_rx != curMsg->proc.frame_rx)
       LOG_E(PHY,"Decoded frame index (%d) is not compatible with current context (%d), UE should go back to synch mode\n",
@@ -730,23 +737,6 @@ void *UE_thread(void *arg) {
     msgToPush->key=slot_nr;
     pushTpool(&(get_nrUE_params()->Tpool), msgToPush);
 
-    if (IS_SOFTMODEM_RFSIM) {  //getenv("RFSIMULATOR")
-      // FixMe: Wait previous thread is done, because race conditions seems too bad
-      // in case of actual RF board, the overlap between threads mitigate the issue
-      // We must receive one message, that proves the slot processing is done
-      res=pullTpool(&nf, &(get_nrUE_params()->Tpool));
-      nbSlotProcessing--;
-      processingData_t *tmp=(processingData_t *)res->msgData;
-
-      if (tmp->proc.decoded_frame_rx != -1)
-        decoded_frame_rx=(((mac->mib->systemFrameNumber.buf[0] >> mac->mib->systemFrameNumber.bits_unused)<<4) | tmp->proc.decoded_frame_rx);
-      else 
-        decoded_frame_rx=-1;
-        //decoded_frame_rx=tmp->proc.decoded_frame_rx;
-
-      pushNotifiedFIFO_nothreadSafe(&freeBlocks,res);
-    }
-
   } // while !oai_exit
 
   return NULL;
diff --git a/openair1/PHY/defs_nr_UE.h b/openair1/PHY/defs_nr_UE.h
index 390574a66b..e0b2c2e13e 100644
--- a/openair1/PHY/defs_nr_UE.h
+++ b/openair1/PHY/defs_nr_UE.h
@@ -1064,6 +1064,8 @@ typedef struct {
   SLIST_HEAD(ral_thresholds_gen_poll_s, ral_threshold_phy_t) ral_thresholds_gen_polled[RAL_LINK_PARAM_GEN_MAX];
   SLIST_HEAD(ral_thresholds_lte_poll_s, ral_threshold_phy_t) ral_thresholds_lte_polled[RAL_LINK_PARAM_LTE_MAX];
 #endif
+  notifiedFIFO_t *rxFifo;
+  notifiedFIFO_t *txFifo;
   
   int dl_stats[5];
 

From 2473ed0a9092f83739997452f8c47aae66756478 Mon Sep 17 00:00:00 2001
From: Sakthivel Velumani 
Date: Thu, 11 Mar 2021 00:00:56 +0100
Subject: [PATCH 082/579] Added PUCCH signal level

---
 openair1/SCHED_NR/phy_procedures_nr_gNB.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/openair1/SCHED_NR/phy_procedures_nr_gNB.c b/openair1/SCHED_NR/phy_procedures_nr_gNB.c
index 9d7422745e..5328dc99aa 100644
--- a/openair1/SCHED_NR/phy_procedures_nr_gNB.c
+++ b/openair1/SCHED_NR/phy_procedures_nr_gNB.c
@@ -575,6 +575,10 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
           gNB->uci_pdu_list[num_ucis].pdu_size = sizeof(nfapi_nr_uci_pucch_pdu_format_0_1_t);
           nfapi_nr_uci_pucch_pdu_format_0_1_t *uci_pdu_format0 = &gNB->uci_pdu_list[num_ucis].pucch_pdu_format_0_1;
 
+          offset = pucch_pdu->start_symbol_index*gNB->frame_parms.ofdm_symbol_size + (gNB->frame_parms.first_carrier_offset+pucch_pdu->prb_start*12);
+          power_rxF = signal_energy_nodc(&gNB->common_vars.rxdataF[0][offset],12);
+          LOG_I(PHY,"frame %d, slot %d: PUCCH signal energy %d\n",frame_rx,slot_rx,power_rxF);
+
           nr_decode_pucch0(gNB,
 	                   slot_rx,
                            uci_pdu_format0,

From 616477a5afde351c404699ff92c1b8bed829acea Mon Sep 17 00:00:00 2001
From: Sakthivel Velumani 
Date: Thu, 11 Mar 2021 17:29:22 +0100
Subject: [PATCH 083/579] Option to run UE without stopping when signal quality
 drops. when cmd line option used ue goes back to sync mode

---
 executables/nr-ue.c                         | 37 ++++++++-------------
 executables/softmodem-common.h              |  4 +++
 openair1/PHY/defs_nr_UE.h                   |  2 ++
 openair1/SCHED_NR_UE/phy_procedures_nr_ue.c |  9 +++--
 4 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/executables/nr-ue.c b/executables/nr-ue.c
index e821229cab..2d054afbd9 100644
--- a/executables/nr-ue.c
+++ b/executables/nr-ue.c
@@ -395,31 +395,11 @@ void processSlotRX(void *arg) {
   res = pullTpool(UE->txFifo,&(get_nrUE_params()->Tpool));
   processingData_t *curMsg=(processingData_t *)NotifiedFifoData(res);
   *curMsg = *rxtxD;
-  res->key = proc->nr_slot_rx;
+  res->key = 1;
   pushTpool(&(get_nrUE_params()->Tpool), res);
 
 }
 
-/*!
- * \brief This is the UE thread for RX subframe n and TX subframe n+4.
- * This thread performs the phy_procedures_UE_RX() on every received slot.
- * then, if TX is enabled it performs TX for n+4.
- * \param arg is a pointer to a \ref PHY_VARS_NR_UE structure.
- * \returns a pointer to an int. The storage is not on the heap and must not be freed.
- */
-
-//void UE_processing(void *arg) {
-//  processingData_t *rxtxD = (processingData_t *) arg;
-//  UE_nr_rxtx_proc_t *proc = &rxtxD->proc;
-//  PHY_VARS_NR_UE    *UE   = rxtxD->UE;
-//  int slot_tx = proc->nr_slot_tx;
-//  int frame_tx = proc->frame_tx;
-//
-//  processSlotRX(UE, proc);
-//  processSlotTX(UE, proc);
-//
-//}
-
 void dummyWrite(PHY_VARS_NR_UE *UE,openair0_timestamp timestamp, int writeBlockSize) {
   void *dummy_tx[UE->frame_parms.nb_antennas_tx];
 
@@ -534,6 +514,8 @@ void *UE_thread(void *arg) {
   int start_rx_stream = 0;
   AssertFatal(0== openair0_device_load(&(UE->rfdevice), &openair0_cfg[0]), "");
   UE->rfdevice.host_type = RAU_HOST;
+  UE->lost_sync = 0;
+  UE->is_synchronized = 0;
   AssertFatal(UE->rfdevice.trx_start_func(&UE->rfdevice) == 0, "Could not start the device\n");
 
   notifiedFIFO_t nf;
@@ -542,12 +524,12 @@ void *UE_thread(void *arg) {
   notifiedFIFO_t rxFifo;
   UE->rxFifo = &rxFifo;
   initNotifiedFIFO(&rxFifo);
-  pushNotifiedFIFO_nothreadSafe(&rxFifo, newNotifiedFIFO_elt(sizeof(processingData_t), 0,&rxFifo,processSlotRX));
+  pushNotifiedFIFO_nothreadSafe(&rxFifo, newNotifiedFIFO_elt(sizeof(processingData_t), 1,&rxFifo,processSlotRX));
 
   notifiedFIFO_t txFifo;
   UE->txFifo = &txFifo;
   initNotifiedFIFO(&txFifo);
-  pushNotifiedFIFO_nothreadSafe(&txFifo, newNotifiedFIFO_elt(sizeof(processingData_t), 0,&txFifo,processSlotTX));
+  pushNotifiedFIFO_nothreadSafe(&txFifo, newNotifiedFIFO_elt(sizeof(processingData_t), 1,&txFifo,processSlotTX));
 
   int nbSlotProcessing=0;
   int thread_idx=0;
@@ -559,6 +541,12 @@ void *UE_thread(void *arg) {
   int absolute_slot=0, decoded_frame_rx=INT_MAX, trashed_frames=0;
 
   while (!oai_exit) {
+    if (UE->lost_sync) {
+      abortTpool(&(get_nrUE_params()->Tpool),0);
+      UE->is_synchronized = 0;
+      UE->lost_sync = 0;
+    }
+
     if (syncRunning) {
       notifiedFIFO_elt_t *res=tryPullTpool(&nf,&(get_nrUE_params()->Tpool));
 
@@ -571,6 +559,7 @@ void *UE_thread(void *arg) {
           decoded_frame_rx=(decoded_frame_rx + (!UE->init_sync_frame) + trashed_frames) % MAX_FRAME_NUMBER;
         }
         delNotifiedFIFO_elt(res);
+        start_rx_stream=0;
       } else {
         readFrame(UE, ×tamp, true);
         trashed_frames+=2;
@@ -734,7 +723,7 @@ void *UE_thread(void *arg) {
       memset(txp[i], 0, writeBlockSize);
 
     nbSlotProcessing++;
-    msgToPush->key=slot_nr;
+    msgToPush->key=1;
     pushTpool(&(get_nrUE_params()->Tpool), msgToPush);
 
   } // while !oai_exit
diff --git a/executables/softmodem-common.h b/executables/softmodem-common.h
index 60a761c732..dbe46e8264 100644
--- a/executables/softmodem-common.h
+++ b/executables/softmodem-common.h
@@ -73,6 +73,7 @@ extern "C"
 #define CONFIG_HLP_STMON         "Enable processing timing measurement of lte softmodem on per subframe basis \n"
 #define CONFIG_HLP_256QAM        "Use the 256 QAM mcs table for PDSCH\n"
 
+#define CONFIG_HLP_NONSTOP       "Go back to frame sync mode after 100 consecutive PBCH failures\n"
 //#define CONFIG_HLP_NUMUES        "Set the number of UEs for the emulation"
 #define CONFIG_HLP_MSLOTS        "Skip the missed slots/subframes \n"
 #define CONFIG_HLP_ULMCS         "Set the maximum uplink MCS\n"
@@ -114,6 +115,7 @@ extern "C"
 #define USIM_TEST           softmodem_params.usim_test
 #define USE_256QAM_TABLE    softmodem_params.use_256qam_table
 #define NFAPI               softmodem_params.nfapi
+#define NON_STOP            softmodem_params.non_stop
 
 #define DEFAULT_RFCONFIG_FILE    "/usr/local/etc/syriq/ue.band7.tm1.PRB100.NR40.dat";
 
@@ -145,6 +147,7 @@ extern "C"
     {"nbiot-disable",        CONFIG_HLP_DISABLNBIOT,  PARAMFLAG_BOOL, uptr:&nonbiot,                      defuintval:0,          TYPE_INT,    0},                     \
     {"use-256qam-table",     CONFIG_HLP_256QAM,       PARAMFLAG_BOOL, iptr:&USE_256QAM_TABLE,             defintval:0,           TYPE_INT,    0},                     \
     {"nfapi",                CONFIG_HLP_NFAPI,        0,              u8ptr:&nfapi_mode,                       defintval:0,           TYPE_UINT8,  0},                     \
+    {"non-stop",            CONFIG_HLP_NONSTOP,      PARAMFLAG_BOOL, iptr:&NON_STOP,                       defintval:0,           TYPE_INT,  0},                     \
   }
 
   
@@ -233,6 +236,7 @@ typedef struct {
   uint32_t       send_dmrs_sync;
   int            use_256qam_table;
   uint8_t        nfapi;
+  int            non_stop;
 } softmodem_params_t;
 
 extern uint64_t get_softmodem_optmask(void);
diff --git a/openair1/PHY/defs_nr_UE.h b/openair1/PHY/defs_nr_UE.h
index e0b2c2e13e..2d1c952da8 100644
--- a/openair1/PHY/defs_nr_UE.h
+++ b/openair1/PHY/defs_nr_UE.h
@@ -764,6 +764,8 @@ typedef struct {
   int is_synchronized;
   /// \brief Indicates on which frame is synchronized in a two frame synchronization
   int is_synchronized_on_frame;
+  /// \brief Indicator that UE lost frame synchronization
+  int lost_sync;
   /// Data structure for UE process scheduling
   UE_nr_proc_t proc;
   /// Flag to indicate the UE shouldn't do timing correction at all
diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
index f516ad8639..2d1f061694 100644
--- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
@@ -459,8 +459,13 @@ void nr_ue_pbch_procedures(uint8_t gNB_id,
     ue->pbch_vars[gNB_id]->pdu_errors++;
 
     if (ue->pbch_vars[gNB_id]->pdu_errors_conseq>=100) {
-      LOG_E(PHY,"More that 100 consecutive PBCH errors! Exiting!\n");
-      exit_fun("More that 100 consecutive PBCH errors! Exiting!\n");
+      if (get_softmodem_params()->non_stop) {
+        LOG_E(PHY,"More that 100 consecutive PBCH errors! Going back to Sync mode!\n");
+        ue->lost_sync = 1;
+      } else {
+        LOG_E(PHY,"More that 100 consecutive PBCH errors! Exiting!\n");
+        exit_fun("More that 100 consecutive PBCH errors! Exiting!\n");
+      }
     }
   }
 

From cef0567aa9c43025dee324846abcfef0b78d6776 Mon Sep 17 00:00:00 2001
From: Sakthivel Velumani 
Date: Fri, 12 Mar 2021 20:49:13 +0100
Subject: [PATCH 084/579] Process PDSCH and PUSCH in parallel 1. RX PBCH slot n
 2. RX PDCCH slot n 3. Start TX PUSCH in parallel for slot n+6 4. RX PDSCH
 slot n 5. Join PUSCH 6. TX PUCCH slot n+6

---
 executables/nr-ue.c                         | 61 +++++++++++++++------
 openair1/SCHED_NR_UE/phy_procedures_nr_ue.c | 23 ++++----
 2 files changed, 53 insertions(+), 31 deletions(-)

diff --git a/executables/nr-ue.c b/executables/nr-ue.c
index 2d054afbd9..e07c213760 100644
--- a/executables/nr-ue.c
+++ b/executables/nr-ue.c
@@ -27,6 +27,7 @@
 #include "SCHED_NR_UE/phy_frame_config_nr.h"
 #include "SCHED_NR_UE/defs.h"
 #include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
+#include "executables/softmodem-common.h"
 
 /*
  *  NR SLOT PROCESSING SEQUENCE
@@ -316,14 +317,9 @@ static void UE_synch(void *arg) {
   }
 }
 
-typedef struct processingData_s {
-  UE_nr_rxtx_proc_t proc;
-  PHY_VARS_NR_UE    *UE;
-}  processingData_t;
-
 void processSlotTX(void *arg) {
 
-  processingData_t *rxtxD = (processingData_t *) arg;
+  nr_rxtx_thread_data_t *rxtxD = (nr_rxtx_thread_data_t *) arg;
   UE_nr_rxtx_proc_t *proc = &rxtxD->proc;
   PHY_VARS_NR_UE    *UE   = rxtxD->UE;
   fapi_nr_config_request_t *cfg = &UE->nrUE_config;
@@ -354,12 +350,11 @@ void processSlotTX(void *arg) {
       phy_procedures_nrUE_TX(UE,proc,0);
     }
   }
-  ue_ta_procedures(UE, proc->nr_slot_tx, proc->frame_tx);
 }
 
 void processSlotRX(void *arg) {
 
-  processingData_t *rxtxD = (processingData_t *) arg;
+  nr_rxtx_thread_data_t *rxtxD = (nr_rxtx_thread_data_t *) arg;
   UE_nr_rxtx_proc_t *proc = &rxtxD->proc;
   PHY_VARS_NR_UE    *UE   = rxtxD->UE;
   fapi_nr_config_request_t *cfg = &UE->nrUE_config;
@@ -389,14 +384,44 @@ void processSlotRX(void *arg) {
       PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, UE->Mod_id, ENB_FLAG_NO, mac->crnti, proc->frame_rx, proc->nr_slot_rx, 0);
       pdcp_run(&ctxt);
     }
-  }
 
-  notifiedFIFO_elt_t *res;
-  res = pullTpool(UE->txFifo,&(get_nrUE_params()->Tpool));
-  processingData_t *curMsg=(processingData_t *)NotifiedFifoData(res);
-  *curMsg = *rxtxD;
-  res->key = 1;
-  pushTpool(&(get_nrUE_params()->Tpool), res);
+    // Wait for PUSCH processing to finish
+    notifiedFIFO_elt_t *res;
+    res = pullTpool(UE->txFifo,&(get_nrUE_params()->Tpool));
+    pushNotifiedFIFO_nothreadSafe(UE->txFifo, res);
+
+    if (get_softmodem_params()->usim_test==0) {
+      pucch_procedures_ue_nr(UE,
+                             gNB_id,
+                             proc,
+                             FALSE);
+    }
+
+    LOG_D(PHY, "Sending Uplink data \n");
+    nr_ue_pusch_common_procedures(UE,
+                                  proc->nr_slot_tx,
+                                  &UE->frame_parms,1);
+
+    ue_ta_procedures(UE, proc->nr_slot_tx, proc->frame_tx);
+
+  } else {
+    processSlotTX(rxtxD);
+
+    if (get_softmodem_params()->usim_test==0) {
+      pucch_procedures_ue_nr(UE,
+                             gNB_id,
+                             proc,
+                             FALSE);
+    }
+
+    LOG_D(PHY, "Sending Uplink data \n");
+    nr_ue_pusch_common_procedures(UE,
+                                  proc->nr_slot_tx,
+                                  &UE->frame_parms,1);
+
+    ue_ta_procedures(UE, proc->nr_slot_tx, proc->frame_tx);
+
+  }
 
 }
 
@@ -524,12 +549,12 @@ void *UE_thread(void *arg) {
   notifiedFIFO_t rxFifo;
   UE->rxFifo = &rxFifo;
   initNotifiedFIFO(&rxFifo);
-  pushNotifiedFIFO_nothreadSafe(&rxFifo, newNotifiedFIFO_elt(sizeof(processingData_t), 1,&rxFifo,processSlotRX));
+  pushNotifiedFIFO_nothreadSafe(&rxFifo, newNotifiedFIFO_elt(sizeof(nr_rxtx_thread_data_t), 1,&rxFifo,processSlotRX));
 
   notifiedFIFO_t txFifo;
   UE->txFifo = &txFifo;
   initNotifiedFIFO(&txFifo);
-  pushNotifiedFIFO_nothreadSafe(&txFifo, newNotifiedFIFO_elt(sizeof(processingData_t), 1,&txFifo,processSlotTX));
+  pushNotifiedFIFO_nothreadSafe(&txFifo, newNotifiedFIFO_elt(sizeof(nr_rxtx_thread_data_t), 1,&txFifo,processSlotTX));
 
   int nbSlotProcessing=0;
   int thread_idx=0;
@@ -612,7 +637,7 @@ void *UE_thread(void *arg) {
     int slot_nr = absolute_slot % nb_slot_frame;
     notifiedFIFO_elt_t *msgToPush;
     AssertFatal((msgToPush=pullTpool(&rxFifo,&(get_nrUE_params()->Tpool))) != NULL,"chained list failure");
-    processingData_t *curMsg=(processingData_t *)NotifiedFifoData(msgToPush);
+    nr_rxtx_thread_data_t *curMsg=(nr_rxtx_thread_data_t *)NotifiedFifoData(msgToPush);
     curMsg->UE=UE;
     // update thread index for received subframe
     curMsg->proc.thread_id   = thread_idx;
diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
index 2d1f061694..5dcea9b257 100644
--- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
@@ -299,19 +299,6 @@ void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue,
         nr_ue_ulsch_procedures(ue, harq_pid, frame_tx, slot_tx, proc->thread_id, gNB_id);
     }
 
-    if (get_softmodem_params()->usim_test==0) {
-      LOG_D(PHY, "Generating PUCCH\n");
-      pucch_procedures_ue_nr(ue,
-                             gNB_id,
-                             proc,
-                             FALSE);
-    }
-
-    LOG_D(PHY, "Sending Uplink data \n");
-    nr_ue_pusch_common_procedures(ue,
-                                  slot_tx,
-                                  &ue->frame_parms,1);
-
   }
 
   if (ue->UE_mode[gNB_id] > NOT_SYNCHED && ue->UE_mode[gNB_id] < PUSCH) {
@@ -1867,6 +1854,15 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
   }
 
 #endif //NR_PDCCH_SCHED
+  
+  // Start PUSCH processing here. It runs in parallel with PDSCH processing
+  notifiedFIFO_elt_t *res;
+  res = pullTpool(ue->txFifo,&(get_nrUE_params()->Tpool));
+  nr_rxtx_thread_data_t *curMsg=(nr_rxtx_thread_data_t *)NotifiedFifoData(res);
+  curMsg->proc = *proc;
+  curMsg->UE = ue;
+  res->key = 1;
+  pushTpool(&(get_nrUE_params()->Tpool), res);
 
 #if UE_TIMING_TRACE
   start_meas(&ue->generic_stat);
@@ -1999,6 +1995,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_OUT);
 
  }
+ 
 #if UE_TIMING_TRACE
 start_meas(&ue->generic_stat);
 #endif

From 092eb544b681a0375cec6d7b8854f7cbdd57f476 Mon Sep 17 00:00:00 2001
From: Raymond Knopp 
Date: Sat, 13 Mar 2021 21:24:42 +0100
Subject: [PATCH 085/579] slave RRU testing with OTA synch.

---
 openair1/PHY/INIT/lte_init_ru.c |  1 +
 openair1/SCHED/ru_procedures.c  | 33 ++++++++++++++++-----------------
 2 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/openair1/PHY/INIT/lte_init_ru.c b/openair1/PHY/INIT/lte_init_ru.c
index ab218ded32..a856c33999 100644
--- a/openair1/PHY/INIT/lte_init_ru.c
+++ b/openair1/PHY/INIT/lte_init_ru.c
@@ -45,6 +45,7 @@ int phy_init_RU(RU_t *ru) {
   if (ru->is_slave == 1) {
     generate_ul_ref_sigs_rx();
   }
+  else generate_ul_ref_sigs();
 
   if (ru->if_south <= REMOTE_IF5) { // this means REMOTE_IF5 or LOCAL_RF, so allocate memory for time-domain signals
     // Time-domain signals
diff --git a/openair1/SCHED/ru_procedures.c b/openair1/SCHED/ru_procedures.c
index f85f98637d..8b03d2ca8f 100644
--- a/openair1/SCHED/ru_procedures.c
+++ b/openair1/SCHED/ru_procedures.c
@@ -139,27 +139,26 @@ void feptx0(RU_t *ru,
 	      int num_symb = 7;
 
 	      if (subframe_select(fp,subframe) == SF_S)
-             num_symb = fp->dl_symbols_in_S_subframe+1;
+                num_symb = fp->dl_symbols_in_S_subframe+1;
 
-	      if (ru->generate_dmrs_sync == 1 && slot == 0 && subframe == 1 && aa==0) {
+	      if (ru->generate_dmrs_sync == 1 && slot == 2 && aa==0) {
             //int32_t dmrs[ru->frame_parms.ofdm_symbol_size*14] __attribute__((aligned(32)));
             //int32_t *dmrsp[2] ={dmrs,NULL}; //{&dmrs[(3-ru->frame_parms.Ncp)*ru->frame_parms.ofdm_symbol_size],NULL};
-
-            generate_drs_pusch((PHY_VARS_UE *)NULL,
-                               (UE_rxtx_proc_t*)NULL,
-                               fp,
-                               ru->common.txdataF_BF,
-                               0,
-                               AMP,
-                               0,
-                               0,
-                               fp->N_RB_DL,
-                               aa);
+                  generate_drs_pusch((PHY_VARS_UE *)NULL,
+                                     (UE_rxtx_proc_t*)NULL,
+                                     fp,
+                                     ru->common.txdataF_BF,
+                                     0,
+                                     AMP,
+                                     0,
+                                     0,
+                                     fp->N_RB_DL,
+                                     aa);
 	      } 
-          normal_prefix_mod(&ru->common.txdataF_BF[aa][(slot&1)*slot_sizeF],
-                            (int*)&ru->common.txdata[aa][slot_offset],
-                            num_symb,
-                            fp);
+              normal_prefix_mod(&ru->common.txdataF_BF[aa][(slot&1)*slot_sizeF],
+                                (int*)&ru->common.txdata[aa][slot_offset],
+                                num_symb,
+                                fp);
       }
     }
 

From a4666ba7e54524f84528216e22a372bcd18b9060 Mon Sep 17 00:00:00 2001
From: magounak 
Date: Sat, 13 Mar 2021 21:25:54 +0100
Subject: [PATCH 086/579] OTA synch changes for slave RRU

---
 openair1/SCHED/ru_procedures.c | 12 +++++++-----
 targets/RT/USER/lte-ru.c       | 20 ++++++++++++--------
 2 files changed, 19 insertions(+), 13 deletions(-)

diff --git a/openair1/SCHED/ru_procedures.c b/openair1/SCHED/ru_procedures.c
index f85f98637d..70bd55d074 100644
--- a/openair1/SCHED/ru_procedures.c
+++ b/openair1/SCHED/ru_procedures.c
@@ -658,7 +658,7 @@ void ru_fep_full_2thread(RU_t *ru,
 
   struct timespec wait;
 
-  if ((fp->frame_type == TDD) && (subframe_select(fp,subframe) != SF_UL)) return;
+  if ((fp->frame_type == TDD) && (subframe_select(fp,subframe) == SF_DL)) return;
 
   if (ru->idx == 0) VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPRX, 1 );
 
@@ -705,7 +705,7 @@ void ru_fep_full_2thread(RU_t *ru,
 
   if (proc->tti_rx/*proc->subframe_rx*/==1 && ru->is_slave==1/* && ru->state == RU_CHECK_SYNC*/)
   {
-    //LOG_I(PHY,"Running check synchronization procedure for frame %d\n", proc->frame_rx);
+    LOG_I(PHY,"Running check synchronization procedure for frame %d\n", proc->frame_rx);
   	ulsch_extract_rbs_single(ru->common.rxdataF,
                              calibration->rxdataF_ext,
                              0,
@@ -731,9 +731,10 @@ void ru_fep_full_2thread(RU_t *ru,
 	check_sync_pos = lte_est_timing_advance_pusch(ru->frame_parms, ru->calibration.drs_ch_estimates_time); 
         if (ru->state == RU_CHECK_SYNC) {
           if ((check_sync_pos >= 0 && check_sync_pos<8) || (check_sync_pos < 0 && check_sync_pos>-8)) {
-    		  LOG_I(PHY,"~~~~~~~~~~~    check_sync_pos %d, frame %d, cnt %d\n",check_sync_pos,proc->frame_rx,ru->wait_check); 
+//    		  LOG_I(PHY,"~~~~~~~~~~~    check_sync_pos %d, frame %d, cnt %d\n",check_sync_pos,proc->frame_rx,ru->wait_check); 
                   ru->wait_check++;
           }
+          LOG_I(PHY,"~~~~~~~~~~~    check_sync_pos %d, frame %d, cnt %d\n",check_sync_pos,proc->frame_rx,ru->wait_check);
 
           if (ru->wait_check==20) { 
             ru->state = RU_RUN;
@@ -743,10 +744,11 @@ void ru_fep_full_2thread(RU_t *ru,
             rru_config_msg.len  = sizeof(RRU_CONFIG_msg_t); // TODO: set to correct msg len
             LOG_I(PHY,"Sending RRU_sync_ok to RAU\n");
             AssertFatal((ru->ifdevice.trx_ctlsend_func(&ru->ifdevice,&rru_config_msg,rru_config_msg.len)!=-1),"Failed to send msg to RAU %d\n",ru->idx);
+/*
                 //LOG_I(PHY,"~~~~~~~~~ RU_RUN\n");
-          	/*LOG_M("dmrs_time.m","dmrstime",calibration->drs_ch_estimates_time[0], (fp->ofdm_symbol_size),1,1);
+          	LOG_M("dmrs_time.m","dmrstime",calibration->drs_ch_estimates_time[0], (fp->ofdm_symbol_size),1,1);
 		LOG_M("rxdataF_ext.m","rxdataFext",&calibration->rxdataF_ext[0][36*fp->N_RB_DL], 12*(fp->N_RB_DL),1,1);		
-		LOG_M("drs_seq0.m","drsseq0",ul_ref_sigs_rx[0][0][23],600,1,1);
+		//LOG_M("drs_seq0.m","drsseq0",ul_ref_sigs_rx[0][0][23],600,1,1);
 		LOG_M("rxdata.m","rxdata",&ru->common.rxdata[0][0], fp->samples_per_tti*2,1,1);
 		exit(-1);*/
           }
diff --git a/targets/RT/USER/lte-ru.c b/targets/RT/USER/lte-ru.c
index ff74a37584..faeb734232 100644
--- a/targets/RT/USER/lte-ru.c
+++ b/targets/RT/USER/lte-ru.c
@@ -1721,7 +1721,7 @@ static void *ru_thread( void *param ) {
     // if this is a slave RRU, try to synchronize on the DL frequency
     if ((ru->is_slave == 1) && (ru->if_south == LOCAL_RF)) do_ru_synch(ru);
 
-    LOG_D(PHY,"RU %d Starting steady-state operation\n",ru->idx);
+    if (ru->state == RU_RUN || ru->state == RU_CHECK_SYNC) LOG_I(PHY,"RU %d Starting steady-state operation\n",ru->idx);
 
     // This is a forever while loop, it loops over subframes which are scheduled by incoming samples from HW devices
     while (ru->state == RU_RUN || ru->state == RU_CHECK_SYNC) {
@@ -1918,7 +1918,7 @@ static void *ru_thread( void *param ) {
 // This thread run the initial synchronization like a UE
 void *ru_thread_synch(void *arg) {
   RU_t *ru = (RU_t *)arg;
-  LTE_DL_FRAME_PARMS *fp = ru->frame_parms;
+  LTE_DL_FRAME_PARMS *fp;
   int64_t peak_val, avg;
   static int ru_thread_synch_status = 0;
   int cnt=0;
@@ -1927,6 +1927,8 @@ void *ru_thread_synch(void *arg) {
   // initialize variables for PSS detection
   ru_sync_time_init(ru); //lte_sync_time_init(ru->frame_parms);
 
+  fp = ru->frame_parms;
+  int last_rxoff=0;
   while (!oai_exit) {
     // wait to be woken up
     if (wait_on_condition(&ru->proc.mutex_synch,&ru->proc.cond_synch,&ru->proc.instance_cnt_synch,"ru_thread_synch")<0) break;
@@ -1940,17 +1942,18 @@ void *ru_thread_synch(void *arg) {
                                    &avg);
       LOG_I(PHY,"RU synch cnt %d: %d, val %llu (%d dB,%d dB)\n",cnt,ru->rx_offset,(unsigned long long)peak_val,dB_fixed64(peak_val),dB_fixed64(avg));
       cnt++;
-
-      //if (/*ru->rx_offset >= 0*/dB_fixed(peak_val)>=85 && cnt>10) {
-      if (ru->rx_offset >= 0 && avg>0 && dB_fixed(peak_val/avg)>=15 && cnt>10) {
+      int abs_diff= ru->rx_offset - last_rxoff;
+      if (abs_diff<0) abs_diff=-abs_diff;
+      if (ru->rx_offset >= 0 && abs_diff<6 && avg>0 && dB_fixed(peak_val/avg)>=15 && cnt>10) {
         LOG_I(PHY,"Estimated peak_val %d dB, avg %d => timing offset %llu\n",dB_fixed(peak_val),dB_fixed(avg),(unsigned long long int)ru->rx_offset);
         ru->in_synch = 1;
-        /*
+       /* 
                 LOG_M("ru_sync_rx.m","rurx",&ru->common.rxdata[0][0],LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*fp->samples_per_tti,1,1);
                 LOG_M("ru_sync_corr.m","sync_corr",ru->dmrs_corr,LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*fp->samples_per_tti,1,6);
                 LOG_M("ru_dmrs.m","rudmrs",&ru->dmrssync[0],fp->ofdm_symbol_size,1,1);
-          */
-        //exit(-1);
+          
+        exit(-1);
+       */
       } // sync_pos > 0
       else { //AssertFatal(cnt<1000,"Cannot find synch reference\n");
         if (cnt>200) {
@@ -1960,6 +1963,7 @@ void *ru_thread_synch(void *arg) {
           exit(-1);
         }
       }
+      last_rxoff=ru->rx_offset;
     } // ru->in_synch==0
 
     if (release_thread(&ru->proc.mutex_synch,&ru->proc.instance_cnt_synch,"ru_synch_thread") < 0) break;

From 74a44d686d6c5ef0bc8387b21e313ead7f46a4fc Mon Sep 17 00:00:00 2001
From: Raymond Knopp 
Date: Sat, 13 Mar 2021 21:27:39 +0100
Subject: [PATCH 087/579] minor changes

---
 openair1/SIMULATION/NR_PHY/nr_dummy_functions.c | 2 ++
 targets/RT/USER/lte-ru.c                        | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/openair1/SIMULATION/NR_PHY/nr_dummy_functions.c b/openair1/SIMULATION/NR_PHY/nr_dummy_functions.c
index 32b6b10412..24ed8a930c 100644
--- a/openair1/SIMULATION/NR_PHY/nr_dummy_functions.c
+++ b/openair1/SIMULATION/NR_PHY/nr_dummy_functions.c
@@ -1,3 +1,5 @@
+#include "nfapi/oai_integration/vendor_ext.h"
+
 int oai_nfapi_hi_dci0_req(nfapi_hi_dci0_request_t *hi_dci0_req)             { return(0);  }
 int oai_nfapi_tx_req(nfapi_tx_request_t *tx_req)                            { return(0);  }
 int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req)       { return(0);  }
diff --git a/targets/RT/USER/lte-ru.c b/targets/RT/USER/lte-ru.c
index 123f84619e..411182f01f 100644
--- a/targets/RT/USER/lte-ru.c
+++ b/targets/RT/USER/lte-ru.c
@@ -150,7 +150,7 @@ static inline void fh_if4p5_south_out(RU_t *ru,
                                       uint64_t timestamp) {
   if (ru->idx == 0) VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, ru->proc.timestamp_tx&0xffffffff );
 
-  LOG_I(PHY,"ENTERED fh_if4p5_south_out   Sending IF4p5 for frame %d subframe %d ru %d\n",ru->proc.frame_tx,ru->proc.tti_tx,ru->idx);
+  LOG_D(PHY,"ENTERED fh_if4p5_south_out   Sending IF4p5 for frame %d subframe %d ru %d\n",ru->proc.frame_tx,ru->proc.tti_tx,ru->idx);
 
   if (subframe_select(ru->frame_parms, subframe)!=SF_UL) {
     send_IF4p5(ru, frame, subframe, IF4p5_PDLFFT);
@@ -224,7 +224,7 @@ void fh_if4p5_south_in(RU_t *ru,
   if (proc->symbol_mask[*subframe]idx,*frame,*subframe,f,sf,symbol_number);
+      LOG_D(PHY,"fh_if4p5_south_in (%s/%d): RU %d, frame %d, subframe %d, f %d, sf %d, symbol %d\n",packet_type == IF4p5_PULFFT ? "PULFFT" : "PULTICK",packet_type,ru->idx,*frame,*subframe,f,sf,symbol_number);
 
       if (oai_exit == 1 || ru->cmd== STOP_RU) break;
 

From 7f5dc92265c1f2a22b76f55201356a3c0feb6c63 Mon Sep 17 00:00:00 2001
From: Raymond Knopp 
Date: Sat, 13 Mar 2021 21:43:00 +0100
Subject: [PATCH 088/579] testing with multi-RU

---
 targets/RT/USER/lte-enb.c | 2 +-
 targets/RT/USER/lte-ru.c  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c
index ea8e138e6e..c6d3d2c026 100644
--- a/targets/RT/USER/lte-enb.c
+++ b/targets/RT/USER/lte-enb.c
@@ -585,7 +585,7 @@ int wakeup_rxtx(PHY_VARS_eNB *eNB,
   L1_rxtx_proc_t *L1_proc=&proc->L1_proc;
   LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms;
   int ret;
-  LOG_I(PHY,"ENTERED wakeup_rxtx, %d.%d\n",ru_proc->frame_rx,ru_proc->tti_rx);
+  LOG_D(PHY,"ENTERED wakeup_rxtx, %d.%d\n",ru_proc->frame_rx,ru_proc->tti_rx);
   // wake up TX for subframe n+sl_ahead
   // lock the TX mutex and make sure the thread is ready
   AssertFatal((ret=pthread_mutex_lock(&L1_proc->mutex)) == 0,"mutex_lock returns %d\n", ret);
diff --git a/targets/RT/USER/lte-ru.c b/targets/RT/USER/lte-ru.c
index 411182f01f..b2cfaa3f0f 100644
--- a/targets/RT/USER/lte-ru.c
+++ b/targets/RT/USER/lte-ru.c
@@ -1126,7 +1126,7 @@ void wakeup_L1s(RU_t *ru) {
   PHY_VARS_eNB *eNB       = eNB_list[0];
   L1_proc_t *proc         = &eNB->proc;
   struct timespec t;
-  LOG_I(PHY, "wakeup_L1s (num %d) for RU %d (%d.%d) ru->eNB_top:%p\n", ru->num_eNB, ru->idx, ru->proc.frame_rx, ru->proc.tti_rx, ru->eNB_top);
+  LOG_D(PHY, "wakeup_L1s (num %d) for RU %d (%d.%d) ru->eNB_top:%p\n", ru->num_eNB, ru->idx, ru->proc.frame_rx, ru->proc.tti_rx, ru->eNB_top);
   char string[20];
   sprintf(string, "Incoming RU %d", ru->idx);
 
@@ -1151,7 +1151,7 @@ void wakeup_L1s(RU_t *ru) {
   for (int i=0; inum_RU; i++) {
     if (eNB->RU_list[i]->wait_cnt==1 && ru->proc.tti_rx!=9) eNB->RU_list[i]->wait_cnt=0;
 
-    LOG_I(PHY,"RU %d has frame %d and subframe %d, state %s\n",
+    LOG_D(PHY,"RU %d has frame %d and subframe %d, state %s\n",
           eNB->RU_list[i]->idx, eNB->RU_list[i]->proc.frame_rx, eNB->RU_list[i]->proc.tti_rx, ru_states[eNB->RU_list[i]->state]);
 
     if (ru == eNB->RU_list[i] && eNB->RU_list[i]->wait_cnt == 0) {

From f5fcd5687db34bbdcc794d84d7917ce521e955d7 Mon Sep 17 00:00:00 2001
From: Raymond Knopp 
Date: Sun, 14 Mar 2021 09:28:06 +0100
Subject: [PATCH 089/579] small changes in main-ocp to reflect initialization
 differences int phy_init_lte_eNB().

---
 CHANGELOG.md                                  |  0
 LICENSE                                       |  0
 cmake_targets/at_commands/CMakeLists.txt      |  0
 cmake_targets/autotests/README.txt            |  0
 cmake_targets/autotests/core.py               |  0
 cmake_targets/autotests/log.py                |  0
 cmake_targets/autotests/openair.py            |  0
 cmake_targets/autotests/templates/index.html  |  0
 .../autotests/templates/testcase_report.html  |  0
 cmake_targets/autotests/test_case_list.xml    |  0
 cmake_targets/autotests/testsuite_ue_noS1.xml |  0
 .../autotests/testsuite_ue_noS1_TCL.xml       |  0
 cmake_targets/autotests/tools/lib_autotest.py |  0
 .../autotests/tools/lib_autotest_analyser.py  |  0
 .../autotests/tools/wdial.bandrich.conf       |  0
 cmake_targets/autotests/v2/actions/3276.txt   |  0
 .../autotests/v2/actions/alu_epc.bash         |  0
 .../autotests/v2/actions/alu_epc_stop.bash    |  0
 .../autotests/v2/actions/alu_hss.bash         |  0
 .../autotests/v2/actions/bandrich.txt         |  0
 .../autotests/v2/actions/client_tcp.bash      |  0
 .../autotests/v2/actions/client_udp.bash      |  0
 .../v2/actions/clone_repository.bash          |  0
 .../autotests/v2/actions/compilation.bash     |  0
 .../autotests/v2/actions/execution.bash       |  0
 .../v2/actions/execution_compile.bash         |  0
 cmake_targets/autotests/v2/actions/modem.py   |  0
 .../autotests/v2/actions/run_enb.bash         |  0
 .../autotests/v2/actions/server_tcp.bash      |  0
 .../autotests/v2/actions/server_udp.bash      |  0
 .../autotests/v2/actions/start_3276.bash      |  0
 .../autotests/v2/actions/start_3276.py        |  0
 .../autotests/v2/actions/start_bandrich.bash  |  0
 .../autotests/v2/actions/start_bandrich.py    |  0
 .../autotests/v2/actions/stop_3276.py         |  0
 .../autotests/v2/actions/stop_bandrich.py     |  0
 .../autotests/v2/actions/wvdial.3276.conf     |  0
 .../autotests/v2/actions/wvdial.bandrich.conf |  0
 cmake_targets/autotests/v2/alu_test.py        |  0
 .../enb.band38.tm1.usrpb210.tdd.10MHz.conf    |  0
 .../enb.band38.tm1.usrpb210.tdd.20MHz.conf    |  0
 .../enb.band38.tm1.usrpb210.tdd.5MHz.conf     |  0
 .../enb.band7.tm1.usrpb210.fdd.10MHz.conf     |  0
 .../enb.band7.tm1.usrpb210.fdd.20MHz.conf     |  0
 .../enb.band7.tm1.usrpb210.fdd.5MHz.conf      |  0
 .../v2/config/rcc.band7.tm1.if4p5.10MHz.conf  |  0
 .../v2/config/rcc.band7.tm1.if4p5.20MHz.conf  |  0
 .../v2/config/rcc.band7.tm1.if4p5.5MHz.conf   |  0
 ...ru.band7.tm1.if4p5.10MHz.udp.usrpb210.conf |  0
 ...ru.band7.tm1.if4p5.20MHz.udp.usrpb210.conf |  0
 ...rru.band7.tm1.if4p5.5MHz.udp.usrpb210.conf |  0
 cmake_targets/autotests/v2/connection.py      |  0
 cmake_targets/autotests/v2/machine_list.py    |  0
 cmake_targets/autotests/v2/main.py            |  0
 cmake_targets/autotests/v2/task.py            |  0
 cmake_targets/autotests/v2/utils.py           |  0
 cmake_targets/doxygen/CMakeLists.txt          |  0
 cmake_targets/epc_test/CMakeLists.template    |  0
 cmake_targets/nas_sim_tools/CMakeLists.txt    |  0
 cmake_targets/phy_simulators/CMakeLists.txt   |  0
 .../s1c_mme_test/CMakeLists.template          |  0
 cmake_targets/tools/Kbuild.cmake              |  0
 .../tools/MODULES/CMakeParseArguments.cmake   |  0
 .../tools/MODULES/CMakeUserFindMySQL.cmake    |  0
 .../tools/MODULES/CMakeUserUseBison.cmake     |  0
 .../tools/MODULES/CMakeUserUseFlex.cmake      |  0
 .../tools/MODULES/FindFreeDiameter.cmake      |  0
 cmake_targets/tools/MODULES/FindGCCXML.cmake  |  0
 cmake_targets/tools/MODULES/FindGcrypt.cmake  |  0
 cmake_targets/tools/MODULES/FindGnuTLS.cmake  |  0
 cmake_targets/tools/MODULES/FindKbuild.cmake  |  0
 cmake_targets/tools/MODULES/FindLibXml2.cmake |  0
 cmake_targets/tools/MODULES/FindMySQL.cmake   |  0
 cmake_targets/tools/MODULES/FindNettle.cmake  |  0
 .../tools/MODULES/FindPostgreSQL.cmake        |  0
 cmake_targets/tools/MODULES/FindSCTP.cmake    |  0
 cmake_targets/tools/MODULES/Kbuild.cmake      |  0
 .../tools/MODULES/cmake_useful.cmake          |  0
 .../tools/MODULES/kbuild_system.cmake         |  0
 cmake_targets/tools/MODULES/kmodule.cmake     |  0
 .../tools/MODULES/path_prefixes.cmake         |  0
 cmake_targets/tools/asn1tostruct.py           |  0
 .../tools/example_enb_exmimo_mme_hss.txt      |  0
 .../example_oaisim_enb_ue_mme_virtual.txt     |  0
 cmake_targets/tools/exmimo2_2arxg.lime        |  0
 cmake_targets/tools/exmimo2_2brxg.lime        |  0
 cmake_targets/tools/exmimo_stop_octave.m      |  0
 .../RRC.rel10/SystemInformation-r8-IEs.h.diff |  0
 .../SystemInformation-NB-r13-IEs.h.diff       |  0
 .../RRC.rel14/SystemInformation-r8-IEs.h.diff |  0
 ...X2ap-CriticalityDiagnostics-IE-List.h.diff |  0
 cmake_targets/tools/test_helper               |  0
 executables/main-ocp.c                        | 23 +++++++++++++++----
 openair1/PHY/INIT/lte_init.c                  | 22 ++++++++++--------
 94 files changed, 30 insertions(+), 15 deletions(-)
 mode change 100644 => 100755 CHANGELOG.md
 mode change 100644 => 100755 LICENSE
 mode change 100644 => 100755 cmake_targets/at_commands/CMakeLists.txt
 mode change 100644 => 100755 cmake_targets/autotests/README.txt
 mode change 100644 => 100755 cmake_targets/autotests/core.py
 mode change 100644 => 100755 cmake_targets/autotests/log.py
 mode change 100644 => 100755 cmake_targets/autotests/openair.py
 mode change 100644 => 100755 cmake_targets/autotests/templates/index.html
 mode change 100644 => 100755 cmake_targets/autotests/templates/testcase_report.html
 mode change 100644 => 100755 cmake_targets/autotests/test_case_list.xml
 mode change 100644 => 100755 cmake_targets/autotests/testsuite_ue_noS1.xml
 mode change 100644 => 100755 cmake_targets/autotests/testsuite_ue_noS1_TCL.xml
 mode change 100644 => 100755 cmake_targets/autotests/tools/lib_autotest.py
 mode change 100644 => 100755 cmake_targets/autotests/tools/lib_autotest_analyser.py
 mode change 100644 => 100755 cmake_targets/autotests/tools/wdial.bandrich.conf
 mode change 100644 => 100755 cmake_targets/autotests/v2/actions/3276.txt
 mode change 100644 => 100755 cmake_targets/autotests/v2/actions/alu_epc.bash
 mode change 100644 => 100755 cmake_targets/autotests/v2/actions/alu_epc_stop.bash
 mode change 100644 => 100755 cmake_targets/autotests/v2/actions/alu_hss.bash
 mode change 100644 => 100755 cmake_targets/autotests/v2/actions/bandrich.txt
 mode change 100644 => 100755 cmake_targets/autotests/v2/actions/client_tcp.bash
 mode change 100644 => 100755 cmake_targets/autotests/v2/actions/client_udp.bash
 mode change 100644 => 100755 cmake_targets/autotests/v2/actions/clone_repository.bash
 mode change 100644 => 100755 cmake_targets/autotests/v2/actions/compilation.bash
 mode change 100644 => 100755 cmake_targets/autotests/v2/actions/execution.bash
 mode change 100644 => 100755 cmake_targets/autotests/v2/actions/execution_compile.bash
 mode change 100644 => 100755 cmake_targets/autotests/v2/actions/modem.py
 mode change 100644 => 100755 cmake_targets/autotests/v2/actions/run_enb.bash
 mode change 100644 => 100755 cmake_targets/autotests/v2/actions/server_tcp.bash
 mode change 100644 => 100755 cmake_targets/autotests/v2/actions/server_udp.bash
 mode change 100644 => 100755 cmake_targets/autotests/v2/actions/start_3276.bash
 mode change 100644 => 100755 cmake_targets/autotests/v2/actions/start_3276.py
 mode change 100644 => 100755 cmake_targets/autotests/v2/actions/start_bandrich.bash
 mode change 100644 => 100755 cmake_targets/autotests/v2/actions/start_bandrich.py
 mode change 100644 => 100755 cmake_targets/autotests/v2/actions/stop_3276.py
 mode change 100644 => 100755 cmake_targets/autotests/v2/actions/stop_bandrich.py
 mode change 100644 => 100755 cmake_targets/autotests/v2/actions/wvdial.3276.conf
 mode change 100644 => 100755 cmake_targets/autotests/v2/actions/wvdial.bandrich.conf
 mode change 100644 => 100755 cmake_targets/autotests/v2/alu_test.py
 mode change 100644 => 100755 cmake_targets/autotests/v2/config/enb.band38.tm1.usrpb210.tdd.10MHz.conf
 mode change 100644 => 100755 cmake_targets/autotests/v2/config/enb.band38.tm1.usrpb210.tdd.20MHz.conf
 mode change 100644 => 100755 cmake_targets/autotests/v2/config/enb.band38.tm1.usrpb210.tdd.5MHz.conf
 mode change 100644 => 100755 cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.10MHz.conf
 mode change 100644 => 100755 cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.20MHz.conf
 mode change 100644 => 100755 cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.5MHz.conf
 mode change 100644 => 100755 cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.10MHz.conf
 mode change 100644 => 100755 cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.20MHz.conf
 mode change 100644 => 100755 cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.5MHz.conf
 mode change 100644 => 100755 cmake_targets/autotests/v2/config/rru.band7.tm1.if4p5.10MHz.udp.usrpb210.conf
 mode change 100644 => 100755 cmake_targets/autotests/v2/config/rru.band7.tm1.if4p5.20MHz.udp.usrpb210.conf
 mode change 100644 => 100755 cmake_targets/autotests/v2/config/rru.band7.tm1.if4p5.5MHz.udp.usrpb210.conf
 mode change 100644 => 100755 cmake_targets/autotests/v2/connection.py
 mode change 100644 => 100755 cmake_targets/autotests/v2/machine_list.py
 mode change 100644 => 100755 cmake_targets/autotests/v2/main.py
 mode change 100644 => 100755 cmake_targets/autotests/v2/task.py
 mode change 100644 => 100755 cmake_targets/autotests/v2/utils.py
 mode change 100644 => 100755 cmake_targets/doxygen/CMakeLists.txt
 mode change 100644 => 100755 cmake_targets/epc_test/CMakeLists.template
 mode change 100644 => 100755 cmake_targets/nas_sim_tools/CMakeLists.txt
 mode change 100644 => 100755 cmake_targets/phy_simulators/CMakeLists.txt
 mode change 100644 => 100755 cmake_targets/s1c_mme_test/CMakeLists.template
 mode change 100644 => 100755 cmake_targets/tools/Kbuild.cmake
 mode change 100644 => 100755 cmake_targets/tools/MODULES/CMakeParseArguments.cmake
 mode change 100644 => 100755 cmake_targets/tools/MODULES/CMakeUserFindMySQL.cmake
 mode change 100644 => 100755 cmake_targets/tools/MODULES/CMakeUserUseBison.cmake
 mode change 100644 => 100755 cmake_targets/tools/MODULES/CMakeUserUseFlex.cmake
 mode change 100644 => 100755 cmake_targets/tools/MODULES/FindFreeDiameter.cmake
 mode change 100644 => 100755 cmake_targets/tools/MODULES/FindGCCXML.cmake
 mode change 100644 => 100755 cmake_targets/tools/MODULES/FindGcrypt.cmake
 mode change 100644 => 100755 cmake_targets/tools/MODULES/FindGnuTLS.cmake
 mode change 100644 => 100755 cmake_targets/tools/MODULES/FindKbuild.cmake
 mode change 100644 => 100755 cmake_targets/tools/MODULES/FindLibXml2.cmake
 mode change 100644 => 100755 cmake_targets/tools/MODULES/FindMySQL.cmake
 mode change 100644 => 100755 cmake_targets/tools/MODULES/FindNettle.cmake
 mode change 100644 => 100755 cmake_targets/tools/MODULES/FindPostgreSQL.cmake
 mode change 100644 => 100755 cmake_targets/tools/MODULES/FindSCTP.cmake
 mode change 100644 => 100755 cmake_targets/tools/MODULES/Kbuild.cmake
 mode change 100644 => 100755 cmake_targets/tools/MODULES/cmake_useful.cmake
 mode change 100644 => 100755 cmake_targets/tools/MODULES/kbuild_system.cmake
 mode change 100644 => 100755 cmake_targets/tools/MODULES/kmodule.cmake
 mode change 100644 => 100755 cmake_targets/tools/MODULES/path_prefixes.cmake
 mode change 100644 => 100755 cmake_targets/tools/asn1tostruct.py
 mode change 100644 => 100755 cmake_targets/tools/example_enb_exmimo_mme_hss.txt
 mode change 100644 => 100755 cmake_targets/tools/example_oaisim_enb_ue_mme_virtual.txt
 mode change 100644 => 100755 cmake_targets/tools/exmimo2_2arxg.lime
 mode change 100644 => 100755 cmake_targets/tools/exmimo2_2brxg.lime
 mode change 100644 => 100755 cmake_targets/tools/exmimo_stop_octave.m
 mode change 100644 => 100755 cmake_targets/tools/fix_asn1.data/RRC.rel10/SystemInformation-r8-IEs.h.diff
 mode change 100644 => 100755 cmake_targets/tools/fix_asn1.data/RRC.rel14/SystemInformation-NB-r13-IEs.h.diff
 mode change 100644 => 100755 cmake_targets/tools/fix_asn1.data/RRC.rel14/SystemInformation-r8-IEs.h.diff
 mode change 100644 => 100755 cmake_targets/tools/fix_asn1.data/X2AP.rel11.2/X2ap-CriticalityDiagnostics-IE-List.h.diff
 mode change 100644 => 100755 cmake_targets/tools/test_helper

diff --git a/CHANGELOG.md b/CHANGELOG.md
old mode 100644
new mode 100755
diff --git a/LICENSE b/LICENSE
old mode 100644
new mode 100755
diff --git a/cmake_targets/at_commands/CMakeLists.txt b/cmake_targets/at_commands/CMakeLists.txt
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/README.txt b/cmake_targets/autotests/README.txt
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/core.py b/cmake_targets/autotests/core.py
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/log.py b/cmake_targets/autotests/log.py
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/openair.py b/cmake_targets/autotests/openair.py
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/templates/index.html b/cmake_targets/autotests/templates/index.html
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/templates/testcase_report.html b/cmake_targets/autotests/templates/testcase_report.html
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/test_case_list.xml b/cmake_targets/autotests/test_case_list.xml
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/testsuite_ue_noS1.xml b/cmake_targets/autotests/testsuite_ue_noS1.xml
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/testsuite_ue_noS1_TCL.xml b/cmake_targets/autotests/testsuite_ue_noS1_TCL.xml
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/tools/lib_autotest.py b/cmake_targets/autotests/tools/lib_autotest.py
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/tools/lib_autotest_analyser.py b/cmake_targets/autotests/tools/lib_autotest_analyser.py
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/tools/wdial.bandrich.conf b/cmake_targets/autotests/tools/wdial.bandrich.conf
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/v2/actions/3276.txt b/cmake_targets/autotests/v2/actions/3276.txt
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/v2/actions/alu_epc.bash b/cmake_targets/autotests/v2/actions/alu_epc.bash
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/v2/actions/alu_epc_stop.bash b/cmake_targets/autotests/v2/actions/alu_epc_stop.bash
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/v2/actions/alu_hss.bash b/cmake_targets/autotests/v2/actions/alu_hss.bash
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/v2/actions/bandrich.txt b/cmake_targets/autotests/v2/actions/bandrich.txt
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/v2/actions/client_tcp.bash b/cmake_targets/autotests/v2/actions/client_tcp.bash
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/v2/actions/client_udp.bash b/cmake_targets/autotests/v2/actions/client_udp.bash
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/v2/actions/clone_repository.bash b/cmake_targets/autotests/v2/actions/clone_repository.bash
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/v2/actions/compilation.bash b/cmake_targets/autotests/v2/actions/compilation.bash
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/v2/actions/execution.bash b/cmake_targets/autotests/v2/actions/execution.bash
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/v2/actions/execution_compile.bash b/cmake_targets/autotests/v2/actions/execution_compile.bash
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/v2/actions/modem.py b/cmake_targets/autotests/v2/actions/modem.py
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/v2/actions/run_enb.bash b/cmake_targets/autotests/v2/actions/run_enb.bash
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/v2/actions/server_tcp.bash b/cmake_targets/autotests/v2/actions/server_tcp.bash
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/v2/actions/server_udp.bash b/cmake_targets/autotests/v2/actions/server_udp.bash
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/v2/actions/start_3276.bash b/cmake_targets/autotests/v2/actions/start_3276.bash
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/v2/actions/start_3276.py b/cmake_targets/autotests/v2/actions/start_3276.py
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/v2/actions/start_bandrich.bash b/cmake_targets/autotests/v2/actions/start_bandrich.bash
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/v2/actions/start_bandrich.py b/cmake_targets/autotests/v2/actions/start_bandrich.py
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/v2/actions/stop_3276.py b/cmake_targets/autotests/v2/actions/stop_3276.py
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/v2/actions/stop_bandrich.py b/cmake_targets/autotests/v2/actions/stop_bandrich.py
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/v2/actions/wvdial.3276.conf b/cmake_targets/autotests/v2/actions/wvdial.3276.conf
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/v2/actions/wvdial.bandrich.conf b/cmake_targets/autotests/v2/actions/wvdial.bandrich.conf
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/v2/alu_test.py b/cmake_targets/autotests/v2/alu_test.py
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/v2/config/enb.band38.tm1.usrpb210.tdd.10MHz.conf b/cmake_targets/autotests/v2/config/enb.band38.tm1.usrpb210.tdd.10MHz.conf
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/v2/config/enb.band38.tm1.usrpb210.tdd.20MHz.conf b/cmake_targets/autotests/v2/config/enb.band38.tm1.usrpb210.tdd.20MHz.conf
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/v2/config/enb.band38.tm1.usrpb210.tdd.5MHz.conf b/cmake_targets/autotests/v2/config/enb.band38.tm1.usrpb210.tdd.5MHz.conf
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.10MHz.conf b/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.10MHz.conf
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.20MHz.conf b/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.20MHz.conf
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.5MHz.conf b/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.fdd.5MHz.conf
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.10MHz.conf b/cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.10MHz.conf
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.20MHz.conf b/cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.20MHz.conf
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.5MHz.conf b/cmake_targets/autotests/v2/config/rcc.band7.tm1.if4p5.5MHz.conf
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/v2/config/rru.band7.tm1.if4p5.10MHz.udp.usrpb210.conf b/cmake_targets/autotests/v2/config/rru.band7.tm1.if4p5.10MHz.udp.usrpb210.conf
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/v2/config/rru.band7.tm1.if4p5.20MHz.udp.usrpb210.conf b/cmake_targets/autotests/v2/config/rru.band7.tm1.if4p5.20MHz.udp.usrpb210.conf
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/v2/config/rru.band7.tm1.if4p5.5MHz.udp.usrpb210.conf b/cmake_targets/autotests/v2/config/rru.band7.tm1.if4p5.5MHz.udp.usrpb210.conf
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/v2/connection.py b/cmake_targets/autotests/v2/connection.py
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/v2/machine_list.py b/cmake_targets/autotests/v2/machine_list.py
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/v2/main.py b/cmake_targets/autotests/v2/main.py
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/v2/task.py b/cmake_targets/autotests/v2/task.py
old mode 100644
new mode 100755
diff --git a/cmake_targets/autotests/v2/utils.py b/cmake_targets/autotests/v2/utils.py
old mode 100644
new mode 100755
diff --git a/cmake_targets/doxygen/CMakeLists.txt b/cmake_targets/doxygen/CMakeLists.txt
old mode 100644
new mode 100755
diff --git a/cmake_targets/epc_test/CMakeLists.template b/cmake_targets/epc_test/CMakeLists.template
old mode 100644
new mode 100755
diff --git a/cmake_targets/nas_sim_tools/CMakeLists.txt b/cmake_targets/nas_sim_tools/CMakeLists.txt
old mode 100644
new mode 100755
diff --git a/cmake_targets/phy_simulators/CMakeLists.txt b/cmake_targets/phy_simulators/CMakeLists.txt
old mode 100644
new mode 100755
diff --git a/cmake_targets/s1c_mme_test/CMakeLists.template b/cmake_targets/s1c_mme_test/CMakeLists.template
old mode 100644
new mode 100755
diff --git a/cmake_targets/tools/Kbuild.cmake b/cmake_targets/tools/Kbuild.cmake
old mode 100644
new mode 100755
diff --git a/cmake_targets/tools/MODULES/CMakeParseArguments.cmake b/cmake_targets/tools/MODULES/CMakeParseArguments.cmake
old mode 100644
new mode 100755
diff --git a/cmake_targets/tools/MODULES/CMakeUserFindMySQL.cmake b/cmake_targets/tools/MODULES/CMakeUserFindMySQL.cmake
old mode 100644
new mode 100755
diff --git a/cmake_targets/tools/MODULES/CMakeUserUseBison.cmake b/cmake_targets/tools/MODULES/CMakeUserUseBison.cmake
old mode 100644
new mode 100755
diff --git a/cmake_targets/tools/MODULES/CMakeUserUseFlex.cmake b/cmake_targets/tools/MODULES/CMakeUserUseFlex.cmake
old mode 100644
new mode 100755
diff --git a/cmake_targets/tools/MODULES/FindFreeDiameter.cmake b/cmake_targets/tools/MODULES/FindFreeDiameter.cmake
old mode 100644
new mode 100755
diff --git a/cmake_targets/tools/MODULES/FindGCCXML.cmake b/cmake_targets/tools/MODULES/FindGCCXML.cmake
old mode 100644
new mode 100755
diff --git a/cmake_targets/tools/MODULES/FindGcrypt.cmake b/cmake_targets/tools/MODULES/FindGcrypt.cmake
old mode 100644
new mode 100755
diff --git a/cmake_targets/tools/MODULES/FindGnuTLS.cmake b/cmake_targets/tools/MODULES/FindGnuTLS.cmake
old mode 100644
new mode 100755
diff --git a/cmake_targets/tools/MODULES/FindKbuild.cmake b/cmake_targets/tools/MODULES/FindKbuild.cmake
old mode 100644
new mode 100755
diff --git a/cmake_targets/tools/MODULES/FindLibXml2.cmake b/cmake_targets/tools/MODULES/FindLibXml2.cmake
old mode 100644
new mode 100755
diff --git a/cmake_targets/tools/MODULES/FindMySQL.cmake b/cmake_targets/tools/MODULES/FindMySQL.cmake
old mode 100644
new mode 100755
diff --git a/cmake_targets/tools/MODULES/FindNettle.cmake b/cmake_targets/tools/MODULES/FindNettle.cmake
old mode 100644
new mode 100755
diff --git a/cmake_targets/tools/MODULES/FindPostgreSQL.cmake b/cmake_targets/tools/MODULES/FindPostgreSQL.cmake
old mode 100644
new mode 100755
diff --git a/cmake_targets/tools/MODULES/FindSCTP.cmake b/cmake_targets/tools/MODULES/FindSCTP.cmake
old mode 100644
new mode 100755
diff --git a/cmake_targets/tools/MODULES/Kbuild.cmake b/cmake_targets/tools/MODULES/Kbuild.cmake
old mode 100644
new mode 100755
diff --git a/cmake_targets/tools/MODULES/cmake_useful.cmake b/cmake_targets/tools/MODULES/cmake_useful.cmake
old mode 100644
new mode 100755
diff --git a/cmake_targets/tools/MODULES/kbuild_system.cmake b/cmake_targets/tools/MODULES/kbuild_system.cmake
old mode 100644
new mode 100755
diff --git a/cmake_targets/tools/MODULES/kmodule.cmake b/cmake_targets/tools/MODULES/kmodule.cmake
old mode 100644
new mode 100755
diff --git a/cmake_targets/tools/MODULES/path_prefixes.cmake b/cmake_targets/tools/MODULES/path_prefixes.cmake
old mode 100644
new mode 100755
diff --git a/cmake_targets/tools/asn1tostruct.py b/cmake_targets/tools/asn1tostruct.py
old mode 100644
new mode 100755
diff --git a/cmake_targets/tools/example_enb_exmimo_mme_hss.txt b/cmake_targets/tools/example_enb_exmimo_mme_hss.txt
old mode 100644
new mode 100755
diff --git a/cmake_targets/tools/example_oaisim_enb_ue_mme_virtual.txt b/cmake_targets/tools/example_oaisim_enb_ue_mme_virtual.txt
old mode 100644
new mode 100755
diff --git a/cmake_targets/tools/exmimo2_2arxg.lime b/cmake_targets/tools/exmimo2_2arxg.lime
old mode 100644
new mode 100755
diff --git a/cmake_targets/tools/exmimo2_2brxg.lime b/cmake_targets/tools/exmimo2_2brxg.lime
old mode 100644
new mode 100755
diff --git a/cmake_targets/tools/exmimo_stop_octave.m b/cmake_targets/tools/exmimo_stop_octave.m
old mode 100644
new mode 100755
diff --git a/cmake_targets/tools/fix_asn1.data/RRC.rel10/SystemInformation-r8-IEs.h.diff b/cmake_targets/tools/fix_asn1.data/RRC.rel10/SystemInformation-r8-IEs.h.diff
old mode 100644
new mode 100755
diff --git a/cmake_targets/tools/fix_asn1.data/RRC.rel14/SystemInformation-NB-r13-IEs.h.diff b/cmake_targets/tools/fix_asn1.data/RRC.rel14/SystemInformation-NB-r13-IEs.h.diff
old mode 100644
new mode 100755
diff --git a/cmake_targets/tools/fix_asn1.data/RRC.rel14/SystemInformation-r8-IEs.h.diff b/cmake_targets/tools/fix_asn1.data/RRC.rel14/SystemInformation-r8-IEs.h.diff
old mode 100644
new mode 100755
diff --git a/cmake_targets/tools/fix_asn1.data/X2AP.rel11.2/X2ap-CriticalityDiagnostics-IE-List.h.diff b/cmake_targets/tools/fix_asn1.data/X2AP.rel11.2/X2ap-CriticalityDiagnostics-IE-List.h.diff
old mode 100644
new mode 100755
diff --git a/cmake_targets/tools/test_helper b/cmake_targets/tools/test_helper
old mode 100644
new mode 100755
diff --git a/executables/main-ocp.c b/executables/main-ocp.c
index ae1db7195b..7a15f395f6 100644
--- a/executables/main-ocp.c
+++ b/executables/main-ocp.c
@@ -202,7 +202,6 @@ void init_eNB_afterRU(void) {
   for (int inst=0; instframe_parms.nb_antennas_rx       = 0;
       eNB->frame_parms.nb_antennas_tx       = 0;
       eNB->prach_vars.rxsigF[0] = (int16_t **)malloc16(64*sizeof(int16_t *));
@@ -228,12 +227,26 @@ void init_eNB_afterRU(void) {
           for (int ce_level=0; ce_level<4; ce_level++)
             eNB->prach_vars_br.rxsigF[ce_level][aa] = eNB->RU_list[ru_id]->prach_rxsigF_br[ce_level][i];
 
-          eNB->common_vars.rxdataF[aa]     =  eNB->RU_list[ru_id]->common.rxdataF[i];
         }
       }
 
-      AssertFatal( eNB->frame_parms.nb_antennas_rx > 0 && eNB->frame_parms.nb_antennas_rx < 4, "");
-      AssertFatal( eNB->frame_parms.nb_antennas_tx > 0 && eNB->frame_parms.nb_antennas_rx < 4, "");
+
+      AssertFatal( eNB->frame_parms.nb_antennas_rx > 0 && eNB->frame_parms.nb_antennas_rx < 5, "");
+      AssertFatal( eNB->frame_parms.nb_antennas_tx > 0 && eNB->frame_parms.nb_antennas_rx < 5, "");
+
+      phy_init_lte_eNB(eNB,0,0);
+
+      // need to copy rxdataF after L1 variables are allocated
+      for (int inst=0; instnum_RU; ru_id++) {
+              for (int i=0; iRU_list[ru_id]->nb_rx; aa++,i++) 
+                eNB->common_vars.rxdataF[aa]     =  eNB->RU_list[ru_id]->common.rxdataF[i];
+           }
+         }
+      }
+
       LOG_I(PHY,"inst %d, CC_id %d : nb_antennas_rx %d\n",inst,CC_id,eNB->frame_parms.nb_antennas_rx);
       init_transport(eNB);
       //init_precoding_weights(RC.eNB[inst][CC_id]);
@@ -800,7 +813,7 @@ int init_rf(RU_t *ru) {
   pthread_setname_np(pthread_self(),name);
   return ret;
 }
-
+ 
 void ocp_init_RU(RU_t *ru, char *rf_config_file, int send_dmrssync) {
   PHY_VARS_eNB *eNB0= (PHY_VARS_eNB *)NULL;
   int i;
diff --git a/openair1/PHY/INIT/lte_init.c b/openair1/PHY/INIT/lte_init.c
index df5ee7c5f6..1daeb72187 100644
--- a/openair1/PHY/INIT/lte_init.c
+++ b/openair1/PHY/INIT/lte_init.c
@@ -457,6 +457,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
       }
     }
 
+    LOG_I(PHY,"[INIT]SRS allocation\n");
     // Channel estimates for SRS
     for (int srs_id = 0; srs_id < NUMBER_OF_SRS_MAX; srs_id++) {
       srs_vars[srs_id].srs_ch_estimates = (int32_t **) malloc16 (64 * sizeof (int32_t *));
@@ -476,6 +477,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
       srs_vars[srs_id].srs = (int32_t *) malloc16_clear (2 * fp->ofdm_symbol_size * sizeof (int32_t));
     }
 
+    LOG_I(PHY,"PRACH allocation\n");
     // PRACH
     prach_vars->prachF = (int16_t *) malloc16_clear (1024 * 2 * sizeof (int16_t));
     // assume maximum of 64 RX antennas for PRACH receiver
@@ -506,26 +508,26 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
       LOG_D(PHY,"[INIT] prach_vars->rxsigF[%d] = %p\n",i,prach_vars->rxsigF[i]);
       }*/
 
+    printf("NUMBER_OF_ULSCH_MAX %d\n",NUMBER_OF_ULSCH_MAX);
     for (int ULSCH_id=0; ULSCH_idrxdataF_ext = (int32_t **) malloc16 (2 * sizeof (int32_t *));
-      pusch_vars[ULSCH_id]->rxdataF_ext2 = (int32_t **) malloc16 (2 * sizeof (int32_t *));
-      pusch_vars[ULSCH_id]->drs_ch_estimates = (int32_t **) malloc16 (2 * sizeof (int32_t *));
-      pusch_vars[ULSCH_id]->drs_ch_estimates_time = (int32_t **) malloc16 (2 * sizeof (int32_t *));
-      pusch_vars[ULSCH_id]->rxdataF_comp = (int32_t **) malloc16 (2 * sizeof (int32_t *));
-      pusch_vars[ULSCH_id]->ul_ch_mag = (int32_t **) malloc16 (2 * sizeof (int32_t *));
-      pusch_vars[ULSCH_id]->ul_ch_magb = (int32_t **) malloc16 (2 * sizeof (int32_t *));
+      pusch_vars[ULSCH_id]->rxdataF_ext = (int32_t **) malloc16 (4 * sizeof (int32_t *));
+      pusch_vars[ULSCH_id]->rxdataF_ext2 = (int32_t **) malloc16 (4 * sizeof (int32_t *));
+      pusch_vars[ULSCH_id]->drs_ch_estimates = (int32_t **) malloc16 (4 * sizeof (int32_t *));
+      pusch_vars[ULSCH_id]->drs_ch_estimates_time = (int32_t **) malloc16 (4 * sizeof (int32_t *));
+      pusch_vars[ULSCH_id]->rxdataF_comp = (int32_t **) malloc16 (4 * sizeof (int32_t *));
+      pusch_vars[ULSCH_id]->ul_ch_mag = (int32_t **) malloc16 (4 * sizeof (int32_t *));
+      pusch_vars[ULSCH_id]->ul_ch_magb = (int32_t **) malloc16 (4 * sizeof (int32_t *));
       AssertFatal (fp->ofdm_symbol_size > 127, "fp->ofdm_symbol_size %d<128\n", fp->ofdm_symbol_size);
       AssertFatal (fp->symbols_per_tti > 11, "fp->symbols_per_tti %d < 12\n", fp->symbols_per_tti);
       AssertFatal (fp->N_RB_UL > 5, "fp->N_RB_UL %d < 6\n", fp->N_RB_UL);
-
+      AssertFatal (fp->nb_antennas_rx > 0,"fp->nb_antennas_rx = %d\n",fp->nb_antennas_rx);
       for (i = 0; i < fp->nb_antennas_rx; i++) {
         // FIXME We should get rid of this
         pusch_vars[ULSCH_id]->rxdataF_ext[i]      = (int32_t *)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti );
-
         pusch_vars[ULSCH_id]->drs_ch_estimates[i] = (int32_t *)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti );
-        pusch_vars[ULSCH_id]->drs_ch_estimates_time[i] = (int32_t *)malloc16_clear( 2*sizeof(int32_t)*fp->ofdm_symbol_size );
+        pusch_vars[ULSCH_id]->drs_ch_estimates_time[i] = (int32_t *)malloc16_clear( 4*sizeof(int32_t)*fp->ofdm_symbol_size );
         pusch_vars[ULSCH_id]->rxdataF_comp[i]     = (int32_t *)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti );
         pusch_vars[ULSCH_id]->ul_ch_mag[i]  = (int32_t *)malloc16_clear( fp->symbols_per_tti*sizeof(int32_t)*fp->N_RB_UL*12 );
         pusch_vars[ULSCH_id]->ul_ch_magb[i] = (int32_t *)malloc16_clear( fp->symbols_per_tti*sizeof(int32_t)*fp->N_RB_UL*12 );

From 0043063d4050016c5d2bc925dee7367870c3b4a1 Mon Sep 17 00:00:00 2001
From: Raymond Knopp 
Date: Sun, 14 Mar 2021 22:17:48 +0100
Subject: [PATCH 090/579] fixed bandwidth scaling for 6 PRBs in eNB and UE.

---
 openair1/PHY/LTE_TRANSPORT/dlsch_coding.c      | 2 +-
 openair1/PHY/LTE_UE_TRANSPORT/dlsch_decoding.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c b/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
index 550ec0a3e8..b5bcb0848d 100644
--- a/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
+++ b/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
@@ -111,7 +111,7 @@ LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,
 
   switch (N_RB_DL) {
   case 6:
-    bw_scaling =16;
+    bw_scaling = 4;
     break;
 
   case 25:
diff --git a/openair1/PHY/LTE_UE_TRANSPORT/dlsch_decoding.c b/openair1/PHY/LTE_UE_TRANSPORT/dlsch_decoding.c
index 7442a0ae7e..39900113b7 100644
--- a/openair1/PHY/LTE_UE_TRANSPORT/dlsch_decoding.c
+++ b/openair1/PHY/LTE_UE_TRANSPORT/dlsch_decoding.c
@@ -78,7 +78,7 @@ LTE_UE_DLSCH_t *new_ue_dlsch(uint8_t Kmimo,uint8_t Mdlharq,uint32_t Nsoft,uint8_
 
   switch (N_RB_DL) {
     case 6:
-      bw_scaling =16;
+      bw_scaling =4;
       break;
 
     case 25:
@@ -276,7 +276,7 @@ uint32_t  dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
 
   switch (frame_parms->N_RB_DL) {
     case 6:
-      bw_scaling =16;
+      bw_scaling =4;
       break;
 
     case 25:

From 4c8fb83e82d540231e92a71a45971f00b1d1b10f Mon Sep 17 00:00:00 2001
From: Raymond Knopp 
Date: Sun, 14 Mar 2021 22:47:43 +0100
Subject: [PATCH 091/579] lowmem option for allocating transport channel
 buffers in NR_DLSCH/NR_ULSCH. Used for unitary simulation in CI.

---
 openair1/PHY/INIT/nr_init.c                | 23 +++++++++++++++-------
 openair1/PHY/INIT/phy_init.h               |  2 +-
 openair1/PHY/NR_TRANSPORT/nr_dci_tools.c   |  2 +-
 openair1/PHY/NR_TRANSPORT/nr_dlsch.c       |  4 ++--
 openair1/PHY/NR_TRANSPORT/nr_dlsch_tools.c |  4 ++--
 openair1/PHY/NR_TRANSPORT/nr_ulsch.c       |  8 ++++----
 openair1/PHY/defs_gNB.h                    |  3 ++-
 openair1/SCHED_NR/fapi_nr_l1.c             |  4 ++--
 openair1/SCHED_NR/phy_procedures_nr_gNB.c  |  4 ++--
 openair1/SIMULATION/NR_PHY/dlschsim.c      |  2 +-
 openair1/SIMULATION/NR_PHY/dlsim.c         |  2 +-
 openair1/SIMULATION/NR_PHY/prachsim.c      |  2 +-
 openair1/SIMULATION/NR_PHY/ulschsim.c      |  2 +-
 openair1/SIMULATION/NR_PHY/ulsim.c         |  2 +-
 14 files changed, 37 insertions(+), 27 deletions(-)

diff --git a/openair1/PHY/INIT/nr_init.c b/openair1/PHY/INIT/nr_init.c
index 67eedd5da7..b8f98af55c 100644
--- a/openair1/PHY/INIT/nr_init.c
+++ b/openair1/PHY/INIT/nr_init.c
@@ -77,7 +77,7 @@ int l1_north_init_gNB() {
 
 int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
                     unsigned char is_secondary_gNB,
-                    unsigned char abstraction_flag) {
+                    unsigned char lowmem_flag) {
   // shortcuts
   NR_DL_FRAME_PARMS *const fp       = &gNB->frame_parms;
   nfapi_nr_config_request_scf_t *cfg = &gNB->gNB_config;
@@ -95,6 +95,15 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
 
   while(gNB->configured == 0) usleep(10000);
 
+  if (lowmem_flag == 1) {
+    gNB->number_of_nr_dlsch_max = 2;
+    gNB->number_of_nr_ulsch_max = 2;
+  }
+  else {
+    gNB->number_of_nr_dlsch_max = NUMBER_OF_NR_DLSCH_MAX;
+    gNB->number_of_nr_ulsch_max = NUMBER_OF_NR_ULSCH_MAX;
+  }  
+
   load_dftslib();
 
   LOG_D(PHY,"[MSC_NEW][FRAME 00000][PHY_gNB][MOD %02"PRIu8"][]\n", gNB->Mod_id);
@@ -250,7 +259,7 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
 
   int N_RB_UL = cfg->carrier_config.ul_grid_size[cfg->ssb_config.scs_common.value].value;
 
-  for (int ULSCH_id=0; ULSCH_idnumber_of_nr_ulsch_max; ULSCH_id++) {
     pusch_vars[ULSCH_id] = (NR_gNB_PUSCH *)malloc16_clear( sizeof(NR_gNB_PUSCH) );
     pusch_vars[ULSCH_id]->rxdataF_ext           = (int32_t **)malloc16(Prx*sizeof(int32_t *) );
     pusch_vars[ULSCH_id]->rxdataF_ext2          = (int32_t **)malloc16(Prx*sizeof(int32_t *) );
@@ -335,7 +344,7 @@ void phy_free_nr_gNB(PHY_VARS_gNB *gNB)
   free_and_zero(prach_vars->prach_ifft[0]);
   free_and_zero(prach_vars->rxsigF[0]);
 */
-  for (int ULSCH_id=0; ULSCH_idnumber_of_nr_ulsch_max; ULSCH_id++) {
     for (int i = 0; i < 2; i++) {
       free_and_zero(pusch_vars[ULSCH_id]->rxdataF_ext[i]);
       free_and_zero(pusch_vars[ULSCH_id]->rxdataF_ext2[i]);
@@ -533,9 +542,9 @@ void init_nr_transport(PHY_VARS_gNB *gNB) {
     AssertFatal(gNB->pucch[i]!=NULL,"Can't initialize pucch %d \n", i);
   }
 
-  for (i=0; inumber_of_nr_dlsch_max; i++) {
 
-    LOG_I(PHY,"Allocating Transport Channel Buffers for DLSCH %d/%d\n",i,NUMBER_OF_NR_DLSCH_MAX);
+    LOG_I(PHY,"Allocating Transport Channel Buffers for DLSCH %d/%d\n",i,gNB->number_of_nr_dlsch_max);
 
     for (j=0; j<2; j++) {
       gNB->dlsch[i][j] = new_gNB_dlsch(fp,1,16,NSOFT,0,grid_size);
@@ -543,9 +552,9 @@ void init_nr_transport(PHY_VARS_gNB *gNB) {
     }
   }
 
-  for (i=0; inumber_of_nr_ulsch_max; i++) {
 
-    LOG_I(PHY,"Allocating Transport Channel Buffer for ULSCH  %d/%d\n",i,NUMBER_OF_NR_ULSCH_MAX);
+    LOG_I(PHY,"Allocating Transport Channel Buffer for ULSCH  %d/%d\n",i,gNB->number_of_nr_ulsch_max);
 
     for (j=0; j<2; j++) {
       // ULSCH for data
diff --git a/openair1/PHY/INIT/phy_init.h b/openair1/PHY/INIT/phy_init.h
index 2cbf926a4d..d79f812eed 100644
--- a/openair1/PHY/INIT/phy_init.h
+++ b/openair1/PHY/INIT/phy_init.h
@@ -399,7 +399,7 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,int nb_connected_eNB,uint8_t abstractio
 void init_nr_ue_transport(PHY_VARS_NR_UE *ue,int abstraction_flag);
 void init_N_TA_offset(PHY_VARS_NR_UE *ue);
 void nr_dump_frame_parms(NR_DL_FRAME_PARMS *frame_parms);
-int phy_init_nr_gNB(PHY_VARS_gNB *gNB, unsigned char is_secondary_gNB, unsigned char abstraction_flag);
+int phy_init_nr_gNB(PHY_VARS_gNB *gNB, unsigned char is_secondary_gNB, unsigned char lowmem_flag);
 void nr_phy_config_request(NR_PHY_Config_t *gNB);
 void nr_phy_config_request_sim(PHY_VARS_gNB *gNB,int N_RB_DL,int N_RB_UL,int mu,int Nid_cell,uint64_t position_in_burst);
 void phy_free_nr_gNB(PHY_VARS_gNB *gNB);
diff --git a/openair1/PHY/NR_TRANSPORT/nr_dci_tools.c b/openair1/PHY/NR_TRANSPORT/nr_dci_tools.c
index 3814c78295..a1a7201c1b 100644
--- a/openair1/PHY/NR_TRANSPORT/nr_dci_tools.c
+++ b/openair1/PHY/NR_TRANSPORT/nr_dci_tools.c
@@ -239,7 +239,7 @@ void nr_fill_dci(PHY_VARS_gNB *gNB,
     //uint64_t *dci_pdu = (uint64_t*)pdcch_pdu_rel15->dci_pdu[i].Payload;
 
     int dlsch_id = find_nr_dlsch(pdcch_pdu_rel15->dci_pdu[i].RNTI,gNB,SEARCH_EXIST_OR_FREE);
-    if( (dlsch_id<0) || (dlsch_id>=NUMBER_OF_NR_DLSCH_MAX) ){
+    if( (dlsch_id<0) || (dlsch_id>=gNB->number_of_nr_dlsch_max) ){
       LOG_E(PHY,"illegal dlsch_id found!!! rnti %04x dlsch_id %d\n",(unsigned int)pdcch_pdu_rel15->dci_pdu[i].RNTI,dlsch_id);
       return;
     }
diff --git a/openair1/PHY/NR_TRANSPORT/nr_dlsch.c b/openair1/PHY/NR_TRANSPORT/nr_dlsch.c
index 1cce5e1174..56cf0b4bb3 100644
--- a/openair1/PHY/NR_TRANSPORT/nr_dlsch.c
+++ b/openair1/PHY/NR_TRANSPORT/nr_dlsch.c
@@ -132,7 +132,7 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB,
   time_stats_t *dlsch_interleaving_stats=&gNB->dlsch_interleaving_stats;
   time_stats_t *dlsch_segmentation_stats=&gNB->dlsch_segmentation_stats;
 
-  for (int dlsch_id=0;dlsch_idnumber_of_nr_dlsch_max;dlsch_id++) {
     dlsch = gNB->dlsch[dlsch_id][0];
     if (dlsch->slot_tx[slot] == 0) continue;
 
@@ -430,6 +430,6 @@ void dump_pdsch_stats(PHY_VARS_gNB *gNB) {
 
 void clear_pdsch_stats(PHY_VARS_gNB *gNB) {
 
-  for (int i=0;inumber_of_nr_dlsch_max;i++)
     memset((void*)&gNB->dlsch_stats[i],0,sizeof(gNB->dlsch_stats[i]));
 }
diff --git a/openair1/PHY/NR_TRANSPORT/nr_dlsch_tools.c b/openair1/PHY/NR_TRANSPORT/nr_dlsch_tools.c
index 05d6c4c112..543002827d 100644
--- a/openair1/PHY/NR_TRANSPORT/nr_dlsch_tools.c
+++ b/openair1/PHY/NR_TRANSPORT/nr_dlsch_tools.c
@@ -260,7 +260,7 @@ int16_t find_nr_dlsch(uint16_t rnti, PHY_VARS_gNB *gNB,find_type_t type) {
    int16_t first_free_index=-1;
  
    AssertFatal(gNB!=NULL,"gNB is null\n");
-   for (i=0; inumber_of_nr_dlsch_max; i++) {
      AssertFatal(gNB->dlsch[i]!=NULL,"gNB->dlsch[%d] is null\n",i);
      AssertFatal(gNB->dlsch[i][0]!=NULL,"gNB->dlsch[%d][0] is null\n",i);
      LOG_D(PHY,"searching for rnti %x : dlsch_index %d=> harq_mask %x, rnti %x, first_free_index %d\n", rnti,i,
@@ -286,7 +286,7 @@ void nr_fill_dlsch(PHY_VARS_gNB *gNB,
   nfapi_nr_dl_tti_pdsch_pdu_rel15_t *rel15 = &pdsch_pdu->pdsch_pdu_rel15;
  
   int dlsch_id = find_nr_dlsch(rel15->rnti,gNB,SEARCH_EXIST);
-  AssertFatal( (dlsch_id>=0) && (dlsch_id=0) && (dlsch_idnumber_of_nr_dlsch_max),
               "illegal or no dlsch_id found!!! rnti %04x dlsch_id %d\n",rel15->rnti,dlsch_id);
   NR_gNB_DLSCH_t  *dlsch = gNB->dlsch[dlsch_id][0];
   NR_DL_gNB_HARQ_t *harq  = &dlsch->harq_process;
diff --git a/openair1/PHY/NR_TRANSPORT/nr_ulsch.c b/openair1/PHY/NR_TRANSPORT/nr_ulsch.c
index 0040f01544..e6e8fdb01b 100644
--- a/openair1/PHY/NR_TRANSPORT/nr_ulsch.c
+++ b/openair1/PHY/NR_TRANSPORT/nr_ulsch.c
@@ -41,7 +41,7 @@ int16_t find_nr_ulsch(uint16_t rnti, PHY_VARS_gNB *gNB,find_type_t type) {
   int16_t first_free_index=-1;
 
   AssertFatal(gNB!=NULL,"gNB is null\n");
-  for (i=0; inumber_of_nr_ulsch_max; i++) {
     AssertFatal(gNB->ulsch[i]!=NULL,"gNB->ulsch[%d] is null\n",i);
     AssertFatal(gNB->ulsch[i][0]!=NULL,"gNB->ulsch[%d][0] is null\n",i);
     LOG_D(PHY,"searching for rnti %x : ulsch_index %d=> harq_mask %x, rnti %x, first_free_index %d\n", rnti,i,gNB->ulsch[i][0]->harq_mask,gNB->ulsch[i][0]->rnti,first_free_index);
@@ -62,7 +62,7 @@ void nr_fill_ulsch(PHY_VARS_gNB *gNB,
 
  
   int ulsch_id = find_nr_ulsch(ulsch_pdu->rnti,gNB,SEARCH_EXIST_OR_FREE);
-  AssertFatal( (ulsch_id>=0) && (ulsch_id=0) && (ulsch_idnumber_of_nr_ulsch_max),
               "illegal or no ulsch_id found!!! rnti %04x ulsch_id %d\n",ulsch_pdu->rnti,ulsch_id);
 
   NR_gNB_ULSCH_t  *ulsch = gNB->ulsch[ulsch_id][0];
@@ -139,7 +139,7 @@ void nr_ulsch_unscrambling_optim(int16_t* llr,
 
 void dump_pusch_stats(PHY_VARS_gNB *gNB) {
 
-  for (int i=0;inumber_of_nr_ulsch_max;i++)
     if (gNB->ulsch_stats[i].rnti>0) 
       LOG_I(PHY,"ULSCH RNTI %x: round_trials %d(%1.1e):%d(%1.1e):%d(%1.1e):%d, current_Qm %d, current_RI %d, total_bytes RX/SCHED %d/%d\n",
 	    gNB->ulsch_stats[i].rnti,
@@ -159,6 +159,6 @@ void dump_pusch_stats(PHY_VARS_gNB *gNB) {
 
 void clear_pusch_stats(PHY_VARS_gNB *gNB) {
 
-  for (int i=0;inumber_of_nr_ulsch_max;i++)
     memset((void*)&gNB->ulsch_stats[i],0,sizeof(gNB->ulsch_stats[i]));
 }
diff --git a/openair1/PHY/defs_gNB.h b/openair1/PHY/defs_gNB.h
index b7923adb0b..3bc45f023b 100644
--- a/openair1/PHY/defs_gNB.h
+++ b/openair1/PHY/defs_gNB.h
@@ -706,7 +706,8 @@ typedef struct PHY_VARS_gNB_s {
   //  nfapi_nr_dl_tti_pdcch_pdu    *pdcch_pdu;
   //  nfapi_nr_ul_dci_request_pdus_t  *ul_dci_pdu;
   nfapi_nr_dl_tti_ssb_pdu      ssb_pdu;
-
+  int                number_of_nr_dlsch_max;
+  int                number_of_nr_ulsch_max;
   uint16_t num_pdsch_rnti[80];
   NR_gNB_PBCH         pbch;
   nr_cce_t           cce_list[MAX_DCI_CORESET][NR_MAX_PDCCH_AGG_LEVEL];
diff --git a/openair1/SCHED_NR/fapi_nr_l1.c b/openair1/SCHED_NR/fapi_nr_l1.c
index d65d3b54bb..307ceb83db 100644
--- a/openair1/SCHED_NR/fapi_nr_l1.c
+++ b/openair1/SCHED_NR/fapi_nr_l1.c
@@ -161,7 +161,7 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
 
   int pdcch_received=0;
   gNB->num_pdsch_rnti[slot]=0;
-  for (int i=0; inumber_of_nr_dlsch_max; i++) {
     gNB->dlsch[i][0]->rnti=0;
     gNB->dlsch[i][0]->harq_mask=0;
   }
@@ -257,4 +257,4 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
     
   }
 
-}
\ No newline at end of file
+}
diff --git a/openair1/SCHED_NR/phy_procedures_nr_gNB.c b/openair1/SCHED_NR/phy_procedures_nr_gNB.c
index 9d7422745e..d403e860d3 100644
--- a/openair1/SCHED_NR/phy_procedures_nr_gNB.c
+++ b/openair1/SCHED_NR/phy_procedures_nr_gNB.c
@@ -475,7 +475,7 @@ void fill_ul_rb_mask(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
           }
         }
       }
-      for (int ULSCH_id=0;ULSCH_idnumber_of_nr_ulsch_max;ULSCH_id++) {
         NR_gNB_ULSCH_t *ulsch = gNB->ulsch[ULSCH_id][0];
         int harq_pid;
         NR_UL_gNB_HARQ_t *ulsch_harq;
@@ -607,7 +607,7 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
     }
   }
 
-  for (int ULSCH_id=0;ULSCH_idnumber_of_nr_ulsch_max;ULSCH_id++) {
     NR_gNB_ULSCH_t *ulsch = gNB->ulsch[ULSCH_id][0];
     int harq_pid;
     int no_sig;
diff --git a/openair1/SIMULATION/NR_PHY/dlschsim.c b/openair1/SIMULATION/NR_PHY/dlschsim.c
index 00983553d8..41d73ff861 100644
--- a/openair1/SIMULATION/NR_PHY/dlschsim.c
+++ b/openair1/SIMULATION/NR_PHY/dlschsim.c
@@ -357,7 +357,7 @@ int main(int argc, char **argv)
 	frame_parms->Ncp = extended_prefix_flag ? EXTENDED : NORMAL;
 	crcTableInit();
 	nr_phy_config_request_sim(gNB, N_RB_DL, N_RB_DL, mu, Nid_cell,SSB_positions);
-	phy_init_nr_gNB(gNB, 0, 0);
+	phy_init_nr_gNB(gNB, 0, 1); //lowmem
 	//init_eNB_afterRU();
 	frame_length_complex_samples = frame_parms->samples_per_subframe;
 	//frame_length_complex_samples_no_prefix = frame_parms->samples_per_subframe_wCP;
diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c
index 1f3edd8faf..a445672abb 100644
--- a/openair1/SIMULATION/NR_PHY/dlsim.c
+++ b/openair1/SIMULATION/NR_PHY/dlsim.c
@@ -694,7 +694,7 @@ int main(int argc, char **argv)
   rrc_mac_config_req_gNB(0,0,1,pusch_tgt_snrx10,pucch_tgt_snrx10,scc,0,0,NULL);
   // UE dedicated configuration
   rrc_mac_config_req_gNB(0,0,1,pusch_tgt_snrx10,pucch_tgt_snrx10,NULL,1,secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity,secondaryCellGroup);
-  phy_init_nr_gNB(gNB,0,0);
+  phy_init_nr_gNB(gNB,0,1); // lowmem
   N_RB_DL = gNB->frame_parms.N_RB_DL;
   NR_UE_info_t *UE_info = &RC.nrmac[0]->UE_info;
   UE_info->num_UEs=1;
diff --git a/openair1/SIMULATION/NR_PHY/prachsim.c b/openair1/SIMULATION/NR_PHY/prachsim.c
index 03cc07cc66..5eeea03511 100644
--- a/openair1/SIMULATION/NR_PHY/prachsim.c
+++ b/openair1/SIMULATION/NR_PHY/prachsim.c
@@ -576,7 +576,7 @@ int main(int argc, char **argv){
 
   memcpy((void*)&ru->config,(void*)&RC.gNB[0]->gNB_config,sizeof(ru->config));
   RC.nb_nr_L1_inst=1;
-  phy_init_nr_gNB(gNB,0,0);
+  phy_init_nr_gNB(gNB,0,1); //lowmem
   nr_phy_init_RU(ru);
   gNB->common_vars.rxdata = ru->common.rxdata;
   set_tdd_config_nr(&gNB->gNB_config, mu, 7, 6, 2, 4);
diff --git a/openair1/SIMULATION/NR_PHY/ulschsim.c b/openair1/SIMULATION/NR_PHY/ulschsim.c
index 6f2af73a1d..a2f272500e 100644
--- a/openair1/SIMULATION/NR_PHY/ulschsim.c
+++ b/openair1/SIMULATION/NR_PHY/ulschsim.c
@@ -394,7 +394,7 @@ int main(int argc, char **argv)
 
   nr_phy_config_request_sim(gNB, N_RB_UL, N_RB_UL, mu, Nid_cell, SSB_positions);
 
-  phy_init_nr_gNB(gNB, 0, 0);
+  phy_init_nr_gNB(gNB, 0, 1); //lowmem
 
   //configure UE
   UE = malloc(sizeof(PHY_VARS_NR_UE));
diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c
index ae3e1afafc..1a8ffe3123 100644
--- a/openair1/SIMULATION/NR_PHY/ulsim.c
+++ b/openair1/SIMULATION/NR_PHY/ulsim.c
@@ -651,7 +651,7 @@ int main(int argc, char **argv)
   rrc_mac_config_req_gNB(0,0,1,pusch_tgt_snrx10,pucch_tgt_snrx10,scc,0,0,NULL);
   // UE dedicated configuration
   rrc_mac_config_req_gNB(0,0,1,pusch_tgt_snrx10,pucch_tgt_snrx10,NULL,1,secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity,secondaryCellGroup);
-  phy_init_nr_gNB(gNB,0,0);
+  phy_init_nr_gNB(gNB,0,1); //lowmem
   N_RB_DL = gNB->frame_parms.N_RB_DL;
 
 

From a3f6fe4260c526139cc8cb538cdfff2e7a756555 Mon Sep 17 00:00:00 2001
From: Raymond Knopp 
Date: Mon, 15 Mar 2021 22:45:54 +0100
Subject: [PATCH 092/579] L2 emulator seems ok now

---
 targets/RT/USER/lte-enb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c
index c6d3d2c026..31c142c8da 100644
--- a/targets/RT/USER/lte-enb.c
+++ b/targets/RT/USER/lte-enb.c
@@ -1170,7 +1170,7 @@ void init_eNB_afterRU(void) {
       LOG_I(PHY,"Mapping RX ports from %d RUs to eNB %d\n",eNB->num_RU,eNB->Mod_id);
       eNB->frame_parms.nb_antennas_rx       = 0;
       LOG_I(PHY,"eNB->num_RU:%d\n", eNB->num_RU);     
-      AssertFatal(eNB->num_RU>0,"Number of RU attached to eNB %d is      zero\n",eNB->Mod_id);
+      if (NFAPI_MODE==NFAPI_MODE_PNF) AssertFatal(eNB->num_RU>0,"Number of RU attached to eNB %d is      zero\n",eNB->Mod_id);
       for (int ru_id=0; ru_idnum_RU; ru_id++) 
          eNB->frame_parms.nb_antennas_rx    += eNB->RU_list[ru_id]->nb_rx;
       phy_init_lte_eNB(eNB,0,0);

From 85e1c34c65f213f78676cd21f8d8bf050d2f8550 Mon Sep 17 00:00:00 2001
From: Sakthivel Velumani 
Date: Mon, 15 Mar 2021 17:46:25 +0100
Subject: [PATCH 093/579] Multiple RXTX sequential threads Created separate job
 for PDSCH processing so that its exectued in the right order in rfsimulator
 mode.

---
 executables/nr-ue.c                           |  90 ++--
 executables/nr-uesoftmodem.c                  |  15 +-
 .../NR_UE_TRANSPORT/nr_transport_proto_ue.h   |   2 +
 openair1/PHY/defs_common.h                    |   1 +
 openair1/PHY/defs_nr_UE.h                     |   6 +
 openair1/SCHED_NR_UE/phy_procedures_nr_ue.c   | 473 +++++++++---------
 6 files changed, 315 insertions(+), 272 deletions(-)

diff --git a/executables/nr-ue.c b/executables/nr-ue.c
index e07c213760..cb9440e174 100644
--- a/executables/nr-ue.c
+++ b/executables/nr-ue.c
@@ -26,6 +26,7 @@
 #include "RRC/NR_UE/rrc_proto.h"
 #include "SCHED_NR_UE/phy_frame_config_nr.h"
 #include "SCHED_NR_UE/defs.h"
+#include "SCHED_NR_UE/pucch_uci_ue_nr.h"
 #include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
 #include "executables/softmodem-common.h"
 
@@ -92,6 +93,8 @@
   #define DURATION_RX_TO_TX           (6)   /* For LTE, this duration is fixed to 4 and it is linked to LTE standard for both modes FDD/TDD */
 #endif
 
+#define RX_JOB_ID 0x1010
+
 typedef enum {
   pss = 0,
   pbch = 1,
@@ -130,10 +133,7 @@ void init_nr_ue_vars(PHY_VARS_NR_UE *ue,
  * \param arg is a pointer to a \ref PHY_VARS_NR_UE structure.
  */
 
-typedef struct syncData_s {
-  UE_nr_rxtx_proc_t proc;
-  PHY_VARS_NR_UE *UE;
-} syncData_t;
+typedef nr_rxtx_thread_data_t syncData_t;
 
 static void UE_synch(void *arg) {
   syncData_t *syncD=(syncData_t *) arg;
@@ -359,7 +359,10 @@ void processSlotRX(void *arg) {
   PHY_VARS_NR_UE    *UE   = rxtxD->UE;
   fapi_nr_config_request_t *cfg = &UE->nrUE_config;
   int rx_slot_type = nr_ue_slot_select(cfg, proc->frame_rx, proc->nr_slot_rx);
+  int tx_slot_type = nr_ue_slot_select(cfg, proc->frame_tx, proc->nr_slot_tx);
   uint8_t gNB_id = 0;
+  bool check_tx_finish = true;
+  bool check_rx_finish = true;
 
   if (rx_slot_type == NR_DOWNLINK_SLOT || rx_slot_type == NR_MIXED_SLOT){
 
@@ -387,26 +390,21 @@ void processSlotRX(void *arg) {
 
     // Wait for PUSCH processing to finish
     notifiedFIFO_elt_t *res;
-    res = pullTpool(UE->txFifo,&(get_nrUE_params()->Tpool));
-    pushNotifiedFIFO_nothreadSafe(UE->txFifo, res);
-
-    if (get_softmodem_params()->usim_test==0) {
-      pucch_procedures_ue_nr(UE,
-                             gNB_id,
-                             proc,
-                             FALSE);
+    while (check_tx_finish || check_rx_finish) { // Loop through the FIFO for the current slot msg
+    // under the assumption that no two slots with same slot index of different frames are processed at the same time
+      res = pullTpool(UE->respPdsch,&(get_nrUE_params()->Tpool));
+      if (res->key == proc->nr_slot_rx) check_rx_finish = false;
+      pushNotifiedFIFO_nothreadSafe(UE->respPdsch, res);
+      res = pullTpool(UE->txFifo,&(get_nrUE_params()->Tpool));
+      if (res->key == proc->nr_slot_tx) check_tx_finish = false;
+      pushNotifiedFIFO_nothreadSafe(UE->txFifo, res);
     }
 
-    LOG_D(PHY, "Sending Uplink data \n");
-    nr_ue_pusch_common_procedures(UE,
-                                  proc->nr_slot_tx,
-                                  &UE->frame_parms,1);
-
-    ue_ta_procedures(UE, proc->nr_slot_tx, proc->frame_tx);
-
   } else {
     processSlotTX(rxtxD);
+  }
 
+  if (tx_slot_type == NR_UPLINK_SLOT || tx_slot_type == NR_MIXED_SLOT){
     if (get_softmodem_params()->usim_test==0) {
       pucch_procedures_ue_nr(UE,
                              gNB_id,
@@ -549,25 +547,32 @@ void *UE_thread(void *arg) {
   notifiedFIFO_t rxFifo;
   UE->rxFifo = &rxFifo;
   initNotifiedFIFO(&rxFifo);
-  pushNotifiedFIFO_nothreadSafe(&rxFifo, newNotifiedFIFO_elt(sizeof(nr_rxtx_thread_data_t), 1,&rxFifo,processSlotRX));
 
   notifiedFIFO_t txFifo;
   UE->txFifo = &txFifo;
   initNotifiedFIFO(&txFifo);
-  pushNotifiedFIFO_nothreadSafe(&txFifo, newNotifiedFIFO_elt(sizeof(nr_rxtx_thread_data_t), 1,&txFifo,processSlotTX));
 
-  int nbSlotProcessing=0;
+  notifiedFIFO_t respPdsch;
+  UE->respPdsch = &respPdsch;
+  initNotifiedFIFO(&respPdsch);
+
   int thread_idx=0;
   NR_UE_MAC_INST_t *mac = get_mac_inst(0);
   int timing_advance = UE->timing_advance;
 
   bool syncRunning=false;
   const int nb_slot_frame = UE->frame_parms.slots_per_frame;
-  int absolute_slot=0, decoded_frame_rx=INT_MAX, trashed_frames=0;
+  int absolute_slot=0, decoded_frame_rx=-1, trashed_frames=0;
+
+  for (int i=0; ilost_sync) {
-      abortTpool(&(get_nrUE_params()->Tpool),0);
+      abortTpool(&(get_nrUE_params()->Tpool),RX_JOB_ID);
       UE->is_synchronized = 0;
       UE->lost_sync = 0;
     }
@@ -635,18 +640,6 @@ void *UE_thread(void *arg) {
     // this is general failure in UE !!!
     thread_idx = absolute_slot % RX_NB_TH;
     int slot_nr = absolute_slot % nb_slot_frame;
-    notifiedFIFO_elt_t *msgToPush;
-    AssertFatal((msgToPush=pullTpool(&rxFifo,&(get_nrUE_params()->Tpool))) != NULL,"chained list failure");
-    nr_rxtx_thread_data_t *curMsg=(nr_rxtx_thread_data_t *)NotifiedFifoData(msgToPush);
-    curMsg->UE=UE;
-    // update thread index for received subframe
-    curMsg->proc.thread_id   = thread_idx;
-    curMsg->proc.CC_id       = UE->CC_id;
-    curMsg->proc.nr_slot_rx  = slot_nr;
-    curMsg->proc.nr_slot_tx  = (absolute_slot + DURATION_RX_TO_TX) % nb_slot_frame;
-    curMsg->proc.frame_rx    = (absolute_slot/nb_slot_frame) % MAX_FRAME_NUMBER;
-    curMsg->proc.frame_tx    = ((absolute_slot+DURATION_RX_TO_TX)/nb_slot_frame) % MAX_FRAME_NUMBER;
-    curMsg->proc.decoded_frame_rx=-1;
     //LOG_I(PHY,"Process slot %d thread Idx %d total gain %d\n", slot_nr, thread_idx, UE->rx_total_gain_dB);
 
 #ifdef OAI_ADRV9371_ZC706
@@ -702,13 +695,30 @@ void *UE_thread(void *arg) {
         LOG_E(PHY,"can't compensate: diff =%d\n", first_symbols);
     }
 
+    notifiedFIFO_elt_t *msgToPush;
+    AssertFatal((msgToPush=pullTpool(&rxFifo,&(get_nrUE_params()->Tpool))) != NULL,"chained list failure");
+    nr_rxtx_thread_data_t *curMsg=(nr_rxtx_thread_data_t *)NotifiedFifoData(msgToPush);
+    // Extract the received frame number
+    if (curMsg->proc.decoded_frame_rx != -1)
+      decoded_frame_rx=(((mac->mib->systemFrameNumber.buf[0] >> mac->mib->systemFrameNumber.bits_unused)<<4) | curMsg->proc.decoded_frame_rx);
+    else
+       decoded_frame_rx=-1;
+
+    curMsg->UE=UE;
+    // update thread index for received subframe
+    curMsg->proc.thread_id   = thread_idx;
+    curMsg->proc.CC_id       = UE->CC_id;
+    curMsg->proc.nr_slot_rx  = slot_nr;
+    curMsg->proc.nr_slot_tx  = (absolute_slot + DURATION_RX_TO_TX) % nb_slot_frame;
+    curMsg->proc.frame_rx    = (absolute_slot/nb_slot_frame) % MAX_FRAME_NUMBER;
+    curMsg->proc.frame_tx    = ((absolute_slot+DURATION_RX_TO_TX)/nb_slot_frame) % MAX_FRAME_NUMBER;
+    curMsg->proc.decoded_frame_rx=-1;
     curMsg->proc.timestamp_tx = timestamp+
                                 UE->frame_parms.get_samples_slot_timestamp(slot_nr,
                                 &UE->frame_parms,DURATION_RX_TO_TX) - firstSymSamp;
 
-    decoded_frame_rx=-1;
-
-    if (  decoded_frame_rx>0 && decoded_frame_rx != curMsg->proc.frame_rx)
+    // Check if the processed frame number is same as the received frame number;
+    if (decoded_frame_rx>0 && decoded_frame_rx != curMsg->proc.frame_rx)
       LOG_E(PHY,"Decoded frame index (%d) is not compatible with current context (%d), UE should go back to synch mode\n",
             decoded_frame_rx, curMsg->proc.frame_rx  );
 
@@ -747,8 +757,6 @@ void *UE_thread(void *arg) {
     for (int i=0; iframe_parms.nb_antennas_tx; i++)
       memset(txp[i], 0, writeBlockSize);
 
-    nbSlotProcessing++;
-    msgToPush->key=1;
     pushTpool(&(get_nrUE_params()->Tpool), msgToPush);
 
   } // while !oai_exit
diff --git a/executables/nr-uesoftmodem.c b/executables/nr-uesoftmodem.c
index 5d651344d6..d255e53981 100644
--- a/executables/nr-uesoftmodem.c
+++ b/executables/nr-uesoftmodem.c
@@ -214,9 +214,16 @@ nrUE_params_t *get_nrUE_params(void) {
 }
 /* initialie thread pools used for NRUE processing paralleliation */ 
 void init_tpools(uint8_t nun_dlsch_threads) {
-  char *params=calloc(1,(RX_NB_TH*3)+1);
-  for (int i=0; irxtxD.proc;
+  PHY_VARS_NR_UE         *ue     = param->rxtxD.UE;
+  int                     gNB_id = param->gNB_id;
+  uint8_t         dlsch_parallel = param->dlsch_parallel;
+#if UE_TIMING_TRACE
+  start_meas(&ue->generic_stat);
+#endif
+  // do procedures for C-RNTI
+  int ret_pdsch = 0;
+  if (ue->dlsch[proc->thread_id][gNB_id][0]->active == 1) {
+    //VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_IN);
+    ret_pdsch = nr_ue_pdsch_procedures(ue,
+			   proc,
+			   gNB_id,
+			   PDSCH,
+			   ue->dlsch[proc->thread_id][gNB_id][0],
+			   NULL);
+
+    nr_ue_measurement_procedures(2, ue, proc, gNB_id, proc->nr_slot_rx);
+  }
+
+  // do procedures for SI-RNTI
+  if ((ue->dlsch_SI[gNB_id]) && (ue->dlsch_SI[gNB_id]->active == 1)) {
+    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_SI, VCD_FUNCTION_IN);
+    nr_ue_pdsch_procedures(ue,
+                           proc,
+                           gNB_id,
+                           SI_PDSCH,
+                           ue->dlsch_SI[gNB_id],
+                           NULL);
+    
+    nr_ue_dlsch_procedures(ue,
+                           proc,
+                           gNB_id,
+                           SI_PDSCH,
+                           ue->dlsch_SI[gNB_id],
+                           NULL,
+                           &ue->dlsch_SI_errors[gNB_id],
+                           dlsch_parallel);
+
+    // deactivate dlsch once dlsch proc is done
+    ue->dlsch_SI[gNB_id]->active = 0;
+
+    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_SI, VCD_FUNCTION_OUT);
+  }
+
+  // do procedures for P-RNTI
+  if ((ue->dlsch_p[gNB_id]) && (ue->dlsch_p[gNB_id]->active == 1)) {
+    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_P, VCD_FUNCTION_IN);
+    nr_ue_pdsch_procedures(ue,
+                           proc,
+                           gNB_id,
+                           P_PDSCH,
+                           ue->dlsch_p[gNB_id],
+                           NULL);
+
+    nr_ue_dlsch_procedures(ue,
+                           proc,
+                           gNB_id,
+                           P_PDSCH,
+                           ue->dlsch_p[gNB_id],
+                           NULL,
+                           &ue->dlsch_p_errors[gNB_id],
+                           dlsch_parallel);
+
+    // deactivate dlsch once dlsch proc is done
+    ue->dlsch_p[gNB_id]->active = 0;
+
+    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_P, VCD_FUNCTION_OUT);
+  }
+
+  // do procedures for RA-RNTI
+  if ((ue->dlsch_ra[gNB_id]) && (ue->dlsch_ra[gNB_id]->active == 1) && (ue->UE_mode[gNB_id] != PUSCH)) {
+    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_RA, VCD_FUNCTION_IN);
+    nr_ue_pdsch_procedures(ue,
+                           proc,
+                           gNB_id,
+                           RA_PDSCH,
+                           ue->dlsch_ra[gNB_id],
+                           NULL);
+
+    nr_ue_dlsch_procedures(ue,
+                           proc,
+                           gNB_id,
+                           RA_PDSCH,
+                           ue->dlsch_ra[gNB_id],
+                           NULL,
+                           &ue->dlsch_ra_errors[gNB_id],
+                           dlsch_parallel);
+
+    // deactivate dlsch once dlsch proc is done
+    ue->dlsch_ra[gNB_id]->active = 0;
+
+    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_RA, VCD_FUNCTION_OUT);
+  }
+    
+  // do procedures for C-RNTI
+  if (ue->dlsch[proc->thread_id][gNB_id][0]->active == 1) {
+
+    LOG_D(PHY, "DLSCH data reception at proc->nr_slot_rx: %d \n \n", proc->nr_slot_rx);
+    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_IN);
+
+#if UE_TIMING_TRACE
+    start_meas(&ue->dlsch_procedures_stat[proc->thread_id]);
+#endif
+
+    if (ret_pdsch >= 0)
+      nr_ue_dlsch_procedures(ue,
+			   proc,
+			   gNB_id,
+			   PDSCH,
+			   ue->dlsch[proc->thread_id][gNB_id][0],
+			   ue->dlsch[proc->thread_id][gNB_id][1],
+			   &ue->dlsch_errors[gNB_id],
+			   dlsch_parallel);
+
+
+#if UE_TIMING_TRACE
+  stop_meas(&ue->dlsch_procedures_stat[proc->thread_id]);
+#if DISABLE_LOG_X
+  printf("[SFN %d] Slot1:       Pdsch Proc %5.2f\n",proc->nr_slot_rx,ue->pdsch_procedures_stat[proc->thread_id].p_time/(cpuf*1000.0));
+  printf("[SFN %d] Slot0 Slot1: Dlsch Proc %5.2f\n",proc->nr_slot_rx,ue->dlsch_procedures_stat[proc->thread_id].p_time/(cpuf*1000.0));
+#else
+  LOG_D(PHY, "[SFN %d] Slot1:       Pdsch Proc %5.2f\n",proc->nr_slot_rx,ue->pdsch_procedures_stat[proc->thread_id].p_time/(cpuf*1000.0));
+  LOG_D(PHY, "[SFN %d] Slot0 Slot1: Dlsch Proc %5.2f\n",proc->nr_slot_rx,ue->dlsch_procedures_stat[proc->thread_id].p_time/(cpuf*1000.0));
+#endif
+
+#endif
+
+  // deactivate dlsch once dlsch proc is done
+  ue->dlsch[proc->thread_id][gNB_id][0]->active = 0;
+
+  VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_OUT);
+
+ }
+ 
+#if UE_TIMING_TRACE
+start_meas(&ue->generic_stat);
+#endif
+
+#if 0
+
+  if(proc->nr_slot_rx==5 &&  ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[ue->dlsch[proc->thread_id][gNB_id][0]->current_harq_pid]->nb_rb > 20){
+       //write_output("decoder_llr.m","decllr",dlsch_llr,G,1,0);
+       //write_output("llr.m","llr",  &ue->pdsch_vars[proc->thread_id][gNB_id]->llr[0][0],(14*nb_rb*12*dlsch1_harq->Qm) - 4*(nb_rb*4*dlsch1_harq->Qm),1,0);
+
+       write_output("rxdataF0_current.m"    , "rxdataF0", &ue->common_vars.common_vars_rx_data_per_thread[proc->thread_id].rxdataF[0][0],14*fp->ofdm_symbol_size,1,1);
+       //write_output("rxdataF0_previous.m"    , "rxdataF0_prev_sss", &ue->common_vars.common_vars_rx_data_per_thread[next_thread_id].rxdataF[0][0],14*fp->ofdm_symbol_size,1,1);
+
+       //write_output("rxdataF0_previous.m"    , "rxdataF0_prev", &ue->common_vars.common_vars_rx_data_per_thread[next_thread_id].rxdataF[0][0],14*fp->ofdm_symbol_size,1,1);
+
+       write_output("dl_ch_estimates.m", "dl_ch_estimates_sfn5", &ue->common_vars.common_vars_rx_data_per_thread[proc->thread_id].dl_ch_estimates[0][0][0],14*fp->ofdm_symbol_size,1,1);
+       write_output("dl_ch_estimates_ext.m", "dl_ch_estimatesExt_sfn5", &ue->pdsch_vars[proc->thread_id][gNB_id]->dl_ch_estimates_ext[0][0],14*fp->N_RB_DL*12,1,1);
+       write_output("rxdataF_comp00.m","rxdataF_comp00",         &ue->pdsch_vars[proc->thread_id][gNB_id]->rxdataF_comp0[0][0],14*fp->N_RB_DL*12,1,1);
+       //write_output("magDLFirst.m", "magDLFirst", &phy_vars_ue->pdsch_vars[proc->thread_id][gNB_id]->dl_ch_mag0[0][0],14*fp->N_RB_DL*12,1,1);
+       //write_output("magDLSecond.m", "magDLSecond", &phy_vars_ue->pdsch_vars[proc->thread_id][gNB_id]->dl_ch_magb0[0][0],14*fp->N_RB_DL*12,1,1);
+
+       AssertFatal (0,"");
+  }
+#endif
+
+  // duplicate harq structure
+/*
+  uint8_t          current_harq_pid        = ue->dlsch[proc->thread_id][gNB_id][0]->current_harq_pid;
+  NR_DL_UE_HARQ_t *current_harq_processes = ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[current_harq_pid];
+  NR_DL_UE_HARQ_t *harq_processes_dest    = ue->dlsch[next1_thread_id][gNB_id][0]->harq_processes[current_harq_pid];
+  NR_DL_UE_HARQ_t *harq_processes_dest1    = ue->dlsch[next2_thread_id][gNB_id][0]->harq_processes[current_harq_pid];
+  */
+  /*nr_harq_status_t *current_harq_ack = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_ack[proc->nr_slot_rx];
+  nr_harq_status_t *harq_ack_dest    = &ue->dlsch[next1_thread_id][gNB_id][0]->harq_ack[proc->nr_slot_rx];
+  nr_harq_status_t *harq_ack_dest1    = &ue->dlsch[next2_thread_id][gNB_id][0]->harq_ack[proc->nr_slot_rx];
+*/
+
+  //copy_harq_proc_struct(harq_processes_dest, current_harq_processes);
+//copy_ack_struct(harq_ack_dest, current_harq_ack);
+
+//copy_harq_proc_struct(harq_processes_dest1, current_harq_processes);
+//copy_ack_struct(harq_ack_dest1, current_harq_ack);
+
+  if (proc->nr_slot_rx==9) {
+    if (proc->frame_rx % 10 == 0) {
+      if ((ue->dlsch_received[gNB_id] - ue->dlsch_received_last[gNB_id]) != 0)
+        ue->dlsch_fer[gNB_id] = (100*(ue->dlsch_errors[gNB_id] - ue->dlsch_errors_last[gNB_id]))/(ue->dlsch_received[gNB_id] - ue->dlsch_received_last[gNB_id]);
+
+      ue->dlsch_errors_last[gNB_id] = ue->dlsch_errors[gNB_id];
+      ue->dlsch_received_last[gNB_id] = ue->dlsch_received[gNB_id];
+    }
+
+
+    ue->bitrate[gNB_id] = (ue->total_TBS[gNB_id] - ue->total_TBS_last[gNB_id])*100;
+    ue->total_TBS_last[gNB_id] = ue->total_TBS[gNB_id];
+    LOG_D(PHY,"[UE %d] Calculating bitrate Frame %d: total_TBS = %d, total_TBS_last = %d, bitrate %f kbits\n",
+    ue->Mod_id,proc->frame_rx,ue->total_TBS[gNB_id],
+    ue->total_TBS_last[gNB_id],(float) ue->bitrate[gNB_id]/1000.0);
+
+#if UE_AUTOTEST_TRACE
+    if ((proc->frame_rx % 100 == 0)) {
+      LOG_I(PHY,"[UE  %d] AUTOTEST Metric : UE_DLSCH_BITRATE = %5.2f kbps (frame = %d) \n", ue->Mod_id, (float) ue->bitrate[gNB_id]/1000.0, proc->frame_rx);
+    }
+#endif
+
+   }
+
+#if UE_TIMING_TRACE
+  stop_meas(&ue->generic_stat);
+  printf("after tubo until end of Rx %5.2f \n",ue->generic_stat.p_time/(cpuf*1000.0));
+#endif
+
+#ifdef EMOS
+  phy_procedures_emos_UE_RX(ue,slot,gNB_id);
+#endif
+
+
+  VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX, VCD_FUNCTION_OUT);
+
+#if UE_TIMING_TRACE
+  stop_meas(&ue->phy_proc_rx[proc->thread_id]);
+#if DISABLE_LOG_X
+  printf("------FULL RX PROC [SFN %d]: %5.2f ------\n",proc->nr_slot_rx,ue->phy_proc_rx[proc->thread_id].p_time/(cpuf*1000.0));
+#else
+  LOG_D(PHY, "------FULL RX PROC [SFN %d]: %5.2f ------\n",proc->nr_slot_rx,ue->phy_proc_rx[proc->thread_id].p_time/(cpuf*1000.0));
+#endif
+#endif
+
+  //#endif //pdsch
+
+  LOG_D(PHY," ****** end RX-Chain  for AbsSubframe %d.%d ******  \n", proc->frame_rx%1024, proc->nr_slot_rx);
+
+}
 
 int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
                            UE_nr_rxtx_proc_t *proc,
                            uint8_t gNB_id,
                            uint8_t dlsch_parallel
                            )
-{                                         
+{
   int frame_rx = proc->frame_rx;
   int nr_slot_rx = proc->nr_slot_rx;
   int slot_pbch;
@@ -1855,239 +2087,26 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
 
 #endif //NR_PDCCH_SCHED
   
-  // Start PUSCH processing here. It runs in parallel with PDSCH processing
   notifiedFIFO_elt_t *res;
+  // Start PDSCH processing
+  res = pullTpool(ue->respPdsch,&(get_nrUE_params()->Tpool));
+  pdsch_rx_thread_data_t *curMsgRx=(pdsch_rx_thread_data_t *)NotifiedFifoData(res);
+  curMsgRx->rxtxD.proc = *proc;
+  curMsgRx->rxtxD.UE = ue;
+  curMsgRx->gNB_id = gNB_id;
+  curMsgRx->dlsch_parallel = dlsch_parallel;
+  res->key = proc->nr_slot_rx;
+  pushTpool(&(get_nrUE_params()->Tpool), res);
+
+  // Start PUSCH processing
   res = pullTpool(ue->txFifo,&(get_nrUE_params()->Tpool));
   nr_rxtx_thread_data_t *curMsg=(nr_rxtx_thread_data_t *)NotifiedFifoData(res);
   curMsg->proc = *proc;
   curMsg->UE = ue;
-  res->key = 1;
+  res->key = proc->nr_slot_tx;
   pushTpool(&(get_nrUE_params()->Tpool), res);
 
-#if UE_TIMING_TRACE
-  start_meas(&ue->generic_stat);
-#endif
-  // do procedures for C-RNTI
-  int ret_pdsch = 0;
-  if (ue->dlsch[proc->thread_id][gNB_id][0]->active == 1) {
-    //VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_IN);
-    ret_pdsch = nr_ue_pdsch_procedures(ue,
-			   proc,
-			   gNB_id,
-			   PDSCH,
-			   ue->dlsch[proc->thread_id][gNB_id][0],
-			   NULL);
-
-    nr_ue_measurement_procedures(2, ue, proc, gNB_id, nr_slot_rx);
-  }
-
-  // do procedures for SI-RNTI
-  if ((ue->dlsch_SI[gNB_id]) && (ue->dlsch_SI[gNB_id]->active == 1)) {
-    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_SI, VCD_FUNCTION_IN);
-    nr_ue_pdsch_procedures(ue,
-                           proc,
-                           gNB_id,
-                           SI_PDSCH,
-                           ue->dlsch_SI[gNB_id],
-                           NULL);
-    
-    nr_ue_dlsch_procedures(ue,
-                           proc,
-                           gNB_id,
-                           SI_PDSCH,
-                           ue->dlsch_SI[gNB_id],
-                           NULL,
-                           &ue->dlsch_SI_errors[gNB_id],
-                           dlsch_parallel);
-
-    // deactivate dlsch once dlsch proc is done
-    ue->dlsch_SI[gNB_id]->active = 0;
-
-    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_SI, VCD_FUNCTION_OUT);
-  }
-
-  // do procedures for P-RNTI
-  if ((ue->dlsch_p[gNB_id]) && (ue->dlsch_p[gNB_id]->active == 1)) {
-    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_P, VCD_FUNCTION_IN);
-    nr_ue_pdsch_procedures(ue,
-                           proc,
-                           gNB_id,
-                           P_PDSCH,
-                           ue->dlsch_p[gNB_id],
-                           NULL);
-
-    nr_ue_dlsch_procedures(ue,
-                           proc,
-                           gNB_id,
-                           P_PDSCH,
-                           ue->dlsch_p[gNB_id],
-                           NULL,
-                           &ue->dlsch_p_errors[gNB_id],
-                           dlsch_parallel);
-
-    // deactivate dlsch once dlsch proc is done
-    ue->dlsch_p[gNB_id]->active = 0;
-
-    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_P, VCD_FUNCTION_OUT);
-  }
-
-  // do procedures for RA-RNTI
-  if ((ue->dlsch_ra[gNB_id]) && (ue->dlsch_ra[gNB_id]->active == 1) && (ue->UE_mode[gNB_id] != PUSCH)) {
-    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_RA, VCD_FUNCTION_IN);
-    nr_ue_pdsch_procedures(ue,
-                           proc,
-                           gNB_id,
-                           RA_PDSCH,
-                           ue->dlsch_ra[gNB_id],
-                           NULL);
-
-    nr_ue_dlsch_procedures(ue,
-                           proc,
-                           gNB_id,
-                           RA_PDSCH,
-                           ue->dlsch_ra[gNB_id],
-                           NULL,
-                           &ue->dlsch_ra_errors[gNB_id],
-                           dlsch_parallel);
-
-    // deactivate dlsch once dlsch proc is done
-    ue->dlsch_ra[gNB_id]->active = 0;
-
-    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_RA, VCD_FUNCTION_OUT);
-  }
-    
-  // do procedures for C-RNTI
-  if (ue->dlsch[proc->thread_id][gNB_id][0]->active == 1) {
-
-    LOG_D(PHY, "DLSCH data reception at nr_slot_rx: %d \n \n", nr_slot_rx);
-    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_IN);
-
-#if UE_TIMING_TRACE
-    start_meas(&ue->dlsch_procedures_stat[proc->thread_id]);
-#endif
-
-    if (ret_pdsch >= 0)
-      nr_ue_dlsch_procedures(ue,
-			   proc,
-			   gNB_id,
-			   PDSCH,
-			   ue->dlsch[proc->thread_id][gNB_id][0],
-			   ue->dlsch[proc->thread_id][gNB_id][1],
-			   &ue->dlsch_errors[gNB_id],
-			   dlsch_parallel);
-
-
-#if UE_TIMING_TRACE
-  stop_meas(&ue->dlsch_procedures_stat[proc->thread_id]);
-#if DISABLE_LOG_X
-  printf("[SFN %d] Slot1:       Pdsch Proc %5.2f\n",nr_slot_rx,ue->pdsch_procedures_stat[proc->thread_id].p_time/(cpuf*1000.0));
-  printf("[SFN %d] Slot0 Slot1: Dlsch Proc %5.2f\n",nr_slot_rx,ue->dlsch_procedures_stat[proc->thread_id].p_time/(cpuf*1000.0));
-#else
-  LOG_D(PHY, "[SFN %d] Slot1:       Pdsch Proc %5.2f\n",nr_slot_rx,ue->pdsch_procedures_stat[proc->thread_id].p_time/(cpuf*1000.0));
-  LOG_D(PHY, "[SFN %d] Slot0 Slot1: Dlsch Proc %5.2f\n",nr_slot_rx,ue->dlsch_procedures_stat[proc->thread_id].p_time/(cpuf*1000.0));
-#endif
-
-#endif
-
-  // deactivate dlsch once dlsch proc is done
-  ue->dlsch[proc->thread_id][gNB_id][0]->active = 0;
-
-  VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_OUT);
-
- }
- 
-#if UE_TIMING_TRACE
-start_meas(&ue->generic_stat);
-#endif
-
-#if 0
-
-  if(nr_slot_rx==5 &&  ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[ue->dlsch[proc->thread_id][gNB_id][0]->current_harq_pid]->nb_rb > 20){
-       //write_output("decoder_llr.m","decllr",dlsch_llr,G,1,0);
-       //write_output("llr.m","llr",  &ue->pdsch_vars[proc->thread_id][gNB_id]->llr[0][0],(14*nb_rb*12*dlsch1_harq->Qm) - 4*(nb_rb*4*dlsch1_harq->Qm),1,0);
-
-       write_output("rxdataF0_current.m"    , "rxdataF0", &ue->common_vars.common_vars_rx_data_per_thread[proc->thread_id].rxdataF[0][0],14*fp->ofdm_symbol_size,1,1);
-       //write_output("rxdataF0_previous.m"    , "rxdataF0_prev_sss", &ue->common_vars.common_vars_rx_data_per_thread[next_thread_id].rxdataF[0][0],14*fp->ofdm_symbol_size,1,1);
-
-       //write_output("rxdataF0_previous.m"    , "rxdataF0_prev", &ue->common_vars.common_vars_rx_data_per_thread[next_thread_id].rxdataF[0][0],14*fp->ofdm_symbol_size,1,1);
-
-       write_output("dl_ch_estimates.m", "dl_ch_estimates_sfn5", &ue->common_vars.common_vars_rx_data_per_thread[proc->thread_id].dl_ch_estimates[0][0][0],14*fp->ofdm_symbol_size,1,1);
-       write_output("dl_ch_estimates_ext.m", "dl_ch_estimatesExt_sfn5", &ue->pdsch_vars[proc->thread_id][gNB_id]->dl_ch_estimates_ext[0][0],14*fp->N_RB_DL*12,1,1);
-       write_output("rxdataF_comp00.m","rxdataF_comp00",         &ue->pdsch_vars[proc->thread_id][gNB_id]->rxdataF_comp0[0][0],14*fp->N_RB_DL*12,1,1);
-       //write_output("magDLFirst.m", "magDLFirst", &phy_vars_ue->pdsch_vars[proc->thread_id][gNB_id]->dl_ch_mag0[0][0],14*fp->N_RB_DL*12,1,1);
-       //write_output("magDLSecond.m", "magDLSecond", &phy_vars_ue->pdsch_vars[proc->thread_id][gNB_id]->dl_ch_magb0[0][0],14*fp->N_RB_DL*12,1,1);
-
-       AssertFatal (0,"");
-  }
-#endif
-
-  // duplicate harq structure
-/*
-  uint8_t          current_harq_pid        = ue->dlsch[proc->thread_id][gNB_id][0]->current_harq_pid;
-  NR_DL_UE_HARQ_t *current_harq_processes = ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[current_harq_pid];
-  NR_DL_UE_HARQ_t *harq_processes_dest    = ue->dlsch[next1_thread_id][gNB_id][0]->harq_processes[current_harq_pid];
-  NR_DL_UE_HARQ_t *harq_processes_dest1    = ue->dlsch[next2_thread_id][gNB_id][0]->harq_processes[current_harq_pid];
-  */
-  /*nr_harq_status_t *current_harq_ack = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_ack[nr_slot_rx];
-  nr_harq_status_t *harq_ack_dest    = &ue->dlsch[next1_thread_id][gNB_id][0]->harq_ack[nr_slot_rx];
-  nr_harq_status_t *harq_ack_dest1    = &ue->dlsch[next2_thread_id][gNB_id][0]->harq_ack[nr_slot_rx];
-*/
-
-  //copy_harq_proc_struct(harq_processes_dest, current_harq_processes);
-//copy_ack_struct(harq_ack_dest, current_harq_ack);
-
-//copy_harq_proc_struct(harq_processes_dest1, current_harq_processes);
-//copy_ack_struct(harq_ack_dest1, current_harq_ack);
-
-if (nr_slot_rx==9) {
-  if (frame_rx % 10 == 0) {
-    if ((ue->dlsch_received[gNB_id] - ue->dlsch_received_last[gNB_id]) != 0)
-      ue->dlsch_fer[gNB_id] = (100*(ue->dlsch_errors[gNB_id] - ue->dlsch_errors_last[gNB_id]))/(ue->dlsch_received[gNB_id] - ue->dlsch_received_last[gNB_id]);
-
-    ue->dlsch_errors_last[gNB_id] = ue->dlsch_errors[gNB_id];
-    ue->dlsch_received_last[gNB_id] = ue->dlsch_received[gNB_id];
-  }
-
-
-  ue->bitrate[gNB_id] = (ue->total_TBS[gNB_id] - ue->total_TBS_last[gNB_id])*100;
-  ue->total_TBS_last[gNB_id] = ue->total_TBS[gNB_id];
-  LOG_D(PHY,"[UE %d] Calculating bitrate Frame %d: total_TBS = %d, total_TBS_last = %d, bitrate %f kbits\n",
-	ue->Mod_id,frame_rx,ue->total_TBS[gNB_id],
-	ue->total_TBS_last[gNB_id],(float) ue->bitrate[gNB_id]/1000.0);
-
-#if UE_AUTOTEST_TRACE
-  if ((frame_rx % 100 == 0)) {
-    LOG_I(PHY,"[UE  %d] AUTOTEST Metric : UE_DLSCH_BITRATE = %5.2f kbps (frame = %d) \n", ue->Mod_id, (float) ue->bitrate[gNB_id]/1000.0, frame_rx);
-  }
-#endif
-
- }
-
-#if UE_TIMING_TRACE
-stop_meas(&ue->generic_stat);
-printf("after tubo until end of Rx %5.2f \n",ue->generic_stat.p_time/(cpuf*1000.0));
-#endif
-
-#ifdef EMOS
-phy_procedures_emos_UE_RX(ue,slot,gNB_id);
-#endif
-
-
-VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX, VCD_FUNCTION_OUT);
-
-#if UE_TIMING_TRACE
-stop_meas(&ue->phy_proc_rx[proc->thread_id]);
-#if DISABLE_LOG_X
-printf("------FULL RX PROC [SFN %d]: %5.2f ------\n",nr_slot_rx,ue->phy_proc_rx[proc->thread_id].p_time/(cpuf*1000.0));
-#else
-LOG_D(PHY, "------FULL RX PROC [SFN %d]: %5.2f ------\n",nr_slot_rx,ue->phy_proc_rx[proc->thread_id].p_time/(cpuf*1000.0));
-#endif
-#endif
-
-//#endif //pdsch
-
-LOG_D(PHY," ****** end RX-Chain  for AbsSubframe %d.%d ******  \n", frame_rx%1024, nr_slot_rx);
-return (0);
+  return (0);
 }
 
 

From 0280c08391987ca079939da2037c3ffc536324ca Mon Sep 17 00:00:00 2001
From: Sakthivel Velumani 
Date: Tue, 16 Mar 2021 12:43:43 +0100
Subject: [PATCH 094/579] Threadsafe FIFOs 1. Changed FIFO types to threadsafe
 to ensure order of execution 2. Changed RB_NB_TH to 1 because PUCCH have some
 issues when running 2 slots in parallel (race). Dont know exactly where it
 happens.

---
 executables/nr-ue.c                       | 10 +++++-----
 openair1/PHY/defs_common.h                |  4 ++--
 openair1/SCHED_NR/phy_procedures_nr_gNB.c |  2 +-
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/executables/nr-ue.c b/executables/nr-ue.c
index cb9440e174..c0b0af0618 100644
--- a/executables/nr-ue.c
+++ b/executables/nr-ue.c
@@ -394,10 +394,10 @@ void processSlotRX(void *arg) {
     // under the assumption that no two slots with same slot index of different frames are processed at the same time
       res = pullTpool(UE->respPdsch,&(get_nrUE_params()->Tpool));
       if (res->key == proc->nr_slot_rx) check_rx_finish = false;
-      pushNotifiedFIFO_nothreadSafe(UE->respPdsch, res);
+      pushNotifiedFIFO(UE->respPdsch, res);
       res = pullTpool(UE->txFifo,&(get_nrUE_params()->Tpool));
       if (res->key == proc->nr_slot_tx) check_tx_finish = false;
-      pushNotifiedFIFO_nothreadSafe(UE->txFifo, res);
+      pushNotifiedFIFO(UE->txFifo, res);
     }
 
   } else {
@@ -565,9 +565,9 @@ void *UE_thread(void *arg) {
   int absolute_slot=0, decoded_frame_rx=-1, trashed_frames=0;
 
   for (int i=0; istart_symbol_index*gNB->frame_parms.ofdm_symbol_size + (gNB->frame_parms.first_carrier_offset+pucch_pdu->prb_start*12);
           power_rxF = signal_energy_nodc(&gNB->common_vars.rxdataF[0][offset],12);
-          LOG_I(PHY,"frame %d, slot %d: PUCCH signal energy %d\n",frame_rx,slot_rx,power_rxF);
+          LOG_D(PHY,"frame %d, slot %d: PUCCH signal energy %d\n",frame_rx,slot_rx,power_rxF);
 
           nr_decode_pucch0(gNB,
 	                   slot_rx,

From 0bbaa0db2bcd7ae7f94f14d52c1b77fd384685a8 Mon Sep 17 00:00:00 2001
From: Sakthivel Velumani 
Date: Tue, 16 Mar 2021 13:16:54 +0100
Subject: [PATCH 095/579] Revert "Threadsafe FIFOs"

This reverts commit 0280c08391987ca079939da2037c3ffc536324ca.
---
 executables/nr-ue.c                       | 10 +++++-----
 openair1/PHY/defs_common.h                |  4 ++--
 openair1/SCHED_NR/phy_procedures_nr_gNB.c |  2 +-
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/executables/nr-ue.c b/executables/nr-ue.c
index c0b0af0618..cb9440e174 100644
--- a/executables/nr-ue.c
+++ b/executables/nr-ue.c
@@ -394,10 +394,10 @@ void processSlotRX(void *arg) {
     // under the assumption that no two slots with same slot index of different frames are processed at the same time
       res = pullTpool(UE->respPdsch,&(get_nrUE_params()->Tpool));
       if (res->key == proc->nr_slot_rx) check_rx_finish = false;
-      pushNotifiedFIFO(UE->respPdsch, res);
+      pushNotifiedFIFO_nothreadSafe(UE->respPdsch, res);
       res = pullTpool(UE->txFifo,&(get_nrUE_params()->Tpool));
       if (res->key == proc->nr_slot_tx) check_tx_finish = false;
-      pushNotifiedFIFO(UE->txFifo, res);
+      pushNotifiedFIFO_nothreadSafe(UE->txFifo, res);
     }
 
   } else {
@@ -565,9 +565,9 @@ void *UE_thread(void *arg) {
   int absolute_slot=0, decoded_frame_rx=-1, trashed_frames=0;
 
   for (int i=0; istart_symbol_index*gNB->frame_parms.ofdm_symbol_size + (gNB->frame_parms.first_carrier_offset+pucch_pdu->prb_start*12);
           power_rxF = signal_energy_nodc(&gNB->common_vars.rxdataF[0][offset],12);
-          LOG_D(PHY,"frame %d, slot %d: PUCCH signal energy %d\n",frame_rx,slot_rx,power_rxF);
+          LOG_I(PHY,"frame %d, slot %d: PUCCH signal energy %d\n",frame_rx,slot_rx,power_rxF);
 
           nr_decode_pucch0(gNB,
 	                   slot_rx,

From 33afbc9eee551d1b8f802ae36d0828fdf5bf31cf Mon Sep 17 00:00:00 2001
From: Sakthivel Velumani 
Date: Tue, 16 Mar 2021 13:17:10 +0100
Subject: [PATCH 096/579] Revert "Multiple RXTX sequential threads"

This reverts commit 85e1c34c65f213f78676cd21f8d8bf050d2f8550.
---
 executables/nr-ue.c                           |  90 ++--
 executables/nr-uesoftmodem.c                  |  15 +-
 .../NR_UE_TRANSPORT/nr_transport_proto_ue.h   |   2 -
 openair1/PHY/defs_common.h                    |   1 -
 openair1/PHY/defs_nr_UE.h                     |   6 -
 openair1/SCHED_NR_UE/phy_procedures_nr_ue.c   | 473 +++++++++---------
 6 files changed, 272 insertions(+), 315 deletions(-)

diff --git a/executables/nr-ue.c b/executables/nr-ue.c
index cb9440e174..e07c213760 100644
--- a/executables/nr-ue.c
+++ b/executables/nr-ue.c
@@ -26,7 +26,6 @@
 #include "RRC/NR_UE/rrc_proto.h"
 #include "SCHED_NR_UE/phy_frame_config_nr.h"
 #include "SCHED_NR_UE/defs.h"
-#include "SCHED_NR_UE/pucch_uci_ue_nr.h"
 #include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
 #include "executables/softmodem-common.h"
 
@@ -93,8 +92,6 @@
   #define DURATION_RX_TO_TX           (6)   /* For LTE, this duration is fixed to 4 and it is linked to LTE standard for both modes FDD/TDD */
 #endif
 
-#define RX_JOB_ID 0x1010
-
 typedef enum {
   pss = 0,
   pbch = 1,
@@ -133,7 +130,10 @@ void init_nr_ue_vars(PHY_VARS_NR_UE *ue,
  * \param arg is a pointer to a \ref PHY_VARS_NR_UE structure.
  */
 
-typedef nr_rxtx_thread_data_t syncData_t;
+typedef struct syncData_s {
+  UE_nr_rxtx_proc_t proc;
+  PHY_VARS_NR_UE *UE;
+} syncData_t;
 
 static void UE_synch(void *arg) {
   syncData_t *syncD=(syncData_t *) arg;
@@ -359,10 +359,7 @@ void processSlotRX(void *arg) {
   PHY_VARS_NR_UE    *UE   = rxtxD->UE;
   fapi_nr_config_request_t *cfg = &UE->nrUE_config;
   int rx_slot_type = nr_ue_slot_select(cfg, proc->frame_rx, proc->nr_slot_rx);
-  int tx_slot_type = nr_ue_slot_select(cfg, proc->frame_tx, proc->nr_slot_tx);
   uint8_t gNB_id = 0;
-  bool check_tx_finish = true;
-  bool check_rx_finish = true;
 
   if (rx_slot_type == NR_DOWNLINK_SLOT || rx_slot_type == NR_MIXED_SLOT){
 
@@ -390,21 +387,26 @@ void processSlotRX(void *arg) {
 
     // Wait for PUSCH processing to finish
     notifiedFIFO_elt_t *res;
-    while (check_tx_finish || check_rx_finish) { // Loop through the FIFO for the current slot msg
-    // under the assumption that no two slots with same slot index of different frames are processed at the same time
-      res = pullTpool(UE->respPdsch,&(get_nrUE_params()->Tpool));
-      if (res->key == proc->nr_slot_rx) check_rx_finish = false;
-      pushNotifiedFIFO_nothreadSafe(UE->respPdsch, res);
-      res = pullTpool(UE->txFifo,&(get_nrUE_params()->Tpool));
-      if (res->key == proc->nr_slot_tx) check_tx_finish = false;
-      pushNotifiedFIFO_nothreadSafe(UE->txFifo, res);
+    res = pullTpool(UE->txFifo,&(get_nrUE_params()->Tpool));
+    pushNotifiedFIFO_nothreadSafe(UE->txFifo, res);
+
+    if (get_softmodem_params()->usim_test==0) {
+      pucch_procedures_ue_nr(UE,
+                             gNB_id,
+                             proc,
+                             FALSE);
     }
 
+    LOG_D(PHY, "Sending Uplink data \n");
+    nr_ue_pusch_common_procedures(UE,
+                                  proc->nr_slot_tx,
+                                  &UE->frame_parms,1);
+
+    ue_ta_procedures(UE, proc->nr_slot_tx, proc->frame_tx);
+
   } else {
     processSlotTX(rxtxD);
-  }
 
-  if (tx_slot_type == NR_UPLINK_SLOT || tx_slot_type == NR_MIXED_SLOT){
     if (get_softmodem_params()->usim_test==0) {
       pucch_procedures_ue_nr(UE,
                              gNB_id,
@@ -547,32 +549,25 @@ void *UE_thread(void *arg) {
   notifiedFIFO_t rxFifo;
   UE->rxFifo = &rxFifo;
   initNotifiedFIFO(&rxFifo);
+  pushNotifiedFIFO_nothreadSafe(&rxFifo, newNotifiedFIFO_elt(sizeof(nr_rxtx_thread_data_t), 1,&rxFifo,processSlotRX));
 
   notifiedFIFO_t txFifo;
   UE->txFifo = &txFifo;
   initNotifiedFIFO(&txFifo);
+  pushNotifiedFIFO_nothreadSafe(&txFifo, newNotifiedFIFO_elt(sizeof(nr_rxtx_thread_data_t), 1,&txFifo,processSlotTX));
 
-  notifiedFIFO_t respPdsch;
-  UE->respPdsch = &respPdsch;
-  initNotifiedFIFO(&respPdsch);
-
+  int nbSlotProcessing=0;
   int thread_idx=0;
   NR_UE_MAC_INST_t *mac = get_mac_inst(0);
   int timing_advance = UE->timing_advance;
 
   bool syncRunning=false;
   const int nb_slot_frame = UE->frame_parms.slots_per_frame;
-  int absolute_slot=0, decoded_frame_rx=-1, trashed_frames=0;
-
-  for (int i=0; ilost_sync) {
-      abortTpool(&(get_nrUE_params()->Tpool),RX_JOB_ID);
+      abortTpool(&(get_nrUE_params()->Tpool),0);
       UE->is_synchronized = 0;
       UE->lost_sync = 0;
     }
@@ -640,6 +635,18 @@ void *UE_thread(void *arg) {
     // this is general failure in UE !!!
     thread_idx = absolute_slot % RX_NB_TH;
     int slot_nr = absolute_slot % nb_slot_frame;
+    notifiedFIFO_elt_t *msgToPush;
+    AssertFatal((msgToPush=pullTpool(&rxFifo,&(get_nrUE_params()->Tpool))) != NULL,"chained list failure");
+    nr_rxtx_thread_data_t *curMsg=(nr_rxtx_thread_data_t *)NotifiedFifoData(msgToPush);
+    curMsg->UE=UE;
+    // update thread index for received subframe
+    curMsg->proc.thread_id   = thread_idx;
+    curMsg->proc.CC_id       = UE->CC_id;
+    curMsg->proc.nr_slot_rx  = slot_nr;
+    curMsg->proc.nr_slot_tx  = (absolute_slot + DURATION_RX_TO_TX) % nb_slot_frame;
+    curMsg->proc.frame_rx    = (absolute_slot/nb_slot_frame) % MAX_FRAME_NUMBER;
+    curMsg->proc.frame_tx    = ((absolute_slot+DURATION_RX_TO_TX)/nb_slot_frame) % MAX_FRAME_NUMBER;
+    curMsg->proc.decoded_frame_rx=-1;
     //LOG_I(PHY,"Process slot %d thread Idx %d total gain %d\n", slot_nr, thread_idx, UE->rx_total_gain_dB);
 
 #ifdef OAI_ADRV9371_ZC706
@@ -695,30 +702,13 @@ void *UE_thread(void *arg) {
         LOG_E(PHY,"can't compensate: diff =%d\n", first_symbols);
     }
 
-    notifiedFIFO_elt_t *msgToPush;
-    AssertFatal((msgToPush=pullTpool(&rxFifo,&(get_nrUE_params()->Tpool))) != NULL,"chained list failure");
-    nr_rxtx_thread_data_t *curMsg=(nr_rxtx_thread_data_t *)NotifiedFifoData(msgToPush);
-    // Extract the received frame number
-    if (curMsg->proc.decoded_frame_rx != -1)
-      decoded_frame_rx=(((mac->mib->systemFrameNumber.buf[0] >> mac->mib->systemFrameNumber.bits_unused)<<4) | curMsg->proc.decoded_frame_rx);
-    else
-       decoded_frame_rx=-1;
-
-    curMsg->UE=UE;
-    // update thread index for received subframe
-    curMsg->proc.thread_id   = thread_idx;
-    curMsg->proc.CC_id       = UE->CC_id;
-    curMsg->proc.nr_slot_rx  = slot_nr;
-    curMsg->proc.nr_slot_tx  = (absolute_slot + DURATION_RX_TO_TX) % nb_slot_frame;
-    curMsg->proc.frame_rx    = (absolute_slot/nb_slot_frame) % MAX_FRAME_NUMBER;
-    curMsg->proc.frame_tx    = ((absolute_slot+DURATION_RX_TO_TX)/nb_slot_frame) % MAX_FRAME_NUMBER;
-    curMsg->proc.decoded_frame_rx=-1;
     curMsg->proc.timestamp_tx = timestamp+
                                 UE->frame_parms.get_samples_slot_timestamp(slot_nr,
                                 &UE->frame_parms,DURATION_RX_TO_TX) - firstSymSamp;
 
-    // Check if the processed frame number is same as the received frame number;
-    if (decoded_frame_rx>0 && decoded_frame_rx != curMsg->proc.frame_rx)
+    decoded_frame_rx=-1;
+
+    if (  decoded_frame_rx>0 && decoded_frame_rx != curMsg->proc.frame_rx)
       LOG_E(PHY,"Decoded frame index (%d) is not compatible with current context (%d), UE should go back to synch mode\n",
             decoded_frame_rx, curMsg->proc.frame_rx  );
 
@@ -757,6 +747,8 @@ void *UE_thread(void *arg) {
     for (int i=0; iframe_parms.nb_antennas_tx; i++)
       memset(txp[i], 0, writeBlockSize);
 
+    nbSlotProcessing++;
+    msgToPush->key=1;
     pushTpool(&(get_nrUE_params()->Tpool), msgToPush);
 
   } // while !oai_exit
diff --git a/executables/nr-uesoftmodem.c b/executables/nr-uesoftmodem.c
index d255e53981..5d651344d6 100644
--- a/executables/nr-uesoftmodem.c
+++ b/executables/nr-uesoftmodem.c
@@ -214,16 +214,9 @@ nrUE_params_t *get_nrUE_params(void) {
 }
 /* initialie thread pools used for NRUE processing paralleliation */ 
 void init_tpools(uint8_t nun_dlsch_threads) {
-  char *params = NULL;
-  if (IS_SOFTMODEM_RFSIM) {
-    params = calloc(1,2);
-    memcpy(params,"N",1);
-  }
-  else {
-    params = calloc(1,(RX_NB_TH*RX_NB_TH_PL*3)+1);
-    for (int i=0; irxtxD.proc;
-  PHY_VARS_NR_UE         *ue     = param->rxtxD.UE;
-  int                     gNB_id = param->gNB_id;
-  uint8_t         dlsch_parallel = param->dlsch_parallel;
-#if UE_TIMING_TRACE
-  start_meas(&ue->generic_stat);
-#endif
-  // do procedures for C-RNTI
-  int ret_pdsch = 0;
-  if (ue->dlsch[proc->thread_id][gNB_id][0]->active == 1) {
-    //VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_IN);
-    ret_pdsch = nr_ue_pdsch_procedures(ue,
-			   proc,
-			   gNB_id,
-			   PDSCH,
-			   ue->dlsch[proc->thread_id][gNB_id][0],
-			   NULL);
-
-    nr_ue_measurement_procedures(2, ue, proc, gNB_id, proc->nr_slot_rx);
-  }
-
-  // do procedures for SI-RNTI
-  if ((ue->dlsch_SI[gNB_id]) && (ue->dlsch_SI[gNB_id]->active == 1)) {
-    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_SI, VCD_FUNCTION_IN);
-    nr_ue_pdsch_procedures(ue,
-                           proc,
-                           gNB_id,
-                           SI_PDSCH,
-                           ue->dlsch_SI[gNB_id],
-                           NULL);
-    
-    nr_ue_dlsch_procedures(ue,
-                           proc,
-                           gNB_id,
-                           SI_PDSCH,
-                           ue->dlsch_SI[gNB_id],
-                           NULL,
-                           &ue->dlsch_SI_errors[gNB_id],
-                           dlsch_parallel);
-
-    // deactivate dlsch once dlsch proc is done
-    ue->dlsch_SI[gNB_id]->active = 0;
-
-    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_SI, VCD_FUNCTION_OUT);
-  }
-
-  // do procedures for P-RNTI
-  if ((ue->dlsch_p[gNB_id]) && (ue->dlsch_p[gNB_id]->active == 1)) {
-    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_P, VCD_FUNCTION_IN);
-    nr_ue_pdsch_procedures(ue,
-                           proc,
-                           gNB_id,
-                           P_PDSCH,
-                           ue->dlsch_p[gNB_id],
-                           NULL);
-
-    nr_ue_dlsch_procedures(ue,
-                           proc,
-                           gNB_id,
-                           P_PDSCH,
-                           ue->dlsch_p[gNB_id],
-                           NULL,
-                           &ue->dlsch_p_errors[gNB_id],
-                           dlsch_parallel);
-
-    // deactivate dlsch once dlsch proc is done
-    ue->dlsch_p[gNB_id]->active = 0;
-
-    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_P, VCD_FUNCTION_OUT);
-  }
-
-  // do procedures for RA-RNTI
-  if ((ue->dlsch_ra[gNB_id]) && (ue->dlsch_ra[gNB_id]->active == 1) && (ue->UE_mode[gNB_id] != PUSCH)) {
-    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_RA, VCD_FUNCTION_IN);
-    nr_ue_pdsch_procedures(ue,
-                           proc,
-                           gNB_id,
-                           RA_PDSCH,
-                           ue->dlsch_ra[gNB_id],
-                           NULL);
-
-    nr_ue_dlsch_procedures(ue,
-                           proc,
-                           gNB_id,
-                           RA_PDSCH,
-                           ue->dlsch_ra[gNB_id],
-                           NULL,
-                           &ue->dlsch_ra_errors[gNB_id],
-                           dlsch_parallel);
-
-    // deactivate dlsch once dlsch proc is done
-    ue->dlsch_ra[gNB_id]->active = 0;
-
-    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_RA, VCD_FUNCTION_OUT);
-  }
-    
-  // do procedures for C-RNTI
-  if (ue->dlsch[proc->thread_id][gNB_id][0]->active == 1) {
-
-    LOG_D(PHY, "DLSCH data reception at proc->nr_slot_rx: %d \n \n", proc->nr_slot_rx);
-    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_IN);
-
-#if UE_TIMING_TRACE
-    start_meas(&ue->dlsch_procedures_stat[proc->thread_id]);
-#endif
-
-    if (ret_pdsch >= 0)
-      nr_ue_dlsch_procedures(ue,
-			   proc,
-			   gNB_id,
-			   PDSCH,
-			   ue->dlsch[proc->thread_id][gNB_id][0],
-			   ue->dlsch[proc->thread_id][gNB_id][1],
-			   &ue->dlsch_errors[gNB_id],
-			   dlsch_parallel);
-
-
-#if UE_TIMING_TRACE
-  stop_meas(&ue->dlsch_procedures_stat[proc->thread_id]);
-#if DISABLE_LOG_X
-  printf("[SFN %d] Slot1:       Pdsch Proc %5.2f\n",proc->nr_slot_rx,ue->pdsch_procedures_stat[proc->thread_id].p_time/(cpuf*1000.0));
-  printf("[SFN %d] Slot0 Slot1: Dlsch Proc %5.2f\n",proc->nr_slot_rx,ue->dlsch_procedures_stat[proc->thread_id].p_time/(cpuf*1000.0));
-#else
-  LOG_D(PHY, "[SFN %d] Slot1:       Pdsch Proc %5.2f\n",proc->nr_slot_rx,ue->pdsch_procedures_stat[proc->thread_id].p_time/(cpuf*1000.0));
-  LOG_D(PHY, "[SFN %d] Slot0 Slot1: Dlsch Proc %5.2f\n",proc->nr_slot_rx,ue->dlsch_procedures_stat[proc->thread_id].p_time/(cpuf*1000.0));
-#endif
-
-#endif
-
-  // deactivate dlsch once dlsch proc is done
-  ue->dlsch[proc->thread_id][gNB_id][0]->active = 0;
-
-  VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_OUT);
-
- }
- 
-#if UE_TIMING_TRACE
-start_meas(&ue->generic_stat);
-#endif
-
-#if 0
-
-  if(proc->nr_slot_rx==5 &&  ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[ue->dlsch[proc->thread_id][gNB_id][0]->current_harq_pid]->nb_rb > 20){
-       //write_output("decoder_llr.m","decllr",dlsch_llr,G,1,0);
-       //write_output("llr.m","llr",  &ue->pdsch_vars[proc->thread_id][gNB_id]->llr[0][0],(14*nb_rb*12*dlsch1_harq->Qm) - 4*(nb_rb*4*dlsch1_harq->Qm),1,0);
-
-       write_output("rxdataF0_current.m"    , "rxdataF0", &ue->common_vars.common_vars_rx_data_per_thread[proc->thread_id].rxdataF[0][0],14*fp->ofdm_symbol_size,1,1);
-       //write_output("rxdataF0_previous.m"    , "rxdataF0_prev_sss", &ue->common_vars.common_vars_rx_data_per_thread[next_thread_id].rxdataF[0][0],14*fp->ofdm_symbol_size,1,1);
-
-       //write_output("rxdataF0_previous.m"    , "rxdataF0_prev", &ue->common_vars.common_vars_rx_data_per_thread[next_thread_id].rxdataF[0][0],14*fp->ofdm_symbol_size,1,1);
-
-       write_output("dl_ch_estimates.m", "dl_ch_estimates_sfn5", &ue->common_vars.common_vars_rx_data_per_thread[proc->thread_id].dl_ch_estimates[0][0][0],14*fp->ofdm_symbol_size,1,1);
-       write_output("dl_ch_estimates_ext.m", "dl_ch_estimatesExt_sfn5", &ue->pdsch_vars[proc->thread_id][gNB_id]->dl_ch_estimates_ext[0][0],14*fp->N_RB_DL*12,1,1);
-       write_output("rxdataF_comp00.m","rxdataF_comp00",         &ue->pdsch_vars[proc->thread_id][gNB_id]->rxdataF_comp0[0][0],14*fp->N_RB_DL*12,1,1);
-       //write_output("magDLFirst.m", "magDLFirst", &phy_vars_ue->pdsch_vars[proc->thread_id][gNB_id]->dl_ch_mag0[0][0],14*fp->N_RB_DL*12,1,1);
-       //write_output("magDLSecond.m", "magDLSecond", &phy_vars_ue->pdsch_vars[proc->thread_id][gNB_id]->dl_ch_magb0[0][0],14*fp->N_RB_DL*12,1,1);
-
-       AssertFatal (0,"");
-  }
-#endif
-
-  // duplicate harq structure
-/*
-  uint8_t          current_harq_pid        = ue->dlsch[proc->thread_id][gNB_id][0]->current_harq_pid;
-  NR_DL_UE_HARQ_t *current_harq_processes = ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[current_harq_pid];
-  NR_DL_UE_HARQ_t *harq_processes_dest    = ue->dlsch[next1_thread_id][gNB_id][0]->harq_processes[current_harq_pid];
-  NR_DL_UE_HARQ_t *harq_processes_dest1    = ue->dlsch[next2_thread_id][gNB_id][0]->harq_processes[current_harq_pid];
-  */
-  /*nr_harq_status_t *current_harq_ack = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_ack[proc->nr_slot_rx];
-  nr_harq_status_t *harq_ack_dest    = &ue->dlsch[next1_thread_id][gNB_id][0]->harq_ack[proc->nr_slot_rx];
-  nr_harq_status_t *harq_ack_dest1    = &ue->dlsch[next2_thread_id][gNB_id][0]->harq_ack[proc->nr_slot_rx];
-*/
-
-  //copy_harq_proc_struct(harq_processes_dest, current_harq_processes);
-//copy_ack_struct(harq_ack_dest, current_harq_ack);
-
-//copy_harq_proc_struct(harq_processes_dest1, current_harq_processes);
-//copy_ack_struct(harq_ack_dest1, current_harq_ack);
-
-  if (proc->nr_slot_rx==9) {
-    if (proc->frame_rx % 10 == 0) {
-      if ((ue->dlsch_received[gNB_id] - ue->dlsch_received_last[gNB_id]) != 0)
-        ue->dlsch_fer[gNB_id] = (100*(ue->dlsch_errors[gNB_id] - ue->dlsch_errors_last[gNB_id]))/(ue->dlsch_received[gNB_id] - ue->dlsch_received_last[gNB_id]);
-
-      ue->dlsch_errors_last[gNB_id] = ue->dlsch_errors[gNB_id];
-      ue->dlsch_received_last[gNB_id] = ue->dlsch_received[gNB_id];
-    }
-
-
-    ue->bitrate[gNB_id] = (ue->total_TBS[gNB_id] - ue->total_TBS_last[gNB_id])*100;
-    ue->total_TBS_last[gNB_id] = ue->total_TBS[gNB_id];
-    LOG_D(PHY,"[UE %d] Calculating bitrate Frame %d: total_TBS = %d, total_TBS_last = %d, bitrate %f kbits\n",
-    ue->Mod_id,proc->frame_rx,ue->total_TBS[gNB_id],
-    ue->total_TBS_last[gNB_id],(float) ue->bitrate[gNB_id]/1000.0);
-
-#if UE_AUTOTEST_TRACE
-    if ((proc->frame_rx % 100 == 0)) {
-      LOG_I(PHY,"[UE  %d] AUTOTEST Metric : UE_DLSCH_BITRATE = %5.2f kbps (frame = %d) \n", ue->Mod_id, (float) ue->bitrate[gNB_id]/1000.0, proc->frame_rx);
-    }
-#endif
-
-   }
-
-#if UE_TIMING_TRACE
-  stop_meas(&ue->generic_stat);
-  printf("after tubo until end of Rx %5.2f \n",ue->generic_stat.p_time/(cpuf*1000.0));
-#endif
-
-#ifdef EMOS
-  phy_procedures_emos_UE_RX(ue,slot,gNB_id);
-#endif
-
-
-  VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX, VCD_FUNCTION_OUT);
-
-#if UE_TIMING_TRACE
-  stop_meas(&ue->phy_proc_rx[proc->thread_id]);
-#if DISABLE_LOG_X
-  printf("------FULL RX PROC [SFN %d]: %5.2f ------\n",proc->nr_slot_rx,ue->phy_proc_rx[proc->thread_id].p_time/(cpuf*1000.0));
-#else
-  LOG_D(PHY, "------FULL RX PROC [SFN %d]: %5.2f ------\n",proc->nr_slot_rx,ue->phy_proc_rx[proc->thread_id].p_time/(cpuf*1000.0));
-#endif
-#endif
-
-  //#endif //pdsch
-
-  LOG_D(PHY," ****** end RX-Chain  for AbsSubframe %d.%d ******  \n", proc->frame_rx%1024, proc->nr_slot_rx);
-
-}
 
 int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
                            UE_nr_rxtx_proc_t *proc,
                            uint8_t gNB_id,
                            uint8_t dlsch_parallel
                            )
-{
+{                                         
   int frame_rx = proc->frame_rx;
   int nr_slot_rx = proc->nr_slot_rx;
   int slot_pbch;
@@ -2087,26 +1855,239 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
 
 #endif //NR_PDCCH_SCHED
   
+  // Start PUSCH processing here. It runs in parallel with PDSCH processing
   notifiedFIFO_elt_t *res;
-  // Start PDSCH processing
-  res = pullTpool(ue->respPdsch,&(get_nrUE_params()->Tpool));
-  pdsch_rx_thread_data_t *curMsgRx=(pdsch_rx_thread_data_t *)NotifiedFifoData(res);
-  curMsgRx->rxtxD.proc = *proc;
-  curMsgRx->rxtxD.UE = ue;
-  curMsgRx->gNB_id = gNB_id;
-  curMsgRx->dlsch_parallel = dlsch_parallel;
-  res->key = proc->nr_slot_rx;
-  pushTpool(&(get_nrUE_params()->Tpool), res);
-
-  // Start PUSCH processing
   res = pullTpool(ue->txFifo,&(get_nrUE_params()->Tpool));
   nr_rxtx_thread_data_t *curMsg=(nr_rxtx_thread_data_t *)NotifiedFifoData(res);
   curMsg->proc = *proc;
   curMsg->UE = ue;
-  res->key = proc->nr_slot_tx;
+  res->key = 1;
   pushTpool(&(get_nrUE_params()->Tpool), res);
 
-  return (0);
+#if UE_TIMING_TRACE
+  start_meas(&ue->generic_stat);
+#endif
+  // do procedures for C-RNTI
+  int ret_pdsch = 0;
+  if (ue->dlsch[proc->thread_id][gNB_id][0]->active == 1) {
+    //VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_IN);
+    ret_pdsch = nr_ue_pdsch_procedures(ue,
+			   proc,
+			   gNB_id,
+			   PDSCH,
+			   ue->dlsch[proc->thread_id][gNB_id][0],
+			   NULL);
+
+    nr_ue_measurement_procedures(2, ue, proc, gNB_id, nr_slot_rx);
+  }
+
+  // do procedures for SI-RNTI
+  if ((ue->dlsch_SI[gNB_id]) && (ue->dlsch_SI[gNB_id]->active == 1)) {
+    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_SI, VCD_FUNCTION_IN);
+    nr_ue_pdsch_procedures(ue,
+                           proc,
+                           gNB_id,
+                           SI_PDSCH,
+                           ue->dlsch_SI[gNB_id],
+                           NULL);
+    
+    nr_ue_dlsch_procedures(ue,
+                           proc,
+                           gNB_id,
+                           SI_PDSCH,
+                           ue->dlsch_SI[gNB_id],
+                           NULL,
+                           &ue->dlsch_SI_errors[gNB_id],
+                           dlsch_parallel);
+
+    // deactivate dlsch once dlsch proc is done
+    ue->dlsch_SI[gNB_id]->active = 0;
+
+    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_SI, VCD_FUNCTION_OUT);
+  }
+
+  // do procedures for P-RNTI
+  if ((ue->dlsch_p[gNB_id]) && (ue->dlsch_p[gNB_id]->active == 1)) {
+    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_P, VCD_FUNCTION_IN);
+    nr_ue_pdsch_procedures(ue,
+                           proc,
+                           gNB_id,
+                           P_PDSCH,
+                           ue->dlsch_p[gNB_id],
+                           NULL);
+
+    nr_ue_dlsch_procedures(ue,
+                           proc,
+                           gNB_id,
+                           P_PDSCH,
+                           ue->dlsch_p[gNB_id],
+                           NULL,
+                           &ue->dlsch_p_errors[gNB_id],
+                           dlsch_parallel);
+
+    // deactivate dlsch once dlsch proc is done
+    ue->dlsch_p[gNB_id]->active = 0;
+
+    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_P, VCD_FUNCTION_OUT);
+  }
+
+  // do procedures for RA-RNTI
+  if ((ue->dlsch_ra[gNB_id]) && (ue->dlsch_ra[gNB_id]->active == 1) && (ue->UE_mode[gNB_id] != PUSCH)) {
+    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_RA, VCD_FUNCTION_IN);
+    nr_ue_pdsch_procedures(ue,
+                           proc,
+                           gNB_id,
+                           RA_PDSCH,
+                           ue->dlsch_ra[gNB_id],
+                           NULL);
+
+    nr_ue_dlsch_procedures(ue,
+                           proc,
+                           gNB_id,
+                           RA_PDSCH,
+                           ue->dlsch_ra[gNB_id],
+                           NULL,
+                           &ue->dlsch_ra_errors[gNB_id],
+                           dlsch_parallel);
+
+    // deactivate dlsch once dlsch proc is done
+    ue->dlsch_ra[gNB_id]->active = 0;
+
+    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_RA, VCD_FUNCTION_OUT);
+  }
+    
+  // do procedures for C-RNTI
+  if (ue->dlsch[proc->thread_id][gNB_id][0]->active == 1) {
+
+    LOG_D(PHY, "DLSCH data reception at nr_slot_rx: %d \n \n", nr_slot_rx);
+    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_IN);
+
+#if UE_TIMING_TRACE
+    start_meas(&ue->dlsch_procedures_stat[proc->thread_id]);
+#endif
+
+    if (ret_pdsch >= 0)
+      nr_ue_dlsch_procedures(ue,
+			   proc,
+			   gNB_id,
+			   PDSCH,
+			   ue->dlsch[proc->thread_id][gNB_id][0],
+			   ue->dlsch[proc->thread_id][gNB_id][1],
+			   &ue->dlsch_errors[gNB_id],
+			   dlsch_parallel);
+
+
+#if UE_TIMING_TRACE
+  stop_meas(&ue->dlsch_procedures_stat[proc->thread_id]);
+#if DISABLE_LOG_X
+  printf("[SFN %d] Slot1:       Pdsch Proc %5.2f\n",nr_slot_rx,ue->pdsch_procedures_stat[proc->thread_id].p_time/(cpuf*1000.0));
+  printf("[SFN %d] Slot0 Slot1: Dlsch Proc %5.2f\n",nr_slot_rx,ue->dlsch_procedures_stat[proc->thread_id].p_time/(cpuf*1000.0));
+#else
+  LOG_D(PHY, "[SFN %d] Slot1:       Pdsch Proc %5.2f\n",nr_slot_rx,ue->pdsch_procedures_stat[proc->thread_id].p_time/(cpuf*1000.0));
+  LOG_D(PHY, "[SFN %d] Slot0 Slot1: Dlsch Proc %5.2f\n",nr_slot_rx,ue->dlsch_procedures_stat[proc->thread_id].p_time/(cpuf*1000.0));
+#endif
+
+#endif
+
+  // deactivate dlsch once dlsch proc is done
+  ue->dlsch[proc->thread_id][gNB_id][0]->active = 0;
+
+  VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_OUT);
+
+ }
+ 
+#if UE_TIMING_TRACE
+start_meas(&ue->generic_stat);
+#endif
+
+#if 0
+
+  if(nr_slot_rx==5 &&  ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[ue->dlsch[proc->thread_id][gNB_id][0]->current_harq_pid]->nb_rb > 20){
+       //write_output("decoder_llr.m","decllr",dlsch_llr,G,1,0);
+       //write_output("llr.m","llr",  &ue->pdsch_vars[proc->thread_id][gNB_id]->llr[0][0],(14*nb_rb*12*dlsch1_harq->Qm) - 4*(nb_rb*4*dlsch1_harq->Qm),1,0);
+
+       write_output("rxdataF0_current.m"    , "rxdataF0", &ue->common_vars.common_vars_rx_data_per_thread[proc->thread_id].rxdataF[0][0],14*fp->ofdm_symbol_size,1,1);
+       //write_output("rxdataF0_previous.m"    , "rxdataF0_prev_sss", &ue->common_vars.common_vars_rx_data_per_thread[next_thread_id].rxdataF[0][0],14*fp->ofdm_symbol_size,1,1);
+
+       //write_output("rxdataF0_previous.m"    , "rxdataF0_prev", &ue->common_vars.common_vars_rx_data_per_thread[next_thread_id].rxdataF[0][0],14*fp->ofdm_symbol_size,1,1);
+
+       write_output("dl_ch_estimates.m", "dl_ch_estimates_sfn5", &ue->common_vars.common_vars_rx_data_per_thread[proc->thread_id].dl_ch_estimates[0][0][0],14*fp->ofdm_symbol_size,1,1);
+       write_output("dl_ch_estimates_ext.m", "dl_ch_estimatesExt_sfn5", &ue->pdsch_vars[proc->thread_id][gNB_id]->dl_ch_estimates_ext[0][0],14*fp->N_RB_DL*12,1,1);
+       write_output("rxdataF_comp00.m","rxdataF_comp00",         &ue->pdsch_vars[proc->thread_id][gNB_id]->rxdataF_comp0[0][0],14*fp->N_RB_DL*12,1,1);
+       //write_output("magDLFirst.m", "magDLFirst", &phy_vars_ue->pdsch_vars[proc->thread_id][gNB_id]->dl_ch_mag0[0][0],14*fp->N_RB_DL*12,1,1);
+       //write_output("magDLSecond.m", "magDLSecond", &phy_vars_ue->pdsch_vars[proc->thread_id][gNB_id]->dl_ch_magb0[0][0],14*fp->N_RB_DL*12,1,1);
+
+       AssertFatal (0,"");
+  }
+#endif
+
+  // duplicate harq structure
+/*
+  uint8_t          current_harq_pid        = ue->dlsch[proc->thread_id][gNB_id][0]->current_harq_pid;
+  NR_DL_UE_HARQ_t *current_harq_processes = ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[current_harq_pid];
+  NR_DL_UE_HARQ_t *harq_processes_dest    = ue->dlsch[next1_thread_id][gNB_id][0]->harq_processes[current_harq_pid];
+  NR_DL_UE_HARQ_t *harq_processes_dest1    = ue->dlsch[next2_thread_id][gNB_id][0]->harq_processes[current_harq_pid];
+  */
+  /*nr_harq_status_t *current_harq_ack = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_ack[nr_slot_rx];
+  nr_harq_status_t *harq_ack_dest    = &ue->dlsch[next1_thread_id][gNB_id][0]->harq_ack[nr_slot_rx];
+  nr_harq_status_t *harq_ack_dest1    = &ue->dlsch[next2_thread_id][gNB_id][0]->harq_ack[nr_slot_rx];
+*/
+
+  //copy_harq_proc_struct(harq_processes_dest, current_harq_processes);
+//copy_ack_struct(harq_ack_dest, current_harq_ack);
+
+//copy_harq_proc_struct(harq_processes_dest1, current_harq_processes);
+//copy_ack_struct(harq_ack_dest1, current_harq_ack);
+
+if (nr_slot_rx==9) {
+  if (frame_rx % 10 == 0) {
+    if ((ue->dlsch_received[gNB_id] - ue->dlsch_received_last[gNB_id]) != 0)
+      ue->dlsch_fer[gNB_id] = (100*(ue->dlsch_errors[gNB_id] - ue->dlsch_errors_last[gNB_id]))/(ue->dlsch_received[gNB_id] - ue->dlsch_received_last[gNB_id]);
+
+    ue->dlsch_errors_last[gNB_id] = ue->dlsch_errors[gNB_id];
+    ue->dlsch_received_last[gNB_id] = ue->dlsch_received[gNB_id];
+  }
+
+
+  ue->bitrate[gNB_id] = (ue->total_TBS[gNB_id] - ue->total_TBS_last[gNB_id])*100;
+  ue->total_TBS_last[gNB_id] = ue->total_TBS[gNB_id];
+  LOG_D(PHY,"[UE %d] Calculating bitrate Frame %d: total_TBS = %d, total_TBS_last = %d, bitrate %f kbits\n",
+	ue->Mod_id,frame_rx,ue->total_TBS[gNB_id],
+	ue->total_TBS_last[gNB_id],(float) ue->bitrate[gNB_id]/1000.0);
+
+#if UE_AUTOTEST_TRACE
+  if ((frame_rx % 100 == 0)) {
+    LOG_I(PHY,"[UE  %d] AUTOTEST Metric : UE_DLSCH_BITRATE = %5.2f kbps (frame = %d) \n", ue->Mod_id, (float) ue->bitrate[gNB_id]/1000.0, frame_rx);
+  }
+#endif
+
+ }
+
+#if UE_TIMING_TRACE
+stop_meas(&ue->generic_stat);
+printf("after tubo until end of Rx %5.2f \n",ue->generic_stat.p_time/(cpuf*1000.0));
+#endif
+
+#ifdef EMOS
+phy_procedures_emos_UE_RX(ue,slot,gNB_id);
+#endif
+
+
+VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX, VCD_FUNCTION_OUT);
+
+#if UE_TIMING_TRACE
+stop_meas(&ue->phy_proc_rx[proc->thread_id]);
+#if DISABLE_LOG_X
+printf("------FULL RX PROC [SFN %d]: %5.2f ------\n",nr_slot_rx,ue->phy_proc_rx[proc->thread_id].p_time/(cpuf*1000.0));
+#else
+LOG_D(PHY, "------FULL RX PROC [SFN %d]: %5.2f ------\n",nr_slot_rx,ue->phy_proc_rx[proc->thread_id].p_time/(cpuf*1000.0));
+#endif
+#endif
+
+//#endif //pdsch
+
+LOG_D(PHY," ****** end RX-Chain  for AbsSubframe %d.%d ******  \n", frame_rx%1024, nr_slot_rx);
+return (0);
 }
 
 

From 9f8d702727adff7581768065d4894fc272eefbd5 Mon Sep 17 00:00:00 2001
From: Raymond Knopp 
Date: Tue, 16 Mar 2021 16:26:25 +0100
Subject: [PATCH 097/579] fix after merge with develop

---
 openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
index 8f234cb585..fc194d9c20 100644
--- a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
+++ b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
@@ -48,6 +48,8 @@
 #include "NR_MAC_COMMON/nr_mac.h"
 #include "LAYER2/NR_MAC_UE/mac_proto.h"
 
+#include 
+
 void nr_get_RA_window(NR_UE_MAC_INST_t *mac);
 
 // Random Access procedure initialization as per 5.1.1 and initialization of variables specific

From 85b0aa0497e9b3d40f15691fd8239f000620d86b Mon Sep 17 00:00:00 2001
From: Sakthivel Velumani 
Date: Wed, 17 Mar 2021 08:11:47 +0100
Subject: [PATCH 098/579] More fixes 1.Changes to support multi slot parallel
 processing 2.Changes to run rfsimulator without multi-threading

---
 executables/nr-ue.c                         | 69 ++++++++++++---------
 executables/nr-uesoftmodem.c                | 15 +++--
 openair1/PHY/defs_common.h                  |  2 +-
 openair1/PHY/defs_nr_UE.h                   |  1 -
 openair1/SCHED_NR/phy_procedures_nr_gNB.c   |  2 +-
 openair1/SCHED_NR_UE/phy_procedures_nr_ue.c |  2 +-
 6 files changed, 54 insertions(+), 37 deletions(-)

diff --git a/executables/nr-ue.c b/executables/nr-ue.c
index e07c213760..0e5c4a1489 100644
--- a/executables/nr-ue.c
+++ b/executables/nr-ue.c
@@ -91,6 +91,8 @@
 #else
   #define DURATION_RX_TO_TX           (6)   /* For LTE, this duration is fixed to 4 and it is linked to LTE standard for both modes FDD/TDD */
 #endif
+#define RX_JOB_ID 0x1010
+#define TX_JOB_ID 100
 
 typedef enum {
   pss = 0,
@@ -130,10 +132,7 @@ void init_nr_ue_vars(PHY_VARS_NR_UE *ue,
  * \param arg is a pointer to a \ref PHY_VARS_NR_UE structure.
  */
 
-typedef struct syncData_s {
-  UE_nr_rxtx_proc_t proc;
-  PHY_VARS_NR_UE *UE;
-} syncData_t;
+typedef nr_rxtx_thread_data_t syncData_t;
 
 static void UE_synch(void *arg) {
   syncData_t *syncD=(syncData_t *) arg;
@@ -359,6 +358,8 @@ void processSlotRX(void *arg) {
   PHY_VARS_NR_UE    *UE   = rxtxD->UE;
   fapi_nr_config_request_t *cfg = &UE->nrUE_config;
   int rx_slot_type = nr_ue_slot_select(cfg, proc->frame_rx, proc->nr_slot_rx);
+  int tx_slot_type = nr_ue_slot_select(cfg, proc->frame_tx, proc->nr_slot_tx);
+  bool isTxRunning = true;
   uint8_t gNB_id = 0;
 
   if (rx_slot_type == NR_DOWNLINK_SLOT || rx_slot_type == NR_MIXED_SLOT){
@@ -386,27 +387,21 @@ void processSlotRX(void *arg) {
     }
 
     // Wait for PUSCH processing to finish
-    notifiedFIFO_elt_t *res;
-    res = pullTpool(UE->txFifo,&(get_nrUE_params()->Tpool));
-    pushNotifiedFIFO_nothreadSafe(UE->txFifo, res);
-
-    if (get_softmodem_params()->usim_test==0) {
-      pucch_procedures_ue_nr(UE,
-                             gNB_id,
-                             proc,
-                             FALSE);
+    while (isTxRunning) {
+      notifiedFIFO_elt_t *res;
+      res = pullTpool(UE->txFifo,&(get_nrUE_params()->Tpool));
+      if (res->key == proc->nr_slot_tx) {
+        isTxRunning = false;
+        res->key = TX_JOB_ID;
+      }
+      pushNotifiedFIFO(UE->txFifo, res);
     }
 
-    LOG_D(PHY, "Sending Uplink data \n");
-    nr_ue_pusch_common_procedures(UE,
-                                  proc->nr_slot_tx,
-                                  &UE->frame_parms,1);
-
-    ue_ta_procedures(UE, proc->nr_slot_tx, proc->frame_tx);
-
   } else {
     processSlotTX(rxtxD);
+  }
 
+  if (tx_slot_type == NR_UPLINK_SLOT || tx_slot_type == NR_MIXED_SLOT){
     if (get_softmodem_params()->usim_test==0) {
       pucch_procedures_ue_nr(UE,
                              gNB_id,
@@ -546,15 +541,12 @@ void *UE_thread(void *arg) {
   notifiedFIFO_t nf;
   initNotifiedFIFO(&nf);
 
-  notifiedFIFO_t rxFifo;
-  UE->rxFifo = &rxFifo;
-  initNotifiedFIFO(&rxFifo);
-  pushNotifiedFIFO_nothreadSafe(&rxFifo, newNotifiedFIFO_elt(sizeof(nr_rxtx_thread_data_t), 1,&rxFifo,processSlotRX));
+  notifiedFIFO_t freeBlocks;
+  initNotifiedFIFO_nothreadSafe(&freeBlocks);
 
   notifiedFIFO_t txFifo;
   UE->txFifo = &txFifo;
   initNotifiedFIFO(&txFifo);
-  pushNotifiedFIFO_nothreadSafe(&txFifo, newNotifiedFIFO_elt(sizeof(nr_rxtx_thread_data_t), 1,&txFifo,processSlotTX));
 
   int nbSlotProcessing=0;
   int thread_idx=0;
@@ -565,9 +557,16 @@ void *UE_thread(void *arg) {
   const int nb_slot_frame = UE->frame_parms.slots_per_frame;
   int absolute_slot=0, decoded_frame_rx=INT_MAX, trashed_frames=0;
 
+  for (int i=0; ilost_sync) {
-      abortTpool(&(get_nrUE_params()->Tpool),0);
+      abortTpool(&(get_nrUE_params()->Tpool),RX_JOB_ID);
       UE->is_synchronized = 0;
       UE->lost_sync = 0;
     }
@@ -636,7 +635,7 @@ void *UE_thread(void *arg) {
     thread_idx = absolute_slot % RX_NB_TH;
     int slot_nr = absolute_slot % nb_slot_frame;
     notifiedFIFO_elt_t *msgToPush;
-    AssertFatal((msgToPush=pullTpool(&rxFifo,&(get_nrUE_params()->Tpool))) != NULL,"chained list failure");
+    AssertFatal((msgToPush=pullTpool(&freeBlocks,&(get_nrUE_params()->Tpool))) != NULL,"chained list failure");
     nr_rxtx_thread_data_t *curMsg=(nr_rxtx_thread_data_t *)NotifiedFifoData(msgToPush);
     curMsg->UE=UE;
     // update thread index for received subframe
@@ -706,7 +705,20 @@ void *UE_thread(void *arg) {
                                 UE->frame_parms.get_samples_slot_timestamp(slot_nr,
                                 &UE->frame_parms,DURATION_RX_TO_TX) - firstSymSamp;
 
-    decoded_frame_rx=-1;
+    notifiedFIFO_elt_t *res;
+
+    while (nbSlotProcessing >= RX_NB_TH) {
+      res=pullTpool(&nf, &(get_nrUE_params()->Tpool));
+      nbSlotProcessing--;
+      nr_rxtx_thread_data_t *tmp=(nr_rxtx_thread_data_t *)res->msgData;
+
+      if (tmp->proc.decoded_frame_rx != -1)
+        decoded_frame_rx=(((mac->mib->systemFrameNumber.buf[0] >> mac->mib->systemFrameNumber.bits_unused)<<4) | tmp->proc.decoded_frame_rx);
+      else
+         decoded_frame_rx=-1;
+
+      pushNotifiedFIFO_nothreadSafe(&freeBlocks,res);
+    }
 
     if (  decoded_frame_rx>0 && decoded_frame_rx != curMsg->proc.frame_rx)
       LOG_E(PHY,"Decoded frame index (%d) is not compatible with current context (%d), UE should go back to synch mode\n",
@@ -748,7 +760,6 @@ void *UE_thread(void *arg) {
       memset(txp[i], 0, writeBlockSize);
 
     nbSlotProcessing++;
-    msgToPush->key=1;
     pushTpool(&(get_nrUE_params()->Tpool), msgToPush);
 
   } // while !oai_exit
diff --git a/executables/nr-uesoftmodem.c b/executables/nr-uesoftmodem.c
index 5d651344d6..9e8a4db248 100644
--- a/executables/nr-uesoftmodem.c
+++ b/executables/nr-uesoftmodem.c
@@ -214,9 +214,16 @@ nrUE_params_t *get_nrUE_params(void) {
 }
 /* initialie thread pools used for NRUE processing paralleliation */ 
 void init_tpools(uint8_t nun_dlsch_threads) {
-  char *params=calloc(1,(RX_NB_TH*3)+1);
-  for (int i=0; istart_symbol_index*gNB->frame_parms.ofdm_symbol_size + (gNB->frame_parms.first_carrier_offset+pucch_pdu->prb_start*12);
           power_rxF = signal_energy_nodc(&gNB->common_vars.rxdataF[0][offset],12);
-          LOG_I(PHY,"frame %d, slot %d: PUCCH signal energy %d\n",frame_rx,slot_rx,power_rxF);
+          LOG_D(PHY,"frame %d, slot %d: PUCCH signal energy %d\n",frame_rx,slot_rx,power_rxF);
 
           nr_decode_pucch0(gNB,
 	                   slot_rx,
diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
index 5dcea9b257..d5b0d7d46d 100644
--- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
@@ -1861,7 +1861,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
   nr_rxtx_thread_data_t *curMsg=(nr_rxtx_thread_data_t *)NotifiedFifoData(res);
   curMsg->proc = *proc;
   curMsg->UE = ue;
-  res->key = 1;
+  res->key = proc->nr_slot_tx;
   pushTpool(&(get_nrUE_params()->Tpool), res);
 
 #if UE_TIMING_TRACE

From a702fd55b395a6b4be24e46c3318cdc6e51ab1e6 Mon Sep 17 00:00:00 2001
From: Sakthivel Velumani 
Date: Wed, 17 Mar 2021 14:58:06 +0100
Subject: [PATCH 099/579] Fixed blocking bug

---
 executables/nr-ue.c          | 1 +
 executables/nr-uesoftmodem.c | 4 ++--
 openair1/PHY/defs_common.h   | 1 +
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/executables/nr-ue.c b/executables/nr-ue.c
index 092913c12e..1065396016 100644
--- a/executables/nr-ue.c
+++ b/executables/nr-ue.c
@@ -767,6 +767,7 @@ void *UE_thread(void *arg) {
       memset(txp[i], 0, writeBlockSize);
 
     nbSlotProcessing++;
+    LOG_D(PHY,"Number of slots being processed at the moment: %d\n",nbSlotProcessing);
     pushTpool(&(get_nrUE_params()->Tpool), msgToPush);
 
   } // while !oai_exit
diff --git a/executables/nr-uesoftmodem.c b/executables/nr-uesoftmodem.c
index 2477d4cd87..3b9b40001a 100644
--- a/executables/nr-uesoftmodem.c
+++ b/executables/nr-uesoftmodem.c
@@ -220,8 +220,8 @@ void init_tpools(uint8_t nun_dlsch_threads) {
     memcpy(params,"N",1);
   }
   else {
-    params = calloc(1,(RX_NB_TH*3)+1);
-    for (int i=0; i
Date: Thu, 18 Mar 2021 20:17:41 +0100
Subject: [PATCH 100/579] Fixed build errors Also added warning messages for
 gNB number of threads required

---
 executables/nr-gnb.c                  |  2 ++
 openair1/SIMULATION/NR_PHY/dlsim.c    | 16 ++++++++++++++++
 openair1/SIMULATION/NR_PHY/prachsim.c | 12 ++++++++++++
 openair1/SIMULATION/NR_PHY/ulsim.c    | 11 +++++++++++
 4 files changed, 41 insertions(+)

diff --git a/executables/nr-gnb.c b/executables/nr-gnb.c
index fce01f04fd..26fe26c4e1 100644
--- a/executables/nr-gnb.c
+++ b/executables/nr-gnb.c
@@ -346,7 +346,9 @@ void init_gNB_Tpool(int inst) {
   // ULSCH decoding threadpool
   gNB->threadPool = (tpool_t*)malloc(sizeof(tpool_t));
   int numCPU = sysconf(_SC_NPROCESSORS_ONLN);
+  LOG_I(PHY,"Number of threads requested in config file: %d, Number of threads available on this machine: %d\n",gNB->pusch_proc_threads,numCPU);
   int threadCnt = min(numCPU, gNB->pusch_proc_threads);
+  if (threadCnt < 2) LOG_E(PHY,"Number of threads for gNB should be more than 1. Allocated only %d\n",threadCnt);
   char ul_pool[80];
   sprintf(ul_pool,"-1");
   int s_offset = 0;
diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c
index 3a989566d2..6c90a8fd14 100644
--- a/openair1/SIMULATION/NR_PHY/dlsim.c
+++ b/openair1/SIMULATION/NR_PHY/dlsim.c
@@ -252,6 +252,17 @@ void nr_dlsim_preprocessor(module_id_t module_id,
   sched_ctrl->numDmrsCdmGrpsNoData = 1;
 }
 
+typedef struct {
+  uint64_t       optmask;   //mask to store boolean config options
+  uint8_t        nr_dlsch_parallel; // number of threads for dlsch decoding, 0 means no parallelization
+  tpool_t        Tpool;             // thread pool 
+} nrUE_params_t;
+
+nrUE_params_t nrUE_params;
+
+nrUE_params_t *get_nrUE_params(void) {
+  return &nrUE_params;
+}
 
 int main(int argc, char **argv)
 {
@@ -841,6 +852,11 @@ int main(int argc, char **argv)
   unsigned int errors_bit    = 0;
   uint32_t errors_scrambling = 0;
 
+  initTpool("N", &(nrUE_params.Tpool), false);
+  notifiedFIFO_t txFifo;
+  UE->txFifo = &txFifo;
+  initNotifiedFIFO(&txFifo);
+  pushNotifiedFIFO(&txFifo, newNotifiedFIFO_elt(sizeof(nr_rxtx_thread_data_t), 0,&txFifo,NULL));
 
   test_input_bit       = (unsigned char *) malloc16(sizeof(unsigned char) * 16 * 68 * 384);
   estimated_output_bit = (unsigned char *) malloc16(sizeof(unsigned char) * 16 * 68 * 384);
diff --git a/openair1/SIMULATION/NR_PHY/prachsim.c b/openair1/SIMULATION/NR_PHY/prachsim.c
index 8bd54ec345..e220565f20 100644
--- a/openair1/SIMULATION/NR_PHY/prachsim.c
+++ b/openair1/SIMULATION/NR_PHY/prachsim.c
@@ -159,6 +159,18 @@ int nr_derive_key(int alg_type, uint8_t alg_id,
   return 0;
 }
 
+typedef struct {
+  uint64_t       optmask;   //mask to store boolean config options
+  uint8_t        nr_dlsch_parallel; // number of threads for dlsch decoding, 0 means no parallelization
+  tpool_t        Tpool;             // thread pool 
+} nrUE_params_t;
+
+nrUE_params_t nrUE_params;
+
+nrUE_params_t *get_nrUE_params(void) {
+  return &nrUE_params;
+}
+
 int main(int argc, char **argv){
 
   char c;
diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c
index 35d642e7b3..a6e1838cf9 100644
--- a/openair1/SIMULATION/NR_PHY/ulsim.c
+++ b/openair1/SIMULATION/NR_PHY/ulsim.c
@@ -183,6 +183,17 @@ int nr_derive_key(int alg_type, uint8_t alg_id,
   return 0;
 }
 
+typedef struct {
+  uint64_t       optmask;   //mask to store boolean config options
+  uint8_t        nr_dlsch_parallel; // number of threads for dlsch decoding, 0 means no parallelization
+  tpool_t        Tpool;             // thread pool 
+} nrUE_params_t;
+
+nrUE_params_t nrUE_params;
+
+nrUE_params_t *get_nrUE_params(void) {
+  return &nrUE_params;
+}
 // needed for some functions
 uint16_t n_rnti = 0x1234;
 openair0_config_t openair0_cfg[MAX_CARDS];

From 91168581a5dae7b12ee0a4c54042f03718ce4da9 Mon Sep 17 00:00:00 2001
From: Raymond Knopp 
Date: Thu, 18 Mar 2021 20:35:17 +0100
Subject: [PATCH 101/579] small fix for basic simulator in TDD

---
 targets/RT/USER/lte-ru.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/targets/RT/USER/lte-ru.c b/targets/RT/USER/lte-ru.c
index b2cfaa3f0f..93408709ea 100644
--- a/targets/RT/USER/lte-ru.c
+++ b/targets/RT/USER/lte-ru.c
@@ -1391,7 +1391,7 @@ int setup_RU_buffers(RU_t *ru) {
     else if (frame_parms->N_RB_DL == 50)  ru->N_TA_offset = 624/2;
     else if (frame_parms->N_RB_DL == 25)  ru->N_TA_offset = 624/4;
 
-    if(ru->basicsim)
+    if(IS_SOFTMODEM_BASICSIM)
       /* this is required for the basic simulator in TDD mode
        * TODO: find a proper cleaner solution
        */

From 58d10d592f0e8b0cf98f08e99f4c93cf8455bb14 Mon Sep 17 00:00:00 2001
From: Sakthivel Velumani 
Date: Fri, 19 Mar 2021 00:06:30 +0100
Subject: [PATCH 102/579] Fix nr_dlsim segflt

---
 openair1/SIMULATION/NR_PHY/dlsim.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c
index 6c90a8fd14..9a89db8f55 100644
--- a/openair1/SIMULATION/NR_PHY/dlsim.c
+++ b/openair1/SIMULATION/NR_PHY/dlsim.c
@@ -264,6 +264,9 @@ nrUE_params_t *get_nrUE_params(void) {
   return &nrUE_params;
 }
 
+void do_nothing(void *args) {
+}
+
 int main(int argc, char **argv)
 {
   char c;
@@ -856,7 +859,7 @@ int main(int argc, char **argv)
   notifiedFIFO_t txFifo;
   UE->txFifo = &txFifo;
   initNotifiedFIFO(&txFifo);
-  pushNotifiedFIFO(&txFifo, newNotifiedFIFO_elt(sizeof(nr_rxtx_thread_data_t), 0,&txFifo,NULL));
+  pushNotifiedFIFO(&txFifo, newNotifiedFIFO_elt(sizeof(nr_rxtx_thread_data_t), 0,&txFifo,do_nothing));
 
   test_input_bit       = (unsigned char *) malloc16(sizeof(unsigned char) * 16 * 68 * 384);
   estimated_output_bit = (unsigned char *) malloc16(sizeof(unsigned char) * 16 * 68 * 384);

From 80c261c9ae1ca8a31734a9eb03cb762367a14f2f Mon Sep 17 00:00:00 2001
From: Sakthivel Velumani 
Date: Fri, 19 Mar 2021 00:56:44 +0100
Subject: [PATCH 103/579] Fixed lte-dlsim segflt

---
 executables/nr-ue.c           | 18 +++++++++---------
 executables/nr-uesoftmodem.c  |  4 ++--
 openair1/PHY/defs_common.h    |  3 +--
 openair1/PHY/defs_nr_common.h |  2 ++
 4 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/executables/nr-ue.c b/executables/nr-ue.c
index 1065396016..533004a414 100644
--- a/executables/nr-ue.c
+++ b/executables/nr-ue.c
@@ -557,7 +557,7 @@ void *UE_thread(void *arg) {
   const int nb_slot_frame = UE->frame_parms.slots_per_frame;
   int absolute_slot=0, decoded_frame_rx=INT_MAX, trashed_frames=0;
 
-  for (int i=0; iTpool))) != NULL,"chained list failure");
@@ -664,18 +664,18 @@ void *UE_thread(void *arg) {
 
     for (int i=0; iframe_parms.nb_antennas_tx; i++)
       txp[i] = (void *)&UE->common_vars.txdata[i][UE->frame_parms.get_samples_slot_timestamp(
-               ((slot_nr + DURATION_RX_TO_TX - RX_NB_TH)%nb_slot_frame),&UE->frame_parms,0)];
+               ((slot_nr + DURATION_RX_TO_TX - NR_RX_NB_TH)%nb_slot_frame),&UE->frame_parms,0)];
 
     int readBlockSize, writeBlockSize;
 
     if (slot_nr<(nb_slot_frame - 1)) {
       readBlockSize=get_readBlockSize(slot_nr, &UE->frame_parms);
-      writeBlockSize=UE->frame_parms.get_samples_per_slot((slot_nr + DURATION_RX_TO_TX - RX_NB_TH) % nb_slot_frame, &UE->frame_parms);
+      writeBlockSize=UE->frame_parms.get_samples_per_slot((slot_nr + DURATION_RX_TO_TX - NR_RX_NB_TH) % nb_slot_frame, &UE->frame_parms);
     } else {
       UE->rx_offset_diff = computeSamplesShift(UE);
       readBlockSize=get_readBlockSize(slot_nr, &UE->frame_parms) -
                     UE->rx_offset_diff;
-      writeBlockSize=UE->frame_parms.get_samples_per_slot((slot_nr + DURATION_RX_TO_TX - RX_NB_TH) % nb_slot_frame, &UE->frame_parms)- UE->rx_offset_diff;
+      writeBlockSize=UE->frame_parms.get_samples_per_slot((slot_nr + DURATION_RX_TO_TX - NR_RX_NB_TH) % nb_slot_frame, &UE->frame_parms)- UE->rx_offset_diff;
     }
 
     AssertFatal(readBlockSize ==
@@ -707,7 +707,7 @@ void *UE_thread(void *arg) {
 
     notifiedFIFO_elt_t *res;
 
-    while (nbSlotProcessing >= RX_NB_TH) {
+    while (nbSlotProcessing >= NR_RX_NB_TH) {
       res=pullTpool(&nf, &(get_nrUE_params()->Tpool));
       nbSlotProcessing--;
       nr_rxtx_thread_data_t *tmp=(nr_rxtx_thread_data_t *)res->msgData;
@@ -725,7 +725,7 @@ void *UE_thread(void *arg) {
             decoded_frame_rx, curMsg->proc.frame_rx  );
 
     // use previous timing_advance value to compute writeTimestamp
-    writeTimestamp = timestamp + UE->frame_parms.get_samples_slot_timestamp(slot_nr, &UE->frame_parms,DURATION_RX_TO_TX - RX_NB_TH) -
+    writeTimestamp = timestamp + UE->frame_parms.get_samples_slot_timestamp(slot_nr, &UE->frame_parms,DURATION_RX_TO_TX - NR_RX_NB_TH) -
                      firstSymSamp - openair0_cfg[0].tx_sample_advance - UE->N_TA_offset - timing_advance;
 
     // but use current UE->timing_advance value to compute writeBlockSize
@@ -735,7 +735,7 @@ void *UE_thread(void *arg) {
     }
 
     int flags = 0;
-    int slot_tx_usrp = slot_nr + DURATION_RX_TO_TX - RX_NB_TH;
+    int slot_tx_usrp = slot_nr + DURATION_RX_TO_TX - NR_RX_NB_TH;
 
     if (openair0_cfg[0].duplex_mode == duplex_mode_TDD) {
 
diff --git a/executables/nr-uesoftmodem.c b/executables/nr-uesoftmodem.c
index 3b9b40001a..f13829c496 100644
--- a/executables/nr-uesoftmodem.c
+++ b/executables/nr-uesoftmodem.c
@@ -220,8 +220,8 @@ void init_tpools(uint8_t nun_dlsch_threads) {
     memcpy(params,"N",1);
   }
   else {
-    params = calloc(1,(RX_NB_TH*NB_TH_SLOT*3)+1);
-    for (int i=0; i
Date: Fri, 19 Mar 2021 01:49:55 +0100
Subject: [PATCH 104/579] Fixed do-ra bug

---
 executables/nr-ue.c                         | 29 ++++++++++++---------
 openair1/SCHED_NR_UE/phy_procedures_nr_ue.c |  5 ----
 2 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/executables/nr-ue.c b/executables/nr-ue.c
index 533004a414..b29374cc03 100644
--- a/executables/nr-ue.c
+++ b/executables/nr-ue.c
@@ -402,22 +402,27 @@ void processSlotRX(void *arg) {
   }
 
   if (tx_slot_type == NR_UPLINK_SLOT || tx_slot_type == NR_MIXED_SLOT){
-    if (get_softmodem_params()->usim_test==0) {
-      pucch_procedures_ue_nr(UE,
-                             gNB_id,
-                             proc,
-                             FALSE);
+    if (UE->UE_mode[gNB_id] <= PUSCH) {
+      if (get_softmodem_params()->usim_test==0) {
+        pucch_procedures_ue_nr(UE,
+                               gNB_id,
+                               proc,
+                               FALSE);
+      }
+
+      LOG_D(PHY, "Sending Uplink data \n");
+      nr_ue_pusch_common_procedures(UE,
+                                    proc->nr_slot_tx,
+                                    &UE->frame_parms,1);
     }
 
-    LOG_D(PHY, "Sending Uplink data \n");
-    nr_ue_pusch_common_procedures(UE,
-                                  proc->nr_slot_tx,
-                                  &UE->frame_parms,1);
-
-    ue_ta_procedures(UE, proc->nr_slot_tx, proc->frame_tx);
-
+    if (UE->UE_mode[gNB_id] > NOT_SYNCHED && UE->UE_mode[gNB_id] < PUSCH) {
+      nr_ue_prach_procedures(UE, proc, gNB_id);
+    }
+    LOG_D(PHY,"****** end TX-Chain for AbsSubframe %d.%d ******\n", proc->frame_tx, proc->nr_slot_tx);
   }
 
+  ue_ta_procedures(UE, proc->nr_slot_tx, proc->frame_tx);
 }
 
 void dummyWrite(PHY_VARS_NR_UE *UE,openair0_timestamp timestamp, int writeBlockSize) {
diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
index d790159972..655f5939a2 100644
--- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
@@ -284,11 +284,6 @@ void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue,
 
   }
 
-  if (ue->UE_mode[gNB_id] > NOT_SYNCHED && ue->UE_mode[gNB_id] < PUSCH) {
-    nr_ue_prach_procedures(ue, proc, gNB_id);
-  }
-  LOG_D(PHY,"****** end TX-Chain for AbsSubframe %d.%d ******\n", frame_tx, slot_tx);
-
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX, VCD_FUNCTION_OUT);
 #if UE_TIMING_TRACE
   stop_meas(&ue->phy_proc_tx);

From e6ead93ad1d175ad32884a4bfb89f235bf511af1 Mon Sep 17 00:00:00 2001
From: Raymond Knopp 
Date: Thu, 25 Mar 2021 07:32:58 +0100
Subject: [PATCH 105/579] removed 3 warnings in lte-softmodem

---
 openair1/PHY/LTE_ESTIMATION/freq_equalization.c | 1 +
 openair1/PHY/LTE_TRANSPORT/if4_tools.c          | 1 +
 targets/ARCH/iqplayer/iqplayer_lib.c            | 2 ++
 3 files changed, 4 insertions(+)

diff --git a/openair1/PHY/LTE_ESTIMATION/freq_equalization.c b/openair1/PHY/LTE_ESTIMATION/freq_equalization.c
index 4f561238c6..6d382bdd63 100644
--- a/openair1/PHY/LTE_ESTIMATION/freq_equalization.c
+++ b/openair1/PHY/LTE_ESTIMATION/freq_equalization.c
@@ -21,6 +21,7 @@
 
 #include "PHY/defs_eNB.h"
 #include "PHY/sse_intrin.h"
+#include "PHY/LTE_ESTIMATION/lte_estimation.h"
 
 // This is 4096/(1:4096) in __m128i format
 __m128i inv_ch[4096];/* = {512,512,512,512,512,512,512,512,
diff --git a/openair1/PHY/LTE_TRANSPORT/if4_tools.c b/openair1/PHY/LTE_TRANSPORT/if4_tools.c
index 8ec8713394..09c0b4ba0f 100644
--- a/openair1/PHY/LTE_TRANSPORT/if4_tools.c
+++ b/openair1/PHY/LTE_TRANSPORT/if4_tools.c
@@ -36,6 +36,7 @@
 #include "PHY/TOOLS/alaw_lut.h"
 //#include "PHY/phy_extern.h"
 //#include "SCHED/sched_eNB.h"
+lte_subframe_t subframe_select(LTE_DL_FRAME_PARMS *frame_parms,uint8_t subframe);
 
 //#include "targets/ARCH/ETHERNET/USERSPACE/LIB/if_defs.h"
 #include "targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.h"
diff --git a/targets/ARCH/iqplayer/iqplayer_lib.c b/targets/ARCH/iqplayer/iqplayer_lib.c
index c4133d1b11..bcdb558787 100644
--- a/targets/ARCH/iqplayer/iqplayer_lib.c
+++ b/targets/ARCH/iqplayer/iqplayer_lib.c
@@ -25,7 +25,9 @@
  */
 #define _LARGEFILE_SOURCE
 #define _FILE_OFFSET_BITS 64
+#ifndef NB_ANTENNAS_RX
 #define NB_ANTENNAS_RX  2
+#endif
 #include 
 #include 
 #include 

From cbd000e02d02d221b7c9242835f02d5b0ee31b82 Mon Sep 17 00:00:00 2001
From: Sakthivel Velumani 
Date: Mon, 29 Mar 2021 16:30:19 +0200
Subject: [PATCH 106/579] Improved the 'non-stop' feature

---
 executables/nr-ue.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/executables/nr-ue.c b/executables/nr-ue.c
index b29374cc03..7b2c8cd96e 100644
--- a/executables/nr-ue.c
+++ b/executables/nr-ue.c
@@ -567,11 +567,15 @@ void *UE_thread(void *arg) {
     pushNotifiedFIFO(&txFifo, newNotifiedFIFO_elt(sizeof(nr_rxtx_thread_data_t), TX_JOB_ID,&txFifo,processSlotTX));
   }
 
-
-
   while (!oai_exit) {
     if (UE->lost_sync) {
-      abortTpool(&(get_nrUE_params()->Tpool),RX_JOB_ID);
+      notifiedFIFO_elt_t *res;
+      int nb = abortTpool(&(get_nrUE_params()->Tpool),RX_JOB_ID);
+      nb += abortNotifiedFIFO(&nf, RX_JOB_ID);
+      LOG_I(PHY,"Number of aborted slots %d\n",nb);
+      for (int i=0; iis_synchronized = 0;
       UE->lost_sync = 0;
     }

From 4c76c4fb1e8705fae421831b3ceb7c21054d4950 Mon Sep 17 00:00:00 2001
From: Sakthivel Velumani 
Date: Mon, 29 Mar 2021 16:30:55 +0200
Subject: [PATCH 107/579] Fixed sending ack for false retrans

---
 openair1/SCHED_NR_UE/fapi_nr_ue_l1.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
index e70c353589..e4af23d948 100644
--- a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
+++ b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
@@ -125,6 +125,8 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
               // dlsch0_harq->status not ACTIVE may be due to false retransmission. Reset the 
               // following flag to skip PDSCH procedures in that case.
               dlsch0->active = 0;
+              dlsch0_harq->harq_ack.ack = 1;
+              dlsch0_harq->harq_ack.send_harq_status = 1;
             }
             dlsch0_harq->harq_ack.vDAI_DL = dlsch_config_pdu->dai;
             /* PTRS */

From cefa6918fa7257eb1d2c5d8acf0ac7b2744dfad6 Mon Sep 17 00:00:00 2001
From: Sakthivel Velumani 
Date: Mon, 29 Mar 2021 16:43:50 +0200
Subject: [PATCH 108/579] Enabled a error log on PUCCH

---
 openair1/SCHED_NR_UE/pucch_uci_ue_nr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
index edb070f873..89ce26a711 100644
--- a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
+++ b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
@@ -788,7 +788,7 @@ uint8_t get_downlink_ack(PHY_VARS_NR_UE *ue, uint8_t gNB_id,  UE_nr_rxtx_proc_t
             LOG_E(PHY,"PUCCH Downlink DAI has an invalid value : at line %d in function %s of file %s \n", LINE_FILE , __func__, FILE_NAME);
           }
           else if (harq_status->send_harq_status == 0) {
-            LOG_D(PHY,"PUCCH Downlink ack can not be transmitted : at line %d in function %s of file %s \n", LINE_FILE , __func__, FILE_NAME);
+            LOG_E(PHY,"PUCCH Downlink ack can not be transmitted : at line %d in function %s of file %s \n", LINE_FILE , __func__, FILE_NAME);
           }
           else {
 

From 2686ffb39bb215ad91ba7aacda97223269ecb47a Mon Sep 17 00:00:00 2001
From: Sakthivel Velumani 
Date: Mon, 29 Mar 2021 21:36:52 +0200
Subject: [PATCH 109/579] Bugfix in last commit

---
 executables/nr-ue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/executables/nr-ue.c b/executables/nr-ue.c
index 7b2c8cd96e..a87731438b 100644
--- a/executables/nr-ue.c
+++ b/executables/nr-ue.c
@@ -573,7 +573,7 @@ void *UE_thread(void *arg) {
       int nb = abortTpool(&(get_nrUE_params()->Tpool),RX_JOB_ID);
       nb += abortNotifiedFIFO(&nf, RX_JOB_ID);
       LOG_I(PHY,"Number of aborted slots %d\n",nb);
-      for (int i=0; iis_synchronized = 0;

From e63212bdf31fe9e99425c8c0056231a4090dc70d Mon Sep 17 00:00:00 2001
From: Sakthivel Velumani 
Date: Mon, 29 Mar 2021 21:37:32 +0200
Subject: [PATCH 110/579] Bugfix in PUSCH schedule Fixes one of the assertions
 when there is false DCI detecteted

---
 openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
index 194df8101f..5ff8a8cee2 100644
--- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
@@ -984,7 +984,7 @@ int nr_ue_pusch_scheduler(NR_UE_MAC_INST_t *mac,
   struct NR_PUSCH_TimeDomainResourceAllocationList *pusch_TimeDomainAllocationList = ubwp->bwp_Common->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList;
   // k2 as per 3GPP TS 38.214 version 15.9.0 Release 15 ch 6.1.2.1.1
   // PUSCH time domain resource allocation is higher layer configured from uschTimeDomainAllocationList in either pusch-ConfigCommon
-  uint8_t k2;
+  int k2;
 
   if (is_Msg3) {
     k2 = *pusch_TimeDomainAllocationList->list.array[tda_id]->k2;

From 2738f7669a95a87df7d2158a8322591f97175d96 Mon Sep 17 00:00:00 2001
From: Sakthivel Velumani 
Date: Mon, 29 Mar 2021 23:48:00 +0200
Subject: [PATCH 111/579] Fixed warnings

---
 executables/nr-ue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/executables/nr-ue.c b/executables/nr-ue.c
index a87731438b..87df487c28 100644
--- a/executables/nr-ue.c
+++ b/executables/nr-ue.c
@@ -28,6 +28,7 @@
 #include "SCHED_NR_UE/defs.h"
 #include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
 #include "executables/softmodem-common.h"
+#include "SCHED_NR_UE/pucch_uci_ue_nr.h"
 
 /*
  *  NR SLOT PROCESSING SEQUENCE
@@ -569,7 +570,6 @@ void *UE_thread(void *arg) {
 
   while (!oai_exit) {
     if (UE->lost_sync) {
-      notifiedFIFO_elt_t *res;
       int nb = abortTpool(&(get_nrUE_params()->Tpool),RX_JOB_ID);
       nb += abortNotifiedFIFO(&nf, RX_JOB_ID);
       LOG_I(PHY,"Number of aborted slots %d\n",nb);

From 576df554506a3a5342643e86ce13a25f81ae6c6c Mon Sep 17 00:00:00 2001
From: Robert Schmidt 
Date: Fri, 26 Mar 2021 10:57:23 +0100
Subject: [PATCH 112/579] Merge remote-tracking branch 'origin/fix_NR_DLUL_PF'
 into integration_2021_wk12

---
 .../gnb.band66.tm1.106PRB.usrpn300.conf       |  41 +-
 .../gnb.band78.tm1.106PRB.usrpn300.conf       |  41 +-
 .../gnb.band78.tm1.fr1.106PRB.usrpb210.conf   |  44 +-
 doc/SW_archi.md                               |  70 +-
 executables/nr-softmodem-common.h             |   8 +-
 executables/nr-softmodem.c                    |   2 -
 executables/nr-softmodem.h                    |  14 +-
 openair1/SCHED_NR/phy_procedures_nr_gNB.c     |   2 +-
 openair1/SIMULATION/NR_PHY/dlsim.c            |  50 +-
 openair1/SIMULATION/NR_PHY/pbchsim.c          |   1 +
 openair2/LAYER2/NR_MAC_COMMON/nr_mac.h        |   8 +-
 openair2/LAYER2/NR_MAC_UE/mac_defs.h          |   2 +
 .../NR_MAC_UE/nr_ue_dci_configuration.c       |   9 +-
 openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c  |   4 +-
 openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c   |   7 +-
 openair2/LAYER2/NR_MAC_gNB/config.c           |  41 ++
 openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c    |  81 +--
 openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c |  10 +
 .../LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c     |  67 +-
 .../LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c   | 519 ++++++++------
 .../LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c | 124 ++--
 .../NR_MAC_gNB/gNB_scheduler_primitives.c     | 153 +++-
 .../LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c     | 120 ++--
 .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c   | 672 ++++++++++++------
 openair2/LAYER2/NR_MAC_gNB/mac_proto.h        |  85 ++-
 openair2/LAYER2/NR_MAC_gNB/main.c             |   4 +-
 openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h       | 148 ++--
 openair2/RRC/NR/rrc_gNB_reconfig.c            |   6 +-
 .../CONF/gnb.band257.tm1.32PRB.usrpx300.conf  |  40 +-
 .../CONF/gnb.band257.tm1.66PRB.usrpn300.conf  |  36 +-
 .../CONF/gnb.band261.tm1.32PRB.usrpn300.conf  |  40 +-
 .../CONF/gnb.band66.tm1.106PRB.usrpn300.conf  |  41 +-
 .../CONF/gnb.band66.tm1.106PRB.usrpx300.conf  |  41 +-
 .../gnb.band78.106PRB.30kHz,usrpb2x0.conf     |  37 +-
 .../CONF/gnb.band78.106PRB.slave.conf         |  44 +-
 .../CONF/gnb.band78.slave.conf                |  37 +-
 .../CONF/gnb.band78.tm1.106PRB.usrpb210.conf  |  37 +-
 .../CONF/gnb.band78.tm1.106PRB.usrpn300.conf  |  41 +-
 .../CONF/gnb.band78.tm1.106PRB.usrpx300.conf  |  40 +-
 .../CONF/gnb.band78.tm1.217PRB.usrpn300.conf  |  43 +-
 .../CONF/gnb.band78.tm1.217PRB.usrpx300.conf  |  42 +-
 .../CONF/gnb.band78.tm1.273PRB.usrpn300.conf  |  43 +-
 .../GENERIC-LTE-EPC/CONF/testing_gnb.conf     |  44 +-
 .../CONF/testing_gnb_n310.conf                |  44 +-
 .../gnb.sa.band41.fr1.106PRB.usrpb210.conf    |  46 +-
 .../gnb.sa.band78.fr1.106PRB.usrpb210.conf    |  41 +-
 46 files changed, 1660 insertions(+), 1410 deletions(-)

diff --git a/ci-scripts/conf_files/gnb.band66.tm1.106PRB.usrpn300.conf b/ci-scripts/conf_files/gnb.band66.tm1.106PRB.usrpn300.conf
index 32de0aa4f5..5c004e67e4 100644
--- a/ci-scripts/conf_files/gnb.band66.tm1.106PRB.usrpn300.conf
+++ b/ci-scripts/conf_files/gnb.band66.tm1.106PRB.usrpn300.conf
@@ -55,27 +55,14 @@ gNBs =
         initialDLBWPsearchSpaceZero                                             = 0;
       #pdsch-ConfigCommon
         #pdschTimeDomainAllocationList (up to 16 entries)
-             initialDLBWPk0_0                    = 0;
-             #initialULBWPmappingType
-       #0=typeA,1=typeB
-             initialDLBWPmappingType_0           = 0;
-             #this is SS=1,L=13
-             initialDLBWPstartSymbolAndLength_0  = 40;
+        initialDLBWPk0_0                    = 0;  #for DL slot
+        initialDLBWPmappingType_0           = 0;  #0=typeA,1=typeB
+        initialDLBWPstartSymbolAndLength_0  = 40; #this is SS=1,L=13
 
-             initialDLBWPk0_1                    = 0;
-             initialDLBWPmappingType_1           = 0;
-             #this is SS=2,L=12
-             initialDLBWPstartSymbolAndLength_1  = 53;
+        initialDLBWPk0_3                    = 0;  #for mixed slot
+        initialDLBWPmappingType_3           = 0;
+        initialDLBWPstartSymbolAndLength_3  = 57; #this is SS=1,L=5
 
-             initialDLBWPk0_2                    = 0;
-             initialDLBWPmappingType_2           = 0;
-             #this is SS=1,L=12
-             initialDLBWPstartSymbolAndLength_2  = 54;
-
-             initialDLBWPk0_3                    = 0;
-             initialDLBWPmappingType_3           = 0;
-             #this is SS=1,L=4
-             initialDLBWPstartSymbolAndLength_3  = 57;
   #uplinkConfigCommon
      #frequencyInfoUL
       ul_frequencyBand                                                 = 66;
@@ -131,20 +118,18 @@ gNBs =
 # 0=unrestricted, 1=restricted type A, 2=restricted type B
         restrictedSetConfig                                         = 0,
       # pusch-ConfigCommon (up to 16 elements)
-        initialULBWPk2_0                      = 6;
+        initialULBWPk2_0                      = 6;  # used for UL slot
         initialULBWPmappingType_0             = 1
-        # this is SS=0 L=11
-        initialULBWPstartSymbolAndLength_0    = 55;
+        initialULBWPstartSymbolAndLength_0    = 55; # this is SS=0 L=12
 
-  initialULBWPk2_1                      = 6;
+        initialULBWPk2_1                      = 6;  # used for mixed slot
         initialULBWPmappingType_1             = 1;
-        # this is SS=0 L=12
-        initialULBWPstartSymbolAndLength_1    = 69;
+        initialULBWPstartSymbolAndLength_1    = 24; # this is SS=10 L=2
 
-        initialULBWPk2_2                      = 7;
+        initialULBWPk2_2                      = 7;  # used for Msg.3 during RA
         initialULBWPmappingType_2             = 1;
-        # this is SS=10 L=4
-        initialULBWPstartSymbolAndLength_2    = 52;
+        initialULBWPstartSymbolAndLength_2    = 52; # this is SS=10 L=4
+
         msg3_DeltaPreamble                                          = 1;
         p0_NominalWithGrant                                         =-90;
 
diff --git a/ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf b/ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf
index a11509a3f0..e2fdbc8448 100644
--- a/ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf
+++ b/ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf
@@ -56,27 +56,13 @@ gNBs =
         initialDLBWPsearchSpaceZero                                             = 0;
       #pdsch-ConfigCommon
         #pdschTimeDomainAllocationList (up to 16 entries)
-             initialDLBWPk0_0                    = 0;
-             #initialULBWPmappingType
-	     #0=typeA,1=typeB
-             initialDLBWPmappingType_0           = 0;
-             #this is SS=1,L=13
-             initialDLBWPstartSymbolAndLength_0  = 40;
+        initialDLBWPk0_0                    = 0;  #for DL slot
+        initialDLBWPmappingType_0           = 0;  #0=typeA,1=typeB
+        initialDLBWPstartSymbolAndLength_0  = 40; #this is SS=1,L=13
 
-             initialDLBWPk0_1                    = 0;
-             initialDLBWPmappingType_1           = 0;
-             #this is SS=2,L=12 
-             initialDLBWPstartSymbolAndLength_1  = 53;
-
-             initialDLBWPk0_2                    = 0;
-             initialDLBWPmappingType_2           = 0;
-             #this is SS=1,L=12 
-             initialDLBWPstartSymbolAndLength_2  = 54;
-
-             initialDLBWPk0_3                    = 0;
-             initialDLBWPmappingType_3           = 0;
-             #this is SS=1,L=5
-             initialDLBWPstartSymbolAndLength_3  = 57;
+        initialDLBWPk0_1                    = 0;  #for mixed slot
+        initialDLBWPmappingType_1           = 0;
+        initialDLBWPstartSymbolAndLength_1  = 57; #this is SS=1,L=5
 
   #uplinkConfigCommon 
      #frequencyInfoUL
@@ -132,20 +118,17 @@ gNBs =
         restrictedSetConfig                                         = 0,
 
       # pusch-ConfigCommon (up to 16 elements)
-        initialULBWPk2_0                      = 6;
+        initialULBWPk2_0                      = 6;  # used for UL slot
         initialULBWPmappingType_0             = 1
-        # this is SS=0 L=11
-        initialULBWPstartSymbolAndLength_0    = 55;
+        initialULBWPstartSymbolAndLength_0    = 55; # this is SS=0 L=12
 
-        initialULBWPk2_1                      = 6;
+        initialULBWPk2_1                      = 6;  # used for mixed slot
         initialULBWPmappingType_1             = 1;
-        # this is SS=0 L=12
-        initialULBWPstartSymbolAndLength_1    = 69;
+        initialULBWPstartSymbolAndLength_1    = 24; # this is SS=10 L=2
 
-        initialULBWPk2_2                      = 7;
+        initialULBWPk2_2                      = 7;  # used for Msg.3 during RA
         initialULBWPmappingType_2             = 1;
-        # this is SS=10 L=4
-        initialULBWPstartSymbolAndLength_2    = 52;
+        initialULBWPstartSymbolAndLength_2    = 52; # this is SS=10 L=4
 
         msg3_DeltaPreamble                                          = 1;
         p0_NominalWithGrant                                         =-90;
diff --git a/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf b/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf
index daee5486c1..8d2f490dc3 100644
--- a/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf
+++ b/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf
@@ -57,27 +57,14 @@ gNBs =
         initialDLBWPsearchSpaceZero                                             = 0;
       #pdsch-ConfigCommon
         #pdschTimeDomainAllocationList (up to 16 entries)
-             initialDLBWPk0_0                    = 0;
-             #initialULBWPmappingType
-       #0=typeA,1=typeB
-             initialDLBWPmappingType_0           = 0;
-             #this is SS=1,L=13
-             initialDLBWPstartSymbolAndLength_0  = 40;
+        initialDLBWPk0_0                    = 0;  #for DL slot
+        initialDLBWPmappingType_0           = 0;  #0=typeA,1=typeB
+        initialDLBWPstartSymbolAndLength_0  = 40; #this is SS=1,L=13
 
-             initialDLBWPk0_1                    = 0;
-             initialDLBWPmappingType_1           = 0;
-             #this is SS=2,L=12 
-             initialDLBWPstartSymbolAndLength_1  = 53;
+        initialDLBWPk0_1                    = 0;  #for mixed slot
+        initialDLBWPmappingType_1           = 0;
+        initialDLBWPstartSymbolAndLength_1  = 57; #this is SS=1,L=5
 
-             initialDLBWPk0_2                    = 0;
-             initialDLBWPmappingType_2           = 0;
-             #this is SS=1,L=12 
-             initialDLBWPstartSymbolAndLength_2  = 54;
-
-             initialDLBWPk0_3                    = 0;
-             initialDLBWPmappingType_3           = 0;
-             #this is SS=1,L=4 //5 (4 is for 43, 5 is for 57)
-             initialDLBWPstartSymbolAndLength_3  = 57; //43; //57;
   #uplinkConfigCommon 
      #frequencyInfoUL
       ul_frequencyBand                                                 = 78;
@@ -132,20 +119,17 @@ gNBs =
 # 0=unrestricted, 1=restricted type A, 2=restricted type B
         restrictedSetConfig                                         = 0,
       # pusch-ConfigCommon (up to 16 elements)
-        initialULBWPk2_0                      = 2;
+        initialULBWPk2_0                      = 2;  # used for UL slot
         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;
+        initialULBWPstartSymbolAndLength_0    = 55; # this is SS=0 L=12
 
-        initialULBWPk2_2                      = 7;
+        initialULBWPk2_1                      = 2;  # used for mixed slot
+        initialULBWPmappingType_1             = 1;
+        initialULBWPstartSymbolAndLength_1    = 24; # this is SS=10 L=2
+
+        initialULBWPk2_2                      = 7;  # used for Msg.3 during RA
         initialULBWPmappingType_2             = 1;
-        # this is SS=10 L=4
-        initialULBWPstartSymbolAndLength_2    = 52;
+        initialULBWPstartSymbolAndLength_2    = 52; # this is SS=10 L=4
 
         msg3_DeltaPreamble                                          = 1;
         p0_NominalWithGrant                                         =-90;
diff --git a/doc/SW_archi.md b/doc/SW_archi.md
index d92f802148..a82043fd10 100644
--- a/doc/SW_archi.md
+++ b/doc/SW_archi.md
@@ -171,24 +171,31 @@ NR_sched_pusch_t (for values changing every TTI, e.g., frequency domain
 allocation) and NR_sched_pusch_save_t (for values changing less frequently, at
 least in FR1 [to my understanding], e.g., DMRS fields when the time domain
 allocation stays between TTIs) structures. Furthermore, the preprocessor is an
-exchangeable module that might schedule differently, e.g., one user for
-phytest, multiple users in FR1, or maybe FR2: phytest is in
-nr_ul_preprocessor_phytest(), for FR1 is nr_simple_ulsch_preprocessor() [under
-development], for FR2 does not exist yet.
+exchangeable module that schedules differently based on a particular
+use-case/deployment type, e.g., one user for phytest [in
+nr_ul_preprocessor_phytest()], multiple users in FR1
+[nr_fr1_ulsch_preprocessor()], or maybe FR2 [does not exist yet]:
 * calls preprocessor via pre_processor_ul(): the preprocessor is responsible
-  for allocating CCEs (using allocate_nr_CCEs()). Note that we do not yet have
-  scheduling requests or buffer status reports, and only one UE. E.g.,
-  nr_simple_ulsch_preprocessor():
+  for allocating CCEs (using allocate_nr_CCEs()) and deciding on resource
+  allocation for the UEs including TB size. Note that we do not yet have
+  scheduling requests. What it typically does:
   1)  check whether the current frame/slot plus K2 is an UL slot, and return if
       not.
   2)  Find first free start RB in vrb_map_UL, and as many free consecutive RBs
       as possible.
-  3)  allocate a CCE for the UE (and return if it is not possible)
-  4)  Calculate DMRS stuff (nr_save_pusch_fields()) and the TBS.
-  5)  Mark used resources in vrb_map_UL.
-* loop through all users: get a free HARQ PID and
-  update statistics. Fill nFAPI structures directly for PUSCH, and call
-  config_uldci() and fill_dci_pdu_rel15() for DCI filling and PDCCH messages.
+  3)  Either set up resource allocation directly (e.g., for a single UE,
+      phytest), or call into a function to perform actual resource allocation.
+      Currently, this is done using pf_ul() which implements a basic
+      proportional fair scheduler:
+      * for every UE, check for retransmission and allocate as necessary
+      * Calculate DMRS stuff (nr_set_pusch_semi_static())
+      * Calculate the PF coefficient and put eligible UEs into a list
+      * Allocate resources to the UE(s) with the highest coefficient
+  4)  Mark used resources in vrb_map_UL.
+* loop through all users: get a HARQ process as indicated through the
+  preprocessor, update statistics, fill nFAPI structures directly for PUSCH,
+  and call config_uldci() and fill_dci_pdu_rel15() for DCI filling and PDCCH
+  messages.
 
 Calls nr_schedule_ue_spec(). It is divided into the "preprocessor" and the
 "postprocessor": the first makes the scheduling decisions, the second fills
@@ -196,29 +203,28 @@ nFAPI structures to indicate to the PHY what it is supposed to do. To signal
 which users have how many resources, the preprocessor populates the
 NR_UE_sched_ctrl_t structure of affected users. In particular, the field rbSize
 decides whether a user is to be allocated. Furthermore, the preprocessor is an
-exchangeable module that might schedule differently, e.g., one user for
-phytest, multiple users in FR1, or maybe FR2: phytest is in
-nr_preprocessor_phytest(), for FR1 is nr_simple_dlsch_preprocessor() [under
-development], for FR2 does not exist yet.
+exchangeable module that schedules differently based on a particular
+use-case/deployment type, e.g., one user for phytest [in
+nr_preprocessor_phytest()], multiple users in FR1
+[nr_fr1_dlsch_preprocessor()], or maybe FR2 [does not exist yet].
 * calls preprocessor via pre_processor_dl(): the preprocessor is responsible
   for allocating CCEs and PUCCH (using allocate_nr_CCEs() and
   nr_acknack_scheduling()) and deciding on the frequency/time domain
-  allocation. E.g., nr_simple_dlsch_preprocessor():
-  1)  mac_rlc_status_ind() locks and checks directly inside rlc data the
-      quantity of waiting data.
-  2)  return from the preprocessor if there is no data and no timing advance to
-      send,
-  3)  otherwise, allocate a CCE for the UE (and return if it is not possible)
-  4)  find a PUCCH occasion for HARQ
-  5a) check if there is a retransmission: if yes, find free resources to
-      transmit using the same resources, else
-  5b) calculate the necessary RBs needed to get a TBS large enough to hold all
-      data, or until no more resources are available
-  6)  Mark taken resources in the vrb_map
+  allocation including the TB size. What it typically does:
+  1)  Check available resources in the vrb_map
+  2)  Checks the quantity of waiting data in RLC
+  3)  Either set up resource allocation directly (e.g., for a single UE,
+      phytest), or call into a function to perform actual resource allocation.
+      Currently, this is done using pf_dl() which implements a basic
+      proportional fair scheduler:
+      * for every UE, check for retransmission and allocate as necessary
+      * Calculate the PF coefficient and put eligible UEs into a list
+      * Allocate resources to the UE(s) with the highest coefficient
+  4)  Mark taken resources in the vrb_map
 * loop through all users: check if a new TA is necessary. Then, if a user has
-  allocated resources, compute its TBS, and fill nFAPI structures
-  (nr_fill_nfapi_dl_pdu() to populate what should be done by the lower layers
-  to make the Tx subframe). Update statistics (round, sent bytes).
+  allocated resources, update statistics (round, sent bytes), update HARQ
+  process information, and fill nFAPI structures (allocate a DCI and PDCCH
+  messages, TX_req, ...)
 
 # RRC
 RRC is a regular thread with itti loop on queue: TASK_RRC_GNB
diff --git a/executables/nr-softmodem-common.h b/executables/nr-softmodem-common.h
index 500819e684..813ffcf8fa 100644
--- a/executables/nr-softmodem-common.h
+++ b/executables/nr-softmodem-common.h
@@ -68,11 +68,15 @@
 #define CONFIG_HLP_SOFTS         "Enable soft scope and L1 and L2 stats (Xforms)\n"
 #define CONFIG_HLP_EXMCAL        "Calibrate the EXMIMO borad, available files: exmimo2_2arxg.lime exmimo2_2brxg.lime \n"
 #define CONFIG_HLP_ITTIL         "Generate ITTI analyzser logs (similar to wireshark logs but with more details)\n"
-#define CONFIG_HLP_DLMCS         "Set the maximum downlink MCS\n"
+#define CONFIG_HLP_DLMCS_PHYTEST "Set the downlink MCS for PHYTEST mode\n"
 #define CONFIG_HLP_STMON         "Enable processing timing measurement of lte softmodem on per subframe basis \n"
 #define CONFIG_HLP_PRB           "Set the PRB, valid values: 6, 25, 50, 100  \n"
 #define CONFIG_HLP_MSLOTS        "Skip the missed slots/subframes \n"
-#define CONFIG_HLP_ULMCS         "Set the maximum uplink MCS\n"
+#define CONFIG_HLP_ULMCS_PHYTEST "Set the uplink MCS for PHYTEST mode\n"
+#define CONFIG_HLP_DLBW_PHYTEST  "Set the number of PRBs used for DLSCH in PHYTEST mode\n"
+#define CONFIG_HLP_ULBW_PHYTEST  "Set the number of PRBs used for ULSCH in PHYTEST mode\n"
+#define CONFIG_HLP_DLBM_PHYTEST  "Bitmap for DLSCH slots (slot 0 starts at LSB)\n"
+#define CONFIG_HLP_ULBM_PHYTEST  "Bitmap for ULSCH slots (slot 0 starts at LSB)\n"
 #define CONFIG_HLP_TDD           "Set hardware to TDD mode (default: FDD). Used only with -U (otherwise set in config file).\n"
 #define CONFIG_HLP_UE            "Set the lte softmodem as a UE\n"
 #define CONFIG_HLP_L2MONW        "Enable L2 wireshark messages on localhost \n"
diff --git a/executables/nr-softmodem.c b/executables/nr-softmodem.c
index 63c06563d2..a29295ff52 100644
--- a/executables/nr-softmodem.c
+++ b/executables/nr-softmodem.c
@@ -160,8 +160,6 @@ int otg_enabled;
 
 //static NR_DL_FRAME_PARMS      *frame_parms[MAX_NUM_CCs];
 //static nfapi_nr_config_request_t *config[MAX_NUM_CCs];
-uint32_t target_dl_mcs = 28; //maximum allowed mcs
-uint32_t target_ul_mcs = 20;
 uint32_t timing_advance = 0;
 uint64_t num_missed_slots=0; // counter for the number of missed slots
 
diff --git a/executables/nr-softmodem.h b/executables/nr-softmodem.h
index d6cfe6b906..62c7328144 100644
--- a/executables/nr-softmodem.h
+++ b/executables/nr-softmodem.h
@@ -23,14 +23,24 @@
     {"A" ,                    CONFIG_HLP_TADV,        0,                uptr:&timing_advance,               defintval:0,                   TYPE_UINT,   0},        \
     {"E" ,                    CONFIG_HLP_TQFS,        PARAMFLAG_BOOL,   i8ptr:&threequarter_fs,             defintval:0,                   TYPE_INT8,   0},        \
     {"K" ,                    CONFIG_HLP_ITTIL,       PARAMFLAG_NOFREE, strptr:&itti_dump_file,             defstrval:"/tmp/itti.dump",    TYPE_STRING, 0},        \
-    {"m" ,                    CONFIG_HLP_DLMCS,       0,                uptr:&target_dl_mcs,                defintval:0,                   TYPE_UINT,   0},        \
-    {"t" ,                    CONFIG_HLP_ULMCS,       0,                uptr:&target_ul_mcs,                defintval:0,                   TYPE_UINT,   0},        \
+    {"m" ,                    CONFIG_HLP_DLMCS_PHYTEST,0,               uptr:&target_dl_mcs,                defintval:0,                   TYPE_UINT,   0},        \
+    {"t" ,                    CONFIG_HLP_ULMCS_PHYTEST,0,               uptr:&target_ul_mcs,                defintval:0,                   TYPE_UINT,   0},        \
+    {"M" ,                    CONFIG_HLP_DLBW_PHYTEST,0,                uptr:&target_dl_bw,                 defintval:0,                   TYPE_UINT,   0},        \
+    {"T" ,                    CONFIG_HLP_ULBW_PHYTEST,0,                uptr:&target_ul_bw,                 defintval:0,                   TYPE_UINT,   0},        \
+    {"D" ,                    CONFIG_HLP_DLBM_PHYTEST,0,                u64ptr:&dlsch_slot_bitmap,          defintval:0,                   TYPE_UINT64, 0},        \
+    {"U" ,                    CONFIG_HLP_ULBM_PHYTEST,0,                u64ptr:&ulsch_slot_bitmap,          defintval:0,                   TYPE_UINT64, 0},        \
     {"usrp-tx-thread-config", CONFIG_HLP_USRP_THREAD, 0,                iptr:&usrp_tx_thread,               defstrval:0,                   TYPE_INT,    0},        \
     {"s" ,                    CONFIG_HLP_SNR,         0,                dblptr:&snr_dB,                     defdblval:25,                  TYPE_DOUBLE, 0},        \
   }
 
 #include "threads_t.h"
 extern threads_t threads;
+extern uint32_t target_dl_mcs;
+extern uint32_t target_ul_mcs;
+extern uint32_t target_dl_bw;
+extern uint32_t target_ul_bw;
+extern uint64_t dlsch_slot_bitmap;
+extern uint64_t ulsch_slot_bitmap;
 
 // In nr-gnb.c
 extern void init_gNB(int single_thread_flag,int wait_for_sync);
diff --git a/openair1/SCHED_NR/phy_procedures_nr_gNB.c b/openair1/SCHED_NR/phy_procedures_nr_gNB.c
index 674ae82cc3..f49bd114c9 100644
--- a/openair1/SCHED_NR/phy_procedures_nr_gNB.c
+++ b/openair1/SCHED_NR/phy_procedures_nr_gNB.c
@@ -666,7 +666,7 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
 	  start_meas(&gNB->rx_pusch_stats);
 	  for(uint8_t symbol = symbol_start; symbol < symbol_end; symbol++) {
 	    no_sig = nr_rx_pusch(gNB, ULSCH_id, frame_rx, slot_rx, symbol, harq_pid);
-            if (no_sig) {
+            if (no_sig && (get_softmodem_params()->phy_test == 0)) {
               LOG_I(PHY, "PUSCH not detected in symbol %d\n",symbol);
               nr_fill_indication(gNB,frame_rx, slot_rx, ULSCH_id, harq_pid, 1);
               return;
diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c
index 9614b4b649..a2ece67f31 100644
--- a/openair1/SIMULATION/NR_PHY/dlsim.c
+++ b/openair1/SIMULATION/NR_PHY/dlsim.c
@@ -228,13 +228,38 @@ void nr_dlsim_preprocessor(module_id_t module_id,
       sched_ctrl->active_bwp, sched_ctrl->search_space, 1 /* dedicated */);
   sched_ctrl->cce_index = 0;
 
-  sched_ctrl->rbStart = g_rbStart;
-  sched_ctrl->rbSize = g_rbSize;
-  sched_ctrl->mcs = g_mcsIndex;
-  sched_ctrl->time_domain_allocation = 2;
-  sched_ctrl->mcsTableIdx = g_mcsTableIdx;
+  NR_pdsch_semi_static_t *ps = &sched_ctrl->pdsch_semi_static;
+  const NR_ServingCellConfigCommon_t *scc = RC.nrmac[0]->common_channels[0].ServingCellConfigCommon;
+  nr_set_pdsch_semi_static(scc,
+                           UE_info->secondaryCellGroup[0],
+                           sched_ctrl->active_bwp,
+                           /* tda = */ 2,
+                           /* num_dmrs_cdm_grps_no_data = */ 1,
+                           ps);
+
+  NR_sched_pdsch_t *sched_pdsch = &sched_ctrl->sched_pdsch;
+  sched_pdsch->rbStart = g_rbStart;
+  sched_pdsch->rbSize = g_rbSize;
+  sched_pdsch->mcs = g_mcsIndex;
+  /* the following might override the table that is mandated by RRC
+   * configuration */
+  ps->mcsTableIdx = g_mcsTableIdx;
+
+  sched_pdsch->Qm = nr_get_Qm_dl(sched_pdsch->mcs, ps->mcsTableIdx);
+  sched_pdsch->R = nr_get_code_rate_dl(sched_pdsch->mcs, ps->mcsTableIdx);
+  sched_pdsch->tb_size = nr_compute_tbs(sched_pdsch->Qm,
+                                        sched_pdsch->R,
+                                        sched_pdsch->rbSize,
+                                        ps->nrOfSymbols,
+                                        ps->N_PRB_DMRS * ps->N_DMRS_SLOT,
+                                        0 /* N_PRB_oh, 0 for initialBWP */,
+                                        0 /* tb_scaling */,
+                                        1 /* nrOfLayers */)
+                         >> 3;
+
   /* the simulator assumes the HARQ PID is equal to the slot number */
-  sched_ctrl->dl_harq_pid = slot;
+  sched_pdsch->dl_harq_pid = slot;
+
   /* The scheduler uses lists to track whether a HARQ process is
    * free/busy/awaiting retransmission, and updates the HARQ process states.
    * However, in the simulation, we never get ack or nack for any HARQ process,
@@ -247,11 +272,10 @@ void nr_dlsim_preprocessor(module_id_t module_id,
   else
     add_front_nr_list(&sched_ctrl->retrans_dl_harq, slot);   // ... make PID retransmission
   sched_ctrl->harq_processes[slot].is_waiting = false;
-  AssertFatal(sched_ctrl->rbStart >= 0, "invalid rbStart %d\n", sched_ctrl->rbStart);
-  AssertFatal(sched_ctrl->rbSize > 0, "invalid rbSize %d\n", sched_ctrl->rbSize);
-  AssertFatal(sched_ctrl->mcs >= 0, "invalid sched_ctrl->mcs %d\n", sched_ctrl->mcs);
-  AssertFatal(sched_ctrl->mcsTableIdx >= 0 && sched_ctrl->mcsTableIdx <= 2, "invalid sched_ctrl->mcsTableIdx %d\n", sched_ctrl->mcsTableIdx);
-  sched_ctrl->numDmrsCdmGrpsNoData = 1;
+  AssertFatal(sched_pdsch->rbStart >= 0, "invalid rbStart %d\n", sched_pdsch->rbStart);
+  AssertFatal(sched_pdsch->rbSize > 0, "invalid rbSize %d\n", sched_pdsch->rbSize);
+  AssertFatal(sched_pdsch->mcs >= 0, "invalid mcs %d\n", sched_pdsch->mcs);
+  AssertFatal(ps->mcsTableIdx >= 0 && ps->mcsTableIdx <= 2, "invalid mcsTableIdx %d\n", ps->mcsTableIdx);
 }
 
 
@@ -626,7 +650,6 @@ int main(int argc, char **argv)
     RC.nb_nr_mac_CC[i] = 1;
   mac_top_init_gNB();
   gNB_mac = RC.nrmac[0];
-  gNB_mac->pre_processor_dl = nr_dlsim_preprocessor;
   gNB_RRC_INST rrc;
   memset((void*)&rrc,0,sizeof(rrc));
 
@@ -714,6 +737,9 @@ int main(int argc, char **argv)
   rrc_mac_config_req_gNB(0,0,n_tx,1,pusch_tgt_snrx10,pucch_tgt_snrx10,scc,0,0,NULL);
   // UE dedicated configuration
   rrc_mac_config_req_gNB(0,0,n_tx,1,pusch_tgt_snrx10,pucch_tgt_snrx10,NULL,1,secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity,secondaryCellGroup);
+  // reset preprocessor to the one of DLSIM after it has been set during
+  // rrc_mac_config_req_gNB
+  gNB_mac->pre_processor_dl = nr_dlsim_preprocessor;
   phy_init_nr_gNB(gNB,0,0);
   N_RB_DL = gNB->frame_parms.N_RB_DL;
   NR_UE_info_t *UE_info = &RC.nrmac[0]->UE_info;
diff --git a/openair1/SIMULATION/NR_PHY/pbchsim.c b/openair1/SIMULATION/NR_PHY/pbchsim.c
index a3c2501197..276daee337 100644
--- a/openair1/SIMULATION/NR_PHY/pbchsim.c
+++ b/openair1/SIMULATION/NR_PHY/pbchsim.c
@@ -66,6 +66,7 @@ uint8_t const nr_rv_round_map[4] = {0, 2, 1, 3};
 uint8_t const nr_rv_round_map_ue[4] = {0, 2, 1, 3};
 
 uint64_t get_softmodem_optmask(void) {return 0;}
+softmodem_params_t *get_softmodem_params(void) {return 0;}
 
 void init_downlink_harq_status(NR_DL_UE_HARQ_t *dl_harq) {}
 
diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac.h b/openair2/LAYER2/NR_MAC_COMMON/nr_mac.h
index 381dce11b2..37bf8fdcb6 100644
--- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac.h
+++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac.h
@@ -148,10 +148,10 @@ typedef struct {
 // single Entry PHR MAC CE
 // TS 38.321 ch. 6.1.3.8
 typedef struct {
-  uint8_t PH: 6;
-  uint8_t R1: 2;
-  uint8_t PCMAX: 6;
-  uint8_t R2: 6;
+  uint8_t PH: 6;    // octet 1 [5:0]
+  uint8_t R1: 2;    // octet 1 [7:6]
+  uint8_t PCMAX: 6; // octet 2 [5:0]
+  uint8_t R2: 2;    // octet 2 [7:6]
 } __attribute__ ((__packed__)) NR_SINGLE_ENTRY_PHR_MAC_CE;
 
 
diff --git a/openair2/LAYER2/NR_MAC_UE/mac_defs.h b/openair2/LAYER2/NR_MAC_UE/mac_defs.h
index 3e299d291e..df2fdb3e3f 100755
--- a/openair2/LAYER2/NR_MAC_UE/mac_defs.h
+++ b/openair2/LAYER2/NR_MAC_UE/mac_defs.h
@@ -374,6 +374,8 @@ typedef struct {
   NR_SearchSpace_t *search_space_zero;
   NR_ControlResourceSet_t *coreset0;
 
+  dci_pdu_rel15_t def_dci_pdu_rel15[8];
+
 } NR_UE_MAC_INST_t;
 
 typedef enum seach_space_mask_e {
diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
index 11edc6c20d..64c8978ed0 100644
--- a/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
+++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
@@ -49,8 +49,6 @@
 
 // #define DEBUG_DCI
 
-dci_pdu_rel15_t *def_dci_pdu_rel15;
-
 void fill_dci_search_candidates(NR_SearchSpace_t *ss,fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15) {
 
   LOG_D(MAC,"Filling search candidates for DCI\n");
@@ -72,7 +70,6 @@ void config_dci_pdu(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_dci_dl_pdu_rel15_t
   uint16_t monitoringSymbolsWithinSlot = 0;
   uint8_t coreset_id = 1;
   int sps = 0;
-  def_dci_pdu_rel15 = calloc(1,2*sizeof(dci_pdu_rel15_t));
   AssertFatal(mac->scc != NULL, "scc is null\n");
   NR_BWP_Id_t bwp_id = mac->DL_BWP_Id;
   NR_ServingCellConfigCommon_t *scc = mac->scc;
@@ -135,7 +132,7 @@ void config_dci_pdu(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_dci_dl_pdu_rel15_t
     rel15->BWPStart = NRRIV2PRBOFFSET(bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
     rel15->SubcarrierSpacing = bwp_Common->genericParameters.subcarrierSpacing;
     for (int i = 0; i < rel15->num_dci_options; i++) {
-      rel15->dci_length_options[i] = nr_dci_size(scc, mac->scg, def_dci_pdu_rel15+i, rel15->dci_format_options[i], NR_RNTI_C, rel15->BWPSize, bwp_id);
+      rel15->dci_length_options[i] = nr_dci_size(scc, mac->scg, &mac->def_dci_pdu_rel15[rel15->dci_format_options[i]], rel15->dci_format_options[i], NR_RNTI_C, rel15->BWPSize, bwp_id);
     }
     break;
     case NR_RNTI_RA:
@@ -146,7 +143,7 @@ void config_dci_pdu(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_dci_dl_pdu_rel15_t
     rel15->BWPSize = NRRIV2BW(initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
     rel15->BWPStart = NRRIV2PRBOFFSET(bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); //NRRIV2PRBOFFSET(initialDownlinkBWP->genericParameters.locationAndBandwidth, 275);
     rel15->SubcarrierSpacing = initialDownlinkBWP->genericParameters.subcarrierSpacing;
-    rel15->dci_length_options[0] = nr_dci_size(scc, mac->scg, def_dci_pdu_rel15, rel15->dci_format_options[0], NR_RNTI_RA, rel15->BWPSize, bwp_id);
+    rel15->dci_length_options[0] = nr_dci_size(scc, mac->scg, &mac->def_dci_pdu_rel15[rel15->dci_format_options[0]], rel15->dci_format_options[0], NR_RNTI_RA, rel15->BWPSize, bwp_id);
     break;
     case NR_RNTI_P:
     break;
@@ -169,7 +166,7 @@ void config_dci_pdu(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_dci_dl_pdu_rel15_t
       rel15->SubcarrierSpacing = mac->mib->subCarrierSpacingCommon;
 
       for (int i = 0; i < rel15->num_dci_options; i++) {
-        rel15->dci_length_options[i] = nr_dci_size(scc, mac->scg, def_dci_pdu_rel15, rel15->dci_format_options[i], NR_RNTI_SI, rel15->BWPSize, 0);
+        rel15->dci_length_options[i] = nr_dci_size(scc, mac->scg, &mac->def_dci_pdu_rel15[rel15->dci_format_options[i]], rel15->dci_format_options[i], NR_RNTI_SI, rel15->BWPSize, 0);
       }
     break;
     case NR_RNTI_SFI:
diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
index cfcaac6c4b..4d9a6731a2 100644
--- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
@@ -449,9 +449,9 @@ int nr_ue_process_dci_indication_pdu(module_id_t module_id,int cc_id, int gNB_in
   LOG_D(MAC,"Received dci indication (rnti %x,dci format %d,n_CCE %d,payloadSize %d,payload %llx)\n",
 	dci->rnti,dci->dci_format,dci->n_CCE,dci->payloadSize,*(unsigned long long*)dci->payloadBits);
 
-  if (nr_extract_dci_info(mac, dci->dci_format, dci->payloadSize, dci->rnti, (uint64_t *)dci->payloadBits, def_dci_pdu_rel15))
+  if (nr_extract_dci_info(mac, dci->dci_format, dci->payloadSize, dci->rnti, (uint64_t *)dci->payloadBits, &mac->def_dci_pdu_rel15[dci->dci_format]))
     return -1;
-  return (nr_ue_process_dci(module_id, cc_id, gNB_index, frame, slot, def_dci_pdu_rel15, dci->rnti, dci->dci_format));
+  return (nr_ue_process_dci(module_id, cc_id, gNB_index, frame, slot, &mac->def_dci_pdu_rel15[dci->dci_format], dci->rnti, dci->dci_format));
 }
 
 int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, frame_t frame, int slot, dci_pdu_rel15_t *dci, uint16_t rnti, uint8_t dci_format){
diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
index 844ee95d32..cbf14a89ad 100644
--- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
@@ -913,10 +913,9 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
               //and block this traffic from being forwarded to the upper layers at the gNB
               LOG_D(PHY, "In %s: Random data to be transmitted: TBS_bytes %d \n", __FUNCTION__, TBS_bytes);
 
-              //Give the first byte a dummy value (a value not corresponding to any valid LCID based on 38.321, Table 6.2.1-2)
-              //in order to distinguish the PHY random packets at the MAC layer of the gNB receiver from the normal packets that should
-              //have a valid LCID (nr_process_mac_pdu function)
-              ulsch_input_buffer[0] = 0x31;
+              // Make the first byte padding so that gNB ignores the PHY random
+              // data in the TB for the PHY at the MAC layer
+              ulsch_input_buffer[0] = UL_SCH_LCID_PADDING;
 
               for (int i = 1; i < TBS_bytes; i++) {
                 ulsch_input_buffer[i] = (unsigned char) rand();
diff --git a/openair2/LAYER2/NR_MAC_gNB/config.c b/openair2/LAYER2/NR_MAC_gNB/config.c
index caa56bdff9..a67a71d0be 100644
--- a/openair2/LAYER2/NR_MAC_gNB/config.c
+++ b/openair2/LAYER2/NR_MAC_gNB/config.c
@@ -405,12 +405,53 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
 
     find_SSB_and_RO_available(Mod_idP);
 
+    const NR_TDD_UL_DL_Pattern_t *tdd = &scc->tdd_UL_DL_ConfigurationCommon->pattern1;
+    const int nr_mix_slots = tdd->nrofDownlinkSymbols != 0 || tdd->nrofUplinkSymbols != 0;
+    const int nr_slots_period = tdd->nrofDownlinkSlots + tdd->nrofUplinkSlots + nr_mix_slots;
+    const int nr_dlmix_slots = tdd->nrofDownlinkSlots + (tdd->nrofDownlinkSymbols != 0);
+    const int nr_ulstart_slot = tdd->nrofDownlinkSlots + (tdd->nrofUplinkSymbols == 0);
+    for (int slot = 0; slot < n; ++slot) {
+      /* FIXME: it seems there is a problem with slot 0/10/slots right after UL:
+       * we just get retransmissions. Thus, do not schedule such slots in DL */
+      if (slot % nr_slots_period != 0)
+        RC.nrmac[Mod_idP]->dlsch_slot_bitmap[slot / 64] |= ((slot % nr_slots_period) < nr_dlmix_slots) << (slot % 64);
+      RC.nrmac[Mod_idP]->ulsch_slot_bitmap[slot / 64] |= ((slot % nr_slots_period) >= nr_ulstart_slot) << (slot % 64);
+      LOG_D(MAC,
+            "slot %d DL %d UL %d\n",
+            slot,
+            (RC.nrmac[Mod_idP]->dlsch_slot_bitmap[slot / 64] & (1 << (slot % 64))) != 0,
+            (RC.nrmac[Mod_idP]->ulsch_slot_bitmap[slot / 64] & (1 << (slot % 64))) != 0);
+    }
+
+    if (get_softmodem_params()->phy_test) {
+      RC.nrmac[Mod_idP]->pre_processor_dl = nr_preprocessor_phytest;
+      RC.nrmac[Mod_idP]->pre_processor_ul = nr_ul_preprocessor_phytest;
+    } else {
+      RC.nrmac[Mod_idP]->pre_processor_dl = nr_init_fr1_dlsch_preprocessor(Mod_idP, 0);
+      RC.nrmac[Mod_idP]->pre_processor_ul = nr_init_fr1_ulsch_preprocessor(Mod_idP, 0);
+    }
   }
   
   if (secondaryCellGroup) {
 
     RC.nrmac[Mod_idP]->secondaryCellGroupCommon = secondaryCellGroup;
 
+    const NR_ServingCellConfig_t *servingCellConfig = secondaryCellGroup->spCellConfig->spCellConfigDedicated;
+    const struct NR_ServingCellConfig__downlinkBWP_ToAddModList *bwpList = servingCellConfig->downlinkBWP_ToAddModList;
+    AssertFatal(bwpList->list.count > 0, "downlinkBWP_ToAddModList has no BWPs!\n");
+    for (int i = 0; i < bwpList->list.count; ++i) {
+      const NR_BWP_Downlink_t *bwp = bwpList->list.array[i];
+      calculate_preferred_dl_tda(Mod_idP, bwp);
+    }
+
+    const struct NR_UplinkConfig__uplinkBWP_ToAddModList *ubwpList =
+        servingCellConfig->uplinkConfig->uplinkBWP_ToAddModList;
+    AssertFatal(ubwpList->list.count > 0, "downlinkBWP_ToAddModList no BWPs!\n");
+    for (int i = 0; i < ubwpList->list.count; ++i) {
+      const NR_BWP_Uplink_t *ubwp = ubwpList->list.array[i];
+      calculate_preferred_ul_tda(Mod_idP, ubwp);
+    }
+
     NR_UE_info_t *UE_info = &RC.nrmac[Mod_idP]->UE_info;
     if (add_ue == 1 && get_softmodem_params()->phy_test) {
       const int UE_id = add_new_nr_ue(Mod_idP, rnti, secondaryCellGroup);
diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
index 584648c67f..8d1e899fcb 100644
--- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
+++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
@@ -53,6 +53,7 @@
 
 #include "executables/softmodem-common.h"
 #include "nfapi/oai_integration/vendor_ext.h"
+#include "executables/nr-softmodem.h"
 
 uint16_t nr_pdcch_order_table[6] = { 31, 31, 511, 2047, 2047, 8191 };
 
@@ -65,7 +66,13 @@ void dump_mac_stats(gNB_MAC_INST *gNB)
   NR_UE_info_t *UE_info = &gNB->UE_info;
   int num = 1;
   for (int UE_id = UE_info->list.head; UE_id >= 0; UE_id = UE_info->list.next[UE_id]) {
-    LOG_I(MAC, "UE ID %d RNTI %04x (%d/%d)\n", UE_id, UE_info->rnti[UE_id], num++, UE_info->num_UEs);
+    LOG_I(MAC, "UE ID %d RNTI %04x (%d/%d) PH %d dB PCMAX %d dBm\n",
+          UE_id,
+          UE_info->rnti[UE_id],
+          num++,
+          UE_info->num_UEs,
+          UE_info->UE_sched_ctrl[UE_id].ph,
+          UE_info->UE_sched_ctrl[UE_id].pcmax);
     NR_mac_stats_t *stats = &UE_info->mac_stats[UE_id];
     const int avg_rsrp = stats->num_rsrp_meas > 0 ? stats->cumul_rsrp / stats->num_rsrp_meas : 0;
     LOG_I(MAC, "UE %d: dlsch_rounds %d/%d/%d/%d, dlsch_errors %d, average RSRP %d (%d meas)\n",
@@ -76,10 +83,15 @@ void dump_mac_stats(gNB_MAC_INST *gNB)
     stats->num_rsrp_meas = 0;
     stats->cumul_rsrp = 0 ;
     LOG_I(MAC, "UE %d: dlsch_total_bytes %d\n", UE_id, stats->dlsch_total_bytes);
-    LOG_I(MAC, "UE %d: ulsch_rounds %d/%d/%d/%d, ulsch_errors %d\n",
+    const NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
+    LOG_I(MAC, "UE %d: ulsch_rounds %d/%d/%d/%d, ulsch_errors %d, PUSCH SNR %2.1f dB, PUCCH SNR %2.1f dB, noise rssi %2.1f dB\n",
           UE_id,
           stats->ulsch_rounds[0], stats->ulsch_rounds[1],
-          stats->ulsch_rounds[2], stats->ulsch_rounds[3], stats->ulsch_errors);
+          stats->ulsch_rounds[2], stats->ulsch_rounds[3],
+          stats->ulsch_errors,
+          (float) sched_ctrl->pusch_snrx10 / 10,
+          (float) sched_ctrl->pucch_snrx10 / 10,
+          (float) (sched_ctrl->raw_rssi - 1280) / 10);
     LOG_I(MAC,
           "UE %d: ulsch_total_bytes_scheduled %d, ulsch_total_bytes_received %d\n",
           UE_id,
@@ -312,51 +324,11 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
   protocol_ctxt_t   ctxt;
   PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, ENB_FLAG_YES, NOT_A_RNTI, frame, slot,module_idP);
  
-  int nb_periods_per_frame;
-
   const int bwp_id = 1;
 
   gNB_MAC_INST *gNB = RC.nrmac[module_idP];
   NR_COMMON_channels_t *cc = gNB->common_channels;
   NR_ServingCellConfigCommon_t        *scc     = cc->ServingCellConfigCommon;
-  NR_TDD_UL_DL_Pattern_t *tdd_pattern = &scc->tdd_UL_DL_ConfigurationCommon->pattern1;
-
-  switch(scc->tdd_UL_DL_ConfigurationCommon->pattern1.dl_UL_TransmissionPeriodicity) {
-    case 0:
-      nb_periods_per_frame = 20; // 10ms/0p5ms
-      break;
-
-    case 1:
-      nb_periods_per_frame = 16; // 10ms/0p625ms
-      break;
-
-    case 2:
-      nb_periods_per_frame = 10; // 10ms/1ms
-      break;
-
-    case 3:
-      nb_periods_per_frame = 8; // 10ms/1p25ms
-      break;
-
-    case 4:
-      nb_periods_per_frame = 5; // 10ms/2ms
-      break;
-
-    case 5:
-      nb_periods_per_frame = 4; // 10ms/2p5ms
-      break;
-
-    case 6:
-      nb_periods_per_frame = 2; // 10ms/5ms
-      break;
-
-    case 7:
-      nb_periods_per_frame = 1; // 10ms/10ms
-      break;
-
-    default:
-      AssertFatal(1==0,"Undefined tdd period %ld\n", scc->tdd_UL_DL_ConfigurationCommon->pattern1.dl_UL_TransmissionPeriodicity);
-  }
 
   if (slot==0 && (*scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0]>=257)) {
     // re-initialization of tdd_beam_association at beginning of frame (only for FR2)
@@ -364,10 +336,6 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
       gNB->tdd_beam_association[i] = -1;
   }
 
-  int num_slots_per_tdd = (nr_slots_per_frame[*scc->ssbSubcarrierSpacing])/nb_periods_per_frame;
-
-  const int nr_ulmix_slots = tdd_pattern->nrofUplinkSlots + (tdd_pattern->nrofUplinkSymbols!=0);
-
   start_meas(&RC.nrmac[module_idP]->eNB_scheduler);
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_DLSCH_ULSCH_SCHEDULER,VCD_FUNCTION_IN);
 
@@ -381,17 +349,6 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
     nr_rrc_trigger(&ctxt, 0 /*CC_id*/, frame, slot >> *scc->ssbSubcarrierSpacing);
   }
 
-#define BIT(x) (1 << (x))
-  const uint64_t dlsch_in_slot_bitmap = BIT( 1) | BIT( 2) | BIT( 3) | BIT( 4) | BIT( 5) | BIT( 6)
-                                      | BIT(11) | BIT(12) | BIT(13) | BIT(14) | BIT(15) | BIT(16);
-
-  uint8_t prach_config_index = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.prach_ConfigurationIndex;
-  uint64_t ulsch_in_slot_bitmap;
-  if (prach_config_index==4) //this is the PRACH config used in the Benetel RRU. TODO: make this generic for any PRACH config. 
-    ulsch_in_slot_bitmap = BIT( 8) | BIT( 9);
-  else
-    ulsch_in_slot_bitmap = BIT( 8) | BIT(18);
-
   memset(RC.nrmac[module_idP]->cce_list[bwp_id][0],0,MAX_NUM_CCE*sizeof(int)); // coreset0
   memset(RC.nrmac[module_idP]->cce_list[bwp_id][1],0,MAX_NUM_CCE*sizeof(int)); // coresetid 1
   NR_UE_info_t *UE_info = &RC.nrmac[module_idP]->UE_info;
@@ -452,14 +409,10 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
   }
 
   // This schedules the DCI for Uplink and subsequently PUSCH
-  {
-    nr_schedule_ulsch(module_idP, frame, slot, num_slots_per_tdd, nr_ulmix_slots, ulsch_in_slot_bitmap);
-  }
+  nr_schedule_ulsch(module_idP, frame, slot);
 
   // This schedules the DCI for Downlink and PDSCH
-  if (is_xlsch_in_slot(dlsch_in_slot_bitmap, slot))
-    nr_schedule_ue_spec(module_idP, frame, slot);
-
+  nr_schedule_ue_spec(module_idP, frame, slot);
 
   nr_schedule_pucch(module_idP, frame, slot);
 
diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
index bc297225af..bc25279783 100644
--- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
@@ -377,6 +377,16 @@ void schedule_nr_prach(module_id_t module_idP, frame_t frameP, sub_frame_t slotP
           }
         }
       }
+
+      // block resources in vrb_map_UL
+      const NR_RACH_ConfigGeneric_t *rach_ConfigGeneric =
+          &scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric;
+      const uint8_t mu_pusch =
+          scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing;
+      const int16_t N_RA_RB = get_N_RA_RB(cfg->prach_config.prach_sub_c_spacing.value, mu_pusch);
+      uint16_t *vrb_map_UL = &cc->vrb_map_UL[slotP * MAX_BWP_SIZE];
+      for (int i = 0; i < N_RA_RB * fdm; ++i)
+        vrb_map_UL[rach_ConfigGeneric->msg1_FrequencyStart + i] = 0xff; // all symbols
     }
   }
 }
diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
index 0ceff015e7..3c90bf709b 100644
--- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
+++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
@@ -295,9 +295,9 @@ void schedule_control_sib1(module_id_t module_id,
   }
   gNB_mac->sched_ctrlCommon->active_bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition = NULL;
 
-  gNB_mac->sched_ctrlCommon->time_domain_allocation = time_domain_allocation;
-  gNB_mac->sched_ctrlCommon->mcsTableIdx = mcsTableIdx;
-  gNB_mac->sched_ctrlCommon->mcs = mcs;
+  gNB_mac->sched_ctrlCommon->pdsch_semi_static.time_domain_allocation = time_domain_allocation;
+  gNB_mac->sched_ctrlCommon->pdsch_semi_static.mcsTableIdx = mcsTableIdx;
+  gNB_mac->sched_ctrlCommon->sched_pdsch.mcs = mcs;
   gNB_mac->sched_ctrlCommon->num_total_bytes = num_total_bytes;
 
   uint8_t nr_of_candidates;
@@ -318,18 +318,19 @@ void schedule_control_sib1(module_id_t module_id,
 
   // Calculate number of symbols
   struct NR_PDSCH_TimeDomainResourceAllocationList *tdaList = gNB_mac->sched_ctrlCommon->active_bwp->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList;
-  const int startSymbolAndLength = tdaList->list.array[gNB_mac->sched_ctrlCommon->time_domain_allocation]->startSymbolAndLength;
+  const int startSymbolAndLength =
+      tdaList->list.array[gNB_mac->sched_ctrlCommon->pdsch_semi_static.time_domain_allocation]->startSymbolAndLength;
   int startSymbolIndex, nrOfSymbols;
   SLIV2SL(startSymbolAndLength, &startSymbolIndex, &nrOfSymbols);
 
   if (nrOfSymbols == 2) {
-    gNB_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData = 1;
+    gNB_mac->sched_ctrlCommon->pdsch_semi_static.numDmrsCdmGrpsNoData = 1;
   } else {
-    gNB_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData = 2;
+    gNB_mac->sched_ctrlCommon->pdsch_semi_static.numDmrsCdmGrpsNoData = 2;
   }
 
   // Calculate number of PRB_DMRS
-  uint8_t N_PRB_DMRS = gNB_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData * 6;
+  uint8_t N_PRB_DMRS = gNB_mac->sched_ctrlCommon->pdsch_semi_static.numDmrsCdmGrpsNoData * 6;
   uint16_t dlDmrsSymbPos = fill_dmrs_mask(gNB_mac->sched_ctrlCommon->active_bwp->bwp_Dedicated->pdsch_Config->choice.setup, gNB_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position, startSymbolIndex+nrOfSymbols);
   uint16_t dmrs_length = get_num_dmrs(dlDmrsSymbPos);
 
@@ -337,22 +338,24 @@ void schedule_control_sib1(module_id_t module_id,
   uint32_t TBS = 0;
   do {
     rbSize++;
-    TBS = nr_compute_tbs(nr_get_Qm_dl(gNB_mac->sched_ctrlCommon->mcs, gNB_mac->sched_ctrlCommon->mcsTableIdx),
-                         nr_get_code_rate_dl(gNB_mac->sched_ctrlCommon->mcs, gNB_mac->sched_ctrlCommon->mcsTableIdx),
+    TBS = nr_compute_tbs(nr_get_Qm_dl(gNB_mac->sched_ctrlCommon->sched_pdsch.mcs,
+                                      gNB_mac->sched_ctrlCommon->pdsch_semi_static.mcsTableIdx),
+                         nr_get_code_rate_dl(gNB_mac->sched_ctrlCommon->sched_pdsch.mcs,
+                                             gNB_mac->sched_ctrlCommon->pdsch_semi_static.mcsTableIdx),
                          rbSize, nrOfSymbols, N_PRB_DMRS * dmrs_length,0, 0,1) >> 3;
   } while (rbStart + rbSize < bwpSize && !vrb_map[rbStart + rbSize] && TBS < gNB_mac->sched_ctrlCommon->num_total_bytes);
 
-  gNB_mac->sched_ctrlCommon->rbSize = rbSize;
-  gNB_mac->sched_ctrlCommon->rbStart = 0;
+  gNB_mac->sched_ctrlCommon->sched_pdsch.rbSize = rbSize;
+  gNB_mac->sched_ctrlCommon->sched_pdsch.rbStart = 0;
 
   LOG_D(MAC,"SLIV = %i\n", startSymbolAndLength);
   LOG_D(MAC,"startSymbolIndex = %i\n", startSymbolIndex);
   LOG_D(MAC,"nrOfSymbols = %i\n", nrOfSymbols);
-  LOG_D(MAC,"rbSize = %i\n", gNB_mac->sched_ctrlCommon->rbSize);
+  LOG_D(MAC, "rbSize = %i\n", gNB_mac->sched_ctrlCommon->sched_pdsch.rbSize);
   LOG_D(MAC,"TBS = %i\n", TBS);
 
   // Mark the corresponding RBs as used
-  for (int rb = 0; rb < gNB_mac->sched_ctrlCommon->rbSize; rb++) {
+  for (int rb = 0; rb < gNB_mac->sched_ctrlCommon->sched_pdsch.rbSize; rb++) {
     vrb_map[rb + rbStart] = 1;
   }
 }
@@ -405,9 +408,9 @@ void nr_fill_nfapi_dl_sib1_pdu(int Mod_idP,
   }
 
   pdsch_pdu_rel15->NrOfCodewords = 1;
-  pdsch_pdu_rel15->targetCodeRate[0] = nr_get_code_rate_dl(gNB_mac->sched_ctrlCommon->mcs,0);
+  pdsch_pdu_rel15->targetCodeRate[0] = nr_get_code_rate_dl(gNB_mac->sched_ctrlCommon->sched_pdsch.mcs, 0);
   pdsch_pdu_rel15->qamModOrder[0] = 2;
-  pdsch_pdu_rel15->mcsIndex[0] = gNB_mac->sched_ctrlCommon->mcs;
+  pdsch_pdu_rel15->mcsIndex[0] = gNB_mac->sched_ctrlCommon->sched_pdsch.mcs;
   pdsch_pdu_rel15->mcsTable[0] = 0;
   pdsch_pdu_rel15->rvIndex[0] = nr_rv_round_map[0];
   pdsch_pdu_rel15->dataScramblingId = *scc->physCellId;
@@ -417,15 +420,16 @@ void nr_fill_nfapi_dl_sib1_pdu(int Mod_idP,
   pdsch_pdu_rel15->dmrsConfigType = gNB_mac->sched_ctrlCommon->active_bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type == NULL ? 0 : 1;
   pdsch_pdu_rel15->dlDmrsScramblingId = *scc->physCellId;
   pdsch_pdu_rel15->SCID = 0;
-  pdsch_pdu_rel15->numDmrsCdmGrpsNoData = gNB_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData;
+  pdsch_pdu_rel15->numDmrsCdmGrpsNoData = gNB_mac->sched_ctrlCommon->pdsch_semi_static.numDmrsCdmGrpsNoData;
   pdsch_pdu_rel15->dmrsPorts = 1;
   pdsch_pdu_rel15->resourceAlloc = 1;
-  pdsch_pdu_rel15->rbStart = gNB_mac->sched_ctrlCommon->rbStart;
-  pdsch_pdu_rel15->rbSize = gNB_mac->sched_ctrlCommon->rbSize;
+  pdsch_pdu_rel15->rbStart = gNB_mac->sched_ctrlCommon->sched_pdsch.rbStart;
+  pdsch_pdu_rel15->rbSize = gNB_mac->sched_ctrlCommon->sched_pdsch.rbSize;
   pdsch_pdu_rel15->VRBtoPRBMapping = 0;
-  pdsch_pdu_rel15->qamModOrder[0] = nr_get_Qm_dl(gNB_mac->sched_ctrlCommon->mcs, gNB_mac->sched_ctrlCommon->mcsTableIdx);
+  pdsch_pdu_rel15->qamModOrder[0] = nr_get_Qm_dl(gNB_mac->sched_ctrlCommon->sched_pdsch.mcs,
+                                                 gNB_mac->sched_ctrlCommon->pdsch_semi_static.mcsTableIdx);
   pdsch_pdu_rel15->TBSize[0] = TBS;
-  pdsch_pdu_rel15->mcsTable[0] = gNB_mac->sched_ctrlCommon->mcsTableIdx;
+  pdsch_pdu_rel15->mcsTable[0] = gNB_mac->sched_ctrlCommon->pdsch_semi_static.mcsTableIdx;
   pdsch_pdu_rel15->StartSymbolIndex = StartSymbolIndex;
   pdsch_pdu_rel15->NrOfSymbols = NrOfSymbols;
 
@@ -454,8 +458,8 @@ void nr_fill_nfapi_dl_sib1_pdu(int Mod_idP,
   dci_payload.frequency_domain_assignment.val = PRBalloc_to_locationandbandwidth0(
       pdsch_pdu_rel15->rbSize, pdsch_pdu_rel15->rbStart, gNB_mac->type0_PDCCH_CSS_config.num_rbs);
 
-  dci_payload.time_domain_assignment.val = gNB_mac->sched_ctrlCommon->time_domain_allocation;
-  dci_payload.mcs = gNB_mac->sched_ctrlCommon->mcs;
+  dci_payload.time_domain_assignment.val = gNB_mac->sched_ctrlCommon->pdsch_semi_static.time_domain_allocation;
+  dci_payload.mcs = gNB_mac->sched_ctrlCommon->sched_pdsch.mcs;
   dci_payload.rv = pdsch_pdu_rel15->rvIndex[0];
   dci_payload.harq_pid = 0;
   dci_payload.ndi = 0;
@@ -525,17 +529,26 @@ void schedule_nr_sib1(module_id_t module_idP, frame_t frameP, sub_frame_t slotP)
     // Calculate number of symbols
     int startSymbolIndex, nrOfSymbols;
     struct NR_PDSCH_TimeDomainResourceAllocationList *tdaList = gNB_mac->sched_ctrlCommon->active_bwp->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList;
-    const int startSymbolAndLength = tdaList->list.array[gNB_mac->sched_ctrlCommon->time_domain_allocation]->startSymbolAndLength;
+    const int startSymbolAndLength =
+        tdaList->list.array[gNB_mac->sched_ctrlCommon->pdsch_semi_static.time_domain_allocation]->startSymbolAndLength;
     SLIV2SL(startSymbolAndLength, &startSymbolIndex, &nrOfSymbols);
 
     // Calculate number of PRB_DMRS
-    uint8_t N_PRB_DMRS = gNB_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData * 6;
+    uint8_t N_PRB_DMRS = gNB_mac->sched_ctrlCommon->pdsch_semi_static.numDmrsCdmGrpsNoData * 6;
     uint16_t dlDmrsSymbPos = fill_dmrs_mask(gNB_mac->sched_ctrlCommon->active_bwp->bwp_Dedicated->pdsch_Config->choice.setup, gNB_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position, startSymbolIndex+nrOfSymbols);
     uint16_t dmrs_length = get_num_dmrs(dlDmrsSymbPos);
 
-    const uint32_t TBS = nr_compute_tbs(nr_get_Qm_dl(gNB_mac->sched_ctrlCommon->mcs, gNB_mac->sched_ctrlCommon->mcsTableIdx),
-                                        nr_get_code_rate_dl(gNB_mac->sched_ctrlCommon->mcs, gNB_mac->sched_ctrlCommon->mcsTableIdx),
-                                        gNB_mac->sched_ctrlCommon->rbSize, nrOfSymbols, N_PRB_DMRS * dmrs_length,0 ,0 ,1 ) >> 3;
+    const uint32_t TBS = nr_compute_tbs(nr_get_Qm_dl(gNB_mac->sched_ctrlCommon->sched_pdsch.mcs,
+                                                     gNB_mac->sched_ctrlCommon->pdsch_semi_static.mcsTableIdx),
+                                        nr_get_code_rate_dl(gNB_mac->sched_ctrlCommon->sched_pdsch.mcs,
+                                                            gNB_mac->sched_ctrlCommon->pdsch_semi_static.mcsTableIdx),
+                                        gNB_mac->sched_ctrlCommon->sched_pdsch.rbSize,
+                                        nrOfSymbols,
+                                        N_PRB_DMRS * dmrs_length,
+                                        0,
+                                        0,
+                                        1)
+                         >> 3;
 
     nfapi_nr_dl_tti_request_body_t *dl_req = &gNB_mac->DL_req[CC_id].dl_tti_request_body;
     nr_fill_nfapi_dl_sib1_pdu(module_idP, dl_req, TBS, startSymbolIndex, nrOfSymbols);
diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
index 30a89cce77..9cb07255b8 100644
--- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
@@ -56,6 +56,82 @@
 #define WORD 32
 //#define SIZE_OF_POINTER sizeof (void *)
 
+void calculate_preferred_dl_tda(module_id_t module_id, const NR_BWP_Downlink_t *bwp)
+{
+  gNB_MAC_INST *nrmac = RC.nrmac[module_id];
+  const int bwp_id = bwp->bwp_Id;
+  if (nrmac->preferred_dl_tda[bwp_id])
+    return;
+
+  /* there is a mixed slot only when in TDD */
+  NR_ServingCellConfigCommon_t *scc = nrmac->common_channels->ServingCellConfigCommon;
+  const NR_TDD_UL_DL_Pattern_t *tdd =
+      scc->tdd_UL_DL_ConfigurationCommon ? &scc->tdd_UL_DL_ConfigurationCommon->pattern1 : NULL;
+  const int symb_dlMixed = tdd ? (1 << tdd->nrofDownlinkSymbols) - 1 : 0;
+
+  const int target_ss = NR_SearchSpace__searchSpaceType_PR_ue_Specific;
+  const NR_SearchSpace_t *search_space = get_searchspace(bwp, target_ss);
+  const NR_ControlResourceSet_t *coreset = get_coreset(bwp, search_space, 1 /* dedicated */);
+  // get coreset symbol "map"
+  const uint16_t symb_coreset = (1 << coreset->duration) - 1;
+
+  /* check that TDA index 0 fits into DL and does not overlap CORESET */
+  const struct NR_PDSCH_TimeDomainResourceAllocationList *tdaList =
+      bwp->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList;
+  AssertFatal(tdaList->list.count >= 1, "need to have at least one TDA for DL slots\n");
+  const NR_PDSCH_TimeDomainResourceAllocation_t *tdaP_DL = tdaList->list.array[0];
+  AssertFatal(!tdaP_DL->k0 || *tdaP_DL->k0 == 0,
+              "TimeDomainAllocation at index 1: non-null k0 (%ld) is not supported by the scheduler\n",
+              *tdaP_DL->k0);
+  int start, len;
+  SLIV2SL(tdaP_DL->startSymbolAndLength, &start, &len);
+  const uint16_t symb_tda = ((1 << len) - 1) << start;
+  // check whether coreset and TDA overlap: then we cannot use it. Note that
+  // here we assume that the coreset is scheduled every slot (which it
+  // currently is) and starting at symbol 0
+  AssertFatal((symb_coreset & symb_tda) == 0, "TDA index 0 for DL overlaps with CORESET\n");
+
+  /* check that TDA index 1 fits into DL part of mixed slot, if it exists */
+  int tdaMi = -1;
+  if (tdaList->list.count > 1) {
+    const NR_PDSCH_TimeDomainResourceAllocation_t *tdaP_Mi = tdaList->list.array[1];
+    AssertFatal(!tdaP_Mi->k0 || *tdaP_Mi->k0 == 0,
+                "TimeDomainAllocation at index 1: non-null k0 (%ld) is not supported by the scheduler\n",
+                *tdaP_Mi->k0);
+    int start, len;
+    SLIV2SL(tdaP_Mi->startSymbolAndLength, &start, &len);
+    const uint16_t symb_tda = ((1 << start) - 1) << start;
+    // check whether coreset and TDA overlap: then, we cannot use it. Also,
+    // check whether TDA is entirely within mixed slot DL. Note that
+    // here we assume that the coreset is scheduled every slot (which it
+    // currently is)
+    if ((symb_coreset & symb_tda) == 0 && (symb_dlMixed & symb_tda) == symb_tda) {
+      tdaMi = 1;
+    } else {
+      LOG_E(MAC,
+            "TDA index 1 DL overlaps with CORESET or is not entirely in mixed slot (symb_coreset %x symb_dlMixed %x symb_tda %x), won't schedule DL mixed slot\n",
+            symb_coreset,
+            symb_dlMixed,
+            symb_tda);
+    }
+  }
+
+  const uint8_t slots_per_frame[5] = {10, 20, 40, 80, 160};
+  const int n = slots_per_frame[*scc->ssbSubcarrierSpacing];
+  nrmac->preferred_dl_tda[bwp_id] = malloc(n * sizeof(*nrmac->preferred_dl_tda[bwp_id]));
+
+  const int nr_mix_slots = tdd ? tdd->nrofDownlinkSymbols != 0 || tdd->nrofUplinkSymbols != 0 : 0;
+  const int nr_slots_period = tdd ? tdd->nrofDownlinkSlots + tdd->nrofUplinkSlots + nr_mix_slots : n;
+  for (int i = 0; i < n; ++i) {
+    nrmac->preferred_dl_tda[bwp_id][i] = -1;
+    if (!tdd || i % nr_slots_period < tdd->nrofDownlinkSlots)
+      nrmac->preferred_dl_tda[bwp_id][i] = 0;
+    else if (tdd && nr_mix_slots && i % nr_slots_period == tdd->nrofDownlinkSlots)
+      nrmac->preferred_dl_tda[bwp_id][i] = tdaMi;
+    LOG_I(MAC, "slot %d preferred_dl_tda %d\n", i, nrmac->preferred_dl_tda[bwp_id][i]);
+  }
+}
+
 // Compute and write all MAC CEs and subheaders, and return number of written
 // bytes
 int nr_write_ce_dlsch_pdu(module_id_t module_idP,
@@ -302,35 +378,6 @@ int nr_write_ce_dlsch_pdu(module_id_t module_idP,
   return offset;
 }
 
-int getNrOfSymbols(NR_BWP_Downlink_t *bwp, int tda) {
-  struct NR_PDSCH_TimeDomainResourceAllocationList *tdaList =
-    bwp->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList;
-  AssertFatal(tda < tdaList->list.count,
-              "time_domain_allocation %d>=%d\n",
-              tda,
-              tdaList->list.count);
-
-  const int startSymbolAndLength = tdaList->list.array[tda]->startSymbolAndLength;
-  int startSymbolIndex, nrOfSymbols;
-  SLIV2SL(startSymbolAndLength, &startSymbolIndex, &nrOfSymbols);
-  return nrOfSymbols;
-}
-
-nfapi_nr_dmrs_type_e getDmrsConfigType(NR_BWP_Downlink_t *bwp) {
-  return bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type == NULL ? 0 : 1;
-}
-
-uint8_t getN_PRB_DMRS(NR_BWP_Downlink_t *bwp, int numDmrsCdmGrpsNoData) {
-  const nfapi_nr_dmrs_type_e dmrsConfigType = getDmrsConfigType(bwp);
-  if (dmrsConfigType == NFAPI_NR_DMRS_TYPE1) {
-    // if no data in dmrs cdm group is 1 only even REs have no data
-    // if no data in dmrs cdm group is 2 both odd and even REs have no data
-    return numDmrsCdmGrpsNoData * 6;
-  } else {
-    return numDmrsCdmGrpsNoData * 4;
-  }
-}
-
 void nr_store_dlsch_buffer(module_id_t module_id,
                            frame_t frame,
                            sub_frame_t slot) {
@@ -365,61 +412,125 @@ void nr_store_dlsch_buffer(module_id_t module_id,
   }
 }
 
-bool allocate_retransmission(module_id_t module_id,
-                             uint8_t *rballoc_mask,
-                             int *n_rb_sched,
-                             int UE_id,
-                             int current_harq_pid){
-  NR_UE_sched_ctrl_t *sched_ctrl = &RC.nrmac[module_id]->UE_info.UE_sched_ctrl[UE_id];
-  NR_UE_ret_info_t *retInfo = &sched_ctrl->retInfo[current_harq_pid];
+bool allocate_dl_retransmission(module_id_t module_id,
+                                frame_t frame,
+                                sub_frame_t slot,
+                                uint8_t *rballoc_mask,
+                                int *n_rb_sched,
+                                int UE_id,
+                                int current_harq_pid)
+{
+  const NR_ServingCellConfigCommon_t *scc = RC.nrmac[module_id]->common_channels->ServingCellConfigCommon;
+  NR_UE_info_t *UE_info = &RC.nrmac[module_id]->UE_info;
+  NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
+  NR_sched_pdsch_t *retInfo = &sched_ctrl->harq_processes[current_harq_pid].sched_pdsch;
   const uint16_t bwpSize = NRRIV2BW(sched_ctrl->active_bwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
   int rbStart = NRRIV2PRBOFFSET(sched_ctrl->active_bwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
+  const uint8_t num_dmrs_cdm_grps_no_data = 1;
 
-  sched_ctrl->time_domain_allocation = retInfo->time_domain_allocation;
-
-  /* ensure that there is a free place for RB allocation */
   int rbSize = 0;
-  while (rbSize < retInfo->rbSize) {
-    rbStart += rbSize; /* last iteration rbSize was not enough, skip it */
-    rbSize = 0;
-    while (rbStart < bwpSize && !rballoc_mask[rbStart]) rbStart++;
-    if (rbStart >= bwpSize) {
-      LOG_D(MAC,
-            "cannot allocate retransmission for UE %d/RNTI %04x: no resources\n",
-            UE_id,
-            RC.nrmac[module_id]->UE_info.rnti[UE_id]);
-      return false;
+  const int tda = RC.nrmac[module_id]->preferred_dl_tda[sched_ctrl->active_bwp->bwp_Id][slot];
+  if (tda == retInfo->time_domain_allocation) {
+    /* Check that there are enough resources for retransmission */
+    while (rbSize < retInfo->rbSize) {
+      rbStart += rbSize; /* last iteration rbSize was not enough, skip it */
+      rbSize = 0;
+      while (rbStart < bwpSize && !rballoc_mask[rbStart])
+        rbStart++;
+      if (rbStart >= bwpSize) {
+        LOG_D(MAC, "cannot allocate retransmission for UE %d/RNTI %04x: no resources\n", UE_id, UE_info->rnti[UE_id]);
+        return false;
+      }
+      while (rbStart + rbSize < bwpSize && rballoc_mask[rbStart + rbSize] && rbSize < retInfo->rbSize)
+        rbSize++;
     }
-    while (rbStart + rbSize < bwpSize
-           && rballoc_mask[rbStart + rbSize]
-           && rbSize < retInfo->rbSize)
+    /* check whether we need to switch the TDA allocation since the last
+     * (re-)transmission */
+    NR_pdsch_semi_static_t *ps = &sched_ctrl->pdsch_semi_static;
+    if (ps->time_domain_allocation != tda || ps->numDmrsCdmGrpsNoData != num_dmrs_cdm_grps_no_data)
+      nr_set_pdsch_semi_static(
+          scc, UE_info->secondaryCellGroup[UE_id], sched_ctrl->active_bwp, tda, num_dmrs_cdm_grps_no_data, ps);
+  } else {
+    /* the retransmission will use a different time domain allocation, check
+     * that we have enough resources */
+    while (rbStart < bwpSize && !rballoc_mask[rbStart])
+      rbStart++;
+    while (rbStart + rbSize < bwpSize && rballoc_mask[rbStart + rbSize])
       rbSize++;
+    NR_pdsch_semi_static_t temp_ps;
+    nr_set_pdsch_semi_static(
+        scc, UE_info->secondaryCellGroup[UE_id], sched_ctrl->active_bwp, tda, num_dmrs_cdm_grps_no_data, &temp_ps);
+    uint32_t new_tbs;
+    uint16_t new_rbSize;
+    bool success = nr_find_nb_rb(retInfo->Qm,
+                                 retInfo->R,
+                                 temp_ps.nrOfSymbols,
+                                 temp_ps.N_PRB_DMRS * temp_ps.N_DMRS_SLOT,
+                                 retInfo->tb_size,
+                                 rbSize,
+                                 &new_tbs,
+                                 &new_rbSize);
+    if (!success || new_tbs != retInfo->tb_size) {
+      LOG_D(MAC, "%s(): new TBsize %d of new TDA does not match old TBS %d\n", __func__, new_tbs, retInfo->tb_size);
+      return false; /* the maximum TBsize we might have is smaller than what we need */
+    }
+    /* we can allocate it. Overwrite the time_domain_allocation, the number
+     * of RBs, and the new TB size. The rest is done below */
+    retInfo->tb_size = new_tbs;
+    retInfo->rbSize = new_rbSize;
+    retInfo->time_domain_allocation = tda;
+    sched_ctrl->pdsch_semi_static = temp_ps;
   }
-  sched_ctrl->rbSize = retInfo->rbSize;
-  sched_ctrl->rbStart = rbStart;
 
-  /* MCS etc: just reuse from previous scheduling opportunity */
-  sched_ctrl->mcsTableIdx = retInfo->mcsTableIdx;
-  sched_ctrl->mcs = retInfo->mcs;
-  sched_ctrl->numDmrsCdmGrpsNoData = retInfo->numDmrsCdmGrpsNoData;
+  /* Find a free CCE */
+  bool freeCCE = find_free_CCE(module_id, slot, UE_id);
+  if (!freeCCE) {
+    LOG_D(MAC, "%4d.%2d could not find CCE for DL DCI retransmission UE %d/RNTI %04x\n",
+          frame, slot, UE_id, UE_info->rnti[UE_id]);
+    return false;
+  }
+
+  /* Find PUCCH occasion: if it fails, undo CCE allocation (undoing PUCCH
+   * allocation after CCE alloc fail would be more complex) */
+  const bool alloc = nr_acknack_scheduling(module_id, UE_id, frame, slot);
+  if (!alloc) {
+    LOG_D(MAC,
+          "%s(): could not find PUCCH for UE %d/%04x@%d.%d\n",
+          __func__,
+          UE_id,
+          UE_info->rnti[UE_id],
+          frame,
+          slot);
+    int cid = sched_ctrl->coreset->controlResourceSetId;
+    UE_info->num_pdcch_cand[UE_id][cid]--;
+    int *cce_list = RC.nrmac[module_id]->cce_list[sched_ctrl->active_bwp->bwp_Id][cid];
+    for (int i = 0; i < sched_ctrl->aggregation_level; i++)
+      cce_list[sched_ctrl->cce_index + i] = 0;
+    return false;
+  }
+
+  /* just reuse from previous scheduling opportunity, set new start RB */
+  sched_ctrl->sched_pdsch = *retInfo;
+  sched_ctrl->sched_pdsch.rbStart = rbStart;
 
   /* retransmissions: directly allocate */
-  *n_rb_sched -= sched_ctrl->rbSize;
-  for (int rb = 0; rb < sched_ctrl->rbSize; rb++)
-    rballoc_mask[rb+sched_ctrl->rbStart] = 0;
+  *n_rb_sched -= sched_ctrl->sched_pdsch.rbSize;
+  for (int rb = 0; rb < sched_ctrl->sched_pdsch.rbSize; rb++)
+    rballoc_mask[rb + sched_ctrl->sched_pdsch.rbStart] = 0;
   return true;
 }
 
 float thr_ue[MAX_MOBILES_PER_GNB];
+uint32_t pf_tbs[3][28]; // pre-computed, approximate TBS values for PF coefficient
 
 void pf_dl(module_id_t module_id,
            frame_t frame,
            sub_frame_t slot,
            NR_list_t *UE_list,
+           int max_num_ue,
            int n_rb_sched,
-           uint8_t *rballoc_mask,
-           int max_num_ue) {
-
+           uint8_t *rballoc_mask) {
+  const NR_ServingCellConfigCommon_t *scc = RC.nrmac[module_id]->common_channels->ServingCellConfigCommon;
   NR_UE_info_t *UE_info = &RC.nrmac[module_id]->UE_info;
   float coeff_ue[MAX_MOBILES_PER_GNB];
   // UEs that could be scheduled
@@ -429,11 +540,10 @@ void pf_dl(module_id_t module_id,
   /* Loop UE_info->list to check retransmission */
   for (int UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) {
     NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
-    sched_ctrl->search_space = get_searchspace(sched_ctrl->active_bwp, NR_SearchSpace__searchSpaceType_PR_ue_Specific);
-    sched_ctrl->coreset = get_coreset(sched_ctrl->active_bwp, sched_ctrl->search_space, 1 /* dedicated */);
+    NR_sched_pdsch_t *sched_pdsch = &sched_ctrl->sched_pdsch;
+    NR_pdsch_semi_static_t *ps = &sched_ctrl->pdsch_semi_static;
     /* get the PID of a HARQ process awaiting retrnasmission, or -1 otherwise */
-    sched_ctrl->dl_harq_pid = sched_ctrl->retrans_dl_harq.head;
-    const rnti_t rnti = UE_info->rnti[UE_id];
+    sched_pdsch->dl_harq_pid = sched_ctrl->retrans_dl_harq.head;
 
     /* Calculate Throughput */
     const float a = 0.0005f; // corresponds to 200ms window
@@ -441,33 +551,10 @@ void pf_dl(module_id_t module_id,
     thr_ue[UE_id] = (1 - a) * thr_ue[UE_id] + a * b;
 
     /* retransmission */
-    if (sched_ctrl->dl_harq_pid >= 0) {
-      /* Find a free CCE */
-      bool freeCCE = find_free_CCE(module_id, slot, UE_id);
-      if (!freeCCE){
-        LOG_D(MAC, "%4d.%2d could not find CCE for DL DCI retransmission UE %d/RNTI %04x\n", frame, slot, UE_id, rnti);
-        continue;
-      }
-      /* Find PUCCH occasion: if it fails, undo CCE allocation (undoing PUCCH
-       * allocation after CCE alloc fail would be more complex) */
-      const bool alloc = nr_acknack_scheduling(module_id, UE_id, frame, slot);
-      if (!alloc) {
-        LOG_W(MAC,
-              "%s(): could not find PUCCH for UE %d/%04x@%d.%d\n",
-              __func__,
-              UE_id,
-              rnti,
-              frame,
-              slot);
-        int cid = sched_ctrl->coreset->controlResourceSetId;
-        UE_info->num_pdcch_cand[UE_id][cid]--;
-        int *cce_list = RC.nrmac[module_id]->cce_list[sched_ctrl->active_bwp->bwp_Id][cid];
-        for (int i = 0; i < sched_ctrl->aggregation_level; i++)
-          cce_list[sched_ctrl->cce_index + i] = 0;
-        return;
-      }
+    if (sched_pdsch->dl_harq_pid >= 0) {
       /* Allocate retransmission */
-      bool r = allocate_retransmission(module_id, rballoc_mask, &n_rb_sched, UE_id, sched_ctrl->dl_harq_pid);
+      bool r = allocate_dl_retransmission(
+          module_id, frame, slot, rballoc_mask, &n_rb_sched, UE_id, sched_pdsch->dl_harq_pid);
       if (!r) {
         LOG_D(MAC, "%4d.%2d retransmission can NOT be allocated\n", frame, slot);
         continue;
@@ -481,23 +568,8 @@ void pf_dl(module_id_t module_id,
         continue;
 
       /* Calculate coeff */
-      sched_ctrl->time_domain_allocation = 2;
-      sched_ctrl->mcsTableIdx = 0;
-      sched_ctrl->mcs = 9;
-      sched_ctrl->numDmrsCdmGrpsNoData = 1;
-      uint8_t N_PRB_DMRS =
-              getN_PRB_DMRS(sched_ctrl->active_bwp, sched_ctrl->numDmrsCdmGrpsNoData);
-      int nrOfSymbols = getNrOfSymbols(sched_ctrl->active_bwp,
-                                       sched_ctrl->time_domain_allocation);
-      uint32_t tbs = nr_compute_tbs(nr_get_Qm_dl(sched_ctrl->mcs, sched_ctrl->mcsTableIdx),
-                                    nr_get_code_rate_dl(sched_ctrl->mcs, sched_ctrl->mcsTableIdx),
-                                    1,  // rbSize
-                                    nrOfSymbols,
-                                    N_PRB_DMRS,  // FIXME // This should be multiplied by the
-                                    // number of dmrs symbols
-                                    0 /* N_PRB_oh, 0 for initialBWP */, 0 /* tb_scaling */,
-                                    1 /* nrOfLayers */)
-                     >> 3;
+      sched_pdsch->mcs = 9;
+      uint32_t tbs = pf_tbs[ps->mcsTableIdx][sched_pdsch->mcs];
       coeff_ue[UE_id] = (float) tbs / thr_ue[UE_id];
       LOG_D(MAC,"b %d, thr_ue[%d] %f, tbs %d, coeff_ue[%d] %f\n",
             b, UE_id, thr_ue[UE_id], tbs, UE_id, coeff_ue[UE_id]);
@@ -545,7 +617,7 @@ void pf_dl(module_id_t module_id,
     * allocation after CCE alloc fail would be more complex) */
     const bool alloc = nr_acknack_scheduling(module_id, UE_id, frame, slot);
     if (!alloc) {
-      LOG_W(MAC,
+      LOG_D(MAC,
             "%s(): could not find PUCCH for UE %d/%04x@%d.%d\n",
             __func__,
             UE_id,
@@ -560,57 +632,48 @@ void pf_dl(module_id_t module_id,
       return;
     }
 
-    /* Allocate transmission */
-    // Time-domain allocation
-    sched_ctrl->time_domain_allocation = 2;
-
-    // modulation scheme
-    sched_ctrl->mcsTableIdx = 0;
-    sched_ctrl->mcs = 9;
-    sched_ctrl->numDmrsCdmGrpsNoData = 1;
-
     // Freq-demain allocation
     while (rbStart < bwpSize && !rballoc_mask[rbStart]) rbStart++;
+    uint16_t max_rbSize = 1;
+    while (rbStart + max_rbSize < bwpSize && rballoc_mask[rbStart + max_rbSize])
+      max_rbSize++;
 
-    const uint8_t N_PRB_DMRS =
-        getN_PRB_DMRS(sched_ctrl->active_bwp, sched_ctrl->numDmrsCdmGrpsNoData);
-    const int nrOfSymbols = getNrOfSymbols(sched_ctrl->active_bwp,
-        sched_ctrl->time_domain_allocation);
-    const NR_ServingCellConfigCommon_t *scc = RC.nrmac[module_id]->common_channels->ServingCellConfigCommon;
-    const uint8_t N_DMRS_SLOT = get_num_dmrs_symbols(
-        sched_ctrl->active_bwp->bwp_Dedicated->pdsch_Config->choice.setup,
-        scc->dmrs_TypeA_Position,
-        nrOfSymbols);
+    /* MCS has been set above */
+    const uint8_t num_dmrs_cdm_grps_no_data = 1;
+    const int tda = RC.nrmac[module_id]->preferred_dl_tda[sched_ctrl->active_bwp->bwp_Id][slot];
+    NR_sched_pdsch_t *sched_pdsch = &sched_ctrl->sched_pdsch;
+    NR_pdsch_semi_static_t *ps = &sched_ctrl->pdsch_semi_static;
+    if (ps->time_domain_allocation != tda || ps->numDmrsCdmGrpsNoData != num_dmrs_cdm_grps_no_data)
+      nr_set_pdsch_semi_static(
+          scc, UE_info->secondaryCellGroup[UE_id], sched_ctrl->active_bwp, tda, num_dmrs_cdm_grps_no_data, ps);
+    sched_pdsch->Qm = nr_get_Qm_dl(sched_pdsch->mcs, ps->mcsTableIdx);
+    sched_pdsch->R = nr_get_code_rate_dl(sched_pdsch->mcs, ps->mcsTableIdx);
 
-    int rbSize = 0;
     uint32_t TBS = 0;
+    uint16_t rbSize;
     const int oh = 2 + (sched_ctrl->num_total_bytes >= 256)
                  + 2 * (frame == (sched_ctrl->ta_frame + 10) % 1024);
-    do {
-      rbSize++;
-      TBS = nr_compute_tbs(nr_get_Qm_dl(sched_ctrl->mcs, sched_ctrl->mcsTableIdx),
-                           nr_get_code_rate_dl(sched_ctrl->mcs, sched_ctrl->mcsTableIdx),
-                           rbSize,
-                           nrOfSymbols,
-                           N_PRB_DMRS * N_DMRS_SLOT,
-                           0 /* N_PRB_oh, 0 for initialBWP */,
-                           0 /* tb_scaling */,
-                           1 /* nrOfLayers */)
-            >> 3;
-    } while (rbStart + rbSize < bwpSize && rballoc_mask[rbStart + rbSize] && TBS < sched_ctrl->num_total_bytes + oh);
-    sched_ctrl->rbSize = rbSize;
-    sched_ctrl->rbStart = rbStart;
+    nr_find_nb_rb(sched_pdsch->Qm,
+                  sched_pdsch->R,
+                  ps->nrOfSymbols,
+                  ps->N_PRB_DMRS * ps->N_DMRS_SLOT,
+                  sched_ctrl->num_total_bytes + oh,
+                  max_rbSize,
+                  &TBS,
+                  &rbSize);
+    sched_pdsch->rbSize = rbSize;
+    sched_pdsch->rbStart = rbStart;
+    sched_pdsch->tb_size = TBS;
 
     /* transmissions: directly allocate */
-    n_rb_sched -= sched_ctrl->rbSize;
-    for (int rb = 0; rb < sched_ctrl->rbSize; rb++)
-      rballoc_mask[rb+sched_ctrl->rbStart] = 0;
+    n_rb_sched -= sched_pdsch->rbSize;
+    for (int rb = 0; rb < sched_pdsch->rbSize; rb++)
+      rballoc_mask[rb + sched_pdsch->rbStart] = 0;
   }
 }
 
-void nr_simple_dlsch_preprocessor(module_id_t module_id,
-                                  frame_t frame,
-                                  sub_frame_t slot) {
+void nr_fr1_dlsch_preprocessor(module_id_t module_id, frame_t frame, sub_frame_t slot)
+{
   NR_UE_info_t *UE_info = &RC.nrmac[module_id]->UE_info;
 
   if (UE_info->num_UEs == 0)
@@ -642,15 +705,45 @@ void nr_simple_dlsch_preprocessor(module_id_t module_id,
         frame,
         slot,
         &UE_info->list,
+        2,
         n_rb_sched,
-        rballoc_mask,
-        2);
+        rballoc_mask);
+}
+
+nr_pp_impl_dl nr_init_fr1_dlsch_preprocessor(module_id_t module_id, int CC_id)
+{
+  /* in the PF algorithm, we have to use the TBsize to compute the coefficient.
+   * This would include the number of DMRS symbols, which in turn depends on
+   * the time domain allocation. In case we are in a mixed slot, we do not want
+   * to recalculate all these values just, and therefore we provide a look-up
+   * table which should approximately give us the TBsize */
+  for (int mcsTableIdx = 0; mcsTableIdx < 3; ++mcsTableIdx) {
+    for (int mcs = 0; mcs < 29; ++mcs) {
+      if (mcs > 27 && mcsTableIdx == 1)
+        continue;
+      const uint8_t Qm = nr_get_Qm_dl(mcs, mcsTableIdx);
+      const uint16_t R = nr_get_code_rate_dl(mcs, mcsTableIdx);
+      pf_tbs[mcsTableIdx][mcs] = nr_compute_tbs(Qm,
+                                                R,
+                                                1, /* rbSize */
+                                                10, /* hypothetical number of slots */
+                                                0, /* N_PRB_DMRS * N_DMRS_SLOT */
+                                                0 /* N_PRB_oh, 0 for initialBWP */,
+                                                0 /* tb_scaling */,
+                                                1 /* nrOfLayers */)
+                                 >> 3;
+    }
+  }
+
+  return nr_fr1_dlsch_preprocessor;
 }
 
 void nr_schedule_ue_spec(module_id_t module_id,
                          frame_t frame,
                          sub_frame_t slot) {
   gNB_MAC_INST *gNB_mac = RC.nrmac[module_id];
+  if (!is_xlsch_in_slot(gNB_mac->dlsch_slot_bitmap[slot / 64], slot))
+    return;
 
   /* PREPROCESSOR */
   gNB_mac->pre_processor_dl(module_id, frame, slot);
@@ -664,6 +757,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
   NR_list_t *UE_list = &UE_info->list;
   for (int UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) {
     NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
+    NR_sched_pdsch_t *sched_pdsch = &sched_ctrl->sched_pdsch;
     UE_info->mac_stats[UE_id].dlsch_current_bytes = 0;
 
     /* update TA and set ta_apply every 10 frames.
@@ -675,45 +769,23 @@ void nr_schedule_ue_spec(module_id_t module_id,
       LOG_D(MAC, "[UE %d][%d.%d] UL timing alignment procedures: setting flag for Timing Advance command\n", UE_id, frame, slot);
     }
 
-    if (sched_ctrl->rbSize <= 0)
+    if (sched_pdsch->rbSize <= 0)
       continue;
 
     const rnti_t rnti = UE_info->rnti[UE_id];
 
     /* POST processing */
-    struct NR_PDSCH_TimeDomainResourceAllocationList *tdaList =
-      sched_ctrl->active_bwp->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList;
-    AssertFatal(sched_ctrl->time_domain_allocation < tdaList->list.count,
-                "time_domain_allocation %d>=%d\n",
-                sched_ctrl->time_domain_allocation,
-                tdaList->list.count);
-
-    const int startSymbolAndLength =
-      tdaList->list.array[sched_ctrl->time_domain_allocation]->startSymbolAndLength;
-    int startSymbolIndex, nrOfSymbols;
-    SLIV2SL(startSymbolAndLength, &startSymbolIndex, &nrOfSymbols);
-
-    uint8_t N_PRB_DMRS =
-        getN_PRB_DMRS(sched_ctrl->active_bwp, sched_ctrl->numDmrsCdmGrpsNoData);
-    uint8_t N_DMRS_SLOT = get_num_dmrs_symbols(sched_ctrl->active_bwp->bwp_Dedicated->pdsch_Config->choice.setup,
-                                               RC.nrmac[module_id]->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position ,
-                                               nrOfSymbols);
-    const nfapi_nr_dmrs_type_e dmrsConfigType = getDmrsConfigType(sched_ctrl->active_bwp);
     const int nrOfLayers = 1;
-    const uint16_t R = nr_get_code_rate_dl(sched_ctrl->mcs, sched_ctrl->mcsTableIdx);
-    const uint8_t Qm = nr_get_Qm_dl(sched_ctrl->mcs, sched_ctrl->mcsTableIdx);
-    const uint32_t TBS =
-        nr_compute_tbs(nr_get_Qm_dl(sched_ctrl->mcs, sched_ctrl->mcsTableIdx),
-                       nr_get_code_rate_dl(sched_ctrl->mcs, sched_ctrl->mcsTableIdx),
-                       sched_ctrl->rbSize,
-                       nrOfSymbols,
-                       N_PRB_DMRS * N_DMRS_SLOT,
-                       0 /* N_PRB_oh, 0 for initialBWP */,
-                       0 /* tb_scaling */,
-                       nrOfLayers)
-        >> 3;
+    const uint16_t R = sched_pdsch->R;
+    const uint8_t Qm = sched_pdsch->Qm;
+    const uint32_t TBS = sched_pdsch->tb_size;
 
-    int8_t current_harq_pid = sched_ctrl->dl_harq_pid;
+    /* pre-computed PDSCH values that only change if time domain
+     * allocation/DMRS parameters change. Updated in the preprocessor through
+     * nr_set_pdsch_semi_static() */
+    NR_pdsch_semi_static_t *ps = &sched_ctrl->pdsch_semi_static;
+
+    int8_t current_harq_pid = sched_pdsch->dl_harq_pid;
     if (current_harq_pid < 0) {
       /* PP has not selected a specific HARQ Process, get a new one */
       current_harq_pid = sched_ctrl->available_dl_harq.head;
@@ -721,7 +793,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
                   "no free HARQ process available for UE %d\n",
                   UE_id);
       remove_front_nr_list(&sched_ctrl->available_dl_harq);
-      sched_ctrl->dl_harq_pid = current_harq_pid;
+      sched_pdsch->dl_harq_pid = current_harq_pid;
     } else {
       /* PP selected a specific HARQ process. Check whether it will be a new
        * transmission or a retransmission, and remove from the corresponding
@@ -735,20 +807,21 @@ void nr_schedule_ue_spec(module_id_t module_id,
     DevAssert(!harq->is_waiting);
     add_tail_nr_list(&sched_ctrl->feedback_dl_harq, current_harq_pid);
     NR_sched_pucch_t *pucch = &sched_ctrl->sched_pucch[0];
+    harq->feedback_frame = pucch->frame;
     harq->feedback_slot = pucch->ul_slot;
     harq->is_waiting = true;
     UE_info->mac_stats[UE_id].dlsch_rounds[harq->round]++;
 
     LOG_D(MAC,
-          "%4d.%2d RNTI %04x start %d RBs %d startSymbol %d nb_symbsol %d MCS %d TBS %d HARQ PID %d round %d NDI %d\n",
+          "%4d.%2d RNTI %04x start %3d RBs %3d startSymbol %2d nb_symbol %2d MCS %2d TBS %4d HARQ PID %2d round %d NDI %d\n",
           frame,
           slot,
           rnti,
-          sched_ctrl->rbStart,
-          sched_ctrl->rbSize,
-          startSymbolIndex,
-          nrOfSymbols,
-          sched_ctrl->mcs,
+          sched_pdsch->rbStart,
+          sched_pdsch->rbSize,
+          ps->startSymbolIndex,
+          ps->nrOfSymbols,
+          sched_pdsch->mcs,
           TBS,
           current_harq_pid,
           harq->round,
@@ -804,8 +877,8 @@ void nr_schedule_ue_spec(module_id_t module_id,
     pdsch_pdu->NrOfCodewords = 1;
     pdsch_pdu->targetCodeRate[0] = R;
     pdsch_pdu->qamModOrder[0] = Qm;
-    pdsch_pdu->mcsIndex[0] = sched_ctrl->mcs;
-    pdsch_pdu->mcsTable[0] = sched_ctrl->mcsTableIdx;
+    pdsch_pdu->mcsIndex[0] = sched_pdsch->mcs;
+    pdsch_pdu->mcsTable[0] = ps->mcsTableIdx;
     pdsch_pdu->rvIndex[0] = nr_rv_round_map[harq->round];
     pdsch_pdu->TBSize[0] = TBS;
 
@@ -815,25 +888,22 @@ void nr_schedule_ue_spec(module_id_t module_id,
     pdsch_pdu->refPoint = 0; // Point A
 
     // DMRS
-    pdsch_pdu->dlDmrsSymbPos =
-        fill_dmrs_mask(bwp->bwp_Dedicated->pdsch_Config->choice.setup,
-                       scc->dmrs_TypeA_Position,
-                       nrOfSymbols);
-    pdsch_pdu->dmrsConfigType = dmrsConfigType;
+    pdsch_pdu->dlDmrsSymbPos = ps->dl_dmrs_symb_pos;
+    pdsch_pdu->dmrsConfigType = ps->dmrsConfigType;
     pdsch_pdu->dlDmrsScramblingId = *scc->physCellId;
     pdsch_pdu->SCID = 0;
-    pdsch_pdu->numDmrsCdmGrpsNoData = sched_ctrl->numDmrsCdmGrpsNoData;
+    pdsch_pdu->numDmrsCdmGrpsNoData = ps->numDmrsCdmGrpsNoData;
     pdsch_pdu->dmrsPorts = 1;
 
     // Pdsch Allocation in frequency domain
     pdsch_pdu->resourceAlloc = 1;
-    pdsch_pdu->rbStart = sched_ctrl->rbStart;
-    pdsch_pdu->rbSize = sched_ctrl->rbSize;
+    pdsch_pdu->rbStart = sched_pdsch->rbStart;
+    pdsch_pdu->rbSize = sched_pdsch->rbSize;
     pdsch_pdu->VRBtoPRBMapping = 1; // non-interleaved, check if this is ok for initialBWP
 
     // Resource Allocation in time domain
-    pdsch_pdu->StartSymbolIndex = startSymbolIndex;
-    pdsch_pdu->NrOfSymbols = nrOfSymbols;
+    pdsch_pdu->StartSymbolIndex = ps->startSymbolIndex;
+    pdsch_pdu->NrOfSymbols = ps->nrOfSymbols;
 
     /* Check and validate PTRS values */
     struct NR_SetupRelease_PTRS_DownlinkConfig *phaseTrackingRS =
@@ -887,8 +957,8 @@ void nr_schedule_ue_spec(module_id_t module_id,
             pdsch_pdu->rbSize,
             pdsch_pdu->rbStart,
             pdsch_pdu->BWPSize);
-    dci_payload.time_domain_assignment.val = sched_ctrl->time_domain_allocation;
-    dci_payload.mcs = sched_ctrl->mcs;
+    dci_payload.time_domain_assignment.val = ps->time_domain_allocation;
+    dci_payload.mcs = sched_pdsch->mcs;
     dci_payload.rv = pdsch_pdu->rvIndex[0];
     dci_payload.harq_pid = current_harq_pid;
     dci_payload.ndi = harq->ndi;
@@ -933,29 +1003,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
           pdcch_pdu->StartSymbolIndex,
           pdcch_pdu->DurationSymbols);
 
-    NR_UE_ret_info_t *retInfo = &sched_ctrl->retInfo[current_harq_pid];
     if (harq->round != 0) { /* retransmission */
-      if (sched_ctrl->rbSize != retInfo->rbSize)
-        LOG_W(MAC,
-              "retransmission uses different rbSize (%d vs. orig %d)\n",
-              sched_ctrl->rbSize,
-              retInfo->rbSize);
-      if (sched_ctrl->time_domain_allocation != retInfo->time_domain_allocation)
-        LOG_W(MAC,
-              "retransmission uses different time_domain_allocation (%d vs. orig %d)\n",
-              sched_ctrl->time_domain_allocation,
-              retInfo->time_domain_allocation);
-      if (sched_ctrl->mcs != retInfo->mcs
-          || sched_ctrl->mcsTableIdx != retInfo->mcsTableIdx
-          || sched_ctrl->numDmrsCdmGrpsNoData != retInfo->numDmrsCdmGrpsNoData)
-        LOG_W(MAC,
-              "retransmission uses different table/MCS/numDmrsCdmGrpsNoData (%d/%d/%d vs. orig %d/%d/%d)\n",
-              sched_ctrl->mcsTableIdx,
-              sched_ctrl->mcs,
-              sched_ctrl->numDmrsCdmGrpsNoData,
-              retInfo->mcsTableIdx,
-              retInfo->mcs,
-              retInfo->numDmrsCdmGrpsNoData);
       /* we do not have to do anything, since we do not require to get data
        * from RLC or encode MAC CEs. The TX_req structure is filled below 
        * or copy data to FAPI structures */
@@ -968,7 +1016,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
             current_harq_pid,
             harq->round,
             harq->ndi);
-      AssertFatal(harq->tb_size == TBS,
+      AssertFatal(harq->sched_pdsch.tb_size == TBS,
                   "UE %d mismatch between scheduled TBS and buffered TB for HARQ PID %d\n",
                   UE_id,
                   current_harq_pid);
@@ -976,7 +1024,6 @@ void nr_schedule_ue_spec(module_id_t module_id,
 
       LOG_D(MAC, "[%s] Initial HARQ transmission in %d.%d\n", __FUNCTION__, frame, slot);
 
-      harq->tb_size = TBS;
       uint8_t *buf = (uint8_t *) harq->tb;
 
       /* first, write all CEs that might be there */
@@ -1084,11 +1131,11 @@ void nr_schedule_ue_spec(module_id_t module_id,
       UE_info->mac_stats[UE_id].dlsch_current_bytes = TBS;
       UE_info->mac_stats[UE_id].lc_bytes_tx[lcid] += dlsch_total_bytes;
 
-      retInfo->rbSize = sched_ctrl->rbSize;
-      retInfo->time_domain_allocation = sched_ctrl->time_domain_allocation;
-      retInfo->mcsTableIdx = sched_ctrl->mcsTableIdx;
-      retInfo->mcs = sched_ctrl->mcs;
-      retInfo->numDmrsCdmGrpsNoData = sched_ctrl->numDmrsCdmGrpsNoData;
+      /* save retransmission information */
+      harq->sched_pdsch = *sched_pdsch;
+      /* save which time allocation has been used, to be used on
+       * retransmissions */
+      harq->sched_pdsch.time_domain_allocation = ps->time_domain_allocation;
 
       // ta command is sent, values are reset
       if (sched_ctrl->ta_apply) {
@@ -1117,6 +1164,6 @@ void nr_schedule_ue_spec(module_id_t module_id,
     gNB_mac->TX_req[CC_id].Slot = slot;
 
     /* mark UE as scheduled */
-    sched_ctrl->rbSize = 0;
+    memset(sched_pdsch, 0, sizeof(*sched_pdsch));
   }
 }
diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
index 6487f391b9..6c4e3398f1 100644
--- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
+++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
@@ -254,16 +254,22 @@ void nr_schedule_css_dlsch_phytest(module_id_t   module_idP,
   }
 }
 
+extern int getNrOfSymbols(NR_BWP_Downlink_t *bwp, int tda);
+extern uint8_t getN_PRB_DMRS(NR_BWP_Downlink_t *bwp, int numDmrsCdmGrpsNoData);
+uint32_t target_dl_mcs = 9;
+uint32_t target_dl_bw = 50;
+uint64_t dlsch_slot_bitmap = (1<<1);
 /* schedules whole bandwidth for first user, all the time */
 void nr_preprocessor_phytest(module_id_t module_id,
                              frame_t frame,
                              sub_frame_t slot)
 {
-  if (slot != 1)
+  if (!is_xlsch_in_slot(dlsch_slot_bitmap, slot))
     return;
+  const int CC_id = 0;
+  const NR_ServingCellConfigCommon_t *scc = RC.nrmac[module_id]->common_channels[CC_id].ServingCellConfigCommon;
   NR_UE_info_t *UE_info = &RC.nrmac[module_id]->UE_info;
   const int UE_id = 0;
-  const int CC_id = 0;
   AssertFatal(UE_info->active[UE_id],
               "%s(): expected UE %d to be active\n",
               __func__,
@@ -272,24 +278,25 @@ void nr_preprocessor_phytest(module_id_t module_id,
   /* find largest unallocated chunk */
   const int bwpSize = NRRIV2BW(sched_ctrl->active_bwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
   int rbStart = 0;
-  int tStart = 0;
   int rbSize = 0;
   uint16_t *vrb_map = RC.nrmac[module_id]->common_channels[CC_id].vrb_map;
-  /* find largest unallocated RB region */
-  do {
+  /* loop ensures that we allocate exactly target_dl_bw, or return */
+  while (true) {
     /* advance to first free RB */
-    while (tStart < bwpSize && vrb_map[tStart])
-      tStart++;
-    /* find maximum rbSize at current rbStart */
-    int tSize = 1;
-    while (tStart + tSize < bwpSize && !vrb_map[tStart + tSize])
-      tSize++;
-    if (tSize > rbSize) {
-      rbStart = tStart;
-      rbSize = tSize;
-    }
-    tStart += tSize;
-  } while (tStart < bwpSize);
+    while (rbStart < bwpSize && vrb_map[rbStart])
+      rbStart++;
+    rbSize = 1;
+    /* iterate until we are at target_dl_bw or no available RBs */
+    while (rbStart + rbSize < bwpSize && !vrb_map[rbStart + rbSize] && rbSize < target_dl_bw)
+      rbSize++;
+    /* found target_dl_bw? */
+    if (rbSize == target_dl_bw)
+      break;
+    /* at end and below target_dl_bw? */
+    if (rbStart + rbSize >= bwpSize)
+      return;
+    rbStart += rbSize;
+  }
 
   sched_ctrl->num_total_bytes = 0;
   const int lcid = DL_SCH_LCID_DTCH;
@@ -308,14 +315,10 @@ void nr_preprocessor_phytest(module_id_t module_id,
                                                     0);
   sched_ctrl->num_total_bytes += sched_ctrl->rlc_status[lcid].bytes_in_buffer;
 
-  const int target_ss = NR_SearchSpace__searchSpaceType_PR_ue_Specific;
-  sched_ctrl->search_space = get_searchspace(sched_ctrl->active_bwp, target_ss);
   uint8_t nr_of_candidates;
   find_aggregation_candidates(&sched_ctrl->aggregation_level,
                               &nr_of_candidates,
                               sched_ctrl->search_space);
-  sched_ctrl->coreset = get_coreset(
-      sched_ctrl->active_bwp, sched_ctrl->search_space, 1 /* dedicated */);
   const int cid = sched_ctrl->coreset->controlResourceSetId;
   const uint16_t Y = UE_info->Y[UE_id][cid][slot];
   const int m = UE_info->num_pdcch_cand[UE_id][cid];
@@ -351,32 +354,42 @@ void nr_preprocessor_phytest(module_id_t module_id,
               "could not find uplink slot for PUCCH (RNTI %04x@%d.%d)!\n",
               rnti, frame, slot);
 
-  sched_ctrl->rbStart = rbStart;
-  sched_ctrl->rbSize = rbSize;
-  sched_ctrl->time_domain_allocation = 2;
-  if (!UE_info->secondaryCellGroup[UE_id]->spCellConfig->spCellConfigDedicated->initialDownlinkBWP->pdsch_Config->choice.setup->mcs_Table)
-    sched_ctrl->mcsTableIdx = 0;
-  else {
-    if (*UE_info->secondaryCellGroup[UE_id]->spCellConfig->spCellConfigDedicated->initialDownlinkBWP->pdsch_Config->choice.setup->mcs_Table == 0)
-      sched_ctrl->mcsTableIdx = 1;
-    else
-      sched_ctrl->mcsTableIdx = 2;
-  }
-  sched_ctrl->mcs = 9;
-  sched_ctrl->numDmrsCdmGrpsNoData = 1;
+  NR_sched_pdsch_t *sched_pdsch = &sched_ctrl->sched_pdsch;
+  NR_pdsch_semi_static_t *ps = &sched_ctrl->pdsch_semi_static;
+  sched_pdsch->rbStart = rbStart;
+  sched_pdsch->rbSize = rbSize;
+  const int tda = RC.nrmac[module_id]->preferred_dl_tda[sched_ctrl->active_bwp->bwp_Id][slot];
+  const uint8_t num_dmrs_cdm_grps_no_data = 1;
+  if (ps->time_domain_allocation != tda || ps->numDmrsCdmGrpsNoData != num_dmrs_cdm_grps_no_data)
+    nr_set_pdsch_semi_static(
+        scc, UE_info->secondaryCellGroup[UE_id], sched_ctrl->active_bwp, tda, num_dmrs_cdm_grps_no_data, ps);
+
+  sched_pdsch->mcs = target_dl_mcs;
+  sched_pdsch->Qm = nr_get_Qm_dl(sched_pdsch->mcs, ps->mcsTableIdx);
+  sched_pdsch->R = nr_get_code_rate_dl(sched_pdsch->mcs, ps->mcsTableIdx);
+  sched_pdsch->tb_size = nr_compute_tbs(sched_pdsch->Qm,
+                                        sched_pdsch->R,
+                                        sched_pdsch->rbSize,
+                                        ps->nrOfSymbols,
+                                        ps->N_PRB_DMRS * ps->N_DMRS_SLOT,
+                                        0 /* N_PRB_oh, 0 for initialBWP */,
+                                        0 /* tb_scaling */,
+                                        1 /* nrOfLayers */)
+                         >> 3;
+
   /* get the PID of a HARQ process awaiting retransmission, or -1 otherwise */
-  sched_ctrl->dl_harq_pid = sched_ctrl->retrans_dl_harq.head;
+  sched_pdsch->dl_harq_pid = sched_ctrl->retrans_dl_harq.head;
 
   /* mark the corresponding RBs as used */
-  for (int rb = 0; rb < sched_ctrl->rbSize; rb++)
-    vrb_map[rb + sched_ctrl->rbStart] = 1;
+  for (int rb = 0; rb < sched_pdsch->rbSize; rb++)
+    vrb_map[rb + sched_pdsch->rbStart] = 1;
 }
 
-bool nr_ul_preprocessor_phytest(module_id_t module_id,
-                                frame_t frame,
-                                sub_frame_t slot,
-                                int num_slots_per_tdd,
-                                uint64_t ulsch_in_slot_bitmap) {
+uint32_t target_ul_mcs = 9;
+uint32_t target_ul_bw = 50;
+uint64_t ulsch_slot_bitmap = (1 << 8) | (1 << 18);
+bool nr_ul_preprocessor_phytest(module_id_t module_id, frame_t frame, sub_frame_t slot)
+{
   gNB_MAC_INST *nr_mac = RC.nrmac[module_id];
   NR_COMMON_channels_t *cc = nr_mac->common_channels;
   NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon;
@@ -395,7 +408,9 @@ bool nr_ul_preprocessor_phytest(module_id_t module_id,
 
   NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
 
-  const int tda = 1;
+  const int tda = RC.nrmac[module_id]->preferred_ul_tda[sched_ctrl->active_ubwp->bwp_Id][slot];
+  if (tda < 0)
+    return false;
   const struct NR_PUSCH_TimeDomainResourceAllocationList *tdaList =
     sched_ctrl->active_ubwp->bwp_Common->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList;
   AssertFatal(tda < tdaList->list.count,
@@ -408,14 +423,11 @@ bool nr_ul_preprocessor_phytest(module_id_t module_id,
   /* check if slot is UL, and that slot is 8 (assuming K2=6 because of UE
    * limitations).  Note that if K2 or the TDD configuration is changed, below
    * conditions might exclude each other and never be true */
-  if (!(is_xlsch_in_slot(ulsch_in_slot_bitmap, sched_slot) && sched_slot == 8))
+  if (!is_xlsch_in_slot(ulsch_slot_bitmap, sched_slot))
     return false;
 
-  const int bw = NRRIV2BW(sched_ctrl->active_ubwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
   uint16_t rbStart = 0;
-  uint16_t rbSize = 50; /* due to OAI UE limitations */
-  if (rbSize>bw)
-    rbSize = bw;
+  uint16_t rbSize = target_ul_bw;
 
   uint16_t *vrb_map_UL =
       &RC.nrmac[module_id]->common_channels[CC_id].vrb_map_UL[sched_slot * MAX_BWP_SIZE];
@@ -434,14 +446,10 @@ bool nr_ul_preprocessor_phytest(module_id_t module_id,
   sched_ctrl->sched_pusch.slot = sched_slot;
   sched_ctrl->sched_pusch.frame = sched_frame;
 
-  const int target_ss = NR_SearchSpace__searchSpaceType_PR_ue_Specific;
-  sched_ctrl->search_space = get_searchspace(sched_ctrl->active_bwp, target_ss);
   uint8_t nr_of_candidates;
   find_aggregation_candidates(&sched_ctrl->aggregation_level,
                               &nr_of_candidates,
                               sched_ctrl->search_space);
-  sched_ctrl->coreset = get_coreset(
-      sched_ctrl->active_bwp, sched_ctrl->search_space, 1 /* dedicated */);
   const int cid = sched_ctrl->coreset->controlResourceSetId;
   const uint16_t Y = UE_info->Y[UE_id][cid][slot];
   const int m = UE_info->num_pdcch_cand[UE_id][cid];
@@ -458,25 +466,19 @@ bool nr_ul_preprocessor_phytest(module_id_t module_id,
   }
   UE_info->num_pdcch_cand[UE_id][cid]++;
 
-  sched_ctrl->sched_pusch.time_domain_allocation = tda;
   const long f = sched_ctrl->search_space->searchSpaceType->choice.ue_Specific->dci_Formats;
   const int dci_format = f ? NR_UL_DCI_FORMAT_0_1 : NR_UL_DCI_FORMAT_0_0;
   const uint8_t num_dmrs_cdm_grps_no_data = 1;
   /* we want to avoid a lengthy deduction of DMRS and other parameters in
    * every TTI if we can save it, so check whether dci_format, TDA, or
    * num_dmrs_cdm_grps_no_data has changed and only then recompute */
-  NR_sched_pusch_save_t *ps = &sched_ctrl->pusch_save;
+  NR_pusch_semi_static_t *ps = &sched_ctrl->pusch_semi_static;
   if (ps->time_domain_allocation != tda
       || ps->dci_format != dci_format
       || ps->num_dmrs_cdm_grps_no_data != num_dmrs_cdm_grps_no_data)
-    nr_save_pusch_fields(scc,
-                         sched_ctrl->active_ubwp,
-                         dci_format,
-                         tda,
-                         num_dmrs_cdm_grps_no_data,
-                         ps);
+    nr_set_pusch_semi_static(scc, sched_ctrl->active_ubwp, dci_format, tda, num_dmrs_cdm_grps_no_data, ps);
 
-  const int mcs = 9;
+  const int mcs = target_ul_mcs;
   NR_sched_pusch_t *sched_pusch = &sched_ctrl->sched_pusch;
   sched_pusch->mcs = mcs;
   sched_pusch->rbStart = rbStart;
diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
index 94524795f3..0717cc568e 100644
--- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
@@ -120,11 +120,10 @@ static inline uint8_t get_max_candidates(uint8_t scs) {
 static inline uint8_t get_max_cces(uint8_t scs) {
   AssertFatal(scs<4, "Invalid PDCCH subcarrier spacing %d\n", scs);
   return (nr_max_number_of_cces_per_slot[scs]);
-} 
+}
 
-NR_ControlResourceSet_t *get_coreset(NR_BWP_Downlink_t *bwp,
-                                     NR_SearchSpace_t *ss,
-                                     int ss_type) {
+NR_ControlResourceSet_t *get_coreset(const NR_BWP_Downlink_t *bwp, const NR_SearchSpace_t *ss, int ss_type)
+{
   NR_ControlResourceSetId_t coreset_id = *ss->controlResourceSetId;
   if (ss_type == 0) { // common search space
     AssertFatal(coreset_id != 0, "coreset0 currently not supported\n");
@@ -146,9 +145,8 @@ NR_ControlResourceSet_t *get_coreset(NR_BWP_Downlink_t *bwp,
   }
 }
 
-NR_SearchSpace_t *get_searchspace(
-    NR_BWP_Downlink_t *bwp,
-    NR_SearchSpace__searchSpaceType_PR target_ss) {
+NR_SearchSpace_t *get_searchspace(const NR_BWP_Downlink_t *bwp, NR_SearchSpace__searchSpaceType_PR target_ss)
+{
   DevAssert(bwp->bwp_Dedicated->pdcch_Config->choice.setup->searchSpacesToAddModList);
   DevAssert(bwp->bwp_Dedicated->pdcch_Config->choice.setup->searchSpacesToAddModList->list.count > 0);
 
@@ -212,12 +210,98 @@ int allocate_nr_CCEs(gNB_MAC_INST *nr_mac,
 
 }
 
-void nr_save_pusch_fields(const NR_ServingCellConfigCommon_t *scc,
-                          const NR_BWP_Uplink_t *ubwp,
-                          long dci_format,
-                          int tda,
-                          uint8_t num_dmrs_cdm_grps_no_data,
-                          NR_sched_pusch_save_t *ps)
+bool nr_find_nb_rb(uint16_t Qm,
+                   uint16_t R,
+                   uint16_t nb_symb_sch,
+                   uint16_t nb_dmrs_prb,
+                   uint32_t bytes,
+                   uint16_t nb_rb_max,
+                   uint32_t *tbs,
+                   uint16_t *nb_rb)
+{
+  /* is the maximum (not even) enough? */
+  *nb_rb = nb_rb_max;
+  *tbs = nr_compute_tbs(Qm, R, *nb_rb, nb_symb_sch, nb_dmrs_prb, 0, 0, 1) >> 3;
+  /* check whether it does not fit, or whether it exactly fits. Some algorithms
+   * might depend on the return value! */
+  if (bytes > *tbs)
+    return false;
+  if (bytes == *tbs)
+    return true;
+
+  /* is the minimum enough? */
+  *nb_rb = 1;
+  *tbs = nr_compute_tbs(Qm, R, *nb_rb, nb_symb_sch, nb_dmrs_prb, 0, 0, 1) >> 3;
+  if (bytes <= *tbs)
+    return true;
+
+  /* perform binary search to allocate all bytes within a TBS up to nb_rb_max
+   * RBs */
+  int hi = nb_rb_max;
+  int lo = 1;
+  for (int p = (hi + lo) / 2; lo + 1 < hi; p = (hi + lo) / 2) {
+    const uint32_t TBS = nr_compute_tbs(Qm, R, p, nb_symb_sch, nb_dmrs_prb, 0, 0, 1) >> 3;
+    if (bytes == TBS) {
+      hi = p;
+      break;
+    } else if (bytes < TBS) {
+      hi = p;
+    } else {
+      lo = p;
+    }
+  }
+  *nb_rb = hi;
+  *tbs = nr_compute_tbs(Qm, R, *nb_rb, nb_symb_sch, nb_dmrs_prb, 0, 0, 1) >> 3;
+  /* return whether we could allocate all bytes and stay below nb_rb_max */
+  return *tbs >= bytes && *nb_rb <= nb_rb_max;
+}
+
+void nr_set_pdsch_semi_static(const NR_ServingCellConfigCommon_t *scc,
+                              const NR_CellGroupConfig_t *secondaryCellGroup,
+                              const NR_BWP_Downlink_t *bwp,
+                              int tda,
+                              uint8_t num_dmrs_cdm_grps_no_data,
+                              NR_pdsch_semi_static_t *ps)
+{
+  ps->time_domain_allocation = tda;
+
+  const struct NR_PDSCH_TimeDomainResourceAllocationList *tdaList =
+      bwp->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList;
+  AssertFatal(tda < tdaList->list.count, "time_domain_allocation %d>=%d\n", tda, tdaList->list.count);
+  const int startSymbolAndLength = tdaList->list.array[tda]->startSymbolAndLength;
+  SLIV2SL(startSymbolAndLength, &ps->startSymbolIndex, &ps->nrOfSymbols);
+
+  if (!secondaryCellGroup->spCellConfig->spCellConfigDedicated->initialDownlinkBWP->pdsch_Config->choice.setup
+           ->mcs_Table)
+    ps->mcsTableIdx = 0;
+  else if (*secondaryCellGroup->spCellConfig->spCellConfigDedicated->initialDownlinkBWP->pdsch_Config->choice.setup
+                ->mcs_Table
+           == 0)
+    ps->mcsTableIdx = 1;
+  else
+    ps->mcsTableIdx = 2;
+
+  ps->numDmrsCdmGrpsNoData = num_dmrs_cdm_grps_no_data;
+  ps->dmrsConfigType =
+      bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type
+              == NULL
+          ? 0
+          : 1;
+  // if no data in dmrs cdm group is 1 only even REs have no data
+  // if no data in dmrs cdm group is 2 both odd and even REs have no data
+  ps->N_PRB_DMRS = num_dmrs_cdm_grps_no_data * (ps->dmrsConfigType == NFAPI_NR_DMRS_TYPE1 ? 6 : 4);
+  ps->N_DMRS_SLOT =
+      get_num_dmrs_symbols(bwp->bwp_Dedicated->pdsch_Config->choice.setup, scc->dmrs_TypeA_Position, ps->nrOfSymbols);
+  ps->dl_dmrs_symb_pos =
+      fill_dmrs_mask(bwp->bwp_Dedicated->pdsch_Config->choice.setup, scc->dmrs_TypeA_Position, ps->nrOfSymbols);
+}
+
+void nr_set_pusch_semi_static(const NR_ServingCellConfigCommon_t *scc,
+                              const NR_BWP_Uplink_t *ubwp,
+                              long dci_format,
+                              int tda,
+                              uint8_t num_dmrs_cdm_grps_no_data,
+                              NR_pusch_semi_static_t *ps)
 {
   ps->dci_format = dci_format;
   ps->time_domain_allocation = tda;
@@ -1616,6 +1700,24 @@ int get_nrofHARQ_ProcessesForPDSCH(e_NR_PDSCH_ServingCellConfig__nrofHARQ_Proces
   }
 }
 
+int get_dl_bwp_id(const NR_ServingCellConfig_t *servingCellConfig)
+{
+  if (servingCellConfig->firstActiveDownlinkBWP_Id)
+    return *servingCellConfig->firstActiveDownlinkBWP_Id;
+  else if (servingCellConfig->defaultDownlinkBWP_Id)
+    return *servingCellConfig->defaultDownlinkBWP_Id;
+  else
+    return 1;
+}
+
+int get_ul_bwp_id(const NR_ServingCellConfig_t *servingCellConfig)
+{
+  if (servingCellConfig->uplinkConfig && servingCellConfig->uplinkConfig->firstActiveUplinkBWP_Id)
+    return *servingCellConfig->uplinkConfig->firstActiveUplinkBWP_Id;
+  else
+    return 1;
+}
+
 //------------------------------------------------------------------------------
 int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP, NR_CellGroupConfig_t *secondaryCellGroup)
 {
@@ -1644,23 +1746,32 @@ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP, NR_CellGroupConfig_t *secon
     sched_ctrl->ta_frame = 0;
     sched_ctrl->ta_update = 31;
     sched_ctrl->ta_apply = false;
-    sched_ctrl->ul_rssi = 0;
     /* set illegal time domain allocation to force recomputation of all fields */
-    sched_ctrl->pusch_save.time_domain_allocation = -1;
+    sched_ctrl->pdsch_semi_static.time_domain_allocation = -1;
+    sched_ctrl->pusch_semi_static.time_domain_allocation = -1;
     const NR_ServingCellConfig_t *servingCellConfig = secondaryCellGroup->spCellConfig->spCellConfigDedicated;
 
     /* Set default BWPs */
     const struct NR_ServingCellConfig__downlinkBWP_ToAddModList *bwpList = servingCellConfig->downlinkBWP_ToAddModList;
-    AssertFatal(bwpList->list.count == 1,
-                "downlinkBWP_ToAddModList has %d BWP!\n",
+    const int bwp_id = get_dl_bwp_id(servingCellConfig);
+    AssertFatal(bwp_id > 0 && bwp_id <= bwpList->list.count,
+                "%s(): illegal bwp_id %d (max %d)!\n",
+                __func__,
+                bwp_id,
                 bwpList->list.count);
-    const int bwp_id = 1;
     sched_ctrl->active_bwp = bwpList->list.array[bwp_id - 1];
+    const int target_ss = NR_SearchSpace__searchSpaceType_PR_ue_Specific;
+    sched_ctrl->search_space = get_searchspace(sched_ctrl->active_bwp, target_ss);
+    sched_ctrl->coreset = get_coreset(sched_ctrl->active_bwp, sched_ctrl->search_space, 1 /* dedicated */);
+
     const struct NR_UplinkConfig__uplinkBWP_ToAddModList *ubwpList = servingCellConfig->uplinkConfig->uplinkBWP_ToAddModList;
-    AssertFatal(ubwpList->list.count == 1,
-                "uplinkBWP_ToAddModList has %d BWP!\n",
+    const int ubwp_id = get_ul_bwp_id(servingCellConfig);
+    AssertFatal(ubwp_id > 0 && ubwp_id <= ubwpList->list.count,
+                "%s(): illegal ubwp_id %d (max %d)!\n",
+                __func__,
+                ubwp_id,
                 ubwpList->list.count);
-    sched_ctrl->active_ubwp = ubwpList->list.array[bwp_id - 1];
+    sched_ctrl->active_ubwp = ubwpList->list.array[ubwp_id - 1];
 
     /* get Number of HARQ processes for this UE */
     AssertFatal(servingCellConfig->pdsch_ServingCellConfig->present == NR_SetupRelease_PDSCH_ServingCellConfig_PR_setup,
diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
index 247a7e2c45..bdd6cf0c1d 100644
--- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
@@ -948,7 +948,50 @@ void extract_pucch_csi_report (NR_CSI_MeasConfig_t *csi_MeasConfig,
 
   if ( !(reportQuantity_type)) 
     AssertFatal(reportQuantity_type, "reportQuantity is not configured");
+}
 
+static NR_UE_harq_t *find_harq(module_id_t mod_id, frame_t frame, sub_frame_t slot, int UE_id)
+{
+  /* In case of realtime problems: we can only identify a HARQ process by
+   * timing. If the HARQ process's feedback_frame/feedback_slot is not the one we
+   * expected, we assume that processing has been aborted and we need to
+   * skip this HARQ process, which is what happens in the loop below.
+   * Similarly, we might be "in advance", in which case we need to skip
+   * this result. */
+  NR_UE_sched_ctrl_t *sched_ctrl = &RC.nrmac[mod_id]->UE_info.UE_sched_ctrl[UE_id];
+  int8_t pid = sched_ctrl->feedback_dl_harq.head;
+  if (pid < 0)
+    return NULL;
+  NR_UE_harq_t *harq = &sched_ctrl->harq_processes[pid];
+  /* old feedbacks we missed: mark for retransmission */
+  while (harq->feedback_frame != frame
+         || (harq->feedback_frame == frame && harq->feedback_slot < slot)) {
+    LOG_W(MAC,
+          "expected HARQ pid %d feedback at %d.%d, but is at %d.%d instead (HARQ feedback is in the past)\n",
+          pid,
+          harq->feedback_frame,
+          harq->feedback_slot,
+          frame,
+          slot);
+    remove_front_nr_list(&sched_ctrl->feedback_dl_harq);
+    handle_dl_harq(mod_id, UE_id, pid, 0);
+    pid = sched_ctrl->feedback_dl_harq.head;
+    if (pid < 0)
+      return NULL;
+    harq = &sched_ctrl->harq_processes[pid];
+  }
+  /* feedbacks that we wait for in the future: don't do anything */
+  if (harq->feedback_slot > slot) {
+    LOG_W(MAC,
+          "expected HARQ pid %d feedback at %d.%d, but is at %d.%d instead (HARQ feedback is in the future)\n",
+          pid,
+          harq->feedback_frame,
+          harq->feedback_slot,
+          frame,
+          slot);
+    return NULL;
+  }
+  return harq;
 }
 
 void handle_nr_uci_pucch_0_1(module_id_t mod_id,
@@ -968,6 +1011,7 @@ void handle_nr_uci_pucch_0_1(module_id_t mod_id,
   sched_ctrl->tpc1 = nr_get_tpc(RC.nrmac[mod_id]->pucch_target_snrx10,
                                 uci_01->ul_cqi,
                                 30);
+  sched_ctrl->pucch_snrx10 = uci_01->ul_cqi * 5 - 640;
 
   NR_ServingCellConfigCommon_t *scc = RC.nrmac[mod_id]->common_channels->ServingCellConfigCommon;
   const int num_slots = nr_slots_per_frame[*scc->ssbSubcarrierSpacing];
@@ -976,28 +1020,14 @@ void handle_nr_uci_pucch_0_1(module_id_t mod_id,
     for (int harq_bit = 0; harq_bit < uci_01->harq->num_harq; harq_bit++) {
       const uint8_t harq_value = uci_01->harq->harq_list[harq_bit].harq_value;
       const uint8_t harq_confidence = uci_01->harq->harq_confidence_level;
+      const int feedback_frame = slot == 0 ? (frame - 1 + 1024) % 1024 : frame;
       const int feedback_slot = (slot - 1 + num_slots) % num_slots;
-      /* In case of realtime problems: we can only identify a HARQ process by
-       * timing. If the HARQ process's feedback_slot is not the one we
-       * expected, we assume that processing has been aborted and we need to
-       * skip this HARQ process, which is what happens in the loop below. If
-       * you don't experience real-time problems, you might simply revert the
-       * commit that introduced these changes. */
-      int8_t pid = sched_ctrl->feedback_dl_harq.head;
-      DevAssert(pid >= 0);
-      while (sched_ctrl->harq_processes[pid].feedback_slot != feedback_slot) {
-        LOG_W(MAC,
-              "expected feedback slot %d, but found %d instead\n",
-              sched_ctrl->harq_processes[pid].feedback_slot,
-              feedback_slot);
-        remove_front_nr_list(&sched_ctrl->feedback_dl_harq);
-        handle_dl_harq(mod_id, UE_id, pid, 0);
-        pid = sched_ctrl->feedback_dl_harq.head;
-        DevAssert(pid >= 0);
-      }
-      remove_front_nr_list(&sched_ctrl->feedback_dl_harq);
-      NR_UE_harq_t *harq = &sched_ctrl->harq_processes[pid];
+      NR_UE_harq_t *harq = find_harq(mod_id, feedback_frame, feedback_slot, UE_id);
+      if (!harq)
+        break;
       DevAssert(harq->is_waiting);
+      const int8_t pid = sched_ctrl->feedback_dl_harq.head;
+      remove_front_nr_list(&sched_ctrl->feedback_dl_harq);
       handle_dl_harq(mod_id, UE_id, pid, harq_value == 1 && harq_confidence == 0);
     }
   }
@@ -1021,6 +1051,7 @@ void handle_nr_uci_pucch_2_3_4(module_id_t mod_id,
   sched_ctrl->tpc1 = nr_get_tpc(RC.nrmac[mod_id]->pucch_target_snrx10,
                                 uci_234->ul_cqi,
                                 30);
+  sched_ctrl->pucch_snrx10 = uci_234->ul_cqi * 5 - 640;
 
   NR_ServingCellConfigCommon_t *scc = RC.nrmac[mod_id]->common_channels->ServingCellConfigCommon;
   const int num_slots = nr_slots_per_frame[*scc->ssbSubcarrierSpacing];
@@ -1028,28 +1059,14 @@ void handle_nr_uci_pucch_2_3_4(module_id_t mod_id,
     // iterate over received harq bits
     for (int harq_bit = 0; harq_bit < uci_234->harq.harq_bit_len; harq_bit++) {
       const int acknack = ((uci_234->harq.harq_payload[harq_bit >> 3]) >> harq_bit) & 0x01;
+      const int feedback_frame = slot == 0 ? (frame - 1 + 1024) % 1024 : frame;
       const int feedback_slot = (slot - 1 + num_slots) % num_slots;
-      /* In case of realtime problems: we can only identify a HARQ process by
-       * timing. If the HARQ process's feedback_slot is not the one we
-       * expected, we assume that processing has been aborted and we need to
-       * skip this HARQ process, which is what happens in the loop below. If
-       * you don't experience real-time problems, you might simply revert the
-       * commit that introduced these changes. */
-      int8_t pid = sched_ctrl->feedback_dl_harq.head;
-      DevAssert(pid >= 0);
-      while (sched_ctrl->harq_processes[pid].feedback_slot != feedback_slot) {
-        LOG_W(MAC,
-              "expected feedback slot %d, but found %d instead\n",
-              sched_ctrl->harq_processes[pid].feedback_slot,
-              feedback_slot);
-        remove_front_nr_list(&sched_ctrl->feedback_dl_harq);
-        handle_dl_harq(mod_id, UE_id, pid, 0);
-        pid = sched_ctrl->feedback_dl_harq.head;
-        DevAssert(pid >= 0);
-      }
-      remove_front_nr_list(&sched_ctrl->feedback_dl_harq);
-      NR_UE_harq_t *harq = &sched_ctrl->harq_processes[pid];
+      NR_UE_harq_t *harq = find_harq(mod_id, feedback_frame, feedback_slot, UE_id);
+      if (!harq)
+        break;
       DevAssert(harq->is_waiting);
+      const int8_t pid = sched_ctrl->feedback_dl_harq.head;
+      remove_front_nr_list(&sched_ctrl->feedback_dl_harq);
       handle_dl_harq(mod_id, UE_id, pid, uci_234->harq.harq_crc != 1 && acknack);
     }
   }
@@ -1218,6 +1235,29 @@ bool nr_acknack_scheduling(int mod_id,
   // advance ul_slot if it is not reachable by UE
   pucch->ul_slot = max(pucch->ul_slot, slot + pdsch_to_harq_feedback[0]);
 
+  // is there already CSI in this slot?
+  const NR_sched_pucch_t *csi_pucch = &sched_ctrl->sched_pucch[2];
+  // skip the CSI PUCCH if it is present and if in the next frame/slot
+  if (csi_pucch->csi_bits > 0
+      && csi_pucch->frame == pucch->frame
+      && csi_pucch->ul_slot == pucch->ul_slot) {
+    AssertFatal(!csi_pucch->simultaneous_harqcsi,
+                "%s(): %d.%d cannot handle simultaneous_harqcsi, but found for UE %d\n",
+                __func__,
+                pucch->frame,
+                pucch->ul_slot,
+                UE_id);
+    nr_fill_nfapi_pucch(mod_id, frame, slot, csi_pucch, UE_id);
+    /* advance the UL slot information in PUCCH by one so we won't schedule in
+     * the same slot again */
+    const int f = pucch->frame;
+    const int s = pucch->ul_slot;
+    memset(pucch, 0, sizeof(*pucch));
+    pucch->frame = s == n_slots_frame - 1 ? (f + 1) % 1024 : f;
+    pucch->ul_slot = (s + 1) % n_slots_frame;
+    return nr_acknack_scheduling(mod_id, UE_id, frame, slot);
+  }
+
   // Find the right timing_indicator value.
   int i = 0;
   while (i < 8) {
diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
index 9784b6b79e..db4e26ae85 100644
--- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
@@ -61,13 +61,124 @@ const uint32_t NR_LONG_BSR_TABLE[256] ={
 35910462, 38241455, 40723756, 43367187, 46182206, 49179951, 52372284, 55771835, 59392055, 63247269, 67352729, 71724679, 76380419, 81338368, 162676736, 4294967295
 };
 
-void nr_process_mac_pdu(
-    module_id_t module_idP,
-    rnti_t rnti,
-    uint8_t CC_id,
-    frame_t frameP,
-    uint8_t *pduP,
-    uint16_t mac_pdu_len)
+void calculate_preferred_ul_tda(module_id_t module_id, const NR_BWP_Uplink_t *ubwp)
+{
+  gNB_MAC_INST *nrmac = RC.nrmac[module_id];
+  const int bwp_id = ubwp->bwp_Id;
+  if (nrmac->preferred_ul_tda[bwp_id])
+    return;
+
+  /* there is a mixed slot only when in TDD */
+  const NR_ServingCellConfigCommon_t *scc = nrmac->common_channels->ServingCellConfigCommon;
+  const int mu = scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.subcarrierSpacing;
+  const NR_TDD_UL_DL_Pattern_t *tdd =
+      scc->tdd_UL_DL_ConfigurationCommon ? &scc->tdd_UL_DL_ConfigurationCommon->pattern1 : NULL;
+  /* Uplink symbols are at the end of the slot */
+  const int symb_ulMixed = tdd ? ((1 << tdd->nrofUplinkSymbols) - 1) << (14 - tdd->nrofUplinkSymbols) : 0;
+
+  const struct NR_PUCCH_Config__resourceToAddModList *resList = ubwp->bwp_Dedicated->pucch_Config->choice.setup->resourceToAddModList;
+  // for the moment, just block any symbol that might hold a PUCCH, regardless
+  // of the RB. This is a big simplification, as most RBs will NOT have a PUCCH
+  // in the respective symbols, but it simplifies scheduling
+  uint16_t symb_pucch = 0;
+  for (int i = 0; i < resList->list.count; ++i) {
+    const NR_PUCCH_Resource_t *resource = resList->list.array[i];
+    int nrofSymbols = 0;
+    int startingSymbolIndex = 0;
+    switch (resource->format.present) {
+      case NR_PUCCH_Resource__format_PR_format0:
+        nrofSymbols = resource->format.choice.format0->nrofSymbols;
+        startingSymbolIndex = resource->format.choice.format0->startingSymbolIndex;
+        break;
+      case NR_PUCCH_Resource__format_PR_format1:
+        nrofSymbols = resource->format.choice.format1->nrofSymbols;
+        startingSymbolIndex = resource->format.choice.format1->startingSymbolIndex;
+        break;
+      case NR_PUCCH_Resource__format_PR_format2:
+        nrofSymbols = resource->format.choice.format2->nrofSymbols;
+        startingSymbolIndex = resource->format.choice.format2->startingSymbolIndex;
+        break;
+      case NR_PUCCH_Resource__format_PR_format3:
+        nrofSymbols = resource->format.choice.format3->nrofSymbols;
+        startingSymbolIndex = resource->format.choice.format3->startingSymbolIndex;
+        break;
+      case NR_PUCCH_Resource__format_PR_format4:
+        nrofSymbols = resource->format.choice.format4->nrofSymbols;
+        startingSymbolIndex = resource->format.choice.format4->startingSymbolIndex;
+        break;
+      default:
+        AssertFatal(0, "found NR_PUCCH format index %d\n", resource->format.present);
+        break;
+    }
+    symb_pucch |= ((1 << nrofSymbols) - 1) << startingSymbolIndex;
+  }
+
+  /* check that TDA index 1 fits into UL slot and does not overlap with PUCCH */
+  const struct NR_PUSCH_TimeDomainResourceAllocationList *tdaList = ubwp->bwp_Common->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList;
+  AssertFatal(tdaList->list.count >= 3, "need to have at least three TDAs for UL slots\n");
+  const NR_PUSCH_TimeDomainResourceAllocation_t *tdaP_UL = tdaList->list.array[0];
+  const int k2 = get_K2(ubwp, /* tda = */ 0, mu);
+  int start, len;
+  SLIV2SL(tdaP_UL->startSymbolAndLength, &start, &len);
+  const uint16_t symb_tda = ((1 << len) - 1) << start;
+  // check whether PUCCH and TDA overlap: then, we cannot use it. Note that
+  // here we assume that the PUCCH is scheduled in every slot, and on all RBs
+  // (which is mostly not true, this is a simplification)
+  AssertFatal((symb_pucch & symb_tda) == 0, "TDA index 0 for UL overlaps with PUCCH\n");
+
+  // get largest time domain allocation (TDA) for UL slot and UL in mixed slot
+  int tdaMi = -1;
+  const NR_PUSCH_TimeDomainResourceAllocation_t *tdaP_Mi = tdaList->list.array[1];
+  AssertFatal(k2 == get_K2(ubwp, /* tda = */ 1, mu),
+              "scheduler cannot handle different k2 for UL slot (%d) and UL Mixed slot (%ld)\n",
+              k2,
+              get_K2(ubwp, /* tda = */ 1, mu));
+  SLIV2SL(tdaP_Mi->startSymbolAndLength, &start, &len);
+  const uint16_t symb_tda_mi = ((1 << len) - 1) << start;
+  // check whether PUCCH and TDA overlap: then, we cannot use it. Also, check
+  // whether TDA is entirely within mixed slot, UL. Note that here we assume
+  // that the PUCCH is scheduled in every slot, and on all RBs (which is
+  // mostly not true, this is a simplification)
+  if ((symb_pucch & symb_tda_mi) == 0 && (symb_ulMixed & symb_tda_mi) == symb_tda_mi) {
+    tdaMi = 1;
+  } else {
+    LOG_E(MAC,
+          "TDA index 1 UL overlaps with PUCCH or is not entirely in mixed slot (symb_pucch %x symb_ulMixed %x symb_tda_mi %x), won't schedule UL mixed slot\n",
+          symb_pucch,
+          symb_ulMixed,
+          symb_tda_mi);
+  }
+
+  const uint8_t slots_per_frame[5] = {10, 20, 40, 80, 160};
+  const int n = slots_per_frame[*scc->ssbSubcarrierSpacing];
+  nrmac->preferred_ul_tda[bwp_id] = malloc(n * sizeof(*nrmac->preferred_ul_tda[bwp_id]));
+
+  const int nr_mix_slots = tdd ? tdd->nrofDownlinkSymbols != 0 || tdd->nrofUplinkSymbols != 0 : 0;
+  const int nr_slots_period = tdd ? tdd->nrofDownlinkSlots + tdd->nrofUplinkSlots + nr_mix_slots : n;
+  for (int slot = 0; slot < n; ++slot) {
+    const int sched_slot = (slot + k2) % n;
+    nrmac->preferred_ul_tda[bwp_id][slot] = -1;
+    if (!tdd || sched_slot % nr_slots_period >= tdd->nrofDownlinkSlots + nr_mix_slots)
+      nrmac->preferred_ul_tda[bwp_id][slot] = 0;
+    else if (tdd && nr_mix_slots && sched_slot % nr_slots_period == tdd->nrofDownlinkSlots)
+      nrmac->preferred_ul_tda[bwp_id][slot] = tdaMi;
+    LOG_I(MAC, "DL slot %d UL slot %d preferred_ul_tda %d\n", slot, sched_slot, nrmac->preferred_ul_tda[bwp_id][slot]);
+  }
+
+  if (k2 < tdd->nrofUplinkSlots)
+    LOG_W(MAC,
+          "k2 %d < tdd->nrofUplinkSlots %ld: not all UL slots can be scheduled\n",
+          k2,
+          tdd->nrofUplinkSlots);
+}
+
+void nr_process_mac_pdu(module_id_t module_idP,
+                        int UE_id,
+                        uint8_t CC_id,
+                        frame_t frameP,
+                        sub_frame_t slot,
+                        uint8_t *pduP,
+                        uint16_t mac_pdu_len)
 {
 
     // This function is adapting code from the old
@@ -79,11 +190,6 @@ void nr_process_mac_pdu(
 
 
     NR_UE_info_t *UE_info = &RC.nrmac[module_idP]->UE_info;
-    int UE_id = find_nr_UE_id(module_idP, rnti);
-    if (UE_id == -1) {
-      LOG_E(MAC, "%s() UE_id == -1\n",__func__);
-      return;
-    }
     NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
     //  For both DL/UL-SCH
     //  Except:
@@ -145,12 +251,15 @@ void nr_process_mac_pdu(
                NR_BSR_SHORT *bsr_s = (NR_BSR_SHORT *) ce_ptr;
                sched_ctrl->estimated_ul_buffer = 0;
                sched_ctrl->estimated_ul_buffer = NR_SHORT_BSR_TABLE[bsr_s->Buffer_size];
-               LOG_D(MAC, "SHORT BSR, LCG ID %d, BS Index %d, BS value < %d, est buf %d\n",
+               LOG_D(MAC,
+                     "SHORT BSR at %4d.%2d, LCG ID %d, BS Index %d, BS value < %d, est buf %d\n",
+                     frameP,
+                     slot,
                      bsr_s->LcgID,
                      bsr_s->Buffer_size,
                      NR_SHORT_BSR_TABLE[bsr_s->Buffer_size],
                      sched_ctrl->estimated_ul_buffer);
-        	break;
+               break;
 
         case UL_SCH_LCID_L_BSR:
         case UL_SCH_LCID_L_TRUNCATED_BSR:
@@ -170,16 +279,18 @@ void nr_process_mac_pdu(
                n_Lcg = bsr_l->LcgID7 + bsr_l->LcgID6 + bsr_l->LcgID5 + bsr_l->LcgID4 +
                        bsr_l->LcgID3 + bsr_l->LcgID2 + bsr_l->LcgID1 + bsr_l->LcgID0;
 
-               LOG_D(MAC, "LONG BSR, LCG ID(7-0) %d/%d/%d/%d/%d/%d/%d/%d\n",
-                     bsr_l->LcgID7, bsr_l->LcgID6, bsr_l->LcgID5, bsr_l->LcgID4,
-                     bsr_l->LcgID3, bsr_l->LcgID2, bsr_l->LcgID1, bsr_l->LcgID0);
-
                for (int n = 0; n < n_Lcg; n++){
-                 LOG_D(MAC, "LONG BSR, %d/%d (n/n_Lcg), BS Index %d, BS value < %d",
-                       n, n_Lcg, pdu_ptr[mac_subheader_len + 1 + n],
-                       NR_LONG_BSR_TABLE[pdu_ptr[mac_subheader_len + 1 + n]]);
                  sched_ctrl->estimated_ul_buffer +=
                        NR_LONG_BSR_TABLE[pdu_ptr[mac_subheader_len + 1 + n]];
+                 LOG_D(MAC,
+                       "LONG BSR at %4d.%2d, %d/%d (n/n_Lcg), BS Index %d, BS value < %d, total %d\n",
+                       frameP,
+                       slot,
+                       n,
+                       n_Lcg,
+                       pdu_ptr[mac_subheader_len + 1 + n],
+                       NR_LONG_BSR_TABLE[pdu_ptr[mac_subheader_len + 1 + n]],
+                       sched_ctrl->estimated_ul_buffer);
                }
 
                break;
@@ -196,6 +307,20 @@ void nr_process_mac_pdu(
         	//fixed length
         	mac_ce_len = 2;
         	/* Extract SINGLE ENTRY PHR elements for PHR calculation */
+                ce_ptr = &pdu_ptr[mac_subheader_len];
+                NR_SINGLE_ENTRY_PHR_MAC_CE *phr = (NR_SINGLE_ENTRY_PHR_MAC_CE *) ce_ptr;
+                /* Save the phr info */
+                const int PH = phr->PH;
+                const int PCMAX = phr->PCMAX;
+                /* 38.133 Table10.1.17.1-1 */
+                if (PH < 55)
+                  sched_ctrl->ph = PH - 32;
+                else
+                  sched_ctrl->ph = PH - 32 + (PH - 54);
+                /* 38.133 Table10.1.18.1-1 */
+                sched_ctrl->pcmax = PCMAX - 29;
+                LOG_D(MAC, "SINGLE ENTRY PHR R1 %d PH %d (%d dB) R2 %d PCMAX %d (%d dBm)\n",
+                      phr->R1, PH, sched_ctrl->ph, phr->R2, PCMAX, sched_ctrl->pcmax);
         	break;
 
         case UL_SCH_LCID_MULTI_ENTRY_PHR_1_OCT:
@@ -246,48 +371,51 @@ void nr_process_mac_pdu(
               break;
 
         case UL_SCH_LCID_DTCH:
-                //  check if LCID is valid at current time.
-                if(((NR_MAC_SUBHEADER_SHORT *)pdu_ptr)->F){
-                    //mac_sdu_len |= (uint16_t)(((NR_MAC_SUBHEADER_LONG *)pdu_ptr)->L2)<<8;
-                    mac_subheader_len = 3;
-                    mac_sdu_len = ((uint16_t)(((NR_MAC_SUBHEADER_LONG *) pdu_ptr)->L1 & 0x7f) << 8)
-                    | ((uint16_t)((NR_MAC_SUBHEADER_LONG *) pdu_ptr)->L2 & 0xff);
+          //  check if LCID is valid at current time.
+          if (((NR_MAC_SUBHEADER_SHORT *)pdu_ptr)->F) {
+            // mac_sdu_len |= (uint16_t)(((NR_MAC_SUBHEADER_LONG *)pdu_ptr)->L2)<<8;
+            mac_subheader_len = 3;
+            mac_sdu_len = ((uint16_t)(((NR_MAC_SUBHEADER_LONG *)pdu_ptr)->L1 & 0x7f) << 8)
+                          | ((uint16_t)((NR_MAC_SUBHEADER_LONG *)pdu_ptr)->L2 & 0xff);
 
-                } else {
-                  mac_sdu_len = (uint16_t)((NR_MAC_SUBHEADER_SHORT *)pdu_ptr)->L;
-                  mac_subheader_len = 2;
-                }
+          } else {
+            mac_sdu_len = (uint16_t)((NR_MAC_SUBHEADER_SHORT *)pdu_ptr)->L;
+            mac_subheader_len = 2;
+          }
 
-                LOG_D(MAC, "[UE %d] Frame %d : ULSCH -> UL-DTCH %d (gNB %d, %d bytes)\n", module_idP, frameP, rx_lcid, module_idP, mac_sdu_len);
-		int UE_id = find_nr_UE_id(module_idP, rnti);
-		RC.nrmac[module_idP]->UE_info.mac_stats[UE_id].lc_bytes_rx[rx_lcid] += mac_sdu_len;
-                #if defined(ENABLE_MAC_PAYLOAD_DEBUG)
-		    log_dump(MAC, pdu_ptr + mac_subheader_len, 32, LOG_DUMP_CHAR, "\n");
+          LOG_D(MAC,
+                "[UE %d] Frame %d : ULSCH -> UL-DTCH %d (gNB %d, %d bytes)\n",
+                module_idP,
+                frameP,
+                rx_lcid,
+                module_idP,
+                mac_sdu_len);
+          UE_info->mac_stats[UE_id].lc_bytes_rx[rx_lcid] += mac_sdu_len;
+#if defined(ENABLE_MAC_PAYLOAD_DEBUG)
+          log_dump(MAC, pdu_ptr + mac_subheader_len, 32, LOG_DUMP_CHAR, "\n");
+#endif
 
-                #endif
+          mac_rlc_data_ind(module_idP,
+                           UE_info->rnti[UE_id],
+                           module_idP,
+                           frameP,
+                           ENB_FLAG_YES,
+                           MBMS_FLAG_NO,
+                           rx_lcid,
+                           (char *)(pdu_ptr + mac_subheader_len),
+                           mac_sdu_len,
+                           1,
+                           NULL);
 
-                mac_rlc_data_ind(module_idP,
-                                 rnti,
-                                 module_idP,
-                                 frameP,
-                                 ENB_FLAG_YES,
-                                 MBMS_FLAG_NO,
-                                 rx_lcid,
-                                 (char *) (pdu_ptr + mac_subheader_len),
-                                 mac_sdu_len,
-                                 1,
-                                 NULL);
-
-                /* Updated estimated buffer when receiving data */
-                if (sched_ctrl->estimated_ul_buffer >= mac_sdu_len)
-                  sched_ctrl->estimated_ul_buffer -= mac_sdu_len;
-                else
-                  sched_ctrl->estimated_ul_buffer = 0;
-
-            break;
+          /* Updated estimated buffer when receiving data */
+          if (sched_ctrl->estimated_ul_buffer >= mac_sdu_len)
+            sched_ctrl->estimated_ul_buffer -= mac_sdu_len;
+          else
+            sched_ctrl->estimated_ul_buffer = 0;
+          break;
 
         default:
-          LOG_D(MAC, "Received unknown MAC header (LCID = 0x%02x)\n", rx_lcid);
+          LOG_E(MAC, "Received unknown MAC header (LCID = 0x%02x)\n", rx_lcid);
           return;
           break;
         }
@@ -305,6 +433,24 @@ void nr_process_mac_pdu(
     }
 }
 
+void abort_nr_ul_harq(module_id_t mod_id, int UE_id, int8_t harq_pid)
+{
+  NR_UE_info_t *UE_info = &RC.nrmac[mod_id]->UE_info;
+  NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
+  NR_UE_ul_harq_t *harq = &sched_ctrl->ul_harq_processes[harq_pid];
+
+  harq->ndi ^= 1;
+  harq->round = 0;
+  UE_info->mac_stats[UE_id].ulsch_errors++;
+  add_tail_nr_list(&sched_ctrl->available_ul_harq, harq_pid);
+
+  /* the transmission failed: the UE won't send the data we expected initially,
+   * so retrieve to correctly schedule after next BSR */
+  sched_ctrl->sched_ul_bytes -= harq->sched_pusch.tb_size;
+  if (sched_ctrl->sched_ul_bytes < 0)
+    sched_ctrl->sched_ul_bytes = 0;
+}
+
 void handle_nr_ul_harq(module_id_t mod_id,
                        frame_t frame,
                        sub_frame_t slot,
@@ -347,14 +493,11 @@ void handle_nr_ul_harq(module_id_t mod_id,
           crc_pdu->rnti);
     add_tail_nr_list(&sched_ctrl->available_ul_harq, harq_pid);
   } else if (harq->round == MAX_HARQ_ROUNDS) {
-    harq->ndi ^= 1;
-    harq->round = 0;
+    abort_nr_ul_harq(mod_id, UE_id, harq_pid);
     LOG_D(MAC,
           "RNTI %04x: Ulharq id %d crc failed in all rounds\n",
           crc_pdu->rnti,
           harq_pid);
-    UE_info->mac_stats[UE_id].ulsch_errors++;
-    add_tail_nr_list(&sched_ctrl->available_ul_harq, harq_pid);
   } else {
     harq->round++;
     LOG_D(MAC,
@@ -407,11 +550,12 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
           sduP);
 
     // if not missed detection (10dB threshold for now)
-    if (UE_scheduling_control->ul_rssi < (100+rssi)) {
+    if (UE_scheduling_control->raw_rssi < 100 + rssi) {
       UE_scheduling_control->tpc0 = nr_get_tpc(target_snrx10,ul_cqi,30);
       if (timing_advance != 0xffff)
         UE_scheduling_control->ta_update = timing_advance;
-      UE_scheduling_control->ul_rssi = rssi;
+      UE_scheduling_control->raw_rssi = rssi;
+      UE_scheduling_control->pusch_snrx10 = ul_cqi * 5 - 640;
       LOG_D(NR_MAC, "[UE %d] PUSCH TPC %d and TA %d\n",UE_id,UE_scheduling_control->tpc0,UE_scheduling_control->ta_update);
     }
     else{
@@ -438,17 +582,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
       if (UE_scheduling_control->sched_ul_bytes < 0)
         UE_scheduling_control->sched_ul_bytes = 0;
 
-      nr_process_mac_pdu(gnb_mod_idP, current_rnti, CC_idP, frameP, sduP, sdu_lenP);
-    }
-    else {
-      NR_UE_ul_harq_t *cur_harq = &UE_scheduling_control->ul_harq_processes[harq_pid];
-      /* reduce sched_ul_bytes when cur_harq->round == 3 */
-      if (cur_harq->round == 3){
-        const uint32_t tb_size = UE_scheduling_control->ul_harq_processes[harq_pid].sched_pusch.tb_size;
-        UE_scheduling_control->sched_ul_bytes -= tb_size;
-        if (UE_scheduling_control->sched_ul_bytes < 0)
-          UE_scheduling_control->sched_ul_bytes = 0;
-      }
+      nr_process_mac_pdu(gnb_mod_idP, UE_id, CC_idP, frameP, slotP, sduP, sdu_lenP);
     }
   } else {
     if (!sduP) // check that CRC passed
@@ -504,7 +638,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
   }
 }
 
-long get_K2(NR_BWP_Uplink_t *ubwp, int time_domain_assignment, int mu) {
+long get_K2(const NR_BWP_Uplink_t *ubwp, int time_domain_assignment, int mu) {
   DevAssert(ubwp);
   const NR_PUSCH_TimeDomainResourceAllocation_t *tda_list = ubwp->bwp_Common->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[time_domain_assignment];
   if (tda_list->k2)
@@ -524,21 +658,142 @@ int next_list_entry_looped(NR_list_t *list, int UE_id)
   return list->next[UE_id] < 0 ? list->head : list->next[UE_id];
 }
 
+bool allocate_ul_retransmission(module_id_t module_id,
+                                frame_t frame,
+                                sub_frame_t slot,
+                                uint8_t *rballoc_mask,
+                                int *n_rb_sched,
+                                int UE_id,
+                                int harq_pid)
+{
+  const int CC_id = 0;
+  const NR_ServingCellConfigCommon_t *scc = RC.nrmac[module_id]->common_channels[CC_id].ServingCellConfigCommon;
+  NR_UE_info_t *UE_info = &RC.nrmac[module_id]->UE_info;
+  NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
+  NR_sched_pusch_t *retInfo = &sched_ctrl->ul_harq_processes[harq_pid].sched_pusch;
+  int rbStart =
+      NRRIV2PRBOFFSET(sched_ctrl->active_ubwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
+  const uint16_t bwpSize =
+      NRRIV2BW(sched_ctrl->active_ubwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
+
+  const uint8_t num_dmrs_cdm_grps_no_data = 1;
+  const int tda = RC.nrmac[module_id]->preferred_dl_tda[sched_ctrl->active_ubwp->bwp_Id][slot];
+  if (tda == retInfo->time_domain_allocation) {
+    /* Check the resource is enough for retransmission */
+    while (rbStart < bwpSize && !rballoc_mask[rbStart])
+      rbStart++;
+    if (rbStart + retInfo->rbSize >= bwpSize) {
+      LOG_D(MAC, "cannot allocate retransmission of UE %d/RNTI %04x: no resources\n", UE_id, UE_info->rnti[UE_id]);
+      return false;
+    }
+    /* check whether we need to switch the TDA allocation since tha last
+     * (re-)transmission */
+    NR_pusch_semi_static_t *ps = &sched_ctrl->pusch_semi_static;
+    const long f = sched_ctrl->search_space->searchSpaceType->choice.ue_Specific->dci_Formats;
+    const int dci_format = f ? NR_UL_DCI_FORMAT_0_1 : NR_UL_DCI_FORMAT_0_0;
+    if (ps->time_domain_allocation != tda
+        || ps->dci_format != dci_format
+        || ps->num_dmrs_cdm_grps_no_data != num_dmrs_cdm_grps_no_data)
+      nr_set_pusch_semi_static(scc, sched_ctrl->active_ubwp, dci_format, tda, num_dmrs_cdm_grps_no_data, ps);
+    LOG_D(MAC, "%s(): retransmission keeping TDA %d and TBS %d\n", __func__, tda, retInfo->tb_size);
+  } else {
+    /* the retransmission will use a different time domain allocation, check
+     * that we have enough resources */
+    while (rbStart < bwpSize && !rballoc_mask[rbStart])
+      rbStart++;
+    int rbSize = 0;
+    while (rbStart + rbSize < bwpSize && rballoc_mask[rbStart + rbSize])
+      rbSize++;
+    NR_pusch_semi_static_t temp_ps;
+    const long f = sched_ctrl->search_space->searchSpaceType->choice.ue_Specific->dci_Formats;
+    const int dci_format = f ? NR_UL_DCI_FORMAT_0_1 : NR_UL_DCI_FORMAT_0_0;
+    nr_set_pusch_semi_static(scc, sched_ctrl->active_ubwp, dci_format, tda, num_dmrs_cdm_grps_no_data, &temp_ps);
+    uint32_t new_tbs;
+    uint16_t new_rbSize;
+    bool success = nr_find_nb_rb(retInfo->Qm,
+                                 retInfo->R,
+                                 temp_ps.nrOfSymbols,
+                                 temp_ps.N_PRB_DMRS * temp_ps.num_dmrs_symb,
+                                 retInfo->tb_size,
+                                 rbSize,
+                                 &new_tbs,
+                                 &new_rbSize);
+    if (!success || new_tbs != retInfo->tb_size) {
+      LOG_D(MAC, "%s(): new TBsize %d of new TDA does not match old TBS %d\n", __func__, new_tbs, retInfo->tb_size);
+      return false; /* the maximum TBsize we might have is smaller than what we need */
+    }
+    LOG_D(MAC, "%s(): retransmission with TDA %d->%d and TBS %d -> %d\n", __func__, retInfo->time_domain_allocation, tda, retInfo->tb_size, new_tbs);
+    /* we can allocate it. Overwrite the time_domain_allocation, the number
+     * of RBs, and the new TB size. The rest is done below */
+    retInfo->tb_size = new_tbs;
+    retInfo->rbSize = new_rbSize;
+    retInfo->time_domain_allocation = tda;
+    sched_ctrl->pusch_semi_static = temp_ps;
+  }
+
+  /* Find free CCE */
+  bool freeCCE = find_free_CCE(module_id, slot, UE_id);
+  if (!freeCCE) {
+    LOG_D(MAC, "%4d.%2d no free CCE for retransmission UL DCI UE %04x\n", frame, slot, UE_info->rnti[UE_id]);
+    return false;
+  }
+
+  /* frame/slot in sched_pusch has been set previously. In the following, we
+   * overwrite the information in the retransmission information before storing
+   * as the new scheduling instruction */
+  retInfo->frame = sched_ctrl->sched_pusch.frame;
+  retInfo->slot = sched_ctrl->sched_pusch.slot;
+  /* Get previous PSUCH field info */
+  sched_ctrl->sched_pusch = *retInfo;
+  NR_sched_pusch_t *sched_pusch = &sched_ctrl->sched_pusch;
+  LOG_D(MAC,
+        "%4d.%2d Allocate UL retransmission UE %d/RNTI %04x sched %4d.%2d (%d RBs)\n",
+        frame,
+        slot,
+        UE_id,
+        UE_info->rnti[UE_id],
+        sched_pusch->frame,
+        sched_pusch->slot,
+        sched_pusch->rbSize);
+
+  sched_pusch->rbStart = rbStart;
+  /* no need to recompute the TBS, it will be the same */
+
+  /* Mark the corresponding RBs as used */
+  n_rb_sched -= sched_pusch->rbSize;
+  for (int rb = 0; rb < sched_ctrl->sched_pusch.rbSize; rb++)
+    rballoc_mask[rb + sched_ctrl->sched_pusch.rbStart] = 0;
+  return true;
+}
+
+void update_ul_ue_R_Qm(NR_sched_pusch_t *sched_pusch, const NR_pusch_semi_static_t *ps)
+{
+  const int mcs = sched_pusch->mcs;
+  sched_pusch->R = nr_get_code_rate_ul(mcs, ps->mcs_table);
+  sched_pusch->Qm = nr_get_Qm_ul(mcs, ps->mcs_table);
+  if (ps->pusch_Config->tp_pi2BPSK
+      && ((ps->mcs_table == 3 && mcs < 2) || (ps->mcs_table == 4 && mcs < 6))) {
+    sched_pusch->R >>= 1;
+    sched_pusch->Qm <<= 1;
+  }
+}
+
 float ul_thr_ue[MAX_MOBILES_PER_GNB];
+uint32_t ul_pf_tbs[3][28]; // pre-computed, approximate TBS values for PF coefficient
 int bsr0ue = -1;
 void pf_ul(module_id_t module_id,
            frame_t frame,
            sub_frame_t slot,
-           int num_slots_per_tdd,
            NR_list_t *UE_list,
+           int max_num_ue,
            int n_rb_sched,
-           uint8_t *rballoc_mask,
-           int max_num_ue) {
+           uint8_t *rballoc_mask) {
 
   const int CC_id = 0;
-  const int tda = 1;
-  NR_ServingCellConfigCommon_t *scc = RC.nrmac[module_id]->common_channels[CC_id].ServingCellConfigCommon;
-  NR_UE_info_t *UE_info = &RC.nrmac[module_id]->UE_info;
+  const uint8_t num_dmrs_cdm_grps_no_data = 1;
+  gNB_MAC_INST *nrmac = RC.nrmac[module_id];
+  NR_ServingCellConfigCommon_t *scc = nrmac->common_channels[CC_id].ServingCellConfigCommon;
+  NR_UE_info_t *UE_info = &nrmac->UE_info;
   const int min_rb = 5;
   float coeff_ue[MAX_MOBILES_PER_GNB];
   // UEs that could be scheduled
@@ -554,86 +809,34 @@ void pf_ul(module_id_t module_id,
   /* Loop UE_list to calculate throughput and coeff */
   for (int UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) {
     NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
-    int rbStart = NRRIV2PRBOFFSET(sched_ctrl->active_bwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
+    int rbStart =
+        NRRIV2PRBOFFSET(sched_ctrl->active_ubwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
     const uint16_t bwpSize = NRRIV2BW(sched_ctrl->active_ubwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
+    NR_sched_pusch_t *sched_pusch = &sched_ctrl->sched_pusch;
+    NR_pusch_semi_static_t *ps = &sched_ctrl->pusch_semi_static;
 
     /* Calculate throughput */
     const float a = 0.0005f; // corresponds to 200ms window
     const uint32_t b = UE_info->mac_stats[UE_id].ulsch_current_bytes;
     ul_thr_ue[UE_id] = (1 - a) * ul_thr_ue[UE_id] + a * b;
 
-    /* Save PUSCH field */
-    /* we want to avoid a lengthy deduction of DMRS and other parameters in
-     * every TTI if we can save it, so check whether dci_format, TDA, or
-     * num_dmrs_cdm_grps_no_data has changed and only then recompute */
-    sched_ctrl->sched_pusch.time_domain_allocation = tda;
-    sched_ctrl->search_space = get_searchspace(sched_ctrl->active_bwp, NR_SearchSpace__searchSpaceType_PR_ue_Specific);
-    sched_ctrl->coreset = get_coreset(sched_ctrl->active_bwp, sched_ctrl->search_space, 1 /* dedicated */);
-    const long f = sched_ctrl->search_space->searchSpaceType->choice.ue_Specific->dci_Formats;
-    const int dci_format = f ? NR_UL_DCI_FORMAT_0_1 : NR_UL_DCI_FORMAT_0_0;
-    const uint8_t num_dmrs_cdm_grps_no_data = 1;
-    NR_sched_pusch_save_t *ps = &sched_ctrl->pusch_save;
-    if (ps->time_domain_allocation != tda
-        || ps->dci_format != dci_format
-        || ps->num_dmrs_cdm_grps_no_data != num_dmrs_cdm_grps_no_data)
-      nr_save_pusch_fields(scc, sched_ctrl->active_ubwp, dci_format, tda, num_dmrs_cdm_grps_no_data, ps);
-
     /* Check if retransmission is necessary */
-    sched_ctrl->sched_pusch.ul_harq_pid = sched_ctrl->retrans_ul_harq.head;
-    if (sched_ctrl->sched_pusch.ul_harq_pid >= 0) {
-      /* RETRANSMISSION: Allocate retransmission*/
-      /* Find free CCE */
-      bool freeCCE = find_free_CCE(module_id, slot, UE_id);
-      if (!freeCCE) {
-        LOG_D(MAC, "%4d.%2d no free CCE for retransmission UL DCI UE %04x\n", frame, slot, UE_info->rnti[UE_id]);
+    sched_pusch->ul_harq_pid = sched_ctrl->retrans_ul_harq.head;
+    if (sched_pusch->ul_harq_pid >= 0) {
+      /* Allocate retransmission*/
+      bool r = allocate_ul_retransmission(
+          module_id, frame, slot, rballoc_mask, &n_rb_sched, UE_id, sched_pusch->ul_harq_pid);
+      if (!r) {
+        LOG_D(MAC, "%4d.%2d UL retransmission UE RNTI %04x can NOT be allocated\n", frame, slot, UE_info->rnti[UE_id]);
         continue;
       }
       /* reduce max_num_ue once we are sure UE can be allocated, i.e., has CCE */
       max_num_ue--;
       if (max_num_ue < 0)
         return;
-
-      /* Save shced_frame and sched_slot before overwrite by previous PUSCH filed */
-      NR_UE_ul_harq_t *cur_harq = &sched_ctrl->ul_harq_processes[sched_ctrl->sched_pusch.ul_harq_pid];
-      cur_harq->sched_pusch.frame = sched_ctrl->sched_pusch.frame;
-      cur_harq->sched_pusch.slot = sched_ctrl->sched_pusch.slot;
-      /* Get previous PSUCH filed info */
-      sched_ctrl->sched_pusch = cur_harq->sched_pusch;
-      NR_sched_pusch_t *sched_pusch = &sched_ctrl->sched_pusch;
-      LOG_D(MAC, "%4d.%2d Allocate UL retransmission UE %d/RNTI %04x sched %4d.%2d (%d RBs)\n",
-            frame, slot, UE_id, UE_info->rnti[UE_id],
-            sched_pusch->frame, sched_pusch->slot,
-            sched_pusch->rbSize);
-
-      while (rbStart < bwpSize && !rballoc_mask[rbStart]) rbStart++;
-      if (rbStart + sched_pusch->rbSize >= bwpSize) {
-        LOG_W(MAC, "cannot allocate UL data for UE %d/RNTI %04x: no resources\n",
-              UE_id, UE_info->rnti[UE_id]);
-        return;
-      }
-      sched_pusch->rbStart = rbStart;
-      /* no need to recompute the TBS, it will be the same */
-
-      /* Mark the corresponding RBs as used */
-      n_rb_sched -= sched_pusch->rbSize;
-      for (int rb = 0; rb < sched_ctrl->sched_pusch.rbSize; rb++)
-        rballoc_mask[rb + sched_ctrl->sched_pusch.rbStart] = 0;
-
       continue;
     }
 
-    /* Calculate TBS from MCS */
-    NR_sched_pusch_t *sched_pusch = &sched_ctrl->sched_pusch;
-    const int mcs = 9;
-    sched_pusch->mcs = mcs;
-    sched_pusch->R = nr_get_code_rate_ul(mcs, ps->mcs_table);
-    sched_pusch->Qm = nr_get_Qm_ul(mcs, ps->mcs_table);
-    if (ps->pusch_Config->tp_pi2BPSK
-        && ((ps->mcs_table == 3 && mcs < 2) || (ps->mcs_table == 4 && mcs < 6))) {
-      sched_pusch->R >>= 1;
-      sched_pusch->Qm <<= 1;
-    }
-
     /* Check BSR and schedule UE if it is zero to avoid starvation, since we do
      * not have SR (yet) */
     if (sched_ctrl->estimated_ul_buffer - sched_ctrl->sched_ul_bytes <= 0) {
@@ -652,10 +855,25 @@ void pf_ul(module_id_t module_id,
 
       while (rbStart < bwpSize && !rballoc_mask[rbStart]) rbStart++;
       if (rbStart + min_rb >= bwpSize) {
-        LOG_W(MAC, "cannot allocate UL data for UE %d/RNTI %04x: no resources\n",
+        LOG_D(MAC, "cannot allocate continuous data for UE %d/RNTI %04x: no resources\n",
               UE_id, UE_info->rnti[UE_id]);
-        return;
+        continue;
       }
+
+      /* Save PUSCH field */
+      /* we want to avoid a lengthy deduction of DMRS and other parameters in
+       * every TTI if we can save it, so check whether dci_format, TDA, or
+       * num_dmrs_cdm_grps_no_data has changed and only then recompute */
+      const long f = sched_ctrl->search_space->searchSpaceType->choice.ue_Specific->dci_Formats;
+      const int dci_format = f ? NR_UL_DCI_FORMAT_0_1 : NR_UL_DCI_FORMAT_0_0;
+      const int tda = nrmac->preferred_ul_tda[sched_ctrl->active_ubwp->bwp_Id][slot];
+      if (ps->time_domain_allocation != tda
+          || ps->dci_format != dci_format
+          || ps->num_dmrs_cdm_grps_no_data != num_dmrs_cdm_grps_no_data)
+        nr_set_pusch_semi_static(scc, sched_ctrl->active_ubwp, dci_format, tda, num_dmrs_cdm_grps_no_data, ps);
+      NR_sched_pusch_t *sched_pusch = &sched_ctrl->sched_pusch;
+      sched_pusch->mcs = 9;
+      update_ul_ue_R_Qm(sched_pusch, ps);
       sched_pusch->rbStart = rbStart;
       sched_pusch->rbSize = min_rb;
       sched_pusch->tb_size = nr_compute_tbs(sched_pusch->Qm,
@@ -680,15 +898,8 @@ void pf_ul(module_id_t module_id,
     add_tail_nr_list(&UE_sched, UE_id);
 
     /* Calculate coefficient*/
-    const uint32_t tbs = nr_compute_tbs(sched_pusch->Qm,
-                                        sched_pusch->R,
-                                        1, // rbSize
-                                        ps->nrOfSymbols,
-                                        ps->N_PRB_DMRS * ps->num_dmrs_symb,
-                                        0, // nb_rb_oh
-                                        0,
-                                        1 /* NrOfLayers */)
-                          >> 3;
+    sched_pusch->mcs = 9;
+    const uint32_t tbs = ul_pf_tbs[ps->mcs_table][sched_pusch->mcs];
     coeff_ue[UE_id] = (float) tbs / ul_thr_ue[UE_id];
     LOG_D(MAC,"b %d, ul_thr_ue[%d] %f, tbs %d, coeff_ue[%d] %f\n",
           b, UE_id, ul_thr_ue[UE_id], tbs, UE_id, coeff_ue[UE_id]);
@@ -727,35 +938,45 @@ void pf_ul(module_id_t module_id,
 
     NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
     int rbStart = NRRIV2PRBOFFSET(sched_ctrl->active_bwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
-    const uint16_t bwpSize = NRRIV2BW(sched_ctrl->active_ubwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
+    /* for some reason, the UEs do not like when they are scheduled on the last
+     * RB. Hence, as a (hopefully temporary) fix, schedule one RB less. */
+    const uint16_t bwpSize = NRRIV2BW(sched_ctrl->active_ubwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE) - 1;
     NR_sched_pusch_t *sched_pusch = &sched_ctrl->sched_pusch;
-
+    NR_pusch_semi_static_t *ps = &sched_ctrl->pusch_semi_static;
 
     while (rbStart < bwpSize && !rballoc_mask[rbStart]) rbStart++;
     sched_pusch->rbStart = rbStart;
-    if (rbStart + min_rb >= bwpSize) {
-      LOG_W(MAC, "cannot allocate UL data for UE %d/RNTI %04x: no resources\n",
-            UE_id, UE_info->rnti[UE_id]);
-      return;
-    }
+    uint16_t max_rbSize = 1;
+    while (rbStart + max_rbSize < bwpSize && rballoc_mask[rbStart + max_rbSize])
+      max_rbSize++;
 
-    /* Calculate the current scheduling bytes */
+    /* Save PUSCH field */
+    /* we want to avoid a lengthy deduction of DMRS and other parameters in
+     * every TTI if we can save it, so check whether dci_format, TDA, or
+     * num_dmrs_cdm_grps_no_data has changed and only then recompute */
+    const long f = sched_ctrl->search_space->searchSpaceType->choice.ue_Specific->dci_Formats;
+    const int dci_format = f ? NR_UL_DCI_FORMAT_0_1 : NR_UL_DCI_FORMAT_0_0;
+    const int tda = nrmac->preferred_ul_tda[sched_ctrl->active_ubwp->bwp_Id][slot];
+    if (ps->time_domain_allocation != tda
+        || ps->dci_format != dci_format
+        || ps->num_dmrs_cdm_grps_no_data != num_dmrs_cdm_grps_no_data)
+      nr_set_pusch_semi_static(scc, sched_ctrl->active_ubwp, dci_format, tda, num_dmrs_cdm_grps_no_data, ps);
+    update_ul_ue_R_Qm(sched_pusch, ps);
+
+    /* Calculate the current scheduling bytes and the necessary RBs */
     const int B = cmax(sched_ctrl->estimated_ul_buffer - sched_ctrl->sched_ul_bytes, 0);
-    uint16_t rbSize = min_rb - 1;
-    do {
-      rbSize++;
-      sched_pusch->rbSize = rbSize;
-      sched_pusch->tb_size = nr_compute_tbs(sched_pusch->Qm,
-                                            sched_pusch->R,
-                                            sched_pusch->rbSize,
-                                            sched_ctrl->pusch_save.nrOfSymbols,
-                                            sched_ctrl->pusch_save.N_PRB_DMRS * sched_ctrl->pusch_save.num_dmrs_symb,
-                                            0, // nb_rb_oh
-                                            0,
-                                            1 /* NrOfLayers */)
-                             >> 3;
-    } while (rbStart + rbSize < bwpSize && rballoc_mask[rbStart+rbSize] &&
-             sched_pusch->tb_size < B);
+    uint16_t rbSize = 0;
+    uint32_t TBS = 0;
+    nr_find_nb_rb(sched_pusch->Qm,
+                  sched_pusch->R,
+                  ps->nrOfSymbols,
+                  ps->N_PRB_DMRS * ps->num_dmrs_symb,
+                  B,
+                  max_rbSize,
+                  &TBS,
+                  &rbSize);
+    sched_pusch->rbSize = rbSize;
+    sched_pusch->tb_size = TBS;
     LOG_D(MAC,"rbSize %d, TBS %d, est buf %d, sched_ul %d, B %d\n",
           rbSize, sched_pusch->tb_size, sched_ctrl->estimated_ul_buffer, sched_ctrl->sched_ul_bytes, B);
 
@@ -766,11 +987,8 @@ void pf_ul(module_id_t module_id,
   }
 }
 
-bool nr_simple_ulsch_preprocessor(module_id_t module_id,
-                                  frame_t frame,
-                                  sub_frame_t slot,
-                                  int num_slots_per_tdd,
-                                  uint64_t ulsch_in_slot_bitmap) {
+bool nr_fr1_ulsch_preprocessor(module_id_t module_id, frame_t frame, sub_frame_t slot)
+{
   gNB_MAC_INST *nr_mac = RC.nrmac[module_id];
   NR_COMMON_channels_t *cc = nr_mac->common_channels;
   NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon;
@@ -782,31 +1000,25 @@ bool nr_simple_ulsch_preprocessor(module_id_t module_id,
 
   const int CC_id = 0;
 
-  /* NOT support different K2 in here, Get the K2 for first UE */
+  /* Get the K2 for first UE to compute offset. The other UEs are guaranteed to
+   * have the same K2 (we don't support multiple/different K2s via different
+   * TDAs yet). If the TDA is negative, it means that there is no UL slot to
+   * schedule now (slot + k2 is not UL slot) */
   int UE_id = UE_info->list.head;
   NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
-  const int tda = 1;
-  const struct NR_PUSCH_TimeDomainResourceAllocationList *tdaList =
-    sched_ctrl->active_ubwp->bwp_Common->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList;
-  AssertFatal(tda < tdaList->list.count,
-              "time domain assignment %d >= %d\n",
-              tda,
-              tdaList->list.count);
-
+  const int tda = nr_mac->preferred_ul_tda[sched_ctrl->active_ubwp->bwp_Id][slot];
+  if (tda < 0)
+    return false;
   int K2 = get_K2(sched_ctrl->active_ubwp, tda, mu);
   const int sched_frame = frame + (slot + K2 >= nr_slots_per_frame[mu]);
   const int sched_slot = (slot + K2) % nr_slots_per_frame[mu];
-  if (!is_xlsch_in_slot(ulsch_in_slot_bitmap, sched_slot))
+  if (!is_xlsch_in_slot(nr_mac->ulsch_slot_bitmap[slot / 64], sched_slot))
     return false;
 
   sched_ctrl->sched_pusch.slot = sched_slot;
   sched_ctrl->sched_pusch.frame = sched_frame;
-
-  /* Confirm all the UE have same K2 as the first UE */
   for (UE_id = UE_info->list.next[UE_id]; UE_id >= 0; UE_id = UE_info->list.next[UE_id]) {
     NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
-    AssertFatal(K2 == get_K2(sched_ctrl->active_ubwp, tda, mu),
-                "Different K2, %d(UE%d) != %ld(UE%d)\n", K2, 0, get_K2(sched_ctrl->active_ubwp, tda, mu), UE_id);
     sched_ctrl->sched_pusch.slot = sched_slot;
     sched_ctrl->sched_pusch.frame = sched_frame;
   }
@@ -839,28 +1051,53 @@ bool nr_simple_ulsch_preprocessor(module_id_t module_id,
   pf_ul(module_id,
         frame,
         slot,
-        num_slots_per_tdd,
         &UE_info->list,
+        2,
         len,
-        rballoc_mask,
-        2);
+        rballoc_mask);
   return true;
 }
 
-void nr_schedule_ulsch(module_id_t module_id,
-                       frame_t frame,
-                       sub_frame_t slot,
-                       int num_slots_per_tdd,
-                       int ul_slots,
-                       uint64_t ulsch_in_slot_bitmap) {
+nr_pp_impl_ul nr_init_fr1_ulsch_preprocessor(module_id_t module_id, int CC_id)
+{
+  /* in the PF algorithm, we have to use the TBsize to compute the coefficient.
+   * This would include the number of DMRS symbols, which in turn depends on
+   * the time domain allocation. In case we are in a mixed slot, we do not want
+   * to recalculate all these values, and therefore we provide a look-up table
+   * which should approximately(!) give us the TBsize. In particular, the
+   * number of symbols, the number of DMRS symbols, and the exact Qm and R, are
+   * not correct*/
+  for (int mcsTableIdx = 0; mcsTableIdx < 3; ++mcsTableIdx) {
+    for (int mcs = 0; mcs < 29; ++mcs) {
+      if (mcs > 27 && mcsTableIdx == 1)
+        continue;
+      const uint8_t Qm = nr_get_Qm_dl(mcs, mcsTableIdx);
+      const uint16_t R = nr_get_code_rate_dl(mcs, mcsTableIdx);
+      /* note: we do not update R/Qm based on low MCS or pi2BPSK */
+      ul_pf_tbs[mcsTableIdx][mcs] = nr_compute_tbs(Qm,
+                                                   R,
+                                                   1, /* rbSize */
+                                                   10, /* hypothetical number of slots */
+                                                   0, /* N_PRB_DMRS * N_DMRS_SLOT */
+                                                   0 /* N_PRB_oh, 0 for initialBWP */,
+                                                   0 /* tb_scaling */,
+                                                   1 /* nrOfLayers */)
+                                    >> 3;
+    }
+  }
+  return nr_fr1_ulsch_preprocessor;
+}
+
+void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot)
+{
+  gNB_MAC_INST *nr_mac = RC.nrmac[module_id];
   /* Uplink data ONLY can be scheduled when the current slot is downlink slot,
    * because we have to schedule the DCI0 first before schedule uplink data */
-  if (is_xlsch_in_slot(ulsch_in_slot_bitmap, slot)) {
+  if (!is_xlsch_in_slot(nr_mac->dlsch_slot_bitmap[slot / 64], slot)) {
     LOG_D(MAC, "Current slot %d is NOT DL slot, cannot schedule DCI0 for UL data\n", slot);
     return;
   }
-  bool do_sched = RC.nrmac[module_id]->pre_processor_ul(
-      module_id, frame, slot, num_slots_per_tdd, ulsch_in_slot_bitmap);
+  bool do_sched = RC.nrmac[module_id]->pre_processor_ul(module_id, frame, slot);
   if (!do_sched)
     return;
 
@@ -915,8 +1152,8 @@ void nr_schedule_ulsch(module_id_t module_id,
 
     /* pre-computed PUSCH values that only change if time domain allocation,
      * DCI format, or DMRS parameters change. Updated in the preprocessor
-     * through nr_save_pusch_fields() */
-    NR_sched_pusch_save_t *ps = &sched_ctrl->pusch_save;
+     * through nr_set_pusch_semi_static() */
+    NR_pusch_semi_static_t *ps = &sched_ctrl->pusch_semi_static;
 
     /* Statistics */
     UE_info->mac_stats[UE_id].ulsch_rounds[cur_harq->round]++;
@@ -925,6 +1162,9 @@ void nr_schedule_ulsch(module_id_t module_id,
       /* Save information on MCS, TBS etc for the current initial transmission
        * so we have access to it when retransmitting */
       cur_harq->sched_pusch = *sched_pusch;
+      /* save which time allocation has been used, to be used on
+       * retransmissions */
+      cur_harq->sched_pusch.time_domain_allocation = ps->time_domain_allocation;
       sched_ctrl->sched_ul_bytes += sched_pusch->tb_size;
     } else {
       LOG_D(MAC,
@@ -941,7 +1181,7 @@ void nr_schedule_ulsch(module_id_t module_id,
     UE_info->mac_stats[UE_id].ulsch_current_bytes = sched_pusch->tb_size;
 
     LOG_D(MAC,
-          "%4d.%2d RNTI %04x UL sched %4d.%2d start %d RBS %d MCS %d TBS %d HARQ PID %d round %d NDI %d\n",
+          "%4d.%2d RNTI %04x UL sched %4d.%2d start %2d RBS %3d startSymbol %2d nb_symbol %2d MCS %2d TBS %4d HARQ PID %2d round %d NDI %d est %6d sched %6d est BSR %6d\n",
           frame,
           slot,
           rnti,
@@ -949,11 +1189,17 @@ void nr_schedule_ulsch(module_id_t module_id,
           sched_pusch->slot,
           sched_pusch->rbStart,
           sched_pusch->rbSize,
+          ps->startSymbolIndex,
+          ps->nrOfSymbols,
           sched_pusch->mcs,
           sched_pusch->tb_size,
           harq_id,
           cur_harq->round,
-          cur_harq->ndi);
+          cur_harq->ndi,
+          sched_ctrl->estimated_ul_buffer,
+          sched_ctrl->sched_ul_bytes,
+          sched_ctrl->estimated_ul_buffer - sched_ctrl->sched_ul_bytes);
+
 
     /* PUSCH in a later slot, but corresponding DCI now! */
     nfapi_nr_ul_tti_request_t *future_ul_tti_req = &RC.nrmac[module_id]->UL_tti_req_ahead[0][sched_pusch->slot];
diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h
index 7f9e2a9a8d..dd4ec15539 100644
--- a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+++ b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h
@@ -66,10 +66,16 @@ void clear_nr_nfapi_information(gNB_MAC_INST * gNB,
 void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
 			       frame_t frame_rxP, sub_frame_t slot_rxP);
 
+/* \brief main DL scheduler function. Calls a preprocessor to decide on
+ * resource allocation, then "post-processes" resource allocation (nFAPI
+ * messages, statistics, HARQ handling, CEs, ... */
 void nr_schedule_ue_spec(module_id_t module_id,
                          frame_t frame,
                          sub_frame_t slot);
 
+/* \brief default FR1 DL preprocessor init routine, returns preprocessor to call */
+nr_pp_impl_dl nr_init_fr1_dlsch_preprocessor(module_id_t module_id, int CC_id);
+
 void schedule_control_sib1(module_id_t module_id,
                            int CC_id,
                            int time_domain_allocation,
@@ -80,30 +86,19 @@ void schedule_control_sib1(module_id_t module_id,
 
 void schedule_nr_sib1(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP);
 
-/* \brief default preprocessor */
-void nr_simple_dlsch_preprocessor(module_id_t module_id,
-                                  frame_t frame,
-                                  sub_frame_t slot);
-
 void schedule_nr_mib(module_id_t module_idP,
                      frame_t frameP,
                      sub_frame_t subframeP,
                      uint8_t slots_per_frame,
                      int nb_periods_per_frame);
 
-/// uplink scheduler
-void nr_schedule_ulsch(module_id_t module_id,
-                       frame_t frame,
-                       sub_frame_t slot,
-                       int num_slots_per_tdd,
-                       int ul_slots,
-                       uint64_t ulsch_in_slot_bitmap);
+/* \brief main UL scheduler function. Calls a preprocessor to decide on
+ * resource allocation, then "post-processes" resource allocation (nFAPI
+ * messages, statistics, HARQ handling, ... */
+void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot);
 
-bool nr_simple_ulsch_preprocessor(module_id_t module_id,
-                                  frame_t frame,
-                                  sub_frame_t slot,
-                                  int num_slots_per_tdd,
-                                  uint64_t ulsch_in_slot_bitmap);
+/* \brief default FR1 UL preprocessor init routine, returns preprocessor to call */
+nr_pp_impl_ul nr_init_fr1_ulsch_preprocessor(module_id_t module_id, int CC_id);
 
 /////// Random Access MAC-PHY interface functions and primitives ///////
 
@@ -157,11 +152,7 @@ void nr_preprocessor_phytest(module_id_t module_id,
                              sub_frame_t slot);
 /* \brief UL preprocessor for phytest: schedules UE_id 0 with fixed MCS on a
  * fixed set of resources */
-bool nr_ul_preprocessor_phytest(module_id_t module_id,
-                                frame_t frame,
-                                sub_frame_t slot,
-                                int num_slots_per_tdd,
-                                uint64_t ulsch_in_slot_bitmap);
+bool nr_ul_preprocessor_phytest(module_id_t module_id, frame_t frame, sub_frame_t slot);
 
 void nr_schedule_css_dlsch_phytest(module_id_t   module_idP,
                                    frame_t       frameP,
@@ -260,23 +251,26 @@ void prepare_dci(const NR_CellGroupConfig_t *secondaryCellGroup,
                  int bwp_id);
 
 /* find coreset within the search space */
-NR_ControlResourceSet_t *get_coreset(NR_BWP_Downlink_t *bwp,
-                                     NR_SearchSpace_t *ss,
-                                     int ss_type);
+NR_ControlResourceSet_t *get_coreset(const NR_BWP_Downlink_t *bwp, const NR_SearchSpace_t *ss, int ss_type);
 
 /* find a search space within a BWP */
-NR_SearchSpace_t *get_searchspace(
-    NR_BWP_Downlink_t *bwp,
-    NR_SearchSpace__searchSpaceType_PR target_ss);
+NR_SearchSpace_t *get_searchspace(const NR_BWP_Downlink_t *bwp, NR_SearchSpace__searchSpaceType_PR target_ss);
 
-long get_K2(NR_BWP_Uplink_t *ubwp, int time_domain_assignment, int mu);
+long get_K2(const NR_BWP_Uplink_t *ubwp, int time_domain_assignment, int mu);
 
-void nr_save_pusch_fields(const NR_ServingCellConfigCommon_t *scc,
-                          const NR_BWP_Uplink_t *ubwp,
-                          long dci_format,
-                          int tda,
-                          uint8_t num_dmrs_cdm_grps_no_data,
-                          NR_sched_pusch_save_t *ps);
+void nr_set_pdsch_semi_static(const NR_ServingCellConfigCommon_t *scc,
+                              const NR_CellGroupConfig_t *secondaryCellGroup,
+                              const NR_BWP_Downlink_t *bwp,
+                              int tda,
+                              uint8_t num_dmrs_cdm_grps_no_data,
+                              NR_pdsch_semi_static_t *ps);
+
+void nr_set_pusch_semi_static(const NR_ServingCellConfigCommon_t *scc,
+                              const NR_BWP_Uplink_t *ubwp,
+                              long dci_format,
+                              int tda,
+                              uint8_t num_dmrs_cdm_grps_no_data,
+                              NR_pusch_semi_static_t *ps);
 
 uint8_t nr_get_tpc(int target, uint8_t cqi, int incr);
 
@@ -355,14 +349,6 @@ void config_nr_mib(int Mod_idP,
 
 void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t slotP, NR_RA_t *ra);
 
-void nr_process_mac_pdu(
-    module_id_t module_idP,
-    rnti_t rnti,
-    uint8_t CC_id,
-    frame_t frameP,
-    uint8_t *pduP,
-    uint16_t mac_pdu_len);
-
 int binomial(int n, int k);
 
 bool is_xlsch_in_slot(uint64_t bitmap, sub_frame_t slot);
@@ -404,5 +390,18 @@ int16_t ssb_index_from_prach(module_id_t module_idP,
 
 void find_SSB_and_RO_available(module_id_t module_idP);
 
+void calculate_preferred_dl_tda(module_id_t module_id, const NR_BWP_Downlink_t *bwp);
+void calculate_preferred_ul_tda(module_id_t module_id, const NR_BWP_Uplink_t *ubwp);
+
 bool find_free_CCE(module_id_t module_id, sub_frame_t slot, int UE_id);
+
+bool nr_find_nb_rb(uint16_t Qm,
+                   uint16_t R,
+                   uint16_t nb_symb_sch,
+                   uint16_t nb_dmrs_prb,
+                   uint32_t bytes,
+                   uint16_t nb_rb_max,
+                   uint32_t *tbs,
+                   uint16_t *nb_rb);
+
 #endif /*__LAYER2_NR_MAC_PROTO_H__*/
diff --git a/openair2/LAYER2/NR_MAC_gNB/main.c b/openair2/LAYER2/NR_MAC_gNB/main.c
index 33e575d2b9..60b0cac215 100644
--- a/openair2/LAYER2/NR_MAC_gNB/main.c
+++ b/openair2/LAYER2/NR_MAC_gNB/main.c
@@ -85,8 +85,8 @@ void mac_top_init_gNB(void)
         RC.nrmac[i]->pre_processor_dl = nr_preprocessor_phytest;
         RC.nrmac[i]->pre_processor_ul = nr_ul_preprocessor_phytest;
       } else {
-        RC.nrmac[i]->pre_processor_dl = nr_simple_dlsch_preprocessor;
-        RC.nrmac[i]->pre_processor_ul = nr_simple_ulsch_preprocessor;
+        RC.nrmac[i]->pre_processor_dl = nr_init_fr1_dlsch_preprocessor(i, 0);
+        RC.nrmac[i]->pre_processor_ul = nr_init_fr1_ulsch_preprocessor(i, 0);
       }
 
     }//END for (i = 0; i < RC.nb_nr_macrlc_inst; i++)
diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
index 8452ca3c4c..a03b34f9e1 100644
--- a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
+++ b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
@@ -305,11 +305,11 @@ typedef struct NR_sched_pucch {
   uint8_t resource_indicator;
 } NR_sched_pucch_t;
 
-/* this struct is a helper: as long as the TDA and DCI format remain the same
- * over the same uBWP and search space, there is no need to recalculate all
- * S/L, MCS table, or DMRS-related parameters over and over again. Hence, we
- * store them in this struct for easy reference. */
-typedef struct NR_sched_pusch_save {
+/* PUSCH semi-static configuration: as long as the TDA and DCI format remain
+ * the same over the same uBWP and search space, there is no need to
+ * recalculate all S/L, MCS table, or DMRS-related parameters over and over
+ * again. Hence, we store them in this struct for easy reference. */
+typedef struct NR_pusch_semi_static_t {
   int dci_format;
   int time_domain_allocation;
   uint8_t num_dmrs_cdm_grps_no_data;
@@ -327,7 +327,7 @@ typedef struct NR_sched_pusch_save {
   uint16_t ul_dmrs_symb_pos;
   uint8_t num_dmrs_symb;
   uint8_t N_PRB_DMRS;
-} NR_sched_pusch_save_t;
+} NR_pusch_semi_static_t;
 
 typedef struct NR_sched_pusch {
   int frame;
@@ -337,9 +337,6 @@ typedef struct NR_sched_pusch {
   uint16_t rbSize;
   uint16_t rbStart;
 
-  // time-domain allocation for scheduled RBs
-  int time_domain_allocation;
-
   /// MCS
   uint8_t mcs;
 
@@ -350,17 +347,68 @@ typedef struct NR_sched_pusch {
 
   /// UL HARQ PID to use for this UE, or -1 for "any new"
   int8_t ul_harq_pid;
+
+  /// the Time Domain Allocation used for this transmission. Note that this is
+  /// only important for retransmissions; otherwise, the TDA in
+  /// NR_pusch_semi_static_t has precedence
+  int time_domain_allocation;
 } NR_sched_pusch_t;
 
+/* PDSCH semi-static configuratio: as long as the TDA/DMRS/mcsTable remains the
+ * same, there is no need to recalculate all S/L or DMRS-related parameters
+ * over and over again.  Hence, we store them in this struct for easy
+ * reference. */
+typedef struct NR_pdsch_semi_static {
+  int time_domain_allocation;
+  uint8_t numDmrsCdmGrpsNoData;
+
+  int startSymbolIndex;
+  int nrOfSymbols;
+
+  uint8_t mcsTableIdx;
+
+  uint8_t N_PRB_DMRS;
+  uint8_t N_DMRS_SLOT;
+  uint16_t dl_dmrs_symb_pos;
+  nfapi_nr_dmrs_type_e dmrsConfigType;
+} NR_pdsch_semi_static_t;
+
+typedef struct NR_sched_pdsch {
+  /// RB allocation within active BWP
+  uint16_t rbSize;
+  uint16_t rbStart;
+
+  /// MCS-related infos
+  uint8_t mcs;
+
+  /// TBS-related info
+  uint16_t R;
+  uint8_t Qm;
+  uint32_t tb_size;
+
+  /// DL HARQ PID to use for this UE, or -1 for "any new"
+  int8_t dl_harq_pid;
+
+  /// the Time Domain Allocation used for this transmission. Note that this is
+  /// only important for retransmissions; otherwise, the TDA in
+  /// NR_pdsch_semi_static_t has precedence
+  int time_domain_allocation;
+} NR_sched_pdsch_t;
+
 typedef struct NR_UE_harq {
   bool is_waiting;
   uint8_t ndi;
   uint8_t round;
+  uint16_t feedback_frame;
   uint16_t feedback_slot;
 
-  /* Transport block to be sent using this HARQ process */
+  /* Transport block to be sent using this HARQ process, its size is in
+   * sched_pdsch */
   uint32_t tb[16384];
   uint32_t tb_size;
+
+  /// sched_pdsch keeps information on MCS etc used for the initial transmission
+  NR_sched_pdsch_t sched_pdsch;
 } NR_UE_harq_t;
 
 //! fixme : need to enhace for the multiple TB CQI report
@@ -441,13 +489,6 @@ typedef struct nr_csi_report {
   From spec 38.214 section 5.2.1.2 For periodic and semi-persistent CSI Resource Settings, the number of CSI-RS Resource Sets configured is limited to S=1
  */
 #define MAX_CSI_RESOURCE_SET_IN_CSI_RESOURCE_CONFIG 16
-typedef struct NR_UE_old_sched {
-  uint16_t rbSize;
-  int time_domain_allocation;
-  uint8_t mcsTableIdx;
-  uint8_t mcs;
-  uint8_t numDmrsCdmGrpsNoData;
-} NR_UE_ret_info_t;
 
 typedef enum {
   INACTIVE = 0,
@@ -468,15 +509,18 @@ typedef struct NR_UE_ul_harq {
 /*! \brief scheduling control information set through an API */
 #define MAX_CSI_REPORTS 48
 typedef struct {
-  /// total amount of data awaiting for this UE
-  uint32_t num_total_bytes;
-  /// per-LC status data
-  mac_rlc_status_resp_t rlc_status[MAX_NUM_LCID];
-
   /// the currently active BWP in DL
   NR_BWP_Downlink_t *active_bwp;
   /// the currently active BWP in UL
   NR_BWP_Uplink_t *active_ubwp;
+  /// CCE index and aggregation, should be coherent with cce_list
+  NR_SearchSpace_t *search_space;
+  NR_ControlResourceSet_t *coreset;
+
+  /// CCE index and Aggr. Level are shared for PUSCH/PDSCH allocation decisions
+  /// corresponding to the sched_pusch/sched_pdsch structures below
+  int cce_index;
+  uint8_t aggregation_level;
 
   /// PUCCH scheduling information. Array of three, we assume for the moment:
   /// HARQ in the first field, SR in second, CSI in third (as fixed by RRC
@@ -484,44 +528,40 @@ typedef struct {
   /// nr_acknack_scheduling()!
   NR_sched_pucch_t sched_pucch[3];
 
-  NR_sched_pusch_save_t pusch_save;
+  /// PUSCH semi-static configuration: is not cleared across TTIs
+  NR_pusch_semi_static_t pusch_semi_static;
+  /// Sched PDSCH: scheduling decisions, copied into HARQ and cleared every TTI
   NR_sched_pusch_t sched_pusch;
 
-  /// CCE index and aggregation, should be coherent with cce_list
-  NR_SearchSpace_t *search_space;
-  NR_ControlResourceSet_t *coreset;
-  int cce_index;
-  uint8_t aggregation_level;
-
-  /// RB allocation within active BWP
-  uint16_t rbSize;
-  uint16_t rbStart;
-
   /// uplink bytes that are currently scheduled
   int sched_ul_bytes;
   /// estimation of the UL buffer size
   int estimated_ul_buffer;
 
-  // time-domain allocation for scheduled RBs
-  int time_domain_allocation;
+  /// PHR info: power headroom level (dB)
+  int ph;
+  /// PHR info: nominal UE transmit power levels (dBm)
+  int pcmax;
 
-  /// MCS-related infos
-  uint8_t mcsTableIdx;
-  uint8_t mcs;
-  uint8_t numDmrsCdmGrpsNoData;
+  /// PDSCH semi-static configuration: is not cleared across TTIs
+  NR_pdsch_semi_static_t pdsch_semi_static;
+  /// Sched PDSCH: scheduling decisions, copied into HARQ and cleared every TTI
+  NR_sched_pdsch_t sched_pdsch;
 
-  /// Retransmission-related information
-  NR_UE_ret_info_t retInfo[NR_MAX_NB_HARQ_PROCESSES];
-  /// DL HARQ PID to use for this UE, or -1 for "any new"
-  int8_t dl_harq_pid;
+  /// total amount of data awaiting for this UE
+  uint32_t num_total_bytes;
+  /// per-LC status data
+  mac_rlc_status_resp_t rlc_status[MAX_NUM_LCID];
 
   uint16_t ta_frame;
   int16_t ta_update;
   bool ta_apply;
   uint8_t tpc0;
   uint8_t tpc1;
-  uint16_t ul_rssi;
-  uint8_t current_harq_pid;
+  int raw_rssi;
+  int pusch_snrx10;
+  int pucch_snrx10;
+
   struct CSI_Report CSI_report[MAX_CSI_REPORTS];
   /// information about every HARQ process
   NR_UE_harq_t harq_processes[NR_MAX_NB_HARQ_PROCESSES];
@@ -539,7 +579,6 @@ typedef struct {
   NR_list_t feedback_ul_harq;
   /// UL HARQ processes that await retransmission
   NR_list_t retrans_ul_harq;
-  int dummy;
   NR_UE_mac_ce_ctrl_t UE_mac_ce_ctrl;// MAC CE related information
 } NR_UE_sched_ctrl_t;
 
@@ -591,9 +630,7 @@ typedef void (*nr_pp_impl_dl)(module_id_t mod_id,
                               sub_frame_t slot);
 typedef bool (*nr_pp_impl_ul)(module_id_t mod_id,
                               frame_t frame,
-                              sub_frame_t slot,
-                              int num_slots_per_tdd,
-                              uint64_t ulsch_in_slot_bitmap);
+                              sub_frame_t slot);
 
 /*! \brief top level eNB MAC structure */
 typedef struct gNB_MAC_INST_s {
@@ -670,6 +707,19 @@ typedef struct gNB_MAC_INST_s {
   /// highest index not yet been used in a given slot. Dynamically allocated
   /// so we can have it for every slot as a function of the numerology
   int *pucch_index_used[MAX_NUM_BWP];
+
+  /// bitmap of DLSCH slots, can hold up to 160 slots
+  uint64_t dlsch_slot_bitmap[3];
+  /// Lookup for preferred time domain allocation for BWP, in DL, slots
+  /// dynamically allocated
+  int *preferred_dl_tda[MAX_NUM_BWP];
+  /// bitmap of ULSCH slots, can hold up to 160 slots
+  uint64_t ulsch_slot_bitmap[3];
+  /// Lookup for preferred time domain allocation for UL BWP, dynamically
+  /// allocated. The index refers to the DL slot, and the indicated TDA's k2
+  /// points to the right UL slot
+  int *preferred_ul_tda[MAX_NUM_BWP];
+
   /// DL preprocessor for differentiated scheduling
   nr_pp_impl_dl pre_processor_dl;
   /// UL preprocessor for differentiated scheduling
diff --git a/openair2/RRC/NR/rrc_gNB_reconfig.c b/openair2/RRC/NR/rrc_gNB_reconfig.c
index 8e60dafb27..7ecac9f7e6 100644
--- a/openair2/RRC/NR/rrc_gNB_reconfig.c
+++ b/openair2/RRC/NR/rrc_gNB_reconfig.c
@@ -186,8 +186,8 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
   secondaryCellGroup->mac_CellGroupConfig->drx_Config = NULL;
   secondaryCellGroup->mac_CellGroupConfig->schedulingRequestConfig = NULL;
   secondaryCellGroup->mac_CellGroupConfig->bsr_Config=calloc(1,sizeof(*secondaryCellGroup->mac_CellGroupConfig->bsr_Config));
-  secondaryCellGroup->mac_CellGroupConfig->bsr_Config->periodicBSR_Timer = NR_BSR_Config__periodicBSR_Timer_sf80;
-  secondaryCellGroup->mac_CellGroupConfig->bsr_Config->retxBSR_Timer     = NR_BSR_Config__retxBSR_Timer_sf320;
+  secondaryCellGroup->mac_CellGroupConfig->bsr_Config->periodicBSR_Timer = NR_BSR_Config__periodicBSR_Timer_sf10;
+  secondaryCellGroup->mac_CellGroupConfig->bsr_Config->retxBSR_Timer     = NR_BSR_Config__retxBSR_Timer_sf160;
   secondaryCellGroup->mac_CellGroupConfig->tag_Config=calloc(1,sizeof(*secondaryCellGroup->mac_CellGroupConfig->tag_Config));
   secondaryCellGroup->mac_CellGroupConfig->tag_Config->tag_ToReleaseList = NULL;
   secondaryCellGroup->mac_CellGroupConfig->tag_Config->tag_ToAddModList  = calloc(1,sizeof(*secondaryCellGroup->mac_CellGroupConfig->tag_Config->tag_ToAddModList));
@@ -1031,7 +1031,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
  long *delay[8];
  for (int i=0;i<8;i++) {
    delay[i] = calloc(1,sizeof(*delay[i]));
-   *delay[i] = (i<6) ? (i+2) : 0;
+   *delay[i] = i+2;
    ASN_SEQUENCE_ADD(&pucch_Config->dl_DataToUL_ACK->list,delay[i]);
  }
  pucch_Config->spatialRelationInfoToAddModList = calloc(1,sizeof(*pucch_Config->spatialRelationInfoToAddModList));
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpx300.conf
index 25edddde86..ec94306b7d 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpx300.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpx300.conf
@@ -58,27 +58,14 @@ gNBs =
         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;
+        initialDLBWPk0_0                    = 0;  #for DL slot
+        initialDLBWPmappingType_0           = 0;  #0=typeA,1=typeB
+        initialDLBWPstartSymbolAndLength_0  = 40; #this is SS=1,L=13
 
-             initialDLBWPk0_1                    = 0;
-             initialDLBWPmappingType_1           = 0;
-             #this is SS=2,L=12 
-             initialDLBWPstartSymbolAndLength_1  = 53;
+        initialDLBWPk0_1                    = 0;  #for mixed slot
+        initialDLBWPmappingType_1           = 0;
+        initialDLBWPstartSymbolAndLength_1  = 57; #this is SS=1,L=5
 
-             initialDLBWPk0_2                    = 0;
-             initialDLBWPmappingType_2           = 0;
-             #this is SS=1,L=12 
-             initialDLBWPstartSymbolAndLength_2  = 54;
-
-             initialDLBWPk0_3                    = 0;
-             initialDLBWPmappingType_3           = 0;
-             #this is SS=1,L=4 //5 (4 is for 43, 5 is for 57)
-             initialDLBWPstartSymbolAndLength_3  = 57; //43; //57;
   #uplinkConfigCommon 
      #frequencyInfoUL
       ul_frequencyBand                                                 = 257;
@@ -133,20 +120,17 @@ gNBs =
 # 0=unrestricted, 1=restricted type A, 2=restricted type B
         restrictedSetConfig                                         = 0,
       # pusch-ConfigCommon (up to 16 elements)
-        initialULBWPk2_0                      = 6;
+        initialULBWPk2_0                      = 6;  # used for UL slot
         initialULBWPmappingType_0             = 1
-        # this is SS=0 L=11
-        initialULBWPstartSymbolAndLength_0    = 55;
+        initialULBWPstartSymbolAndLength_0    = 55; # this is SS=0 L=12
 
-        initialULBWPk2_1                      = 6;
+        initialULBWPk2_1                      = 6;  # used for mixed slot
         initialULBWPmappingType_1             = 1;
-        # this is SS=0 L=12
-        initialULBWPstartSymbolAndLength_1    = 69;
+        initialULBWPstartSymbolAndLength_1    = 24; # this is SS=10 L=2
 
-        initialULBWPk2_2                      = 4;
+        initialULBWPk2_2                      = 4;  # used for Msg.3 during RA
         initialULBWPmappingType_2             = 1;
-        # this is SS=10 L=4
-        initialULBWPstartSymbolAndLength_2    = 52;
+        initialULBWPstartSymbolAndLength_2    = 52; # this is SS=10 L=4
 
         msg3_DeltaPreamble                                          = 1;
         p0_NominalWithGrant                                         =-90;
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.66PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.66PRB.usrpn300.conf
index 182398cd88..2285620098 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.66PRB.usrpn300.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.66PRB.usrpn300.conf
@@ -56,22 +56,14 @@ gNBs =
         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;
+        initialDLBWPk0_0                    = 0;  #for DL slot
+        initialDLBWPmappingType_0           = 0;  #0=typeA,1=typeB
+        initialDLBWPstartSymbolAndLength_0  = 40; #this is SS=1,L=13
 
-             initialDLBWPk0_1                    = 0;
-             initialDLBWPmappingType_1           = 0;
-             #this is SS=2,L=12 
-             initialDLBWPstartSymbolAndLength_1  = 53;
+        initialDLBWPk0_1                    = 0;  #for mixed slot (but is not used here)
+        initialDLBWPmappingType_1           = 0;
+        initialDLBWPstartSymbolAndLength_1  = 57; #this is SS=1,L=5
 
-             initialDLBWPk0_2                    = 0;
-             initialDLBWPmappingType_2           = 0;
-             #this is SS=1,L=12 
-             initialDLBWPstartSymbolAndLength_2  = 54;
   #uplinkConfigCommon 
      #frequencyInfoUL
       ul_frequencyBand                                                 = 257;
@@ -126,15 +118,17 @@ gNBs =
 # 0=unrestricted, 1=restricted type A, 2=restricted type B
         restrictedSetConfig                                         = 0,
       # pusch-ConfigCommon (up to 16 elements)
-        initialULBWPk2_0                      = 2;
+        initialULBWPk2_0                      = 2;  # used for UL slot
         initialULBWPmappingType_0             = 1
-        # this is SS=0 L=11
-        initialULBWPstartSymbolAndLength_0    = 55;
- 	
-	initialULBWPk2_1                      = 2;
+        initialULBWPstartSymbolAndLength_0    = 55; # this is SS=0 L=12
+
+        initialULBWPk2_1                      = 2;  # used for mixed slot (not used here)
         initialULBWPmappingType_1             = 1;
-        # this is SS=0 L=12
-        initialULBWPstartSymbolAndLength_1    = 69;
+        initialULBWPstartSymbolAndLength_1    = 24; # this is SS=10 L=2
+
+        initialULBWPk2_2                      = 7;  # used for Msg.3 during RA
+        initialULBWPmappingType_2             = 1;
+        initialULBWPstartSymbolAndLength_2    = 52; # this is SS=10 L=4
 
 
         msg3_DeltaPreamble                                          = 1;
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band261.tm1.32PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band261.tm1.32PRB.usrpn300.conf
index 535c1fce5a..908e450175 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band261.tm1.32PRB.usrpn300.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band261.tm1.32PRB.usrpn300.conf
@@ -58,27 +58,14 @@ gNBs =
         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;
+        initialDLBWPk0_0                    = 0;  #for DL slot
+        initialDLBWPmappingType_0           = 0;  #0=typeA,1=typeB
+        initialDLBWPstartSymbolAndLength_0  = 40; #this is SS=1,L=13
 
-             initialDLBWPk0_1                    = 0;
-             initialDLBWPmappingType_1           = 0;
-             #this is SS=2,L=12 
-             initialDLBWPstartSymbolAndLength_1  = 53;
+        initialDLBWPk0_1                    = 0;  #for mixed slot
+        initialDLBWPmappingType_1           = 0;
+        initialDLBWPstartSymbolAndLength_1  = 57; #this is SS=1,L=5
 
-             initialDLBWPk0_2                    = 0;
-             initialDLBWPmappingType_2           = 0;
-             #this is SS=1,L=12 
-             initialDLBWPstartSymbolAndLength_2  = 54;
-
-             initialDLBWPk0_3                    = 0;
-             initialDLBWPmappingType_3           = 0;
-             #this is SS=1,L=4 //5 (4 is for 43, 5 is for 57)
-             initialDLBWPstartSymbolAndLength_3  = 57; //43; //57;
   #uplinkConfigCommon 
      #frequencyInfoUL
       ul_frequencyBand                                                 = 261;
@@ -133,20 +120,17 @@ gNBs =
 # 0=unrestricted, 1=restricted type A, 2=restricted type B
         restrictedSetConfig                                         = 0,
       # pusch-ConfigCommon (up to 16 elements)
-        initialULBWPk2_0                      = 6;
+        initialULBWPk2_0                      = 6;  # used for UL slot
         initialULBWPmappingType_0             = 1
-        # this is SS=0 L=11
-        initialULBWPstartSymbolAndLength_0    = 55;
+        initialULBWPstartSymbolAndLength_0    = 55; # this is SS=0 L=12
 
-        initialULBWPk2_1                      = 6;
+        initialULBWPk2_1                      = 6;  # used for mixed slot
         initialULBWPmappingType_1             = 1;
-        # this is SS=0 L=12
-        initialULBWPstartSymbolAndLength_1    = 69;
+        initialULBWPstartSymbolAndLength_1    = 24; # this is SS=10 L=2
 
-        initialULBWPk2_2                      = 4;
+        initialULBWPk2_2                      = 4;  # used for Msg.3 during RA
         initialULBWPmappingType_2             = 1;
-        # this is SS=10 L=4
-        initialULBWPstartSymbolAndLength_2    = 52;
+        initialULBWPstartSymbolAndLength_2    = 52; # this is SS=10 L=4
 
         msg3_DeltaPreamble                                          = 1;
         p0_NominalWithGrant                                         =-90;
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpn300.conf
index 632ae126cd..9576b5eb8f 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpn300.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpn300.conf
@@ -56,27 +56,14 @@ gNBs =
         initialDLBWPsearchSpaceZero                                             = 0;
       #pdsch-ConfigCommon
         #pdschTimeDomainAllocationList (up to 16 entries)
-             initialDLBWPk0_0                    = 0;
-             #initialULBWPmappingType
-       #0=typeA,1=typeB
-             initialDLBWPmappingType_0           = 0;
-             #this is SS=1,L=13
-             initialDLBWPstartSymbolAndLength_0  = 40;
+        initialDLBWPk0_0                    = 0;  #for DL slot
+        initialDLBWPmappingType_0           = 0;  #0=typeA,1=typeB
+        initialDLBWPstartSymbolAndLength_0  = 40; #this is SS=1,L=13
 
-             initialDLBWPk0_1                    = 0;
-             initialDLBWPmappingType_1           = 0;
-             #this is SS=2,L=12
-             initialDLBWPstartSymbolAndLength_1  = 53;
+        initialDLBWPk0_1                    = 0;  #for mixed slot
+        initialDLBWPmappingType_1           = 0;
+        initialDLBWPstartSymbolAndLength_1  = 57; #this is SS=1,L=5
 
-             initialDLBWPk0_2                    = 0;
-             initialDLBWPmappingType_2           = 0;
-             #this is SS=1,L=12
-             initialDLBWPstartSymbolAndLength_2  = 54;
-
-             initialDLBWPk0_3                    = 0;
-             initialDLBWPmappingType_3           = 0;
-             #this is SS=1,L=4
-             initialDLBWPstartSymbolAndLength_3  = 57;
   #uplinkConfigCommon
      #frequencyInfoUL
       ul_frequencyBand                                                 = 66;
@@ -132,20 +119,18 @@ gNBs =
 # 0=unrestricted, 1=restricted type A, 2=restricted type B
         restrictedSetConfig                                         = 0,
       # pusch-ConfigCommon (up to 16 elements)
-        initialULBWPk2_0                      = 6;
+        initialULBWPk2_0                      = 6;  # used for UL slot
         initialULBWPmappingType_0             = 1
-        # this is SS=0 L=11
-        initialULBWPstartSymbolAndLength_0    = 55;
+        initialULBWPstartSymbolAndLength_0    = 55; # this is SS=0 L=12
 
-  initialULBWPk2_1                      = 6;
+        initialULBWPk2_1                      = 6;  # used for mixed slot
         initialULBWPmappingType_1             = 1;
-        # this is SS=0 L=12
-        initialULBWPstartSymbolAndLength_1    = 69;
+        initialULBWPstartSymbolAndLength_1    = 24; # this is SS=10 L=2
 
-        initialULBWPk2_2                      = 7;
+        initialULBWPk2_2                      = 7;  # used for Msg.3 during RA
         initialULBWPmappingType_2             = 1;
-        # this is SS=10 L=4
-        initialULBWPstartSymbolAndLength_2    = 52;
+        initialULBWPstartSymbolAndLength_2    = 52; # this is SS=10 L=4
+
         msg3_DeltaPreamble                                          = 1;
         p0_NominalWithGrant                                         =-90;
 
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpx300.conf
index 46868d0185..c303ae5a97 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpx300.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpx300.conf
@@ -56,27 +56,14 @@ gNBs =
         initialDLBWPsearchSpaceZero                                             = 0;
       #pdsch-ConfigCommon
         #pdschTimeDomainAllocationList (up to 16 entries)
-             initialDLBWPk0_0                    = 0;
-             #initialULBWPmappingType
-       #0=typeA,1=typeB
-             initialDLBWPmappingType_0           = 0;
-             #this is SS=1,L=13
-             initialDLBWPstartSymbolAndLength_0  = 40;
+        initialDLBWPk0_0                    = 0;  #for DL slot
+        initialDLBWPmappingType_0           = 0;  #0=typeA,1=typeB
+        initialDLBWPstartSymbolAndLength_0  = 40; #this is SS=1,L=13
 
-             initialDLBWPk0_1                    = 0;
-             initialDLBWPmappingType_1           = 0;
-             #this is SS=2,L=12
-             initialDLBWPstartSymbolAndLength_1  = 53;
+        initialDLBWPk0_1                    = 0;  #for mixed slot
+        initialDLBWPmappingType_1           = 0;
+        initialDLBWPstartSymbolAndLength_1  = 57; #this is SS=1,L=5
 
-             initialDLBWPk0_2                    = 0;
-             initialDLBWPmappingType_2           = 0;
-             #this is SS=1,L=12
-             initialDLBWPstartSymbolAndLength_2  = 54;
-
-             initialDLBWPk0_3                    = 0;
-             initialDLBWPmappingType_3           = 0;
-             #this is SS=1,L=4
-             initialDLBWPstartSymbolAndLength_3  = 57;
   #uplinkConfigCommon
      #frequencyInfoUL
       ul_frequencyBand                                                 = 66;
@@ -132,20 +119,18 @@ gNBs =
 # 0=unrestricted, 1=restricted type A, 2=restricted type B
         restrictedSetConfig                                         = 0,
       # pusch-ConfigCommon (up to 16 elements)
-        initialULBWPk2_0                      = 6;
+        initialULBWPk2_0                      = 6;  # used for UL slot
         initialULBWPmappingType_0             = 1
-        # this is SS=0 L=11
-        initialULBWPstartSymbolAndLength_0    = 55;
+        initialULBWPstartSymbolAndLength_0    = 55; # this is SS=0 L=12
 
-  initialULBWPk2_1                      = 6;
+        initialULBWPk2_1                      = 6;  # used for mixed slot
         initialULBWPmappingType_1             = 1;
-        # this is SS=0 L=12
-        initialULBWPstartSymbolAndLength_1    = 69;
+        initialULBWPstartSymbolAndLength_1    = 24; # this is SS=10 L=2
 
-        initialULBWPk2_2                      = 7;
+        initialULBWPk2_2                      = 7;  # used for Msg.3 during RA
         initialULBWPmappingType_2             = 1;
-        # this is SS=10 L=4
-        initialULBWPstartSymbolAndLength_2    = 52;
+        initialULBWPstartSymbolAndLength_2    = 52; # this is SS=10 L=4
+
         msg3_DeltaPreamble                                          = 1;
         p0_NominalWithGrant                                         =-90;
 
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.30kHz,usrpb2x0.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.30kHz,usrpb2x0.conf
index cb52494230..8cb31cce65 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.30kHz,usrpb2x0.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.30kHz,usrpb2x0.conf
@@ -56,22 +56,14 @@ gNBs =
         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;
+        initialDLBWPk0_0                    = 0;  #for DL slot
+        initialDLBWPmappingType_0           = 0;  #0=typeA,1=typeB
+        initialDLBWPstartSymbolAndLength_0  = 40; #this is SS=1,L=13
 
-             initialDLBWPk0_1                    = 0;
-             initialDLBWPmappingType_1           = 0;
-             #this is SS=2,L=12 
-             initialDLBWPstartSymbolAndLength_1  = 53;
+        initialDLBWPk0_1                    = 0;  #for mixed slot
+        initialDLBWPmappingType_1           = 0;
+        initialDLBWPstartSymbolAndLength_1  = 57; #this is SS=1,L=5
 
-             initialDLBWPk0_2                    = 0;
-             initialDLBWPmappingType_2           = 0;
-             #this is SS=1,L=12 
-             initialDLBWPstartSymbolAndLength_2  = 54;
   #uplinkConfigCommon 
      #frequencyInfoUL
       ul_frequencyBand                                                 = 78;
@@ -126,16 +118,17 @@ gNBs =
 # 0=unrestricted, 1=restricted type A, 2=restricted type B
         restrictedSetConfig                                         = 0,
       # pusch-ConfigCommon (up to 16 elements)
-        initialULBWPk2_0                      = 2;
+        initialULBWPk2_0                      = 2;  # used for UL slot
         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;
+        initialULBWPstartSymbolAndLength_0    = 55; # this is SS=0 L=12
 
+        initialULBWPk2_1                      = 2;  # used for mixed slot
+        initialULBWPmappingType_1             = 1;
+        initialULBWPstartSymbolAndLength_1    = 24; # this is SS=10 L=2
+
+        initialULBWPk2_2                      = 7;  # used for Msg.3 during RA
+        initialULBWPmappingType_2             = 1;
+        initialULBWPstartSymbolAndLength_2    = 52; # this is SS=10 L=4
 
         msg3_DeltaPreamble                                          = 1;
         p0_NominalWithGrant                                         =-90;
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.slave.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.slave.conf
index 27ade965dc..f157d886fc 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.slave.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.slave.conf
@@ -56,27 +56,13 @@ gNBs =
         initialDLBWPsearchSpaceZero                                             = 0;
       #pdsch-ConfigCommon
         #pdschTimeDomainAllocationList (up to 16 entries)
-             initialDLBWPk0_0                    = 0;
-             #initialULBWPmappingType
-	     #0=typeA,1=typeB
-             initialDLBWPmappingType_0           = 0;
-             #this is SS=1,L=13
-             initialDLBWPstartSymbolAndLength_0  = 40;
+        initialDLBWPk0_0                    = 0;  #for DL slot
+        initialDLBWPmappingType_0           = 0;  #0=typeA,1=typeB
+        initialDLBWPstartSymbolAndLength_0  = 40; #this is SS=1,L=13
 
-             initialDLBWPk0_1                    = 0;
-             initialDLBWPmappingType_1           = 0;
-             #this is SS=2,L=12 
-             initialDLBWPstartSymbolAndLength_1  = 53;
-
-             initialDLBWPk0_2                    = 0;
-             initialDLBWPmappingType_2           = 0;
-             #this is SS=1,L=12 
-             initialDLBWPstartSymbolAndLength_2  = 54;
-
-             initialDLBWPk0_3                    = 0;
-             initialDLBWPmappingType_3           = 0;
-             #this is SS=1,L=4
-             initialDLBWPstartSymbolAndLength_3  = 57;
+        initialDLBWPk0_1                    = 0;  #for mixed slot
+        initialDLBWPmappingType_1           = 0;
+        initialDLBWPstartSymbolAndLength_1  = 57; #this is SS=1,L=5
 
   #uplinkConfigCommon 
      #frequencyInfoUL
@@ -132,21 +118,17 @@ gNBs =
 # 0=unrestricted, 1=restricted type A, 2=restricted type B
         restrictedSetConfig                                         = 0,
       # pusch-ConfigCommon (up to 16 elements)
-        initialULBWPk2_0                      = 2;
+        initialULBWPk2_0                      = 2;  # used for UL slot
         initialULBWPmappingType_0             = 1
-        # this is SS=0 L=11
-        initialULBWPstartSymbolAndLength_0    = 55;
- 	
-	initialULBWPk2_1                      = 2;
+        initialULBWPstartSymbolAndLength_0    = 55; # this is SS=0 L=12
+
+        initialULBWPk2_1                      = 2;  # used for mixed slot
         initialULBWPmappingType_1             = 1;
-        # this is SS=0 L=12
-        initialULBWPstartSymbolAndLength_1    = 69;
+        initialULBWPstartSymbolAndLength_1    = 24; # this is SS=10 L=2
 
-	initialULBWPk2_2                      = 7;
+        initialULBWPk2_2                      = 7;  # used for Msg.3 during RA
         initialULBWPmappingType_2             = 1;
-        # this is SS=10 L=4
-        initialULBWPstartSymbolAndLength_2    = 52;
-
+        initialULBWPstartSymbolAndLength_2    = 52; # this is SS=10 L=4
 
         msg3_DeltaPreamble                                          = 1;
         p0_NominalWithGrant                                         =-90;
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.slave.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.slave.conf
index 9bb9132917..c79133e956 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.slave.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.slave.conf
@@ -56,22 +56,14 @@ gNBs =
         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;
+        initialDLBWPk0_0                    = 0;  #for DL slot
+        initialDLBWPmappingType_0           = 0;  #0=typeA,1=typeB
+        initialDLBWPstartSymbolAndLength_0  = 40; #this is SS=1,L=13
 
-             initialDLBWPk0_1                    = 0;
-             initialDLBWPmappingType_1           = 0;
-             #this is SS=2,L=12 
-             initialDLBWPstartSymbolAndLength_1  = 53;
+        initialDLBWPk0_1                    = 0;  #for mixed slot (but not used here)
+        initialDLBWPmappingType_1           = 0;
+        initialDLBWPstartSymbolAndLength_1  = 57; #this is SS=1,L=5
 
-             initialDLBWPk0_2                    = 0;
-             initialDLBWPmappingType_2           = 0;
-             #this is SS=1,L=12 
-             initialDLBWPstartSymbolAndLength_2  = 54;
   #uplinkConfigCommon 
      #frequencyInfoUL
       ul_frequencyBand                                                 = 78;
@@ -126,16 +118,17 @@ gNBs =
 # 0=unrestricted, 1=restricted type A, 2=restricted type B
         restrictedSetConfig                                         = 0,
       # pusch-ConfigCommon (up to 16 elements)
-        initialULBWPk2_0                      = 2;
+        initialULBWPk2_0                      = 2;  # used for UL slot
         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;
+        initialULBWPstartSymbolAndLength_0    = 55; # this is SS=0 L=12
 
+        initialULBWPk2_1                      = 2;  # used for mixed slot
+        initialULBWPmappingType_1             = 1;
+        initialULBWPstartSymbolAndLength_1    = 63; # this is SS=7 L=5
+
+        initialULBWPk2_2                      = 7;  # used for Msg.3 during RA
+        initialULBWPmappingType_2             = 1;
+        initialULBWPstartSymbolAndLength_2    = 91; # this is SS=7 L=7
 
         msg3_DeltaPreamble                                          = 1;
         p0_NominalWithGrant                                         =-90;
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpb210.conf
index 3b384dd072..f020efbfdc 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpb210.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpb210.conf
@@ -56,22 +56,14 @@ gNBs =
         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;
+        initialDLBWPk0_0                    = 0;  #for DL slot
+        initialDLBWPmappingType_0           = 0;  #0=typeA,1=typeB
+        initialDLBWPstartSymbolAndLength_0  = 40; #this is SS=1,L=13
 
-             initialDLBWPk0_1                    = 0;
-             initialDLBWPmappingType_1           = 0;
-             #this is SS=2,L=12 
-             initialDLBWPstartSymbolAndLength_1  = 53;
+        initialDLBWPk0_1                    = 0;  #for mixed slot
+        initialDLBWPmappingType_1           = 0;
+        initialDLBWPstartSymbolAndLength_1  = 57; #this is SS=1,L=5
 
-             initialDLBWPk0_2                    = 0;
-             initialDLBWPmappingType_2           = 0;
-             #this is SS=1,L=12 
-             initialDLBWPstartSymbolAndLength_2  = 54;
   #uplinkConfigCommon 
      #frequencyInfoUL
       ul_frequencyBand                                                 = 78;
@@ -126,16 +118,17 @@ gNBs =
 # 0=unrestricted, 1=restricted type A, 2=restricted type B
         restrictedSetConfig                                         = 0,
       # pusch-ConfigCommon (up to 16 elements)
-        initialULBWPk2_0                      = 2;
+        initialULBWPk2_0                      = 2;  # used for UL slot
         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;
+        initialULBWPstartSymbolAndLength_0    = 55; # this is SS=0 L=12
 
+        initialULBWPk2_1                      = 2;  # used for mixed slot
+        initialULBWPmappingType_1             = 1;
+        initialULBWPstartSymbolAndLength_1    = 24; # this is SS=10 L=2
+
+        initialULBWPk2_2                      = 7;  # used for Msg.3 during RA
+        initialULBWPmappingType_2             = 1;
+        initialULBWPstartSymbolAndLength_2    = 52; # this is SS=10 L=4
 
         msg3_DeltaPreamble                                          = 1;
         p0_NominalWithGrant                                         =-90;
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf
index 0ff7e4aa80..53feb26dbc 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf
@@ -56,27 +56,13 @@ gNBs =
         initialDLBWPsearchSpaceZero                                             = 0;
       #pdsch-ConfigCommon
         #pdschTimeDomainAllocationList (up to 16 entries)
-             initialDLBWPk0_0                    = 0;
-             #initialULBWPmappingType
-	     #0=typeA,1=typeB
-             initialDLBWPmappingType_0           = 0;
-             #this is SS=1,L=13
-             initialDLBWPstartSymbolAndLength_0  = 40;
+        initialDLBWPk0_0                    = 0;  # used for (full) DL slot
+        initialDLBWPmappingType_0           = 0;  # 0=typeA,1=typeB
+        initialDLBWPstartSymbolAndLength_0  = 40; # this is SS=1,L=13
 
-             initialDLBWPk0_1                    = 0;
-             initialDLBWPmappingType_1           = 0;
-             #this is SS=2,L=12 
-             initialDLBWPstartSymbolAndLength_1  = 53;
-
-             initialDLBWPk0_2                    = 0;
-             initialDLBWPmappingType_2           = 0;
-             #this is SS=1,L=12 
-             initialDLBWPstartSymbolAndLength_2  = 54;
-
-             initialDLBWPk0_3                    = 0;
-             initialDLBWPmappingType_3           = 0;
-             #this is SS=1,L=5
-             initialDLBWPstartSymbolAndLength_3  = 57;
+        initialDLBWPk0_1                    = 0;  # used for DL part mixed slot
+        initialDLBWPmappingType_1           = 0;
+        initialDLBWPstartSymbolAndLength_1  = 57; # this is SS=1,L=5
 
   #uplinkConfigCommon 
      #frequencyInfoUL
@@ -132,20 +118,17 @@ gNBs =
         restrictedSetConfig                                         = 0,
 
       # pusch-ConfigCommon (up to 16 elements)
-        initialULBWPk2_0                      = 6;
+        initialULBWPk2_0                      = 6;  # used for (full) UL slot
         initialULBWPmappingType_0             = 1
-        # this is SS=0 L=11
-        initialULBWPstartSymbolAndLength_0    = 55;
+        initialULBWPstartSymbolAndLength_0    = 55; # this is SS=0 L=12
 
-        initialULBWPk2_1                      = 6;
+        initialULBWPk2_1                      = 6;  # used for UL part mixed slot
         initialULBWPmappingType_1             = 1;
-        # this is SS=0 L=12
-        initialULBWPstartSymbolAndLength_1    = 69;
+        initialULBWPstartSymbolAndLength_1    = 24; # this is SS=10 L=2
 
-        initialULBWPk2_2                      = 7;
+        initialULBWPk2_2                      = 7;  # used for Msg.3 during RA
         initialULBWPmappingType_2             = 1;
-        # this is SS=10 L=4
-        initialULBWPstartSymbolAndLength_2    = 52;
+        initialULBWPstartSymbolAndLength_2    = 52; # this is SS=10 L=4
 
         msg3_DeltaPreamble                                          = 1;
         p0_NominalWithGrant                                         =-90;
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf
index d0775384c3..b3c960dc84 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf
@@ -56,27 +56,14 @@ gNBs =
         initialDLBWPsearchSpaceZero                                             = 0;
       #pdsch-ConfigCommon
         #pdschTimeDomainAllocationList (up to 16 entries)
-             initialDLBWPk0_0                    = 0;
-             #initialULBWPmappingType
-	     #0=typeA,1=typeB
-             initialDLBWPmappingType_0           = 0;
-             #this is SS=1,L=13
-             initialDLBWPstartSymbolAndLength_0  = 40;
+        initialDLBWPk0_0                    = 0;  #for DL slot
+        initialDLBWPmappingType_0           = 0;  #0=typeA,1=typeB
+        initialDLBWPstartSymbolAndLength_0  = 40; #this is SS=1,L=13
 
-             initialDLBWPk0_1                    = 0;
-             initialDLBWPmappingType_1           = 0;
-             #this is SS=2,L=12 
-             initialDLBWPstartSymbolAndLength_1  = 53;
+        initialDLBWPk0_1                    = 0;  #for mixed slot
+        initialDLBWPmappingType_1           = 0;
+        initialDLBWPstartSymbolAndLength_1  = 57; #this is SS=1,L=5
 
-             initialDLBWPk0_2                    = 0;
-             initialDLBWPmappingType_2           = 0;
-             #this is SS=1,L=12 
-             initialDLBWPstartSymbolAndLength_2  = 54;
-
-             initialDLBWPk0_3                    = 0;
-             initialDLBWPmappingType_3           = 0;
-             #this is SS=1,L=4
-             initialDLBWPstartSymbolAndLength_3  = 57;
 
   #uplinkConfigCommon 
      #frequencyInfoUL
@@ -132,20 +119,17 @@ gNBs =
         restrictedSetConfig                                         = 0,
 
       # pusch-ConfigCommon (up to 16 elements)
-        initialULBWPk2_0                      = 6;
+        initialULBWPk2_0                      = 6;  # used for UL slot
         initialULBWPmappingType_0             = 1
-        # this is SS=0 L=11
-        initialULBWPstartSymbolAndLength_0    = 55;
+        initialULBWPstartSymbolAndLength_0    = 55; # this is SS=0 L=12
+        initialULBWPk2_1                      = 6;  # used for mixed slot
 
-        initialULBWPk2_1                      = 6;
         initialULBWPmappingType_1             = 1;
-        # this is SS=0 L=12
-        initialULBWPstartSymbolAndLength_1    = 69;
+        initialULBWPstartSymbolAndLength_1    = 24; # this is SS=10 L=2
 
-        initialULBWPk2_2                      = 7;
+        initialULBWPk2_2                      = 7;  # used for Msg.3 during RA
         initialULBWPmappingType_2             = 1;
-        # this is SS=10 L=4
-        initialULBWPstartSymbolAndLength_2    = 52;
+        initialULBWPstartSymbolAndLength_2    = 52; # this is SS=10 L=4
 
         msg3_DeltaPreamble                                          = 1;
         p0_NominalWithGrant                                         =-90;
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 d6110e19d5..afca060683 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
@@ -56,27 +56,14 @@ gNBs =
         initialDLBWPsearchSpaceZero                                             = 0;
       #pdsch-ConfigCommon
         #pdschTimeDomainAllocationList (up to 16 entries)
-             initialDLBWPk0_0                    = 0;
-             #initialULBWPmappingType
-	     #0=typeA,1=typeB
-             initialDLBWPmappingType_0           = 0;
-             #this is SS=1,L=13
-             initialDLBWPstartSymbolAndLength_0  = 40;
+        initialDLBWPk0_0                    = 0;  #for DL slot
+        initialDLBWPmappingType_0           = 0;  #0=typeA,1=typeB
+        initialDLBWPstartSymbolAndLength_0  = 40; #this is SS=1,L=13
 
-             initialDLBWPk0_1                    = 0;
-             initialDLBWPmappingType_1           = 0;
-             #this is SS=2,L=12 
-             initialDLBWPstartSymbolAndLength_1  = 53;
+        initialDLBWPk0_1                    = 0;  #for mixed slot
+        initialDLBWPmappingType_1           = 0;
+        initialDLBWPstartSymbolAndLength_1  = 57; #this is SS=1,L=5
 
-             initialDLBWPk0_2                    = 0;
-             initialDLBWPmappingType_2           = 0;
-             #this is SS=1,L=12 
-             initialDLBWPstartSymbolAndLength_2  = 54;
-
-             initialDLBWPk0_3                    = 0;
-             initialDLBWPmappingType_3           = 0;
-             #this is SS=1,L=5 
-             initialDLBWPstartSymbolAndLength_3  = 57;
   #uplinkConfigCommon 
      #frequencyInfoUL
       ul_frequencyBand                                                 = 78;
@@ -131,21 +118,17 @@ gNBs =
 # 0=unrestricted, 1=restricted type A, 2=restricted type B
         restrictedSetConfig                                         = 0,
       # pusch-ConfigCommon (up to 16 elements)
-        initialULBWPk2_0                      = 6; #2;
+        initialULBWPk2_0                      = 6;  # used for UL slot
         initialULBWPmappingType_0             = 1
-        # this is SS=0 L=11
-        initialULBWPstartSymbolAndLength_0    = 55;
- 	
-	initialULBWPk2_1                      = 6; #2;
+        initialULBWPstartSymbolAndLength_0    = 55; # this is SS=0 L=12
+
+        initialULBWPk2_1                      = 6;  # used for mixed slot
         initialULBWPmappingType_1             = 1;
-        # this is SS=0 L=12
-        initialULBWPstartSymbolAndLength_1    = 69;
+        initialULBWPstartSymbolAndLength_1    = 24; # this is SS=10 L=2
 
-        initialULBWPk2_2                      = 7;
+        initialULBWPk2_2                      = 7;  # used for Msg.3 during RA
         initialULBWPmappingType_2             = 1;
-        # this is SS=10 L=4
-        initialULBWPstartSymbolAndLength_2    = 52;
-
+        initialULBWPstartSymbolAndLength_2    = 52; # this is SS=10 L=4
 
         msg3_DeltaPreamble                                          = 1;
         p0_NominalWithGrant                                         =-90;
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpx300.conf
index 07d04e65f9..b310ef952d 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpx300.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpx300.conf
@@ -56,27 +56,14 @@ gNBs =
         initialDLBWPsearchSpaceZero                                             = 0;
       #pdsch-ConfigCommon
         #pdschTimeDomainAllocationList (up to 16 entries)
-             initialDLBWPk0_0                    = 0;
-             #initialULBWPmappingType
-	     #0=typeA,1=typeB
-             initialDLBWPmappingType_0           = 0;
-             #this is SS=1,L=13
-             initialDLBWPstartSymbolAndLength_0  = 40;
+        initialDLBWPk0_0                    = 0;  #for DL slot
+        initialDLBWPmappingType_0           = 0;  #0=typeA,1=typeB
+        initialDLBWPstartSymbolAndLength_0  = 40; #this is SS=1,L=13
 
-             initialDLBWPk0_1                    = 0;
-             initialDLBWPmappingType_1           = 0;
-             #this is SS=2,L=12 
-             initialDLBWPstartSymbolAndLength_1  = 53;
+        initialDLBWPk0_1                    = 0;  #for mixed slot
+        initialDLBWPmappingType_1           = 0;
+        initialDLBWPstartSymbolAndLength_1  = 57; #this is SS=1,L=5
 
-             initialDLBWPk0_2                    = 0;
-             initialDLBWPmappingType_2           = 0;
-             #this is SS=1,L=12 
-             initialDLBWPstartSymbolAndLength_2  = 54;
-
-             initialDLBWPk0_3                    = 0;
-             initialDLBWPmappingType_3           = 0;
-             #this is SS=1,L=5 
-             initialDLBWPstartSymbolAndLength_3  = 57;
   #uplinkConfigCommon 
      #frequencyInfoUL
       ul_frequencyBand                                                 = 78;
@@ -131,16 +118,17 @@ gNBs =
 # 0=unrestricted, 1=restricted type A, 2=restricted type B
         restrictedSetConfig                                         = 0,
       # pusch-ConfigCommon (up to 16 elements)
-        initialULBWPk2_0                      = 2;
+        initialULBWPk2_0                      = 2;  # used for UL slot
         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;
+        initialULBWPstartSymbolAndLength_0    = 55; # this is SS=0 L=12
 
+        initialULBWPk2_1                      = 2;  # used for mixed slot
+        initialULBWPmappingType_1             = 1;
+        initialULBWPstartSymbolAndLength_1    = 24; # this is SS=10 L=2
+
+        initialULBWPk2_2                      = 7;  # used for Msg.3 during RA
+        initialULBWPmappingType_2             = 1;
+        initialULBWPstartSymbolAndLength_2    = 52; # this is SS=10 L=4
 
         msg3_DeltaPreamble                                          = 1;
         p0_NominalWithGrant                                         =-90;
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.273PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.273PRB.usrpn300.conf
index a42da67df3..386766c96b 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.273PRB.usrpn300.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.273PRB.usrpn300.conf
@@ -56,27 +56,14 @@ gNBs =
         initialDLBWPsearchSpaceZero                                             = 0;
       #pdsch-ConfigCommon
         #pdschTimeDomainAllocationList (up to 16 entries)
-             initialDLBWPk0_0                    = 0;
-             #initialULBWPmappingType
-	     #0=typeA,1=typeB
-             initialDLBWPmappingType_0           = 0;
-             #this is SS=1,L=13
-             initialDLBWPstartSymbolAndLength_0  = 40;
+        initialDLBWPk0_0                    = 0;  #for DL slot
+        initialDLBWPmappingType_0           = 0;  #0=typeA,1=typeB
+        initialDLBWPstartSymbolAndLength_0  = 40; #this is SS=1,L=13
 
-             initialDLBWPk0_1                    = 0;
-             initialDLBWPmappingType_1           = 0;
-             #this is SS=2,L=12 
-             initialDLBWPstartSymbolAndLength_1  = 53;
+        initialDLBWPk0_1                    = 0;  #for mixed slot
+        initialDLBWPmappingType_1           = 0;
+        initialDLBWPstartSymbolAndLength_1  = 57; #this is SS=1,L=5
 
-             initialDLBWPk0_2                    = 0;
-             initialDLBWPmappingType_2           = 0;
-             #this is SS=1,L=12 
-             initialDLBWPstartSymbolAndLength_2  = 54;
-
-             initialDLBWPk0_3                    = 0;
-             initialDLBWPmappingType_3           = 0;
-             #this is SS=1,L=5 
-             initialDLBWPstartSymbolAndLength_3  = 57;
   #uplinkConfigCommon 
      #frequencyInfoUL
       ul_frequencyBand                                                 = 78;
@@ -131,21 +118,17 @@ gNBs =
 # 0=unrestricted, 1=restricted type A, 2=restricted type B
         restrictedSetConfig                                         = 0,
       # pusch-ConfigCommon (up to 16 elements)
-        initialULBWPk2_0                      = 6;#2;
+        initialULBWPk2_0                      = 6;  # used for UL slot
         initialULBWPmappingType_0             = 1
-        # this is SS=0 L=11
-        initialULBWPstartSymbolAndLength_0    = 55;
- 	
-	initialULBWPk2_1                      = 6;#2;
+        initialULBWPstartSymbolAndLength_0    = 55; # this is SS=0 L=12
+
+        initialULBWPk2_1                      = 6;  # used for mixed slot
         initialULBWPmappingType_1             = 1;
-        # this is SS=0 L=12
-        initialULBWPstartSymbolAndLength_1    = 69;
+        initialULBWPstartSymbolAndLength_1    = 24; # this is SS=10 L=2
 
-        initialULBWPk2_2                      = 7;
+        initialULBWPk2_2                      = 7;  # used for Msg.3 during RA
         initialULBWPmappingType_2             = 1;
-        # this is SS=10 L=4
-        initialULBWPstartSymbolAndLength_2    = 52;
-
+        initialULBWPstartSymbolAndLength_2    = 52; # this is SS=10 L=4
 
         msg3_DeltaPreamble                                          = 1;
         p0_NominalWithGrant                                         =-90;
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb.conf
index b2a765c447..30cce9f7ca 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb.conf
@@ -58,27 +58,14 @@ gNBs =
         initialDLBWPsearchSpaceZero                                             = 0;
       #pdsch-ConfigCommon
         #pdschTimeDomainAllocationList (up to 16 entries)
-             initialDLBWPk0_0                    = 0;
-             #initialULBWPmappingType
-	     #0=typeA,1=typeB
-             initialDLBWPmappingType_0           = 0;
-             #this is SS=1,L=13
-             initialDLBWPstartSymbolAndLength_0  = 40;
+        initialDLBWPk0_0                    = 0;  #for DL slot
+        initialDLBWPmappingType_0           = 0;  #0=typeA,1=typeB
+        initialDLBWPstartSymbolAndLength_0  = 40; #this is SS=1,L=13
 
-             initialDLBWPk0_1                    = 0;
-             initialDLBWPmappingType_1           = 0;
-             #this is SS=2,L=12 
-             initialDLBWPstartSymbolAndLength_1  = 53;
+        initialDLBWPk0_1                    = 0;  #for mixed slot
+        initialDLBWPmappingType_1           = 0;
+        initialDLBWPstartSymbolAndLength_1  = 57; #this is SS=1,L=5
 
-             initialDLBWPk0_2                    = 0;
-             initialDLBWPmappingType_2           = 0;
-             #this is SS=1,L=12 
-             initialDLBWPstartSymbolAndLength_2  = 54;
-
-             initialDLBWPk0_3                    = 0;
-             initialDLBWPmappingType_3           = 0;
-             #this is SS=1,L=4 //5 (4 is for 43, 5 is for 57)
-             initialDLBWPstartSymbolAndLength_3  = 57; //43; //57;
   #uplinkConfigCommon 
      #frequencyInfoUL
       ul_frequencyBand                                                 = 78;
@@ -133,20 +120,17 @@ gNBs =
 # 0=unrestricted, 1=restricted type A, 2=restricted type B
         restrictedSetConfig                                         = 0,
       # pusch-ConfigCommon (up to 16 elements)
-        initialULBWPk2_0                      = 2;
+        initialULBWPk2_0                      = 2;  # used for UL slot
         initialULBWPmappingType_0             = 1
-        # this is SS=0 L=12
-        initialULBWPstartSymbolAndLength_0    = 55;
- 	
-	initialULBWPk2_1                      = 2;
-        initialULBWPmappingType_1             = 1;
-        # this is SS=0 L=11
-        initialULBWPstartSymbolAndLength_1    = 69;
+        initialULBWPstartSymbolAndLength_0    = 55; # this is SS=0 L=12
 
-        initialULBWPk2_2                      = 7;
+        initialULBWPk2_1                      = 2;  # used for mixed slot
+        initialULBWPmappingType_1             = 1;
+        initialULBWPstartSymbolAndLength_1    = 24; # this is SS=10 L=2
+
+        initialULBWPk2_2                      = 7;  # used for Msg.3 during RA
         initialULBWPmappingType_2             = 1;
-        # this is SS=10 L=4
-        initialULBWPstartSymbolAndLength_2    = 52;
+        initialULBWPstartSymbolAndLength_2    = 52; # this is SS=10 L=4
 
         msg3_DeltaPreamble                                          = 1;
         p0_NominalWithGrant                                         =-90;
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_n310.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_n310.conf
index e8fcced386..6441db0328 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_n310.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_n310.conf
@@ -56,27 +56,14 @@ gNBs =
         initialDLBWPsearchSpaceZero                                             = 0;
       #pdsch-ConfigCommon
         #pdschTimeDomainAllocationList (up to 16 entries)
-             initialDLBWPk0_0                    = 0;
-             #initialULBWPmappingType
-	     #0=typeA,1=typeB
-             initialDLBWPmappingType_0           = 0;
-             #this is SS=1,L=13
-             initialDLBWPstartSymbolAndLength_0  = 40;
+        initialDLBWPk0_0                    = 0;  #for DL slot
+        initialDLBWPmappingType_0           = 0;  #0=typeA,1=typeB
+        initialDLBWPstartSymbolAndLength_0  = 40; #this is SS=1,L=13
 
-             initialDLBWPk0_1                    = 0;
-             initialDLBWPmappingType_1           = 0;
-             #this is SS=2,L=12 
-             initialDLBWPstartSymbolAndLength_1  = 53;
+        initialDLBWPk0_1                    = 0;  #for mixed slot
+        initialDLBWPmappingType_1           = 0;
+        initialDLBWPstartSymbolAndLength_1  = 57; #this is SS=1,L=5
 
-             initialDLBWPk0_2                    = 0;
-             initialDLBWPmappingType_2           = 0;
-             #this is SS=1,L=12 
-             initialDLBWPstartSymbolAndLength_2  = 54;
-
-             initialDLBWPk0_3                    = 0;
-             initialDLBWPmappingType_3           = 0;
-             #this is SS=1,L=4 //5 (4 is for 43, 5 is for 57)
-             initialDLBWPstartSymbolAndLength_3  = 57; //43; //57;
   #uplinkConfigCommon 
      #frequencyInfoUL
       ul_frequencyBand                                                 = 78;
@@ -131,20 +118,17 @@ gNBs =
 # 0=unrestricted, 1=restricted type A, 2=restricted type B
         restrictedSetConfig                                         = 0,
       # pusch-ConfigCommon (up to 16 elements)
-        initialULBWPk2_0                      = 2;
+        initialULBWPk2_0                      = 2;  # used for UL slot
         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;
+        initialULBWPstartSymbolAndLength_0    = 55; # this is SS=0 L=12
 
-        initialULBWPk2_2                      = 7;
+        initialULBWPk2_1                      = 2;  # used for mixed slot
+        initialULBWPmappingType_1             = 1;
+        initialULBWPstartSymbolAndLength_1    = 24; # this is SS=10 L=2
+
+        initialULBWPk2_2                      = 7;  # used for Msg.3 during RA
         initialULBWPmappingType_2             = 1;
-        # this is SS=10 L=4
-        initialULBWPstartSymbolAndLength_2    = 52;
+        initialULBWPstartSymbolAndLength_2    = 52; # this is SS=10 L=4
 
         msg3_DeltaPreamble                                          = 1;
         p0_NominalWithGrant                                         =-90;
diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf
index 42b87d5672..35f9b1e7a0 100644
--- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf
+++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf
@@ -60,32 +60,13 @@ gNBs =
         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=12
-             initialDLBWPstartSymbolAndLength_0  = 53;
+        initialDLBWPk0_0                    = 0;  #for DL slot
+        initialDLBWPmappingType_0           = 0;  #0=typeA,1=typeB
+        initialDLBWPstartSymbolAndLength_0  = 40; #this is SS=1,L=13
 
-             initialDLBWPk0_1                    = 0;
-             initialDLBWPmappingType_1           = 0;
-             #this is SS=2,L=10
-             initialDLBWPstartSymbolAndLength_1  = 81;
-
-             initialDLBWPk0_2                    = 0;
-             initialDLBWPmappingType_2           = 0;
-             #this is SS=1,L=12
-             initialDLBWPstartSymbolAndLength_2  = 95;
-
-             initialDLBWPk0_3                    = 0;
-             initialDLBWPmappingType_3           = 0;
-             #this is SS=2,L=7
-             initialDLBWPstartSymbolAndLength_3  = 86;
-
-             initialDLBWPk0_4                    = 0;
-             initialDLBWPmappingType_4           = 0;
-             #this is SS=2,L=5
-             initialDLBWPstartSymbolAndLength_4  = 58;
+        initialDLBWPk0_1                    = 0;  #for mixed slot
+        initialDLBWPmappingType_1           = 0;
+        initialDLBWPstartSymbolAndLength_1  = 57; #this is SS=1,L=5
 
   #uplinkConfigCommon
      #frequencyInfoUL
@@ -141,20 +122,17 @@ gNBs =
         restrictedSetConfig                                         = 0,
 
       # pusch-ConfigCommon (up to 16 elements)
-        initialULBWPk2_0                      = 6;
+        initialULBWPk2_0                      = 6;  # used for UL slot
         initialULBWPmappingType_0             = 1
-        # this is SS=0 L=11
-        initialULBWPstartSymbolAndLength_0    = 55;
+        initialULBWPstartSymbolAndLength_0    = 55; # this is SS=0 L=12
 
-        initialULBWPk2_1                      = 6;
+        initialULBWPk2_1                      = 6;  # used for mixed slot
         initialULBWPmappingType_1             = 1;
-        # this is SS=0 L=12
-        initialULBWPstartSymbolAndLength_1    = 69;
+        initialULBWPstartSymbolAndLength_1    = 24; # this is SS=10 L=2
 
-        initialULBWPk2_2                      = 7;
+        initialULBWPk2_2                      = 7;  # used for Msg.3 during RA
         initialULBWPmappingType_2             = 1;
-        # this is SS=10 L=4
-        initialULBWPstartSymbolAndLength_2    = 52;
+        initialULBWPstartSymbolAndLength_2    = 52; # this is SS=10 L=4
 
         msg3_DeltaPreamble                                          = 1;
         p0_NominalWithGrant                                         =-90;
diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf
index 96df4a971f..6bffa1f01c 100644
--- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf
+++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf
@@ -60,27 +60,13 @@ gNBs =
         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=12
-             initialDLBWPstartSymbolAndLength_0  = 53;
+        initialDLBWPk0_0                    = 0;  #for DL slot
+        initialDLBWPmappingType_0           = 0;  #0=typeA,1=typeB
+        initialDLBWPstartSymbolAndLength_0  = 40; #this is SS=1,L=13
 
-             initialDLBWPk0_1                    = 0;
-             initialDLBWPmappingType_1           = 0;
-             #this is SS=2,L=10
-             initialDLBWPstartSymbolAndLength_1  = 81;
-
-             initialDLBWPk0_2                    = 0;
-             initialDLBWPmappingType_2           = 0;
-             #this is SS=1,L=12
-             initialDLBWPstartSymbolAndLength_2  = 54;
-
-             initialDLBWPk0_3                    = 0;
-             initialDLBWPmappingType_3           = 0;
-             #this is SS=1,L=5
-             initialDLBWPstartSymbolAndLength_3  = 57;
+        initialDLBWPk0_1                    = 0;  #for mixed slot
+        initialDLBWPmappingType_1           = 0;
+        initialDLBWPstartSymbolAndLength_1  = 57; #this is SS=1,L=5
 
   #uplinkConfigCommon
      #frequencyInfoUL
@@ -136,20 +122,17 @@ gNBs =
         restrictedSetConfig                                         = 0,
 
       # pusch-ConfigCommon (up to 16 elements)
-        initialULBWPk2_0                      = 6;
+        initialULBWPk2_0                      = 6;  # used for UL slot
         initialULBWPmappingType_0             = 1
-        # this is SS=0 L=11
-        initialULBWPstartSymbolAndLength_0    = 55;
+        initialULBWPstartSymbolAndLength_0    = 55; # this is SS=0 L=12
 
-        initialULBWPk2_1                      = 6;
+        initialULBWPk2_1                      = 6;  # used for mixed slot
         initialULBWPmappingType_1             = 1;
-        # this is SS=0 L=12
-        initialULBWPstartSymbolAndLength_1    = 69;
+        initialULBWPstartSymbolAndLength_1    = 24; # this is SS=10 L=2
 
-        initialULBWPk2_2                      = 7;
+        initialULBWPk2_2                      = 7;  # used for Msg.3 during RA
         initialULBWPmappingType_2             = 1;
-        # this is SS=10 L=4
-        initialULBWPstartSymbolAndLength_2    = 52;
+        initialULBWPstartSymbolAndLength_2    = 52; # this is SS=10 L=4
 
         msg3_DeltaPreamble                                          = 1;
         p0_NominalWithGrant                                         =-90;

From f5a1d356dbd5ee87bdc4d4bce22041897e92a851 Mon Sep 17 00:00:00 2001
From: Robert Schmidt 
Date: Fri, 26 Mar 2021 11:27:44 +0100
Subject: [PATCH 113/579] Refactor after merge

With the merge of fix_NR_DLUL_PF, gNB_dlsch_ulsch_scheduler() has no
nb_periods_per_frame variable. There are two changes here:

1) calculate this locally for initializing tdd_beam_association

2) do not pass it into schedule_nr_mib(). Further, use the following:
   nb_periods_per_frame = slots_per_frame / slots_per_period
   slots_per_frame / nb_periods_per_frame =
     = slots_per_frame / (slots_per_frame / slots_per_period)
     = slots_per_period
---
 openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c     |  7 ++++++-
 openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c | 14 +++++++-------
 openair2/LAYER2/NR_MAC_gNB/mac_proto.h         |  6 +-----
 3 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
index 8d1e899fcb..60f51ee030 100644
--- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
+++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
@@ -331,6 +331,11 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
   NR_ServingCellConfigCommon_t        *scc     = cc->ServingCellConfigCommon;
 
   if (slot==0 && (*scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0]>=257)) {
+    const NR_TDD_UL_DL_Pattern_t *tdd = &scc->tdd_UL_DL_ConfigurationCommon->pattern1;
+    const int n = nr_slots_per_frame[*scc->ssbSubcarrierSpacing];
+    const int nr_mix_slots = tdd->nrofDownlinkSymbols != 0 || tdd->nrofUplinkSymbols != 0;
+    const int nr_slots_period = tdd->nrofDownlinkSlots + tdd->nrofUplinkSlots + nr_mix_slots;
+    const int nb_periods_per_frame = n / nr_slots_period;
     // re-initialization of tdd_beam_association at beginning of frame (only for FR2)
     for (int i=0; itdd_beam_association[i] = -1;
@@ -374,7 +379,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
 
 
   // This schedules MIB
-  schedule_nr_mib(module_idP, frame, slot, nr_slots_per_frame[*scc->ssbSubcarrierSpacing],nb_periods_per_frame);
+  schedule_nr_mib(module_idP, frame, slot);
 
   // This schedules SIB1
   if ( get_softmodem_params()->sa == 1 )
diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
index 3c90bf709b..8eb3fa32d5 100644
--- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
+++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
@@ -58,12 +58,8 @@ uint8_t SSB_Slot[64]={0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,
                       20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,
                       30,30,31,31,32,32,33,33,34,34,35,35,36,36,37,37};
 
-void schedule_nr_mib(module_id_t module_idP,
-                     frame_t frameP,
-                     sub_frame_t slotP,
-                     uint8_t slots_per_frame,
-                     int nb_periods_per_frame){
-
+void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t slotP)
+{
   gNB_MAC_INST *gNB = RC.nrmac[module_idP];
   NR_COMMON_channels_t *cc;
   
@@ -78,6 +74,7 @@ void schedule_nr_mib(module_id_t module_idP,
   for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
     cc = &gNB->common_channels[CC_id];
     NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon;
+    const int slots_per_frame = nr_slots_per_frame[*scc->ssbSubcarrierSpacing];
     const long band = *scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0];
     const uint32_t ssb_offset0 = *scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB - scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA;
     int ratio;
@@ -244,6 +241,9 @@ void schedule_nr_mib(module_id_t module_idP,
       AssertFatal(0,"SSB bitmap size value %d undefined (allowed values 1,2,3)\n",
                   scc->ssb_PositionsInBurst->present);
     }
+    const NR_TDD_UL_DL_Pattern_t *tdd = &scc->tdd_UL_DL_ConfigurationCommon->pattern1;
+    const int nr_mix_slots = tdd->nrofDownlinkSymbols != 0 || tdd->nrofUplinkSymbols != 0;
+    const int nr_slots_period = tdd->nrofDownlinkSlots + tdd->nrofUplinkSlots + nr_mix_slots;
     // For FR2 beam ssb association at the beginning of every SSB period
     if((scc->ssb_PositionsInBurst->present==3) && (abs_slot%slot_per_period == 0)){
       uint8_t i_ssb,num_tdd_period;
@@ -251,7 +251,7 @@ void schedule_nr_mib(module_id_t module_idP,
       for (int i=0; i<64; i++){
         i_ssb=((longBitmap->buf[i/8])>>(7-(i%8)))&1;
         if(i_ssb==1){
-          num_tdd_period = SSB_Slot[i]/(slots_per_frame/nb_periods_per_frame);
+          num_tdd_period = SSB_Slot[i]/nr_slots_period;
           gNB->tdd_beam_association[num_tdd_period]=num_ssb;
           num_ssb++;
         }
diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h
index dd4ec15539..2af49b8217 100644
--- a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+++ b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h
@@ -86,11 +86,7 @@ void schedule_control_sib1(module_id_t module_id,
 
 void schedule_nr_sib1(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP);
 
-void schedule_nr_mib(module_id_t module_idP,
-                     frame_t frameP,
-                     sub_frame_t subframeP,
-                     uint8_t slots_per_frame,
-                     int nb_periods_per_frame);
+void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t slotP);
 
 /* \brief main UL scheduler function. Calls a preprocessor to decide on
  * resource allocation, then "post-processes" resource allocation (nFAPI

From e1e459d27c0049ebbb3f8f4f98e6576d76bc7ec8 Mon Sep 17 00:00:00 2001
From: Sakthivel Velumani 
Date: Tue, 30 Mar 2021 11:59:45 +0200
Subject: [PATCH 114/579] Check for DCI false positive by comparing the
 received bits with re-encoded payload bits

---
 openair1/PHY/NR_UE_TRANSPORT/dci_nr.c | 52 ++++++++++++++++++++++-----
 1 file changed, 43 insertions(+), 9 deletions(-)

diff --git a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
index 8176514eb4..53a7ee7bb7 100644
--- a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
+++ b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
@@ -874,6 +874,33 @@ void nr_pdcch_unscrambling(int16_t *z,
 
 
 #ifdef NR_PDCCH_DCI_RUN
+/* This function compares the received DCI bits with
+ * re-encoded DCI bits and returns the number of mismatched bits
+ */
+uint16_t nr_dci_false_detection(uint64_t *dci,
+                            int16_t *soft_in,
+                            t_nrPolar_params *polar_param,
+                            int encoded_length,
+                            int rnti) {
+
+  uint32_t encoder_output[NR_MAX_DCI_SIZE_DWORD];
+  polar_encoder_fast(dci, (void*)encoder_output, rnti, 1, polar_param);
+  uint8_t *enout_p = (int16_t*)encoder_output;
+  uint16_t x = 0;
+
+  for (int i=0; i> 15 ) & 1);
+    x += ( ( enout_p[i] >> 1 ) & 1 ) ^ ( ( soft_in[i*8+1] >> 15 ) & 1 );
+    x += ( ( enout_p[i] >> 2 ) & 1 ) ^ ( ( soft_in[i*8+2] >> 15 ) & 1 );
+    x += ( ( enout_p[i] >> 3 ) & 1 ) ^ ( ( soft_in[i*8+3] >> 15 ) & 1 );
+    x += ( ( enout_p[i] >> 4 ) & 1 ) ^ ( ( soft_in[i*8+4] >> 15 ) & 1 );
+    x += ( ( enout_p[i] >> 5 ) & 1 ) ^ ( ( soft_in[i*8+5] >> 15 ) & 1 );
+    x += ( ( enout_p[i] >> 6 ) & 1 ) ^ ( ( soft_in[i*8+6] >> 15 ) & 1 );
+    x += ( ( enout_p[i] >> 7 ) & 1 ) ^ ( ( soft_in[i*8+7] >> 15 ) & 1 );
+  }
+  return x;
+}
+
 uint8_t nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue,
                                   UE_nr_rxtx_proc_t *proc,
                                   fapi_nr_dci_indication_t *dci_ind) {
@@ -920,15 +947,22 @@ uint8_t nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue,
         if (crc == n_rnti) {
           LOG_D(PHY, "(%i.%i) Received dci indication (rnti %x,dci format %d,n_CCE %d,payloadSize %d,payload %llx)\n",
                 proc->frame_rx, proc->nr_slot_rx,n_rnti,rel15->dci_format_options[k],CCEind,dci_length,*(unsigned long long*)dci_estimation);
-          dci_ind->SFN = proc->frame_rx;
-          dci_ind->slot = proc->nr_slot_rx;
-          dci_ind->dci_list[dci_ind->number_of_dcis].rnti        = n_rnti;
-          dci_ind->dci_list[dci_ind->number_of_dcis].n_CCE       = CCEind;
-          dci_ind->dci_list[dci_ind->number_of_dcis].dci_format  = rel15->dci_format_options[k];
-          dci_ind->dci_list[dci_ind->number_of_dcis].payloadSize = dci_length;
-          memcpy((void*)dci_ind->dci_list[dci_ind->number_of_dcis].payloadBits,(void*)dci_estimation,8);
-          dci_ind->number_of_dcis++;
-          break;    // If DCI is found, no need to check for remaining DCI lengths
+          uint16_t mb = nr_dci_false_detection(dci_estimation,tmp_e,currentPtrDCI,L*108,n_rnti);
+          if (mb > 10) {
+            LOG_W(PHY,"DCI false positive. Dropping DCI index %d. Mismatched bits: %d/%d\n",j,mb,L*108);
+            continue;
+          }
+          else {
+            dci_ind->SFN = proc->frame_rx;
+            dci_ind->slot = proc->nr_slot_rx;
+            dci_ind->dci_list[dci_ind->number_of_dcis].rnti        = n_rnti;
+            dci_ind->dci_list[dci_ind->number_of_dcis].n_CCE       = CCEind;
+            dci_ind->dci_list[dci_ind->number_of_dcis].dci_format  = rel15->dci_format_options[k];
+            dci_ind->dci_list[dci_ind->number_of_dcis].payloadSize = dci_length;
+            memcpy((void*)dci_ind->dci_list[dci_ind->number_of_dcis].payloadBits,(void*)dci_estimation,8);
+            dci_ind->number_of_dcis++;
+            break;    // If DCI is found, no need to check for remaining DCI lengths
+          }
         } else {
           LOG_D(PHY,"(%i.%i) Decoded crc %x does not match rnti %x for DCI format %d\n", proc->frame_rx, proc->nr_slot_rx, crc, n_rnti, rel15->dci_format_options[k]);
         }

From 4c3d0dddaaa661419a331164e15ed36cced3322a Mon Sep 17 00:00:00 2001
From: Sakthivel Velumani 
Date: Tue, 30 Mar 2021 14:36:05 +0200
Subject: [PATCH 115/579] Added threashold estimation Estimate the threshold by
 simple averaging of mismatched bits of all detected DCI.

---
 executables/nr-ue.c                   | 1 +
 openair1/PHY/NR_UE_TRANSPORT/dci_nr.c | 7 ++++---
 openair1/PHY/defs_nr_UE.h             | 2 ++
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/executables/nr-ue.c b/executables/nr-ue.c
index 1b766efe6c..23d7692be0 100644
--- a/executables/nr-ue.c
+++ b/executables/nr-ue.c
@@ -107,6 +107,7 @@ void init_nr_ue_vars(PHY_VARS_NR_UE *ue,
   ue->Mod_id      = UE_id;
   ue->mac_enabled = 1;
   ue->if_inst     = nr_ue_if_module_init(0);
+  ue->dci_thres   = 0;
 
   // Setting UE mode to NOT_SYNCHED by default
   for (gNB_id = 0; gNB_id < nb_connected_gNB; gNB_id++){
diff --git a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
index 53a7ee7bb7..3cabac3d31 100644
--- a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
+++ b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
@@ -885,7 +885,7 @@ uint16_t nr_dci_false_detection(uint64_t *dci,
 
   uint32_t encoder_output[NR_MAX_DCI_SIZE_DWORD];
   polar_encoder_fast(dci, (void*)encoder_output, rnti, 1, polar_param);
-  uint8_t *enout_p = (int16_t*)encoder_output;
+  uint8_t *enout_p = (uint8_t*)encoder_output;
   uint16_t x = 0;
 
   for (int i=0; iframe_rx, proc->nr_slot_rx,n_rnti,rel15->dci_format_options[k],CCEind,dci_length,*(unsigned long long*)dci_estimation);
           uint16_t mb = nr_dci_false_detection(dci_estimation,tmp_e,currentPtrDCI,L*108,n_rnti);
-          if (mb > 10) {
-            LOG_W(PHY,"DCI false positive. Dropping DCI index %d. Mismatched bits: %d/%d\n",j,mb,L*108);
+          ue->dci_thres = (ue->dci_thres + mb) / 2;
+          if (mb > (ue->dci_thres+10)) {
+            LOG_W(PHY,"DCI false positive. Dropping DCI index %d. Mismatched bits: %d/%d. Current DCI threshold: %d\n",j,mb,L*108,ue->dci_thres);
             continue;
           }
           else {
diff --git a/openair1/PHY/defs_nr_UE.h b/openair1/PHY/defs_nr_UE.h
index de03b13464..d6abb65f94 100644
--- a/openair1/PHY/defs_nr_UE.h
+++ b/openair1/PHY/defs_nr_UE.h
@@ -788,6 +788,8 @@ typedef struct {
   uint8_t ho_initiated;
   /// \brief indicator that Handover procedure has been triggered
   uint8_t ho_triggered;
+  /// threshold for false dci detection
+  int dci_thres;
   /// \brief Measurement variables.
   PHY_NR_MEASUREMENTS measurements;
   NR_DL_FRAME_PARMS  frame_parms;

From a0422a607d7a51d07284bc0698df7e7354655b63 Mon Sep 17 00:00:00 2001
From: Sakthivel Velumani 
Date: Tue, 30 Mar 2021 16:07:40 +0200
Subject: [PATCH 116/579] Changed threshold after testing

---
 openair1/PHY/NR_UE_TRANSPORT/dci_nr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
index 3cabac3d31..43d739f141 100644
--- a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
+++ b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
@@ -949,7 +949,7 @@ uint8_t nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue,
                 proc->frame_rx, proc->nr_slot_rx,n_rnti,rel15->dci_format_options[k],CCEind,dci_length,*(unsigned long long*)dci_estimation);
           uint16_t mb = nr_dci_false_detection(dci_estimation,tmp_e,currentPtrDCI,L*108,n_rnti);
           ue->dci_thres = (ue->dci_thres + mb) / 2;
-          if (mb > (ue->dci_thres+10)) {
+          if (mb > (ue->dci_thres+20)) {
             LOG_W(PHY,"DCI false positive. Dropping DCI index %d. Mismatched bits: %d/%d. Current DCI threshold: %d\n",j,mb,L*108,ue->dci_thres);
             continue;
           }

From fa55cafda4c1de3f0725b6b2d7bef1ff92fb9dd5 Mon Sep 17 00:00:00 2001
From: Sakthivel Velumani 
Date: Tue, 30 Mar 2021 16:11:39 +0200
Subject: [PATCH 117/579] fixed warning

---
 openair1/PHY/NR_UE_TRANSPORT/dci_nr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
index 43d739f141..c1cebc64a8 100644
--- a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
+++ b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
@@ -879,7 +879,7 @@ void nr_pdcch_unscrambling(int16_t *z,
  */
 uint16_t nr_dci_false_detection(uint64_t *dci,
                             int16_t *soft_in,
-                            t_nrPolar_params *polar_param,
+                            const t_nrPolar_params *polar_param,
                             int encoded_length,
                             int rnti) {
 

From 0c7008dd7a576cc3cfbcb267d76976ad8b5dbbc7 Mon Sep 17 00:00:00 2001
From: Sakthivel Velumani 
Date: Wed, 31 Mar 2021 15:44:38 +0200
Subject: [PATCH 118/579] Changed gNB rxgain on CI conf

---
 ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf b/ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf
index a11509a3f0..3be4e942ad 100644
--- a/ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf
+++ b/ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf
@@ -248,7 +248,7 @@ RUs = (
          att_rx         = 0;
          bands          = [7];
          max_pdschReferenceSignalPower = -27;
-         max_rxgain                    = 75;
+         max_rxgain                    = 50;
          eNB_instances  = [0];
          ## beamforming 1x2 matrix: 1 layer x 2 antennas
          bf_weights = [0x00007fff, 0x0000];

From f011b7981c617fe4283b9f24b0700a974fe44ada Mon Sep 17 00:00:00 2001
From: Sakthivel Velumani 
Date: Thu, 1 Apr 2021 16:14:25 +0200
Subject: [PATCH 119/579] fixed typo

---
 executables/nr-ue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/executables/nr-ue.c b/executables/nr-ue.c
index dfc4a7828e..bb3690e45f 100644
--- a/executables/nr-ue.c
+++ b/executables/nr-ue.c
@@ -700,7 +700,7 @@ void *UE_thread(void *arg) {
     // use previous timing_advance value to compute writeTimestamp
     writeTimestamp = timestamp+
       UE->frame_parms.get_samples_slot_timestamp(slot_nr,&UE->frame_parms,DURATION_RX_TO_TX
-      - RX_NB_TH) - firstSymSamp - openair0_cfg[0].tx_sample_advance -
+      - NR_RX_NB_TH) - firstSymSamp - openair0_cfg[0].tx_sample_advance -
       UE->N_TA_offset - timing_advance;
 
     // but use current UE->timing_advance value to compute writeBlockSize

From cffdac04459a26a3a5a37116f9150ffe4d97e16b Mon Sep 17 00:00:00 2001
From: hardy 
Date: Fri, 26 Mar 2021 10:53:42 +0100
Subject: [PATCH 120/579] adding module support, primary test/debug

---
 ci-scripts/build_fr1_template.yaml |   8 +-
 ci-scripts/ci_ueinfra.yaml         |  30 ++++
 ci-scripts/cls_ci_ueinfra.py       |  57 +++++++
 ci-scripts/cls_module_ue.py        | 113 ++++++++++++++
 ci-scripts/cls_oaicitest.py        | 242 ++++++++++++++++++++++-------
 ci-scripts/main.py                 |  34 +++-
 ci-scripts/ran.py                  |   1 -
 7 files changed, 417 insertions(+), 68 deletions(-)
 create mode 100644 ci-scripts/ci_ueinfra.yaml
 create mode 100644 ci-scripts/cls_ci_ueinfra.py
 create mode 100644 ci-scripts/cls_module_ue.py

diff --git a/ci-scripts/build_fr1_template.yaml b/ci-scripts/build_fr1_template.yaml
index 2a8f9cc6a0..02e49bc4b5 100755
--- a/ci-scripts/build_fr1_template.yaml
+++ b/ci-scripts/build_fr1_template.yaml
@@ -1,15 +1,15 @@
 
 ranRepository : https://gitlab.eurecom.fr/oai/openairinterface5g.git
-ranBranch : BRANCH_NAME 
-ranCommitID : COMMIT_ID 
-ranAllowMerge : 'true' 
+ranBranch : integration_2021_wk13_a  
+ranCommitID : 104aa7eed5d6702c1b9da663414079ef698da206     
+ranAllowMerge : 'yes' 
 ranTargetBranch : develop
 
 steps:
   - InitiateHtml,none
   - TesteNB,xml_files/fr1_multi_node_build.xml
   - TesteNB,xml_files/fr1_epc_start.xml
-  - TesteNB,xml_files/fr1_ran_ue_base.xml #ue toggle, nodes initialize, ue toggle, ping, nodes terminate
+  - TesteNB,xml_files/fr1_nsa_base_next.xml #ue toggle, nodes initialize, ue toggle, ping, nodes terminate
   - TesteNB,xml_files/fr1_epc_closure.xml
 
 
diff --git a/ci-scripts/ci_ueinfra.yaml b/ci-scripts/ci_ueinfra.yaml
new file mode 100644
index 0000000000..8ea75f9a85
--- /dev/null
+++ b/ci-scripts/ci_ueinfra.yaml
@@ -0,0 +1,30 @@
+idefix:
+  ID: idefix
+  State : enabled
+  Kind : quectel
+  Process : quectel-CM
+  WakeupScript : ci_qtel.py
+  UENetwork : wwan0
+  HostIPAddress : 192.168.18.188
+  HostUsername : oaicicd
+  HostPassword : oaicicd
+  HostSourceCodePath : none
+dummy1:
+  ID: dummy1
+  Kind : simcom
+  State : disabled
+  Process : quectel-cm 
+  HostIPAddress : 192.168.18.187
+  HostUsername : oaicicd
+  HostPassword : oaicicd
+  HostSourceCodePath : none
+dummy2:  
+  ID: dummy2
+  Kind : cots
+  State : disabled
+  Process : quectel-cm
+  HostIPAddress : 192.168.18.186
+  HostUsername : oaicicd
+  HostPassword : oaicicd
+  HostSourceCodePath : none
+
diff --git a/ci-scripts/cls_ci_ueinfra.py b/ci-scripts/cls_ci_ueinfra.py
new file mode 100644
index 0000000000..0326a92a4f
--- /dev/null
+++ b/ci-scripts/cls_ci_ueinfra.py
@@ -0,0 +1,57 @@
+# * 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
+# */
+#---------------------------------------------------------------------
+#
+#   Required Python Version
+#     Python 3.x
+#
+#---------------------------------------------------------------------
+
+#to use isfile
+import os
+import sys
+import logging
+#to create a SSH object locally in the methods
+import sshconnection
+#time.sleep
+import time
+#to load ue infrastructure dictionary
+import yaml
+
+class InfraUE:
+	def __init__(self):
+		self.ci_ue_infra ={}
+
+
+#-----------------$
+#PUBLIC Methods$
+#-----------------$
+
+	#This method reads the yaml file describing the multi-UE infrastructure
+	#and stores the infra permanently in the related class attribute self.ci_ue_infra
+	def Get_UE_Infra(self,ue_infra_filename):
+		f_yaml=ue_infra_filename
+		with open(f_yaml,'r') as file:
+			logging.debug('Loading UE infrastructure from file '+f_yaml)
+			#load it permanently in the class attribute
+			self.ci_ue_infra = yaml.load(file,Loader=yaml.FullLoader)
+
+
+
diff --git a/ci-scripts/cls_module_ue.py b/ci-scripts/cls_module_ue.py
new file mode 100644
index 0000000000..87902deaff
--- /dev/null
+++ b/ci-scripts/cls_module_ue.py
@@ -0,0 +1,113 @@
+# * 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
+# */
+#---------------------------------------------------------------------
+#
+#   Required Python Version
+#     Python 3.x
+#
+#---------------------------------------------------------------------
+
+#to use isfile
+import os
+import sys
+import logging
+#to create a SSH object locally in the methods
+import sshconnection
+#time.sleep
+import time
+
+
+import re
+import subprocess
+
+
+
+class Module_UE:
+#  ID: idefix
+#  State : enabled
+#  Kind : quectel
+#  Process : quectel-cm
+#  WakeupScript : ci_qtel.py
+#  UENetwork : wwan0
+#  HostIPAddress : 192.168.18.188
+#  HostUsername : oaicicd
+#  HostPassword : oaicicd
+#  HostSourceCodePath : none
+
+	def __init__(self,Module):
+		#create attributes as in the Module dictionary
+		for k, v in Module.items():
+			setattr(self, k, v)
+		self.UEIPAddress = ""
+		
+
+
+
+#-----------------$
+#PUBLIC Methods$
+#-----------------$
+
+	#this method checks if the specified Process is running on the server hosting the module
+	def CheckIsModule(self):
+		HOST=self.HostIPAddress
+		COMMAND="ps aux | grep " + self.Process + " | grep -v grep "
+		logging.debug(COMMAND)
+		ssh = subprocess.Popen(["ssh", "%s" % HOST, COMMAND],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
+		result = ssh.stdout.readlines()
+		if len(result)!=0:
+			logging.debug(self.Process + " process found")
+			return True 
+		else:
+			logging.debug(self.Process + " process NOT found")
+			return False 
+
+	#this method wakes up the module by calling the specified python script 
+	def WakeUp(self):
+		mySSH = sshconnection.SSHConnection()
+		mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword)
+		mySSH.command('echo ' + self.HostPassword + ' | sudo -S python3 ' + self.WakeupScript + ' ','\$',5)
+		time.sleep(5)
+		logging.debug("Module wake-up")
+		mySSH.close()
+
+	#this method retrieves the Module IP address (not the Host IP address) 
+	def GetModuleIPAddress(self):
+		HOST=self.HostIPAddress
+		COMMAND="ip a show dev " + self.UENetwork + " | grep inet | grep " + self.UENetwork
+		ssh = subprocess.Popen(["ssh", "%s" % HOST, COMMAND],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
+		response = ssh.stdout.readlines()
+		if len(response)!=0:
+			result = re.search('inet (?P[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)', response[0].decode("utf-8") )
+			if result is not None: 
+				if result.group('moduleipaddress') is not None: 
+					self.UEIPAddress = result.group('moduleipaddress')
+					logging.debug('\u001B[1mUE Module IP Address is ' + self.UEIPAddress + '\u001B[0m')
+				else:
+					logging.debug('\u001B[1;37;41m Module IP Address Not Found! \u001B[0m')
+			else:
+				logging.debug('\u001B[1;37;41m Module IP Address Not Found! \u001B[0m')
+		else:
+			logging.debug('\u001B[1;37;41m Module IP Address Not Found! \u001B[0m')
+
+
+
+
+
+
diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py
index 7da829b7f7..a8a467153b 100644
--- a/ci-scripts/cls_oaicitest.py
+++ b/ci-scripts/cls_oaicitest.py
@@ -54,7 +54,8 @@ import helpreadme as HELP
 import constants as CONST
 import sshconnection
 
-
+import cls_module_ue
+import cls_ci_ueinfra		#class defining the multi Ue infrastrucure
 
 
 #-----------------------------------------------------------
@@ -129,6 +130,7 @@ class OaiCiTest():
 		self.iperf_packetloss_threshold = ''
 		self.iperf_profile = ''
 		self.iperf_options = ''
+		self.iperf_direction = ''
 		self.nbMaxUEtoAttach = -1
 		self.UEDevices = []
 		self.UEDevicesStatus = []
@@ -157,6 +159,7 @@ class OaiCiTest():
 		self.clean_repository = True
 		self.air_interface=''
 		self.expectedNbOfConnectedUEs = 0
+		self.ue_id = '' #used for module identification
 
 
 	def BuildOAIUE(self,HTML):
@@ -364,29 +367,39 @@ class OaiCiTest():
 		except:
 			os.kill(os.getppid(),signal.SIGUSR1)
 
-	def InitializeUE(self,HTML,COTS_UE):
-		if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '':
-			HELP.GenericHelp(CONST.Version)
-			sys.exit('Insufficient Parameter')
-		multi_jobs = []
-		i = 0
-		for device_id in self.UEDevices:
-			p = Process(target = self.InitializeUE_common, args = (device_id,i,COTS_UE,))
-			p.daemon = True
-			p.start()
-			multi_jobs.append(p)
-			i += 1
-		for job in multi_jobs:
-			job.join()
-		HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
-
-
-
+	def InitializeUE(self,HTML,COTS_UE, InfraUE):
+		if self.ue_id=='':#no ID specified, then it is a COTS controlled by ADB
+			if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '':
+				HELP.GenericHelp(CONST.Version)
+				sys.exit('Insufficient Parameter')
+			multi_jobs = []
+			i = 0
+			for device_id in self.UEDevices:
+				p = Process(target = self.InitializeUE_common, args = (device_id,i,COTS_UE,))
+				p.daemon = True
+				p.start()
+				multi_jobs.append(p)
+				i += 1
+			for job in multi_jobs:
+				job.join()
+			HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
+		else: #if an ID is specified, it is a module from the yaml infrastructure file
+			#RH
+			Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id])
+			is_module=Module_UE.CheckIsModule()
+			if is_module:
+				Module_UE.WakeUp()
+				Module_UE.GetModuleIPAddress()
+				HTML.CreateHtmlTestRow(Module_UE.UEIPAddress, 'OK', CONST.ALL_PROCESSES_OK)	
+				self.UEIPAddresses.append(Module_UE.UEIPAddress)
+		logging.debug(self.UEIPAddresses)
 
 	def InitializeOAIUE(self,HTML,RAN,EPC,COTS_UE):
 		if self.UEIPAddress == '' or self.UEUserName == '' or self.UEPassword == '' or self.UESourceCodePath == '':
 			HELP.GenericHelp(CONST.Version)
 			sys.exit('Insufficient Parameter')
+
+			
 		if self.air_interface == 'lte-uesoftmodem':
 			result = re.search('--no-L2-connect', str(self.Initialize_OAI_UE_args))
 			if result is None:
@@ -1437,14 +1450,20 @@ class OaiCiTest():
 		statusQueue.put(message)
 		lock.release()
 
-	def Ping_common(self, lock, UE_IPAddress, device_id, statusQueue,EPC):
+	def Ping_common(self, lock, UE_IPAddress, device_id, statusQueue,EPC, InfraUE):
 		try:
 			SSH = sshconnection.SSHConnection()
 			# Launch ping on the EPC side (true for ltebox and old open-air-cn)
 			# But for OAI-Rel14-CUPS, we launch from python executor
 			launchFromEpc = True
+			launchFromModule = False
 			if re.match('OAI-Rel14-CUPS', EPC.Type, re.IGNORECASE):
 				launchFromEpc = False
+			#if module, ping from module to EPC
+			if self.ue_id!='':
+				launchFromEpc = False
+				launchfromModule = True
+
 			ping_time = re.findall("-c (\d+)",str(self.ping_args))
 
 			if launchFromEpc:
@@ -1462,21 +1481,36 @@ class OaiCiTest():
 				#copy the ping log file to have it locally for analysis (ping stats)
 				SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, EPC.SourceCodePath + '/scripts/ping_' + self.testCase_id + '_' + device_id + '.log', '.')				
 			else:
-				#ping log file is on the python executor
-				cmd = 'ping ' + self.ping_args + ' ' + UE_IPAddress + ' 2>&1 > ping_' + self.testCase_id + '_' + device_id + '.log' 
-				message = cmd + '\n'
-				logging.debug(cmd)
-				ret = subprocess.run(cmd, shell=True)
-				ping_status = ret.returncode
-				#copy the ping log file to an other folder for log collection (source and destination are EPC)
-				SSH.copyout(EPC.IPAddress, EPC.UserName, EPC.Password, 'ping_' + self.testCase_id + '_' + device_id + '.log', EPC.SourceCodePath + '/scripts')
-                #copy the ping log file to have it locally for analysis (ping stats)
-				logging.debug(EPC.SourceCodePath + 'ping_' + self.testCase_id + '_' + device_id + '.log')
-				SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, EPC.SourceCodePath  +'/scripts/ping_' + self.testCase_id + '_' + device_id + '.log', '.')
+				if launchfromModule == False:
+					#ping log file is on the python executor
+					cmd = 'ping ' + self.ping_args + ' ' + UE_IPAddress + ' 2>&1 > ping_' + self.testCase_id + '_' + device_id + '.log' 
+					message = cmd + '\n'
+					logging.debug(cmd)
+					ret = subprocess.run(cmd, shell=True)
+					ping_status = ret.returncode
+					#copy the ping log file to an other folder for log collection (source and destination are EPC)
+					SSH.copyout(EPC.IPAddress, EPC.UserName, EPC.Password, 'ping_' + self.testCase_id + '_' + device_id + '.log', EPC.SourceCodePath + '/scripts')
+                	#copy the ping log file to have it locally for analysis (ping stats)
+					logging.debug(EPC.SourceCodePath + 'ping_' + self.testCase_id + '_' + device_id + '.log')
+					SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, EPC.SourceCodePath  +'/scripts/ping_' + self.testCase_id + '_' + device_id + '.log', '.')
+
+					SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
+					#cat is executed on EPC
+					SSH.command('cat ' + EPC.SourceCodePath + '/scripts/ping_' + self.testCase_id + '_' + device_id + '.log', '\$', 5)
+				else: #launch from Module
+					Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id])
+
+					SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword)
+					cmd = 'ping -I ' + UE_IPAddress + ' ' + self.ping_args + ' ' +  EPC.IPAddress  + ' 2>&1 > ping_' + self.testCase_id + '_' + self.ue_id + '.log' 
+					SSH.command(cmd,'\$',int(ping_time[0])*1.5)
+					logging.debug(cmd)
+					#copy the ping log file to have it locally for analysis (ping stats)
+					SSH.copyin(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword, 'ping_' + self.testCase_id + '_' + self.ue_id + '.log', '.')
+
+					#cat is executed locally 
+					SSH.command('cat ping_' + self.testCase_id + '_' + self.ue_id + '.log', '\$', 5)
+					ping_status=0
 
-				SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
-				#cat is executed on EPC
-				SSH.command('cat ' + EPC.SourceCodePath + '/scripts/ping_' + self.testCase_id + '_' + device_id + '.log', '\$', 5)
 			# TIMEOUT CASE
 			if ping_status < 0:
 				message = 'Ping with UE (' + str(UE_IPAddress) + ') crashed due to TIMEOUT!'
@@ -1660,7 +1694,7 @@ class OaiCiTest():
 		except:
 			os.kill(os.getppid(),signal.SIGUSR1)
 
-	def Ping(self,HTML,RAN,EPC,COTS_UE):
+	def Ping(self,HTML,RAN,EPC,COTS_UE, InfraUE):
 		result = re.search('noS1', str(RAN.Initialize_eNB_args))
 		if result is not None:
 			self.PingNoS1(HTML,RAN,EPC,COTS_UE)
@@ -1678,18 +1712,29 @@ class OaiCiTest():
 			HTML.CreateHtmlTestRow(self.ping_args, 'KO', pStatus)
 			self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
 			return
-		ueIpStatus = self.GetAllUEIPAddresses()
-		if (ueIpStatus < 0):
-			HTML.CreateHtmlTestRow(self.ping_args, 'KO', CONST.UE_IP_ADDRESS_ISSUE)
-			self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
-			return
+
+		if self.ue_id=="":
+			ueIpStatus = self.GetAllUEIPAddresses()
+			if (ueIpStatus < 0):
+				HTML.CreateHtmlTestRow(self.ping_args, 'KO', CONST.UE_IP_ADDRESS_ISSUE)
+				self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
+				return
+		else:
+			Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id])
+			Module_UE.GetModuleIPAddress()
+			if Module_UE.UEIPAddress not in self.UEIPAddresses:
+				self.UEIPAddresses.append(Module_UE.UEIPAddress)
+		logging.debug(self.UEIPAddresses)
 		multi_jobs = []
 		i = 0
 		lock = Lock()
 		status_queue = SimpleQueue()
 		for UE_IPAddress in self.UEIPAddresses:
-			device_id = self.UEDevices[i]
-			p = Process(target = self.Ping_common, args = (lock,UE_IPAddress,device_id,status_queue,EPC,))
+			if self.ue_id=="":
+				device_id = self.UEDevices[i]
+			else:
+				device_id = ""
+			p = Process(target = self.Ping_common, args = (lock,UE_IPAddress,device_id,status_queue,EPC,InfraUE,))
 			p.daemon = True
 			p.start()
 			multi_jobs.append(p)
@@ -1864,8 +1909,8 @@ class OaiCiTest():
 		else:
 			return -2
 
-	def Iperf_analyzeV2Server(self, lock, UE_IPAddress, device_id, statusQueue, iperf_real_options):
-		if (not os.path.isfile('iperf_server_' + self.testCase_id + '_' + device_id + '.log')):
+	def Iperf_analyzeV2Server(self, lock, UE_IPAddress, device_id, statusQueue, iperf_real_options, filename,type):
+		if (not os.path.isfile(filename)):
 			self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, 'Could not analyze from server log')
 			return
 		# Computing the requested bandwidth in float
@@ -1890,14 +1935,18 @@ class OaiCiTest():
 				req_bandwidth = '%.1f Gbits/sec' % req_bw
 				req_bw = req_bw * 1000000000
 
-		server_file = open('iperf_server_' + self.testCase_id + '_' + device_id + '.log', 'r')
+		server_file = open(filename, 'r')
 		br_sum = 0.0
 		ji_sum = 0.0
 		pl_sum = 0
 		ps_sum = 0
 		row_idx = 0
 		for line in server_file.readlines():
-			result = re.search('(?P[0-9\.]+ [KMG]bits\/sec) +(?P[0-9\.]+ ms) +(?P[0-9]+)/ +(?P[0-9]+)', str(line))
+			if type==0:
+				result = re.search('(?P[0-9\.]+ [KMG]bits\/sec) +(?P[0-9\.]+ ms) +(?P[0-9]+)/ +(?P[0-9]+)', str(line))
+			else:
+				result = re.search('^.+ +(?P[0-9\.]+ [KMG]bits\/sec) +(?P[0-9\.]+ ms) +(?P[0-9]+)\/(?P[0-9]+)', str(line))
+
 			if result is not None:
 				bitrate = result.group('bitrate')
 				jitter = result.group('jitter')
@@ -2127,13 +2176,65 @@ class OaiCiTest():
 					SSH.command('docker cp prod-trf-gen:/iperf-2.0.5/iperf_server_' + self.testCase_id + '_' + device_id + '.log ' + EPC.SourceCodePath + '/scripts', '\$', 5)
 					SSH.close()
 				SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, EPC.SourceCodePath+ '/scripts/iperf_server_' + self.testCase_id + '_' + device_id + '.log', '.')
-			self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, modified_options)
+			filename='iperf_server_' + self.testCase_id + '_' + device_id + '.log'
+			self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, modified_options,filename,0)
 		# in case of OAI-UE 
 		if (device_id == 'OAI-UE'):
 			SSH.copyin(self.UEIPAddress, self.UEUserName, self.UEPassword, self.UESourceCodePath + '/cmake_targets/iperf_' + self.testCase_id + '_' + device_id + '.log', '.')
 			SSH.copyout(EPC.IPAddress, EPC.UserName, EPC.Password, 'iperf_' + self.testCase_id + '_' + device_id + '.log', EPC.SourceCodePath + '/scripts')
 
-	def Iperf_common(self, lock, UE_IPAddress, device_id, idx, ue_num, statusQueue,EPC):
+
+	def Iperf_Module(self, lock, UE_IPAddress, device_id, idx, ue_num, statusQueue,EPC, InfraUE):
+		SSH = sshconnection.SSHConnection()
+		iperf_time = self.Iperf_ComputeTime()	
+		if self.iperf_direction=="DL":
+			logging.debug("Iperf for Module in DL mode detected")
+			#server side UE
+			Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id])
+			SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword)
+			cmd = 'echo $USER; nohup iperf -s -B ' + UE_IPAddress + ' -u  2>&1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' 
+			SSH.command(cmd,'\$',5)
+			logging.debug(cmd)
+			#client side EPC
+			SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
+			cmd = 'iperf -c ' + UE_IPAddress + ' ' + self.iperf_args + ' 2>&1 > iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log' 
+			SSH.command(cmd,'\$',int(iperf_time)*5.0)
+			logging.debug(cmd)			
+
+			#copy the 2 resulting files locally
+			SSH.copyin(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword, 'iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log', '.')
+			SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, 'iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log', '.')
+			#send for analysis
+			filename='iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log'
+			self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, self.iperf_args,filename,1)	
+
+		elif self.iperf_direction=="UL":
+			logging.debug("Iperf for Module in UL mode detected")
+			#server side UE
+			Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id])
+			SSH.open(Module_UE.UEHostIPAddr, Module_UE.UEHostUserName, Module_UE.UEHostPassWord)
+			cmd = 'echo $USER; nohup iperf -s -B ' + UE_IPAddress + ' -u  2>&1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' 
+			SSH.command(cmd,'\$',5)
+			logging.debug(cmd)
+			#client side EPC
+			SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
+			cmd = 'iperf -c ' + UE_IPAddress + ' ' + self.iperf_args + ' 2>&1 > iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log' 
+			SSH.command(cmd,'\$',int(iperf_time)*5.0)
+			logging.debug(cmd)			
+
+			#copy the 2 resulting files locally
+			SSH.copyin(Module_UE.UEHostIPAddr, Module_UE.UEHostUserName, Module_UE.UEHostPassWord, 'iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log', '.')
+			SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, 'iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log', '.')
+			#send for analysis
+			filename='iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log'
+			self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, self.iperf_args,filename,1)				
+		else :
+			logging.debug("Incorrect or missing IPERF direction in XML")
+
+		SSH.close()
+		return
+
+	def Iperf_common(self, lock, UE_IPAddress, device_id, idx, ue_num, statusQueue,EPC, InfraUE):
 		try:
 			SSH = sshconnection.SSHConnection()
 			# Single-UE profile -- iperf only on one UE
@@ -2229,8 +2330,13 @@ class OaiCiTest():
 			# Launch the IPERF client on the EPC side for DL (true for ltebox and old open-air-cn
 			# But for OAI-Rel14-CUPS, we launch from python executor
 			launchFromEpc = True
+			launchFromModule = False
 			if re.match('OAI-Rel14-CUPS', EPC.Type, re.IGNORECASE):
 				launchFromEpc = False
+			#if module
+			if self.ue_id!='' and self.iperf :
+				launchFromEpc = False
+				launchfromModule = True
 			# When using a docker-based deployment, IPERF client shall be launched from trf container
 			launchFromTrfContainer = False
 			if re.match('OAI-Rel14-Docker', EPC.Type, re.IGNORECASE):
@@ -2334,7 +2440,8 @@ class OaiCiTest():
 					subprocess.run(cmd, shell=True)
 				except:
 					pass
-				self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, modified_options)
+				filename='iperf_server_' + self.testCase_id + '_' + device_id + '.log'
+				self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, modified_options,filename,0)
 
 			# in case of OAI UE: 
 			if (device_id == 'OAI-UE'):
@@ -2422,7 +2529,8 @@ class OaiCiTest():
 			if (os.path.isfile('iperf_server_' + self.testCase_id + '.log')):
 				os.remove('iperf_server_' + self.testCase_id + '.log')
 			SSH.copyin(iServerIPAddr, iServerUser, iServerPasswd, '/tmp/tmp_iperf_server_' + self.testCase_id + '.log', 'iperf_server_' + self.testCase_id + '_OAI-UE.log')
-			self.Iperf_analyzeV2Server(lock, '10.0.1.2', 'OAI-UE', status_queue, modified_options)
+			filename='iperf_server_' + self.testCase_id + '_' + device_id + '.log'
+			self.Iperf_analyzeV2Server(lock, '10.0.1.2', 'OAI-UE', status_queue, modified_options,filename,0)
 
 		# copying on the EPC server for logCollection
 		if (clientStatus == -1):
@@ -2457,7 +2565,7 @@ class OaiCiTest():
 			HTML.CreateHtmlTestRowQueue(self.iperf_args, 'KO', len(self.UEDevices), html_queue)
 			self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
 
-	def Iperf(self,HTML,RAN,EPC,COTS_UE):
+	def Iperf(self,HTML,RAN,EPC,COTS_UE, InfraUE):
 		result = re.search('noS1', str(RAN.Initialize_eNB_args))
 		if result is not None:
 			self.IperfNoS1(HTML,RAN,EPC,COTS_UE)
@@ -2477,11 +2585,26 @@ class OaiCiTest():
 			return
 		ueIpStatus = self.GetAllUEIPAddresses()
 		if (ueIpStatus < 0):
-			logging.debug('going here')
 			HTML.CreateHtmlTestRow(self.iperf_args, 'KO', CONST.UE_IP_ADDRESS_ISSUE)
 			self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
 			return
 
+
+		if self.ue_id=="":
+			ueIpStatus = self.GetAllUEIPAddresses()
+			if (ueIpStatus < 0):
+				HTML.CreateHtmlTestRow(self.iperf_args, 'KO', CONST.UE_IP_ADDRESS_ISSUE)
+				self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
+				return
+		else: 
+			Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id])
+			Module_UE.GetModuleIPAddress()
+			if Module_UE.UEIPAddress not in self.UEIPAddresses:
+				self.UEIPAddresses.append(Module_UE.UEIPAddress)
+
+
+
+
 		self.dummyIperfVersion = '2.0.10'
 		#cmd = 'iperf --version'
 		#logging.debug(cmd + '\n')
@@ -2498,13 +2621,18 @@ class OaiCiTest():
 		ue_num = len(self.UEIPAddresses)
 		lock = Lock()
 		status_queue = SimpleQueue()
+		logging.debug(self.UEIPAddresses)
 		for UE_IPAddress in self.UEIPAddresses:
 			device_id = self.UEDevices[i]
-			p = Process(target = self.Iperf_common, args = (lock,UE_IPAddress,device_id,i,ue_num,status_queue,EPC,))
-			p.daemon = True
-			p.start()
-			multi_jobs.append(p)
-			i = i + 1
+        #special quick and dirty treatment for modules, iperf to be restructured
+		if self.ue_id!="":
+			p = Process(target = self.Iperf_Module ,args = (lock, UE_IPAddress, device_id, i, ue_num, status_queue, EPC, InfraUE,))
+		else:
+			p = Process(target = self.Iperf_common, args = (lock, UE_IPAddress, device_id, i, ue_num, status_queue, EPC, InfraUE,))
+		p.daemon = True
+		p.start()
+		multi_jobs.append(p)
+		i = i + 1
 		for job in multi_jobs:
 			job.join()
 
diff --git a/ci-scripts/main.py b/ci-scripts/main.py
index 3094197c54..d6bfe3c7c9 100644
--- a/ci-scripts/main.py
+++ b/ci-scripts/main.py
@@ -40,9 +40,9 @@ import constants as CONST
 
 import cls_oaicitest		#main class for OAI CI test framework
 import cls_physim           #class PhySim for physical simulators build and test
-import cls_cots_ue			#class CotsUe for Airplane mode control
+import cls_cots_ue			#class CotsUe for Airplane mode control of various mobile phones
 import cls_containerize     #class Containerize for all container-based operations on RAN/UE objects
-
+import cls_ci_ueinfra		#class defining the multi Ue infrastrucure
 
 import sshconnection 
 import epc
@@ -192,6 +192,14 @@ def GetParametersFromXML(action):
 		else :
 			RAN.air_interface[RAN.eNB_instance] = 'ocp-enb'
 
+	elif action == 'Initialize_UE':
+		ue_id = test.findtext('id')
+		if (ue_id is None):
+			CiTestObj.ue_id = ""
+		else:
+			CiTestObj.ue_id = ue_id
+
+
 	elif action == 'Attach_UE':
 		nbMaxUEtoAttach = test.findtext('nbMaxUEtoAttach')
 		if (nbMaxUEtoAttach is None):
@@ -252,9 +260,20 @@ def GetParametersFromXML(action):
 	elif (action == 'Ping') or (action == 'Ping_CatM_module'):
 		CiTestObj.ping_args = test.findtext('ping_args')
 		CiTestObj.ping_packetloss_threshold = test.findtext('ping_packetloss_threshold')
+		ue_id = test.findtext('id')
+		if (ue_id is None):
+			CiTestObj.ue_id = ""
+		else:
+			CiTestObj.ue_id = ue_id
 
 	elif action == 'Iperf':
 		CiTestObj.iperf_args = test.findtext('iperf_args')
+		ue_id = test.findtext('id')
+		if (ue_id is None):
+			CiTestObj.ue_id = ""
+		else:
+			CiTestObj.ue_id = ue_id
+		CiTestObj.iperf_direction = test.findtext('direction')#used for modules only	
 		CiTestObj.iperf_packetloss_threshold = test.findtext('iperf_packetloss_threshold')
 		CiTestObj.iperf_profile = test.findtext('iperf_profile')
 		if (CiTestObj.iperf_profile is None):
@@ -368,6 +387,10 @@ with open(yaml_file,'r') as f:
     xml_class_list = yaml.load(f,Loader=yaml.FullLoader)
 
 
+InfraUE=cls_ci_ueinfra.InfraUE() #initialize UE infrastructure class
+InfraUE.Get_UE_Infra("ci_ueinfra.yaml") #read the UE infra, filename is hardcoded and unique for the moment but should be passed as parameter from the test suite
+
+
 
 mode = ''
 
@@ -382,7 +405,6 @@ CONTAINERS = cls_containerize.Containerize()
 ldpc=cls_physim.PhySim()    #create an instance for LDPC test using GPU or CPU build
 
 
-
 #-----------------------------------------------------------
 # Parsing Command Line Arguments
 #-----------------------------------------------------------
@@ -671,7 +693,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
 				elif action == 'Terminate_eNB':
 					RAN.TerminateeNB(HTML, EPC)
 				elif action == 'Initialize_UE':
-					CiTestObj.InitializeUE(HTML,COTS_UE)
+					CiTestObj.InitializeUE(HTML,COTS_UE, InfraUE)
 				elif action == 'Terminate_UE':
 					CiTestObj.TerminateUE(HTML,COTS_UE)
 				elif action == 'Attach_UE':
@@ -701,9 +723,9 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
 				elif action == 'Ping_CatM_module':
 					CiTestObj.PingCatM(HTML,RAN,EPC,COTS_UE,EPC)
 				elif action == 'Ping':
-					CiTestObj.Ping(HTML,RAN,EPC,COTS_UE)
+					CiTestObj.Ping(HTML,RAN,EPC,COTS_UE, InfraUE)
 				elif action == 'Iperf':
-					CiTestObj.Iperf(HTML,RAN,EPC,COTS_UE)
+					CiTestObj.Iperf(HTML,RAN,EPC,COTS_UE, InfraUE)
 				elif action == 'Reboot_UE':
 					CiTestObj.RebootUE(HTML,RAN,EPC)
 				elif action == 'Initialize_HSS':
diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py
index 783adb98e6..5bac3846c9 100644
--- a/ci-scripts/ran.py
+++ b/ci-scripts/ran.py
@@ -239,7 +239,6 @@ class RANManagement():
 		while (count > 0) and buildOAIprocess:
 			mySSH.command('ps aux | grep --color=never build_ | grep -v grep', '\$', 6)
 			result = re.search('build_oai', mySSH.getBefore())
-			print(result)
 			if result is None:
 				buildOAIprocess = False
 			else:

From 31bc110de07bdf69f443c8af0b8b6bd5f0b43782 Mon Sep 17 00:00:00 2001
From: hardy 
Date: Sun, 4 Apr 2021 10:53:28 +0200
Subject: [PATCH 121/579] a bit of re factoring

---
 ci-scripts/cls_oaicitest.py | 34 +++++++++++++++-------------------
 1 file changed, 15 insertions(+), 19 deletions(-)

diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py
index a8a467153b..62b2784faa 100644
--- a/ci-scripts/cls_oaicitest.py
+++ b/ci-scripts/cls_oaicitest.py
@@ -1450,7 +1450,7 @@ class OaiCiTest():
 		statusQueue.put(message)
 		lock.release()
 
-	def Ping_common(self, lock, UE_IPAddress, device_id, statusQueue,EPC, InfraUE):
+	def Ping_common(self, lock, UE_IPAddress, device_id, statusQueue,EPC, Module_UE):
 		try:
 			SSH = sshconnection.SSHConnection()
 			# Launch ping on the EPC side (true for ltebox and old open-air-cn)
@@ -1498,8 +1498,6 @@ class OaiCiTest():
 					#cat is executed on EPC
 					SSH.command('cat ' + EPC.SourceCodePath + '/scripts/ping_' + self.testCase_id + '_' + device_id + '.log', '\$', 5)
 				else: #launch from Module
-					Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id])
-
 					SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword)
 					cmd = 'ping -I ' + UE_IPAddress + ' ' + self.ping_args + ' ' +  EPC.IPAddress  + ' 2>&1 > ping_' + self.testCase_id + '_' + self.ue_id + '.log' 
 					SSH.command(cmd,'\$',int(ping_time[0])*1.5)
@@ -1734,7 +1732,7 @@ class OaiCiTest():
 				device_id = self.UEDevices[i]
 			else:
 				device_id = ""
-			p = Process(target = self.Ping_common, args = (lock,UE_IPAddress,device_id,status_queue,EPC,InfraUE,))
+			p = Process(target = self.Ping_common, args = (lock,UE_IPAddress,device_id,status_queue,EPC,Module_UE,))
 			p.daemon = True
 			p.start()
 			multi_jobs.append(p)
@@ -2184,13 +2182,12 @@ class OaiCiTest():
 			SSH.copyout(EPC.IPAddress, EPC.UserName, EPC.Password, 'iperf_' + self.testCase_id + '_' + device_id + '.log', EPC.SourceCodePath + '/scripts')
 
 
-	def Iperf_Module(self, lock, UE_IPAddress, device_id, idx, ue_num, statusQueue,EPC, InfraUE):
+	def Iperf_Module(self, lock, UE_IPAddress, device_id, idx, ue_num, statusQueue,EPC, Module_UE):
 		SSH = sshconnection.SSHConnection()
 		iperf_time = self.Iperf_ComputeTime()	
 		if self.iperf_direction=="DL":
 			logging.debug("Iperf for Module in DL mode detected")
 			#server side UE
-			Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id])
 			SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword)
 			cmd = 'echo $USER; nohup iperf -s -B ' + UE_IPAddress + ' -u  2>&1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' 
 			SSH.command(cmd,'\$',5)
@@ -2210,31 +2207,30 @@ class OaiCiTest():
 
 		elif self.iperf_direction=="UL":
 			logging.debug("Iperf for Module in UL mode detected")
-			#server side UE
-			Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id])
-			SSH.open(Module_UE.UEHostIPAddr, Module_UE.UEHostUserName, Module_UE.UEHostPassWord)
-			cmd = 'echo $USER; nohup iperf -s -B ' + UE_IPAddress + ' -u  2>&1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' 
+			#server side EPC
+			SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
+			cmd = 'iperf -s -u 2>&1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' 
 			SSH.command(cmd,'\$',5)
 			logging.debug(cmd)
-			#client side EPC
-			SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
-			cmd = 'iperf -c ' + UE_IPAddress + ' ' + self.iperf_args + ' 2>&1 > iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log' 
+			#client side UE
+			SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword)
+			cmd = 'echo $USER; nohup iperf -B ' + UE_IPAddress + ' ' + '-c ' + EPC.IPAddress + ' ' + self.iperf_args + ' 2>&1 > iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log' 
 			SSH.command(cmd,'\$',int(iperf_time)*5.0)
 			logging.debug(cmd)			
 
 			#copy the 2 resulting files locally
-			SSH.copyin(Module_UE.UEHostIPAddr, Module_UE.UEHostUserName, Module_UE.UEHostPassWord, 'iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log', '.')
+			SSH.copyin(Module_UE.HostIPAddress, Module_UE.UEHostUsername, Module_UE.UEHostPassword, 'iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log', '.')
 			SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, 'iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log', '.')
 			#send for analysis
-			filename='iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log'
-			self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, self.iperf_args,filename,1)				
+			filename='iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log'
+			self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, self.iperf_args,filename,0)				
 		else :
 			logging.debug("Incorrect or missing IPERF direction in XML")
 
 		SSH.close()
 		return
 
-	def Iperf_common(self, lock, UE_IPAddress, device_id, idx, ue_num, statusQueue,EPC, InfraUE):
+	def Iperf_common(self, lock, UE_IPAddress, device_id, idx, ue_num, statusQueue,EPC):
 		try:
 			SSH = sshconnection.SSHConnection()
 			# Single-UE profile -- iperf only on one UE
@@ -2626,9 +2622,9 @@ class OaiCiTest():
 			device_id = self.UEDevices[i]
         #special quick and dirty treatment for modules, iperf to be restructured
 		if self.ue_id!="":
-			p = Process(target = self.Iperf_Module ,args = (lock, UE_IPAddress, device_id, i, ue_num, status_queue, EPC, InfraUE,))
+			p = Process(target = self.Iperf_Module ,args = (lock, UE_IPAddress, device_id, i, ue_num, status_queue, EPC, Module_UE,))
 		else:
-			p = Process(target = self.Iperf_common, args = (lock, UE_IPAddress, device_id, i, ue_num, status_queue, EPC, InfraUE,))
+			p = Process(target = self.Iperf_common, args = (lock, UE_IPAddress, device_id, i, ue_num, status_queue, EPC, ))
 		p.daemon = True
 		p.start()
 		multi_jobs.append(p)

From ea89cfa1a180bf0bf3070200800a95e32ad59462 Mon Sep 17 00:00:00 2001
From: Remi Hardy 
Date: Sun, 4 Apr 2021 15:28:49 +0200
Subject: [PATCH 122/579] iperf UL and DL working ok

---
 ci-scripts/cls_oaicitest.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py
index 62b2784faa..1cd435e723 100644
--- a/ci-scripts/cls_oaicitest.py
+++ b/ci-scripts/cls_oaicitest.py
@@ -2209,21 +2209,21 @@ class OaiCiTest():
 			logging.debug("Iperf for Module in UL mode detected")
 			#server side EPC
 			SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
-			cmd = 'iperf -s -u 2>&1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' 
+			cmd = 'echo $USER; nohup iperf -s -u 2>&1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' 
 			SSH.command(cmd,'\$',5)
 			logging.debug(cmd)
 			#client side UE
 			SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword)
-			cmd = 'echo $USER; nohup iperf -B ' + UE_IPAddress + ' ' + '-c ' + EPC.IPAddress + ' ' + self.iperf_args + ' 2>&1 > iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log' 
+			cmd = 'iperf -B ' + UE_IPAddress + ' ' + '-c ' + EPC.IPAddress + ' ' + self.iperf_args + ' > iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log' 
 			SSH.command(cmd,'\$',int(iperf_time)*5.0)
 			logging.debug(cmd)			
 
 			#copy the 2 resulting files locally
-			SSH.copyin(Module_UE.HostIPAddress, Module_UE.UEHostUsername, Module_UE.UEHostPassword, 'iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log', '.')
+			SSH.copyin(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword, 'iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log', '.')
 			SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, 'iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log', '.')
 			#send for analysis
-			filename='iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log'
-			self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, self.iperf_args,filename,0)				
+			filename='iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log'
+			self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, self.iperf_args,filename,1)				
 		else :
 			logging.debug("Incorrect or missing IPERF direction in XML")
 

From 41cb06546fedc1b7a126507c3209a3111751abc9 Mon Sep 17 00:00:00 2001
From: Remi Hardy 
Date: Sun, 4 Apr 2021 15:36:34 +0200
Subject: [PATCH 123/579] fix UE name in html for iperf

---
 ci-scripts/cls_oaicitest.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py
index 1cd435e723..99252da20c 100644
--- a/ci-scripts/cls_oaicitest.py
+++ b/ci-scripts/cls_oaicitest.py
@@ -2622,6 +2622,7 @@ class OaiCiTest():
 			device_id = self.UEDevices[i]
         #special quick and dirty treatment for modules, iperf to be restructured
 		if self.ue_id!="":
+			device_id = Module_UE.ID + "-" + Module_UE.Kind
 			p = Process(target = self.Iperf_Module ,args = (lock, UE_IPAddress, device_id, i, ue_num, status_queue, EPC, Module_UE,))
 		else:
 			p = Process(target = self.Iperf_common, args = (lock, UE_IPAddress, device_id, i, ue_num, status_queue, EPC, ))

From 69451ed33fceeaebf65b89d4ed84ad04a907b9ad Mon Sep 17 00:00:00 2001
From: Remi Hardy 
Date: Sun, 4 Apr 2021 15:54:57 +0200
Subject: [PATCH 124/579] fix UE name in html for ping

---
 ci-scripts/cls_oaicitest.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py
index 99252da20c..7e27a41a0a 100644
--- a/ci-scripts/cls_oaicitest.py
+++ b/ci-scripts/cls_oaicitest.py
@@ -1731,7 +1731,7 @@ class OaiCiTest():
 			if self.ue_id=="":
 				device_id = self.UEDevices[i]
 			else:
-				device_id = ""
+				device_id = Module_UE.ID + "-" + Module_UE.Kind 
 			p = Process(target = self.Ping_common, args = (lock,UE_IPAddress,device_id,status_queue,EPC,Module_UE,))
 			p.daemon = True
 			p.start()

From 5a3dc09fdb1426317694469ca2c9a14b327285f4 Mon Sep 17 00:00:00 2001
From: hardy 
Date: Sun, 4 Apr 2021 21:27:28 +0200
Subject: [PATCH 125/579] fixes for other CI pipelines

---
 ci-scripts/ci_ueinfra.yaml  | 11 ++---------
 ci-scripts/cls_oaicitest.py |  1 +
 ci-scripts/main.py          | 12 +++++++++++-
 3 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/ci-scripts/ci_ueinfra.yaml b/ci-scripts/ci_ueinfra.yaml
index 8ea75f9a85..15ca6b3859 100644
--- a/ci-scripts/ci_ueinfra.yaml
+++ b/ci-scripts/ci_ueinfra.yaml
@@ -9,15 +9,8 @@ idefix:
   HostUsername : oaicicd
   HostPassword : oaicicd
   HostSourceCodePath : none
-dummy1:
-  ID: dummy1
-  Kind : simcom
-  State : disabled
-  Process : quectel-cm 
-  HostIPAddress : 192.168.18.187
-  HostUsername : oaicicd
-  HostPassword : oaicicd
-  HostSourceCodePath : none
+dummy:
+  ID: dummy
 dummy2:  
   ID: dummy2
   Kind : cots
diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py
index 7e27a41a0a..f4f30c5d18 100644
--- a/ci-scripts/cls_oaicitest.py
+++ b/ci-scripts/cls_oaicitest.py
@@ -1712,6 +1712,7 @@ class OaiCiTest():
 			return
 
 		if self.ue_id=="":
+			Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra['dummy']) #RH, temporary, we need a dummy Module_UE object to pass to Ping_common
 			ueIpStatus = self.GetAllUEIPAddresses()
 			if (ueIpStatus < 0):
 				HTML.CreateHtmlTestRow(self.ping_args, 'KO', CONST.UE_IP_ADDRESS_ISSUE)
diff --git a/ci-scripts/main.py b/ci-scripts/main.py
index d6bfe3c7c9..0c0c76dc09 100644
--- a/ci-scripts/main.py
+++ b/ci-scripts/main.py
@@ -387,8 +387,18 @@ with open(yaml_file,'r') as f:
     xml_class_list = yaml.load(f,Loader=yaml.FullLoader)
 
 
+
+#loading UE infrastructure from yaml
+ue_infra_file='ci_ueinfra.yaml'
+if (os.path.isfile(ue_infra_file)):
+	yaml_file=ue_infra_file
+elif (os.path.isfile('ci-scripts/'+ue_infra_file)):
+	yaml_file='ci-scripts/'+ue_infra_file
+else:
+	logging.error("UE infrastructure yaml file cannot be found")
+	sys.exit("UE infrastructure file cannot be found")
 InfraUE=cls_ci_ueinfra.InfraUE() #initialize UE infrastructure class
-InfraUE.Get_UE_Infra("ci_ueinfra.yaml") #read the UE infra, filename is hardcoded and unique for the moment but should be passed as parameter from the test suite
+InfraUE.Get_UE_Infra(yaml_file) #read the UE infra, filename is hardcoded and unique for the moment but should be passed as parameter from the test suite
 
 
 

From c1be8be1bc392b5a4f774c50c8138e61c309e43d Mon Sep 17 00:00:00 2001
From: hardy 
Date: Mon, 5 Apr 2021 11:14:53 +0200
Subject: [PATCH 126/579] new nsa testcase for quectel

---
 ci-scripts/xml_files/fr1_nsa_quectel.xml | 139 +++++++++++++++++++++++
 1 file changed, 139 insertions(+)
 create mode 100644 ci-scripts/xml_files/fr1_nsa_quectel.xml

diff --git a/ci-scripts/xml_files/fr1_nsa_quectel.xml b/ci-scripts/xml_files/fr1_nsa_quectel.xml
new file mode 100644
index 0000000000..a1604af7b3
--- /dev/null
+++ b/ci-scripts/xml_files/fr1_nsa_quectel.xml
@@ -0,0 +1,139 @@
+
+
+	TEST-NSA-FR1-TM1
+	NSA QUECTEL
+	tasks
+	
+ 030000
+ 040000
+ 000001
+ 010000
+ 000001
+ 050000
+ 050001
+ 000001
+ 070000
+ 000001
+ 070001
+ 000001
+ 080001
+ 080000
+  
+	
+	
+
+	
+		Initialize_UE
+		Initialize Quectel
+        idefix
+	
+
+
+	
+		Detach_UE
+		Detach UE
+        idefix
+	
+
+
+	
+		Initialize_eNB
+		Initialize eNB
+		-O ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf
+		0
+		0
+		lte
+   
+
+
+	
+		Initialize_eNB
+		Initialize gNB
+		-O ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf -E
+		1
+		1
+		nr
+	
+
+	
+		IdleSleep
+		Sleep
+		10
+	
+
+	
+		Ping
+		Ping: 20pings in 20sec
+		idefix
+		-c 20
+		50
+	
+
+	
+		Ping
+		Ping: 100pings in 20sec
+		idefix
+		-c 100 -i 0.2
+		50
+	
+
+    
+        Iperf
+        iperf (DL/20Mbps/UDP)(20 sec)(single-ue profile)
+        -u -b 20M -t 20 -i 1
+		DL
+        idefix
+        50
+        single-ue
+    
+
+    
+        Iperf
+        iperf (UL/3Mbps/UDP)(20 sec)(single-ue profile)
+        -u -b 3M -t 20 -i 1
+		UL
+        idefix
+        50
+        single-ue
+    
+
+
+	
+		Terminate_eNB
+		Terminate eNB
+		0
+		0
+		lte
+	
+
+	
+		Terminate_eNB
+		Terminate gNB
+		1
+		1
+		nr
+	
+
+
+

From 53e624e4c2386d59ceffc1e065edf0367d450cf1 Mon Sep 17 00:00:00 2001
From: hardy 
Date: Mon, 5 Apr 2021 12:25:50 +0200
Subject: [PATCH 127/579] improving module control scripts, to be tested

---
 ci-scripts/ci_ctl_qtel.py  | 63 ++++++++++++++++++++++++++++++++++++++
 ci-scripts/ci_ueinfra.yaml |  3 +-
 2 files changed, 65 insertions(+), 1 deletion(-)
 create mode 100644 ci-scripts/ci_ctl_qtel.py

diff --git a/ci-scripts/ci_ctl_qtel.py b/ci-scripts/ci_ctl_qtel.py
new file mode 100644
index 0000000000..1813c1daab
--- /dev/null
+++ b/ci-scripts/ci_ctl_qtel.py
@@ -0,0 +1,63 @@
+# * 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
+# */
+#---------------------------------------------------------------------
+#
+#   Required Python Version
+#     Python 3.x
+#
+#---------------------------------------------------------------------
+
+
+
+import sys
+import time
+import serial
+
+
+class qtel_ctl:
+    def __init__(self, usb_port_at):
+        self.QUECTEL_USB_PORT_AT = usb_port_at #'/dev/ttyUSB2'
+        self.modem = serial.Serial(self.QUECTEL_USB_PORT_AT, timeout=1)
+        self.cmd_dict= {"wup": self.wup;"detach":self.detach}
+
+    def __set_modem_state(self,ser,state):
+	    self.__send_command(ser,"AT+CFUN={}\r".format(state))
+
+    def __send_command(self,ser,com):
+        if ser.inWaiting() > 0:
+            ser.flushInput()
+        ser.write(com.encode())
+
+
+    def wup(self):
+        self.__set_modem_state(modem,0)
+        time.sleep(3)
+        self.__set_modem_state(modem,1)
+
+    def detach(self):
+        self.__set_modem_state(modem,0)
+
+
+
+
+if __name__ == "__main__":
+    command = sys.argv[2]
+    Module=qtel_ctl(sys.argv[1])
+    Module.cmd_dict[command]()
diff --git a/ci-scripts/ci_ueinfra.yaml b/ci-scripts/ci_ueinfra.yaml
index 15ca6b3859..e62943e683 100644
--- a/ci-scripts/ci_ueinfra.yaml
+++ b/ci-scripts/ci_ueinfra.yaml
@@ -3,7 +3,8 @@ idefix:
   State : enabled
   Kind : quectel
   Process : quectel-CM
-  WakeupScript : ci_qtel.py
+  WakeupScript : ci_ctl_qtel.py /dev/ttyUSB2 wup
+  DetachScript : ci_ctl_qtel.py /dev/ttyUSB2 detach
   UENetwork : wwan0
   HostIPAddress : 192.168.18.188
   HostUsername : oaicicd

From 31726d685f0aa83494e4410376eb74c5e96a08ac Mon Sep 17 00:00:00 2001
From: Remi Hardy 
Date: Mon, 5 Apr 2021 19:58:54 +0200
Subject: [PATCH 128/579] fixing qtel control

---
 ci-scripts/ci_ctl_qtel.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/ci-scripts/ci_ctl_qtel.py b/ci-scripts/ci_ctl_qtel.py
index 1813c1daab..b9e61c1687 100644
--- a/ci-scripts/ci_ctl_qtel.py
+++ b/ci-scripts/ci_ctl_qtel.py
@@ -35,7 +35,7 @@ class qtel_ctl:
     def __init__(self, usb_port_at):
         self.QUECTEL_USB_PORT_AT = usb_port_at #'/dev/ttyUSB2'
         self.modem = serial.Serial(self.QUECTEL_USB_PORT_AT, timeout=1)
-        self.cmd_dict= {"wup": self.wup;"detach":self.detach}
+        self.cmd_dict= {"wup": self.wup,"detach":self.detach}
 
     def __set_modem_state(self,ser,state):
 	    self.__send_command(ser,"AT+CFUN={}\r".format(state))
@@ -47,12 +47,12 @@ class qtel_ctl:
 
 
     def wup(self):
-        self.__set_modem_state(modem,0)
+        self.__set_modem_state(self.modem,0)
         time.sleep(3)
-        self.__set_modem_state(modem,1)
+        self.__set_modem_state(self.modem,1)
 
     def detach(self):
-        self.__set_modem_state(modem,0)
+        self.__set_modem_state(self.modem,0)
 
 
 

From 7878f8af6ed0bf2baa6ebdf3c61013cbe793dd87 Mon Sep 17 00:00:00 2001
From: Remi Hardy 
Date: Mon, 5 Apr 2021 20:14:38 +0200
Subject: [PATCH 129/579] adding some inline doc/comments to ci_ctl_qtel.py

---
 ci-scripts/ci_ctl_qtel.py | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/ci-scripts/ci_ctl_qtel.py b/ci-scripts/ci_ctl_qtel.py
index b9e61c1687..1030b54616 100644
--- a/ci-scripts/ci_ctl_qtel.py
+++ b/ci-scripts/ci_ctl_qtel.py
@@ -32,10 +32,13 @@ import serial
 
 
 class qtel_ctl:
+	#---------------
+	#private methods
+	#---------------
     def __init__(self, usb_port_at):
-        self.QUECTEL_USB_PORT_AT = usb_port_at #'/dev/ttyUSB2'
+        self.QUECTEL_USB_PORT_AT = usb_port_at #ex : '/dev/ttyUSB2'
         self.modem = serial.Serial(self.QUECTEL_USB_PORT_AT, timeout=1)
-        self.cmd_dict= {"wup": self.wup,"detach":self.detach}
+        self.cmd_dict= {"wup": self.wup,"detach":self.detach}#dictionary of function pointers
 
     def __set_modem_state(self,ser,state):
 	    self.__send_command(ser,"AT+CFUN={}\r".format(state))
@@ -45,19 +48,24 @@ class qtel_ctl:
             ser.flushInput()
         ser.write(com.encode())
 
-
-    def wup(self):
+	#--------------
+	#public methods
+	#--------------
+    def wup(self):#sending AT+CFUN=0, then AT+CFUN=1
         self.__set_modem_state(self.modem,0)
         time.sleep(3)
         self.__set_modem_state(self.modem,1)
 
-    def detach(self):
+    def detach(self):#sending AT+CFUN=0
         self.__set_modem_state(self.modem,0)
 
 
 
 
 if __name__ == "__main__":
+	#argv[1] : usb port
+	#argv[2] : qtel command (see function pointers dict "wup", "detach" etc ...)
     command = sys.argv[2]
     Module=qtel_ctl(sys.argv[1])
+	#calling the function to be applied
     Module.cmd_dict[command]()

From 87a5e40edad615e305c4ad96998332d1c517af57 Mon Sep 17 00:00:00 2001
From: hardy 
Date: Wed, 7 Apr 2021 14:03:45 +0200
Subject: [PATCH 130/579] fix CI issue (removing code that should have been
 deleted)

---
 ci-scripts/cls_oaicitest.py | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py
index f4f30c5d18..c0492f10f2 100644
--- a/ci-scripts/cls_oaicitest.py
+++ b/ci-scripts/cls_oaicitest.py
@@ -2580,20 +2580,14 @@ class OaiCiTest():
 			HTML.CreateHtmlTestRow(self.iperf_args, 'KO', pStatus)
 			self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
 			return
-		ueIpStatus = self.GetAllUEIPAddresses()
-		if (ueIpStatus < 0):
-			HTML.CreateHtmlTestRow(self.iperf_args, 'KO', CONST.UE_IP_ADDRESS_ISSUE)
-			self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
-			return
 
-
-		if self.ue_id=="":
+		if self.ue_id=="":#is not a module, follow legacy code
 			ueIpStatus = self.GetAllUEIPAddresses()
 			if (ueIpStatus < 0):
 				HTML.CreateHtmlTestRow(self.iperf_args, 'KO', CONST.UE_IP_ADDRESS_ISSUE)
 				self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
 				return
-		else: 
+		else: #is a module
 			Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id])
 			Module_UE.GetModuleIPAddress()
 			if Module_UE.UEIPAddress not in self.UEIPAddresses:

From d727eebaf51da2bab2f1963679754d0d2dab5352 Mon Sep 17 00:00:00 2001
From: hardy 
Date: Wed, 7 Apr 2021 20:30:42 +0200
Subject: [PATCH 131/579] fix incorrect indentation that makes the CI fail for
 multiple UEs

---
 ci-scripts/cls_oaicitest.py | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py
index c0492f10f2..3e90fd6eb7 100644
--- a/ci-scripts/cls_oaicitest.py
+++ b/ci-scripts/cls_oaicitest.py
@@ -2615,16 +2615,16 @@ class OaiCiTest():
 		logging.debug(self.UEIPAddresses)
 		for UE_IPAddress in self.UEIPAddresses:
 			device_id = self.UEDevices[i]
-        #special quick and dirty treatment for modules, iperf to be restructured
-		if self.ue_id!="":
-			device_id = Module_UE.ID + "-" + Module_UE.Kind
-			p = Process(target = self.Iperf_Module ,args = (lock, UE_IPAddress, device_id, i, ue_num, status_queue, EPC, Module_UE,))
-		else:
-			p = Process(target = self.Iperf_common, args = (lock, UE_IPAddress, device_id, i, ue_num, status_queue, EPC, ))
-		p.daemon = True
-		p.start()
-		multi_jobs.append(p)
-		i = i + 1
+        	#special quick and dirty treatment for modules, iperf to be restructured
+			if self.ue_id!="": #is module
+				device_id = Module_UE.ID + "-" + Module_UE.Kind
+				p = Process(target = self.Iperf_Module ,args = (lock, UE_IPAddress, device_id, i, ue_num, status_queue, EPC, Module_UE,))
+			else: #legacy code
+				p = Process(target = self.Iperf_common, args = (lock, UE_IPAddress, device_id, i, ue_num, status_queue, EPC, ))
+			p.daemon = True
+			p.start()
+			multi_jobs.append(p)
+			i = i + 1
 		for job in multi_jobs:
 			job.join()
 

From f7f8935ce38accd264b91b6f7c9a117c7d601d7a Mon Sep 17 00:00:00 2001
From: Raymond Knopp 
Date: Sat, 10 Apr 2021 23:28:34 +0200
Subject: [PATCH 132/579] minor wqupdates after merge with develop

---
 openair1/PHY/defs_gNB.h    | 3 ++-
 openair2/RRC/LTE/rrc_eNB.c | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/openair1/PHY/defs_gNB.h b/openair1/PHY/defs_gNB.h
index 6f80c85cb7..1c891c117e 100644
--- a/openair1/PHY/defs_gNB.h
+++ b/openair1/PHY/defs_gNB.h
@@ -845,7 +845,8 @@ typedef struct PHY_VARS_gNB_s {
   tpool_t *threadPool;
   int nbDecode;
   uint8_t pusch_proc_threads;
-
+  int number_of_nr_dlsch_max;
+  int number_of_nr_ulsch_max;
 } PHY_VARS_gNB;
 
 typedef struct LDPCDecode_s {
diff --git a/openair2/RRC/LTE/rrc_eNB.c b/openair2/RRC/LTE/rrc_eNB.c
index eb30124e88..c105df1697 100644
--- a/openair2/RRC/LTE/rrc_eNB.c
+++ b/openair2/RRC/LTE/rrc_eNB.c
@@ -9096,9 +9096,9 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) {
 
             fprintf(fd,"NR_pci %ld\n",ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->pci_r15);
             if(ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrpResult_r15)
-              fprintf(fd,"NR_rsrp %f dB\n",to_nr_rsrpq(*ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrpResult_r15,RC.rrc[ctxt_pP->module_id]->nr_neigh_freq_band[0][0])/10.0);
+              fprintf(fd,"NR_rsrp %f dB\n",to_nr_rsrpq(*ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrpResult_r15,RC.rrc[ctxt_pP->module_id]->nr_gnb_freq_band[0][0])/10.0);
             if (ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrqResult_r15) 
-              fprintf(fd,"NR_rsrq %f dB\n",to_nr_rsrpq(*ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrqResult_r15,RC.rrc[ctxt_pP->module_id]->nr_neigh_freq_band[0][0])/10.0);
+              fprintf(fd,"NR_rsrq %f dB\n",to_nr_rsrpq(*ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultCell_r15.rsrqResult_r15,RC.rrc[ctxt_pP->module_id]->nr_gnb_freq_band[0][0])/10.0);
             if (ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultRS_IndexList_r15) 
               fprintf(fd,"NR_ssb_index %ld\n",ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultNeighCellListNR_r15.list.array[0]->measResultRS_IndexList_r15->list.array[0]->ssb_Index_r15);
            }

From 8def7528182cc8c6e537dceed54e4bd114153a1a Mon Sep 17 00:00:00 2001
From: hardy 
Date: Mon, 12 Apr 2021 10:18:10 +0200
Subject: [PATCH 133/579] adding module UE detach, to be tested

---
 ci-scripts/cls_module_ue.py |  10 +++
 ci-scripts/cls_oaicitest.py | 121 +++++++++++++++++++-----------------
 ci-scripts/main.py          |   6 ++
 3 files changed, 81 insertions(+), 56 deletions(-)

diff --git a/ci-scripts/cls_module_ue.py b/ci-scripts/cls_module_ue.py
index 87902deaff..6aa4265571 100644
--- a/ci-scripts/cls_module_ue.py
+++ b/ci-scripts/cls_module_ue.py
@@ -78,6 +78,7 @@ class Module_UE:
 			logging.debug(self.Process + " process NOT found")
 			return False 
 
+	#Wakeup/Detach can probably be improved with encapsulation of the command such def Command(self, command)
 	#this method wakes up the module by calling the specified python script 
 	def WakeUp(self):
 		mySSH = sshconnection.SSHConnection()
@@ -87,6 +88,15 @@ class Module_UE:
 		logging.debug("Module wake-up")
 		mySSH.close()
 
+	#this method detaches the module by calling the specified python script 
+	def Detach(self):
+		mySSH = sshconnection.SSHConnection()
+		mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword)
+		mySSH.command('echo ' + self.HostPassword + ' | sudo -S python3 ' + self.DetachScript + ' ','\$',5)
+		time.sleep(5)
+		logging.debug("Module detach")
+		mySSH.close()
+
 	#this method retrieves the Module IP address (not the Host IP address) 
 	def GetModuleIPAddress(self):
 		HOST=self.HostIPAddress
diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py
index 3e90fd6eb7..9bcfa458ba 100644
--- a/ci-scripts/cls_oaicitest.py
+++ b/ci-scripts/cls_oaicitest.py
@@ -392,7 +392,7 @@ class OaiCiTest():
 				Module_UE.GetModuleIPAddress()
 				HTML.CreateHtmlTestRow(Module_UE.UEIPAddress, 'OK', CONST.ALL_PROCESSES_OK)	
 				self.UEIPAddresses.append(Module_UE.UEIPAddress)
-		logging.debug(self.UEIPAddresses)
+		logging.debug('UEs IP addresses : '+ self.UEIPAddresses)
 
 	def InitializeOAIUE(self,HTML,RAN,EPC,COTS_UE):
 		if self.UEIPAddress == '' or self.UEUserName == '' or self.UEPassword == '' or self.UESourceCodePath == '':
@@ -957,31 +957,32 @@ class OaiCiTest():
 		except:
 			os.kill(os.getppid(),signal.SIGUSR1)
 
-	def AttachUE(self,HTML,RAN,EPC,COTS_UE):
-		if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '':
-			HELP.GenericHelp(CONST.Version)
-			sys.exit('Insufficient Parameter')
-		check_eNB = True
-		check_OAI_UE = False
-		pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC)
-		if (pStatus < 0):
-			HTML.CreateHtmlTestRow('N/A', 'KO', pStatus)
-			self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
-			return
-		multi_jobs = []
-		status_queue = SimpleQueue()
-		lock = Lock()
-		nb_ue_to_connect = 0
-		for device_id in self.UEDevices:
-			if (self.nbMaxUEtoAttach == -1) or (nb_ue_to_connect < self.nbMaxUEtoAttach):
-				self.UEDevicesStatus[nb_ue_to_connect] = CONST.UE_STATUS_ATTACHING
-				p = Process(target = self.AttachUE_common, args = (device_id, status_queue, lock,nb_ue_to_connect,COTS_UE,))
-				p.daemon = True
-				p.start()
-				multi_jobs.append(p)
-			nb_ue_to_connect = nb_ue_to_connect + 1
-		for job in multi_jobs:
-			job.join()
+	def AttachUE(self,HTML,RAN,EPC,COTS_UE,InfraUE):
+		if self.ue_id=='':#no ID specified, then it is a COTS controlled by ADB
+			if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '':
+				HELP.GenericHelp(CONST.Version)
+				sys.exit('Insufficient Parameter')
+			check_eNB = True
+			check_OAI_UE = False
+			pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC)
+			if (pStatus < 0):
+				HTML.CreateHtmlTestRow('N/A', 'KO', pStatus)
+				self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
+				return
+			multi_jobs = []
+			status_queue = SimpleQueue()
+			lock = Lock()
+			nb_ue_to_connect = 0
+			for device_id in self.UEDevices:
+				if (self.nbMaxUEtoAttach == -1) or (nb_ue_to_connect < self.nbMaxUEtoAttach):
+					self.UEDevicesStatus[nb_ue_to_connect] = CONST.UE_STATUS_ATTACHING
+					p = Process(target = self.AttachUE_common, args = (device_id, status_queue, lock,nb_ue_to_connect,COTS_UE,))
+					p.daemon = True
+					p.start()
+					multi_jobs.append(p)
+				nb_ue_to_connect = nb_ue_to_connect + 1
+			for job in multi_jobs:
+				job.join()
 
 		if (status_queue.empty()):
 			HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ALL_PROCESSES_OK)
@@ -1039,36 +1040,44 @@ class OaiCiTest():
 			os.kill(os.getppid(),signal.SIGUSR1)
 
 	def DetachUE(self,HTML,RAN,EPC,COTS_UE):
-		if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '':
-			HELP.GenericHelp(CONST.Version)
-			sys.exit('Insufficient Parameter')
-		check_eNB = True
-		check_OAI_UE = False
-		pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC)
-		if (pStatus < 0):
-			HTML.CreateHtmlTestRow('N/A', 'KO', pStatus)
-			self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
-			return
-		multi_jobs = []
-		cnt = 0
-		for device_id in self.UEDevices:
-			self.UEDevicesStatus[cnt] = CONST.UE_STATUS_DETACHING
-			p = Process(target = self.DetachUE_common, args = (device_id,cnt,COTS_UE,))
-			p.daemon = True
-			p.start()
-			multi_jobs.append(p)
-			cnt += 1
-		for job in multi_jobs:
-			job.join()
-		HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
-		result = re.search('T_stdout', str(RAN.Initialize_eNB_args))
-		if result is not None:
-			logging.debug('Waiting 5 seconds to fill up record file')
-			time.sleep(5)
-		cnt = 0
-		while cnt < len(self.UEDevices):
-			self.UEDevicesStatus[cnt] = CONST.UE_STATUS_DETACHED
-			cnt += 1
+		if self.ue_id=='':#no ID specified, then it is a COTS controlled by ADB
+			if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '':
+				HELP.GenericHelp(CONST.Version)
+				sys.exit('Insufficient Parameter')
+			check_eNB = True
+			check_OAI_UE = False
+			pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC)
+			if (pStatus < 0):
+				HTML.CreateHtmlTestRow('N/A', 'KO', pStatus)
+				self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
+				return
+			multi_jobs = []
+			cnt = 0
+			for device_id in self.UEDevices:
+				self.UEDevicesStatus[cnt] = CONST.UE_STATUS_DETACHING
+				p = Process(target = self.DetachUE_common, args = (device_id,cnt,COTS_UE,))
+				p.daemon = True
+				p.start()
+				multi_jobs.append(p)
+				cnt += 1
+			for job in multi_jobs:
+				job.join()
+			HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
+			result = re.search('T_stdout', str(RAN.Initialize_eNB_args))
+			if result is not None:
+				logging.debug('Waiting 5 seconds to fill up record file')
+				time.sleep(5)
+			cnt = 0
+			while cnt < len(self.UEDevices):
+				self.UEDevicesStatus[cnt] = CONST.UE_STATUS_DETACHED
+				cnt += 1
+		else:#if an ID is specified, it is a module from the yaml infrastructure file
+			Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id])
+			is_module=Module_UE.CheckIsModule()
+			if is_module:
+				Module_UE.Detach()
+				Module_UE.GetModuleIPAddress()
+				HTML.CreateHtmlTestRow(Module_UE.UEIPAddress, 'OK', CONST.ALL_PROCESSES_OK)			
 
 	def RebootUE_common(self, device_id):
 		try:
diff --git a/ci-scripts/main.py b/ci-scripts/main.py
index 1d6f81c820..5a26e3a5ed 100644
--- a/ci-scripts/main.py
+++ b/ci-scripts/main.py
@@ -200,6 +200,12 @@ def GetParametersFromXML(action):
 		else:
 			CiTestObj.ue_id = ue_id
 
+	elif action == 'Detach_UE':
+		ue_id = test.findtext('id')
+		if (ue_id is None):
+			CiTestObj.ue_id = ""
+		else:
+			CiTestObj.ue_id = ue_id
 
 	elif action == 'Attach_UE':
 		nbMaxUEtoAttach = test.findtext('nbMaxUEtoAttach')

From 20cd80c1a0ee085f4022eef9782811ebb7644194 Mon Sep 17 00:00:00 2001
From: Mohammed Ismail 
Date: Mon, 12 Apr 2021 12:11:02 +0200
Subject: [PATCH 134/579] CI: physim ci initial draft

Signed-off-by: Mohammed Ismail 
---
 ci-scripts/Jenkinsfile-physim-deploy       | 211 +++++++++++++++++++++
 ci-scripts/args_parse.py                   |  20 +-
 ci-scripts/cls_physim1.py                  | 196 +++++++++++++++++++
 ci-scripts/html.py                         |  19 +-
 ci-scripts/main.py                         |   5 +-
 ci-scripts/xml_class_list.yml              |   1 +
 ci-scripts/xml_files/physim_deploy_run.xml |  37 ++++
 7 files changed, 486 insertions(+), 3 deletions(-)
 create mode 100644 ci-scripts/Jenkinsfile-physim-deploy
 create mode 100644 ci-scripts/cls_physim1.py
 create mode 100644 ci-scripts/xml_files/physim_deploy_run.xml

diff --git a/ci-scripts/Jenkinsfile-physim-deploy b/ci-scripts/Jenkinsfile-physim-deploy
new file mode 100644
index 0000000000..d10754df2b
--- /dev/null
+++ b/ci-scripts/Jenkinsfile-physim-deploy
@@ -0,0 +1,211 @@
+#!/bin/groovy
+/*
+ * 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
+ */
+
+// Location of the executor node
+def pythonExecutor = params.pythonExecutor
+
+// Location of the test XML file to be run
+def testXMLFile = params.pythonTestXmlFile
+def mainPythonAllXmlFiles = ""
+def buildStageStatus = true
+
+// Name of the test stage
+def testStageName = params.pipelineTestStageName
+
+// Global Parameters. Normally they should be populated when the master job
+// triggers the slave job with parameters
+def eNB_Repository
+def eNB_Branch
+def eNB_CommitID
+def eNB_AllowMergeRequestProcess = false
+def eNB_TargetBranch
+
+// Flags
+def scmEvent = false
+def upstreamEvent = false
+
+//-------------------------------------------------------------------------------
+// Pipeline start
+pipeline {
+  agent {
+    label pythonExecutor
+  }
+  options {
+    disableConcurrentBuilds()
+    timestamps()
+    ansiColor('xterm')
+    //lock(cn_ci_resource)
+  }
+
+  stages {
+    stage ('Verify Parameters') {
+      steps {
+        script {
+          echo '\u2705 \u001B[32mVerify Parameters\u001B[0m'
+
+          JOB_TIMESTAMP = sh returnStdout: true, script: 'date --utc --rfc-3339=seconds | sed -e "s#+00:00##"'
+          JOB_TIMESTAMP = JOB_TIMESTAMP.trim()
+
+          def allParametersPresent = true
+
+          // It is already to late to check it
+          if (params.pythonExecutor != null) {
+            echo "eNB CI executor node  :   ${pythonExecutor}"
+          }
+          // If not present picking a default Stage Name
+          if (params.pipelineTestStageName == null) {
+            // picking default
+            testStageName = 'Template Test Stage'
+          }
+
+          if (params.smartphonesResource == null) {
+            allParametersPresent = false
+          }
+          if (params.eNB_IPAddress == null) {
+            allParametersPresent = false
+          }
+          if (params.eNB_SourceCodePath == null) {
+            allParametersPresent = false
+          }
+          if (params.eNB_Credentials == null) {
+            allParametersPresent = false
+          }
+          // the following 4 parameters should be pushed by the master trigger
+          // if not present, take the job GIT variables (used for developing)
+          if (params.eNB_Repository == null) {
+            eNB_Repository = env.GIT_URL
+          } else {
+            eNB_Repository = params.eNB_Repository
+          }
+          echo "eNB_Repository        :   ${eNB_Repository}"
+          if (params.eNB_Branch == null) {
+            eNB_Branch = env.GIT_BRANCH
+          } else {
+            eNB_Branch = params.eNB_Branch
+          }
+          echo "eNB_Branch            :   ${eNB_Branch}"
+          if (params.eNB_CommitID == null) {
+            eNB_CommitID = env.GIT_COMMIT
+          } else {
+            eNB_CommitID = params.eNB_CommitID
+          }
+          echo "eNB_CommitID          :   ${eNB_CommitID}"
+          if (params.eNB_mergeRequest != null) {
+            eNB_AllowMergeRequestProcess = params.eNB_mergeRequest
+            if (eNB_AllowMergeRequestProcess) {
+              if (params.eNB_TargetBranch != null) {
+                eNB_TargetBranch = params.eNB_TargetBranch
+              } else {
+                eNB_TargetBranch = 'develop'
+              }
+              echo "eNB_TargetBranch      :   ${eNB_TargetBranch}"
+            }
+          }
+
+          if (params.EPC_IPAddress == null) {
+            allParametersPresent = false
+          }
+          if (params.EPC_Type == null) {
+            allParametersPresent = false
+          }
+          if (params.EPC_SourceCodePath == null) {
+            allParametersPresent = false
+          }
+          if (params.EPC_Credentials == null) {
+            allParametersPresent = false
+          }
+
+          if (params.ADB_IPAddress == null) {
+            allParametersPresent = false
+          }
+          if (params.ADB_Credentials == null) {
+            allParametersPresent = false
+          }
+          if (params.OC_Credentials == null) {
+            allParametersPresent = false
+          }
+          if (params.OC_Workspace == null) {
+            allParametersPresent = false
+          }
+          if (allParametersPresent) {
+            echo "All parameters are present"
+            if (eNB_AllowMergeRequestProcess) {
+              sh "git fetch"
+              sh "./ci-scripts/doGitLabMerge.sh --src-branch ${eNB_Branch} --src-commit ${eNB_CommitID} --target-branch ${eNB_TargetBranch} --target-commit latest"
+            } else {
+              sh "git fetch"
+              sh "git checkout -f ${eNB_CommitID}"
+            }
+          } else {
+            echo "Some parameters are missing"
+            sh "./ci-scripts/fail.sh"
+          }
+        }
+      }
+    }
+
+    stage ("Deploy and Test") {
+      steps {
+        script {
+          dir ('ci-scripts') {
+            echo "\u2705 \u001B[32m${testStageName}\u001B[0m"
+            // If not present picking a default XML file
+            if (params.pythonTestXmlFile == null) {
+              // picking default
+              testXMLFile = 'xml_files/enb_usrpB210_band7_50PRB.xml'
+              echo "Test XML file(default):   ${testXMLFile}"
+              mainPythonAllXmlFiles += "--XMLTestFile=" + testXMLFile + " "
+            } else {
+              String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
+              for (xmlFile in myXmlTestSuite) {
+                if (fileExists(xmlFile)) {
+                  mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " "
+                  echo "Test XML file         :   ${xmlFile}"
+                }
+              }
+            }
+            withCredentials([
+              [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
+              [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'],
+              [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.ADB_Credentials}", usernameVariable: 'ADB_Username', passwordVariable: 'ADB_Password'],
+              [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.OC_Credentials}", usernameVariable: 'OC_Username', passwordVariable: 'OC_Password']
+            ]) {
+              sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} ${mainPythonAllXmlFiles}"
+              String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
+              for (xmlFile in myXmlTestSuite) {
+                if (fileExists(xmlFile)) {
+                  try {
+                    sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${ADB_Password} --OCWorkspace=${OC_Workspace}"
+                  } catch (Exception e) {
+                    currentBuild.result = 'FAILURE'
+                    buildStageStatus = false
+                  }
+                }
+              }
+              sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
+            }
+          }
+        } 
+      }
+    }
+  }
+}  
\ No newline at end of file
diff --git a/ci-scripts/args_parse.py b/ci-scripts/args_parse.py
index 288e0b4885..23da36c98f 100644
--- a/ci-scripts/args_parse.py
+++ b/ci-scripts/args_parse.py
@@ -41,7 +41,7 @@ import constants as CONST
 #-----------------------------------------------------------
 
 
-def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA):
+def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA,PHYSIM):
 
 
     py_param_file_present = False
@@ -81,6 +81,7 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA):
             ldpc.ranRepository=matchReg.group(1)
             CONTAINERS.ranRepository=matchReg.group(1)
             SCA.ranRepository=matchReg.group(1)
+            PHYSIM.ranRepository=matchReg.group(1)
         elif re.match('^\-\-eNB_AllowMerge=(.+)$|^\-\-ranAllowMerge=(.+)$', myArgv, re.IGNORECASE):
             if re.match('^\-\-eNB_AllowMerge=(.+)$', myArgv, re.IGNORECASE):
                 matchReg = re.match('^\-\-eNB_AllowMerge=(.+)$', myArgv, re.IGNORECASE)
@@ -94,6 +95,7 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA):
                 HTML.ranAllowMerge=True
                 CONTAINERS.ranAllowMerge=True
                 SCA.ranAllowMerge=True
+                PHYSIM.ranAllowMerge=True
         elif re.match('^\-\-eNBBranch=(.+)$|^\-\-ranBranch=(.+)$', myArgv, re.IGNORECASE):
             if re.match('^\-\-eNBBranch=(.+)$', myArgv, re.IGNORECASE):
                 matchReg = re.match('^\-\-eNBBranch=(.+)$', myArgv, re.IGNORECASE)
@@ -105,6 +107,7 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA):
             ldpc.ranBranch=matchReg.group(1)
             CONTAINERS.ranBranch=matchReg.group(1)
             SCA.ranBranch=matchReg.group(1)
+            PHYSIM.ranBranch=matchReg.group(1)
         elif re.match('^\-\-eNBCommitID=(.*)$|^\-\-ranCommitID=(.*)$', myArgv, re.IGNORECASE):
             if re.match('^\-\-eNBCommitID=(.*)$', myArgv, re.IGNORECASE):
                 matchReg = re.match('^\-\-eNBCommitID=(.*)$', myArgv, re.IGNORECASE)
@@ -116,6 +119,7 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA):
             ldpc.ranCommitID=matchReg.group(1)
             CONTAINERS.ranCommitID=matchReg.group(1)
             SCA.ranCommitID=matchReg.group(1)
+            PHYSIM.ranCommitID=matchReg.group(1)
         elif re.match('^\-\-eNBTargetBranch=(.*)$|^\-\-ranTargetBranch=(.*)$', myArgv, re.IGNORECASE):
             if re.match('^\-\-eNBTargetBranch=(.*)$', myArgv, re.IGNORECASE):
                 matchReg = re.match('^\-\-eNBTargetBranch=(.*)$', myArgv, re.IGNORECASE)
@@ -127,6 +131,7 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA):
             ldpc.ranTargetBranch=matchReg.group(1)
             CONTAINERS.ranTargetBranch=matchReg.group(1)
             SCA.ranTargetBranch=matchReg.group(1)
+            PHYSIM.ranTargetBranch=matchReg.group(1)
         elif re.match('^\-\-eNBIPAddress=(.+)$|^\-\-eNB[1-2]IPAddress=(.+)$', myArgv, re.IGNORECASE):
             if re.match('^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE):
                 matchReg = re.match('^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE)
@@ -134,6 +139,7 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA):
                 ldpc.eNBIpAddr=matchReg.group(1)
                 CONTAINERS.eNBIPAddress=matchReg.group(1)
                 SCA.eNBIPAddress=matchReg.group(1)
+                PHYSIM.eNBIPAddress=matchReg.group(1)
             elif re.match('^\-\-eNB1IPAddress=(.+)$', myArgv, re.IGNORECASE):
                 matchReg = re.match('^\-\-eNB1IPAddress=(.+)$', myArgv, re.IGNORECASE)
                 RAN.eNB1IPAddress=matchReg.group(1)
@@ -149,6 +155,7 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA):
                 ldpc.eNBUserName=matchReg.group(1)
                 CONTAINERS.eNBUserName=matchReg.group(1)
                 SCA.eNBUserName=matchReg.group(1)
+                PHYSIM.eNBUserName=matchReg.group(1)
             elif re.match('^\-\-eNB1UserName=(.+)$', myArgv, re.IGNORECASE):
                 matchReg = re.match('^\-\-eNB1UserName=(.+)$', myArgv, re.IGNORECASE)
                 RAN.eNB1UserName=matchReg.group(1)
@@ -164,6 +171,7 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA):
                 ldpc.eNBPassWord=matchReg.group(1)
                 CONTAINERS.eNBPassword=matchReg.group(1)
                 SCA.eNBPassword=matchReg.group(1)
+                PHYSIM.eNBPassword=matchReg.group(1)
             elif re.match('^\-\-eNB1Password=(.+)$', myArgv, re.IGNORECASE):
                 matchReg = re.match('^\-\-eNB1Password=(.+)$', myArgv, re.IGNORECASE)
                 RAN.eNB1Password=matchReg.group(1)
@@ -179,6 +187,7 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA):
                 ldpc.eNBSourceCodePath=matchReg.group(1)
                 CONTAINERS.eNBSourceCodePath=matchReg.group(1)
                 SCA.eNBSourceCodePath=matchReg.group(1)
+                PHYSIM.eNBSourceCodePath=matchReg.group(1)
             elif re.match('^\-\-eNB1SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
                 matchReg = re.match('^\-\-eNB1SourceCodePath=(.+)$', myArgv, re.IGNORECASE)
                 RAN.eNB1SourceCodePath=matchReg.group(1)
@@ -248,6 +257,15 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA):
             finalStatus = matchReg.group(1)
             if ((finalStatus == 'true') or (finalStatus == 'True')):
                 CiTestObj.finalStatus = True
+        elif re.match('^\-\-OCUserName=(.+)$', myArgv, re.IGNORECASE):
+            matchReg = re.match('^\-\-OCUserName=(.+)$', myArgv, re.IGNORECASE)
+            PHYSIM.OCUserName = matchReg.group(1)
+        elif re.match('^\-\-OCPassword=(.+)$', myArgv, re.IGNORECASE):
+            matchReg = re.match('^\-\-OCPassword=(.+)$', myArgv, re.IGNORECASE)
+            PHYSIM.OCPassWord = matchReg.group(1)
+        elif re.match('^\-\-OCWorkspace=(.+)$', myArgv, re.IGNORECASE):
+            matchReg = re.match('^\-\-OCWorkspace=(.+)$', myArgv, re.IGNORECASE)
+            PHYSIM.OCWorkspace = matchReg.group(1)
         else:
             HELP.GenericHelp(CONST.Version)
             sys.exit('Invalid Parameter: ' + myArgv)
diff --git a/ci-scripts/cls_physim1.py b/ci-scripts/cls_physim1.py
new file mode 100644
index 0000000000..b4362492c9
--- /dev/null
+++ b/ci-scripts/cls_physim1.py
@@ -0,0 +1,196 @@
+#/*
+# * 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
+# */
+#---------------------------------------------------------------------
+# Python for CI of OAI-eNB + COTS-UE
+#
+#   Required Python Version
+#     Python 3.x
+#
+#   Required Python Package
+#     pexpect
+#---------------------------------------------------------------------
+
+#-----------------------------------------------------------
+# Import
+#-----------------------------------------------------------
+import logging
+import sshconnection
+import html
+import os
+import constants as CONST
+import helpreadme as HELP
+
+class PhySim:
+	def __init__(self):
+		self.eNBIpAddr = ""
+		self.eNBUserName = ""
+		self.eNBPassword = ""
+        self.OCUserName = ""
+        self.OCPassword = ""
+        self.OCWorkspace = ""
+		self.eNBSourceCodePath = ""
+		self.ranRepository = ""
+		self.ranBranch = ""
+		self.ranCommitID= ""
+		self.ranAllowMerge= ""
+		self.ranTargetBranch= ""
+		self.exitStatus=0
+
+#-----------------$
+#PUBLIC Methods$
+#-----------------$
+
+	def Deploy_PhySim(self, HTML):
+		if self.ranRepository == '' or self.ranBranch == '' or self.ranCommitID == '':
+			HELP.GenericHelp(CONST.Version)
+			sys.exit('Insufficient Parameter')
+		lIpAddr = self.eNBIPAddress
+		lUserName = self.eNBUserName
+		lPassWord = self.eNBPassword
+		lSourcePath = self.eNBSourceCodePath
+
+		if lIpAddr == '' or lUserName == '' or lPassWord == '' or lSourcePath == '':
+			HELP.GenericHelp(CONST.Version)
+			sys.exit('Insufficient Parameter')
+		logging.debug('Building on server: ' + lIpAddr)
+		mySSH = SSH.SSHConnection()
+		mySSH.open(lIpAddr, lUserName, lPassWord)
+
+		self.testCase_id = HTML.testCase_id
+
+		# on RedHat/CentOS .git extension is mandatory
+		result = re.search('([a-zA-Z0-9\:\-\.\/])+\.git', self.ranRepository)
+		if result is not None:
+			full_ran_repo_name = self.ranRepository
+		else:
+			full_ran_repo_name = self.ranRepository + '.git'
+		mySSH.command('mkdir -p ' + lSourcePath, '\$', 5)
+		mySSH.command('cd ' + lSourcePath, '\$', 5)
+		mySSH.command('if [ ! -e .git ]; then stdbuf -o0 git clone ' + full_ran_repo_name + ' .; else stdbuf -o0 git fetch --prune; fi', '\$', 600)
+		# Raphael: here add a check if git clone or git fetch went smoothly
+		mySSH.command('git config user.email "jenkins@openairinterface.org"', '\$', 5)
+		mySSH.command('git config user.name "OAI Jenkins"', '\$', 5)
+
+		mySSH.command('echo ' + lPassWord + ' | sudo -S git clean -x -d -ff', '\$', 30)
+		mySSH.command('mkdir -p cmake_targets/log', '\$', 5)
+		# if the commit ID is provided use it to point to it
+		if self.ranCommitID != '':
+			mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 5)
+
+		mySSH.command("sudo podman image inspect --format='Size = {{.Size}} bytes' oai-physim:ci-temp", '\$', 60)
+        if mySSH.getBefore().count('no such image') != 0:
+			logging.error('\u001B[1m No such image oai-physim\u001B[0m')
+        else:
+            result = re.search('Size *= *(?P[0-9\-]+) *bytes', mySSH.getBefore())
+			if result is not None:
+				imageSize = float(result.group('size'))
+				imageSize = imageSize / 1000
+				if imageSize < 1000:
+					logging.debug('\u001B[1m   oai-physim size is ' + ('%.0f' % imageSize) + ' kbytes\u001B[0m')
+				else:
+					imageSize = imageSize / 1000
+					if imageSize < 1000:
+						logging.debug('\u001B[1m   oai-physim size is ' + ('%.0f' % imageSize) + ' Mbytes\u001B[0m')
+					else:
+						imageSize = imageSize / 1000
+						logging.debug('\u001B[1m   oai-physim is ' + ('%.3f' % imageSize) + ' Gbytes\u001B[0m')
+			else:
+				logging.debug('oai-physim size is unknown')
+
+        # logging to OC cluster
+        mySSH.command('oc login -u {self.OCUserName} -p {self.OCPassword}', '\$', 6)
+        if mySSH.getBefore().count('Login successful') == 0:
+            logging.error('\u001B[1m OC Cluster Login Failed\u001B[0m')
+        else:
+            logging.debug('\u001B[1m   Login to OC Cluster Successfully\u001B[0m')
+        mySSH.command('oc project {self.OCWorkspace}', '\$', 6)
+        if (mySSH.getBefore().count('Already on project "{self.OCWorkspace}"')) == 0 or (mySSH.getBefore().count('Now using project "{self.OCWorkspace}"')) == 0:
+            logging.error('\u001B[1m Unable to access OC project {self.OCWorkspace}\u001B[0m')
+        else:
+            logging.debug('\u001B[1m   Now using project {self.OCWorkspace}\u001B[0m')
+        
+        # Using helm charts deployment
+        mySSH.command('helm install physim ./charts/physims/', '\$', 6)
+        if mySSH.getBefore().count('STATUS: deployed') == 0:
+            logging.error('\u001B[1m Deploying PhySim Failed using helm chart\u001B[0m')
+        else:
+            logging.debug('\u001B[1m   Deployed PhySim Successfully using helm chart\u001B[0m')
+        isRunning = False
+        while(isRunning == False):
+            mySSH.command('oc get pods -l app.kubernetes.io/instance=physim', '\$', 6)
+            if mySSH.getBefore().count('Running') == 12
+                logging.debug('\u001B[1m Running the physim test Scenarios\u001B[0m')
+                isRunning = True
+                podNames = re.findall('oai[\S\d\w]+', mySSH.getBefore())
+		# Waiting to complete the running test
+        count = 0
+        isFinished = False
+        while(count < 25 or isFinished == False):
+            time.sleep(60)
+            mySSH.command('oc get pods -l app.kubernetes.io/instance=physim', '\$', 6)
+            result = re.search('oai-nr-dlsim[\S\d\w]+', mySSH.getBefore())
+            if result is not None:
+                podName1 = result.group()
+                mySSH.command('oc logs {podName1}', '\$', 6)
+                if mySSH.getBefore().count('Finished') != 0:
+                    isFinished = True
+            count += 1
+        if isFinished:
+            logging.debug('\u001B[1m PhySim test is Complete\u001B[0m')
+        
+		# Getting the logs of each executables running in individual pods
+		for podName in podNames:
+			mySSH.command('oc logs {podName} >> cmake_targets/log/physim_test.txt 2>&1', '\$', 6)
+		mySSH.command('cd ' + lSourcePath + '/cmake_targets', '\$', 5)
+		mySSH.command('mkdir -p physim_test_log_' + self.testCase_id, '\$', 5)
+		mySSH.command('mv log/* ' + 'physim_test_log_' + self.testCase_id, '\$', 5)
+		# UnDeploy the physical simulator pods
+		mySSH.command('helm uninstall physim', '\$', 10)
+		if mySSH.getBefore().count('release "physim" uninstalled') != 0
+            logging.debug('\u001B[1m UnDeployed PhySim Successfully on OC Cluster\u001B[0m')
+		else:
+			logging.debug('\u001B[1m Failed to UnDeploy PhySim on OC Cluster\u001B[0m')
+		mySSH.close()
+		mySSH.copyin(lIpAddr, lUserName, lPassWord, lSourcePath + '/cmake_targets/physim_test_log_' + self.testCase_id + '/*', '.')
+		testResult = {}
+		testCount = 0
+		if (os.path.isfile('./physim_test.txt')):
+			with open('./physim_test.txt', 'r') as logfile:
+				for line in logfile:
+					ret = re.search('execution', str(line))
+					if ret is not None:
+						testCount += 1
+						testName = line.split()
+						ret1 = re.search('Result = PASS', str(line))
+						if ret1 is not None:
+							testResult[testName[1]] = 'PASS'
+						else:
+							testResult[testName[1]] = 'FAIL'				
+		
+		HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
+		HTML.CreateHtmlTestRowPhySimTestResult(testResult)
+		logging.info('\u001B[1m Physical Simulator Pass\u001B[0m')
+
+		return 0
+
+
+            
+
diff --git a/ci-scripts/html.py b/ci-scripts/html.py
index a0ac638573..538906d5bf 100644
--- a/ci-scripts/html.py
+++ b/ci-scripts/html.py
@@ -562,5 +562,22 @@ class HTMLManagement():
 			self.htmlFile.write('        ' + str(CCR.nbWrongScanfArg[vId]) + '\n')
 			self.htmlFile.write('      \n')
 			vId += 1
+
+	def CreateHtmlTestRowPhySimTestResult(self, testResult):
+		if (self.htmlFooterCreated or (not self.htmlHeaderCreated)):
+			return
+		self.htmlFile = open('test_results.html', 'a')
+		# Tab header
+		self.htmlFile.write('      \n')
+		self.htmlFile.write('        Test Description\n')
+		self.htmlFile.write('        Result\n')
+		self.htmlFile.write('      \n')
+		for key, value in testResult.items():
+			self.htmlFile.write('      \n')
+			self.htmlFile.write('        ' + key  + ' \n')
+			if value == 'PASS':
+				self.htmlFile.write('        ' + value  + '\n')
+			else:
+				self.htmlFile.write('        ' + value  + '\n')	
             
-		self.htmlFile.close()
+		self.htmlFile.close()
\ No newline at end of file
diff --git a/ci-scripts/main.py b/ci-scripts/main.py
index f13df9beb5..da2eda446f 100644
--- a/ci-scripts/main.py
+++ b/ci-scripts/main.py
@@ -43,7 +43,7 @@ import cls_physim               #class PhySim for physical simulators build and
 import cls_cots_ue              #class CotsUe for Airplane mode control
 import cls_containerize         #class Containerize for all container-based operations on RAN/UE objects
 import cls_static_code_analysis #class for static code analysis
-
+import cls_physim1          #class PhySim for physical simulators deploy and run
 
 import sshconnection 
 import epc
@@ -380,6 +380,7 @@ RAN = ran.RANManagement()
 HTML = html.HTMLManagement()
 CONTAINERS = cls_containerize.Containerize()
 SCA = cls_static_code_analysis.StaticCodeAnalysis()
+PHYSIM = cls_physim1.PhySim()
 
 ldpc=cls_physim.PhySim()    #create an instance for LDPC test using GPU or CPU build
 
@@ -745,6 +746,8 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
 					CONTAINERS.UndeployObject(HTML, RAN)
 				elif action == 'Cppcheck_Analysis':
 					SCA.CppCheckAnalysis(HTML)
+				elif action == 'Deploy_Run_PhySim':
+					PHYSIM.Deploy_PhySim(HTML)
 				else:
 					sys.exit('Invalid class (action) from xml')
 				if not RAN.prematureExit:
diff --git a/ci-scripts/xml_class_list.yml b/ci-scripts/xml_class_list.yml
index de16116124..2282e101e5 100755
--- a/ci-scripts/xml_class_list.yml
+++ b/ci-scripts/xml_class_list.yml
@@ -38,3 +38,4 @@
   - Deploy_Object
   - Undeploy_Object
   - Cppcheck_Analysis
+  - Deploy_Run_PhySim
\ No newline at end of file
diff --git a/ci-scripts/xml_files/physim_deploy_run.xml b/ci-scripts/xml_files/physim_deploy_run.xml
new file mode 100644
index 0000000000..dc87193108
--- /dev/null
+++ b/ci-scripts/xml_files/physim_deploy_run.xml
@@ -0,0 +1,37 @@
+
+
+	build-tab
+	Physical Simulators Check
+	wrench
+	
+ 000001
+	
+	
+
+	
+		Deploy_Run_PhySim
+		Deploy and run physical simulator on openshift
+	
+
+
\ No newline at end of file

From 52442573a2db30d9475723c647d37efb3275b78f Mon Sep 17 00:00:00 2001
From: Mohammed Ismail 
Date: Mon, 12 Apr 2021 12:30:21 +0200
Subject: [PATCH 135/579] CI: syntax fix

Signed-off-by: Mohammed Ismail 
---
 ci-scripts/cls_physim1.py | 92 +++++++++++++++++++--------------------
 ci-scripts/main.py        |  2 +-
 2 files changed, 47 insertions(+), 47 deletions(-)

diff --git a/ci-scripts/cls_physim1.py b/ci-scripts/cls_physim1.py
index b4362492c9..2e81218cd4 100644
--- a/ci-scripts/cls_physim1.py
+++ b/ci-scripts/cls_physim1.py
@@ -43,9 +43,9 @@ class PhySim:
 		self.eNBIpAddr = ""
 		self.eNBUserName = ""
 		self.eNBPassword = ""
-        self.OCUserName = ""
-        self.OCPassword = ""
-        self.OCWorkspace = ""
+		self.OCUserName = ""
+		self.OCPassword = ""
+		self.OCWorkspace = ""
 		self.eNBSourceCodePath = ""
 		self.ranRepository = ""
 		self.ranBranch = ""
@@ -96,10 +96,10 @@ class PhySim:
 			mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 5)
 
 		mySSH.command("sudo podman image inspect --format='Size = {{.Size}} bytes' oai-physim:ci-temp", '\$', 60)
-        if mySSH.getBefore().count('no such image') != 0:
+		if mySSH.getBefore().count('no such image') != 0:
 			logging.error('\u001B[1m No such image oai-physim\u001B[0m')
-        else:
-            result = re.search('Size *= *(?P[0-9\-]+) *bytes', mySSH.getBefore())
+		else:
+			result = re.search('Size *= *(?P[0-9\-]+) *bytes', mySSH.getBefore())
 			if result is not None:
 				imageSize = float(result.group('size'))
 				imageSize = imageSize / 1000
@@ -115,46 +115,46 @@ class PhySim:
 			else:
 				logging.debug('oai-physim size is unknown')
 
-        # logging to OC cluster
-        mySSH.command('oc login -u {self.OCUserName} -p {self.OCPassword}', '\$', 6)
-        if mySSH.getBefore().count('Login successful') == 0:
-            logging.error('\u001B[1m OC Cluster Login Failed\u001B[0m')
-        else:
-            logging.debug('\u001B[1m   Login to OC Cluster Successfully\u001B[0m')
-        mySSH.command('oc project {self.OCWorkspace}', '\$', 6)
-        if (mySSH.getBefore().count('Already on project "{self.OCWorkspace}"')) == 0 or (mySSH.getBefore().count('Now using project "{self.OCWorkspace}"')) == 0:
-            logging.error('\u001B[1m Unable to access OC project {self.OCWorkspace}\u001B[0m')
-        else:
-            logging.debug('\u001B[1m   Now using project {self.OCWorkspace}\u001B[0m')
+		# logging to OC cluster
+		mySSH.command('oc login -u {self.OCUserName} -p {self.OCPassword}', '\$', 6)
+		if mySSH.getBefore().count('Login successful') == 0:
+			logging.error('\u001B[1m OC Cluster Login Failed\u001B[0m')
+		else:
+			logging.debug('\u001B[1m   Login to OC Cluster Successfully\u001B[0m')
+		mySSH.command('oc project {self.OCWorkspace}', '\$', 6)
+		if (mySSH.getBefore().count('Already on project "{self.OCWorkspace}"')) == 0 or (mySSH.getBefore().count('Now using project "{self.OCWorkspace}"')) == 0:
+			logging.error('\u001B[1m Unable to access OC project {self.OCWorkspace}\u001B[0m')
+		else:
+			logging.debug('\u001B[1m   Now using project {self.OCWorkspace}\u001B[0m')
         
-        # Using helm charts deployment
-        mySSH.command('helm install physim ./charts/physims/', '\$', 6)
-        if mySSH.getBefore().count('STATUS: deployed') == 0:
-            logging.error('\u001B[1m Deploying PhySim Failed using helm chart\u001B[0m')
-        else:
-            logging.debug('\u001B[1m   Deployed PhySim Successfully using helm chart\u001B[0m')
-        isRunning = False
-        while(isRunning == False):
-            mySSH.command('oc get pods -l app.kubernetes.io/instance=physim', '\$', 6)
-            if mySSH.getBefore().count('Running') == 12
-                logging.debug('\u001B[1m Running the physim test Scenarios\u001B[0m')
-                isRunning = True
-                podNames = re.findall('oai[\S\d\w]+', mySSH.getBefore())
+		# Using helm charts deployment
+		mySSH.command('helm install physim ./charts/physims/', '\$', 6)
+		if mySSH.getBefore().count('STATUS: deployed') == 0:
+			logging.error('\u001B[1m Deploying PhySim Failed using helm chart\u001B[0m')
+		else:
+			logging.debug('\u001B[1m   Deployed PhySim Successfully using helm chart\u001B[0m')
+		isRunning = False
+		while(isRunning == False):
+			mySSH.command('oc get pods -l app.kubernetes.io/instance=physim', '\$', 6)
+			if mySSH.getBefore().count('Running') == 12:
+				logging.debug('\u001B[1m Running the physim test Scenarios\u001B[0m')
+				isRunning = True
+				podNames = re.findall('oai[\S\d\w]+', mySSH.getBefore())
 		# Waiting to complete the running test
-        count = 0
-        isFinished = False
-        while(count < 25 or isFinished == False):
-            time.sleep(60)
-            mySSH.command('oc get pods -l app.kubernetes.io/instance=physim', '\$', 6)
-            result = re.search('oai-nr-dlsim[\S\d\w]+', mySSH.getBefore())
-            if result is not None:
-                podName1 = result.group()
-                mySSH.command('oc logs {podName1}', '\$', 6)
-                if mySSH.getBefore().count('Finished') != 0:
-                    isFinished = True
-            count += 1
-        if isFinished:
-            logging.debug('\u001B[1m PhySim test is Complete\u001B[0m')
+		count = 0
+		isFinished = False
+		while(count < 25 or isFinished == False):
+			time.sleep(60)
+			mySSH.command('oc get pods -l app.kubernetes.io/instance=physim', '\$', 6)
+			result = re.search('oai-nr-dlsim[\S\d\w]+', mySSH.getBefore())
+			if result is not None:
+				podName1 = result.group()
+				mySSH.command('oc logs {podName1}', '\$', 6)
+				if mySSH.getBefore().count('Finished') != 0:
+					isFinished = True
+			count += 1
+		if isFinished:
+			logging.debug('\u001B[1m PhySim test is Complete\u001B[0m')
         
 		# Getting the logs of each executables running in individual pods
 		for podName in podNames:
@@ -164,8 +164,8 @@ class PhySim:
 		mySSH.command('mv log/* ' + 'physim_test_log_' + self.testCase_id, '\$', 5)
 		# UnDeploy the physical simulator pods
 		mySSH.command('helm uninstall physim', '\$', 10)
-		if mySSH.getBefore().count('release "physim" uninstalled') != 0
-            logging.debug('\u001B[1m UnDeployed PhySim Successfully on OC Cluster\u001B[0m')
+		if mySSH.getBefore().count('release "physim" uninstalled') != 0:
+			logging.debug('\u001B[1m UnDeployed PhySim Successfully on OC Cluster\u001B[0m')
 		else:
 			logging.debug('\u001B[1m Failed to UnDeploy PhySim on OC Cluster\u001B[0m')
 		mySSH.close()
diff --git a/ci-scripts/main.py b/ci-scripts/main.py
index da2eda446f..961bb16975 100644
--- a/ci-scripts/main.py
+++ b/ci-scripts/main.py
@@ -391,7 +391,7 @@ ldpc=cls_physim.PhySim()    #create an instance for LDPC test using GPU or CPU b
 #-----------------------------------------------------------
 
 import args_parse
-py_param_file_present, py_params, mode = args_parse.ArgsParse(sys.argv,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA)
+py_param_file_present, py_params, mode = args_parse.ArgsParse(sys.argv,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA,PHYSIM)
 
 
 

From 3a3a3efcd916a45ad8507081e9ff2a225bbc31a4 Mon Sep 17 00:00:00 2001
From: Mohammed Ismail 
Date: Mon, 12 Apr 2021 12:45:39 +0200
Subject: [PATCH 136/579] CI: missing parameters added

Signed-off-by: Mohammed Ismail 
---
 ci-scripts/cls_physim1.py | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/ci-scripts/cls_physim1.py b/ci-scripts/cls_physim1.py
index 2e81218cd4..ff3d6ed0c0 100644
--- a/ci-scripts/cls_physim1.py
+++ b/ci-scripts/cls_physim1.py
@@ -32,9 +32,12 @@
 # Import
 #-----------------------------------------------------------
 import logging
-import sshconnection
+import sshconnection as SSH
 import html
 import os
+import re
+import time
+import sys
 import constants as CONST
 import helpreadme as HELP
 
@@ -98,6 +101,7 @@ class PhySim:
 		mySSH.command("sudo podman image inspect --format='Size = {{.Size}} bytes' oai-physim:ci-temp", '\$', 60)
 		if mySSH.getBefore().count('no such image') != 0:
 			logging.error('\u001B[1m No such image oai-physim\u001B[0m')
+			sys.exit(-1)
 		else:
 			result = re.search('Size *= *(?P[0-9\-]+) *bytes', mySSH.getBefore())
 			if result is not None:
@@ -117,13 +121,15 @@ class PhySim:
 
 		# logging to OC cluster
 		mySSH.command('oc login -u {self.OCUserName} -p {self.OCPassword}', '\$', 6)
-		if mySSH.getBefore().count('Login successful') == 0:
+		if mySSH.getBefore().count('Login successful.') == 0:
 			logging.error('\u001B[1m OC Cluster Login Failed\u001B[0m')
+			sys.exit(-1)
 		else:
 			logging.debug('\u001B[1m   Login to OC Cluster Successfully\u001B[0m')
 		mySSH.command('oc project {self.OCWorkspace}', '\$', 6)
 		if (mySSH.getBefore().count('Already on project "{self.OCWorkspace}"')) == 0 or (mySSH.getBefore().count('Now using project "{self.OCWorkspace}"')) == 0:
 			logging.error('\u001B[1m Unable to access OC project {self.OCWorkspace}\u001B[0m')
+			sys.exit(-1)
 		else:
 			logging.debug('\u001B[1m   Now using project {self.OCWorkspace}\u001B[0m')
         
@@ -131,6 +137,7 @@ class PhySim:
 		mySSH.command('helm install physim ./charts/physims/', '\$', 6)
 		if mySSH.getBefore().count('STATUS: deployed') == 0:
 			logging.error('\u001B[1m Deploying PhySim Failed using helm chart\u001B[0m')
+			sys.exit(-1)
 		else:
 			logging.debug('\u001B[1m   Deployed PhySim Successfully using helm chart\u001B[0m')
 		isRunning = False

From 075ebd9eb47abf76d45ea2f291dcdbda11014790 Mon Sep 17 00:00:00 2001
From: Mohammed Ismail 
Date: Mon, 12 Apr 2021 13:41:45 +0200
Subject: [PATCH 137/579] CI: print oc login output

Signed-off-by: Mohammed Ismail 
---
 ci-scripts/cls_physim1.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ci-scripts/cls_physim1.py b/ci-scripts/cls_physim1.py
index ff3d6ed0c0..dd32c0a246 100644
--- a/ci-scripts/cls_physim1.py
+++ b/ci-scripts/cls_physim1.py
@@ -121,6 +121,7 @@ class PhySim:
 
 		# logging to OC cluster
 		mySSH.command('oc login -u {self.OCUserName} -p {self.OCPassword}', '\$', 6)
+		print(mySSH.getBefore())
 		if mySSH.getBefore().count('Login successful.') == 0:
 			logging.error('\u001B[1m OC Cluster Login Failed\u001B[0m')
 			sys.exit(-1)

From 5013180a299d9d969f031a19f6e4a20443e11348 Mon Sep 17 00:00:00 2001
From: Mohammed Ismail 
Date: Mon, 12 Apr 2021 13:54:39 +0200
Subject: [PATCH 138/579] CI: error fix

Signed-off-by: Mohammed Ismail 
---
 ci-scripts/cls_physim1.py | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/ci-scripts/cls_physim1.py b/ci-scripts/cls_physim1.py
index dd32c0a246..a2c8ec87e4 100644
--- a/ci-scripts/cls_physim1.py
+++ b/ci-scripts/cls_physim1.py
@@ -120,19 +120,19 @@ class PhySim:
 				logging.debug('oai-physim size is unknown')
 
 		# logging to OC cluster
-		mySSH.command('oc login -u {self.OCUserName} -p {self.OCPassword}', '\$', 6)
+		mySSH.command(f'oc login -u {self.OCUserName} -p {self.OCPassword}', '\$', 6)
 		print(mySSH.getBefore())
 		if mySSH.getBefore().count('Login successful.') == 0:
 			logging.error('\u001B[1m OC Cluster Login Failed\u001B[0m')
 			sys.exit(-1)
 		else:
 			logging.debug('\u001B[1m   Login to OC Cluster Successfully\u001B[0m')
-		mySSH.command('oc project {self.OCWorkspace}', '\$', 6)
-		if (mySSH.getBefore().count('Already on project "{self.OCWorkspace}"')) == 0 or (mySSH.getBefore().count('Now using project "{self.OCWorkspace}"')) == 0:
-			logging.error('\u001B[1m Unable to access OC project {self.OCWorkspace}\u001B[0m')
+		mySSH.command(f'oc project {self.OCWorkspace}', '\$', 6)
+		if (mySSH.getBefore().count(f'Already on project "{self.OCWorkspace}"')) == 0 or (mySSH.getBefore().count(f'Now using project "{self.OCWorkspace}"')) == 0:
+			logging.error(f'\u001B[1m Unable to access OC project {self.OCWorkspace}\u001B[0m')
 			sys.exit(-1)
 		else:
-			logging.debug('\u001B[1m   Now using project {self.OCWorkspace}\u001B[0m')
+			logging.debug(f'\u001B[1m   Now using project {self.OCWorkspace}\u001B[0m')
         
 		# Using helm charts deployment
 		mySSH.command('helm install physim ./charts/physims/', '\$', 6)
@@ -157,7 +157,7 @@ class PhySim:
 			result = re.search('oai-nr-dlsim[\S\d\w]+', mySSH.getBefore())
 			if result is not None:
 				podName1 = result.group()
-				mySSH.command('oc logs {podName1}', '\$', 6)
+				mySSH.command(f'oc logs {podName1}', '\$', 6)
 				if mySSH.getBefore().count('Finished') != 0:
 					isFinished = True
 			count += 1
@@ -166,7 +166,7 @@ class PhySim:
         
 		# Getting the logs of each executables running in individual pods
 		for podName in podNames:
-			mySSH.command('oc logs {podName} >> cmake_targets/log/physim_test.txt 2>&1', '\$', 6)
+			mySSH.command(f'oc logs {podName} >> cmake_targets/log/physim_test.txt 2>&1', '\$', 6)
 		mySSH.command('cd ' + lSourcePath + '/cmake_targets', '\$', 5)
 		mySSH.command('mkdir -p physim_test_log_' + self.testCase_id, '\$', 5)
 		mySSH.command('mv log/* ' + 'physim_test_log_' + self.testCase_id, '\$', 5)

From 8af044e35bd2b21c4b7da28455ceda63f41ba482 Mon Sep 17 00:00:00 2001
From: Mohammed Ismail 
Date: Mon, 12 Apr 2021 14:04:43 +0200
Subject: [PATCH 139/579] CI: parameters changes

Signed-off-by: Mohammed Ismail 
---
 ci-scripts/Jenkinsfile-physim-deploy |  2 +-
 ci-scripts/args_parse.py             |  2 +-
 ci-scripts/cls_physim1.py            | 15 +++++++++------
 3 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/ci-scripts/Jenkinsfile-physim-deploy b/ci-scripts/Jenkinsfile-physim-deploy
index d10754df2b..a6ad112b23 100644
--- a/ci-scripts/Jenkinsfile-physim-deploy
+++ b/ci-scripts/Jenkinsfile-physim-deploy
@@ -194,7 +194,7 @@ pipeline {
               for (xmlFile in myXmlTestSuite) {
                 if (fileExists(xmlFile)) {
                   try {
-                    sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${ADB_Password} --OCWorkspace=${OC_Workspace}"
+                    sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCWorkspace=${OC_Workspace}"
                   } catch (Exception e) {
                     currentBuild.result = 'FAILURE'
                     buildStageStatus = false
diff --git a/ci-scripts/args_parse.py b/ci-scripts/args_parse.py
index 23da36c98f..ae7a509fb4 100644
--- a/ci-scripts/args_parse.py
+++ b/ci-scripts/args_parse.py
@@ -262,7 +262,7 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA,PHYSIM):
             PHYSIM.OCUserName = matchReg.group(1)
         elif re.match('^\-\-OCPassword=(.+)$', myArgv, re.IGNORECASE):
             matchReg = re.match('^\-\-OCPassword=(.+)$', myArgv, re.IGNORECASE)
-            PHYSIM.OCPassWord = matchReg.group(1)
+            PHYSIM.OCPassword = matchReg.group(1)
         elif re.match('^\-\-OCWorkspace=(.+)$', myArgv, re.IGNORECASE):
             matchReg = re.match('^\-\-OCWorkspace=(.+)$', myArgv, re.IGNORECASE)
             PHYSIM.OCWorkspace = matchReg.group(1)
diff --git a/ci-scripts/cls_physim1.py b/ci-scripts/cls_physim1.py
index a2c8ec87e4..841136c011 100644
--- a/ci-scripts/cls_physim1.py
+++ b/ci-scripts/cls_physim1.py
@@ -69,8 +69,11 @@ class PhySim:
 		lUserName = self.eNBUserName
 		lPassWord = self.eNBPassword
 		lSourcePath = self.eNBSourceCodePath
+		ocUserName = self.OCUserName
+		ocPassword = self.OCPassword
+		ocWorkspace = self.OCWorkspace
 
-		if lIpAddr == '' or lUserName == '' or lPassWord == '' or lSourcePath == '':
+		if lIpAddr == '' or lUserName == '' or lPassWord == '' or lSourcePath == '' or ocUserName == '' or ocPassword == '' or ocWorkspace == '':
 			HELP.GenericHelp(CONST.Version)
 			sys.exit('Insufficient Parameter')
 		logging.debug('Building on server: ' + lIpAddr)
@@ -120,19 +123,19 @@ class PhySim:
 				logging.debug('oai-physim size is unknown')
 
 		# logging to OC cluster
-		mySSH.command(f'oc login -u {self.OCUserName} -p {self.OCPassword}', '\$', 6)
+		mySSH.command(f'oc login -u {ocUserName} -p {ocPassword}', '\$', 6)
 		print(mySSH.getBefore())
 		if mySSH.getBefore().count('Login successful.') == 0:
 			logging.error('\u001B[1m OC Cluster Login Failed\u001B[0m')
 			sys.exit(-1)
 		else:
 			logging.debug('\u001B[1m   Login to OC Cluster Successfully\u001B[0m')
-		mySSH.command(f'oc project {self.OCWorkspace}', '\$', 6)
-		if (mySSH.getBefore().count(f'Already on project "{self.OCWorkspace}"')) == 0 or (mySSH.getBefore().count(f'Now using project "{self.OCWorkspace}"')) == 0:
-			logging.error(f'\u001B[1m Unable to access OC project {self.OCWorkspace}\u001B[0m')
+		mySSH.command(f'oc project {ocWorkspace}', '\$', 6)
+		if mySSH.getBefore().count(f'Already on project "{ocWorkspace}"') == 0 or mySSH.getBefore().count(f'Now using project "{self.OCWorkspace}"') == 0:
+			logging.error(f'\u001B[1m Unable to access OC project {ocWorkspace}\u001B[0m')
 			sys.exit(-1)
 		else:
-			logging.debug(f'\u001B[1m   Now using project {self.OCWorkspace}\u001B[0m')
+			logging.debug(f'\u001B[1m   Now using project {ocWorkspace}\u001B[0m')
         
 		# Using helm charts deployment
 		mySSH.command('helm install physim ./charts/physims/', '\$', 6)

From 367d23c726038bb5402a2d5ebc5708ba24cef421 Mon Sep 17 00:00:00 2001
From: Mohammed Ismail 
Date: Mon, 12 Apr 2021 14:26:56 +0200
Subject: [PATCH 140/579] CI: error correction

Signed-off-by: Mohammed Ismail 
---
 ci-scripts/cls_physim1.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ci-scripts/cls_physim1.py b/ci-scripts/cls_physim1.py
index 841136c011..69e5f030cc 100644
--- a/ci-scripts/cls_physim1.py
+++ b/ci-scripts/cls_physim1.py
@@ -131,7 +131,7 @@ class PhySim:
 		else:
 			logging.debug('\u001B[1m   Login to OC Cluster Successfully\u001B[0m')
 		mySSH.command(f'oc project {ocWorkspace}', '\$', 6)
-		if mySSH.getBefore().count(f'Already on project "{ocWorkspace}"') == 0 or mySSH.getBefore().count(f'Now using project "{self.OCWorkspace}"') == 0:
+		if mySSH.getBefore().count(f'Already on project "{ocWorkspace}"') == 0 and mySSH.getBefore().count(f'Now using project "{self.OCWorkspace}"') == 0:
 			logging.error(f'\u001B[1m Unable to access OC project {ocWorkspace}\u001B[0m')
 			sys.exit(-1)
 		else:

From 1450bc598e51c7a4a00652c116d8101637e7414b Mon Sep 17 00:00:00 2001
From: Mohammed Ismail 
Date: Mon, 12 Apr 2021 14:35:52 +0200
Subject: [PATCH 141/579] CI: helm charts for physim

Signed-off-by: Mohammed Ismail 
---
 charts/physims/Chart.yaml                     |  35 ++++
 charts/physims/charts/dlsim/Chart.yaml        |  36 ++++
 .../physims/charts/dlsim/templates/NOTES.txt  |  15 ++
 .../charts/dlsim/templates/_helpers.tpl       |  63 +++++++
 .../charts/dlsim/templates/deployment.yaml    |  49 ++++++
 .../charts/dlsim/templates/service.yaml       |  20 +++
 charts/physims/charts/dlsim/values.yaml       |  63 +++++++
 charts/physims/charts/ldpctest/Chart.yaml     |  36 ++++
 .../charts/ldpctest/templates/NOTES.txt       |  15 ++
 .../charts/ldpctest/templates/_helpers.tpl    |  63 +++++++
 .../charts/ldpctest/templates/deployment.yaml |  49 ++++++
 .../charts/ldpctest/templates/service.yaml    |  20 +++
 charts/physims/charts/ldpctest/values.yaml    |  63 +++++++
 charts/physims/charts/nr-dlschsim/Chart.yaml  |  36 ++++
 .../charts/nr-dlschsim/templates/NOTES.txt    |  15 ++
 .../charts/nr-dlschsim/templates/_helpers.tpl |  63 +++++++
 .../nr-dlschsim/templates/deployment.yaml     |  48 ++++++
 .../charts/nr-dlschsim/templates/service.yaml |  20 +++
 charts/physims/charts/nr-dlschsim/values.yaml |  63 +++++++
 charts/physims/charts/nr-dlsim/Chart.yaml     |  36 ++++
 .../charts/nr-dlsim/templates/NOTES.txt       |  15 ++
 .../charts/nr-dlsim/templates/_helpers.tpl    |  63 +++++++
 .../charts/nr-dlsim/templates/deployment.yaml |  49 ++++++
 .../charts/nr-dlsim/templates/service.yaml    |  20 +++
 charts/physims/charts/nr-dlsim/values.yaml    |  63 +++++++
 charts/physims/charts/nr-pbchsim/Chart.yaml   |  36 ++++
 .../charts/nr-pbchsim/templates/NOTES.txt     |  15 ++
 .../charts/nr-pbchsim/templates/_helpers.tpl  |  63 +++++++
 .../nr-pbchsim/templates/deployment.yaml      |  49 ++++++
 .../charts/nr-pbchsim/templates/service.yaml  |  20 +++
 charts/physims/charts/nr-pbchsim/values.yaml  |  63 +++++++
 charts/physims/charts/nr-prachsim/Chart.yaml  |  36 ++++
 .../charts/nr-prachsim/templates/NOTES.txt    |  15 ++
 .../charts/nr-prachsim/templates/_helpers.tpl |  63 +++++++
 .../nr-prachsim/templates/deployment.yaml     |  49 ++++++
 .../charts/nr-prachsim/templates/service.yaml |  20 +++
 charts/physims/charts/nr-prachsim/values.yaml |  63 +++++++
 charts/physims/charts/nr-pucchsim/Chart.yaml  |  36 ++++
 .../charts/nr-pucchsim/templates/NOTES.txt    |  15 ++
 .../charts/nr-pucchsim/templates/_helpers.tpl |  63 +++++++
 .../nr-pucchsim/templates/deployment.yaml     |  49 ++++++
 .../charts/nr-pucchsim/templates/service.yaml |  20 +++
 charts/physims/charts/nr-pucchsim/values.yaml |  63 +++++++
 charts/physims/charts/nr-ulschsim/Chart.yaml  |  36 ++++
 .../charts/nr-ulschsim/templates/NOTES.txt    |  15 ++
 .../charts/nr-ulschsim/templates/_helpers.tpl |  63 +++++++
 .../nr-ulschsim/templates/deployment.yaml     |  49 ++++++
 .../charts/nr-ulschsim/templates/service.yaml |  20 +++
 charts/physims/charts/nr-ulschsim/values.yaml |  63 +++++++
 charts/physims/charts/nr-ulsim/Chart.yaml     |  36 ++++
 .../charts/nr-ulsim/templates/NOTES.txt       |  15 ++
 .../charts/nr-ulsim/templates/_helpers.tpl    |  63 +++++++
 .../charts/nr-ulsim/templates/deployment.yaml |  49 ++++++
 .../charts/nr-ulsim/templates/service.yaml    |  20 +++
 charts/physims/charts/nr-ulsim/values.yaml    |  63 +++++++
 charts/physims/charts/polartest/Chart.yaml    |  36 ++++
 .../charts/polartest/templates/NOTES.txt      |  15 ++
 .../charts/polartest/templates/_helpers.tpl   |  63 +++++++
 .../polartest/templates/deployment.yaml       |  49 ++++++
 .../charts/polartest/templates/service.yaml   |  20 +++
 charts/physims/charts/polartest/values.yaml   |  63 +++++++
 .../physims/charts/smallblocktest/Chart.yaml  |  36 ++++
 .../charts/smallblocktest/templates/NOTES.txt |  15 ++
 .../smallblocktest/templates/_helpers.tpl     |  63 +++++++
 .../smallblocktest/templates/deployment.yaml  |  49 ++++++
 .../smallblocktest/templates/service.yaml     |  20 +++
 .../physims/charts/smallblocktest/values.yaml |  63 +++++++
 charts/physims/charts/ulsim/Chart.yaml        |  36 ++++
 .../physims/charts/ulsim/templates/NOTES.txt  |  15 ++
 .../charts/ulsim/templates/_helpers.tpl       |  63 +++++++
 .../charts/ulsim/templates/deployment.yaml    |  49 ++++++
 .../charts/ulsim/templates/service.yaml       |  20 +++
 charts/physims/charts/ulsim/values.yaml       |  63 +++++++
 charts/physims/templates/rbac.yaml            |  12 ++
 charts/physims/templates/serviceaccount.yaml  |   4 +
 charts/physims/values.yaml                    | 154 ++++++++++++++++++
 76 files changed, 3156 insertions(+)
 create mode 100644 charts/physims/Chart.yaml
 create mode 100644 charts/physims/charts/dlsim/Chart.yaml
 create mode 100644 charts/physims/charts/dlsim/templates/NOTES.txt
 create mode 100644 charts/physims/charts/dlsim/templates/_helpers.tpl
 create mode 100644 charts/physims/charts/dlsim/templates/deployment.yaml
 create mode 100644 charts/physims/charts/dlsim/templates/service.yaml
 create mode 100644 charts/physims/charts/dlsim/values.yaml
 create mode 100644 charts/physims/charts/ldpctest/Chart.yaml
 create mode 100644 charts/physims/charts/ldpctest/templates/NOTES.txt
 create mode 100644 charts/physims/charts/ldpctest/templates/_helpers.tpl
 create mode 100644 charts/physims/charts/ldpctest/templates/deployment.yaml
 create mode 100644 charts/physims/charts/ldpctest/templates/service.yaml
 create mode 100644 charts/physims/charts/ldpctest/values.yaml
 create mode 100644 charts/physims/charts/nr-dlschsim/Chart.yaml
 create mode 100644 charts/physims/charts/nr-dlschsim/templates/NOTES.txt
 create mode 100644 charts/physims/charts/nr-dlschsim/templates/_helpers.tpl
 create mode 100644 charts/physims/charts/nr-dlschsim/templates/deployment.yaml
 create mode 100644 charts/physims/charts/nr-dlschsim/templates/service.yaml
 create mode 100644 charts/physims/charts/nr-dlschsim/values.yaml
 create mode 100644 charts/physims/charts/nr-dlsim/Chart.yaml
 create mode 100644 charts/physims/charts/nr-dlsim/templates/NOTES.txt
 create mode 100644 charts/physims/charts/nr-dlsim/templates/_helpers.tpl
 create mode 100644 charts/physims/charts/nr-dlsim/templates/deployment.yaml
 create mode 100644 charts/physims/charts/nr-dlsim/templates/service.yaml
 create mode 100644 charts/physims/charts/nr-dlsim/values.yaml
 create mode 100644 charts/physims/charts/nr-pbchsim/Chart.yaml
 create mode 100644 charts/physims/charts/nr-pbchsim/templates/NOTES.txt
 create mode 100644 charts/physims/charts/nr-pbchsim/templates/_helpers.tpl
 create mode 100644 charts/physims/charts/nr-pbchsim/templates/deployment.yaml
 create mode 100644 charts/physims/charts/nr-pbchsim/templates/service.yaml
 create mode 100644 charts/physims/charts/nr-pbchsim/values.yaml
 create mode 100644 charts/physims/charts/nr-prachsim/Chart.yaml
 create mode 100644 charts/physims/charts/nr-prachsim/templates/NOTES.txt
 create mode 100644 charts/physims/charts/nr-prachsim/templates/_helpers.tpl
 create mode 100644 charts/physims/charts/nr-prachsim/templates/deployment.yaml
 create mode 100644 charts/physims/charts/nr-prachsim/templates/service.yaml
 create mode 100644 charts/physims/charts/nr-prachsim/values.yaml
 create mode 100644 charts/physims/charts/nr-pucchsim/Chart.yaml
 create mode 100644 charts/physims/charts/nr-pucchsim/templates/NOTES.txt
 create mode 100644 charts/physims/charts/nr-pucchsim/templates/_helpers.tpl
 create mode 100644 charts/physims/charts/nr-pucchsim/templates/deployment.yaml
 create mode 100644 charts/physims/charts/nr-pucchsim/templates/service.yaml
 create mode 100644 charts/physims/charts/nr-pucchsim/values.yaml
 create mode 100644 charts/physims/charts/nr-ulschsim/Chart.yaml
 create mode 100644 charts/physims/charts/nr-ulschsim/templates/NOTES.txt
 create mode 100644 charts/physims/charts/nr-ulschsim/templates/_helpers.tpl
 create mode 100644 charts/physims/charts/nr-ulschsim/templates/deployment.yaml
 create mode 100644 charts/physims/charts/nr-ulschsim/templates/service.yaml
 create mode 100644 charts/physims/charts/nr-ulschsim/values.yaml
 create mode 100644 charts/physims/charts/nr-ulsim/Chart.yaml
 create mode 100644 charts/physims/charts/nr-ulsim/templates/NOTES.txt
 create mode 100644 charts/physims/charts/nr-ulsim/templates/_helpers.tpl
 create mode 100644 charts/physims/charts/nr-ulsim/templates/deployment.yaml
 create mode 100644 charts/physims/charts/nr-ulsim/templates/service.yaml
 create mode 100644 charts/physims/charts/nr-ulsim/values.yaml
 create mode 100644 charts/physims/charts/polartest/Chart.yaml
 create mode 100644 charts/physims/charts/polartest/templates/NOTES.txt
 create mode 100644 charts/physims/charts/polartest/templates/_helpers.tpl
 create mode 100644 charts/physims/charts/polartest/templates/deployment.yaml
 create mode 100644 charts/physims/charts/polartest/templates/service.yaml
 create mode 100644 charts/physims/charts/polartest/values.yaml
 create mode 100644 charts/physims/charts/smallblocktest/Chart.yaml
 create mode 100644 charts/physims/charts/smallblocktest/templates/NOTES.txt
 create mode 100644 charts/physims/charts/smallblocktest/templates/_helpers.tpl
 create mode 100644 charts/physims/charts/smallblocktest/templates/deployment.yaml
 create mode 100644 charts/physims/charts/smallblocktest/templates/service.yaml
 create mode 100644 charts/physims/charts/smallblocktest/values.yaml
 create mode 100644 charts/physims/charts/ulsim/Chart.yaml
 create mode 100644 charts/physims/charts/ulsim/templates/NOTES.txt
 create mode 100644 charts/physims/charts/ulsim/templates/_helpers.tpl
 create mode 100644 charts/physims/charts/ulsim/templates/deployment.yaml
 create mode 100644 charts/physims/charts/ulsim/templates/service.yaml
 create mode 100644 charts/physims/charts/ulsim/values.yaml
 create mode 100644 charts/physims/templates/rbac.yaml
 create mode 100644 charts/physims/templates/serviceaccount.yaml
 create mode 100644 charts/physims/values.yaml

diff --git a/charts/physims/Chart.yaml b/charts/physims/Chart.yaml
new file mode 100644
index 0000000000..0d7a5b98cc
--- /dev/null
+++ b/charts/physims/Chart.yaml
@@ -0,0 +1,35 @@
+apiVersion: v1
+name: oai-physim
+description: A Helm chart for physical simulators network function
+
+# A chart can be either an 'application' or a 'library' chart.
+#
+# Application charts are a collection of templates that can be packaged into versioned archives
+# to be deployed.
+#
+# Library charts provide useful utilities or functions for the chart developer. They're included as
+# a dependency of application charts to inject those utilities and functions into the rendering
+# pipeline. Library charts do not define any templates and therefore cannot be deployed.
+type: application
+
+icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
+
+# This is the chart version. This version number should be incremented each time you make changes
+# to the chart and its templates, including the app version.
+version: 0.1.1
+
+# This is the version number of the application being deployed. This version number should be
+# incremented each time you make changes to the application.
+appVersion: v1
+
+keywords:
+  - Physical Simulators
+  - RAN
+  - 4G
+
+sources:
+  - https://gitlab.eurecom.fr/oai/openairinterface5g
+
+maintainers:
+  - name:  OPENAIRINTERFACE
+    email: contact@openairinterface.org
diff --git a/charts/physims/charts/dlsim/Chart.yaml b/charts/physims/charts/dlsim/Chart.yaml
new file mode 100644
index 0000000000..de7f5958b2
--- /dev/null
+++ b/charts/physims/charts/dlsim/Chart.yaml
@@ -0,0 +1,36 @@
+apiVersion: v1
+name: oai-dlsim
+description: A Helm subchart for dlsim network function
+
+# A chart can be either an 'application' or a 'library' chart.
+#
+# Application charts are a collection of templates that can be packaged into versioned archives
+# to be deployed.
+#
+# Library charts provide useful utilities or functions for the chart developer. They're included as
+# a dependency of application charts to inject those utilities and functions into the rendering
+# pipeline. Library charts do not define any templates and therefore cannot be deployed.
+type: application
+
+icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
+
+# This is the chart version. This version number should be incremented each time you make changes
+# to the chart and its templates, including the app version.
+version: 0.1.1
+
+# This is the version number of the application being deployed. This version number should be
+# incremented each time you make changes to the application.
+appVersion: v1
+
+keywords:
+  - Physical Simulator
+  - dlsim
+  - RAN
+  - 4G
+
+sources:
+  - https://gitlab.eurecom.fr/oai/openairinterface5g
+
+maintainers:
+  - name:  OPENAIRINTERFACE
+    email: contact@openairinterface.org
diff --git a/charts/physims/charts/dlsim/templates/NOTES.txt b/charts/physims/charts/dlsim/templates/NOTES.txt
new file mode 100644
index 0000000000..75b79e3dd4
--- /dev/null
+++ b/charts/physims/charts/dlsim/templates/NOTES.txt
@@ -0,0 +1,15 @@
+1. Get the application URL by running these commands:
+{{- if contains "NodePort" .Values.service.type }}
+  export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "oai-dlsim.fullname" . }})
+  export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
+  echo http://$NODE_IP:$NODE_PORT
+{{- else if contains "LoadBalancer" .Values.service.type }}
+     NOTE: It may take a few minutes for the LoadBalancer IP to be available.
+           You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "oai-dlsim.fullname" . }}'
+  export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "oai-dlsim.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
+  echo http://$SERVICE_IP:{{ .Values.service.port }}
+{{- else if contains "ClusterIP" .Values.service.type }}
+  export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-dlsim.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
+  echo "Visit http://127.0.0.1:8080 to use your application"
+  kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80
+{{- end }}
diff --git a/charts/physims/charts/dlsim/templates/_helpers.tpl b/charts/physims/charts/dlsim/templates/_helpers.tpl
new file mode 100644
index 0000000000..7ae142b671
--- /dev/null
+++ b/charts/physims/charts/dlsim/templates/_helpers.tpl
@@ -0,0 +1,63 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "oai-dlsim.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "oai-dlsim.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "oai-dlsim.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Common labels
+*/}}
+{{- define "oai-dlsim.labels" -}}
+helm.sh/chart: {{ include "oai-dlsim.chart" . }}
+{{ include "oai-dlsim.selectorLabels" . }}
+{{- if .Chart.AppVersion }}
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+{{- end }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end -}}
+
+{{/*
+Selector labels
+*/}}
+{{- define "oai-dlsim.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "oai-dlsim.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end -}}
+
+{{/*
+Create the name of the service account to use
+*/}}
+{{- define "oai-dlsim.serviceAccountName" -}}
+{{- if .Values.serviceAccount.create -}}
+    {{ default (include "oai-dlsim.fullname" .) .Values.serviceAccount.name }}
+{{- else -}}
+    {{ default "default" .Values.serviceAccount.name }}
+{{- end -}}
+{{- end -}}
diff --git a/charts/physims/charts/dlsim/templates/deployment.yaml b/charts/physims/charts/dlsim/templates/deployment.yaml
new file mode 100644
index 0000000000..a8ec990e9d
--- /dev/null
+++ b/charts/physims/charts/dlsim/templates/deployment.yaml
@@ -0,0 +1,49 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: {{ .Chart.Name }}
+  labels:
+    {{- include "oai-dlsim.labels" . | nindent 4 }}
+spec:
+  replicas: {{ .Values.replicaCount }}
+  selector:
+    matchLabels:
+      {{- include "oai-dlsim.selectorLabels" . | nindent 6 }}
+  strategy:
+    type: Recreate
+  template:
+    metadata:
+      labels:
+        {{- include "oai-dlsim.selectorLabels" . | nindent 8 }}
+    spec:
+      securityContext:
+        {{- toYaml .Values.podSecurityContext | nindent 8 }}
+    {{- if .Values.imagePullSecrets }}
+      imagePullSecrets:
+        {{- toYaml . | nindent 8 }}
+    {{- end }}
+      containers:
+      - name: physim
+        image: "{{ .Values.image.repository }}:{{ .Values.image.version }}"
+        imagePullPolicy: {{ .Values.image.pullPolicy }}
+        securityContext:
+          {{- toYaml .Values.securityContext | nindent 12 }}
+        ports:
+        - containerPort: 80
+          name: oai-dlsim
+        # volumeMounts:
+        # - mountPath: /opt/oai-dlsim/certs
+        #   name: certs
+        command: ["/bin/sh", "-c"]
+        args:
+        - >  
+          export OPENAIR_DIR=/opt/oai-physim &&
+          cd cmake_targets/autotests &&
+          ./run_exec_autotests.bash -g "015100" -q -np -b &&
+          echo "FINISHED" &&
+          sleep infinity
+      dnsPolicy: ClusterFirst
+      restartPolicy: Always
+      schedulerName: default-scheduler
+      serviceAccountName: {{ .Values.global.serviceAccountName }}
+      terminationGracePeriodSeconds: 30
diff --git a/charts/physims/charts/dlsim/templates/service.yaml b/charts/physims/charts/dlsim/templates/service.yaml
new file mode 100644
index 0000000000..6aeb0dbf53
--- /dev/null
+++ b/charts/physims/charts/dlsim/templates/service.yaml
@@ -0,0 +1,20 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ .Chart.Name }}
+  labels:
+    {{- include "oai-dlsim.labels" . | nindent 4 }}
+spec:
+  type: {{ .Values.service.type }}
+{{- if  contains "ClusterIP" .Values.service.type }}
+  clusterIP: None
+{{- end }}
+  ports:
+    - name: oai-dlsim
+      # Port accessible outside cluster
+      port: {{ .Values.service.port }}
+      # Port to forward to inside the pod
+      targetPort: {{ .Values.service.Port }}
+      protocol: TCP
+  selector:
+    {{- include "oai-dlsim.selectorLabels" . | nindent 4 }}
diff --git a/charts/physims/charts/dlsim/values.yaml b/charts/physims/charts/dlsim/values.yaml
new file mode 100644
index 0000000000..c0142b50ae
--- /dev/null
+++ b/charts/physims/charts/dlsim/values.yaml
@@ -0,0 +1,63 @@
+# Default values for oai-dlsim.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+replicaCount: 1
+
+namespace: "oaicicd-ran-tmp"
+
+image:
+  registry: local
+  repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
+  version: temp
+  # pullPolicy: IfNotPresent or Never or Always
+  pullPolicy: Always
+
+imagePullSecrets: []
+
+nameOverride: ""
+fullnameOverride: ""
+
+serviceAccount:
+  # Specifies whether a service account should be created
+  create: true
+  # Annotations to add to the service account
+  annotations: {}
+  # The name of the service account to use.
+  # If not set and create is true, a name is generated using the fullname template
+  name: "oai-dlsim-sa"
+
+podSecurityContext:
+  runAsUser: 0
+  runAsGroup: 0
+
+securityContext:
+  privileged: true
+  # capabilities:
+  #   drop:
+  #   - ALL
+  # readOnlyRootFilesystem: true
+  # runAsNonRoot: true
+  # runAsUser: 1000
+
+service:
+  type: ClusterIP
+  port: 80
+
+resources: {}
+  # We usually recommend not to specify default resources and to leave this as a conscious
+  # choice for the user. This also increases chances charts run on environments with little
+  # resources, such as Minikube. If you do want to specify resources, uncomment the following
+  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+  # limits:
+  #   cpu: 100m
+  #   memory: 128Mi
+  # requests:
+  #   cpu: 100m
+  #   memory: 128Mi
+
+nodeSelector: {}
+
+tolerations: []
+
+affinity: {}
diff --git a/charts/physims/charts/ldpctest/Chart.yaml b/charts/physims/charts/ldpctest/Chart.yaml
new file mode 100644
index 0000000000..48d8108ac5
--- /dev/null
+++ b/charts/physims/charts/ldpctest/Chart.yaml
@@ -0,0 +1,36 @@
+apiVersion: v1
+name: oai-ldpctest
+description: A Helm subchart for ldpctest network function
+
+# A chart can be either an 'application' or a 'library' chart.
+#
+# Application charts are a collection of templates that can be packaged into versioned archives
+# to be deployed.
+#
+# Library charts provide useful utilities or functions for the chart developer. They're included as
+# a dependency of application charts to inject those utilities and functions into the rendering
+# pipeline. Library charts do not define any templates and therefore cannot be deployed.
+type: application
+
+icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
+
+# This is the chart version. This version number should be incremented each time you make changes
+# to the chart and its templates, including the app version.
+version: 0.1.1
+
+# This is the version number of the application being deployed. This version number should be
+# incremented each time you make changes to the application.
+appVersion: v1
+
+keywords:
+  - Physical Simulator
+  - ldpctest
+  - RAN
+  - 4G
+
+sources:
+  - https://gitlab.eurecom.fr/oai/openairinterface5g
+
+maintainers:
+  - name:  OPENAIRINTERFACE
+    email: contact@openairinterface.org
diff --git a/charts/physims/charts/ldpctest/templates/NOTES.txt b/charts/physims/charts/ldpctest/templates/NOTES.txt
new file mode 100644
index 0000000000..bda83c2f9e
--- /dev/null
+++ b/charts/physims/charts/ldpctest/templates/NOTES.txt
@@ -0,0 +1,15 @@
+1. Get the application URL by running these commands:
+{{- if contains "NodePort" .Values.service.type }}
+  export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "oai-ldpctest.fullname" . }})
+  export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
+  echo http://$NODE_IP:$NODE_PORT
+{{- else if contains "LoadBalancer" .Values.service.type }}
+     NOTE: It may take a few minutes for the LoadBalancer IP to be available.
+           You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "oai-ldpctest.fullname" . }}'
+  export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "oai-ldpctest.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
+  echo http://$SERVICE_IP:{{ .Values.service.port }}
+{{- else if contains "ClusterIP" .Values.service.type }}
+  export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-ldpctest.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
+  echo "Visit http://127.0.0.1:8080 to use your application"
+  kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80
+{{- end }}
diff --git a/charts/physims/charts/ldpctest/templates/_helpers.tpl b/charts/physims/charts/ldpctest/templates/_helpers.tpl
new file mode 100644
index 0000000000..018eaa5af5
--- /dev/null
+++ b/charts/physims/charts/ldpctest/templates/_helpers.tpl
@@ -0,0 +1,63 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "oai-ldpctest.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "oai-ldpctest.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "oai-ldpctest.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Common labels
+*/}}
+{{- define "oai-ldpctest.labels" -}}
+helm.sh/chart: {{ include "oai-ldpctest.chart" . }}
+{{ include "oai-ldpctest.selectorLabels" . }}
+{{- if .Chart.AppVersion }}
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+{{- end }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end -}}
+
+{{/*
+Selector labels
+*/}}
+{{- define "oai-ldpctest.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "oai-ldpctest.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end -}}
+
+{{/*
+Create the name of the service account to use
+*/}}
+{{- define "oai-ldpctest.serviceAccountName" -}}
+{{- if .Values.serviceAccount.create -}}
+    {{ default (include "oai-ldpctest.fullname" .) .Values.serviceAccount.name }}
+{{- else -}}
+    {{ default "default" .Values.serviceAccount.name }}
+{{- end -}}
+{{- end -}}
diff --git a/charts/physims/charts/ldpctest/templates/deployment.yaml b/charts/physims/charts/ldpctest/templates/deployment.yaml
new file mode 100644
index 0000000000..be4306eb4f
--- /dev/null
+++ b/charts/physims/charts/ldpctest/templates/deployment.yaml
@@ -0,0 +1,49 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: {{ .Chart.Name }}
+  labels:
+    {{- include "oai-ldpctest.labels" . | nindent 4 }}
+spec:
+  replicas: {{ .Values.replicaCount }}
+  selector:
+    matchLabels:
+      {{- include "oai-ldpctest.selectorLabels" . | nindent 6 }}
+  strategy:
+    type: Recreate
+  template:
+    metadata:
+      labels:
+        {{- include "oai-ldpctest.selectorLabels" . | nindent 8 }}
+    spec:
+      securityContext:
+        {{- toYaml .Values.podSecurityContext | nindent 8 }}
+    {{- if .Values.imagePullSecrets }}
+      imagePullSecrets:
+        {{- toYaml . | nindent 8 }}
+    {{- end }}
+      containers:
+      - name: physim
+        image: "{{ .Values.image.repository }}:{{ .Values.image.version }}"
+        imagePullPolicy: {{ .Values.image.pullPolicy }}
+        securityContext:
+          {{- toYaml .Values.securityContext | nindent 12 }}
+        ports:
+        - containerPort: 80
+          name: oai-ldpctest
+        # volumeMounts:
+        # - mountPath: /opt/oai-ldpctest/certs
+        #   name: certs
+        command: ["/bin/sh", "-c"]
+        args:
+        - >  
+          export OPENAIR_DIR=/opt/oai-physim &&
+          cd cmake_targets/autotests &&
+          ./run_exec_autotests.bash -g "015102" -q -np -b &&
+          echo "FINISHED" &&
+          sleep infinity
+      dnsPolicy: ClusterFirst
+      restartPolicy: Always
+      schedulerName: default-scheduler
+      serviceAccountName: {{ .Values.global.serviceAccountName }}
+      terminationGracePeriodSeconds: 30
diff --git a/charts/physims/charts/ldpctest/templates/service.yaml b/charts/physims/charts/ldpctest/templates/service.yaml
new file mode 100644
index 0000000000..eb0db8ce00
--- /dev/null
+++ b/charts/physims/charts/ldpctest/templates/service.yaml
@@ -0,0 +1,20 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ .Chart.Name }}
+  labels:
+    {{- include "oai-ldpctest.labels" . | nindent 4 }}
+spec:
+  type: {{ .Values.service.type }}
+{{- if  contains "ClusterIP" .Values.service.type }}
+  clusterIP: None
+{{- end }}
+  ports:
+    - name: oai-ldpctest
+      # Port accessible outside cluster
+      port: {{ .Values.service.port }}
+      # Port to forward to inside the pod
+      targetPort: {{ .Values.service.Port }}
+      protocol: TCP
+  selector:
+    {{- include "oai-ldpctest.selectorLabels" . | nindent 4 }}
diff --git a/charts/physims/charts/ldpctest/values.yaml b/charts/physims/charts/ldpctest/values.yaml
new file mode 100644
index 0000000000..91eab91af5
--- /dev/null
+++ b/charts/physims/charts/ldpctest/values.yaml
@@ -0,0 +1,63 @@
+# Default values for oai-ldpctest.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+replicaCount: 1
+
+namespace: "oaicicd-ran-tmp"
+
+image:
+  registry: local
+  repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
+  version: temp
+  # pullPolicy: IfNotPresent or Never or Always
+  pullPolicy: Always
+
+imagePullSecrets: []
+
+nameOverride: ""
+fullnameOverride: ""
+
+serviceAccount:
+  # Specifies whether a service account should be created
+  create: true
+  # Annotations to add to the service account
+  annotations: {}
+  # The name of the service account to use.
+  # If not set and create is true, a name is generated using the fullname template
+  name: "oai-ldpctest-sa"
+
+podSecurityContext:
+  runAsUser: 0
+  runAsGroup: 0
+
+securityContext:
+  privileged: true
+  # capabilities:
+  #   drop:
+  #   - ALL
+  # readOnlyRootFilesystem: true
+  # runAsNonRoot: true
+  # runAsUser: 1000
+
+service:
+  type: ClusterIP
+  port: 80
+
+resources: {}
+  # We usually recommend not to specify default resources and to leave this as a conscious
+  # choice for the user. This also increases chances charts run on environments with little
+  # resources, such as Minikube. If you do want to specify resources, uncomment the following
+  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+  # limits:
+  #   cpu: 100m
+  #   memory: 128Mi
+  # requests:
+  #   cpu: 100m
+  #   memory: 128Mi
+
+nodeSelector: {}
+
+tolerations: []
+
+affinity: {}
diff --git a/charts/physims/charts/nr-dlschsim/Chart.yaml b/charts/physims/charts/nr-dlschsim/Chart.yaml
new file mode 100644
index 0000000000..b029c79f7b
--- /dev/null
+++ b/charts/physims/charts/nr-dlschsim/Chart.yaml
@@ -0,0 +1,36 @@
+apiVersion: v1
+name: oai-nr-dlschsim
+description: A Helm subchart for nr-dlschsim network function
+
+# A chart can be either an 'application' or a 'library' chart.
+#
+# Application charts are a collection of templates that can be packaged into versioned archives
+# to be deployed.
+#
+# Library charts provide useful utilities or functions for the chart developer. They're included as
+# a dependency of application charts to inject those utilities and functions into the rendering
+# pipeline. Library charts do not define any templates and therefore cannot be deployed.
+type: application
+
+icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
+
+# This is the chart version. This version number should be incremented each time you make changes
+# to the chart and its templates, including the app version.
+version: 0.1.1
+
+# This is the version number of the application being deployed. This version number should be
+# incremented each time you make changes to the application.
+appVersion: v1
+
+keywords:
+  - Physical Simulator
+  - nr-dlschsim
+  - RAN
+  - 4G
+
+sources:
+  - https://gitlab.eurecom.fr/oai/openairinterface5g
+
+maintainers:
+  - name:  OPENAIRINTERFACE
+    email: contact@openairinterface.org
diff --git a/charts/physims/charts/nr-dlschsim/templates/NOTES.txt b/charts/physims/charts/nr-dlschsim/templates/NOTES.txt
new file mode 100644
index 0000000000..1f88d64976
--- /dev/null
+++ b/charts/physims/charts/nr-dlschsim/templates/NOTES.txt
@@ -0,0 +1,15 @@
+1. Get the application URL by running these commands:
+{{- if contains "NodePort" .Values.service.type }}
+  export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "oai-nr-dlschsim.fullname" . }})
+  export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
+  echo http://$NODE_IP:$NODE_PORT
+{{- else if contains "LoadBalancer" .Values.service.type }}
+     NOTE: It may take a few minutes for the LoadBalancer IP to be available.
+           You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "oai-nr-dlschsim.fullname" . }}'
+  export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "oai-nr-dlschsim.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
+  echo http://$SERVICE_IP:{{ .Values.service.port }}
+{{- else if contains "ClusterIP" .Values.service.type }}
+  export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-nr-dlschsim.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
+  echo "Visit http://127.0.0.1:8080 to use your application"
+  kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80
+{{- end }}
diff --git a/charts/physims/charts/nr-dlschsim/templates/_helpers.tpl b/charts/physims/charts/nr-dlschsim/templates/_helpers.tpl
new file mode 100644
index 0000000000..6b6a5181e9
--- /dev/null
+++ b/charts/physims/charts/nr-dlschsim/templates/_helpers.tpl
@@ -0,0 +1,63 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "oai-nr-dlschsim.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "oai-nr-dlschsim.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "oai-nr-dlschsim.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Common labels
+*/}}
+{{- define "oai-nr-dlschsim.labels" -}}
+helm.sh/chart: {{ include "oai-nr-dlschsim.chart" . }}
+{{ include "oai-nr-dlschsim.selectorLabels" . }}
+{{- if .Chart.AppVersion }}
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+{{- end }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end -}}
+
+{{/*
+Selector labels
+*/}}
+{{- define "oai-nr-dlschsim.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "oai-nr-dlschsim.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end -}}
+
+{{/*
+Create the name of the service account to use
+*/}}
+{{- define "oai-nr-dlschsim.serviceAccountName" -}}
+{{- if .Values.serviceAccount.create -}}
+    {{ default (include "oai-nr-dlschsim.fullname" .) .Values.serviceAccount.name }}
+{{- else -}}
+    {{ default "default" .Values.serviceAccount.name }}
+{{- end -}}
+{{- end -}}
diff --git a/charts/physims/charts/nr-dlschsim/templates/deployment.yaml b/charts/physims/charts/nr-dlschsim/templates/deployment.yaml
new file mode 100644
index 0000000000..a07b8ecfd4
--- /dev/null
+++ b/charts/physims/charts/nr-dlschsim/templates/deployment.yaml
@@ -0,0 +1,48 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: {{ .Chart.Name }}
+  labels:
+    {{- include "oai-nr-dlschsim.labels" . | nindent 4 }}
+spec:
+  replicas: {{ .Values.replicaCount }}
+  selector:
+    matchLabels:
+      {{- include "oai-nr-dlschsim.selectorLabels" . | nindent 6 }}
+  strategy:
+    type: Recreate
+  template:
+    metadata:
+      labels:
+        {{- include "oai-nr-dlschsim.selectorLabels" . | nindent 8 }}
+    spec:
+      securityContext:
+        {{- toYaml .Values.podSecurityContext | nindent 8 }}
+    {{- if .Values.imagePullSecrets }}
+      imagePullSecrets:
+        {{- toYaml . | nindent 8 }}
+    {{- end }}
+      containers:
+      - name: physim
+        image: "{{ .Values.image.repository }}:{{ .Values.image.version }}"
+        imagePullPolicy: {{ .Values.image.pullPolicy }}
+        securityContext:
+          {{- toYaml .Values.securityContext | nindent 12 }}
+        ports:
+        - containerPort: 80
+          name: oai-nr-dlschsim
+        # volumeMounts:
+        # - mountPath: /opt/oai-nr-dlschsim/certs
+        #   name: certs
+        command: ["/bin/sh", "-c"]
+        args:
+        - >  
+          export OPENAIR_DIR=/opt/oai-physim &&
+          cd cmake_targets/autotests &&
+          ./run_exec_autotests.bash -g "015106" -q -np -b &&
+          sleep infinity
+      dnsPolicy: ClusterFirst
+      restartPolicy: Always
+      schedulerName: default-scheduler
+      serviceAccountName: {{ .Values.global.serviceAccountName }}
+      terminationGracePeriodSeconds: 30
diff --git a/charts/physims/charts/nr-dlschsim/templates/service.yaml b/charts/physims/charts/nr-dlschsim/templates/service.yaml
new file mode 100644
index 0000000000..0dd065c9e0
--- /dev/null
+++ b/charts/physims/charts/nr-dlschsim/templates/service.yaml
@@ -0,0 +1,20 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ .Chart.Name }}
+  labels:
+    {{- include "oai-nr-dlschsim.labels" . | nindent 4 }}
+spec:
+  type: {{ .Values.service.type }}
+{{- if  contains "ClusterIP" .Values.service.type }}
+  clusterIP: None
+{{- end }}
+  ports:
+    - name: oai-nr-dlschsim
+      # Port accessible outside cluster
+      port: {{ .Values.service.port }}
+      # Port to forward to inside the pod
+      targetPort: {{ .Values.service.Port }}
+      protocol: TCP
+  selector:
+    {{- include "oai-nr-dlschsim.selectorLabels" . | nindent 4 }}
diff --git a/charts/physims/charts/nr-dlschsim/values.yaml b/charts/physims/charts/nr-dlschsim/values.yaml
new file mode 100644
index 0000000000..e96541102c
--- /dev/null
+++ b/charts/physims/charts/nr-dlschsim/values.yaml
@@ -0,0 +1,63 @@
+# Default values for oai-nr-dlschsim.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+replicaCount: 1
+
+namespace: "oaicicd-ran-tmp"
+
+image:
+  registry: local
+  repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
+  version: temp
+  # pullPolicy: IfNotPresent or Never or Always
+  pullPolicy: Always
+
+imagePullSecrets: []
+
+nameOverride: ""
+fullnameOverride: ""
+
+serviceAccount:
+  # Specifies whether a service account should be created
+  create: true
+  # Annotations to add to the service account
+  annotations: {}
+  # The name of the service account to use.
+  # If not set and create is true, a name is generated using the fullname template
+  name: "oai-nr-dlschsim-sa"
+
+podSecurityContext:
+  runAsUser: 0
+  runAsGroup: 0
+
+securityContext:
+  privileged: true
+  # capabilities:
+  #   drop:
+  #   - ALL
+  # readOnlyRootFilesystem: true
+  # runAsNonRoot: true
+  # runAsUser: 1000
+
+service:
+  type: ClusterIP
+  port: 80
+
+resources: {}
+  # We usually recommend not to specify default resources and to leave this as a conscious
+  # choice for the user. This also increases chances charts run on environments with little
+  # resources, such as Minikube. If you do want to specify resources, uncomment the following
+  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+  # limits:
+  #   cpu: 100m
+  #   memory: 128Mi
+  # requests:
+  #   cpu: 100m
+  #   memory: 128Mi
+
+nodeSelector: {}
+
+tolerations: []
+
+affinity: {}
diff --git a/charts/physims/charts/nr-dlsim/Chart.yaml b/charts/physims/charts/nr-dlsim/Chart.yaml
new file mode 100644
index 0000000000..5de3c37ab2
--- /dev/null
+++ b/charts/physims/charts/nr-dlsim/Chart.yaml
@@ -0,0 +1,36 @@
+apiVersion: v1
+name: oai-nr-dlsim
+description: A Helm subchart for nr-dlsim network function
+
+# A chart can be either an 'application' or a 'library' chart.
+#
+# Application charts are a collection of templates that can be packaged into versioned archives
+# to be deployed.
+#
+# Library charts provide useful utilities or functions for the chart developer. They're included as
+# a dependency of application charts to inject those utilities and functions into the rendering
+# pipeline. Library charts do not define any templates and therefore cannot be deployed.
+type: application
+
+icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
+
+# This is the chart version. This version number should be incremented each time you make changes
+# to the chart and its templates, including the app version.
+version: 0.1.1
+
+# This is the version number of the application being deployed. This version number should be
+# incremented each time you make changes to the application.
+appVersion: v1
+
+keywords:
+  - Physical Simulator
+  - nr-dlsim
+  - RAN
+  - 4G
+
+sources:
+  - https://gitlab.eurecom.fr/oai/openairinterface5g
+
+maintainers:
+  - name:  OPENAIRINTERFACE
+    email: contact@openairinterface.org
diff --git a/charts/physims/charts/nr-dlsim/templates/NOTES.txt b/charts/physims/charts/nr-dlsim/templates/NOTES.txt
new file mode 100644
index 0000000000..79027454cf
--- /dev/null
+++ b/charts/physims/charts/nr-dlsim/templates/NOTES.txt
@@ -0,0 +1,15 @@
+1. Get the application URL by running these commands:
+{{- if contains "NodePort" .Values.service.type }}
+  export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "oai-nr-dlsim.fullname" . }})
+  export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
+  echo http://$NODE_IP:$NODE_PORT
+{{- else if contains "LoadBalancer" .Values.service.type }}
+     NOTE: It may take a few minutes for the LoadBalancer IP to be available.
+           You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "oai-nr-dlsim.fullname" . }}'
+  export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "oai-nr-dlsim.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
+  echo http://$SERVICE_IP:{{ .Values.service.port }}
+{{- else if contains "ClusterIP" .Values.service.type }}
+  export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-nr-dlsim.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
+  echo "Visit http://127.0.0.1:8080 to use your application"
+  kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80
+{{- end }}
diff --git a/charts/physims/charts/nr-dlsim/templates/_helpers.tpl b/charts/physims/charts/nr-dlsim/templates/_helpers.tpl
new file mode 100644
index 0000000000..1dd7fbd3fd
--- /dev/null
+++ b/charts/physims/charts/nr-dlsim/templates/_helpers.tpl
@@ -0,0 +1,63 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "oai-nr-dlsim.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "oai-nr-dlsim.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "oai-nr-dlsim.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Common labels
+*/}}
+{{- define "oai-nr-dlsim.labels" -}}
+helm.sh/chart: {{ include "oai-nr-dlsim.chart" . }}
+{{ include "oai-nr-dlsim.selectorLabels" . }}
+{{- if .Chart.AppVersion }}
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+{{- end }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end -}}
+
+{{/*
+Selector labels
+*/}}
+{{- define "oai-nr-dlsim.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "oai-nr-dlsim.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end -}}
+
+{{/*
+Create the name of the service account to use
+*/}}
+{{- define "oai-nr-dlsim.serviceAccountName" -}}
+{{- if .Values.serviceAccount.create -}}
+    {{ default (include "oai-nr-dlsim.fullname" .) .Values.serviceAccount.name }}
+{{- else -}}
+    {{ default "default" .Values.serviceAccount.name }}
+{{- end -}}
+{{- end -}}
diff --git a/charts/physims/charts/nr-dlsim/templates/deployment.yaml b/charts/physims/charts/nr-dlsim/templates/deployment.yaml
new file mode 100644
index 0000000000..3d5b495d40
--- /dev/null
+++ b/charts/physims/charts/nr-dlsim/templates/deployment.yaml
@@ -0,0 +1,49 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: {{ .Chart.Name }}
+  labels:
+    {{- include "oai-nr-dlsim.labels" . | nindent 4 }}
+spec:
+  replicas: {{ .Values.replicaCount }}
+  selector:
+    matchLabels:
+      {{- include "oai-nr-dlsim.selectorLabels" . | nindent 6 }}
+  strategy:
+    type: Recreate
+  template:
+    metadata:
+      labels:
+        {{- include "oai-nr-dlsim.selectorLabels" . | nindent 8 }}
+    spec:
+      securityContext:
+        {{- toYaml .Values.podSecurityContext | nindent 8 }}
+    {{- if .Values.imagePullSecrets }}
+      imagePullSecrets:
+        {{- toYaml . | nindent 8 }}
+    {{- end }}
+      containers:
+      - name: physim
+        image: "{{ .Values.image.repository }}:{{ .Values.image.version }}"
+        imagePullPolicy: {{ .Values.image.pullPolicy }}
+        securityContext:
+          {{- toYaml .Values.securityContext | nindent 12 }}
+        ports:
+        - containerPort: 80
+          name: oai-nr-dlsim
+        # volumeMounts:
+        # - mountPath: /opt/oai-nr-dlsim/certs
+        #   name: certs
+        command: ["/bin/sh", "-c"]
+        args:
+        - >  
+          export OPENAIR_DIR=/opt/oai-physim &&
+          cd cmake_targets/autotests &&
+          ./run_exec_autotests.bash -g "015105" -q -np -b &&
+          echo "FINISHED" &&
+          sleep infinity
+      dnsPolicy: ClusterFirst
+      restartPolicy: Always
+      schedulerName: default-scheduler
+      serviceAccountName: {{ .Values.global.serviceAccountName }}
+      terminationGracePeriodSeconds: 30
diff --git a/charts/physims/charts/nr-dlsim/templates/service.yaml b/charts/physims/charts/nr-dlsim/templates/service.yaml
new file mode 100644
index 0000000000..c58433f3b2
--- /dev/null
+++ b/charts/physims/charts/nr-dlsim/templates/service.yaml
@@ -0,0 +1,20 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ .Chart.Name }}
+  labels:
+    {{- include "oai-nr-dlsim.labels" . | nindent 4 }}
+spec:
+  type: {{ .Values.service.type }}
+{{- if  contains "ClusterIP" .Values.service.type }}
+  clusterIP: None
+{{- end }}
+  ports:
+    - name: oai-nr-dlsim
+      # Port accessible outside cluster
+      port: {{ .Values.service.port }}
+      # Port to forward to inside the pod
+      targetPort: {{ .Values.service.Port }}
+      protocol: TCP
+  selector:
+    {{- include "oai-nr-dlsim.selectorLabels" . | nindent 4 }}
diff --git a/charts/physims/charts/nr-dlsim/values.yaml b/charts/physims/charts/nr-dlsim/values.yaml
new file mode 100644
index 0000000000..c86fc96cff
--- /dev/null
+++ b/charts/physims/charts/nr-dlsim/values.yaml
@@ -0,0 +1,63 @@
+# Default values for oai-nr-dlsim.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+replicaCount: 1
+
+namespace: "oaicicd-ran-tmp"
+
+image:
+  registry: local
+  repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
+  version: temp
+  # pullPolicy: IfNotPresent or Never or Always
+  pullPolicy: Always
+
+imagePullSecrets: []
+
+nameOverride: ""
+fullnameOverride: ""
+
+serviceAccount:
+  # Specifies whether a service account should be created
+  create: true
+  # Annotations to add to the service account
+  annotations: {}
+  # The name of the service account to use.
+  # If not set and create is true, a name is generated using the fullname template
+  name: "oai-nr-dlsim-sa"
+
+podSecurityContext:
+  runAsUser: 0
+  runAsGroup: 0
+
+securityContext:
+  privileged: true
+  # capabilities:
+  #   drop:
+  #   - ALL
+  # readOnlyRootFilesystem: true
+  # runAsNonRoot: true
+  # runAsUser: 1000
+
+service:
+  type: ClusterIP
+  port: 80
+
+resources: {}
+  # We usually recommend not to specify default resources and to leave this as a conscious
+  # choice for the user. This also increases chances charts run on environments with little
+  # resources, such as Minikube. If you do want to specify resources, uncomment the following
+  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+  # limits:
+  #   cpu: 100m
+  #   memory: 128Mi
+  # requests:
+  #   cpu: 100m
+  #   memory: 128Mi
+
+nodeSelector: {}
+
+tolerations: []
+
+affinity: {}
diff --git a/charts/physims/charts/nr-pbchsim/Chart.yaml b/charts/physims/charts/nr-pbchsim/Chart.yaml
new file mode 100644
index 0000000000..4012180e5f
--- /dev/null
+++ b/charts/physims/charts/nr-pbchsim/Chart.yaml
@@ -0,0 +1,36 @@
+apiVersion: v1
+name: oai-nr-pbchsim
+description: A Helm subchart for nr-pbchsim network function
+
+# A chart can be either an 'application' or a 'library' chart.
+#
+# Application charts are a collection of templates that can be packaged into versioned archives
+# to be deployed.
+#
+# Library charts provide useful utilities or functions for the chart developer. They're included as
+# a dependency of application charts to inject those utilities and functions into the rendering
+# pipeline. Library charts do not define any templates and therefore cannot be deployed.
+type: application
+
+icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
+
+# This is the chart version. This version number should be incremented each time you make changes
+# to the chart and its templates, including the app version.
+version: 0.1.1
+
+# This is the version number of the application being deployed. This version number should be
+# incremented each time you make changes to the application.
+appVersion: v1
+
+keywords:
+  - Physical Simulator
+  - nr-pbchsim
+  - RAN
+  - 4G
+
+sources:
+  - https://gitlab.eurecom.fr/oai/openairinterface5g
+
+maintainers:
+  - name:  OPENAIRINTERFACE
+    email: contact@openairinterface.org
diff --git a/charts/physims/charts/nr-pbchsim/templates/NOTES.txt b/charts/physims/charts/nr-pbchsim/templates/NOTES.txt
new file mode 100644
index 0000000000..cee233d4f3
--- /dev/null
+++ b/charts/physims/charts/nr-pbchsim/templates/NOTES.txt
@@ -0,0 +1,15 @@
+1. Get the application URL by running these commands:
+{{- if contains "NodePort" .Values.service.type }}
+  export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "oai-nr-pbchsim.fullname" . }})
+  export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
+  echo http://$NODE_IP:$NODE_PORT
+{{- else if contains "LoadBalancer" .Values.service.type }}
+     NOTE: It may take a few minutes for the LoadBalancer IP to be available.
+           You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "oai-nr-pbchsim.fullname" . }}'
+  export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "oai-nr-pbchsim.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
+  echo http://$SERVICE_IP:{{ .Values.service.port }}
+{{- else if contains "ClusterIP" .Values.service.type }}
+  export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-nr-pbchsim.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
+  echo "Visit http://127.0.0.1:8080 to use your application"
+  kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80
+{{- end }}
diff --git a/charts/physims/charts/nr-pbchsim/templates/_helpers.tpl b/charts/physims/charts/nr-pbchsim/templates/_helpers.tpl
new file mode 100644
index 0000000000..0e31033343
--- /dev/null
+++ b/charts/physims/charts/nr-pbchsim/templates/_helpers.tpl
@@ -0,0 +1,63 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "oai-nr-pbchsim.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "oai-nr-pbchsim.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "oai-nr-pbchsim.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Common labels
+*/}}
+{{- define "oai-nr-pbchsim.labels" -}}
+helm.sh/chart: {{ include "oai-nr-pbchsim.chart" . }}
+{{ include "oai-nr-pbchsim.selectorLabels" . }}
+{{- if .Chart.AppVersion }}
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+{{- end }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end -}}
+
+{{/*
+Selector labels
+*/}}
+{{- define "oai-nr-pbchsim.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "oai-nr-pbchsim.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end -}}
+
+{{/*
+Create the name of the service account to use
+*/}}
+{{- define "oai-nr-pbchsim.serviceAccountName" -}}
+{{- if .Values.serviceAccount.create -}}
+    {{ default (include "oai-nr-pbchsim.fullname" .) .Values.serviceAccount.name }}
+{{- else -}}
+    {{ default "default" .Values.serviceAccount.name }}
+{{- end -}}
+{{- end -}}
diff --git a/charts/physims/charts/nr-pbchsim/templates/deployment.yaml b/charts/physims/charts/nr-pbchsim/templates/deployment.yaml
new file mode 100644
index 0000000000..abcf9a6ba6
--- /dev/null
+++ b/charts/physims/charts/nr-pbchsim/templates/deployment.yaml
@@ -0,0 +1,49 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: {{ .Chart.Name }}
+  labels:
+    {{- include "oai-nr-pbchsim.labels" . | nindent 4 }}
+spec:
+  replicas: {{ .Values.replicaCount }}
+  selector:
+    matchLabels:
+      {{- include "oai-nr-pbchsim.selectorLabels" . | nindent 6 }}
+  strategy:
+    type: Recreate
+  template:
+    metadata:
+      labels:
+        {{- include "oai-nr-pbchsim.selectorLabels" . | nindent 8 }}
+    spec:
+      securityContext:
+        {{- toYaml .Values.podSecurityContext | nindent 8 }}
+    {{- if .Values.imagePullSecrets }}
+      imagePullSecrets:
+        {{- toYaml . | nindent 8 }}
+    {{- end }}
+      containers:
+      - name: physim
+        image: "{{ .Values.image.repository }}:{{ .Values.image.version }}"
+        imagePullPolicy: {{ .Values.image.pullPolicy }}
+        securityContext:
+          {{- toYaml .Values.securityContext | nindent 12 }}
+        ports:
+        - containerPort: 80
+          name: oai-nr-pbchsim
+        # volumeMounts:
+        # - mountPath: /opt/oai-nr-pbchsim/certs
+        #   name: certs
+        command: ["/bin/sh", "-c"]
+        args:
+        - >  
+          export OPENAIR_DIR=/opt/oai-physim &&
+          cd cmake_targets/autotests &&
+          ./run_exec_autotests.bash -g "015104" -q -np -b &&
+          echo "FINISHED" &&
+          sleep infinity
+      dnsPolicy: ClusterFirst
+      restartPolicy: Always
+      schedulerName: default-scheduler
+      serviceAccountName: {{ .Values.global.serviceAccountName }}
+      terminationGracePeriodSeconds: 30
diff --git a/charts/physims/charts/nr-pbchsim/templates/service.yaml b/charts/physims/charts/nr-pbchsim/templates/service.yaml
new file mode 100644
index 0000000000..35faf3c33d
--- /dev/null
+++ b/charts/physims/charts/nr-pbchsim/templates/service.yaml
@@ -0,0 +1,20 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ .Chart.Name }}
+  labels:
+    {{- include "oai-nr-pbchsim.labels" . | nindent 4 }}
+spec:
+  type: {{ .Values.service.type }}
+{{- if  contains "ClusterIP" .Values.service.type }}
+  clusterIP: None
+{{- end }}
+  ports:
+    - name: oai-nr-pbchsim
+      # Port accessible outside cluster
+      port: {{ .Values.service.port }}
+      # Port to forward to inside the pod
+      targetPort: {{ .Values.service.Port }}
+      protocol: TCP
+  selector:
+    {{- include "oai-nr-pbchsim.selectorLabels" . | nindent 4 }}
diff --git a/charts/physims/charts/nr-pbchsim/values.yaml b/charts/physims/charts/nr-pbchsim/values.yaml
new file mode 100644
index 0000000000..62d89f9632
--- /dev/null
+++ b/charts/physims/charts/nr-pbchsim/values.yaml
@@ -0,0 +1,63 @@
+# Default values for oai-nr-pbchsim.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+replicaCount: 1
+
+namespace: "oaicicd-ran-tmp"
+
+image:
+  registry: local
+  repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
+  version: temp
+  # pullPolicy: IfNotPresent or Never or Always
+  pullPolicy: Always
+
+imagePullSecrets: []
+
+nameOverride: ""
+fullnameOverride: ""
+
+serviceAccount:
+  # Specifies whether a service account should be created
+  create: true
+  # Annotations to add to the service account
+  annotations: {}
+  # The name of the service account to use.
+  # If not set and create is true, a name is generated using the fullname template
+  name: "oai-nr-pbchsim-sa"
+
+podSecurityContext:
+  runAsUser: 0
+  runAsGroup: 0
+
+securityContext:
+  privileged: true
+  # capabilities:
+  #   drop:
+  #   - ALL
+  # readOnlyRootFilesystem: true
+  # runAsNonRoot: true
+  # runAsUser: 1000
+
+service:
+  type: ClusterIP
+  port: 80
+
+resources: {}
+  # We usually recommend not to specify default resources and to leave this as a conscious
+  # choice for the user. This also increases chances charts run on environments with little
+  # resources, such as Minikube. If you do want to specify resources, uncomment the following
+  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+  # limits:
+  #   cpu: 100m
+  #   memory: 128Mi
+  # requests:
+  #   cpu: 100m
+  #   memory: 128Mi
+
+nodeSelector: {}
+
+tolerations: []
+
+affinity: {}
diff --git a/charts/physims/charts/nr-prachsim/Chart.yaml b/charts/physims/charts/nr-prachsim/Chart.yaml
new file mode 100644
index 0000000000..a37f4b2c4e
--- /dev/null
+++ b/charts/physims/charts/nr-prachsim/Chart.yaml
@@ -0,0 +1,36 @@
+apiVersion: v1
+name: oai-nr-prachsim
+description: A Helm subchart for nr-prachsim network function
+
+# A chart can be either an 'application' or a 'library' chart.
+#
+# Application charts are a collection of templates that can be packaged into versioned archives
+# to be deployed.
+#
+# Library charts provide useful utilities or functions for the chart developer. They're included as
+# a dependency of application charts to inject those utilities and functions into the rendering
+# pipeline. Library charts do not define any templates and therefore cannot be deployed.
+type: application
+
+icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
+
+# This is the chart version. This version number should be incremented each time you make changes
+# to the chart and its templates, including the app version.
+version: 0.1.1
+
+# This is the version number of the application being deployed. This version number should be
+# incremented each time you make changes to the application.
+appVersion: v1
+
+keywords:
+  - Physical Simulator
+  - nr-prachsim
+  - RAN
+  - 4G
+
+sources:
+  - https://gitlab.eurecom.fr/oai/openairinterface5g
+
+maintainers:
+  - name:  OPENAIRINTERFACE
+    email: contact@openairinterface.org
diff --git a/charts/physims/charts/nr-prachsim/templates/NOTES.txt b/charts/physims/charts/nr-prachsim/templates/NOTES.txt
new file mode 100644
index 0000000000..376694e7e4
--- /dev/null
+++ b/charts/physims/charts/nr-prachsim/templates/NOTES.txt
@@ -0,0 +1,15 @@
+1. Get the application URL by running these commands:
+{{- if contains "NodePort" .Values.service.type }}
+  export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "oai-nr-prachsim.fullname" . }})
+  export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
+  echo http://$NODE_IP:$NODE_PORT
+{{- else if contains "LoadBalancer" .Values.service.type }}
+     NOTE: It may take a few minutes for the LoadBalancer IP to be available.
+           You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "oai-nr-prachsim.fullname" . }}'
+  export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "oai-nr-prachsim.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
+  echo http://$SERVICE_IP:{{ .Values.service.port }}
+{{- else if contains "ClusterIP" .Values.service.type }}
+  export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-nr-prachsim.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
+  echo "Visit http://127.0.0.1:8080 to use your application"
+  kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80
+{{- end }}
diff --git a/charts/physims/charts/nr-prachsim/templates/_helpers.tpl b/charts/physims/charts/nr-prachsim/templates/_helpers.tpl
new file mode 100644
index 0000000000..6362c72b2a
--- /dev/null
+++ b/charts/physims/charts/nr-prachsim/templates/_helpers.tpl
@@ -0,0 +1,63 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "oai-nr-prachsim.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "oai-nr-prachsim.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "oai-nr-prachsim.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Common labels
+*/}}
+{{- define "oai-nr-prachsim.labels" -}}
+helm.sh/chart: {{ include "oai-nr-prachsim.chart" . }}
+{{ include "oai-nr-prachsim.selectorLabels" . }}
+{{- if .Chart.AppVersion }}
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+{{- end }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end -}}
+
+{{/*
+Selector labels
+*/}}
+{{- define "oai-nr-prachsim.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "oai-nr-prachsim.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end -}}
+
+{{/*
+Create the name of the service account to use
+*/}}
+{{- define "oai-nr-prachsim.serviceAccountName" -}}
+{{- if .Values.serviceAccount.create -}}
+    {{ default (include "oai-nr-prachsim.fullname" .) .Values.serviceAccount.name }}
+{{- else -}}
+    {{ default "default" .Values.serviceAccount.name }}
+{{- end -}}
+{{- end -}}
diff --git a/charts/physims/charts/nr-prachsim/templates/deployment.yaml b/charts/physims/charts/nr-prachsim/templates/deployment.yaml
new file mode 100644
index 0000000000..9edcc25b7c
--- /dev/null
+++ b/charts/physims/charts/nr-prachsim/templates/deployment.yaml
@@ -0,0 +1,49 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: {{ .Chart.Name }}
+  labels:
+    {{- include "oai-nr-prachsim.labels" . | nindent 4 }}
+spec:
+  replicas: {{ .Values.replicaCount }}
+  selector:
+    matchLabels:
+      {{- include "oai-nr-prachsim.selectorLabels" . | nindent 6 }}
+  strategy:
+    type: Recreate
+  template:
+    metadata:
+      labels:
+        {{- include "oai-nr-prachsim.selectorLabels" . | nindent 8 }}
+    spec:
+      securityContext:
+        {{- toYaml .Values.podSecurityContext | nindent 8 }}
+    {{- if .Values.imagePullSecrets }}
+      imagePullSecrets:
+        {{- toYaml . | nindent 8 }}
+    {{- end }}
+      containers:
+      - name: physim
+        image: "{{ .Values.image.repository }}:{{ .Values.image.version }}"
+        imagePullPolicy: {{ .Values.image.pullPolicy }}
+        securityContext:
+          {{- toYaml .Values.securityContext | nindent 12 }}
+        ports:
+        - containerPort: 80
+          name: oai-nr-prachsim
+        # volumeMounts:
+        # - mountPath: /opt/oai-nr-prachsim/certs
+        #   name: certs
+        command: ["/bin/sh", "-c"]
+        args:
+        - >  
+          export OPENAIR_DIR=/opt/oai-physim &&
+          cd cmake_targets/autotests &&
+          ./run_exec_autotests.bash -g "015112" -q -np -b &&
+          echo "FINISHED" &&
+          sleep infinity
+      dnsPolicy: ClusterFirst
+      restartPolicy: Always
+      schedulerName: default-scheduler
+      serviceAccountName: {{ .Values.global.serviceAccountName }}
+      terminationGracePeriodSeconds: 30
diff --git a/charts/physims/charts/nr-prachsim/templates/service.yaml b/charts/physims/charts/nr-prachsim/templates/service.yaml
new file mode 100644
index 0000000000..71bfe7b9fe
--- /dev/null
+++ b/charts/physims/charts/nr-prachsim/templates/service.yaml
@@ -0,0 +1,20 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ .Chart.Name }}
+  labels:
+    {{- include "oai-nr-prachsim.labels" . | nindent 4 }}
+spec:
+  type: {{ .Values.service.type }}
+{{- if  contains "ClusterIP" .Values.service.type }}
+  clusterIP: None
+{{- end }}
+  ports:
+    - name: oai-nr-prachsim
+      # Port accessible outside cluster
+      port: {{ .Values.service.port }}
+      # Port to forward to inside the pod
+      targetPort: {{ .Values.service.Port }}
+      protocol: TCP
+  selector:
+    {{- include "oai-nr-prachsim.selectorLabels" . | nindent 4 }}
diff --git a/charts/physims/charts/nr-prachsim/values.yaml b/charts/physims/charts/nr-prachsim/values.yaml
new file mode 100644
index 0000000000..3ea9787f7a
--- /dev/null
+++ b/charts/physims/charts/nr-prachsim/values.yaml
@@ -0,0 +1,63 @@
+# Default values for oai-nr-prachsim.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+replicaCount: 1
+
+namespace: "oaicicd-ran-tmp"
+
+image:
+  registry: local
+  repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
+  version: temp
+  # pullPolicy: IfNotPresent or Never or Always
+  pullPolicy: Always
+
+imagePullSecrets: []
+
+nameOverride: ""
+fullnameOverride: ""
+
+serviceAccount:
+  # Specifies whether a service account should be created
+  create: true
+  # Annotations to add to the service account
+  annotations: {}
+  # The name of the service account to use.
+  # If not set and create is true, a name is generated using the fullname template
+  name: "oai-nr-prachsim-sa"
+
+podSecurityContext:
+  runAsUser: 0
+  runAsGroup: 0
+
+securityContext:
+  privileged: true
+  # capabilities:
+  #   drop:
+  #   - ALL
+  # readOnlyRootFilesystem: true
+  # runAsNonRoot: true
+  # runAsUser: 1000
+
+service:
+  type: ClusterIP
+  port: 80
+
+resources: {}
+  # We usually recommend not to specify default resources and to leave this as a conscious
+  # choice for the user. This also increases chances charts run on environments with little
+  # resources, such as Minikube. If you do want to specify resources, uncomment the following
+  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+  # limits:
+  #   cpu: 100m
+  #   memory: 128Mi
+  # requests:
+  #   cpu: 100m
+  #   memory: 128Mi
+
+nodeSelector: {}
+
+tolerations: []
+
+affinity: {}
diff --git a/charts/physims/charts/nr-pucchsim/Chart.yaml b/charts/physims/charts/nr-pucchsim/Chart.yaml
new file mode 100644
index 0000000000..88872dbe88
--- /dev/null
+++ b/charts/physims/charts/nr-pucchsim/Chart.yaml
@@ -0,0 +1,36 @@
+apiVersion: v1
+name: oai-nr-pucchsim
+description: A Helm subchart for nr-pucchsim network function
+
+# A chart can be either an 'application' or a 'library' chart.
+#
+# Application charts are a collection of templates that can be packaged into versioned archives
+# to be deployed.
+#
+# Library charts provide useful utilities or functions for the chart developer. They're included as
+# a dependency of application charts to inject those utilities and functions into the rendering
+# pipeline. Library charts do not define any templates and therefore cannot be deployed.
+type: application
+
+icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
+
+# This is the chart version. This version number should be incremented each time you make changes
+# to the chart and its templates, including the app version.
+version: 0.1.1
+
+# This is the version number of the application being deployed. This version number should be
+# incremented each time you make changes to the application.
+appVersion: v1
+
+keywords:
+  - Physical Simulator
+  - nr-pucchsim
+  - RAN
+  - 4G
+
+sources:
+  - https://gitlab.eurecom.fr/oai/openairinterface5g
+
+maintainers:
+  - name:  OPENAIRINTERFACE
+    email: contact@openairinterface.org
diff --git a/charts/physims/charts/nr-pucchsim/templates/NOTES.txt b/charts/physims/charts/nr-pucchsim/templates/NOTES.txt
new file mode 100644
index 0000000000..7c2cfa9155
--- /dev/null
+++ b/charts/physims/charts/nr-pucchsim/templates/NOTES.txt
@@ -0,0 +1,15 @@
+1. Get the application URL by running these commands:
+{{- if contains "NodePort" .Values.service.type }}
+  export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "oai-nr-pucchsim.fullname" . }})
+  export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
+  echo http://$NODE_IP:$NODE_PORT
+{{- else if contains "LoadBalancer" .Values.service.type }}
+     NOTE: It may take a few minutes for the LoadBalancer IP to be available.
+           You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "oai-nr-pucchsim.fullname" . }}'
+  export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "oai-nr-pucchsim.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
+  echo http://$SERVICE_IP:{{ .Values.service.port }}
+{{- else if contains "ClusterIP" .Values.service.type }}
+  export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-nr-pucchsim.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
+  echo "Visit http://127.0.0.1:8080 to use your application"
+  kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80
+{{- end }}
diff --git a/charts/physims/charts/nr-pucchsim/templates/_helpers.tpl b/charts/physims/charts/nr-pucchsim/templates/_helpers.tpl
new file mode 100644
index 0000000000..210ba26db2
--- /dev/null
+++ b/charts/physims/charts/nr-pucchsim/templates/_helpers.tpl
@@ -0,0 +1,63 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "oai-nr-pucchsim.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "oai-nr-pucchsim.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "oai-nr-pucchsim.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Common labels
+*/}}
+{{- define "oai-nr-pucchsim.labels" -}}
+helm.sh/chart: {{ include "oai-nr-pucchsim.chart" . }}
+{{ include "oai-nr-pucchsim.selectorLabels" . }}
+{{- if .Chart.AppVersion }}
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+{{- end }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end -}}
+
+{{/*
+Selector labels
+*/}}
+{{- define "oai-nr-pucchsim.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "oai-nr-pucchsim.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end -}}
+
+{{/*
+Create the name of the service account to use
+*/}}
+{{- define "oai-nr-pucchsim.serviceAccountName" -}}
+{{- if .Values.serviceAccount.create -}}
+    {{ default (include "oai-nr-pucchsim.fullname" .) .Values.serviceAccount.name }}
+{{- else -}}
+    {{ default "default" .Values.serviceAccount.name }}
+{{- end -}}
+{{- end -}}
diff --git a/charts/physims/charts/nr-pucchsim/templates/deployment.yaml b/charts/physims/charts/nr-pucchsim/templates/deployment.yaml
new file mode 100644
index 0000000000..0709577ab4
--- /dev/null
+++ b/charts/physims/charts/nr-pucchsim/templates/deployment.yaml
@@ -0,0 +1,49 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: {{ .Chart.Name }}
+  labels:
+    {{- include "oai-nr-pucchsim.labels" . | nindent 4 }}
+spec:
+  replicas: {{ .Values.replicaCount }}
+  selector:
+    matchLabels:
+      {{- include "oai-nr-pucchsim.selectorLabels" . | nindent 6 }}
+  strategy:
+    type: Recreate
+  template:
+    metadata:
+      labels:
+        {{- include "oai-nr-pucchsim.selectorLabels" . | nindent 8 }}
+    spec:
+      securityContext:
+        {{- toYaml .Values.podSecurityContext | nindent 8 }}
+    {{- if .Values.imagePullSecrets }}
+      imagePullSecrets:
+        {{- toYaml . | nindent 8 }}
+    {{- end }}
+      containers:
+      - name: physim
+        image: "{{ .Values.image.repository }}:{{ .Values.image.version }}"
+        imagePullPolicy: {{ .Values.image.pullPolicy }}
+        securityContext:
+          {{- toYaml .Values.securityContext | nindent 12 }}
+        ports:
+        - containerPort: 80
+          name: oai-nr-pucchsim
+        # volumeMounts:
+        # - mountPath: /opt/oai-nr-pucchsim/certs
+        #   name: certs
+        command: ["/bin/sh", "-c"]
+        args:
+        - >  
+          export OPENAIR_DIR=/opt/oai-physim &&
+          cd cmake_targets/autotests &&
+          ./run_exec_autotests.bash -g "015109" -q -np -b &&
+          echo "FINISHED" &&
+          sleep infinity
+      dnsPolicy: ClusterFirst
+      restartPolicy: Always
+      schedulerName: default-scheduler
+      serviceAccountName: {{ .Values.global.serviceAccountName }}
+      terminationGracePeriodSeconds: 30
diff --git a/charts/physims/charts/nr-pucchsim/templates/service.yaml b/charts/physims/charts/nr-pucchsim/templates/service.yaml
new file mode 100644
index 0000000000..9e8760e76b
--- /dev/null
+++ b/charts/physims/charts/nr-pucchsim/templates/service.yaml
@@ -0,0 +1,20 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ .Chart.Name }}
+  labels:
+    {{- include "oai-nr-pucchsim.labels" . | nindent 4 }}
+spec:
+  type: {{ .Values.service.type }}
+{{- if  contains "ClusterIP" .Values.service.type }}
+  clusterIP: None
+{{- end }}
+  ports:
+    - name: oai-nr-pucchsim
+      # Port accessible outside cluster
+      port: {{ .Values.service.port }}
+      # Port to forward to inside the pod
+      targetPort: {{ .Values.service.Port }}
+      protocol: TCP
+  selector:
+    {{- include "oai-nr-pucchsim.selectorLabels" . | nindent 4 }}
diff --git a/charts/physims/charts/nr-pucchsim/values.yaml b/charts/physims/charts/nr-pucchsim/values.yaml
new file mode 100644
index 0000000000..cf50c0bd3c
--- /dev/null
+++ b/charts/physims/charts/nr-pucchsim/values.yaml
@@ -0,0 +1,63 @@
+# Default values for oai-nr-pucchsim.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+replicaCount: 1
+
+namespace: "oaicicd-ran-tmp"
+
+image:
+  registry: local
+  repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
+  version: temp
+  # pullPolicy: IfNotPresent or Never or Always
+  pullPolicy: Always
+
+imagePullSecrets: []
+
+nameOverride: ""
+fullnameOverride: ""
+
+serviceAccount:
+  # Specifies whether a service account should be created
+  create: true
+  # Annotations to add to the service account
+  annotations: {}
+  # The name of the service account to use.
+  # If not set and create is true, a name is generated using the fullname template
+  name: "oai-nr-pucchsim-sa"
+
+podSecurityContext:
+  runAsUser: 0
+  runAsGroup: 0
+
+securityContext:
+  privileged: true
+  # capabilities:
+  #   drop:
+  #   - ALL
+  # readOnlyRootFilesystem: true
+  # runAsNonRoot: true
+  # runAsUser: 1000
+
+service:
+  type: ClusterIP
+  port: 80
+
+resources: {}
+  # We usually recommend not to specify default resources and to leave this as a conscious
+  # choice for the user. This also increases chances charts run on environments with little
+  # resources, such as Minikube. If you do want to specify resources, uncomment the following
+  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+  # limits:
+  #   cpu: 100m
+  #   memory: 128Mi
+  # requests:
+  #   cpu: 100m
+  #   memory: 128Mi
+
+nodeSelector: {}
+
+tolerations: []
+
+affinity: {}
diff --git a/charts/physims/charts/nr-ulschsim/Chart.yaml b/charts/physims/charts/nr-ulschsim/Chart.yaml
new file mode 100644
index 0000000000..86a7738d24
--- /dev/null
+++ b/charts/physims/charts/nr-ulschsim/Chart.yaml
@@ -0,0 +1,36 @@
+apiVersion: v1
+name: oai-nr-ulschsim
+description: A Helm subchart for nr-ulschsim network function
+
+# A chart can be either an 'application' or a 'library' chart.
+#
+# Application charts are a collection of templates that can be packaged into versioned archives
+# to be deployed.
+#
+# Library charts provide useful utilities or functions for the chart developer. They're included as
+# a dependency of application charts to inject those utilities and functions into the rendering
+# pipeline. Library charts do not define any templates and therefore cannot be deployed.
+type: application
+
+icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
+
+# This is the chart version. This version number should be incremented each time you make changes
+# to the chart and its templates, including the app version.
+version: 0.1.1
+
+# This is the version number of the application being deployed. This version number should be
+# incremented each time you make changes to the application.
+appVersion: v1
+
+keywords:
+  - Physical Simulator
+  - nr-ulschsim
+  - RAN
+  - 4G
+
+sources:
+  - https://gitlab.eurecom.fr/oai/openairinterface5g
+
+maintainers:
+  - name:  OPENAIRINTERFACE
+    email: contact@openairinterface.org
diff --git a/charts/physims/charts/nr-ulschsim/templates/NOTES.txt b/charts/physims/charts/nr-ulschsim/templates/NOTES.txt
new file mode 100644
index 0000000000..65566932cd
--- /dev/null
+++ b/charts/physims/charts/nr-ulschsim/templates/NOTES.txt
@@ -0,0 +1,15 @@
+1. Get the application URL by running these commands:
+{{- if contains "NodePort" .Values.service.type }}
+  export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "oai-nr-ulschsim.fullname" . }})
+  export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
+  echo http://$NODE_IP:$NODE_PORT
+{{- else if contains "LoadBalancer" .Values.service.type }}
+     NOTE: It may take a few minutes for the LoadBalancer IP to be available.
+           You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "oai-nr-ulschsim.fullname" . }}'
+  export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "oai-nr-ulschsim.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
+  echo http://$SERVICE_IP:{{ .Values.service.port }}
+{{- else if contains "ClusterIP" .Values.service.type }}
+  export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-nr-ulschsim.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
+  echo "Visit http://127.0.0.1:8080 to use your application"
+  kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80
+{{- end }}
diff --git a/charts/physims/charts/nr-ulschsim/templates/_helpers.tpl b/charts/physims/charts/nr-ulschsim/templates/_helpers.tpl
new file mode 100644
index 0000000000..9aa13a81f0
--- /dev/null
+++ b/charts/physims/charts/nr-ulschsim/templates/_helpers.tpl
@@ -0,0 +1,63 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "oai-nr-ulschsim.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "oai-nr-ulschsim.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "oai-nr-ulschsim.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Common labels
+*/}}
+{{- define "oai-nr-ulschsim.labels" -}}
+helm.sh/chart: {{ include "oai-nr-ulschsim.chart" . }}
+{{ include "oai-nr-ulschsim.selectorLabels" . }}
+{{- if .Chart.AppVersion }}
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+{{- end }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end -}}
+
+{{/*
+Selector labels
+*/}}
+{{- define "oai-nr-ulschsim.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "oai-nr-ulschsim.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end -}}
+
+{{/*
+Create the name of the service account to use
+*/}}
+{{- define "oai-nr-ulschsim.serviceAccountName" -}}
+{{- if .Values.serviceAccount.create -}}
+    {{ default (include "oai-nr-ulschsim.fullname" .) .Values.serviceAccount.name }}
+{{- else -}}
+    {{ default "default" .Values.serviceAccount.name }}
+{{- end -}}
+{{- end -}}
diff --git a/charts/physims/charts/nr-ulschsim/templates/deployment.yaml b/charts/physims/charts/nr-ulschsim/templates/deployment.yaml
new file mode 100644
index 0000000000..626ff9305b
--- /dev/null
+++ b/charts/physims/charts/nr-ulschsim/templates/deployment.yaml
@@ -0,0 +1,49 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: {{ .Chart.Name }}
+  labels:
+    {{- include "oai-nr-ulschsim.labels" . | nindent 4 }}
+spec:
+  replicas: {{ .Values.replicaCount }}
+  selector:
+    matchLabels:
+      {{- include "oai-nr-ulschsim.selectorLabels" . | nindent 6 }}
+  strategy:
+    type: Recreate
+  template:
+    metadata:
+      labels:
+        {{- include "oai-nr-ulschsim.selectorLabels" . | nindent 8 }}
+    spec:
+      securityContext:
+        {{- toYaml .Values.podSecurityContext | nindent 8 }}
+    {{- if .Values.imagePullSecrets }}
+      imagePullSecrets:
+        {{- toYaml . | nindent 8 }}
+    {{- end }}
+      containers:
+      - name: physim
+        image: "{{ .Values.image.repository }}:{{ .Values.image.version }}"
+        imagePullPolicy: {{ .Values.image.pullPolicy }}
+        securityContext:
+          {{- toYaml .Values.securityContext | nindent 12 }}
+        ports:
+        - containerPort: 80
+          name: oai-nr-ulschsim
+        # volumeMounts:
+        # - mountPath: /opt/oai-nr-ulschsim/certs
+        #   name: certs
+        command: ["/bin/sh", "-c"]
+        args:
+        - >  
+          export OPENAIR_DIR=/opt/oai-physim &&
+          cd cmake_targets/autotests &&
+          ./run_exec_autotests.bash -g "015108" -q -np -b &&
+          echo "FINISHED" &&
+          sleep infinity
+      dnsPolicy: ClusterFirst
+      restartPolicy: Always
+      schedulerName: default-scheduler
+      serviceAccountName: {{ .Values.global.serviceAccountName }}
+      terminationGracePeriodSeconds: 30
diff --git a/charts/physims/charts/nr-ulschsim/templates/service.yaml b/charts/physims/charts/nr-ulschsim/templates/service.yaml
new file mode 100644
index 0000000000..d34882700e
--- /dev/null
+++ b/charts/physims/charts/nr-ulschsim/templates/service.yaml
@@ -0,0 +1,20 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ .Chart.Name }}
+  labels:
+    {{- include "oai-nr-ulschsim.labels" . | nindent 4 }}
+spec:
+  type: {{ .Values.service.type }}
+{{- if  contains "ClusterIP" .Values.service.type }}
+  clusterIP: None
+{{- end }}
+  ports:
+    - name: oai-nr-ulschsim
+      # Port accessible outside cluster
+      port: {{ .Values.service.port }}
+      # Port to forward to inside the pod
+      targetPort: {{ .Values.service.Port }}
+      protocol: TCP
+  selector:
+    {{- include "oai-nr-ulschsim.selectorLabels" . | nindent 4 }}
diff --git a/charts/physims/charts/nr-ulschsim/values.yaml b/charts/physims/charts/nr-ulschsim/values.yaml
new file mode 100644
index 0000000000..420b154596
--- /dev/null
+++ b/charts/physims/charts/nr-ulschsim/values.yaml
@@ -0,0 +1,63 @@
+# Default values for oai-nr-ulschsim.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+replicaCount: 1
+
+namespace: "oaicicd-ran-tmp"
+
+image:
+  registry: local
+  repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
+  version: temp
+  # pullPolicy: IfNotPresent or Never or Always
+  pullPolicy: Always
+
+imagePullSecrets: []
+
+nameOverride: ""
+fullnameOverride: ""
+
+serviceAccount:
+  # Specifies whether a service account should be created
+  create: true
+  # Annotations to add to the service account
+  annotations: {}
+  # The name of the service account to use.
+  # If not set and create is true, a name is generated using the fullname template
+  name: "oai-nr-ulschsim-sa"
+
+podSecurityContext:
+  runAsUser: 0
+  runAsGroup: 0
+
+securityContext:
+  privileged: true
+  # capabilities:
+  #   drop:
+  #   - ALL
+  # readOnlyRootFilesystem: true
+  # runAsNonRoot: true
+  # runAsUser: 1000
+
+service:
+  type: ClusterIP
+  port: 80
+
+resources: {}
+  # We usually recommend not to specify default resources and to leave this as a conscious
+  # choice for the user. This also increases chances charts run on environments with little
+  # resources, such as Minikube. If you do want to specify resources, uncomment the following
+  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+  # limits:
+  #   cpu: 100m
+  #   memory: 128Mi
+  # requests:
+  #   cpu: 100m
+  #   memory: 128Mi
+
+nodeSelector: {}
+
+tolerations: []
+
+affinity: {}
diff --git a/charts/physims/charts/nr-ulsim/Chart.yaml b/charts/physims/charts/nr-ulsim/Chart.yaml
new file mode 100644
index 0000000000..9264f72303
--- /dev/null
+++ b/charts/physims/charts/nr-ulsim/Chart.yaml
@@ -0,0 +1,36 @@
+apiVersion: v1
+name: oai-nr-ulsim
+description: A Helm subchart for nr-ulsim network function
+
+# A chart can be either an 'application' or a 'library' chart.
+#
+# Application charts are a collection of templates that can be packaged into versioned archives
+# to be deployed.
+#
+# Library charts provide useful utilities or functions for the chart developer. They're included as
+# a dependency of application charts to inject those utilities and functions into the rendering
+# pipeline. Library charts do not define any templates and therefore cannot be deployed.
+type: application
+
+icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
+
+# This is the chart version. This version number should be incremented each time you make changes
+# to the chart and its templates, including the app version.
+version: 0.1.1
+
+# This is the version number of the application being deployed. This version number should be
+# incremented each time you make changes to the application.
+appVersion: v1
+
+keywords:
+  - Physical Simulator
+  - nr-ulsim
+  - RAN
+  - 4G
+
+sources:
+  - https://gitlab.eurecom.fr/oai/openairinterface5g
+
+maintainers:
+  - name:  OPENAIRINTERFACE
+    email: contact@openairinterface.org
diff --git a/charts/physims/charts/nr-ulsim/templates/NOTES.txt b/charts/physims/charts/nr-ulsim/templates/NOTES.txt
new file mode 100644
index 0000000000..6865eeaedf
--- /dev/null
+++ b/charts/physims/charts/nr-ulsim/templates/NOTES.txt
@@ -0,0 +1,15 @@
+1. Get the application URL by running these commands:
+{{- if contains "NodePort" .Values.service.type }}
+  export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "oai-nr-ulsim.fullname" . }})
+  export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
+  echo http://$NODE_IP:$NODE_PORT
+{{- else if contains "LoadBalancer" .Values.service.type }}
+     NOTE: It may take a few minutes for the LoadBalancer IP to be available.
+           You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "oai-nr-ulsim.fullname" . }}'
+  export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "oai-nr-ulsim.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
+  echo http://$SERVICE_IP:{{ .Values.service.port }}
+{{- else if contains "ClusterIP" .Values.service.type }}
+  export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-nr-ulsim.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
+  echo "Visit http://127.0.0.1:8080 to use your application"
+  kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80
+{{- end }}
diff --git a/charts/physims/charts/nr-ulsim/templates/_helpers.tpl b/charts/physims/charts/nr-ulsim/templates/_helpers.tpl
new file mode 100644
index 0000000000..90f0bd0e36
--- /dev/null
+++ b/charts/physims/charts/nr-ulsim/templates/_helpers.tpl
@@ -0,0 +1,63 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "oai-nr-ulsim.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "oai-nr-ulsim.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "oai-nr-ulsim.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Common labels
+*/}}
+{{- define "oai-nr-ulsim.labels" -}}
+helm.sh/chart: {{ include "oai-nr-ulsim.chart" . }}
+{{ include "oai-nr-ulsim.selectorLabels" . }}
+{{- if .Chart.AppVersion }}
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+{{- end }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end -}}
+
+{{/*
+Selector labels
+*/}}
+{{- define "oai-nr-ulsim.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "oai-nr-ulsim.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end -}}
+
+{{/*
+Create the name of the service account to use
+*/}}
+{{- define "oai-nr-ulsim.serviceAccountName" -}}
+{{- if .Values.serviceAccount.create -}}
+    {{ default (include "oai-nr-ulsim.fullname" .) .Values.serviceAccount.name }}
+{{- else -}}
+    {{ default "default" .Values.serviceAccount.name }}
+{{- end -}}
+{{- end -}}
diff --git a/charts/physims/charts/nr-ulsim/templates/deployment.yaml b/charts/physims/charts/nr-ulsim/templates/deployment.yaml
new file mode 100644
index 0000000000..ca9c3fbd50
--- /dev/null
+++ b/charts/physims/charts/nr-ulsim/templates/deployment.yaml
@@ -0,0 +1,49 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: {{ .Chart.Name }}
+  labels:
+    {{- include "oai-nr-ulsim.labels" . | nindent 4 }}
+spec:
+  replicas: {{ .Values.replicaCount }}
+  selector:
+    matchLabels:
+      {{- include "oai-nr-ulsim.selectorLabels" . | nindent 6 }}
+  strategy:
+    type: Recreate
+  template:
+    metadata:
+      labels:
+        {{- include "oai-nr-ulsim.selectorLabels" . | nindent 8 }}
+    spec:
+      securityContext:
+        {{- toYaml .Values.podSecurityContext | nindent 8 }}
+    {{- if .Values.imagePullSecrets }}
+      imagePullSecrets:
+        {{- toYaml . | nindent 8 }}
+    {{- end }}
+      containers:
+      - name: physim
+        image: "{{ .Values.image.repository }}:{{ .Values.image.version }}"
+        imagePullPolicy: {{ .Values.image.pullPolicy }}
+        securityContext:
+          {{- toYaml .Values.securityContext | nindent 12 }}
+        ports:
+        - containerPort: 80
+          name: oai-nr-ulsim
+        # volumeMounts:
+        # - mountPath: /opt/oai-nr-ulsim/certs
+        #   name: certs
+        command: ["/bin/sh", "-c"]
+        args:
+        - >  
+          export OPENAIR_DIR=/opt/oai-physim &&
+          cd cmake_targets/autotests &&
+          ./run_exec_autotests.bash -g "015111" -q -np -b &&
+          echo "FINISHED" &&
+          sleep infinity
+      dnsPolicy: ClusterFirst
+      restartPolicy: Always
+      schedulerName: default-scheduler
+      serviceAccountName: {{ .Values.global.serviceAccountName }}
+      terminationGracePeriodSeconds: 30
diff --git a/charts/physims/charts/nr-ulsim/templates/service.yaml b/charts/physims/charts/nr-ulsim/templates/service.yaml
new file mode 100644
index 0000000000..95f198d1b1
--- /dev/null
+++ b/charts/physims/charts/nr-ulsim/templates/service.yaml
@@ -0,0 +1,20 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ .Chart.Name }}
+  labels:
+    {{- include "oai-nr-ulsim.labels" . | nindent 4 }}
+spec:
+  type: {{ .Values.service.type }}
+{{- if  contains "ClusterIP" .Values.service.type }}
+  clusterIP: None
+{{- end }}
+  ports:
+    - name: oai-nr-ulsim
+      # Port accessible outside cluster
+      port: {{ .Values.service.port }}
+      # Port to forward to inside the pod
+      targetPort: {{ .Values.service.Port }}
+      protocol: TCP
+  selector:
+    {{- include "oai-nr-ulsim.selectorLabels" . | nindent 4 }}
diff --git a/charts/physims/charts/nr-ulsim/values.yaml b/charts/physims/charts/nr-ulsim/values.yaml
new file mode 100644
index 0000000000..7eb8e33fcb
--- /dev/null
+++ b/charts/physims/charts/nr-ulsim/values.yaml
@@ -0,0 +1,63 @@
+# Default values for oai-nr-ulsim.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+replicaCount: 1
+
+namespace: "oaicicd-ran-tmp"
+
+image:
+  registry: local
+  repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
+  version: temp
+  # pullPolicy: IfNotPresent or Never or Always
+  pullPolicy: Always
+
+imagePullSecrets: []
+
+nameOverride: ""
+fullnameOverride: ""
+
+serviceAccount:
+  # Specifies whether a service account should be created
+  create: true
+  # Annotations to add to the service account
+  annotations: {}
+  # The name of the service account to use.
+  # If not set and create is true, a name is generated using the fullname template
+  name: "oai-nr-ulsim-sa"
+
+podSecurityContext:
+  runAsUser: 0
+  runAsGroup: 0
+
+securityContext:
+  privileged: true
+  # capabilities:
+  #   drop:
+  #   - ALL
+  # readOnlyRootFilesystem: true
+  # runAsNonRoot: true
+  # runAsUser: 1000
+
+service:
+  type: ClusterIP
+  port: 80
+
+resources: {}
+  # We usually recommend not to specify default resources and to leave this as a conscious
+  # choice for the user. This also increases chances charts run on environments with little
+  # resources, such as Minikube. If you do want to specify resources, uncomment the following
+  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+  # limits:
+  #   cpu: 100m
+  #   memory: 128Mi
+  # requests:
+  #   cpu: 100m
+  #   memory: 128Mi
+
+nodeSelector: {}
+
+tolerations: []
+
+affinity: {}
diff --git a/charts/physims/charts/polartest/Chart.yaml b/charts/physims/charts/polartest/Chart.yaml
new file mode 100644
index 0000000000..ae5f5ca263
--- /dev/null
+++ b/charts/physims/charts/polartest/Chart.yaml
@@ -0,0 +1,36 @@
+apiVersion: v1
+name: oai-polartest
+description: A Helm subchart for polartest network function
+
+# A chart can be either an 'application' or a 'library' chart.
+#
+# Application charts are a collection of templates that can be packaged into versioned archives
+# to be deployed.
+#
+# Library charts provide useful utilities or functions for the chart developer. They're included as
+# a dependency of application charts to inject those utilities and functions into the rendering
+# pipeline. Library charts do not define any templates and therefore cannot be deployed.
+type: application
+
+icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
+
+# This is the chart version. This version number should be incremented each time you make changes
+# to the chart and its templates, including the app version.
+version: 0.1.1
+
+# This is the version number of the application being deployed. This version number should be
+# incremented each time you make changes to the application.
+appVersion: v1
+
+keywords:
+  - Physical Simulator
+  - polartest
+  - RAN
+  - 4G
+
+sources:
+  - https://gitlab.eurecom.fr/oai/openairinterface5g
+
+maintainers:
+  - name:  OPENAIRINTERFACE
+    email: contact@openairinterface.org
diff --git a/charts/physims/charts/polartest/templates/NOTES.txt b/charts/physims/charts/polartest/templates/NOTES.txt
new file mode 100644
index 0000000000..9c2c978de0
--- /dev/null
+++ b/charts/physims/charts/polartest/templates/NOTES.txt
@@ -0,0 +1,15 @@
+1. Get the application URL by running these commands:
+{{- if contains "NodePort" .Values.service.type }}
+  export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "oai-polartest.fullname" . }})
+  export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
+  echo http://$NODE_IP:$NODE_PORT
+{{- else if contains "LoadBalancer" .Values.service.type }}
+     NOTE: It may take a few minutes for the LoadBalancer IP to be available.
+           You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "oai-polartest.fullname" . }}'
+  export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "oai-polartest.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
+  echo http://$SERVICE_IP:{{ .Values.service.port }}
+{{- else if contains "ClusterIP" .Values.service.type }}
+  export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-polartest.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
+  echo "Visit http://127.0.0.1:8080 to use your application"
+  kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80
+{{- end }}
diff --git a/charts/physims/charts/polartest/templates/_helpers.tpl b/charts/physims/charts/polartest/templates/_helpers.tpl
new file mode 100644
index 0000000000..ce81dbe525
--- /dev/null
+++ b/charts/physims/charts/polartest/templates/_helpers.tpl
@@ -0,0 +1,63 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "oai-polartest.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "oai-polartest.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "oai-polartest.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Common labels
+*/}}
+{{- define "oai-polartest.labels" -}}
+helm.sh/chart: {{ include "oai-polartest.chart" . }}
+{{ include "oai-polartest.selectorLabels" . }}
+{{- if .Chart.AppVersion }}
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+{{- end }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end -}}
+
+{{/*
+Selector labels
+*/}}
+{{- define "oai-polartest.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "oai-polartest.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end -}}
+
+{{/*
+Create the name of the service account to use
+*/}}
+{{- define "oai-polartest.serviceAccountName" -}}
+{{- if .Values.serviceAccount.create -}}
+    {{ default (include "oai-polartest.fullname" .) .Values.serviceAccount.name }}
+{{- else -}}
+    {{ default "default" .Values.serviceAccount.name }}
+{{- end -}}
+{{- end -}}
diff --git a/charts/physims/charts/polartest/templates/deployment.yaml b/charts/physims/charts/polartest/templates/deployment.yaml
new file mode 100644
index 0000000000..61bf705a02
--- /dev/null
+++ b/charts/physims/charts/polartest/templates/deployment.yaml
@@ -0,0 +1,49 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: {{ .Chart.Name }}
+  labels:
+    {{- include "oai-polartest.labels" . | nindent 4 }}
+spec:
+  replicas: {{ .Values.replicaCount }}
+  selector:
+    matchLabels:
+      {{- include "oai-polartest.selectorLabels" . | nindent 6 }}
+  strategy:
+    type: Recreate
+  template:
+    metadata:
+      labels:
+        {{- include "oai-polartest.selectorLabels" . | nindent 8 }}
+    spec:
+      securityContext:
+        {{- toYaml .Values.podSecurityContext | nindent 8 }}
+    {{- if .Values.imagePullSecrets }}
+      imagePullSecrets:
+        {{- toYaml . | nindent 8 }}
+    {{- end }}
+      containers:
+      - name: physim
+        image: "{{ .Values.image.repository }}:{{ .Values.image.version }}"
+        imagePullPolicy: {{ .Values.image.pullPolicy }}
+        securityContext:
+          {{- toYaml .Values.securityContext | nindent 12 }}
+        ports:
+        - containerPort: 80
+          name: oai-polartest
+        # volumeMounts:
+        # - mountPath: /opt/oai-polartest/certs
+        #   name: certs
+        command: ["/bin/sh", "-c"]
+        args:
+        - >  
+          export OPENAIR_DIR=/opt/oai-physim &&
+          cd cmake_targets/autotests &&
+          ./run_exec_autotests.bash -g "015103" -q -np -b &&
+          echo "FINISHED" &&
+          sleep infinity
+      dnsPolicy: ClusterFirst
+      restartPolicy: Always
+      schedulerName: default-scheduler
+      serviceAccountName: {{ .Values.global.serviceAccountName }}
+      terminationGracePeriodSeconds: 30
diff --git a/charts/physims/charts/polartest/templates/service.yaml b/charts/physims/charts/polartest/templates/service.yaml
new file mode 100644
index 0000000000..40abb6769e
--- /dev/null
+++ b/charts/physims/charts/polartest/templates/service.yaml
@@ -0,0 +1,20 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ .Chart.Name }}
+  labels:
+    {{- include "oai-polartest.labels" . | nindent 4 }}
+spec:
+  type: {{ .Values.service.type }}
+{{- if  contains "ClusterIP" .Values.service.type }}
+  clusterIP: None
+{{- end }}
+  ports:
+    - name: oai-polartest
+      # Port accessible outside cluster
+      port: {{ .Values.service.port }}
+      # Port to forward to inside the pod
+      targetPort: {{ .Values.service.Port }}
+      protocol: TCP
+  selector:
+    {{- include "oai-polartest.selectorLabels" . | nindent 4 }}
diff --git a/charts/physims/charts/polartest/values.yaml b/charts/physims/charts/polartest/values.yaml
new file mode 100644
index 0000000000..496dc8afba
--- /dev/null
+++ b/charts/physims/charts/polartest/values.yaml
@@ -0,0 +1,63 @@
+# Default values for oai-polartest.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+replicaCount: 1
+
+namespace: "oaicicd-ran-tmp"
+
+image:
+  registry: local
+  repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
+  version: temp
+  # pullPolicy: IfNotPresent or Never or Always
+  pullPolicy: Always
+
+imagePullSecrets: []
+
+nameOverride: ""
+fullnameOverride: ""
+
+serviceAccount:
+  # Specifies whether a service account should be created
+  create: true
+  # Annotations to add to the service account
+  annotations: {}
+  # The name of the service account to use.
+  # If not set and create is true, a name is generated using the fullname template
+  name: "oai-polartest-sa"
+
+podSecurityContext:
+  runAsUser: 0
+  runAsGroup: 0
+
+securityContext:
+  privileged: true
+  # capabilities:
+  #   drop:
+  #   - ALL
+  # readOnlyRootFilesystem: true
+  # runAsNonRoot: true
+  # runAsUser: 1000
+
+service:
+  type: ClusterIP
+  port: 80
+
+resources: {}
+  # We usually recommend not to specify default resources and to leave this as a conscious
+  # choice for the user. This also increases chances charts run on environments with little
+  # resources, such as Minikube. If you do want to specify resources, uncomment the following
+  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+  # limits:
+  #   cpu: 100m
+  #   memory: 128Mi
+  # requests:
+  #   cpu: 100m
+  #   memory: 128Mi
+
+nodeSelector: {}
+
+tolerations: []
+
+affinity: {}
diff --git a/charts/physims/charts/smallblocktest/Chart.yaml b/charts/physims/charts/smallblocktest/Chart.yaml
new file mode 100644
index 0000000000..74092783ae
--- /dev/null
+++ b/charts/physims/charts/smallblocktest/Chart.yaml
@@ -0,0 +1,36 @@
+apiVersion: v1
+name: oai-smallblocktest
+description: A Helm subchart for smallblocktest network function
+
+# A chart can be either an 'application' or a 'library' chart.
+#
+# Application charts are a collection of templates that can be packaged into versioned archives
+# to be deployed.
+#
+# Library charts provide useful utilities or functions for the chart developer. They're included as
+# a dependency of application charts to inject those utilities and functions into the rendering
+# pipeline. Library charts do not define any templates and therefore cannot be deployed.
+type: application
+
+icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
+
+# This is the chart version. This version number should be incremented each time you make changes
+# to the chart and its templates, including the app version.
+version: 0.1.1
+
+# This is the version number of the application being deployed. This version number should be
+# incremented each time you make changes to the application.
+appVersion: v1
+
+keywords:
+  - Physical Simulator
+  - smallblocktest
+  - RAN
+  - 4G
+
+sources:
+  - https://gitlab.eurecom.fr/oai/openairinterface5g
+
+maintainers:
+  - name:  OPENAIRINTERFACE
+    email: contact@openairinterface.org
diff --git a/charts/physims/charts/smallblocktest/templates/NOTES.txt b/charts/physims/charts/smallblocktest/templates/NOTES.txt
new file mode 100644
index 0000000000..c593dbfe22
--- /dev/null
+++ b/charts/physims/charts/smallblocktest/templates/NOTES.txt
@@ -0,0 +1,15 @@
+1. Get the application URL by running these commands:
+{{- if contains "NodePort" .Values.service.type }}
+  export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "oai-smallblocktest.fullname" . }})
+  export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
+  echo http://$NODE_IP:$NODE_PORT
+{{- else if contains "LoadBalancer" .Values.service.type }}
+     NOTE: It may take a few minutes for the LoadBalancer IP to be available.
+           You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "oai-smallblocktest.fullname" . }}'
+  export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "oai-smallblocktest.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
+  echo http://$SERVICE_IP:{{ .Values.service.port }}
+{{- else if contains "ClusterIP" .Values.service.type }}
+  export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-smallblocktest.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
+  echo "Visit http://127.0.0.1:8080 to use your application"
+  kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80
+{{- end }}
diff --git a/charts/physims/charts/smallblocktest/templates/_helpers.tpl b/charts/physims/charts/smallblocktest/templates/_helpers.tpl
new file mode 100644
index 0000000000..a3c264b33e
--- /dev/null
+++ b/charts/physims/charts/smallblocktest/templates/_helpers.tpl
@@ -0,0 +1,63 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "oai-smallblocktest.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "oai-smallblocktest.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "oai-smallblocktest.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Common labels
+*/}}
+{{- define "oai-smallblocktest.labels" -}}
+helm.sh/chart: {{ include "oai-smallblocktest.chart" . }}
+{{ include "oai-smallblocktest.selectorLabels" . }}
+{{- if .Chart.AppVersion }}
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+{{- end }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end -}}
+
+{{/*
+Selector labels
+*/}}
+{{- define "oai-smallblocktest.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "oai-smallblocktest.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end -}}
+
+{{/*
+Create the name of the service account to use
+*/}}
+{{- define "oai-smallblocktest.serviceAccountName" -}}
+{{- if .Values.serviceAccount.create -}}
+    {{ default (include "oai-smallblocktest.fullname" .) .Values.serviceAccount.name }}
+{{- else -}}
+    {{ default "default" .Values.serviceAccount.name }}
+{{- end -}}
+{{- end -}}
diff --git a/charts/physims/charts/smallblocktest/templates/deployment.yaml b/charts/physims/charts/smallblocktest/templates/deployment.yaml
new file mode 100644
index 0000000000..84fcaf41b6
--- /dev/null
+++ b/charts/physims/charts/smallblocktest/templates/deployment.yaml
@@ -0,0 +1,49 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: {{ .Chart.Name }}
+  labels:
+    {{- include "oai-smallblocktest.labels" . | nindent 4 }}
+spec:
+  replicas: {{ .Values.replicaCount }}
+  selector:
+    matchLabels:
+      {{- include "oai-smallblocktest.selectorLabels" . | nindent 6 }}
+  strategy:
+    type: Recreate
+  template:
+    metadata:
+      labels:
+        {{- include "oai-smallblocktest.selectorLabels" . | nindent 8 }}
+    spec:
+      securityContext:
+        {{- toYaml .Values.podSecurityContext | nindent 8 }}
+    {{- if .Values.imagePullSecrets }}
+      imagePullSecrets:
+        {{- toYaml . | nindent 8 }}
+    {{- end }}
+      containers:
+      - name: physim
+        image: "{{ .Values.image.repository }}:{{ .Values.image.version }}"
+        imagePullPolicy: {{ .Values.image.pullPolicy }}
+        securityContext:
+          {{- toYaml .Values.securityContext | nindent 12 }}
+        ports:
+        - containerPort: 80
+          name: oai-smallblock
+        # volumeMounts:
+        # - mountPath: /opt/oai-smallblocktest/certs
+        #   name: certs
+        command: ["/bin/sh", "-c"]
+        args:
+        - >  
+          export OPENAIR_DIR=/opt/oai-physim &&
+          cd cmake_targets/autotests &&
+          ./run_exec_autotests.bash -g "015107" -q -np -b &&
+          echo "FINISHED" &&
+          sleep infinity
+      dnsPolicy: ClusterFirst
+      restartPolicy: Always
+      schedulerName: default-scheduler
+      serviceAccountName: {{ .Values.global.serviceAccountName }}
+      terminationGracePeriodSeconds: 30
diff --git a/charts/physims/charts/smallblocktest/templates/service.yaml b/charts/physims/charts/smallblocktest/templates/service.yaml
new file mode 100644
index 0000000000..d51bf21ce4
--- /dev/null
+++ b/charts/physims/charts/smallblocktest/templates/service.yaml
@@ -0,0 +1,20 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ .Chart.Name }}
+  labels:
+    {{- include "oai-smallblocktest.labels" . | nindent 4 }}
+spec:
+  type: {{ .Values.service.type }}
+{{- if  contains "ClusterIP" .Values.service.type }}
+  clusterIP: None
+{{- end }}
+  ports:
+    - name: oai-smallblocktest
+      # Port accessible outside cluster
+      port: {{ .Values.service.port }}
+      # Port to forward to inside the pod
+      targetPort: {{ .Values.service.Port }}
+      protocol: TCP
+  selector:
+    {{- include "oai-smallblocktest.selectorLabels" . | nindent 4 }}
diff --git a/charts/physims/charts/smallblocktest/values.yaml b/charts/physims/charts/smallblocktest/values.yaml
new file mode 100644
index 0000000000..9dd791265f
--- /dev/null
+++ b/charts/physims/charts/smallblocktest/values.yaml
@@ -0,0 +1,63 @@
+# Default values for oai-smallblocktest.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+replicaCount: 1
+
+namespace: "oaicicd-ran-tmp"
+
+image:
+  registry: local
+  repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
+  version: temp
+  # pullPolicy: IfNotPresent or Never or Always
+  pullPolicy: Always
+
+imagePullSecrets: []
+
+nameOverride: ""
+fullnameOverride: ""
+
+serviceAccount:
+  # Specifies whether a service account should be created
+  create: true
+  # Annotations to add to the service account
+  annotations: {}
+  # The name of the service account to use.
+  # If not set and create is true, a name is generated using the fullname template
+  name: "oai-smallblocktest-sa"
+
+podSecurityContext:
+  runAsUser: 0
+  runAsGroup: 0
+
+securityContext:
+  privileged: true
+  # capabilities:
+  #   drop:
+  #   - ALL
+  # readOnlyRootFilesystem: true
+  # runAsNonRoot: true
+  # runAsUser: 1000
+
+service:
+  type: ClusterIP
+  port: 80
+
+resources: {}
+  # We usually recommend not to specify default resources and to leave this as a conscious
+  # choice for the user. This also increases chances charts run on environments with little
+  # resources, such as Minikube. If you do want to specify resources, uncomment the following
+  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+  # limits:
+  #   cpu: 100m
+  #   memory: 128Mi
+  # requests:
+  #   cpu: 100m
+  #   memory: 128Mi
+
+nodeSelector: {}
+
+tolerations: []
+
+affinity: {}
diff --git a/charts/physims/charts/ulsim/Chart.yaml b/charts/physims/charts/ulsim/Chart.yaml
new file mode 100644
index 0000000000..2311d729b4
--- /dev/null
+++ b/charts/physims/charts/ulsim/Chart.yaml
@@ -0,0 +1,36 @@
+apiVersion: v1
+name: oai-ulsim
+description: A Helm subchart for ulsim network function
+
+# A chart can be either an 'application' or a 'library' chart.
+#
+# Application charts are a collection of templates that can be packaged into versioned archives
+# to be deployed.
+#
+# Library charts provide useful utilities or functions for the chart developer. They're included as
+# a dependency of application charts to inject those utilities and functions into the rendering
+# pipeline. Library charts do not define any templates and therefore cannot be deployed.
+type: application
+
+icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
+
+# This is the chart version. This version number should be incremented each time you make changes
+# to the chart and its templates, including the app version.
+version: 0.1.1
+
+# This is the version number of the application being deployed. This version number should be
+# incremented each time you make changes to the application.
+appVersion: v1
+
+keywords:
+  - Physical Simulator
+  - ulsim
+  - RAN
+  - 4G
+
+sources:
+  - https://gitlab.eurecom.fr/oai/openairinterface5g
+
+maintainers:
+  - name:  OPENAIRINTERFACE
+    email: contact@openairinterface.org
diff --git a/charts/physims/charts/ulsim/templates/NOTES.txt b/charts/physims/charts/ulsim/templates/NOTES.txt
new file mode 100644
index 0000000000..91ab3ce0b7
--- /dev/null
+++ b/charts/physims/charts/ulsim/templates/NOTES.txt
@@ -0,0 +1,15 @@
+1. Get the application URL by running these commands:
+{{- if contains "NodePort" .Values.service.type }}
+  export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "oai-ulsim.fullname" . }})
+  export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
+  echo http://$NODE_IP:$NODE_PORT
+{{- else if contains "LoadBalancer" .Values.service.type }}
+     NOTE: It may take a few minutes for the LoadBalancer IP to be available.
+           You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "oai-ulsim.fullname" . }}'
+  export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "oai-ulsim.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
+  echo http://$SERVICE_IP:{{ .Values.service.port }}
+{{- else if contains "ClusterIP" .Values.service.type }}
+  export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-ulsim.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
+  echo "Visit http://127.0.0.1:8080 to use your application"
+  kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80
+{{- end }}
diff --git a/charts/physims/charts/ulsim/templates/_helpers.tpl b/charts/physims/charts/ulsim/templates/_helpers.tpl
new file mode 100644
index 0000000000..67b6500479
--- /dev/null
+++ b/charts/physims/charts/ulsim/templates/_helpers.tpl
@@ -0,0 +1,63 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "oai-ulsim.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "oai-ulsim.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "oai-ulsim.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Common labels
+*/}}
+{{- define "oai-ulsim.labels" -}}
+helm.sh/chart: {{ include "oai-ulsim.chart" . }}
+{{ include "oai-ulsim.selectorLabels" . }}
+{{- if .Chart.AppVersion }}
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+{{- end }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end -}}
+
+{{/*
+Selector labels
+*/}}
+{{- define "oai-ulsim.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "oai-ulsim.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end -}}
+
+{{/*
+Create the name of the service account to use
+*/}}
+{{- define "oai-ulsim.serviceAccountName" -}}
+{{- if .Values.serviceAccount.create -}}
+    {{ default (include "oai-ulsim.fullname" .) .Values.serviceAccount.name }}
+{{- else -}}
+    {{ default "default" .Values.serviceAccount.name }}
+{{- end -}}
+{{- end -}}
diff --git a/charts/physims/charts/ulsim/templates/deployment.yaml b/charts/physims/charts/ulsim/templates/deployment.yaml
new file mode 100644
index 0000000000..fbe6820542
--- /dev/null
+++ b/charts/physims/charts/ulsim/templates/deployment.yaml
@@ -0,0 +1,49 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: {{ .Chart.Name }}
+  labels:
+    {{- include "oai-ulsim.labels" . | nindent 4 }}
+spec:
+  replicas: {{ .Values.replicaCount }}
+  selector:
+    matchLabels:
+      {{- include "oai-ulsim.selectorLabels" . | nindent 6 }}
+  strategy:
+    type: Recreate
+  template:
+    metadata:
+      labels:
+        {{- include "oai-ulsim.selectorLabels" . | nindent 8 }}
+    spec:
+      securityContext:
+        {{- toYaml .Values.podSecurityContext | nindent 8 }}
+    {{- if .Values.imagePullSecrets }}
+      imagePullSecrets:
+        {{- toYaml . | nindent 8 }}
+    {{- end }}
+      containers:
+      - name: physim
+        image: "{{ .Values.image.repository }}:{{ .Values.image.version }}"
+        imagePullPolicy: {{ .Values.image.pullPolicy }}
+        securityContext:
+          {{- toYaml .Values.securityContext | nindent 12 }}
+        ports:
+        - containerPort: 80
+          name: oai-ulsim
+        # volumeMounts:
+        # - mountPath: /opt/oai-ulsim/certs
+        #   name: certs
+        command: ["/bin/sh", "-c"]
+        args:
+        - >  
+          export OPENAIR_DIR=/opt/oai-physim &&
+          cd cmake_targets/autotests &&
+          ./run_exec_autotests.bash -g "015101" -q -np -b &&
+          echo "FINISHED" &&
+          sleep infinity
+      dnsPolicy: ClusterFirst
+      restartPolicy: Always
+      schedulerName: default-scheduler
+      serviceAccountName: {{ .Values.global.serviceAccountName }}
+      terminationGracePeriodSeconds: 30
diff --git a/charts/physims/charts/ulsim/templates/service.yaml b/charts/physims/charts/ulsim/templates/service.yaml
new file mode 100644
index 0000000000..dcc37d6299
--- /dev/null
+++ b/charts/physims/charts/ulsim/templates/service.yaml
@@ -0,0 +1,20 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ .Chart.Name }}
+  labels:
+    {{- include "oai-ulsim.labels" . | nindent 4 }}
+spec:
+  type: {{ .Values.service.type }}
+{{- if  contains "ClusterIP" .Values.service.type }}
+  clusterIP: None
+{{- end }}
+  ports:
+    - name: oai-ulsim
+      # Port accessible outside cluster
+      port: {{ .Values.service.port }}
+      # Port to forward to inside the pod
+      targetPort: {{ .Values.service.Port }}
+      protocol: TCP
+  selector:
+    {{- include "oai-ulsim.selectorLabels" . | nindent 4 }}
diff --git a/charts/physims/charts/ulsim/values.yaml b/charts/physims/charts/ulsim/values.yaml
new file mode 100644
index 0000000000..f5110989d8
--- /dev/null
+++ b/charts/physims/charts/ulsim/values.yaml
@@ -0,0 +1,63 @@
+# Default values for oai-ulsim.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+replicaCount: 1
+
+namespace: "oaicicd-ran-tmp"
+
+image:
+  registry: local
+  repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
+  version: temp
+  # pullPolicy: IfNotPresent or Never or Always
+  pullPolicy: Always
+
+imagePullSecrets: []
+
+nameOverride: ""
+fullnameOverride: ""
+
+serviceAccount:
+  # Specifies whether a service account should be created
+  create: true
+  # Annotations to add to the service account
+  annotations: {}
+  # The name of the service account to use.
+  # If not set and create is true, a name is generated using the fullname template
+  name: "oai-ulsim-sa"
+
+podSecurityContext:
+  runAsUser: 0
+  runAsGroup: 0
+
+securityContext:
+  privileged: true
+  # capabilities:
+  #   drop:
+  #   - ALL
+  # readOnlyRootFilesystem: true
+  # runAsNonRoot: true
+  # runAsUser: 1000
+
+service:
+  type: ClusterIP
+  port: 80
+
+resources: {}
+  # We usually recommend not to specify default resources and to leave this as a conscious
+  # choice for the user. This also increases chances charts run on environments with little
+  # resources, such as Minikube. If you do want to specify resources, uncomment the following
+  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+  # limits:
+  #   cpu: 100m
+  #   memory: 128Mi
+  # requests:
+  #   cpu: 100m
+  #   memory: 128Mi
+
+nodeSelector: {}
+
+tolerations: []
+
+affinity: {}
diff --git a/charts/physims/templates/rbac.yaml b/charts/physims/templates/rbac.yaml
new file mode 100644
index 0000000000..35f956a203
--- /dev/null
+++ b/charts/physims/templates/rbac.yaml
@@ -0,0 +1,12 @@
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: ClusterRoleBinding
+metadata:
+  name: {{ .Chart.Name }}-{{ .Values.global.namespace }}-rbac
+roleRef:
+  apiGroup: rbac.authorization.k8s.io
+  kind: ClusterRole
+  name: cluster-admin
+subjects:
+- kind: ServiceAccount
+  name: {{ .Values.global.serviceAccountName }}
+  namespace: {{ .Values.global.namespace }}
diff --git a/charts/physims/templates/serviceaccount.yaml b/charts/physims/templates/serviceaccount.yaml
new file mode 100644
index 0000000000..21d094ad38
--- /dev/null
+++ b/charts/physims/templates/serviceaccount.yaml
@@ -0,0 +1,4 @@
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: {{ .Values.global.serviceAccountName }}
diff --git a/charts/physims/values.yaml b/charts/physims/values.yaml
new file mode 100644
index 0000000000..c5175cb4c0
--- /dev/null
+++ b/charts/physims/values.yaml
@@ -0,0 +1,154 @@
+# Default values for oai-physim.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+global:
+  serviceAccountName: oai-physim-sa
+  namespace: "oaicicd-ran-tmp"
+
+
+## Declaring values specific to coressponding physim to overwrite
+
+dlsim:
+  replicaCount: 1
+  image:
+    registry: local
+    repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
+    version: temp
+    # pullPolicy: IfNotPresent or Never or Always
+    pullPolicy: Always
+  service:
+    type: ClusterIP
+    port: 80
+
+ulsim:
+  replicaCount: 1
+  image:
+    registry: local
+    repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
+    version: temp
+    # pullPolicy: IfNotPresent or Never or Always
+    pullPolicy: Always
+  service:
+    type: ClusterIP
+    port: 80
+
+ldpctest:
+  replicaCount: 1
+  image:
+    registry: local
+    repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
+    version: temp
+    # pullPolicy: IfNotPresent or Never or Always
+    pullPolicy: Always
+  service:
+    type: ClusterIP
+    port: 80
+
+polartest:
+  replicaCount: 1
+  image:
+    registry: local
+    repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
+    version: temp
+    # pullPolicy: IfNotPresent or Never or Always
+    pullPolicy: Always
+  service:
+    type: ClusterIP
+    port: 80
+
+nr-pbchsim:
+  replicaCount: 1
+  image:
+    registry: local
+    repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
+    version: temp
+    # pullPolicy: IfNotPresent or Never or Always
+    pullPolicy: Always
+  service:
+    type: ClusterIP
+    port: 80
+
+nr-dlsim:
+  replicaCount: 1
+  image:
+    registry: local
+    repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
+    version: temp
+    # pullPolicy: IfNotPresent or Never or Always
+    pullPolicy: Always
+  service:
+    type: ClusterIP
+    port: 80
+
+nr-dlschsim:
+  replicaCount: 1
+  image:
+    registry: local
+    repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
+    version: temp
+    # pullPolicy: IfNotPresent or Never or Always
+    pullPolicy: Always
+  service:
+    type: ClusterIP
+    port: 80
+
+smallblocktest:
+  replicaCount: 1
+  image:
+    registry: local
+    repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
+    version: temp
+    # pullPolicy: IfNotPresent or Never or Always
+    pullPolicy: Always
+  service:
+    type: ClusterIP
+    port: 80
+
+nr-ulschsim:
+  replicaCount: 1
+  image:
+    registry: local
+    repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
+    version: temp
+    # pullPolicy: IfNotPresent or Never or Always
+    pullPolicy: Always
+  service:
+    type: ClusterIP
+    port: 80
+
+nr-pucchsim:
+  replicaCount: 1
+  image:
+    registry: local
+    repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
+    version: temp
+    # pullPolicy: IfNotPresent or Never or Always
+    pullPolicy: Always
+  service:
+    type: ClusterIP
+    port: 80
+
+nr-ulsim:
+  replicaCount: 1
+  image:
+    registry: local
+    repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
+    version: temp
+    # pullPolicy: IfNotPresent or Never or Always
+    pullPolicy: Always
+  service:
+    type: ClusterIP
+    port: 80
+
+nr-prachsim:
+  replicaCount: 1
+  image:
+    registry: local
+    repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
+    version: temp
+    # pullPolicy: IfNotPresent or Never or Always
+    pullPolicy: Always
+  service:
+    type: ClusterIP
+    port: 80

From 4189af6c7cddaceaf6d46db4bf7b937d3d462942 Mon Sep 17 00:00:00 2001
From: Sakthivel Velumani 
Date: Tue, 13 Apr 2021 08:28:29 +0200
Subject: [PATCH 142/579] Removed common txFifo for multiple threads

---
 executables/nr-ue.c                         | 25 +++++++--------------
 openair1/PHY/defs_nr_UE.h                   |  2 +-
 openair1/SCHED_NR_UE/defs.h                 |  5 ++++-
 openair1/SCHED_NR_UE/phy_procedures_nr_ue.c | 11 +++++----
 openair1/SIMULATION/NR_PHY/dlsim.c          |  3 ++-
 5 files changed, 20 insertions(+), 26 deletions(-)

diff --git a/executables/nr-ue.c b/executables/nr-ue.c
index bb3690e45f..30c551fc5e 100644
--- a/executables/nr-ue.c
+++ b/executables/nr-ue.c
@@ -324,7 +324,6 @@ void processSlotRX(void *arg) {
   fapi_nr_config_request_t *cfg = &UE->nrUE_config;
   int rx_slot_type = nr_ue_slot_select(cfg, proc->frame_rx, proc->nr_slot_rx);
   int tx_slot_type = nr_ue_slot_select(cfg, proc->frame_tx, proc->nr_slot_tx);
-  bool isTxRunning = true;
   uint8_t gNB_id = 0;
 
   if (rx_slot_type == NR_DOWNLINK_SLOT || rx_slot_type == NR_MIXED_SLOT){
@@ -340,7 +339,7 @@ void processSlotRX(void *arg) {
     phy_procedures_slot_parallelization_nrUE_RX( UE, proc, 0, 0, 1, no_relay, NULL );
 #else
     uint64_t a=rdtsc();
-    phy_procedures_nrUE_RX(UE, proc, gNB_id, get_nrUE_params()->nr_dlsch_parallel);
+    phy_procedures_nrUE_RX(UE, proc, gNB_id, get_nrUE_params()->nr_dlsch_parallel, &rxtxD->txFifo);
     LOG_D(PHY, "In %s: slot %d, time %lu\n", __FUNCTION__, proc->nr_slot_rx, (rdtsc()-a)/3500);
 #endif
 
@@ -352,15 +351,9 @@ void processSlotRX(void *arg) {
     }
 
     // Wait for PUSCH processing to finish
-    while (isTxRunning) {
-      notifiedFIFO_elt_t *res;
-      res = pullTpool(UE->txFifo,&(get_nrUE_params()->Tpool));
-      if (res->key == proc->nr_slot_tx) {
-        isTxRunning = false;
-        res->key = TX_JOB_ID;
-      }
-      pushNotifiedFIFO(UE->txFifo, res);
-    }
+    notifiedFIFO_elt_t *res;
+    res = pullTpool(&rxtxD->txFifo,&(get_nrUE_params()->Tpool));
+    delNotifiedFIFO_elt(res);
 
   } else {
     processSlotTX(rxtxD);
@@ -514,10 +507,6 @@ void *UE_thread(void *arg) {
   notifiedFIFO_t freeBlocks;
   initNotifiedFIFO_nothreadSafe(&freeBlocks);
 
-  notifiedFIFO_t txFifo;
-  UE->txFifo = &txFifo;
-  initNotifiedFIFO(&txFifo);
-
   int nbSlotProcessing=0;
   int thread_idx=0;
   NR_UE_MAC_INST_t *mac = get_mac_inst(0);
@@ -528,8 +517,10 @@ void *UE_thread(void *arg) {
   int absolute_slot=0, decoded_frame_rx=INT_MAX, trashed_frames=0;
 
   for (int i=0; itxFifo);
+    pushNotifiedFIFO_nothreadSafe(&freeBlocks, newElt);
   }
 
   while (!oai_exit) {
diff --git a/openair1/PHY/defs_nr_UE.h b/openair1/PHY/defs_nr_UE.h
index 0fa6d90617..e3c0737838 100644
--- a/openair1/PHY/defs_nr_UE.h
+++ b/openair1/PHY/defs_nr_UE.h
@@ -1073,7 +1073,6 @@ typedef struct {
   SLIST_HEAD(ral_thresholds_gen_poll_s, ral_threshold_phy_t) ral_thresholds_gen_polled[RAL_LINK_PARAM_GEN_MAX];
   SLIST_HEAD(ral_thresholds_lte_poll_s, ral_threshold_phy_t) ral_thresholds_lte_polled[RAL_LINK_PARAM_LTE_MAX];
 #endif
-  notifiedFIFO_t *txFifo;
   
   int dl_stats[5];
 
@@ -1085,6 +1084,7 @@ typedef struct {
 typedef struct nr_rxtx_thread_data_s {
   UE_nr_rxtx_proc_t proc;
   PHY_VARS_NR_UE    *UE;
+  notifiedFIFO_t txFifo;
 }  nr_rxtx_thread_data_t;
 
 #include "SIMULATION/ETH_TRANSPORT/defs.h"
diff --git a/openair1/SCHED_NR_UE/defs.h b/openair1/SCHED_NR_UE/defs.h
index f7f44a520d..2675e46a04 100644
--- a/openair1/SCHED_NR_UE/defs.h
+++ b/openair1/SCHED_NR_UE/defs.h
@@ -115,14 +115,17 @@ void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t
   @param proc           Pointer to proc information
   @param gNB_id         Local id of eNB on which to act
   @param dlsch_parallel use multithreaded dlsch processing
+  @param txFifo         Result fifo if PDSCH is run in parallel
 */
 int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
                            UE_nr_rxtx_proc_t *proc,
                            uint8_t gNB_id,
-                           uint8_t dlsch_parallel);
+                           uint8_t dlsch_parallel,
+                           notifiedFIFO_t *txFifo);
 
 int phy_procedures_slot_parallelization_nrUE_RX(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t eNB_id, uint8_t abstraction_flag, uint8_t do_pdcch_flag, relaying_type_t r_type);
 
+void processSlotTX(void *arg);
 
 #ifdef UE_SLOT_PARALLELISATION
   void *UE_thread_slot1_dl_processing(void *arg);
diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
index 7afb4e17a3..131aba1923 100644
--- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
@@ -1600,7 +1600,8 @@ int is_pbch_in_slot(fapi_nr_config_request_t *config, int frame, int slot, NR_DL
 int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
                            UE_nr_rxtx_proc_t *proc,
                            uint8_t gNB_id,
-                           uint8_t dlsch_parallel
+                           uint8_t dlsch_parallel,
+                           notifiedFIFO_t *txFifo
                            )
 {                                         
   int frame_rx = proc->frame_rx;
@@ -1759,13 +1760,11 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
 #endif //NR_PDCCH_SCHED
   
   // Start PUSCH processing here. It runs in parallel with PDSCH processing
-  notifiedFIFO_elt_t *res;
-  res = pullTpool(ue->txFifo,&(get_nrUE_params()->Tpool));
-  nr_rxtx_thread_data_t *curMsg=(nr_rxtx_thread_data_t *)NotifiedFifoData(res);
+  notifiedFIFO_elt_t *newElt = newNotifiedFIFO_elt(sizeof(nr_rxtx_thread_data_t), proc->nr_slot_tx,txFifo,processSlotTX);
+  nr_rxtx_thread_data_t *curMsg=(nr_rxtx_thread_data_t *)NotifiedFifoData(newElt);
   curMsg->proc = *proc;
   curMsg->UE = ue;
-  res->key = proc->nr_slot_tx;
-  pushTpool(&(get_nrUE_params()->Tpool), res);
+  pushTpool(&(get_nrUE_params()->Tpool), newElt);
 
 #if UE_TIMING_TRACE
   start_meas(&ue->generic_stat);
diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c
index 43d7e7f459..3e91c51057 100644
--- a/openair1/SIMULATION/NR_PHY/dlsim.c
+++ b/openair1/SIMULATION/NR_PHY/dlsim.c
@@ -1121,7 +1121,8 @@ int main(int argc, char **argv)
         phy_procedures_nrUE_RX(UE,
                                &UE_proc,
                                0,
-                               dlsch_threads);
+                               dlsch_threads,
+                               NULL);
         
         //printf("dlsim round %d ends\n",round);
         round++;

From aca57eb969c6ab333910ed22a7a0cb1a27cefcaf Mon Sep 17 00:00:00 2001
From: Robert Schmidt 
Date: Wed, 24 Mar 2021 15:56:59 +0100
Subject: [PATCH 143/579] DL scheduler: correctly calculate mixed slot TDA,
 check TDA before scheduling

---
 openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
index 9cb07255b8..392171e702 100644
--- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
@@ -100,7 +100,7 @@ void calculate_preferred_dl_tda(module_id_t module_id, const NR_BWP_Downlink_t *
                 *tdaP_Mi->k0);
     int start, len;
     SLIV2SL(tdaP_Mi->startSymbolAndLength, &start, &len);
-    const uint16_t symb_tda = ((1 << start) - 1) << start;
+    const uint16_t symb_tda = ((1 << len) - 1) << start;
     // check whether coreset and TDA overlap: then, we cannot use it. Also,
     // check whether TDA is entirely within mixed slot DL. Note that
     // here we assume that the coreset is scheduled every slot (which it
@@ -685,6 +685,11 @@ void nr_fr1_dlsch_preprocessor(module_id_t module_id, frame_t frame, sub_frame_t
   /* Get bwpSize from the first UE */
   int UE_id = UE_info->list.head;
   NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
+
+  const int tda = RC.nrmac[module_id]->preferred_dl_tda[sched_ctrl->active_bwp->bwp_Id][slot];
+  if (tda < 0)
+    return;
+
   const uint16_t bwpSize = NRRIV2BW(sched_ctrl->active_bwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
 
   uint16_t *vrb_map = RC.nrmac[module_id]->common_channels[CC_id].vrb_map;

From e04affbc7c6efa940c6698e9e137a8ba05f839c5 Mon Sep 17 00:00:00 2001
From: Robert Schmidt 
Date: Wed, 24 Mar 2021 15:57:11 +0100
Subject: [PATCH 144/579] UL scheduler: use correct TDA

---
 openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
index db4e26ae85..1f423c8074 100644
--- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
@@ -677,7 +677,7 @@ bool allocate_ul_retransmission(module_id_t module_id,
       NRRIV2BW(sched_ctrl->active_ubwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
 
   const uint8_t num_dmrs_cdm_grps_no_data = 1;
-  const int tda = RC.nrmac[module_id]->preferred_dl_tda[sched_ctrl->active_ubwp->bwp_Id][slot];
+  const int tda = RC.nrmac[module_id]->preferred_ul_tda[sched_ctrl->active_ubwp->bwp_Id][slot];
   if (tda == retInfo->time_domain_allocation) {
     /* Check the resource is enough for retransmission */
     while (rbStart < bwpSize && !rballoc_mask[rbStart])

From 80b52a8eaf8c3cb32fd20872f5649b98c1496065 Mon Sep 17 00:00:00 2001
From: Raphael Defosseux 
Date: Wed, 14 Apr 2021 11:50:50 +0200
Subject: [PATCH 145/579] [CI] : when running gNB in RA-test mode, noS1 SHALL
 be enable. Otherwise it's trying to connect to core network

Signed-off-by: Raphael Defosseux 
---
 ci-scripts/runTestOnVM.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ci-scripts/runTestOnVM.sh b/ci-scripts/runTestOnVM.sh
index f818685049..02c5e9b35a 100755
--- a/ci-scripts/runTestOnVM.sh
+++ b/ci-scripts/runTestOnVM.sh
@@ -1235,9 +1235,9 @@ function start_rf_sim_gnb {
     then
         if [ $LOC_RA_TEST -eq 0 ] #no RA test => use --phy-test option
         then
-            echo "echo \"./nr-softmodem -O /home/ubuntu/tmp/ci-scripts/conf_files/ci-$LOC_CONF_FILE --log_config.global_log_options level,nocolor --parallel-config PARALLEL_SINGLE_THREAD --noS1 --nokrnmod 1 --rfsim --phy-test\" > ./my-nr-softmodem-run.sh " >> $1
+            echo "echo \"./nr-softmodem -O /home/ubuntu/tmp/ci-scripts/conf_files/ci-$LOC_CONF_FILE --log_config.global_log_options level,nocolor --parallel-config PARALLEL_SINGLE_THREAD --noS1 --nokrnmod 1 --rfsim --phy-test --lowmem --noS1\" > ./my-nr-softmodem-run.sh " >> $1
         else #RA test => use --do-ra option
-            echo "echo \"./nr-softmodem -O /home/ubuntu/tmp/ci-scripts/conf_files/ci-$LOC_CONF_FILE --log_config.global_log_options level,nocolor --parallel-config PARALLEL_SINGLE_THREAD --rfsim --do-ra\" > ./my-nr-softmodem-run.sh " >> $1
+            echo "echo \"./nr-softmodem -O /home/ubuntu/tmp/ci-scripts/conf_files/ci-$LOC_CONF_FILE --log_config.global_log_options level,nocolor --parallel-config PARALLEL_SINGLE_THREAD --rfsim --do-ra --lowmem --noS1\" > ./my-nr-softmodem-run.sh " >> $1
         fi
     fi
     echo "chmod 775 ./my-nr-softmodem-run.sh" >> $1

From 8edacdede422b6cc1ad47e227e9493e22b03fd3e Mon Sep 17 00:00:00 2001
From: Robert Schmidt 
Date: Tue, 13 Apr 2021 10:31:43 +0200
Subject: [PATCH 146/579] UL Scheduler: Check vrb_map_UL against symb map

---
 .../LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c | 27 ++++++++++---------
 .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c   | 14 +++++++---
 2 files changed, 25 insertions(+), 16 deletions(-)

diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
index 6c4e3398f1..f2a3718410 100644
--- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
+++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
@@ -426,13 +426,26 @@ bool nr_ul_preprocessor_phytest(module_id_t module_id, frame_t frame, sub_frame_
   if (!is_xlsch_in_slot(ulsch_slot_bitmap, sched_slot))
     return false;
 
+  const long f = sched_ctrl->search_space->searchSpaceType->choice.ue_Specific->dci_Formats;
+  const int dci_format = f ? NR_UL_DCI_FORMAT_0_1 : NR_UL_DCI_FORMAT_0_0;
+  const uint8_t num_dmrs_cdm_grps_no_data = 1;
+  /* we want to avoid a lengthy deduction of DMRS and other parameters in
+   * every TTI if we can save it, so check whether dci_format, TDA, or
+   * num_dmrs_cdm_grps_no_data has changed and only then recompute */
+  NR_pusch_semi_static_t *ps = &sched_ctrl->pusch_semi_static;
+  if (ps->time_domain_allocation != tda
+      || ps->dci_format != dci_format
+      || ps->num_dmrs_cdm_grps_no_data != num_dmrs_cdm_grps_no_data)
+    nr_set_pusch_semi_static(scc, sched_ctrl->active_ubwp, dci_format, tda, num_dmrs_cdm_grps_no_data, ps);
+
   uint16_t rbStart = 0;
   uint16_t rbSize = target_ul_bw;
 
   uint16_t *vrb_map_UL =
       &RC.nrmac[module_id]->common_channels[CC_id].vrb_map_UL[sched_slot * MAX_BWP_SIZE];
+  const uint16_t symb = ((1 << ps->nrOfSymbols) - 1) << ps->startSymbolIndex;
   for (int i = rbStart; i < rbStart + rbSize; ++i) {
-    if (vrb_map_UL[i]) {
+    if ((vrb_map_UL[i] & symb) != 0) {
       LOG_E(MAC,
             "%s(): %4d.%2d RB %d is already reserved, cannot schedule UE\n",
             __func__,
@@ -466,18 +479,6 @@ bool nr_ul_preprocessor_phytest(module_id_t module_id, frame_t frame, sub_frame_
   }
   UE_info->num_pdcch_cand[UE_id][cid]++;
 
-  const long f = sched_ctrl->search_space->searchSpaceType->choice.ue_Specific->dci_Formats;
-  const int dci_format = f ? NR_UL_DCI_FORMAT_0_1 : NR_UL_DCI_FORMAT_0_0;
-  const uint8_t num_dmrs_cdm_grps_no_data = 1;
-  /* we want to avoid a lengthy deduction of DMRS and other parameters in
-   * every TTI if we can save it, so check whether dci_format, TDA, or
-   * num_dmrs_cdm_grps_no_data has changed and only then recompute */
-  NR_pusch_semi_static_t *ps = &sched_ctrl->pusch_semi_static;
-  if (ps->time_domain_allocation != tda
-      || ps->dci_format != dci_format
-      || ps->num_dmrs_cdm_grps_no_data != num_dmrs_cdm_grps_no_data)
-    nr_set_pusch_semi_static(scc, sched_ctrl->active_ubwp, dci_format, tda, num_dmrs_cdm_grps_no_data, ps);
-
   const int mcs = target_ul_mcs;
   NR_sched_pusch_t *sched_pusch = &sched_ctrl->sched_pusch;
   sched_pusch->mcs = mcs;
diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
index 1f423c8074..3df004770a 100644
--- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
@@ -1023,16 +1023,24 @@ bool nr_fr1_ulsch_preprocessor(module_id_t module_id, frame_t frame, sub_frame_t
     sched_ctrl->sched_pusch.frame = sched_frame;
   }
 
-  /* Change vrb_map_UL to rballoc_mask */
+  /* Change vrb_map_UL to rballoc_mask: check which symbols per RB (in
+   * vrb_map_UL) overlap with the "default" tda and exclude those RBs.
+   * Calculate largest contiguous RBs */
   uint16_t *vrb_map_UL =
       &RC.nrmac[module_id]->common_channels[CC_id].vrb_map_UL[sched_slot * MAX_BWP_SIZE];
   const uint16_t bwpSize = NRRIV2BW(sched_ctrl->active_ubwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
+  const struct NR_PUSCH_TimeDomainResourceAllocationList *tdaList =
+    sched_ctrl->active_ubwp->bwp_Common->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList;
+  const int startSymbolAndLength = tdaList->list.array[tda]->startSymbolAndLength;
+  int startSymbolIndex, nrOfSymbols;
+  SLIV2SL(startSymbolAndLength, &startSymbolIndex, &nrOfSymbols);
+  const uint16_t symb = ((1 << nrOfSymbols) - 1) << startSymbolIndex;
   int st = 0, e = 0, len = 0;
   for (int i = 0; i < bwpSize; i++) {
-    while (vrb_map_UL[i] == 1)
+    while ((vrb_map_UL[i] & symb) != 0 && i < bwpSize)
       i++;
     st = i;
-    while (vrb_map_UL[i] == 0)
+    while ((vrb_map_UL[i] & symb) == 0 && i < bwpSize)
       i++;
     if (i - st > len) {
       len = i - st;

From b10ba9f88c9dcfe68f0febfaed594a56761de4d1 Mon Sep 17 00:00:00 2001
From: Robert Schmidt 
Date: Mon, 12 Apr 2021 11:47:34 +0200
Subject: [PATCH 147/579] Fix: don't go beyond 3rd retx

---
 openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c   | 2 +-
 openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
index bdd6cf0c1d..7156945616 100644
--- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
@@ -569,7 +569,7 @@ static void handle_dl_harq(module_id_t mod_id,
     add_tail_nr_list(&UE_info->UE_sched_ctrl[UE_id].available_dl_harq, harq_pid);
     harq->round = 0;
     harq->ndi ^= 1;
-  } else if (harq->round == MAX_HARQ_ROUNDS) {
+  } else if (harq->round >= MAX_HARQ_ROUNDS - 1) {
     add_tail_nr_list(&UE_info->UE_sched_ctrl[UE_id].available_dl_harq, harq_pid);
     harq->round = 0;
     harq->ndi ^= 1;
diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
index 3df004770a..323967d64d 100644
--- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
@@ -492,7 +492,7 @@ void handle_nr_ul_harq(module_id_t mod_id,
           harq_pid,
           crc_pdu->rnti);
     add_tail_nr_list(&sched_ctrl->available_ul_harq, harq_pid);
-  } else if (harq->round == MAX_HARQ_ROUNDS) {
+  } else if (harq->round >= MAX_HARQ_ROUNDS - 1) {
     abort_nr_ul_harq(mod_id, UE_id, harq_pid);
     LOG_D(MAC,
           "RNTI %04x: Ulharq id %d crc failed in all rounds\n",

From 71ecec6744ab27d70f708bdc3005e63905be3781 Mon Sep 17 00:00:00 2001
From: Robert Schmidt 
Date: Mon, 12 Apr 2021 11:47:57 +0200
Subject: [PATCH 148/579] Fix: mark delayed HARQ feedback as free

---
 openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
index 323967d64d..d33915033d 100644
--- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
@@ -476,6 +476,7 @@ void handle_nr_ul_harq(module_id_t mod_id,
 
     remove_front_nr_list(&sched_ctrl->feedback_ul_harq);
     sched_ctrl->ul_harq_processes[harq_pid].round++;
+    sched_ctrl->ul_harq_processes[harq_pid].is_waiting = false;
     add_tail_nr_list(&sched_ctrl->retrans_ul_harq, harq_pid);
     harq_pid = sched_ctrl->feedback_ul_harq.head;
   }

From e67a50719a65ac96b0da25e6ed668d8d6e413b6b Mon Sep 17 00:00:00 2001
From: Mohammed Ismail 
Date: Mon, 12 Apr 2021 15:44:53 +0200
Subject: [PATCH 149/579] CI: fix on phySim

Signed-off-by: Mohammed Ismail 
---
 ci-scripts/Jenkinsfile-physim-deploy |  21 ++++-
 ci-scripts/cls_physim1.py            | 112 ++++++++++++++++++++-------
 ci-scripts/html.py                   |  48 +++++++++---
 3 files changed, 140 insertions(+), 41 deletions(-)

diff --git a/ci-scripts/Jenkinsfile-physim-deploy b/ci-scripts/Jenkinsfile-physim-deploy
index a6ad112b23..5eff0b34be 100644
--- a/ci-scripts/Jenkinsfile-physim-deploy
+++ b/ci-scripts/Jenkinsfile-physim-deploy
@@ -207,5 +207,24 @@ pipeline {
         } 
       }
     }
-  }
+    stage ("Log Collection") {
+      steps {
+        script {
+          dir ('ci-scripts') {
+            // Zipping all archived log files
+            sh "zip -r -qq physim_deploytest_logs_${env.BUILD_ID}.zip physim_test_logs_*/*"
+            sh "rm -rf physim_test_logs_*/"
+            if (fileExists("physim_deploytest_logs_${env.BUILD_ID}.zip")) {
+              archiveArtifacts artifacts: "physim_deploytest_logs_${env.BUILD_ID}.zip"
+            }
+            if (fileExists("test_results.html")) {
+              sh "mv test_results.html test_results_${env.JOB_NAME}.html"
+              sh "sed -i -e 's#TEMPLATE_JOB_NAME#${JOB_NAME}#' -e 's@build #TEMPLATE_BUILD_ID@build #${BUILD_ID}@' -e 's#Build-ID: TEMPLATE_BUILD_ID#Build-ID: ${BUILD_ID}#' -e 's#TEMPLATE_STAGE_NAME#${testStageName}#' test_results_${JOB_NAME}.html"
+              archiveArtifacts artifacts: "test_results_${env.JOB_NAME}.html"
+            }
+          }
+        }
+      }
+    }
+  }  
 }  
\ No newline at end of file
diff --git a/ci-scripts/cls_physim1.py b/ci-scripts/cls_physim1.py
index 69e5f030cc..24f789e898 100644
--- a/ci-scripts/cls_physim1.py
+++ b/ci-scripts/cls_physim1.py
@@ -55,6 +55,9 @@ class PhySim:
 		self.ranCommitID= ""
 		self.ranAllowMerge= ""
 		self.ranTargetBranch= ""
+		self.testResult = {}
+		self.testCount = [0,0,0]
+		self.testSummary = {}
 		self.exitStatus=0
 
 #-----------------$
@@ -101,7 +104,8 @@ class PhySim:
 		if self.ranCommitID != '':
 			mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 5)
 
-		mySSH.command("sudo podman image inspect --format='Size = {{.Size}} bytes' oai-physim:ci-temp", '\$', 60)
+		# Check if image is exist on the Red Hat server, before pushing it to OC cluster
+		mySSH.command("sudo podman image inspect --format='Size = {{.Size}} bytes' oai-physim:temp", '\$', 60)
 		if mySSH.getBefore().count('no such image') != 0:
 			logging.error('\u001B[1m No such image oai-physim\u001B[0m')
 			sys.exit(-1)
@@ -122,9 +126,8 @@ class PhySim:
 			else:
 				logging.debug('oai-physim size is unknown')
 
-		# logging to OC cluster
+		# logging to OC Cluster and then switch to corresponding project 
 		mySSH.command(f'oc login -u {ocUserName} -p {ocPassword}', '\$', 6)
-		print(mySSH.getBefore())
 		if mySSH.getBefore().count('Login successful.') == 0:
 			logging.error('\u001B[1m OC Cluster Login Failed\u001B[0m')
 			sys.exit(-1)
@@ -136,25 +139,51 @@ class PhySim:
 			sys.exit(-1)
 		else:
 			logging.debug(f'\u001B[1m   Now using project {ocWorkspace}\u001B[0m')
-        
+
+		# Tag the image and push to the OC cluster
+		mySSH.command('oc whoami -t | sudo podman login -u ' + ocUserName + ' --password-stdin https://default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/ --tls-verify=false', '\$', 6)
+		if mySSH.getBefore().count('Login Succeeded!') == 0:
+			logging.error('\u001B[1m Podman Login to OC Cluster Registry Failed\u001B[0m')
+			sys.exit(-1)
+		else:
+			logging.debug('\u001B[1m Podman Login to OC Cluster Registry Successfully\u001B[0m')
+		mySSH.command(f'sudo podman tag oai-physim:temp default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/{self.OCWorkspace}/oai-physim:temp', '\$', 6)
+		mySSH.command(f'sudo podman push default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/{self.OCWorkspace}/oai-physim:temp --tls-verify=false', '\$', 6)
+		if mySSH.getBefore().count('Storing signatures') == 0:
+			logging.error('\u001B[1m Image "oai-physim" push to OC Cluster Registry Failed\u001B[0m')
+			sys.exit(-1)
+		else:
+			logging.debug('\u001B[1m Image "oai-physim" push to OC Cluster Registry Successfully\u001B[0m')
+
 		# Using helm charts deployment
-		mySSH.command('helm install physim ./charts/physims/', '\$', 6)
+		mySSH.command('helm install physim ./charts/physims/ | tee -a cmake_targets/log/physim_helm_summary.txt 2>&1', '\$', 6)
 		if mySSH.getBefore().count('STATUS: deployed') == 0:
-			logging.error('\u001B[1m Deploying PhySim Failed using helm chart\u001B[0m')
+			logging.error('\u001B[1m Deploying PhySim Failed using helm chart on OC Cluster\u001B[0m')
+			mySSH.command('helm uninstall physim >> cmake_targets/log/physim_helm_summary.txt 2>&1', '\$', 6)
+			self.AnalyzeLogFile_phySim(HTML)
 			sys.exit(-1)
 		else:
 			logging.debug('\u001B[1m   Deployed PhySim Successfully using helm chart\u001B[0m')
 		isRunning = False
-		while(isRunning == False):
+		count = 0
+		while(count < 2 and isRunning == False):
+			time.sleep(60)
 			mySSH.command('oc get pods -l app.kubernetes.io/instance=physim', '\$', 6)
 			if mySSH.getBefore().count('Running') == 12:
 				logging.debug('\u001B[1m Running the physim test Scenarios\u001B[0m')
 				isRunning = True
 				podNames = re.findall('oai[\S\d\w]+', mySSH.getBefore())
+			count +=1
+		if isRunning == False:
+			logging.error('\u001B[1m Some PODS Running FAILED \u001B[0m')
+			mySSH.command('oc get pods -l app.kubernetes.io/instance=physim > cmake_targets/log/physim_pods_summary.txt 2>&1', '\$', 6)
+			mySSH.command('helm uninstall physim >> cmake_targets/log/physim_helm_summary.txt 2>&1', '\$', 6)
+			self.AnalyzeLogFile_phySim(HTML)
+			sys.exit(-1)
 		# Waiting to complete the running test
 		count = 0
 		isFinished = False
-		while(count < 25 or isFinished == False):
+		while(count < 25 and isFinished == False):
 			time.sleep(60)
 			mySSH.command('oc get pods -l app.kubernetes.io/instance=physim', '\$', 6)
 			result = re.search('oai-nr-dlsim[\S\d\w]+', mySSH.getBefore())
@@ -170,38 +199,61 @@ class PhySim:
 		# Getting the logs of each executables running in individual pods
 		for podName in podNames:
 			mySSH.command(f'oc logs {podName} >> cmake_targets/log/physim_test.txt 2>&1', '\$', 6)
-		mySSH.command('cd ' + lSourcePath + '/cmake_targets', '\$', 5)
-		mySSH.command('mkdir -p physim_test_log_' + self.testCase_id, '\$', 5)
-		mySSH.command('mv log/* ' + 'physim_test_log_' + self.testCase_id, '\$', 5)
+
 		# UnDeploy the physical simulator pods
-		mySSH.command('helm uninstall physim', '\$', 10)
+		mySSH.command('helm uninstall physim | tee -a cmake_targets/log/physim_helm_summary.txt 2>&1', '\$', 6)
 		if mySSH.getBefore().count('release "physim" uninstalled') != 0:
 			logging.debug('\u001B[1m UnDeployed PhySim Successfully on OC Cluster\u001B[0m')
 		else:
 			logging.debug('\u001B[1m Failed to UnDeploy PhySim on OC Cluster\u001B[0m')
+		mySSH.command('oc logout', '\$', 6)
 		mySSH.close()
-		mySSH.copyin(lIpAddr, lUserName, lPassWord, lSourcePath + '/cmake_targets/physim_test_log_' + self.testCase_id + '/*', '.')
-		testResult = {}
-		testCount = 0
-		if (os.path.isfile('./physim_test.txt')):
-			with open('./physim_test.txt', 'r') as logfile:
+		self.AnalyzeLogFile_phySim(HTML)
+
+	def AnalyzeLogFile_phySim(self, HTML):
+		lIpAddr = self.eNBIPAddress
+		lUserName = self.eNBUserName
+		lPassWord = self.eNBPassword
+		lSourcePath = self.eNBSourceCodePath
+		mySSH = SSH.SSHConnection()
+		mySSH.open(lIpAddr, lUserName, lPassWord)
+		mySSH.command('cd ' + lSourcePath, '\$', 5)
+		mySSH.command('cd ' + lSourcePath + '/cmake_targets', '\$', 5)
+		mySSH.command('mkdir -p physim_test_log_' + self.testCase_id, '\$', 5)
+		mySSH.command('mv log/physim_* ' + 'physim_test_log_' + self.testCase_id, '\$', 5)		
+		if not os.path.exists(f'./physim_test_logs_{self.testCase_id}'):
+			os.mkdir(f'./physim_test_logs_{self.testCase_id}')
+		mySSH.copyin(lIpAddr, lUserName, lPassWord, lSourcePath + '/cmake_targets/physim_test_log_' + self.testCase_id + '/*', './physim_test_logs_' + self.testCase_id)
+		mySSH.command('rm -rf ./physim_test_log_'+ self.testCase_id, '\$', 5)
+		mySSH.command('oc logout', '\$', 6)
+		mySSH.close()
+		# physim test log analysis
+		nextt = 0
+		if (os.path.isfile(f'./physim_test_logs_{self.testCase_id}/physim_test.txt')):
+			with open(f'./physim_test_logs_{self.testCase_id}/physim_test.txt', 'r') as logfile:
 				for line in logfile:
-					ret = re.search('execution', str(line))
-					if ret is not None:
-						testCount += 1
+					if re.search('execution 015', str(line)) or re.search('Bypassing compilation', str(line)):
+						nextt = 1
+					elif nextt == 1:
+						if not re.search('Test Results', str(line)):
+							nextt = 0
+							ret2 = re.search('T[^\n]*', str(line))
+							if ret2 is not None:
+								ret3 = ret2.group()
+					if re.search('execution 015', str(line)):
+						self.testCount[0] += 1
 						testName = line.split()
 						ret1 = re.search('Result = PASS', str(line))
 						if ret1 is not None:
-							testResult[testName[1]] = 'PASS'
+							self.testResult[testName[1]] = [ret3, 'PASS']
+							self.testCount[1] += 1
 						else:
-							testResult[testName[1]] = 'FAIL'				
-		
+							self.testResult[testName[1]] = [ret3, 'FAIL']
+							self.testCount[2] += 1									
+		self.testSummary['Nbtests'] = self.testCount[0]
+		self.testSummary['Nbpass'] =  self.testCount[1]
+		self.testSummary['Nbfail'] =  self.testCount[2]
 		HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
-		HTML.CreateHtmlTestRowPhySimTestResult(testResult)
+		HTML.CreateHtmlTestRowPhySimTestResult(self.testSummary,self.testResult)
 		logging.info('\u001B[1m Physical Simulator Pass\u001B[0m')
-
-		return 0
-
-
-            
-
+		return 0
\ No newline at end of file
diff --git a/ci-scripts/html.py b/ci-scripts/html.py
index 538906d5bf..c54712239b 100644
--- a/ci-scripts/html.py
+++ b/ci-scripts/html.py
@@ -563,21 +563,49 @@ class HTMLManagement():
 			self.htmlFile.write('      \n')
 			vId += 1
 
-	def CreateHtmlTestRowPhySimTestResult(self, testResult):
+	def CreateHtmlTestRowPhySimTestResult(self, testSummary, testResult):
 		if (self.htmlFooterCreated or (not self.htmlHeaderCreated)):
 			return
 		self.htmlFile = open('test_results.html', 'a')
+		if bool(testResult) == False and bool(testSummary) == False:
+			self.htmlFile.write('      \n')
+			self.htmlFile.write('         ----PHYSIM TESTING FAILED - Unable to recover the test logs ---- \n')
+			self.htmlFile.write('      \n')
+		else:
 		# Tab header
-		self.htmlFile.write('      \n')
-		self.htmlFile.write('        Test Description\n')
-		self.htmlFile.write('        Result\n')
-		self.htmlFile.write('      \n')
-		for key, value in testResult.items():
+			self.htmlFile.write('      \n')
+			self.htmlFile.write('         ---- PHYSIM TEST SUMMARY---- \n')
+			self.htmlFile.write('      \n')
+			self.htmlFile.write('      \n')
+			self.htmlFile.write('        LogFile Name\n')
+			self.htmlFile.write('        Nb Tests\n')
+			self.htmlFile.write('        Nb Failure\n')
+			self.htmlFile.write('        Nb Pass\n')
+			self.htmlFile.write('      \n')
 			self.htmlFile.write('      \n')
-			self.htmlFile.write('        ' + key  + ' \n')
-			if value == 'PASS':
-				self.htmlFile.write('        ' + value  + '\n')
+			self.htmlFile.write('         physim_test.txt  \n')
+			self.htmlFile.write('        ' + str(testSummary['Nbtests']) + ' \n')
+			if testSummary['Nbfail'] == 0:
+				self.htmlFile.write('        ' + str(testSummary['Nbfail']) + ' \n')
 			else:
-				self.htmlFile.write('        ' + value  + '\n')	
+				self.htmlFile.write('        ' + str(testSummary['Nbfail']) + ' \n')
+			self.htmlFile.write('        ' + str(testSummary['Nbpass']) + ' \n')
+			self.htmlFile.write('      \n')
+			self.htmlFile.write('      \n')
+			self.htmlFile.write('         ---- PHYSIM TEST DETAIL INFO---- \n')
+			self.htmlFile.write('      \n')
+			self.htmlFile.write('      \n')
+			self.htmlFile.write('        Test Name\n')
+			self.htmlFile.write('        Test Description\n')
+			self.htmlFile.write('        Result\n')
+			self.htmlFile.write('      \n')
+			for key, value in testResult.items():
+				self.htmlFile.write('      \n')
+				self.htmlFile.write('        ' + key  + ' \n')
+				self.htmlFile.write('        ' + value[0]  + '\n')
+				if 'PASS' in value:
+					self.htmlFile.write('        ' + value[1]  + '\n')
+				else:
+					self.htmlFile.write('        ' + value[1]  + '\n')	
             
 		self.htmlFile.close()
\ No newline at end of file

From 2c907fb6e5e9030d613e10ddff889ce0469b5f3d Mon Sep 17 00:00:00 2001
From: rmagueta 
Date: Thu, 15 Apr 2021 15:09:22 +0100
Subject: [PATCH 150/579] Fix minor issues of develop

---
 openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c | 1 +
 openair2/RRC/LTE/rrc_eNB_GTPV1U.c              | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
index 79bfbec1fc..3483182088 100644
--- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
+++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
@@ -324,6 +324,7 @@ void schedule_control_sib1(module_id_t module_id,
     gNB_mac->sched_ctrlCommon = calloc(1,sizeof(*gNB_mac->sched_ctrlCommon));
     gNB_mac->sched_ctrlCommon->search_space = calloc(1,sizeof(*gNB_mac->sched_ctrlCommon->search_space));
     gNB_mac->sched_ctrlCommon->coreset = calloc(1,sizeof(*gNB_mac->sched_ctrlCommon->coreset));
+    gNB_mac->sched_ctrlCommon->active_bwp = calloc(1,sizeof(*gNB_mac->sched_ctrlCommon->active_bwp));
     fill_default_searchSpaceZero(gNB_mac->sched_ctrlCommon->search_space);
     fill_default_coresetZero(gNB_mac->sched_ctrlCommon->coreset,servingcellconfigcommon);
     fill_default_initialDownlinkBWP(gNB_mac->sched_ctrlCommon->active_bwp,servingcellconfigcommon);
diff --git a/openair2/RRC/LTE/rrc_eNB_GTPV1U.c b/openair2/RRC/LTE/rrc_eNB_GTPV1U.c
index 6683d91556..3bdf4f4e71 100644
--- a/openair2/RRC/LTE/rrc_eNB_GTPV1U.c
+++ b/openair2/RRC/LTE/rrc_eNB_GTPV1U.c
@@ -249,7 +249,7 @@ boolean_t gtpv_data_req_new (
 	return result;
       } else {  /* It is from from epc message */
 	/* in the source enb, UE in RRC_HO_EXECUTION mode */
-	MessageDef *msg;
+	//MessageDef *msg;
 	// ?????
 	return true;
       }

From bd580dac2048169117dd9dd8832fe740d1f1abfb Mon Sep 17 00:00:00 2001
From: Mohammed Ismail 
Date: Thu, 15 Apr 2021 17:55:19 +0200
Subject: [PATCH 151/579] CI: update

Signed-off-by: Mohammed Ismail 
---
 ci-scripts/cls_physim1.py | 1 +
 ci-scripts/html.py        | 7 +++++++
 2 files changed, 8 insertions(+)

diff --git a/ci-scripts/cls_physim1.py b/ci-scripts/cls_physim1.py
index 24f789e898..70b2eae046 100644
--- a/ci-scripts/cls_physim1.py
+++ b/ci-scripts/cls_physim1.py
@@ -240,6 +240,7 @@ class PhySim:
 							ret2 = re.search('T[^\n]*', str(line))
 							if ret2 is not None:
 								ret3 = ret2.group()
+								ret3 = ret3.replace("", "")
 					if re.search('execution 015', str(line)):
 						self.testCount[0] += 1
 						testName = line.split()
diff --git a/ci-scripts/html.py b/ci-scripts/html.py
index c54712239b..350cb3c50a 100644
--- a/ci-scripts/html.py
+++ b/ci-scripts/html.py
@@ -599,7 +599,14 @@ class HTMLManagement():
 			self.htmlFile.write('        Test Description\n')
 			self.htmlFile.write('        Result\n')
 			self.htmlFile.write('      \n')
+			y = ''
 			for key, value in testResult.items():
+				x = key.split(".")
+				if x[0] != y:
+					self.htmlFile.write('      \n')
+					self.htmlFile.write('        "' + x[0] + '" series \n')
+					self.htmlFile.write('      \n')
+					y = x[0]
 				self.htmlFile.write('      \n')
 				self.htmlFile.write('        ' + key  + ' \n')
 				self.htmlFile.write('        ' + value[0]  + '\n')

From 31a753b38f2e583cf2b5ae3564fa53339fcc3581 Mon Sep 17 00:00:00 2001
From: rmagueta 
Date: Thu, 15 Apr 2021 18:02:53 +0100
Subject: [PATCH 152/579] Fix build error

---
 cmake_targets/CMakeLists.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt
index 5c51548dfa..7cc918dfba 100644
--- a/cmake_targets/CMakeLists.txt
+++ b/cmake_targets/CMakeLists.txt
@@ -794,6 +794,7 @@ add_dependencies(X2AP_ENB X2AP_LIB rrc_flag x2_flag)
 
 # F1AP
 ##############
+set (F1AP_RELEASE R16)
 add_list1_option(F1AP_RELEASE R16 "F1AP ASN.1 grammar version" R16)
 set(F1AP_DIR ${OPENAIR2_DIR}/F1AP)
 if (${F1AP_RELEASE} STREQUAL "R16")

From 131cef2b6b132437d1b7648048e86f9304d5a985 Mon Sep 17 00:00:00 2001
From: rmagueta 
Date: Thu, 15 Apr 2021 22:59:35 +0100
Subject: [PATCH 153/579] Fix build warnings

---
 executables/nr-uesoftmodem.h                  |  2 +-
 openair1/PHY/INIT/nr_parms.c                  |  4 +-
 openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c   |  2 +-
 .../PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c   | 94 ++++++++++++++++++-
 .../NR_UE_TRANSPORT/nr_dlsch_demodulation.c   | 91 ------------------
 openair1/SCHED_NR_UE/pucch_uci_ue_nr.c        |  5 +-
 openair2/F1AP/f1ap_du_rrc_message_transfer.c  | 23 +++--
 openair2/GNB_APP/gnb_app.c                    | 34 +++++++
 openair2/LAYER2/NR_MAC_UE/mac_proto.h         |  4 +
 openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c  |  4 +-
 openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c   |  4 +-
 openair2/RRC/NR/L2_nr_interface.c             |  3 +
 openair2/RRC/NR/MESSAGES/asn1_msg.c           |  2 +-
 openair2/RRC/NR/rrc_gNB.c                     |  3 -
 openair2/RRC/NR/rrc_gNB_NGAP.c                |  1 -
 openair2/RRC/NR_UE/L2_interface_ue.c          |  2 +-
 openair2/RRC/NR_UE/rrc_UE.c                   |  1 -
 openair3/GTPV1-U/gtpv1u_gNB.c                 |  2 +
 .../ETHERNET/USERSPACE/LIB/ethernet_lib.c     |  1 +
 19 files changed, 165 insertions(+), 117 deletions(-)

diff --git a/executables/nr-uesoftmodem.h b/executables/nr-uesoftmodem.h
index 2b14c0a14b..b4dfabcccb 100644
--- a/executables/nr-uesoftmodem.h
+++ b/executables/nr-uesoftmodem.h
@@ -55,7 +55,7 @@
     {"ue-scan-carrier",          CONFIG_HLP_UESCAN,      PARAMFLAG_BOOL,  iptr:&(UE->UE_scan_carrier),        defintval:0,           TYPE_INT,      0},     \
     {"ue-fo-compensation",       CONFIG_HLP_UEFO,        PARAMFLAG_BOOL,  iptr:&(UE->UE_fo_compensation),     defintval:0,           TYPE_INT,      0},     \
     {"ue-max-power",             NULL,                   0,               iptr:&(tx_max_power[0]),            defintval:90,          TYPE_INT,      0},     \
-    {"r"  ,                      CONFIG_HLP_PRB,         0,               iptr:&(N_RB_DL),                    defintval:160,         TYPE_UINT,     0},     \
+    {"r"  ,                      CONFIG_HLP_PRB,         0,               iptr:&(fp->N_RB_DL),                defintval:160,          TYPE_UINT,     0},     \
     {"A" ,                       CONFIG_HLP_TADV,        0,               iptr:&(UE->timing_advance),         defintval:0,           TYPE_INT,      0}, \
     {"E" ,                       CONFIG_HLP_TQFS,        PARAMFLAG_BOOL,  u8ptr:&(fp->threequarter_fs),       defintval:0,           TYPE_UINT8,    0}, \
     {"T" ,                       CONFIG_HLP_TDD,         PARAMFLAG_BOOL,  iptr:&tddflag,                      defintval:0,           TYPE_INT,      0}, \
diff --git a/openair1/PHY/INIT/nr_parms.c b/openair1/PHY/INIT/nr_parms.c
index c0c298a25d..9aabc5e1e9 100644
--- a/openair1/PHY/INIT/nr_parms.c
+++ b/openair1/PHY/INIT/nr_parms.c
@@ -263,9 +263,9 @@ int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *fp,
 
 
   uint64_t dl_bw_khz = (12*config->carrier_config.dl_grid_size[config->ssb_config.scs_common])*(15<ssb_config.scs_common);
-  LOG_I(PHY,"dl_bw_kHz %llu\n",dl_bw_khz);
+  LOG_I(PHY,"dl_bw_kHz %lu\n",dl_bw_khz);
   fp->dl_CarrierFreq = ((dl_bw_khz>>1) + config->carrier_config.dl_frequency)*1000 ;
-  LOG_I(PHY,"dl_CarrierFreq %llu\n",fp->dl_CarrierFreq);
+  LOG_I(PHY,"dl_CarrierFreq %lu\n",fp->dl_CarrierFreq);
 
   uint64_t ul_bw_khz = (12*config->carrier_config.ul_grid_size[config->ssb_config.scs_common])*(15<ssb_config.scs_common);
   fp->ul_CarrierFreq = ((ul_bw_khz>>1) + config->carrier_config.uplink_frequency)*1000 ;
diff --git a/openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c b/openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
index 2ae914ce53..474851480e 100644
--- a/openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
+++ b/openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
@@ -288,7 +288,7 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
   }
   G = nr_get_G(nb_rb, nb_symb_sch, nb_re_dmrs, length_dmrs,mod_order,rel15->nrOfLayers);
 
-  LOG_D(PHY,"dlsch coding A %d G %d (nb_rb %d, nb_symb_sch %d, nb_re_dmrs %d, length_dmrs %d, mod_order %d mod_order %d)\n", A,G, nb_rb,nb_symb_sch,nb_re_dmrs,length_dmrs,mod_order);
+  LOG_D(PHY,"dlsch coding A %d G %d (nb_rb %d, nb_symb_sch %d, nb_re_dmrs %d, length_dmrs %d, mod_order %d)\n", A,G, nb_rb,nb_symb_sch,nb_re_dmrs,length_dmrs,mod_order);
 
   if (A > 3824) {
     // Add 24-bit crc (polynomial A) to payload
diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
index 059998becd..b1a0506941 100644
--- a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
+++ b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
@@ -232,6 +232,96 @@ void nr_dlsch_unscrambling(int16_t* llr,
 
 }
 
+void dump_nrdlsch(PHY_VARS_NR_UE *ue,uint8_t gNB_id,uint8_t nr_slot_rx,unsigned int *coded_bits_per_codeword,int round,  unsigned char harq_pid)
+{
+  unsigned int nsymb = (ue->frame_parms.Ncp == 0) ? 14 : 12;
+  char fname[32],vname[32];
+  int N_RB_DL=ue->frame_parms.N_RB_DL;
+
+  snprintf(fname, 32, "dlsch%d_rxF_r%d_ext0.m", gNB_id, round);
+  snprintf(vname, 32, "dl%d_rxF_r%d_ext0", gNB_id, round);
+  write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->rxdataF_ext[0],12*N_RB_DL*nsymb,1,1);
+
+  if (ue->frame_parms.nb_antennas_rx >1) {
+    snprintf(fname, 32, "dlsch%d_rxF_r%d_ext1.m", gNB_id, round);
+    snprintf(vname, 32, "dl%d_rxF_r%d_ext1", gNB_id, round);
+    write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->rxdataF_ext[1],12*N_RB_DL*nsymb,1,1);
+  }
+
+  snprintf(fname, 32, "dlsch%d_ch_r%d_ext00.m", gNB_id, round);
+  snprintf(vname, 32, "dl%d_ch_r%d_ext00", gNB_id, round);
+  write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->dl_ch_estimates_ext[0],12*N_RB_DL*nsymb,1,1);
+
+  if (ue->transmission_mode[gNB_id]==7){
+    snprintf(fname, 32, "dlsch%d_bf_ch_r%d.m", gNB_id, round);
+    snprintf(vname, 32, "dl%d_bf_ch_r%d", gNB_id, round);
+    write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->dl_bf_ch_estimates[0],512*nsymb,1,1);
+    //write_output(fname,vname,phy_vars_ue->lte_ue_pdsch_vars[gNB_id]->dl_bf_ch_estimates[0],512,1,1);
+
+    snprintf(fname, 32, "dlsch%d_bf_ch_r%d_ext00.m", gNB_id, round);
+    snprintf(vname, 32, "dl%d_bf_ch_r%d_ext00", gNB_id, round);
+    write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->dl_bf_ch_estimates_ext[0],12*N_RB_DL*nsymb,1,1);
+  }
+
+  if (ue->frame_parms.nb_antennas_rx == 2) {
+    snprintf(fname, 32, "dlsch%d_ch_r%d_ext01.m", gNB_id, round);
+    snprintf(vname, 32, "dl%d_ch_r%d_ext01", gNB_id, round);
+    write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->dl_ch_estimates_ext[1],12*N_RB_DL*nsymb,1,1);
+  }
+
+  if (ue->frame_parms.nb_antenna_ports_gNB == 2) {
+    snprintf(fname, 32, "dlsch%d_ch_r%d_ext10.m", gNB_id, round);
+    snprintf(vname, 32, "dl%d_ch_r%d_ext10", gNB_id, round);
+    write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->dl_ch_estimates_ext[2],12*N_RB_DL*nsymb,1,1);
+
+    if (ue->frame_parms.nb_antennas_rx == 2) {
+      snprintf(fname, 32, "dlsch%d_ch_r%d_ext11.m",gNB_id,round);
+      snprintf(vname, 32, "dl%d_ch_r%d_ext11",gNB_id,round);
+      write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->dl_ch_estimates_ext[3],12*N_RB_DL*nsymb,1,1);
+    }
+  }
+
+  snprintf(fname, 32, "dlsch%d_rxF_r%d_uespec0.m", gNB_id, round);
+  snprintf(vname, 32, "dl%d_rxF_r%d_uespec0", gNB_id, round);
+  write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->rxdataF_uespec_pilots[0],12*N_RB_DL,1,1);
+
+  /*
+    write_output("dlsch%d_ch_ext01.m","dl01_ch0_ext",pdsch_vars[gNB_id]->dl_ch_estimates_ext[1],12*N_RB_DL*nsymb,1,1);
+    write_output("dlsch%d_ch_ext10.m","dl10_ch0_ext",pdsch_vars[gNB_id]->dl_ch_estimates_ext[2],12*N_RB_DL*nsymb,1,1);
+    write_output("dlsch%d_ch_ext11.m","dl11_ch0_ext",pdsch_vars[gNB_id]->dl_ch_estimates_ext[3],12*N_RB_DL*nsymb,1,1);
+  */
+  snprintf(fname, 32, "dlsch%d_r%d_rho.m", gNB_id, round);
+  snprintf(vname, 32, "dl_rho_r%d_%d", gNB_id, round);
+
+  write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->dl_ch_rho_ext[harq_pid][round][0],12*N_RB_DL*nsymb,1,1);
+
+  snprintf(fname, 32, "dlsch%d_r%d_rho2.m", gNB_id, round);
+  snprintf(vname, 32, "dl_rho2_r%d_%d", gNB_id, round);
+
+  write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->dl_ch_rho2_ext[0],12*N_RB_DL*nsymb,1,1);
+
+  snprintf(fname, 32, "dlsch%d_rxF_r%d_comp0.m", gNB_id, round);
+  snprintf(vname, 32, "dl%d_rxF_r%d_comp0", gNB_id, round);
+  write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->rxdataF_comp0[0],12*N_RB_DL*nsymb,1,1);
+  if (ue->frame_parms.nb_antenna_ports_gNB == 2) {
+    snprintf(fname, 32, "dlsch%d_rxF_r%d_comp1.m", gNB_id, round);
+    snprintf(vname, 32, "dl%d_rxF_r%d_comp1", gNB_id, round);
+    write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->rxdataF_comp1[harq_pid][round][0],12*N_RB_DL*nsymb,1,1);
+  }
+
+  snprintf(fname, 32, "dlsch%d_rxF_r%d_llr.m", gNB_id, round);
+  snprintf(vname, 32, "dl%d_r%d_llr", gNB_id, round);
+  write_output(fname, vname, ue->pdsch_vars[0][gNB_id]->llr[0], coded_bits_per_codeword[0], 1, 0);
+  snprintf(fname, 32, "dlsch%d_r%d_mag1.m", gNB_id, round);
+  snprintf(vname, 32, "dl%d_r%d_mag1", gNB_id, round);
+  write_output(fname, vname, ue->pdsch_vars[0][gNB_id]->dl_ch_mag0[0], 12*N_RB_DL*nsymb, 1, 1);
+  snprintf(fname, 32, "dlsch%d_r%d_mag2.m", gNB_id, round);
+  snprintf(vname, 32, "dl%d_r%d_mag2", gNB_id, round);
+  write_output(fname, vname, ue->pdsch_vars[0][gNB_id]->dl_ch_magb0[0], 12*N_RB_DL*nsymb, 1, 1);
+
+  //  printf("log2_maxh = %d\n",ue->pdsch_vars[gNB_id]->log2_maxh);
+}
+
 uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
                            UE_nr_rxtx_proc_t *proc,
                            int eNB_id,
@@ -589,8 +679,8 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
       else {
         LOG_D(PHY,"CRC NOT OK\n\033[0m");
         ret = 1 + dlsch->max_ldpc_iterations;
-	dump_nrdlsch(phy_vars_ue,0,nr_slot_rx,&E,0,0);
-	exit(-1);
+        dump_nrdlsch(phy_vars_ue,0,nr_slot_rx,&E,0,0);
+        exit(-1);
       }
 
 
diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
index 9fe53570a7..2046c13eaa 100644
--- a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
+++ b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
@@ -3368,97 +3368,6 @@ static int nr_dlsch_llr(NR_UE_PDSCH **pdsch_vars,
 //==============================================================================================
 
 
-void dump_nrdlsch(PHY_VARS_NR_UE *ue,uint8_t gNB_id,uint8_t nr_slot_rx,unsigned int *coded_bits_per_codeword,int round,  unsigned char harq_pid)
-{
-  unsigned int nsymb = (ue->frame_parms.Ncp == 0) ? 14 : 12;
-  char fname[32],vname[32];
-  int N_RB_DL=ue->frame_parms.N_RB_DL;
-
-  snprintf(fname, 32, "dlsch%d_rxF_r%d_ext0.m", gNB_id, round);
-  snprintf(vname, 32, "dl%d_rxF_r%d_ext0", gNB_id, round);
-  write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->rxdataF_ext[0],12*N_RB_DL*nsymb,1,1);
-
-  if (ue->frame_parms.nb_antennas_rx >1) {
-    snprintf(fname, 32, "dlsch%d_rxF_r%d_ext1.m", gNB_id, round);
-    snprintf(vname, 32, "dl%d_rxF_r%d_ext1", gNB_id, round);
-    write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->rxdataF_ext[1],12*N_RB_DL*nsymb,1,1);
-  }
-
-  snprintf(fname, 32, "dlsch%d_ch_r%d_ext00.m", gNB_id, round);
-  snprintf(vname, 32, "dl%d_ch_r%d_ext00", gNB_id, round);
-  write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->dl_ch_estimates_ext[0],12*N_RB_DL*nsymb,1,1);
-
-  if (ue->transmission_mode[gNB_id]==7){
-    snprintf(fname, 32, "dlsch%d_bf_ch_r%d.m", gNB_id, round);
-    snprintf(vname, 32, "dl%d_bf_ch_r%d", gNB_id, round);
-    write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->dl_bf_ch_estimates[0],512*nsymb,1,1);
-    //write_output(fname,vname,phy_vars_ue->lte_ue_pdsch_vars[gNB_id]->dl_bf_ch_estimates[0],512,1,1);
-
-    snprintf(fname, 32, "dlsch%d_bf_ch_r%d_ext00.m", gNB_id, round);
-    snprintf(vname, 32, "dl%d_bf_ch_r%d_ext00", gNB_id, round);
-    write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->dl_bf_ch_estimates_ext[0],12*N_RB_DL*nsymb,1,1);
-  }
-
-  if (ue->frame_parms.nb_antennas_rx == 2) {
-    snprintf(fname, 32, "dlsch%d_ch_r%d_ext01.m", gNB_id, round);
-    snprintf(vname, 32, "dl%d_ch_r%d_ext01", gNB_id, round);
-    write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->dl_ch_estimates_ext[1],12*N_RB_DL*nsymb,1,1);
-  }
-
-  if (ue->frame_parms.nb_antenna_ports_gNB == 2) {
-    snprintf(fname, 32, "dlsch%d_ch_r%d_ext10.m", gNB_id, round);
-    snprintf(vname, 32, "dl%d_ch_r%d_ext10", gNB_id, round);
-    write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->dl_ch_estimates_ext[2],12*N_RB_DL*nsymb,1,1);
-
-    if (ue->frame_parms.nb_antennas_rx == 2) {
-      snprintf(fname, 32, "dlsch%d_ch_r%d_ext11.m",gNB_id,round);
-      snprintf(vname, 32, "dl%d_ch_r%d_ext11",gNB_id,round);
-      write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->dl_ch_estimates_ext[3],12*N_RB_DL*nsymb,1,1);
-    }
-  }
-
-  snprintf(fname, 32, "dlsch%d_rxF_r%d_uespec0.m", gNB_id, round);
-  snprintf(vname, 32, "dl%d_rxF_r%d_uespec0", gNB_id, round);
-  write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->rxdataF_uespec_pilots[0],12*N_RB_DL,1,1);
-
-  /*
-    write_output("dlsch%d_ch_ext01.m","dl01_ch0_ext",pdsch_vars[gNB_id]->dl_ch_estimates_ext[1],12*N_RB_DL*nsymb,1,1);
-    write_output("dlsch%d_ch_ext10.m","dl10_ch0_ext",pdsch_vars[gNB_id]->dl_ch_estimates_ext[2],12*N_RB_DL*nsymb,1,1);
-    write_output("dlsch%d_ch_ext11.m","dl11_ch0_ext",pdsch_vars[gNB_id]->dl_ch_estimates_ext[3],12*N_RB_DL*nsymb,1,1);
-  */
-  snprintf(fname, 32, "dlsch%d_r%d_rho.m", gNB_id, round);
-  snprintf(vname, 32, "dl_rho_r%d_%d", gNB_id, round);
-
-  write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->dl_ch_rho_ext[harq_pid][round][0],12*N_RB_DL*nsymb,1,1);
-
-  snprintf(fname, 32, "dlsch%d_r%d_rho2.m", gNB_id, round);
-  snprintf(vname, 32, "dl_rho2_r%d_%d", gNB_id, round);
-
-  write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->dl_ch_rho2_ext[0],12*N_RB_DL*nsymb,1,1);
-
-  snprintf(fname, 32, "dlsch%d_rxF_r%d_comp0.m", gNB_id, round);
-  snprintf(vname, 32, "dl%d_rxF_r%d_comp0", gNB_id, round);
-  write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->rxdataF_comp0[0],12*N_RB_DL*nsymb,1,1);
-  if (ue->frame_parms.nb_antenna_ports_gNB == 2) {
-    snprintf(fname, 32, "dlsch%d_rxF_r%d_comp1.m", gNB_id, round);
-    snprintf(vname, 32, "dl%d_rxF_r%d_comp1", gNB_id, round);
-    write_output(fname,vname,ue->pdsch_vars[0][gNB_id]->rxdataF_comp1[harq_pid][round][0],12*N_RB_DL*nsymb,1,1);
-  }
-
-  snprintf(fname, 32, "dlsch%d_rxF_r%d_llr.m", gNB_id, round);
-  snprintf(vname, 32, "dl%d_r%d_llr", gNB_id, round);
-  write_output(fname, vname, ue->pdsch_vars[0][gNB_id]->llr[0], coded_bits_per_codeword[0], 1, 0);
-  snprintf(fname, 32, "dlsch%d_r%d_mag1.m", gNB_id, round);
-  snprintf(vname, 32, "dl%d_r%d_mag1", gNB_id, round);
-  write_output(fname, vname, ue->pdsch_vars[0][gNB_id]->dl_ch_mag0[0], 12*N_RB_DL*nsymb, 1, 1);
-  snprintf(fname, 32, "dlsch%d_r%d_mag2.m", gNB_id, round);
-  snprintf(vname, 32, "dl%d_r%d_mag2", gNB_id, round);
-  write_output(fname, vname, ue->pdsch_vars[0][gNB_id]->dl_ch_magb0[0], 12*N_RB_DL*nsymb, 1, 1);
-
-  //  printf("log2_maxh = %d\n",ue->pdsch_vars[gNB_id]->log2_maxh);
-}
-
-
 #ifdef DEBUG_DLSCH_DEMOD
 /*
 void print_bytes(char *s,__m128i *x)
diff --git a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
index b345de454f..ff78a7872d 100644
--- a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
+++ b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
@@ -41,6 +41,7 @@
 #include "openair2/LAYER2/NR_MAC_UE/mac_proto.h"
 #include "openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h"
 #include 
+#include 
 
 #ifndef NO_RAT_NR
 
@@ -434,7 +435,7 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
     pucch_resource_indicator = ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[dl_harq_pid]->harq_ack.pucch_resource_indicator;
   }
 
-  LOG_D(PHY, "PUCCH: %d.%d bwp_id %d dl_harq_pid = %d, pucch_resource_indicator = %d\n", frame_tx, nr_slot_tx, bwp_id,dl_harq_pid, pucch_resource_indicator);
+  LOG_D(PHY, "PUCCH: %d.%d bwp_id %ld dl_harq_pid = %d, pucch_resource_indicator = %d\n", frame_tx, nr_slot_tx, bwp_id,dl_harq_pid, pucch_resource_indicator);
 
   /* Part - I
    * Collect feedback that should be transmitted at this nr_slot_tx :
@@ -609,7 +610,7 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
       nb_symbols_total = get_nb_symbols_pucch(pucch_resource, format);
       starting_symbol_index = get_starting_symb_idx(pucch_resource, format);
       startingPRB   = pucch_resource->startingPRB;
-      secondHopPRB = pucch_resource->intraSlotFrequencyHopping ? pucch_resource->secondHopPRB : startingPRB;
+      secondHopPRB = pucch_resource->intraSlotFrequencyHopping ? *pucch_resource->secondHopPRB : startingPRB;
       if (format==pucch_format1_nr)
         time_domain_occ = pucch_resource->format.choice.format1->timeDomainOCC;
       if (format==pucch_format4_nr) {
diff --git a/openair2/F1AP/f1ap_du_rrc_message_transfer.c b/openair2/F1AP/f1ap_du_rrc_message_transfer.c
index 8e625252f6..3678fbb301 100644
--- a/openair2/F1AP/f1ap_du_rrc_message_transfer.c
+++ b/openair2/F1AP/f1ap_du_rrc_message_transfer.c
@@ -67,6 +67,14 @@ extern f1ap_setup_req_t *f1ap_du_data;
 extern RAN_CONTEXT_t RC;
 extern f1ap_cudu_inst_t f1ap_du_inst[MAX_eNB];
 
+extern rlc_op_status_t nr_rrc_rlc_config_asn1_req (const protocol_ctxt_t   * const ctxt_pP,
+                                                   const NR_SRB_ToAddModList_t   * const srb2add_listP,
+                                                   const NR_DRB_ToAddModList_t   * const drb2add_listP,
+                                                   const NR_DRB_ToReleaseList_t  * const drb2release_listP,
+                                                   const LTE_PMCH_InfoList_r9_t * const pmch_InfoList_r9_pP,
+                                                   struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_srb_bearer2add_list,
+                                                   struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_drb_bearer2add_list);
+
 uint8_t du_ccch_flag = 1;
 
 int DU_handle_DL_NR_RRC_MESSAGE_TRANSFER(instance_t       instance,
@@ -799,8 +807,9 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t     module_idP,
                                             rnti_t          rntiP,
                                             const uint8_t   *sduP,
                                             sdu_size_t      sdu_lenP,
-					    const uint8_t   *sdu2P,
-					    sdu_size_t      sdu2_lenP) {
+                                            const uint8_t   *sdu2P,
+					                                  sdu_size_t      sdu2_lenP) {
+
   F1AP_F1AP_PDU_t                       pdu;
   F1AP_InitialULRRCMessageTransfer_t    *out;
   F1AP_InitialULRRCMessageTransferIEs_t *ie;
@@ -875,9 +884,9 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t     module_idP,
     ie->id                             = F1AP_ProtocolIE_ID_id_DUtoCURRCContainer;
     ie->criticality                    = F1AP_Criticality_reject;
     ie->value.present                  = F1AP_InitialULRRCMessageTransferIEs__value_PR_DUtoCURRCContainer;
-    OCTET_STRING_fromBuf(&ie->value.choice.DUtoCURRCContainer, 
-			 sdu2P,
-			 sdu2_lenP);
+    OCTET_STRING_fromBuf(&ie->value.choice.DUtoCURRCContainer,
+                         (char *)sdu2P,
+                         sdu2_lenP);
     ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
   }    
 
@@ -1247,7 +1256,7 @@ int DU_handle_DL_NR_RRC_MESSAGE_TRANSFER(instance_t       instance,
 								     RC.nrrrc[ctxt.module_id],
 								     ctxt.rnti);
 
-  gNB_RRC_INST *rrc = &RC.nrrrc[ctxt.module_id];
+  gNB_RRC_INST *rrc = RC.nrrrc[ctxt.module_id];
   if (srb_id == 0) {
     NR_DL_CCCH_Message_t* dl_ccch_msg=NULL;
     asn_dec_rval_t dec_rval;
@@ -1302,7 +1311,7 @@ int DU_handle_DL_NR_RRC_MESSAGE_TRANSFER(instance_t       instance,
 			       );
         // rrc_rlc_config_asn1_req
 	nr_rrc_rlc_config_asn1_req(&ctxt,
-				   ue_context_p->ue_context.SRB_configList, 
+				   ue_context_p->ue_context.SRB_configList,
 				   NULL,
 				   NULL,
 				   NULL,
diff --git a/openair2/GNB_APP/gnb_app.c b/openair2/GNB_APP/gnb_app.c
index 767a3c203b..9695583b73 100644
--- a/openair2/GNB_APP/gnb_app.c
+++ b/openair2/GNB_APP/gnb_app.c
@@ -29,6 +29,10 @@
 
 #include 
 #include 
+#include 
+#include 
+#include 
+#include 
 
 #include "gnb_app.h"
 #include "gnb_config.h"
@@ -128,6 +132,36 @@ static uint32_t gNB_app_register_x2(uint32_t gnb_id_start, uint32_t gnb_id_end)
 }
 
 /*------------------------------------------------------------------------------*/
+
+static void init_pdcp(void) {
+  if (!NODE_IS_DU(RC.nrrrc[0]->node_type)) {
+    // pdcp_layer_init();
+    // pdcp_layer_init_for_CU();
+    uint32_t pdcp_initmask = (IS_SOFTMODEM_NOS1) ?
+                             (PDCP_USE_NETLINK_BIT | LINK_ENB_PDCP_TO_IP_DRIVER_BIT) : LINK_ENB_PDCP_TO_GTPV1U_BIT;
+    if (IS_SOFTMODEM_NOS1) {
+      printf("IS_SOFTMODEM_NOS1 option enabled \n");
+      pdcp_initmask = pdcp_initmask | ENB_NAS_USE_TUN_BIT | SOFTMODEM_NOKRNMOD_BIT;
+    }
+
+    pdcp_module_init(pdcp_initmask);
+
+    if (NODE_IS_CU(RC.nrrrc[0]->node_type)) {
+      LOG_I(PDCP, "node is CU, pdcp send rlc_data_req by proto_agent \n");
+      pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t)proto_agent_send_rlc_data_req);
+    } else {
+      LOG_I(PDCP, "node is gNB \n");
+      pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t) rlc_data_req);
+      pdcp_set_pdcp_data_ind_func((pdcp_data_ind_func_t) pdcp_data_ind);
+    }
+  } else {
+    LOG_I(PDCP, "node is DU, rlc send pdcp_data_ind by proto_agent \n");
+    pdcp_set_pdcp_data_ind_func((pdcp_data_ind_func_t) proto_agent_send_pdcp_data_ind);
+  }
+}
+
+/*------------------------------------------------------------------------------*/
+
 void *gNB_app_task(void *args_p)
 {
 
diff --git a/openair2/LAYER2/NR_MAC_UE/mac_proto.h b/openair2/LAYER2/NR_MAC_UE/mac_proto.h
index 1814196c38..2d00aa0003 100755
--- a/openair2/LAYER2/NR_MAC_UE/mac_proto.h
+++ b/openair2/LAYER2/NR_MAC_UE/mac_proto.h
@@ -169,6 +169,10 @@ uint16_t nr_generate_ulsch_pdu(uint8_t *sdus_payload,
                                     unsigned short post_padding,
                                     uint16_t buflen);
 
+void fill_dci_search_candidates(NR_SearchSpace_t *ss,fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15);
+
+void config_dci_pdu(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15, fapi_nr_dl_config_request_t *dl_config, int rnti_type, int ss_id);
+
 void ue_dci_configuration(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_request_t *dl_config, frame_t frame, int slot);
 
 uint8_t nr_extract_dci_info(NR_UE_MAC_INST_t *mac,
diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
index 47c2bf128a..ae5edd9a9d 100644
--- a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
+++ b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
@@ -682,8 +682,8 @@ void nr_get_RA_window(NR_UE_MAC_INST_t *mac){
   AssertFatal(&setup->rach_ConfigGeneric != NULL, "In %s: FATAL! rach_ConfigGeneric is NULL...\n", __FUNCTION__);
   NR_RACH_ConfigGeneric_t *rach_ConfigGeneric = &setup->rach_ConfigGeneric;
   long scs = (mac->scc) ? 
-    &mac->scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing : 
-    &mac->scc_SIB->downlinkConfigCommon.frequencyInfoDL.scs_SpecificCarrierList.list.array[0]->subcarrierSpacing;
+    mac->scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing :
+    mac->scc_SIB->downlinkConfigCommon.frequencyInfoDL.scs_SpecificCarrierList.list.array[0]->subcarrierSpacing;
  
   ra_ResponseWindow = rach_ConfigGeneric->ra_ResponseWindow;
 
diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
index bbf73a7ee3..8ff00bd351 100644
--- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
@@ -734,7 +734,7 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac,
 			       (*dci_format == NR_UL_DCI_FORMAT_0_1) ? pusch_dmrs_pos0 : pusch_dmrs_pos2, pusch_len1);
     if ((mac->ULbwp[0] && pusch_config_pdu->transform_precoding == transform_precoder_disabled))
       pusch_config_pdu->num_dmrs_cdm_grps_no_data = 1;
-    else if (*dci_format == NR_UL_DCI_FORMAT_0_0 || mac->ULbwp[0] && pusch_config_pdu->transform_precoding == transform_precoder_enabled)
+    else if (*dci_format == NR_UL_DCI_FORMAT_0_0 || (mac->ULbwp[0] && pusch_config_pdu->transform_precoding == transform_precoder_enabled))
       pusch_config_pdu->num_dmrs_cdm_grps_no_data = 2;
     
     // Num PRB Overhead from PUSCH-ServingCellConfig
@@ -1673,7 +1673,7 @@ static int get_nr_prach_info_from_ssb_index(uint8_t ssb_idx,
   ssb_info_p = &ssb_list.tx_ssb[ssb_idx];
   LOG_D(MAC,"checking for prach : ssb_info_p->nb_mapped_ro %d\n",ssb_info_p->nb_mapped_ro);
   for (uint8_t n_mapped_ro=0; n_mapped_ronb_mapped_ro; n_mapped_ro++) {
-    LOG_D(MAC,"%d.%d: mapped_ro[%d]->frame.slot %d.%d, prach_assoc_pattern.nb_of_frame %d\n",slot,ssb_info_p->mapped_ro[n_mapped_ro]->frame,ssb_info_p->mapped_ro[n_mapped_ro]->slot,prach_assoc_pattern.nb_of_frame);
+    LOG_D(MAC,"%d.%d: mapped_ro[%d]->frame.slot %d.%d, prach_assoc_pattern.nb_of_frame %d\n",slot,frame,n_mapped_ro,ssb_info_p->mapped_ro[n_mapped_ro]->frame,ssb_info_p->mapped_ro[n_mapped_ro]->slot,prach_assoc_pattern.nb_of_frame);
     if ((slot == ssb_info_p->mapped_ro[n_mapped_ro]->slot) &&
         (ssb_info_p->mapped_ro[n_mapped_ro]->frame == (frame % prach_assoc_pattern.nb_of_frame))) {
 
diff --git a/openair2/RRC/NR/L2_nr_interface.c b/openair2/RRC/NR/L2_nr_interface.c
index a67eef2a64..efbf950995 100644
--- a/openair2/RRC/NR/L2_nr_interface.c
+++ b/openair2/RRC/NR/L2_nr_interface.c
@@ -28,6 +28,7 @@
  * \email: raymond.knopp@eurecom.fr, kroempa@gmail.com
  */
 
+#include 
 #include "platform_types.h"
 #include "nr_rrc_defs.h"
 #include "nr_rrc_extern.h"
@@ -44,6 +45,8 @@
 #include "NR_BCCH-BCH-Message.h"
 #include "rrc_gNB_UE_context.h"
 
+#include "RRC/NR/MESSAGES/asn1_msg.h"
+
 extern RAN_CONTEXT_t RC;
 
 int generate_pdcch_ConfigSIB1(NR_PDCCH_ConfigSIB1_t *pdcch_ConfigSIB1,
diff --git a/openair2/RRC/NR/MESSAGES/asn1_msg.c b/openair2/RRC/NR/MESSAGES/asn1_msg.c
index 5ad2feb172..db4f2ef82c 100644
--- a/openair2/RRC/NR/MESSAGES/asn1_msg.c
+++ b/openair2/RRC/NR/MESSAGES/asn1_msg.c
@@ -1033,7 +1033,7 @@ void fill_initial_SpCellConfig(rnti_t rnti,
   AssertFatal(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.subcarrierSpacing==NR_SubcarrierSpacing_kHz30,
 	      "SCS != 30kHz\n");
   AssertFatal(scc->tdd_UL_DL_ConfigurationCommon->pattern1.dl_UL_TransmissionPeriodicity==NR_TDD_UL_DL_Pattern__dl_UL_TransmissionPeriodicity_ms5,
-	      "TDD period != 5ms : %d\n",scc->tdd_UL_DL_ConfigurationCommon->pattern1.dl_UL_TransmissionPeriodicity);
+	      "TDD period != 5ms : %ld\n",scc->tdd_UL_DL_ConfigurationCommon->pattern1.dl_UL_TransmissionPeriodicity);
   
   schedulingRequestResourceConfig->periodicityAndOffset->choice.sl40 = 10*((rnti>>1)&3) + (rnti&2);
   schedulingRequestResourceConfig->resource = calloc(1,sizeof(*schedulingRequestResourceConfig->resource));
diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c
index 88e3c44abb..48a8be6842 100755
--- a/openair2/RRC/NR/rrc_gNB.c
+++ b/openair2/RRC/NR/rrc_gNB.c
@@ -391,7 +391,6 @@ rrc_gNB_generate_RRCSetup(
 //-----------------------------------------------------------------------------
 {
   LOG_I(NR_RRC, "rrc_gNB_generate_RRCSetup \n");
-  NR_SRB_ToAddModList_t        **SRB_configList = NULL;
   MessageDef                    *message_p;
 
   // T(T_GNB_RRC_SETUP,
@@ -536,7 +535,6 @@ rrc_gNB_generate_RRCSetup_for_RRCReestablishmentRequest(
 //-----------------------------------------------------------------------------
 {
   LOG_I(NR_RRC, "generate RRCSetup for RRCReestablishmentRequest \n");
-  NR_SRB_ToAddModList_t        **SRB_configList = NULL;
   rrc_gNB_ue_context_t         *ue_context_pP   = NULL;
   gNB_RRC_INST                 *rrc_instance_p = RC.nrrrc[ctxt_pP->module_id];
   NR_ServingCellConfigCommon_t *scc=rrc_instance_p->carrier.servingcellconfigcommon;
@@ -544,7 +542,6 @@ rrc_gNB_generate_RRCSetup_for_RRCReestablishmentRequest(
   ue_context_pP = rrc_gNB_get_next_free_ue_context(ctxt_pP, rrc_instance_p, 0);
 
   gNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context;
-  SRB_configList = &ue_p->SRB_configList;
   ue_p->Srb0.Tx_buffer.payload_size = do_RRCSetup(ue_context_pP,
 						  (uint8_t *) ue_p->Srb0.Tx_buffer.Payload,
 						  rrc_gNB_get_next_transaction_identifier(ctxt_pP->module_id),
diff --git a/openair2/RRC/NR/rrc_gNB_NGAP.c b/openair2/RRC/NR/rrc_gNB_NGAP.c
index 4b9f507f59..e98a433611 100644
--- a/openair2/RRC/NR/rrc_gNB_NGAP.c
+++ b/openair2/RRC/NR/rrc_gNB_NGAP.c
@@ -720,7 +720,6 @@ rrc_gNB_process_NGAP_DOWNLINK_NAS(
     struct rrc_gNB_ue_context_s *ue_context_p = NULL;
     protocol_ctxt_t              ctxt;
     memset(&ctxt, 0, sizeof(protocol_ctxt_t));
-    MessageDef *message_p;
 
     ue_initial_id  = NGAP_DOWNLINK_NAS (msg_p).ue_initial_id;
     gNB_ue_ngap_id = NGAP_DOWNLINK_NAS (msg_p).gNB_ue_ngap_id;
diff --git a/openair2/RRC/NR_UE/L2_interface_ue.c b/openair2/RRC/NR_UE/L2_interface_ue.c
index 7d51ee29ef..be952d10d1 100644
--- a/openair2/RRC/NR_UE/L2_interface_ue.c
+++ b/openair2/RRC/NR_UE/L2_interface_ue.c
@@ -167,7 +167,7 @@ rrc_data_req_ue(
                        TASK_RRC_UE,
                        TASK_PDCP_UE,
                        sdu_sizeP);
-    LOG_I(RRC,"Sending RRC message for SRB %d, sdu_size %d\n",rb_idP,sdu_sizeP); 
+    LOG_I(RRC,"Sending RRC message for SRB %ld, sdu_size %d\n",rb_idP,sdu_sizeP);
     memcpy (message_buffer, buffer_pP, sdu_sizeP);
     message_p = itti_alloc_new_message ( TASK_RRC_UE, 0, RRC_DCCH_DATA_REQ);
     RRC_DCCH_DATA_REQ (message_p).frame     = ctxt_pP->frame;
diff --git a/openair2/RRC/NR_UE/rrc_UE.c b/openair2/RRC/NR_UE/rrc_UE.c
index d6f0187c87..e2df9d8182 100644
--- a/openair2/RRC/NR_UE/rrc_UE.c
+++ b/openair2/RRC/NR_UE/rrc_UE.c
@@ -552,7 +552,6 @@ int8_t nr_rrc_ue_decode_NR_BCCH_BCH_Message(
     const uint8_t     gNB_index,
     uint8_t           *const bufferP,
     const uint8_t     buffer_len ){
-    int i;
     NR_BCCH_BCH_Message_t *bcch_message = NULL;
     
 
diff --git a/openair3/GTPV1-U/gtpv1u_gNB.c b/openair3/GTPV1-U/gtpv1u_gNB.c
index 956ab0a4b3..4b729a9240 100644
--- a/openair3/GTPV1-U/gtpv1u_gNB.c
+++ b/openair3/GTPV1-U/gtpv1u_gNB.c
@@ -922,6 +922,8 @@ static int gtpv1u_gnb_tunnel_data_req(gtpv1u_gnb_tunnel_data_req_t *gnb_tunnel_d
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_PROCESS_TUNNEL_DATA_REQ, VCD_FUNCTION_OUT);
   /* Buffer still needed, do not free it */
   //itti_free(ITTI_MSG_ORIGIN_ID(received_message_p), data_req_p->buffer);
+
+  return 0;
 }
 
 //-----------------------------------------------------------------------------
diff --git a/targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c b/targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c
index f35a18eb0e..dce410de47 100644
--- a/targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c
+++ b/targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c
@@ -42,6 +42,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "common_lib.h"
 #include "ethernet_lib.h"

From 50bd0f0f33fa5d705770e4cc8299708b01b75250 Mon Sep 17 00:00:00 2001
From: rmagueta 
Date: Thu, 15 Apr 2021 23:46:39 +0100
Subject: [PATCH 154/579] Remove bwp_dedicated from
 fill_default_initialDownlinkBWP

---
 openair1/PHY/NR_UE_TRANSPORT/nr_prach.c |  8 ++++----
 openair2/RRC/NR/rrc_gNB_reconfig.c      | 22 +---------------------
 2 files changed, 5 insertions(+), 25 deletions(-)

diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_prach.c b/openair1/PHY/NR_UE_TRANSPORT/nr_prach.c
index 12ac8ced47..76fe180aba 100644
--- a/openair1/PHY/NR_UE_TRANSPORT/nr_prach.c
+++ b/openair1/PHY/NR_UE_TRANSPORT/nr_prach.c
@@ -74,6 +74,10 @@ int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint8_t slot){
   int prach_start, prach_sequence_length, i, prach_len, dftlen, mu, kbar, K, n_ra_prb, k, prachStartSymbol, sample_offset_slot;
   //int restricted_Type;
 
+  fd_occasion             = 0;
+  prach_len               = 0;
+  dftlen                  = 0;
+  first_nonzero_root_idx  = 0;
   prach                   = prach_tmp;
   prachF                  = ue->prach_vars[gNB_id]->prachF;
   amp                     = ue->prach_vars[gNB_id]->amp;
@@ -87,10 +91,6 @@ int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint8_t slot){
   NCS                     = prach_pdu->num_cs;
   prach_fmt_id            = prach_pdu->prach_format;
   preamble_index          = prach_resources->ra_PreambleIndex;
-  fd_occasion             = 0;
-  prach_len               = 0;
-  dftlen                  = 0;
-  first_nonzero_root_idx  = 0;
   kbar                    = 1;
   K                       = 24;
   k                       = 12*n_ra_prb - 6*fp->N_RB_UL;
diff --git a/openair2/RRC/NR/rrc_gNB_reconfig.c b/openair2/RRC/NR/rrc_gNB_reconfig.c
index de884f7e13..fa3fcbe10f 100644
--- a/openair2/RRC/NR/rrc_gNB_reconfig.c
+++ b/openair2/RRC/NR/rrc_gNB_reconfig.c
@@ -50,29 +50,9 @@
 #define true 1
 
 void fill_default_initialDownlinkBWP(NR_BWP_Downlink_t *bwp, NR_ServingCellConfigCommon_t *servingcellconfigcommon) {
-
   bwp->bwp_Id = 0;
-
   bwp->bwp_Common=calloc(1,sizeof(*bwp->bwp_Common));
-  memcpy((void*)&bwp->bwp_Common,
-         &servingcellconfigcommon->downlinkConfigCommon->initialDownlinkBWP,
-         sizeof(bwp->bwp_Common));
-
-  bwp->bwp_Dedicated=calloc(1,sizeof(*bwp->bwp_Dedicated));
-  bwp->bwp_Dedicated->pdsch_Config = calloc(1,sizeof(*bwp->bwp_Dedicated->pdsch_Config));
-  bwp->bwp_Dedicated->pdsch_Config->present = NR_SetupRelease_PDSCH_Config_PR_setup;
-  bwp->bwp_Dedicated->pdsch_Config->choice.setup = calloc(1,sizeof(*bwp->bwp_Dedicated->pdsch_Config->choice.setup));
-  bwp->bwp_Dedicated->pdsch_Config->choice.setup->dataScramblingIdentityPDSCH = NULL;
-  bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA = calloc(1,sizeof(*bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA));
-  bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->present= NR_SetupRelease_DMRS_DownlinkConfig_PR_setup;
-  bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup = calloc(1,sizeof(*bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup));
-  bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type=NULL;
-  bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->maxLength=NULL;
-  bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->scramblingID0=NULL;
-  bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->scramblingID1=NULL;
-  bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->phaseTrackingRS=NULL;
-  bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition = calloc(1,sizeof(*bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition));
-  *bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition = NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos0;
+  memcpy((void*)&bwp->bwp_Common, &servingcellconfigcommon->downlinkConfigCommon->initialDownlinkBWP, sizeof(*bwp->bwp_Common));
 }
 
 void fill_default_coresetZero(NR_ControlResourceSet_t *coreset0, NR_ServingCellConfigCommon_t *servingcellconfigcommon) {

From e0780320fa283c9b4c346922b1dc5848237ab0b2 Mon Sep 17 00:00:00 2001
From: Robert Schmidt 
Date: Fri, 16 Apr 2021 07:27:11 +0200
Subject: [PATCH 155/579] Fix to make nrUE compile

---
 openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
index 188579a7c1..f879599f7d 100644
--- a/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
+++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
@@ -165,7 +165,7 @@ void config_dci_pdu(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_dci_dl_pdu_rel15_t
       rel15->BWPSize = NRRIV2BW(initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
       rel15->BWPStart = NRRIV2PRBOFFSET(initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
       rel15->SubcarrierSpacing = initialDownlinkBWP->genericParameters.subcarrierSpacing;
-      rel15->dci_length_options[0] = nr_dci_size(scc, mac->scg, def_dci_pdu_rel15, rel15->dci_format_options[0], NR_RNTI_TC, rel15->BWPSize, bwp_id);
+      rel15->dci_length_options[0] = nr_dci_size(scc, mac->scg, &mac->def_dci_pdu_rel15[rel15->dci_format_options[0]], rel15->dci_format_options[0], NR_RNTI_TC, rel15->BWPSize, bwp_id);
     break;
     case NR_RNTI_SP_CSI:
     break;

From 599f56272c3f58ad511894e20f1921791dae4fc8 Mon Sep 17 00:00:00 2001
From: Raphael Defosseux 
Date: Fri, 16 Apr 2021 10:42:39 +0200
Subject: [PATCH 156/579] [DOCKER] adding entrypoint to LTE-UE image

Signed-off-by: Raphael Defosseux 
---
 docker/Dockerfile.eNB.rhel8.2             | 26 ++++----
 docker/Dockerfile.lteUE.rhel8.2           |  5 +-
 docker/Dockerfile.lteUE.ubuntu18          | 15 +++--
 docker/scripts/enb_entrypoint.sh          | 18 +++---
 docker/scripts/enb_parameters.yaml        |  2 +-
 docker/scripts/generateTemplate.py        | 10 +++-
 docker/scripts/lte_ue_entrypoint.sh       | 72 +++++++++++++++++++++++
 docker/scripts/lte_ue_parameters.yaml     | 37 ++++++++++++
 docker/scripts/lte_ue_sim_parameters.yaml | 47 +++++++++++++++
 openair3/NAS/TOOLS/ue_sim_ci.conf         | 45 ++++++++++++++
 10 files changed, 245 insertions(+), 32 deletions(-)
 create mode 100755 docker/scripts/lte_ue_entrypoint.sh
 create mode 100644 docker/scripts/lte_ue_parameters.yaml
 create mode 100644 docker/scripts/lte_ue_sim_parameters.yaml
 create mode 100644 openair3/NAS/TOOLS/ue_sim_ci.conf

diff --git a/docker/Dockerfile.eNB.rhel8.2 b/docker/Dockerfile.eNB.rhel8.2
index aa8b9aa228..81b663a00e 100644
--- a/docker/Dockerfile.eNB.rhel8.2
+++ b/docker/Dockerfile.eNB.rhel8.2
@@ -37,6 +37,10 @@ RUN /bin/sh oaienv && \
     mkdir -p log && \
     ./build_oai --eNB --ninja -w USRP --verbose-ci
 
+RUN yum install -y python3-pip && \
+    pip3 install --ignore-installed pyyaml && \
+    python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml
+
 # debug
 #RUN ldconfig -v && ldd /oai-ran/targets/bin/lte-softmodem.Rel15
 #RUN ls -ls /oai-ran/targets/bin
@@ -59,6 +63,7 @@ RUN yum update -y && \
 
 WORKDIR /opt/oai-enb/bin
 COPY --from=enb-build /oai-ran/targets/bin/lte-softmodem.Rel15 .
+COPY --from=enb-build /oai-ran/docker/scripts/enb_entrypoint.sh entrypoint.sh
 
 WORKDIR /usr/local/lib/
 COPY --from=enb-build /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 .
@@ -106,21 +111,14 @@ RUN ldconfig
 
 # Copy the relevant configuration files for eNB
 WORKDIR /opt/oai-enb/etc
-COPY --from=enb-build /oai-ran/ci-scripts/conf_files/enb.* .
-COPY --from=enb-build /oai-ran/ci-scripts/conf_files/rcc.* .
-COPY --from=enb-build /oai-ran/ci-scripts/conf_files/cu.* .
-COPY --from=enb-build /oai-ran/ci-scripts/conf_files/du.* .
-COPY --from=enb-build /oai-ran/ci-scripts/conf_files/rru.* .
+COPY --from=enb-build /oai-ran/docker/etc .
 
 WORKDIR /opt/oai-enb
 
-#EXPOSE 2152/udp  # S1U, GTP/UDP
-#EXPOSE 22100/tcp # ?
-#EXPOSE 36412/udp # S1C, SCTP/UDP
-#EXPOSE 36422/udp # X2C, SCTP/UDP
-#EXPOSE 50000/udp # IF5 / ORI (control)
-#EXPOSE 50001/udp # IF5 / ECPRI (data)
+# 2152 --> S1U, GTP/UDP
+# 36412 --> S1C, SCTP/UDP
+# 36422 --> X2C, SCTP/UDP
+EXPOSE 2152/udp 36412/udp 36422/udp
 
-#CMD ["/opt/oai-enb/bin/lte-softmodem", "-O", "/opt/oai-enb/etc/enb.conf"]
-#ENTRYPOINT ["/opt/oai-enb/bin/entrypoint.sh"]
-CMD ["sleep", "infinity"]
+ENTRYPOINT ["/opt/oai-enb/bin/entrypoint.sh"]
+CMD ["/opt/oai-enb/bin/lte-softmodem.Rel15", "-O", "/opt/oai-enb/etc/enb.conf"]
diff --git a/docker/Dockerfile.lteUE.rhel8.2 b/docker/Dockerfile.lteUE.rhel8.2
index e22343d63c..cd026f628b 100644
--- a/docker/Dockerfile.lteUE.rhel8.2
+++ b/docker/Dockerfile.lteUE.rhel8.2
@@ -37,6 +37,10 @@ RUN /bin/sh oaienv && \
     mkdir -p log && \
     ./build_oai --UE --ninja -w USRP --verbose-ci
 
+RUN yum install -y python3-pip && \
+    pip3 install --ignore-installed pyyaml && \
+    python3 ./docker/scripts/generateTemplate.py ./docker/scripts/lte_ue_parameters.yaml
+
 # debug
 #RUN ldconfig -v && ldd /oai-ran/targets/bin/lte-uesoftmodem.Rel15
 #RUN ls -lst /oai-ran/targets/bin
@@ -116,7 +120,6 @@ RUN ldconfig
 # Copy the relevant configuration files for eNB
 WORKDIR /opt/oai-lte-ue/etc
 COPY --from=lte-ue-build /oai-ran/ci-scripts/conf_files/ue.* .
-COPY --from=lte-ue-build /oai-ran/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf ./ue_usim.conf
 
 WORKDIR /opt/oai-lte-ue
 #CMD ["/opt/oai-lte-ue/bin/lte-uesoftmodem", "-O", "/opt/oai-lte-ue/etc/enb.conf"]
diff --git a/docker/Dockerfile.lteUE.ubuntu18 b/docker/Dockerfile.lteUE.ubuntu18
index 6af2e61991..7af1860f08 100644
--- a/docker/Dockerfile.lteUE.ubuntu18
+++ b/docker/Dockerfile.lteUE.ubuntu18
@@ -37,6 +37,10 @@ RUN /bin/sh oaienv && \
     mkdir -p log && \
     ./build_oai --UE --ninja -w USRP --verbose-ci
 
+RUN apt-get install -y python3-pip && \
+    pip3 install --ignore-installed pyyaml && \
+    python3 ./docker/scripts/generateTemplate.py ./docker/scripts/lte_ue_parameters.yaml
+
 # debug
 #RUN ldconfig -v
 #RUN ldd /oai-ran/targets/bin/lte-uesoftmodem.Rel15
@@ -76,6 +80,7 @@ RUN apt-get update && \
 
 WORKDIR /opt/oai-lte-ue/bin
 COPY --from=lte-ue-build /oai-ran/targets/bin/lte-uesoftmodem.Rel15 .
+COPY --from=lte-ue-build /oai-ran/docker/scripts/lte_ue_entrypoint.sh entrypoint.sh
 COPY --from=lte-ue-build /oai-ran/targets/bin/conf2uedata .
 COPY --from=lte-ue-build /oai-ran/targets/bin/nvram .
 COPY --from=lte-ue-build /oai-ran/targets/bin/usim .
@@ -114,12 +119,10 @@ RUN ldconfig
 #RUN ldd /usr/local/lib/libSIMU.so
 #RUN ldd /usr/local/lib/libdfts.so
 
-# Copy the relevant configuration files for eNB
+# Copy the relevant configuration files for UE
 WORKDIR /opt/oai-lte-ue/etc
-COPY --from=lte-ue-build /oai-ran/ci-scripts/conf_files/ue.* ./
-COPY --from=lte-ue-build /oai-ran/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf ./ue_usim.conf
+COPY --from=lte-ue-build /oai-ran/docker/etc .
 
 WORKDIR /opt/oai-lte-ue
-#CMD ["/opt/oai-lte-ue/bin/lte-uesoftmodem", "-O", "/opt/oai-lte-ue/etc/enb.conf"]
-#ENTRYPOINT ["/opt/oai-lte-ue/bin/entrypoint.sh"]
-CMD ["sleep", "infinity"]
+CMD ["/opt/oai-lte-ue/bin/lte-uesoftmodem.Rel15"]
+ENTRYPOINT ["/opt/oai-lte-ue/bin/entrypoint.sh"]
diff --git a/docker/scripts/enb_entrypoint.sh b/docker/scripts/enb_entrypoint.sh
index 31d99b2a67..cbcf45b0aa 100755
--- a/docker/scripts/enb_entrypoint.sh
+++ b/docker/scripts/enb_entrypoint.sh
@@ -2,17 +2,19 @@
 
 set -euo pipefail
 
+PREFIX=/opt/oai-enb
+
 # Based another env var, pick one template to use
-if [[ -v USE_FDD_CU ]]; then ln -s /opt/oai-enb/etc/cu.fdd.conf /opt/oai-enb/etc/enb.conf; fi
-if [[ -v USE_FDD_DU ]]; then ln -s /opt/oai-enb/etc/du.fdd.conf /opt/oai-enb/etc/enb.conf; fi
-if [[ -v USE_FDD_MONO ]]; then ln -s /opt/oai-enb/etc/enb.fdd.conf /opt/oai-enb/etc/enb.conf; fi
-if [[ -v USE_TDD_MONO ]]; then ln -s /opt/oai-enb/etc/enb.tdd.conf /opt/oai-enb/etc/enb.conf; fi
-if [[ -v USE_FDD_RCC ]]; then ln -s /opt/oai-enb/etc/rcc.if4p5.enb.fdd.conf /opt/oai-enb/etc/enb.conf; fi
-if [[ -v USE_FDD_RRU ]]; then ln -s /opt/oai-enb/etc/rru.fdd.conf /opt/oai-enb/etc/enb.conf; fi
-if [[ -v USE_TDD_RRU ]]; then ln -s /opt/oai-enb/etc/rru.tdd.conf /opt/oai-enb/etc/enb.conf; fi
+if [[ -v USE_FDD_CU ]]; then ln -s $PREFIX/etc/cu.fdd.conf $PREFIX/etc/enb.conf; fi
+if [[ -v USE_FDD_DU ]]; then ln -s $PREFIX/etc/du.fdd.conf $PREFIX/etc/enb.conf; fi
+if [[ -v USE_FDD_MONO ]]; then ln -s $PREFIX/etc/enb.fdd.conf $PREFIX/etc/enb.conf; fi
+if [[ -v USE_TDD_MONO ]]; then ln -s $PREFIX/etc/enb.tdd.conf $PREFIX/etc/enb.conf; fi
+if [[ -v USE_FDD_FAPI_RCC ]]; then ln -s $PREFIX/etc/rcc.nfapi.fdd.conf $PREFIX/etc/enb.conf; fi
+if [[ -v USE_FDD_RRU ]]; then ln -s $PREFIX/etc/rru.fdd.conf $PREFIX/etc/enb.conf; fi
+if [[ -v USE_TDD_RRU ]]; then ln -s $PREFIX/etc/rru.tdd.conf $PREFIX/etc/enb.conf; fi
 
 # Only this template will be manipulated
-CONFIG_FILES=`ls /opt/oai-enb/etc/enb.conf`
+CONFIG_FILES=`ls $PREFIX/etc/enb.conf || true`
 
 for c in ${CONFIG_FILES}; do
     # grep variable names (format: ${VAR}) from template to be rendered
diff --git a/docker/scripts/enb_parameters.yaml b/docker/scripts/enb_parameters.yaml
index a60fc20e29..6a9fc3e9c2 100644
--- a/docker/scripts/enb_parameters.yaml
+++ b/docker/scripts/enb_parameters.yaml
@@ -204,7 +204,7 @@
       env: "@F1_CU_IP_ADDRESS@"
       
   - filePrefix: "rcc.band7.tm1.nfapi"
-    outputfilename: "rcc.if4p5.enb.fdd.conf"
+    outputfilename: "rcc.nfapi.fdd.conf"
     config:
     - key: Active_eNBs
       env: "@ENB_NAME@"
diff --git a/docker/scripts/generateTemplate.py b/docker/scripts/generateTemplate.py
index 4949e9cf21..418476d395 100644
--- a/docker/scripts/generateTemplate.py
+++ b/docker/scripts/generateTemplate.py
@@ -35,11 +35,12 @@ def main():
   data = yaml.full_load(f)
   dir = os.listdir(f'{data[0]["paths"]["source_dir"]}')
 
-
   #identify configs, read and replace corresponding values
   for config in data[1]["configurations"]:
     filePrefix = config["filePrefix"]
     outputfilename = config["outputfilename"]
+    print('filePrefix = ' + filePrefix)
+    print('outputfilename = ' + outputfilename)
     for inputfile in dir:
       if inputfile.find(filePrefix) >=0:
         prefix_outputfile = {"cu": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}', 
@@ -48,7 +49,9 @@ def main():
                              "rru.tdd": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
                              "enb.band7.tm1.25PRB.usrpb210": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
                              "enb.band40.tm1.25PRB.FairScheduler.usrpb210": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
-                             "rcc.band7.tm1.nfapi": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}'
+                             "rcc.band7.tm1.nfapi": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
+                             "ue.nfapi": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}',
+                             "ue_sim_ci": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}'
                              }
         if filePrefix in prefix_outputfile:
           outputfile1 = prefix_outputfile[filePrefix]  
@@ -61,6 +64,9 @@ def main():
              open(outputfile1, mode='w') as outputfile:
           for line in inputfile:
             count = 0
+            if re.search(r'EHPLMN_LIST', line):
+              outputfile.write(line)
+              continue
             for key in config["config"]:
               if line.find(key["key"]) >= 0:
                 count += 1
diff --git a/docker/scripts/lte_ue_entrypoint.sh b/docker/scripts/lte_ue_entrypoint.sh
new file mode 100755
index 0000000000..235128f738
--- /dev/null
+++ b/docker/scripts/lte_ue_entrypoint.sh
@@ -0,0 +1,72 @@
+#!/bin/bash
+
+set -euo pipefail
+
+PREFIX=/opt/oai-lte-ue
+
+# Based another env var, pick one template to use
+if [[ -v USE_NFAPI ]]; then ln -s $PREFIX/etc/ue.nfapi.conf $PREFIX/etc/ue.conf; fi
+
+# Only this template will be manipulated and the USIM one!
+CONFIG_FILES=`ls $PREFIX/etc/ue.conf $PREFIX/etc/ue_usim.conf || true`
+
+for c in ${CONFIG_FILES}; do
+    # grep variable names (format: ${VAR}) from template to be rendered
+    VARS=$(grep -oP '@[a-zA-Z0-9_]+@' ${c} | sort | uniq | xargs)
+
+    # create sed expressions for substituting each occurrence of ${VAR}
+    # with the value of the environment variable "VAR"
+    EXPRESSIONS=""
+    for v in ${VARS}; do
+        NEW_VAR=`echo $v | sed -e "s#@##g"`
+        if [[ "${!NEW_VAR}x" == "x" ]]; then
+            echo "Error: Environment variable '${NEW_VAR}' is not set." \
+                "Config file '$(basename $c)' requires all of $VARS."
+            exit 1
+        fi
+        EXPRESSIONS="${EXPRESSIONS};s|${v}|${!NEW_VAR}|g"
+    done
+    EXPRESSIONS="${EXPRESSIONS#';'}"
+
+    # render template and inline replace config file
+    sed -i "${EXPRESSIONS}" ${c}
+done
+
+#now generate USIM files
+# At this point all operations will be run from $PREFIX!
+cd $PREFIX
+$PREFIX/bin/conf2uedata -c $PREFIX/etc/ue_usim.conf -o $PREFIX
+
+# Load the USRP binaries
+if [[ -v USE_B2XX ]]; then
+    /usr/lib/uhd/utils/uhd_images_downloader.py -t b2xx
+elif [[ -v USE_X3XX ]]; then
+    /usr/lib/uhd/utils/uhd_images_downloader.py -t x3xx
+elif [[ -v USE_N3XX ]]; then
+    /usr/lib/uhd/utils/uhd_images_downloader.py -t n3xx
+fi
+
+# in case we have conf file, append
+new_args=()
+while [[ $# -gt 0 ]]; do
+  new_args+=("$1")
+  shift
+done
+if [[ -v USE_NFAPI ]]; then
+  new_args+=("-O")
+  new_args+=("$PREFIX/etc/ue.conf")
+fi
+
+echo "=================================="
+echo "== Starting LTE UE soft modem"
+if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
+    echo "Additional option(s): ${USE_ADDITIONAL_OPTIONS}"
+    for word in ${USE_ADDITIONAL_OPTIONS}; do
+        new_args+=("$word")
+    done
+    echo "${new_args[@]}"
+    exec "${new_args[@]}"
+else
+    echo "${new_args[@]}"
+    exec "${new_args[@]}"
+fi
diff --git a/docker/scripts/lte_ue_parameters.yaml b/docker/scripts/lte_ue_parameters.yaml
new file mode 100644
index 0000000000..977659bb54
--- /dev/null
+++ b/docker/scripts/lte_ue_parameters.yaml
@@ -0,0 +1,37 @@
+#/*
+# * 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
+# */
+
+---
+- paths:
+    source_dir: "ci-scripts/conf_files/"
+    dest_dir: docker/etc
+    
+- configurations:
+  - filePrefix: ue.nfapi
+    outputfilename: "ue.nfapi.conf"
+    config:
+    - key: remote_n_address
+      env: "@ENB_IP_ADDRESS@"
+    - key: local_n_address
+      env: "@LTE_UE_IP_ADDRESS@"
+    - key: local_n_if_name
+      env: "@UE_NFAPI_IF_NAME@"
+
diff --git a/docker/scripts/lte_ue_sim_parameters.yaml b/docker/scripts/lte_ue_sim_parameters.yaml
new file mode 100644
index 0000000000..a339ed7504
--- /dev/null
+++ b/docker/scripts/lte_ue_sim_parameters.yaml
@@ -0,0 +1,47 @@
+#/*
+# * 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
+# */
+
+---
+- paths:
+    source_dir: "openair3/NAS/TOOLS/"
+    dest_dir: docker/etc
+    
+- configurations:
+  - filePrefix: ue_sim_ci
+    outputfilename: "ue_usim.conf"
+    config:
+    - key: MNC
+      env: "@MNC@"
+    - key: MCC
+      env: "@MCC@"
+    - key: MSIN
+      env: "@SHORT_IMSI@"
+    - key: USIM_API_K
+      env: "@LTE_KEY@"
+    - key: OPC
+      env: "@OPC@"
+    - key: MSISDN
+      env: "@MSISDN@"
+    - key: HPLMN
+      env: "@HPLMN@"
+    - key: OPLMN_LIST
+      env: "@HPLMN@"
+
diff --git a/openair3/NAS/TOOLS/ue_sim_ci.conf b/openair3/NAS/TOOLS/ue_sim_ci.conf
new file mode 100644
index 0000000000..5d95c9ba3f
--- /dev/null
+++ b/openair3/NAS/TOOLS/ue_sim_ci.conf
@@ -0,0 +1,45 @@
+# List of known PLMNS
+PLMN: {
+    PLMN0: {
+           FULLNAME="OpenAirInterface";
+           SHORTNAME="OAICN";
+           MNC="96";
+           MCC="208";
+    };
+};
+
+UE0:
+{
+    USER: {
+        IMEI="356113022094149";
+        MANUFACTURER="OAI";
+        MODEL="LTE SoftModem";
+        PIN="0000";
+    };
+
+    SIM: {
+        MSIN="0100001111";
+        USIM_API_K="8baf473f2f8fd09487cccbd7097c6862";
+        OPC="e734f8734007d6c5ce7a0508809e7e9c";
+        MSISDN="33611123456";
+    };
+
+    # Home PLMN Selector with Access Technology
+    HPLMN= "20896";
+
+    # User controlled PLMN Selector with Access Technology
+    UCPLMN_LIST = ();
+
+    # Operator PLMN List
+    OPLMN_LIST = ("20896");
+
+    # Operator controlled PLMN Selector with Access Technology
+    OCPLMN_LIST = ();
+
+    # Forbidden plmns
+    FPLMN_LIST = ();
+
+    # Equivalent home plmns
+    EHPLMN_LIST = ();
+
+};

From c63abcd0f279326229999d872de4fa8404e48289 Mon Sep 17 00:00:00 2001
From: Cedric Roux 
Date: Fri, 2 Apr 2021 15:57:42 +0200
Subject: [PATCH 157/579] nsa: x2ap: hack: exit gNB if connection to eNB failed

Exit gNB if connection to eNB failed - to be modified if needed.

We may want to try to connect over and over again until we succeed
but the modifications to the code to get this behavior are complex.

Exit on error is a simple solution.
---
 openair2/X2AP/x2ap_eNB.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/openair2/X2AP/x2ap_eNB.c b/openair2/X2AP/x2ap_eNB.c
index 321190015d..0474d417df 100644
--- a/openair2/X2AP/x2ap_eNB.c
+++ b/openair2/X2AP/x2ap_eNB.c
@@ -130,6 +130,18 @@ void x2ap_eNB_handle_sctp_association_resp(instance_t instance, sctp_new_associa
   DevAssert(x2ap_enb_data_p != NULL);
   dump_trees();
 
+  /* gNB: exit if connection to eNB failed - to be modified if needed.
+   * We may want to try to connect over and over again until we succeed
+   * but the modifications to the code to get this behavior are complex.
+   * Exit on error is a simple solution that can be caught by a script
+   * for example.
+   */
+  if (instance_p->cell_type == CELL_MACRO_GNB
+      && sctp_new_association_resp->sctp_state == SCTP_STATE_UNREACHABLE) {
+    X2AP_ERROR("association with eNB failed, is it running? If no, run it first. If yes, check IP addresses in your configuration file.\n");
+    exit(1);
+  }
+
   if (sctp_new_association_resp->sctp_state != SCTP_STATE_ESTABLISHED) {
     X2AP_WARN("Received unsuccessful result for SCTP association (%u), instance %ld, cnx_id %u\n",
               sctp_new_association_resp->sctp_state,

From 80cc9b445cf635f15df13c983ab00a63aacdb426 Mon Sep 17 00:00:00 2001
From: Raymond Knopp 
Date: Wed, 7 Apr 2021 13:30:53 +0200
Subject: [PATCH 158/579] Add script file for (re)starting gNB automatically

---
 ci-scripts/auto_start_gnb.sh | 7 +++++++
 1 file changed, 7 insertions(+)
 create mode 100644 ci-scripts/auto_start_gnb.sh

diff --git a/ci-scripts/auto_start_gnb.sh b/ci-scripts/auto_start_gnb.sh
new file mode 100644
index 0000000000..86ffc66d18
--- /dev/null
+++ b/ci-scripts/auto_start_gnb.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+while true
+do
+  echo "gNB will be started automatically..."
+  sleep 1
+  sudo .././cmake_targets/ran_build/build/nr-softmodem -E -O ../targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb.conf
+done

From 7b0877054e8f6d1cab17fee0d73aa8bdef69ea22 Mon Sep 17 00:00:00 2001
From: Raphael Defosseux 
Date: Fri, 16 Apr 2021 13:59:14 +0200
Subject: [PATCH 159/579] [DOCKER] adding new parameter on eNB side, fixing the
 LTE-UE entrypoint

Signed-off-by: Raphael Defosseux 
---
 docker/Dockerfile.eNB.rhel8.2      | 18 +--------------
 docker/Dockerfile.eNB.ubuntu18     | 16 -------------
 docker/Dockerfile.lteUE.rhel8.2    | 37 +++++++-----------------------
 docker/Dockerfile.lteUE.ubuntu18   | 26 ++-------------------
 docker/scripts/enb_entrypoint.sh   |  1 +
 docker/scripts/enb_parameters.yaml |  2 ++
 6 files changed, 14 insertions(+), 86 deletions(-)

diff --git a/docker/Dockerfile.eNB.rhel8.2 b/docker/Dockerfile.eNB.rhel8.2
index 81b663a00e..cf012502e0 100644
--- a/docker/Dockerfile.eNB.rhel8.2
+++ b/docker/Dockerfile.eNB.rhel8.2
@@ -25,7 +25,7 @@
 #
 #---------------------------------------------------------------------
 
-FROM localhost/ran-build:latest AS enb-build 
+FROM ran-build:latest AS enb-build
 
 RUN rm -Rf /oai-ran
 WORKDIR /oai-ran
@@ -41,11 +41,6 @@ RUN yum install -y python3-pip && \
     pip3 install --ignore-installed pyyaml && \
     python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml
 
-# debug
-#RUN ldconfig -v && ldd /oai-ran/targets/bin/lte-softmodem.Rel15
-#RUN ls -ls /oai-ran/targets/bin
-#RUN ls -ls /oai-ran/cmake_targets/ran_build/build/*.so
-
 #start from scratch for target executable
 FROM registry.access.redhat.com/ubi8/ubi:latest as oai-enb
 
@@ -98,17 +93,6 @@ COPY --from=enb-build /usr/local/lib64/libuhd.so.4.0.0 /usr/local/lib64
 
 RUN ldconfig
 
-#debug
-#RUN ldd /usr/local/lib/liboai_eth_transpro.so.Rel15
-#RUN ldd /usr/local/lib/libtcp_bridge_oai.so.Rel15
-#RUN ldd /usr/local/lib/librfsimulator.so.Rel15
-#RUN ldd /usr/local/lib/liboai_usrpdevif.so.Rel15
-#RUN ldd /usr/local/lib/libcoding.so
-#RUN ldd /usr/local/lib/libparams_libconfig.so
-#RUN ldd /usr/local/lib/libdfts.so
-#RUN ldd /usr/local/lib/liboai_iqplayer.so
-#RUN ldd /opt/oai-enb/bin/lte-softmodem.Rel15
-
 # Copy the relevant configuration files for eNB
 WORKDIR /opt/oai-enb/etc
 COPY --from=enb-build /oai-ran/docker/etc .
diff --git a/docker/Dockerfile.eNB.ubuntu18 b/docker/Dockerfile.eNB.ubuntu18
index 95d7194c31..1f276094d5 100644
--- a/docker/Dockerfile.eNB.ubuntu18
+++ b/docker/Dockerfile.eNB.ubuntu18
@@ -41,11 +41,6 @@ RUN apt-get install -y python3-pip && \
     pip3 install --ignore-installed pyyaml && \
     python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml
 
-# debug
-#RUN ldconfig -v && ldd /oai-ran/targets/bin/lte-softmodem.Rel15
-#RUN ls -ls /oai-ran/targets/bin
-#RUN ls -ls /oai-ran/cmake_targets/ran_build/build/*.so
-
 #start from scratch for target executable
 FROM ubuntu:bionic as oai-enb
 ENV DEBIAN_FRONTEND=noninteractive
@@ -98,17 +93,6 @@ COPY --from=enb-build /usr/local/lib/libprotobuf-c.so.1 .
 
 RUN ldconfig
 
-#debug
-#RUN ldd /usr/local/lib/liboai_eth_transpro.so.Rel15
-#RUN ldd /usr/local/lib/libtcp_bridge_oai.so.Rel15
-#RUN ldd /usr/local/lib/librfsimulator.so.Rel15
-#RUN ldd /usr/local/lib/liboai_usrpdevif.so.Rel15
-#RUN ldd /usr/local/lib/libcoding.so
-#RUN ldd /usr/local/lib/libparams_libconfig.so
-#RUN ldd /usr/local/lib/libdfts.so
-#RUN ldd /usr/local/lib/liboai_iqplayer.so
-#RUN ldd /opt/oai-enb/bin/lte-softmodem.Rel15
-
 # Copy the relevant configuration files for eNB
 WORKDIR /opt/oai-enb/etc
 COPY --from=enb-build /oai-ran/docker/etc .
diff --git a/docker/Dockerfile.lteUE.rhel8.2 b/docker/Dockerfile.lteUE.rhel8.2
index cd026f628b..731abed1a8 100644
--- a/docker/Dockerfile.lteUE.rhel8.2
+++ b/docker/Dockerfile.lteUE.rhel8.2
@@ -25,7 +25,7 @@
 #
 #---------------------------------------------------------------------
 
-FROM localhost/ran-build:latest AS lte-ue-build 
+FROM ran-build:latest AS lte-ue-build
 
 RUN rm -Rf /oai-ran
 WORKDIR /oai-ran
@@ -39,12 +39,8 @@ RUN /bin/sh oaienv && \
 
 RUN yum install -y python3-pip && \
     pip3 install --ignore-installed pyyaml && \
-    python3 ./docker/scripts/generateTemplate.py ./docker/scripts/lte_ue_parameters.yaml
-
-# debug
-#RUN ldconfig -v && ldd /oai-ran/targets/bin/lte-uesoftmodem.Rel15
-#RUN ls -lst /oai-ran/targets/bin
-#RUN ls -lst /oai-ran/cmake_targets/ran_build/build/*.so
+    python3 ./docker/scripts/generateTemplate.py ./docker/scripts/lte_ue_parameters.yaml && \
+    python3 ./docker/scripts/generateTemplate.py ./docker/scripts/lte_ue_sim_parameters.yaml
 
 #start from scratch for target executable
 FROM registry.access.redhat.com/ubi8/ubi:latest as oai-lte-ue
@@ -63,12 +59,10 @@ RUN yum update -y && \
 
 WORKDIR /opt/oai-lte-ue/bin
 COPY --from=lte-ue-build /oai-ran/targets/bin/lte-uesoftmodem.Rel15 .
+COPY --from=lte-ue-build /oai-ran/docker/scripts/lte_ue_entrypoint.sh entrypoint.sh
 COPY --from=lte-ue-build /oai-ran/targets/bin/conf2uedata .
 COPY --from=lte-ue-build /oai-ran/targets/bin/nvram .
 COPY --from=lte-ue-build /oai-ran/targets/bin/usim .
-COPY --from=lte-ue-build /oai-ran/targets/bin/.ue_emm.nvram0 .
-COPY --from=lte-ue-build /oai-ran/targets/bin/.ue.nvram0 .
-COPY --from=lte-ue-build /oai-ran/targets/bin/.usim.nvram0 .
 
 WORKDIR /usr/local/lib/
 COPY --from=lte-ue-build /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 .
@@ -103,25 +97,10 @@ COPY --from=lte-ue-build /usr/local/lib64/libuhd.so.4.0.0 /usr/local/lib64
 
 RUN ldconfig
 
-#debug
-#RUN ldd /opt/oai-lte-ue/bin/lte-uesoftmodem.Rel15
-#RUN ldd /opt/oai-lte-ue/bin/conf2uedata
-#RUN ldd /opt/oai-lte-ue/bin/nvram
-#RUN ldd /opt/oai-lte-ue/bin/usim
-#RUN ldd /usr/local/lib/liboai_eth_transpro.so.Rel15
-#RUN ldd /usr/local/lib/libtcp_bridge_oai.so.Rel15
-#RUN ldd /usr/local/lib/librfsimulator.so.Rel15
-#RUN ldd /usr/local/lib/liboai_usrpdevif.so.Rel15
-#RUN ldd /usr/local/lib/libcoding.so
-#RUN ldd /usr/local/lib/libparams_libconfig.so
-#RUN ldd /usr/local/lib/libSIMU.so
-#RUN ldd /usr/local/lib/libdfts.so
-
-# Copy the relevant configuration files for eNB
+# Copy the relevant configuration files for UE
 WORKDIR /opt/oai-lte-ue/etc
-COPY --from=lte-ue-build /oai-ran/ci-scripts/conf_files/ue.* .
+COPY --from=lte-ue-build /oai-ran/docker/etc .
 
 WORKDIR /opt/oai-lte-ue
-#CMD ["/opt/oai-lte-ue/bin/lte-uesoftmodem", "-O", "/opt/oai-lte-ue/etc/enb.conf"]
-#ENTRYPOINT ["/opt/oai-lte-ue/bin/entrypoint.sh"]
-CMD ["sleep", "infinity"]
+CMD ["/opt/oai-lte-ue/bin/lte-uesoftmodem.Rel15"]
+ENTRYPOINT ["/opt/oai-lte-ue/bin/entrypoint.sh"]
diff --git a/docker/Dockerfile.lteUE.ubuntu18 b/docker/Dockerfile.lteUE.ubuntu18
index 7af1860f08..6575a81899 100644
--- a/docker/Dockerfile.lteUE.ubuntu18
+++ b/docker/Dockerfile.lteUE.ubuntu18
@@ -39,13 +39,8 @@ RUN /bin/sh oaienv && \
 
 RUN apt-get install -y python3-pip && \
     pip3 install --ignore-installed pyyaml && \
-    python3 ./docker/scripts/generateTemplate.py ./docker/scripts/lte_ue_parameters.yaml
-
-# debug
-#RUN ldconfig -v
-#RUN ldd /oai-ran/targets/bin/lte-uesoftmodem.Rel15
-#RUN ls -lst /oai-ran/targets/bin
-#RUN ls -lst /oai-ran/cmake_targets/ran_build/build/*.so
+    python3 ./docker/scripts/generateTemplate.py ./docker/scripts/lte_ue_parameters.yaml && \
+    python3 ./docker/scripts/generateTemplate.py ./docker/scripts/lte_ue_sim_parameters.yaml
 
 #start from scratch for target executable
 FROM ubuntu:bionic as oai-lte-ue
@@ -84,9 +79,6 @@ COPY --from=lte-ue-build /oai-ran/docker/scripts/lte_ue_entrypoint.sh entrypoint
 COPY --from=lte-ue-build /oai-ran/targets/bin/conf2uedata .
 COPY --from=lte-ue-build /oai-ran/targets/bin/nvram .
 COPY --from=lte-ue-build /oai-ran/targets/bin/usim .
-COPY --from=lte-ue-build /oai-ran/targets/bin/.ue_emm.nvram0 .
-COPY --from=lte-ue-build /oai-ran/targets/bin/.ue.nvram0 .
-COPY --from=lte-ue-build /oai-ran/targets/bin/.usim.nvram0 .
 
 WORKDIR /usr/local/lib/
 COPY --from=lte-ue-build /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 .
@@ -105,20 +97,6 @@ COPY --from=lte-ue-build /usr/local/lib/libprotobuf-c.so.1 .
 
 RUN ldconfig
 
-#debug
-#RUN ldd /opt/oai-lte-ue/bin/lte-uesoftmodem.Rel15
-#RUN ldd /opt/oai-lte-ue/bin/conf2uedata
-#RUN ldd /opt/oai-lte-ue/bin/nvram
-#RUN ldd /opt/oai-lte-ue/bin/usim
-#RUN ldd /usr/local/lib/liboai_eth_transpro.so.Rel15
-#RUN ldd /usr/local/lib/libtcp_bridge_oai.so.Rel15
-#RUN ldd /usr/local/lib/librfsimulator.so.Rel15
-#RUN ldd /usr/local/lib/liboai_usrpdevif.so.Rel15
-#RUN ldd /usr/local/lib/libcoding.so
-#RUN ldd /usr/local/lib/libparams_libconfig.so
-#RUN ldd /usr/local/lib/libSIMU.so
-#RUN ldd /usr/local/lib/libdfts.so
-
 # Copy the relevant configuration files for UE
 WORKDIR /opt/oai-lte-ue/etc
 COPY --from=lte-ue-build /oai-ran/docker/etc .
diff --git a/docker/scripts/enb_entrypoint.sh b/docker/scripts/enb_entrypoint.sh
index cbcf45b0aa..dbe97360f6 100755
--- a/docker/scripts/enb_entrypoint.sh
+++ b/docker/scripts/enb_entrypoint.sh
@@ -3,6 +3,7 @@
 set -euo pipefail
 
 PREFIX=/opt/oai-enb
+RRC_INACTIVITY_THRESHOLD=${RRC_INACTIVITY_THRESHOLD:-0}
 
 # Based another env var, pick one template to use
 if [[ -v USE_FDD_CU ]]; then ln -s $PREFIX/etc/cu.fdd.conf $PREFIX/etc/enb.conf; fi
diff --git a/docker/scripts/enb_parameters.yaml b/docker/scripts/enb_parameters.yaml
index 6a9fc3e9c2..d115d177ab 100644
--- a/docker/scripts/enb_parameters.yaml
+++ b/docker/scripts/enb_parameters.yaml
@@ -159,6 +159,8 @@
       env: "@ENB_S1U_IP_ADDRESS@"
     - key: ENB_IPV4_ADDRESS_FOR_X2C
       env: "@ENB_X2_IP_ADDRESS@"
+    - key: rrc_inactivity_threshold
+      env: "@RRC_INACTIVITY_THRESHOLD@"
     - key: FLEXRAN_ENABLED
       env: "@FLEXRAN_ENABLED@"
     - key: FLEXRAN_INTERFACE_NAME

From c55e253f11645c2e5ef5db011f12e3fb644cab2c Mon Sep 17 00:00:00 2001
From: Mohammed Ismail 
Date: Fri, 16 Apr 2021 12:11:52 +0200
Subject: [PATCH 160/579] CI: physim image stream added

Signed-off-by: Mohammed Ismail 
---
 ci-scripts/cls_physim1.py             | 28 +++++++++++++++++++++-----
 openshift/oai-physim-image-stream.yml | 29 +++++++++++++++++++++++++++
 2 files changed, 52 insertions(+), 5 deletions(-)
 create mode 100644 openshift/oai-physim-image-stream.yml

diff --git a/ci-scripts/cls_physim1.py b/ci-scripts/cls_physim1.py
index 70b2eae046..2b24be7e32 100644
--- a/ci-scripts/cls_physim1.py
+++ b/ci-scripts/cls_physim1.py
@@ -108,6 +108,7 @@ class PhySim:
 		mySSH.command("sudo podman image inspect --format='Size = {{.Size}} bytes' oai-physim:temp", '\$', 60)
 		if mySSH.getBefore().count('no such image') != 0:
 			logging.error('\u001B[1m No such image oai-physim\u001B[0m')
+			mySSH.close()
 			sys.exit(-1)
 		else:
 			result = re.search('Size *= *(?P[0-9\-]+) *bytes', mySSH.getBefore())
@@ -130,12 +131,14 @@ class PhySim:
 		mySSH.command(f'oc login -u {ocUserName} -p {ocPassword}', '\$', 6)
 		if mySSH.getBefore().count('Login successful.') == 0:
 			logging.error('\u001B[1m OC Cluster Login Failed\u001B[0m')
+			mySSH.close()
 			sys.exit(-1)
 		else:
 			logging.debug('\u001B[1m   Login to OC Cluster Successfully\u001B[0m')
 		mySSH.command(f'oc project {ocWorkspace}', '\$', 6)
 		if mySSH.getBefore().count(f'Already on project "{ocWorkspace}"') == 0 and mySSH.getBefore().count(f'Now using project "{self.OCWorkspace}"') == 0:
 			logging.error(f'\u001B[1m Unable to access OC project {ocWorkspace}\u001B[0m')
+			mySSH.close()
 			sys.exit(-1)
 		else:
 			logging.debug(f'\u001B[1m   Now using project {ocWorkspace}\u001B[0m')
@@ -144,13 +147,22 @@ class PhySim:
 		mySSH.command('oc whoami -t | sudo podman login -u ' + ocUserName + ' --password-stdin https://default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/ --tls-verify=false', '\$', 6)
 		if mySSH.getBefore().count('Login Succeeded!') == 0:
 			logging.error('\u001B[1m Podman Login to OC Cluster Registry Failed\u001B[0m')
+			mySSH.close()
 			sys.exit(-1)
 		else:
 			logging.debug('\u001B[1m Podman Login to OC Cluster Registry Successfully\u001B[0m')
+		mySSH.command('oc create -f openshift/oai-physim-image-stream.yml', '\$', 6)
+		if mySSH.getBefore().count('(AlreadyExists):') == 0 and mySSH.getBefore().count('created') == 0:
+			logging.error(f'\u001B[1m Image Stream "oai-physim" Creation Failed on OC Cluster {ocWorkspace}\u001B[0m')
+			mySSH.close()
+			sys.exit(-1)
+		else:
+			logging.debug(f'\u001B[1m   Image Stream "oai-physim" created on OC project {ocWorkspace}\u001B[0m')
 		mySSH.command(f'sudo podman tag oai-physim:temp default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/{self.OCWorkspace}/oai-physim:temp', '\$', 6)
 		mySSH.command(f'sudo podman push default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/{self.OCWorkspace}/oai-physim:temp --tls-verify=false', '\$', 6)
 		if mySSH.getBefore().count('Storing signatures') == 0:
 			logging.error('\u001B[1m Image "oai-physim" push to OC Cluster Registry Failed\u001B[0m')
+			mySSH.close()
 			sys.exit(-1)
 		else:
 			logging.debug('\u001B[1m Image "oai-physim" push to OC Cluster Registry Successfully\u001B[0m')
@@ -160,6 +172,7 @@ class PhySim:
 		if mySSH.getBefore().count('STATUS: deployed') == 0:
 			logging.error('\u001B[1m Deploying PhySim Failed using helm chart on OC Cluster\u001B[0m')
 			mySSH.command('helm uninstall physim >> cmake_targets/log/physim_helm_summary.txt 2>&1', '\$', 6)
+			mySSH.close()
 			self.AnalyzeLogFile_phySim(HTML)
 			sys.exit(-1)
 		else:
@@ -183,13 +196,13 @@ class PhySim:
 		# Waiting to complete the running test
 		count = 0
 		isFinished = False
-		while(count < 25 and isFinished == False):
+		while(count < 26 and isFinished == False):
 			time.sleep(60)
 			mySSH.command('oc get pods -l app.kubernetes.io/instance=physim', '\$', 6)
 			result = re.search('oai-nr-dlsim[\S\d\w]+', mySSH.getBefore())
 			if result is not None:
 				podName1 = result.group()
-				mySSH.command(f'oc logs {podName1}', '\$', 6)
+				mySSH.command(f'oc logs {podName1} | tail -n 5', '\$', 6)
 				if mySSH.getBefore().count('Finished') != 0:
 					isFinished = True
 			count += 1
@@ -202,10 +215,15 @@ class PhySim:
 
 		# UnDeploy the physical simulator pods
 		mySSH.command('helm uninstall physim | tee -a cmake_targets/log/physim_helm_summary.txt 2>&1', '\$', 6)
-		if mySSH.getBefore().count('release "physim" uninstalled') != 0:
+		isFinished1 = False
+		while(isFinished1 == False):
+			time.sleep(10)
+			mySSH.command('oc get pods -l app.kubernetes.io/instance=physim', '\$', 6)
+			logging.debug(mySSH.getBefore())
+			if re.search('No resources found', mySSH.getBefore()):
+				isFinished1 = True
+		if isFinished1 == True:
 			logging.debug('\u001B[1m UnDeployed PhySim Successfully on OC Cluster\u001B[0m')
-		else:
-			logging.debug('\u001B[1m Failed to UnDeploy PhySim on OC Cluster\u001B[0m')
 		mySSH.command('oc logout', '\$', 6)
 		mySSH.close()
 		self.AnalyzeLogFile_phySim(HTML)
diff --git a/openshift/oai-physim-image-stream.yml b/openshift/oai-physim-image-stream.yml
new file mode 100644
index 0000000000..9ef338f139
--- /dev/null
+++ b/openshift/oai-physim-image-stream.yml
@@ -0,0 +1,29 @@
+#/*
+# * 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
+# */
+#---------------------------------------------------------------------
+#
+apiVersion: image.openshift.io/v1
+kind: ImageStream
+metadata:
+  name: oai-physim
+spec:
+  lookupPolicy:
+    local: true

From 1d7a8a2da2b65494f1339661fda5c89da6dfe2ba Mon Sep 17 00:00:00 2001
From: luis_pereira87 
Date: Thu, 15 Apr 2021 16:09:13 +0100
Subject: [PATCH 161/579] Fix SA SIB1 segmentation fault [reapplied after
 merge]

---
 openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
index 911fee5919..91142c3728 100644
--- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
+++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
@@ -328,6 +328,7 @@ void schedule_control_sib1(module_id_t module_id,
     gNB_mac->sched_ctrlCommon = calloc(1,sizeof(*gNB_mac->sched_ctrlCommon));
     gNB_mac->sched_ctrlCommon->search_space = calloc(1,sizeof(*gNB_mac->sched_ctrlCommon->search_space));
     gNB_mac->sched_ctrlCommon->coreset = calloc(1,sizeof(*gNB_mac->sched_ctrlCommon->coreset));
+    gNB_mac->sched_ctrlCommon->active_bwp = calloc(1,sizeof(*gNB_mac->sched_ctrlCommon->active_bwp));
     fill_default_searchSpaceZero(gNB_mac->sched_ctrlCommon->search_space);
     fill_default_coresetZero(gNB_mac->sched_ctrlCommon->coreset,servingcellconfigcommon);
     fill_default_initialDownlinkBWP(gNB_mac->sched_ctrlCommon->active_bwp,servingcellconfigcommon);

From 72d5cec7ad6ceeb96b71306e2fbec1a511d5ceca Mon Sep 17 00:00:00 2001
From: Mohammed Ismail 
Date: Fri, 16 Apr 2021 16:38:44 +0200
Subject: [PATCH 162/579] CI: log fix

Signed-off-by: Mohammed Ismail 
---
 ci-scripts/cls_physim1.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/ci-scripts/cls_physim1.py b/ci-scripts/cls_physim1.py
index 2b24be7e32..9dc05b8427 100644
--- a/ci-scripts/cls_physim1.py
+++ b/ci-scripts/cls_physim1.py
@@ -198,11 +198,11 @@ class PhySim:
 		isFinished = False
 		while(count < 26 and isFinished == False):
 			time.sleep(60)
-			mySSH.command('oc get pods -l app.kubernetes.io/instance=physim', '\$', 6)
+			mySSH.command('oc get pods -l app.kubernetes.io/instance=physim | grep dlsim', '\$', 6)
 			result = re.search('oai-nr-dlsim[\S\d\w]+', mySSH.getBefore())
 			if result is not None:
 				podName1 = result.group()
-				mySSH.command(f'oc logs {podName1} | tail -n 5', '\$', 6)
+				mySSH.command(f'oc logs {podName1} 2>&1 | tail -n 1', '\$', 6)
 				if mySSH.getBefore().count('Finished') != 0:
 					isFinished = True
 			count += 1
@@ -212,6 +212,7 @@ class PhySim:
 		# Getting the logs of each executables running in individual pods
 		for podName in podNames:
 			mySSH.command(f'oc logs {podName} >> cmake_targets/log/physim_test.txt 2>&1', '\$', 6)
+		time.sleep(30)
 
 		# UnDeploy the physical simulator pods
 		mySSH.command('helm uninstall physim | tee -a cmake_targets/log/physim_helm_summary.txt 2>&1', '\$', 6)

From 382ab05a3da8a289facec382e7d26038c5a4bf3e Mon Sep 17 00:00:00 2001
From: Mohammed Ismail 
Date: Fri, 16 Apr 2021 17:11:18 +0200
Subject: [PATCH 163/579] CI: fix on commands delay

Signed-off-by: Mohammed Ismail 
---
 ci-scripts/cls_physim1.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/ci-scripts/cls_physim1.py b/ci-scripts/cls_physim1.py
index 9dc05b8427..1389f1e831 100644
--- a/ci-scripts/cls_physim1.py
+++ b/ci-scripts/cls_physim1.py
@@ -196,13 +196,15 @@ class PhySim:
 		# Waiting to complete the running test
 		count = 0
 		isFinished = False
-		while(count < 26 and isFinished == False):
-			time.sleep(60)
+		while(count < 24 and isFinished == False):
+			time.sleep(58)
 			mySSH.command('oc get pods -l app.kubernetes.io/instance=physim | grep dlsim', '\$', 6)
+			time.sleep(2)
 			result = re.search('oai-nr-dlsim[\S\d\w]+', mySSH.getBefore())
 			if result is not None:
 				podName1 = result.group()
-				mySSH.command(f'oc logs {podName1} 2>&1 | tail -n 1', '\$', 6)
+				mySSH.command(f'oc logs --tail=1 {podName1} 2>&1', '\$', 6)
+				time.sleep(1)
 				if mySSH.getBefore().count('Finished') != 0:
 					isFinished = True
 			count += 1
@@ -220,7 +222,6 @@ class PhySim:
 		while(isFinished1 == False):
 			time.sleep(10)
 			mySSH.command('oc get pods -l app.kubernetes.io/instance=physim', '\$', 6)
-			logging.debug(mySSH.getBefore())
 			if re.search('No resources found', mySSH.getBefore()):
 				isFinished1 = True
 		if isFinished1 == True:

From 8613aeb9e67303c45e41c315ffe69e6900d7a345 Mon Sep 17 00:00:00 2001
From: rmagueta 
Date: Sun, 18 Apr 2021 11:59:16 +0200
Subject: [PATCH 164/579] Fixes after merge

- No warning in RRC
- Ethernet lib fix: correct include
- fixes Msg.4
- fixes conf: the UE cannot handle mixed slots
---
 openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c        |  8 +++++++-
 openair2/RRC/LTE/rrc_eNB_GTPV1U.c                    |  1 -
 targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c   |  1 +
 .../CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf      | 12 ++++++++++--
 .../CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf      | 12 ++++++++++--
 5 files changed, 28 insertions(+), 6 deletions(-)

diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
index b75914cfdd..41e67df0fe 100644
--- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
@@ -1164,6 +1164,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
 
     nr_acknack_scheduling(module_idP, UE_id, frameP, slotP);
     harq->feedback_slot = sched_ctrl->sched_pucch->ul_slot;
+    harq->feedback_frame = sched_ctrl->sched_pucch->frame;
 
     // Bytes to be transmitted
     uint8_t *buf = (uint8_t *) harq->tb;
@@ -1194,13 +1195,18 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
     uint16_t N_DMRS_SLOT = get_num_dmrs(dlDmrsSymbPos);
 
     long dmrsConfigType = bwp!=NULL ? (bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type == NULL ? 0 : 1) : 0;
-    uint8_t N_PRB_DMRS = 0;
+
+    nr_mac->sched_ctrlCommon->pdsch_semi_static.numDmrsCdmGrpsNoData = 2;
+    if (nrOfSymbols == 2) {
+      nr_mac->sched_ctrlCommon->pdsch_semi_static.numDmrsCdmGrpsNoData = 1;
+    }
 
     AssertFatal(nr_mac->sched_ctrlCommon->pdsch_semi_static.numDmrsCdmGrpsNoData == 1
                 || nr_mac->sched_ctrlCommon->pdsch_semi_static.numDmrsCdmGrpsNoData == 2,
                 "nr_mac->schedCtrlCommon->pdsch_semi_static.numDmrsCdmGrpsNoData %d is not possible",
                 nr_mac->sched_ctrlCommon->pdsch_semi_static.numDmrsCdmGrpsNoData);
 
+    uint8_t N_PRB_DMRS = 0;
     if (dmrsConfigType==NFAPI_NR_DMRS_TYPE1) {
       N_PRB_DMRS = nr_mac->sched_ctrlCommon->pdsch_semi_static.numDmrsCdmGrpsNoData * 6;
     }
diff --git a/openair2/RRC/LTE/rrc_eNB_GTPV1U.c b/openair2/RRC/LTE/rrc_eNB_GTPV1U.c
index 6683d91556..64f84ddc4d 100644
--- a/openair2/RRC/LTE/rrc_eNB_GTPV1U.c
+++ b/openair2/RRC/LTE/rrc_eNB_GTPV1U.c
@@ -249,7 +249,6 @@ boolean_t gtpv_data_req_new (
 	return result;
       } else {  /* It is from from epc message */
 	/* in the source enb, UE in RRC_HO_EXECUTION mode */
-	MessageDef *msg;
 	// ?????
 	return true;
       }
diff --git a/targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c b/targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c
index f35a18eb0e..dce410de47 100644
--- a/targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c
+++ b/targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c
@@ -42,6 +42,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "common_lib.h"
 #include "ethernet_lib.h"
diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf
index eb05d8f864..1e8daf53d5 100644
--- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf
+++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf
@@ -67,7 +67,15 @@ gNBs =
 
         initialDLBWPk0_1                    = 0;  #for mixed slot
         initialDLBWPmappingType_1           = 0;
-        initialDLBWPstartSymbolAndLength_1  = 57; #this is SS=1,L=5
+        initialDLBWPstartSymbolAndLength_1  = 53; #this is SS=2,L=12
+
+        initialDLBWPk0_2                    = 0;
+        initialDLBWPmappingType_2           = 0;
+        initialDLBWPstartSymbolAndLength_2  = 54; #this is SS=1,L=12
+
+        initialDLBWPk0_3                    = 0;
+        initialDLBWPmappingType_3           = 0;
+        initialDLBWPstartSymbolAndLength_3  = 57; #this is SS=1,L=5
 
   #uplinkConfigCommon
      #frequencyInfoUL
@@ -129,7 +137,7 @@ gNBs =
 
         initialULBWPk2_1                      = 6;  # used for mixed slot
         initialULBWPmappingType_1             = 1;
-        initialULBWPstartSymbolAndLength_1    = 24; # this is SS=10 L=2
+        initialULBWPstartSymbolAndLength_1    = 69; # this is SS=0 L=12
 
         initialULBWPk2_2                      = 7;  # used for Msg.3 during RA
         initialULBWPmappingType_2             = 1;
diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf
index a4085f7f91..95ede1ba2c 100644
--- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf
+++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf
@@ -67,7 +67,15 @@ gNBs =
 
         initialDLBWPk0_1                    = 0;  #for mixed slot
         initialDLBWPmappingType_1           = 0;
-        initialDLBWPstartSymbolAndLength_1  = 57; #this is SS=1,L=5
+        initialDLBWPstartSymbolAndLength_1  = 53; #this is SS=2,L=12
+
+        initialDLBWPk0_2                    = 0;
+        initialDLBWPmappingType_2           = 0;
+        initialDLBWPstartSymbolAndLength_2  = 54; #this is SS=1,L=12
+
+        initialDLBWPk0_3                    = 0;
+        initialDLBWPmappingType_3           = 0;
+        initialDLBWPstartSymbolAndLength_3  = 57; #this is SS=1,L=5
 
   #uplinkConfigCommon
      #frequencyInfoUL
@@ -129,7 +137,7 @@ gNBs =
 
         initialULBWPk2_1                      = 6;  # used for mixed slot
         initialULBWPmappingType_1             = 1;
-        initialULBWPstartSymbolAndLength_1    = 24; # this is SS=10 L=2
+        initialULBWPstartSymbolAndLength_1    = 69; # this is SS=0 L=12
 
         initialULBWPk2_2                      = 7;  # used for Msg.3 during RA
         initialULBWPmappingType_2             = 1;

From bab03e24f92afb2483a7ea1b0a0bfe6754c0b052 Mon Sep 17 00:00:00 2001
From: luis_pereira87 
Date: Mon, 19 Apr 2021 13:05:12 +0100
Subject: [PATCH 165/579] fix warning: assignment makes integer from pointer
 without a cast

---
 openair1/SCHED_NR_UE/pucch_uci_ue_nr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
index 3899282ba3..a3875d8f1f 100644
--- a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
+++ b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
@@ -654,7 +654,7 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
       nb_symbols_total = get_nb_symbols_pucch(pucch_resource, format);
       starting_symbol_index = get_starting_symb_idx(pucch_resource, format);
       startingPRB   = BWPstart + pucch_resource->startingPRB;
-      secondHopPRB = pucch_resource->intraSlotFrequencyHopping ? (BWPstart+pucch_resource->secondHopPRB) : startingPRB;
+      secondHopPRB = pucch_resource->intraSlotFrequencyHopping ? (BWPstart + *pucch_resource->secondHopPRB) : startingPRB;
       if (format==pucch_format1_nr)
         time_domain_occ = pucch_resource->format.choice.format1->timeDomainOCC;
       if (format==pucch_format4_nr) {

From 2e3fc533044f2b47b419634c8fc0161944657100 Mon Sep 17 00:00:00 2001
From: rmagueta 
Date: Mon, 19 Apr 2021 13:37:46 +0100
Subject: [PATCH 166/579] Fix warnings

---
 openair1/SCHED_NR/phy_procedures_nr_gNB.c   | 2 +-
 openair1/SCHED_NR_UE/pucch_uci_ue_nr.c      | 8 +++++---
 openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c | 3 ++-
 3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/openair1/SCHED_NR/phy_procedures_nr_gNB.c b/openair1/SCHED_NR/phy_procedures_nr_gNB.c
index 9110e04331..d499618d90 100644
--- a/openair1/SCHED_NR/phy_procedures_nr_gNB.c
+++ b/openair1/SCHED_NR/phy_procedures_nr_gNB.c
@@ -383,7 +383,7 @@ void nr_fill_indication(PHY_VARS_gNB *gNB, int frame, int slot_rx, int ULSCH_id,
   // estimate UL_CQI for MAC (from antenna port 0 only)
   int SNRtimes10 = dB_fixed_times10(gNB->pusch_vars[ULSCH_id]->ulsch_power[0]) - (10*gNB->measurements.n0_power_dB[0]);
 
-  LOG_D(PHY, "Estimated SNR for PUSCH is = %f dB (ulsch_power %f)\n", SNRtimes10/10,dB_fixed_times10(gNB->pusch_vars[ULSCH_id]->ulsch_power[0])/10.0);
+  LOG_D(PHY, "Estimated SNR for PUSCH is = %d dB (ulsch_power %f)\n", SNRtimes10/10,dB_fixed_times10(gNB->pusch_vars[ULSCH_id]->ulsch_power[0])/10.0);
 
   if      (SNRtimes10 < -640) cqi=0;
   else if (SNRtimes10 >  635) cqi=255;
diff --git a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
index a3875d8f1f..8b8e08d2c0 100644
--- a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
+++ b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
@@ -565,9 +565,11 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
   int time_domain_occ = 0;
   int occ_length = 0;
   int occ_Index = 0;
+  int BWPsize = 0;
+  int BWPstart = 0;
 
   NR_UE_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[dl_harq_pid]->harq_ack;
-  int BWPsize,BWPstart;
+
   if (select_pucch_resource(ue, mac, gNB_id, N_UCI, pucch_resource_indicator, &initial_pucch_id, &pucch_resource_set,
                             &pucch_resource_id, harq_status) == TRUE) {
     /* use of initial pucch configuration provided by system information 1 */
@@ -1286,8 +1288,8 @@ boolean_t select_pucch_resource(PHY_VARS_NR_UE *ue, NR_UE_MAC_INST_t *mac, uint8
     if (resource_set_found == TRUE) {
       if (pucch_resource_indicator < MAX_PUCCH_RESOURCE_INDICATOR) {
         // Verify that the value of pucch_resource_indicator is valid
-        struct NR_PUCCH_Config__resourceSetToAddModList *resourceSetToAddModList;
-	struct NR_PUCCH_Config__resourceToAddModList *resourceToAddModList;
+        struct NR_PUCCH_Config__resourceSetToAddModList *resourceSetToAddModList = NULL;
+	struct NR_PUCCH_Config__resourceToAddModList *resourceToAddModList = NULL;
         if (bwp_id > 0 && mac->ULbwp[bwp_id-1]) {
            AssertFatal(mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->resourceSetToAddModList!=NULL,"mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->resourceSetToAddModList is null\n");
            resourceSetToAddModList = mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->resourceSetToAddModList;
diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
index 94417ab03e..650f8c9717 100644
--- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
@@ -974,7 +974,8 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
                 ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id,
                 mac->UL_ndi[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id],
                 ulcfg_pdu->pusch_config_pdu.pusch_data.new_data_indicator,
-                TBS_bytes);
+                TBS_bytes,
+                ra->ra_state);
           if (ra->ra_state == WAIT_RAR && !ra->cfra){
             memcpy(ulsch_input_buffer, mac->ulsch_pdu.payload, TBS_bytes);
             LOG_D(NR_MAC,"[RAPROC] Msg3 to be transmitted:\n");

From b99f81f701929b7884a86f342f805a4215298974 Mon Sep 17 00:00:00 2001
From: rmagueta 
Date: Mon, 19 Apr 2021 14:29:18 +0100
Subject: [PATCH 167/579] Fix nasmesh warning

---
 openair2/NETWORK_DRIVER/MESH/mesh.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/openair2/NETWORK_DRIVER/MESH/mesh.c b/openair2/NETWORK_DRIVER/MESH/mesh.c
index ed87bc05f8..125832e373 100644
--- a/openair2/NETWORK_DRIVER/MESH/mesh.c
+++ b/openair2/NETWORK_DRIVER/MESH/mesh.c
@@ -885,9 +885,8 @@ int nas_mesh_DC_receive(struct cx_entity *cx,struct nas_priv *gpriv)
       else {
         switch (cx->state) {
         case NAS_CX_RELEASING_FAILURE:
-          cx->retry=0;
-
         case NAS_CX_DCH:
+          if(cx->state==NAS_CX_RELEASING_FAILURE) cx->retry=0;
           nas_mesh_DC_decode_cx_loss_ind(cx,p);   // process message
           break;
 

From 9a79ef0e1081fc347337fa03534ff4b4687a9631 Mon Sep 17 00:00:00 2001
From: Roberto Louro Magueta 
Date: Mon, 19 Apr 2021 16:35:08 +0200
Subject: [PATCH 168/579] Revert "Fix nasmesh warning"

This reverts commit b99f81f701929b7884a86f342f805a4215298974
---
 openair2/NETWORK_DRIVER/MESH/mesh.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/openair2/NETWORK_DRIVER/MESH/mesh.c b/openair2/NETWORK_DRIVER/MESH/mesh.c
index 125832e373..ed87bc05f8 100644
--- a/openair2/NETWORK_DRIVER/MESH/mesh.c
+++ b/openair2/NETWORK_DRIVER/MESH/mesh.c
@@ -885,8 +885,9 @@ int nas_mesh_DC_receive(struct cx_entity *cx,struct nas_priv *gpriv)
       else {
         switch (cx->state) {
         case NAS_CX_RELEASING_FAILURE:
+          cx->retry=0;
+
         case NAS_CX_DCH:
-          if(cx->state==NAS_CX_RELEASING_FAILURE) cx->retry=0;
           nas_mesh_DC_decode_cx_loss_ind(cx,p);   // process message
           break;
 

From d4a6fffc953a658c953ec173993eadd29e9d1208 Mon Sep 17 00:00:00 2001
From: rmagueta 
Date: Mon, 19 Apr 2021 15:36:21 +0100
Subject: [PATCH 169/579] Fix nasmesh warning

---
 openair2/NETWORK_DRIVER/MESH/mesh.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/openair2/NETWORK_DRIVER/MESH/mesh.c b/openair2/NETWORK_DRIVER/MESH/mesh.c
index ed87bc05f8..7e147feb68 100644
--- a/openair2/NETWORK_DRIVER/MESH/mesh.c
+++ b/openair2/NETWORK_DRIVER/MESH/mesh.c
@@ -886,6 +886,7 @@ int nas_mesh_DC_receive(struct cx_entity *cx,struct nas_priv *gpriv)
         switch (cx->state) {
         case NAS_CX_RELEASING_FAILURE:
           cx->retry=0;
+          /* fallthrough */
 
         case NAS_CX_DCH:
           nas_mesh_DC_decode_cx_loss_ind(cx,p);   // process message

From 33101b27f2ce9edb14c75d3cf331831ab564b7f4 Mon Sep 17 00:00:00 2001
From: francescomani 
Date: Fri, 26 Mar 2021 15:46:51 +0100
Subject: [PATCH 170/579] getting rid of dl and ul_bwp_dedicated in config
 request

---
 .../nfapi/public_inc/fapi_nr_ue_interface.h   |   6 -
 openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c  |  28 ++--
 openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c   | 130 ++++++++++--------
 3 files changed, 93 insertions(+), 71 deletions(-)

diff --git a/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h b/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
index 8c2118cd3d..0436f92a8d 100644
--- a/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
+++ b/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
@@ -1058,12 +1058,6 @@ typedef struct {
   fapi_nr_tdd_table_t tdd_table;
   fapi_nr_prach_config_t prach_config;
 
-  fapi_nr_dl_bwp_common_config_t     dl_bwp_common;
-  fapi_nr_dl_bwp_dedicated_config_t  dl_bwp_dedicated;
-
-  fapi_nr_ul_bwp_common_config_t     ul_bwp_common;
-  fapi_nr_ul_bwp_dedicated_config_t  ul_bwp_dedicated;
-
 } fapi_nr_config_request_t;
 
 #endif
diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
index 78328e3888..1cf54d9e4a 100644
--- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
@@ -817,7 +817,7 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
              using tables 7.3.1.2.2-1, 7.3.1.2.2-2, 7.3.1.2.2-3, 7.3.1.2.2-4 of 3GPP TS 38.212 */
     dlsch_config_pdu_1_1->n_dmrs_cdm_groups = 1;
     /* VRB_TO_PRB_MAPPING */
-    if (mac->phy_config.config_req.dl_bwp_dedicated.pdsch_config_dedicated.resource_allocation != 0)
+    if ((pdsch_config->resourceAllocation == 1) && (pdsch_config->vrb_ToPRB_Interleaver != NULL))
       dlsch_config_pdu_1_1->vrb_to_prb_mapping = (dci->vrb_to_prb_mapping.val == 0) ? vrb_to_prb_mapping_non_interleaved:vrb_to_prb_mapping_interleaved;
     /* PRB_BUNDLING_SIZE_IND */
     dlsch_config_pdu_1_1->prb_bundling_size_ind = dci->prb_bundling_size_indicator.val;
@@ -876,11 +876,22 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
     /* PDSCH_TO_HARQ_FEEDBACK_TIME_IND */
     // according to TS 38.213 Table 9.2.3-1
     NR_BWP_Id_t ul_bwp_id = mac->UL_BWP_Id;
-    dlsch_config_pdu_1_1->pdsch_to_harq_feedback_time_ind = mac->ULbwp[ul_bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->dl_DataToUL_ACK->list.array[dci->pdsch_to_harq_feedback_timing_indicator.val][0];
+    dlsch_config_pdu_1_1->pdsch_to_harq_feedback_time_ind =
+      mac->ULbwp[ul_bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->dl_DataToUL_ACK->list.array[dci->pdsch_to_harq_feedback_timing_indicator.val][0];
+
     /* ANTENNA_PORTS */
     uint8_t n_codewords = 1; // FIXME!!!
-    if ((mac->phy_config.config_req.dl_bwp_dedicated.pdsch_config_dedicated.dmrs_dl_for_pdsch_mapping_type_a.dmrs_type == 1) &&
-	(mac->phy_config.config_req.dl_bwp_dedicated.pdsch_config_dedicated.dmrs_dl_for_pdsch_mapping_type_a.max_length == 1)){
+    long *max_length = NULL;
+    long *dmrs_type = NULL;
+    if (pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA) {
+      max_length = pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->maxLength;
+      dmrs_type = pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type;
+    }
+    if (pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeB) {
+      max_length = pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeB->choice.setup->maxLength;
+      dmrs_type = pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeB->choice.setup->dmrs_Type;
+    }
+    if ((dmrs_type == NULL) && (max_length == NULL)){
       // Table 7.3.1.2.2-1: Antenna port(s) (1000 + DMRS port), dmrs-Type=1, maxLength=1
       dlsch_config_pdu_1_1->n_dmrs_cdm_groups = table_7_3_2_3_3_1[dci->antenna_ports.val][0];
       dlsch_config_pdu_1_1->dmrs_ports[0]     = table_7_3_2_3_3_1[dci->antenna_ports.val][1];
@@ -888,8 +899,7 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
       dlsch_config_pdu_1_1->dmrs_ports[2]     = table_7_3_2_3_3_1[dci->antenna_ports.val][3];
       dlsch_config_pdu_1_1->dmrs_ports[3]     = table_7_3_2_3_3_1[dci->antenna_ports.val][4];
     }
-    if ((mac->phy_config.config_req.dl_bwp_dedicated.pdsch_config_dedicated.dmrs_dl_for_pdsch_mapping_type_a.dmrs_type == 1) &&
-	(mac->phy_config.config_req.dl_bwp_dedicated.pdsch_config_dedicated.dmrs_dl_for_pdsch_mapping_type_a.max_length == 2)){
+    if ((dmrs_type == NULL) && (max_length != NULL)){
       // Table 7.3.1.2.2-2: Antenna port(s) (1000 + DMRS port), dmrs-Type=1, maxLength=2
       if (n_codewords == 1) {
 	dlsch_config_pdu_1_1->n_dmrs_cdm_groups = table_7_3_2_3_3_2_oneCodeword[dci->antenna_ports.val][0];
@@ -912,8 +922,7 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
 	dlsch_config_pdu_1_1->n_front_load_symb = table_7_3_2_3_3_2_twoCodeword[dci->antenna_ports.val][9];
       }
     }
-    if ((mac->phy_config.config_req.dl_bwp_dedicated.pdsch_config_dedicated.dmrs_dl_for_pdsch_mapping_type_a.dmrs_type == 2) &&
-	(mac->phy_config.config_req.dl_bwp_dedicated.pdsch_config_dedicated.dmrs_dl_for_pdsch_mapping_type_a.max_length == 1)){
+    if ((dmrs_type != NULL) && (max_length == NULL)){
       // Table 7.3.1.2.2-3: Antenna port(s) (1000 + DMRS port), dmrs-Type=2, maxLength=1
       if (n_codewords == 1) {
 	dlsch_config_pdu_1_1->n_dmrs_cdm_groups = table_7_3_2_3_3_3_oneCodeword[dci->antenna_ports.val][0];
@@ -932,8 +941,7 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
 	dlsch_config_pdu_1_1->dmrs_ports[5]     = table_7_3_2_3_3_3_twoCodeword[dci->antenna_ports.val][6];
       }
     }
-    if ((mac->phy_config.config_req.dl_bwp_dedicated.pdsch_config_dedicated.dmrs_dl_for_pdsch_mapping_type_a.dmrs_type == 2) &&
-	(mac->phy_config.config_req.dl_bwp_dedicated.pdsch_config_dedicated.dmrs_dl_for_pdsch_mapping_type_a.max_length == 2)){
+    if ((dmrs_type != NULL) && (max_length != NULL)){
       // Table 7.3.1.2.2-4: Antenna port(s) (1000 + DMRS port), dmrs-Type=2, maxLength=2
       if (n_codewords == 1) {
 	dlsch_config_pdu_1_1->n_dmrs_cdm_groups = table_7_3_2_3_3_4_oneCodeword[dci->antenna_ports.val][0];
diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
index 1295b3049b..98c2658f8e 100644
--- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
@@ -149,14 +149,25 @@ fapi_nr_ul_config_request_t *get_ul_config_request(NR_UE_MAC_INST_t *mac, int sl
 
 void ul_layers_config(NR_UE_MAC_INST_t * mac, nfapi_nr_ue_pusch_pdu_t *pusch_config_pdu, dci_pdu_rel15_t *dci) {
 
-  fapi_nr_pusch_config_dedicated_t *pusch_config_dedicated = &mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated;
+  NR_ServingCellConfigCommon_t *scc = mac->scc;
   NR_PUSCH_Config_t *pusch_Config = mac->ULbwp[0]->bwp_Dedicated->pusch_Config->choice.setup;
 
+  long	transformPrecoder;
+  if (pusch_Config->transformPrecoder)
+    transformPrecoder = *pusch_Config->transformPrecoder;
+  else {
+    if(scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg3_transformPrecoder)
+      transformPrecoder = NR_PUSCH_Config__transformPrecoder_enabled;
+    else
+      transformPrecoder = NR_PUSCH_Config__transformPrecoder_disabled;
+  }
+
+
   /* PRECOD_NBR_LAYERS */
-  if ((pusch_config_dedicated->tx_config == tx_config_nonCodebook));
+  if ((*pusch_Config->txConfig == NR_PUSCH_Config__txConfig_nonCodebook));
   // 0 bits if the higher layer parameter txConfig = nonCodeBook
 
-  if ((pusch_config_dedicated->tx_config == tx_config_codebook)){
+  if ((*pusch_Config->txConfig == NR_PUSCH_Config__txConfig_codebook)){
 
     uint8_t n_antenna_port = 0; //FIXME!!!
 
@@ -165,43 +176,43 @@ void ul_layers_config(NR_UE_MAC_INST_t * mac, nfapi_nr_ue_pusch_pdu_t *pusch_con
     if (n_antenna_port == 4){ // 4 antenna port and the higher layer parameter txConfig = codebook
 
       // Table 7.3.1.1.2-2: transformPrecoder=disabled and maxRank = 2 or 3 or 4
-      if ((pusch_config_dedicated->transform_precoder == transform_precoder_disabled)
-        && ((pusch_config_dedicated->max_rank == 2) ||
-        (pusch_config_dedicated->max_rank == 3) ||
-        (pusch_config_dedicated->max_rank == 4))){
+      if ((transformPrecoder == NR_PUSCH_Config__transformPrecoder_disabled)
+        && ((*pusch_Config->maxRank == 2) ||
+        (*pusch_Config->maxRank == 3) ||
+        (*pusch_Config->maxRank == 4))){
 
-        if (pusch_config_dedicated->codebook_subset == codebook_subset_fullyAndPartialAndNonCoherent) {
+        if (*pusch_Config->codebookSubset == NR_PUSCH_Config__codebookSubset_fullyAndPartialAndNonCoherent) {
           pusch_config_pdu->nrOfLayers = table_7_3_1_1_2_2_3_4_5[dci->precoding_information.val][0];
           pusch_config_pdu->transform_precoding = table_7_3_1_1_2_2_3_4_5[dci->precoding_information.val][1];
         }
 
-        if (pusch_config_dedicated->codebook_subset == codebook_subset_partialAndNonCoherent){
+        if (*pusch_Config->codebookSubset == NR_PUSCH_Config__codebookSubset_partialAndNonCoherent){
           pusch_config_pdu->nrOfLayers = table_7_3_1_1_2_2_3_4_5[dci->precoding_information.val][2];
           pusch_config_pdu->transform_precoding = table_7_3_1_1_2_2_3_4_5[dci->precoding_information.val][3];
         }
 
-        if (pusch_config_dedicated->codebook_subset == codebook_subset_nonCoherent){
+        if (*pusch_Config->codebookSubset == NR_PUSCH_Config__codebookSubset_nonCoherent){
           pusch_config_pdu->nrOfLayers = table_7_3_1_1_2_2_3_4_5[dci->precoding_information.val][4];
           pusch_config_pdu->transform_precoding = table_7_3_1_1_2_2_3_4_5[dci->precoding_information.val][5];
         }
       }
 
       // Table 7.3.1.1.2-3: transformPrecoder= enabled, or transformPrecoder=disabled and maxRank = 1
-      if (((pusch_config_dedicated->transform_precoder == transform_precoder_enabled)
-        || (pusch_config_dedicated->transform_precoder == transform_precoder_disabled))
-        && (pusch_config_dedicated->max_rank == 1)){
+      if (((transformPrecoder == NR_PUSCH_Config__transformPrecoder_enabled)
+        || (transformPrecoder == NR_PUSCH_Config__transformPrecoder_disabled))
+        && (*pusch_Config->maxRank == 1)){
 
-        if (pusch_config_dedicated->codebook_subset == codebook_subset_fullyAndPartialAndNonCoherent) {
+        if (*pusch_Config->codebookSubset == NR_PUSCH_Config__codebookSubset_fullyAndPartialAndNonCoherent) {
           pusch_config_pdu->nrOfLayers = table_7_3_1_1_2_2_3_4_5[dci->precoding_information.val][6];
           pusch_config_pdu->transform_precoding = table_7_3_1_1_2_2_3_4_5[dci->precoding_information.val][7];
         }
 
-        if (pusch_config_dedicated->codebook_subset == codebook_subset_partialAndNonCoherent){
+        if (*pusch_Config->codebookSubset == NR_PUSCH_Config__codebookSubset_partialAndNonCoherent){
           pusch_config_pdu->nrOfLayers = table_7_3_1_1_2_2_3_4_5[dci->precoding_information.val][8];
           pusch_config_pdu->transform_precoding = table_7_3_1_1_2_2_3_4_5[dci->precoding_information.val][9];
         }
 
-        if (pusch_config_dedicated->codebook_subset == codebook_subset_nonCoherent){
+        if (*pusch_Config->codebookSubset == NR_PUSCH_Config__codebookSubset_nonCoherent){
           pusch_config_pdu->nrOfLayers = table_7_3_1_1_2_2_3_4_5[dci->precoding_information.val][10];
           pusch_config_pdu->transform_precoding = table_7_3_1_1_2_2_3_4_5[dci->precoding_information.val][11];
         }
@@ -210,14 +221,14 @@ void ul_layers_config(NR_UE_MAC_INST_t * mac, nfapi_nr_ue_pusch_pdu_t *pusch_con
 
     if (n_antenna_port == 4){ // 2 antenna port and the higher layer parameter txConfig = codebook
       // Table 7.3.1.1.2-4: transformPrecoder=disabled and maxRank = 2
-      if ((pusch_config_dedicated->transform_precoder == transform_precoder_disabled) && (pusch_config_dedicated->max_rank == 2)){
+      if ((transformPrecoder == NR_PUSCH_Config__transformPrecoder_disabled) && (*pusch_Config->maxRank == 2)){
 
-        if (pusch_config_dedicated->codebook_subset == codebook_subset_fullyAndPartialAndNonCoherent) {
+        if (*pusch_Config->codebookSubset == NR_PUSCH_Config__codebookSubset_fullyAndPartialAndNonCoherent) {
           pusch_config_pdu->nrOfLayers = table_7_3_1_1_2_2_3_4_5[dci->precoding_information.val][12];
           pusch_config_pdu->transform_precoding = table_7_3_1_1_2_2_3_4_5[dci->precoding_information.val][13];
         }
 
-        if (pusch_config_dedicated->codebook_subset == codebook_subset_nonCoherent){
+        if (*pusch_Config->codebookSubset == NR_PUSCH_Config__codebookSubset_nonCoherent){
           pusch_config_pdu->nrOfLayers = table_7_3_1_1_2_2_3_4_5[dci->precoding_information.val][14];
           pusch_config_pdu->transform_precoding = table_7_3_1_1_2_2_3_4_5[dci->precoding_information.val][15];
         }
@@ -225,16 +236,16 @@ void ul_layers_config(NR_UE_MAC_INST_t * mac, nfapi_nr_ue_pusch_pdu_t *pusch_con
       }
 
       // Table 7.3.1.1.2-5: transformPrecoder= enabled, or transformPrecoder= disabled and maxRank = 1
-      if (((pusch_config_dedicated->transform_precoder == transform_precoder_enabled)
-        || (pusch_config_dedicated->transform_precoder == transform_precoder_disabled))
-        && (pusch_config_dedicated->max_rank == 1)){
+      if (((transformPrecoder == NR_PUSCH_Config__transformPrecoder_enabled)
+        || (transformPrecoder == NR_PUSCH_Config__transformPrecoder_disabled))
+        && (*pusch_Config->maxRank == 1)){
 
-        if (pusch_config_dedicated->codebook_subset == codebook_subset_fullyAndPartialAndNonCoherent) {
+        if (*pusch_Config->codebookSubset == NR_PUSCH_Config__codebookSubset_fullyAndPartialAndNonCoherent) {
           pusch_config_pdu->nrOfLayers = table_7_3_1_1_2_2_3_4_5[dci->precoding_information.val][16];
           pusch_config_pdu->transform_precoding = table_7_3_1_1_2_2_3_4_5[dci->precoding_information.val][17];
         }
 
-        if (pusch_config_dedicated->codebook_subset == codebook_subset_nonCoherent){
+        if (*pusch_Config->codebookSubset == NR_PUSCH_Config__codebookSubset_nonCoherent){
           pusch_config_pdu->nrOfLayers = table_7_3_1_1_2_2_3_4_5[dci->precoding_information.val][18];
           pusch_config_pdu->transform_precoding = table_7_3_1_1_2_2_3_4_5[dci->precoding_information.val][19];
         }
@@ -245,7 +256,7 @@ void ul_layers_config(NR_UE_MAC_INST_t * mac, nfapi_nr_ue_pusch_pdu_t *pusch_con
 
   /*-------------------- Changed to enable Transform precoding in RF SIM------------------------------------------------*/
 
-  if (pusch_config_pdu->transform_precoding == transform_precoder_enabled) {
+ /*if (pusch_config_pdu->transform_precoding == transform_precoder_enabled) {
 
     pusch_config_dedicated->transform_precoder = transform_precoder_enabled;
 
@@ -269,15 +280,7 @@ void ul_layers_config(NR_UE_MAC_INST_t * mac, nfapi_nr_ue_pusch_pdu_t *pusch_con
 
     }
   } else
-    pusch_config_dedicated->transform_precoder = transform_precoder_disabled;
-
-  // mapping type b configured from RRC. TBD: Mapping type b is not handled in this function.
-  if ((pusch_config_dedicated->transform_precoder == transform_precoder_enabled) &&
-      (pusch_config_dedicated->dmrs_ul_for_pusch_mapping_type_b.dmrs_type == 1) &&
-      (pusch_config_dedicated->dmrs_ul_for_pusch_mapping_type_b.max_length == 1)) { // tables 7.3.1.1.2-6
-    pusch_config_pdu->num_dmrs_cdm_grps_no_data = 2;
-    pusch_config_pdu->dmrs_ports = dci->antenna_ports.val;
-  }
+    pusch_config_dedicated->transform_precoder = transform_precoder_disabled;*/
 }
 
 // todo: this function shall be reviewed completely because of the many comments left by the author
@@ -285,27 +288,47 @@ void ul_ports_config(NR_UE_MAC_INST_t * mac, nfapi_nr_ue_pusch_pdu_t *pusch_conf
 
   /* ANTENNA_PORTS */
   uint8_t rank = 0; // We need to initialize rank FIXME!!!
-  fapi_nr_pusch_config_dedicated_t *pusch_config_dedicated = &mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated;
 
-  if ((pusch_config_dedicated->transform_precoder == transform_precoder_enabled) &&
-    (pusch_config_dedicated->dmrs_ul_for_pusch_mapping_type_a.dmrs_type == 1) &&
-    (pusch_config_dedicated->dmrs_ul_for_pusch_mapping_type_a.max_length == 1)) { // tables 7.3.1.1.2-6
+  NR_ServingCellConfigCommon_t *scc = mac->scc;
+  NR_PUSCH_Config_t *pusch_Config = mac->ULbwp[0]->bwp_Dedicated->pusch_Config->choice.setup;
+
+  long	transformPrecoder;
+  if (pusch_Config->transformPrecoder)
+    transformPrecoder = *pusch_Config->transformPrecoder;
+  else {
+    if(scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg3_transformPrecoder)
+      transformPrecoder = NR_PUSCH_Config__transformPrecoder_enabled;
+    else
+      transformPrecoder = NR_PUSCH_Config__transformPrecoder_disabled;
+  }
+  long *max_length = NULL;
+  long *dmrs_type = NULL;
+  if (pusch_Config->dmrs_UplinkForPUSCH_MappingTypeA) {
+    max_length = pusch_Config->dmrs_UplinkForPUSCH_MappingTypeA->choice.setup->maxLength;
+    dmrs_type = pusch_Config->dmrs_UplinkForPUSCH_MappingTypeA->choice.setup->dmrs_Type;
+  }
+  else {
+    max_length = pusch_Config->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->maxLength;
+    dmrs_type = pusch_Config->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->dmrs_Type;
+  }
+
+
+  if ((transformPrecoder == NR_PUSCH_Config__transformPrecoder_enabled) &&
+    (dmrs_type == NULL) && (max_length == NULL)) { // tables 7.3.1.1.2-6
       pusch_config_pdu->num_dmrs_cdm_grps_no_data = 2; //TBC
       pusch_config_pdu->dmrs_ports = dci->antenna_ports.val; //TBC
   }
 
-  if ((pusch_config_dedicated->transform_precoder == transform_precoder_enabled) &&
-    (pusch_config_dedicated->dmrs_ul_for_pusch_mapping_type_a.dmrs_type == 1) &&
-    (pusch_config_dedicated->dmrs_ul_for_pusch_mapping_type_a.max_length == 2)) { // tables 7.3.1.1.2-7
+  if ((transformPrecoder == NR_PUSCH_Config__transformPrecoder_enabled) &&
+    (dmrs_type == NULL) && (max_length != NULL)) { // tables 7.3.1.1.2-7
 
     pusch_config_pdu->num_dmrs_cdm_grps_no_data = 2; //TBC
     pusch_config_pdu->dmrs_ports = (dci->antenna_ports.val > 3)?(dci->antenna_ports.val-4):(dci->antenna_ports.val); //TBC
     //pusch_config_pdu->n_front_load_symb = (dci->antenna_ports > 3)?2:1; //FIXME
   }
 
-  if ((pusch_config_dedicated->transform_precoder == transform_precoder_disabled) &&
-    (pusch_config_dedicated->dmrs_ul_for_pusch_mapping_type_a.dmrs_type == 1) &&
-    (pusch_config_dedicated->dmrs_ul_for_pusch_mapping_type_a.max_length == 1)) { // tables 7.3.1.1.2-8/9/10/11
+  if ((transformPrecoder == NR_PUSCH_Config__transformPrecoder_disabled) &&
+    (dmrs_type == NULL) && (max_length == NULL)) { // tables 7.3.1.1.2-8/9/10/11
 
     if (rank == 1) {
       pusch_config_pdu->num_dmrs_cdm_grps_no_data = (dci->antenna_ports.val > 1)?2:1; //TBC
@@ -337,9 +360,8 @@ void ul_ports_config(NR_UE_MAC_INST_t * mac, nfapi_nr_ue_pusch_pdu_t *pusch_conf
     }
   }
 
-  if ((pusch_config_dedicated->transform_precoder == transform_precoder_disabled) &&
-    (pusch_config_dedicated->dmrs_ul_for_pusch_mapping_type_a.dmrs_type == 1) &&
-    (pusch_config_dedicated->dmrs_ul_for_pusch_mapping_type_a.max_length == 2)) { // tables 7.3.1.1.2-12/13/14/15
+  if ((transformPrecoder == NR_PUSCH_Config__transformPrecoder_disabled) &&
+    (dmrs_type == NULL) && (max_length != NULL)) { // tables 7.3.1.1.2-12/13/14/15
 
     if (rank == 1){
       pusch_config_pdu->num_dmrs_cdm_grps_no_data = (dci->antenna_ports.val > 1)?2:1; //TBC
@@ -375,9 +397,9 @@ void ul_ports_config(NR_UE_MAC_INST_t * mac, nfapi_nr_ue_pusch_pdu_t *pusch_conf
     }
   }
 
-  if ((pusch_config_dedicated->transform_precoder == transform_precoder_disabled) &&
-    (pusch_config_dedicated->dmrs_ul_for_pusch_mapping_type_a.dmrs_type == 2) &&
-    (pusch_config_dedicated->dmrs_ul_for_pusch_mapping_type_a.max_length == 1)) { // tables 7.3.1.1.2-16/17/18/19
+  if ((transformPrecoder == NR_PUSCH_Config__transformPrecoder_disabled) &&
+    (dmrs_type != NULL) &&
+    (max_length == NULL)) { // tables 7.3.1.1.2-16/17/18/19
 
     if (rank == 1){
       pusch_config_pdu->num_dmrs_cdm_grps_no_data = (dci->antenna_ports.val > 1)?((dci->antenna_ports.val > 5)?3:2):1; //TBC
@@ -409,9 +431,8 @@ void ul_ports_config(NR_UE_MAC_INST_t * mac, nfapi_nr_ue_pusch_pdu_t *pusch_conf
     }
   }
 
-  if ((pusch_config_dedicated->transform_precoder == transform_precoder_disabled) &&
-    (pusch_config_dedicated->dmrs_ul_for_pusch_mapping_type_a.dmrs_type == 2) &&
-    (pusch_config_dedicated->dmrs_ul_for_pusch_mapping_type_a.max_length == 2)) { // tables 7.3.1.1.2-20/21/22/23
+  if ((transformPrecoder == NR_PUSCH_Config__transformPrecoder_disabled) &&
+    (dmrs_type != NULL) && (max_length != NULL)) { // tables 7.3.1.1.2-20/21/22/23
 
     if (rank == 1){
       pusch_config_pdu->num_dmrs_cdm_grps_no_data = table_7_3_1_1_2_20[dci->antenna_ports.val][0]; //TBC
@@ -569,7 +590,6 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac,
     int target_ss;
     bool valid_ptrs_setup = 0;
     uint16_t n_RB_ULBWP = NRRIV2BW(mac->ULbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
-    fapi_nr_pusch_config_dedicated_t *pusch_config_dedicated = &mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated;
     NR_PUSCH_Config_t *pusch_Config = mac->ULbwp[0]->bwp_Dedicated->pusch_Config->choice.setup;
 
     // Basic sanity check for MCS value to check for a false or erroneous DCI
@@ -652,7 +672,7 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac,
     }
 
     /* FREQ_HOPPING_FLAG */
-    if ((pusch_config_dedicated->resource_allocation != 0) && (pusch_config_dedicated->frequency_hopping !=0)){
+    if ((pusch_Config->frequencyHopping!=NULL) && (pusch_Config->resourceAllocation != NR_PUSCH_Config__resourceAllocation_resourceAllocationType0)){
       pusch_config_pdu->frequency_hopping = dci->frequency_hopping_flag.val;
     }
 

From 74d7bcb4425ad932e4f219809d1c5bcf10fe5308 Mon Sep 17 00:00:00 2001
From: Mohammed Ismail 
Date: Fri, 16 Apr 2021 17:15:41 +0200
Subject: [PATCH 171/579] CI: fix on the image tag

Signed-off-by: Mohammed Ismail 
---
 ci-scripts/cls_physim1.py | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/ci-scripts/cls_physim1.py b/ci-scripts/cls_physim1.py
index 1389f1e831..44a8c1678f 100644
--- a/ci-scripts/cls_physim1.py
+++ b/ci-scripts/cls_physim1.py
@@ -53,7 +53,7 @@ class PhySim:
 		self.ranRepository = ""
 		self.ranBranch = ""
 		self.ranCommitID= ""
-		self.ranAllowMerge= ""
+		self.ranAllowMerge= False
 		self.ranTargetBranch= ""
 		self.testResult = {}
 		self.testCount = [0,0,0]
@@ -103,9 +103,12 @@ class PhySim:
 		# if the commit ID is provided use it to point to it
 		if self.ranCommitID != '':
 			mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 5)
-
+		if self.ranAllowMerge:
+			imageTag = "ci-temp"
+		else:
+			imageTag = "develop"
 		# Check if image is exist on the Red Hat server, before pushing it to OC cluster
-		mySSH.command("sudo podman image inspect --format='Size = {{.Size}} bytes' oai-physim:temp", '\$', 60)
+		mySSH.command("sudo podman image inspect --format='Size = {{.Size}} bytes' oai-physim:" + imageTag, '\$', 60)
 		if mySSH.getBefore().count('no such image') != 0:
 			logging.error('\u001B[1m No such image oai-physim\u001B[0m')
 			mySSH.close()
@@ -158,8 +161,8 @@ class PhySim:
 			sys.exit(-1)
 		else:
 			logging.debug(f'\u001B[1m   Image Stream "oai-physim" created on OC project {ocWorkspace}\u001B[0m')
-		mySSH.command(f'sudo podman tag oai-physim:temp default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/{self.OCWorkspace}/oai-physim:temp', '\$', 6)
-		mySSH.command(f'sudo podman push default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/{self.OCWorkspace}/oai-physim:temp --tls-verify=false', '\$', 6)
+		mySSH.command(f'sudo podman tag oai-physim:{imageTag} default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/{self.OCWorkspace}/oai-physim:{imageTag}', '\$', 6)
+		mySSH.command(f'sudo podman push default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/{self.OCWorkspace}/oai-physim:{imageTag} --tls-verify=false', '\$', 6)
 		if mySSH.getBefore().count('Storing signatures') == 0:
 			logging.error('\u001B[1m Image "oai-physim" push to OC Cluster Registry Failed\u001B[0m')
 			mySSH.close()
@@ -198,7 +201,7 @@ class PhySim:
 		isFinished = False
 		while(count < 24 and isFinished == False):
 			time.sleep(58)
-			mySSH.command('oc get pods -l app.kubernetes.io/instance=physim | grep dlsim', '\$', 6)
+			mySSH.command('oc get pods -l app.kubernetes.io/instance=physim', '\$', 6)
 			time.sleep(2)
 			result = re.search('oai-nr-dlsim[\S\d\w]+', mySSH.getBefore())
 			if result is not None:
@@ -226,6 +229,9 @@ class PhySim:
 				isFinished1 = True
 		if isFinished1 == True:
 			logging.debug('\u001B[1m UnDeployed PhySim Successfully on OC Cluster\u001B[0m')
+		mySSH.command(f'sudo podman rmi default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/{self.OCWorkspace}/oai-physim:{imageTag}', '\$', 6)
+		mySSH.command('oc delete is oai-physim', '\$', 6)
+		logging.debug('\u001B[1m Deleted the Image and ImageStream\u001B[0m')
 		mySSH.command('oc logout', '\$', 6)
 		mySSH.close()
 		self.AnalyzeLogFile_phySim(HTML)

From ea88b0585ccc212d7ee6e3342da085526d62a98a Mon Sep 17 00:00:00 2001
From: Mohammed Ismail 
Date: Tue, 20 Apr 2021 10:54:11 +0200
Subject: [PATCH 172/579] CI: added resource lock

Signed-off-by: Mohammed Ismail 
---
 ci-scripts/Jenkinsfile-physim-deploy | 5 ++++-
 ci-scripts/cls_physim1.py            | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/ci-scripts/Jenkinsfile-physim-deploy b/ci-scripts/Jenkinsfile-physim-deploy
index 5eff0b34be..4014990f93 100644
--- a/ci-scripts/Jenkinsfile-physim-deploy
+++ b/ci-scripts/Jenkinsfile-physim-deploy
@@ -31,6 +31,9 @@ def buildStageStatus = true
 // Name of the test stage
 def testStageName = params.pipelineTestStageName
 
+// Name of the resource
+def ciEpcResource = params.epcResource
+
 // Global Parameters. Normally they should be populated when the master job
 // triggers the slave job with parameters
 def eNB_Repository
@@ -53,7 +56,7 @@ pipeline {
     disableConcurrentBuilds()
     timestamps()
     ansiColor('xterm')
-    //lock(cn_ci_resource)
+    lock(ciEpcResource)
   }
 
   stages {
diff --git a/ci-scripts/cls_physim1.py b/ci-scripts/cls_physim1.py
index 44a8c1678f..9e8d3d0613 100644
--- a/ci-scripts/cls_physim1.py
+++ b/ci-scripts/cls_physim1.py
@@ -162,7 +162,7 @@ class PhySim:
 		else:
 			logging.debug(f'\u001B[1m   Image Stream "oai-physim" created on OC project {ocWorkspace}\u001B[0m')
 		mySSH.command(f'sudo podman tag oai-physim:{imageTag} default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/{self.OCWorkspace}/oai-physim:{imageTag}', '\$', 6)
-		mySSH.command(f'sudo podman push default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/{self.OCWorkspace}/oai-physim:{imageTag} --tls-verify=false', '\$', 6)
+		mySSH.command(f'sudo podman push default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/{self.OCWorkspace}/oai-physim:{imageTag} --tls-verify=false', '\$', 30)
 		if mySSH.getBefore().count('Storing signatures') == 0:
 			logging.error('\u001B[1m Image "oai-physim" push to OC Cluster Registry Failed\u001B[0m')
 			mySSH.close()

From f6b8351e29ee058102ff0f0944bce8680495628d Mon Sep 17 00:00:00 2001
From: Mohammed Ismail 
Date: Tue, 20 Apr 2021 11:31:04 +0200
Subject: [PATCH 173/579] CI: fix on the tag

Signed-off-by: Mohammed Ismail 
---
 .../charts/dlsim/templates/deployment.yaml    |  2 +-
 .../charts/ldpctest/templates/deployment.yaml |  2 +-
 .../nr-dlschsim/templates/deployment.yaml     |  2 +-
 .../charts/nr-dlsim/templates/deployment.yaml |  2 +-
 .../nr-pbchsim/templates/deployment.yaml      |  2 +-
 .../nr-prachsim/templates/deployment.yaml     |  2 +-
 .../nr-pucchsim/templates/deployment.yaml     |  2 +-
 .../nr-ulschsim/templates/deployment.yaml     |  2 +-
 .../charts/nr-ulsim/templates/deployment.yaml |  2 +-
 .../polartest/templates/deployment.yaml       |  2 +-
 .../smallblocktest/templates/deployment.yaml  |  2 +-
 .../charts/ulsim/templates/deployment.yaml    |  2 +-
 charts/physims/values.yaml                    | 76 +------------------
 ci-scripts/cls_physim1.py                     |  1 +
 14 files changed, 16 insertions(+), 85 deletions(-)

diff --git a/charts/physims/charts/dlsim/templates/deployment.yaml b/charts/physims/charts/dlsim/templates/deployment.yaml
index a8ec990e9d..9cbdd383b3 100644
--- a/charts/physims/charts/dlsim/templates/deployment.yaml
+++ b/charts/physims/charts/dlsim/templates/deployment.yaml
@@ -24,7 +24,7 @@ spec:
     {{- end }}
       containers:
       - name: physim
-        image: "{{ .Values.image.repository }}:{{ .Values.image.version }}"
+        image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
         imagePullPolicy: {{ .Values.image.pullPolicy }}
         securityContext:
           {{- toYaml .Values.securityContext | nindent 12 }}
diff --git a/charts/physims/charts/ldpctest/templates/deployment.yaml b/charts/physims/charts/ldpctest/templates/deployment.yaml
index be4306eb4f..ef30d9c08a 100644
--- a/charts/physims/charts/ldpctest/templates/deployment.yaml
+++ b/charts/physims/charts/ldpctest/templates/deployment.yaml
@@ -24,7 +24,7 @@ spec:
     {{- end }}
       containers:
       - name: physim
-        image: "{{ .Values.image.repository }}:{{ .Values.image.version }}"
+        image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
         imagePullPolicy: {{ .Values.image.pullPolicy }}
         securityContext:
           {{- toYaml .Values.securityContext | nindent 12 }}
diff --git a/charts/physims/charts/nr-dlschsim/templates/deployment.yaml b/charts/physims/charts/nr-dlschsim/templates/deployment.yaml
index a07b8ecfd4..23c3699c25 100644
--- a/charts/physims/charts/nr-dlschsim/templates/deployment.yaml
+++ b/charts/physims/charts/nr-dlschsim/templates/deployment.yaml
@@ -24,7 +24,7 @@ spec:
     {{- end }}
       containers:
       - name: physim
-        image: "{{ .Values.image.repository }}:{{ .Values.image.version }}"
+        image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
         imagePullPolicy: {{ .Values.image.pullPolicy }}
         securityContext:
           {{- toYaml .Values.securityContext | nindent 12 }}
diff --git a/charts/physims/charts/nr-dlsim/templates/deployment.yaml b/charts/physims/charts/nr-dlsim/templates/deployment.yaml
index 3d5b495d40..4c38664e61 100644
--- a/charts/physims/charts/nr-dlsim/templates/deployment.yaml
+++ b/charts/physims/charts/nr-dlsim/templates/deployment.yaml
@@ -24,7 +24,7 @@ spec:
     {{- end }}
       containers:
       - name: physim
-        image: "{{ .Values.image.repository }}:{{ .Values.image.version }}"
+        image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
         imagePullPolicy: {{ .Values.image.pullPolicy }}
         securityContext:
           {{- toYaml .Values.securityContext | nindent 12 }}
diff --git a/charts/physims/charts/nr-pbchsim/templates/deployment.yaml b/charts/physims/charts/nr-pbchsim/templates/deployment.yaml
index abcf9a6ba6..551785abc0 100644
--- a/charts/physims/charts/nr-pbchsim/templates/deployment.yaml
+++ b/charts/physims/charts/nr-pbchsim/templates/deployment.yaml
@@ -24,7 +24,7 @@ spec:
     {{- end }}
       containers:
       - name: physim
-        image: "{{ .Values.image.repository }}:{{ .Values.image.version }}"
+        image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
         imagePullPolicy: {{ .Values.image.pullPolicy }}
         securityContext:
           {{- toYaml .Values.securityContext | nindent 12 }}
diff --git a/charts/physims/charts/nr-prachsim/templates/deployment.yaml b/charts/physims/charts/nr-prachsim/templates/deployment.yaml
index 9edcc25b7c..52bc030c45 100644
--- a/charts/physims/charts/nr-prachsim/templates/deployment.yaml
+++ b/charts/physims/charts/nr-prachsim/templates/deployment.yaml
@@ -24,7 +24,7 @@ spec:
     {{- end }}
       containers:
       - name: physim
-        image: "{{ .Values.image.repository }}:{{ .Values.image.version }}"
+        image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
         imagePullPolicy: {{ .Values.image.pullPolicy }}
         securityContext:
           {{- toYaml .Values.securityContext | nindent 12 }}
diff --git a/charts/physims/charts/nr-pucchsim/templates/deployment.yaml b/charts/physims/charts/nr-pucchsim/templates/deployment.yaml
index 0709577ab4..d783991e0b 100644
--- a/charts/physims/charts/nr-pucchsim/templates/deployment.yaml
+++ b/charts/physims/charts/nr-pucchsim/templates/deployment.yaml
@@ -24,7 +24,7 @@ spec:
     {{- end }}
       containers:
       - name: physim
-        image: "{{ .Values.image.repository }}:{{ .Values.image.version }}"
+        image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
         imagePullPolicy: {{ .Values.image.pullPolicy }}
         securityContext:
           {{- toYaml .Values.securityContext | nindent 12 }}
diff --git a/charts/physims/charts/nr-ulschsim/templates/deployment.yaml b/charts/physims/charts/nr-ulschsim/templates/deployment.yaml
index 626ff9305b..56fb0de5b8 100644
--- a/charts/physims/charts/nr-ulschsim/templates/deployment.yaml
+++ b/charts/physims/charts/nr-ulschsim/templates/deployment.yaml
@@ -24,7 +24,7 @@ spec:
     {{- end }}
       containers:
       - name: physim
-        image: "{{ .Values.image.repository }}:{{ .Values.image.version }}"
+        image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
         imagePullPolicy: {{ .Values.image.pullPolicy }}
         securityContext:
           {{- toYaml .Values.securityContext | nindent 12 }}
diff --git a/charts/physims/charts/nr-ulsim/templates/deployment.yaml b/charts/physims/charts/nr-ulsim/templates/deployment.yaml
index ca9c3fbd50..c0fa5ceb3b 100644
--- a/charts/physims/charts/nr-ulsim/templates/deployment.yaml
+++ b/charts/physims/charts/nr-ulsim/templates/deployment.yaml
@@ -24,7 +24,7 @@ spec:
     {{- end }}
       containers:
       - name: physim
-        image: "{{ .Values.image.repository }}:{{ .Values.image.version }}"
+        image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
         imagePullPolicy: {{ .Values.image.pullPolicy }}
         securityContext:
           {{- toYaml .Values.securityContext | nindent 12 }}
diff --git a/charts/physims/charts/polartest/templates/deployment.yaml b/charts/physims/charts/polartest/templates/deployment.yaml
index 61bf705a02..01a6efc815 100644
--- a/charts/physims/charts/polartest/templates/deployment.yaml
+++ b/charts/physims/charts/polartest/templates/deployment.yaml
@@ -24,7 +24,7 @@ spec:
     {{- end }}
       containers:
       - name: physim
-        image: "{{ .Values.image.repository }}:{{ .Values.image.version }}"
+        image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
         imagePullPolicy: {{ .Values.image.pullPolicy }}
         securityContext:
           {{- toYaml .Values.securityContext | nindent 12 }}
diff --git a/charts/physims/charts/smallblocktest/templates/deployment.yaml b/charts/physims/charts/smallblocktest/templates/deployment.yaml
index 84fcaf41b6..3439c2597e 100644
--- a/charts/physims/charts/smallblocktest/templates/deployment.yaml
+++ b/charts/physims/charts/smallblocktest/templates/deployment.yaml
@@ -24,7 +24,7 @@ spec:
     {{- end }}
       containers:
       - name: physim
-        image: "{{ .Values.image.repository }}:{{ .Values.image.version }}"
+        image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
         imagePullPolicy: {{ .Values.image.pullPolicy }}
         securityContext:
           {{- toYaml .Values.securityContext | nindent 12 }}
diff --git a/charts/physims/charts/ulsim/templates/deployment.yaml b/charts/physims/charts/ulsim/templates/deployment.yaml
index fbe6820542..e8c90dabc1 100644
--- a/charts/physims/charts/ulsim/templates/deployment.yaml
+++ b/charts/physims/charts/ulsim/templates/deployment.yaml
@@ -24,7 +24,7 @@ spec:
     {{- end }}
       containers:
       - name: physim
-        image: "{{ .Values.image.repository }}:{{ .Values.image.version }}"
+        image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
         imagePullPolicy: {{ .Values.image.pullPolicy }}
         securityContext:
           {{- toYaml .Values.securityContext | nindent 12 }}
diff --git a/charts/physims/values.yaml b/charts/physims/values.yaml
index c5175cb4c0..b348e822bb 100644
--- a/charts/physims/values.yaml
+++ b/charts/physims/values.yaml
@@ -5,150 +5,80 @@
 global:
   serviceAccountName: oai-physim-sa
   namespace: "oaicicd-ran-tmp"
-
+  image:
+    repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
+    version: TAG
 
 ## Declaring values specific to coressponding physim to overwrite
 
 dlsim:
   replicaCount: 1
-  image:
-    registry: local
-    repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
-    version: temp
-    # pullPolicy: IfNotPresent or Never or Always
-    pullPolicy: Always
   service:
     type: ClusterIP
     port: 80
 
 ulsim:
   replicaCount: 1
-  image:
-    registry: local
-    repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
-    version: temp
-    # pullPolicy: IfNotPresent or Never or Always
-    pullPolicy: Always
   service:
     type: ClusterIP
     port: 80
 
 ldpctest:
   replicaCount: 1
-  image:
-    registry: local
-    repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
-    version: temp
-    # pullPolicy: IfNotPresent or Never or Always
-    pullPolicy: Always
   service:
     type: ClusterIP
     port: 80
 
 polartest:
   replicaCount: 1
-  image:
-    registry: local
-    repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
-    version: temp
-    # pullPolicy: IfNotPresent or Never or Always
-    pullPolicy: Always
   service:
     type: ClusterIP
     port: 80
 
 nr-pbchsim:
   replicaCount: 1
-  image:
-    registry: local
-    repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
-    version: temp
-    # pullPolicy: IfNotPresent or Never or Always
-    pullPolicy: Always
   service:
     type: ClusterIP
     port: 80
 
 nr-dlsim:
   replicaCount: 1
-  image:
-    registry: local
-    repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
-    version: temp
-    # pullPolicy: IfNotPresent or Never or Always
-    pullPolicy: Always
   service:
     type: ClusterIP
     port: 80
 
 nr-dlschsim:
   replicaCount: 1
-  image:
-    registry: local
-    repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
-    version: temp
-    # pullPolicy: IfNotPresent or Never or Always
-    pullPolicy: Always
   service:
     type: ClusterIP
     port: 80
 
 smallblocktest:
   replicaCount: 1
-  image:
-    registry: local
-    repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
-    version: temp
-    # pullPolicy: IfNotPresent or Never or Always
-    pullPolicy: Always
   service:
     type: ClusterIP
     port: 80
 
 nr-ulschsim:
   replicaCount: 1
-  image:
-    registry: local
-    repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
-    version: temp
-    # pullPolicy: IfNotPresent or Never or Always
-    pullPolicy: Always
   service:
     type: ClusterIP
     port: 80
 
 nr-pucchsim:
   replicaCount: 1
-  image:
-    registry: local
-    repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
-    version: temp
-    # pullPolicy: IfNotPresent or Never or Always
-    pullPolicy: Always
   service:
     type: ClusterIP
     port: 80
 
 nr-ulsim:
   replicaCount: 1
-  image:
-    registry: local
-    repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
-    version: temp
-    # pullPolicy: IfNotPresent or Never or Always
-    pullPolicy: Always
   service:
     type: ClusterIP
     port: 80
 
 nr-prachsim:
   replicaCount: 1
-  image:
-    registry: local
-    repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
-    version: temp
-    # pullPolicy: IfNotPresent or Never or Always
-    pullPolicy: Always
   service:
     type: ClusterIP
     port: 80
diff --git a/ci-scripts/cls_physim1.py b/ci-scripts/cls_physim1.py
index 9e8d3d0613..c7bf119f85 100644
--- a/ci-scripts/cls_physim1.py
+++ b/ci-scripts/cls_physim1.py
@@ -171,6 +171,7 @@ class PhySim:
 			logging.debug('\u001B[1m Image "oai-physim" push to OC Cluster Registry Successfully\u001B[0m')
 
 		# Using helm charts deployment
+		mySSH.command(f'sed -i -e "s#TAG#{imageTag}#g" ./charts/physims/values.yaml', '\$', 6)
 		mySSH.command('helm install physim ./charts/physims/ | tee -a cmake_targets/log/physim_helm_summary.txt 2>&1', '\$', 6)
 		if mySSH.getBefore().count('STATUS: deployed') == 0:
 			logging.error('\u001B[1m Deploying PhySim Failed using helm chart on OC Cluster\u001B[0m')

From 8b113b002b1e6247e5706b98ffd05eef17e984c3 Mon Sep 17 00:00:00 2001
From: luis_pereira87 
Date: Tue, 20 Apr 2021 17:37:32 +0100
Subject: [PATCH 174/579] Remove/refactor LOGs

---
 openair1/PHY/NR_TRANSPORT/pucch_rx.c           | 13 ++++++-------
 .../PHY/NR_UE_ESTIMATION/nr_ue_measurements.c  |  4 ++--
 .../PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c    |  4 ++--
 openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c        |  4 ++--
 openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c   | 18 +++++++++---------
 .../LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c    | 12 ++++++------
 openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c |  2 +-
 .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c    |  4 ++--
 8 files changed, 30 insertions(+), 31 deletions(-)

diff --git a/openair1/PHY/NR_TRANSPORT/pucch_rx.c b/openair1/PHY/NR_TRANSPORT/pucch_rx.c
index 99bc5b5774..690c299c65 100644
--- a/openair1/PHY/NR_TRANSPORT/pucch_rx.c
+++ b/openair1/PHY/NR_TRANSPORT/pucch_rx.c
@@ -173,7 +173,6 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
 
   pucch_GroupHopping_t pucch_GroupHopping = pucch_pdu->group_hop_flag + (pucch_pdu->sequence_hop_flag<<1);
 
-
   AssertFatal(pucch_pdu->bit_len_harq > 0 || pucch_pdu->sr_flag > 0,
 	      "Either bit_len_harq (%d) or sr_flag (%d) must be > 0\n",
 	      pucch_pdu->bit_len_harq,pucch_pdu->sr_flag);
@@ -191,7 +190,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
     nr_sequences=8>>(1-pucch_pdu->sr_flag);
   }
 
-  LOG_I(PHY,"pucch0: nr_symbols %d, start_symbol %d, prb_start %d, second_hop_prb %d,  group_hop_flag %d, sequence_hop_flag %d, O_ACK %d, O_SR %d, mcs %d\n",pucch_pdu->nr_of_symbols,pucch_pdu->start_symbol_index,pucch_pdu->prb_start,pucch_pdu->second_hop_prb,pucch_pdu->group_hop_flag,pucch_pdu->sequence_hop_flag,pucch_pdu->bit_len_harq,pucch_pdu->sr_flag,mcs[0]); 
+  LOG_D(PHY,"pucch0: nr_symbols %d, start_symbol %d, prb_start %d, second_hop_prb %d,  group_hop_flag %d, sequence_hop_flag %d, O_ACK %d, O_SR %d, mcs %d\n",pucch_pdu->nr_of_symbols,pucch_pdu->start_symbol_index,pucch_pdu->prb_start,pucch_pdu->second_hop_prb,pucch_pdu->group_hop_flag,pucch_pdu->sequence_hop_flag,pucch_pdu->bit_len_harq,pucch_pdu->sr_flag,mcs[0]);
 
   int cs_ind = get_pucch0_cs_lut_index(gNB,pucch_pdu);
   /*
@@ -227,12 +226,12 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
   int prb_offset[2] = {pucch_pdu->bwp_start+pucch_pdu->prb_start, pucch_pdu->bwp_start+pucch_pdu->prb_start};
 
   nr_group_sequence_hopping(pucch_GroupHopping,pucch_pdu->hopping_id,0,slot,&u[0],&v[0]); // calculating u and v value first hop
-  LOG_I(PHY,"pucch0: u %d, v %d\n",u[0],v[0]);
+  LOG_D(PHY,"pucch0: u %d, v %d\n",u[0],v[0]);
 
 
   if (pucch_pdu->freq_hop_flag == 1) {
     nr_group_sequence_hopping(pucch_GroupHopping,pucch_pdu->hopping_id,1,slot,&u[1],&v[1]); // calculating u and v value second hop
-    LOG_I(PHY,"pucch0 second hop: u %d, v %d\n",u[1],v[1]);
+    LOG_D(PHY,"pucch0 second hop: u %d, v %d\n",u[1],v[1]);
     prb_offset[1] = pucch_pdu->bwp_start+pucch_pdu->second_hop_prb;
   }
 
@@ -291,10 +290,10 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
       }
     }
 
-//#ifdef DEBUG_NR_PUCCH_RX
+#ifdef DEBUG_NR_PUCCH_RX
     LOG_I(PHY,"PUCCH IDFT = (%d,%d)=>%f\n",corr_re[0],corr_im[0],10*log10((double)corr_re[0]*corr_re[0] + (double)corr_im[0]*corr_im[0]));
     if (l>1) LOG_I(PHY,"PUCCH 2nd symbol IDFT[%d/%d] = (%d,%d)=>%f\n",mcs[i],seq_index,corr_re[1],corr_im[1],10*log10((double)corr_re[1]*corr_re[1] + (double)corr_im[1]*corr_im[1]));
-//#endif
+#endif
     if (pucch_pdu->freq_hop_flag == 0 && l==1) // non-coherent correlation
       temp=(int64_t)corr_re[0]*corr_re[0] + (int64_t)corr_im[0]*corr_im[0];
     else if (pucch_pdu->freq_hop_flag == 0 && l==2) {
@@ -363,7 +362,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
     uci_pdu->harq->harq_confidence_level = (no_conf) ? 1 : 0;
     uci_pdu->harq->harq_list = (nfapi_nr_harq_t*)malloc(1);
     uci_pdu->harq->harq_list[0].harq_value = index&0x01;
-    LOG_I(PHY, "Slot %d HARQ value %d with confidence level (0 is good, 1 is bad) %d xrt_mag %d\n",
+    LOG_D(PHY, "Slot %d HARQ value %d with confidence level (0 is good, 1 is bad) %d xrt_mag %d\n",
           slot,uci_pdu->harq->harq_list[0].harq_value,uci_pdu->harq->harq_confidence_level,xrtmag_dB);
     if (pucch_pdu->sr_flag == 1) {
       uci_pdu->sr = calloc(1,sizeof(*uci_pdu->sr));
diff --git a/openair1/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c b/openair1/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c
index 3f52b29281..44f1844ae9 100644
--- a/openair1/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c
+++ b/openair1/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c
@@ -180,11 +180,11 @@ void nr_ue_measurements(PHY_VARS_NR_UE *ue,
     ue->measurements.wideband_cqi_avg[gNB_id] = dB_fixed2(ue->measurements.rx_power_avg[gNB_id], ue->measurements.n0_power_avg);
     ue->measurements.rx_rssi_dBm[gNB_id] = ue->measurements.rx_power_avg_dB[gNB_id] + 30 - 10*log10(pow(2, 30)) - ((int)openair0_cfg[0].rx_gain[0] - (int)openair0_cfg[0].rx_gain_offset[0]) - dB_fixed(ue->frame_parms.ofdm_symbol_size);
 
-    LOG_I(PHY, "[gNB %d] Slot %d, RSSI %d dBm/RE, RSSI (digital) %d dB, WBandCQI %d dB, rxPwrAvg %d, n0PwrAvg %d \n",
+    LOG_D(PHY, "[gNB %d] Slot %d, RSSI %d dB (%d dBm/RE), WBandCQI %d dB, rxPwrAvg %d, n0PwrAvg %d\n",
       gNB_id,
       slot,
-      ue->measurements.rx_rssi_dBm[gNB_id],
       ue->measurements.rx_power_avg_dB[gNB_id],
+      ue->measurements.rx_rssi_dBm[gNB_id],
       ue->measurements.wideband_cqi_avg[gNB_id],
       ue->measurements.rx_power_avg[gNB_id],
       ue->measurements.n0_power_tot);
diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
index b1a0506941..38794584bd 100644
--- a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
+++ b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
@@ -679,8 +679,8 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
       else {
         LOG_D(PHY,"CRC NOT OK\n\033[0m");
         ret = 1 + dlsch->max_ldpc_iterations;
-        dump_nrdlsch(phy_vars_ue,0,nr_slot_rx,&E,0,0);
-        exit(-1);
+        //dump_nrdlsch(phy_vars_ue,0,nr_slot_rx,&E,0,0);
+        //exit(-1);
       }
 
 
diff --git a/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c b/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c
index 9a191ae6f9..316c37741f 100644
--- a/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c
+++ b/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c
@@ -112,9 +112,9 @@ void nr_generate_pucch0(PHY_VARS_NR_UE *ue,
   }
   for (int l=0; l>15)
diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
index ae5edd9a9d..d2828655b3 100644
--- a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
+++ b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
@@ -509,7 +509,6 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
   else          setup = mac->scc_SIB->uplinkConfigCommon->initialUplinkBWP.rach_ConfigCommon->choice.setup;
   AssertFatal(&setup->rach_ConfigGeneric != NULL, "In %s: FATAL! rach_ConfigGeneric is NULL...\n", __FUNCTION__);
   NR_RACH_ConfigGeneric_t *rach_ConfigGeneric = &setup->rach_ConfigGeneric;
-  //NR_FrequencyInfoDL_t *frequencyInfoDL = scc->downlinkConfigCommon->frequencyInfoDL;
   NR_RACH_ConfigDedicated_t *rach_ConfigDedicated = ra->rach_ConfigDedicated;
 
   uint8_t sdu_lcids[NB_RB_MAX] = {0};
@@ -523,12 +522,12 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
 	mac->common_configuration_complete > 0){
       prach_resources->init_msg1 = 1;
     } else {
-      LOG_I(PHY,"PRACH Condition not met: frame %d, prach_resources->sync_frame %d\n",frame,prach_resources->sync_frame);
+      LOG_D(NR_MAC,"PRACH Condition not met: frame %d, prach_resources->sync_frame %d\n",frame,prach_resources->sync_frame);
       return 0;
     }
   }
 
-  LOG_I(PHY,"frame %d prach_resources->init_msg1 %d, ra->ra_state %d, ra->RA_active %d\n",
+  LOG_D(NR_MAC,"frame %d prach_resources->init_msg1 %d, ra->ra_state %d, ra->RA_active %d\n",
 	frame,prach_resources->init_msg1,ra->ra_state,ra->RA_active);
 
   if (prach_resources->init_msg1 && ra->ra_state != RA_SUCCEEDED) {
@@ -536,7 +535,7 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
     if (ra->RA_active == 0) {
       /* RA not active - checking if RRC is ready to initiate the RA procedure */
 
-      LOG_I(MAC, "RA not active. Checking for data to transmit from upper layers...\n");
+      LOG_D(NR_MAC, "RA not active. Checking for data to transmit from upper layers...\n");
 
       uint8_t TBS_max = 8 + sizeof(NR_MAC_SUBHEADER_SHORT) + sizeof(NR_MAC_SUBHEADER_SHORT);
       payload = (uint8_t*) mac->CCCH_pdu.payload;
@@ -557,7 +556,7 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
 
       sdu_lengths[0] = size_sdu;
 
-      LOG_I(MAC,"[UE %d] Frame %d: Requested RRCConnectionRequest, got %d bytes\n", mod_id, frame, size_sdu);
+      LOG_D(NR_MAC,"[UE %d] Frame %d: Requested RRCConnectionRequest, got %d bytes\n", mod_id, frame, size_sdu);
 
       if (size_sdu > 0) {
 
@@ -566,7 +565,7 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
         // Random Access Procedure has been successful after reception of Msg4
         memcpy(ra->cont_res_id, mac_sdus, sizeof(uint8_t) * 6);
 
-        LOG_I(MAC, "[UE %d][%d.%d]: starting initialisation Random Access Procedure...\n", mod_id, frame, nr_slot_tx);
+        LOG_D(NR_MAC, "[UE %d][%d.%d]: starting initialisation Random Access Procedure...\n", mod_id, frame, nr_slot_tx);
 
         ra->Msg3_size = size_sdu + sizeof(NR_MAC_SUBHEADER_SHORT) + sizeof(NR_MAC_SUBHEADER_SHORT);
 
@@ -630,6 +629,7 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
         } else {
           ra->generate_nr_prach = GENERATE_IDLE;
         }
+
       } else if (ra->RA_window_cnt == 0 && !ra->RA_RAPID_found) {
 
         LOG_I(MAC, "[UE %d][%d:%d] RAR reception failed \n", mod_id, frame, nr_slot_tx);
@@ -642,9 +642,9 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
 
         // Fill in preamble and PRACH resources
         ra->RA_window_cnt--;
-	if (ra->generate_nr_prach == GENERATE_PREAMBLE) {
+        if (ra->generate_nr_prach == GENERATE_PREAMBLE) {
           nr_get_prach_resources(mod_id, CC_id, gNB_id, prach_resources, prach_pdu, rach_ConfigDedicated);
-	}
+        }
       } else if (ra->RA_backoff_cnt > 0) {
 
         LOG_D(MAC, "[UE %d][%d.%d]: RAR not received yet (RA backoff count %d) \n", mod_id, frame, nr_slot_tx, ra->RA_backoff_cnt);
@@ -663,7 +663,7 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
     nr_ue_contention_resolution(mod_id, CC_id, frame, nr_slot_tx, prach_resources);
   }
 
-  LOG_I(MAC,"ra->generate_nr_prach %d ra->ra_state %d (GENERATE_IDLE %d)\n",ra->generate_nr_prach,ra->ra_state,GENERATE_IDLE);
+  LOG_D(MAC,"ra->generate_nr_prach %d ra->ra_state %d (GENERATE_IDLE %d)\n",ra->generate_nr_prach,ra->ra_state,GENERATE_IDLE);
   if(ra->generate_nr_prach != GENERATE_IDLE) {
     return ra->generate_nr_prach;
   } else {
diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
index d3975fc490..d2ab3de0d9 100644
--- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
@@ -358,7 +358,7 @@ void nr_store_dlsch_buffer(module_id_t module_id,
                                                       0,
                                                       0);
     sched_ctrl->num_total_bytes += sched_ctrl->rlc_status[lcid].bytes_in_buffer;
-    LOG_I(NR_MAC,
+    LOG_D(NR_MAC,
         "%d.%d, LCID%d:->DLSCH, RLC status %d bytes. \n",
         frame,
         slot,
@@ -787,7 +787,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
     harq->is_waiting = true;
     UE_info->mac_stats[UE_id].dlsch_rounds[harq->round]++;
 
-    LOG_I(NR_MAC,
+    LOG_D(NR_MAC,
           "%4d.%2d RNTI %04x start %d RBs %d startSymbol %d nb_symbsol %d MCS %d TBS %d HARQ PID %d round %d NDI %d\n",
           frame,
           slot,
@@ -816,7 +816,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
       dl_tti_pdcch_pdu->PDUSize = (uint8_t)(2+sizeof(nfapi_nr_dl_tti_pdcch_pdu));
       dl_req->nPDUs += 1;
       pdcch_pdu = &dl_tti_pdcch_pdu->pdcch_pdu.pdcch_pdu_rel15;
-      LOG_I(NR_MAC,"Trying to configure DL pdcch for bwp %d, cs %d\n",bwpid,coresetid);
+      LOG_D(NR_MAC,"Trying to configure DL pdcch for bwp %d, cs %d\n",bwpid,coresetid);
       NR_SearchSpace_t *ss = bwp ? sched_ctrl->search_space:gNB_mac->sched_ctrlCommon->search_space;
       NR_ControlResourceSet_t *coreset = bwp? sched_ctrl->coreset:gNB_mac->sched_ctrlCommon->coreset;
       nr_configure_pdcch(pdcch_pdu, ss, coreset, scc, bwp);
@@ -957,7 +957,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
     dci_payload.pdsch_to_harq_feedback_timing_indicator.val = pucch->timing_indicator; // PDSCH to HARQ TI
     dci_payload.antenna_ports.val = 0;  // nb of cdm groups w/o data 1 and dmrs port 0
     dci_payload.dmrs_sequence_initialization.val = pdsch_pdu->SCID;
-    LOG_I(NR_MAC,
+    LOG_D(NR_MAC,
           "%4d.%2d DCI type 1 payload: freq_alloc %d (%d,%d,%d), "
           "time_alloc %d, vrb to prb %d, mcs %d tb_scaling %d ndi %d rv %d\n",
           frame,
@@ -986,7 +986,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
                        pdsch_pdu->BWPSize,
                        bwp? bwp->bwp_Id : 0);
 
-    LOG_I(NR_MAC,
+    LOG_D(NR_MAC,
           "coreset params: FreqDomainResource %llx, start_symbol %d  n_symb %d\n",
           (unsigned long long)pdcch_pdu->FreqDomainResource,
           pdcch_pdu->StartSymbolIndex,
@@ -1077,7 +1077,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
                                  0,
                                  0);
 
-          LOG_I(NR_MAC,
+          LOG_D(NR_MAC,
                 "%4d.%2d RNTI %04x: %d bytes from DTCH %d (ndata %d, remaining size %d)\n",
                 frame,
                 slot,
diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
index 3c0ecd6d0a..8fbfadac86 100644
--- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
@@ -1148,7 +1148,7 @@ bool nr_acknack_scheduling(int mod_id,
     }
   }
 
-  LOG_I(MAC,"1. DL slot %d, UL_ACK %d\n",slot,pucch->ul_slot);
+  LOG_D(MAC,"1. DL slot %d, UL_ACK %d\n",slot,pucch->ul_slot);
   /* if the UE's next PUCCH occasion is after the possible UL slots (within the
    * same frame) or wrapped around to the next frame, then we assume there is
    * no possible PUCCH allocation anymore */
diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
index 1a4019a760..6d40f25c51 100644
--- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
@@ -733,7 +733,7 @@ void pf_ul(module_id_t module_id,
       /* Get previous PSUCH filed info */
       sched_ctrl->sched_pusch = cur_harq->sched_pusch;
       NR_sched_pusch_t *sched_pusch = &sched_ctrl->sched_pusch;
-      LOG_I(NR_MAC, "%4d.%2d Allocate UL retransmission UE %d/RNTI %04x sched %4d.%2d (%d RBs)\n",
+      LOG_D(NR_MAC, "%4d.%2d Allocate UL retransmission UE %d/RNTI %04x sched %4d.%2d (%d RBs)\n",
             frame, slot, UE_id, UE_info->rnti[UE_id],
             sched_pusch->frame, sched_pusch->slot,
             sched_pusch->rbSize);
@@ -1070,7 +1070,7 @@ void nr_schedule_ulsch(module_id_t module_id,
       cur_harq->sched_pusch = *sched_pusch;
       sched_ctrl->sched_ul_bytes += sched_pusch->tb_size;
     } else {
-      LOG_I(NR_MAC,
+      LOG_D(NR_MAC,
             "%d.%2d UL retransmission RNTI %04x sched %d.%2d HARQ PID %d round %d NDI %d\n",
             frame,
             slot,

From 13d5ef51ca30b9776892360725774b450af1d474 Mon Sep 17 00:00:00 2001
From: Florian Kaltenberger 
Date: Tue, 20 Apr 2021 18:45:22 +0200
Subject: [PATCH 175/579] OAI EPC

---
 targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-5g.conf | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-5g.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-5g.conf
index a426c39a7a..302eab16f5 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-5g.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-5g.conf
@@ -15,7 +15,8 @@ gNBs =
     // Tracking area code, 0x0000 and 0xfffe are reserved values
     tracking_area_code  =  1;
 
-    plmn_list = ({mcc = 222; mnc = 01; mnc_length = 2;});	 
+    #plmn_list = ({mcc = 222; mnc = 01; mnc_length = 2;});	 
+    plmn_list = ({mcc = 208; mnc = 99; mnc_length = 2;});	 
 
     tr_s_preference     = "local_mac"
 
@@ -196,7 +197,7 @@ gNBs =
 
 
     ////////// MME parameters:
-    mme_ip_address      = ( { ipv4       = "192.168.18.99";
+    mme_ip_address      = ( { ipv4       = "192.168.18.150"; #"192.168.18.99";
                               ipv6       = "192:168:30::17";
                               active     = "yes";
                               preference = "ipv4";

From a5d6b2f41dd9ea66da3b49d50b743a8d5494e65d Mon Sep 17 00:00:00 2001
From: rmagueta 
Date: Tue, 20 Apr 2021 18:02:29 +0100
Subject: [PATCH 176/579] Uncomment nr_DRB_preconfiguration

---
 openair2/RRC/NR/rrc_gNB.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c
index 5303a7c993..122c6bae69 100755
--- a/openair2/RRC/NR/rrc_gNB.c
+++ b/openair2/RRC/NR/rrc_gNB.c
@@ -1657,11 +1657,11 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t    *const ctxt_pP,
           rrc_gNB_generate_RRCSetup(ctxt_pP,
                                     rrc_gNB_get_ue_context(gnb_rrc_inst, ctxt_pP->rnti),
                                     du_to_cu_rrc_container,
-				    gnb_rrc_inst->carrier.servingcellconfigcommon,
-				    CC_id);
+                                    gnb_rrc_inst->carrier.servingcellconfigcommon,
+                                    CC_id);
 
           // FIXME: Check the best place to perform this DRB configuration
-          //nr_DRB_preconfiguration(ctxt_pP->rnti);
+          nr_DRB_preconfiguration(ctxt_pP->rnti);
         }
         break;
 

From 1b9901953f0b18c582d31286633953451747202a Mon Sep 17 00:00:00 2001
From: Florian Kaltenberger 
Date: Wed, 21 Apr 2021 12:55:01 +0200
Subject: [PATCH 177/579] reverting some changes in benetel-5g config files
 that were introduced in anticipation of MR 1079, but which has not been
 merged yet.

---
 ci-scripts/conf_files/benetel-5g.conf         | 22 ++++++++++++------
 .../GENERIC-LTE-EPC/CONF/benetel-5g.conf      | 23 ++++++++++++-------
 2 files changed, 30 insertions(+), 15 deletions(-)

diff --git a/ci-scripts/conf_files/benetel-5g.conf b/ci-scripts/conf_files/benetel-5g.conf
index c9f0a579e1..5788cd9b36 100644
--- a/ci-scripts/conf_files/benetel-5g.conf
+++ b/ci-scripts/conf_files/benetel-5g.conf
@@ -66,7 +66,17 @@ gNBs =
 
         initialDLBWPk0_1                    = 0;  #for mixed slot
         initialDLBWPmappingType_1           = 0;
-        initialDLBWPstartSymbolAndLength_1  = 57; #this is SS=1,L=5
+        initialDLBWPstartSymbolAndLength_1  = 53; #this is SS=1,L=5
+
+             initialDLBWPk0_2                    = 0;
+             initialDLBWPmappingType_2           = 0;
+             #this is SS=1,L=12 
+             initialDLBWPstartSymbolAndLength_2  = 54;
+
+             initialDLBWPk0_3                    = 0;
+             initialDLBWPmappingType_3           = 0;
+             #this is SS=1,L=4 //5 (4 is for 43, 5 is for 57)
+             initialDLBWPstartSymbolAndLength_3  = 57; //43; //57;
 
   #uplinkConfigCommon 
      #frequencyInfoUL
@@ -92,9 +102,7 @@ gNBs =
           prach_msg1_FDM                                            = 0;
           prach_msg1_FrequencyStart                                 = 74;
           zeroCorrelationZoneConfig                                 = 13;
-          preambleReceivedTargetPower                               = -118;
-          #preambleReceivedTargetPower                               = -104;
-          #preambleReceivedTargetPower                               = -108;
+          preambleReceivedTargetPower                               = -108;
 #preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
           preambleTransMax                                          = 6;
 #powerRampingStep
@@ -124,13 +132,13 @@ gNBs =
 # 0=unrestricted, 1=restricted type A, 2=restricted type B
         restrictedSetConfig                                         = 0,
       # pusch-ConfigCommon (up to 16 elements)
-        initialULBWPk2_0                      = 6;  # used for UL slot
+        initialULBWPk2_0                      = 2;  # used for UL slot
         initialULBWPmappingType_0             = 1
         initialULBWPstartSymbolAndLength_0    = 55; # this is SS=0 L=12
 
-        initialULBWPk2_1                      = 6;  # used for mixed slot
+        initialULBWPk2_1                      = 2;  # used for mixed slot
         initialULBWPmappingType_1             = 1;
-        initialULBWPstartSymbolAndLength_1    = 24; # this is SS=10 L=2
+        initialULBWPstartSymbolAndLength_1    = 69; # this is SS=10 L=2
 
         initialULBWPk2_2                      = 7;  # used for Msg.3 during RA
         initialULBWPmappingType_2             = 1;
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-5g.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-5g.conf
index 302eab16f5..c72ec515dc 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-5g.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-5g.conf
@@ -67,7 +67,17 @@ gNBs =
 
         initialDLBWPk0_1                    = 0;  #for mixed slot
         initialDLBWPmappingType_1           = 0;
-        initialDLBWPstartSymbolAndLength_1  = 57; #this is SS=1,L=5
+        initialDLBWPstartSymbolAndLength_1  = 53; #this is SS=1,L=5
+
+             initialDLBWPk0_2                    = 0;
+             initialDLBWPmappingType_2           = 0;
+             #this is SS=1,L=12 
+             initialDLBWPstartSymbolAndLength_2  = 54;
+
+             initialDLBWPk0_3                    = 0;
+             initialDLBWPmappingType_3           = 0;
+             #this is SS=1,L=4 //5 (4 is for 43, 5 is for 57)
+             initialDLBWPstartSymbolAndLength_3  = 57; //43; //57;
 
   #uplinkConfigCommon 
      #frequencyInfoUL
@@ -93,9 +103,7 @@ gNBs =
           prach_msg1_FDM                                            = 0;
           prach_msg1_FrequencyStart                                 = 74;
           zeroCorrelationZoneConfig                                 = 13;
-          preambleReceivedTargetPower                               = -118;
-          #preambleReceivedTargetPower                               = -104;
-          #preambleReceivedTargetPower                               = -108;
+          preambleReceivedTargetPower                               = -108;
 #preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
           preambleTransMax                                          = 6;
 #powerRampingStep
@@ -125,13 +133,13 @@ gNBs =
 # 0=unrestricted, 1=restricted type A, 2=restricted type B
         restrictedSetConfig                                         = 0,
       # pusch-ConfigCommon (up to 16 elements)
-        initialULBWPk2_0                      = 6;  # used for UL slot
+        initialULBWPk2_0                      = 2;  # used for UL slot
         initialULBWPmappingType_0             = 1
         initialULBWPstartSymbolAndLength_0    = 55; # this is SS=0 L=12
 
-        initialULBWPk2_1                      = 6;  # used for mixed slot
+        initialULBWPk2_1                      = 2;  # used for mixed slot
         initialULBWPmappingType_1             = 1;
-        initialULBWPstartSymbolAndLength_1    = 24; # this is SS=10 L=2
+        initialULBWPstartSymbolAndLength_1    = 69; # this is SS=10 L=2
 
         initialULBWPk2_2                      = 7;  # used for Msg.3 during RA
         initialULBWPmappingType_2             = 1;
@@ -277,7 +285,6 @@ RUs = (
 THREAD_STRUCT = (
   {
     #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
-    //parallel_config    = "PARALLEL_RU_L1_TRX_SPLIT";
     parallel_config    = "PARALLEL_SINGLE_THREAD";
     #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
     worker_config      = "WORKER_DISABLE";

From 5033ec6dc3bd6c6aa5d010ce84079bc9f70a7ad9 Mon Sep 17 00:00:00 2001
From: Raphael Defosseux 
Date: Wed, 21 Apr 2021 16:35:06 +0200
Subject: [PATCH 178/579] CI: transition from VM-based phy-simulator testing   
  to Cluster-based testing

- In old VM pipeline, disabled phy-sim VM creation, build and testing
- In new Container pipeline, added new stage

Signed-off-by: Raphael Defosseux 
---
 ci-scripts/Jenkinsfile-GitLab-Container | 24 +++++++
 ci-scripts/Jenkinsfile-gitlab           | 45 +------------
 ci-scripts/buildOnVM.sh                 |  2 +-
 ci-scripts/createVM.sh                  |  2 +-
 ci-scripts/reportBuildLocally.sh        | 90 -------------------------
 ci-scripts/runTestOnVM.sh               |  4 +-
 ci-scripts/waitBuildOnVM.sh             |  4 +-
 7 files changed, 33 insertions(+), 138 deletions(-)

diff --git a/ci-scripts/Jenkinsfile-GitLab-Container b/ci-scripts/Jenkinsfile-GitLab-Container
index dd9dba2e66..e2dc8eb63f 100644
--- a/ci-scripts/Jenkinsfile-GitLab-Container
+++ b/ci-scripts/Jenkinsfile-GitLab-Container
@@ -176,6 +176,30 @@ pipeline {
         }
       }
     }
+    stage ("Image Test Processes") {
+      parallel {
+        stage ("Physical Simulators") {
+          when { expression {doFlexranCtrlTest && doMandatoryTests} }
+          steps {
+            script {
+              triggerSlaveJob ('RAN-PhySim-Cluster', 'Test-Physim-Cluster')
+            }
+          }
+          post {
+            always {
+              script {
+                finalizeSlaveJob('RAN-PhySim-Cluster')
+              }
+            }
+            failure {
+              script {
+                currentBuild.result = 'FAILURE'
+              }
+            }
+          }
+        }
+      }
+    }
   }
   post {
     always {
diff --git a/ci-scripts/Jenkinsfile-gitlab b/ci-scripts/Jenkinsfile-gitlab
index 2f06216101..3c0dba1575 100644
--- a/ci-scripts/Jenkinsfile-gitlab
+++ b/ci-scripts/Jenkinsfile-gitlab
@@ -196,16 +196,6 @@ pipeline {
             }
         }
 
-        stage ("Start VM -- phy-sim") {
-            steps {
-              lock (vmResource) {
-                timeout (time: 5, unit: 'MINUTES') {
-                    sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
-                }
-              }
-            }
-        }
-        
         stage ("Start VM -- enb-ethernet") {
             steps {
               lock (vmResource) {
@@ -255,15 +245,6 @@ pipeline {
                         }
                     }
                 }
-                stage ("Build physical simulators") {
-                    steps {
-                        gitlabCommitStatus(name: "Build phy-sim") {
-                            timeout (time: 30, unit: 'MINUTES') {
-                               sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
-                            }
-                        }
-                    }
-                }
                 stage ("Build eNB-ethernet") {
                     steps {
                         gitlabCommitStatus(name: "Build eNB-ethernet") {
@@ -296,9 +277,9 @@ pipeline {
                     script {
                         dir ('archives') {
                             if (fileExists('red_hat')) {
-                                sh "zip -r -qq vm_build_logs.zip basic_sim phy_sim enb_eth ue_eth gnb_usrp nr_ue_usrp red_hat"
+                                sh "zip -r -qq vm_build_logs.zip basic_sim enb_eth ue_eth gnb_usrp nr_ue_usrp red_hat"
                             } else {
-                                sh "zip -r -qq vm_build_logs.zip basic_sim phy_sim enb_eth ue_eth gnb_usrp nr_ue_usrp"
+                                sh "zip -r -qq vm_build_logs.zip basic_sim enb_eth ue_eth gnb_usrp nr_ue_usrp"
                             }
                         }
                         if(fileExists('archives/vm_build_logs.zip')) {
@@ -332,26 +313,6 @@ pipeline {
             parallel {
                 stage ("VM-based tests") {
                     stages {
-                        stage ("Test physical simulators") {
-                            when {
-                                expression {doMandatoryTests}
-                            }
-                            steps {
-                              lock (vmResource) {
-                                script {
-                                    timeout (time: 90, unit: 'MINUTES') {
-                                        try {
-                                            gitlabCommitStatus(name: "Test phy-sim") {
-                                                sh "./ci-scripts/oai-ci-vm-tool test --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
-                                            }
-                                        } catch (Exception e) {
-                                          currentBuild.result = 'FAILURE'
-                                        }
-                                    }
-                                }
-                              }
-                            }
-                        }
                         stage ("Build Flexran Controller") {
                             when {
                                 expression {doFlexranCtrlTest && doMandatoryTests}
@@ -716,7 +677,7 @@ pipeline {
                     script {
                       if (doMandatoryTests) {
                         dir ('archives') {
-                            sh "if [ -d basic_sim/test ] || [ -d phy_sim/test ] || [ -d l2_sim/test ]; then zip -r -qq vm_tests_logs.zip */test ; fi"
+                            sh "if [ -d basic_sim/test ] || [ -d rf_sim/test ] || [ -d l2_sim/test ]; then zip -r -qq vm_tests_logs.zip */test ; fi"
                         }
                         if(fileExists('archives/vm_tests_logs.zip')) {
                             archiveArtifacts artifacts: 'archives/vm_tests_logs.zip'
diff --git a/ci-scripts/buildOnVM.sh b/ci-scripts/buildOnVM.sh
index 31e9653769..f4cf3931dd 100755
--- a/ci-scripts/buildOnVM.sh
+++ b/ci-scripts/buildOnVM.sh
@@ -62,7 +62,7 @@ function build_on_vm {
     echo "ARCHIVES_LOC        = $ARCHIVES_LOC"
     echo "BUILD_OPTIONS       = $BUILD_OPTIONS"
 
-    if [[ "$VM_NAME" == *"-enb-usrp"* ]] || [[ "$VM_NAME" == *"-cppcheck"* ]]
+    if [[ "$VM_NAME" == *"-enb-usrp"* ]] || [[ "$VM_NAME" == *"-cppcheck"* ]] || [[ "$VM_NAME" == *"-phy-sim"* ]]
     then
         echo "This VM type is no longer supported in the pipeline framework"
         return
diff --git a/ci-scripts/createVM.sh b/ci-scripts/createVM.sh
index ab859c10d7..f3f8ddaca2 100755
--- a/ci-scripts/createVM.sh
+++ b/ci-scripts/createVM.sh
@@ -87,7 +87,7 @@ function create_vm {
     echo "VM_CPU              = $VM_CPU"
     echo "VM_DISK             = $VM_DISK GBytes"
 
-    if [[ "$VM_NAME" == *"-enb-usrp"* ]] || [[ "$VM_NAME" == *"-cppcheck"* ]]
+    if [[ "$VM_NAME" == *"-enb-usrp"* ]] || [[ "$VM_NAME" == *"-cppcheck"* ]] || [[ "$VM_NAME" == *"-phy-sim"* ]]
     then
         echo "This VM type is no longer supported in the pipeline framework"
         return
diff --git a/ci-scripts/reportBuildLocally.sh b/ci-scripts/reportBuildLocally.sh
index b46ade903f..eab005c740 100755
--- a/ci-scripts/reportBuildLocally.sh
+++ b/ci-scripts/reportBuildLocally.sh
@@ -568,33 +568,6 @@ function report_build {
 
     echo "   

Ubuntu 16.04 LTS -- Summary

" >> ./build_results.html - if [ -f ./archives/cppcheck/cppcheck.xml ] - then - sca_summary_table_header ./archives/cppcheck/cppcheck.xml "OAI Static Code Analysis with CPPCHECK" - sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Uninitialized variable" uninitvar - sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Uninitialized struct member" uninitStructMember - sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Memory leak" memleak - sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Memory is freed twice" doubleFree - sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Resource leak" resourceLeak - sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Possible null pointer dereference" nullPointer - sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Array access out of bounds" arrayIndexOutOfBounds - sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Buffer is accessed out of bounds" bufferAccessOutOfBounds - sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Expression depends on order of evaluation of side effects" unknownEvaluationOrder - sca_summary_table_footer ./archives/cppcheck/cppcheck.xml - fi - -# summary_table_header "OAI Build: 4G LTE eNB -- USRP option" ./archives/enb_usrp -# summary_table_row "LTE SoftModem - Release 15" ./archives/enb_usrp/lte-softmodem.Rel15.txt "Built target lte-softmodem" ./enb_usrp_row1.html -# summary_table_row "Coding - Release 15" ./archives/enb_usrp/coding.Rel15.txt "Built target coding" ./enb_usrp_row2.html -# summary_table_row "OAI USRP device if - Release 15" ./archives/enb_usrp/oai_usrpdevif.Rel15.txt "Built target oai_usrpdevif" ./enb_usrp_row3.html -# summary_table_row "OAI ETHERNET transport - Release 15" ./archives/enb_usrp/oai_eth_transpro.Rel15.txt "Built target oai_eth_transpro" ./enb_usrp_row4.html -# summary_table_row "Parameters Lib Config - Release 15" ./archives/enb_usrp/params_libconfig.Rel15.txt "Built target params_libconfig" ./enb_usrp_row5.html -# summary_table_row "NASMESH - Release 15" ./archives/enb_usrp/nasmesh.Rel15.txt "Built target nasmesh" ./enb_usrp_row6.html -# summary_table_row "RB Tool - Release 15" ./archives/enb_usrp/rb_tool.Rel15.txt "Built target rb_tool" ./enb_usrp_row7.html -# summary_table_row "RF Simulator - Release 15" ./archives/enb_usrp/rfsimulator.Rel15.txt "Built target rfsimulator" ./enb_usrp_row8.html -# summary_table_row "TCP Bridge - Release 15" ./archives/enb_usrp/tcp_bridge_oai.Rel15.txt "Built target tcp_bridge_oai" ./enb_usrp_row9.html -# summary_table_footer -# summary_table_header "OAI Build: 4G LTE eNB -- USRP option" ./archives/enb_eth summary_table_row "LTE SoftModem - Release 15" ./archives/enb_eth/lte-softmodem.Rel15.txt "Built target lte-softmodem" ./enb_eth_row1.html summary_table_row "Coding - Release 15" ./archives/enb_eth/coding.Rel15.txt "Built target coding" ./enb_eth_row2.html @@ -637,48 +610,6 @@ function report_build { summary_table_row "NVRAM - Release 15" ./archives/basic_sim/nvram.Rel15.txt "Built target nvram" ./basic_sim_row13.html summary_table_footer - summary_table_header "OAI Build: 4G LTE / 5G NR Physical simulators option" ./archives/phy_sim - summary_table_row "LTE DL Simulator - Release 15" ./archives/phy_sim/dlsim.Rel15.txt "Built target dlsim" ./phy_sim_row1.html - summary_table_row "LTE UL Simulator - Release 15" ./archives/phy_sim/ulsim.Rel15.txt "Built target ulsim" ./phy_sim_row2.html - summary_table_row "Coding - Release 15" ./archives/phy_sim/coding.Rel15.txt "Built target coding" ./phy_sim_row3.html - if [ -f ./archives/phy_sim/ldpctest.Rel15.txt ] - then - summary_table_row "NR LDPC Test - Release 15" ./archives/phy_sim/ldpctest.Rel15.txt "Built target ldpctest" ./phy_sim_row4.html - fi - if [ -f ./archives/phy_sim/polartest.Rel15.txt ] - then - summary_table_row "NR Polar Test - Release 15" ./archives/phy_sim/polartest.Rel15.txt "Built target polartest" ./phy_sim_row5.html - fi - if [ -f ./archives/phy_sim/nr_pbchsim.Rel15.txt ] - then - summary_table_row "NR PBCH Test - Release 15" ./archives/phy_sim/nr_pbchsim.Rel15.txt "Built target nr_pbchsim" ./phy_sim_row6.html - fi - if [ -f ./archives/phy_sim/nr_dlschsim.Rel15.txt ] - then - summary_table_row "NR DLSCH Test - Release 15" ./archives/phy_sim/nr_dlschsim.Rel15.txt "Built target nr_dlschsim" ./phy_sim_row7.html - fi - if [ -f ./archives/phy_sim/nr_pucchsim.Rel15.txt ] - then - summary_table_row "NR PUCCH Test - Release 15" ./archives/phy_sim/nr_pucchsim.Rel15.txt "Built target nr_pucchsim" ./phy_sim_row8.html - fi - if [ -f ./archives/phy_sim/smallblocktest.Rel15.txt ] - then - summary_table_row "NR Small Block Test - Release 15" ./archives/phy_sim/smallblocktest.Rel15.txt "Built target smallblocktest" ./phy_sim_row9.html - fi - if [ -f ./archives/phy_sim/nr_dlsim.Rel15.txt ] - then - summary_table_row "NR DL Sim Test - Release 15" ./archives/phy_sim/nr_dlsim.Rel15.txt "Built target nr_dlsim" ./phy_sim_row10.html - fi - if [ -f ./archives/phy_sim/nr_ulschsim.Rel15.txt ] - then - summary_table_row "NR ULSCH Test - Release 15" ./archives/phy_sim/nr_ulschsim.Rel15.txt "Built target nr_ulschsim" ./phy_sim_row11.html - fi - if [ -f ./archives/phy_sim/nr_ulsim.Rel15.txt ] - then - summary_table_row "NR UL Sim Test - Release 15" ./archives/phy_sim/nr_ulsim.Rel15.txt "Built target nr_ulsim" ./phy_sim_row12.html - fi - summary_table_footer - if [ -f archives/gnb_usrp/nr-softmodem.Rel15.txt ] then summary_table_header "OAI Build: 5G NR gNB -- USRP option" ./archives/gnb_usrp @@ -721,13 +652,6 @@ function report_build { echo " " >> ./build_results.html echo "
" >> ./build_results.html -# if [ -f ./enb_usrp_row1.html ] || [ -f ./enb_usrp_row2.html ] || [ -f ./enb_usrp_row3.html ] || [ -f ./enb_usrp_row4.html ] -# then -# for DETAILS_TABLE in `ls ./enb_usrp_row*.html` -# do -# cat $DETAILS_TABLE >> ./build_results.html -# done -# fi if [ -f ./enb_eth_row1.html ] || [ -f ./enb_eth_row2.html ] || [ -f ./enb_eth_row3.html ] || [ -f ./enb_eth_row4.html ] || [ -f ./enb_eth_row5.html ] || [ -f ./enb_eth_row6.html ] || [ -f ./enb_eth_row7.html ] || [ -f ./enb_eth_row8.html ] || [ -f ./enb_eth_row9.html ] then for DETAILS_TABLE in `ls ./enb_eth_row*.html` @@ -749,13 +673,6 @@ function report_build { cat $DETAILS_TABLE >> ./build_results.html done fi - if [ -f ./phy_sim_row1.html ] || [ -f ./phy_sim_row2.html ] || [ -f ./phy_sim_row3.html ] || [ -f ./phy_sim_row4.html ] || [ -f ./phy_sim_row5.html ] || [ -f ./phy_sim_row6.html ] || [ -f ./phy_sim_row7.html ] || [ -f ./phy_sim_row8.html ] - then - for DETAILS_TABLE in `ls ./phy_sim_row*.html` - do - cat $DETAILS_TABLE >> ./build_results.html - done - fi if [ -f ./gnb_usrp_row1.html ] || [ -f ./gnb_usrp_row2.html ] || [ -f ./gnb_usrp_row3.html ] || [ -f ./gnb_usrp_row4.html ] then for DETAILS_TABLE in `ls ./gnb_usrp_row*.html` @@ -770,13 +687,6 @@ function report_build { cat $DETAILS_TABLE >> ./build_results.html done fi - if [ -f ./enb_usrp_rh_row1.html ] || [ -f ./enb_usrp_rh_row2.html ] || [ -f ./enb_usrp_rh_row3.html ] || [ -f ./enb_usrp_rh_row4.html ] - then - for DETAILS_TABLE in `ls ./enb_usrp_rh_row*.html` - do - cat $DETAILS_TABLE >> ./build_results.html - done - fi rm -f ./*_row*.html echo "
" >> ./build_results.html diff --git a/ci-scripts/runTestOnVM.sh b/ci-scripts/runTestOnVM.sh index 6725d2f62b..cb751c3830 100755 --- a/ci-scripts/runTestOnVM.sh +++ b/ci-scripts/runTestOnVM.sh @@ -1478,13 +1478,13 @@ function run_test_on_vm { echo "$VM_NAME has for IP addr = $VM_IP_ADDR" fi - if [ "$RUN_OPTIONS" == "none" ] + if [ "$RUN_OPTIONS" == "none" ] || [[ $RUN_OPTIONS =~ .*run_exec_autotests.* ]] then echo "No run on VM testing for this variant currently" return fi - if [[ $RUN_OPTIONS =~ .*run_exec_autotests.* ]] + if [[ $RUN_OPTIONS =~ .*run_XXXX_autotests.* ]] then echo "############################################################" echo "Running test script on VM ($VM_NAME)" diff --git a/ci-scripts/waitBuildOnVM.sh b/ci-scripts/waitBuildOnVM.sh index f7e300edf4..4a604a1fe9 100755 --- a/ci-scripts/waitBuildOnVM.sh +++ b/ci-scripts/waitBuildOnVM.sh @@ -47,7 +47,7 @@ function wait_on_vm_build { echo "ARCHIVES_LOC = $ARCHIVES_LOC" echo "BUILD_OPTIONS = $BUILD_OPTIONS" - if [[ "$VM_NAME" == *"-enb-usrp"* ]] || [[ "$VM_NAME" == *"-cppcheck"* ]] + if [[ "$VM_NAME" == *"-enb-usrp"* ]] || [[ "$VM_NAME" == *"-cppcheck"* ]] || [[ "$VM_NAME" == *"-phy-sim"* ]] then echo "This VM type is no longer supported in the pipeline framework" return @@ -93,7 +93,7 @@ function wait_on_vm_build { } function check_on_vm_build { - if [[ "$VM_NAME" == *"-enb-usrp"* ]] || [[ "$VM_NAME" == *"-cppcheck"* ]] + if [[ "$VM_NAME" == *"-enb-usrp"* ]] || [[ "$VM_NAME" == *"-cppcheck"* ]] || [[ "$VM_NAME" == *"-phy-sim"* ]] then echo "This VM type is no longer supported in the pipeline framework" return From e708b63bf7e4bb67ed92a94aa2d0cbc32f57100f Mon Sep 17 00:00:00 2001 From: rmagueta Date: Wed, 21 Apr 2021 17:03:36 +0100 Subject: [PATCH 179/579] Fix for harq round when pucch fails --- openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c index 38794584bd..9a9f4c85bc 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c @@ -431,6 +431,9 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue, nb_rb = harq_process->nb_rb; + // Fix for harq round when pucch fails + harq_process->round = nr_rv_round_map_ue[harq_process->rvidx]; + harq_process->trials[harq_process->round]++; uint16_t nb_rb_oh = 0; // it was not computed at UE side even before and set to 0 in nr_compute_tbs From e50335b93c3b2715cd10a29b728290d797563184 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Wed, 21 Apr 2021 18:54:12 +0100 Subject: [PATCH 180/579] Fix for harq round when pucch fails --- openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c index 9a9f4c85bc..5880225831 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c @@ -360,6 +360,9 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue, } t_nrLDPC_procBuf** p_nrLDPC_procBuf = harq_process->p_nrLDPC_procBuf; + // Fix for harq round when pucch fails + harq_process->round = nr_rv_round_map_ue[harq_process->rvidx]; + // HARQ stats phy_vars_ue->dl_stats[harq_process->round]++; @@ -431,8 +434,6 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue, nb_rb = harq_process->nb_rb; - // Fix for harq round when pucch fails - harq_process->round = nr_rv_round_map_ue[harq_process->rvidx]; harq_process->trials[harq_process->round]++; From 58ecfde64711de25bc7dbf6bdb48b9737cc56497 Mon Sep 17 00:00:00 2001 From: Luis Pereira Date: Wed, 21 Apr 2021 20:40:06 +0200 Subject: [PATCH 181/579] Revert "Fix for harq round when pucch fails" This reverts commit e50335b93c3b2715cd10a29b728290d797563184 --- openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c index 5880225831..9a9f4c85bc 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c @@ -360,9 +360,6 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue, } t_nrLDPC_procBuf** p_nrLDPC_procBuf = harq_process->p_nrLDPC_procBuf; - // Fix for harq round when pucch fails - harq_process->round = nr_rv_round_map_ue[harq_process->rvidx]; - // HARQ stats phy_vars_ue->dl_stats[harq_process->round]++; @@ -434,6 +431,8 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue, nb_rb = harq_process->nb_rb; + // Fix for harq round when pucch fails + harq_process->round = nr_rv_round_map_ue[harq_process->rvidx]; harq_process->trials[harq_process->round]++; From 0bf7f22a3388d0c2e2d9f37df4414d4223fd6aa7 Mon Sep 17 00:00:00 2001 From: Luis Pereira Date: Wed, 21 Apr 2021 20:40:38 +0200 Subject: [PATCH 182/579] Revert "Fix for harq round when pucch fails" This reverts commit e708b63bf7e4bb67ed92a94aa2d0cbc32f57100f --- openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c index 9a9f4c85bc..38794584bd 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c @@ -431,9 +431,6 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue, nb_rb = harq_process->nb_rb; - // Fix for harq round when pucch fails - harq_process->round = nr_rv_round_map_ue[harq_process->rvidx]; - harq_process->trials[harq_process->round]++; uint16_t nb_rb_oh = 0; // it was not computed at UE side even before and set to 0 in nr_compute_tbs From d8f8583c9c671ad070a1bfe8d09dd4385bdc5910 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Wed, 21 Apr 2021 20:01:55 +0100 Subject: [PATCH 183/579] Fix PUCCH BWP parameters --- openair1/SCHED_NR_UE/pucch_uci_ue_nr.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c index 35d844569b..fd3d08772e 100644 --- a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c +++ b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c @@ -648,8 +648,12 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_ mac->cg->spCellConfig->spCellConfigDedicated->uplinkConfig && mac->cg->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP && mac->cg->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP->pucch_Config && - mac->cg->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP->pucch_Config->choice.setup) - pucch_Config = mac->cg->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP->pucch_Config->choice.setup; + mac->cg->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP->pucch_Config->choice.setup) { + pucch_Config = mac->cg->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP->pucch_Config->choice.setup; + BWPsize = NRRIV2BW(mac->scc_SIB->uplinkConfigCommon->initialUplinkBWP.genericParameters.locationAndBandwidth,MAX_BWP_SIZE); + BWPstart = NRRIV2PRBOFFSET(mac->scc_SIB->uplinkConfigCommon->initialUplinkBWP.genericParameters.locationAndBandwidth,MAX_BWP_SIZE); + } + else AssertFatal(1==0,"no pucch_Config\n"); pucch_resource = select_resource_by_id(pucch_resource_id, pucch_Config); format = pucch_resource->format.present; From f4cbc50f59f2863dacb2ef2bbafe178ab9da5144 Mon Sep 17 00:00:00 2001 From: francescomani Date: Thu, 22 Apr 2021 10:32:23 +0200 Subject: [PATCH 184/579] bugfix for sib1 in case of ssb different from 0 --- openair1/PHY/NR_TRANSPORT/nr_dci.c | 2 +- .../LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c | 30 +++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/openair1/PHY/NR_TRANSPORT/nr_dci.c b/openair1/PHY/NR_TRANSPORT/nr_dci.c index b7de182ab7..e15985c943 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dci.c +++ b/openair1/PHY/NR_TRANSPORT/nr_dci.c @@ -97,7 +97,7 @@ void nr_generate_dci(PHY_VARS_gNB *gNB, cset_start_symb = pdcch_pdu_rel15->StartSymbolIndex; cset_nsymb = pdcch_pdu_rel15->DurationSymbols; dci_idx = 0; - LOG_D(PHY, "Coreset rb_offset %d, nb_rb %d\n",rb_offset,n_rb); + LOG_D(PHY, "Coreset rb_offset %d, nb_rb %d BWP Start %d\n",rb_offset,n_rb,pdcch_pdu_rel15->BWPStart); LOG_D(PHY, "Coreset starting subcarrier %d on symbol %d (%d symbols)\n", cset_start_sc, cset_start_symb, cset_nsymb); // DMRS length is per OFDM symbol uint32_t dmrs_length = n_rb*6; //2(QPSK)*3(per RB)*6(REG per CCE) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c index 3483182088..fa6f00c2ae 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c @@ -421,8 +421,8 @@ void nr_fill_nfapi_dl_sib1_pdu(int Mod_idP, bwp); // TODO: This assignment should be done in function nr_configure_pdcch() - pdcch_pdu_rel15->BWPSize = gNB_mac->type0_PDCCH_CSS_config->num_rbs; - pdcch_pdu_rel15->BWPStart = gNB_mac->type0_PDCCH_CSS_config->cset_start_rb; + pdcch_pdu_rel15->BWPSize = type0_PDCCH_CSS_config->num_rbs; + pdcch_pdu_rel15->BWPStart = type0_PDCCH_CSS_config->cset_start_rb; nfapi_nr_dl_tti_request_pdu_t *dl_tti_pdsch_pdu = &dl_req->dl_tti_pdu_list[dl_req->nPDUs]; memset((void*)dl_tti_pdsch_pdu,0,sizeof(nfapi_nr_dl_tti_request_pdu_t)); @@ -587,20 +587,20 @@ void schedule_nr_sib1(module_id_t module_idP, frame_t frameP, sub_frame_t slotP) // Configure sched_ctrlCommon for SIB1 schedule_control_sib1(module_idP, CC_id, type0_PDCCH_CSS_config, time_domain_allocation, mcsTableIdx, mcs, candidate_idx, sib1_sdu_length); - int startSymbolIndex = 0; - int nrOfSymbols = 0; - if(gNB_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position == 0) { - startSymbolIndex = table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos2[gNB_mac->sched_ctrlCommon->time_domain_allocation][1]; - nrOfSymbols = table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos2[gNB_mac->sched_ctrlCommon->time_domain_allocation][2]; - } else { - startSymbolIndex = table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos3[gNB_mac->sched_ctrlCommon->time_domain_allocation][1]; - nrOfSymbols = table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos3[gNB_mac->sched_ctrlCommon->time_domain_allocation][2]; - } + int startSymbolIndex = 0; + int nrOfSymbols = 0; + if(gNB_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position == 0) { + startSymbolIndex = table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos2[gNB_mac->sched_ctrlCommon->time_domain_allocation][1]; + nrOfSymbols = table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos2[gNB_mac->sched_ctrlCommon->time_domain_allocation][2]; + } else { + startSymbolIndex = table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos3[gNB_mac->sched_ctrlCommon->time_domain_allocation][1]; + nrOfSymbols = table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos3[gNB_mac->sched_ctrlCommon->time_domain_allocation][2]; + } - // Calculate number of PRB_DMRS - uint8_t N_PRB_DMRS = gNB_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData * 6; - uint16_t dlDmrsSymbPos = fill_dmrs_mask(NULL, gNB_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position, nrOfSymbols, startSymbolIndex); - uint16_t dmrs_length = get_num_dmrs(dlDmrsSymbPos); + // Calculate number of PRB_DMRS + uint8_t N_PRB_DMRS = gNB_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData * 6; + uint16_t dlDmrsSymbPos = fill_dmrs_mask(NULL, gNB_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position, nrOfSymbols, startSymbolIndex); + uint16_t dmrs_length = get_num_dmrs(dlDmrsSymbPos); const uint32_t TBS = nr_compute_tbs(nr_get_Qm_dl(gNB_mac->sched_ctrlCommon->mcs, gNB_mac->sched_ctrlCommon->mcsTableIdx), nr_get_code_rate_dl(gNB_mac->sched_ctrlCommon->mcs, gNB_mac->sched_ctrlCommon->mcsTableIdx), From 0f00ac116b0331415d49338dfddbfe5542370f28 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Thu, 22 Apr 2021 10:23:50 +0100 Subject: [PATCH 185/579] Change a few logs level --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c | 2 +- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c | 2 +- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index cc44e493b5..2b2b10cfcb 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -1854,7 +1854,7 @@ uint8_t nr_get_tpc(int target, uint8_t cqi, int incr) { // al values passed to this function are x10 int snrx10 = (cqi*5) - 640; - LOG_I(NR_MAC,"tpc : target %d, snrx10 %d\n",target,snrx10); + LOG_D(NR_MAC,"tpc : target %d, snrx10 %d\n",target,snrx10); if (snrx10 > target + incr) return 0; // decrease 1dB if (snrx10 < target - incr) return 2; // increase 1dB if (snrx10 < target - (3*incr)) return 3; // increase 3dB diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c index 0faee0a389..acf787386d 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c @@ -975,7 +975,7 @@ void handle_nr_uci_pucch_0_1(module_id_t mod_id, sched_ctrl->tpc1 = nr_get_tpc(RC.nrmac[mod_id]->pucch_target_snrx10, uci_01->ul_cqi, 30); - LOG_I(NR_MAC,"pucch tpc %d\n",sched_ctrl->tpc1); + LOG_D(NR_MAC,"pucch tpc %d\n",sched_ctrl->tpc1); NR_ServingCellConfigCommon_t *scc = RC.nrmac[mod_id]->common_channels->ServingCellConfigCommon; const int num_slots = nr_slots_per_frame[*scc->ssbSubcarrierSpacing]; if (((uci_01->pduBitmap >> 1) & 0x01)) { diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index c3cf3d8f40..618c1c7d9d 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -454,7 +454,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, T_BUFFER(sduP, sdu_lenP)); UE_info->mac_stats[UE_id].ulsch_total_bytes_rx += sdu_lenP; - LOG_I(NR_MAC, "[gNB %d][PUSCH %d] CC_id %d %d.%d Received ULSCH sdu from PHY (rnti %x, UE_id %d) ul_cqi %d TA %d sduP %p\n", + LOG_D(NR_MAC, "[gNB %d][PUSCH %d] CC_id %d %d.%d Received ULSCH sdu from PHY (rnti %x, UE_id %d) ul_cqi %d TA %d sduP %p\n", gnb_mod_idP, harq_pid, CC_idP, @@ -1084,7 +1084,7 @@ void nr_schedule_ulsch(module_id_t module_id, } UE_info->mac_stats[UE_id].ulsch_current_bytes = sched_pusch->tb_size; - LOG_I(NR_MAC, + LOG_D(NR_MAC, "%4d.%2d RNTI %04x UL sched %4d.%2d start %d RBS %d MCS %d TBS %d HARQ PID %d round %d NDI %d\n", frame, slot, @@ -1242,7 +1242,7 @@ void nr_schedule_ulsch(module_id_t module_id, pdcch_pdu_bwp_coreset[bwpid][coresetid] = pdcch_pdu; } - LOG_I(NR_MAC,"Configuring ULDCI/PDCCH in %d.%d\n", frame,slot); + LOG_D(NR_MAC,"Configuring ULDCI/PDCCH in %d.%d\n", frame,slot); /* Fill PDCCH DL DCI PDU */ nfapi_nr_dl_dci_pdu_t *dci_pdu = &pdcch_pdu->dci_pdu[pdcch_pdu->numDlDci]; From 46db55b131273dc1ba5da7a0282c2bc8ba739852 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Thu, 22 Apr 2021 11:31:38 +0100 Subject: [PATCH 186/579] Fix warnings --- executables/nr-gnb.c | 2 ++ openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c | 4 ---- openair1/PHY/NR_ESTIMATION/nr_ul_estimation.h | 2 ++ openair1/PHY/NR_TRANSPORT/pucch_rx.c | 13 +++++++++---- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/executables/nr-gnb.c b/executables/nr-gnb.c index a0fd033e16..604a8ee09d 100644 --- a/executables/nr-gnb.c +++ b/executables/nr-gnb.c @@ -86,6 +86,8 @@ #include "T.h" #include "nfapi/oai_integration/vendor_ext.h" #include +#include +#include //#define DEBUG_THREADS 1 //#define USRP_DEBUG 1 diff --git a/openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c b/openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c index 4a95eec0a0..b2b09c9ac6 100644 --- a/openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c +++ b/openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c @@ -102,12 +102,8 @@ void gNB_I0_measurements(PHY_VARS_gNB *gNB,int first_symb,int num_symb) { NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms; NR_gNB_COMMON *common_vars = &gNB->common_vars; PHY_MEASUREMENTS_gNB *measurements = &gNB->measurements; - NR_DL_FRAME_PARMS *fp = &gNB->frame_parms; - double rx_gain = openair0_cfg[0].rx_gain[0]; - double rx_gain_offset = openair0_cfg[0].rx_gain_offset[0]; uint32_t *rb_mask = gNB->rb_mask_ul; int rb, offset, offset0, nb_rb, len; - uint32_t n0_subband_power_temp = 0; int32_t *ul_ch; int32_t n0_power_tot; int64_t n0_power_tot2; diff --git a/openair1/PHY/NR_ESTIMATION/nr_ul_estimation.h b/openair1/PHY/NR_ESTIMATION/nr_ul_estimation.h index 7ecaa97f6a..89bb5b2807 100644 --- a/openair1/PHY/NR_ESTIMATION/nr_ul_estimation.h +++ b/openair1/PHY/NR_ESTIMATION/nr_ul_estimation.h @@ -47,6 +47,8 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB, unsigned short bwp_start_subcarrier, nfapi_nr_pusch_pdu_t *pusch_pdu); +void dump_nr_I0_stats(FILE *fd,PHY_VARS_gNB *gNB); + void gNB_I0_measurements(PHY_VARS_gNB *gNB,int first_symb,int num_symb); void nr_gnb_measurements(PHY_VARS_gNB *gNB, uint8_t ulsch_id, unsigned char harq_pid, unsigned char symbol); diff --git a/openair1/PHY/NR_TRANSPORT/pucch_rx.c b/openair1/PHY/NR_TRANSPORT/pucch_rx.c index ae5c0d94ec..f3f736330f 100644 --- a/openair1/PHY/NR_TRANSPORT/pucch_rx.c +++ b/openair1/PHY/NR_TRANSPORT/pucch_rx.c @@ -287,9 +287,14 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB, #endif } } - int32_t corr_re[2],corr_im[2],no_corr=0; + + int32_t corr_re[2]; + int32_t corr_im[2]; + //int32_t no_corr = 0; int seq_index; - int64_t temp,av_corr=0; + int64_t temp; + int64_t av_corr=0; + for(i=0;inr_of_symbols;l++) { corr_re[l]=0;corr_im[l]=0; @@ -331,8 +336,8 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB, if (l==2) uci_stats->current_pucch0_stat1 = dB_fixed64((int64_t)corr_re[1]*corr_re[1] + (int64_t)corr_im[1]*corr_im[1]); } } - if(nr_sequences>1) - no_corr=(av_corr-xrtmag)/(nr_sequences-1)/l; + //if(nr_sequences>1) + // no_corr=(av_corr-xrtmag)/(nr_sequences-1)/l; av_corr/=nr_sequences/l; uint8_t xrtmag_dB = dB_fixed64(xrtmag); From e956c372df23d392ebd029eb7481a1eadadf94bc Mon Sep 17 00:00:00 2001 From: Sakthivel Velumani Date: Thu, 22 Apr 2021 13:42:59 +0200 Subject: [PATCH 187/579] Fixed physim build issues --- openair1/SIMULATION/NR_PHY/dlsim.c | 6 ++---- openair1/SIMULATION/NR_PHY/prachsim.c | 2 ++ openair1/SIMULATION/NR_PHY/ulsim.c | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index 3e91c51057..a247b839ef 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -195,6 +195,8 @@ int is_x2ap_enabled(void) return 0; } +void processSlotTX(void *arg) {} + //nFAPI P7 dummy functions int oai_nfapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req) { return(0); } @@ -867,10 +869,6 @@ int main(int argc, char **argv) uint32_t errors_scrambling = 0; initTpool("N", &(nrUE_params.Tpool), false); - notifiedFIFO_t txFifo; - UE->txFifo = &txFifo; - initNotifiedFIFO(&txFifo); - pushNotifiedFIFO(&txFifo, newNotifiedFIFO_elt(sizeof(nr_rxtx_thread_data_t), 0,&txFifo,do_nothing)); test_input_bit = (unsigned char *) malloc16(sizeof(unsigned char) * 16 * 68 * 384); estimated_output_bit = (unsigned char *) malloc16(sizeof(unsigned char) * 16 * 68 * 384); diff --git a/openair1/SIMULATION/NR_PHY/prachsim.c b/openair1/SIMULATION/NR_PHY/prachsim.c index 674df683e3..e6f76ddd91 100644 --- a/openair1/SIMULATION/NR_PHY/prachsim.c +++ b/openair1/SIMULATION/NR_PHY/prachsim.c @@ -171,6 +171,8 @@ nrUE_params_t *get_nrUE_params(void) { return &nrUE_params; } +void processSlotTX(void *arg) {} + int main(int argc, char **argv){ char c; diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c index 5f1a676a3f..b976dbee55 100644 --- a/openair1/SIMULATION/NR_PHY/ulsim.c +++ b/openair1/SIMULATION/NR_PHY/ulsim.c @@ -190,6 +190,8 @@ typedef struct { tpool_t Tpool; // thread pool } nrUE_params_t; +void processSlotTX(void *arg) {} + nrUE_params_t nrUE_params; nrUE_params_t *get_nrUE_params(void) { From b54fbaecb03f782d47d46120bb48bb64e76a937c Mon Sep 17 00:00:00 2001 From: Mohammed Ismail Date: Thu, 22 Apr 2021 16:48:57 +0200 Subject: [PATCH 188/579] CI: correction and update Signed-off-by: Mohammed Ismail --- charts/physims/Chart.yaml | 1 + charts/physims/charts/ldpctest/Chart.yaml | 2 +- charts/physims/charts/nr-dlschsim/Chart.yaml | 2 +- charts/physims/charts/nr-dlsim/Chart.yaml | 2 +- charts/physims/charts/nr-pbchsim/Chart.yaml | 2 +- charts/physims/charts/nr-prachsim/Chart.yaml | 2 +- charts/physims/charts/nr-pucchsim/Chart.yaml | 2 +- charts/physims/charts/nr-ulschsim/Chart.yaml | 2 +- charts/physims/charts/nr-ulsim/Chart.yaml | 2 +- ci-scripts/Jenkinsfile-physim-deploy | 6 +-- ci-scripts/args_parse.py | 6 +-- ci-scripts/cls_physim1.py | 44 ++++++++++---------- ci-scripts/xml_files/physim_deploy_run.xml | 6 +-- 13 files changed, 40 insertions(+), 39 deletions(-) diff --git a/charts/physims/Chart.yaml b/charts/physims/Chart.yaml index 0d7a5b98cc..bef28aac27 100644 --- a/charts/physims/Chart.yaml +++ b/charts/physims/Chart.yaml @@ -26,6 +26,7 @@ keywords: - Physical Simulators - RAN - 4G + - 5G sources: - https://gitlab.eurecom.fr/oai/openairinterface5g diff --git a/charts/physims/charts/ldpctest/Chart.yaml b/charts/physims/charts/ldpctest/Chart.yaml index 48d8108ac5..667bd3d8aa 100644 --- a/charts/physims/charts/ldpctest/Chart.yaml +++ b/charts/physims/charts/ldpctest/Chart.yaml @@ -26,7 +26,7 @@ keywords: - Physical Simulator - ldpctest - RAN - - 4G + - 5G sources: - https://gitlab.eurecom.fr/oai/openairinterface5g diff --git a/charts/physims/charts/nr-dlschsim/Chart.yaml b/charts/physims/charts/nr-dlschsim/Chart.yaml index b029c79f7b..3837f0cd2b 100644 --- a/charts/physims/charts/nr-dlschsim/Chart.yaml +++ b/charts/physims/charts/nr-dlschsim/Chart.yaml @@ -26,7 +26,7 @@ keywords: - Physical Simulator - nr-dlschsim - RAN - - 4G + - 5G sources: - https://gitlab.eurecom.fr/oai/openairinterface5g diff --git a/charts/physims/charts/nr-dlsim/Chart.yaml b/charts/physims/charts/nr-dlsim/Chart.yaml index 5de3c37ab2..2ec4b7eabd 100644 --- a/charts/physims/charts/nr-dlsim/Chart.yaml +++ b/charts/physims/charts/nr-dlsim/Chart.yaml @@ -26,7 +26,7 @@ keywords: - Physical Simulator - nr-dlsim - RAN - - 4G + - 5G sources: - https://gitlab.eurecom.fr/oai/openairinterface5g diff --git a/charts/physims/charts/nr-pbchsim/Chart.yaml b/charts/physims/charts/nr-pbchsim/Chart.yaml index 4012180e5f..6d8359598d 100644 --- a/charts/physims/charts/nr-pbchsim/Chart.yaml +++ b/charts/physims/charts/nr-pbchsim/Chart.yaml @@ -26,7 +26,7 @@ keywords: - Physical Simulator - nr-pbchsim - RAN - - 4G + - 5G sources: - https://gitlab.eurecom.fr/oai/openairinterface5g diff --git a/charts/physims/charts/nr-prachsim/Chart.yaml b/charts/physims/charts/nr-prachsim/Chart.yaml index a37f4b2c4e..8c88587a7f 100644 --- a/charts/physims/charts/nr-prachsim/Chart.yaml +++ b/charts/physims/charts/nr-prachsim/Chart.yaml @@ -26,7 +26,7 @@ keywords: - Physical Simulator - nr-prachsim - RAN - - 4G + - 5G sources: - https://gitlab.eurecom.fr/oai/openairinterface5g diff --git a/charts/physims/charts/nr-pucchsim/Chart.yaml b/charts/physims/charts/nr-pucchsim/Chart.yaml index 88872dbe88..bb0033175f 100644 --- a/charts/physims/charts/nr-pucchsim/Chart.yaml +++ b/charts/physims/charts/nr-pucchsim/Chart.yaml @@ -26,7 +26,7 @@ keywords: - Physical Simulator - nr-pucchsim - RAN - - 4G + - 5G sources: - https://gitlab.eurecom.fr/oai/openairinterface5g diff --git a/charts/physims/charts/nr-ulschsim/Chart.yaml b/charts/physims/charts/nr-ulschsim/Chart.yaml index 86a7738d24..e2525f0032 100644 --- a/charts/physims/charts/nr-ulschsim/Chart.yaml +++ b/charts/physims/charts/nr-ulschsim/Chart.yaml @@ -26,7 +26,7 @@ keywords: - Physical Simulator - nr-ulschsim - RAN - - 4G + - 5G sources: - https://gitlab.eurecom.fr/oai/openairinterface5g diff --git a/charts/physims/charts/nr-ulsim/Chart.yaml b/charts/physims/charts/nr-ulsim/Chart.yaml index 9264f72303..ede87ea7e4 100644 --- a/charts/physims/charts/nr-ulsim/Chart.yaml +++ b/charts/physims/charts/nr-ulsim/Chart.yaml @@ -26,7 +26,7 @@ keywords: - Physical Simulator - nr-ulsim - RAN - - 4G + - 5G sources: - https://gitlab.eurecom.fr/oai/openairinterface5g diff --git a/ci-scripts/Jenkinsfile-physim-deploy b/ci-scripts/Jenkinsfile-physim-deploy index 4014990f93..2d2cf054b5 100644 --- a/ci-scripts/Jenkinsfile-physim-deploy +++ b/ci-scripts/Jenkinsfile-physim-deploy @@ -146,7 +146,7 @@ pipeline { if (params.OC_Credentials == null) { allParametersPresent = false } - if (params.OC_Workspace == null) { + if (params.OC_ProjectName == null) { allParametersPresent = false } if (allParametersPresent) { @@ -197,7 +197,7 @@ pipeline { for (xmlFile in myXmlTestSuite) { if (fileExists(xmlFile)) { try { - sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCWorkspace=${OC_Workspace}" + sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName}" } catch (Exception e) { currentBuild.result = 'FAILURE' buildStageStatus = false @@ -230,4 +230,4 @@ pipeline { } } } -} \ No newline at end of file +} diff --git a/ci-scripts/args_parse.py b/ci-scripts/args_parse.py index ae7a509fb4..0ed12bfc08 100644 --- a/ci-scripts/args_parse.py +++ b/ci-scripts/args_parse.py @@ -263,9 +263,9 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA,PHYSIM): elif re.match('^\-\-OCPassword=(.+)$', myArgv, re.IGNORECASE): matchReg = re.match('^\-\-OCPassword=(.+)$', myArgv, re.IGNORECASE) PHYSIM.OCPassword = matchReg.group(1) - elif re.match('^\-\-OCWorkspace=(.+)$', myArgv, re.IGNORECASE): - matchReg = re.match('^\-\-OCWorkspace=(.+)$', myArgv, re.IGNORECASE) - PHYSIM.OCWorkspace = matchReg.group(1) + elif re.match('^\-\-OCProjectName=(.+)$', myArgv, re.IGNORECASE): + matchReg = re.match('^\-\-OCProjectName=(.+)$', myArgv, re.IGNORECASE) + PHYSIM.OCProjectName = matchReg.group(1) else: HELP.GenericHelp(CONST.Version) sys.exit('Invalid Parameter: ' + myArgv) diff --git a/ci-scripts/cls_physim1.py b/ci-scripts/cls_physim1.py index c7bf119f85..4ca09152a7 100644 --- a/ci-scripts/cls_physim1.py +++ b/ci-scripts/cls_physim1.py @@ -48,7 +48,7 @@ class PhySim: self.eNBPassword = "" self.OCUserName = "" self.OCPassword = "" - self.OCWorkspace = "" + self.OCProjectName = "" self.eNBSourceCodePath = "" self.ranRepository = "" self.ranBranch = "" @@ -74,9 +74,9 @@ class PhySim: lSourcePath = self.eNBSourceCodePath ocUserName = self.OCUserName ocPassword = self.OCPassword - ocWorkspace = self.OCWorkspace + ocProjectName = self.OCProjectName - if lIpAddr == '' or lUserName == '' or lPassWord == '' or lSourcePath == '' or ocUserName == '' or ocPassword == '' or ocWorkspace == '': + if lIpAddr == '' or lUserName == '' or lPassWord == '' or lSourcePath == '' or ocUserName == '' or ocPassword == '' or ocProjectName == '': HELP.GenericHelp(CONST.Version) sys.exit('Insufficient Parameter') logging.debug('Building on server: ' + lIpAddr) @@ -138,13 +138,13 @@ class PhySim: sys.exit(-1) else: logging.debug('\u001B[1m Login to OC Cluster Successfully\u001B[0m') - mySSH.command(f'oc project {ocWorkspace}', '\$', 6) - if mySSH.getBefore().count(f'Already on project "{ocWorkspace}"') == 0 and mySSH.getBefore().count(f'Now using project "{self.OCWorkspace}"') == 0: - logging.error(f'\u001B[1m Unable to access OC project {ocWorkspace}\u001B[0m') + mySSH.command(f'oc project {ocProjectName}', '\$', 6) + if mySSH.getBefore().count(f'Already on project "{ocProjectName}"') == 0 and mySSH.getBefore().count(f'Now using project "{self.OCProjectName}"') == 0: + logging.error(f'\u001B[1m Unable to access OC project {ocProjectName}\u001B[0m') mySSH.close() sys.exit(-1) else: - logging.debug(f'\u001B[1m Now using project {ocWorkspace}\u001B[0m') + logging.debug(f'\u001B[1m Now using project {ocProjectName}\u001B[0m') # Tag the image and push to the OC cluster mySSH.command('oc whoami -t | sudo podman login -u ' + ocUserName + ' --password-stdin https://default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/ --tls-verify=false', '\$', 6) @@ -156,13 +156,13 @@ class PhySim: logging.debug('\u001B[1m Podman Login to OC Cluster Registry Successfully\u001B[0m') mySSH.command('oc create -f openshift/oai-physim-image-stream.yml', '\$', 6) if mySSH.getBefore().count('(AlreadyExists):') == 0 and mySSH.getBefore().count('created') == 0: - logging.error(f'\u001B[1m Image Stream "oai-physim" Creation Failed on OC Cluster {ocWorkspace}\u001B[0m') + logging.error(f'\u001B[1m Image Stream "oai-physim" Creation Failed on OC Cluster {ocProjectName}\u001B[0m') mySSH.close() sys.exit(-1) else: - logging.debug(f'\u001B[1m Image Stream "oai-physim" created on OC project {ocWorkspace}\u001B[0m') - mySSH.command(f'sudo podman tag oai-physim:{imageTag} default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/{self.OCWorkspace}/oai-physim:{imageTag}', '\$', 6) - mySSH.command(f'sudo podman push default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/{self.OCWorkspace}/oai-physim:{imageTag} --tls-verify=false', '\$', 30) + logging.debug(f'\u001B[1m Image Stream "oai-physim" created on OC project {ocProjectName}\u001B[0m') + mySSH.command(f'sudo podman tag oai-physim:{imageTag} default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/{self.OCProjectName}/oai-physim:{imageTag}', '\$', 6) + mySSH.command(f'sudo podman push default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/{self.OCProjectName}/oai-physim:{imageTag} --tls-verify=false', '\$', 30) if mySSH.getBefore().count('Storing signatures') == 0: logging.error('\u001B[1m Image "oai-physim" push to OC Cluster Registry Failed\u001B[0m') mySSH.close() @@ -200,18 +200,18 @@ class PhySim: # Waiting to complete the running test count = 0 isFinished = False - while(count < 24 and isFinished == False): + testCompleteCount = 0 + while(count < 25 and isFinished == False): time.sleep(58) - mySSH.command('oc get pods -l app.kubernetes.io/instance=physim', '\$', 6) - time.sleep(2) - result = re.search('oai-nr-dlsim[\S\d\w]+', mySSH.getBefore()) - if result is not None: - podName1 = result.group() - mySSH.command(f'oc logs --tail=1 {podName1} 2>&1', '\$', 6) - time.sleep(1) + for podName in podNames: + mySSH.command(f'oc logs --tail=1 {podName} 2>&1', '\$', 6) if mySSH.getBefore().count('Finished') != 0: - isFinished = True + testCompleteCount += 1 + time.sleep(1) + if testCompleteCount == 12: + isFinished = True count += 1 + testCompleteCount = 0 if isFinished: logging.debug('\u001B[1m PhySim test is Complete\u001B[0m') @@ -230,7 +230,7 @@ class PhySim: isFinished1 = True if isFinished1 == True: logging.debug('\u001B[1m UnDeployed PhySim Successfully on OC Cluster\u001B[0m') - mySSH.command(f'sudo podman rmi default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/{self.OCWorkspace}/oai-physim:{imageTag}', '\$', 6) + mySSH.command(f'sudo podman rmi default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/{self.OCProjectName}/oai-physim:{imageTag}', '\$', 6) mySSH.command('oc delete is oai-physim', '\$', 6) logging.debug('\u001B[1m Deleted the Image and ImageStream\u001B[0m') mySSH.command('oc logout', '\$', 6) @@ -284,4 +284,4 @@ class PhySim: HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK) HTML.CreateHtmlTestRowPhySimTestResult(self.testSummary,self.testResult) logging.info('\u001B[1m Physical Simulator Pass\u001B[0m') - return 0 \ No newline at end of file + return 0 diff --git a/ci-scripts/xml_files/physim_deploy_run.xml b/ci-scripts/xml_files/physim_deploy_run.xml index dc87193108..f8ad018305 100644 --- a/ci-scripts/xml_files/physim_deploy_run.xml +++ b/ci-scripts/xml_files/physim_deploy_run.xml @@ -25,13 +25,13 @@ Physical Simulators Check wrench - 000001 + 0102001 - + Deploy_Run_PhySim Deploy and run physical simulator on openshift - \ No newline at end of file + From 388b73ec4da1f9e9d439a9be47f0040cd9595d37 Mon Sep 17 00:00:00 2001 From: sfn Date: Thu, 25 Mar 2021 11:13:52 +0100 Subject: [PATCH 189/579] Extend nr_dlsim to test dmrs_config_type 2 --- openair1/SCHED_NR_UE/phy_procedures_nr_ue.c | 5 +++-- openair1/SIMULATION/NR_PHY/dlsim.c | 17 ++++++++++++++--- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c index 60fe897456..ec22d58af4 100644 --- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c +++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c @@ -777,7 +777,8 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int eNB_ for (m = s0; m < (s0 +s1); m++) { if (((1<harq_processes[harq_pid]->dlDmrsSymbPos) > 0) { - for (uint8_t aatx=0; aatxharq_processes[harq_pid]->Nl; aatx++) {//for MIMO Config: it shall loop over no_layers + ue->dmrs_DownlinkConfig.pdsch_dmrs_type = dlsch0_harq->dmrsConfigType;//DL channel estimation uses ue->dmrs_DownlinkConfig.pdsch_dmrs_type + for (uint8_t aatx=0; aatxNl; aatx++) {//for MIMO Config: it shall loop over no_layers nr_pdsch_channel_estimation(ue, proc, 0 /*eNB_id*/, @@ -808,7 +809,7 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int eNB_ uint16_t first_symbol_with_data = s0; uint32_t dmrs_data_re; - if (ue->dmrs_DownlinkConfig.pdsch_dmrs_type == pdsch_dmrs_type1) + if (dlsch0_harq->dmrsConfigType == pdsch_dmrs_type1) dmrs_data_re = 12 - 6 * dlsch0_harq->n_dmrs_cdm_groups; else dmrs_data_re = 12 - 4 * dlsch0_harq->n_dmrs_cdm_groups; diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index 9eff4255f3..781ea50904 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -336,7 +336,7 @@ int main(int argc, char **argv) int8_t enable_ptrs = 0; int8_t modify_dmrs = 0; - int8_t dmrs_arg[2] = {-1,-1};// Invalid values + int8_t dmrs_arg[3] = {-1,-1,-1};// Invalid values /* L_PTRS = ptrs_arg[0], K_PTRS = ptrs_arg[1] */ int8_t ptrs_arg[2] = {-1,-1};// Invalid values @@ -594,7 +594,7 @@ int main(int argc, char **argv) printf("-q Use 2nd MCS table (256 QAM table) for PDSCH\n"); printf("-t Acceptable effective throughput (in percentage)\n"); printf("-T Enable PTRS, arguments list L_PTRS{0,1,2} K_PTRS{2,4}, e.g. -T 2 0 2 \n"); - printf("-U Change DMRS Config, arguments list DMRS TYPE{0=A,1=B} DMRS AddPos{0:2}, e.g. -U 2 0 2 \n"); + printf("-U Change DMRS Config, arguments list DMRS TYPE{0=A,1=B} DMRS AddPos{0:2} DMRS ConfType{1:2}, e.g. -U 3 0 2 1 \n"); printf("-P Print DLSCH performances\n"); printf("-w Write txdata to binary file (one frame)\n"); printf("-d number of dlsch threads, 0: no dlsch parallelization\n"); @@ -1359,6 +1359,7 @@ void update_dmrs_config(NR_CellGroupConfig_t *scg,PHY_VARS_NR_UE *ue, int8_t* dm { int8_t mapping_type = typeA;//default value int8_t add_pos = pdsch_dmrs_pos0;//default value + int8_t dmrs_config_type = pdsch_dmrs_type1;//default value if(dmrs_arg[0] == 0) { mapping_type = typeA; } @@ -1369,10 +1370,17 @@ void update_dmrs_config(NR_CellGroupConfig_t *scg,PHY_VARS_NR_UE *ue, int8_t* dm if(dmrs_arg[1] >= 0 && dmrs_arg[1] <3 ) { add_pos = dmrs_arg[1]; } + /* DMRS Conf Type 1 or 2 */ + if(dmrs_arg[2] >= 1 && dmrs_arg[2] <3 ) { + dmrs_config_type = dmrs_arg[2]-1; + } if(scg != NULL) { NR_BWP_Downlink_t *bwp = scg->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[0]; *bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition = add_pos; + if (dmrs_config_type == pdsch_dmrs_type2) + bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type = calloc(1,sizeof(*bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type)); + else bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type = NULL; for (int i=0;ibwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.count;i++) { bwp->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[i]->mappingType = mapping_type; } @@ -1382,6 +1390,9 @@ void update_dmrs_config(NR_CellGroupConfig_t *scg,PHY_VARS_NR_UE *ue, int8_t* dm ue->PDSCH_Config.pdsch_TimeDomainResourceAllocation[i]->mappingType = mapping_type; } ue->dmrs_DownlinkConfig.pdsch_dmrs_AdditionalPosition = add_pos; + if (dmrs_config_type == pdsch_dmrs_type2) + ue->dmrs_DownlinkConfig.pdsch_dmrs_type = pdsch_dmrs_type2; + else ue->dmrs_DownlinkConfig.pdsch_dmrs_type = pdsch_dmrs_type1; } - printf("[DLSIM] DMRS Config is modified with Mapping Type %d, Additional Positions %d \n", dmrs_arg[0], dmrs_arg[1] ); + printf("[DLSIM] DMRS Config is modified with Mapping Type %d, Additional Positions %d Config. Type %d \n", dmrs_arg[0], add_pos, dmrs_arg[2] ); } From 77a450d0b681ce67ed064a38f351c517ce402353 Mon Sep 17 00:00:00 2001 From: sfn Date: Thu, 25 Mar 2021 11:59:13 +0100 Subject: [PATCH 190/579] Add R to -g to model mimo channel --- openair1/SIMULATION/NR_PHY/dlsim.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index 781ea50904..8fdc3363e2 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -402,6 +402,10 @@ int main(int argc, char **argv) channel_model=ETU; break; + case 'R': + channel_model=Rayleigh1; + break; + default: printf("Unsupported channel model!\n"); exit(-1); @@ -573,7 +577,7 @@ int main(int argc, char **argv) printf("-s Starting SNR, runs from SNR0 to SNR0 + 5 dB. If n_frames is 1 then just SNR is simulated\n"); printf("-S Ending SNR, runs from SNR0 to SNR1\n"); printf("-t Delay spread for multipath channel\n"); - printf("-g [A,B,C,D,E,F,G] Use 3GPP SCM (A,B,C,D) or 36-101 (E-EPA,F-EVA,G-ETU) models (ignores delay spread and Ricean factor)\n"); + printf("-g [A,B,C,D,E,F,G,R] Use 3GPP SCM (A,B,C,D) or 36-101 (E-EPA,F-EVA,G-ETU) models or R for MIMO model (ignores delay spread and Ricean factor)\n"); printf("-y Number of TX antennas used in gNB\n"); printf("-z Number of RX antennas used in UE\n"); //printf("-i Relative strength of first intefering gNB (in dB) - cell_id mod 3 = 1\n"); From 08ff33a0ecd41691cd52a0a57338e911f1d1f3a5 Mon Sep 17 00:00:00 2001 From: sfn Date: Fri, 26 Mar 2021 17:41:47 +0100 Subject: [PATCH 191/579] Fix llr calculation to support multiple layers --- .../NR_UE_TRANSPORT/nr_dlsch_demodulation.c | 465 ++++++------------ .../nr_dlsch_llr_computation.c | 103 ++-- .../NR_UE_TRANSPORT/nr_transport_proto_ue.h | 27 +- 3 files changed, 197 insertions(+), 398 deletions(-) diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c index 35baef1792..3160a2f53d 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c @@ -110,6 +110,8 @@ static void nr_dlsch_layer_demapping(int16_t **llr_cw, uint8_t Nl, uint8_t mod_order, uint16_t length, + int32_t codeword_TB0, + int32_t codeword_TB1, int16_t **llr_layers); @@ -662,16 +664,30 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, pdsch_vars[gNB_id]->dl_valid_re[i-1], nr_slot_rx, beamforming_mode); } - } - //nr_dlsch_deinterleaving(symbol,bundle_L,(int16_t*)pllr_symbol_cw0,(int16_t*)pllr_symbol_cw0_deint, nb_rb_pdsch); - - if (rx_type==rx_IC_dual_stream) { + int dmrs_type = dlsch[0]->harq_processes[harq_pid]->dmrsConfigType; + uint8_t nb_re_dmrs; + uint16_t dmrs_len = get_num_dmrs(dlsch[0]->harq_processes[harq_pid]->dlDmrsSymbPos); + if (dmrs_type==NFAPI_NR_DMRS_TYPE1) { + nb_re_dmrs = 6*dlsch[0]->harq_processes[harq_pid]->n_dmrs_cdm_groups; + } else { + nb_re_dmrs = 4*dlsch[0]->harq_processes[harq_pid]->n_dmrs_cdm_groups; + } + dlsch[0]->harq_processes[harq_pid]->G = nr_get_G(dlsch[0]->harq_processes[harq_pid]->nb_rb, + dlsch[0]->harq_processes[harq_pid]->nb_symbols, + nb_re_dmrs, + dmrs_len, + dlsch[0]->harq_processes[harq_pid]->Qm, + dlsch[0]->harq_processes[harq_pid]->Nl); + printf("nr_dlsch_layer_demapping Nl%d G %d\n",dlsch[0]->harq_processes[harq_pid]->Nl,dlsch[0]->harq_processes[harq_pid]->G); nr_dlsch_layer_demapping(pdsch_vars[gNB_id]->llr, dlsch[0]->harq_processes[harq_pid]->Nl, dlsch[0]->harq_processes[harq_pid]->Qm, dlsch[0]->harq_processes[harq_pid]->G, + codeword_TB0, + codeword_TB1, pdsch_vars[gNB_id]->layer_llr); + } #if UE_TIMING_TRACE @@ -2924,12 +2940,17 @@ static void nr_dlsch_layer_demapping(int16_t **llr_cw, uint8_t Nl, uint8_t mod_order, uint16_t length, + int32_t codeword_TB0, + int32_t codeword_TB1, int16_t **llr_layers) { switch (Nl) { - case 1: - memcpy((void*)llr_layers[0], (void*)llr_cw[0], (length)*sizeof(int16_t)); + if (codeword_TB1 == -1) + memcpy((void*)llr_cw[0], (void*)llr_layers[0], (length)*sizeof(int16_t)); + else if (codeword_TB0 == -1) + memcpy((void*)llr_cw[1], (void*)llr_layers[0], (length)*sizeof(int16_t)); + break; case 2: @@ -2937,11 +2958,15 @@ static void nr_dlsch_layer_demapping(int16_t **llr_cw, case 4: for (int i=0; i<(length/Nl/mod_order); i++){ for (int l=0; l0 1 2 3 + else if (codeword_TB0 == -1) + llr_cw[1][Nl*mod_order*i+l*mod_order+m] = llr_layers[l][i*mod_order+m];//i:0 -->0 1 2 3 + //if (i<4) printf("length%d: llr_layers[l%d][m%d]=%d: \n",length,l,m,llr_layers[l][i*mod_order+m]); + } + } } - } break; default: @@ -3009,299 +3034,110 @@ static int nr_dlsch_llr(NR_UE_PDSCH **pdsch_vars, switch (dlsch0_harq->Qm) { case 2 : - if ((rx_type==rx_standard) || (codeword_TB1 == -1)) { - nr_dlsch_qpsk_llr(frame_parms, - pdsch_vars[gNB_id]->rxdataF_comp0, - pllr_symbol_cw0, - symbol, - len, - first_symbol_flag, - nb_rb, - beamforming_mode); - - } else if (codeword_TB0 == -1){ - - nr_dlsch_qpsk_llr(frame_parms, - pdsch_vars[gNB_id]->rxdataF_comp0, - pllr_symbol_cw1, - symbol, - len, - first_symbol_flag, - nb_rb, - beamforming_mode); - } - else if (rx_type >= rx_IC_single_stream) { - if (dlsch1_harq->Qm == 2) { - nr_dlsch_qpsk_qpsk_llr(frame_parms, + switch (rx_type) { + case rx_standard : + for(int l =0; lNl; l++) + nr_dlsch_qpsk_llr(frame_parms, + pdsch_vars[gNB_id]->rxdataF_comp0[l*frame_parms->nb_antennas_rx], + pdsch_vars[gNB_id]->layer_llr[l]+llr_offset_symbol, + symbol, + len, + first_symbol_flag, + nb_rb, + beamforming_mode); + break; + case rx_IC_single_stream ://not implemented yet + /*nr_dlsch_qpsk_qpsk_llr(frame_parms, pdsch_vars[gNB_id]->rxdataF_comp0, rxdataF_comp_ptr, pdsch_vars[gNB_id]->dl_ch_rho2_ext, pdsch_vars[gNB_id]->layer_llr[0], symbol,len,first_symbol_flag,nb_rb, adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,2,nr_slot_rx,symbol), - pdsch_vars[gNB_id]->llr128); - if (rx_type==rx_IC_dual_stream) { - nr_dlsch_qpsk_qpsk_llr(frame_parms, - rxdataF_comp_ptr, - pdsch_vars[gNB_id]->rxdataF_comp0, - pdsch_vars[gNB_id]->dl_ch_rho_ext[harq_pid][round], - pdsch_vars[gNB_id]->layer_llr[1], - symbol,len,first_symbol_flag,nb_rb, - adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,2,nr_slot_rx,symbol), - pdsch_vars[gNB_id]->llr128_2ndstream); - } - } - else if (dlsch1_harq->Qm == 4) { - nr_dlsch_qpsk_16qam_llr(frame_parms, - pdsch_vars[gNB_id]->rxdataF_comp0, - rxdataF_comp_ptr,//i - dl_ch_mag_ptr,//i - pdsch_vars[gNB_id]->dl_ch_rho2_ext, - pdsch_vars[gNB_id]->layer_llr[0], - symbol,first_symbol_flag,nb_rb, - adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,2,nr_slot_rx,symbol), - pdsch_vars[gNB_id]->llr128); - if (rx_type==rx_IC_dual_stream) { - nr_dlsch_16qam_qpsk_llr(frame_parms, - rxdataF_comp_ptr, - pdsch_vars[gNB_id]->rxdataF_comp0,//i - dl_ch_mag_ptr, - pdsch_vars[gNB_id]->dl_ch_rho_ext[harq_pid][round], - pdsch_vars[gNB_id]->layer_llr[1], - symbol,first_symbol_flag,nb_rb, - adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,4,nr_slot_rx,symbol), - pdsch_vars[gNB_id]->llr128_2ndstream); - } - } - else { - nr_dlsch_qpsk_64qam_llr(frame_parms, - pdsch_vars[gNB_id]->rxdataF_comp0, - rxdataF_comp_ptr,//i - dl_ch_mag_ptr,//i - pdsch_vars[gNB_id]->dl_ch_rho2_ext, - pdsch_vars[gNB_id]->layer_llr[0], - symbol,first_symbol_flag,nb_rb, - adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,2,nr_slot_rx,symbol), - pdsch_vars[gNB_id]->llr128); - if (rx_type==rx_IC_dual_stream) { - nr_dlsch_64qam_qpsk_llr(frame_parms, - rxdataF_comp_ptr, - pdsch_vars[gNB_id]->rxdataF_comp0,//i - dl_ch_mag_ptr, - pdsch_vars[gNB_id]->dl_ch_rho_ext[harq_pid][round], - pdsch_vars[gNB_id]->layer_llr[1], - symbol,first_symbol_flag,nb_rb, - adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,6,nr_slot_rx,symbol), - pdsch_vars[gNB_id]->llr128_2ndstream); - } - } + pdsch_vars[gNB_id]->llr128);*/ + break; + case rx_IC_dual_stream ://not implemented yet + /*nr_dlsch_qpsk_qpsk_llr(frame_parms, + rxdataF_comp_ptr, + pdsch_vars[gNB_id]->rxdataF_comp0, + pdsch_vars[gNB_id]->dl_ch_rho_ext[harq_pid][round], + pdsch_vars[gNB_id]->layer_llr[1], + symbol,len,first_symbol_flag,nb_rb, + adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,2,nr_slot_rx,symbol), + pdsch_vars[gNB_id]->llr128_2ndstream);*/ + break; + case rx_SIC_dual_stream ://not implemented yet + break; } break; case 4 : - if ((rx_type==rx_standard ) || (codeword_TB1 == -1)) { - nr_dlsch_16qam_llr(frame_parms, - pdsch_vars[gNB_id]->rxdataF_comp0, - pdsch_vars[gNB_id]->llr[0], - pdsch_vars[gNB_id]->dl_ch_mag0, - symbol,len,first_symbol_flag,nb_rb, - pdsch_vars[gNB_id]->llr128, - beamforming_mode); - } else if (codeword_TB0 == -1){ - nr_dlsch_16qam_llr(frame_parms, - pdsch_vars[gNB_id]->rxdataF_comp0, - pdsch_vars[gNB_id]->llr[1], - pdsch_vars[gNB_id]->dl_ch_mag0, - symbol,len,first_symbol_flag,nb_rb, - pdsch_vars[gNB_id]->llr128_2ndstream, - beamforming_mode); - } - else if (rx_type >= rx_IC_single_stream) { - if (dlsch1_harq->Qm == 2) { - nr_dlsch_16qam_qpsk_llr(frame_parms, - pdsch_vars[gNB_id]->rxdataF_comp0, - rxdataF_comp_ptr,//i - pdsch_vars[gNB_id]->dl_ch_mag0, - pdsch_vars[gNB_id]->dl_ch_rho2_ext, - pdsch_vars[gNB_id]->layer_llr[0], - symbol,first_symbol_flag,nb_rb, - adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,4,nr_slot_rx,symbol), - pdsch_vars[gNB_id]->llr128); - if (rx_type==rx_IC_dual_stream) { - nr_dlsch_qpsk_16qam_llr(frame_parms, - rxdataF_comp_ptr, - pdsch_vars[gNB_id]->rxdataF_comp0,//i - pdsch_vars[gNB_id]->dl_ch_mag0,//i - pdsch_vars[gNB_id]->dl_ch_rho_ext[harq_pid][round], - pdsch_vars[gNB_id]->layer_llr[1], - symbol,first_symbol_flag,nb_rb, - adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,2,nr_slot_rx,symbol), - pdsch_vars[gNB_id]->llr128_2ndstream); - } - } - else if (dlsch1_harq->Qm == 4) { - nr_dlsch_16qam_16qam_llr(frame_parms, - pdsch_vars[gNB_id]->rxdataF_comp0, - rxdataF_comp_ptr,//i - pdsch_vars[gNB_id]->dl_ch_mag0, - dl_ch_mag_ptr,//i - pdsch_vars[gNB_id]->dl_ch_rho2_ext, - pdsch_vars[gNB_id]->layer_llr[0], - symbol,len,first_symbol_flag,nb_rb, - adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,4,nr_slot_rx,symbol), - pdsch_vars[gNB_id]->llr128); - if (rx_type==rx_IC_dual_stream) { - nr_dlsch_16qam_16qam_llr(frame_parms, - rxdataF_comp_ptr, - pdsch_vars[gNB_id]->rxdataF_comp0,//i - dl_ch_mag_ptr, - pdsch_vars[gNB_id]->dl_ch_mag0,//i - pdsch_vars[gNB_id]->dl_ch_rho_ext[harq_pid][round], - pdsch_vars[gNB_id]->layer_llr[1], - symbol,len,first_symbol_flag,nb_rb, - adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,4,nr_slot_rx,symbol), - pdsch_vars[gNB_id]->llr128_2ndstream); - } - } - else { - nr_dlsch_16qam_64qam_llr(frame_parms, - pdsch_vars[gNB_id]->rxdataF_comp0, - rxdataF_comp_ptr,//i - pdsch_vars[gNB_id]->dl_ch_mag0, - dl_ch_mag_ptr,//i - pdsch_vars[gNB_id]->dl_ch_rho2_ext, - pdsch_vars[gNB_id]->layer_llr[0], - symbol,first_symbol_flag,nb_rb, - adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,4,nr_slot_rx,symbol), - pdsch_vars[gNB_id]->llr128); - if (rx_type==rx_IC_dual_stream) { - nr_dlsch_64qam_16qam_llr(frame_parms, - rxdataF_comp_ptr, - pdsch_vars[gNB_id]->rxdataF_comp0, - dl_ch_mag_ptr, - pdsch_vars[gNB_id]->dl_ch_mag0, - pdsch_vars[gNB_id]->dl_ch_rho_ext[harq_pid][round], - pdsch_vars[gNB_id]->layer_llr[1], - symbol,first_symbol_flag,nb_rb, - adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,6,nr_slot_rx,symbol), - pdsch_vars[gNB_id]->llr128_2ndstream); - } - } + switch (rx_type) { + case rx_standard : + for(int l =0; lNl; l++) + nr_dlsch_16qam_llr(frame_parms, + pdsch_vars[gNB_id]->rxdataF_comp0[l*frame_parms->nb_antennas_rx], + pdsch_vars[gNB_id]->layer_llr[l]+llr_offset_symbol, + pdsch_vars[gNB_id]->dl_ch_mag0[l*frame_parms->nb_antennas_rx], + symbol, + len, + first_symbol_flag, + nb_rb, + beamforming_mode); + break; + case rx_IC_single_stream ://not implemented yet + break; + case rx_IC_dual_stream ://not implemented yet + break; + case rx_SIC_dual_stream ://not implemented yet + break; } break; case 6 : - if ((rx_type==rx_standard) || (codeword_TB1 == -1)) { - nr_dlsch_64qam_llr(frame_parms, - pdsch_vars[gNB_id]->rxdataF_comp0, - (int16_t*)pllr_symbol_cw0, - pdsch_vars[gNB_id]->dl_ch_mag0, - pdsch_vars[gNB_id]->dl_ch_magb0, - symbol,len,first_symbol_flag,nb_rb, - pdsch_vars[gNB_id]->llr_offset[symbol], - beamforming_mode); - } else if (codeword_TB0 == -1){ - nr_dlsch_64qam_llr(frame_parms, - pdsch_vars[gNB_id]->rxdataF_comp0, - pllr_symbol_cw1, - pdsch_vars[gNB_id]->dl_ch_mag0, - pdsch_vars[gNB_id]->dl_ch_magb0, - symbol,len,first_symbol_flag,nb_rb, - pdsch_vars[gNB_id]->llr_offset[symbol], - beamforming_mode); - } - else if (rx_type >= rx_IC_single_stream) { - if (dlsch1_harq->Qm == 2) { - nr_dlsch_64qam_qpsk_llr(frame_parms, - pdsch_vars[gNB_id]->rxdataF_comp0, - rxdataF_comp_ptr,//i - pdsch_vars[gNB_id]->dl_ch_mag0, - pdsch_vars[gNB_id]->dl_ch_rho2_ext, - pdsch_vars[gNB_id]->layer_llr[0], - symbol,first_symbol_flag,nb_rb, - adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,6,nr_slot_rx,symbol), - pdsch_vars[gNB_id]->llr128); - if (rx_type==rx_IC_dual_stream) { - nr_dlsch_qpsk_64qam_llr(frame_parms, - rxdataF_comp_ptr, - pdsch_vars[gNB_id]->rxdataF_comp0,//i - pdsch_vars[gNB_id]->dl_ch_mag0, - pdsch_vars[gNB_id]->dl_ch_rho_ext[harq_pid][round], - pdsch_vars[gNB_id]->layer_llr[1], - symbol,first_symbol_flag,nb_rb, - adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,2,nr_slot_rx,symbol), - pdsch_vars[gNB_id]->llr128_2ndstream); - } - } - else if (dlsch1_harq->Qm == 4) { - nr_dlsch_64qam_16qam_llr(frame_parms, - pdsch_vars[gNB_id]->rxdataF_comp0, - rxdataF_comp_ptr,//i - pdsch_vars[gNB_id]->dl_ch_mag0, - dl_ch_mag_ptr,//i - pdsch_vars[gNB_id]->dl_ch_rho2_ext, - pdsch_vars[gNB_id]->layer_llr[0], - symbol,first_symbol_flag,nb_rb, - adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,6,nr_slot_rx,symbol), - pdsch_vars[gNB_id]->llr128); - if (rx_type==rx_IC_dual_stream) { - nr_dlsch_16qam_64qam_llr(frame_parms, - rxdataF_comp_ptr, - pdsch_vars[gNB_id]->rxdataF_comp0,//i - dl_ch_mag_ptr, - pdsch_vars[gNB_id]->dl_ch_mag0,//i - pdsch_vars[gNB_id]->dl_ch_rho_ext[harq_pid][round], - pdsch_vars[gNB_id]->layer_llr[1], - symbol,first_symbol_flag,nb_rb, - adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,4,nr_slot_rx,symbol), - pdsch_vars[gNB_id]->llr128_2ndstream); - } - } - else { - nr_dlsch_64qam_64qam_llr(frame_parms, - pdsch_vars[gNB_id]->rxdataF_comp0, - rxdataF_comp_ptr,//i - pdsch_vars[gNB_id]->dl_ch_mag0, - dl_ch_mag_ptr,//i - pdsch_vars[gNB_id]->dl_ch_rho2_ext, - (int16_t*)pllr_symbol_layer0, - symbol,len,first_symbol_flag,nb_rb, - adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,6,nr_slot_rx,symbol), - pdsch_vars[gNB_id]->llr_offset[symbol]); - if (rx_type==rx_IC_dual_stream) { - nr_dlsch_64qam_64qam_llr(frame_parms, - rxdataF_comp_ptr, - pdsch_vars[gNB_id]->rxdataF_comp0,//i - dl_ch_mag_ptr, - pdsch_vars[gNB_id]->dl_ch_mag0,//i - pdsch_vars[gNB_id]->dl_ch_rho_ext[harq_pid][round], - pllr_symbol_layer1, - symbol,len,first_symbol_flag,nb_rb, - adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,6,nr_slot_rx,symbol), - pdsch_vars[gNB_id]->llr_offset[symbol]); - } - } + switch (rx_type) { + case rx_standard : + for(int l =0; lNl; l++) + nr_dlsch_64qam_llr(frame_parms, + pdsch_vars[gNB_id]->rxdataF_comp0[l*frame_parms->nb_antennas_rx], + pdsch_vars[gNB_id]->layer_llr[l]+llr_offset_symbol, + pdsch_vars[gNB_id]->dl_ch_mag0[l*frame_parms->nb_antennas_rx], + pdsch_vars[gNB_id]->dl_ch_magb0[l*frame_parms->nb_antennas_rx], + symbol, + len, + first_symbol_flag, + nb_rb, + beamforming_mode); + break; + case rx_IC_single_stream ://not implemented yet + break; + case rx_IC_dual_stream ://not implemented yet + break; + case rx_SIC_dual_stream ://not implemented yet + break; } + break; case 8: - if ((rx_type==rx_standard) || (codeword_TB1 == -1)) { - nr_dlsch_256qam_llr(frame_parms, - pdsch_vars[gNB_id]->rxdataF_comp0, - (int16_t*)pllr_symbol_cw0, - pdsch_vars[gNB_id]->dl_ch_mag0, - pdsch_vars[gNB_id]->dl_ch_magb0, - pdsch_vars[gNB_id]->dl_ch_magr0, - symbol,len,first_symbol_flag,nb_rb, - pdsch_vars[gNB_id]->llr_offset[symbol], - beamforming_mode); - } else if (codeword_TB0 == -1){ - nr_dlsch_256qam_llr(frame_parms, - pdsch_vars[gNB_id]->rxdataF_comp0, - pllr_symbol_cw1, - pdsch_vars[gNB_id]->dl_ch_mag0, - pdsch_vars[gNB_id]->dl_ch_magb0, - pdsch_vars[gNB_id]->dl_ch_magr0, - symbol,len,first_symbol_flag,nb_rb, - pdsch_vars[gNB_id]->llr_offset[symbol], - beamforming_mode); + switch (rx_type) { + case rx_standard : + for(int l =0; lNl; l++) + nr_dlsch_256qam_llr(frame_parms, + pdsch_vars[gNB_id]->rxdataF_comp0[l*frame_parms->nb_antennas_rx], + pdsch_vars[gNB_id]->layer_llr[l]+llr_offset_symbol, + pdsch_vars[gNB_id]->dl_ch_mag0[l*frame_parms->nb_antennas_rx], + pdsch_vars[gNB_id]->dl_ch_magb0[l*frame_parms->nb_antennas_rx], + pdsch_vars[gNB_id]->dl_ch_magr0[l*frame_parms->nb_antennas_rx], + symbol, + len, + first_symbol_flag, + nb_rb, + beamforming_mode); + break; + case rx_IC_single_stream ://not implemented yet + break; + case rx_IC_dual_stream ://not implemented yet + break; + case rx_SIC_dual_stream ://not implemented yet + break; } break; default: @@ -3315,45 +3151,54 @@ static int nr_dlsch_llr(NR_UE_PDSCH **pdsch_vars, case 2 : if (rx_type==rx_standard) { nr_dlsch_qpsk_llr(frame_parms, - pdsch_vars[gNB_id]->rxdataF_comp0, - pllr_symbol_cw0, - symbol,len,first_symbol_flag,nb_rb, + pdsch_vars[gNB_id]->rxdataF_comp0[0], + pdsch_vars[gNB_id]->layer_llr[0]+llr_offset_symbol, + symbol, + len, + first_symbol_flag, + nb_rb, beamforming_mode); } break; case 4: if (rx_type==rx_standard) { nr_dlsch_16qam_llr(frame_parms, - pdsch_vars[gNB_id]->rxdataF_comp0, - pdsch_vars[gNB_id]->llr[0], - pdsch_vars[gNB_id]->dl_ch_mag0, - symbol,len,first_symbol_flag,nb_rb, - pdsch_vars[gNB_id]->llr128, + pdsch_vars[gNB_id]->rxdataF_comp0[0], + pdsch_vars[gNB_id]->layer_llr[0]+llr_offset_symbol, + pdsch_vars[gNB_id]->dl_ch_mag0[0], + symbol, + len, + first_symbol_flag, + nb_rb, beamforming_mode); } break; case 6 : if (rx_type==rx_standard) { nr_dlsch_64qam_llr(frame_parms, - pdsch_vars[gNB_id]->rxdataF_comp0, - pllr_symbol_cw0, - pdsch_vars[gNB_id]->dl_ch_mag0, - pdsch_vars[gNB_id]->dl_ch_magb0, - symbol,len,first_symbol_flag,nb_rb, - pdsch_vars[gNB_id]->llr_offset[symbol], - beamforming_mode); + pdsch_vars[gNB_id]->rxdataF_comp0[0], + pdsch_vars[gNB_id]->layer_llr[0]+llr_offset_symbol, + pdsch_vars[gNB_id]->dl_ch_mag0[0], + pdsch_vars[gNB_id]->dl_ch_magb0[0], + symbol, + len, + first_symbol_flag, + nb_rb, + beamforming_mode); } break; case 8 : if (rx_type==rx_standard) { nr_dlsch_256qam_llr(frame_parms, - pdsch_vars[gNB_id]->rxdataF_comp0, - pllr_symbol_cw0, - pdsch_vars[gNB_id]->dl_ch_mag0, - pdsch_vars[gNB_id]->dl_ch_magb0, - pdsch_vars[gNB_id]->dl_ch_magr0, - symbol,len,first_symbol_flag,nb_rb, - pdsch_vars[gNB_id]->llr_offset[symbol], + pdsch_vars[gNB_id]->rxdataF_comp0[0], + pdsch_vars[gNB_id]->layer_llr[0]+llr_offset_symbol, + pdsch_vars[gNB_id]->dl_ch_mag0[0], + pdsch_vars[gNB_id]->dl_ch_magb0[0], + pdsch_vars[gNB_id]->dl_ch_magr0[0], + symbol, + len, + first_symbol_flag, + nb_rb, beamforming_mode); } break; diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_llr_computation.c b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_llr_computation.c index 68a206e7c7..a064a91d87 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_llr_computation.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_llr_computation.c @@ -629,16 +629,16 @@ __m128i tmp_result4 __attribute__ ((aligned(16))); //---------------------------------------------------------------------------------------------- int nr_dlsch_qpsk_llr(NR_DL_FRAME_PARMS *frame_parms, - int32_t **rxdataF_comp, + int32_t *rxdataF_comp, int16_t *dlsch_llr, uint8_t symbol, - uint32_t len, - uint8_t first_symbol_flag, + uint32_t len, + uint8_t first_symbol_flag, uint16_t nb_rb, uint8_t beamforming_mode) { - uint32_t *rxF = (uint32_t*)&rxdataF_comp[0][((int32_t)symbol*nb_rb*12)]; + uint32_t *rxF = (uint32_t *)&rxdataF_comp[((int32_t)symbol*nb_rb*12)]; uint32_t *llr32; int i; @@ -670,24 +670,23 @@ int nr_dlsch_qpsk_llr(NR_DL_FRAME_PARMS *frame_parms, //---------------------------------------------------------------------------------------------- void nr_dlsch_16qam_llr(NR_DL_FRAME_PARMS *frame_parms, - int32_t **rxdataF_comp, + int32_t *rxdataF_comp, int16_t *dlsch_llr, - int32_t **dl_ch_mag, + int32_t *dl_ch_mag, uint8_t symbol, - uint32_t len, + uint32_t len, uint8_t first_symbol_flag, uint16_t nb_rb, - int16_t **llr32p, uint8_t beamforming_mode) { #if defined(__x86_64__) || defined(__i386__) - __m128i *rxF = (__m128i*)&rxdataF_comp[0][(symbol*nb_rb*12)]; + __m128i *rxF = (__m128i*)&rxdataF_comp[(symbol*nb_rb*12)]; __m128i *ch_mag; __m128i llr128[2]; uint32_t *llr32; #elif defined(__arm__) - int16x8_t *rxF = (int16x8_t*)&rxdataF_comp[0][(symbol*nb_rb*12)]; + int16x8_t *rxF = (int16x8_t*)&rxdataF_comp[(symbol*nb_rb*12)]; int16x8_t *ch_mag; int16x8_t xmm0; int16_t *llr16; @@ -699,30 +698,17 @@ void nr_dlsch_16qam_llr(NR_DL_FRAME_PARMS *frame_parms, #if defined(__x86_64__) || defined(__i386__) - if (first_symbol_flag==1) { llr32 = (uint32_t*)dlsch_llr; - } else { - llr32 = (uint32_t*)*llr32p; - } #elif defined(__arm__) - if (first_symbol_flag==1) { llr16 = (int16_t*)dlsch_llr; - } else { - llr16 = (int16_t*)*llr32p; - } #endif #if defined(__x86_64__) || defined(__i386__) - ch_mag = (__m128i*)&dl_ch_mag[0][(symbol*nb_rb*12)]; + ch_mag = (__m128i*)&dl_ch_mag[(symbol*nb_rb*12)]; #elif defined(__arm__) - ch_mag = (int16x8_t*)&dl_ch_mag[0][(symbol*nb_rb*12)]; + ch_mag = (int16x8_t*)&dl_ch_mag[(symbol*nb_rb*12)]; #endif - // update output pointer according to number of REs in this symbol (<<2 because 4 bits per RE) - if (first_symbol_flag == 1) - *llr32p = dlsch_llr + (len<<2); - else - *llr32p += (len<<2); // printf("len=%d\n", len); len_mod4 = len&3; @@ -786,47 +772,35 @@ void nr_dlsch_16qam_llr(NR_DL_FRAME_PARMS *frame_parms, //---------------------------------------------------------------------------------------------- void nr_dlsch_64qam_llr(NR_DL_FRAME_PARMS *frame_parms, - int32_t **rxdataF_comp, + int32_t *rxdataF_comp, int16_t *dlsch_llr, - int32_t **dl_ch_mag, - int32_t **dl_ch_magb, + int32_t *dl_ch_mag, + int32_t *dl_ch_magb, uint8_t symbol, uint32_t len, uint8_t first_symbol_flag, uint16_t nb_rb, - uint32_t llr_offset, uint8_t beamforming_mode) { #if defined(__x86_64__) || defined(__i386__) - __m128i *rxF = (__m128i*)&rxdataF_comp[0][(symbol*nb_rb*12)]; + __m128i *rxF = (__m128i*)&rxdataF_comp[(symbol*nb_rb*12)]; __m128i *ch_mag,*ch_magb; #elif defined(__arm__) - int16x8_t *rxF = (int16x8_t*)&rxdataF_comp[0][(symbol*nb_rb*12)]; + int16x8_t *rxF = (int16x8_t*)&rxdataF_comp[(symbol*nb_rb*12)]; int16x8_t *ch_mag,*ch_magb,xmm1,xmm2; #endif int i,len2; unsigned char len_mod4; - short *llr; int16_t *llr2; - int8_t *pllr_symbol; - /* - if (first_symbol_flag==1) - llr = dlsch_llr; - else - llr = *llr_save; - */ - llr = dlsch_llr; - - pllr_symbol = (int8_t*)dlsch_llr; - pllr_symbol += llr_offset; + llr2 = dlsch_llr; #if defined(__x86_64__) || defined(__i386__) - ch_mag = (__m128i*)&dl_ch_mag[0][(symbol*nb_rb*12)]; - ch_magb = (__m128i*)&dl_ch_magb[0][(symbol*nb_rb*12)]; + ch_mag = (__m128i*)&dl_ch_mag[(symbol*nb_rb*12)]; + ch_magb = (__m128i*)&dl_ch_magb[(symbol*nb_rb*12)]; #elif defined(__arm__) - ch_mag = (int16x8_t*)&dl_ch_mag[0][(symbol*nb_rb*12)]; - ch_magb = (int16x8_t*)&dl_ch_magb[0][(symbol*nb_rb*12)]; + ch_mag = (int16x8_t*)&dl_ch_mag[(symbol*nb_rb*12)]; + ch_magb = (int16x8_t*)&dl_ch_magb[(symbol*nb_rb*12)]; #endif // printf("nr_dlsch_64qam_llr: symbol %d,nb_rb %d, len %d,pbch_pss_sss_adjust %d\n",symbol,nb_rb,len,pbch_pss_sss_adjust); @@ -838,9 +812,6 @@ void nr_dlsch_64qam_llr(NR_DL_FRAME_PARMS *frame_parms, dlsch_llr, pllr_symbol);*/ - llr2 = llr; - llr += (len*6); - len_mod4 =len&3; len2=len>>2; // length in quad words (4 REs) len2+=((len_mod4==0)?0:1); @@ -1095,43 +1066,29 @@ void nr_dlsch_64qam_llr_SIC(NR_DL_FRAME_PARMS *frame_parms, //---------------------------------------------------------------------------------------------- void nr_dlsch_256qam_llr(NR_DL_FRAME_PARMS *frame_parms, - int32_t **rxdataF_comp, + int32_t *rxdataF_comp, int16_t *dlsch_llr, - int32_t **dl_ch_mag, - int32_t **dl_ch_magb, - int32_t **dl_ch_magr, + int32_t *dl_ch_mag, + int32_t *dl_ch_magb, + int32_t *dl_ch_magr, uint8_t symbol, uint32_t len, uint8_t first_symbol_flag, uint16_t nb_rb, - uint32_t llr_offset, uint8_t beamforming_mode) { - __m128i *rxF = (__m128i*)&rxdataF_comp[0][(symbol*nb_rb*12)]; + __m128i *rxF = (__m128i*)&rxdataF_comp[(symbol*nb_rb*12)]; __m128i *ch_mag,*ch_magb,*ch_magr; int i,len2; unsigned char len_mod4; - short *llr; int16_t *llr2; - int8_t *pllr_symbol; - /* - if (first_symbol_flag==1) - llr = dlsch_llr; - else - llr = *llr_save; - */ - llr = dlsch_llr; + llr2 = dlsch_llr; - pllr_symbol = (int8_t*)dlsch_llr; - pllr_symbol += llr_offset; - - ch_mag = (__m128i*)&dl_ch_mag[0][(symbol*nb_rb*12)]; - ch_magb = (__m128i*)&dl_ch_magb[0][(symbol*nb_rb*12)]; - ch_magr = (__m128i*)&dl_ch_magr[0][(symbol*nb_rb*12)]; - llr2 = llr; - llr += (len*8); + ch_mag = (__m128i*)&dl_ch_mag[(symbol*nb_rb*12)]; + ch_magb = (__m128i*)&dl_ch_magb[(symbol*nb_rb*12)]; + ch_magr = (__m128i*)&dl_ch_magr[(symbol*nb_rb*12)]; len_mod4 =len&3; len2=len>>2; // length in quad words (4 REs) diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h index 1e7e10def7..6b76645fef 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h @@ -471,7 +471,7 @@ int nr_dlsch_64qam_64qam_llr(NR_DL_FRAME_PARMS *frame_parms, @param beamforming_mode beamforming mode */ int32_t nr_dlsch_qpsk_llr(NR_DL_FRAME_PARMS *frame_parms, - int32_t **rxdataF_comp, + int32_t *rxdataF_comp, int16_t *dlsch_llr, uint8_t symbol, uint32_t len, @@ -505,14 +505,13 @@ int32_t nr_dlsch_qpsk_llr_SIC(NR_DL_FRAME_PARMS *frame_parms, uint32_t rb_alloc); void nr_dlsch_16qam_llr(NR_DL_FRAME_PARMS *frame_parms, - int32_t **rxdataF_comp, + int32_t *rxdataF_comp, int16_t *dlsch_llr, - int32_t **dl_ch_mag, + int32_t *dl_ch_mag, uint8_t symbol, - uint32_t len, + uint32_t len, uint8_t first_symbol_flag, uint16_t nb_rb, - int16_t **llr32p, uint8_t beamforming_mode); /** \brief This function generates log-likelihood ratios (decoder input) for single-stream 16QAM received waveforms @@ -553,28 +552,26 @@ void dlsch_64qam_llr_SIC(NR_DL_FRAME_PARMS *frame_parms, uint32_t rb_alloc); void nr_dlsch_64qam_llr(NR_DL_FRAME_PARMS *frame_parms, - int32_t **rxdataF_comp, + int32_t *rxdataF_comp, int16_t *dlsch_llr, - int32_t **dl_ch_mag, - int32_t **dl_ch_magb, + int32_t *dl_ch_mag, + int32_t *dl_ch_magb, uint8_t symbol, - uint32_t len, + uint32_t len, uint8_t first_symbol_flag, uint16_t nb_rb, - uint32_t llr_offset, uint8_t beamforming_mode); void nr_dlsch_256qam_llr(NR_DL_FRAME_PARMS *frame_parms, - int32_t **rxdataF_comp, + int32_t *rxdataF_comp, int16_t *dlsch_llr, - int32_t **dl_ch_mag, - int32_t **dl_ch_magb, - int32_t **dl_ch_magr, + int32_t *dl_ch_mag, + int32_t *dl_ch_magb, + int32_t *dl_ch_magr, uint8_t symbol, uint32_t len, uint8_t first_symbol_flag, uint16_t nb_rb, - uint32_t llr_offset, uint8_t beamforming_mode); /** \fn dlsch_siso(NR_DL_FRAME_PARMS *frame_parms, From 9897ae64c89175da553bc382bb2f547c592a3c59 Mon Sep 17 00:00:00 2001 From: sfn Date: Fri, 26 Mar 2021 17:45:35 +0100 Subject: [PATCH 192/579] Add a new nr_dlsim test case -x 1 or 2 to run 1 and 2 layers --- openair1/SCHED_NR_UE/fapi_nr_ue_l1.c | 3 ++- openair1/SIMULATION/NR_PHY/dlsim.c | 14 +++++++------- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c | 3 ++- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c | 4 ++-- openair2/LAYER2/NR_MAC_gNB/mac_proto.h | 3 ++- 5 files changed, 15 insertions(+), 12 deletions(-) diff --git a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c index 54464446a5..803afa53e5 100644 --- a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c +++ b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c @@ -120,7 +120,8 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){ dlsch0->g_pucch = dlsch_config_pdu->accumulated_delta_PUCCH; dlsch0_harq->harq_ack.pucch_resource_indicator = dlsch_config_pdu->pucch_resource_id; dlsch0_harq->harq_ack.slot_for_feedback_ack = (slot+dlsch_config_pdu->pdsch_to_harq_feedback_time_ind)%frame_parms.slots_per_frame; - dlsch0_harq->Nl=1; + if ((dlsch0_harq->Nl > 2)||(dlsch0_harq->Nl <= 0)) dlsch0_harq->Nl = 1; + //printf("no of layers Nl %d\n",dlsch0_harq->Nl); dlsch0_harq->mcs_table=dlsch_config_pdu->mcs_table; dlsch0_harq->harq_ack.rx_status = downlink_harq_process(dlsch0_harq, dlsch0->current_harq_pid, dlsch_config_pdu->ndi, dlsch0->rnti_type); if (dlsch0_harq->status != ACTIVE) { diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index 8fdc3363e2..0990c67aec 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -292,7 +292,7 @@ int main(int argc, char **argv) // char fname[40], vname[40]; int trial, n_trials = 1, n_errors = 0, n_false_positive = 0; //int n_errors2, n_alamouti; - uint8_t transmission_mode = 1,n_tx=1,n_rx=1; + uint8_t nrOfLayers = 1,n_tx=1,n_rx=1; uint8_t round; uint8_t num_rounds = 4; @@ -455,12 +455,11 @@ int main(int argc, char **argv) break; */ case 'x': - transmission_mode=atoi(optarg); + nrOfLayers=atoi(optarg); - if ((transmission_mode!=1) && - (transmission_mode!=2) && - (transmission_mode!=6)) { - printf("Unsupported transmission mode %d\n",transmission_mode); + if ((nrOfLayers!=1) && + (nrOfLayers!=2)) { + printf("Unsupported nr Of Layers %d\n",nrOfLayers); exit(-1); } @@ -967,7 +966,7 @@ int main(int argc, char **argv) gNB_mac->UE_info.num_pdcch_cand[0][i] = 0; if (css_flag == 0) { - nr_schedule_ue_spec(0, frame, slot); + nr_schedule_ue_spec(0, frame, slot, nrOfLayers); } else { nr_schedule_css_dlsch_phytest(0,frame,slot); } @@ -1108,6 +1107,7 @@ int main(int argc, char **argv) } nr_ue_dcireq(&dcireq); //to be replaced with function pointer later + UE_harq_process->Nl = nrOfLayers; nr_ue_scheduled_response(&scheduled_response); phy_procedures_nrUE_RX(UE, diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c index 584648c67f..0de528ed3c 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c @@ -315,6 +315,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, int nb_periods_per_frame; const int bwp_id = 1; + uint8_t nrOfLayers = 1; gNB_MAC_INST *gNB = RC.nrmac[module_idP]; NR_COMMON_channels_t *cc = gNB->common_channels; @@ -458,7 +459,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, // This schedules the DCI for Downlink and PDSCH if (is_xlsch_in_slot(dlsch_in_slot_bitmap, slot)) - nr_schedule_ue_spec(module_idP, frame, slot); + nr_schedule_ue_spec(module_idP, frame, slot, nrOfLayers); nr_schedule_pucch(module_idP, frame, slot); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index 7db4080283..cee5bf5eb8 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -656,7 +656,8 @@ void nr_simple_dlsch_preprocessor(module_id_t module_id, void nr_schedule_ue_spec(module_id_t module_id, frame_t frame, - sub_frame_t slot) { + sub_frame_t slot, + uint8_t nrOfLayers) { gNB_MAC_INST *gNB_mac = RC.nrmac[module_id]; /* PREPROCESSOR */ @@ -707,7 +708,6 @@ void nr_schedule_ue_spec(module_id_t module_id, nrOfSymbols, startSymbolIndex); const nfapi_nr_dmrs_type_e dmrsConfigType = getDmrsConfigType(sched_ctrl->active_bwp); - const int nrOfLayers = 1; const uint16_t R = nr_get_code_rate_dl(sched_ctrl->mcs, sched_ctrl->mcsTableIdx); const uint8_t Qm = nr_get_Qm_dl(sched_ctrl->mcs, sched_ctrl->mcsTableIdx); const uint32_t TBS = diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h index 05c180ca2e..1b5d13298c 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h +++ b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h @@ -69,7 +69,8 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, void nr_schedule_ue_spec(module_id_t module_id, frame_t frame, - sub_frame_t slot); + sub_frame_t slot, + uint8_t nrOfLayers); void schedule_control_sib1(module_id_t module_id, int CC_id, From 81cfccf6e1f22b5c4cb3fac4806eb6f465d104f7 Mon Sep 17 00:00:00 2001 From: sfn Date: Fri, 26 Mar 2021 17:52:14 +0100 Subject: [PATCH 193/579] remove printf --- openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c | 1 - 1 file changed, 1 deletion(-) diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c index 3160a2f53d..4838cd5f11 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c @@ -679,7 +679,6 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, dmrs_len, dlsch[0]->harq_processes[harq_pid]->Qm, dlsch[0]->harq_processes[harq_pid]->Nl); - printf("nr_dlsch_layer_demapping Nl%d G %d\n",dlsch[0]->harq_processes[harq_pid]->Nl,dlsch[0]->harq_processes[harq_pid]->G); nr_dlsch_layer_demapping(pdsch_vars[gNB_id]->llr, dlsch[0]->harq_processes[harq_pid]->Nl, dlsch[0]->harq_processes[harq_pid]->Qm, From d236045704ece0c74f3a5b815311a6578c76f4ca Mon Sep 17 00:00:00 2001 From: Mohammed Ismail Date: Thu, 22 Apr 2021 17:01:41 +0200 Subject: [PATCH 194/579] CI: format correction on testid Signed-off-by: Mohammed Ismail --- ci-scripts/xml_files/physim_deploy_run.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci-scripts/xml_files/physim_deploy_run.xml b/ci-scripts/xml_files/physim_deploy_run.xml index f8ad018305..63152c1fb5 100644 --- a/ci-scripts/xml_files/physim_deploy_run.xml +++ b/ci-scripts/xml_files/physim_deploy_run.xml @@ -25,11 +25,11 @@ Physical Simulators Check wrench - 0102001 + 010201 - + Deploy_Run_PhySim Deploy and run physical simulator on openshift From bb646da064ad4869b39eb3c042a46fcfd0bd4c69 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Thu, 22 Apr 2021 17:13:34 +0100 Subject: [PATCH 195/579] Put back cell_group_config when do-ra --- openair2/LAYER2/NR_MAC_UE/config_ue.c | 22 +++++++++++++---- openair2/LAYER2/NR_MAC_UE/main_ue_nr.c | 33 ++++++++++++++++---------- 2 files changed, 39 insertions(+), 16 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_UE/config_ue.c b/openair2/LAYER2/NR_MAC_UE/config_ue.c index 5e08379eee..32226a4ea6 100755 --- a/openair2/LAYER2/NR_MAC_UE/config_ue.c +++ b/openair2/LAYER2/NR_MAC_UE/config_ue.c @@ -212,7 +212,7 @@ void config_common_ue(NR_UE_MAC_INST_t *mac, frequency_range_t frequency_range = band<100?FR1:FR2; lte_frame_type_t frame_type = get_frame_type(*scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0], *scc->ssbSubcarrierSpacing); - + // cell config cfg->cell_config.phy_cell_id = *scc->physCellId; @@ -734,12 +734,26 @@ int nr_rrc_mac_config_req_ue( // Setup the SSB to Rach Occasions mapping according to the config build_ssb_to_ro_map(mac); } - else if (cell_group_config != NULL ){ + else if (cell_group_config != NULL){ LOG_I(MAC,"Applying CellGroupConfig from gNodeB\n"); mac->cg = cell_group_config; mac->servCellIndex = cell_group_config->spCellConfig->servCellIndex ? *cell_group_config->spCellConfig->servCellIndex : 0; - // config_control_ue(mac); - // config_common_ue(mac,module_id,cc_idP); + if(get_softmodem_params()->phy_test==1 || get_softmodem_params()->do_ra==1) { + config_control_ue(mac); + if (cell_group_config->spCellConfig->reconfigurationWithSync) { + if (cell_group_config->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated) { + ra->rach_ConfigDedicated = cell_group_config->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink; + } + mac->scc = cell_group_config->spCellConfig->reconfigurationWithSync->spCellConfigCommon; + config_common_ue(mac,module_id,cc_idP); + mac->crnti = cell_group_config->spCellConfig->reconfigurationWithSync->newUE_Identity; + LOG_I(MAC,"Configuring CRNTI %x\n",mac->crnti); + } + + // Setup the SSB to Rach Occasions mapping according to the config + build_ssb_to_ro_map(mac); + } + /* if(mac_cell_group_configP != NULL){ if(mac_cell_group_configP->drx_Config != NULL ){ diff --git a/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c b/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c index 3603432575..be5a1ae19e 100644 --- a/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c +++ b/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c @@ -52,17 +52,26 @@ NR_UE_MAC_INST_t * nr_l2_init_ue(NR_UE_RRC_INST_t* rrc_inst) //init mac here nr_ue_mac_inst = (NR_UE_MAC_INST_t *)calloc(sizeof(NR_UE_MAC_INST_t),NB_NR_UE_MAC_INST); for (int j=0;jscell_group_config) { - nr_rrc_mac_config_req_ue(0,0,0,NULL,NULL,NULL,rrc_inst->scell_group_config); - - // if (IS_SOFTMODEM_NOS1){ - //if (1) { - // AssertFatal(rlc_module_init(0) == 0, "%s: Could not initialize RLC layer\n", __FUNCTION__); - // nr_pdcp_layer_init(); - //nr_DRB_preconfiguration(nr_ue_mac_inst->crnti); - //} + if (rrc_inst && (rrc_inst->scell_group_config || rrc_inst->cell_group_config)) { + + if(rrc_inst->scell_group_config) { + nr_rrc_mac_config_req_ue(0,0,0,NULL,NULL,NULL,rrc_inst->scell_group_config); + //if (IS_SOFTMODEM_NOS1){ + // AssertFatal(rlc_module_init(0) == 0, "%s: Could not initialize RLC layer\n", __FUNCTION__); + // nr_pdcp_layer_init(); + // nr_DRB_preconfiguration(nr_ue_mac_inst->crnti); + //} + } else if (rrc_inst->cell_group_config) { + nr_rrc_mac_config_req_ue(0,0,0,NULL,NULL,rrc_inst->cell_group_config,NULL); + if (IS_SOFTMODEM_NOS1){ + AssertFatal(rlc_module_init(0) == 0, "%s: Could not initialize RLC layer\n", __FUNCTION__); + pdcp_layer_init(); + nr_DRB_preconfiguration(nr_ue_mac_inst->crnti); + } + } // Allocate memory for ul_config_request in the mac instance. This is now a pointer and will // point to a list of structures (one for each UL slot) to store PUSCH scheduling parameters @@ -74,8 +83,8 @@ NR_UE_MAC_INST_t * nr_l2_init_ue(NR_UE_RRC_INST_t* rrc_inst) LOG_D(MAC, "Initializing ul_config_request. num_slots_ul = %d\n", num_slots_ul); nr_ue_mac_inst->ul_config_request = (fapi_nr_ul_config_request_t *)calloc(num_slots_ul, sizeof(fapi_nr_ul_config_request_t)); } - } - else { + + } else { LOG_I(MAC,"Running without CellGroupConfig\n"); nr_rrc_mac_config_req_ue(0,0,0,NULL,NULL,NULL,NULL); AssertFatal(rlc_module_init(0) == 0, "%s: Could not initialize RLC layer\n", __FUNCTION__); From f1e88d1f8dc6272cc9d37150cc2ba17de6368b65 Mon Sep 17 00:00:00 2001 From: sfn Date: Thu, 22 Apr 2021 16:37:49 +0200 Subject: [PATCH 196/579] fix multipath_tv_channel to support MIMO --- .../SIMULATION/TOOLS/multipath_tv_channel.c | 33 ++++++------------- 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/openair1/SIMULATION/TOOLS/multipath_tv_channel.c b/openair1/SIMULATION/TOOLS/multipath_tv_channel.c index c68ce73758..ece1f81335 100644 --- a/openair1/SIMULATION/TOOLS/multipath_tv_channel.c +++ b/openair1/SIMULATION/TOOLS/multipath_tv_channel.c @@ -40,9 +40,9 @@ void multipath_tv_channel(channel_desc_t *desc, uint8_t keep_channel) { - double complex **tx,**rx,***H_t,*rx_temp;//, *tv_H_t; + double complex **tx,**rx,***H_t; double path_loss = pow(10,desc->path_loss_dB/20); - int i,j,k,dd; + int i,j,dd; dd = abs(desc->channel_offset); #ifdef DEBUG_CH printf("[TV CHANNEL] keep = %d : path_loss = %g (%f), nb_rx %d, nb_tx %d, dd %d, len %d max_doppler %g\n",keep_channel,path_loss,desc->path_loss_dB,desc->nb_rx,desc->nb_tx,dd,desc->channel_length, @@ -51,8 +51,6 @@ void multipath_tv_channel(channel_desc_t *desc, tx = (double complex **)malloc(desc->nb_tx*sizeof(double complex *)); rx = (double complex **)malloc(desc->nb_rx*sizeof(double complex *)); H_t= (double complex ***) malloc(desc->nb_tx*desc->nb_rx*sizeof(double complex **)); - // tv_H_t = (double complex *) malloc(length*sizeof(double complex)); - rx_temp= (double complex *) calloc(length,sizeof(double complex)); for(i=0; inb_tx; i++) { tx[i] = (double complex *)calloc(length,sizeof(double complex)); @@ -84,11 +82,7 @@ void multipath_tv_channel(channel_desc_t *desc, for(i=0; inb_rx; i++) { for(j=0; jnb_tx; j++) { - tv_conv(H_t[i+(j*desc->nb_rx)],tx[j],rx_temp,length,desc->nb_taps,dd); - - for(k=0; knb_rx)],tx[j],rx[i],length,desc->nb_taps,dd); } } @@ -99,10 +93,6 @@ void multipath_tv_channel(channel_desc_t *desc, } } - /* for(k=0;knb_tx; i++) { free(tx[i]); } @@ -124,7 +114,6 @@ void multipath_tv_channel(channel_desc_t *desc, } free(H_t); - free(rx_temp); } //TODO: make phi_rad a parameter of this function @@ -177,7 +166,7 @@ void tv_channel(channel_desc_t *desc,double complex ***H,uint32_t length){ H[i+(j*desc->nb_rx)][k][l] += sqrt(desc->amps[k])*alpha[p]*cexp(I*(2*pi*w_Hz[i+(j*desc->nb_rx)][k][p]*l*(1/(desc->sampling_rate*1e6))+phi_rad[i+(j*desc->nb_rx)][k][p])); } } - //printf("H[tx%d][rx%d][k%d] = %f+j%f \n",j,i,k,creal(H[i+(j*desc->nb_rx)][k][0]),cimag(H[i+(j*desc->nb_rx)][k][0])); + //printf("H[tx%d][rx%d][k%d][l%d] = %f+j%f \n",j,i,k,0,creal(H[i+(j*desc->nb_rx)][k][0]),cimag(H[i+(j*desc->nb_rx)][k][0])); } } } @@ -201,14 +190,12 @@ void tv_channel(channel_desc_t *desc,double complex ***H,uint32_t length){ } // time varying convolution -void tv_conv(double complex **h, double complex *x, double complex *y, uint32_t nb_samples, uint8_t nb_taps, int dd){ - - int i,j; - - for(i=0; i<((int)nb_samples-dd); i++) { - for(j=0; jj) - y[i+dd] += creal(h[j][i])*creal(x[i-j])-cimag(h[j][i])*cimag(x[i-j]) + I*(creal(h[j][i])*cimag(x[i-j])+cimag(h[j][i])*creal(x[i-j])); +void tv_conv(double complex **h, double complex *x, double complex *y, uint32_t nb_samples, uint8_t nb_taps, int dd) +{ + for(int i = 0; i < ((int)nb_samples-dd); i++) { + for(int j = 0; j < nb_taps; j++) { + if(i >= j) + y[i+dd] += h[j][i] * x[i-j]; } } } From 8530989d41734651e33185b850c75ac143c38f5c Mon Sep 17 00:00:00 2001 From: sfn Date: Thu, 22 Apr 2021 16:39:29 +0200 Subject: [PATCH 197/579] Extend dlsim to support 2 layers for MIMO in AWGN channel --- openair1/SIMULATION/NR_PHY/dlsim.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index 0990c67aec..838fcc32a7 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -1080,6 +1080,11 @@ int main(int argc, char **argv) frame_length_complex_samples, 0); + double H_awgn_mimo[4][4] ={{1.0, 0.5, 0.25, 0.125},//rx 0 + {0.5, 1.0, 0.5, 0.25}, //rx 1 + {0.25, 0.5, 1.0, 0.5}, //rx 2 + {0.125, 0.25, 0.5, 1.0}};//rx 3 + for (i=frame_parms->get_samples_slot_timestamp(slot,frame_parms,0); iget_samples_slot_timestamp(slot+1,frame_parms,0); i++) { @@ -1090,9 +1095,9 @@ int main(int argc, char **argv) // sum up signals from different Tx antennas r_re[aa_rx][i] = 0; r_im[aa_rx][i] = 0; - for (aa=0; aa Date: Thu, 22 Apr 2021 16:40:37 +0200 Subject: [PATCH 198/579] Fix zero-forcing for 2 layers --- .../NR_UE_TRANSPORT/nr_dlsch_demodulation.c | 491 +++++++++--------- .../NR_UE_TRANSPORT/nr_transport_proto_ue.h | 18 +- 2 files changed, 266 insertions(+), 243 deletions(-) diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c index 4838cd5f11..92b2fbfca7 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c @@ -84,8 +84,8 @@ unsigned char offset_mumimo_llr_drange[29][3]={{8,8,8},{7,7,7},{7,7,7},{7,7,7},{ */ //unsigned char offset_mumimo_llr_drange[29][3]= {{0, 6, 5},{0, 4, 5},{0, 4, 5},{0, 5, 4},{0, 5, 6},{0, 5, 3},{0, 4, 4},{0, 4, 4},{0, 3, 3},{0, 1, 2},{1, 1, 0},{1, 3, 2},{3, 4, 1},{2, 0, 0},{2, 2, 2},{1, 1, 1},{2, 1, 0},{2, 1, 1},{1, 0, 1},{1, 0, 1},{0, 0, 0},{1, 0, 0},{0, 0, 0},{0, 1, 0},{1, 0, 0},{0, 0, 0},{0, 0, 0},{0, 0, 0},{0, 0, 0}}; -#define print_ints(s,x) printf("%s %d %d %d %d\n",s,(x)[0],(x)[1],(x)[2],(x)[3]) -#define print_shorts(s,x) printf("%s %d,%d,%d,%d,%d,%d,%d,%d\n",s,(x)[0],(x)[1],(x)[2],(x)[3],(x)[4],(x)[5],(x)[6],(x)[7]) +#define print_ints(s,x) printf("%s = %d %d %d %d\n",s,(x)[0],(x)[1],(x)[2],(x)[3]) +#define print_shorts(s,x) printf("%s = [%d+j*%d, %d+j*%d, %d+j*%d, %d+j*%d]\n",s,(x)[0],(x)[1],(x)[2],(x)[3],(x)[4],(x)[5],(x)[6],(x)[7]) static void nr_dlsch_dual_stream_correlation_core(int **dl_ch_estimates_ext, int **dl_ch_estimates_ext_i, @@ -99,12 +99,14 @@ static void nr_dlsch_dual_stream_correlation_core(int **dl_ch_estimates_ext, uint8_t nr_zero_forcing_rx_2layers(int **rxdataF_comp, int **dl_ch_mag, int **dl_ch_magb, + int **dl_ch_magr, int **dl_ch_estimates_ext, unsigned short nb_rb, unsigned char n_rx, unsigned char mod_order, int shift, - unsigned char symbol); + unsigned char symbol, + int length); static void nr_dlsch_layer_demapping(int16_t **llr_cw, uint8_t Nl, @@ -414,7 +416,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, symbol, pilots, len, - nb_rb); + nb_rb_pdsch); #if UE_TIMING_TRACE stop_meas(&ue->generic_stat_bis[proc->thread_id][slot]); @@ -436,7 +438,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, avg, symbol, len, - nb_rb); + nb_rb_pdsch); avgs = 0; for (aatx=0;aatxQm, - nb_rb, + nb_rb_pdsch, pdsch_vars[gNB_id]->log2_maxh, measurements); // log2_maxh+I0_shift } @@ -558,20 +560,24 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, (n_tx>1)? pdsch_vars[gNB_id]->rho : NULL, pdsch_vars[gNB_id]->dl_ch_mag0, pdsch_vars[gNB_id]->dl_ch_magb0, + pdsch_vars[gNB_id]->dl_ch_magr0, n_tx, n_rx, symbol, - nb_rb); + nb_rb_pdsch, + len); if (n_tx == 2)//Apply zero forcing for 2 Tx layers nr_zero_forcing_rx_2layers(pdsch_vars[gNB_id]->rxdataF_comp0, pdsch_vars[gNB_id]->dl_ch_mag0, pdsch_vars[gNB_id]->dl_ch_magb0, + pdsch_vars[gNB_id]->dl_ch_magr0, pdsch_vars[gNB_id]->dl_ch_estimates_ext, - nb_rb, + nb_rb_pdsch, n_rx, dlsch0_harq->Qm, pdsch_vars[gNB_id]->log2_maxh, - symbol); + symbol, + len); } else if (dlsch0_harq->mimo_mode == NR_DUALSTREAM) { nr_dlsch_detection_mrc_core(pdsch_vars[gNB_id]->rxdataF_comp0, @@ -795,7 +801,7 @@ void nr_dlsch_channel_compensation(int **rxdataF_ext, NR_DL_FRAME_PARMS *frame_parms, uint8_t nb_aatx, unsigned char symbol, - uint8_t pilots, + int length, uint8_t first_symbol_flag, unsigned char mod_order, unsigned short nb_rb, @@ -811,6 +817,7 @@ void nr_dlsch_channel_compensation(int **rxdataF_ext, __m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128,QAM_amp128b,QAM_amp128r; QAM_amp128b = _mm_setzero_si128(); + uint32_t nb_rb_0 = length/12 + ((length%12)?1:0); for (aatx=0; aatxnb_antennas_rx)+aarx][symbol*nb_rb*12]; - for (rb=0; rb2) { // get channel amplitude if not QPSK @@ -865,18 +872,16 @@ void nr_dlsch_channel_compensation(int **rxdataF_ext, dl_ch_mag128[1] = _mm_mulhi_epi16(dl_ch_mag128[1],QAM_amp128); dl_ch_mag128[1] = _mm_slli_epi16(dl_ch_mag128[1],1); - if (pilots==0) { - mmtmpD0 = _mm_madd_epi16(dl_ch128[2],dl_ch128[2]); - mmtmpD0 = _mm_srai_epi32(mmtmpD0,output_shift); - mmtmpD1 = _mm_packs_epi32(mmtmpD0,mmtmpD0); + mmtmpD0 = _mm_madd_epi16(dl_ch128[2],dl_ch128[2]);//[H_I(0)^2+H_Q(0)^2 H_I(1)^2+H_Q(1)^2 H_I(2)^2+H_Q(2)^2 H_I(3)^2+H_Q(3)^2] + mmtmpD0 = _mm_srai_epi32(mmtmpD0,output_shift); + mmtmpD1 = _mm_packs_epi32(mmtmpD0,mmtmpD0);//[|H(0)|^2 |H(1)|^2 |H(2)|^2 |H(3)|^2 |H(0)|^2 |H(1)|^2 |H(2)|^2 |H(3)|^2] - dl_ch_mag128[2] = _mm_unpacklo_epi16(mmtmpD1,mmtmpD1); - dl_ch_mag128b[2] = dl_ch_mag128[2]; - dl_ch_mag128r[2] = dl_ch_mag128[2]; + dl_ch_mag128[2] = _mm_unpacklo_epi16(mmtmpD1,mmtmpD1);//[|H(0)|^2 |H(0)|^2 |H(1)|^2 |H(1)|^2 |H(2)|^2 |H(2)|^2 |H(3)|^2 |H(3)|^2] + dl_ch_mag128b[2] = dl_ch_mag128[2]; + dl_ch_mag128r[2] = dl_ch_mag128[2]; - dl_ch_mag128[2] = _mm_mulhi_epi16(dl_ch_mag128[2],QAM_amp128); - dl_ch_mag128[2] = _mm_slli_epi16(dl_ch_mag128[2],1); - } + dl_ch_mag128[2] = _mm_mulhi_epi16(dl_ch_mag128[2],QAM_amp128); + dl_ch_mag128[2] = _mm_slli_epi16(dl_ch_mag128[2],1); dl_ch_mag128b[0] = _mm_mulhi_epi16(dl_ch_mag128b[0],QAM_amp128b); dl_ch_mag128b[0] = _mm_slli_epi16(dl_ch_mag128b[0],1); @@ -891,13 +896,11 @@ void nr_dlsch_channel_compensation(int **rxdataF_ext, dl_ch_mag128r[1] = _mm_mulhi_epi16(dl_ch_mag128r[1],QAM_amp128r); dl_ch_mag128r[1] = _mm_slli_epi16(dl_ch_mag128r[1],1); - if (pilots==0) { - dl_ch_mag128b[2] = _mm_mulhi_epi16(dl_ch_mag128b[2],QAM_amp128b); - dl_ch_mag128b[2] = _mm_slli_epi16(dl_ch_mag128b[2],1); + dl_ch_mag128b[2] = _mm_mulhi_epi16(dl_ch_mag128b[2],QAM_amp128b); + dl_ch_mag128b[2] = _mm_slli_epi16(dl_ch_mag128b[2],1); - dl_ch_mag128r[2] = _mm_mulhi_epi16(dl_ch_mag128r[2],QAM_amp128r); - dl_ch_mag128r[2] = _mm_slli_epi16(dl_ch_mag128r[2],1); - } + dl_ch_mag128r[2] = _mm_mulhi_epi16(dl_ch_mag128r[2],QAM_amp128r); + dl_ch_mag128r[2] = _mm_slli_epi16(dl_ch_mag128r[2],1); } // multiply by conjugated channel @@ -920,15 +923,17 @@ void nr_dlsch_channel_compensation(int **rxdataF_ext, // print_ints("c0",&mmtmpD2); // print_ints("c1",&mmtmpD3); rxdataF_comp128[0] = _mm_packs_epi32(mmtmpD2,mmtmpD3); - //printf("arx%d atx%d rb_index %d symbol%d\n",aarx,aatx,rb,symbol); - // print_shorts("rx:",rxdataF128); - // print_shorts("ch:",dl_ch128); - // print_shorts("pack:",rxdataF_comp128); - //printf("arx%d atx%d rb_index %d symbol%d\n",aarx,aatx,rb,symbol); - //print_shorts("rx:",(int16_t*)&rxdataF128[0]); - //print_shorts("ch:",(int16_t*)&dl_ch128[0]); - //print_shorts("pack:",(int16_t*)&rxdataF_comp128[0]); +#ifdef DEBUG_DLSCH_DEMOD + printf("%%arx%d atx%d rb_index %d symbol %d shift %d\n",aarx,aatx,rb,symbol,output_shift); + printf("rx_%d(%d,:)",aarx+1,rb+1); + print_shorts(" ",(int16_t *)&rxdataF128[0]); + printf("ch_%d%d(%d,:)",aarx+1,aatx+1,rb+1); + print_shorts(" ",(int16_t *)&dl_ch128[0]); + printf("rx_comp_%d%d(%d,:)",aarx+1,aatx+1,rb+1); + print_shorts(" ",(int16_t *)&rxdataF_comp128[0]); +#endif + // multiply by conjugated channel mmtmpD0 = _mm_madd_epi16(dl_ch128[1],rxdataF128[1]); // mmtmpD0 contains real part of 4 consecutive outputs (32-bit) @@ -947,40 +952,30 @@ void nr_dlsch_channel_compensation(int **rxdataF_ext, //print_shorts("ch:",(int16_t*)&dl_ch128[1]); //print_shorts("pack:",(int16_t*)&rxdataF_comp128[1]); - if (pilots==0) { - // multiply by conjugated channel - mmtmpD0 = _mm_madd_epi16(dl_ch128[2],rxdataF128[2]); - // mmtmpD0 contains real part of 4 consecutive outputs (32-bit) - mmtmpD1 = _mm_shufflelo_epi16(dl_ch128[2],_MM_SHUFFLE(2,3,0,1)); - mmtmpD1 = _mm_shufflehi_epi16(mmtmpD1,_MM_SHUFFLE(2,3,0,1)); - mmtmpD1 = _mm_sign_epi16(mmtmpD1,*(__m128i*)conjugate); - mmtmpD1 = _mm_madd_epi16(mmtmpD1,rxdataF128[2]); - // mmtmpD1 contains imag part of 4 consecutive outputs (32-bit) - mmtmpD0 = _mm_srai_epi32(mmtmpD0,output_shift); - mmtmpD1 = _mm_srai_epi32(mmtmpD1,output_shift); - mmtmpD2 = _mm_unpacklo_epi32(mmtmpD0,mmtmpD1); - mmtmpD3 = _mm_unpackhi_epi32(mmtmpD0,mmtmpD1); + // multiply by conjugated channel + mmtmpD0 = _mm_madd_epi16(dl_ch128[2],rxdataF128[2]); + // mmtmpD0 contains real part of 4 consecutive outputs (32-bit) + mmtmpD1 = _mm_shufflelo_epi16(dl_ch128[2],_MM_SHUFFLE(2,3,0,1)); + mmtmpD1 = _mm_shufflehi_epi16(mmtmpD1,_MM_SHUFFLE(2,3,0,1)); + mmtmpD1 = _mm_sign_epi16(mmtmpD1,*(__m128i*)conjugate); + mmtmpD1 = _mm_madd_epi16(mmtmpD1,rxdataF128[2]); + // mmtmpD1 contains imag part of 4 consecutive outputs (32-bit) + mmtmpD0 = _mm_srai_epi32(mmtmpD0,output_shift); + mmtmpD1 = _mm_srai_epi32(mmtmpD1,output_shift); + mmtmpD2 = _mm_unpacklo_epi32(mmtmpD0,mmtmpD1); + mmtmpD3 = _mm_unpackhi_epi32(mmtmpD0,mmtmpD1); - rxdataF_comp128[2] = _mm_packs_epi32(mmtmpD2,mmtmpD3); - //print_shorts("rx:",(int16_t*)&rxdataF128[2]); - //print_shorts("ch:",(int16_t*)&dl_ch128[2]); - //print_shorts("pack:",(int16_t*)&rxdataF_comp128[2]); + rxdataF_comp128[2] = _mm_packs_epi32(mmtmpD2,mmtmpD3); + //print_shorts("rx:",(int16_t*)&rxdataF128[2]); + //print_shorts("ch:",(int16_t*)&dl_ch128[2]); + //print_shorts("pack:",(int16_t*)&rxdataF_comp128[2]); - dl_ch128+=3; - dl_ch_mag128+=3; - dl_ch_mag128b+=3; - dl_ch_mag128r+=3; - rxdataF128+=3; - rxdataF_comp128+=3; - } - else { // we have a smaller PDSCH in symbols with pilots so skip last group of 4 REs and increment less - dl_ch128+=2; - dl_ch_mag128+=2; - dl_ch_mag128b+=2; - dl_ch_mag128r+=2; - rxdataF128+=2; - rxdataF_comp128+=2; - } + dl_ch128+=3; + dl_ch_mag128+=3; + dl_ch_mag128b+=3; + dl_ch_mag128r+=3; + rxdataF128+=3; + rxdataF_comp128+=3; } } } @@ -1004,7 +999,7 @@ void nr_dlsch_channel_compensation(int **rxdataF_ext, rho128 = (__m128i *)&rho[aarx][aatx*nb_aatx+atx][symbol*nb_rb*12]; dl_ch128_2 = (__m128i *)&dl_ch_estimates_ext[atx*frame_parms->nb_antennas_rx+aarx][symbol*nb_rb*12]; - for (rb=0; rbrx_correlation[0][0][aarx] = signal_energy(&rho[aarx][aatx*nb_aatx+atx][symbol*nb_rb*12],rb*12); avg_rho_re[aarx][aatx*nb_aatx+atx] = 16*avg_rho_re[aarx][aatx*nb_aatx+atx]/(nb_rb*12); avg_rho_im[aarx][aatx*nb_aatx+atx] = 16*avg_rho_im[aarx][aatx*nb_aatx+atx]/(nb_rb*12); - printf("rho[rx]%d tx%d tx%d = Re: %d Im: %d\n",aarx, aatx,atx, avg_rho_re[aarx][aatx*nb_aatx+atx], avg_rho_im[aarx][aatx*nb_aatx+atx]); + //printf("rho[rx]%d tx%d tx%d = Re: %d Im: %d\n",aarx, aatx,atx, avg_rho_re[aarx][aatx*nb_aatx+atx], avg_rho_im[aarx][aatx*nb_aatx+atx]); } } } @@ -1112,7 +1107,7 @@ void nr_dlsch_channel_compensation(int **rxdataF_ext, #elif defined(__arm__) unsigned short rb; - unsigned char aatx,aarx,symbol_mod,pilots=0; + unsigned char aatx,aarx,symbol_mod; int16x4_t *dl_ch128,*dl_ch128_2,*rxdataF128; int32x4_t mmtmpD0,mmtmpD1,mmtmpD0b,mmtmpD1b; @@ -1125,14 +1120,7 @@ void nr_dlsch_channel_compensation(int **rxdataF_ext, symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol; - if ((symbol_mod == 0) || (symbol_mod == (4-frame_parms->Ncp))) { - if (frame_parms->nb_antenna_ports_gNB==1) { // 10 out of 12 so don't reduce size - nb_rb=1+(5*nb_rb/6); - } - else { - pilots=1; - } - } + uint32_t nb_rb_0 = length/12 + ((length%12)?1:0); for (aatx=0; aatxnb_antenna_ports_gNB; aatx++) { if (mod_order == 4) { @@ -1151,7 +1139,7 @@ void nr_dlsch_channel_compensation(int **rxdataF_ext, rxdataF128 = (int16x4_t*)&rxdataF_ext[aarx][symbol*frame_parms->N_RB_DL*12]; rxdataF_comp128 = (int16x4x2_t*)&rxdataF_comp[(aatx<<1)+aarx][symbol*frame_parms->N_RB_DL*12]; - for (rb=0; rb2) { // get channel amplitude if not QPSK mmtmpD0 = vmull_s16(dl_ch128[0], dl_ch128[0]); @@ -1167,23 +1155,20 @@ void nr_dlsch_channel_compensation(int **rxdataF_ext, mmtmpD1 = vmull_s16(dl_ch128[3], dl_ch128[3]); mmtmpD1 = vqshlq_s32(vqaddq_s32(mmtmpD1,vrev64q_s32(mmtmpD1)),output_shift128); mmtmpD3 = vcombine_s16(vmovn_s32(mmtmpD0),vmovn_s32(mmtmpD1)); - if (pilots==0) { - mmtmpD0 = vmull_s16(dl_ch128[4], dl_ch128[4]); - mmtmpD0 = vqshlq_s32(vqaddq_s32(mmtmpD0,vrev64q_s32(mmtmpD0)),output_shift128); - mmtmpD1 = vmull_s16(dl_ch128[5], dl_ch128[5]); - mmtmpD1 = vqshlq_s32(vqaddq_s32(mmtmpD1,vrev64q_s32(mmtmpD1)),output_shift128); - mmtmpD4 = vcombine_s16(vmovn_s32(mmtmpD0),vmovn_s32(mmtmpD1)); - } + + mmtmpD0 = vmull_s16(dl_ch128[4], dl_ch128[4]); + mmtmpD0 = vqshlq_s32(vqaddq_s32(mmtmpD0,vrev64q_s32(mmtmpD0)),output_shift128); + mmtmpD1 = vmull_s16(dl_ch128[5], dl_ch128[5]); + mmtmpD1 = vqshlq_s32(vqaddq_s32(mmtmpD1,vrev64q_s32(mmtmpD1)),output_shift128); + mmtmpD4 = vcombine_s16(vmovn_s32(mmtmpD0),vmovn_s32(mmtmpD1)); dl_ch_mag128b[0] = vqdmulhq_s16(mmtmpD2,QAM_amp128b); dl_ch_mag128b[1] = vqdmulhq_s16(mmtmpD3,QAM_amp128b); dl_ch_mag128[0] = vqdmulhq_s16(mmtmpD2,QAM_amp128); dl_ch_mag128[1] = vqdmulhq_s16(mmtmpD3,QAM_amp128); - if (pilots==0) { - dl_ch_mag128b[2] = vqdmulhq_s16(mmtmpD4,QAM_amp128b); - dl_ch_mag128[2] = vqdmulhq_s16(mmtmpD4,QAM_amp128); - } + dl_ch_mag128b[2] = vqdmulhq_s16(mmtmpD4,QAM_amp128b); + dl_ch_mag128[2] = vqdmulhq_s16(mmtmpD4,QAM_amp128); } mmtmpD0 = vmull_s16(dl_ch128[0], rxdataF128[0]); @@ -1217,36 +1202,29 @@ void nr_dlsch_channel_compensation(int **rxdataF_ext, mmtmpD1 = vqshlq_s32(mmtmpD1,output_shift128); rxdataF_comp128[1] = vzip_s16(vmovn_s32(mmtmpD0),vmovn_s32(mmtmpD1)); - if (pilots==0) { - mmtmpD0 = vmull_s16(dl_ch128[4], rxdataF128[4]); - mmtmpD1 = vmull_s16(dl_ch128[5], rxdataF128[5]); - mmtmpD0 = vcombine_s32(vpadd_s32(vget_low_s32(mmtmpD0),vget_high_s32(mmtmpD0)), - vpadd_s32(vget_low_s32(mmtmpD1),vget_high_s32(mmtmpD1))); - mmtmpD0b = vmull_s16(vrev32_s16(vmul_s16(dl_ch128[4],*(int16x4_t*)conj)), rxdataF128[4]); - mmtmpD1b = vmull_s16(vrev32_s16(vmul_s16(dl_ch128[5],*(int16x4_t*)conj)), rxdataF128[5]); - mmtmpD1 = vcombine_s32(vpadd_s32(vget_low_s32(mmtmpD0b),vget_high_s32(mmtmpD0b)), - vpadd_s32(vget_low_s32(mmtmpD1b),vget_high_s32(mmtmpD1b))); + mmtmpD0 = vmull_s16(dl_ch128[4], rxdataF128[4]); + mmtmpD1 = vmull_s16(dl_ch128[5], rxdataF128[5]); + mmtmpD0 = vcombine_s32(vpadd_s32(vget_low_s32(mmtmpD0),vget_high_s32(mmtmpD0)), + vpadd_s32(vget_low_s32(mmtmpD1),vget_high_s32(mmtmpD1))); + + mmtmpD0b = vmull_s16(vrev32_s16(vmul_s16(dl_ch128[4],*(int16x4_t*)conj)), rxdataF128[4]); + mmtmpD1b = vmull_s16(vrev32_s16(vmul_s16(dl_ch128[5],*(int16x4_t*)conj)), rxdataF128[5]); + mmtmpD1 = vcombine_s32(vpadd_s32(vget_low_s32(mmtmpD0b),vget_high_s32(mmtmpD0b)), + vpadd_s32(vget_low_s32(mmtmpD1b),vget_high_s32(mmtmpD1b))); - mmtmpD0 = vqshlq_s32(mmtmpD0,output_shift128); - mmtmpD1 = vqshlq_s32(mmtmpD1,output_shift128); - rxdataF_comp128[2] = vzip_s16(vmovn_s32(mmtmpD0),vmovn_s32(mmtmpD1)); + mmtmpD0 = vqshlq_s32(mmtmpD0,output_shift128); + mmtmpD1 = vqshlq_s32(mmtmpD1,output_shift128); + rxdataF_comp128[2] = vzip_s16(vmovn_s32(mmtmpD0),vmovn_s32(mmtmpD1)); - dl_ch128+=6; - dl_ch_mag128+=3; - dl_ch_mag128b+=3; - rxdataF128+=6; - rxdataF_comp128+=3; + dl_ch128+=6; + dl_ch_mag128+=3; + dl_ch_mag128b+=3; + rxdataF128+=6; + rxdataF_comp128+=3; - } else { // we have a smaller PDSCH in symbols with pilots so skip last group of 4 REs and increment less - dl_ch128+=4; - dl_ch_mag128+=2; - dl_ch_mag128b+=2; - rxdataF128+=4; - rxdataF_comp128+=2; - } } } } @@ -1256,7 +1234,7 @@ void nr_dlsch_channel_compensation(int **rxdataF_ext, rho128 = (int16x4x2_t*)&rho[aarx][symbol*frame_parms->N_RB_DL*12]; dl_ch128 = (int16x4_t*)&dl_ch_estimates_ext[aarx][symbol*frame_parms->N_RB_DL*12]; dl_ch128_2 = (int16x4_t*)&dl_ch_estimates_ext[2+aarx][symbol*frame_parms->N_RB_DL*12]; - for (rb=0; rb4) ? 4 : x; int16_t y = (len)>>x; //printf("len = %d = %d * 2^(%d)\n",len,y,x); + uint32_t nb_rb_0 = len/12 + ((len%12)?1:0); AssertFatal(y!=0,"Cannot divide by zero: in function %s of file %s\n", __func__, __FILE__); @@ -1604,7 +1579,7 @@ void nr_dlsch_channel_level(int **dl_ch_estimates_ext, dl_ch128=(__m128i *)&dl_ch_estimates_ext[(aatx*frame_parms->nb_antennas_rx)+aarx][symbol*nb_rb*12]; - for (rb=0;rb=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol; - + uint32_t nb_rb_0 = len/12 + ((len%12)?1:0); for (aatx=0; aatxnb_antenna_ports_gNB; aatx++) for (aarx=0; aarxnb_antennas_rx; aarx++) { //clear average level @@ -1638,7 +1613,7 @@ void nr_dlsch_channel_level(int **dl_ch_estimates_ext, dl_ch128=(int16x4_t *)&dl_ch_estimates_ext[(aatx<<1)+aarx][symbol*frame_parms->N_RB_DL*12]; - for (rb=0; rbofdm_symbol_size)))]; for (rb = 0; rb < nb_rb_pdsch; rb++) { - if (k>frame_parms->ofdm_symbol_size) { + if (k>=frame_parms->ofdm_symbol_size) { k = k-frame_parms->ofdm_symbol_size; rxF = &rxdataF[aarx][(k+(symbol*(frame_parms->ofdm_symbol_size)))]; } @@ -2196,7 +2171,7 @@ unsigned short nr_dlsch_extract_rbs_multiple(int **rxdataF, for (aarx=0; aarxnb_antennas_rx; aarx++) { k = frame_parms->first_carrier_offset + NR_NB_SC_PER_RB*start_rb; - if (k>frame_parms->ofdm_symbol_size) + if (k>=frame_parms->ofdm_symbol_size) k = k-frame_parms->ofdm_symbol_size; rxF_ext = &rxdataF_ext[aarx][symbol*(nb_rb_pdsch*12)]; @@ -2265,43 +2240,55 @@ void nr_dlsch_detection_mrc(int **rxdataF_comp, int ***rho, int **dl_ch_mag, int **dl_ch_magb, + int **dl_ch_magr, short n_tx, short n_rx, unsigned char symbol, - unsigned short nb_rb) { + unsigned short nb_rb, + int length) { #if defined(__x86_64__)||defined(__i386__) unsigned char aatx, aarx; int i; - __m128i *rxdataF_comp128_0,*rxdataF_comp128_1,*dl_ch_mag128_0,*dl_ch_mag128_1,*dl_ch_mag128_0b,*dl_ch_mag128_1b; + __m128i *rxdataF_comp128_0,*rxdataF_comp128_1,*dl_ch_mag128_0,*dl_ch_mag128_1,*dl_ch_mag128_0b,*dl_ch_mag128_1b,*dl_ch_mag128_0r,*dl_ch_mag128_1r; + + uint32_t nb_rb_0 = length/12 + ((length%12)?1:0); if (n_rx>1) { for (aatx=0; aatxN_RB_DL*12]; rho128_1 = (__m128i *) &rho[1][symbol*frame_parms->N_RB_DL*12]; - for (i=0; i>2); + //printf("det_%d = %d log2 =%d \n",k,(((int *)&det[0])[k]),log2_approx(((int *)&det[0])[k])); + } + + xy_re_128 = _mm_slli_epi32(xy_re_128,5); + xy_re_128 = _mm_srai_epi32(xy_re_128,log2_approx(sum_det)); + xy_re_128 = _mm_slli_epi32(xy_re_128,5); + + xy_im_128 = _mm_slli_epi32(xy_im_128,5); + xy_im_128 = _mm_srai_epi32(xy_im_128,log2_approx(sum_det)); + xy_im_128 = _mm_slli_epi32(xy_im_128,5); + + tmp_z0 = _mm_unpacklo_epi32(xy_re_128,xy_im_128); + //print_ints("unpack lo:",&tmp_z0[0]); + tmp_z1 = _mm_unpackhi_epi32(xy_re_128,xy_im_128); + //print_ints("unpack hi:",&tmp_z1[0]); + output = _mm_packs_epi32(tmp_z0,tmp_z1); + + _mm_empty(); + _m_empty(); + return(output); +} /* Zero Forcing Rx function: nr_construct_HhH_elements() * * @@ -2549,15 +2589,16 @@ void nr_construct_HhH_elements(int *conjch00_ch00, if (conjch21_ch20 != NULL) after_mf_10_128[0] =_mm_adds_epi16(after_mf_10_128[0],conjch21_ch20_128[0]); if (conjch31_ch30 != NULL) after_mf_10_128[0] =_mm_adds_epi16(after_mf_10_128[0],conjch31_ch30_128[0]); - /*if ((rb==0)&&(symbol==1)) +#ifdef DEBUG_DLSCH_DEMOD + if ((rb<=30)) { printf(" \n construct_HhH_elements \n"); print_shorts("after_mf_00_128:",(int16_t*)&after_mf_00_128[0]); print_shorts("after_mf_01_128:",(int16_t*)&after_mf_01_128[0]); print_shorts("after_mf_10_128:",(int16_t*)&after_mf_10_128[0]); print_shorts("after_mf_11_128:",(int16_t*)&after_mf_11_128[0]); - }*/ - + } +#endif conjch00_ch00_128+=1; conjch10_ch10_128+=1; conjch01_ch01_128+=1; @@ -2594,16 +2635,18 @@ void nr_construct_HhH_elements(int *conjch00_ch00, uint8_t nr_zero_forcing_rx_2layers(int **rxdataF_comp, int **dl_ch_mag, int **dl_ch_magb, + int **dl_ch_magr, int **dl_ch_estimates_ext, unsigned short nb_rb, unsigned char n_rx, unsigned char mod_order, int shift, - unsigned char symbol) + unsigned char symbol, + int length) { int *ch00, *ch01, *ch10, *ch11; int *ch20, *ch30, *ch21, *ch31; - + uint32_t nb_rb_0 = length/12 + ((length%12)?1:0); /* we need at least alignment to 16 bytes, let's put 32 to be sure * (maybe not necessary but doesn't hurt) */ @@ -2671,49 +2714,49 @@ uint8_t nr_zero_forcing_rx_2layers(int **rxdataF_comp, nr_conjch0_mult_ch1(ch00, ch00, conjch00_ch00, - nb_rb, + nb_rb_0, shift); // (1/2^log2_maxh)*conj_H_10xH_10: (1/(64*2))conjH_10*H_10*2^15 nr_conjch0_mult_ch1(ch10, ch10, conjch10_ch10, - nb_rb, + nb_rb_0, shift); // conj_H_00xH_01 nr_conjch0_mult_ch1(ch00, ch01, conjch00_ch01, - nb_rb, + nb_rb_0, shift); // this shift is equal to the channel level log2_maxh // conj_H_10xH_11 nr_conjch0_mult_ch1(ch10, ch11, conjch10_ch11, - nb_rb, + nb_rb_0, shift); // conj_H_01xH_01 nr_conjch0_mult_ch1(ch01, ch01, conjch01_ch01, - nb_rb, + nb_rb_0, shift); // conj_H_11xH_11 nr_conjch0_mult_ch1(ch11, ch11, conjch11_ch11, - nb_rb, + nb_rb_0, shift); // conj_H_01xH_00 nr_conjch0_mult_ch1(ch01, ch00, conjch01_ch00, - nb_rb, + nb_rb_0, shift); // conj_H_11xH_10 nr_conjch0_mult_ch1(ch11, ch10, conjch11_ch10, - nb_rb, + nb_rb_0, shift); } if (n_rx==4){ @@ -2721,52 +2764,52 @@ uint8_t nr_zero_forcing_rx_2layers(int **rxdataF_comp, nr_conjch0_mult_ch1(ch20, ch20, conjch20_ch20, - nb_rb, + nb_rb_0, shift); // (1/2^log2_maxh)*conj_H_30xH_30: (1/(64*2*4))conjH_30*H_30*2^15 nr_conjch0_mult_ch1(ch30, ch30, conjch30_ch30, - nb_rb, + nb_rb_0, shift); // (1/2^log2_maxh)*conj_H_20xH_20: (1/(64*2))conjH_20*H_20*2^15 nr_conjch0_mult_ch1(ch20, ch21, conjch20_ch21, - nb_rb, + nb_rb_0, shift); nr_conjch0_mult_ch1(ch30, ch31, conjch30_ch31, - nb_rb, + nb_rb_0, shift); nr_conjch0_mult_ch1(ch21, ch21, conjch21_ch21, - nb_rb, + nb_rb_0, shift); nr_conjch0_mult_ch1(ch31, ch31, conjch31_ch31, - nb_rb, + nb_rb_0, shift); // (1/2^log2_maxh)*conj_H_20xH_20: (1/(64*2))conjH_20*H_20*2^15 nr_conjch0_mult_ch1(ch21, ch20, conjch21_ch20, - nb_rb, + nb_rb_0, shift); nr_conjch0_mult_ch1(ch31, ch30, conjch31_ch30, - nb_rb, + nb_rb_0, shift); nr_construct_HhH_elements(conjch00_ch00, @@ -2789,7 +2832,7 @@ uint8_t nr_zero_forcing_rx_2layers(int **rxdataF_comp, af_mf_01, af_mf_10, af_mf_11, - nb_rb, + nb_rb_0, symbol); } if (n_rx==2){ @@ -2813,7 +2856,7 @@ uint8_t nr_zero_forcing_rx_2layers(int **rxdataF_comp, af_mf_01, af_mf_10, af_mf_11, - nb_rb, + nb_rb_0, symbol); } //det_HhH = ad -bc @@ -2822,8 +2865,9 @@ uint8_t nr_zero_forcing_rx_2layers(int **rxdataF_comp, af_mf_10,//c af_mf_11,//d determ_fin, - nb_rb, - symbol); + nb_rb_0, + symbol, + shift); /* 2- Compute the channel matrix inversion ********************************** * * |(conj_H_00xH_00+conj_H_10xH_10) (conj_H_00xH_01+conj_H_10xH_11)| @@ -2837,8 +2881,8 @@ uint8_t nr_zero_forcing_rx_2layers(int **rxdataF_comp, * * **************************************************************************/ - __m128i *rxdataF_comp128_0,*rxdataF_comp128_1,*dl_ch_mag128_0,*dl_ch_mag128b_0,*dl_ch_mag128_1,*dl_ch_mag128b_1,*determ_fin_128; - __m128i mmtmpD2,mmtmpD3,mmtmpD0,mmtmpD1,QAM_amp128,QAM_amp128b; + __m128i *rxdataF_comp128_0,*rxdataF_comp128_1,*dl_ch_mag128_0,*dl_ch_mag128b_0,*dl_ch_mag128r_0,*dl_ch_mag128_1,*dl_ch_mag128b_1,*dl_ch_mag128r_1,*determ_fin_128; + __m128i mmtmpD0,mmtmpD1;//mmtmpD2,mmtmpD3, __m128i *after_mf_a_128,*after_mf_b_128, *after_mf_c_128, *after_mf_d_128; determ_fin_128 = (__m128i *)&determ_fin[0]; @@ -2850,79 +2894,56 @@ uint8_t nr_zero_forcing_rx_2layers(int **rxdataF_comp, dl_ch_mag128_1 = (__m128i *)&dl_ch_mag[n_rx][symbol*nb_rb*12]; dl_ch_mag128b_0 = (__m128i *)&dl_ch_magb[0][symbol*nb_rb*12]; dl_ch_mag128b_1 = (__m128i *)&dl_ch_magb[n_rx][symbol*nb_rb*12]; + dl_ch_mag128r_0 = (__m128i *)&dl_ch_magr[0][symbol*nb_rb*12]; + dl_ch_mag128r_1 = (__m128i *)&dl_ch_magr[n_rx][symbol*nb_rb*12]; after_mf_a_128 = (__m128i *)af_mf_00; after_mf_b_128 = (__m128i *)af_mf_01; after_mf_c_128 = (__m128i *)af_mf_10; after_mf_d_128 = (__m128i *)af_mf_11; - QAM_amp128b = _mm_setzero_si128(); - - if (mod_order == 4) { - QAM_amp128 = _mm_set1_epi16(QAM16_n1); // 2/sqrt(10) - QAM_amp128b = _mm_setzero_si128(); - } else if (mod_order == 6) { - QAM_amp128 = _mm_set1_epi16(QAM64_n1); // - QAM_amp128b = _mm_set1_epi16(QAM64_n2); - } - - for (int rb=0; rb<3*nb_rb; rb++) { + for (int rb=0; rb<3*nb_rb_0; rb++) { if (mod_order>2) { - // get channel determ (da -bc) if not QPSK - mmtmpD0 = _mm_packs_epi32(determ_fin_128[0],determ_fin_128[0]);//convert 32 bits to 16 bits - - dl_ch_mag128_0[0] = _mm_unpacklo_epi16(mmtmpD0,mmtmpD0); - dl_ch_mag128b_0[0] = dl_ch_mag128_0[0]; - - dl_ch_mag128_0[0] = _mm_mulhi_epi16(dl_ch_mag128_0[0],QAM_amp128); - dl_ch_mag128_0[0] = _mm_slli_epi16(dl_ch_mag128_0[0],1);//aatx=0 @ aarx =0 - dl_ch_mag128_1[0] = dl_ch_mag128_0[0];//aatx=1 @ aarx =0 - - dl_ch_mag128b_0[0] = _mm_mulhi_epi16(dl_ch_mag128b_0[0],QAM_amp128b); - dl_ch_mag128b_0[0] = _mm_slli_epi16(dl_ch_mag128b_0[0],1);//aatx=0 @ aarx = - dl_ch_mag128b_1[0] = dl_ch_mag128b_0[0];//aatx=1 @ aarx =0 - - if ((rb==0)&&(symbol==1)) { - printf("\n Signal mag after ZF \n"); - print_shorts("mag layer 1:",(int16_t*)&dl_ch_mag128_0[0]); - print_shorts("mag layer 2:",(int16_t*)&dl_ch_mag128_1[0]); - print_shorts("magb layer 1:",(int16_t*)&dl_ch_mag128b_0[0]); - print_shorts("magb layer 2:",(int16_t*)&dl_ch_mag128b_1[0]); - } + //The update value of dl_ch_mag128, dl_ch_mag128b, and dl_ch_mag128r shall go here + //printf("\n Signal mag after ZF \n"); + //print_shorts("mag layer 1:",(int16_t*)&dl_ch_mag128_0[0]); + //print_shorts("mag layer 2:",(int16_t*)&dl_ch_mag128_1[0]); + //print_shorts("magb layer 1:",(int16_t*)&dl_ch_mag128b_0[0]); + //print_shorts("magb layer 2:",(int16_t*)&dl_ch_mag128b_1[0]); + //print_shorts("magr layer 1:",(int16_t*)&dl_ch_mag128r_0[0]); + //print_shorts("magr layer 2:",(int16_t*)&dl_ch_mag128r_1[0]); } // multiply by channel Inv //rxdataF_zf128_0 = rxdataF_comp128_0*d - b*rxdataF_comp128_1 //rxdataF_zf128_1 = rxdataF_comp128_1*a - c*rxdataF_comp128_0 - mmtmpD2 = nr_inv_comp_muli(rxdataF_comp128_0[0],//x - after_mf_d_128[0]);//y - mmtmpD3 = nr_inv_comp_muli(rxdataF_comp128_1[0],//x - after_mf_b_128[0]);//y - //mmtmpD2[0] - mmtmpD3[0] - //rxdataF_zf128_0 - mmtmpD0 = _mm_sub_epi16(mmtmpD2, mmtmpD3); + //printf("layer_1 \n"); + mmtmpD0 = nr_comp_muli_sum(rxdataF_comp128_0[0], + after_mf_d_128[0], + rxdataF_comp128_1[0], + after_mf_b_128[0], + determ_fin_128[0]); - mmtmpD2 = nr_inv_comp_muli(rxdataF_comp128_1[0],//x - after_mf_a_128[0]);//y - mmtmpD3 = nr_inv_comp_muli(rxdataF_comp128_0[0],//x - after_mf_c_128[0]);//y - //mmtmpD2[0] - mmtmpD3[0] - //rxdataF_zf128_1 - mmtmpD1 = _mm_sub_epi16(mmtmpD2, mmtmpD3); + //printf("layer_2 \n"); + mmtmpD1 = nr_comp_muli_sum(rxdataF_comp128_1[0], + after_mf_a_128[0], + rxdataF_comp128_0[0], + after_mf_c_128[0], + determ_fin_128[0]); rxdataF_comp128_0[0] = mmtmpD0; rxdataF_comp128_1[0] = mmtmpD1; - - /*if ((rb==0)&&(symbol==1)) { - printf("\n Rx signal after ZF \n"); - print_shorts("Rx layer 1:",(int16_t*)&rxdataF_comp128_0[0]); - print_shorts("Rx layer 2:",(int16_t*)&rxdataF_comp128_1[0]); - }*/ - +#ifdef DEBUG_DLSCH_DEMOD + printf("\n Rx signal after ZF l%d rb%d\n",symbol,rb); + print_shorts(" Rx layer 1:",(int16_t*)&rxdataF_comp128_0[0]); + print_shorts(" Rx layer 2:",(int16_t*)&rxdataF_comp128_1[0]); +#endif determ_fin_128 += 1; dl_ch_mag128_0 += 1; dl_ch_mag128b_0 += 1; + dl_ch_mag128r_0 += 1; dl_ch_mag128_1 += 1; dl_ch_mag128b_1 += 1; + dl_ch_mag128r_1 += 1; rxdataF_comp128_0 += 1; rxdataF_comp128_1 += 1; after_mf_a_128 += 1; diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h index 6b76645fef..eb56c76366 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h @@ -804,7 +804,7 @@ void nr_dlsch_channel_compensation(int32_t **rxdataF_ext, NR_DL_FRAME_PARMS *frame_parms, uint8_t nb_aatx, uint8_t symbol, - uint8_t start_symbol, + int length, uint8_t first_symbol_flag, uint8_t mod_order, uint16_t nb_rb, @@ -888,13 +888,15 @@ void nr_dlsch_channel_level_median(int **dl_ch_estimates_ext, int start_point); void nr_dlsch_detection_mrc(int **rxdataF_comp, - int ***rho, - int **dl_ch_mag, - int **dl_ch_magb, - short n_tx, - short n_rx, - unsigned char symbol, - unsigned short nb_rb); + int ***rho, + int **dl_ch_mag, + int **dl_ch_magb, + int **dl_ch_magr, + short n_tx, + short n_rx, + unsigned char symbol, + unsigned short nb_rb, + int length); void nr_dlsch_detection_mrc_core(int **rxdataF_comp, int **rxdataF_comp_i, From a7d4ecb343d398e3ec8ff571cd4dcc030395cb29 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Thu, 22 Apr 2021 20:10:43 +0100 Subject: [PATCH 199/579] Fix initialization of CFRA procedure at UE --- openair1/SCHED_NR_UE/pucch_uci_ue_nr.c | 5 ----- openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c | 3 +-- openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c | 6 ------ 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c index fd3d08772e..befbd58736 100644 --- a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c +++ b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c @@ -424,11 +424,6 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_ /* update current context */ - if (mac->cg && - mac->cg->spCellConfig && - mac->cg->spCellConfig->spCellConfigDedicated && - mac->cg->spCellConfig->spCellConfigDedicated->csi_MeasConfig) - AssertFatal(1==0,"0 > %d.%d csi_MeasConfig is not null\n",frame_tx,nr_slot_tx); int subframe_number = proc->nr_slot_rx / ue->frame_parms.slots_per_subframe; nb_pucch_format_4_in_subframes[subframe_number] = 0; /* reset pucch format 4 counter at current rx position */ diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c index d2828655b3..1c02badd4a 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c @@ -518,8 +518,7 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources, // Delay init RA procedure to allow the convergence of the IIR filter on PRACH noise measurements at gNB side if (!prach_resources->init_msg1) { - if (/*(((MAX_FRAME_NUMBER + frame - prach_resources->sync_frame) % MAX_FRAME_NUMBER) > 150) &&*/ - mac->common_configuration_complete > 0){ + if ( (mac->common_configuration_complete > 0) || (get_softmodem_params()->do_ra==1&&((MAX_FRAME_NUMBER+frame-prach_resources->sync_frame)%MAX_FRAME_NUMBER)>150) ){ prach_resources->init_msg1 = 1; } else { LOG_D(NR_MAC,"PRACH Condition not met: frame %d, prach_resources->sync_frame %d\n",frame,prach_resources->sync_frame); diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c index 650f8c9717..2d91b03002 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c @@ -822,12 +822,6 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in slot_t rx_slot = dl_info->slot; NR_UE_MAC_INST_t *mac = get_mac_inst(mod_id); - if (mac->cg && - mac->cg->spCellConfig && - mac->cg->spCellConfig->spCellConfigDedicated && - mac->cg->spCellConfig->spCellConfigDedicated->csi_MeasConfig) - AssertFatal(1==0,"1 > %d.%d csi_MeasConfig is not null\n",rx_frame,rx_slot); - fapi_nr_dl_config_request_t *dl_config = &mac->dl_config_request; nr_scheduled_response_t scheduled_response; nr_dcireq_t dcireq; From 5934e8e4ee9886c9950854528a5be43cc661fed0 Mon Sep 17 00:00:00 2001 From: Raghavendra Dinavahi Date: Tue, 13 Apr 2021 14:50:04 +0200 Subject: [PATCH 200/579] Changes to Downlink DMRS MASK calculation Procedure fill_dmrs_mask is modified. - PDSCH Mapping Type B is supported - Modified according to sections 5.1.6.2 of Spec 38.214 - Single and double symbol DMRS are handled in Type A and Type B Mapping type according to the time domain allocation from DCI should be used to get the values of DMRS config For sending sib1 - DCI FORMAT 1_0 will be used with SI_RNTI, UE should perform these actions according to sections 5.1.6.2 of Spec 38.214 Additional DMRS set to pos2 in case of msg2 reception, msg3 transmission. Mapping type B is added to RRC reconfig. - nr_dlsim updated to test typeA and typeB. Verified the changes. - RFSIM Validation of PDSCH Mapping TypeB by changing timedomainallocation in configuration files. --- cmake_targets/1504_phytest_001.log | 0 openair1/SIMULATION/NR_PHY/dlsim.c | 53 +++- openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c | 201 +++++++----- openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h | 4 +- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 36 ++- openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c | 5 + openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 21 +- .../LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c | 45 +-- .../LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c | 12 +- .../LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c | 6 +- .../CONF/UE_0704_106_phytest_001.log | 0 .../gnb.band78.tm1.106PRB.usrpn300_typeB.conf | 291 ++++++++++++++++++ 12 files changed, 554 insertions(+), 120 deletions(-) create mode 100644 cmake_targets/1504_phytest_001.log create mode 100644 targets/PROJECTS/GENERIC-LTE-EPC/CONF/UE_0704_106_phytest_001.log create mode 100644 targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300_typeB.conf diff --git a/cmake_targets/1504_phytest_001.log b/cmake_targets/1504_phytest_001.log new file mode 100644 index 0000000000..e69de29bb2 diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index 9eff4255f3..ec65e57a3d 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -1364,15 +1364,62 @@ void update_dmrs_config(NR_CellGroupConfig_t *scg,PHY_VARS_NR_UE *ue, int8_t* dm } else if (dmrs_arg[0] == 1) { mapping_type = typeB; + } else { + AssertFatal(1==0,"Incorrect Mappingtype, valid options 0-typeA, 1-typeB\n"); } - /* Additional DMRS positions 0 ,1 and 2 */ - if(dmrs_arg[1] >= 0 && dmrs_arg[1] <3 ) { + + /* Additional DMRS positions 0 ,1 ,2 and 3 */ + if(dmrs_arg[1] >= 0 && dmrs_arg[1] <4 ) { add_pos = dmrs_arg[1]; + } else { + AssertFatal(1==0,"Incorrect Additional Position, valid options 0-pos1, 1-pos1, 2-pos2, 3-pos3\n"); } if(scg != NULL) { NR_BWP_Downlink_t *bwp = scg->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[0]; - *bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition = add_pos; + + AssertFatal((bwp->bwp_Dedicated->pdsch_Config != NULL && bwp->bwp_Dedicated->pdsch_Config->choice.setup != NULL), "Base RRC reconfig structures are not allocated.\n"); + + if (bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA == NULL) { + bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA = calloc(1,sizeof(*bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA)); + bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->present= NR_SetupRelease_DMRS_DownlinkConfig_PR_setup; + bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup = calloc(1,sizeof(*bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup)); + bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type=NULL;//calloc(1,sizeof(*bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type)); + bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->maxLength=NULL; + bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->scramblingID0=NULL; + bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->scramblingID1=NULL; + bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->phaseTrackingRS=NULL; + bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition = NULL; + printf("DLSIM: Allocated Mapping TypeA in RRC reconfig message\n"); + } else if (bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeB == NULL) { + bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeB = calloc(1,sizeof(*bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeB)); + bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeB->present= NR_SetupRelease_DMRS_DownlinkConfig_PR_setup; + bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeB->choice.setup = calloc(1,sizeof(*bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeB->choice.setup)); + bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeB->choice.setup->dmrs_Type=NULL;//calloc(1,sizeof(*bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type)); + bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeB->choice.setup->maxLength=NULL; + bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeB->choice.setup->scramblingID0=NULL; + bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeB->choice.setup->scramblingID1=NULL; + bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeB->choice.setup->phaseTrackingRS=NULL; + bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeB->choice.setup->dmrs_AdditionalPosition = NULL; + printf("DLSIM: Allocated Mapping TypeB in RRC reconfig message\n"); + } + + struct NR_SetupRelease_DMRS_DownlinkConfig *dmrs_MappingtypeA = bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA; + struct NR_SetupRelease_DMRS_DownlinkConfig *dmrs_MappingtypeB = bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeB; + + + NR_DMRS_DownlinkConfig_t *dmrs_config = (mapping_type == typeA) ? dmrs_MappingtypeA->choice.setup : dmrs_MappingtypeB->choice.setup; + + if (add_pos != 2) { // pos0,pos1,pos3 + if (dmrs_config->dmrs_AdditionalPosition == NULL) { + dmrs_config->dmrs_AdditionalPosition = calloc(1,sizeof(*dmrs_MappingtypeA->choice.setup->dmrs_AdditionalPosition)); + } + *dmrs_config->dmrs_AdditionalPosition = add_pos; + } else { // if NULL, Value pos2 + free(dmrs_config->dmrs_AdditionalPosition); + dmrs_config->dmrs_AdditionalPosition = NULL; + } + for (int i=0;ibwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.count;i++) { bwp->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[i]->mappingType = mapping_type; } diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c index 7140279a03..69415cf0f5 100644 --- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c +++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c @@ -1729,6 +1729,47 @@ uint8_t compute_nr_root_seq(NR_RACH_ConfigCommon_t *rach_config, } } +// TS 38.211 Table 7.4.1.1.2-3: PDSCH DMRS positions l' within a slot for single-symbol DMRS and intra-slot frequency hopping disabled. +// The first 4 colomns are PDSCH mapping type A and the last 4 colomns are PDSCH mapping type B. +// When l' = l0, it is represented by 1 +// E.g. when symbol duration is 12 in colomn 7, value 1057 ('10000100001') which means l' = l0, 5, 10. + +int32_t table_7_4_1_1_2_3_pdsch_dmrs_positions_l [13][8] = { // Duration in symbols +{-1, -1, -1, -1, 1, 1, 1, 1}, //2 // (DMRS l' position) +{0, 0, 0, 0, 1, 1, 1, 1}, //3 // (DMRS l' position) +{0, 0, 0, 0, 1, 1, 1, 1}, //4 // (DMRS l' position) +{0, 0, 0, 0, 1, 17, 17, 17}, //5 // (DMRS l' position) +{0, 0, 0, 0, 1, 17, 17, 17}, //6 // (DMRS l' position) +{0, 0, 0, 0, 1, 17, 17, 17}, //7 // (DMRS l' position) +{0, 128, 128, 128, 1, 65, 73, 73}, //8 // (DMRS l' position) +{0, 128, 128, 128, 1, 129, 145, 145}, //9 // (DMRS l' position) +{0, 512, 576, 576, 1, 129, 145, 145}, //10 // (DMRS l' position) +{0, 512, 576, 576, 1, 257, 273, 585}, //11 // (DMRS l' position) +{0, 512, 576, 2336, 1, 513, 545, 585}, //12 // (DMRS l' position) +{0, 2048, 2176, 2336, 1, 513, 545, 585}, //13 // (DMRS l' position) +{0, 2048, 2176, 2336, -1, -1, -1, -1}, //14 // (DMRS l' position) +}; + + +// TS 38.211 Table 7.4.1.1.2-4: PDSCH DMRS positions l' within a slot for double-symbol DMRS and intra-slot frequency hopping disabled. +// The first 4 colomns are PDSCH mapping type A and the last 4 colomns are PDSCH mapping type B. +// When l' = l0, it is represented by 1 + +int32_t table_7_4_1_1_2_4_pdsch_dmrs_positions_l [12][8] = { // Duration in symbols +{-1, -1, -1, -1, -1, -1, -1, -1}, //<4 // (DMRS l' position) +{0, 0, -1, -1, -1, -1, -1, -1}, //4 // (DMRS l' position) +{0, 0, -1, -1, 3, 3, -1, -1}, //5 // (DMRS l' position) +{0, 0, -1, -1, 3, 3, -1, -1}, //6 // (DMRS l' position) +{0, 0, -1, -1, 3, 3, -1, -1}, //7 // (DMRS l' position) +{0, 0, -1, -1, 3, 99, -1, -1}, //8 // (DMRS l' position) +{0, 0, -1, -1, 3, 99, -1, -1}, //9 // (DMRS l' position) +{0, 768, -1, -1, 3, 387, -1, -1}, //10 // (DMRS l' position) +{0, 768, -1, -1, 3, 387, -1, -1}, //11 // (DMRS l' position) +{0, 768, -1, -1, 3, 771, -1, -1}, //12 // (DMRS l' position) +{0, 3072, -1, -1, 3, 771, -1, -1}, //13 // (DMRS l' position) +{0, 3072, -1, -1, -1, -1, -1, -1}, //14 // (DMRS l' position) +}; + // TS 38.211 Table 6.4.1.1.3-3: PUSCH DMRS positions l' within a slot for single-symbol DMRS and intra-slot frequency hopping disabled. // The first 4 colomns are PUSCH mapping type A and the last 4 colomns are PUSCH mapping type B. // When l' = l0, it is represented by 1 @@ -2312,8 +2353,8 @@ int get_num_dmrs(uint16_t dmrs_mask ) { return(num_dmrs); } /* returns the total DMRS symbols in a slot*/ -uint8_t get_num_dmrs_symbols(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,int NrOfSymbols,int startSymbol){ - return get_num_dmrs(fill_dmrs_mask(pdsch_Config,dmrs_TypeA_Position,NrOfSymbols,startSymbol)); +uint8_t get_num_dmrs_symbols(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,int NrOfSymbols, int startSymbol, int mappingtype){ + return get_num_dmrs(fill_dmrs_mask(pdsch_Config,dmrs_TypeA_Position,NrOfSymbols, startSymbol, mappingtype)); } // Table 5.1.2.2.1-1 38.214 @@ -2952,92 +2993,90 @@ int is_nr_UL_slot(NR_ServingCellConfigCommon_t *scc, slot_t slot, lte_frame_type else return(slot_in_period >= slots1+scc->tdd_UL_DL_ConfigurationCommon->pattern2->nrofDownlinkSlots ? 1 : 0); } -int16_t fill_dmrs_mask(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,int NrOfSymbols,int startSymbol) { +int16_t fill_dmrs_mask(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,int NrOfSymbols, int startSymbol, int mappingtype_fromDCI) { + + int l0;int dmrs_AdditionalPosition = 0;int maxLength = 0; + NR_DMRS_DownlinkConfig_t *dmrs_config = NULL; + + LOG_D(MAC, "NrofSymbols:%d, startSymbol:%d, mappingtype:%d, dmrs_TypeA_Position:%d\n", NrOfSymbols, startSymbol, mappingtype_fromDCI, dmrs_TypeA_Position); - int l0; - int ld = NrOfSymbols+startSymbol; if (dmrs_TypeA_Position == NR_ServingCellConfigCommon__dmrs_TypeA_Position_pos2) l0=2; else if (dmrs_TypeA_Position == NR_ServingCellConfigCommon__dmrs_TypeA_Position_pos3) l0=3; else AssertFatal(1==0,"Illegal dmrs_TypeA_Position %d\n",(int)dmrs_TypeA_Position); - if (pdsch_Config == NULL) { // Initial BWP - if (ld <= 7) return(1<dmrs_DownlinkForPDSCH_MappingTypeA && pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA->present == NR_SetupRelease_DMRS_DownlinkConfig_PR_setup) + dmrs_config = (NR_DMRS_DownlinkConfig_t *)pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup; + } else if (mappingtype_fromDCI == typeB) { + if (pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeB && pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeB->present == NR_SetupRelease_DMRS_DownlinkConfig_PR_setup) + dmrs_config = (NR_DMRS_DownlinkConfig_t *)pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeB->choice.setup; + } else { + AssertFatal(1==0,"Incorrect Mappingtype\n"); + } + + AssertFatal(dmrs_config != NULL," DMRS configs not present in PDSCH DMRS Downlink config\n"); + + // default values of maxlength = len2, additionalposition is pos2 + if (dmrs_config->maxLength != NULL) maxLength = 2; + if (dmrs_config->dmrs_AdditionalPosition != NULL) dmrs_AdditionalPosition = *dmrs_config->dmrs_AdditionalPosition; + } + + uint8_t ld, row, column; + int32_t l_prime = -1; + + // columns 0-3 for TypeA, 4-7 for TypeB + column = (mappingtype_fromDCI == typeA) ? dmrs_AdditionalPosition : (dmrs_AdditionalPosition + 4); + + // Section 7.4.1.1.2 in Spec 38.211 + // For PDSCH Mapping TypeA, ld is duration between first OFDM of the slot and last OFDM symbol of the scheduled PDSCH resources + // For TypeB, ld is the duration of the scheduled PDSCH resources + ld = (mappingtype_fromDCI == typeA) ? (NrOfSymbols + startSymbol) : NrOfSymbols; + + // Section 7.4.1.1.2 in Spec 38.211 + //For PDSCH Mapping typeB, if PDSCH duration ld <=4, only single symbol DMRS is supported + if (mappingtype_fromDCI == typeB && ld <= 4) + maxLength = 1; + + AssertFatal(ld > 2 && ld < 15,"Illegal NrOfSymbols according to Table 5.1.2.1-1 Spec 38.214 %d\n",ld); + AssertFatal((NrOfSymbols + startSymbol) < 15,"Illegal S+L according to Table 5.1.2.1-1 Spec 38.214 S:%d L:%d\n",startSymbol, NrOfSymbols); + + if (mappingtype_fromDCI == typeA) { + + // Section 7.4.1.1.2 in Spec 38.211 + AssertFatal((l0 == 2) || (l0 == 3 && dmrs_AdditionalPosition != 3),"Wrong config, If dmrs_TypeA_Position POS3, ADD POS cannot be POS3 \n"); + + // Table 5.1.2.1-1 in Spec 38.214 + AssertFatal(startSymbol <= l0, "Wrong config, Start symbol %d cannot be later than dmrs_TypeA_Position %d \n", startSymbol, l0); + + // Section 7.4.1.1.2 in Spec 38.211 + AssertFatal(l0 == 2 || (l0 == 3 && (ld != 3 || ld != 4)), "ld 3 or 4 symbols only possible with dmrs_TypeA_Position POS2 \n"); + + } + + if (maxLength == 1) { + row = ld - 2; + l_prime = table_7_4_1_1_2_3_pdsch_dmrs_positions_l[row][column]; + l0 = 1 << l0; } else { - if (pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA && - pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA->present == NR_SetupRelease_DMRS_DownlinkConfig_PR_setup) { - // Relative to start of slot - NR_DMRS_DownlinkConfig_t *dmrs_config = (NR_DMRS_DownlinkConfig_t *)pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup; - AssertFatal(ld>1 && ld < 15,"Illegal l_d %d\n",ld); - int pos2=0; - if (dmrs_config->maxLength == NULL) { - // this is Table 7.4.1.1.2-3: PDSCH DM-RS positions l for single-symbol DM-RS - if (dmrs_config->dmrs_AdditionalPosition == NULL) pos2=1; - else if (dmrs_config->dmrs_AdditionalPosition && *dmrs_config->dmrs_AdditionalPosition == NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos0 ) - return(1<dmrs_AdditionalPosition && *dmrs_config->dmrs_AdditionalPosition==NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos1) - return(1<dmrs_AdditionalPosition && *dmrs_config->dmrs_AdditionalPosition==NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos1) - return(1<dmrs_AdditionalPosition && *dmrs_config->dmrs_AdditionalPosition==NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos3) - return(1<dmrs_AdditionalPosition && *dmrs_config->dmrs_AdditionalPosition==NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos1) - return(1<dmrs_AdditionalPosition && *dmrs_config->dmrs_AdditionalPosition==NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos3) - return(1<3,"Illegal l_d %d for len2 DMRS\n",ld); - if (ld < 10) return(1<dmrs_AdditionalPosition==NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos0) return(1<dmrs_AdditionalPosition!=NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos0) return(1<dmrs_AdditionalPosition!=NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos0) return(1<dmrs_AdditionalPosition!=NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos1) return(1<dmrs_AdditionalPosition==NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos0) return(1<dmrs_AdditionalPosition==NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos1) return(1<dmrs_DownlinkForPDSCH_MappingTypeB && - pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA->present == NR_SetupRelease_DMRS_DownlinkConfig_PR_setup) { - // Relative to start of PDSCH resource - AssertFatal(1==0,"TypeB DMRS not supported yet\n"); - } + row = (ld < 4) ? 0 : (ld - 3); + l_prime = table_7_4_1_1_2_4_pdsch_dmrs_positions_l[row][column]; + l0 = 1<=0,"ERROR in configuration.Check Time Domain allocation of this Grant. l_prime < 1. row:%d, column:%d\n", row, column); + + l_prime = (mappingtype_fromDCI == typeA) ? (l_prime | l0) : (l_prime << startSymbol); + LOG_D(MAC, " PDSCH DMRS MASK in HEX:%x\n", l_prime); + + return l_prime; } uint8_t get_pusch_mcs_table(long *mcs_Table, diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h index f766f7bcc7..cf8c838eac 100644 --- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h +++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h @@ -47,7 +47,7 @@ uint64_t from_nrarfcn(int nr_bandP, uint8_t scs_index, uint32_t dl_nrarfcn); uint32_t to_nrarfcn(int nr_bandP, uint64_t dl_CarrierFreq, uint8_t scs_index, uint32_t bw); -int16_t fill_dmrs_mask(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,int NrOfSymbols,int startSymbol); +int16_t fill_dmrs_mask(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,int NrOfSymbols,int startSymbol,int mappingtype_fromDCI); int is_nr_DL_slot(NR_ServingCellConfigCommon_t *scc,slot_t slotP); @@ -153,7 +153,7 @@ bool set_ul_ptrs_values(NR_PTRS_UplinkConfig_t *ul_ptrs_config, uint8_t *reOffset, uint8_t *maxNumPorts, uint8_t *ulPower, uint8_t NrOfSymbols); -uint8_t get_num_dmrs_symbols(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,int NrOfSymbols,int startSymbol); +uint8_t get_num_dmrs_symbols(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,int NrOfSymbols,int startSymbol,int mappingtype); /* \brief Set the transform precoding according to 6.1.3 of 3GPP TS 38.214 version 16.3.0 Release 16 @param *pusch_config, pointer to pusch config diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 78328e3888..838ab3c3f3 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -640,12 +640,26 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr LOG_W(MAC, "[%d.%d] Invalid time_domain_assignment. Possibly due to false DCI. Ignoring DCI!\n", frame, slot); return -1; } + + NR_PDSCH_TimeDomainResourceAllocationList_t *pdsch_TimeDomainAllocationList = NULL; + if (mac->DLbwp[0]->bwp_Dedicated->pdsch_Config->choice.setup->pdsch_TimeDomainAllocationList) + pdsch_TimeDomainAllocationList = mac->DLbwp[0]->bwp_Dedicated->pdsch_Config->choice.setup->pdsch_TimeDomainAllocationList->choice.setup; + else if (mac->DLbwp[0]->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList) + pdsch_TimeDomainAllocationList = mac->DLbwp[0]->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList; + + int mappingtype = pdsch_TimeDomainAllocationList->list.array[dci->time_domain_assignment.val]->mappingType; + /* dmrs symbol positions*/ - dlsch_config_pdu_1_0->dlDmrsSymbPos = fill_dmrs_mask(pdsch_config, + dlsch_config_pdu_1_0->dlDmrsSymbPos = fill_dmrs_mask(NULL, mac->scc->dmrs_TypeA_Position, dlsch_config_pdu_1_0->number_symbols, - dlsch_config_pdu_1_0->start_symbol); - dlsch_config_pdu_1_0->dmrsConfigType = (pdsch_config) ? (mac->DLbwp[0]->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type == NULL ? 0 : 1) : 0; + dlsch_config_pdu_1_0->start_symbol, + mappingtype); + + // For DCI 1_0, dmrs type is type1. referred to section 5.1.6.2 of 3GPP TS 38.214 + dlsch_config_pdu_1_0->dmrsConfigType = 0; + LOG_D(MAC, "DCI 1_0 start_sym:%d NR Symb:%d, DMRS_symb_pos:%x\n", dlsch_config_pdu_1_0->start_symbol, dlsch_config_pdu_1_0->number_symbols, dlsch_config_pdu_1_0->dlDmrsSymbPos); + /* number of DM-RS CDM groups without data according to subclause 5.1.6.2 of 3GPP TS 38.214 version 15.9.0 Release 15 */ if (dlsch_config_pdu_1_0->number_symbols == 2) dlsch_config_pdu_1_0->n_dmrs_cdm_groups = 1; @@ -783,10 +797,6 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr dl_config->dl_config_list[dl_config->number_pdus].pdu_type = FAPI_NR_DL_CONFIG_TYPE_DLSCH; dl_config->dl_config_list[dl_config->number_pdus].dlsch_config_pdu.rnti = rnti; - // FIXME: fix number of additional dmrs - if(pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition == NULL) - pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition=calloc(1,sizeof(*pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition)); - fapi_nr_dl_config_dlsch_pdu_rel15_t *dlsch_config_pdu_1_1 = &dl_config->dl_config_list[dl_config->number_pdus].dlsch_config_pdu.dlsch_config_rel15; dlsch_config_pdu_1_1->BWPSize = NRRIV2BW(mac->DLbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); @@ -807,11 +817,21 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr LOG_W(MAC, "[%d.%d] Invalid time_domain_assignment. Possibly due to false DCI. Ignoring DCI!\n", frame, slot); return -1; } + + NR_PDSCH_TimeDomainResourceAllocationList_t *pdsch_TimeDomainAllocationList = NULL; + if (mac->DLbwp[0]->bwp_Dedicated->pdsch_Config->choice.setup->pdsch_TimeDomainAllocationList) + pdsch_TimeDomainAllocationList = mac->DLbwp[0]->bwp_Dedicated->pdsch_Config->choice.setup->pdsch_TimeDomainAllocationList->choice.setup; + else if (mac->DLbwp[0]->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList) + pdsch_TimeDomainAllocationList = mac->DLbwp[0]->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList; + + int mappingtype = pdsch_TimeDomainAllocationList->list.array[dci->time_domain_assignment.val]->mappingType; + /* dmrs symbol positions*/ dlsch_config_pdu_1_1->dlDmrsSymbPos = fill_dmrs_mask(pdsch_config, mac->scc->dmrs_TypeA_Position, dlsch_config_pdu_1_1->number_symbols, - dlsch_config_pdu_1_1->start_symbol); + dlsch_config_pdu_1_1->start_symbol, + mappingtype); dlsch_config_pdu_1_1->dmrsConfigType = mac->DLbwp[dl_bwp_id-1]->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type == NULL ? 0 : 1; /* TODO: fix number of DM-RS CDM groups without data according to subclause 5.1.6.2 of 3GPP TS 38.214, using tables 7.3.1.2.2-1, 7.3.1.2.2-2, 7.3.1.2.2-3, 7.3.1.2.2-4 of 3GPP TS 38.212 */ diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c index 1295b3049b..983802dd4a 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c @@ -490,6 +490,8 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac, NR_BWP_UplinkDedicated_t *ibwp = mac->scg->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP; NR_PUSCH_Config_t *pusch_Config = ibwp->pusch_Config->choice.setup; int startSymbolAndLength = ubwp->bwp_Common->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[rar_grant->Msg3_t_alloc]->startSymbolAndLength; + int mappingtype = ubwp->bwp_Common->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[rar_grant->Msg3_t_alloc]->mappingType; + // active BWP start int abwp_start = NRRIV2PRBOFFSET(ubwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); @@ -527,6 +529,9 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac, pusch_config_pdu->start_symbol_index = StartSymbolIndex; pusch_config_pdu->nr_of_symbols = NrOfSymbols; + l_prime_mask = get_l_prime(NrOfSymbols, mappingtype, pusch_dmrs_pos2, pusch_len1); + LOG_D(MAC, "MSG3 start_sym:%d NR Symb:%d mappingtype:%d , DMRS_MASK:%x\n", pusch_config_pdu->start_symbol_index, pusch_config_pdu->nr_of_symbols, mappingtype, l_prime_mask); + #ifdef DEBUG_MSG3 LOG_D(MAC, "In %s BWP assignment (BWP (start %d, size %d) \n", __FUNCTION__, pusch_config_pdu->bwp_start, pusch_config_pdu->bwp_size); #endif diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index e051bb5f9d..0df8d61cee 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -795,6 +795,7 @@ void nr_add_msg3(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t int startSymbolAndLength = ubwp->bwp_Common->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[ra->Msg3_tda_id]->startSymbolAndLength; int start_symbol_index,nr_of_symbols; SLIV2SL(startSymbolAndLength, &start_symbol_index, &nr_of_symbols); + int mappingtype = ubwp->bwp_Common->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[ra->Msg3_tda_id]->mappingType; pusch_pdu->pdu_bit_map = PUSCH_PDU_BITMAP_PUSCH_DATA; pusch_pdu->rnti = ra->rnti; @@ -820,7 +821,11 @@ void nr_add_msg3(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t pusch_pdu->transform_precoding = 0; pusch_pdu->data_scrambling_id = *scc->physCellId; pusch_pdu->nrOfLayers = 1; - pusch_pdu->ul_dmrs_symb_pos = 1<ul_dmrs_symb_pos = l_prime_mask << start_symbol_index; + LOG_D(MAC, "MSG3 start_sym:%d NR Symb:%d mappingtype:%d , DMRS_MASK:%x, ul_dmrs_symb_pos:%x\n", start_symbol_index, nr_of_symbols, mappingtype, l_prime_mask, pusch_pdu->ul_dmrs_symb_pos); + pusch_pdu->dmrs_config_type = 0; pusch_pdu->ul_dmrs_scrambling_id = *scc->physCellId; //If provided and the PUSCH is not a msg3 PUSCH, otherwise, L2 should set this to physical cell id. pusch_pdu->scid = 0; //DMRS sequence initialization [TS38.211, sec 6.4.1.1.1]. Should match what is sent in DCI 0_1, otherwise set to 0. @@ -935,6 +940,10 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra SLIV2SL(startSymbolAndLength, &startSymbolIndex, &nrOfSymbols); AssertFatal(startSymbolIndex >= 0, "StartSymbolIndex is negative\n"); + int mappingtype = ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated-> + downlinkBWP_ToAddModList->list.array[ra->bwp_id-1]->bwp_Common->pdsch_ConfigCommon->choice.setup-> + pdsch_TimeDomainAllocationList->list.array[time_domain_assignment]->mappingType; + uint8_t numDmrsCdmGrpsNoData = 2; if (nrOfSymbols == 2) { numDmrsCdmGrpsNoData = 1; @@ -1020,7 +1029,8 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra pdsch_pdu_rel15->dlDmrsSymbPos = fill_dmrs_mask(NULL, nr_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position, nrOfSymbols, - startSymbolIndex); + startSymbolIndex, + mappingtype); int x_Overhead = 0; uint8_t tb_scaling = 0; @@ -1183,10 +1193,15 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra SLIV2SL(startSymbolAndLength, &startSymbolIndex, &nrOfSymbols); AssertFatal(startSymbolIndex >= 0, "StartSymbolIndex is negative\n"); + int mappingtype = ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated-> + downlinkBWP_ToAddModList->list.array[ra->bwp_id-1]->bwp_Common->pdsch_ConfigCommon->choice.setup-> + pdsch_TimeDomainAllocationList->list.array[time_domain_assignment]->mappingType; + uint16_t dlDmrsSymbPos = fill_dmrs_mask(NULL, nr_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position, nrOfSymbols, - startSymbolIndex); + startSymbolIndex, + mappingtype); uint16_t N_DMRS_SLOT = get_num_dmrs(dlDmrsSymbPos); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c index 3483182088..d64fc88122 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c @@ -353,6 +353,7 @@ void schedule_control_sib1(module_id_t module_id, int startSymbolIndex = 0; int nrOfSymbols = 0; + if(gNB_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position == 0) { startSymbolIndex = table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos2[gNB_mac->sched_ctrlCommon->time_domain_allocation][1]; nrOfSymbols = table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos2[gNB_mac->sched_ctrlCommon->time_domain_allocation][2]; @@ -361,6 +362,9 @@ void schedule_control_sib1(module_id_t module_id, nrOfSymbols = table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos3[gNB_mac->sched_ctrlCommon->time_domain_allocation][2]; } + // TODO: There are exceptions to this in table 5.1.2.1.1-4,5 (Default time domain allocation tables B, C) + int mappingtype = (startSymbolIndex <= 3)? typeA: typeB; + if (nrOfSymbols == 2) { gNB_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData = 1; } else { @@ -369,7 +373,7 @@ void schedule_control_sib1(module_id_t module_id, // Calculate number of PRB_DMRS uint8_t N_PRB_DMRS = gNB_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData * 6; - uint16_t dlDmrsSymbPos = fill_dmrs_mask(NULL, gNB_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position, nrOfSymbols, startSymbolIndex); + uint16_t dlDmrsSymbPos = fill_dmrs_mask(NULL, gNB_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position, nrOfSymbols, startSymbolIndex, mappingtype); uint16_t dmrs_length = get_num_dmrs(dlDmrsSymbPos); int rbSize = 0; @@ -388,6 +392,7 @@ void schedule_control_sib1(module_id_t module_id, LOG_D(MAC,"nrOfSymbols = %i\n", nrOfSymbols); LOG_D(MAC,"rbSize = %i\n", gNB_mac->sched_ctrlCommon->rbSize); LOG_D(MAC,"TBS = %i\n", TBS); + LOG_D(MAC,"mappingtype = %d\n", mappingtype); // Mark the corresponding RBs as used for (int rb = 0; rb < gNB_mac->sched_ctrlCommon->rbSize; rb++) { @@ -400,7 +405,8 @@ void nr_fill_nfapi_dl_sib1_pdu(int Mod_idP, NR_Type0_PDCCH_CSS_config_t *type0_PDCCH_CSS_config, uint32_t TBS, int StartSymbolIndex, - int NrOfSymbols) { + int NrOfSymbols, + uint16_t dlDmrsSymbPos) { gNB_MAC_INST *gNB_mac = RC.nrmac[Mod_idP]; NR_COMMON_channels_t *cc = gNB_mac->common_channels; @@ -471,9 +477,7 @@ void nr_fill_nfapi_dl_sib1_pdu(int Mod_idP, pdsch_pdu_rel15->mcsTable[0] = gNB_mac->sched_ctrlCommon->mcsTableIdx; pdsch_pdu_rel15->StartSymbolIndex = StartSymbolIndex; pdsch_pdu_rel15->NrOfSymbols = NrOfSymbols; - - pdsch_pdu_rel15->dlDmrsSymbPos = fill_dmrs_mask(NULL, scc->dmrs_TypeA_Position, pdsch_pdu_rel15->NrOfSymbols, pdsch_pdu_rel15->StartSymbolIndex); - + pdsch_pdu_rel15->dlDmrsSymbPos = dlDmrsSymbPos; LOG_D(MAC,"dlDmrsSymbPos = 0x%x\n", pdsch_pdu_rel15->dlDmrsSymbPos); /* Fill PDCCH DL DCI PDU */ @@ -587,27 +591,30 @@ void schedule_nr_sib1(module_id_t module_idP, frame_t frameP, sub_frame_t slotP) // Configure sched_ctrlCommon for SIB1 schedule_control_sib1(module_idP, CC_id, type0_PDCCH_CSS_config, time_domain_allocation, mcsTableIdx, mcs, candidate_idx, sib1_sdu_length); - int startSymbolIndex = 0; - int nrOfSymbols = 0; - if(gNB_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position == 0) { - startSymbolIndex = table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos2[gNB_mac->sched_ctrlCommon->time_domain_allocation][1]; - nrOfSymbols = table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos2[gNB_mac->sched_ctrlCommon->time_domain_allocation][2]; - } else { - startSymbolIndex = table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos3[gNB_mac->sched_ctrlCommon->time_domain_allocation][1]; - nrOfSymbols = table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos3[gNB_mac->sched_ctrlCommon->time_domain_allocation][2]; - } + int startSymbolIndex = 0; + int nrOfSymbols = 0; + if(gNB_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position == 0) { + startSymbolIndex = table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos2[gNB_mac->sched_ctrlCommon->time_domain_allocation][1]; + nrOfSymbols = table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos2[gNB_mac->sched_ctrlCommon->time_domain_allocation][2]; + } else { + startSymbolIndex = table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos3[gNB_mac->sched_ctrlCommon->time_domain_allocation][1]; + nrOfSymbols = table_5_1_2_1_1_2_time_dom_res_alloc_A_dmrs_typeA_pos3[gNB_mac->sched_ctrlCommon->time_domain_allocation][2]; + } - // Calculate number of PRB_DMRS - uint8_t N_PRB_DMRS = gNB_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData * 6; - uint16_t dlDmrsSymbPos = fill_dmrs_mask(NULL, gNB_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position, nrOfSymbols, startSymbolIndex); - uint16_t dmrs_length = get_num_dmrs(dlDmrsSymbPos); + // TODO: There are exceptions to this in table 5.1.2.1.1-4,5 (Default time domain allocation tables B, C) + int mappingtype = (startSymbolIndex <= 3) ? typeA : typeB ; + + // Calculate number of PRB_DMRS + uint8_t N_PRB_DMRS = gNB_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData * 6; + uint16_t dlDmrsSymbPos = fill_dmrs_mask(NULL, gNB_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position, nrOfSymbols, startSymbolIndex, mappingtype); + uint16_t dmrs_length = get_num_dmrs(dlDmrsSymbPos); const uint32_t TBS = nr_compute_tbs(nr_get_Qm_dl(gNB_mac->sched_ctrlCommon->mcs, gNB_mac->sched_ctrlCommon->mcsTableIdx), nr_get_code_rate_dl(gNB_mac->sched_ctrlCommon->mcs, gNB_mac->sched_ctrlCommon->mcsTableIdx), gNB_mac->sched_ctrlCommon->rbSize, nrOfSymbols, N_PRB_DMRS * dmrs_length,0 ,0 ,1 ) >> 3; nfapi_nr_dl_tti_request_body_t *dl_req = &gNB_mac->DL_req[CC_id].dl_tti_request_body; - nr_fill_nfapi_dl_sib1_pdu(module_idP, dl_req, type0_PDCCH_CSS_config, TBS, startSymbolIndex, nrOfSymbols); + nr_fill_nfapi_dl_sib1_pdu(module_idP, dl_req, type0_PDCCH_CSS_config, TBS, startSymbolIndex, nrOfSymbols, dlDmrsSymbPos); const int ntx_req = gNB_mac->TX_req[CC_id].Number_of_PDUs; nfapi_nr_pdu_t *tx_req = &gNB_mac->TX_req[CC_id].pdu_list[ntx_req]; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index 7db4080283..97a0bc52dd 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -582,12 +582,15 @@ void pf_dl(module_id_t module_id, sched_ctrl->time_domain_allocation, &startSymbol, &nrOfSymbols); + + int mappingtype = sched_ctrl->active_bwp->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[sched_ctrl->time_domain_allocation]->mappingType; const NR_ServingCellConfigCommon_t *scc = RC.nrmac[module_id]->common_channels->ServingCellConfigCommon; const uint8_t N_DMRS_SLOT = get_num_dmrs_symbols( sched_ctrl->active_bwp->bwp_Dedicated->pdsch_Config->choice.setup, scc->dmrs_TypeA_Position, nrOfSymbols, - startSymbol); + startSymbol, + mappingtype); int rbSize = 0; uint32_t TBS = 0; @@ -697,6 +700,7 @@ void nr_schedule_ue_spec(module_id_t module_id, const int startSymbolAndLength = tdaList->list.array[sched_ctrl->time_domain_allocation]->startSymbolAndLength; + int mappingtype = tdaList->list.array[sched_ctrl->time_domain_allocation]->mappingType; int startSymbolIndex, nrOfSymbols; SLIV2SL(startSymbolAndLength, &startSymbolIndex, &nrOfSymbols); @@ -705,7 +709,8 @@ void nr_schedule_ue_spec(module_id_t module_id, uint8_t N_DMRS_SLOT = get_num_dmrs_symbols(sched_ctrl->active_bwp->bwp_Dedicated->pdsch_Config->choice.setup, RC.nrmac[module_id]->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position , nrOfSymbols, - startSymbolIndex); + startSymbolIndex, + mappingtype); const nfapi_nr_dmrs_type_e dmrsConfigType = getDmrsConfigType(sched_ctrl->active_bwp); const int nrOfLayers = 1; const uint16_t R = nr_get_code_rate_dl(sched_ctrl->mcs, sched_ctrl->mcsTableIdx); @@ -828,7 +833,8 @@ void nr_schedule_ue_spec(module_id_t module_id, fill_dmrs_mask(bwp->bwp_Dedicated->pdsch_Config->choice.setup, scc->dmrs_TypeA_Position, nrOfSymbols, - startSymbolIndex); + startSymbolIndex, + mappingtype); pdsch_pdu->dmrsConfigType = dmrsConfigType; pdsch_pdu->dlDmrsScramblingId = *scc->physCellId; pdsch_pdu->SCID = 0; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c index bf8269132a..5472241200 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c @@ -146,15 +146,18 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP, int startSymbolAndLength=0; int StartSymbolIndex=-1,NrOfSymbols=14; int StartSymbolIndex_tmp,NrOfSymbols_tmp; + int mappingtype_tmp, mappingtype; for (int i=0; idownlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.count; i++) { startSymbolAndLength = scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[i]->startSymbolAndLength; SLIV2SL(startSymbolAndLength,&StartSymbolIndex_tmp,&NrOfSymbols_tmp); + mappingtype_tmp = scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[i]->mappingType; if (NrOfSymbols_tmp < NrOfSymbols) { NrOfSymbols = NrOfSymbols_tmp; StartSymbolIndex = StartSymbolIndex_tmp; + mappingtype = mappingtype_tmp; // k0 = *scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[i]->k0; // time_domain_assignment = i; } @@ -165,7 +168,8 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP, pdsch_pdu_rel15->dlDmrsSymbPos = fill_dmrs_mask(NULL, scc->dmrs_TypeA_Position, NrOfSymbols, - StartSymbolIndex); + StartSymbolIndex, + mappingtype); /* AssertFatal(k0==0,"k0 is not zero for Initial DL BWP TimeDomain Alloc\n"); diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/UE_0704_106_phytest_001.log b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/UE_0704_106_phytest_001.log new file mode 100644 index 0000000000..e69de29bb2 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300_typeB.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300_typeB.conf new file mode 100644 index 0000000000..c7a2cc65e2 --- /dev/null +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300_typeB.conf @@ -0,0 +1,291 @@ +Active_gNBs = ( "gNB-Eurecom-5GNRBox"); +# Asn1_verbosity, choice in: none, info, annoying +Asn1_verbosity = "none"; + +gNBs = +( + { + ////////// Identification parameters: + gNB_ID = 0xe00; + + cell_type = "CELL_MACRO_GNB"; + + gNB_name = "gNB-Eurecom-5GNRBox"; + + // Tracking area code, 0x0000 and 0xfffe are reserved values + tracking_area_code = 1; + + plmn_list = ({mcc = 208; mnc = 93; mnc_length = 2;}); + + tr_s_preference = "local_mac" + + ////////// Physical parameters: + + ssb_SubcarrierOffset = 0; + pdsch_AntennaPorts = 1; + pusch_AntennaPorts = 1; + + servingCellConfigCommon = ( + { + #spCellConfigCommon + + physCellId = 0; + +# downlinkConfigCommon + #frequencyInfoDL + # this is 3600 MHz + 43 PRBs@30kHz SCS (same as initial BWP), points to Subcarrier 0 of RB#10 of SSB block + absoluteFrequencySSB = 641032; + 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 = 106; + #initialDownlinkBWP + #genericParameters + # this is RBstart=33 (Start RB of SSB block),L=24 (275*(L-1))+RBstart + initialDLBWPlocationAndBandwidth = 6358; #6368; +# subcarrierSpacing +# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + initialDLBWPsubcarrierSpacing = 1; + #pdcch-ConfigCommon + initialDLBWPcontrolResourceSetZero = 0; #12; + initialDLBWPsearchSpaceZero = 0; + #pdsch-ConfigCommon + #pdschTimeDomainAllocationList (up to 16 entries) + initialDLBWPk0_0 = 0; + #initialULBWPmappingType + #0=typeA,1=typeB + initialDLBWPmappingType_0 = 1; + #this is SS=1,L=13 + initialDLBWPstartSymbolAndLength_0 = 40; + + initialDLBWPk0_1 = 0; + initialDLBWPmappingType_1 = 1; + #this is SS=2,L=12 + initialDLBWPstartSymbolAndLength_1 = 53; + + initialDLBWPk0_2 = 0; + initialDLBWPmappingType_2 = 1; + #this is SS=1,L=12 + initialDLBWPstartSymbolAndLength_2 = 54; + + initialDLBWPk0_3 = 0; + initialDLBWPmappingType_3 = 1; + #this is SS=1,L=5 + initialDLBWPstartSymbolAndLength_3 = 57; + + #uplinkConfigCommon + #frequencyInfoUL + ul_frequencyBand = 78; + #scs-SpecificCarrierList + ul_offstToCarrier = 0; +# subcarrierSpacing +# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + ul_subcarrierSpacing = 1; + ul_carrierBandwidth = 106; + pMax = 20; + #initialUplinkBWP + #genericParameters + initialULBWPlocationAndBandwidth = 6358;#6368; +# 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; +#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200) + preambleTransMax = 6; +#powerRampingStep +# 0=dB0,1=dB2,2=dB4,3=dB6 + powerRampingStep = 1; +#ra_ReponseWindow +#1,2,4,8,10,20,40,80 + ra_ResponseWindow = 4; +#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR +#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; +#ra_ContentionResolutionTimer +#(0..7) 8,16,24,32,40,48,56,64 + ra_ContentionResolutionTimer = 7; + rsrp_ThresholdSSB = 19; +#prach-RootSequenceIndex_PR +#1 = 839, 2 = 139 + prach_RootSequenceIndex_PR = 2; + 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 = 6; + initialULBWPmappingType_0 = 1 + # this is SS=0 L=11 + initialULBWPstartSymbolAndLength_0 = 55; + + initialULBWPk2_1 = 6; + initialULBWPmappingType_1 = 1; + # this is SS=0 L=12 + initialULBWPstartSymbolAndLength_1 = 69; + + initialULBWPk2_2 = 7; + initialULBWPmappingType_2 = 1; + # this is SS=10 L=4 + initialULBWPstartSymbolAndLength_2 = 52; + + 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 = 0x1; + +# 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 = 1; + # pattern1 + # dl_UL_TransmissionPeriodicity + # 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10 + dl_UL_TransmissionPeriodicity = 6; + nrofDownlinkSlots = 7; + nrofDownlinkSymbols = 6; + nrofUplinkSlots = 2; + nrofUplinkSymbols = 4; + + ssPBCH_BlockPower = -25; + } + + ); + + + # ------- SCTP definitions + SCTP : + { + # Number of streams to use in input/output + SCTP_INSTREAMS = 2; + SCTP_OUTSTREAMS = 2; + }; + + + ////////// MME parameters: + mme_ip_address = ( { ipv4 = "192.168.12.26"; + ipv6 = "192:168:30::17"; + active = "yes"; + preference = "ipv4"; + } + ); + + NETWORK_INTERFACES : + { + + GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; + GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24"; + GNB_INTERFACE_NAME_FOR_S1U = "eth0"; + GNB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24"; + GNB_PORT_FOR_S1U = 2152; # Spec 2152 + }; + } +); + +MACRLCs = ( + { + num_cc = 1; + tr_s_preference = "local_L1"; + tr_n_preference = "local_RRC"; + } +); + +L1s = ( + { + num_cc = 1; + tr_n_preference = "local_mac"; + pusch_proc_threads = 8; + } +); + +RUs = ( + { + local_rf = "yes" + nb_tx = 1 + nb_rx = 1 + att_tx = 0 + att_rx = 0; + bands = [7]; + max_pdschReferenceSignalPower = -27; + max_rxgain = 50; + eNB_instances = [0]; + ## beamforming 1x2 matrix: 1 layer x 2 antennas + #bf_weights = [0x00007fff, 0x00007fff]; + ## beamforming 1x4 matrix: 1 layer x 4 antennas + #bf_weights = [0x00007fff, 0x0000,0x0000, 0x0000]; + ## beamforming 2x2 matrix: + #bf_weights = [0x00007fff, 0x00000000, 0x00000000, 0x00007fff]; + ## beamforming 4x4 matrix: + #bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff]; + sdr_addrs = "addr=192.168.10.2,mgmt_addr=192.168.10.2,second_addr=192.168.20.2"; + clock_src = "external"; + } +); + +THREAD_STRUCT = ( + { + #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" + parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; + #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" + worker_config = "WORKER_ENABLE"; + } +); + + log_config : + { + global_log_level ="info"; + global_log_verbosity ="medium"; + hw_log_level ="info"; + hw_log_verbosity ="medium"; + phy_log_level ="info"; + phy_log_verbosity ="medium"; + mac_log_level ="info"; + mac_log_verbosity ="high"; + rlc_log_level ="info"; + rlc_log_verbosity ="medium"; + pdcp_log_level ="info"; + pdcp_log_verbosity ="medium"; + rrc_log_level ="info"; + rrc_log_verbosity ="medium"; + }; + From fc1a7f7b8c82aa3aa2cceae4c2d1879e74e3486d Mon Sep 17 00:00:00 2001 From: Raghavendra Dinavahi Date: Wed, 7 Apr 2021 13:28:29 +0200 Subject: [PATCH 201/579] Adjusting LocationBandwidth of initial BWP1 in configuration files. LocationandBandwidth adjusted according to the location of SSB and Controlresourceset 0 For example for 106RBs configuration files - - AbsoluteFrequencySSB = 641032 = RB43 (1032/24) - points to Subcarrier 0 of RB10 of SSB block - Hence SSB is located from RB33-RB53 - Coresetzero sent in MIB is 0 which means offset 0, RBsize 24 from Start of SSB according to table 13.4 in Spec 38.213 - InitialBWP should start from RB 33 (offset is 0 from SSB) and should be a size of minimum 24 RBs. - SLIV = 275 * (24-1) + 33 = 6358 Controlresourceset value wrongly configured to 12 , changed to 0 as sent in MIB. --- .../CONF/gnb.band78.tm1.106PRB.usrpn300.conf | 10 +++++----- .../CONF/gnb.band78.tm1.106PRB.usrpx300.conf | 10 +++++----- .../CONF/gnb.band78.tm1.217PRB.usrpn300.conf | 12 ++++++------ .../CONF/gnb.band78.tm1.217PRB.usrpx300.conf | 8 ++++---- .../CONF/gnb.band78.tm1.273PRB.usrpn300.conf | 8 ++++---- 5 files changed, 24 insertions(+), 24 deletions(-) diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf index 7080aff8ea..5a8f31809f 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf @@ -33,7 +33,7 @@ gNBs = # downlinkConfigCommon #frequencyInfoDL - # this is 3600 MHz + 43 PRBs@30kHz SCS (same as initial BWP) + # this is 3600 MHz + 43 PRBs@30kHz SCS (same as initial BWP), points to Subcarrier 0 of RB#10 of SSB block absoluteFrequencySSB = 641032; dl_frequencyBand = 78; # this is 3600 MHz @@ -46,13 +46,13 @@ gNBs = dl_carrierBandwidth = 106; #initialDownlinkBWP #genericParameters - # this is RBstart=41,L=24 (275*(L-1))+RBstart - initialDLBWPlocationAndBandwidth = 6368; + # this is RBstart=33 (Start RB of SSB block),L=24 (275*(L-1))+RBstart + initialDLBWPlocationAndBandwidth = 6358; #6368; # subcarrierSpacing # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 initialDLBWPsubcarrierSpacing = 1; #pdcch-ConfigCommon - initialDLBWPcontrolResourceSetZero = 12; + initialDLBWPcontrolResourceSetZero = 0; #12; initialDLBWPsearchSpaceZero = 0; #pdsch-ConfigCommon #pdschTimeDomainAllocationList (up to 16 entries) @@ -90,7 +90,7 @@ gNBs = pMax = 20; #initialUplinkBWP #genericParameters - initialULBWPlocationAndBandwidth = 6368; + initialULBWPlocationAndBandwidth = 6358;#6368; # subcarrierSpacing # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 initialULBWPsubcarrierSpacing = 1; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf index 4039012fe1..818de3cbec 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf @@ -33,7 +33,7 @@ gNBs = # downlinkConfigCommon #frequencyInfoDL - # this is 3600 MHz + 43 PRBs@30kHz SCS (same as initial BWP) + # this is 3600 MHz + 43 PRBs@30kHz SCS (same as initial BWP). points to Subcarrier 0 of RB#10 of SSB block absoluteFrequencySSB = 641032; dl_frequencyBand = 78; # this is 3600 MHz @@ -46,13 +46,13 @@ gNBs = dl_carrierBandwidth = 106; #initialDownlinkBWP #genericParameters - # this is RBstart=0,L=50 (275*(L-1))+RBstart - initialDLBWPlocationAndBandwidth = 6368; + # this is RBstart=33 (Start RB of SSB block),L=24 (275*(L-1))+RBstart + initialDLBWPlocationAndBandwidth = 6358; #6368; # subcarrierSpacing # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 initialDLBWPsubcarrierSpacing = 1; #pdcch-ConfigCommon - initialDLBWPcontrolResourceSetZero = 12; + initialDLBWPcontrolResourceSetZero = 0; initialDLBWPsearchSpaceZero = 0; #pdsch-ConfigCommon #pdschTimeDomainAllocationList (up to 16 entries) @@ -90,7 +90,7 @@ gNBs = pMax = 20; #initialUplinkBWP #genericParameters - initialULBWPlocationAndBandwidth = 6368; + initialULBWPlocationAndBandwidth = 6358; #6368; # subcarrierSpacing # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 initialULBWPsubcarrierSpacing = 1; 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 20e8aabf98..1a57dc76b0 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 @@ -33,7 +33,7 @@ gNBs = # downlinkConfigCommon #frequencyInfoDL - # this is 3600 MHz + 84 PRBs@30kHz SCS (same as initial BWP) + # this is 3600 MHz + 84 PRBs@30kHz SCS (same as initial BWP). Points to Subcarrier 0 of RB#10 of SSB block absoluteFrequencySSB = 642016;#642364; dl_frequencyBand = 78; # this is 3600 MHz @@ -46,13 +46,13 @@ gNBs = dl_carrierBandwidth = 217; #initialDownlinkBWP #genericParameters - # this is RBstart=84,L=50 (275*(L-1))+RBstart - initialDLBWPlocationAndBandwidth = 13559; + # this is RBstart=74 (Start RB of SSB block),L=50 (275*(L-1))+RBstart + initialDLBWPlocationAndBandwidth = 13549; # subcarrierSpacing # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 initialDLBWPsubcarrierSpacing = 1; #pdcch-ConfigCommon - initialDLBWPcontrolResourceSetZero = 12; + initialDLBWPcontrolResourceSetZero = 0; initialDLBWPsearchSpaceZero = 0; #pdsch-ConfigCommon #pdschTimeDomainAllocationList (up to 16 entries) @@ -89,7 +89,7 @@ gNBs = pMax = 20; #initialUplinkBWP #genericParameters - initialULBWPlocationAndBandwidth = 13559; + initialULBWPlocationAndBandwidth = 13549; # subcarrierSpacing # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 initialULBWPsubcarrierSpacing = 1; @@ -292,7 +292,7 @@ log_config : global_log_verbosity ="medium"; hw_log_level ="info"; hw_log_verbosity ="medium"; - phy_log_level ="debug"; + phy_log_level ="info"; phy_log_verbosity ="medium"; mac_log_level ="info"; mac_log_verbosity ="high"; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpx300.conf index fc8bda5d53..803060ced1 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpx300.conf @@ -46,13 +46,13 @@ gNBs = dl_carrierBandwidth = 217; #initialDownlinkBWP #genericParameters - # this is RBstart=84,L=50 (275*(L-1))+RBstart - initialDLBWPlocationAndBandwidth = 13559; + # this is RBstart=74,L=50 (275*(L-1))+RBstart + initialDLBWPlocationAndBandwidth = 13549; # subcarrierSpacing # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 initialDLBWPsubcarrierSpacing = 1; #pdcch-ConfigCommon - initialDLBWPcontrolResourceSetZero = 12; + initialDLBWPcontrolResourceSetZero = 0; initialDLBWPsearchSpaceZero = 0; #pdsch-ConfigCommon #pdschTimeDomainAllocationList (up to 16 entries) @@ -89,7 +89,7 @@ gNBs = pMax = 20; #initialUplinkBWP #genericParameters - initialULBWPlocationAndBandwidth = 13559; + initialULBWPlocationAndBandwidth = 13549; # subcarrierSpacing # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 initialULBWPsubcarrierSpacing = 1; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.273PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.273PRB.usrpn300.conf index 694b78e08d..35dcb3d10d 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.273PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.273PRB.usrpn300.conf @@ -46,13 +46,13 @@ gNBs = dl_carrierBandwidth = 273; #initialDownlinkBWP #genericParameters - # this is RBstart=84,L=50 (275*(L-1))+RBstart - initialDLBWPlocationAndBandwidth = 13559; + # this is RBstart=74,L=50 (275*(L-1))+RBstart + initialDLBWPlocationAndBandwidth = 13549; # subcarrierSpacing # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 initialDLBWPsubcarrierSpacing = 1; #pdcch-ConfigCommon - initialDLBWPcontrolResourceSetZero = 12; + initialDLBWPcontrolResourceSetZero = 0; initialDLBWPsearchSpaceZero = 0; #pdsch-ConfigCommon #pdschTimeDomainAllocationList (up to 16 entries) @@ -89,7 +89,7 @@ gNBs = pMax = 20; #initialUplinkBWP #genericParameters - initialULBWPlocationAndBandwidth = 13559; + initialULBWPlocationAndBandwidth = 13549; # subcarrierSpacing # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 initialULBWPsubcarrierSpacing = 1; From f3be3daa3230b9d1d0e16fd656b07034e596cd30 Mon Sep 17 00:00:00 2001 From: Raghavendra Dinavahi Date: Thu, 8 Apr 2021 11:49:23 +0200 Subject: [PATCH 202/579] pusch_proc_threads=8 added to configuration files --- .../GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpn300.conf | 1 + .../GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpx300.conf | 1 + .../GENERIC-LTE-EPC/CONF/gnb.band78.tm1.273PRB.usrpn300.conf | 1 + 3 files changed, 3 insertions(+) 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 1a57dc76b0..cc1541b49d 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 @@ -250,6 +250,7 @@ L1s = ( { num_cc = 1; tr_n_preference = "local_mac"; + pusch_proc_threads = 8; } ); diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpx300.conf index 803060ced1..4803ddfb56 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpx300.conf @@ -229,6 +229,7 @@ L1s = ( { num_cc = 1; tr_n_preference = "local_mac"; + pusch_proc_threads = 8; } ); diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.273PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.273PRB.usrpn300.conf index 35dcb3d10d..f03949aa85 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.273PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.273PRB.usrpn300.conf @@ -234,6 +234,7 @@ L1s = ( { num_cc = 1; tr_n_preference = "local_mac"; + pusch_proc_threads = 8; } ); From e658023ff5bd61887e53667ef5a3f8b2817ec49f Mon Sep 17 00:00:00 2001 From: Raghavendra Dinavahi Date: Thu, 15 Apr 2021 18:12:45 +0200 Subject: [PATCH 203/579] Fix for the 16byte alignment issue observed during DMRS modulation. Segmentation fault observed in case the address for mod_dmrs[dmrssymbol] is not 16byte aligned. --- cmake_targets/1504_phytest_001.log | 0 openair1/PHY/NR_TRANSPORT/nr_dlsch.c | 39 ++- .../CONF/UE_0704_106_phytest_001.log | 0 .../gnb.band78.tm1.106PRB.usrpn300_typeB.conf | 291 ------------------ 4 files changed, 18 insertions(+), 312 deletions(-) delete mode 100644 cmake_targets/1504_phytest_001.log delete mode 100644 targets/PROJECTS/GENERIC-LTE-EPC/CONF/UE_0704_106_phytest_001.log delete mode 100644 targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300_typeB.conf diff --git a/cmake_targets/1504_phytest_001.log b/cmake_targets/1504_phytest_001.log deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/openair1/PHY/NR_TRANSPORT/nr_dlsch.c b/openair1/PHY/NR_TRANSPORT/nr_dlsch.c index 2d43fb5aed..6be724bc70 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dlsch.c +++ b/openair1/PHY/NR_TRANSPORT/nr_dlsch.c @@ -159,7 +159,7 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB, uint16_t nb_re = ((12*rel15->NrOfSymbols)-nb_re_dmrs*dmrs_len-xOverhead)*rel15->rbSize*rel15->nrOfLayers; uint8_t Qm = rel15->qamModOrder[0]; uint32_t encoded_length = nb_re*Qm; - int16_t mod_dmrs[14][n_dmrs<<1] __attribute__ ((aligned(16))); + int16_t mod_dmrs[n_dmrs<<1] __attribute__ ((aligned(16))); /* PTRS */ uint16_t beta_ptrs = 1; @@ -264,24 +264,6 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB, printf("\n"); } #endif - - /// DMRS QPSK modulation - // TODO: performance improvement, we can skip the modulation of DMRS symbols outside the bandwidth part - for (int l=rel15->StartSymbolIndex; lStartSymbolIndex+rel15->NrOfSymbols; l++) { - if (rel15->dlDmrsSymbPos & (1 << l)) { - nr_modulation(pdsch_dmrs[l][0], n_dmrs*2, DMRS_MOD_ORDER, mod_dmrs[l]); // currently only codeword 0 is modulated. Qm = 2 as DMRS is QPSK modulated - -#ifdef DEBUG_DLSCH - printf("DMRS modulation (symbol %d, %d symbols, type %d):\n", l, n_dmrs, dmrs_Type); - for (int i=0; i>4; i++) { - for (int j=0; j<8; j++) { - printf("%d %d\t", mod_dmrs[l][((i<<3)+j)<<1], mod_dmrs[l][(((i<<3)+j)<<1)+1]); - } - printf("\n"); - } -#endif - } - } /// Resource mapping @@ -349,6 +331,21 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB, } } + /// DMRS QPSK modulation + if (rel15->dlDmrsSymbPos & (1 << l)) { + nr_modulation(pdsch_dmrs[l][0], n_dmrs*2, DMRS_MOD_ORDER, mod_dmrs); // currently only codeword 0 is modulated. Qm = 2 as DMRS is QPSK modulated + +#ifdef DEBUG_DLSCH + printf("DMRS modulation (symbol %d, %d symbols, type %d):\n", l, n_dmrs, dmrs_Type); + for (int i=0; i>4; i++) { + for (int j=0; j<8; j++) { + printf("%d %d\t", mod_dmrs[((i<<3)+j)<<1], mod_dmrs[(((i<<3)+j)<<1)+1]); + } + printf("\n"); + } +#endif + } + /* calculate if current symbol is PTRS symbols */ ptrs_idx = 0; @@ -379,8 +376,8 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB, /* Map DMRS Symbol */ if ( ( dmrs_symbol_map & (1 << l) ) && (k == ((start_sc+get_dmrs_freq_idx(n, k_prime, delta, dmrs_Type))%(frame_parms->ofdm_symbol_size)))) { - txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)] = (Wt[l_prime]*Wf[k_prime]*amp*mod_dmrs[l][dmrs_idx<<1]) >> 15; - txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 + (2*txdataF_offset)] = (Wt[l_prime]*Wf[k_prime]*amp*mod_dmrs[l][(dmrs_idx<<1) + 1]) >> 15; + txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)] = (Wt[l_prime]*Wf[k_prime]*amp*mod_dmrs[dmrs_idx<<1]) >> 15; + txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 + (2*txdataF_offset)] = (Wt[l_prime]*Wf[k_prime]*amp*mod_dmrs[(dmrs_idx<<1) + 1]) >> 15; #ifdef DEBUG_DLSCH_MAPPING printf("dmrs_idx %d\t l %d \t k %d \t k_prime %d \t n %d \t txdataF: %d %d\n", dmrs_idx, l, k, k_prime, n, txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)], diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/UE_0704_106_phytest_001.log b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/UE_0704_106_phytest_001.log deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300_typeB.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300_typeB.conf deleted file mode 100644 index c7a2cc65e2..0000000000 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300_typeB.conf +++ /dev/null @@ -1,291 +0,0 @@ -Active_gNBs = ( "gNB-Eurecom-5GNRBox"); -# Asn1_verbosity, choice in: none, info, annoying -Asn1_verbosity = "none"; - -gNBs = -( - { - ////////// Identification parameters: - gNB_ID = 0xe00; - - cell_type = "CELL_MACRO_GNB"; - - gNB_name = "gNB-Eurecom-5GNRBox"; - - // Tracking area code, 0x0000 and 0xfffe are reserved values - tracking_area_code = 1; - - plmn_list = ({mcc = 208; mnc = 93; mnc_length = 2;}); - - tr_s_preference = "local_mac" - - ////////// Physical parameters: - - ssb_SubcarrierOffset = 0; - pdsch_AntennaPorts = 1; - pusch_AntennaPorts = 1; - - servingCellConfigCommon = ( - { - #spCellConfigCommon - - physCellId = 0; - -# downlinkConfigCommon - #frequencyInfoDL - # this is 3600 MHz + 43 PRBs@30kHz SCS (same as initial BWP), points to Subcarrier 0 of RB#10 of SSB block - absoluteFrequencySSB = 641032; - 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 = 106; - #initialDownlinkBWP - #genericParameters - # this is RBstart=33 (Start RB of SSB block),L=24 (275*(L-1))+RBstart - initialDLBWPlocationAndBandwidth = 6358; #6368; -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - initialDLBWPsubcarrierSpacing = 1; - #pdcch-ConfigCommon - initialDLBWPcontrolResourceSetZero = 0; #12; - initialDLBWPsearchSpaceZero = 0; - #pdsch-ConfigCommon - #pdschTimeDomainAllocationList (up to 16 entries) - initialDLBWPk0_0 = 0; - #initialULBWPmappingType - #0=typeA,1=typeB - initialDLBWPmappingType_0 = 1; - #this is SS=1,L=13 - initialDLBWPstartSymbolAndLength_0 = 40; - - initialDLBWPk0_1 = 0; - initialDLBWPmappingType_1 = 1; - #this is SS=2,L=12 - initialDLBWPstartSymbolAndLength_1 = 53; - - initialDLBWPk0_2 = 0; - initialDLBWPmappingType_2 = 1; - #this is SS=1,L=12 - initialDLBWPstartSymbolAndLength_2 = 54; - - initialDLBWPk0_3 = 0; - initialDLBWPmappingType_3 = 1; - #this is SS=1,L=5 - initialDLBWPstartSymbolAndLength_3 = 57; - - #uplinkConfigCommon - #frequencyInfoUL - ul_frequencyBand = 78; - #scs-SpecificCarrierList - ul_offstToCarrier = 0; -# subcarrierSpacing -# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - ul_subcarrierSpacing = 1; - ul_carrierBandwidth = 106; - pMax = 20; - #initialUplinkBWP - #genericParameters - initialULBWPlocationAndBandwidth = 6358;#6368; -# 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; -#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200) - preambleTransMax = 6; -#powerRampingStep -# 0=dB0,1=dB2,2=dB4,3=dB6 - powerRampingStep = 1; -#ra_ReponseWindow -#1,2,4,8,10,20,40,80 - ra_ResponseWindow = 4; -#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR -#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen - ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; -#oneHalf (0..15) 4,8,12,16,...60,64 - ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15; -#ra_ContentionResolutionTimer -#(0..7) 8,16,24,32,40,48,56,64 - ra_ContentionResolutionTimer = 7; - rsrp_ThresholdSSB = 19; -#prach-RootSequenceIndex_PR -#1 = 839, 2 = 139 - prach_RootSequenceIndex_PR = 2; - 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 = 6; - initialULBWPmappingType_0 = 1 - # this is SS=0 L=11 - initialULBWPstartSymbolAndLength_0 = 55; - - initialULBWPk2_1 = 6; - initialULBWPmappingType_1 = 1; - # this is SS=0 L=12 - initialULBWPstartSymbolAndLength_1 = 69; - - initialULBWPk2_2 = 7; - initialULBWPmappingType_2 = 1; - # this is SS=10 L=4 - initialULBWPstartSymbolAndLength_2 = 52; - - 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 = 0x1; - -# 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 = 1; - # pattern1 - # dl_UL_TransmissionPeriodicity - # 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10 - dl_UL_TransmissionPeriodicity = 6; - nrofDownlinkSlots = 7; - nrofDownlinkSymbols = 6; - nrofUplinkSlots = 2; - nrofUplinkSymbols = 4; - - ssPBCH_BlockPower = -25; - } - - ); - - - # ------- SCTP definitions - SCTP : - { - # Number of streams to use in input/output - SCTP_INSTREAMS = 2; - SCTP_OUTSTREAMS = 2; - }; - - - ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.26"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); - - NETWORK_INTERFACES : - { - - GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; - GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24"; - GNB_INTERFACE_NAME_FOR_S1U = "eth0"; - GNB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24"; - GNB_PORT_FOR_S1U = 2152; # Spec 2152 - }; - } -); - -MACRLCs = ( - { - num_cc = 1; - tr_s_preference = "local_L1"; - tr_n_preference = "local_RRC"; - } -); - -L1s = ( - { - num_cc = 1; - tr_n_preference = "local_mac"; - pusch_proc_threads = 8; - } -); - -RUs = ( - { - local_rf = "yes" - nb_tx = 1 - nb_rx = 1 - att_tx = 0 - att_rx = 0; - bands = [7]; - max_pdschReferenceSignalPower = -27; - max_rxgain = 50; - eNB_instances = [0]; - ## beamforming 1x2 matrix: 1 layer x 2 antennas - #bf_weights = [0x00007fff, 0x00007fff]; - ## beamforming 1x4 matrix: 1 layer x 4 antennas - #bf_weights = [0x00007fff, 0x0000,0x0000, 0x0000]; - ## beamforming 2x2 matrix: - #bf_weights = [0x00007fff, 0x00000000, 0x00000000, 0x00007fff]; - ## beamforming 4x4 matrix: - #bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff]; - sdr_addrs = "addr=192.168.10.2,mgmt_addr=192.168.10.2,second_addr=192.168.20.2"; - clock_src = "external"; - } -); - -THREAD_STRUCT = ( - { - #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" - parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; - #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" - worker_config = "WORKER_ENABLE"; - } -); - - log_config : - { - global_log_level ="info"; - global_log_verbosity ="medium"; - hw_log_level ="info"; - hw_log_verbosity ="medium"; - phy_log_level ="info"; - phy_log_verbosity ="medium"; - mac_log_level ="info"; - mac_log_verbosity ="high"; - rlc_log_level ="info"; - rlc_log_verbosity ="medium"; - pdcp_log_level ="info"; - pdcp_log_verbosity ="medium"; - rrc_log_level ="info"; - rrc_log_verbosity ="medium"; - }; - From 5edee9b5465ccc67316ca5830c6d4497bb60879f Mon Sep 17 00:00:00 2001 From: Raghavendra Dinavahi Date: Wed, 21 Apr 2021 13:25:00 +0200 Subject: [PATCH 204/579] Mapping type A enabled in PUSCH dmrs mask calculation - Procedure get_l_prime is modified - Single and double symbol DMRS are handled in Type A and Type B --- openair1/SIMULATION/NR_PHY/ulsim.c | 6 +- openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c | 73 ++++++++++++------- openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h | 2 +- openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c | 36 ++++++--- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 5 +- .../NR_MAC_gNB/gNB_scheduler_primitives.c | 7 +- 6 files changed, 81 insertions(+), 48 deletions(-) diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c index 21351caac1..b51a41fd5d 100644 --- a/openair1/SIMULATION/NR_PHY/ulsim.c +++ b/openair1/SIMULATION/NR_PHY/ulsim.c @@ -808,7 +808,7 @@ int main(int argc, char **argv) } uint8_t length_dmrs = pusch_len1; - uint16_t l_prime_mask = get_l_prime(nb_symb_sch, mapping_type, add_pos, length_dmrs); + uint16_t l_prime_mask = get_l_prime(nb_symb_sch, mapping_type, add_pos, length_dmrs, start_symbol, NR_MIB__dmrs_TypeA_Position_pos2); uint16_t number_dmrs_symbols = get_dmrs_symbols_in_slot(l_prime_mask, nb_symb_sch); uint8_t nb_re_dmrs = (dmrs_config_type == pusch_dmrs_type1) ? 6 : 4; @@ -994,7 +994,7 @@ int main(int argc, char **argv) pusch_pdu->transform_precoding = transform_precoding; pusch_pdu->data_scrambling_id = *scc->physCellId; pusch_pdu->nrOfLayers = 1; - pusch_pdu->ul_dmrs_symb_pos = l_prime_mask << start_symbol; + pusch_pdu->ul_dmrs_symb_pos = l_prime_mask; pusch_pdu->dmrs_config_type = dmrs_config_type; pusch_pdu->ul_dmrs_scrambling_id = *scc->physCellId; pusch_pdu->scid = 0; @@ -1057,7 +1057,7 @@ int main(int argc, char **argv) ul_config.ul_config_list[0].pusch_config_pdu.rb_start = start_rb; ul_config.ul_config_list[0].pusch_config_pdu.nr_of_symbols = nb_symb_sch; ul_config.ul_config_list[0].pusch_config_pdu.start_symbol_index = start_symbol; - ul_config.ul_config_list[0].pusch_config_pdu.ul_dmrs_symb_pos = l_prime_mask << start_symbol; + ul_config.ul_config_list[0].pusch_config_pdu.ul_dmrs_symb_pos = l_prime_mask; ul_config.ul_config_list[0].pusch_config_pdu.dmrs_config_type = dmrs_config_type; ul_config.ul_config_list[0].pusch_config_pdu.mcs_index = Imcs; ul_config.ul_config_list[0].pusch_config_pdu.mcs_table = mcs_table; diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c index 69415cf0f5..ef358f40fe 100644 --- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c +++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c @@ -1777,17 +1777,17 @@ int32_t table_7_4_1_1_2_4_pdsch_dmrs_positions_l [12][8] = { int32_t table_6_4_1_1_3_3_pusch_dmrs_positions_l [12][8] = { // Duration in symbols {-1, -1, -1, -1, 1, 1, 1, 1}, //<4 // (DMRS l' position) -{1, 1, 1, 1, 1, 1, 1, 1}, //4 // (DMRS l' position) -{1, 1, 1, 1, 1, 5, 5, 5}, //5 // (DMRS l' position) -{1, 1, 1, 1, 1, 5, 5, 5}, //6 // (DMRS l' position) -{1, 1, 1, 1, 1, 5, 5, 5}, //7 // (DMRS l' position) -{1, 129, 129, 129, 1, 65, 73, 73}, //8 // (DMRS l' position) -{1, 129, 129, 129, 1, 65, 73, 73}, //9 // (DMRS l' position) -{1, 513, 577, 577, 1, 257, 273, 585}, //10 // (DMRS l' position) -{1, 513, 577, 577, 1, 257, 273, 585}, //11 // (DMRS l' position) -{1, 513, 577, 2337, 1, 1025, 1057, 585}, //12 // (DMRS l' position) -{1, 2049, 2177, 2337, 1, 1025, 1057, 585}, //13 // (DMRS l' position) -{1, 2049, 2177, 2337, 1, 1025, 1057, 585}, //14 // (DMRS l' position) +{0, 0, 0, 0, 1, 1, 1, 1}, //4 // (DMRS l' position) +{0, 0, 0, 0, 1, 17, 17, 17}, //5 // (DMRS l' position) +{0, 0, 0, 0, 1, 17, 17, 17}, //6 // (DMRS l' position) +{0, 0, 0, 0, 1, 17, 17, 17}, //7 // (DMRS l' position) +{0, 128, 128, 128, 1, 65, 73, 73}, //8 // (DMRS l' position) +{0, 128, 128, 128, 1, 65, 73, 73}, //9 // (DMRS l' position) +{0, 512, 576, 576, 1, 257, 273, 585}, //10 // (DMRS l' position) +{0, 512, 576, 576, 1, 257, 273, 585}, //11 // (DMRS l' position) +{0, 512, 576, 2336, 1, 1025, 1057, 585}, //12 // (DMRS l' position) +{0, 2048, 2176, 2336, 1, 1025, 1057, 585}, //13 // (DMRS l' position) +{0, 2048, 2176, 2336, 1, 1025, 1057, 585}, //14 // (DMRS l' position) }; @@ -1797,17 +1797,17 @@ int32_t table_6_4_1_1_3_3_pusch_dmrs_positions_l [12][8] = { int32_t table_6_4_1_1_3_4_pusch_dmrs_positions_l [12][8] = { // Duration in symbols {-1, -1, -1, -1, -1, -1, -1, -1}, //<4 // (DMRS l' position) -{1, 1, -1, -1, -1, -1, -1, -1}, //4 // (DMRS l' position) -{1, 1, -1, -1, 1, 1, -1, -1}, //5 // (DMRS l' position) -{1, 1, -1, -1, 1, 1, -1, -1}, //6 // (DMRS l' position) -{1, 1, -1, -1, 1, 1, -1, -1}, //7 // (DMRS l' position) -{1, 1, -1, -1, 1, 33, -1, -1}, //8 // (DMRS l' position) -{1, 1, -1, -1, 1, 33, -1, -1}, //9 // (DMRS l' position) -{1, 257, -1, -1, 1, 129, -1, -1}, //10 // (DMRS l' position) -{1, 257, -1, -1, 1, 129, -1, -1}, //11 // (DMRS l' position) -{1, 257, -1, -1, 1, 513, -1, -1}, //12 // (DMRS l' position) -{1, 1025, -1, -1, 1, 513, -1, -1}, //13 // (DMRS l' position) -{1, 1025, -1, -1, 1, 513, -1, -1}, //14 // (DMRS l' position) +{0, 0, -1, -1, -1, -1, -1, -1}, //4 // (DMRS l' position) +{0, 0, -1, -1, 3, 3, -1, -1}, //5 // (DMRS l' position) +{0, 0, -1, -1, 3, 3, -1, -1}, //6 // (DMRS l' position) +{0, 0, -1, -1, 3, 3, -1, -1}, //7 // (DMRS l' position) +{0, 0, -1, -1, 3, 99, -1, -1}, //8 // (DMRS l' position) +{0, 0, -1, -1, 3, 99, -1, -1}, //9 // (DMRS l' position) +{0, 768, -1, -1, 3, 387, -1, -1}, //10 // (DMRS l' position) +{0, 768, -1, -1, 3, 387, -1, -1}, //11 // (DMRS l' position) +{0, 768, -1, -1, 3, 1539, -1, -1}, //12 // (DMRS l' position) +{0, 3072, -1, -1, 3, 1539, -1, -1}, //13 // (DMRS l' position) +{0, 3072, -1, -1, 3, 1539, -1, -1}, //14 // (DMRS l' position) }; // Returns the corresponding row index of the NR table @@ -2418,29 +2418,46 @@ uint8_t get_l0_ul(uint8_t mapping_type, uint8_t dmrs_typeA_position) { } -int32_t get_l_prime(uint8_t duration_in_symbols, uint8_t mapping_type, pusch_dmrs_AdditionalPosition_t additional_pos, pusch_maxLength_t pusch_maxLength) { +int32_t get_l_prime(uint8_t duration_in_symbols, uint8_t mapping_type, pusch_dmrs_AdditionalPosition_t additional_pos, pusch_maxLength_t pusch_maxLength, uint8_t start_symbol, uint8_t dmrs_typeA_position) { uint8_t row, colomn; int32_t l_prime; + LOG_D(MAC, "PUSCH: NrofSymbols:%d, startSymbol:%d, mappingtype:%d, dmrs_TypeA_Position:%d\n", duration_in_symbols, start_symbol, mapping_type, dmrs_typeA_position); + + // Section 6.4.1.1.3 in Spec 38.211 + // For PDSCH Mapping TypeA, ld is duration between first OFDM of the slot and last OFDM symbol of the scheduled PUSCH resources + // For TypeB, ld is the duration of the scheduled PUSCH resources + uint8_t ld = (mapping_type == typeA) ? (duration_in_symbols + start_symbol) : duration_in_symbols; + uint8_t l0 = (dmrs_typeA_position == NR_MIB__dmrs_TypeA_Position_pos2) ? 2 : 3 ; + colomn = additional_pos; if (mapping_type == typeB) colomn += 4; - if (duration_in_symbols < 4) + if (ld < 4) row = 0; else - row = duration_in_symbols - 3; + row = ld - 3; - if (pusch_maxLength == pusch_len1) + if (pusch_maxLength == pusch_len1) { l_prime = table_6_4_1_1_3_3_pusch_dmrs_positions_l[row][colomn]; - else + l0 = 1 << l0; + } + else { l_prime = table_6_4_1_1_3_4_pusch_dmrs_positions_l[row][colomn]; + l0 = 1<0,"invalid l_prime < 0\n"); + LOG_D(MAC, "PUSCH - l0:%d, ld:%d,row:%d, column:%d, addpos:%d, maxlen:%d\n", l0, ld, row, colomn, additional_pos, pusch_maxLength); + AssertFatal(l_prime>=0,"invalid l_prime < 0\n"); + + l_prime = (mapping_type == typeA) ? (l_prime | l0) : (l_prime << start_symbol); + LOG_D(MAC, " PUSCH DMRS MASK in HEX:%x\n", l_prime); return l_prime; + } /******************************************************************* diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h index cf8c838eac..9c24eea772 100644 --- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h +++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h @@ -121,7 +121,7 @@ uint16_t get_NCS(uint8_t index, uint16_t format, uint8_t restricted_set_config); int get_num_dmrs(uint16_t dmrs_mask ); uint8_t get_l0_ul(uint8_t mapping_type, uint8_t dmrs_typeA_position); -int32_t get_l_prime(uint8_t duration_in_symbols, uint8_t mapping_type, pusch_dmrs_AdditionalPosition_t additional_pos, pusch_maxLength_t pusch_maxLength); +int32_t get_l_prime(uint8_t duration_in_symbols, uint8_t mapping_type, pusch_dmrs_AdditionalPosition_t additional_pos, pusch_maxLength_t pusch_maxLength, uint8_t start_symbolt, uint8_t dmrs_typeA_position); uint8_t get_L_ptrs(uint8_t mcs1, uint8_t mcs2, uint8_t mcs3, uint8_t I_mcs, uint8_t mcs_table); uint8_t get_K_ptrs(uint16_t nrb0, uint16_t nrb1, uint16_t N_RB); diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c index 983802dd4a..f8525f03ae 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c @@ -469,7 +469,7 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac, int NrOfSymbols; uint8_t nb_dmrs_re_per_rb; - uint16_t l_prime_mask = 1; + uint16_t l_prime_mask = 0; uint16_t number_dmrs_symbols = 0; int N_PRB_oh = 0; @@ -482,6 +482,9 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac, pusch_config_pdu->nrOfLayers = 1; pusch_config_pdu->rnti = rnti; + pusch_dmrs_AdditionalPosition_t add_pos = pusch_dmrs_pos2; + pusch_maxLength_t dmrslength = pusch_len1; + if (rar_grant) { // Note: for Msg3 or MsgA PUSCH transmission the N_PRB_oh is always set to 0 @@ -529,7 +532,7 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac, pusch_config_pdu->start_symbol_index = StartSymbolIndex; pusch_config_pdu->nr_of_symbols = NrOfSymbols; - l_prime_mask = get_l_prime(NrOfSymbols, mappingtype, pusch_dmrs_pos2, pusch_len1); + l_prime_mask = get_l_prime(NrOfSymbols, mappingtype, add_pos, dmrslength, StartSymbolIndex, scc->dmrs_TypeA_Position); LOG_D(MAC, "MSG3 start_sym:%d NR Symb:%d mappingtype:%d , DMRS_MASK:%x\n", pusch_config_pdu->start_symbol_index, pusch_config_pdu->nr_of_symbols, mappingtype, l_prime_mask); #ifdef DEBUG_MSG3 @@ -612,18 +615,26 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac, } + NR_PUSCH_TimeDomainResourceAllocationList_t *pusch_TimeDomainAllocationList = NULL; + if (pusch_Config->pusch_TimeDomainAllocationList) { + pusch_TimeDomainAllocationList = pusch_Config->pusch_TimeDomainAllocationList->choice.setup; + } + else if (mac->ULbwp[0]->bwp_Common->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList) { + pusch_TimeDomainAllocationList = mac->ULbwp[0]->bwp_Common->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList; + } + + int mappingtype = pusch_TimeDomainAllocationList->list.array[dci->time_domain_assignment.val]->mappingType; + + NR_DMRS_UplinkConfig_t *NR_DMRS_ulconfig = NULL; + NR_DMRS_ulconfig = (mappingtype == NR_PUSCH_TimeDomainResourceAllocation__mappingType_typeA) + ? pusch_Config->dmrs_UplinkForPUSCH_MappingTypeA->choice.setup : pusch_Config->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup; + /* TRANSFORM PRECODING ------------------------------------------------------------------------------------------*/ if (pusch_config_pdu->transform_precoding == transform_precoder_enabled) { pusch_config_pdu->num_dmrs_cdm_grps_no_data = 2; - NR_DMRS_UplinkConfig_t *NR_DMRS_ulconfig = NULL; - if(pusch_Config->dmrs_UplinkForPUSCH_MappingTypeA != NULL) - NR_DMRS_ulconfig = pusch_Config->dmrs_UplinkForPUSCH_MappingTypeA->choice.setup; - else - NR_DMRS_ulconfig = pusch_Config->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup; - uint32_t n_RS_Id = 0; if (NR_DMRS_ulconfig->transformPrecodingEnabled->nPUSCH_Identity != NULL) n_RS_Id = *NR_DMRS_ulconfig->transformPrecodingEnabled->nPUSCH_Identity; @@ -692,8 +703,13 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac, pusch_config_pdu->absolute_delta_PUSCH = 4; } + if (NR_DMRS_ulconfig != NULL) { + add_pos = (NR_DMRS_ulconfig->dmrs_AdditionalPosition == NULL) ? 2 : *NR_DMRS_ulconfig->dmrs_AdditionalPosition; + dmrslength = NR_DMRS_ulconfig->maxLength == NULL ? pusch_len1 : pusch_len2; + } + /* DMRS */ - l_prime_mask = get_l_prime(pusch_config_pdu->nr_of_symbols, typeB, pusch_dmrs_pos0, pusch_len1); + l_prime_mask = get_l_prime(pusch_config_pdu->nr_of_symbols, mappingtype, add_pos, dmrslength, pusch_config_pdu->start_symbol_index, scc->dmrs_TypeA_Position); if (pusch_config_pdu->transform_precoding == transform_precoder_disabled) pusch_config_pdu->num_dmrs_cdm_grps_no_data = 1; @@ -731,7 +747,7 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac, pusch_config_pdu->nr_of_symbols, rnti_types[rnti_type]); - pusch_config_pdu->ul_dmrs_symb_pos = l_prime_mask << pusch_config_pdu->start_symbol_index;; + pusch_config_pdu->ul_dmrs_symb_pos = l_prime_mask; pusch_config_pdu->target_code_rate = nr_get_code_rate_ul(pusch_config_pdu->mcs_index, pusch_config_pdu->mcs_table); pusch_config_pdu->qam_mod_order = nr_get_Qm_ul(pusch_config_pdu->mcs_index, pusch_config_pdu->mcs_table); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 0df8d61cee..a301711187 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -822,9 +822,8 @@ void nr_add_msg3(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t pusch_pdu->data_scrambling_id = *scc->physCellId; pusch_pdu->nrOfLayers = 1; - const uint16_t l_prime_mask = get_l_prime(nr_of_symbols,mappingtype,pusch_dmrs_pos2,pusch_len1); - pusch_pdu->ul_dmrs_symb_pos = l_prime_mask << start_symbol_index; - LOG_D(MAC, "MSG3 start_sym:%d NR Symb:%d mappingtype:%d , DMRS_MASK:%x, ul_dmrs_symb_pos:%x\n", start_symbol_index, nr_of_symbols, mappingtype, l_prime_mask, pusch_pdu->ul_dmrs_symb_pos); + pusch_pdu->ul_dmrs_symb_pos = get_l_prime(nr_of_symbols,mappingtype,pusch_dmrs_pos2,pusch_len1,start_symbol_index, scc->dmrs_TypeA_Position); + LOG_D(MAC, "MSG3 start_sym:%d NR Symb:%d mappingtype:%d , ul_dmrs_symb_pos:%x\n", start_symbol_index, nr_of_symbols, mappingtype, pusch_pdu->ul_dmrs_symb_pos); pusch_pdu->dmrs_config_type = 0; pusch_pdu->ul_dmrs_scrambling_id = *scc->physCellId; //If provided and the PUSCH is not a msg3 PUSCH, otherwise, L2 should set this to physical cell id. diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index d4cf603c4f..1e03234f6a 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -270,11 +270,12 @@ void nr_save_pusch_fields(const NR_ServingCellConfigCommon_t *scc, : *ps->NR_DMRS_UplinkConfig->dmrs_AdditionalPosition); const pusch_maxLength_t pusch_maxLength = ps->NR_DMRS_UplinkConfig->maxLength == NULL ? 1 : 2; - const uint16_t l_prime_mask = get_l_prime(ps->nrOfSymbols, + ps->ul_dmrs_symb_pos = get_l_prime(ps->nrOfSymbols, ps->mapping_type, additional_pos, - pusch_maxLength); - ps->ul_dmrs_symb_pos = l_prime_mask << ps->startSymbolIndex; + pusch_maxLength, + ps->startSymbolIndex, + scc->dmrs_TypeA_Position); uint8_t num_dmrs_symb = 0; for(int i = ps->startSymbolIndex; i < ps->startSymbolIndex + ps->nrOfSymbols; i++) num_dmrs_symb += (ps->ul_dmrs_symb_pos >> i) & 1; From efb43528bca0c45e9aac3adfa4ab2648acc30e8e Mon Sep 17 00:00:00 2001 From: Raghavendra Dinavahi Date: Thu, 22 Apr 2021 10:47:33 +0200 Subject: [PATCH 205/579] Channel estimation of all PUSCH dmrs symbols before compensation --- .../PHY/NR_TRANSPORT/nr_transport_proto.h | 6 +- .../PHY/NR_TRANSPORT/nr_ulsch_demodulation.c | 325 +++++++++--------- openair1/SCHED_NR/phy_procedures_nr_gNB.c | 20 +- 3 files changed, 168 insertions(+), 183 deletions(-) diff --git a/openair1/PHY/NR_TRANSPORT/nr_transport_proto.h b/openair1/PHY/NR_TRANSPORT/nr_transport_proto.h index e5e81109e4..6b22ece2bd 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_transport_proto.h +++ b/openair1/PHY/NR_TRANSPORT/nr_transport_proto.h @@ -133,15 +133,13 @@ NR_gNB_DLSCH_t *new_gNB_dlsch(NR_DL_FRAME_PARMS *frame_parms, @param ue Pointer to PHY variables @param UE_id id of current UE @param frame Frame number - @param nr_tti_rx TTI number - @param symbol Symbol on which to act (within-in nr_TTI_rx) + @param slot Slot number @param harq_pid HARQ process ID */ int nr_rx_pusch(PHY_VARS_gNB *gNB, uint8_t UE_id, uint32_t frame, - uint8_t nr_tti_rx, - unsigned char symbol, + uint8_t slot, unsigned char harq_pid); /** \brief This function performs RB extraction (signal and channel estimates) (currently signal only until channel estimation and compensation are implemented) diff --git a/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c b/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c index c1bca8d2a0..72db5488c4 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c +++ b/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c @@ -12,6 +12,8 @@ //#define DEBUG_RB_EXT //#define DEBUG_CH_MAG +#define INVALID_VALUE 255 + void nr_idft(int32_t *z, uint32_t Msc_PUSCH) { @@ -1157,12 +1159,11 @@ void nr_ulsch_detection_mrc(NR_DL_FRAME_PARMS *frame_parms, int nr_rx_pusch(PHY_VARS_gNB *gNB, uint8_t ulsch_id, uint32_t frame, - uint8_t nr_tti_rx, - unsigned char symbol, + uint8_t slot, unsigned char harq_pid) { - uint8_t aarx, aatx, dmrs_symbol_flag; // dmrs_symbol_flag, a flag to indicate DMRS REs in current symbol + uint8_t aarx, aatx; uint32_t nb_re_pusch, bwp_start_subcarrier; int avgs; int avg[4]; @@ -1170,204 +1171,194 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB, NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms; nfapi_nr_pusch_pdu_t *rel15_ul = &gNB->ulsch[ulsch_id][0]->harq_processes[harq_pid]->ulsch_pdu; - dmrs_symbol_flag = 0; - - if(symbol == rel15_ul->start_symbol_index){ - gNB->pusch_vars[ulsch_id]->dmrs_symbol = 0; - gNB->pusch_vars[ulsch_id]->cl_done = 0; - } - + gNB->pusch_vars[ulsch_id]->dmrs_symbol = INVALID_VALUE; + gNB->pusch_vars[ulsch_id]->cl_done = 0; bwp_start_subcarrier = ((rel15_ul->rb_start + rel15_ul->bwp_start)*NR_NB_SC_PER_RB + frame_parms->first_carrier_offset) % frame_parms->ofdm_symbol_size; - - dmrs_symbol_flag = ((rel15_ul->ul_dmrs_symb_pos)>>symbol)&0x01; - - LOG_D(PHY,"symbol %d bwp_start_subcarrier %d, rb_start %d, first_carrier_offset %d\n",symbol,bwp_start_subcarrier,rel15_ul->rb_start,frame_parms->first_carrier_offset); + LOG_D(PHY,"bwp_start_subcarrier %d, rb_start %d, first_carrier_offset %d\n", bwp_start_subcarrier, rel15_ul->rb_start, frame_parms->first_carrier_offset); LOG_D(PHY,"ul_dmrs_symb_pos %x\n",rel15_ul->ul_dmrs_symb_pos); - if (dmrs_symbol_flag == 1){ - if (((rel15_ul->ul_dmrs_symb_pos)>>((symbol+1)%frame_parms->symbols_per_slot))&0x01) - AssertFatal(1==0,"Double DMRS configuration is not yet supported\n"); - - if (rel15_ul->dmrs_config_type == 0) { - // if no data in dmrs cdm group is 1 only even REs have no data - // if no data in dmrs cdm group is 2 both odd and even REs have no data - nb_re_pusch = rel15_ul->rb_size *(12 - (rel15_ul->num_dmrs_cdm_grps_no_data*6)); - } - else { - nb_re_pusch = rel15_ul->rb_size *(12 - (rel15_ul->num_dmrs_cdm_grps_no_data*4)); - } - LOG_D(PHY,"dmrs_symbol: nb_re_pusch %d\n",nb_re_pusch); - gNB->pusch_vars[ulsch_id]->dmrs_symbol = symbol; - - } else { - nb_re_pusch = rel15_ul->rb_size * NR_NB_SC_PER_RB; - } - //---------------------------------------------------------- //--------------------- Channel estimation --------------------- //---------------------------------------------------------- start_meas(&gNB->ulsch_channel_estimation_stats); - if (dmrs_symbol_flag == 1) { - nr_pusch_channel_estimation(gNB, - nr_tti_rx, - 0, // p - symbol, - ulsch_id, - bwp_start_subcarrier, - rel15_ul); + for(uint8_t symbol = rel15_ul->start_symbol_index; symbol < (rel15_ul->start_symbol_index + rel15_ul->nr_of_symbols); symbol++) { + uint8_t dmrs_symbol_flag = (rel15_ul->ul_dmrs_symb_pos >> symbol) & 0x01; + LOG_D(PHY,"symbol %d, dmrs_symbol_flag :%d\n", symbol, dmrs_symbol_flag); + if (dmrs_symbol_flag == 1) { + if (gNB->pusch_vars[ulsch_id]->dmrs_symbol == INVALID_VALUE) + gNB->pusch_vars[ulsch_id]->dmrs_symbol = symbol; - nr_gnb_measurements(gNB, ulsch_id, harq_pid, symbol); + nr_pusch_channel_estimation(gNB, + slot, + 0, // p + symbol, + ulsch_id, + bwp_start_subcarrier, + rel15_ul); - for (aarx = 0; aarx < frame_parms->nb_antennas_rx; aarx++) { - gNB->pusch_vars[ulsch_id]->ulsch_power[aarx] = signal_energy_nodc(&gNB->pusch_vars[ulsch_id]->ul_ch_estimates[aarx][symbol*frame_parms->ofdm_symbol_size], - rel15_ul->rb_size*12); - if (gNB->pusch_vars[ulsch_id]->ulsch_power[aarx]==1) return (1); + nr_gnb_measurements(gNB, ulsch_id, harq_pid, symbol); + + for (aarx = 0; aarx < frame_parms->nb_antennas_rx; aarx++) { + gNB->pusch_vars[ulsch_id]->ulsch_power[aarx] = signal_energy_nodc(&gNB->pusch_vars[ulsch_id]->ul_ch_estimates[aarx][symbol*frame_parms->ofdm_symbol_size], + rel15_ul->rb_size*12); + if (gNB->pusch_vars[ulsch_id]->ulsch_power[aarx] == 1) + return 1; + } } - } stop_meas(&gNB->ulsch_channel_estimation_stats); - //---------------------------------------------------------- - //--------------------- RBs extraction --------------------- - //---------------------------------------------------------- - gNB->pusch_vars[ulsch_id]->ul_valid_re_per_slot[symbol] = nb_re_pusch; +#ifdef __AVX2__ + int off = ((rel15_ul->rb_size&1) == 1)? 4:0; +#else + int off = 0; +#endif + uint32_t rxdataF_ext_offset = 0; - if (nb_re_pusch > 0) { + for(uint8_t symbol = rel15_ul->start_symbol_index; symbol < (rel15_ul->start_symbol_index + rel15_ul->nr_of_symbols); symbol++) { + uint8_t dmrs_symbol_flag = (rel15_ul->ul_dmrs_symb_pos >> symbol) & 0x01; + if (dmrs_symbol_flag == 1) { + if ((rel15_ul->ul_dmrs_symb_pos >> ((symbol + 1) % frame_parms->symbols_per_slot)) & 0x01) + AssertFatal(1==0,"Double DMRS configuration is not yet supported\n"); - start_meas(&gNB->ulsch_rbs_extraction_stats); - nr_ulsch_extract_rbs_single(gNB->common_vars.rxdataF, - gNB->pusch_vars[ulsch_id], - symbol, - dmrs_symbol_flag, - rel15_ul, - frame_parms); - stop_meas(&gNB->ulsch_rbs_extraction_stats); + gNB->pusch_vars[ulsch_id]->dmrs_symbol = symbol; - //---------------------------------------------------------- - //--------------------- Channel Scaling -------------------- - //---------------------------------------------------------- - - nr_ulsch_scale_channel(gNB->pusch_vars[ulsch_id]->ul_ch_estimates_ext, - frame_parms, - gNB->ulsch[ulsch_id], - symbol, - dmrs_symbol_flag, - rel15_ul->rb_size, - rel15_ul->dmrs_config_type); - - - if (gNB->pusch_vars[ulsch_id]->cl_done==0) { - - nr_ulsch_channel_level(gNB->pusch_vars[ulsch_id]->ul_ch_estimates_ext, - frame_parms, - avg, - symbol, - nb_re_pusch, - rel15_ul->rb_size); - - avgs = 0; - - for (aatx=0;aatxnb_antennas_rx;aarx++) - avgs = cmax(avgs,avg[(aatx<<1)+aarx]); - - gNB->pusch_vars[ulsch_id]->log2_maxh = (log2_approx(avgs)/2)+3; - gNB->pusch_vars[ulsch_id]->cl_done = 1; + if (rel15_ul->dmrs_config_type == 0) { + // if no data in dmrs cdm group is 1 only even REs have no data + // if no data in dmrs cdm group is 2 both odd and even REs have no data + nb_re_pusch = rel15_ul->rb_size *(12 - (rel15_ul->num_dmrs_cdm_grps_no_data*6)); + } + else { + nb_re_pusch = rel15_ul->rb_size *(12 - (rel15_ul->num_dmrs_cdm_grps_no_data*4)); + } + } else { + nb_re_pusch = rel15_ul->rb_size * NR_NB_SC_PER_RB; } - //---------------------------------------------------------- - //--------------------- Channel Compensation --------------- - //---------------------------------------------------------- + gNB->pusch_vars[ulsch_id]->ul_valid_re_per_slot[symbol] = nb_re_pusch; + LOG_D(PHY,"symbol %d: nb_re_pusch %d, DMRS symbl used for Chest :%d \n", symbol, nb_re_pusch, gNB->pusch_vars[ulsch_id]->dmrs_symbol); - start_meas(&gNB->ulsch_channel_compensation_stats); - nr_ulsch_channel_compensation(gNB->pusch_vars[ulsch_id]->rxdataF_ext, - gNB->pusch_vars[ulsch_id]->ul_ch_estimates_ext, - gNB->pusch_vars[ulsch_id]->ul_ch_mag0, - gNB->pusch_vars[ulsch_id]->ul_ch_magb0, - gNB->pusch_vars[ulsch_id]->rxdataF_comp, - (nb_antennas_ue_tx>1) ? gNB->pusch_vars[ulsch_id]->rho : NULL, - frame_parms, + //---------------------------------------------------------- + //--------------------- RBs extraction --------------------- + //---------------------------------------------------------- + if (nb_re_pusch > 0) { + + start_meas(&gNB->ulsch_rbs_extraction_stats); + nr_ulsch_extract_rbs_single(gNB->common_vars.rxdataF, + gNB->pusch_vars[ulsch_id], symbol, dmrs_symbol_flag, - rel15_ul->qam_mod_order, - rel15_ul->rb_size, - gNB->pusch_vars[ulsch_id]->log2_maxh); - stop_meas(&gNB->ulsch_channel_compensation_stats); + rel15_ul, + frame_parms); + stop_meas(&gNB->ulsch_rbs_extraction_stats); - start_meas(&gNB->ulsch_mrc_stats); - nr_ulsch_detection_mrc(frame_parms, - gNB->pusch_vars[ulsch_id]->rxdataF_comp, - gNB->pusch_vars[ulsch_id]->ul_ch_mag, - gNB->pusch_vars[ulsch_id]->ul_ch_magb, - symbol, - rel15_ul->rb_size); - stop_meas(&gNB->ulsch_mrc_stats); + //---------------------------------------------------------- + //--------------------- Channel Scaling -------------------- + //---------------------------------------------------------- + nr_ulsch_scale_channel(gNB->pusch_vars[ulsch_id]->ul_ch_estimates_ext, + frame_parms, + gNB->ulsch[ulsch_id], + symbol, + dmrs_symbol_flag, + rel15_ul->rb_size, + rel15_ul->dmrs_config_type); + if (gNB->pusch_vars[ulsch_id]->cl_done==0) { + nr_ulsch_channel_level(gNB->pusch_vars[ulsch_id]->ul_ch_estimates_ext, + frame_parms, + avg, + symbol, + nb_re_pusch, + rel15_ul->rb_size); + + avgs = 0; + + for (aatx=0;aatxnb_antennas_rx;aarx++) + avgs = cmax(avgs,avg[(aatx<<1)+aarx]); + + gNB->pusch_vars[ulsch_id]->log2_maxh = (log2_approx(avgs)/2)+3; + gNB->pusch_vars[ulsch_id]->cl_done = 1; + } + + //---------------------------------------------------------- + //--------------------- Channel Compensation --------------- + //---------------------------------------------------------- + start_meas(&gNB->ulsch_channel_compensation_stats); + nr_ulsch_channel_compensation(gNB->pusch_vars[ulsch_id]->rxdataF_ext, + gNB->pusch_vars[ulsch_id]->ul_ch_estimates_ext, + gNB->pusch_vars[ulsch_id]->ul_ch_mag0, + gNB->pusch_vars[ulsch_id]->ul_ch_magb0, + gNB->pusch_vars[ulsch_id]->rxdataF_comp, + (nb_antennas_ue_tx>1) ? gNB->pusch_vars[ulsch_id]->rho : NULL, + frame_parms, + symbol, + dmrs_symbol_flag, + rel15_ul->qam_mod_order, + rel15_ul->rb_size, + gNB->pusch_vars[ulsch_id]->log2_maxh); + stop_meas(&gNB->ulsch_channel_compensation_stats); + + start_meas(&gNB->ulsch_mrc_stats); + nr_ulsch_detection_mrc(frame_parms, + gNB->pusch_vars[ulsch_id]->rxdataF_comp, + gNB->pusch_vars[ulsch_id]->ul_ch_mag, + gNB->pusch_vars[ulsch_id]->ul_ch_magb, + symbol, + rel15_ul->rb_size); + stop_meas(&gNB->ulsch_mrc_stats); + + if (rel15_ul->transform_precoding == transform_precoder_enabled) { - if (rel15_ul->transform_precoding == transform_precoder_enabled) { - #ifdef __AVX2__ // For odd number of resource blocks need byte alignment to multiple of 8 int nb_re_pusch2 = nb_re_pusch + (nb_re_pusch&7); #else int nb_re_pusch2 = nb_re_pusch; - #endif - - // perform IDFT operation on the compensated rxdata if transform precoding is enabled - nr_idft(&gNB->pusch_vars[ulsch_id]->rxdataF_comp[0][symbol * nb_re_pusch2], nb_re_pusch); - LOG_D(PHY,"Transform precoding being done on data- symbol: %d, nb_re_pusch: %d\n", symbol, nb_re_pusch); - } + #endif + // perform IDFT operation on the compensated rxdata if transform precoding is enabled + nr_idft(&gNB->pusch_vars[ulsch_id]->rxdataF_comp[0][symbol * nb_re_pusch2], nb_re_pusch); + LOG_D(PHY,"Transform precoding being done on data- symbol: %d, nb_re_pusch: %d\n", symbol, nb_re_pusch); + } - //---------------------------------------------------------- - //--------------------- PTRS Processing -------------------- - //---------------------------------------------------------- + //---------------------------------------------------------- + //--------------------- PTRS Processing -------------------- + //---------------------------------------------------------- + /* In case PTRS is enabled then LLR will be calculated after PTRS symbols are processed * + * otherwise LLR are calculated for each symbol based upon DMRS channel estimates only. */ + if (rel15_ul->pdu_bit_map & PUSCH_PDU_BITMAP_PUSCH_PTRS) { + start_meas(&gNB->ulsch_ptrs_processing_stats); + nr_pusch_ptrs_processing(gNB, + frame_parms, + rel15_ul, + ulsch_id, + slot, + symbol, + nb_re_pusch); + stop_meas(&gNB->ulsch_ptrs_processing_stats); - /* In case PTRS is enabled then LLR will be calculated after PTRS symbols are processed * - * otherwise LLR are calculated for each symbol based upon DMRS channel estimates only. */ - if (rel15_ul->pdu_bit_map & PUSCH_PDU_BITMAP_PUSCH_PTRS) - { - start_meas(&gNB->ulsch_ptrs_processing_stats); - nr_pusch_ptrs_processing(gNB, - frame_parms, - rel15_ul, - ulsch_id, - nr_tti_rx, - symbol, - nb_re_pusch); - stop_meas(&gNB->ulsch_ptrs_processing_stats); + /* Subtract total PTRS RE's in the symbol from PUSCH RE's */ + gNB->pusch_vars[ulsch_id]->ul_valid_re_per_slot[symbol] -= gNB->pusch_vars[ulsch_id]->ptrs_re_per_slot; + } - /* Subtract total PTRS RE's in the symbol from PUSCH RE's */ - gNB->pusch_vars[ulsch_id]->ul_valid_re_per_slot[symbol] -= gNB->pusch_vars[ulsch_id]->ptrs_re_per_slot; - } - } - - /*---------------------------------------------------------------------------------------------------- */ - /*-------------------- LLRs computation -------------------------------------------------------------*/ - /*-----------------------------------------------------------------------------------------------------*/ - if(symbol == (rel15_ul->start_symbol_index + rel15_ul->nr_of_symbols -1)) { - -#ifdef __AVX2__ - int off = ((rel15_ul->rb_size&1) == 1)? 4:0; -#else - int off = 0; -#endif - uint32_t rxdataF_ext_offset = 0; - for(uint8_t i =rel15_ul->start_symbol_index; i< (rel15_ul->start_symbol_index + rel15_ul->nr_of_symbols);i++) { + /*---------------------------------------------------------------------------------------------------- */ + /*-------------------- LLRs computation -------------------------------------------------------------*/ + /*-----------------------------------------------------------------------------------------------------*/ start_meas(&gNB->ulsch_llr_stats); - nr_ulsch_compute_llr(&gNB->pusch_vars[ulsch_id]->rxdataF_comp[0][i * (off + rel15_ul->rb_size * NR_NB_SC_PER_RB)], - gNB->pusch_vars[ulsch_id]->ul_ch_mag0, - gNB->pusch_vars[ulsch_id]->ul_ch_magb0, - &gNB->pusch_vars[ulsch_id]->llr[rxdataF_ext_offset * rel15_ul->qam_mod_order], - rel15_ul->rb_size, - gNB->pusch_vars[ulsch_id]->ul_valid_re_per_slot[i], - i, - rel15_ul->qam_mod_order); + nr_ulsch_compute_llr(&gNB->pusch_vars[ulsch_id]->rxdataF_comp[0][symbol * (off + rel15_ul->rb_size * NR_NB_SC_PER_RB)], + gNB->pusch_vars[ulsch_id]->ul_ch_mag0, + gNB->pusch_vars[ulsch_id]->ul_ch_magb0, + &gNB->pusch_vars[ulsch_id]->llr[rxdataF_ext_offset * rel15_ul->qam_mod_order], + rel15_ul->rb_size, + gNB->pusch_vars[ulsch_id]->ul_valid_re_per_slot[symbol], + symbol, + rel15_ul->qam_mod_order); stop_meas(&gNB->ulsch_llr_stats); - rxdataF_ext_offset += gNB->pusch_vars[ulsch_id]->ul_valid_re_per_slot[i]; - }// symbol loop - }// last symbol check - - return (0); + rxdataF_ext_offset += gNB->pusch_vars[ulsch_id]->ul_valid_re_per_slot[symbol]; + } + } // symbol loop + + return 0; } diff --git a/openair1/SCHED_NR/phy_procedures_nr_gNB.c b/openair1/SCHED_NR/phy_procedures_nr_gNB.c index d44c8641a6..6ecb720d77 100644 --- a/openair1/SCHED_NR/phy_procedures_nr_gNB.c +++ b/openair1/SCHED_NR/phy_procedures_nr_gNB.c @@ -638,19 +638,15 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) pusch_decode_done = 1; - uint8_t symbol_start = ulsch_harq->ulsch_pdu.start_symbol_index; - uint8_t symbol_end = symbol_start + ulsch_harq->ulsch_pdu.nr_of_symbols; VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_RX_PUSCH,1); - start_meas(&gNB->rx_pusch_stats); - for(uint8_t symbol = symbol_start; symbol < symbol_end; symbol++) { - no_sig = nr_rx_pusch(gNB, ULSCH_id, frame_rx, slot_rx, symbol, harq_pid); - if (no_sig) { - LOG_I(PHY, "PUSCH not detected in symbol %d\n",symbol); - nr_fill_indication(gNB,frame_rx, slot_rx, ULSCH_id, harq_pid, 1); - return; - } - } - stop_meas(&gNB->rx_pusch_stats); + start_meas(&gNB->rx_pusch_stats); + no_sig = nr_rx_pusch(gNB, ULSCH_id, frame_rx, slot_rx, harq_pid); + if (no_sig) { + LOG_I(PHY, "PUSCH not detected in frame %d, slot %d\n", frame_rx, slot_rx); + nr_fill_indication(gNB, frame_rx, slot_rx, ULSCH_id, harq_pid, 1); + return; + } + stop_meas(&gNB->rx_pusch_stats); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_RX_PUSCH,0); //LOG_M("rxdataF_comp.m","rxF_comp",gNB->pusch_vars[0]->rxdataF_comp[0],6900,1,1); //LOG_M("rxdataF_ext.m","rxF_ext",gNB->pusch_vars[0]->rxdataF_ext[0],6900,1,1); From 1c61be68e6eedaf43903e9d87b38833470bd4ddc Mon Sep 17 00:00:00 2001 From: Thomas Schlichter Date: Fri, 23 Apr 2021 13:25:41 +0200 Subject: [PATCH 206/579] Add more test cases for nr_dlsim and nr_ulsim --- cmake_targets/autotests/test_case_list.xml | 32 ++++++++++++---------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/cmake_targets/autotests/test_case_list.xml b/cmake_targets/autotests/test_case_list.xml index b0511f63cc..29257e482f 100644 --- a/cmake_targets/autotests/test_case_list.xml +++ b/cmake_targets/autotests/test_case_list.xml @@ -1099,8 +1099,9 @@ (Test14: 3 PTRS, 8 Interpolated Symbols), (Test15: 6 PTRS, 5 Interpolated Symbols), (Test16: 11 PTRS, 0 Interpolated Symbols), - (Test17: 2 DMRS Symbols), - (Test18: 3 DMRS Symbols) + (Test17: Mapping type A, 2 DMRS Symbols), + (Test18: Mapping type A, 3 DMRS Symbols), + (Test19: Mapping type B, 4 DMRS Symbols) $OPENAIR_DIR/cmake_targets/build_oai --phy_simulators -c @@ -1124,8 +1125,9 @@ -n100 -s5 -T 2 1 2 -n100 -s5 -T 2 0 4 -n100 -s2 -U 2 0 1 - -n100 -s2 -U 2 0 2 - nr_dlsim.test1 nr_dlsim.test2 nr_dlsim.test3 nr_dlsim.test4 nr_dlsim.test5 nr_dlsim.test6 nr_dlsim.test7 nr_dlsim.test8 nr_dlsim.test9 nr_dlsim.test10 nr_dlsim.test11 nr_dlsim.test12 nr_dlsim.test13 nr_dlsim.test14 nr_dlsim.test15 nr_dlsim.test16 nr_dlsim.test17 nr_dlsim.test18 + -n100 -s2 -U 2 0 2 + -n100 -s2 -U 2 1 3 + nr_dlsim.test1 nr_dlsim.test2 nr_dlsim.test3 nr_dlsim.test4 nr_dlsim.test5 nr_dlsim.test6 nr_dlsim.test7 nr_dlsim.test8 nr_dlsim.test9 nr_dlsim.test10 nr_dlsim.test11 nr_dlsim.test12 nr_dlsim.test13 nr_dlsim.test14 nr_dlsim.test15 nr_dlsim.test16 nr_dlsim.test17 nr_dlsim.test18 nr_dlsim.test19 PDSCH test OK segmentation fault|assertion|exiting|fatal 3 @@ -1287,15 +1289,16 @@ (Test3: MCS 28 50 PRBs), (Test4: MCS 9 217 PRBs), (Test5: MCS 9 273 PRBs), - (Test6: DMRS Type A, 3 DMRS, 4 PTRS, 5 Interpolated Symbols), - (Test7: DMRS Type B, 3 DMRS, 2 PTRS, 7 Interpolated Symbols), - (Test8: DMRS Type B, 3 DMRS, 2 PTRS, 3 Interpolated Symbols), - (Test9: SC-FDMA, 50 PRBs), - (Test10: SC-FDMA, 75 PRBs), - (Test11: SC-FDMA, 216 PRBs), - (Test12: SC-FDMA, 273 PRBs), - (Test13: SC-FDMA, 3 DMRS), - (Test14: MCS 16 50 PRBs 2 RX_Antenna) + (Test6: DMRS Type A, 2 DMRS Symbols), + (Test7: DMRS Type A, 3 DMRS, 4 PTRS, 5 Interpolated Symbols), + (Test8: DMRS Type B, 3 DMRS, 2 PTRS, 7 Interpolated Symbols), + (Test9: DMRS Type B, 3 DMRS, 2 PTRS, 3 Interpolated Symbols), + (Test10: SC-FDMA, 50 PRBs), + (Test11: SC-FDMA, 75 PRBs), + (Test12: SC-FDMA, 216 PRBs), + (Test13: SC-FDMA, 273 PRBs), + (Test14: SC-FDMA, 3 DMRS), + (Test15: MCS 16 50 PRBs 2 RX_Antenna) $OPENAIR_DIR/cmake_targets/build_oai --phy_simulators -c @@ -1307,6 +1310,7 @@ -n100 -m28 -s20 -n100 -m9 -R217 -r217 -s5 -n100 -m9 -R273 -r273 -s5 + -n100 -s5 -U 2 0 1 -n100 -s5 -T 2 1 2 -U 2 0 2 -n100 -s5 -T 2 2 2 -U 2 1 2 -n100 -s5 -a4 -b8 -T 2 1 2 -U 2 1 3 @@ -1317,7 +1321,7 @@ -n100 -s2 -Z -U 2 0 2 -n100 -m16 -s10 -z2 - nr_ulsim.test1 nr_ulsim.test2 nr_ulsim.test3 nr_ulsim.test4 nr_ulsim.test5 nr_ulsim.test6 nr_ulsim.test7 nr_ulsim.test8 nr_ulsim.test9 nr_ulsim.test10 nr_ulsim.test11 nr_ulsim.test12 nr_ulsim.test13 nr_ulsim.test14 + nr_ulsim.test1 nr_ulsim.test2 nr_ulsim.test3 nr_ulsim.test4 nr_ulsim.test5 nr_ulsim.test6 nr_ulsim.test7 nr_ulsim.test8 nr_ulsim.test9 nr_ulsim.test10 nr_ulsim.test11 nr_ulsim.test12 nr_ulsim.test13 nr_ulsim.test14 nr_ulsim.test15 PUSCH test OK segmentation fault|assertion|exiting|fatal 3 From ffdffb1b838fb4eee3e8aaa5be869b59198f4520 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Fri, 23 Apr 2021 12:57:49 +0100 Subject: [PATCH 207/579] Fix warnings --- openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c | 2 +- openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c | 1 - openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c b/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c index e655e153e7..48fc31b10e 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c +++ b/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c @@ -1229,7 +1229,7 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB, rel15_ul->rb_size*12)/num_symb; if (gNB->pusch_vars[ulsch_id]->ulsch_power[aarx]==1) return (1); for (int rb=0;rbrb_size;rb++) { - printf("aarx %d symbol %d, rb %d => %d\n",aarx,symbol,rb,dB_fixed(gNB->measurements.n0_subband_power[aarx][rel15_ul->bwp_start+rel15_ul->rb_start+rb])); + LOG_D(NR_PHY, "aarx %d symbol %d, rb %d => %d\n",aarx,symbol,rb,dB_fixed(gNB->measurements.n0_subband_power[aarx][rel15_ul->bwp_start+rel15_ul->rb_start+rb])); gNB->pusch_vars[ulsch_id]->ulsch_noise_power[aarx]+=gNB->measurements.n0_subband_power[aarx][rel15_ul->bwp_start+rel15_ul->rb_start+rb]/rel15_ul->rb_size/num_symb; } } diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c index 1652939ff1..b85b777566 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c @@ -588,7 +588,6 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue, } else { LOG_D(PHY,"CRC NOT OK\n\033[0m"); - ret = 1 + dlsch->max_ldpc_iterations; } diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c index 766ad041a4..1a908a4b4e 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c @@ -311,7 +311,7 @@ void nr_preprocessor_phytest(module_id_t module_id, sched_ctrl->num_total_bytes += sched_ctrl->rlc_status[lcid].bytes_in_buffer; const int target_ss = NR_SearchSpace__searchSpaceType_PR_ue_Specific; - sched_ctrl->search_space = get_searchspace(scc,sched_ctrl->active_bwp, target_ss); + sched_ctrl->search_space = get_searchspace(scc,sched_ctrl->active_bwp->bwp_Dedicated, target_ss); uint8_t nr_of_candidates; find_aggregation_candidates(&sched_ctrl->aggregation_level, &nr_of_candidates, @@ -437,7 +437,7 @@ bool nr_ul_preprocessor_phytest(module_id_t module_id, sched_ctrl->sched_pusch.frame = sched_frame; const int target_ss = NR_SearchSpace__searchSpaceType_PR_ue_Specific; - sched_ctrl->search_space = get_searchspace(scc,sched_ctrl->active_bwp, target_ss); + sched_ctrl->search_space = get_searchspace(scc,sched_ctrl->active_bwp->bwp_Dedicated, target_ss); uint8_t nr_of_candidates; find_aggregation_candidates(&sched_ctrl->aggregation_level, &nr_of_candidates, From d4d18719993cb085db92f61a3a4005231ac28ed0 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Fri, 23 Apr 2021 16:21:46 +0100 Subject: [PATCH 208/579] Fix numerology for CFRA at UE --- openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c index 2d91b03002..c06d22c7e7 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c @@ -1146,7 +1146,7 @@ static void build_ro_list(NR_UE_MAC_INST_t *mac) { uint8_t format2 = 0xff; int nb_fdm; - uint8_t config_index, mu=get_softmodem_params()->numerology; + uint8_t config_index, mu; int msg1_FDM; uint8_t prach_conf_period_idx; @@ -1161,6 +1161,14 @@ static void build_ro_list(NR_UE_MAC_INST_t *mac) { config_index = rach_ConfigGeneric->prach_ConfigurationIndex; + if (setup->msg1_SubcarrierSpacing) { + mu = *setup->msg1_SubcarrierSpacing; + } else if(mac->scc) { + mu = mac->scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing; + } else { + mu = get_softmodem_params()->numerology; + } + msg1_FDM = rach_ConfigGeneric->msg1_FDM; switch (msg1_FDM){ From bee0721126e89003e376e570908d56bd80cbe416 Mon Sep 17 00:00:00 2001 From: Thomas Schlichter Date: Fri, 23 Apr 2021 17:32:28 +0200 Subject: [PATCH 209/579] Add 4x4 MIMO test cases for nr_dlsim --- cmake_targets/autotests/test_case_list.xml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/cmake_targets/autotests/test_case_list.xml b/cmake_targets/autotests/test_case_list.xml index b0511f63cc..7ad7f2ef5b 100644 --- a/cmake_targets/autotests/test_case_list.xml +++ b/cmake_targets/autotests/test_case_list.xml @@ -1100,7 +1100,9 @@ (Test15: 6 PTRS, 5 Interpolated Symbols), (Test16: 11 PTRS, 0 Interpolated Symbols), (Test17: 2 DMRS Symbols), - (Test18: 3 DMRS Symbols) + (Test18: 3 DMRS Symbols), + (Test19: 4x4 MIMO, 1 Layer), + (Test20: 4x4 MIMO, 2 Layers) $OPENAIR_DIR/cmake_targets/build_oai --phy_simulators -c @@ -1124,8 +1126,10 @@ -n100 -s5 -T 2 1 2 -n100 -s5 -T 2 0 4 -n100 -s2 -U 2 0 1 - -n100 -s2 -U 2 0 2 - nr_dlsim.test1 nr_dlsim.test2 nr_dlsim.test3 nr_dlsim.test4 nr_dlsim.test5 nr_dlsim.test6 nr_dlsim.test7 nr_dlsim.test8 nr_dlsim.test9 nr_dlsim.test10 nr_dlsim.test11 nr_dlsim.test12 nr_dlsim.test13 nr_dlsim.test14 nr_dlsim.test15 nr_dlsim.test16 nr_dlsim.test17 nr_dlsim.test18 + -n100 -s2 -U 2 0 2 + -n10 -s20 -U 3 0 0 2 -gR -x1 -y4 -z4 + -n10 -s20 -U 3 0 0 2 -gR -x2 -y4 -z4 + nr_dlsim.test1 nr_dlsim.test2 nr_dlsim.test3 nr_dlsim.test4 nr_dlsim.test5 nr_dlsim.test6 nr_dlsim.test7 nr_dlsim.test8 nr_dlsim.test9 nr_dlsim.test10 nr_dlsim.test11 nr_dlsim.test12 nr_dlsim.test13 nr_dlsim.test14 nr_dlsim.test15 nr_dlsim.test16 nr_dlsim.test17 nr_dlsim.test18 nr_dlsim.test19 nr_dlsim.test20 PDSCH test OK segmentation fault|assertion|exiting|fatal 3 From b6f0597b0d8578477cddf2307db016ed7364cab8 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Fri, 23 Apr 2021 16:48:00 +0100 Subject: [PATCH 210/579] Fix segmentation fault for CFRA-Msg2 at gNB --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 0910ad32f9..9e34ecfc54 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -532,10 +532,11 @@ void nr_initiate_ra_proc(module_id_t module_idP, ra->bwp_id = 0; NR_BWP_Downlink_t *bwp=NULL; if (ra->CellGroup && ra->CellGroup->spCellConfig && ra->CellGroup->spCellConfig->spCellConfigDedicated && - ra->CellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList) { - bwp = ra->CellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[ra->bwp_id - 1]; - ra->bwp_id = 1; + ra->CellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList) { + ra->bwp_id = 1; + bwp = ra->CellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[ra->bwp_id - 1]; } + VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_INITIATE_RA_PROC, 1); LOG_D(NR_MAC, From 100a0123274e217ec19f3ca33f567210d47a8674 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Fri, 23 Apr 2021 17:56:23 +0100 Subject: [PATCH 211/579] Fix DCI extract for CFRA-Msg2 at UE --- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 8a75406166..9061059303 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -1171,10 +1171,11 @@ uint8_t nr_extract_dci_info(NR_UE_MAC_INST_t *mac, case NR_DL_DCI_FORMAT_1_0: switch(rnti_type) { case NR_RNTI_RA: - // check BWP id - if (mac->DLbwp[0]) N_RB=NRRIV2BW(mac->DLbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - else N_RB=NRRIV2BW(mac->scc_SIB->downlinkConfigCommon.initialDownlinkBWP.genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - + if(mac->scc_SIB) { + N_RB = NRRIV2BW(mac->scc_SIB->downlinkConfigCommon.initialDownlinkBWP.genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + } else { + N_RB = get_n_rb(mac, rnti_type); + } // Freq domain assignment fsize = (int)ceil( log2( (N_RB*(N_RB+1))>>1 ) ); pos=fsize; From f528703f515bb439465d95152396b7809e9cf75e Mon Sep 17 00:00:00 2001 From: rmagueta Date: Fri, 23 Apr 2021 18:19:19 +0100 Subject: [PATCH 212/579] Fix first CBRA failure --- openair1/PHY/NR_UE_ESTIMATION/nr_adjust_synch_ue.c | 2 +- openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openair1/PHY/NR_UE_ESTIMATION/nr_adjust_synch_ue.c b/openair1/PHY/NR_UE_ESTIMATION/nr_adjust_synch_ue.c index 0318ed6478..a2f824e468 100644 --- a/openair1/PHY/NR_UE_ESTIMATION/nr_adjust_synch_ue.c +++ b/openair1/PHY/NR_UE_ESTIMATION/nr_adjust_synch_ue.c @@ -105,7 +105,7 @@ void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms, { first_time = 0; ue->time_sync_cell = 1; - if (get_softmodem_params()->do_ra) { + if (get_softmodem_params()->do_ra || get_softmodem_params()->sa) { LOG_I(PHY,"[UE%d] Sending synch status to higher layers\n",ue->Mod_id); //mac_resynch(); //dl_phy_sync_success(ue->Mod_id,frame,0,1);//ue->common_vars.eNb_id); diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c index 1c02badd4a..df5bb70c06 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c @@ -518,7 +518,7 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources, // Delay init RA procedure to allow the convergence of the IIR filter on PRACH noise measurements at gNB side if (!prach_resources->init_msg1) { - if ( (mac->common_configuration_complete > 0) || (get_softmodem_params()->do_ra==1&&((MAX_FRAME_NUMBER+frame-prach_resources->sync_frame)%MAX_FRAME_NUMBER)>150) ){ + if ( (mac->common_configuration_complete>0 || get_softmodem_params()->do_ra==1) && ((MAX_FRAME_NUMBER+frame-prach_resources->sync_frame)%MAX_FRAME_NUMBER)>150 ){ prach_resources->init_msg1 = 1; } else { LOG_D(NR_MAC,"PRACH Condition not met: frame %d, prach_resources->sync_frame %d\n",frame,prach_resources->sync_frame); From b468c0b3f6d151a450866e992b9d813d8767b3e7 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Fri, 23 Apr 2021 20:08:12 +0100 Subject: [PATCH 213/579] Fix BWP for CFRA-Msg2 at UE --- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 21 +++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 9061059303..fca085c16c 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -617,7 +617,7 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr dl_config->dl_config_list[dl_config->number_pdus].dlsch_config_pdu.rnti = rnti; fapi_nr_dl_config_dlsch_pdu_rel15_t *dlsch_config_pdu_1_0 = &dl_config->dl_config_list[dl_config->number_pdus].dlsch_config_pdu.dlsch_config_rel15; NR_PDSCH_Config_t *pdsch_config= (mac->DLbwp[0]) ? mac->DLbwp[0]->bwp_Dedicated->pdsch_Config->choice.setup : NULL; - uint16_t BWPSize = 0; + uint16_t BWPSize = n_RB_DLBWP; if(rnti == SI_RNTI) { dl_config->dl_config_list[dl_config->number_pdus].pdu_type = FAPI_NR_DL_CONFIG_TYPE_SI_DLSCH; @@ -633,19 +633,18 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr dl_config->dl_config_list[dl_config->number_pdus].pdu_type = FAPI_NR_DL_CONFIG_TYPE_DLSCH; } if( (ra->RA_window_cnt >= 0 && rnti == ra->ra_rnti) || (rnti == ra->t_crnti) ) { - if (mac->scc == NULL) { - dlsch_config_pdu_1_0->BWPSize = NRRIV2BW(mac->scc_SIB->downlinkConfigCommon.initialDownlinkBWP.genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + if (mac->scc == NULL) { + dlsch_config_pdu_1_0->BWPSize = NRRIV2BW(mac->scc_SIB->downlinkConfigCommon.initialDownlinkBWP.genericParameters.locationAndBandwidth, MAX_BWP_SIZE); dlsch_config_pdu_1_0->BWPStart = NRRIV2PRBOFFSET(mac->scc_SIB->downlinkConfigCommon.initialDownlinkBWP.genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - } - else { - dlsch_config_pdu_1_0->BWPSize = NRRIV2BW(mac->scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + } + else { + dlsch_config_pdu_1_0->BWPSize = NRRIV2BW(mac->scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); dlsch_config_pdu_1_0->BWPStart = NRRIV2PRBOFFSET(mac->scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - } - if (get_softmodem_params()->sa) { - - } else { // NSA mode is not using the Initial BWP + } + if (!get_softmodem_params()->sa) { // NSA mode is not using the Initial BWP dlsch_config_pdu_1_0->BWPStart = NRRIV2PRBOFFSET(mac->DLbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); pdsch_config = mac->DLbwp[0]->bwp_Dedicated->pdsch_Config->choice.setup; + BWPSize = dlsch_config_pdu_1_0->BWPSize; } } else if (mac->DLbwp[0]) { dlsch_config_pdu_1_0->BWPSize = NRRIV2BW(mac->DLbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); @@ -657,9 +656,7 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr dlsch_config_pdu_1_0->BWPStart = NRRIV2PRBOFFSET(mac->scc_SIB->downlinkConfigCommon.initialDownlinkBWP.genericParameters.locationAndBandwidth, MAX_BWP_SIZE); dlsch_config_pdu_1_0->SubcarrierSpacing = mac->scc_SIB->downlinkConfigCommon.initialDownlinkBWP.genericParameters.subcarrierSpacing; pdsch_config = NULL; - } - BWPSize = n_RB_DLBWP; } /* IDENTIFIER_DCI_FORMATS */ From 7cd4b111011f63c31581988a97251d1eec005d2a Mon Sep 17 00:00:00 2001 From: rmagueta Date: Fri, 23 Apr 2021 23:36:19 +0100 Subject: [PATCH 214/579] Fix selection of Msg3 for CFRA at UE --- openair1/SCHED_NR_UE/pucch_uci_ue_nr.c | 13 ------------- openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c | 6 ++++-- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c index befbd58736..865d0326cc 100644 --- a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c +++ b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c @@ -528,22 +528,9 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_ } } - if (mac->cg && - mac->cg->spCellConfig && - mac->cg->spCellConfig->spCellConfigDedicated && - mac->cg->spCellConfig->spCellConfigDedicated->csi_MeasConfig) - AssertFatal(1==0,"6 > %d.%d csi_MeasConfig is not null\n",frame_tx,nr_slot_tx); - - N_UCI = O_SR + O_ACK + O_CSI; if (N_UCI ==0) return(TRUE); - if (mac->cg && - mac->cg->spCellConfig && - mac->cg->spCellConfig->spCellConfigDedicated && - mac->cg->spCellConfig->spCellConfigDedicated->csi_MeasConfig) - AssertFatal(1==0,"5 > %d.%d csi_MeasConfig is not null\n",frame_tx,nr_slot_tx); - /* Part - III */ /* Choice PUCCH format and its related parameters */ pucch_format_nr_t format = pucch_format0_nr; diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c index c06d22c7e7..06f62abbf6 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c @@ -980,8 +980,10 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in mac->UL_ndi[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id] = ulcfg_pdu->pusch_config_pdu.pusch_data.new_data_indicator; mac->first_ul_tx[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id] = 0; } else { - if (mac->UL_ndi[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id] != ulcfg_pdu->pusch_config_pdu.pusch_data.new_data_indicator|| - mac->first_ul_tx[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id]==1){ + + if ( (mac->UL_ndi[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id] != ulcfg_pdu->pusch_config_pdu.pusch_data.new_data_indicator || + mac->first_ul_tx[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id]==1) && ra->ra_state == RA_SUCCEEDED){ + // Getting IP traffic to be transmitted data_existing = nr_ue_get_sdu(mod_id, cc_id, From b34d8a1ce4d1a7eb9c975de1fe484aaa0764f200 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Sat, 24 Apr 2021 04:22:07 +0100 Subject: [PATCH 215/579] Fix assertion after CFRA at gNB --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index f139db4964..74e71b11a7 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -723,7 +723,7 @@ void nr_configure_pucch(nfapi_nr_pucch_pdu_t* pucch_pdu, pucch_pdu->bwp_start = NRRIV2PRBOFFSET(genericParameters->locationAndBandwidth,MAX_BWP_SIZE); pucch_pdu->subcarrier_spacing = genericParameters->subcarrierSpacing; pucch_pdu->cyclic_prefix = (genericParameters->cyclicPrefix==NULL) ? 0 : *genericParameters->cyclicPrefix; - if (r_pucch<0){ + if (r_pucch<0 || bwp){ // we have either a dedicated BWP or Dedicated PUCCH configuration on InitialBWP pucch_Config = bwp ? bwp->bwp_Dedicated->pucch_Config->choice.setup: From b1ae636d75212d8f352cc36eb5fe65022f4fb7b9 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Sat, 24 Apr 2021 14:42:44 +0100 Subject: [PATCH 216/579] Remove hardcoded rnti for CFRA --- openair2/RRC/NR/rrc_gNB_reconfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/RRC/NR/rrc_gNB_reconfig.c b/openair2/RRC/NR/rrc_gNB_reconfig.c index fa3fcbe10f..8874ff8667 100644 --- a/openair2/RRC/NR/rrc_gNB_reconfig.c +++ b/openair2/RRC/NR/rrc_gNB_reconfig.c @@ -204,7 +204,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco *secondaryCellGroup->spCellConfig->servCellIndex = servCellIndex; secondaryCellGroup->spCellConfig->reconfigurationWithSync=calloc(1,sizeof(*secondaryCellGroup->spCellConfig->reconfigurationWithSync)); secondaryCellGroup->spCellConfig->reconfigurationWithSync->spCellConfigCommon=servingcellconfigcommon; - secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity=0x1234;//(get_softmodem_params()->phy_test==1) ? 0x1234 : (taus()&0xffff); + secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity=(get_softmodem_params()->phy_test==1) ? 0x1234 : (taus()&0xffff); secondaryCellGroup->spCellConfig->reconfigurationWithSync->t304=NR_ReconfigurationWithSync__t304_ms2000; secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated = NULL; secondaryCellGroup->spCellConfig->reconfigurationWithSync->ext1 = NULL; From 0c6762f1485779fbe8065c0334d2e2aac64c5946 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Sat, 24 Apr 2021 19:17:15 +0100 Subject: [PATCH 217/579] Remove duplicated itti msg for NRRRC_CONFIGURATION_REQ --- openair2/GNB_APP/gnb_app.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/openair2/GNB_APP/gnb_app.c b/openair2/GNB_APP/gnb_app.c index 9695583b73..b5c5efa244 100644 --- a/openair2/GNB_APP/gnb_app.c +++ b/openair2/GNB_APP/gnb_app.c @@ -204,17 +204,10 @@ void *gNB_app_task(void *args_p) configure_nr_rrc(gnb_id); } - for (int gnb_id = 0; gnb_id < RC.nb_nr_inst; gnb_id++) { - MessageDef *msg_p = itti_alloc_new_message (TASK_GNB_APP, 0, NRRRC_CONFIGURATION_REQ); - NRRRC_CONFIGURATION_REQ(msg_p) = RC.nrrrc[gnb_id]->configuration; - LOG_I(GNB_APP, "Sending configuration message to NR_RRC task\n"); - itti_send_msg_to_task (TASK_RRC_GNB, GNB_MODULE_ID_TO_INSTANCE(gnb_id), msg_p); - } - if (RC.nb_nr_inst > 0) { init_pdcp(); - } + if (is_x2ap_enabled() ) { //&& !NODE_IS_DU(RC.rrc[0]->node_type) LOG_I(X2AP, "X2AP enabled \n"); __attribute__((unused)) uint32_t x2_register_gnb_pending = gNB_app_register_x2 (gnb_id_start, gnb_id_end); From e2863d5841dcb2186021c32a2f1c074f7f21a1f9 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Sun, 25 Apr 2021 02:55:32 +0100 Subject: [PATCH 218/579] Fix DRB null pointer after CFRA --- openair2/RRC/NR/rrc_gNB_nsa.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/openair2/RRC/NR/rrc_gNB_nsa.c b/openair2/RRC/NR/rrc_gNB_nsa.c index de2f2ca624..70c261f1dc 100644 --- a/openair2/RRC/NR/rrc_gNB_nsa.c +++ b/openair2/RRC/NR/rrc_gNB_nsa.c @@ -63,8 +63,7 @@ extern rlc_op_status_t nr_rrc_rlc_config_asn1_req (const protocol_ctxt_t * con const NR_DRB_ToAddModList_t * const drb2add_listP, const NR_DRB_ToReleaseList_t * const drb2release_listP, const LTE_PMCH_InfoList_r9_t * const pmch_InfoList_r9_pP, - struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_srb_bearer2add_list, - struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_drb_bearer2add_list); + struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_bearer2add_list); void rrc_parse_ue_capabilities(gNB_RRC_INST *rrc, NR_UE_CapabilityRAT_ContainerList_t *UE_CapabilityRAT_ContainerList, x2ap_ENDC_sgnb_addition_req_t *m, NR_CG_ConfigInfo_IEs_t *cg_config_info) { struct rrc_gNB_ue_context_s *ue_context_p = NULL; @@ -393,7 +392,6 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_ ue_context_p->ue_context.rb_config->drb_ToAddModList, ue_context_p->ue_context.rb_config->drb_ToReleaseList, (LTE_PMCH_InfoList_r9_t *) NULL, - NULL, ue_context_p->ue_context.secondaryCellGroup->rlc_BearerToAddModList); LOG_D(RRC, "%s:%d: done RRC PDCP/RLC ASN1 request for UE rnti %x\n", __FUNCTION__, __LINE__, ctxt.rnti); From 23c272dac4d1011db7d84e2c3ceb6c4b56e0deb3 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Sun, 25 Apr 2021 04:30:53 +0100 Subject: [PATCH 219/579] Add SRB --- openair2/RRC/NR/rrc_gNB_nsa.c | 12 ++++++------ openair2/RRC/NR/rrc_gNB_reconfig.c | 17 ++++++++++++++++- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/openair2/RRC/NR/rrc_gNB_nsa.c b/openair2/RRC/NR/rrc_gNB_nsa.c index 70c261f1dc..ae9fcff378 100644 --- a/openair2/RRC/NR/rrc_gNB_nsa.c +++ b/openair2/RRC/NR/rrc_gNB_nsa.c @@ -375,7 +375,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_ nr_rrc_pdcp_config_asn1_req( &ctxt, - (NR_SRB_ToAddModList_t *) NULL, + ue_context_p->ue_context.rb_config->srb_ToAddModList, ue_context_p->ue_context.rb_config->drb_ToAddModList , ue_context_p->ue_context.rb_config->drb_ToReleaseList, (ue_context_p->ue_context.integrity_algorithm << 4) | ue_context_p->ue_context.ciphering_algorithm, @@ -388,11 +388,11 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_ ue_context_p->ue_context.secondaryCellGroup->rlc_BearerToAddModList); nr_rrc_rlc_config_asn1_req (&ctxt, - (NR_SRB_ToAddModList_t *) NULL, - ue_context_p->ue_context.rb_config->drb_ToAddModList, - ue_context_p->ue_context.rb_config->drb_ToReleaseList, - (LTE_PMCH_InfoList_r9_t *) NULL, - ue_context_p->ue_context.secondaryCellGroup->rlc_BearerToAddModList); + ue_context_p->ue_context.rb_config->srb_ToAddModList, + ue_context_p->ue_context.rb_config->drb_ToAddModList, + ue_context_p->ue_context.rb_config->drb_ToReleaseList, + (LTE_PMCH_InfoList_r9_t *) NULL, + ue_context_p->ue_context.secondaryCellGroup->rlc_BearerToAddModList); LOG_D(RRC, "%s:%d: done RRC PDCP/RLC ASN1 request for UE rnti %x\n", __FUNCTION__, __LINE__, ctxt.rnti); diff --git a/openair2/RRC/NR/rrc_gNB_reconfig.c b/openair2/RRC/NR/rrc_gNB_reconfig.c index 8874ff8667..82aae08977 100644 --- a/openair2/RRC/NR/rrc_gNB_reconfig.c +++ b/openair2/RRC/NR/rrc_gNB_reconfig.c @@ -162,6 +162,14 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco secondaryCellGroup->rlc_BearerToAddModList = calloc(1,sizeof(*secondaryCellGroup->rlc_BearerToAddModList)); ASN_SEQUENCE_ADD(&secondaryCellGroup->rlc_BearerToAddModList->list, RLC_BearerConfig); + + NR_RLC_BearerConfig_t *RLC_BearerConfig2 = calloc(1,sizeof(*RLC_BearerConfig2)); + nr_rlc_bearer_init(RLC_BearerConfig2, NR_RLC_BearerConfig__servedRadioBearer_PR_srb_Identity); + nr_drb_config(RLC_BearerConfig2->rlc_Config, NR_RLC_Config_PR_am); + nr_rlc_bearer_init_ul_spec(RLC_BearerConfig2->mac_LogicalChannelConfig); + *RLC_BearerConfig2->mac_LogicalChannelConfig->ul_SpecificParameters->logicalChannelGroup = 0; // FIXME: this should be obtained in nr_rlc_bearer_init_ul_spec() + ASN_SEQUENCE_ADD(&secondaryCellGroup->rlc_BearerToAddModList->list, RLC_BearerConfig2); + secondaryCellGroup->mac_CellGroupConfig=calloc(1,sizeof(*secondaryCellGroup->mac_CellGroupConfig)); secondaryCellGroup->mac_CellGroupConfig->drx_Config = NULL; secondaryCellGroup->mac_CellGroupConfig->schedulingRequestConfig = NULL; @@ -1251,7 +1259,14 @@ void fill_default_rbconfig(NR_RadioBearerConfig_t *rbconfig, e_NR_CipheringAlgorithm ciphering_algorithm, e_NR_SecurityConfig__keyToUse key_to_use) { - rbconfig->srb_ToAddModList = NULL; + rbconfig->srb_ToAddModList = calloc(1,sizeof(*rbconfig->srb_ToAddModList)); + NR_SRB_ToAddMod_t *srb_ToAddMod = calloc(1,sizeof(*srb_ToAddMod)); + srb_ToAddMod->srb_Identity = rb_id; + srb_ToAddMod->reestablishPDCP = NULL; + srb_ToAddMod->discardOnPDCP = NULL; + srb_ToAddMod->pdcp_Config = NULL; + ASN_SEQUENCE_ADD(&rbconfig->srb_ToAddModList->list,srb_ToAddMod); + rbconfig->srb3_ToRelease = NULL; rbconfig->drb_ToAddModList = calloc(1,sizeof(*rbconfig->drb_ToAddModList)); NR_DRB_ToAddMod_t *drb_ToAddMod = calloc(1,sizeof(*drb_ToAddMod)); From cc727b4a89cca185bb44b82a685d7a33dc1193fb Mon Sep 17 00:00:00 2001 From: rmagueta Date: Sun, 25 Apr 2021 04:31:15 +0100 Subject: [PATCH 220/579] Add SRB --- openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c b/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c index 58449264f2..c3de407dad 100644 --- a/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c +++ b/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c @@ -940,16 +940,16 @@ rlc_op_status_t nr_rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt if (srb2add_listP != NULL) { for (i = 0; i < srb2add_listP->list.count; i++) { if (rlc_bearer2add_list != NULL) { - for(j = 0; j < rlc_bearer2add_list->list.count; j++){ - if(rlc_bearer2add_list->list.array[j]->servedRadioBearer != NULL){ - if(rlc_bearer2add_list->list.array[j]->servedRadioBearer->present == NR_RLC_BearerConfig__servedRadioBearer_PR_srb_Identity){ - if(srb2add_listP->list.array[i]->srb_Identity == rlc_bearer2add_list->list.array[j]->servedRadioBearer->choice.srb_Identity){ - add_rlc_srb(rnti, srb2add_listP->list.array[i], rlc_bearer2add_list->list.array[j]); + for(j = 0; j < rlc_bearer2add_list->list.count; j++){ + if(rlc_bearer2add_list->list.array[j]->servedRadioBearer != NULL){ + if(rlc_bearer2add_list->list.array[j]->servedRadioBearer->present == NR_RLC_BearerConfig__servedRadioBearer_PR_srb_Identity){ + if(srb2add_listP->list.array[i]->srb_Identity == rlc_bearer2add_list->list.array[j]->servedRadioBearer->choice.srb_Identity){ + add_rlc_srb(rnti, srb2add_listP->list.array[i], rlc_bearer2add_list->list.array[j]); + } } - } + } } } - } } } From 089246c693f51fcf49ae9c24d8fa28005b2623b0 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 23 Apr 2021 08:48:22 +0200 Subject: [PATCH 221/579] Fix Msg.2 TDA to be 1, revert DL TDA configs to two entries --- .../gnb.band261.tm1.32PRB.usrpn300.conf | 25 +++++------------- .../gnb.band66.tm1.106PRB.usrpn300.conf | 2 +- .../gnb.band78.tm1.106PRB.usrpn300.conf | 2 +- .../gnb.band78.tm1.fr1.106PRB.usrpb210.conf | 2 +- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 2 +- .../CONF/gnb.band257.tm1.32PRB.usrpn300.conf | 25 +++++------------- .../CONF/gnb.band257.tm1.32PRB.usrpx300.conf | 2 +- .../CONF/gnb.band257.tm1.66PRB.usrpn300.conf | 2 +- .../CONF/gnb.band261.tm1.32PRB.usrpn300.conf | 2 +- .../CONF/gnb.band66.tm1.106PRB.usrpn300.conf | 2 +- .../CONF/gnb.band66.tm1.106PRB.usrpx300.conf | 2 +- .../gnb.band78.106PRB.30kHz,usrpb2x0.conf | 2 +- .../CONF/gnb.band78.106PRB.slave.conf | 2 +- .../gnb.band78.tm1.106PRB.PTRS.usrpx300.conf | 26 +++++-------------- .../CONF/gnb.band78.tm1.106PRB.usrpb210.conf | 2 +- .../CONF/gnb.band78.tm1.106PRB.usrpn300.conf | 2 +- .../CONF/gnb.band78.tm1.106PRB.usrpx300.conf | 2 +- .../CONF/gnb.band78.tm1.217PRB.usrpn300.conf | 2 +- .../CONF/gnb.band78.tm1.217PRB.usrpx300.conf | 2 +- .../CONF/gnb.band78.tm1.24PRB.usrpb210.conf | 25 +++++------------- .../CONF/gnb.band78.tm1.24PRB.usrpn300.conf | 25 +++++------------- .../CONF/gnb.band78.tm1.24PRB.usrpx300.conf | 25 +++++------------- .../CONF/gnb.band78.tm1.273PRB.usrpn300.conf | 2 +- .../gnb.sa.band41.fr1.106PRB.usrpb210.conf | 10 +------ .../gnb.sa.band78.fr1.106PRB.usrpb210.conf | 10 +------ 25 files changed, 55 insertions(+), 150 deletions(-) diff --git a/ci-scripts/conf_files/gnb.band261.tm1.32PRB.usrpn300.conf b/ci-scripts/conf_files/gnb.band261.tm1.32PRB.usrpn300.conf index 0da833b3f7..f0c1caef7e 100644 --- a/ci-scripts/conf_files/gnb.band261.tm1.32PRB.usrpn300.conf +++ b/ci-scripts/conf_files/gnb.band261.tm1.32PRB.usrpn300.conf @@ -58,27 +58,14 @@ gNBs = 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; + initialDLBWPk0_0 = 0; #for DL slot + initialDLBWPmappingType_0 = 0; #0=typeA,1=typeB + initialDLBWPstartSymbolAndLength_0 = 40; #this is SS=1,L=13 - initialDLBWPk0_1 = 0; - initialDLBWPmappingType_1 = 0; - #this is SS=2,L=12 - initialDLBWPstartSymbolAndLength_1 = 53; + initialDLBWPk0_3 = 0; #for mixed slot + initialDLBWPmappingType_3 = 0; + initialDLBWPstartSymbolAndLength_3 = 57; #this is SS=1,L=5 - initialDLBWPk0_2 = 0; - initialDLBWPmappingType_2 = 0; - #this is SS=1,L=12 - initialDLBWPstartSymbolAndLength_2 = 54; - - initialDLBWPk0_3 = 0; - initialDLBWPmappingType_3 = 0; - #this is SS=1,L=4 //5 (4 is for 43, 5 is for 57) - initialDLBWPstartSymbolAndLength_3 = 57; //43; //57; #uplinkConfigCommon #frequencyInfoUL ul_frequencyBand = 261; diff --git a/ci-scripts/conf_files/gnb.band66.tm1.106PRB.usrpn300.conf b/ci-scripts/conf_files/gnb.band66.tm1.106PRB.usrpn300.conf index 217c3c8ec6..6d08dfb5c1 100644 --- a/ci-scripts/conf_files/gnb.band66.tm1.106PRB.usrpn300.conf +++ b/ci-scripts/conf_files/gnb.band66.tm1.106PRB.usrpn300.conf @@ -125,7 +125,7 @@ gNBs = initialULBWPk2_1 = 6; # used for mixed slot initialULBWPmappingType_1 = 1; - initialULBWPstartSymbolAndLength_1 = 24; # this is SS=10 L=2 + initialULBWPstartSymbolAndLength_1 = 69; # this is SS=10 L=2 initialULBWPk2_2 = 7; # used for Msg.3 during RA initialULBWPmappingType_2 = 1; diff --git a/ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf b/ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf index f7cd224e76..f125dcd3b2 100644 --- a/ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf +++ b/ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf @@ -124,7 +124,7 @@ gNBs = initialULBWPk2_1 = 6; # used for mixed slot initialULBWPmappingType_1 = 1; - initialULBWPstartSymbolAndLength_1 = 24; # this is SS=10 L=2 + initialULBWPstartSymbolAndLength_1 = 69; # this is SS=10 L=2 initialULBWPk2_2 = 7; # used for Msg.3 during RA initialULBWPmappingType_2 = 1; diff --git a/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf b/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf index 4953eead15..846623e0c1 100644 --- a/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf +++ b/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf @@ -126,7 +126,7 @@ gNBs = initialULBWPk2_1 = 2; # used for mixed slot initialULBWPmappingType_1 = 1; - initialULBWPstartSymbolAndLength_1 = 24; # this is SS=10 L=2 + initialULBWPstartSymbolAndLength_1 = 69; # this is SS=10 L=2 initialULBWPk2_2 = 7; # used for Msg.3 during RA initialULBWPmappingType_2 = 1; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 41e67df0fe..cdf7eb24ff 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -879,7 +879,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra if ((ra->Msg2_frame == frameP) && (ra->Msg2_slot == slotP)) { - uint8_t time_domain_assignment = 3; + uint8_t time_domain_assignment = 1; uint8_t mcsIndex = 0; int rbStart = 0; int rbSize = 8; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpn300.conf index 477240a3a0..e21cccf231 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpn300.conf @@ -58,27 +58,14 @@ gNBs = 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; + initialDLBWPk0_0 = 0; #for DL slot + initialDLBWPmappingType_0 = 0; #0=typeA,1=typeB + initialDLBWPstartSymbolAndLength_0 = 40; #this is SS=1,L=13 - initialDLBWPk0_1 = 0; - initialDLBWPmappingType_1 = 0; - #this is SS=2,L=12 - initialDLBWPstartSymbolAndLength_1 = 53; + initialDLBWPk0_3 = 0; #for mixed slot + initialDLBWPmappingType_3 = 0; + initialDLBWPstartSymbolAndLength_3 = 57; #this is SS=1,L=5 - initialDLBWPk0_2 = 0; - initialDLBWPmappingType_2 = 0; - #this is SS=1,L=12 - initialDLBWPstartSymbolAndLength_2 = 54; - - initialDLBWPk0_3 = 0; - initialDLBWPmappingType_3 = 0; - #this is SS=1,L=4 //5 (4 is for 43, 5 is for 57) - initialDLBWPstartSymbolAndLength_3 = 57; //43; //57; #uplinkConfigCommon #frequencyInfoUL ul_frequencyBand = 261; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpx300.conf index c7122d70cd..6e56c87dde 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpx300.conf @@ -126,7 +126,7 @@ gNBs = initialULBWPk2_1 = 6; # used for mixed slot initialULBWPmappingType_1 = 1; - initialULBWPstartSymbolAndLength_1 = 24; # this is SS=10 L=2 + initialULBWPstartSymbolAndLength_1 = 69; # this is SS=10 L=2 initialULBWPk2_2 = 4; # used for Msg.3 during RA initialULBWPmappingType_2 = 1; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.66PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.66PRB.usrpn300.conf index 220c767f5f..adb392328f 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.66PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.66PRB.usrpn300.conf @@ -124,7 +124,7 @@ gNBs = initialULBWPk2_1 = 2; # used for mixed slot (not used here) initialULBWPmappingType_1 = 1; - initialULBWPstartSymbolAndLength_1 = 24; # this is SS=10 L=2 + initialULBWPstartSymbolAndLength_1 = 69; # this is SS=10 L=2 initialULBWPk2_2 = 7; # used for Msg.3 during RA initialULBWPmappingType_2 = 1; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band261.tm1.32PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band261.tm1.32PRB.usrpn300.conf index a79b999ef7..07e236104f 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band261.tm1.32PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band261.tm1.32PRB.usrpn300.conf @@ -126,7 +126,7 @@ gNBs = initialULBWPk2_1 = 6; # used for mixed slot initialULBWPmappingType_1 = 1; - initialULBWPstartSymbolAndLength_1 = 24; # this is SS=10 L=2 + initialULBWPstartSymbolAndLength_1 = 69; # this is SS=10 L=2 initialULBWPk2_2 = 4; # used for Msg.3 during RA initialULBWPmappingType_2 = 1; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpn300.conf index a164e51b36..95c02ffbe8 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpn300.conf @@ -125,7 +125,7 @@ gNBs = initialULBWPk2_1 = 6; # used for mixed slot initialULBWPmappingType_1 = 1; - initialULBWPstartSymbolAndLength_1 = 24; # this is SS=10 L=2 + initialULBWPstartSymbolAndLength_1 = 69; # this is SS=10 L=2 initialULBWPk2_2 = 7; # used for Msg.3 during RA initialULBWPmappingType_2 = 1; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpx300.conf index 2731cd285f..a6e9aecaf3 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpx300.conf @@ -125,7 +125,7 @@ gNBs = initialULBWPk2_1 = 6; # used for mixed slot initialULBWPmappingType_1 = 1; - initialULBWPstartSymbolAndLength_1 = 24; # this is SS=10 L=2 + initialULBWPstartSymbolAndLength_1 = 69; # this is SS=10 L=2 initialULBWPk2_2 = 7; # used for Msg.3 during RA initialULBWPmappingType_2 = 1; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.30kHz,usrpb2x0.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.30kHz,usrpb2x0.conf index 6ae0427151..b45d7c2f61 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.30kHz,usrpb2x0.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.30kHz,usrpb2x0.conf @@ -124,7 +124,7 @@ gNBs = initialULBWPk2_1 = 2; # used for mixed slot initialULBWPmappingType_1 = 1; - initialULBWPstartSymbolAndLength_1 = 24; # this is SS=10 L=2 + initialULBWPstartSymbolAndLength_1 = 69; # this is SS=10 L=2 initialULBWPk2_2 = 7; # used for Msg.3 during RA initialULBWPmappingType_2 = 1; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.slave.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.slave.conf index f157d886fc..9f76f7c71a 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.slave.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.slave.conf @@ -124,7 +124,7 @@ gNBs = initialULBWPk2_1 = 2; # used for mixed slot initialULBWPmappingType_1 = 1; - initialULBWPstartSymbolAndLength_1 = 24; # this is SS=10 L=2 + initialULBWPstartSymbolAndLength_1 = 69; # this is SS=10 L=2 initialULBWPk2_2 = 7; # used for Msg.3 during RA initialULBWPmappingType_2 = 1; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.PTRS.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.PTRS.usrpx300.conf index ffced2055a..ad99b4ce32 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.PTRS.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.PTRS.usrpx300.conf @@ -56,27 +56,13 @@ gNBs = initialDLBWPsearchSpaceZero = 0; #pdsch-ConfigCommon #pdschTimeDomainAllocationList (up to 16 entries) - initialDLBWPk0_0 = 0; - #initialULBWPmappingType - #0=typeA,1=typeB - initialDLBWPmappingType_0 = 0; - #this is SS=1,L=13 - initialDLBWPstartSymbolAndLength_0 = 40; + initialDLBWPk0_0 = 0; #for DL slot + initialDLBWPmappingType_0 = 0; #0=typeA,1=typeB + initialDLBWPstartSymbolAndLength_0 = 40; #this is SS=1,L=13 - initialDLBWPk0_1 = 0; - initialDLBWPmappingType_1 = 0; - #this is SS=2,L=12 - initialDLBWPstartSymbolAndLength_1 = 53; - - initialDLBWPk0_2 = 0; - initialDLBWPmappingType_2 = 0; - #this is SS=1,L=12 - initialDLBWPstartSymbolAndLength_2 = 54; - - initialDLBWPk0_3 = 0; - initialDLBWPmappingType_3 = 0; - #this is SS=1,L=4 - initialDLBWPstartSymbolAndLength_3 = 57; + initialDLBWPk0_3 = 0; #for mixed slot + initialDLBWPmappingType_3 = 0; + initialDLBWPstartSymbolAndLength_3 = 57; #this is SS=1,L=5 #uplinkConfigCommon #frequencyInfoUL diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpb210.conf index b1d6f0d0ea..80e06a491b 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpb210.conf @@ -124,7 +124,7 @@ gNBs = initialULBWPk2_1 = 2; # used for mixed slot initialULBWPmappingType_1 = 1; - initialULBWPstartSymbolAndLength_1 = 24; # this is SS=10 L=2 + initialULBWPstartSymbolAndLength_1 = 69; # this is SS=10 L=2 initialULBWPk2_2 = 7; # used for Msg.3 during RA initialULBWPmappingType_2 = 1; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf index ca70141ca9..e7824186bb 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf @@ -124,7 +124,7 @@ gNBs = initialULBWPk2_1 = 6; # used for UL part mixed slot initialULBWPmappingType_1 = 1; - initialULBWPstartSymbolAndLength_1 = 24; # this is SS=10 L=2 + initialULBWPstartSymbolAndLength_1 = 69; # this is SS=10 L=2 initialULBWPk2_2 = 7; # used for Msg.3 during RA initialULBWPmappingType_2 = 1; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf index bda71ff403..62c73523d6 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf @@ -125,7 +125,7 @@ gNBs = initialULBWPk2_1 = 6; # used for mixed slot initialULBWPmappingType_1 = 1; - initialULBWPstartSymbolAndLength_1 = 24; # this is SS=10 L=2 + initialULBWPstartSymbolAndLength_1 = 69; # this is SS=10 L=2 initialULBWPk2_2 = 7; # used for Msg.3 during RA initialULBWPmappingType_2 = 1; 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 3de5ebb1a8..57be93b34b 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 @@ -124,7 +124,7 @@ gNBs = initialULBWPk2_1 = 6; # used for mixed slot initialULBWPmappingType_1 = 1; - initialULBWPstartSymbolAndLength_1 = 24; # this is SS=10 L=2 + initialULBWPstartSymbolAndLength_1 = 69; # this is SS=10 L=2 initialULBWPk2_2 = 7; # used for Msg.3 during RA initialULBWPmappingType_2 = 1; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpx300.conf index 285928c8e0..536d1a9959 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpx300.conf @@ -124,7 +124,7 @@ gNBs = initialULBWPk2_1 = 2; # used for mixed slot initialULBWPmappingType_1 = 1; - initialULBWPstartSymbolAndLength_1 = 24; # this is SS=10 L=2 + initialULBWPstartSymbolAndLength_1 = 69; # this is SS=10 L=2 initialULBWPk2_2 = 7; # used for Msg.3 during RA initialULBWPmappingType_2 = 1; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpb210.conf index 89dda14e20..bccffcd7c8 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpb210.conf @@ -56,27 +56,14 @@ gNBs = initialDLBWPsearchSpaceZero = 0; #pdsch-ConfigCommon #pdschTimeDomainAllocationList (up to 16 entries) - initialDLBWPk0_0 = 0; - #initialULBWPmappingType - #0=typeA,1=typeB - initialDLBWPmappingType_0 = 0; - #this is SS=1,L=13 - initialDLBWPstartSymbolAndLength_0 = 40; + initialDLBWPk0_0 = 0; #for DL slot + initialDLBWPmappingType_0 = 0; #0=typeA,1=typeB + initialDLBWPstartSymbolAndLength_0 = 40; #this is SS=1,L=13 - initialDLBWPk0_1 = 0; - initialDLBWPmappingType_1 = 0; - #this is SS=2,L=12 - initialDLBWPstartSymbolAndLength_1 = 53; + initialDLBWPk0_3 = 0; #for mixed slot + initialDLBWPmappingType_3 = 0; + initialDLBWPstartSymbolAndLength_3 = 57; #this is SS=1,L=5 - initialDLBWPk0_2 = 0; - initialDLBWPmappingType_2 = 0; - #this is SS=1,L=12 - initialDLBWPstartSymbolAndLength_2 = 54; - - initialDLBWPk0_3 = 0; - initialDLBWPmappingType_3 = 0; - #this is SS=1,L=5 - initialDLBWPstartSymbolAndLength_3 = 57; #uplinkConfigCommon #frequencyInfoUL diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpn300.conf index 7954b3c201..862b2b1399 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpn300.conf @@ -56,27 +56,14 @@ gNBs = initialDLBWPsearchSpaceZero = 0; #pdsch-ConfigCommon #pdschTimeDomainAllocationList (up to 16 entries) - initialDLBWPk0_0 = 0; - #initialULBWPmappingType - #0=typeA,1=typeB - initialDLBWPmappingType_0 = 0; - #this is SS=1,L=13 - initialDLBWPstartSymbolAndLength_0 = 40; + initialDLBWPk0_0 = 0; #for DL slot + initialDLBWPmappingType_0 = 0; #0=typeA,1=typeB + initialDLBWPstartSymbolAndLength_0 = 40; #this is SS=1,L=13 - initialDLBWPk0_1 = 0; - initialDLBWPmappingType_1 = 0; - #this is SS=2,L=12 - initialDLBWPstartSymbolAndLength_1 = 53; + initialDLBWPk0_3 = 0; #for mixed slot + initialDLBWPmappingType_3 = 0; + initialDLBWPstartSymbolAndLength_3 = 57; #this is SS=1,L=5 - initialDLBWPk0_2 = 0; - initialDLBWPmappingType_2 = 0; - #this is SS=1,L=12 - initialDLBWPstartSymbolAndLength_2 = 54; - - initialDLBWPk0_3 = 0; - initialDLBWPmappingType_3 = 0; - #this is SS=1,L=5 - initialDLBWPstartSymbolAndLength_3 = 57; #uplinkConfigCommon #frequencyInfoUL diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpx300.conf index bd88ed88c7..9b464a8edc 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpx300.conf @@ -56,27 +56,14 @@ gNBs = initialDLBWPsearchSpaceZero = 0; #pdsch-ConfigCommon #pdschTimeDomainAllocationList (up to 16 entries) - initialDLBWPk0_0 = 0; - #initialULBWPmappingType - #0=typeA,1=typeB - initialDLBWPmappingType_0 = 0; - #this is SS=1,L=13 - initialDLBWPstartSymbolAndLength_0 = 40; + initialDLBWPk0_0 = 0; #for DL slot + initialDLBWPmappingType_0 = 0; #0=typeA,1=typeB + initialDLBWPstartSymbolAndLength_0 = 40; #this is SS=1,L=13 - initialDLBWPk0_1 = 0; - initialDLBWPmappingType_1 = 0; - #this is SS=2,L=12 - initialDLBWPstartSymbolAndLength_1 = 53; + initialDLBWPk0_3 = 0; #for mixed slot + initialDLBWPmappingType_3 = 0; + initialDLBWPstartSymbolAndLength_3 = 57; #this is SS=1,L=5 - initialDLBWPk0_2 = 0; - initialDLBWPmappingType_2 = 0; - #this is SS=1,L=12 - initialDLBWPstartSymbolAndLength_2 = 54; - - initialDLBWPk0_3 = 0; - initialDLBWPmappingType_3 = 0; - #this is SS=1,L=5 - initialDLBWPstartSymbolAndLength_3 = 57; #uplinkConfigCommon #frequencyInfoUL diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.273PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.273PRB.usrpn300.conf index 7598ef027f..b785888658 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.273PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.273PRB.usrpn300.conf @@ -124,7 +124,7 @@ gNBs = initialULBWPk2_1 = 6; # used for mixed slot initialULBWPmappingType_1 = 1; - initialULBWPstartSymbolAndLength_1 = 24; # this is SS=10 L=2 + initialULBWPstartSymbolAndLength_1 = 69; # this is SS=10 L=2 initialULBWPk2_2 = 7; # used for Msg.3 during RA initialULBWPmappingType_2 = 1; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf index 1e8daf53d5..f82eb09c7b 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf @@ -67,15 +67,7 @@ gNBs = initialDLBWPk0_1 = 0; #for mixed slot initialDLBWPmappingType_1 = 0; - initialDLBWPstartSymbolAndLength_1 = 53; #this is SS=2,L=12 - - initialDLBWPk0_2 = 0; - initialDLBWPmappingType_2 = 0; - initialDLBWPstartSymbolAndLength_2 = 54; #this is SS=1,L=12 - - initialDLBWPk0_3 = 0; - initialDLBWPmappingType_3 = 0; - initialDLBWPstartSymbolAndLength_3 = 57; #this is SS=1,L=5 + initialDLBWPstartSymbolAndLength_1 = 57; #this is SS=1,L=5 #uplinkConfigCommon #frequencyInfoUL diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf index 95ede1ba2c..bbf1c09bb2 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf @@ -67,15 +67,7 @@ gNBs = initialDLBWPk0_1 = 0; #for mixed slot initialDLBWPmappingType_1 = 0; - initialDLBWPstartSymbolAndLength_1 = 53; #this is SS=2,L=12 - - initialDLBWPk0_2 = 0; - initialDLBWPmappingType_2 = 0; - initialDLBWPstartSymbolAndLength_2 = 54; #this is SS=1,L=12 - - initialDLBWPk0_3 = 0; - initialDLBWPmappingType_3 = 0; - initialDLBWPstartSymbolAndLength_3 = 57; #this is SS=1,L=5 + initialDLBWPstartSymbolAndLength_1 = 57; #this is SS=1,L=5 #uplinkConfigCommon #frequencyInfoUL From 63663ac4b2b7de5acfd6860c2b89865fba74d56f Mon Sep 17 00:00:00 2001 From: rmagueta Date: Sun, 25 Apr 2021 19:39:59 +0100 Subject: [PATCH 222/579] Fix warning after merge --- openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c | 1 - 1 file changed, 1 deletion(-) diff --git a/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c b/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c index 877a9fe3d9..fd5c9659c0 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c +++ b/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c @@ -1218,7 +1218,6 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB, rel15_ul); nr_gnb_measurements(gNB, ulsch_id, harq_pid, symbol); - int num_symb = rel15_ul->nr_of_symbols; for (aarx = 0; aarx < frame_parms->nb_antennas_rx; aarx++) { if (symbol == rel15_ul->start_symbol_index) { From 92b19e2d457b3e76a5dbca47111d8ee4f8fe25ce Mon Sep 17 00:00:00 2001 From: Mohammed Ismail Date: Sun, 25 Apr 2021 22:07:53 +0200 Subject: [PATCH 223/579] CI: fix on true negative result Signed-off-by: Mohammed Ismail --- ci-scripts/cls_physim1.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ci-scripts/cls_physim1.py b/ci-scripts/cls_physim1.py index 4ca09152a7..b69039465a 100644 --- a/ci-scripts/cls_physim1.py +++ b/ci-scripts/cls_physim1.py @@ -58,7 +58,7 @@ class PhySim: self.testResult = {} self.testCount = [0,0,0] self.testSummary = {} - self.exitStatus=0 + self.testStatus = False #-----------------$ #PUBLIC Methods$ @@ -236,6 +236,8 @@ class PhySim: mySSH.command('oc logout', '\$', 6) mySSH.close() self.AnalyzeLogFile_phySim(HTML) + if self.testStatus == False: + sys.exit(-1) def AnalyzeLogFile_phySim(self, HTML): lIpAddr = self.eNBIPAddress @@ -281,6 +283,8 @@ class PhySim: self.testSummary['Nbtests'] = self.testCount[0] self.testSummary['Nbpass'] = self.testCount[1] self.testSummary['Nbfail'] = self.testCount[2] + if self.testSummary['Nbfail'] == 0: + self.testStatus = True HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK) HTML.CreateHtmlTestRowPhySimTestResult(self.testSummary,self.testResult) logging.info('\u001B[1m Physical Simulator Pass\u001B[0m') From 7acc966b949bd5219d8ca73b3478fd02106aec82 Mon Sep 17 00:00:00 2001 From: Mohammed Ismail Date: Mon, 26 Apr 2021 16:07:40 +0200 Subject: [PATCH 224/579] CI: logs delay fix Signed-off-by: Mohammed Ismail --- ci-scripts/cls_physim1.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ci-scripts/cls_physim1.py b/ci-scripts/cls_physim1.py index b69039465a..9386ed03e1 100644 --- a/ci-scripts/cls_physim1.py +++ b/ci-scripts/cls_physim1.py @@ -200,18 +200,17 @@ class PhySim: # Waiting to complete the running test count = 0 isFinished = False - testCompleteCount = 0 + tmpPodNames = podNames while(count < 25 and isFinished == False): time.sleep(58) - for podName in podNames: + for podName in tmpPodNames: mySSH.command(f'oc logs --tail=1 {podName} 2>&1', '\$', 6) if mySSH.getBefore().count('Finished') != 0: - testCompleteCount += 1 - time.sleep(1) - if testCompleteCount == 12: + tmpPodNames.remove(podName) + time.sleep(2) + if not tmpPodNames: isFinished = True count += 1 - testCompleteCount = 0 if isFinished: logging.debug('\u001B[1m PhySim test is Complete\u001B[0m') From ff87164011db6bdee0e46389d1c9dfaa31cb1cff Mon Sep 17 00:00:00 2001 From: francescomani Date: Mon, 26 Apr 2021 16:31:20 +0200 Subject: [PATCH 225/579] bugfixes in FR2 scheduling of ssbs --- openair1/SCHED_NR_UE/phy_procedures_nr_ue.c | 4 ++-- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c index 60fe897456..e599d23447 100644 --- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c +++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c @@ -142,7 +142,7 @@ void nr_fill_rx_indication(fapi_nr_rx_indication_t *rx_ind, case FAPI_NR_RX_PDU_TYPE_MIB: rx_ind->rx_indication_body[n_pdus - 1].mib_pdu.pdu = ue->pbch_vars[gNB_id]->decoded_output; rx_ind->rx_indication_body[n_pdus - 1].mib_pdu.additional_bits = ue->pbch_vars[gNB_id]->xtra_byte; - rx_ind->rx_indication_body[n_pdus - 1].mib_pdu.ssb_index = frame_parms->ssb_index; + rx_ind->rx_indication_body[n_pdus - 1].mib_pdu.ssb_index = (frame_parms->ssb_index)&0x7; rx_ind->rx_indication_body[n_pdus - 1].mib_pdu.ssb_length = frame_parms->Lmax; rx_ind->rx_indication_body[n_pdus - 1].mib_pdu.cell_id = frame_parms->Nid_cell; break; @@ -368,7 +368,7 @@ void nr_ue_pbch_procedures(uint8_t gNB_id, VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_PBCH_PROCEDURES, VCD_FUNCTION_IN); - LOG_D(PHY,"[UE %d] Frame %d, Trying PBCH (NidCell %d, gNB_id %d)\n",ue->Mod_id,frame_rx,ue->frame_parms.Nid_cell,gNB_id); + LOG_D(PHY,"[UE %d] Frame %d Slot %d, Trying PBCH (NidCell %d, gNB_id %d)\n",ue->Mod_id,frame_rx,nr_slot_rx,ue->frame_parms.Nid_cell,gNB_id); ret = nr_rx_pbch(ue, proc, ue->pbch_vars[gNB_id], diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c index 91142c3728..9701d4f1da 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c @@ -253,8 +253,8 @@ void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t slotP) case 3: // long bitmap FR2 max 64 SSBs num_ssb = 0; - for (int i_ssb=0; i_ssb<63; i_ssb++) { - if ((longBitmap->buf[i_ssb/8]>>(7-i_ssb))&0x01) { + for (int i_ssb=0; i_ssb<64; i_ssb++) { + if ((longBitmap->buf[i_ssb/8]>>(7-(i_ssb%8)))&0x01) { ssb_start_symbol = get_ssb_start_symbol(band,scs,i_ssb); // if start symbol is in current slot, schedule current SSB, fill VRB map and call get_type0_PDCCH_CSS_config_parameters if ((ssb_start_symbol/14) == rel_slot){ From 5aa999337af992b2c6f17c2fd08c512559377b77 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Mon, 26 Apr 2021 15:44:50 +0100 Subject: [PATCH 226/579] Minor corrections after merge --- openair1/PHY/NR_TRANSPORT/nr_ulsch.c | 3 ++- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 12 ------------ 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/openair1/PHY/NR_TRANSPORT/nr_ulsch.c b/openair1/PHY/NR_TRANSPORT/nr_ulsch.c index f23c4e530f..17e8fbfe5f 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_ulsch.c +++ b/openair1/PHY/NR_TRANSPORT/nr_ulsch.c @@ -150,7 +150,8 @@ void dump_pusch_stats(FILE *fd,PHY_VARS_gNB *gNB) { gNB->ulsch_stats[i].rnti, aa,gNB->ulsch_stats[i].power[aa]/10,gNB->ulsch_stats[i].power[aa]%10, aa,gNB->ulsch_stats[i].noise_power[aa]/10,gNB->ulsch_stats[i].noise_power[aa]%10); - else stroff+=sprintf(output+stroff," ulsch_power[%d] %d.%d, ulsch_noise_power[%d] %d.%d\n", + else stroff+=sprintf(output+stroff," ulsch_power[%d] %d.%d, ulsch_noise_power[%d] %d.%d\n", + aa,gNB->ulsch_stats[i].power[aa]/10,gNB->ulsch_stats[i].power[aa]%10, aa,gNB->ulsch_stats[i].noise_power[aa]/10,gNB->ulsch_stats[i].noise_power[aa]%10); AssertFatal(stroff<(STATSTRLEN-1000),"Increase STATSTRLEN\n"); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index b6e9792daa..379553599f 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -986,13 +986,6 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra nr_mac->pdcch_pdu_idx[CC_id][bwpid][coresetid] = pdcch_pdu_rel15; } - // TODO: This assignment should be done in function nr_configure_pdcch() - if(get_softmodem_params()->sa) { - pdcch_pdu_rel15->CoreSetType = NFAPI_NR_CSET_CONFIG_PDCCH_CONFIG_CSET_0; - pdcch_pdu_rel15->BWPSize = NRRIV2BW(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - pdcch_pdu_rel15->BWPStart = NRRIV2PRBOFFSET(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - } - nfapi_nr_dl_tti_request_pdu_t *dl_tti_pdsch_pdu = &dl_req->dl_tti_pdu_list[dl_req->nPDUs]; memset((void *)dl_tti_pdsch_pdu,0,sizeof(nfapi_nr_dl_tti_request_pdu_t)); dl_tti_pdsch_pdu->PDUType = NFAPI_NR_DL_TTI_PDSCH_PDU_TYPE; @@ -1347,11 +1340,6 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra nr_mac->pdcch_pdu_idx[CC_id][bwpid][coresetid] = pdcch_pdu_rel15; } - // TODO: This assignment should be done in function nr_configure_pdcch() - pdcch_pdu_rel15->CoreSetType = NFAPI_NR_CSET_CONFIG_PDCCH_CONFIG_CSET_0; - pdcch_pdu_rel15->BWPSize = NRRIV2BW(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - pdcch_pdu_rel15->BWPStart = NRRIV2PRBOFFSET(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - nfapi_nr_dl_tti_request_pdu_t *dl_tti_pdsch_pdu = &dl_req->dl_tti_pdu_list[dl_req->nPDUs]; memset((void *)dl_tti_pdsch_pdu,0,sizeof(nfapi_nr_dl_tti_request_pdu_t)); dl_tti_pdsch_pdu->PDUType = NFAPI_NR_DL_TTI_PDSCH_PDU_TYPE; From bd0609433834bc0f8e8ced9f11e2b62385fedc15 Mon Sep 17 00:00:00 2001 From: francescomani Date: Mon, 26 Apr 2021 17:56:51 +0200 Subject: [PATCH 227/579] another bug fixed --- openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c b/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c index ef884512fd..66c3de97ea 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c @@ -589,7 +589,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue, frame_parms->ssb_index += (((nr_ue_pbch_vars->xtra_byte>>(7-i))&0x01)<<(3+i)); } - ue->symbol_offset = nr_get_ssb_start_symbol(frame_parms,i_ssb); + ue->symbol_offset = nr_get_ssb_start_symbol(frame_parms,frame_parms->ssb_index); if (frame_parms->half_frame_bit) ue->symbol_offset += (frame_parms->slots_per_frame>>1)*frame_parms->symbols_per_slot; From 84e57113c88f2bce7e010d937100738d47cfccaa Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 23 Mar 2021 15:10:38 +0100 Subject: [PATCH 228/579] initial_csi_index depends on local_uid Nb_ue is not unique among UEs: consider 2 UEs present. The last UE has CSI idx "2". Now the first UE disconnects, and a new UE connects. It will also get CSI idx "2", and I assume this is not what we want. --- openair2/RRC/NR/MESSAGES/asn1_msg.c | 2 +- openair2/RRC/NR/rrc_gNB_nsa.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/openair2/RRC/NR/MESSAGES/asn1_msg.c b/openair2/RRC/NR/MESSAGES/asn1_msg.c index a26a4ac5b1..0bb46d61ca 100644 --- a/openair2/RRC/NR/MESSAGES/asn1_msg.c +++ b/openair2/RRC/NR/MESSAGES/asn1_msg.c @@ -1287,7 +1287,7 @@ uint16_t do_RRCReconfiguration( // 1, // 1, // carrier->pdsch_AntennaPorts, - // carrier->initial_csi_index[gnb_rrc_inst->Nb_ue]); + // carrier->initial_csi_index[ue_context_p->local_uid + 1]); /******************** Meas Config ********************/ // measConfig diff --git a/openair2/RRC/NR/rrc_gNB_nsa.c b/openair2/RRC/NR/rrc_gNB_nsa.c index 2336c758fc..4c0c506b8d 100644 --- a/openair2/RRC/NR/rrc_gNB_nsa.c +++ b/openair2/RRC/NR/rrc_gNB_nsa.c @@ -152,7 +152,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_ ue_context_p->ue_context.reconfig->criticalExtensions.present = NR_RRCReconfiguration__criticalExtensions_PR_rrcReconfiguration; NR_RRCReconfiguration_IEs_t *reconfig_ies=calloc(1,sizeof(NR_RRCReconfiguration_IEs_t)); ue_context_p->ue_context.reconfig->criticalExtensions.choice.rrcReconfiguration = reconfig_ies; - carrier->initial_csi_index[rrc->Nb_ue] = 0; + carrier->initial_csi_index[ue_context_p->local_uid + 1] = 0; ue_context_p->ue_context.rb_config = calloc(1,sizeof(NR_RRCReconfiguration_t)); if (get_softmodem_params()->phy_test == 1 || get_softmodem_params()->do_ra == 1 || get_softmodem_params()->sa == 1){ fill_default_rbconfig(ue_context_p->ue_context.rb_config, @@ -245,14 +245,14 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_ reconfig_ies, ue_context_p->ue_context.secondaryCellGroup, carrier->pdsch_AntennaPorts, - carrier->initial_csi_index[rrc->Nb_ue]); + carrier->initial_csi_index[ue_context_p->local_uid + 1]); } else { fill_default_reconfig(carrier->servingcellconfigcommon, NULL, reconfig_ies, ue_context_p->ue_context.secondaryCellGroup, carrier->pdsch_AntennaPorts, - carrier->initial_csi_index[rrc->Nb_ue]); + carrier->initial_csi_index[ue_context_p->local_uid + 1]); } ue_context_p->ue_id_rnti = ue_context_p->ue_context.secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity; NR_CG_Config_t *CG_Config = calloc(1,sizeof(*CG_Config)); From f39b97a9e8c8646696e169f5ea18030451264ee6 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 23 Mar 2021 15:51:17 +0100 Subject: [PATCH 229/579] Execute nr_schedule_pucch() only in UL slots --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c index f477066fc6..a8a7f3ef87 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c @@ -118,8 +118,13 @@ int diff_rsrp_ssb_csi_meas_10_1_6_1_2[16] = { void nr_schedule_pucch(int Mod_idP, frame_t frameP, - sub_frame_t slotP) { - NR_UE_info_t *UE_info = &RC.nrmac[Mod_idP]->UE_info; + sub_frame_t slotP) +{ + gNB_MAC_INST *nrmac = RC.nrmac[Mod_idP]; + if (!is_xlsch_in_slot(nrmac->ulsch_slot_bitmap[slotP / 64], slotP)) + return; + + NR_UE_info_t *UE_info = &nrmac->UE_info; const NR_list_t *UE_list = &UE_info->list; for (int UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { From c2d16eb8d5396f44a1b15a4bc501a2078bff8152 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 23 Mar 2021 15:26:07 +0100 Subject: [PATCH 230/579] Configure secondaryCellGroup: dedicated PUCCH, CSI, Preamble - Configure PUCCH Format 0 to be in separate RBs (each UE has dedicated resources) - Configure RA preamble to be different per UE - Configure CSI offset such that no two UEs have their report in the same frame --- openair1/SIMULATION/NR_PHY/dlsim.c | 8 +------- openair1/SIMULATION/NR_PHY/ulsim.c | 8 +------- openair2/RRC/NR/MESSAGES/asn1_msg.c | 3 ++- openair2/RRC/NR/nr_rrc_proto.h | 6 ++++-- openair2/RRC/NR/rrc_gNB_nsa.c | 6 ++++-- openair2/RRC/NR/rrc_gNB_reconfig.c | 23 ++++++++++++++++------- 6 files changed, 28 insertions(+), 26 deletions(-) diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index f247860e00..164ca2da43 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -717,13 +717,7 @@ int main(int argc, char **argv) prepare_scd(scd); - fill_default_secondaryCellGroup(scc, - scd, - secondaryCellGroup, - 0, - 1, - n_tx, - 0); + fill_default_secondaryCellGroup(scc, scd, secondaryCellGroup, 0, 1, n_tx, 0, 0); /* RRC parameter validation for secondaryCellGroup */ fix_scd(scd); diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c index 920994810d..0578635807 100644 --- a/openair1/SIMULATION/NR_PHY/ulsim.c +++ b/openair1/SIMULATION/NR_PHY/ulsim.c @@ -663,13 +663,7 @@ int main(int argc, char **argv) prepare_scd(scd); - fill_default_secondaryCellGroup(scc, - scd, - secondaryCellGroup, - 0, - 1, - n_tx, - 0); + fill_default_secondaryCellGroup(scc, scd, secondaryCellGroup, 0, 1, n_tx, 0, 0); // xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, (const void*)secondaryCellGroup); diff --git a/openair2/RRC/NR/MESSAGES/asn1_msg.c b/openair2/RRC/NR/MESSAGES/asn1_msg.c index 0bb46d61ca..39222f814d 100644 --- a/openair2/RRC/NR/MESSAGES/asn1_msg.c +++ b/openair2/RRC/NR/MESSAGES/asn1_msg.c @@ -1287,7 +1287,8 @@ uint16_t do_RRCReconfiguration( // 1, // 1, // carrier->pdsch_AntennaPorts, - // carrier->initial_csi_index[ue_context_p->local_uid + 1]); + // carrier->initial_csi_index[ue_context_p->local_uid + 1], + // ue_context_pP->local_uid); /******************** Meas Config ********************/ // measConfig diff --git a/openair2/RRC/NR/nr_rrc_proto.h b/openair2/RRC/NR/nr_rrc_proto.h index ea7b853c03..7923cf6e05 100644 --- a/openair2/RRC/NR/nr_rrc_proto.h +++ b/openair2/RRC/NR/nr_rrc_proto.h @@ -85,14 +85,16 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco int scg_id, int servCellIndex, int n_physical_antenna_ports, - int initial_csi_index); + int initial_csi_index, + int uid); void fill_default_reconfig(NR_ServingCellConfigCommon_t *servingcellconfigcommon, NR_ServingCellConfig_t *servingcellconfigdedicated, NR_RRCReconfiguration_IEs_t *reconfig, NR_CellGroupConfig_t *secondaryCellGroup, int n_physical_antenna_ports, - int initial_csi_index); + int initial_csi_index, + int uid); void fill_default_rbconfig(NR_RadioBearerConfig_t *rbconfig, int eps_bearer_id, int rb_id, diff --git a/openair2/RRC/NR/rrc_gNB_nsa.c b/openair2/RRC/NR/rrc_gNB_nsa.c index 4c0c506b8d..7861f2166c 100644 --- a/openair2/RRC/NR/rrc_gNB_nsa.c +++ b/openair2/RRC/NR/rrc_gNB_nsa.c @@ -245,14 +245,16 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_ reconfig_ies, ue_context_p->ue_context.secondaryCellGroup, carrier->pdsch_AntennaPorts, - carrier->initial_csi_index[ue_context_p->local_uid + 1]); + carrier->initial_csi_index[ue_context_p->local_uid + 1], + ue_context_p->local_uid); } else { fill_default_reconfig(carrier->servingcellconfigcommon, NULL, reconfig_ies, ue_context_p->ue_context.secondaryCellGroup, carrier->pdsch_AntennaPorts, - carrier->initial_csi_index[ue_context_p->local_uid + 1]); + carrier->initial_csi_index[ue_context_p->local_uid + 1], + ue_context_p->local_uid); } ue_context_p->ue_id_rnti = ue_context_p->ue_context.secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity; NR_CG_Config_t *CG_Config = calloc(1,sizeof(*CG_Config)); diff --git a/openair2/RRC/NR/rrc_gNB_reconfig.c b/openair2/RRC/NR/rrc_gNB_reconfig.c index cd5ded9714..97533bde7c 100644 --- a/openair2/RRC/NR/rrc_gNB_reconfig.c +++ b/openair2/RRC/NR/rrc_gNB_reconfig.c @@ -149,7 +149,8 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco int scg_id, int servCellIndex, int n_physical_antenna_ports, - int initial_csi_index) { + int initial_csi_index, + int uid) { AssertFatal(servingcellconfigcommon!=NULL,"servingcellconfigcommon is null\n"); AssertFatal(secondaryCellGroup!=NULL,"secondaryCellGroup is null\n"); @@ -251,7 +252,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco if ((bitmap>>(63-i))&0x01){ ssbElem[n_ssb] = calloc(1,sizeof(struct NR_CFRA_SSB_Resource)); ssbElem[n_ssb]->ssb = i; - ssbElem[n_ssb]->ra_PreambleIndex = 63; + ssbElem[n_ssb]->ra_PreambleIndex = 63 - (uid % 64); ASN_SEQUENCE_ADD(&secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->resources.choice.ssb->ssb_ResourceList.list,ssbElem[n_ssb]); n_ssb++; } @@ -975,7 +976,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco NR_PUCCH_Resource_t *pucchres2=calloc(1,sizeof(*pucchres2)); NR_PUCCH_Resource_t *pucchres3=calloc(1,sizeof(*pucchres3)); pucchres0->pucch_ResourceId=1; - pucchres0->startingPRB=8; + pucchres0->startingPRB= (8 + uid) % curr_bwp; pucchres0->intraSlotFrequencyHopping=NULL; pucchres0->secondHopPRB=NULL; pucchres0->format.present= NR_PUCCH_Resource__format_PR_format0; @@ -986,7 +987,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco ASN_SEQUENCE_ADD(&pucch_Config->resourceToAddModList->list,pucchres0); pucchres1->pucch_ResourceId=2; - pucchres1->startingPRB=8; + pucchres1->startingPRB= (8 + uid) % curr_bwp; pucchres1->intraSlotFrequencyHopping=NULL; pucchres1->secondHopPRB=NULL; pucchres1->format.present= NR_PUCCH_Resource__format_PR_format0; @@ -1177,7 +1178,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco csirep1->reportConfigType.present = NR_CSI_ReportConfig__reportConfigType_PR_periodic; csirep1->reportConfigType.choice.periodic = calloc(1,sizeof(*csirep1->reportConfigType.choice.periodic)); csirep1->reportConfigType.choice.periodic->reportSlotConfig.present=NR_CSI_ReportPeriodicityAndOffset_PR_slots320; - csirep1->reportConfigType.choice.periodic->reportSlotConfig.choice.slots320 = 49; + csirep1->reportConfigType.choice.periodic->reportSlotConfig.choice.slots320 = 9 + (10 * uid) % 320; NR_PUCCH_CSI_Resource_t *pucchcsires1 = calloc(1,sizeof(*pucchcsires1)); pucchcsires1->uplinkBandwidthPartId=1; pucchcsires1->pucch_Resource=3; @@ -1241,14 +1242,22 @@ void fill_default_reconfig(NR_ServingCellConfigCommon_t *servingcellconfigcommon NR_RRCReconfiguration_IEs_t *reconfig, NR_CellGroupConfig_t *secondaryCellGroup, int n_physical_antenna_ports, - int initial_csi_index) { + int initial_csi_index, + int uid) { AssertFatal(servingcellconfigcommon!=NULL,"servingcellconfigcommon is null\n"); AssertFatal(reconfig!=NULL,"reconfig is null\n"); AssertFatal(secondaryCellGroup!=NULL,"secondaryCellGroup is null\n"); // radioBearerConfig reconfig->radioBearerConfig=NULL; // secondaryCellGroup - fill_default_secondaryCellGroup(servingcellconfigcommon,servingcellconfigdedicated,secondaryCellGroup,1,1,n_physical_antenna_ports,initial_csi_index); + fill_default_secondaryCellGroup(servingcellconfigcommon, + servingcellconfigdedicated, + secondaryCellGroup, + 1, + 1, + n_physical_antenna_ports, + initial_csi_index, + uid); xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, (const void*)secondaryCellGroup); char scg_buffer[1024]; From b005f9594bd8e1b8e4144c0ef93281a7f36b328b Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 23 Mar 2021 15:30:39 +0100 Subject: [PATCH 231/579] Statically allocate PUCCH F0 resource index 0 for AckNack --- openair2/LAYER2/NR_MAC_gNB/config.c | 8 ---- .../LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c | 42 ++----------------- openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h | 4 -- openair2/NR_PHY_INTERFACE/NR_IF_Module.c | 4 -- 4 files changed, 4 insertions(+), 54 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/config.c b/openair2/LAYER2/NR_MAC_gNB/config.c index 528edc64aa..98e9ce4351 100644 --- a/openair2/LAYER2/NR_MAC_gNB/config.c +++ b/openair2/LAYER2/NR_MAC_gNB/config.c @@ -372,14 +372,6 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP, AssertFatal(RC.nrmac[Mod_idP]->common_channels[0].vrb_map_UL, "could not allocate memory for RC.nrmac[]->common_channels[0].vrb_map_UL\n"); - for (int i = 0; i < MAX_NUM_BWP; ++i) { - RC.nrmac[Mod_idP]->pucch_index_used[i] = - calloc(n, sizeof(*RC.nrmac[Mod_idP]->pucch_index_used)); - AssertFatal(RC.nrmac[Mod_idP]->pucch_index_used[i], - "could not allocate memory for RC.nrmac[]->pucch_index_used[%d]\n", - i); - } - LOG_I(MAC,"Configuring common parameters from NR ServingCellConfig\n"); config_common(Mod_idP, diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c index a8a7f3ef87..5f918bbcd3 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c @@ -1109,10 +1109,7 @@ bool nr_acknack_scheduling(int mod_id, * * we do not multiplex with CSI, which is always in pucch_sched[2] * * SR uses format 0 and is allocated in the first UL (mixed) slot (and not * later) - * * that the PUCCH resource set 0 (for up to 2 bits) points to the first N - * PUCCH resources, where N is the number of resources in the PUCCH - * resource set. This is used in pucch_index_used, which counts the used - * resources by index, and not by their ID! */ + * * each UE has dedicated PUCCH Format 0 resources, and we use index 0! */ NR_UE_sched_ctrl_t *sched_ctrl = &RC.nrmac[mod_id]->UE_info.UE_sched_ctrl[UE_id]; NR_sched_pucch_t *pucch = &sched_ctrl->sched_pucch[0]; AssertFatal(pucch->csi_bits == 0, @@ -1198,12 +1195,6 @@ bool nr_acknack_scheduling(int mod_id, /* we need to find a new PUCCH occasion */ - NR_PUCCH_Config_t *pucch_Config = sched_ctrl->active_ubwp->bwp_Dedicated->pucch_Config->choice.setup; - DevAssert(pucch_Config->resourceToAddModList->list.count > 0); - DevAssert(pucch_Config->resourceSetToAddModList->list.count > 0); - const int n_res = pucch_Config->resourceSetToAddModList->list.array[0]->resourceList.list.count; - int *pucch_index_used = RC.nrmac[mod_id]->pucch_index_used[sched_ctrl->active_ubwp->bwp_Id]; - /* if time information is outdated (e.g., last PUCCH occasion in last frame), * set to first possible UL occasion in this frame. Note that if such UE is * scheduled a lot and used all AckNacks, pucch->frame might have been @@ -1217,22 +1208,6 @@ bool nr_acknack_scheduling(int mod_id, pucch->ul_slot = first_ul_slot_tdd; } - // increase to first slot in which PUCCH resources are available - while (pucch_index_used[pucch->ul_slot] >= n_res) { - pucch->ul_slot++; - /* if there is no free resource anymore, abort search */ - if ((pucch->frame == frame - && pucch->ul_slot >= first_ul_slot_tdd + nr_ulmix_slots) - || (pucch->frame == frame + 1)) { - LOG_E(MAC, - "%4d.%2d no free PUCCH resources anymore while searching for UE %d\n", - frame, - slot, - UE_id); - return false; - } - } - // advance ul_slot if it is not reachable by UE pucch->ul_slot = max(pucch->ul_slot, slot + pdsch_to_harq_feedback[0]); @@ -1279,22 +1254,13 @@ bool nr_acknack_scheduling(int mod_id, pucch->timing_indicator = i; // index in the list of timing indicators pucch->dai_c++; - const int pucch_res = pucch_index_used[pucch->ul_slot]; - pucch->resource_indicator = pucch_res; - pucch_index_used[pucch->ul_slot] += 1; - AssertFatal(pucch_index_used[pucch->ul_slot] <= n_res, - "UE %d in %4d.%2d: pucch_index_used is %d (%d available)\n", - UE_id, - pucch->frame, - pucch->ul_slot, - pucch_index_used[pucch->ul_slot], - n_res); + pucch->resource_indicator = 0; // each UE has dedicated PUCCH resources /* verify that at that slot and symbol, resources are free. We only do this * for initialCyclicShift 0 (we assume it always has that one), so other * initialCyclicShifts can overlap with ICS 0!*/ - const NR_PUCCH_Resource_t *resource = - pucch_Config->resourceToAddModList->list.array[pucch_res]; + const NR_PUCCH_Config_t *pucch_Config = sched_ctrl->active_ubwp->bwp_Dedicated->pucch_Config->choice.setup; + const NR_PUCCH_Resource_t *resource = pucch_Config->resourceToAddModList->list.array[pucch->resource_indicator]; DevAssert(resource->format.present == NR_PUCCH_Resource__format_PR_format0); if (resource->format.choice.format0->initialCyclicShift == 0) { uint16_t *vrb_map_UL = &RC.nrmac[mod_id]->common_channels[CC_id].vrb_map_UL[pucch->ul_slot * MAX_BWP_SIZE]; diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h index c8ea892ca5..50437db3cf 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h +++ b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h @@ -705,10 +705,6 @@ typedef struct gNB_MAC_INST_s { int cce_list[MAX_NUM_BWP][MAX_NUM_CORESET][MAX_NUM_CCE]; /// list of allocated beams per period int16_t *tdd_beam_association; - /// PUCCH: keep track of the resources has already been used by saving the - /// highest index not yet been used in a given slot. Dynamically allocated - /// so we can have it for every slot as a function of the numerology - int *pucch_index_used[MAX_NUM_BWP]; /// bitmap of DLSCH slots, can hold up to 160 slots uint64_t dlsch_slot_bitmap[3]; diff --git a/openair2/NR_PHY_INTERFACE/NR_IF_Module.c b/openair2/NR_PHY_INTERFACE/NR_IF_Module.c index e42d19167d..a789f0c34e 100644 --- a/openair2/NR_PHY_INTERFACE/NR_IF_Module.c +++ b/openair2/NR_PHY_INTERFACE/NR_IF_Module.c @@ -105,10 +105,6 @@ void handle_nr_uci(NR_UL_IND_t *UL_info) } UL_info->uci_ind.num_ucis = 0; - - // mark corresponding PUCCH resources as free - // NOTE: we just assume it is BWP ID 1, to be revised for multiple BWPs - RC.nrmac[mod_id]->pucch_index_used[1][slot] = 0; } From 4f4e25852fc896480f22ab57e1e7f1a1c57f72b8 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 23 Mar 2021 16:14:35 +0100 Subject: [PATCH 232/579] Reduce sched_pucch array length, we only need two entries --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c | 8 ++++---- openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h | 8 +++----- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c index 5f918bbcd3..318003ea0a 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c @@ -509,11 +509,11 @@ void nr_csi_meas_reporting(int Mod_idP, // find free PUCCH that is in order with possibly existing PUCCH // schedulings (other CSI, SR) - NR_sched_pucch_t *curr_pucch = &sched_ctrl->sched_pucch[2]; + NR_sched_pucch_t *curr_pucch = &sched_ctrl->sched_pucch[1]; AssertFatal(curr_pucch->csi_bits == 0 && !curr_pucch->sr_flag && curr_pucch->dai_c == 0, - "PUCCH not free at index 2 for UE %04x\n", + "PUCCH not free at index 1 for UE %04x\n", UE_info->rnti[UE_id]); curr_pucch->frame = frame; curr_pucch->ul_slot = sched_slot; @@ -1132,7 +1132,7 @@ bool nr_acknack_scheduling(int mod_id, pucch->frame = s == n_slots_frame - 1 ? (f + 1) % 1024 : f; pucch->ul_slot = (s + 1) % n_slots_frame; // we assume that only two indices over the array sched_pucch exist - const NR_sched_pucch_t *csi_pucch = &sched_ctrl->sched_pucch[2]; + const NR_sched_pucch_t *csi_pucch = &sched_ctrl->sched_pucch[1]; // skip the CSI PUCCH if it is present and if in the next frame/slot if (csi_pucch->csi_bits > 0 && csi_pucch->frame == pucch->frame @@ -1212,7 +1212,7 @@ bool nr_acknack_scheduling(int mod_id, pucch->ul_slot = max(pucch->ul_slot, slot + pdsch_to_harq_feedback[0]); // is there already CSI in this slot? - const NR_sched_pucch_t *csi_pucch = &sched_ctrl->sched_pucch[2]; + const NR_sched_pucch_t *csi_pucch = &sched_ctrl->sched_pucch[1]; // skip the CSI PUCCH if it is present and if in the next frame/slot if (csi_pucch->csi_bits > 0 && csi_pucch->frame == pucch->frame diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h index 50437db3cf..fa6d978517 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h +++ b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h @@ -522,11 +522,9 @@ typedef struct { int cce_index; uint8_t aggregation_level; - /// PUCCH scheduling information. Array of three, we assume for the moment: - /// HARQ in the first field, SR in second, CSI in third (as fixed by RRC - /// conf., i.e. if actually present). The order is important for - /// nr_acknack_scheduling()! - NR_sched_pucch_t sched_pucch[3]; + /// PUCCH scheduling information. Array of two: HARQ+SR in the first field, + /// CSI in second. This order is important for nr_acknack_scheduling()! + NR_sched_pucch_t sched_pucch[2]; /// PUSCH semi-static configuration: is not cleared across TTIs NR_pusch_semi_static_t pusch_semi_static; From f73e8e045996f450d78dad3ff2dbcc96f2c917cd Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 24 Mar 2021 17:21:54 +0100 Subject: [PATCH 233/579] Bugfixes in nr_acknack_scheduling() 1: there can be 2bits AckNack + SR in PUCCH F0 2: when allocating csi_pucch, zero out struct 3: Make unfree resources a warning 4: When asserting, explain the issue --- .../LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c index 318003ea0a..95dfbfc3bf 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c @@ -1117,12 +1117,8 @@ bool nr_acknack_scheduling(int mod_id, __func__, pucch->csi_bits); - const int max_acknacks = 2; - AssertFatal(pucch->dai_c + pucch->sr_flag <= max_acknacks, - "illegal number of bits in PUCCH of UE %d\n", - UE_id); /* if the currently allocated PUCCH of this UE is full, allocate it */ - if (pucch->sr_flag + pucch->dai_c == max_acknacks) { + if (pucch->dai_c == 2) { /* advance the UL slot information in PUCCH by one so we won't schedule in * the same slot again */ const int f = pucch->frame; @@ -1132,7 +1128,7 @@ bool nr_acknack_scheduling(int mod_id, pucch->frame = s == n_slots_frame - 1 ? (f + 1) % 1024 : f; pucch->ul_slot = (s + 1) % n_slots_frame; // we assume that only two indices over the array sched_pucch exist - const NR_sched_pucch_t *csi_pucch = &sched_ctrl->sched_pucch[1]; + NR_sched_pucch_t *csi_pucch = &sched_ctrl->sched_pucch[1]; // skip the CSI PUCCH if it is present and if in the next frame/slot if (csi_pucch->csi_bits > 0 && csi_pucch->frame == pucch->frame @@ -1144,6 +1140,7 @@ bool nr_acknack_scheduling(int mod_id, pucch->ul_slot, UE_id); nr_fill_nfapi_pucch(mod_id, frame, slot, csi_pucch, UE_id); + memset(csi_pucch, 0, sizeof(*csi_pucch)); pucch->frame = s >= n_slots_frame - 2 ? (f + 1) % 1024 : f; pucch->ul_slot = (s + 2) % n_slots_frame; } @@ -1162,9 +1159,8 @@ bool nr_acknack_scheduling(int mod_id, uint8_t pdsch_to_harq_feedback[8]; get_pdsch_to_harq_feedback(mod_id, UE_id, ss_type, pdsch_to_harq_feedback); - /* there is a scheduled SR or HARQ. Check whether we can use it for this - * ACKNACK */ - if (pucch->sr_flag + pucch->dai_c > 0) { + /* there is a HARQ. Check whether we can use it for this ACKNACK */ + if (pucch->dai_c > 0) { /* this UE already has a PUCCH occasion */ DevAssert(pucch->frame == frame); @@ -1200,7 +1196,9 @@ bool nr_acknack_scheduling(int mod_id, * scheduled a lot and used all AckNacks, pucch->frame might have been * wrapped around to next frame */ if (frame != pucch->frame || pucch->ul_slot < first_ul_slot_tdd) { - DevAssert(pucch->sr_flag + pucch->dai_c == 0); + AssertFatal(pucch->sr_flag + pucch->dai_c == 0, + "expected no SR/AckNack for UE %d in %4d.%2d, but has %d/%d for %4d.%2d\n", + UE_id, frame, slot, pucch->sr_flag, pucch->dai_c, pucch->frame, pucch->ul_slot); AssertFatal(frame + 1 != pucch->frame, "frame wrap around not handled in %s() yet\n", __func__); @@ -1212,7 +1210,7 @@ bool nr_acknack_scheduling(int mod_id, pucch->ul_slot = max(pucch->ul_slot, slot + pdsch_to_harq_feedback[0]); // is there already CSI in this slot? - const NR_sched_pucch_t *csi_pucch = &sched_ctrl->sched_pucch[1]; + NR_sched_pucch_t *csi_pucch = &sched_ctrl->sched_pucch[1]; // skip the CSI PUCCH if it is present and if in the next frame/slot if (csi_pucch->csi_bits > 0 && csi_pucch->frame == pucch->frame @@ -1224,6 +1222,7 @@ bool nr_acknack_scheduling(int mod_id, pucch->ul_slot, UE_id); nr_fill_nfapi_pucch(mod_id, frame, slot, csi_pucch, UE_id); + memset(csi_pucch, 0, sizeof(*csi_pucch)); /* advance the UL slot information in PUCCH by one so we won't schedule in * the same slot again */ const int f = pucch->frame; @@ -1265,9 +1264,8 @@ bool nr_acknack_scheduling(int mod_id, if (resource->format.choice.format0->initialCyclicShift == 0) { uint16_t *vrb_map_UL = &RC.nrmac[mod_id]->common_channels[CC_id].vrb_map_UL[pucch->ul_slot * MAX_BWP_SIZE]; const uint16_t symb = 1 << resource->format.choice.format0->startingSymbolIndex; - AssertFatal((vrb_map_UL[resource->startingPRB] & symb) == 0, - "symbol %x is not free for PUCCH alloc in vrb_map_UL at RB %ld and slot %d\n", - symb, resource->startingPRB, pucch->ul_slot); + if ((vrb_map_UL[resource->startingPRB] & symb) != 0) + LOG_W(MAC, "symbol 0x%x is not free for PUCCH alloc in vrb_map_UL at RB %ld and slot %d.%d\n", symb, resource->startingPRB, pucch->frame, pucch->ul_slot); vrb_map_UL[resource->startingPRB] |= symb; } return true; From 51e844e19fffc2fe6358e81e74b3c189fc629d51 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 25 Mar 2021 16:00:40 +0100 Subject: [PATCH 234/579] Bugfix ul preproc: check correct slot for UL --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index a2e066d8c5..bc1b6737f3 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -1106,7 +1106,7 @@ bool nr_fr1_ulsch_preprocessor(module_id_t module_id, frame_t frame, sub_frame_t int K2 = get_K2(sched_ctrl->active_ubwp, tda, mu); const int sched_frame = frame + (slot + K2 >= nr_slots_per_frame[mu]); const int sched_slot = (slot + K2) % nr_slots_per_frame[mu]; - if (!is_xlsch_in_slot(nr_mac->ulsch_slot_bitmap[slot / 64], sched_slot)) + if (!is_xlsch_in_slot(nr_mac->ulsch_slot_bitmap[sched_slot / 64], sched_slot)) return false; sched_ctrl->sched_pusch.slot = sched_slot; From 50ac9ef2522583ac0763ad78b8ca63d44f2bfd79 Mon Sep 17 00:00:00 2001 From: imad Date: Sat, 19 Dec 2020 13:33:48 +0100 Subject: [PATCH 235/579] Add schedulingRequestConfig --- openair2/RRC/NR/rrc_gNB_reconfig.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/openair2/RRC/NR/rrc_gNB_reconfig.c b/openair2/RRC/NR/rrc_gNB_reconfig.c index 97533bde7c..dddf87a8c9 100644 --- a/openair2/RRC/NR/rrc_gNB_reconfig.c +++ b/openair2/RRC/NR/rrc_gNB_reconfig.c @@ -185,7 +185,17 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco ASN_SEQUENCE_ADD(&secondaryCellGroup->rlc_BearerToAddModList->list, RLC_BearerConfig); secondaryCellGroup->mac_CellGroupConfig=calloc(1,sizeof(*secondaryCellGroup->mac_CellGroupConfig)); secondaryCellGroup->mac_CellGroupConfig->drx_Config = NULL; - secondaryCellGroup->mac_CellGroupConfig->schedulingRequestConfig = NULL; + + secondaryCellGroup->mac_CellGroupConfig->schedulingRequestConfig = calloc(1,sizeof(*secondaryCellGroup->mac_CellGroupConfig->schedulingRequestConfig)); + secondaryCellGroup->mac_CellGroupConfig->schedulingRequestConfig->schedulingRequestToAddModList = calloc(1,sizeof(*secondaryCellGroup->mac_CellGroupConfig->schedulingRequestConfig->schedulingRequestToAddModList)); + NR_SchedulingRequestToAddMod_t *SchedulingRequestConf = calloc(1,sizeof(*SchedulingRequestConf)); + SchedulingRequestConf->schedulingRequestId = 0; //Could be changed + SchedulingRequestConf->sr_ProhibitTimer = calloc(1,sizeof(*SchedulingRequestConf->sr_ProhibitTimer)); + *SchedulingRequestConf->sr_ProhibitTimer = NR_SchedulingRequestToAddMod__sr_ProhibitTimer_ms16; //NR_SchedulingRequestToAddMod__sr_ProhibitTimer_ms32 + SchedulingRequestConf->sr_TransMax = NR_SchedulingRequestToAddMod__sr_TransMax_n32; + ASN_SEQUENCE_ADD(&secondaryCellGroup->mac_CellGroupConfig->schedulingRequestConfig->schedulingRequestToAddModList->list,SchedulingRequestConf); + secondaryCellGroup->mac_CellGroupConfig->schedulingRequestConfig->schedulingRequestToReleaseList = NULL; + secondaryCellGroup->mac_CellGroupConfig->bsr_Config=calloc(1,sizeof(*secondaryCellGroup->mac_CellGroupConfig->bsr_Config)); secondaryCellGroup->mac_CellGroupConfig->bsr_Config->periodicBSR_Timer = NR_BSR_Config__periodicBSR_Timer_sf10; secondaryCellGroup->mac_CellGroupConfig->bsr_Config->retxBSR_Timer = NR_BSR_Config__retxBSR_Timer_sf160; From 27bfe23c9babc1bfd3e2bf86aa94777ced60755d Mon Sep 17 00:00:00 2001 From: imad Date: Sat, 19 Dec 2020 13:36:52 +0100 Subject: [PATCH 236/579] Add schedulingRequestResourceConfig --- openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c | 3 ++- openair2/RRC/NR/rrc_gNB_reconfig.c | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c b/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c index 88333272cb..66553e813b 100644 --- a/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c +++ b/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c @@ -73,7 +73,8 @@ void nr_rlc_bearer_init_ul_spec(struct NR_LogicalChannelConfig *mac_LogicalChann mac_LogicalChannelConfig->ul_SpecificParameters->logicalChannelGroup = calloc(1,sizeof(*mac_LogicalChannelConfig->ul_SpecificParameters->logicalChannelGroup)); *mac_LogicalChannelConfig->ul_SpecificParameters->logicalChannelGroup = 1; - mac_LogicalChannelConfig->ul_SpecificParameters->schedulingRequestID = NULL; + mac_LogicalChannelConfig->ul_SpecificParameters->schedulingRequestID = calloc(1,sizeof(*mac_LogicalChannelConfig->ul_SpecificParameters->schedulingRequestID)); + *mac_LogicalChannelConfig->ul_SpecificParameters->schedulingRequestID = 0; mac_LogicalChannelConfig->ul_SpecificParameters->logicalChannelSR_Mask = false; mac_LogicalChannelConfig->ul_SpecificParameters->logicalChannelSR_DelayTimerApplied = false; mac_LogicalChannelConfig->ul_SpecificParameters->bitRateQueryProhibitTimer = NULL; diff --git a/openair2/RRC/NR/rrc_gNB_reconfig.c b/openair2/RRC/NR/rrc_gNB_reconfig.c index dddf87a8c9..7888cb5940 100644 --- a/openair2/RRC/NR/rrc_gNB_reconfig.c +++ b/openair2/RRC/NR/rrc_gNB_reconfig.c @@ -191,7 +191,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco NR_SchedulingRequestToAddMod_t *SchedulingRequestConf = calloc(1,sizeof(*SchedulingRequestConf)); SchedulingRequestConf->schedulingRequestId = 0; //Could be changed SchedulingRequestConf->sr_ProhibitTimer = calloc(1,sizeof(*SchedulingRequestConf->sr_ProhibitTimer)); - *SchedulingRequestConf->sr_ProhibitTimer = NR_SchedulingRequestToAddMod__sr_ProhibitTimer_ms16; //NR_SchedulingRequestToAddMod__sr_ProhibitTimer_ms32 + *SchedulingRequestConf->sr_ProhibitTimer = NR_SchedulingRequestToAddMod__sr_ProhibitTimer_ms16; SchedulingRequestConf->sr_TransMax = NR_SchedulingRequestToAddMod__sr_TransMax_n32; ASN_SEQUENCE_ADD(&secondaryCellGroup->mac_CellGroupConfig->schedulingRequestConfig->schedulingRequestToAddModList->list,SchedulingRequestConf); secondaryCellGroup->mac_CellGroupConfig->schedulingRequestConfig->schedulingRequestToReleaseList = NULL; @@ -1040,7 +1040,19 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco pucchfmt2->nrofSlots=NULL; pucchfmt2->pi2BPSK=NULL; pucchfmt2->simultaneousHARQ_ACK_CSI=NULL; - pucch_Config->schedulingRequestResourceToAddModList=NULL; + + // for scheduling requestresource + pucch_Config->schedulingRequestResourceToAddModList = calloc(1,sizeof(*pucch_Config->schedulingRequestResourceToAddModList)); + NR_SchedulingRequestResourceConfig_t *schedulingRequestResourceConfig = calloc(1,sizeof(*schedulingRequestResourceConfig)); + schedulingRequestResourceConfig->schedulingRequestResourceId = 1; + schedulingRequestResourceConfig->schedulingRequestID = 0; + schedulingRequestResourceConfig->periodicityAndOffset = calloc(1,sizeof(*schedulingRequestResourceConfig->periodicityAndOffset)); + schedulingRequestResourceConfig->periodicityAndOffset->present = NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl10; + schedulingRequestResourceConfig->periodicityAndOffset->choice.sl10 = 7; + schedulingRequestResourceConfig->resource = calloc(1,sizeof(*schedulingRequestResourceConfig->resource)); + *schedulingRequestResourceConfig->resource = 1; + ASN_SEQUENCE_ADD(&pucch_Config->schedulingRequestResourceToAddModList->list,schedulingRequestResourceConfig); + pucch_Config->schedulingRequestResourceToReleaseList=NULL; pucch_Config->multi_CSI_PUCCH_ResourceList=NULL; pucch_Config->dl_DataToUL_ACK = calloc(1,sizeof(*pucch_Config->dl_DataToUL_ACK)); From a8149b5e0e55dd6034a3093a9253271c107b11ce Mon Sep 17 00:00:00 2001 From: imad Date: Sat, 19 Dec 2020 12:47:44 +0100 Subject: [PATCH 237/579] Add functions for SR scheduling --- .../LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c | 151 ++++++++++++++++++ openair2/LAYER2/NR_MAC_gNB/mac_proto.h | 6 + 2 files changed, 157 insertions(+) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c index 95dfbfc3bf..46602bd981 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c @@ -1398,3 +1398,154 @@ uint16_t compute_pucch_prb_size(uint8_t format, AssertFatal(1==0,"Not yet implemented"); } } + +void nr_sr_reporting(int Mod_idP, frame_t SFN, sub_frame_t slot) +{ + gNB_MAC_INST *nrmac = RC.nrmac[Mod_idP]; + if (!is_xlsch_in_slot(nrmac->ulsch_slot_bitmap[slot / 64], slot)) + return; + NR_ServingCellConfigCommon_t *scc = nrmac->common_channels->ServingCellConfigCommon; + const int n_slots_frame = nr_slots_per_frame[*scc->ssbSubcarrierSpacing]; + NR_UE_info_t *UE_info = &nrmac->UE_info; + NR_list_t *UE_list = &UE_info->list; + for (int UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { + NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; + NR_PUCCH_Config_t *pucch_Config = sched_ctrl->active_ubwp->bwp_Dedicated->pucch_Config->choice.setup; + AssertFatal(pucch_Config->schedulingRequestResourceToAddModList->list.count>0,"NO SR configuration available"); + + for (int SR_resource_id =0; SR_resource_id < pucch_Config->schedulingRequestResourceToAddModList->list.count;SR_resource_id++) { + NR_SchedulingRequestResourceConfig_t *SchedulingRequestResourceConfig = pucch_Config->schedulingRequestResourceToAddModList->list.array[SR_resource_id]; + + int SR_period; int SR_offset; + + periodicity__SRR(SchedulingRequestResourceConfig,&SR_period,&SR_offset); + // convert to int to avoid underflow of uint + int sfn_sf = SFN * n_slots_frame + slot; + if ((sfn_sf - SR_offset) % SR_period != 0) + continue; + LOG_D(MAC, "%4d.%2d Scheduling Request identified\n", SFN, slot); + NR_PUCCH_ResourceId_t *PucchResourceId = SchedulingRequestResourceConfig->resource; + + int found = -1; + NR_PUCCH_ResourceSet_t *pucchresset = pucch_Config->resourceSetToAddModList->list.array[0]; // set with formats 0,1 + int n_list = pucchresset->resourceList.list.count; + for (int i=0; iresourceList.list.array[i] == *PucchResourceId ) + found = i; + } + AssertFatal(found>-1,"SR resource not found among PUCCH resources"); + + /* loop through nFAPI PUCCH messages: if the UEs is in there in this slot + * with the resource_indicator, it means we already allocated that PUCCH + * resource for AckNack (e.g., the UE has been scheduled often), and we + * just need to add the SR_flag. Otherwise, just allocate in the internal + * PUCCH resource, and nr_schedule_pucch() will handle the rest */ + NR_PUCCH_Resource_t *pucch_res = pucch_Config->resourceToAddModList->list.array[found]; + /* for the moment, can only handle SR on PUCCH Format 0 */ + DevAssert(pucch_res->format.present == NR_PUCCH_Resource__format_PR_format0); + nfapi_nr_ul_tti_request_t *ul_tti_req = &nrmac->UL_tti_req_ahead[0][slot]; + bool nfapi_allocated = false; + for (int i = 0; i < ul_tti_req->n_pdus; ++i) { + if (ul_tti_req->pdus_list[i].pdu_type != NFAPI_NR_UL_CONFIG_PUCCH_PDU_TYPE) + continue; + nfapi_nr_pucch_pdu_t *pdu = &ul_tti_req->pdus_list[i].pucch_pdu; + /* check that it is our PUCCH F0. Assuming there can be only one */ + if (pdu->rnti == UE_info->rnti[UE_id] + && pdu->format_type == 0 // does not use NR_PUCCH_Resource__format_PR_format0 + && pdu->initial_cyclic_shift == pucch_res->format.choice.format0->initialCyclicShift + && pdu->nr_of_symbols == pucch_res->format.choice.format0->nrofSymbols + && pdu->start_symbol_index == pucch_res->format.choice.format0->startingSymbolIndex) { + LOG_D(MAC,"%4d.%2d adding SR_flag 1 to PUCCH nFAPI SR for RNTI %04x\n", SFN, slot, pdu->rnti); + pdu->sr_flag = 1; + nfapi_allocated = true; + break; + } + } + + if (nfapi_allocated) // break scheduling resource loop, continue next UE + break; + + /* we did not find it: check if current PUCCH is for the current slot, in + * which case we add the SR to it; otherwise, allocate SR separately */ + NR_sched_pucch_t *curr_pucch = &sched_ctrl->sched_pucch[0]; + if (curr_pucch->frame == SFN && curr_pucch->ul_slot == slot) { + if (curr_pucch->resource_indicator != found) { + LOG_W(MAC, "%4d.%2d expected PUCCH in this slot to have resource indicator of SR (%d), skipping SR\n", SFN, slot, found); + continue; + } + curr_pucch->sr_flag = true; + } else { + NR_sched_pucch_t sched_sr; + memset(&sched_sr, 0, sizeof(sched_sr)); + sched_sr.frame = SFN; + sched_sr.ul_slot = slot; + sched_sr.resource_indicator = found; + sched_sr.sr_flag = true; + nr_fill_nfapi_pucch(Mod_idP, SFN, slot, &sched_sr, UE_id); + } + } + } +} + + +void periodicity__SRR (NR_SchedulingRequestResourceConfig_t *SchedulingReqRec, int *period, int *offset) +{ + NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR P_O = SchedulingReqRec->periodicityAndOffset->present; + switch (P_O){ + case NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl1: + *period = 1; + *offset = SchedulingReqRec->periodicityAndOffset->choice.sl1; + break; + case NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl2: + *period = 2; + *offset = SchedulingReqRec->periodicityAndOffset->choice.sl2; + break; + case NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl4: + *period = 4; + *offset = SchedulingReqRec->periodicityAndOffset->choice.sl4; + break; + case NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl5: + *period = 5; + *offset = SchedulingReqRec->periodicityAndOffset->choice.sl5; + break; + case NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl8: + *period = 8; + *offset = SchedulingReqRec->periodicityAndOffset->choice.sl8; + break; + case NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl10: + *period = 10; + *offset = SchedulingReqRec->periodicityAndOffset->choice.sl10; + break; + case NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl16: + *period = 16; + *offset = SchedulingReqRec->periodicityAndOffset->choice.sl16; + break; + case NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl20: + *period = 20; + *offset = SchedulingReqRec->periodicityAndOffset->choice.sl20; + break; + case NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl40: + *period = 40; + *offset = SchedulingReqRec->periodicityAndOffset->choice.sl40; + break; + case NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl80: + *period = 80; + *offset = SchedulingReqRec->periodicityAndOffset->choice.sl80; + break; + case NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl160: + *period = 160; + *offset = SchedulingReqRec->periodicityAndOffset->choice.sl160; + break; + case NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl320: + *period = 320; + *offset = SchedulingReqRec->periodicityAndOffset->choice.sl320; + break; + case NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl640: + *period = 640; + *offset = SchedulingReqRec->periodicityAndOffset->choice.sl640; + break; + default: + AssertFatal(1==0,"No periodicityAndOffset resources found in schedulingrequestresourceconfig"); + } +} + diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h index 4256097174..4bf82dd002 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h +++ b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h @@ -414,4 +414,10 @@ bool nr_find_nb_rb(uint16_t Qm, uint32_t *tbs, uint16_t *nb_rb); +void nr_sr_reporting(int Mod_idP, frame_t frameP, sub_frame_t slotP); + +void periodicity__SRR (NR_SchedulingRequestResourceConfig_t *SchedulingReqRecconf, + int *period, + int *offset); + #endif /*__LAYER2_NR_MAC_PROTO_H__*/ From cba2d9e4134af1ebaf572b07c06dd3c637632f8d Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 20 Jan 2021 14:12:01 +0100 Subject: [PATCH 238/579] Schedule UEs on SR or BSR --- .../LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c | 5 +++++ .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 19 +++++++------------ openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h | 2 ++ 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c index 46602bd981..c1dfbc4fa3 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c @@ -1034,6 +1034,11 @@ void handle_nr_uci_pucch_0_1(module_id_t mod_id, handle_dl_harq(mod_id, UE_id, pid, harq_value == 1 && harq_confidence == 0); } } + + // check scheduling request result, confidence_level == 0 is good + if (uci_01->pduBitmap & 0x1) { + sched_ctrl->SR |= uci_01->sr->sr_indication && uci_01->sr->sr_confidence_level == 0; + } } void handle_nr_uci_pucch_2_3_4(module_id_t mod_id, diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index bc1b6737f3..fe1d670339 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -874,7 +874,6 @@ void update_ul_ue_R_Qm(NR_sched_pusch_t *sched_pusch, const NR_pusch_semi_static float ul_thr_ue[MAX_MOBILES_PER_GNB]; uint32_t ul_pf_tbs[3][28]; // pre-computed, approximate TBS values for PF coefficient -int bsr0ue = -1; void pf_ul(module_id_t module_id, frame_t frame, sub_frame_t slot, @@ -894,12 +893,6 @@ void pf_ul(module_id_t module_id, int ue_array[MAX_MOBILES_PER_GNB]; NR_list_t UE_sched = { .head = -1, .next = ue_array, .tail = -1, .len = MAX_MOBILES_PER_GNB }; - /* Hack: currently, we do not have SR, and need to schedule UEs continuously. - * To keep the wasted resources low, we switch UEs to be scheduled in a - * round-robin fashion below, and only schedule a UE with BSR=0 if it is the - * selected one */ - bsr0ue = next_list_entry_looped(UE_list, bsr0ue); - /* Loop UE_list to calculate throughput and coeff */ for (int UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; @@ -931,11 +924,12 @@ void pf_ul(module_id_t module_id, continue; } - /* Check BSR and schedule UE if it is zero to avoid starvation, since we do - * not have SR (yet) */ - if (sched_ctrl->estimated_ul_buffer - sched_ctrl->sched_ul_bytes <= 0) { - if (UE_id != bsr0ue) - continue; + if (sched_ctrl->estimated_ul_buffer - sched_ctrl->sched_ul_bytes <= 0 && !sched_ctrl->SR) + continue; + + /* Schedule UE if there is a SR and no data (otherwise, will be scheduled + * baded on data to transmit) */ + if (sched_ctrl->estimated_ul_buffer - sched_ctrl->sched_ul_bytes <= 0 && sched_ctrl->SR) { /* if no data, pre-allocate 5RB */ bool freeCCE = find_free_CCE(module_id, slot, UE_id); if (!freeCCE) { @@ -1225,6 +1219,7 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot) continue; uint16_t rnti = UE_info->rnti[UE_id]; + sched_ctrl->SR = false; int8_t harq_id = sched_pusch->ul_harq_pid; if (harq_id < 0) { diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h index fa6d978517..9e17883f56 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h +++ b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h @@ -561,6 +561,8 @@ typedef struct { int pucch_snrx10; struct CSI_Report CSI_report[MAX_CSI_REPORTS]; + bool SR; + /// information about every HARQ process NR_UE_harq_t harq_processes[NR_MAX_NB_HARQ_PROCESSES]; /// HARQ processes that are free From 800330e41c314a51b2633065b351aef139d908d4 Mon Sep 17 00:00:00 2001 From: imad Date: Sat, 19 Dec 2020 12:51:20 +0100 Subject: [PATCH 239/579] Call nr_sr_reporting --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c index 7175a129ba..36f687b5cd 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c @@ -402,7 +402,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, } // This schedule SR - // TODO + nr_sr_reporting(module_idP, frame, slot); // Schedule CSI measurement reporting: check in slot 0 for the whole frame if (slot == 0) From 81873616157e9b704f603e11011f4675d9ca6ac0 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 9 Feb 2021 10:43:24 +0100 Subject: [PATCH 240/579] Schedule UE periodically every 10 frames in UL --- .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 43 +++++++++++++++++-- openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h | 3 ++ 2 files changed, 42 insertions(+), 4 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index fe1d670339..259aa1d455 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -745,6 +745,34 @@ long get_K2(const NR_BWP_Uplink_t *ubwp, int time_domain_assignment, int mu) { return 3; } +bool nr_UE_is_to_be_scheduled(module_id_t mod_id, int CC_id, int UE_id, frame_t frame, sub_frame_t slot) +{ + const NR_ServingCellConfigCommon_t *scc = RC.nrmac[mod_id]->common_channels->ServingCellConfigCommon; + const uint8_t slots_per_frame[5] = {10, 20, 40, 80, 160}; + const int n = slots_per_frame[*scc->ssbSubcarrierSpacing]; + const int now = frame * n + slot; + + const struct gNB_MAC_INST_s *nrmac = RC.nrmac[mod_id]; + const NR_UE_sched_ctrl_t *sched_ctrl = &nrmac->UE_info.UE_sched_ctrl[UE_id]; + const int last_ul_sched = sched_ctrl->last_ul_frame * n + sched_ctrl->last_ul_slot; + + const int diff = (now - last_ul_sched + 1024 * n) % (1024 * n); + /* UE is to be scheduled if + * (1) we think the UE has more bytes awaiting than what we scheduled + * (2) there is a scheduling request + * (3) or we did not schedule it in more than 10 frames */ + const bool has_data = sched_ctrl->estimated_ul_buffer > sched_ctrl->sched_ul_bytes; + const bool high_inactivity = diff >= 10 * n; + LOG_D(MAC, + "%4d.%2d UL inactivity %d slots has_data %d SR %d\n", + frame, + slot, + diff, + has_data, + sched_ctrl->SR); + return has_data || sched_ctrl->SR || high_inactivity; +} + int next_list_entry_looped(NR_list_t *list, int UE_id) { if (UE_id < 0) @@ -924,12 +952,16 @@ void pf_ul(module_id_t module_id, continue; } - if (sched_ctrl->estimated_ul_buffer - sched_ctrl->sched_ul_bytes <= 0 && !sched_ctrl->SR) + const int B = max(0, sched_ctrl->estimated_ul_buffer - sched_ctrl->sched_ul_bytes); + /* preprocessor computed sched_frame/sched_slot */ + const bool do_sched = nr_UE_is_to_be_scheduled(module_id, 0, UE_id, sched_pusch->frame, sched_pusch->slot); + + if (B == 0 && !do_sched) continue; - /* Schedule UE if there is a SR and no data (otherwise, will be scheduled - * baded on data to transmit) */ - if (sched_ctrl->estimated_ul_buffer - sched_ctrl->sched_ul_bytes <= 0 && sched_ctrl->SR) { + /* Schedule UE on SR or UL inactivity and no data (otherwise, will be scheduled + * based on data to transmit) */ + if (B == 0 && do_sched) { /* if no data, pre-allocate 5RB */ bool freeCCE = find_free_CCE(module_id, slot, UE_id); if (!freeCCE) { @@ -1212,6 +1244,7 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot) for (int UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; UE_info->mac_stats[UE_id].ulsch_current_bytes = 0; + /* dynamic PUSCH values (RB alloc, MCS, hence R, Qm, TBS) that change in * every TTI are pre-populated by the preprocessor and used below */ NR_sched_pusch_t *sched_pusch = &sched_ctrl->sched_pusch; @@ -1276,6 +1309,8 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot) cur_harq->ndi); } UE_info->mac_stats[UE_id].ulsch_current_bytes = sched_pusch->tb_size; + sched_ctrl->last_ul_frame = sched_pusch->frame; + sched_ctrl->last_ul_slot = sched_pusch->slot; LOG_D(MAC, "%4d.%2d RNTI %04x UL sched %4d.%2d start %2d RBS %3d startSymbol %2d nb_symbol %2d MCS %2d TBS %4d HARQ PID %2d round %d NDI %d est %6d sched %6d est BSR %6d\n", diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h index 9e17883f56..0c7fda09e2 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h +++ b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h @@ -545,6 +545,9 @@ typedef struct { NR_pdsch_semi_static_t pdsch_semi_static; /// Sched PDSCH: scheduling decisions, copied into HARQ and cleared every TTI NR_sched_pdsch_t sched_pdsch; + /// For UL synchronization: store last UL scheduling grant + frame_t last_ul_frame; + sub_frame_t last_ul_slot; /// total amount of data awaiting for this UE uint32_t num_total_bytes; From 74fa01463c726c6c052cb6412925e5afdda7be83 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 1 Apr 2021 18:01:52 +0200 Subject: [PATCH 241/579] Do PUCCH TPC only if Acknack or positive SR otherwise, if we only have a (negative) SR, the UE did not send anything, and the PUCCH CQI is invalid --- .../LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c index c1dfbc4fa3..3e2691150c 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c @@ -1012,12 +1012,6 @@ void handle_nr_uci_pucch_0_1(module_id_t mod_id, NR_UE_info_t *UE_info = &RC.nrmac[mod_id]->UE_info; NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; - // tpc (power control) - sched_ctrl->tpc1 = nr_get_tpc(RC.nrmac[mod_id]->pucch_target_snrx10, - uci_01->ul_cqi, - 30); - sched_ctrl->pucch_snrx10 = uci_01->ul_cqi * 5 - 640; - NR_ServingCellConfigCommon_t *scc = RC.nrmac[mod_id]->common_channels->ServingCellConfigCommon; const int num_slots = nr_slots_per_frame[*scc->ssbSubcarrierSpacing]; if (((uci_01->pduBitmap >> 1) & 0x01)) { @@ -1036,8 +1030,17 @@ void handle_nr_uci_pucch_0_1(module_id_t mod_id, } // check scheduling request result, confidence_level == 0 is good - if (uci_01->pduBitmap & 0x1) { - sched_ctrl->SR |= uci_01->sr->sr_indication && uci_01->sr->sr_confidence_level == 0; + if (uci_01->pduBitmap & 0x1 && uci_01->sr->sr_indication && uci_01->sr->sr_confidence_level == 0 && uci_01->ul_cqi >= 148) { + // SR detected with SNR >= 10dB + sched_ctrl->SR |= true; + LOG_D(MAC, "SR UE %04x ul_cqi %d\n", uci_01->rnti, uci_01->ul_cqi); + } + + // tpc (power control) only if we received AckNack or positive SR. For a + // negative SR, the UE won't have sent anything, and the SNR is not valid + if (((uci_01->pduBitmap >> 1) & 0x1) || sched_ctrl->SR) { + sched_ctrl->tpc1 = nr_get_tpc(RC.nrmac[mod_id]->pucch_target_snrx10, uci_01->ul_cqi, 30); + sched_ctrl->pucch_snrx10 = uci_01->ul_cqi * 5 - 640; } } From 821a5e5dfe10e63b4d538a487f50128b6f5722c8 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 1 Apr 2021 16:33:28 +0200 Subject: [PATCH 242/579] Correct T310 & N310 to avoid RA --- openair2/RRC/NR/rrc_gNB_reconfig.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openair2/RRC/NR/rrc_gNB_reconfig.c b/openair2/RRC/NR/rrc_gNB_reconfig.c index 7888cb5940..e7e60aa312 100644 --- a/openair2/RRC/NR/rrc_gNB_reconfig.c +++ b/openair2/RRC/NR/rrc_gNB_reconfig.c @@ -274,8 +274,8 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco secondaryCellGroup->spCellConfig->rlf_TimersAndConstants = calloc(1,sizeof(*secondaryCellGroup->spCellConfig->rlf_TimersAndConstants)); secondaryCellGroup->spCellConfig->rlf_TimersAndConstants->present = NR_SetupRelease_RLF_TimersAndConstants_PR_setup; secondaryCellGroup->spCellConfig->rlf_TimersAndConstants->choice.setup=calloc(1,sizeof(*secondaryCellGroup->spCellConfig->rlf_TimersAndConstants->choice.setup)); - secondaryCellGroup->spCellConfig->rlf_TimersAndConstants->choice.setup->t310 = NR_RLF_TimersAndConstants__t310_ms2000; - secondaryCellGroup->spCellConfig->rlf_TimersAndConstants->choice.setup->n310 = NR_RLF_TimersAndConstants__n310_n10; + secondaryCellGroup->spCellConfig->rlf_TimersAndConstants->choice.setup->t310 = NR_RLF_TimersAndConstants__t310_ms4000; + secondaryCellGroup->spCellConfig->rlf_TimersAndConstants->choice.setup->n310 = NR_RLF_TimersAndConstants__n310_n20; secondaryCellGroup->spCellConfig->rlf_TimersAndConstants->choice.setup->n311 = NR_RLF_TimersAndConstants__n311_n1; secondaryCellGroup->spCellConfig->rlf_TimersAndConstants->choice.setup->ext1 = calloc(1,sizeof(*secondaryCellGroup->spCellConfig->rlf_TimersAndConstants->choice.setup->ext1)); secondaryCellGroup->spCellConfig->rlf_TimersAndConstants->choice.setup->ext1->t311 = NR_RLF_TimersAndConstants__ext1__t311_ms30000; From 6c162e3808506dd81296f3fbc1a29cbc30e6e215 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 27 Apr 2021 08:36:43 +0200 Subject: [PATCH 243/579] Remove unused variables --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c index 3e2691150c..800c23a9a0 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c @@ -1012,8 +1012,6 @@ void handle_nr_uci_pucch_0_1(module_id_t mod_id, NR_UE_info_t *UE_info = &RC.nrmac[mod_id]->UE_info; NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; - NR_ServingCellConfigCommon_t *scc = RC.nrmac[mod_id]->common_channels->ServingCellConfigCommon; - const int num_slots = nr_slots_per_frame[*scc->ssbSubcarrierSpacing]; if (((uci_01->pduBitmap >> 1) & 0x01)) { // iterate over received harq bits for (int harq_bit = 0; harq_bit < uci_01->harq->num_harq; harq_bit++) { @@ -1064,8 +1062,6 @@ void handle_nr_uci_pucch_2_3_4(module_id_t mod_id, 30); sched_ctrl->pucch_snrx10 = uci_234->ul_cqi * 5 - 640; - NR_ServingCellConfigCommon_t *scc = RC.nrmac[mod_id]->common_channels->ServingCellConfigCommon; - const int num_slots = nr_slots_per_frame[*scc->ssbSubcarrierSpacing]; if ((uci_234->pduBitmap >> 1) & 0x01) { // iterate over received harq bits for (int harq_bit = 0; harq_bit < uci_234->harq.harq_bit_len; harq_bit++) { From 6e91e56b5047745832cc95b7df63459be066d5e6 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Tue, 27 Apr 2021 10:55:40 +0200 Subject: [PATCH 244/579] lowmem option for nr_pbchsim for CI tests --- openair1/SIMULATION/NR_PHY/pbchsim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair1/SIMULATION/NR_PHY/pbchsim.c b/openair1/SIMULATION/NR_PHY/pbchsim.c index ee74909a9e..28589dd8ef 100644 --- a/openair1/SIMULATION/NR_PHY/pbchsim.c +++ b/openair1/SIMULATION/NR_PHY/pbchsim.c @@ -414,7 +414,7 @@ int main(int argc, char **argv) frame_parms->ssb_type = nr_ssb_type_C; nr_phy_config_request_sim_pbchsim(gNB,N_RB_DL,N_RB_DL,mu,Nid_cell,SSB_positions); - phy_init_nr_gNB(gNB,0,0); + phy_init_nr_gNB(gNB,0,1); nr_set_ssb_first_subcarrier(&gNB->gNB_config,frame_parms); uint8_t n_hf = 0; From 2ec2486ae4371a1a927132954334b35a61169788 Mon Sep 17 00:00:00 2001 From: Thomas Schlichter Date: Tue, 27 Apr 2021 11:27:14 +0200 Subject: [PATCH 245/579] shave off some run-time from nr_ulsim test cases --- cmake_targets/autotests/test_case_list.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmake_targets/autotests/test_case_list.xml b/cmake_targets/autotests/test_case_list.xml index 7ad7f2ef5b..d339fa6388 100644 --- a/cmake_targets/autotests/test_case_list.xml +++ b/cmake_targets/autotests/test_case_list.xml @@ -1314,11 +1314,11 @@ -n100 -s5 -T 2 1 2 -U 2 0 2 -n100 -s5 -T 2 2 2 -U 2 1 2 -n100 -s5 -a4 -b8 -T 2 1 2 -U 2 1 3 - -n100 -s2 -Z - -n100 -s2 -Z -r75 - -n100 -s2 -Z -r216 -R217 - -n100 -s2 -Z -r270 -R273 - -n100 -s2 -Z -U 2 0 2 + -n100 -s5 -Z + -n100 -s5 -Z -r75 + -n50 -s5 -Z -r216 -R217 + -n50 -s5 -Z -r270 -R273 + -n100 -s5 -Z -U 2 0 2 -n100 -m16 -s10 -z2 nr_ulsim.test1 nr_ulsim.test2 nr_ulsim.test3 nr_ulsim.test4 nr_ulsim.test5 nr_ulsim.test6 nr_ulsim.test7 nr_ulsim.test8 nr_ulsim.test9 nr_ulsim.test10 nr_ulsim.test11 nr_ulsim.test12 nr_ulsim.test13 nr_ulsim.test14 From e8d48e5cc118a5ccd1d4ffc93f52c04158f20238 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Tue, 27 Apr 2021 12:10:27 +0100 Subject: [PATCH 246/579] Minor improvements for RA at gNB --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 205 ++++++++---------- .../NR_MAC_gNB/gNB_scheduler_primitives.c | 2 +- 2 files changed, 88 insertions(+), 119 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 379553599f..eaa6f3dabf 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -515,7 +515,7 @@ void nr_initiate_ra_proc(module_id_t module_idP, } } if (pr_found == 0) { - continue; + continue; } uint16_t ra_rnti; @@ -540,12 +540,12 @@ void nr_initiate_ra_proc(module_id_t module_idP, VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_INITIATE_RA_PROC, 1); LOG_D(NR_MAC, - "[gNB %d][RAPROC] CC_id %d Frame %d, Slot %d Initiating RA procedure for preamble index %d\n", - module_idP, - CC_id, - frameP, - slotP, - preamble_index); + "[gNB %d][RAPROC] CC_id %d Frame %d, Slot %d Initiating RA procedure for preamble index %d\n", + module_idP, + CC_id, + frameP, + slotP, + preamble_index); uint8_t beam_index = ssb_index_from_prach(module_idP, frameP, slotP, preamble_index, freq_index, symbol); @@ -566,20 +566,26 @@ void nr_initiate_ra_proc(module_id_t module_idP, ra->timing_offset = timing_offset; ra->preamble_slot = slotP; - struct NR_PDCCH_ConfigCommon__commonSearchSpaceList *commonSearchSpaceList = bwp ? - bwp->bwp_Common->pdcch_ConfigCommon->choice.setup->commonSearchSpaceList: - scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonSearchSpaceList; + NR_SearchSpaceId_t ra_SearchSpace = 0; + struct NR_PDCCH_ConfigCommon__commonSearchSpaceList *commonSearchSpaceList = NULL; + if(bwp) { + commonSearchSpaceList = bwp->bwp_Common->pdcch_ConfigCommon->choice.setup->commonSearchSpaceList; + ra_SearchSpace = *bwp->bwp_Common->pdcch_ConfigCommon->choice.setup->ra_SearchSpace; + } else { + commonSearchSpaceList = scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonSearchSpaceList; + ra_SearchSpace = *scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->ra_SearchSpace; + } AssertFatal(commonSearchSpaceList->list.count > 0, "common SearchSpace list has 0 elements\n"); - // Common searchspace list + // Common SearchSpace list for (int i = 0; i < commonSearchSpaceList->list.count; i++) { ss = commonSearchSpaceList->list.array[i]; - if (ss->searchSpaceId == (bwp ? - *bwp->bwp_Common->pdcch_ConfigCommon->choice.setup->ra_SearchSpace : - *scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->ra_SearchSpace)) + if (ss->searchSpaceId == ra_SearchSpace) ra->ra_ss = ss; } + AssertFatal(ra->ra_ss!=NULL,"SearchSpace cannot be null for RA\n"); + // retrieving ra pdcch monitoring period and offset find_monitoring_periodicity_offset_common(ra->ra_ss, &monitoring_slot_period, &monitoring_offset); @@ -600,8 +606,7 @@ void nr_initiate_ra_proc(module_id_t module_idP, LOG_D(NR_MAC, "%s() Msg2[%04d%d] SFN/SF:%04d%d\n", __FUNCTION__, ra->Msg2_frame, ra->Msg2_slot, frameP, slotP); int loop = 0; - // This condition allows for the usage of a preconfigured rnti for the first UE - if (!ra->cfra || ra->rnti == 0) { + if (ra->rnti == 0) { // This condition allows for the usage of a preconfigured rnti for the CFRA do { ra->rnti = (taus() % 65518) + 1; loop++; @@ -637,7 +642,7 @@ void nr_initiate_ra_proc(module_id_t module_idP, VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_INITIATE_RA_PROC, 0); } -void nr_schedule_RA(module_id_t module_idP, frame_t frameP, sub_frame_t slotP) + void nr_schedule_RA(module_id_t module_idP, frame_t frameP, sub_frame_t slotP) { gNB_MAC_INST *mac = RC.nrmac[module_idP]; @@ -806,14 +811,14 @@ void nr_add_msg3(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t } LOG_D(NR_MAC, "Frame %d, Subframe %d Adding Msg3 UL Config Request for (%d,%d) : (%d,%d,%d) for rnti: %d\n", - frameP, - slotP, - ra->Msg3_frame, - ra->Msg3_slot, - ra->msg3_nb_rb, - ra->msg3_first_rb, - ra->msg3_round, - ra->rnti); + frameP, + slotP, + ra->Msg3_frame, + ra->Msg3_slot, + ra->msg3_nb_rb, + ra->msg3_first_rb, + ra->msg3_round, + ra->rnti); int start_symbol_index,nr_of_symbols; SLIV2SL(startSymbolAndLength, &start_symbol_index, &nr_of_symbols); @@ -891,23 +896,10 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra int rbStart = 0; int rbSize = 8; - NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon; - long BWPSize = NRRIV2BW(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + NR_SearchSpace_t *ss = ra->ra_ss; - NR_SearchSpace_t *ss = NULL; - if(ra->ra_ss) { - ss = ra->ra_ss; - } else { - if (nr_mac->sched_ctrlCommon == NULL){ - nr_mac->sched_ctrlCommon = calloc(1,sizeof(*nr_mac->sched_ctrlCommon)); - } - if(nr_mac->sched_ctrlCommon->search_space == NULL) { - nr_mac->sched_ctrlCommon->search_space = calloc(1,sizeof(*nr_mac->sched_ctrlCommon->search_space)); - fill_default_searchSpaceZero(nr_mac->sched_ctrlCommon->search_space); - } - ss = nr_mac->sched_ctrlCommon->search_space; - } + long BWPSize = NRRIV2BW(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); NR_BWP_Downlink_t *bwp = NULL; NR_ControlResourceSet_t *coreset = NULL; @@ -916,10 +908,10 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra long BWPStart = 0; if (ra->CellGroup && - ra->CellGroup->spCellConfig && - ra->CellGroup->spCellConfig->spCellConfigDedicated && - ra->CellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList && - ra->CellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[ra->bwp_id-1]) { + ra->CellGroup->spCellConfig && + ra->CellGroup->spCellConfig->spCellConfigDedicated && + ra->CellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList && + ra->CellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[ra->bwp_id-1]) { bwp = ra->CellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[ra->bwp_id-1]; genericParameters = &bwp->bwp_Common->genericParameters; pdsch_TimeDomainAllocationList = bwp->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList; @@ -929,9 +921,9 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra pdsch_TimeDomainAllocationList = scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList; } BWPStart = NRRIV2PRBOFFSET(genericParameters->locationAndBandwidth, MAX_BWP_SIZE); - ss = ra->ra_ss; coreset = get_coreset(scc,bwp, ss, NR_SearchSpace__searchSpaceType_PR_common); - if (coreset == NULL) coreset = nr_mac->sched_ctrlCommon->coreset; + + AssertFatal(coreset!=NULL,"Coreset cannot be null for RA-Msg2\n"); uint16_t *vrb_map = cc[CC_id].vrb_map; for (int i = 0; (i < rbSize) && (rbStart <= (BWPSize - rbSize)); i++) { @@ -1002,10 +994,10 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra uint8_t mcsTableIdx = 0; if (bwp && - bwp->bwp_Dedicated && - bwp->bwp_Dedicated->pdsch_Config && - bwp->bwp_Dedicated->pdsch_Config->choice.setup && - bwp->bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table) { + bwp->bwp_Dedicated && + bwp->bwp_Dedicated->pdsch_Config && + bwp->bwp_Dedicated->pdsch_Config->choice.setup && + bwp->bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table) { if (*bwp->bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table == 0) mcsTableIdx = 1; else @@ -1015,12 +1007,12 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra int dmrsConfigType=0; if (bwp && - bwp->bwp_Dedicated && - bwp->bwp_Dedicated->pdsch_Config && - bwp->bwp_Dedicated->pdsch_Config->choice.setup && - bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA && - bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup && - bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type) + bwp->bwp_Dedicated && + bwp->bwp_Dedicated->pdsch_Config && + bwp->bwp_Dedicated->pdsch_Config->choice.setup && + bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA && + bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup && + bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type) dmrsConfigType = 1; pdsch_pdu_rel15->pduBitmap = 0; @@ -1043,7 +1035,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra pdsch_pdu_rel15->dmrsConfigType = dmrsConfigType; pdsch_pdu_rel15->dlDmrsScramblingId = *scc->physCellId; pdsch_pdu_rel15->SCID = 0; - pdsch_pdu_rel15->numDmrsCdmGrpsNoData = nrOfSymbols <=2 ? 1 : 2; + pdsch_pdu_rel15->numDmrsCdmGrpsNoData = nrOfSymbols <= 2 ? 1 : 2; pdsch_pdu_rel15->dmrsPorts = 1; pdsch_pdu_rel15->resourceAlloc = 1; pdsch_pdu_rel15->rbStart = rbStart; @@ -1075,9 +1067,6 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra dci_payload.frequency_domain_assignment.val = PRBalloc_to_locationandbandwidth0(pdsch_pdu_rel15->rbSize, pdsch_pdu_rel15->rbStart, pdsch_pdu_rel15->BWPSize); - LOG_D(MAC,"Msg2 rbSize.rbStart.BWPsize %d.%d.%d\n",pdsch_pdu_rel15->rbSize, - pdsch_pdu_rel15->rbStart, - pdsch_pdu_rel15->BWPSize); dci_payload.time_domain_assignment.val = time_domain_assignment; dci_payload.vrb_to_prb_mapping.val = 0; @@ -1152,37 +1141,41 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra gNB_MAC_INST *nr_mac = RC.nrmac[module_idP]; NR_COMMON_channels_t *cc = &nr_mac->common_channels[CC_id]; - NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon; if (ra->Msg4_frame == frameP && ra->Msg4_slot == slotP ) { uint8_t time_domain_assignment = 0; uint8_t mcsIndex = 0; - NR_SearchSpace_t *ss = NULL; - if(ra->ra_ss) { - ss = ra->ra_ss; - } else { - if (nr_mac->sched_ctrlCommon == NULL){ - nr_mac->sched_ctrlCommon = calloc(1,sizeof(*nr_mac->sched_ctrlCommon)); - } - if(nr_mac->sched_ctrlCommon->search_space == NULL) { - nr_mac->sched_ctrlCommon->search_space = calloc(1,sizeof(*nr_mac->sched_ctrlCommon->search_space)); - fill_default_searchSpaceZero(nr_mac->sched_ctrlCommon->search_space); - } - ss = nr_mac->sched_ctrlCommon->search_space; + NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon; + NR_SearchSpace_t *ss = ra->ra_ss; + + NR_BWP_Downlink_t *bwp = NULL; + NR_ControlResourceSet_t *coreset = NULL; + NR_BWP_t *genericParameters = NULL; + NR_PDSCH_TimeDomainResourceAllocationList_t *pdsch_TimeDomainAllocationList=NULL; + + if (ra->CellGroup && + ra->CellGroup->spCellConfig && + ra->CellGroup->spCellConfig->spCellConfigDedicated && + ra->CellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList && + ra->CellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[ra->bwp_id-1]) { + bwp = ra->CellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[ra->bwp_id-1]; + genericParameters = &bwp->bwp_Common->genericParameters; + pdsch_TimeDomainAllocationList = bwp->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList; } + else { + genericParameters= &scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters; + pdsch_TimeDomainAllocationList = scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList; + } + coreset = get_coreset(scc,bwp, ss, NR_SearchSpace__searchSpaceType_PR_common); - NR_BWP_Downlink_t *bwp = ra->CellGroup ? ra->CellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[ra->bwp_id - 1] : NULL; - NR_ControlResourceSet_t *coreset = get_coreset(scc,ra->CellGroup ? ra->CellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[ra->bwp_id - 1] : NULL, ss, NR_SearchSpace__searchSpaceType_PR_common); - - if (coreset == NULL) coreset = nr_mac->sched_ctrlCommon->coreset; + AssertFatal(coreset!=NULL,"Coreset cannot be null for RA-Msg4\n"); int UE_id = find_nr_UE_id(module_idP, ra->rnti); NR_UE_info_t *UE_info = &nr_mac->UE_info; NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; - NR_BWP_t *genericParameters = bwp ? & bwp->bwp_Common->genericParameters : &scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters; long BWPSize = NRRIV2BW(genericParameters->locationAndBandwidth, MAX_BWP_SIZE); long BWPStart = NRRIV2PRBOFFSET(genericParameters->locationAndBandwidth, MAX_BWP_SIZE); @@ -1217,7 +1210,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra int n_rb=0; for (int i=0;i<6;i++) for (int j=0;j<8;j++) { - n_rb+=((coreset->frequencyDomainResources.buf[i]>>j)&1); + n_rb+=((coreset->frequencyDomainResources.buf[i]>>j)&1); } n_rb*=6; const uint16_t N_cce = n_rb * coreset->duration / NR_NB_REG_PER_CCE; @@ -1238,23 +1231,10 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra ((NR_MAC_SUBHEADER_SHORT *) &buf[mac_pdu_length])->L = mac_sdu_length; mac_pdu_length = mac_pdu_length + mac_sdu_length + sizeof(NR_MAC_SUBHEADER_SHORT); - LOG_D(NR_MAC,"Encoded RRCSetup Piggyback (%d + %d bytes), mac_pdu_length %d\n", - mac_sdu_length, - (int)sizeof(NR_MAC_SUBHEADER_SHORT), - mac_pdu_length); + LOG_D(NR_MAC,"Encoded RRCSetup Piggyback (%d + %d bytes), mac_pdu_length %d\n", mac_sdu_length, (int)sizeof(NR_MAC_SUBHEADER_SHORT), mac_pdu_length); + // Calculate number of symbols int startSymbolIndex, nrOfSymbols; - - NR_PDSCH_TimeDomainResourceAllocationList_t *pdsch_TimeDomainAllocationList; - if (bwp && - bwp->bwp_Common && - bwp->bwp_Common->pdsch_ConfigCommon && - bwp->bwp_Common->pdsch_ConfigCommon->choice.setup && - bwp->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList) - pdsch_TimeDomainAllocationList = bwp->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList; - else - pdsch_TimeDomainAllocationList = scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList; - const int startSymbolAndLength = pdsch_TimeDomainAllocationList->list.array[time_domain_assignment]->startSymbolAndLength; SLIV2SL(startSymbolAndLength, &startSymbolIndex, &nrOfSymbols); AssertFatal(startSymbolIndex >= 0, "StartSymbolIndex is negative\n"); @@ -1268,10 +1248,11 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra long dmrsConfigType = bwp ? (bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type == NULL ? 0 : 1):0; uint8_t N_PRB_DMRS = 0; - AssertFatal(nr_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData == 1 || - nr_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData == 2, - "nr_mac->schedCtrlCommon->numDmrsCdmGrpsNoData %d is not possible", - nr_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData); + + AssertFatal(nr_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData == 1 || nr_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData == 2, + "nr_mac->schedCtrlCommon->numDmrsCdmGrpsNoData %d is not possible", + nr_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData); + if (dmrsConfigType==NFAPI_NR_DMRS_TYPE1) { N_PRB_DMRS = nr_mac->sched_ctrlCommon->numDmrsCdmGrpsNoData * 6; } @@ -1281,10 +1262,10 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra uint8_t mcsTableIdx = 0; if (bwp && - bwp->bwp_Dedicated && - bwp->bwp_Dedicated->pdsch_Config && - bwp->bwp_Dedicated->pdsch_Config->choice.setup && - bwp->bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table) { + bwp->bwp_Dedicated && + bwp->bwp_Dedicated->pdsch_Config && + bwp->bwp_Dedicated->pdsch_Config->choice.setup && + bwp->bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table) { if (*bwp->bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table == 0) mcsTableIdx = 1; else @@ -1349,18 +1330,6 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra LOG_I(NR_MAC,"[gNB %d] [RAPROC] CC_id %d Frame %d, slotP %d: Generating RA-Msg4 DCI, state %d\n", module_idP, CC_id, frameP, slotP, ra->state); - int bwp_Id=0; - if (ra->CellGroup && - ra->CellGroup->spCellConfig && - ra->CellGroup->spCellConfig->spCellConfigDedicated && - ra->CellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList){ - bwp_Id = *ra->CellGroup->spCellConfig->spCellConfigDedicated->firstActiveDownlinkBWP_Id; - AssertFatal(ra->CellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.count <= 1, - "downlinkBWP_ToAddModList has %d BWP!\n", - ra->CellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.count); - } - LOG_I(NR_MAC,"[gNB %d] [RAPROC] CC_id %d Frame %d, slotP %d: Generating RA-Msg4 DCI for BWP %d, state %d\n", module_idP, CC_id, frameP, slotP, bwp_Id,ra->state); - // SCF222: PDU index incremented for each PDSCH PDU sent in TX control message. This is used to associate control // information to data and is reset every slot. const int pduindex = nr_mac->pdu_index[CC_id]++; @@ -1385,7 +1354,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra pdsch_pdu_rel15->dmrsConfigType = dmrsConfigType; pdsch_pdu_rel15->dlDmrsScramblingId = *scc->physCellId; pdsch_pdu_rel15->SCID = 0; - pdsch_pdu_rel15->numDmrsCdmGrpsNoData = nrOfSymbols <=2 ? 1 : 2; + pdsch_pdu_rel15->numDmrsCdmGrpsNoData = nrOfSymbols <= 2 ? 1 : 2; pdsch_pdu_rel15->dmrsPorts = 1; pdsch_pdu_rel15->resourceAlloc = 1; pdsch_pdu_rel15->rbStart = rbStart; @@ -1443,8 +1412,8 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra dci_payload.vrb_to_prb_mapping.val, dci_payload.mcs, dci_payload.tb_scaling, - dci_payload.pucch_resource_indicator, - dci_payload.pdsch_to_harq_feedback_timing_indicator.val); + dci_payload.pucch_resource_indicator, + dci_payload.pdsch_to_harq_feedback_timing_indicator.val); LOG_D(NR_MAC, "[RAPROC] DCI params: rnti 0x%x, rnti_type %d, dci_format %d coreset params: FreqDomainResource %llx, start_symbol %d n_symb %d\n", @@ -1462,7 +1431,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra NR_DL_DCI_FORMAT_1_0, NR_RNTI_TC, pdsch_pdu_rel15->BWPSize, - bwp_Id); + bwpid); // Add padding header and zero rest out if there is space left if (mac_pdu_length < harq->tb_size) { diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index 74e71b11a7..96df7a71a3 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -123,7 +123,7 @@ static inline uint8_t get_max_cces(uint8_t scs) { } NR_ControlResourceSet_t *get_coreset(NR_ServingCellConfigCommon_t *scc, - NR_BWP_Downlink_t *bwp, + NR_BWP_Downlink_t *bwp, NR_SearchSpace_t *ss, NR_SearchSpace__searchSpaceType_PR ss_type) { NR_ControlResourceSetId_t coreset_id = *ss->controlResourceSetId; From 987455b9e6e4693815966b065c7335bf84f1098d Mon Sep 17 00:00:00 2001 From: rmagueta Date: Tue, 27 Apr 2021 12:35:35 +0100 Subject: [PATCH 247/579] Fix warnings after merge --- openair2/RRC/NR/rrc_gNB_NGAP.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/openair2/RRC/NR/rrc_gNB_NGAP.c b/openair2/RRC/NR/rrc_gNB_NGAP.c index c31ec46079..8c5f328093 100644 --- a/openair2/RRC/NR/rrc_gNB_NGAP.c +++ b/openair2/RRC/NR/rrc_gNB_NGAP.c @@ -305,10 +305,7 @@ nr_rrc_pdcp_config_security( uint8_t *kRRCint = NULL; uint8_t *kUPenc = NULL; uint8_t *k_kdf = NULL; - pdcp_t *pdcp_p = NULL; - static int print_keys= 1; - hashtable_rc_t h_rc; - hash_key_t key; + static int print_keys= 1; #ifndef PHYSIM /* Derive the keys from kgnb */ From 278bfa8d6a905bdf0095a34d12086cf7becf0115 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Tue, 27 Apr 2021 13:05:35 +0100 Subject: [PATCH 248/579] Revert "Call the right function for the initiation of gtp-u task at gNB" This reverts commit 19ba8dd7 --- executables/nr-softmodem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/executables/nr-softmodem.c b/executables/nr-softmodem.c index f99f6fd869..52d7648f5e 100644 --- a/executables/nr-softmodem.c +++ b/executables/nr-softmodem.c @@ -364,7 +364,7 @@ int create_gNB_tasks(uint32_t gnb_nb) { } } - if (itti_create_task (TASK_GTPV1_U, &nr_gtpv1u_gNB_task, NULL) < 0) { + if (itti_create_task (TASK_GTPV1_U, >pv1u_gNB_task, NULL) < 0) { LOG_E(GTPU, "Create task for GTPV1U failed\n"); return -1; } From 42a217228b452f2928c586a8489159517f453009 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Tue, 27 Apr 2021 15:19:49 +0200 Subject: [PATCH 249/579] CI: fixes for OpenShift deployment of physical-simulators -- Missing finished tag in one deployment -- Deep copy of the array of pod names -- Hack for the out-of-sync on pexpect for `oc logs` and `oc get pods` commands Signed-off-by: Raphael Defosseux --- .../nr-dlschsim/templates/deployment.yaml | 1 + ci-scripts/cls_physim1.py | 17 +++++++++-------- ci-scripts/sshconnection.py | 15 ++++++++++++--- 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/charts/physims/charts/nr-dlschsim/templates/deployment.yaml b/charts/physims/charts/nr-dlschsim/templates/deployment.yaml index 23c3699c25..06f01a0f0b 100644 --- a/charts/physims/charts/nr-dlschsim/templates/deployment.yaml +++ b/charts/physims/charts/nr-dlschsim/templates/deployment.yaml @@ -40,6 +40,7 @@ spec: export OPENAIR_DIR=/opt/oai-physim && cd cmake_targets/autotests && ./run_exec_autotests.bash -g "015106" -q -np -b && + echo "FINISHED" && sleep infinity dnsPolicy: ClusterFirst restartPolicy: Always diff --git a/ci-scripts/cls_physim1.py b/ci-scripts/cls_physim1.py index 9386ed03e1..5cb36629e7 100644 --- a/ci-scripts/cls_physim1.py +++ b/ci-scripts/cls_physim1.py @@ -189,7 +189,7 @@ class PhySim: if mySSH.getBefore().count('Running') == 12: logging.debug('\u001B[1m Running the physim test Scenarios\u001B[0m') isRunning = True - podNames = re.findall('oai[\S\d\w]+', mySSH.getBefore()) + podNames = re.findall('oai-[\S\d\w]+', mySSH.getBefore()) count +=1 if isRunning == False: logging.error('\u001B[1m Some PODS Running FAILED \u001B[0m') @@ -200,14 +200,15 @@ class PhySim: # Waiting to complete the running test count = 0 isFinished = False - tmpPodNames = podNames - while(count < 25 and isFinished == False): - time.sleep(58) + # doing a deep copy! + tmpPodNames = podNames.copy() + while(count < 28 and isFinished == False): + time.sleep(60) for podName in tmpPodNames: mySSH.command(f'oc logs --tail=1 {podName} 2>&1', '\$', 6) - if mySSH.getBefore().count('Finished') != 0: + if mySSH.getBefore().count('FINISHED') != 0: + logging.debug(podName + ' is finished') tmpPodNames.remove(podName) - time.sleep(2) if not tmpPodNames: isFinished = True count += 1 @@ -216,14 +217,14 @@ class PhySim: # Getting the logs of each executables running in individual pods for podName in podNames: - mySSH.command(f'oc logs {podName} >> cmake_targets/log/physim_test.txt 2>&1', '\$', 6) + mySSH.command(f'oc logs {podName} >> cmake_targets/log/physim_test.txt 2>&1', '\$', 15) time.sleep(30) # UnDeploy the physical simulator pods mySSH.command('helm uninstall physim | tee -a cmake_targets/log/physim_helm_summary.txt 2>&1', '\$', 6) isFinished1 = False while(isFinished1 == False): - time.sleep(10) + time.sleep(20) mySSH.command('oc get pods -l app.kubernetes.io/instance=physim', '\$', 6) if re.search('No resources found', mySSH.getBefore()): isFinished1 = True diff --git a/ci-scripts/sshconnection.py b/ci-scripts/sshconnection.py index 5bfe5da70f..087e920fe1 100644 --- a/ci-scripts/sshconnection.py +++ b/ci-scripts/sshconnection.py @@ -112,10 +112,19 @@ class SSHConnection(): return self.sshresponse def command(self, commandline, expectedline, timeout): - logging.debug(commandline) + if commandline.count('oc logs') == 0: + logging.debug(commandline) self.ssh.timeout = timeout - self.ssh.sendline(commandline) - self.sshresponse = self.ssh.expect([expectedline, pexpect.EOF, pexpect.TIMEOUT]) + # Nasty patch when pexpect output is out of sync. + # Much pronounced when running back-to-back-back oc commands + if (commandline.count('oc logs') > 0) or (commandline.count('oc get') > 0): + self.ssh.send(commandline) + self.ssh.expect([commandline, pexpect.TIMEOUT]) + self.ssh.send('\r\n') + self.sshresponse = self.ssh.expect([expectedline, pexpect.EOF, pexpect.TIMEOUT]) + else: + self.ssh.sendline(commandline) + self.sshresponse = self.ssh.expect([expectedline, pexpect.EOF, pexpect.TIMEOUT]) if self.sshresponse == 0: return 0 elif self.sshresponse == 1: From 31aade2002ddb0fdaf9dec549792ea5aa2c208fd Mon Sep 17 00:00:00 2001 From: francescomani Date: Tue, 27 Apr 2021 15:48:23 +0200 Subject: [PATCH 250/579] tentative fix for wrong frame caused by rx offset --- executables/nr-ue.c | 6 +++--- openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c | 12 +++++++----- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/executables/nr-ue.c b/executables/nr-ue.c index 2adf373196..4b04c52ade 100644 --- a/executables/nr-ue.c +++ b/executables/nr-ue.c @@ -513,7 +513,7 @@ void *UE_thread(void *arg) { if (UE->is_synchronized) { decoded_frame_rx=(((mac->mib->systemFrameNumber.buf[0] >> mac->mib->systemFrameNumber.bits_unused)<<4) | tmp->proc.decoded_frame_rx); // shift the frame index with all the frames we trashed meanwhile we perform the synch search - decoded_frame_rx=(decoded_frame_rx + (!UE->init_sync_frame) + trashed_frames) % MAX_FRAME_NUMBER; + decoded_frame_rx=(decoded_frame_rx + UE->init_sync_frame + trashed_frames) % MAX_FRAME_NUMBER; } delNotifiedFIFO_elt(res); } else { @@ -652,9 +652,9 @@ void *UE_thread(void *arg) { pushNotifiedFIFO_nothreadSafe(&freeBlocks,res); } - if ( decoded_frame_rx>0 && decoded_frame_rx != curMsg->proc.frame_rx) + if (decoded_frame_rx>0 && decoded_frame_rx != curMsg->proc.frame_rx) LOG_E(PHY,"Decoded frame index (%d) is not compatible with current context (%d), UE should go back to synch mode\n", - decoded_frame_rx, curMsg->proc.frame_rx ); + decoded_frame_rx, curMsg->proc.frame_rx); // use previous timing_advance value to compute writeTimestamp writeTimestamp = timestamp+ diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c b/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c index bfef89ea85..88677fc8e5 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c @@ -308,12 +308,14 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc, PHY_VARS_NR_UE *ue, int n_frames) // every 7*(1<symbol_offset/(7*(1<ofdm_symbol_size + fp->nb_prefix_samples0)+(ue->symbol_offset-n_symb_prefix0)*(fp->ofdm_symbol_size + fp->nb_prefix_samples); - if (ue->ssb_offset < sync_pos_frame) - ue->rx_offset = fp->samples_per_frame - sync_pos_frame + ue->ssb_offset; - else + if (ue->ssb_offset < sync_pos_frame){ + ue->rx_offset = (2*fp->samples_per_frame) - sync_pos_frame + ue->ssb_offset; + ue->init_sync_frame = !is + 2; + } + else{ ue->rx_offset = ue->ssb_offset - sync_pos_frame; - - ue->init_sync_frame = is; + ue->init_sync_frame = !is; + } } /* From b6daabc2b5c9f5e84a3622bd438f61c8a20dd1e8 Mon Sep 17 00:00:00 2001 From: hardy Date: Tue, 13 Apr 2021 21:19:54 +0200 Subject: [PATCH 251/579] tentative to improve Module control encapsulation --- ci-scripts/ci_ueinfra.yaml | 5 +- ci-scripts/cls_module_ue.py | 73 +++++++++++++++--------- ci-scripts/cls_oaicitest.py | 12 ++-- ci-scripts/main.py | 2 +- ci-scripts/xml_files/fr1_nsa_quectel.xml | 53 ++++++++++------- 5 files changed, 87 insertions(+), 58 deletions(-) diff --git a/ci-scripts/ci_ueinfra.yaml b/ci-scripts/ci_ueinfra.yaml index e62943e683..1ca913072c 100644 --- a/ci-scripts/ci_ueinfra.yaml +++ b/ci-scripts/ci_ueinfra.yaml @@ -2,9 +2,12 @@ idefix: ID: idefix State : enabled Kind : quectel - Process : quectel-CM + Process : + Name : quectel-CM + Cmd : /home/oaicicd/quectel-CM/quectel-CM -s oai.ipv4 -4 WakeupScript : ci_ctl_qtel.py /dev/ttyUSB2 wup DetachScript : ci_ctl_qtel.py /dev/ttyUSB2 detach + PLMN : 22201 UENetwork : wwan0 HostIPAddress : 192.168.18.188 HostUsername : oaicicd diff --git a/ci-scripts/cls_module_ue.py b/ci-scripts/cls_module_ue.py index 6aa4265571..4586be33e8 100644 --- a/ci-scripts/cls_module_ue.py +++ b/ci-scripts/cls_module_ue.py @@ -56,7 +56,8 @@ class Module_UE: for k, v in Module.items(): setattr(self, k, v) self.UEIPAddress = "" - + #dictionary linking command names and related module scripts + self.cmd_dict= {"wup": self.WakeupScript,"detach":self.DetachScript}#dictionary of function scripts @@ -65,56 +66,72 @@ class Module_UE: #-----------------$ #this method checks if the specified Process is running on the server hosting the module - def CheckIsModule(self): + #if not it will be started + def CheckCMProcess(self): HOST=self.HostIPAddress - COMMAND="ps aux | grep " + self.Process + " | grep -v grep " + COMMAND="ps aux | grep " + self.Process['Name'] + " | grep -v grep " logging.debug(COMMAND) ssh = subprocess.Popen(["ssh", "%s" % HOST, COMMAND],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE) result = ssh.stdout.readlines() if len(result)!=0: - logging.debug(self.Process + " process found") + logging.debug(self.Process['Name'] + " process found") return True - else: - logging.debug(self.Process + " process NOT found") - return False + else:#start process and check again + logging.debug(self.Process['Name'] + " process NOT found") + #starting the process + logging.debug('Starting ' + self.Process['Name']) + mySSH = sshconnection.SSHConnection() + mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword) + mySSH.command('echo ' + self.HostPassword + ' | sudo -S ' + self.Process['Cmd'] + ' &','\$',5) + mySSH.close() + #checking the process + HOST=self.HostIPAddress + COMMAND="ps aux | grep " + self.Process['Name'] + " | grep -v grep " + logging.debug(COMMAND) + ssh = subprocess.Popen(["ssh", "%s" % HOST, COMMAND],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE) + result = ssh.stdout.readlines() + if len(result)!=0: + logging.debug(self.Process['Name'] + " process found") + return True + else: + logging.debug(self.Process['Name'] + " process NOT found") + return False - #Wakeup/Detach can probably be improved with encapsulation of the command such def Command(self, command) - #this method wakes up the module by calling the specified python script - def WakeUp(self): + #Generic command function, using function pointers dictionary + def Command(self,cmd): mySSH = sshconnection.SSHConnection() mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword) - mySSH.command('echo ' + self.HostPassword + ' | sudo -S python3 ' + self.WakeupScript + ' ','\$',5) + mySSH.command('echo ' + self.HostPassword + ' | sudo -S python3 ' + self.cmd_dict[cmd],'\$',5) time.sleep(5) - logging.debug("Module wake-up") + logging.debug("Module "+ cmd) mySSH.close() - #this method detaches the module by calling the specified python script - def Detach(self): - mySSH = sshconnection.SSHConnection() - mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword) - mySSH.command('echo ' + self.HostPassword + ' | sudo -S python3 ' + self.DetachScript + ' ','\$',5) - time.sleep(5) - logging.debug("Module detach") - mySSH.close() #this method retrieves the Module IP address (not the Host IP address) def GetModuleIPAddress(self): HOST=self.HostIPAddress - COMMAND="ip a show dev " + self.UENetwork + " | grep inet | grep " + self.UENetwork - ssh = subprocess.Popen(["ssh", "%s" % HOST, COMMAND],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE) - response = ssh.stdout.readlines() - if len(response)!=0: + response= [] + tentative = 10 + while (len(response)==0) and (tentative>0): + COMMAND="ip a show dev " + self.UENetwork + " | grep inet | grep " + self.UENetwork + logging.debug(COMMAND) + ssh = subprocess.Popen(["ssh", "%s" % HOST, COMMAND],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE) + response = ssh.stdout.readlines() + tentative-=1 + time.sleep(10) + if (tentative==0) and (len(response)==0): + logging.debug('\u001B[1;37;41m Module IP Address Not Found! Time expired \u001B[0m') + return -1 + else: #check response result = re.search('inet (?P[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)', response[0].decode("utf-8") ) if result is not None: if result.group('moduleipaddress') is not None: self.UEIPAddress = result.group('moduleipaddress') logging.debug('\u001B[1mUE Module IP Address is ' + self.UEIPAddress + '\u001B[0m') + return 0 else: logging.debug('\u001B[1;37;41m Module IP Address Not Found! \u001B[0m') - else: - logging.debug('\u001B[1;37;41m Module IP Address Not Found! \u001B[0m') - else: - logging.debug('\u001B[1;37;41m Module IP Address Not Found! \u001B[0m') + return -1 diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index 9bcfa458ba..06cc814a11 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -386,13 +386,13 @@ class OaiCiTest(): else: #if an ID is specified, it is a module from the yaml infrastructure file #RH Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id]) - is_module=Module_UE.CheckIsModule() + is_module=Module_UE.CheckCMProcess() if is_module: - Module_UE.WakeUp() + Module_UE.Command("wup") Module_UE.GetModuleIPAddress() HTML.CreateHtmlTestRow(Module_UE.UEIPAddress, 'OK', CONST.ALL_PROCESSES_OK) self.UEIPAddresses.append(Module_UE.UEIPAddress) - logging.debug('UEs IP addresses : '+ self.UEIPAddresses) + logging.debug('UE IP addresss : '+ Module_UE.UEIPAddress) def InitializeOAIUE(self,HTML,RAN,EPC,COTS_UE): if self.UEIPAddress == '' or self.UEUserName == '' or self.UEPassword == '' or self.UESourceCodePath == '': @@ -1039,7 +1039,7 @@ class OaiCiTest(): except: os.kill(os.getppid(),signal.SIGUSR1) - def DetachUE(self,HTML,RAN,EPC,COTS_UE): + def DetachUE(self,HTML,RAN,EPC,COTS_UE,InfraUE): if self.ue_id=='':#no ID specified, then it is a COTS controlled by ADB if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '': HELP.GenericHelp(CONST.Version) @@ -1073,9 +1073,9 @@ class OaiCiTest(): cnt += 1 else:#if an ID is specified, it is a module from the yaml infrastructure file Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id]) - is_module=Module_UE.CheckIsModule() + is_module=Module_UE.CheckCMProcess() if is_module: - Module_UE.Detach() + Module_UE.Command("detach") Module_UE.GetModuleIPAddress() HTML.CreateHtmlTestRow(Module_UE.UEIPAddress, 'OK', CONST.ALL_PROCESSES_OK) diff --git a/ci-scripts/main.py b/ci-scripts/main.py index 5a26e3a5ed..2396a73d92 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -717,7 +717,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re elif action == 'Attach_UE': CiTestObj.AttachUE(HTML,RAN,EPC,COTS_UE) elif action == 'Detach_UE': - CiTestObj.DetachUE(HTML,RAN,EPC,COTS_UE) + CiTestObj.DetachUE(HTML,RAN,EPC,COTS_UE,InfraUE) elif action == 'DataDisable_UE': CiTestObj.DataDisableUE(HTML) elif action == 'DataEnable_UE': diff --git a/ci-scripts/xml_files/fr1_nsa_quectel.xml b/ci-scripts/xml_files/fr1_nsa_quectel.xml index a1604af7b3..e1e19cbbf8 100644 --- a/ci-scripts/xml_files/fr1_nsa_quectel.xml +++ b/ci-scripts/xml_files/fr1_nsa_quectel.xml @@ -29,7 +29,7 @@ 040000 000001 010000 - 000001 + 000002 050000 050001 000001 @@ -37,6 +37,8 @@ 000001 070001 000001 + 010002 + 000001 080001 080000 @@ -46,14 +48,14 @@ Initialize_UE Initialize Quectel - idefix + idefix Detach_UE Detach UE - idefix + idefix @@ -64,13 +66,13 @@ 0 0 lte - + Initialize_eNB Initialize gNB - -O ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf -E + -O ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpn310.conf -q 1 1 nr @@ -79,9 +81,16 @@ IdleSleep Sleep - 10 + 5 + + IdleSleep + Sleep + 30 + + + Ping Ping: 20pings in 20sec @@ -98,25 +107,25 @@ 50 - - Iperf - iperf (DL/20Mbps/UDP)(20 sec)(single-ue profile) - -u -b 20M -t 20 -i 1 + + Iperf + iperf (DL/20Mbps/UDP)(20 sec)(single-ue profile) + -u -b 20M -t 20 -i 1 DL - idefix - 50 - single-ue - + idefix + 50 + single-ue + - - Iperf - iperf (UL/3Mbps/UDP)(20 sec)(single-ue profile) - -u -b 3M -t 20 -i 1 + + Iperf + iperf (UL/3Mbps/UDP)(20 sec)(single-ue profile) + -u -b 3M -t 20 -i 1 UL - idefix - 50 - single-ue - + idefix + 50 + single-ue + From 72b5fccce358b30710e99b5600d680365e84d357 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Tue, 27 Apr 2021 18:44:39 +0100 Subject: [PATCH 252/579] Fix build issues after merge --- openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c | 1 - openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 2 +- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c | 9 +++------ .../LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c | 2 +- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c | 2 +- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 12 ++++++------ 6 files changed, 12 insertions(+), 16 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c index 0cc87b6e5f..12b3a2cb73 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c @@ -70,7 +70,6 @@ void config_dci_pdu(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_dci_dl_pdu_rel15_t uint16_t monitoringSymbolsWithinSlot = 0; uint8_t coreset_id = 1; int sps = 0; - def_dci_pdu_rel15 = calloc(1,2*sizeof(dci_pdu_rel15_t)); AssertFatal(mac->scc == NULL || mac->scc_SIB == NULL, "both scc and scc_SIB cannot be non-null\n"); diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 8e8b424900..1da531f742 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -430,7 +430,7 @@ int nr_ue_process_dci_indication_pdu(module_id_t module_id,int cc_id, int gNB_in LOG_D(MAC,"Received dci indication (rnti %x,dci format %d,n_CCE %d,payloadSize %d,payload %llx)\n", dci->rnti,dci->dci_format,dci->n_CCE,dci->payloadSize,*(unsigned long long*)dci->payloadBits); - int8_t ret = nr_extract_dci_info(mac, dci->dci_format, dci->payloadSize, dci->rnti, (uint64_t *)dci->payloadBits, &mac->def_dci_pdu_rel15[dci->dci_format])); + int8_t ret = nr_extract_dci_info(mac, dci->dci_format, dci->payloadSize, dci->rnti, (uint64_t *)dci->payloadBits, &mac->def_dci_pdu_rel15[dci->dci_format]); if ((ret&1) == 1) return -1; else if (ret == 2) dci->dci_format = NR_UL_DCI_FORMAT_0_0; return (nr_ue_process_dci(module_id, cc_id, gNB_index, frame, slot, &mac->def_dci_pdu_rel15[dci->dci_format], dci->rnti, dci->dci_format)); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index 2e3e4f69b6..db4a466573 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -71,8 +71,8 @@ void calculate_preferred_dl_tda(module_id_t module_id, const NR_BWP_Downlink_t * const int symb_dlMixed = tdd ? (1 << tdd->nrofDownlinkSymbols) - 1 : 0; const int target_ss = NR_SearchSpace__searchSpaceType_PR_ue_Specific; - const NR_SearchSpace_t *search_space = get_searchspace(bwp, target_ss); - const NR_ControlResourceSet_t *coreset = get_coreset(bwp, search_space, 1 /* dedicated */); + const NR_SearchSpace_t *search_space = get_searchspace(scc, bwp->bwp_Dedicated, target_ss); + const NR_ControlResourceSet_t *coreset = get_coreset(scc, bwp, search_space, 1 /* dedicated */); // get coreset symbol "map" const uint16_t symb_coreset = (1 << coreset->duration) - 1; @@ -510,7 +510,7 @@ bool allocate_dl_retransmission(module_id_t module_id, /* Find PUCCH occasion: if it fails, undo CCE allocation (undoing PUCCH * allocation after CCE alloc fail would be more complex) */ - const bool alloc = nr_acknack_scheduling(module_id, UE_id, frame, slot); + const bool alloc = nr_acknack_scheduling(module_id, UE_id, frame, slot, -1); if (!alloc) { LOG_D(MAC, "%s(): could not find PUCCH for UE %d/%04x@%d.%d\n", @@ -1211,8 +1211,5 @@ void nr_schedule_ue_spec(module_id_t module_id, gNB_mac->TX_req[CC_id].Number_of_PDUs++; gNB_mac->TX_req[CC_id].SFN = frame; gNB_mac->TX_req[CC_id].Slot = slot; - - /* mark UE as scheduled */ - memset(sched_pdsch, 0, sizeof(*sched_pdsch)); } } diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index 83b7b63775..638f3fe5b4 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -1842,7 +1842,7 @@ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP, NR_CellGroupConfig_t *CellG const int bwp_id = 1; sched_ctrl->active_bwp = bwpList ? bwpList->list.array[bwp_id - 1] : NULL; const int target_ss = NR_SearchSpace__searchSpaceType_PR_ue_Specific; - sched_ctrl->search_space = get_searchspace(sched_ctrl->active_bwp, target_ss); + sched_ctrl->search_space = get_searchspace(NULL, sched_ctrl->active_bwp, target_ss); sched_ctrl->coreset = get_coreset(NULL, sched_ctrl->active_bwp, sched_ctrl->search_space, 1 /* dedicated */); const struct NR_UplinkConfig__uplinkBWP_ToAddModList *ubwpList = servingCellConfig ? servingCellConfig->uplinkConfig->uplinkBWP_ToAddModList : NULL; if (ubwpList) AssertFatal(ubwpList->list.count == 1, diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c index fa6b76fe81..9b2f24a732 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c @@ -1283,7 +1283,7 @@ bool nr_acknack_scheduling(int mod_id, memset(pucch, 0, sizeof(*pucch)); pucch->frame = s == n_slots_frame - 1 ? (f + 1) % 1024 : f; pucch->ul_slot = (s + 1) % n_slots_frame; - return nr_acknack_scheduling(mod_id, UE_id, frame, slot); + return nr_acknack_scheduling(mod_id, UE_id, frame, slot, -1); } // Find the right timing_indicator value. diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 080d762c94..78de84b47c 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -117,7 +117,7 @@ void calculate_preferred_ul_tda(module_id_t module_id, const NR_BWP_Uplink_t *ub const struct NR_PUSCH_TimeDomainResourceAllocationList *tdaList = ubwp->bwp_Common->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList; AssertFatal(tdaList->list.count >= 3, "need to have at least three TDAs for UL slots\n"); const NR_PUSCH_TimeDomainResourceAllocation_t *tdaP_UL = tdaList->list.array[0]; - const int k2 = get_K2(ubwp, /* tda = */ 0, mu); + const int k2 = get_K2(scc, ubwp, /* tda = */ 0, mu); int start, len; SLIV2SL(tdaP_UL->startSymbolAndLength, &start, &len); const uint16_t symb_tda = ((1 << len) - 1) << start; @@ -129,10 +129,10 @@ void calculate_preferred_ul_tda(module_id_t module_id, const NR_BWP_Uplink_t *ub // get largest time domain allocation (TDA) for UL slot and UL in mixed slot int tdaMi = -1; const NR_PUSCH_TimeDomainResourceAllocation_t *tdaP_Mi = tdaList->list.array[1]; - AssertFatal(k2 == get_K2(ubwp, /* tda = */ 1, mu), + AssertFatal(k2 == get_K2(scc, ubwp, /* tda = */ 1, mu), "scheduler cannot handle different k2 for UL slot (%d) and UL Mixed slot (%ld)\n", k2, - get_K2(ubwp, /* tda = */ 1, mu)); + get_K2(scc, ubwp, /* tda = */ 1, mu)); SLIV2SL(tdaP_Mi->startSymbolAndLength, &start, &len); const uint16_t symb_tda_mi = ((1 << len) - 1) << start; // check whether PUCCH and TDA overlap: then, we cannot use it. Also, check @@ -368,9 +368,9 @@ void nr_process_mac_pdu(module_id_t module_idP, mac_sdu_len = (uint16_t)((NR_MAC_SUBHEADER_SHORT *)pdu_ptr)->L; mac_subheader_len = 2; } - LOG_D(NR_MAC, "[UE %d] Frame %d : ULSCH -> UL-DCCH %d (gNB %d, %d bytes), rnti: %d \n", module_idP, frameP, rx_lcid, module_idP, mac_sdu_len, rnti); + LOG_E(NR_MAC, "[UE %d] Frame %d : ULSCH -> UL-DCCH %d (gNB %d, %d bytes), rnti: %d \n", module_idP, frameP, rx_lcid, module_idP, mac_sdu_len, *UE_info->rnti); mac_rlc_data_ind(module_idP, - rnti, + *UE_info->rnti, module_idP, frameP, ENB_FLAG_YES, @@ -1147,7 +1147,7 @@ bool nr_fr1_ulsch_preprocessor(module_id_t module_id, frame_t frame, sub_frame_t const int tda = nr_mac->preferred_ul_tda[sched_ctrl->active_ubwp->bwp_Id][slot]; if (tda < 0) return false; - int K2 = get_K2(sched_ctrl->active_ubwp, tda, mu); + int K2 = get_K2(scc, sched_ctrl->active_ubwp, tda, mu); const int sched_frame = frame + (slot + K2 >= nr_slots_per_frame[mu]); const int sched_slot = (slot + K2) % nr_slots_per_frame[mu]; if (!is_xlsch_in_slot(nr_mac->ulsch_slot_bitmap[slot / 64], sched_slot)) From 8d0b9e4cdbecc68b4740c9d2a431638fdcd15fa3 Mon Sep 17 00:00:00 2001 From: Florian Kaltenberger Date: Tue, 27 Apr 2021 20:34:00 +0200 Subject: [PATCH 253/579] yet some more fixes to the benetel config files --- ci-scripts/conf_files/benetel-5g.conf | 14 +++----------- .../PROJECTS/GENERIC-LTE-EPC/CONF/benetel-5g.conf | 15 ++++----------- 2 files changed, 7 insertions(+), 22 deletions(-) diff --git a/ci-scripts/conf_files/benetel-5g.conf b/ci-scripts/conf_files/benetel-5g.conf index 5788cd9b36..9adead3a68 100644 --- a/ci-scripts/conf_files/benetel-5g.conf +++ b/ci-scripts/conf_files/benetel-5g.conf @@ -66,17 +66,7 @@ gNBs = initialDLBWPk0_1 = 0; #for mixed slot initialDLBWPmappingType_1 = 0; - initialDLBWPstartSymbolAndLength_1 = 53; #this is SS=1,L=5 - - initialDLBWPk0_2 = 0; - initialDLBWPmappingType_2 = 0; - #this is SS=1,L=12 - initialDLBWPstartSymbolAndLength_2 = 54; - - initialDLBWPk0_3 = 0; - initialDLBWPmappingType_3 = 0; - #this is SS=1,L=4 //5 (4 is for 43, 5 is for 57) - initialDLBWPstartSymbolAndLength_3 = 57; //43; //57; + initialDLBWPstartSymbolAndLength_1 = 57; #this is SS=1,L=5 #uplinkConfigCommon #frequencyInfoUL @@ -102,6 +92,8 @@ gNBs = prach_msg1_FDM = 0; prach_msg1_FrequencyStart = 74; zeroCorrelationZoneConfig = 13; + #preambleReceivedTargetPower = -118; + #preambleReceivedTargetPower = -104; preambleReceivedTargetPower = -108; #preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200) preambleTransMax = 6; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-5g.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-5g.conf index c72ec515dc..4147ec6ae2 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-5g.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-5g.conf @@ -67,17 +67,7 @@ gNBs = initialDLBWPk0_1 = 0; #for mixed slot initialDLBWPmappingType_1 = 0; - initialDLBWPstartSymbolAndLength_1 = 53; #this is SS=1,L=5 - - initialDLBWPk0_2 = 0; - initialDLBWPmappingType_2 = 0; - #this is SS=1,L=12 - initialDLBWPstartSymbolAndLength_2 = 54; - - initialDLBWPk0_3 = 0; - initialDLBWPmappingType_3 = 0; - #this is SS=1,L=4 //5 (4 is for 43, 5 is for 57) - initialDLBWPstartSymbolAndLength_3 = 57; //43; //57; + initialDLBWPstartSymbolAndLength_1 = 57; #this is SS=1,L=5 #uplinkConfigCommon #frequencyInfoUL @@ -103,6 +93,8 @@ gNBs = prach_msg1_FDM = 0; prach_msg1_FrequencyStart = 74; zeroCorrelationZoneConfig = 13; + #preambleReceivedTargetPower = -118; + #preambleReceivedTargetPower = -104; preambleReceivedTargetPower = -108; #preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200) preambleTransMax = 6; @@ -285,6 +277,7 @@ RUs = ( THREAD_STRUCT = ( { #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" + //parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; parallel_config = "PARALLEL_SINGLE_THREAD"; #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" worker_config = "WORKER_DISABLE"; From 146f38af16e85baf0b3ba3e2abfdaff93ed213c9 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Tue, 27 Apr 2021 20:41:28 +0200 Subject: [PATCH 254/579] build for nr_pbchsim after merge with develop --- openair1/SIMULATION/NR_PHY/pbchsim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair1/SIMULATION/NR_PHY/pbchsim.c b/openair1/SIMULATION/NR_PHY/pbchsim.c index 3e07a45d04..548b76db69 100644 --- a/openair1/SIMULATION/NR_PHY/pbchsim.c +++ b/openair1/SIMULATION/NR_PHY/pbchsim.c @@ -47,7 +47,7 @@ #include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h" #include "openair1/SIMULATION/NR_PHY/nr_dummy_functions.c" #include "openair1/PHY/MODULATION/nr_modulation.h" - +#include //#define DEBUG_NR_PBCHSIM PHY_VARS_gNB *gNB; From 43b7c16e83821285d263448c02547473c00e81fd Mon Sep 17 00:00:00 2001 From: rmagueta Date: Wed, 28 Apr 2021 00:17:25 +0100 Subject: [PATCH 255/579] Fix RA after merge --- openair2/LAYER2/NR_MAC_gNB/config.c | 34 +++++++++++-------- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c | 2 +- .../LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c | 4 --- .../NR_MAC_gNB/gNB_scheduler_primitives.c | 9 +++-- .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 2 +- 5 files changed, 25 insertions(+), 26 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/config.c b/openair2/LAYER2/NR_MAC_gNB/config.c index 92f5886bda..85a756d90c 100644 --- a/openair2/LAYER2/NR_MAC_gNB/config.c +++ b/openair2/LAYER2/NR_MAC_gNB/config.c @@ -339,9 +339,9 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP, int pdsch_AntennaPorts, int pusch_AntennaPorts, NR_ServingCellConfigCommon_t *scc, - int add_ue, - uint32_t rnti, - NR_CellGroupConfig_t *CellGroup){ + int add_ue, + uint32_t rnti, + NR_CellGroupConfig_t *CellGroup){ if (scc != NULL ) { AssertFatal((scc->ssb_PositionsInBurst->present > 0) && (scc->ssb_PositionsInBurst->present < 4), "SSB Bitmap type %d is not valid\n",scc->ssb_PositionsInBurst->present); @@ -384,7 +384,7 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP, ssb_SubcarrierOffset, pdsch_AntennaPorts, pusch_AntennaPorts, - scc); + scc); LOG_E(NR_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); // if in nFAPI mode @@ -448,19 +448,23 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP, if (CellGroup) { const NR_ServingCellConfig_t *servingCellConfig = CellGroup->spCellConfig->spCellConfigDedicated; + const struct NR_ServingCellConfig__downlinkBWP_ToAddModList *bwpList = servingCellConfig->downlinkBWP_ToAddModList; - AssertFatal(bwpList->list.count > 0, "downlinkBWP_ToAddModList has no BWPs!\n"); - for (int i = 0; i < bwpList->list.count; ++i) { - const NR_BWP_Downlink_t *bwp = bwpList->list.array[i]; - calculate_preferred_dl_tda(Mod_idP, bwp); + if(bwpList) { + AssertFatal(bwpList->list.count > 0, "downlinkBWP_ToAddModList has no BWPs!\n"); + for (int i = 0; i < bwpList->list.count; ++i) { + const NR_BWP_Downlink_t *bwp = bwpList->list.array[i]; + calculate_preferred_dl_tda(Mod_idP, bwp); + } } - const struct NR_UplinkConfig__uplinkBWP_ToAddModList *ubwpList = - servingCellConfig->uplinkConfig->uplinkBWP_ToAddModList; - AssertFatal(ubwpList->list.count > 0, "downlinkBWP_ToAddModList no BWPs!\n"); - for (int i = 0; i < ubwpList->list.count; ++i) { - const NR_BWP_Uplink_t *ubwp = ubwpList->list.array[i]; - calculate_preferred_ul_tda(Mod_idP, ubwp); + const struct NR_UplinkConfig__uplinkBWP_ToAddModList *ubwpList = servingCellConfig->uplinkConfig->uplinkBWP_ToAddModList; + if(ubwpList) { + AssertFatal(ubwpList->list.count > 0, "downlinkBWP_ToAddModList no BWPs!\n"); + for (int i = 0; i < ubwpList->list.count; ++i) { + const NR_BWP_Uplink_t *ubwp = ubwpList->list.array[i]; + calculate_preferred_ul_tda(Mod_idP, ubwp); + } } NR_UE_info_t *UE_info = &RC.nrmac[Mod_idP]->UE_info; @@ -482,7 +486,7 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP, NR_RA_t *ra = &cc->ra[ra_index]; ra->CellGroup = CellGroup; if (CellGroup->spCellConfig && CellGroup->spCellConfig->reconfigurationWithSync && - CellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated!=NULL) { + CellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated!=NULL) { if (CellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra != NULL) { ra->cfra = true; ra->rnti = rnti; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c index b2c99527ca..5795b41787 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c @@ -355,7 +355,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, nr_rrc_trigger(&ctxt, 0 /*CC_id*/, frame, slot >> *scc->ssbSubcarrierSpacing); } - memset(RC.nrmac[module_idP]->cce_list[bwp_id][0],0,MAX_NUM_CCE*sizeof(int)); // coreset0 + memset(RC.nrmac[module_idP]->cce_list[0][0],0,MAX_NUM_CCE*sizeof(int)); // coreset0 memset(RC.nrmac[module_idP]->cce_list[bwp_id][1],0,MAX_NUM_CCE*sizeof(int)); // coresetid 1 NR_UE_info_t *UE_info = &RC.nrmac[module_idP]->UE_info; for (int UE_id = UE_info->list.head; UE_id >= 0; UE_id = UE_info->list.next[UE_id]) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index db4a466573..4677dbf805 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -713,10 +713,6 @@ void nr_fr1_dlsch_preprocessor(module_id_t module_id, frame_t frame, sub_frame_t int UE_id = UE_info->list.head; NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; - const int tda = RC.nrmac[module_id]->preferred_dl_tda[sched_ctrl->active_bwp->bwp_Id][slot]; - if (tda < 0) - return; - const uint16_t bwpSize = NRRIV2BW(sched_ctrl->active_bwp ? sched_ctrl->active_bwp->bwp_Common->genericParameters.locationAndBandwidth: scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index 638f3fe5b4..bac4d960ec 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -139,9 +139,7 @@ NR_ControlResourceSet_t *get_coreset(NR_ServingCellConfigCommon_t *scc, "search space\n"); return coreset; } else { - // AssertFatal(bwp!=NULL,"bwp is null here, we have to check for a dedicated configuration for initialBWP in CellGroup, todo\n"); const int n = bwp->bwp_Dedicated->pdcch_Config->choice.setup->controlResourceSetToAddModList->list.count; - for (int i = 0; i < n; i++) { NR_ControlResourceSet_t *coreset = bwp->bwp_Dedicated->pdcch_Config->choice.setup->controlResourceSetToAddModList->list.array[i]; @@ -1800,6 +1798,7 @@ int get_ul_bwp_id(const NR_ServingCellConfig_t *servingCellConfig) //------------------------------------------------------------------------------ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP, NR_CellGroupConfig_t *CellGroup) { + NR_ServingCellConfigCommon_t *scc = RC.nrmac[mod_idP]->common_channels[0].ServingCellConfigCommon; NR_UE_info_t *UE_info = &RC.nrmac[mod_idP]->UE_info; LOG_I(NR_MAC, "[gNB %d] Adding UE with rnti %x (num_UEs %d)\n", mod_idP, @@ -1841,9 +1840,9 @@ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP, NR_CellGroupConfig_t *CellG bwpList->list.count); const int bwp_id = 1; sched_ctrl->active_bwp = bwpList ? bwpList->list.array[bwp_id - 1] : NULL; - const int target_ss = NR_SearchSpace__searchSpaceType_PR_ue_Specific; - sched_ctrl->search_space = get_searchspace(NULL, sched_ctrl->active_bwp, target_ss); - sched_ctrl->coreset = get_coreset(NULL, sched_ctrl->active_bwp, sched_ctrl->search_space, 1 /* dedicated */); + const int target_ss = sched_ctrl->active_bwp ? NR_SearchSpace__searchSpaceType_PR_ue_Specific : NR_SearchSpace__searchSpaceType_PR_common; + sched_ctrl->search_space = get_searchspace(scc, sched_ctrl->active_bwp ? sched_ctrl->active_bwp->bwp_Dedicated : NULL, target_ss); + sched_ctrl->coreset = get_coreset(scc, sched_ctrl->active_bwp, sched_ctrl->search_space, target_ss); const struct NR_UplinkConfig__uplinkBWP_ToAddModList *ubwpList = servingCellConfig ? servingCellConfig->uplinkConfig->uplinkBWP_ToAddModList : NULL; if (ubwpList) AssertFatal(ubwpList->list.count == 1, "uplinkBWP_ToAddModList has %d BWP!\n", diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 78de84b47c..047a2ff54c 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -1144,7 +1144,7 @@ bool nr_fr1_ulsch_preprocessor(module_id_t module_id, frame_t frame, sub_frame_t * schedule now (slot + k2 is not UL slot) */ int UE_id = UE_info->list.head; NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; - const int tda = nr_mac->preferred_ul_tda[sched_ctrl->active_ubwp->bwp_Id][slot]; + const int tda = sched_ctrl->active_ubwp ? nr_mac->preferred_ul_tda[sched_ctrl->active_ubwp->bwp_Id][slot] : 0; if (tda < 0) return false; int K2 = get_K2(scc, sched_ctrl->active_ubwp, tda, mu); From 1041a6d807a2bb2f808e6771e46a44e123f0bc8e Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Wed, 28 Apr 2021 09:39:27 +0200 Subject: [PATCH 256/579] CI: better silent and resync optional arguments Signed-off-by: Raphael Defosseux --- ci-scripts/cls_physim1.py | 21 +++++++++++---------- ci-scripts/sshconnection.py | 6 +++--- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/ci-scripts/cls_physim1.py b/ci-scripts/cls_physim1.py index 5cb36629e7..41beb1e096 100644 --- a/ci-scripts/cls_physim1.py +++ b/ci-scripts/cls_physim1.py @@ -130,7 +130,7 @@ class PhySim: else: logging.debug('oai-physim size is unknown') - # logging to OC Cluster and then switch to corresponding project + # logging to OC Cluster and then switch to corresponding project mySSH.command(f'oc login -u {ocUserName} -p {ocPassword}', '\$', 6) if mySSH.getBefore().count('Login successful.') == 0: logging.error('\u001B[1m OC Cluster Login Failed\u001B[0m') @@ -185,7 +185,7 @@ class PhySim: count = 0 while(count < 2 and isRunning == False): time.sleep(60) - mySSH.command('oc get pods -l app.kubernetes.io/instance=physim', '\$', 6) + mySSH.command('oc get pods -o wide -l app.kubernetes.io/instance=physim | tee -a cmake_targets/log/physim_pods_summary.txt', '\$', 6, resync=True) if mySSH.getBefore().count('Running') == 12: logging.debug('\u001B[1m Running the physim test Scenarios\u001B[0m') isRunning = True @@ -193,7 +193,7 @@ class PhySim: count +=1 if isRunning == False: logging.error('\u001B[1m Some PODS Running FAILED \u001B[0m') - mySSH.command('oc get pods -l app.kubernetes.io/instance=physim > cmake_targets/log/physim_pods_summary.txt 2>&1', '\$', 6) + mySSH.command('oc get pods -l app.kubernetes.io/instance=physim 2>&1 | tee -a cmake_targets/log/physim_pods_summary.txt', '\$', 6) mySSH.command('helm uninstall physim >> cmake_targets/log/physim_helm_summary.txt 2>&1', '\$', 6) self.AnalyzeLogFile_phySim(HTML) sys.exit(-1) @@ -203,9 +203,10 @@ class PhySim: # doing a deep copy! tmpPodNames = podNames.copy() while(count < 28 and isFinished == False): - time.sleep(60) + time.sleep(58) for podName in tmpPodNames: - mySSH.command(f'oc logs --tail=1 {podName} 2>&1', '\$', 6) + mySSH.command(f'oc logs --tail=1 {podName} 2>&1', '\$', 6, silent=True, resync=True) + time.sleep(2) if mySSH.getBefore().count('FINISHED') != 0: logging.debug(podName + ' is finished') tmpPodNames.remove(podName) @@ -214,10 +215,10 @@ class PhySim: count += 1 if isFinished: logging.debug('\u001B[1m PhySim test is Complete\u001B[0m') - + # Getting the logs of each executables running in individual pods for podName in podNames: - mySSH.command(f'oc logs {podName} >> cmake_targets/log/physim_test.txt 2>&1', '\$', 15) + mySSH.command(f'oc logs {podName} >> cmake_targets/log/physim_test.txt 2>&1', '\$', 15, resync=True) time.sleep(30) # UnDeploy the physical simulator pods @@ -225,7 +226,7 @@ class PhySim: isFinished1 = False while(isFinished1 == False): time.sleep(20) - mySSH.command('oc get pods -l app.kubernetes.io/instance=physim', '\$', 6) + mySSH.command('oc get pods -l app.kubernetes.io/instance=physim', '\$', 6, resync=True) if re.search('No resources found', mySSH.getBefore()): isFinished1 = True if isFinished1 == True: @@ -249,7 +250,7 @@ class PhySim: mySSH.command('cd ' + lSourcePath, '\$', 5) mySSH.command('cd ' + lSourcePath + '/cmake_targets', '\$', 5) mySSH.command('mkdir -p physim_test_log_' + self.testCase_id, '\$', 5) - mySSH.command('mv log/physim_* ' + 'physim_test_log_' + self.testCase_id, '\$', 5) + mySSH.command('cp log/physim_* ' + 'physim_test_log_' + self.testCase_id, '\$', 5) if not os.path.exists(f'./physim_test_logs_{self.testCase_id}'): os.mkdir(f'./physim_test_logs_{self.testCase_id}') mySSH.copyin(lIpAddr, lUserName, lPassWord, lSourcePath + '/cmake_targets/physim_test_log_' + self.testCase_id + '/*', './physim_test_logs_' + self.testCase_id) @@ -279,7 +280,7 @@ class PhySim: self.testCount[1] += 1 else: self.testResult[testName[1]] = [ret3, 'FAIL'] - self.testCount[2] += 1 + self.testCount[2] += 1 self.testSummary['Nbtests'] = self.testCount[0] self.testSummary['Nbpass'] = self.testCount[1] self.testSummary['Nbfail'] = self.testCount[2] diff --git a/ci-scripts/sshconnection.py b/ci-scripts/sshconnection.py index 087e920fe1..4a0992436b 100644 --- a/ci-scripts/sshconnection.py +++ b/ci-scripts/sshconnection.py @@ -111,13 +111,13 @@ class SSHConnection(): self.sshresponse = self.ssh.expect(expected) return self.sshresponse - def command(self, commandline, expectedline, timeout): - if commandline.count('oc logs') == 0: + def command(self, commandline, expectedline, timeout, silent=False, resync=False): + if not silent: logging.debug(commandline) self.ssh.timeout = timeout # Nasty patch when pexpect output is out of sync. # Much pronounced when running back-to-back-back oc commands - if (commandline.count('oc logs') > 0) or (commandline.count('oc get') > 0): + if resync: self.ssh.send(commandline) self.ssh.expect([commandline, pexpect.TIMEOUT]) self.ssh.send('\r\n') From 285650d354df321c8144e5c71ad070768cec46bf Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Wed, 28 Apr 2021 10:54:02 +0200 Subject: [PATCH 257/579] CI: Adding missing reason for image build failure Signed-off-by: Raphael Defosseux --- ci-scripts/cls_containerize.py | 26 ++++++++++++++++++++++++++ ci-scripts/html.py | 27 +++++++++++++++++---------- 2 files changed, 43 insertions(+), 10 deletions(-) diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index e5011dcd46..6c8a2deb77 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -88,6 +88,7 @@ class Containerize(): self.host = '' self.allImagesSize = {} self.collectInfo = {} + #----------------------------------------------------------- # Container management functions #----------------------------------------------------------- @@ -335,6 +336,31 @@ class Containerize(): errorandwarnings['warnings'] = warningsNo errorandwarnings['status'] = status files[fil] = errorandwarnings + # Let analyze the target image creation part + if os.path.isfile('build_log_{}/{}.log'.format(self.testCase_id,image)): + errorandwarnings = {} + with open('build_log_{}/{}.log'.format(self.testCase_id,image), mode='r') as inputfile: + startOfTargetImageCreation = False + buildStatus = False + for line in inputfile: + result = re.search('FROM .* as ' + image + '$', str(line)) + if result is not None: + startOfTargetImageCreation = True + if startOfTargetImageCreation: + result = re.search('Successfully tagged ' + image + ':', str(line)) + if result is not None: + buildStatus = True + result = re.search('COMMIT ' + image + ':', str(line)) + if result is not None: + buildStatus = True + inputfile.close() + if buildStatus: + errorandwarnings['errors'] = 0 + else: + errorandwarnings['errors'] = 1 + errorandwarnings['warnings'] = 0 + errorandwarnings['status'] = buildStatus + files['Target Image Creation'] = errorandwarnings self.collectInfo[image] = files if status: diff --git a/ci-scripts/html.py b/ci-scripts/html.py index 350cb3c50a..5cdaaa0c39 100644 --- a/ci-scripts/html.py +++ b/ci-scripts/html.py @@ -47,7 +47,7 @@ import constants as CONST class HTMLManagement(): def __init__(self): - + self.htmlFile = '' self.htmlHeaderCreated = False self.htmlFooterCreated = False @@ -86,13 +86,13 @@ class HTMLManagement(): #----------------------------------------------------------- # Setters and Getters #----------------------------------------------------------- - + def SethtmlUEConnected(self, nbUEs): if nbUEs > 0: self.htmlUEConnected = nbUEs else: self.htmlUEConnected = 1 - + #----------------------------------------------------------- @@ -412,7 +412,12 @@ class HTMLManagement(): for image in collectInfo: files = collectInfo[image] # TabHeader for image logs on built shared and target images - self.htmlFile.write(' \n') + if allImagesSize[image].count('unknown') > 0: + self.htmlFile.write(' \n') + elif allImagesSize[image].count('Build Failed') > 0: + self.htmlFile.write(' \n') + else: + self.htmlFile.write(' \n') self.htmlFile.write(' ---- ' + image + ' IMAGE STATUS ----> Size ' + allImagesSize[image] + ' \n') self.htmlFile.write(' \n') self.htmlFile.write(' \n') @@ -431,18 +436,20 @@ class HTMLManagement(): self.htmlFile.write(' ' + str(parameters['errors']) + '\n') else: self.htmlFile.write(' ' + str(parameters['errors']) + '\n') - if (parameters['warnings'] == 0): + if (parameters['errors'] > 0): + self.htmlFile.write(' ' + str(parameters['warnings']) + '\n') + elif (parameters['warnings'] == 0): self.htmlFile.write(' ' + str(parameters['warnings']) + '\n') elif ((parameters['warnings'] > 0) and (parameters['warnings'] <= 20)): self.htmlFile.write(' ' + str(parameters['warnings']) + '\n') else: - self.htmlFile.write(' ' + str(parameters['warnings']) + '\n') + self.htmlFile.write(' ' + str(parameters['warnings']) + '\n') if (parameters['errors'] == 0) and (parameters['warnings'] == 0): self.htmlFile.write(' OK \n') elif (parameters['errors'] == 0) and ((parameters['warnings'] > 0) and (parameters['warnings'] <= 20)): self.htmlFile.write(' OK \n') else: - self.htmlFile.write(' NOT OK \n') + self.htmlFile.write(' NOT OK \n') self.htmlFile.write(' \n') self.htmlFile.close() @@ -613,6 +620,6 @@ class HTMLManagement(): if 'PASS' in value: self.htmlFile.write(' ' + value[1] + '\n') else: - self.htmlFile.write(' ' + value[1] + '\n') - - self.htmlFile.close() \ No newline at end of file + self.htmlFile.write(' ' + value[1] + '\n') + + self.htmlFile.close() From d5a7e6ad7e84d0e29bc361a5268994ef6bfa5643 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Wed, 28 Apr 2021 14:22:23 +0100 Subject: [PATCH 258/579] Fix segmentations fault after merge --- .../LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c | 10 ++--- .../LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c | 4 +- .../NR_MAC_gNB/gNB_scheduler_primitives.c | 39 +++++++++---------- .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 29 +++++++------- 4 files changed, 41 insertions(+), 41 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index 4677dbf805..c46b77880c 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -444,10 +444,11 @@ bool allocate_dl_retransmission(module_id_t module_id, const uint16_t bwpSize = NRRIV2BW(sched_ctrl->active_bwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); int rbStart = NRRIV2PRBOFFSET(sched_ctrl->active_bwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - const uint8_t num_dmrs_cdm_grps_no_data = 1; + NR_pdsch_semi_static_t *ps = &sched_ctrl->pdsch_semi_static; + const uint8_t num_dmrs_cdm_grps_no_data = ps->nrOfSymbols == 2 ? 1 : 2; int rbSize = 0; - const int tda = RC.nrmac[module_id]->preferred_dl_tda[sched_ctrl->active_bwp->bwp_Id][slot]; + const int tda = sched_ctrl->active_bwp ? RC.nrmac[module_id]->preferred_dl_tda[sched_ctrl->active_bwp->bwp_Id][slot] : 0; if (tda == retInfo->time_domain_allocation) { /* Check that there are enough resources for retransmission */ while (rbSize < retInfo->rbSize) { @@ -464,7 +465,6 @@ bool allocate_dl_retransmission(module_id_t module_id, } /* check whether we need to switch the TDA allocation since the last * (re-)transmission */ - NR_pdsch_semi_static_t *ps = &sched_ctrl->pdsch_semi_static; if (ps->time_domain_allocation != tda || ps->numDmrsCdmGrpsNoData != num_dmrs_cdm_grps_no_data) nr_set_pdsch_semi_static( scc, UE_info->CellGroup[UE_id], sched_ctrl->active_bwp, tda, num_dmrs_cdm_grps_no_data, ps); @@ -665,10 +665,10 @@ void pf_dl(module_id_t module_id, max_rbSize++; /* MCS has been set above */ - const uint8_t num_dmrs_cdm_grps_no_data = 1; - const int tda = RC.nrmac[module_id]->preferred_dl_tda[sched_ctrl->active_bwp->bwp_Id][slot]; + const int tda = sched_ctrl->active_bwp ? RC.nrmac[module_id]->preferred_dl_tda[sched_ctrl->active_bwp->bwp_Id][slot] : 0; NR_sched_pdsch_t *sched_pdsch = &sched_ctrl->sched_pdsch; NR_pdsch_semi_static_t *ps = &sched_ctrl->pdsch_semi_static; + const uint8_t num_dmrs_cdm_grps_no_data = ps->nrOfSymbols == 2 ? 1 : 2; if (ps->time_domain_allocation != tda || ps->numDmrsCdmGrpsNoData != num_dmrs_cdm_grps_no_data) nr_set_pdsch_semi_static( scc, UE_info->CellGroup[UE_id], sched_ctrl->active_bwp, tda, num_dmrs_cdm_grps_no_data, ps); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c index 6cd8bb1794..30c117eba1 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c @@ -359,7 +359,7 @@ void nr_preprocessor_phytest(module_id_t module_id, NR_pdsch_semi_static_t *ps = &sched_ctrl->pdsch_semi_static; sched_pdsch->rbStart = rbStart; sched_pdsch->rbSize = rbSize; - const int tda = RC.nrmac[module_id]->preferred_dl_tda[sched_ctrl->active_bwp->bwp_Id][slot]; + const int tda = sched_ctrl->active_bwp ? RC.nrmac[module_id]->preferred_dl_tda[sched_ctrl->active_bwp->bwp_Id][slot] : 0; const uint8_t num_dmrs_cdm_grps_no_data = 1; if (ps->time_domain_allocation != tda || ps->numDmrsCdmGrpsNoData != num_dmrs_cdm_grps_no_data) nr_set_pdsch_semi_static( @@ -409,7 +409,7 @@ bool nr_ul_preprocessor_phytest(module_id_t module_id, frame_t frame, sub_frame_ NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; - const int tda = RC.nrmac[module_id]->preferred_ul_tda[sched_ctrl->active_ubwp->bwp_Id][slot]; + const int tda = sched_ctrl->active_ubwp ? RC.nrmac[module_id]->preferred_ul_tda[sched_ctrl->active_ubwp->bwp_Id][slot] : 0; if (tda < 0) return false; const struct NR_PUSCH_TimeDomainResourceAllocationList *tdaList = diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index bac4d960ec..34f47ffef5 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -274,35 +274,34 @@ void nr_set_pdsch_semi_static(const NR_ServingCellConfigCommon_t *scc, { ps->time_domain_allocation = tda; - const struct NR_PDSCH_TimeDomainResourceAllocationList *tdaList = - bwp->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList; + const struct NR_PDSCH_TimeDomainResourceAllocationList *tdaList = bwp ? + bwp->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList : + scc->downlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList; AssertFatal(tda < tdaList->list.count, "time_domain_allocation %d>=%d\n", tda, tdaList->list.count); const int startSymbolAndLength = tdaList->list.array[tda]->startSymbolAndLength; SLIV2SL(startSymbolAndLength, &ps->startSymbolIndex, &ps->nrOfSymbols); - if (!secondaryCellGroup->spCellConfig->spCellConfigDedicated->initialDownlinkBWP->pdsch_Config->choice.setup - ->mcs_Table) - ps->mcsTableIdx = 0; - else if (*secondaryCellGroup->spCellConfig->spCellConfigDedicated->initialDownlinkBWP->pdsch_Config->choice.setup - ->mcs_Table - == 0) - ps->mcsTableIdx = 1; - else - ps->mcsTableIdx = 2; + ps->mcsTableIdx = 0; + if (bwp && + bwp->bwp_Dedicated && + bwp->bwp_Dedicated->pdsch_Config && + bwp->bwp_Dedicated->pdsch_Config->choice.setup && + bwp->bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table) { + if (*bwp->bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table == 0) + ps->mcsTableIdx = 1; + else + ps->mcsTableIdx = 2; + } + else ps->mcsTableIdx = 0; ps->numDmrsCdmGrpsNoData = num_dmrs_cdm_grps_no_data; - ps->dmrsConfigType = - bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type - == NULL - ? 0 - : 1; + ps->dmrsConfigType = bwp!=NULL ? (bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type == NULL ? 0 : 1) : 0; + // if no data in dmrs cdm group is 1 only even REs have no data // if no data in dmrs cdm group is 2 both odd and even REs have no data ps->N_PRB_DMRS = num_dmrs_cdm_grps_no_data * (ps->dmrsConfigType == NFAPI_NR_DMRS_TYPE1 ? 6 : 4); - ps->N_DMRS_SLOT = - get_num_dmrs_symbols(bwp->bwp_Dedicated->pdsch_Config->choice.setup, scc->dmrs_TypeA_Position, ps->nrOfSymbols, ps->startSymbolIndex); - ps->dl_dmrs_symb_pos = - fill_dmrs_mask(bwp->bwp_Dedicated->pdsch_Config->choice.setup, scc->dmrs_TypeA_Position, ps->nrOfSymbols, ps->startSymbolIndex); + ps->dl_dmrs_symb_pos = fill_dmrs_mask(bwp ? bwp->bwp_Dedicated->pdsch_Config->choice.setup : NULL, scc->dmrs_TypeA_Position, ps->nrOfSymbols, ps->startSymbolIndex); + ps->N_DMRS_SLOT = get_num_dmrs(ps->dl_dmrs_symb_pos); } void nr_set_pusch_semi_static(const NR_ServingCellConfigCommon_t *scc, diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 047a2ff54c..bcd70b2aff 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -795,13 +795,13 @@ bool allocate_ul_retransmission(module_id_t module_id, NR_UE_info_t *UE_info = &RC.nrmac[module_id]->UE_info; NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; NR_sched_pusch_t *retInfo = &sched_ctrl->ul_harq_processes[harq_pid].sched_pusch; - int rbStart = - NRRIV2PRBOFFSET(sched_ctrl->active_ubwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - const uint16_t bwpSize = - NRRIV2BW(sched_ctrl->active_ubwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + + NR_BWP_t *genericParameters = sched_ctrl->active_ubwp ? &sched_ctrl->active_ubwp->bwp_Common->genericParameters : &scc->uplinkConfigCommon->initialUplinkBWP->genericParameters; + int rbStart = NRRIV2BW(genericParameters->locationAndBandwidth, MAX_BWP_SIZE); + const uint16_t bwpSize = NRRIV2PRBOFFSET(genericParameters->locationAndBandwidth, MAX_BWP_SIZE); const uint8_t num_dmrs_cdm_grps_no_data = sched_ctrl->active_bwp ? 1 : 2; - const int tda = RC.nrmac[module_id]->preferred_ul_tda[sched_ctrl->active_ubwp->bwp_Id][slot]; + const int tda = sched_ctrl->active_ubwp ? RC.nrmac[module_id]->preferred_ul_tda[sched_ctrl->active_ubwp->bwp_Id][slot] : 0; if (tda == retInfo->time_domain_allocation) { /* Check the resource is enough for retransmission */ while (rbStart < bwpSize && !rballoc_mask[rbStart]) @@ -814,7 +814,7 @@ bool allocate_ul_retransmission(module_id_t module_id, * (re-)transmission */ NR_pusch_semi_static_t *ps = &sched_ctrl->pusch_semi_static; const long f = sched_ctrl->search_space->searchSpaceType->choice.ue_Specific->dci_Formats; - const int dci_format = f ? NR_UL_DCI_FORMAT_0_1 : NR_UL_DCI_FORMAT_0_0; + const int dci_format = sched_ctrl->active_ubwp ? (f ? NR_UL_DCI_FORMAT_0_1 : NR_UL_DCI_FORMAT_0_0) : NR_UL_DCI_FORMAT_0_0; if (ps->time_domain_allocation != tda || ps->dci_format != dci_format || ps->num_dmrs_cdm_grps_no_data != num_dmrs_cdm_grps_no_data) @@ -830,7 +830,7 @@ bool allocate_ul_retransmission(module_id_t module_id, rbSize++; NR_pusch_semi_static_t temp_ps; const long f = sched_ctrl->search_space->searchSpaceType->choice.ue_Specific->dci_Formats; - const int dci_format = f ? NR_UL_DCI_FORMAT_0_1 : NR_UL_DCI_FORMAT_0_0; + const int dci_format = sched_ctrl->active_ubwp ? (f ? NR_UL_DCI_FORMAT_0_1 : NR_UL_DCI_FORMAT_0_0) : NR_UL_DCI_FORMAT_0_0; nr_set_pusch_semi_static(scc, sched_ctrl->active_ubwp, dci_format, tda, num_dmrs_cdm_grps_no_data, &temp_ps); uint32_t new_tbs; uint16_t new_rbSize; @@ -895,8 +895,8 @@ void update_ul_ue_R_Qm(NR_sched_pusch_t *sched_pusch, const NR_pusch_semi_static const int mcs = sched_pusch->mcs; sched_pusch->R = nr_get_code_rate_ul(mcs, ps->mcs_table); sched_pusch->Qm = nr_get_Qm_ul(mcs, ps->mcs_table); - if (ps->pusch_Config->tp_pi2BPSK - && ((ps->mcs_table == 3 && mcs < 2) || (ps->mcs_table == 4 && mcs < 6))) { + + if (ps->pusch_Config && ps->pusch_Config->tp_pi2BPSK && ((ps->mcs_table == 3 && mcs < 2) || (ps->mcs_table == 4 && mcs < 6))) { sched_pusch->R >>= 1; sched_pusch->Qm <<= 1; } @@ -914,7 +914,6 @@ void pf_ul(module_id_t module_id, uint8_t *rballoc_mask) { const int CC_id = 0; - const uint8_t num_dmrs_cdm_grps_no_data = 1; gNB_MAC_INST *nrmac = RC.nrmac[module_id]; NR_ServingCellConfigCommon_t *scc = nrmac->common_channels[CC_id].ServingCellConfigCommon; NR_UE_info_t *UE_info = &nrmac->UE_info; @@ -997,9 +996,10 @@ void pf_ul(module_id_t module_id, /* we want to avoid a lengthy deduction of DMRS and other parameters in * every TTI if we can save it, so check whether dci_format, TDA, or * num_dmrs_cdm_grps_no_data has changed and only then recompute */ + const uint8_t num_dmrs_cdm_grps_no_data = sched_ctrl->active_ubwp ? 1 : 2; const long f = sched_ctrl->search_space->searchSpaceType->choice.ue_Specific->dci_Formats; - const int dci_format = f ? NR_UL_DCI_FORMAT_0_1 : NR_UL_DCI_FORMAT_0_0; - const int tda = nrmac->preferred_ul_tda[sched_ctrl->active_ubwp->bwp_Id][slot]; + const int dci_format = sched_ctrl->active_ubwp ? (f ? NR_UL_DCI_FORMAT_0_1 : NR_UL_DCI_FORMAT_0_0) : NR_UL_DCI_FORMAT_0_0; + const int tda = sched_ctrl->active_ubwp ? nrmac->preferred_ul_tda[sched_ctrl->active_ubwp->bwp_Id][slot] : 0; if (ps->time_domain_allocation != tda || ps->dci_format != dci_format || ps->num_dmrs_cdm_grps_no_data != num_dmrs_cdm_grps_no_data) @@ -1092,9 +1092,10 @@ void pf_ul(module_id_t module_id, /* we want to avoid a lengthy deduction of DMRS and other parameters in * every TTI if we can save it, so check whether dci_format, TDA, or * num_dmrs_cdm_grps_no_data has changed and only then recompute */ + const uint8_t num_dmrs_cdm_grps_no_data = sched_ctrl->active_ubwp ? 1 : 2; const long f = sched_ctrl->search_space->searchSpaceType->choice.ue_Specific->dci_Formats; - const int dci_format = f ? NR_UL_DCI_FORMAT_0_1 : NR_UL_DCI_FORMAT_0_0; - const int tda = nrmac->preferred_ul_tda[sched_ctrl->active_ubwp->bwp_Id][slot]; + const int dci_format = sched_ctrl->active_ubwp ? (f ? NR_UL_DCI_FORMAT_0_1 : NR_UL_DCI_FORMAT_0_0) : NR_UL_DCI_FORMAT_0_0; + const int tda = sched_ctrl->active_ubwp ? nrmac->preferred_ul_tda[sched_ctrl->active_ubwp->bwp_Id][slot] : 0; if (ps->time_domain_allocation != tda || ps->dci_format != dci_format || ps->num_dmrs_cdm_grps_no_data != num_dmrs_cdm_grps_no_data) From bc725e116c983858c14f95ce3642e1d593498ff8 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Wed, 28 Apr 2021 16:18:03 +0100 Subject: [PATCH 259/579] Fix dmrs_idx for coreset with duration > 1 symbol --- openair1/PHY/NR_TRANSPORT/nr_dci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openair1/PHY/NR_TRANSPORT/nr_dci.c b/openair1/PHY/NR_TRANSPORT/nr_dci.c index cf38aaa4bf..9d3ee61ad1 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dci.c +++ b/openair1/PHY/NR_TRANSPORT/nr_dci.c @@ -197,9 +197,9 @@ void nr_generate_dci(PHY_VARS_gNB *gNB, // dmrs index depends on reference point for k according to 38.211 7.4.1.3.2 if (pdcch_pdu_rel15->CoreSetType == NFAPI_NR_CSET_CONFIG_PDCCH_CONFIG) - dmrs_idx =gNB->cce_list[d][cce_idx].reg_list[reg_in_cce_idx].reg_idx * 3; + dmrs_idx =(gNB->cce_list[d][cce_idx].reg_list[reg_in_cce_idx].reg_idx / pdcch_pdu_rel15->DurationSymbols) * 3; else - dmrs_idx = (gNB->cce_list[d][cce_idx].reg_list[reg_in_cce_idx].reg_idx + rb_offset) * 3; + dmrs_idx = (gNB->cce_list[d][cce_idx].reg_list[reg_in_cce_idx].reg_idx / pdcch_pdu_rel15->DurationSymbols + rb_offset) * 3; k_prime = 0; From 401151bff49019b69f6061b6759c8b347a744b44 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Wed, 28 Apr 2021 16:18:03 +0100 Subject: [PATCH 260/579] Fix dmrs_idx for coreset with duration > 1 symbol --- openair1/PHY/NR_TRANSPORT/nr_dci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openair1/PHY/NR_TRANSPORT/nr_dci.c b/openair1/PHY/NR_TRANSPORT/nr_dci.c index b7de182ab7..c6ada2061b 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dci.c +++ b/openair1/PHY/NR_TRANSPORT/nr_dci.c @@ -196,9 +196,9 @@ void nr_generate_dci(PHY_VARS_gNB *gNB, // dmrs index depends on reference point for k according to 38.211 7.4.1.3.2 if (pdcch_pdu_rel15->CoreSetType == NFAPI_NR_CSET_CONFIG_PDCCH_CONFIG) - dmrs_idx =gNB->cce_list[d][cce_idx].reg_list[reg_in_cce_idx].reg_idx * 3; + dmrs_idx =(gNB->cce_list[d][cce_idx].reg_list[reg_in_cce_idx].reg_idx / pdcch_pdu_rel15->DurationSymbols) * 3; else - dmrs_idx = (gNB->cce_list[d][cce_idx].reg_list[reg_in_cce_idx].reg_idx + rb_offset) * 3; + dmrs_idx = (gNB->cce_list[d][cce_idx].reg_list[reg_in_cce_idx].reg_idx / pdcch_pdu_rel15->DurationSymbols + rb_offset) * 3; k_prime = 0; From cc15ac25b9a8a278537cd239e325d6ac9fb094ed Mon Sep 17 00:00:00 2001 From: francescomani Date: Wed, 28 Apr 2021 17:49:27 +0200 Subject: [PATCH 261/579] simplification of previous fix --- openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c b/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c index 88677fc8e5..ba8c64d9f4 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c @@ -309,8 +309,8 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc, PHY_VARS_NR_UE *ue, int n_frames) int n_symb_prefix0 = (ue->symbol_offset/(7*(1<ofdm_symbol_size + fp->nb_prefix_samples0)+(ue->symbol_offset-n_symb_prefix0)*(fp->ofdm_symbol_size + fp->nb_prefix_samples); if (ue->ssb_offset < sync_pos_frame){ - ue->rx_offset = (2*fp->samples_per_frame) - sync_pos_frame + ue->ssb_offset; - ue->init_sync_frame = !is + 2; + ue->rx_offset = fp->samples_per_frame - sync_pos_frame + ue->ssb_offset; + ue->init_sync_frame = !is + 1; } else{ ue->rx_offset = ue->ssb_offset - sync_pos_frame; From 67b9e92a5c875b0739a5156b7ee3a6da667d6ea2 Mon Sep 17 00:00:00 2001 From: hardy Date: Tue, 27 Apr 2021 16:54:42 +0200 Subject: [PATCH 262/579] improving stats appearance --- ci-scripts/datalog_rt_stats.yaml | 30 ++++++++++++++++ ci-scripts/html.py | 31 +++++++++++++++++ ci-scripts/ran.py | 59 ++++++++++++++++++++++++++------ 3 files changed, 109 insertions(+), 11 deletions(-) create mode 100644 ci-scripts/datalog_rt_stats.yaml diff --git a/ci-scripts/datalog_rt_stats.yaml b/ci-scripts/datalog_rt_stats.yaml new file mode 100644 index 0000000000..692962ed35 --- /dev/null +++ b/ci-scripts/datalog_rt_stats.yaml @@ -0,0 +1,30 @@ +Title : Processing Time (us) +ColNames : + - Metric + - Average + - Max + - Deviation (Avg vs Ref) +Ref : + feprx : 60.0 + feptx_prec : 8.0 + feptx_ofdm : 85.0 + feptx_total : 75.0 + L1 Tx processing : 300.0 + DLSCH encoding : 230.0 + L1 Rx processing : 175.0 + PUSCH inner-receiver : 100.0 + PUSCH decoding : 140.0 + DL & UL scheduling timing stats : 15.0 + UL Indication : 20.0 +Threshold : + feprx : 1.25 + feptx_prec : 1.25 + feptx_ofdm : 1.25 + feptx_total : 1.25 + L1 Tx processing : 1.25 + DLSCH encoding : 1.25 + L1 Rx processing : 1.25 + PUSCH inner-receiver : 1.25 + PUSCH decoding : 1.25 + DL & UL scheduling timing stats : 1.25 + UL Indication : 1.25 \ No newline at end of file diff --git a/ci-scripts/html.py b/ci-scripts/html.py index a0ac638573..aca717c0d4 100644 --- a/ci-scripts/html.py +++ b/ci-scripts/html.py @@ -446,6 +446,37 @@ class HTMLManagement(): self.htmlFile.write(' \n') self.htmlFile.close() + #for the moment it is limited to 4 columns, to be made generic later + def CreateHtmlDataLogTable(self, DataLog): + if (self.htmlFooterCreated or (not self.htmlHeaderCreated)): + return + self.htmlFile = open('test_results.html', 'a') + + # TabHeader + self.htmlFile.write(' \n') + self.htmlFile.write(' ---- ' + DataLog['Title'] + ' ---- \n') + self.htmlFile.write(' \n') + self.htmlFile.write(' \n') + self.htmlFile.write(' '+ DataLog['ColNames'][0] +'\n') + self.htmlFile.write(' ' + DataLog['ColNames'][1] + '\n') + self.htmlFile.write(' ' + DataLog['ColNames'][2] + '\n') + self.htmlFile.write(' '+ DataLog['ColNames'][3] +'\n') + self.htmlFile.write(' \n') + + for k in DataLog['Data']: + # TestRow + self.htmlFile.write(' \n') + self.htmlFile.write(' ' + k + ' \n') + self.htmlFile.write(' ' + DataLog['Data'][k][0] + ' \n') + self.htmlFile.write(' ' + DataLog['Data'][k][1] + ' \n') + if float(DataLog['Data'][k][2])> DataLog['Threshold'][k]: + self.htmlFile.write(' ' + DataLog['Data'][k][2] + ' ('+str(DataLog['Threshold'][k])+') ' + '\n') + else: + self.htmlFile.write(' ' + DataLog['Data'][k][2] + ' ('+str(DataLog['Threshold'][k])+') ' + '\n') + self.htmlFile.write(' \n') + self.htmlFile.close() + + def CreateHtmlTestRowQueue(self, options, status, ue_status, ue_queue): if ((not self.htmlFooterCreated) and (self.htmlHeaderCreated)): self.htmlFile = open('test_results.html', 'a') diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index f1f79a2435..8e378afbe9 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -37,6 +37,8 @@ import logging import os import time from multiprocessing import Process, Lock, SimpleQueue +import yaml + #----------------------------------------------------------- # OAI Testing modules @@ -90,6 +92,7 @@ class RANManagement(): self.testCase_id = '' self.epcPcapFile = '' self.runtime_stats= '' + self.datalog_rt_stats={} @@ -633,6 +636,8 @@ class RANManagement(): HTML.CreateHtmlTestRow(self.runtime_stats, 'OK', CONST.ALL_PROCESSES_OK) else: HTML.CreateHtmlTestRow(self.runtime_stats, 'OK', CONST.ALL_PROCESSES_OK) + if len(self.datalog_rt_stats)!=0: + HTML.CreateHtmlDataLogTable(self.datalog_rt_stats) self.eNBmbmsEnables[int(self.eNB_instance)] = False self.eNBstatuses[int(self.eNB_instance)] = -1 @@ -699,6 +704,21 @@ class RANManagement(): #count "problem receiving samples" msg pb_receiving_samples_cnt = 0 + #the datalog config file has to be loaded + datalog_rt_stats_file='datalog_rt_stats.yaml' + if (os.path.isfile(datalog_rt_stats_file)): + yaml_file=datalog_rt_stats_file + elif (os.path.isfile('ci-scripts/'+datalog_rt_stats_file)): + yaml_file='ci-scripts/'+datalog_rt_stats_file + else: + logging.error("Datalog RT stats yaml file cannot be found") + sys.exit("Datalog RT stats yaml file cannot be found") + + with open(yaml_file,'r') as f: + datalog_rt_stats = yaml.load(f,Loader=yaml.FullLoader) + rt_keys = datalog_rt_stats['Ref'] #we use the keys from the Ref field + + for line in enb_log_file.readlines(): # Runtime statistics result = re.search('Run time:' ,str(line)) @@ -857,21 +877,21 @@ class RANManagement(): #keys below are the markers we are loooking for, loop over this keys list #everytime these markers are found in the log file, the previous ones are overwritten in the dict #eventually we record and print only the last occurence - keys = {'UE ID','dlsch_rounds','dlsch_total_bytes','ulsch_rounds','ulsch_total_bytes_scheduled', 'scheduling timing stats'} + keys = {'UE ID','dlsch_rounds','dlsch_total_bytes','ulsch_rounds','ulsch_total_bytes_scheduled'} for k in keys: result = re.search(k, line) if result is not None: #remove 1- all useless char before relevant info (ulsch or dlsch) 2- trailing char dlsch_ulsch_stats[k]=re.sub(r'^.*\]\s+', r'' , line.rstrip()) - #real time statistics - #same method as above - keys = {'feprx','feptx_prec','feptx_ofdm','feptx_total','L1 Tx processing','DLSCH encoding','L1 Rx processing','PUSCH inner-receiver','PUSCH decoding'} - for k in keys: + #real time statistics for gNB + for k in rt_keys: result = re.search(k, line) if result is not None: #remove 1- all useless char before relevant info 2- trailing char + line=line.replace('[0m','') tmp=re.match(rf'^.*?(\b{k}\b.*)',line.rstrip()) #from python 3.6 we can use literal string interpolation for the variable k, using rf' in the regex real_time_stats[k]=tmp.group(1) + #count "problem receiving samples" msg result = re.search('\[PHY\]\s+problem receiving samples', str(line)) if result is not None: @@ -920,13 +940,30 @@ class RANManagement(): logging.debug(dlsch_ulsch_stats[key]) htmleNBFailureMsg += statMsg - #real time statistics statistics + #real time statistics (old but working version) + #if len(real_time_stats)!=0: #check if dictionary is not empty + # statMsg='' + # for k in real_time_stats: + # tmp=re.match(r'^(?P.*):\s+(?P\d+\.\d+) us;\s+\d+;\s+(?P\d+\.\d+) us;',real_time_stats[k]) + # if tmp is not None: + # metric=tmp.group('metric') + # avg=tmp.group('avg') + # max=tmp.group('max') + # statMsg += metric + ' : avg = ' + avg + 'us ; max = ' + max +'us\n' + # htmleNBFailureMsg += statMsg + + #real time statistics + datalog_rt_stats['Data']={} if len(real_time_stats)!=0: #check if dictionary is not empty - statMsg='' - for key in real_time_stats: #for each dictionary key - statMsg += real_time_stats[key] + '\n' - logging.debug(real_time_stats[key]) - htmleNBFailureMsg += statMsg + for k in real_time_stats: + tmp=re.match(r'^(?P.*):\s+(?P\d+\.\d+) us;\s+\d+;\s+(?P\d+\.\d+) us;',real_time_stats[k]) + if tmp is not None: + metric=tmp.group('metric') + avg=float(tmp.group('avg')) + max=float(tmp.group('max')) + datalog_rt_stats['Data'][metric]=["{:.0f}".format(avg),"{:.0f}".format(max),"{:.2f}".format(avg/datalog_rt_stats['Ref'][metric])] + #store the data as a class attribute to build a dedicated HTML table afterward + self.datalog_rt_stats=datalog_rt_stats else: statMsg = 'No real time stats found in the log file\n' logging.debug('No real time stats found in the log file') From 5f6be27f5df2ac96f14fe6e2bb10454ce9484d5f Mon Sep 17 00:00:00 2001 From: Thomas Schlichter Date: Wed, 28 Apr 2021 18:06:14 +0200 Subject: [PATCH 263/579] fix 2 layer MIMO in nr_dlsim after last merge with develop --- openair1/SIMULATION/NR_PHY/dlsim.c | 20 +++++++++---------- .../LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c | 1 - 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index cfde7aca35..5fb79c11d7 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -215,9 +215,9 @@ void update_ptrs_config(NR_CellGroupConfig_t *secondaryCellGroup, uint16_t *rbSi void update_dmrs_config(NR_CellGroupConfig_t *scg,PHY_VARS_NR_UE *ue, int8_t* dmrs_arg); extern void fix_scd(NR_ServingCellConfig_t *scd);// forward declaration -/* specific dlsim DL preprocessor: uses rbStart/rbSize/mcs from command line of +/* specific dlsim DL preprocessor: uses rbStart/rbSize/mcs/nrOfLayers from command line of dlsim, does not search for CCE/PUCCH occasion but simply sets to 0 */ -int g_mcsIndex = -1, g_mcsTableIdx = 0, g_rbStart = -1, g_rbSize = -1; +int g_mcsIndex = -1, g_mcsTableIdx = 0, g_rbStart = -1, g_rbSize = -1, g_nrOfLayers = 1; void nr_dlsim_preprocessor(module_id_t module_id, frame_t frame, sub_frame_t slot) { @@ -262,7 +262,7 @@ void nr_dlsim_preprocessor(module_id_t module_id, ps->N_PRB_DMRS * ps->N_DMRS_SLOT, 0 /* N_PRB_oh, 0 for initialBWP */, 0 /* tb_scaling */, - 1 /* nrOfLayers */) + g_nrOfLayers) >> 3; /* the simulator assumes the HARQ PID is equal to the slot number */ @@ -316,7 +316,7 @@ int main(int argc, char **argv) // char fname[40], vname[40]; int trial, n_trials = 1, n_errors = 0, n_false_positive = 0; //int n_errors2, n_alamouti; - uint8_t nrOfLayers = 1,n_tx=1,n_rx=1; + uint8_t n_tx=1,n_rx=1; uint8_t round; uint8_t num_rounds = 4; @@ -479,11 +479,11 @@ int main(int argc, char **argv) break; */ case 'x': - nrOfLayers=atoi(optarg); + g_nrOfLayers=atoi(optarg); - if ((nrOfLayers!=1) && - (nrOfLayers!=2)) { - printf("Unsupported nr Of Layers %d\n",nrOfLayers); + if ((g_nrOfLayers!=1) && + (g_nrOfLayers!=2)) { + printf("Unsupported nr Of Layers %d\n",g_nrOfLayers); exit(-1); } @@ -992,7 +992,7 @@ int main(int argc, char **argv) gNB_mac->UE_info.num_pdcch_cand[0][i] = 0; if (css_flag == 0) { - nr_schedule_ue_spec(0, frame, slot, nrOfLayers); + nr_schedule_ue_spec(0, frame, slot, g_nrOfLayers); } else { nr_schedule_css_dlsch_phytest(0,frame,slot); } @@ -1138,7 +1138,7 @@ int main(int argc, char **argv) } nr_ue_dcireq(&dcireq); //to be replaced with function pointer later - UE_harq_process->Nl = nrOfLayers; + UE_harq_process->Nl = g_nrOfLayers; nr_ue_scheduled_response(&scheduled_response); phy_procedures_nrUE_RX(UE, diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index a5aa733c4c..8117f35627 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -781,7 +781,6 @@ void nr_schedule_ue_spec(module_id_t module_id, const rnti_t rnti = UE_info->rnti[UE_id]; /* POST processing */ - const int nrOfLayers = 1; const uint16_t R = sched_pdsch->R; const uint8_t Qm = sched_pdsch->Qm; const uint32_t TBS = sched_pdsch->tb_size; From 537d81058f89f03566c6b3aff6cbcbbf042110a0 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Wed, 28 Apr 2021 19:51:06 +0100 Subject: [PATCH 264/579] Fix uplink for NR_UL_DCI_FORMAT_0_0 after merge --- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 5 +++-- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c | 6 ++---- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c | 2 +- .../LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c | 13 +++++++++++++ openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 2 +- 5 files changed, 20 insertions(+), 8 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 1da531f742..d0dd9c6c0a 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -427,13 +427,14 @@ int8_t nr_ue_process_dci_time_dom_resource_assignment(NR_UE_MAC_INST_t *mac, int nr_ue_process_dci_indication_pdu(module_id_t module_id,int cc_id, int gNB_index, frame_t frame, int slot, fapi_nr_dci_indication_pdu_t *dci) { NR_UE_MAC_INST_t *mac = get_mac_inst(module_id); + dci_pdu_rel15_t *def_dci_pdu_rel15 = &mac->def_dci_pdu_rel15[dci->dci_format]; LOG_D(MAC,"Received dci indication (rnti %x,dci format %d,n_CCE %d,payloadSize %d,payload %llx)\n", dci->rnti,dci->dci_format,dci->n_CCE,dci->payloadSize,*(unsigned long long*)dci->payloadBits); - int8_t ret = nr_extract_dci_info(mac, dci->dci_format, dci->payloadSize, dci->rnti, (uint64_t *)dci->payloadBits, &mac->def_dci_pdu_rel15[dci->dci_format]); + int8_t ret = nr_extract_dci_info(mac, dci->dci_format, dci->payloadSize, dci->rnti, (uint64_t *)dci->payloadBits, def_dci_pdu_rel15); if ((ret&1) == 1) return -1; else if (ret == 2) dci->dci_format = NR_UL_DCI_FORMAT_0_0; - return (nr_ue_process_dci(module_id, cc_id, gNB_index, frame, slot, &mac->def_dci_pdu_rel15[dci->dci_format], dci->rnti, dci->dci_format)); + return (nr_ue_process_dci(module_id, cc_id, gNB_index, frame, slot, def_dci_pdu_rel15, dci->rnti, dci->dci_format)); } int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, frame_t frame, int slot, dci_pdu_rel15_t *dci, uint16_t rnti, uint8_t dci_format){ diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c index 07762c2d23..c38a2ab791 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c @@ -380,10 +380,8 @@ void schedule_control_sib1(module_id_t module_id, uint32_t TBS = 0; do { rbSize++; - TBS = nr_compute_tbs(nr_get_Qm_dl(gNB_mac->sched_ctrlCommon->sched_pdsch.mcs, - gNB_mac->sched_ctrlCommon->pdsch_semi_static.mcsTableIdx), - nr_get_code_rate_dl(gNB_mac->sched_ctrlCommon->sched_pdsch.mcs, - gNB_mac->sched_ctrlCommon->pdsch_semi_static.mcsTableIdx), + TBS = nr_compute_tbs(nr_get_Qm_dl(gNB_mac->sched_ctrlCommon->sched_pdsch.mcs, gNB_mac->sched_ctrlCommon->pdsch_semi_static.mcsTableIdx), + nr_get_code_rate_dl(gNB_mac->sched_ctrlCommon->sched_pdsch.mcs, gNB_mac->sched_ctrlCommon->pdsch_semi_static.mcsTableIdx), rbSize, nrOfSymbols, N_PRB_DMRS * dmrs_length,0, 0,1) >> 3; } while (rbStart + rbSize < bwpSize && !vrb_map[rbStart + rbSize] && TBS < gNB_mac->sched_ctrlCommon->num_total_bytes); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index c46b77880c..e6f9a40765 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -551,7 +551,7 @@ void pf_dl(module_id_t module_id, gNB_MAC_INST *mac = RC.nrmac[module_id]; NR_UE_info_t *UE_info = &mac->UE_info; - const NR_ServingCellConfigCommon_t *scc = RC.nrmac[module_id]->common_channels->ServingCellConfigCommon; + NR_ServingCellConfigCommon_t *scc=mac->common_channels[0].ServingCellConfigCommon; float coeff_ue[MAX_MOBILES_PER_GNB]; // UEs that could be scheduled int ue_array[MAX_MOBILES_PER_GNB]; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index 34f47ffef5..864373952b 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -1366,6 +1366,19 @@ void fill_dci_pdu_rel15(const NR_ServingCellConfigCommon_t *scc, *dci_pdu |= ((uint64_t)dci_pdu_rel15->ul_sul_indicator.val&1)<<(dci_size-pos++); */ + + LOG_D(NR_MAC,"N_RB = %i\n", N_RB); + LOG_D(NR_MAC,"dci_size = %i\n", dci_size); + LOG_D(NR_MAC,"fsize = %i\n", fsize); + LOG_D(NR_MAC,"dci_pdu_rel15->frequency_domain_assignment.val = %i\n", dci_pdu_rel15->frequency_domain_assignment.val); + LOG_D(NR_MAC,"dci_pdu_rel15->time_domain_assignment.val = %i\n", dci_pdu_rel15->time_domain_assignment.val); + LOG_D(NR_MAC,"dci_pdu_rel15->frequency_hopping_flag.val = %i\n", dci_pdu_rel15->frequency_hopping_flag.val); + LOG_D(NR_MAC,"dci_pdu_rel15->mcs = %i\n", dci_pdu_rel15->mcs); + LOG_D(NR_MAC,"dci_pdu_rel15->ndi = %i\n", dci_pdu_rel15->ndi); + LOG_D(NR_MAC,"dci_pdu_rel15->rv = %i\n", dci_pdu_rel15->rv); + LOG_D(NR_MAC,"dci_pdu_rel15->harq_pid = %i\n", dci_pdu_rel15->harq_pid); + LOG_D(NR_MAC,"dci_pdu_rel15->tpc = %i\n", dci_pdu_rel15->tpc); + LOG_D(NR_MAC,"dci_pdu_rel15->padding = %i\n", dci_pdu_rel15->padding); break; case NFAPI_NR_RNTI_TC: diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index bcd70b2aff..d6f51cd2d9 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -368,7 +368,7 @@ void nr_process_mac_pdu(module_id_t module_idP, mac_sdu_len = (uint16_t)((NR_MAC_SUBHEADER_SHORT *)pdu_ptr)->L; mac_subheader_len = 2; } - LOG_E(NR_MAC, "[UE %d] Frame %d : ULSCH -> UL-DCCH %d (gNB %d, %d bytes), rnti: %d \n", module_idP, frameP, rx_lcid, module_idP, mac_sdu_len, *UE_info->rnti); + LOG_D(NR_MAC, "[UE %d] Frame %d : ULSCH -> UL-DCCH %d (gNB %d, %d bytes), rnti: %d \n", module_idP, frameP, rx_lcid, module_idP, mac_sdu_len, *UE_info->rnti); mac_rlc_data_ind(module_idP, *UE_info->rnti, module_idP, From 7a07d57ac9d0736aa5507317e7435edf6b316ebc Mon Sep 17 00:00:00 2001 From: rmagueta Date: Wed, 28 Apr 2021 20:02:12 +0100 Subject: [PATCH 265/579] Fix segmentation fault after merge --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index e6f9a40765..4420ae64a3 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -442,8 +442,9 @@ bool allocate_dl_retransmission(module_id_t module_id, &sched_ctrl->active_bwp->bwp_Common->genericParameters : &RC.nrmac[module_id]->common_channels[0].ServingCellConfigCommon->downlinkConfigCommon->initialDownlinkBWP->genericParameters; - const uint16_t bwpSize = NRRIV2BW(sched_ctrl->active_bwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - int rbStart = NRRIV2PRBOFFSET(sched_ctrl->active_bwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + const uint16_t bwpSize = NRRIV2BW(genericParameters->locationAndBandwidth, MAX_BWP_SIZE); + int rbStart = NRRIV2PRBOFFSET(genericParameters->locationAndBandwidth, MAX_BWP_SIZE); + NR_pdsch_semi_static_t *ps = &sched_ctrl->pdsch_semi_static; const uint8_t num_dmrs_cdm_grps_no_data = ps->nrOfSymbols == 2 ? 1 : 2; From e2031204770e9976204d6df212bced17069d4b33 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Wed, 28 Apr 2021 21:29:58 +0200 Subject: [PATCH 266/579] usrp_tx_thread flag in nr_dlsim --- openair1/SIMULATION/NR_PHY/dlsim.c | 1 - 1 file changed, 1 deletion(-) diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index 4dd716e0cc..de8891d8db 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -90,7 +90,6 @@ nfapi_ue_release_request_body_t release_rntis; msc_interface_t msc_interface; -int usrp_tx_thread = 0; // dummy functions int dummy_nr_ue_ul_indication(nr_uplink_indication_t *ul_info) { return(0); } From ccf6624f79e7736c9053d9979e39fdb315e55381 Mon Sep 17 00:00:00 2001 From: hardy Date: Thu, 29 Apr 2021 10:26:10 +0200 Subject: [PATCH 267/579] changing col name in html report --- ci-scripts/datalog_rt_stats.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ci-scripts/datalog_rt_stats.yaml b/ci-scripts/datalog_rt_stats.yaml index 692962ed35..e21cbc4088 100644 --- a/ci-scripts/datalog_rt_stats.yaml +++ b/ci-scripts/datalog_rt_stats.yaml @@ -1,9 +1,12 @@ +#this is a configuration file +#used to build real time processing statistics +#for 5G NR phy test (gNB terminate) Title : Processing Time (us) ColNames : - Metric - Average - Max - - Deviation (Avg vs Ref) + - Average vs Reference Deviation (Acceptability Threshold) Ref : feprx : 60.0 feptx_prec : 8.0 @@ -25,6 +28,6 @@ Threshold : DLSCH encoding : 1.25 L1 Rx processing : 1.25 PUSCH inner-receiver : 1.25 - PUSCH decoding : 1.25 + PUSCH decoding : 1.25 DL & UL scheduling timing stats : 1.25 - UL Indication : 1.25 \ No newline at end of file + UL Indication : 1.25 From 6d1a92275fa55d5c04f8e21950b91b9bef99f595 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Thu, 29 Apr 2021 11:38:48 +0200 Subject: [PATCH 268/579] usrp_tx_thread redefinition in nr_ulsim::wq --- openair1/SIMULATION/NR_PHY/ulsim.c | 1 - 1 file changed, 1 deletion(-) diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c index fab6790c7f..26c442cd4f 100644 --- a/openair1/SIMULATION/NR_PHY/ulsim.c +++ b/openair1/SIMULATION/NR_PHY/ulsim.c @@ -209,7 +209,6 @@ double s_re1[122880],s_im1[122880],r_re1[122880],r_im1[122880]; double r_re2[122880],r_im2[122880]; double r_re3[122880],r_im3[122880]; -int usrp_tx_thread=0; int main(int argc, char **argv) { From a8bbd77087c4e9dd2e0107813f16b0cdde2ce160 Mon Sep 17 00:00:00 2001 From: hardy Date: Tue, 27 Apr 2021 15:29:34 +0200 Subject: [PATCH 269/579] fixing auto termination --- ci-scripts/cls_module_ue.py | 4 +++- ci-scripts/cls_oaicitest.py | 24 ++++++++++++++---------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/ci-scripts/cls_module_ue.py b/ci-scripts/cls_module_ue.py index 4586be33e8..2df7b2e8b8 100644 --- a/ci-scripts/cls_module_ue.py +++ b/ci-scripts/cls_module_ue.py @@ -132,7 +132,9 @@ class Module_UE: else: logging.debug('\u001B[1;37;41m Module IP Address Not Found! \u001B[0m') return -1 - + else: + logging.debug('\u001B[1;37;41m Module IP Address Not Found! \u001B[0m') + return -1 diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index 06cc814a11..cbb09287bd 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -389,10 +389,16 @@ class OaiCiTest(): is_module=Module_UE.CheckCMProcess() if is_module: Module_UE.Command("wup") - Module_UE.GetModuleIPAddress() - HTML.CreateHtmlTestRow(Module_UE.UEIPAddress, 'OK', CONST.ALL_PROCESSES_OK) - self.UEIPAddresses.append(Module_UE.UEIPAddress) - logging.debug('UE IP addresss : '+ Module_UE.UEIPAddress) + status=Module_UE.GetModuleIPAddress() + if status==0: + HTML.CreateHtmlTestRow(Module_UE.UEIPAddress, 'OK', CONST.ALL_PROCESSES_OK) + self.UEIPAddresses.append(Module_UE.UEIPAddress) + logging.debug('UE IP addresss : '+ Module_UE.UEIPAddress) + else: #status==-1 failed to retrieve IP address + HTML.CreateHtmlTestRow('N/A', 'KO', CONST.UE_IP_ADDRESS_ISSUE) + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC) + return + def InitializeOAIUE(self,HTML,RAN,EPC,COTS_UE): if self.UEIPAddress == '' or self.UEUserName == '' or self.UEPassword == '' or self.UESourceCodePath == '': @@ -957,7 +963,7 @@ class OaiCiTest(): except: os.kill(os.getppid(),signal.SIGUSR1) - def AttachUE(self,HTML,RAN,EPC,COTS_UE,InfraUE): + def AttachUE(self,HTML,RAN,EPC,COTS_UE): if self.ue_id=='':#no ID specified, then it is a COTS controlled by ADB if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '': HELP.GenericHelp(CONST.Version) @@ -1073,11 +1079,9 @@ class OaiCiTest(): cnt += 1 else:#if an ID is specified, it is a module from the yaml infrastructure file Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id]) - is_module=Module_UE.CheckCMProcess() - if is_module: - Module_UE.Command("detach") - Module_UE.GetModuleIPAddress() - HTML.CreateHtmlTestRow(Module_UE.UEIPAddress, 'OK', CONST.ALL_PROCESSES_OK) + Module_UE.Command("detach") + + def RebootUE_common(self, device_id): try: From bad3e98301385e3a86aaa539f0bd05c2621f04ef Mon Sep 17 00:00:00 2001 From: hardy Date: Wed, 28 Apr 2021 13:45:34 +0200 Subject: [PATCH 270/579] need to update dummy UE for CI --- ci-scripts/ci_ueinfra.yaml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/ci-scripts/ci_ueinfra.yaml b/ci-scripts/ci_ueinfra.yaml index 1ca913072c..1b39891382 100644 --- a/ci-scripts/ci_ueinfra.yaml +++ b/ci-scripts/ci_ueinfra.yaml @@ -14,14 +14,19 @@ idefix: HostPassword : oaicicd HostSourceCodePath : none dummy: - ID: dummy -dummy2: - ID: dummy2 - Kind : cots - State : disabled - Process : quectel-cm - HostIPAddress : 192.168.18.186 + ID: '' + State : '' + Kind : '' + Process : + Name : '' + Cmd : '' + WakeupScript : '' + DetachScript : '' + PLMN : 22201 + UENetwork : wwan0 + HostIPAddress : 192.168.18.188 HostUsername : oaicicd HostPassword : oaicicd HostSourceCodePath : none + From 6b45eb8210a352032fba4ab9e8196869299c5ca1 Mon Sep 17 00:00:00 2001 From: hardy Date: Wed, 28 Apr 2021 22:25:08 +0200 Subject: [PATCH 271/579] update of the AT-based module control for automation --- ci-scripts/ci_ctl_qtel.py | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/ci-scripts/ci_ctl_qtel.py b/ci-scripts/ci_ctl_qtel.py index 1030b54616..3785d7ee89 100644 --- a/ci-scripts/ci_ctl_qtel.py +++ b/ci-scripts/ci_ctl_qtel.py @@ -24,6 +24,9 @@ # #--------------------------------------------------------------------- +#usage example: +#sudo python3 ci_ctl_qtel.py /dev/ttyUSB2 wup +#sudo python3 ci_ctl_qtel.py /dev/ttyUSB2 detach import sys @@ -44,28 +47,40 @@ class qtel_ctl: self.__send_command(ser,"AT+CFUN={}\r".format(state)) def __send_command(self,ser,com): - if ser.inWaiting() > 0: - ser.flushInput() ser.write(com.encode()) + time.sleep(0.1) + ret=[] + while ser.inWaiting()>0: + print("waiting") + msg=ser.readline() + msg=msg.decode("utf-8") + msg=msg.replace("\r","") + msg=msg.replace("\n","") + print(msg) + if msg!="": + ret.append(msg) + else: + print("msg empty") + return ret #-------------- #public methods #-------------- def wup(self):#sending AT+CFUN=0, then AT+CFUN=1 - self.__set_modem_state(self.modem,0) + self.__set_modem_state(self.modem,'0') time.sleep(3) - self.__set_modem_state(self.modem,1) + self.__set_modem_state(self.modem,'1') def detach(self):#sending AT+CFUN=0 - self.__set_modem_state(self.modem,0) + self.__set_modem_state(self.modem,'0') if __name__ == "__main__": - #argv[1] : usb port - #argv[2] : qtel command (see function pointers dict "wup", "detach" etc ...) + #argv[1] : usb port + #argv[2] : qtel command (see function pointers dict "wup", "detach" etc ...) command = sys.argv[2] Module=qtel_ctl(sys.argv[1]) - #calling the function to be applied + #calling the function to be applied Module.cmd_dict[command]() From d2f1e41bcbf5b2d3be50d5f50320c42eb5029d1f Mon Sep 17 00:00:00 2001 From: francescomani Date: Thu, 29 Apr 2021 12:02:51 +0200 Subject: [PATCH 272/579] using n_frames to compute init_sync_frame --- openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c b/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c index ba8c64d9f4..df35f14869 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c @@ -308,14 +308,15 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc, PHY_VARS_NR_UE *ue, int n_frames) // every 7*(1<symbol_offset/(7*(1<ofdm_symbol_size + fp->nb_prefix_samples0)+(ue->symbol_offset-n_symb_prefix0)*(fp->ofdm_symbol_size + fp->nb_prefix_samples); + // for a correct computation of frame number to sync with the one decoded at MIB we need to take into account in which of the n_frames we got sync + ue->init_sync_frame = n_frames - 1 - is; + // we also need to take into account the shift by samples_per_frame in case the if is true if (ue->ssb_offset < sync_pos_frame){ ue->rx_offset = fp->samples_per_frame - sync_pos_frame + ue->ssb_offset; - ue->init_sync_frame = !is + 1; + ue->init_sync_frame += 1; } - else{ + else ue->rx_offset = ue->ssb_offset - sync_pos_frame; - ue->init_sync_frame = !is; - } } /* From 9d50c5ea0247bbafc13cde6b6732923cb7acdbb1 Mon Sep 17 00:00:00 2001 From: Remi Hardy Date: Thu, 29 Apr 2021 11:38:03 +0200 Subject: [PATCH 273/579] update of ci nsa and benetel jenkins pipelines --- ci-scripts/Jenkinsfile-trig-nsa | 4 +- ...a_base_ref.xml => benetel_nsa_quectel.xml} | 69 ++++++++----------- ci-scripts/xml_files/fr1_nsa_quectel.xml | 16 ++--- 3 files changed, 38 insertions(+), 51 deletions(-) rename ci-scripts/xml_files/{fr1_nsa_base_ref.xml => benetel_nsa_quectel.xml} (74%) diff --git a/ci-scripts/Jenkinsfile-trig-nsa b/ci-scripts/Jenkinsfile-trig-nsa index 3dd5ce3b50..5ace29d866 100644 --- a/ci-scripts/Jenkinsfile-trig-nsa +++ b/ci-scripts/Jenkinsfile-trig-nsa @@ -37,7 +37,7 @@ pipeline { steps { script { //retrieve MR that are opened nd with tag READY_TO_BE_MERGED - MR_LIST= sh returnStdout: true, script: 'curl --silent "https://gitlab.eurecom.fr/api/v4/projects/oai%2Fopenairinterface5g/merge_requests?state=opened&per_page=100&labels=READY_TO_BE_MERGED" | jq ".[].iid" || true ' + MR_LIST= sh returnStdout: true, script: 'curl --silent "https://gitlab.eurecom.fr/api/v4/projects/oai%2Fopenairinterface5g/merge_requests?state=opened&per_page=100&milestone=REVIEW_COMPLETED_AND_APPROVED" | jq ".[].iid" || true ' echo "List of selected MR:\n${MR_LIST}" def MR_ARRAY = MR_LIST.split('\n') //for every selected MR, retrieve the branch name and the latest commit @@ -48,7 +48,7 @@ pipeline { COMMIT_ID=COMMIT_ID.trim() echo "Testing NSA on : ${MR} ${SRC_BRANCH} ${COMMIT_ID}" //calling NSA sub job - build job: "RAN-CI-NSA-B210", wait : false, propagate : false, parameters: [ + build job: "RAN-CI-NSA-B210-N310-ModuleUE", wait : false, propagate : false, parameters: [ string(name: 'eNB_MR', value: String.valueOf(MR)), string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)), string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)), diff --git a/ci-scripts/xml_files/fr1_nsa_base_ref.xml b/ci-scripts/xml_files/benetel_nsa_quectel.xml similarity index 74% rename from ci-scripts/xml_files/fr1_nsa_base_ref.xml rename to ci-scripts/xml_files/benetel_nsa_quectel.xml index fd47db10b2..d505d0e190 100644 --- a/ci-scripts/xml_files/fr1_nsa_base_ref.xml +++ b/ci-scripts/xml_files/benetel_nsa_quectel.xml @@ -22,64 +22,57 @@ --> TEST-NSA-FR1-TM1 - NSA FULL + NSA Ping DL UL with QUECTEL tasks - 010000 030000 040000 - 010001 + 000002 + 010000 000001 050000 050001 000001 - 060000 - 060001 - 000001 070000 + 000001 + 070001 + 000001 010002 000001 080001 080000 - 010003 + Initialize_UE - Initialize UE + Initialize Quectel + idefix - - Terminate_UE - Terminate UE - - - - Attach_UE - Attach UE - Detach_UE Detach UE + idefix Initialize_eNB Initialize eNB - -O ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf + -O ci-scripts/conf_files/benetel-4g.conf 0 0 lte - + Initialize_eNB Initialize gNB - -O ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf -E + -O ci-scripts/conf_files/benetel-5g.conf -q 1 1 nr @@ -88,12 +81,20 @@ IdleSleep Sleep - 20 + 10 + + IdleSleep + Sleep + 30 + + + Ping Ping: 20pings in 20sec + idefix -c 20 50 @@ -101,32 +102,17 @@ Ping Ping: 100pings in 20sec + idefix -c 100 -i 0.2 50 - - - Iperf - iperf (DL/3Mbps/UDP)(20 sec)(single-ue profile) - -u -b 3M -t 20 -i 1 - 50 - single-ue - - - - Iperf - iperf (UL/1Mbps/UDP)(20 sec)(single-ue profile) - -u -b 1M -t 20 -i 1 -R - 50 - single-ue - - - Iperf iperf (DL/20Mbps/UDP)(20 sec)(single-ue profile) -u -b 20M -t 20 -i 1 + DL + idefix 50 single-ue @@ -134,13 +120,14 @@ Iperf iperf (UL/3Mbps/UDP)(20 sec)(single-ue profile) - -u -b 3M -t 20 -i 1 -R + -u -b 3M -t 20 -i 1 + UL + idefix 50 single-ue - Terminate_eNB Terminate eNB diff --git a/ci-scripts/xml_files/fr1_nsa_quectel.xml b/ci-scripts/xml_files/fr1_nsa_quectel.xml index e1e19cbbf8..67480ebb81 100644 --- a/ci-scripts/xml_files/fr1_nsa_quectel.xml +++ b/ci-scripts/xml_files/fr1_nsa_quectel.xml @@ -22,14 +22,14 @@ --> TEST-NSA-FR1-TM1 - NSA QUECTEL + NSA Ping DL UL with QUECTEL tasks 030000 040000 - 000001 - 010000 000002 + 010000 + 000001 050000 050001 000001 @@ -81,7 +81,7 @@ IdleSleep Sleep - 5 + 10 @@ -109,8 +109,8 @@ Iperf - iperf (DL/20Mbps/UDP)(20 sec)(single-ue profile) - -u -b 20M -t 20 -i 1 + iperf (DL/20Mbps/UDP)(60 sec)(single-ue profile) + -u -b 20M -t 60 -i 1 DL idefix 50 @@ -119,8 +119,8 @@ Iperf - iperf (UL/3Mbps/UDP)(20 sec)(single-ue profile) - -u -b 3M -t 20 -i 1 + iperf (UL/3Mbps/UDP)(60 sec)(single-ue profile) + -u -b 3M -t 60 -i 1 UL idefix 50 From 9581b5cce29e92a1ed0e3e62a4405da03ac2dbf2 Mon Sep 17 00:00:00 2001 From: Remi Hardy Date: Thu, 29 Apr 2021 14:01:53 +0200 Subject: [PATCH 274/579] adding conf file for n310 --- .../gnb.band78.tm1.fr1.106PRB.usrpn310.conf | 305 ++++++++++++++++++ 1 file changed, 305 insertions(+) create mode 100644 ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpn310.conf diff --git a/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpn310.conf b/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpn310.conf new file mode 100644 index 0000000000..809203f672 --- /dev/null +++ b/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpn310.conf @@ -0,0 +1,305 @@ +Active_gNBs = ( "gNB-Eurecom-5GNRBox"); +# Asn1_verbosity, choice in: none, info, annoying +Asn1_verbosity = "none"; + + +gNBs = +( + { + ////////// Identification parameters: + gNB_ID = 0xe00; + + cell_type = "CELL_MACRO_GNB"; + gNB_name = "gNB-Eurecom-5GNRBox"; + + // Tracking area code, 0x0000 and 0xfffe are reserved values + tracking_area_code = 1; + plmn_list = ({mcc = 222; mnc = 01; mnc_length = 2;}); + + tr_s_preference = "local_mac" + + ////////// Physical parameters: + + ssb_SubcarrierOffset = 31; //0; + pdsch_AntennaPorts = 1; + pusch_AntennaPorts = 1; + pusch_TargetSNRx10 = 200; + pucch_TargetSNRx10 = 200; + + + servingCellConfigCommon = ( + { + #spCellConfigCommon + + physCellId = 0; + +# downlinkConfigCommon + #frequencyInfoDL + # this is 3600 MHz + 84 PRBs@30kHz SCS (same as initial BWP) + absoluteFrequencySSB = 641272; //641032; #641968; 641968=start of ssb at 3600MHz + 82 RBs 641032=center of SSB at center of cell + 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 = 106; + #initialDownlinkBWP + #genericParameters + # this is RBstart=84,L=13 (275*(L-1))+RBstart + initialDLBWPlocationAndBandwidth = 6368; +# subcarrierSpacing +# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + initialDLBWPsubcarrierSpacing = 1; + #pdcch-ConfigCommon + initialDLBWPcontrolResourceSetZero = 0; + initialDLBWPsearchSpaceZero = 0; + #pdsch-ConfigCommon + #pdschTimeDomainAllocationList (up to 16 entries) + initialDLBWPk0_0 = 0; + #initialULBWPmappingType + #0=typeA,1=typeB + initialDLBWPmappingType_0 = 0; + #this is SS=1,L=13 + initialDLBWPstartSymbolAndLength_0 = 40; + + initialDLBWPk0_1 = 0; + initialDLBWPmappingType_1 = 0; + #this is SS=2,L=12 + initialDLBWPstartSymbolAndLength_1 = 53; + + initialDLBWPk0_2 = 0; + initialDLBWPmappingType_2 = 0; + #this is SS=1,L=12 + initialDLBWPstartSymbolAndLength_2 = 54; + + initialDLBWPk0_3 = 0; + initialDLBWPmappingType_3 = 0; + #this is SS=1,L=4 //5 (4 is for 43, 5 is for 57) + initialDLBWPstartSymbolAndLength_3 = 57; //43; //57; + #uplinkConfigCommon + #frequencyInfoUL + ul_frequencyBand = 78; + #scs-SpecificCarrierList + ul_offstToCarrier = 0; +# subcarrierSpacing +# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + ul_subcarrierSpacing = 1; + ul_carrierBandwidth = 106; + pMax = 20; + #initialUplinkBWP + #genericParameters + initialULBWPlocationAndBandwidth = 6368; +# 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 = -100; +#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200) + preambleTransMax = 6; +#powerRampingStep +# 0=dB0,1=dB2,2=dB4,3=dB6 + powerRampingStep = 1; +#ra_ReponseWindow +#1,2,4,8,10,20,40,80 + ra_ResponseWindow = 5; +#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR +#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14; //15; +#ra_ContentionResolutionTimer +#(0..7) 8,16,24,32,40,48,56,64 + ra_ContentionResolutionTimer = 7; + rsrp_ThresholdSSB = 19; +#prach-RootSequenceIndex_PR +#1 = 839, 2 = 139 + prach_RootSequenceIndex_PR = 2; + 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; + + initialULBWPk2_2 = 7; + initialULBWPmappingType_2 = 1; + # this is SS=10 L=4 + initialULBWPstartSymbolAndLength_2 = 52; + + 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 = 1; #0x80; + +# 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 = 1; + # pattern1 + # dl_UL_TransmissionPeriodicity + # 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10 + dl_UL_TransmissionPeriodicity = 6; + nrofDownlinkSlots = 7; //8; //7; + nrofDownlinkSymbols = 6; //0; //6; + nrofUplinkSlots = 2; + nrofUplinkSymbols = 4; //0; //4; + + ssPBCH_BlockPower = -25; + } + + ); + + + # ------- SCTP definitions + SCTP : + { + # Number of streams to use in input/output + SCTP_INSTREAMS = 2; + SCTP_OUTSTREAMS = 2; + }; + + + ////////// MME parameters: + mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; + ipv6 = "192:168:30::17"; + port = 36412 ; + active = "yes"; + preference = "ipv4"; + } + ); + + ///X2 + enable_x2 = "yes"; + t_reloc_prep = 1000; /* unit: millisecond */ + tx2_reloc_overall = 2000; /* unit: millisecond */ + t_dc_prep = 1000; /* unit: millisecond */ + t_dc_overall = 2000; /* unit: millisecond */ + target_enb_x2_ip_address = ( + { ipv4 = "CI_FR1_CTL_ENB_IP_ADDR"; + ipv6 = "192:168:30::17"; + preference = "ipv4"; + } + ); + + NETWORK_INTERFACES : + { + + GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; + GNB_IPV4_ADDRESS_FOR_S1_MME = "CI_GNB_IP_ADDR"; + GNB_INTERFACE_NAME_FOR_S1U = "eth0"; + GNB_IPV4_ADDRESS_FOR_S1U = "CI_GNB_IP_ADDR"; + GNB_PORT_FOR_S1U = 2152; # Spec 2152 + GNB_IPV4_ADDRESS_FOR_X2C = "CI_GNB_IP_ADDR"; + GNB_PORT_FOR_X2C = 36422; # Spec 36422 + }; + } +); + +MACRLCs = ( + { + num_cc = 1; + tr_s_preference = "local_L1"; + tr_n_preference = "local_RRC"; + } +); + +L1s = ( + { + num_cc = 1; + tr_n_preference = "local_mac"; + pusch_proc_threads = 6; + } +); + +RUs = ( + { + local_rf = "yes" + nb_tx = 1 + nb_rx = 1 + att_tx = 0 + att_rx = 0; + bands = [7]; + max_pdschReferenceSignalPower = -27; + max_rxgain = 75; #114 + eNB_instances = [0]; + sdr_addrs = "addr=192.168.80.50" + clock_src = "internal" + + } +); + +THREAD_STRUCT = ( + { + #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" + parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; + //parallel_config = "PARALLEL_SINGLE_THREAD"; + #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" + worker_config = "WORKER_ENABLE"; + } +); + + log_config : + { + global_log_level ="info"; + global_log_verbosity ="medium"; + hw_log_level ="info"; + hw_log_verbosity ="medium"; + phy_log_level ="info"; + phy_log_verbosity ="medium"; + mac_log_level ="info"; + mac_log_verbosity ="high"; + rlc_log_level ="info"; + rlc_log_verbosity ="medium"; + pdcp_log_level ="info"; + pdcp_log_verbosity ="medium"; + rrc_log_level ="info"; + rrc_log_verbosity ="medium"; + }; + +uicc: { +opc = "testopc"; +}; From 8a5319fc6133294e911224ec084de0fda2d2e24b Mon Sep 17 00:00:00 2001 From: rmagueta Date: Thu, 29 Apr 2021 16:25:05 +0100 Subject: [PATCH 275/579] Fix tda and nr_schedule_ue_spec after merge --- openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c | 12 ++++++------ openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c | 7 +++++-- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c | 4 ++-- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 8 ++++---- 4 files changed, 17 insertions(+), 14 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c index 12b3a2cb73..8891d3354e 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c @@ -360,12 +360,12 @@ void ue_dci_configuration(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_request_t *dl if(ss->searchSpaceType->choice.ue_Specific->dci_Formats == NR_SearchSpace__searchSpaceType__ue_Specific__dci_Formats_formats0_1_And_1_1){ // Monitors DCI 01 and 11 scrambled with C-RNTI, or CS-RNTI(s), or SP-CSI-RNTI if ((ra->ra_state == RA_SUCCEEDED || get_softmodem_params()->phy_test) && mac->crnti > 0) { - LOG_D(MAC, "[DCI_CONFIG] Configure monitoring of PDCCH candidates in the user specific search space\n"); - rel15->num_dci_options = 2; - rel15->dci_format_options[0] = NR_DL_DCI_FORMAT_1_1; - rel15->dci_format_options[1] = NR_UL_DCI_FORMAT_0_1; - config_dci_pdu(mac, rel15, dl_config, NR_RNTI_C, ss_id); - fill_dci_search_candidates(ss, rel15); + LOG_D(MAC, "[DCI_CONFIG] Configure monitoring of PDCCH candidates in the user specific search space\n"); + rel15->num_dci_options = 2; + rel15->dci_format_options[0] = NR_DL_DCI_FORMAT_1_1; + rel15->dci_format_options[1] = NR_UL_DCI_FORMAT_0_1; + config_dci_pdu(mac, rel15, dl_config, NR_RNTI_C, ss_id); + fill_dci_search_candidates(ss, rel15); #ifdef DEBUG_DCI LOG_D(MAC, "[DCI_CONFIG] ss %d ue_Specific %p searchSpaceType->present %d dci_Formats %d\n", diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index 4420ae64a3..269a5880d1 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -449,7 +449,7 @@ bool allocate_dl_retransmission(module_id_t module_id, const uint8_t num_dmrs_cdm_grps_no_data = ps->nrOfSymbols == 2 ? 1 : 2; int rbSize = 0; - const int tda = sched_ctrl->active_bwp ? RC.nrmac[module_id]->preferred_dl_tda[sched_ctrl->active_bwp->bwp_Id][slot] : 0; + const int tda = sched_ctrl->active_bwp ? RC.nrmac[module_id]->preferred_dl_tda[sched_ctrl->active_bwp->bwp_Id][slot] : 1; if (tda == retInfo->time_domain_allocation) { /* Check that there are enough resources for retransmission */ while (rbSize < retInfo->rbSize) { @@ -666,7 +666,7 @@ void pf_dl(module_id_t module_id, max_rbSize++; /* MCS has been set above */ - const int tda = sched_ctrl->active_bwp ? RC.nrmac[module_id]->preferred_dl_tda[sched_ctrl->active_bwp->bwp_Id][slot] : 0; + const int tda = sched_ctrl->active_bwp ? RC.nrmac[module_id]->preferred_dl_tda[sched_ctrl->active_bwp->bwp_Id][slot] : 1; NR_sched_pdsch_t *sched_pdsch = &sched_ctrl->sched_pdsch; NR_pdsch_semi_static_t *ps = &sched_ctrl->pdsch_semi_static; const uint8_t num_dmrs_cdm_grps_no_data = ps->nrOfSymbols == 2 ? 1 : 2; @@ -1208,5 +1208,8 @@ void nr_schedule_ue_spec(module_id_t module_id, gNB_mac->TX_req[CC_id].Number_of_PDUs++; gNB_mac->TX_req[CC_id].SFN = frame; gNB_mac->TX_req[CC_id].Slot = slot; + + /* mark UE as scheduled */ + sched_pdsch->rbSize = 0; } } diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c index 30c117eba1..7f2111aefb 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c @@ -359,7 +359,7 @@ void nr_preprocessor_phytest(module_id_t module_id, NR_pdsch_semi_static_t *ps = &sched_ctrl->pdsch_semi_static; sched_pdsch->rbStart = rbStart; sched_pdsch->rbSize = rbSize; - const int tda = sched_ctrl->active_bwp ? RC.nrmac[module_id]->preferred_dl_tda[sched_ctrl->active_bwp->bwp_Id][slot] : 0; + const int tda = sched_ctrl->active_bwp ? RC.nrmac[module_id]->preferred_dl_tda[sched_ctrl->active_bwp->bwp_Id][slot] : 1; const uint8_t num_dmrs_cdm_grps_no_data = 1; if (ps->time_domain_allocation != tda || ps->numDmrsCdmGrpsNoData != num_dmrs_cdm_grps_no_data) nr_set_pdsch_semi_static( @@ -409,7 +409,7 @@ bool nr_ul_preprocessor_phytest(module_id_t module_id, frame_t frame, sub_frame_ NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; - const int tda = sched_ctrl->active_ubwp ? RC.nrmac[module_id]->preferred_ul_tda[sched_ctrl->active_ubwp->bwp_Id][slot] : 0; + const int tda = sched_ctrl->active_ubwp ? RC.nrmac[module_id]->preferred_ul_tda[sched_ctrl->active_ubwp->bwp_Id][slot] : 1; if (tda < 0) return false; const struct NR_PUSCH_TimeDomainResourceAllocationList *tdaList = diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index d6f51cd2d9..7d9f81030c 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -801,7 +801,7 @@ bool allocate_ul_retransmission(module_id_t module_id, const uint16_t bwpSize = NRRIV2PRBOFFSET(genericParameters->locationAndBandwidth, MAX_BWP_SIZE); const uint8_t num_dmrs_cdm_grps_no_data = sched_ctrl->active_bwp ? 1 : 2; - const int tda = sched_ctrl->active_ubwp ? RC.nrmac[module_id]->preferred_ul_tda[sched_ctrl->active_ubwp->bwp_Id][slot] : 0; + const int tda = sched_ctrl->active_ubwp ? RC.nrmac[module_id]->preferred_ul_tda[sched_ctrl->active_ubwp->bwp_Id][slot] : 1; if (tda == retInfo->time_domain_allocation) { /* Check the resource is enough for retransmission */ while (rbStart < bwpSize && !rballoc_mask[rbStart]) @@ -999,7 +999,7 @@ void pf_ul(module_id_t module_id, const uint8_t num_dmrs_cdm_grps_no_data = sched_ctrl->active_ubwp ? 1 : 2; const long f = sched_ctrl->search_space->searchSpaceType->choice.ue_Specific->dci_Formats; const int dci_format = sched_ctrl->active_ubwp ? (f ? NR_UL_DCI_FORMAT_0_1 : NR_UL_DCI_FORMAT_0_0) : NR_UL_DCI_FORMAT_0_0; - const int tda = sched_ctrl->active_ubwp ? nrmac->preferred_ul_tda[sched_ctrl->active_ubwp->bwp_Id][slot] : 0; + const int tda = sched_ctrl->active_ubwp ? nrmac->preferred_ul_tda[sched_ctrl->active_ubwp->bwp_Id][slot] : 1; if (ps->time_domain_allocation != tda || ps->dci_format != dci_format || ps->num_dmrs_cdm_grps_no_data != num_dmrs_cdm_grps_no_data) @@ -1095,7 +1095,7 @@ void pf_ul(module_id_t module_id, const uint8_t num_dmrs_cdm_grps_no_data = sched_ctrl->active_ubwp ? 1 : 2; const long f = sched_ctrl->search_space->searchSpaceType->choice.ue_Specific->dci_Formats; const int dci_format = sched_ctrl->active_ubwp ? (f ? NR_UL_DCI_FORMAT_0_1 : NR_UL_DCI_FORMAT_0_0) : NR_UL_DCI_FORMAT_0_0; - const int tda = sched_ctrl->active_ubwp ? nrmac->preferred_ul_tda[sched_ctrl->active_ubwp->bwp_Id][slot] : 0; + const int tda = sched_ctrl->active_ubwp ? nrmac->preferred_ul_tda[sched_ctrl->active_ubwp->bwp_Id][slot] : 1; if (ps->time_domain_allocation != tda || ps->dci_format != dci_format || ps->num_dmrs_cdm_grps_no_data != num_dmrs_cdm_grps_no_data) @@ -1145,7 +1145,7 @@ bool nr_fr1_ulsch_preprocessor(module_id_t module_id, frame_t frame, sub_frame_t * schedule now (slot + k2 is not UL slot) */ int UE_id = UE_info->list.head; NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; - const int tda = sched_ctrl->active_ubwp ? nr_mac->preferred_ul_tda[sched_ctrl->active_ubwp->bwp_Id][slot] : 0; + const int tda = sched_ctrl->active_ubwp ? nr_mac->preferred_ul_tda[sched_ctrl->active_ubwp->bwp_Id][slot] : 1; if (tda < 0) return false; int K2 = get_K2(scc, sched_ctrl->active_ubwp, tda, mu); From 770b864fb34ad3e3c4792b5b92723947679ca755 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Thu, 29 Apr 2021 20:07:17 +0100 Subject: [PATCH 276/579] Fix segmentation fault after CFRA --- openair2/LAYER2/NR_MAC_UE/main_ue_nr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c b/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c index be5a1ae19e..abb98cbc8b 100644 --- a/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c +++ b/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c @@ -66,8 +66,8 @@ NR_UE_MAC_INST_t * nr_l2_init_ue(NR_UE_RRC_INST_t* rrc_inst) //} } else if (rrc_inst->cell_group_config) { nr_rrc_mac_config_req_ue(0,0,0,NULL,NULL,rrc_inst->cell_group_config,NULL); + AssertFatal(rlc_module_init(0) == 0, "%s: Could not initialize RLC layer\n", __FUNCTION__); if (IS_SOFTMODEM_NOS1){ - AssertFatal(rlc_module_init(0) == 0, "%s: Could not initialize RLC layer\n", __FUNCTION__); pdcp_layer_init(); nr_DRB_preconfiguration(nr_ue_mac_inst->crnti); } From 37cc4d60331ef4aabb0a2ae61a00feafae921028 Mon Sep 17 00:00:00 2001 From: hardy Date: Wed, 28 Apr 2021 21:00:35 +0200 Subject: [PATCH 277/579] fixing html columns --- ci-scripts/html.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ci-scripts/html.py b/ci-scripts/html.py index aca717c0d4..e51516d606 100644 --- a/ci-scripts/html.py +++ b/ci-scripts/html.py @@ -457,7 +457,7 @@ class HTMLManagement(): self.htmlFile.write(' ---- ' + DataLog['Title'] + ' ---- \n') self.htmlFile.write(' \n') self.htmlFile.write(' \n') - self.htmlFile.write(' '+ DataLog['ColNames'][0] +'\n') + self.htmlFile.write(' '+ DataLog['ColNames'][0] +'\n') self.htmlFile.write(' ' + DataLog['ColNames'][1] + '\n') self.htmlFile.write(' ' + DataLog['ColNames'][2] + '\n') self.htmlFile.write(' '+ DataLog['ColNames'][3] +'\n') @@ -466,13 +466,13 @@ class HTMLManagement(): for k in DataLog['Data']: # TestRow self.htmlFile.write(' \n') - self.htmlFile.write(' ' + k + ' \n') - self.htmlFile.write(' ' + DataLog['Data'][k][0] + ' \n') - self.htmlFile.write(' ' + DataLog['Data'][k][1] + ' \n') + self.htmlFile.write(' ' + k + ' \n') + self.htmlFile.write(' ' + DataLog['Data'][k][0] + ' \n') + self.htmlFile.write(' ' + DataLog['Data'][k][1] + ' \n') if float(DataLog['Data'][k][2])> DataLog['Threshold'][k]: - self.htmlFile.write(' ' + DataLog['Data'][k][2] + ' ('+str(DataLog['Threshold'][k])+') ' + '\n') + self.htmlFile.write(' ' + DataLog['Data'][k][2] + ' ('+str(DataLog['Threshold'][k])+') ' + '\n') else: - self.htmlFile.write(' ' + DataLog['Data'][k][2] + ' ('+str(DataLog['Threshold'][k])+') ' + '\n') + self.htmlFile.write(' ' + DataLog['Data'][k][2] + ' ('+str(DataLog['Threshold'][k])+') ' + '\n') self.htmlFile.write(' \n') self.htmlFile.close() From c66f7da278eaebcc82d1af3caf559d792307199e Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Thu, 29 Apr 2021 22:45:23 +0200 Subject: [PATCH 278/579] missing declarations in main_ru.c --- executables/main_ru.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/executables/main_ru.c b/executables/main_ru.c index 7b0e0696b2..93a580560e 100644 --- a/executables/main_ru.c +++ b/executables/main_ru.c @@ -66,6 +66,8 @@ static int DEFBANDS[] = {7}; static int DEFENBS[] = {0}; static int DEFBFW[] = {0x00007fff}; +THREAD_STRUCT thread_struct; + pthread_cond_t sync_cond; pthread_mutex_t sync_mutex; int sync_var=-1; //!< protected by mutex \ref sync_mutex. @@ -83,7 +85,6 @@ extern void set_function_spec_param(RU_t *ru); int32_t uplink_frequency_offset[MAX_NUM_CCs][4]; -int usrp_tx_thread=0; void nfapi_setmode(nfapi_mode_t nfapi_mode) { return; } void exit_function(const char *file, const char *function, const int line, const char *s) { From 7ca887221625bbef414f976eabc94ce30c3a94f8 Mon Sep 17 00:00:00 2001 From: hardy Date: Thu, 29 Apr 2021 21:59:47 +0200 Subject: [PATCH 279/579] fix test status fail/pass + test update + cleaning --- ci-scripts/ran.py | 21 +++++++------------ ci-scripts/xml_files/gnb_phytest_usrp_run.xml | 4 ++-- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index 8e378afbe9..f5f53c20b7 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -940,18 +940,6 @@ class RANManagement(): logging.debug(dlsch_ulsch_stats[key]) htmleNBFailureMsg += statMsg - #real time statistics (old but working version) - #if len(real_time_stats)!=0: #check if dictionary is not empty - # statMsg='' - # for k in real_time_stats: - # tmp=re.match(r'^(?P.*):\s+(?P\d+\.\d+) us;\s+\d+;\s+(?P\d+\.\d+) us;',real_time_stats[k]) - # if tmp is not None: - # metric=tmp.group('metric') - # avg=tmp.group('avg') - # max=tmp.group('max') - # statMsg += metric + ' : avg = ' + avg + 'us ; max = ' + max +'us\n' - # htmleNBFailureMsg += statMsg - #real time statistics datalog_rt_stats['Data']={} if len(real_time_stats)!=0: #check if dictionary is not empty @@ -962,8 +950,13 @@ class RANManagement(): avg=float(tmp.group('avg')) max=float(tmp.group('max')) datalog_rt_stats['Data'][metric]=["{:.0f}".format(avg),"{:.0f}".format(max),"{:.2f}".format(avg/datalog_rt_stats['Ref'][metric])] - #store the data as a class attribute to build a dedicated HTML table afterward - self.datalog_rt_stats=datalog_rt_stats + #once all metrics are collected, store the data as a class attribute to build a dedicated HTML table afterward + self.datalog_rt_stats=datalog_rt_stats + #check if there is a fail => will render the test as failed + for k in datalog_rt_stats['Data']: + if float(datalog_rt_stats['Data'][k][2])> datalog_rt_stats['Threshold'][k]: #condition for fail : avg/ref is greater than the fixed threshold + #setting prematureExit is ok although not the best option + self.prematureExit=True else: statMsg = 'No real time stats found in the log file\n' logging.debug('No real time stats found in the log file') diff --git a/ci-scripts/xml_files/gnb_phytest_usrp_run.xml b/ci-scripts/xml_files/gnb_phytest_usrp_run.xml index 00610d430e..9e798afdc4 100644 --- a/ci-scripts/xml_files/gnb_phytest_usrp_run.xml +++ b/ci-scripts/xml_files/gnb_phytest_usrp_run.xml @@ -24,7 +24,7 @@ gNB-PHY-Test Run-gNB-PHY-Test tasks - 2 + 3 090101 000001 090109 @@ -40,7 +40,7 @@ IdleSleep Sleep - 180 + 300 From 3c0aadfd2394e7877dbcb48a1863b52f110dcb5f Mon Sep 17 00:00:00 2001 From: rmagueta Date: Thu, 29 Apr 2021 22:58:14 +0100 Subject: [PATCH 280/579] Fix warnings --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c | 9 +++++---- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c | 4 ---- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 8 ++++---- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index 269a5880d1..fc7cb3dda4 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -60,7 +60,7 @@ static boolean_t loop_dcch_dtch = TRUE; void calculate_preferred_dl_tda(module_id_t module_id, const NR_BWP_Downlink_t *bwp) { gNB_MAC_INST *nrmac = RC.nrmac[module_id]; - const int bwp_id = bwp->bwp_Id; + const int bwp_id = bwp ? bwp->bwp_Id : 0; if (nrmac->preferred_dl_tda[bwp_id]) return; @@ -70,9 +70,10 @@ void calculate_preferred_dl_tda(module_id_t module_id, const NR_BWP_Downlink_t * scc->tdd_UL_DL_ConfigurationCommon ? &scc->tdd_UL_DL_ConfigurationCommon->pattern1 : NULL; const int symb_dlMixed = tdd ? (1 << tdd->nrofDownlinkSymbols) - 1 : 0; - const int target_ss = NR_SearchSpace__searchSpaceType_PR_ue_Specific; - const NR_SearchSpace_t *search_space = get_searchspace(scc, bwp->bwp_Dedicated, target_ss); - const NR_ControlResourceSet_t *coreset = get_coreset(scc, bwp, search_space, 1 /* dedicated */); + const int target_ss = bwp ? NR_SearchSpace__searchSpaceType_PR_ue_Specific : NR_SearchSpace__searchSpaceType_PR_common; + NR_SearchSpace_t *search_space = get_searchspace(scc, bwp ? bwp->bwp_Dedicated : NULL, target_ss); + const NR_ControlResourceSet_t *coreset = get_coreset(scc, (NR_BWP_Downlink_t*)bwp, search_space, target_ss); + // get coreset symbol "map" const uint16_t symb_coreset = (1 << coreset->duration) - 1; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c index 9b2f24a732..907a7491e9 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c @@ -1020,8 +1020,6 @@ void handle_nr_uci_pucch_0_1(module_id_t mod_id, sched_ctrl->pucch_snrx10 = uci_01->ul_cqi * 5 - 640; - NR_ServingCellConfigCommon_t *scc = RC.nrmac[mod_id]->common_channels->ServingCellConfigCommon; - const int num_slots = nr_slots_per_frame[*scc->ssbSubcarrierSpacing]; if (((uci_01->pduBitmap >> 1) & 0x01)) { // iterate over received harq bits for (int harq_bit = 0; harq_bit < uci_01->harq->num_harq; harq_bit++) { @@ -1063,8 +1061,6 @@ void handle_nr_uci_pucch_2_3_4(module_id_t mod_id, 30); sched_ctrl->pucch_snrx10 = uci_234->ul_cqi * 5 - 640; - NR_ServingCellConfigCommon_t *scc = RC.nrmac[mod_id]->common_channels->ServingCellConfigCommon; - const int num_slots = nr_slots_per_frame[*scc->ssbSubcarrierSpacing]; if ((uci_234->pduBitmap >> 1) & 0x01) { // iterate over received harq bits for (int harq_bit = 0; harq_bit < uci_234->harq.harq_bit_len; harq_bit++) { diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 7d9f81030c..43cb53b624 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -69,7 +69,7 @@ void calculate_preferred_ul_tda(module_id_t module_id, const NR_BWP_Uplink_t *ub return; /* there is a mixed slot only when in TDD */ - const NR_ServingCellConfigCommon_t *scc = nrmac->common_channels->ServingCellConfigCommon; + NR_ServingCellConfigCommon_t *scc = nrmac->common_channels->ServingCellConfigCommon; const int mu = scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.subcarrierSpacing; const NR_TDD_UL_DL_Pattern_t *tdd = scc->tdd_UL_DL_ConfigurationCommon ? &scc->tdd_UL_DL_ConfigurationCommon->pattern1 : NULL; @@ -117,7 +117,7 @@ void calculate_preferred_ul_tda(module_id_t module_id, const NR_BWP_Uplink_t *ub const struct NR_PUSCH_TimeDomainResourceAllocationList *tdaList = ubwp->bwp_Common->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList; AssertFatal(tdaList->list.count >= 3, "need to have at least three TDAs for UL slots\n"); const NR_PUSCH_TimeDomainResourceAllocation_t *tdaP_UL = tdaList->list.array[0]; - const int k2 = get_K2(scc, ubwp, /* tda = */ 0, mu); + const int k2 = get_K2(scc, (NR_BWP_Uplink_t*)ubwp,0, mu); int start, len; SLIV2SL(tdaP_UL->startSymbolAndLength, &start, &len); const uint16_t symb_tda = ((1 << len) - 1) << start; @@ -129,10 +129,10 @@ void calculate_preferred_ul_tda(module_id_t module_id, const NR_BWP_Uplink_t *ub // get largest time domain allocation (TDA) for UL slot and UL in mixed slot int tdaMi = -1; const NR_PUSCH_TimeDomainResourceAllocation_t *tdaP_Mi = tdaList->list.array[1]; - AssertFatal(k2 == get_K2(scc, ubwp, /* tda = */ 1, mu), + AssertFatal(k2 == get_K2(scc, (NR_BWP_Uplink_t*)ubwp, 1, mu), "scheduler cannot handle different k2 for UL slot (%d) and UL Mixed slot (%ld)\n", k2, - get_K2(scc, ubwp, /* tda = */ 1, mu)); + get_K2(scc, (NR_BWP_Uplink_t*)ubwp, 1, mu)); SLIV2SL(tdaP_Mi->startSymbolAndLength, &start, &len); const uint16_t symb_tda_mi = ((1 << len) - 1) << start; // check whether PUCCH and TDA overlap: then, we cannot use it. Also, check From 7050044fcdec39b8e13d03d614bd4dfdcf87b3b0 Mon Sep 17 00:00:00 2001 From: hardy Date: Fri, 30 Apr 2021 10:24:44 +0200 Subject: [PATCH 281/579] improve understanding of results --- ci-scripts/datalog_rt_stats.yaml | 2 +- ci-scripts/html.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ci-scripts/datalog_rt_stats.yaml b/ci-scripts/datalog_rt_stats.yaml index e21cbc4088..3680d2a19b 100644 --- a/ci-scripts/datalog_rt_stats.yaml +++ b/ci-scripts/datalog_rt_stats.yaml @@ -6,7 +6,7 @@ ColNames : - Metric - Average - Max - - Average vs Reference Deviation (Acceptability Threshold) + - Average vs Reference Deviation (Reference Value ; Acceptability Threshold) Ref : feprx : 60.0 feptx_prec : 8.0 diff --git a/ci-scripts/html.py b/ci-scripts/html.py index e51516d606..02ba2eee2c 100644 --- a/ci-scripts/html.py +++ b/ci-scripts/html.py @@ -470,9 +470,9 @@ class HTMLManagement(): self.htmlFile.write(' ' + DataLog['Data'][k][0] + ' \n') self.htmlFile.write(' ' + DataLog['Data'][k][1] + ' \n') if float(DataLog['Data'][k][2])> DataLog['Threshold'][k]: - self.htmlFile.write(' ' + DataLog['Data'][k][2] + ' ('+str(DataLog['Threshold'][k])+') ' + '\n') + self.htmlFile.write(' ' + DataLog['Data'][k][2] + ' (Ref = ' + str(DataLog['Ref'][k]) + ' ; Thres = ' +str(DataLog['Threshold'][k])+') ' + '\n') else: - self.htmlFile.write(' ' + DataLog['Data'][k][2] + ' ('+str(DataLog['Threshold'][k])+') ' + '\n') + self.htmlFile.write(' ' + DataLog['Data'][k][2] + ' (Ref = ' + str(DataLog['Ref'][k]) + ' ; Thres = ' +str(DataLog['Threshold'][k])+') ' + '\n') self.htmlFile.write(' \n') self.htmlFile.close() From fece6834456f9b76979a70c07cf5037ded2858c7 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Fri, 30 Apr 2021 12:14:37 +0100 Subject: [PATCH 282/579] Fix issues after merge --- openair1/PHY/NR_TRANSPORT/pucch_rx.c | 1 + openair1/SCHED_NR/phy_procedures_nr_gNB.c | 4 ++++ openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c | 3 ++- openair2/RRC/NR/rrc_gNB.c | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/openair1/PHY/NR_TRANSPORT/pucch_rx.c b/openair1/PHY/NR_TRANSPORT/pucch_rx.c index f3f736330f..28e3ecb52e 100644 --- a/openair1/PHY/NR_TRANSPORT/pucch_rx.c +++ b/openair1/PHY/NR_TRANSPORT/pucch_rx.c @@ -363,6 +363,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB, if (10*xrtmag_dB < uci_stats->pucch0_thres) no_conf=true; } + gNB->bad_pucch += no_conf; // first bit of bitmap for sr presence and second bit for acknack presence uci_pdu->pduBitmap = pucch_pdu->sr_flag | ((pucch_pdu->bit_len_harq>0)<<1); uci_pdu->pucch_format = 0; // format 0 diff --git a/openair1/SCHED_NR/phy_procedures_nr_gNB.c b/openair1/SCHED_NR/phy_procedures_nr_gNB.c index 53453e353f..1d7745a4e7 100644 --- a/openair1/SCHED_NR/phy_procedures_nr_gNB.c +++ b/openair1/SCHED_NR/phy_procedures_nr_gNB.c @@ -693,6 +693,10 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) } stop_meas(&gNB->phy_proc_rx); // figure out a better way to choose slot_rx, 19 is ok for a particular TDD configuration with 30kHz SCS + if ((frame_rx&127) == 0 && slot_rx==19) { + LOG_I(PHY, "Number of bad PUCCH received: %lu\n", gNB->bad_pucch); + } + if (pucch_decode_done || pusch_decode_done) { T(T_GNB_PHY_PUCCH_PUSCH_IQ, T_INT(frame_rx), T_INT(slot_rx), T_BUFFER(&gNB->common_vars.rxdataF[0][0], gNB->frame_parms.symbols_per_slot * gNB->frame_parms.ofdm_symbol_size * 4)); } diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c index 7d45c31099..c534b6c57f 100644 --- a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c +++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c @@ -991,12 +991,13 @@ void nr_DRB_preconfiguration(uint16_t crnti) PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, 0, ENB_FLAG_NO, crnti, 0, 0,0); } + // FIXME: integrity_algorithm was temporarily set to 0 nr_rrc_pdcp_config_asn1_req( &ctxt, (NR_SRB_ToAddModList_t *) NULL, rbconfig->drb_ToAddModList , rbconfig->drb_ToReleaseList, - 0xff, + 0, NULL, NULL, NULL, diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index 9e988551d6..f3eae0bb24 100755 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -1009,7 +1009,7 @@ rrc_gNB_generate_dedicatedRRCReconfiguration( break; default: - LOG_E(NR_RRC,"not supported 5qi %d\n", ue_context_pP->ue_context.pdusession[i].param.qos[qos_flow_index].fiveQI); + LOG_E(NR_RRC,"not supported 5qi %lu\n", ue_context_pP->ue_context.pdusession[i].param.qos[qos_flow_index].fiveQI); ue_context_pP->ue_context.pdusession[i].status = PDU_SESSION_STATUS_FAILED; ue_context_pP->ue_context.pdusession[i].xid = xid; pdu_sessions_done++; From 7d03c14ecec0acd3191d6154fdf4e433db49801a Mon Sep 17 00:00:00 2001 From: Remi Hardy Date: Fri, 30 Apr 2021 15:04:11 +0200 Subject: [PATCH 283/579] logging fix -> pass --- ci-scripts/cls_oaicitest.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index cbb09287bd..73f5613dfc 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -1514,7 +1514,6 @@ class OaiCiTest(): SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword) cmd = 'ping -I ' + UE_IPAddress + ' ' + self.ping_args + ' ' + EPC.IPAddress + ' 2>&1 > ping_' + self.testCase_id + '_' + self.ue_id + '.log' SSH.command(cmd,'\$',int(ping_time[0])*1.5) - logging.debug(cmd) #copy the ping log file to have it locally for analysis (ping stats) SSH.copyin(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword, 'ping_' + self.testCase_id + '_' + self.ue_id + '.log', '.') @@ -2205,12 +2204,10 @@ class OaiCiTest(): SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword) cmd = 'echo $USER; nohup iperf -s -B ' + UE_IPAddress + ' -u 2>&1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' SSH.command(cmd,'\$',5) - logging.debug(cmd) #client side EPC SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password) cmd = 'iperf -c ' + UE_IPAddress + ' ' + self.iperf_args + ' 2>&1 > iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log' SSH.command(cmd,'\$',int(iperf_time)*5.0) - logging.debug(cmd) #copy the 2 resulting files locally SSH.copyin(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword, 'iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log', '.') @@ -2225,12 +2222,10 @@ class OaiCiTest(): SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password) cmd = 'echo $USER; nohup iperf -s -u 2>&1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' SSH.command(cmd,'\$',5) - logging.debug(cmd) #client side UE SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword) cmd = 'iperf -B ' + UE_IPAddress + ' ' + '-c ' + EPC.IPAddress + ' ' + self.iperf_args + ' > iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log' SSH.command(cmd,'\$',int(iperf_time)*5.0) - logging.debug(cmd) #copy the 2 resulting files locally SSH.copyin(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword, 'iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log', '.') From 4b23e6a7bfcc0b1fc8feda397f940c1cf7ad00ae Mon Sep 17 00:00:00 2001 From: Remi Hardy Date: Fri, 30 Apr 2021 15:45:39 +0200 Subject: [PATCH 284/579] adding HTML row for detach --- ci-scripts/cls_oaicitest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index 73f5613dfc..8674710ceb 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -1080,6 +1080,7 @@ class OaiCiTest(): else:#if an ID is specified, it is a module from the yaml infrastructure file Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id]) Module_UE.Command("detach") + HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK) @@ -1956,7 +1957,7 @@ class OaiCiTest(): if type==0: result = re.search('(?P[0-9\.]+ [KMG]bits\/sec) +(?P[0-9\.]+ ms) +(?P[0-9]+)/ +(?P[0-9]+)', str(line)) else: - result = re.search('^.+ +(?P[0-9\.]+ [KMG]bits\/sec) +(?P[0-9\.]+ ms) +(?P[0-9]+)\/(?P[0-9]+)', str(line)) + result = re.search('^\[ 3\].+ +(?P[0-9\.]+ [KMG]bits\/sec) +(?P[0-9\.]+ ms) +(?P[0-9]+)\/(?P[0-9]+)', str(line)) if result is not None: bitrate = result.group('bitrate') From 2319b4e76f02cb453c41862b029dda6ffe205157 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 30 Apr 2021 16:40:59 +0200 Subject: [PATCH 285/579] Introduce configuration for maximum UE ULSCH inactivity --- ci-scripts/conf_files/gnb.band261.tm1.32PRB.usrpn300.conf | 1 + ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf | 1 + openair2/GNB_APP/MACRLC_nr_paramdef.h | 4 +++- openair2/GNB_APP/gnb_config.c | 3 ++- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 2 +- openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h | 3 +++ 6 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ci-scripts/conf_files/gnb.band261.tm1.32PRB.usrpn300.conf b/ci-scripts/conf_files/gnb.band261.tm1.32PRB.usrpn300.conf index f0c1caef7e..8fbbc8a7cd 100644 --- a/ci-scripts/conf_files/gnb.band261.tm1.32PRB.usrpn300.conf +++ b/ci-scripts/conf_files/gnb.band261.tm1.32PRB.usrpn300.conf @@ -230,6 +230,7 @@ MACRLCs = ( num_cc = 1; tr_s_preference = "local_L1"; tr_n_preference = "local_RRC"; + ulsch_max_slots_inactivity = 1; } ); diff --git a/ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf b/ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf index f125dcd3b2..703d6a3bf0 100644 --- a/ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf +++ b/ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf @@ -211,6 +211,7 @@ MACRLCs = ( num_cc = 1; tr_s_preference = "local_L1"; tr_n_preference = "local_RRC"; + ulsch_max_slots_inactivity = 1; } ); diff --git a/openair2/GNB_APP/MACRLC_nr_paramdef.h b/openair2/GNB_APP/MACRLC_nr_paramdef.h index 308af2eeb9..60b40cb349 100644 --- a/openair2/GNB_APP/MACRLC_nr_paramdef.h +++ b/openair2/GNB_APP/MACRLC_nr_paramdef.h @@ -55,7 +55,7 @@ #define CONFIG_STRING_MACRLC_REMOTE_S_PORTC "remote_s_portc" #define CONFIG_STRING_MACRLC_LOCAL_S_PORTD "local_s_portd" #define CONFIG_STRING_MACRLC_REMOTE_S_PORTD "remote_s_portd" - +#define CONFIG_STRING_MACRLC_ULSCH_MAX_SLOTS_INACTIVITY "ulsch_max_slots_inactivity" /*-------------------------------------------------------------------------------------------------------------------------------------------------------*/ /* MacRLC configuration parameters */ @@ -79,6 +79,7 @@ {CONFIG_STRING_MACRLC_REMOTE_S_PORTC, NULL, 0, uptr:NULL, defintval:50020, TYPE_UINT, 0}, \ {CONFIG_STRING_MACRLC_LOCAL_S_PORTD, NULL, 0, uptr:NULL, defintval:50021, TYPE_UINT, 0}, \ {CONFIG_STRING_MACRLC_REMOTE_S_PORTD, NULL, 0, uptr:NULL, defintval:50021, TYPE_UINT, 0}, \ +{CONFIG_STRING_MACRLC_ULSCH_MAX_SLOTS_INACTIVITY, "Maximum number of slots before a UE is scheduled ULSCH due to inactivity", 0, uptr:NULL, defintval:200, TYPE_UINT, 0}, \ } #define MACRLC_CC_IDX 0 #define MACRLC_TRANSPORT_N_PREFERENCE_IDX 1 @@ -97,5 +98,6 @@ #define MACRLC_REMOTE_S_PORTC_IDX 14 #define MACRLC_LOCAL_S_PORTD_IDX 15 #define MACRLC_REMOTE_S_PORTD_IDX 16 +#define MACRLC_ULSCH_MAX_SLOTS_INACTIVITY 17 /*---------------------------------------------------------------------------------------------------------------------------------------------------------*/ #endif diff --git a/openair2/GNB_APP/gnb_config.c b/openair2/GNB_APP/gnb_config.c index d3dd769807..b9bf141fce 100644 --- a/openair2/GNB_APP/gnb_config.c +++ b/openair2/GNB_APP/gnb_config.c @@ -53,7 +53,7 @@ //#include "L1_paramdef.h" #include "L1_nr_paramdef.h" -#include "MACRLC_paramdef.h" +#include "MACRLC_nr_paramdef.h" #include "common/config/config_userapi.h" //#include "RRC_config_tools.h" #include "gnb_paramdef.h" @@ -698,6 +698,7 @@ void RCconfig_nr_macrlc() { }else { // other midhaul AssertFatal(1==0,"MACRLC %d: %s unknown southbound midhaul\n",j,*(MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_S_PREFERENCE_IDX].strptr)); } + RC.nrmac[j]->ulsch_max_slots_inactivity = *(MacRLC_ParamList.paramarray[j][MACRLC_ULSCH_MAX_SLOTS_INACTIVITY].uptr); }// for (j=0;j 0 AssertFatal (0,"No " CONFIG_STRING_MACRLC_LIST " configuration found"); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 259aa1d455..323baa48a7 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -762,7 +762,7 @@ bool nr_UE_is_to_be_scheduled(module_id_t mod_id, int CC_id, int UE_id, frame_t * (2) there is a scheduling request * (3) or we did not schedule it in more than 10 frames */ const bool has_data = sched_ctrl->estimated_ul_buffer > sched_ctrl->sched_ul_bytes; - const bool high_inactivity = diff >= 10 * n; + const bool high_inactivity = diff >= nrmac->ulsch_max_slots_inactivity; LOG_D(MAC, "%4d.%2d UL inactivity %d slots has_data %d SR %d\n", frame, diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h index 0c7fda09e2..52255b8f32 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h +++ b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h @@ -721,6 +721,9 @@ typedef struct gNB_MAC_INST_s { /// points to the right UL slot int *preferred_ul_tda[MAX_NUM_BWP]; + /// maximum number of slots before a UE will be scheduled ULSCH automatically + uint32_t ulsch_max_slots_inactivity; + /// DL preprocessor for differentiated scheduling nr_pp_impl_dl pre_processor_dl; /// UL preprocessor for differentiated scheduling From 916daed3a9778fd8c0f0b53056e323b17d2d1627 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Fri, 30 Apr 2021 17:03:21 +0100 Subject: [PATCH 286/579] Fix DL after CFRA --- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 19 +++++++++++++------ .../LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c | 3 ++- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index d0dd9c6c0a..c58fd844b4 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -1157,11 +1157,21 @@ uint8_t nr_extract_dci_info(NR_UE_MAC_INST_t *mac, uint64_t *dci_pdu, dci_pdu_rel15_t *dci_pdu_rel15) { + int N_RB = 0; + int pos = 0; + int fsize = 0; + int rnti_type = get_rnti_type(mac, rnti); - int N_RB=0,N_RB_UL=0; + + int N_RB_UL = 0; + if(mac->scc_SIB) { + N_RB_UL = NRRIV2BW(mac->scc_SIB->uplinkConfigCommon->initialUplinkBWP.genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + } else if(mac->ULbwp[0]) { + N_RB_UL = NRRIV2BW(mac->ULbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + } else if(mac->scc) { + N_RB_UL = NRRIV2BW(mac->scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + } - int pos=0; - int fsize=0; LOG_D(MAC,"nr_extract_dci_info : dci_pdu %lx, size %d\n",*dci_pdu,dci_size); switch(dci_format) { @@ -1700,10 +1710,7 @@ uint8_t nr_extract_dci_info(NR_UE_MAC_INST_t *mac, // Freq domain assignment max 16 bit fsize = (int)ceil( log2( (N_RB_UL*(N_RB_UL+1))>>1 ) ); - //pos+=dci_pdu_rel15->frequency_domain_assignment.nbits; pos+=fsize; - - //pos+=dci_pdu_rel15->frequency_domain_assignment.nbits; dci_pdu_rel15->frequency_domain_assignment.val = (*dci_pdu>>(dci_size-pos))&((1<active_bwp ? RC.nrmac[module_id]->preferred_dl_tda[sched_ctrl->active_bwp->bwp_Id][slot] : 1; NR_sched_pdsch_t *sched_pdsch = &sched_ctrl->sched_pdsch; NR_pdsch_semi_static_t *ps = &sched_ctrl->pdsch_semi_static; - const uint8_t num_dmrs_cdm_grps_no_data = ps->nrOfSymbols == 2 ? 1 : 2; + const long f = sched_ctrl->search_space->searchSpaceType->choice.ue_Specific->dci_Formats; + const uint8_t num_dmrs_cdm_grps_no_data = sched_ctrl->active_bwp ? (f ? 1 : (ps->nrOfSymbols == 2 ? 1 : 2)) : (ps->nrOfSymbols == 2 ? 1 : 2); if (ps->time_domain_allocation != tda || ps->numDmrsCdmGrpsNoData != num_dmrs_cdm_grps_no_data) nr_set_pdsch_semi_static( scc, UE_info->CellGroup[UE_id], sched_ctrl->active_bwp, tda, num_dmrs_cdm_grps_no_data, ps); From e0833b74d812e061f3628b2e52fa721252d46543 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Fri, 30 Apr 2021 18:25:19 +0100 Subject: [PATCH 287/579] Fix warning after merge --- executables/nr-uesoftmodem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/executables/nr-uesoftmodem.h b/executables/nr-uesoftmodem.h index 6e9a1077e1..5ef6bffd7e 100644 --- a/executables/nr-uesoftmodem.h +++ b/executables/nr-uesoftmodem.h @@ -55,7 +55,7 @@ {"ue-scan-carrier", CONFIG_HLP_UESCAN, PARAMFLAG_BOOL, iptr:&(UE->UE_scan_carrier), defintval:0, TYPE_INT, 0}, \ {"ue-fo-compensation", CONFIG_HLP_UEFO, PARAMFLAG_BOOL, iptr:&(UE->UE_fo_compensation), defintval:0, TYPE_INT, 0}, \ {"ue-max-power", NULL, 0, iptr:&(tx_max_power[0]), defintval:90, TYPE_INT, 0}, \ - {"r" , CONFIG_HLP_PRB, 0, uptr:&(fp->N_RB_DL), defintval:160, TYPE_UINT, 0}, \ + {"r" , CONFIG_HLP_PRB, 0, uptr:&(N_RB_DL), defuintval:160, TYPE_UINT, 0}, \ {"A" , CONFIG_HLP_TADV, 0, iptr:&(UE->timing_advance), defintval:0, TYPE_INT, 0}, \ {"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL, u8ptr:&(fp->threequarter_fs), defintval:0, TYPE_UINT8, 0}, \ {"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0}, \ From 00b0c558f5dd3daf8c21ec758eb80404e6094986 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Sat, 1 May 2021 02:06:49 +0100 Subject: [PATCH 288/579] Fix allocate_ul_retransmission after merge --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c | 4 ++-- .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 22 ++++++++++--------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c index 5795b41787..462fd7f622 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c @@ -98,9 +98,9 @@ void dump_mac_stats(gNB_MAC_INST *gNB) stats->ulsch_total_bytes_scheduled, stats->ulsch_total_bytes_rx); for (int lc_id = 0; lc_id < 63; lc_id++) { if (stats->lc_bytes_tx[lc_id] > 0) - LOG_I(MAC, "UE %d: LCID %d: %d bytes TX\n", UE_id, lc_id, stats->lc_bytes_tx[lc_id]); + LOG_D(MAC, "UE %d: LCID %d: %d bytes TX\n", UE_id, lc_id, stats->lc_bytes_tx[lc_id]); if (stats->lc_bytes_rx[lc_id] > 0) - LOG_I(MAC, "UE %d: LCID %d: %d bytes RX\n", UE_id, lc_id, stats->lc_bytes_rx[lc_id]); + LOG_D(MAC, "UE %d: LCID %d: %d bytes RX\n", UE_id, lc_id, stats->lc_bytes_rx[lc_id]); } } print_meas(&gNB->eNB_scheduler, "DL & UL scheduling timing stats", NULL, NULL); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 43cb53b624..06721c2f57 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -795,10 +795,20 @@ bool allocate_ul_retransmission(module_id_t module_id, NR_UE_info_t *UE_info = &RC.nrmac[module_id]->UE_info; NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; NR_sched_pusch_t *retInfo = &sched_ctrl->ul_harq_processes[harq_pid].sched_pusch; + NR_sched_pusch_t *sched_pusch = &sched_ctrl->sched_pusch; + + // frame/slot in sched_pusch has been set previously. In the following, we + // overwrite the information in the retransmission information before storing + // as the new scheduling instruction + retInfo->frame = sched_ctrl->sched_pusch.frame; + retInfo->slot = sched_ctrl->sched_pusch.slot; + + // Get previous PUSCH filed info + sched_ctrl->sched_pusch = *retInfo; NR_BWP_t *genericParameters = sched_ctrl->active_ubwp ? &sched_ctrl->active_ubwp->bwp_Common->genericParameters : &scc->uplinkConfigCommon->initialUplinkBWP->genericParameters; - int rbStart = NRRIV2BW(genericParameters->locationAndBandwidth, MAX_BWP_SIZE); - const uint16_t bwpSize = NRRIV2PRBOFFSET(genericParameters->locationAndBandwidth, MAX_BWP_SIZE); + int rbStart = sched_ctrl->active_ubwp ? NRRIV2PRBOFFSET(genericParameters->locationAndBandwidth, MAX_BWP_SIZE) : 0; + const uint16_t bwpSize = NRRIV2BW(genericParameters->locationAndBandwidth, MAX_BWP_SIZE); const uint8_t num_dmrs_cdm_grps_no_data = sched_ctrl->active_bwp ? 1 : 2; const int tda = sched_ctrl->active_ubwp ? RC.nrmac[module_id]->preferred_ul_tda[sched_ctrl->active_ubwp->bwp_Id][slot] : 1; @@ -862,14 +872,6 @@ bool allocate_ul_retransmission(module_id_t module_id, return false; } - /* frame/slot in sched_pusch has been set previously. In the following, we - * overwrite the information in the retransmission information before storing - * as the new scheduling instruction */ - retInfo->frame = sched_ctrl->sched_pusch.frame; - retInfo->slot = sched_ctrl->sched_pusch.slot; - /* Get previous PSUCH field info */ - sched_ctrl->sched_pusch = *retInfo; - NR_sched_pusch_t *sched_pusch = &sched_ctrl->sched_pusch; LOG_D(MAC, "%4d.%2d Allocate UL retransmission UE %d/RNTI %04x sched %4d.%2d (%d RBs)\n", frame, From 513c07e7a3bb8d5654f98095c4f01c7b64cc9b38 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Sat, 1 May 2021 02:23:13 +0100 Subject: [PATCH 289/579] Remove some hardcode --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 06721c2f57..120a2efae9 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -937,14 +937,9 @@ void pf_ul(module_id_t module_id, if (UE_info->Msg4_ACKed[UE_id] != true) continue; NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; - int rbStart = 0; /*NRRIV2PRBOFFSET(sched_ctrl->active_bwp ? - sched_ctrl->active_bwp->bwp_Common->genericParameters.locationAndBandwidth: - scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.locationAndBandwidth, - MAX_BWP_SIZE);*/ - const uint16_t bwpSize = NRRIV2BW(sched_ctrl->active_ubwp? - sched_ctrl->active_ubwp->bwp_Common->genericParameters.locationAndBandwidth: - scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.locationAndBandwidth, - MAX_BWP_SIZE); + NR_BWP_t *genericParameters = sched_ctrl->active_ubwp ? &sched_ctrl->active_ubwp->bwp_Common->genericParameters : &scc->uplinkConfigCommon->initialUplinkBWP->genericParameters; + int rbStart = sched_ctrl->active_ubwp ? NRRIV2PRBOFFSET(genericParameters->locationAndBandwidth, MAX_BWP_SIZE) : 0; + const uint16_t bwpSize = NRRIV2BW(genericParameters->locationAndBandwidth, MAX_BWP_SIZE); NR_sched_pusch_t *sched_pusch = &sched_ctrl->sched_pusch; NR_pusch_semi_static_t *ps = &sched_ctrl->pusch_semi_static; @@ -1072,8 +1067,8 @@ void pf_ul(module_id_t module_id, return; NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; - NR_BWP_t *genericParameters = sched_ctrl->active_ubwp ? &sched_ctrl->active_ubwp->bwp_Common->genericParameters:&scc->uplinkConfigCommon->initialUplinkBWP->genericParameters; - int rbStart = 0; /*NRRIV2PRBOFFSET(genericParameters->locationAndBandwidth, MAX_BWP_SIZE);*/ + NR_BWP_t *genericParameters = sched_ctrl->active_ubwp ? &sched_ctrl->active_ubwp->bwp_Common->genericParameters : &scc->uplinkConfigCommon->initialUplinkBWP->genericParameters; + int rbStart = sched_ctrl->active_ubwp ? NRRIV2PRBOFFSET(genericParameters->locationAndBandwidth, MAX_BWP_SIZE) : 0; const uint16_t bwpSize = NRRIV2BW(genericParameters->locationAndBandwidth, MAX_BWP_SIZE); NR_sched_pusch_t *sched_pusch = &sched_ctrl->sched_pusch; NR_pusch_semi_static_t *ps = &sched_ctrl->pusch_semi_static; From 079932e007be9acbc77d250d0ede99ed8ae50ab7 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Sat, 1 May 2021 14:12:20 +0100 Subject: [PATCH 290/579] Change some default values --- executables/softmodem-common.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/executables/softmodem-common.h b/executables/softmodem-common.h index a2eb66333e..df91e31db4 100644 --- a/executables/softmodem-common.h +++ b/executables/softmodem-common.h @@ -123,22 +123,22 @@ extern "C" extern int usrp_tx_thread; #define CMDLINE_PARAMS_DESC { \ {"rf-config-file", CONFIG_HLP_RFCFGF, 0, strptr:(char **)&RF_CONFIG_FILE, defstrval:NULL, TYPE_STRING, sizeof(RF_CONFIG_FILE)},\ - {"split73", CONFIG_HLP_SPLIT73, 0, strptr:(char **)&SPLIT73, defstrval:NULL, TYPE_STRING, sizeof(SPLIT73)},\ - {"thread-pool", CONFIG_HLP_TPOOL, 0, strptr:(char **)&TP_CONFIG, defstrval:"n", TYPE_STRING, sizeof(TP_CONFIG)}, \ + {"split73", CONFIG_HLP_SPLIT73, 0, strptr:(char **)&SPLIT73, defstrval:NULL, TYPE_STRING, sizeof(SPLIT73)}, \ + {"thread-pool", CONFIG_HLP_TPOOL, 0, strptr:(char **)&TP_CONFIG, defstrval:"n", TYPE_STRING, sizeof(TP_CONFIG)}, \ {"phy-test", CONFIG_HLP_PHYTST, PARAMFLAG_BOOL, iptr:&PHY_TEST, defintval:0, TYPE_INT, 0}, \ {"do-ra", CONFIG_HLP_DORA, PARAMFLAG_BOOL, iptr:&DO_RA, defintval:0, TYPE_INT, 0}, \ - {"sa", CONFIG_HLP_SA, PARAMFLAG_BOOL, iptr:&SA, defintval:0, TYPE_INT, 0}, \ + {"sa", CONFIG_HLP_SA, PARAMFLAG_BOOL, iptr:&SA, defintval:0, TYPE_INT, 0}, \ {"usim-test", CONFIG_HLP_USIM, PARAMFLAG_BOOL, u8ptr:&USIM_TEST, defintval:0, TYPE_UINT8, 0}, \ - {"clock-source", CONFIG_HLP_CLK, 0, uptr:&CLOCK_SOURCE, defintval:0, TYPE_UINT, 0}, \ - {"time-source", CONFIG_HLP_TME, 0, uptr:&TIMING_SOURCE, defintval:0, TYPE_UINT, 0}, \ + {"clock-source", CONFIG_HLP_CLK, 0, uptr:&CLOCK_SOURCE, defintval:0, TYPE_UINT, 0}, \ + {"time-source", CONFIG_HLP_TME, 0, uptr:&TIMING_SOURCE, defintval:0, TYPE_UINT, 0}, \ {"wait-for-sync", NULL, PARAMFLAG_BOOL, iptr:&WAIT_FOR_SYNC, defintval:0, TYPE_INT, 0}, \ {"single-thread-enable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, iptr:&SINGLE_THREAD_FLAG, defintval:0, TYPE_INT, 0}, \ - {"C" , CONFIG_HLP_DLF, 0, u64ptr:&(downlink_frequency[0][0]), defuintval:0, TYPE_UINT64, 0}, \ - {"CO" , CONFIG_HLP_ULF, 0, iptr:&(uplink_frequency_offset[0][0]), defintval:0, TYPE_INT, 0}, \ + {"C" , CONFIG_HLP_DLF, 0, u64ptr:&(downlink_frequency[0][0]), defuintval:3619200000, TYPE_UINT64, 0}, \ + {"CO" , CONFIG_HLP_ULF, 0, iptr:&(uplink_frequency_offset[0][0]), defintval:3619200000, TYPE_INT, 0}, \ {"a" , CONFIG_HLP_CHOFF, 0, iptr:&CHAIN_OFFSET, defintval:0, TYPE_INT, 0}, \ {"d" , CONFIG_HLP_SOFTS, PARAMFLAG_BOOL, uptr:(uint32_t *)&do_forms, defintval:0, TYPE_INT8, 0}, \ {"q" , CONFIG_HLP_STMON, PARAMFLAG_BOOL, iptr:&opp_enabled, defintval:0, TYPE_INT, 0}, \ - {"numerology" , CONFIG_HLP_NUMEROLOGY, PARAMFLAG_BOOL, iptr:&NUMEROLOGY, defintval:0, TYPE_INT, 0}, \ + {"numerology" , CONFIG_HLP_NUMEROLOGY, PARAMFLAG_BOOL, iptr:&NUMEROLOGY, defintval:1, TYPE_INT, 0}, \ {"band" , CONFIG_HLP_BAND, PARAMFLAG_BOOL, iptr:&BAND, defintval:78, TYPE_INT, 0}, \ {"emulate-rf" , CONFIG_HLP_EMULATE_RF, PARAMFLAG_BOOL, iptr:&EMULATE_RF, defintval:0, TYPE_INT, 0}, \ {"parallel-config", CONFIG_HLP_PARALLEL_CMD, 0, strptr:(char **)¶llel_config, defstrval:NULL, TYPE_STRING, 0}, \ @@ -149,8 +149,8 @@ extern int usrp_tx_thread; {"nokrnmod", CONFIG_HLP_NOKRNMOD, PARAMFLAG_BOOL, uptr:&nokrnmod, defintval:0, TYPE_INT, 0}, \ {"nbiot-disable", CONFIG_HLP_DISABLNBIOT, PARAMFLAG_BOOL, uptr:&nonbiot, defuintval:0, TYPE_INT, 0}, \ {"use-256qam-table", CONFIG_HLP_256QAM, PARAMFLAG_BOOL, iptr:&USE_256QAM_TABLE, defintval:0, TYPE_INT, 0}, \ - {"usrp-tx-thread-config", CONFIG_HLP_USRP_THREAD, 0, iptr:&usrp_tx_thread, defstrval:0, TYPE_INT, 0}, \ - {"nfapi", CONFIG_HLP_NFAPI, 0, u8ptr:&nfapi_mode, defintval:0, TYPE_UINT8, 0}, \ + {"usrp-tx-thread-config", CONFIG_HLP_USRP_THREAD, 0, iptr:&usrp_tx_thread, defstrval:0, TYPE_INT, 0}, \ + {"nfapi", CONFIG_HLP_NFAPI, 0, u8ptr:&nfapi_mode, defintval:0, TYPE_UINT8, 0}, \ } From 64ce543b3afd82cea530eb70d07cc6b4af50798c Mon Sep 17 00:00:00 2001 From: rmagueta Date: Sat, 1 May 2021 14:45:31 +0100 Subject: [PATCH 291/579] Fix DRB warning for phy-test --- openair2/LAYER2/NR_MAC_gNB/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/main.c b/openair2/LAYER2/NR_MAC_gNB/main.c index 60b0cac215..23a5059355 100644 --- a/openair2/LAYER2/NR_MAC_gNB/main.c +++ b/openair2/LAYER2/NR_MAC_gNB/main.c @@ -96,7 +96,7 @@ void mac_top_init_gNB(void) // These should be out of here later pdcp_layer_init(); - if(IS_SOFTMODEM_NOS1 && !(get_softmodem_params()->do_ra || get_softmodem_params()->sa) ) + if(!(get_softmodem_params()->do_ra || get_softmodem_params()->sa) ) nr_DRB_preconfiguration(0x1234); rrc_init_nr_global_param(); From e924caa6777fe973b9141755125f61f9851d9c6e Mon Sep 17 00:00:00 2001 From: rmagueta Date: Sat, 1 May 2021 18:39:30 +0100 Subject: [PATCH 292/579] Fix phy-simulators --- openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c | 4 +-- openair1/SIMULATION/NR_PHY/dlsim.c | 33 ++++++++++++++++--------- openair1/SIMULATION/NR_PHY/prachsim.c | 13 ++++++++++ openair1/SIMULATION/NR_PHY/pucchsim.c | 9 ++++--- openair1/SIMULATION/NR_PHY/ulsim.c | 23 ++++++++++++----- openair2/LAYER2/NR_MAC_UE/config_ue.c | 2 +- openair2/RRC/NR/rrc_gNB_NGAP.c | 4 ++- 7 files changed, 62 insertions(+), 26 deletions(-) diff --git a/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c b/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c index 316c37741f..c7bf459f6f 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c @@ -59,11 +59,11 @@ void nr_generate_pucch0(PHY_VARS_NR_UE *ue, int16_t amp, int nr_slot_tx, uint8_t m0, - uint8_t mcs, + uint8_t mcs, uint8_t nrofSymbols, uint8_t startingSymbolIndex, uint16_t startingPRB, - uint16_t secondHopPRB) { + uint16_t secondHopPRB) { #ifdef DEBUG_NR_PUCCH_TX printf("\t [nr_generate_pucch0] start function at slot(nr_slot_tx)=%d\n",nr_slot_tx); #endif diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index f247860e00..29c7b70747 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -86,7 +86,7 @@ uint64_t downlink_frequency[MAX_NUM_CCs][4]; THREAD_STRUCT thread_struct; nfapi_ue_release_request_body_t release_rntis; msc_interface_t msc_interface; - +uint32_t N_RB_DL = 106; // dummy functions int dummy_nr_ue_ul_indication(nr_uplink_indication_t *ul_info) { return(0); } @@ -202,6 +202,17 @@ int is_x2ap_enabled(void) return 0; } +int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP, + int CC_idP, + int UE_id, + rnti_t rntiP, + const uint8_t *sduP, + sdu_size_t sdu_lenP, + const uint8_t *sdu2P, + sdu_size_t sdu2_lenP) { + return 0; +} + //nFAPI P7 dummy functions int oai_nfapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req) { return(0); } @@ -213,7 +224,7 @@ int oai_nfapi_ul_tti_req(nfapi_nr_ul_tti_request_t *ul_tti_req){ return(0); } openair0_config_t openair0_cfg[MAX_CARDS]; void update_ptrs_config(NR_CellGroupConfig_t *secondaryCellGroup, uint16_t *rbSize, uint8_t *mcsIndex,int8_t *ptrs_arg); void update_dmrs_config(NR_CellGroupConfig_t *scg,PHY_VARS_NR_UE *ue, int8_t* dmrs_arg); -extern void fix_scd(NR_ServingCellConfig_t *scd);// forward declaration +extern void fix_scd(NR_ServingCellConfig_t *scd);// forward declaration /* specific dlsim DL preprocessor: uses rbStart/rbSize/mcs from command line of dlsim, does not search for CCE/PUCCH occasion but simply sets to 0 */ @@ -224,22 +235,22 @@ void nr_dlsim_preprocessor(module_id_t module_id, NR_UE_info_t *UE_info = &RC.nrmac[module_id]->UE_info; AssertFatal(UE_info->num_UEs == 1, "can have only a single UE\n"); NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[0]; + NR_ServingCellConfigCommon_t *scc = RC.nrmac[0]->common_channels[0].ServingCellConfigCommon; /* manually set free CCE to 0 */ const int target_ss = NR_SearchSpace__searchSpaceType_PR_ue_Specific; - sched_ctrl->search_space = get_searchspace(sched_ctrl->active_bwp, target_ss); + sched_ctrl->search_space = get_searchspace(scc, sched_ctrl->active_bwp ? sched_ctrl->active_bwp->bwp_Dedicated : NULL, target_ss); uint8_t nr_of_candidates; find_aggregation_candidates(&sched_ctrl->aggregation_level, &nr_of_candidates, sched_ctrl->search_space); - sched_ctrl->coreset = get_coreset( - sched_ctrl->active_bwp, sched_ctrl->search_space, 1 /* dedicated */); + sched_ctrl->coreset = get_coreset(scc, sched_ctrl->active_bwp, sched_ctrl->search_space, target_ss); sched_ctrl->cce_index = 0; NR_pdsch_semi_static_t *ps = &sched_ctrl->pdsch_semi_static; - const NR_ServingCellConfigCommon_t *scc = RC.nrmac[0]->common_channels[0].ServingCellConfigCommon; + nr_set_pdsch_semi_static(scc, - UE_info->secondaryCellGroup[0], + UE_info->CellGroup[0], sched_ctrl->active_bwp, /* tda = */ 2, /* num_dmrs_cdm_grps_no_data = */ 1, @@ -349,8 +360,6 @@ int main(int argc, char **argv) NR_UE_MAC_INST_t *UE_mac; int cyclic_prefix_type = NFAPI_CP_NORMAL; int run_initial_sync=0; - int pusch_tgt_snrx10 = 200; - int pucch_tgt_snrx10 = 200; int loglvl=OAILOG_INFO; //float target_error_rate = 0.01; @@ -742,9 +751,9 @@ int main(int argc, char **argv) AssertFatal((gNB->if_inst = NR_IF_Module_init(0))!=NULL,"Cannot register interface"); gNB->if_inst->NR_PHY_config_req = nr_phy_config_request; // common configuration - rrc_mac_config_req_gNB(0,0,n_tx,1,pusch_tgt_snrx10,pucch_tgt_snrx10,scc,0,0,NULL); + rrc_mac_config_req_gNB(0,0, n_tx, n_tx, scc, 0, 0, NULL); // UE dedicated configuration - rrc_mac_config_req_gNB(0,0,n_tx,1,pusch_tgt_snrx10,pucch_tgt_snrx10,NULL,1,secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity,secondaryCellGroup); + rrc_mac_config_req_gNB(0,0, n_tx, n_tx, scc, 1, secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity,secondaryCellGroup); // reset preprocessor to the one of DLSIM after it has been set during // rrc_mac_config_req_gNB gNB_mac->pre_processor_dl = nr_dlsim_preprocessor; @@ -899,7 +908,7 @@ int main(int argc, char **argv) rrc.carrier.MIB = (uint8_t*) malloc(4); rrc.carrier.sizeof_MIB = do_MIB_NR(&rrc,0); - nr_rrc_mac_config_req_ue(0,0,0,rrc.carrier.mib.message.choice.mib,secondaryCellGroup); + nr_rrc_mac_config_req_ue(0,0,0,rrc.carrier.mib.message.choice.mib, rrc.carrier.sib1->servingCellConfigCommon, UE_info->CellGroup[0], secondaryCellGroup); nr_dcireq_t dcireq; diff --git a/openair1/SIMULATION/NR_PHY/prachsim.c b/openair1/SIMULATION/NR_PHY/prachsim.c index 26c1518188..5e15b4f39a 100644 --- a/openair1/SIMULATION/NR_PHY/prachsim.c +++ b/openair1/SIMULATION/NR_PHY/prachsim.c @@ -66,8 +66,10 @@ double cpuf; extern uint16_t prach_root_sequence_map0_3[838]; openair0_config_t openair0_cfg[MAX_CARDS]; //uint8_t nfapi_mode=0; +uint64_t downlink_frequency[MAX_NUM_CCs][4]; uint16_t sl_ahead = 0; msc_interface_t msc_interface; +uint32_t N_RB_DL = 106; //void dump_nr_prach_config(NR_DL_FRAME_PARMS *frame_parms,uint8_t subframe); @@ -174,6 +176,17 @@ int nr_derive_key(int alg_type, uint8_t alg_id, return 0; } +int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP, + int CC_idP, + int UE_id, + rnti_t rntiP, + const uint8_t *sduP, + sdu_size_t sdu_lenP, + const uint8_t *sdu2P, + sdu_size_t sdu2_lenP) { + return 0; +} + int main(int argc, char **argv){ char c; diff --git a/openair1/SIMULATION/NR_PHY/pucchsim.c b/openair1/SIMULATION/NR_PHY/pucchsim.c index 4cef1213c9..f65cb9eb81 100644 --- a/openair1/SIMULATION/NR_PHY/pucchsim.c +++ b/openair1/SIMULATION/NR_PHY/pucchsim.c @@ -91,6 +91,7 @@ int main(int argc, char **argv) //uint8_t nacktoack_flag=0; int16_t amp=0x7FFF; int nr_slot_tx=0; + int nr_frame_tx=0; uint64_t actual_payload=0,payload_received; int nr_bit=1; // maximum value possible is 2 uint8_t m0=0;// higher layer paramater initial cyclic shift @@ -501,13 +502,13 @@ int main(int argc, char **argv) for (trial=0; trialofdm_symbol_size*sizeof(int)); if(format==0){ - nr_generate_pucch0(UE,txdataF,frame_parms,PUCCH_GroupHopping,hopping_id,amp,nr_slot_tx,m0,mcs,nrofSymbols,startingSymbolIndex,startingPRB); + nr_generate_pucch0(UE,txdataF,frame_parms,PUCCH_GroupHopping,hopping_id,amp,nr_slot_tx,m0,mcs,nrofSymbols,startingSymbolIndex,startingPRB, 0); } else if (format == 1){ nr_generate_pucch1(UE,txdataF,frame_parms,UE->pucch_config_dedicated,actual_payload,amp,nr_slot_tx,m0,nrofSymbols,startingSymbolIndex,startingPRB,startingPRB_intraSlotHopping,0,nr_bit); } else { - nr_generate_pucch2(UE,0x1234,dmrs_scrambling_id,data_scrambling_id,txdataF,frame_parms,UE->pucch_config_dedicated,actual_payload,amp,nr_slot_tx,nrofSymbols,startingSymbolIndex,nrofPRB,startingPRB,nr_bit); + nr_generate_pucch2(UE,0x1234,dmrs_scrambling_id,data_scrambling_id,txdataF,frame_parms,UE->pucch_config_dedicated,actual_payload,amp,nr_slot_tx,nrofSymbols,startingSymbolIndex,nrofPRB,startingPRB,nr_bit); } int txlev = signal_energy(&txdataF[aa][startingSymbolIndex*frame_parms->ofdm_symbol_size], @@ -532,7 +533,7 @@ int main(int argc, char **argv) int rb2 = rb+startingPRB; gNB->rb_mask_ul[rb2>>5] |= (1<<(rb2&31)); } - gNB_I0_measurements(gNB); + gNB_I0_measurements(gNB, startingSymbolIndex, nrofSymbols); if (n_trials==1) printf("rxlev %d (%d dB), sigma2 %f dB, SNR %f, TX %f\n",rxlev,dB_fixed(rxlev),sigma2_dB,SNR,10*log10((double)txlev*UE->frame_parms.ofdm_symbol_size/12)); if(format==0){ @@ -550,7 +551,7 @@ int main(int argc, char **argv) pucch_pdu.initial_cyclic_shift = 0; pucch_pdu.start_symbol_index = startingSymbolIndex; pucch_pdu.prb_start = startingPRB; - nr_decode_pucch0(gNB,nr_slot_tx,&uci_pdu,&pucch_pdu); + nr_decode_pucch0(gNB, nr_frame_tx, nr_slot_tx,&uci_pdu,&pucch_pdu); if(sr_flag==1){ if (uci_pdu.sr->sr_indication == 0 || uci_pdu.sr->sr_confidence_level == 1) sr_errors+=1; diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c index 920994810d..54411976bf 100644 --- a/openair1/SIMULATION/NR_PHY/ulsim.c +++ b/openair1/SIMULATION/NR_PHY/ulsim.c @@ -84,6 +84,7 @@ uint64_t downlink_frequency[MAX_NUM_CCs][4]; THREAD_STRUCT thread_struct; nfapi_ue_release_request_body_t release_rntis; msc_interface_t msc_interface; +uint32_t N_RB_DL = 106; extern void fix_scd(NR_ServingCellConfig_t *scd);// forward declaration @@ -185,6 +186,17 @@ int8_t nr_mac_rrc_data_req_ue(const module_id_t Mod_idP, return 0; } +int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP, + int CC_idP, + int UE_id, + rnti_t rntiP, + const uint8_t *sduP, + sdu_size_t sdu_lenP, + const uint8_t *sdu2P, + sdu_size_t sdu2_lenP) { + return 0; +} + //nFAPI P7 dummy functions int oai_nfapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req) { return(0); } @@ -282,8 +294,6 @@ int main(int argc, char **argv) int file_offset = 0; double DS_TDL = .03; - int pusch_tgt_snrx10 = 200; - int pucch_tgt_snrx10 = 200; int ibwps=24; int ibwp_rboffset=41; int params_from_file = 0; @@ -680,9 +690,9 @@ int main(int argc, char **argv) gNB->if_inst->NR_PHY_config_req = nr_phy_config_request; // common configuration - rrc_mac_config_req_gNB(0,0,n_tx,n_rx,pusch_tgt_snrx10,pucch_tgt_snrx10,scc,0,0,NULL); + rrc_mac_config_req_gNB(0,0, n_tx, n_tx, scc, 0, 0, NULL); // UE dedicated configuration - rrc_mac_config_req_gNB(0,0,1,1,pusch_tgt_snrx10,pucch_tgt_snrx10,NULL,1,secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity,secondaryCellGroup); + rrc_mac_config_req_gNB(0,0, n_tx, n_tx, scc, 1, secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity,secondaryCellGroup); phy_init_nr_gNB(gNB,0,0); N_RB_DL = gNB->frame_parms.N_RB_DL; @@ -740,7 +750,7 @@ int main(int argc, char **argv) rrc.carrier.MIB = (uint8_t*) malloc(4); rrc.carrier.sizeof_MIB = do_MIB_NR(&rrc,0); - nr_rrc_mac_config_req_ue(0,0,0,rrc.carrier.mib.message.choice.mib,secondaryCellGroup); + nr_rrc_mac_config_req_ue(0,0,0,rrc.carrier.mib.message.choice.mib, rrc.carrier.sib1->servingCellConfigCommon, secondaryCellGroup, secondaryCellGroup); nr_ue_phy_config_request(&UE_mac->phy_config); @@ -1293,7 +1303,8 @@ int main(int argc, char **argv) (double)errors_scrambling[3]/available_bits/round_trials[0], roundStats[snrRun],effRate,effRate/TBS*100,TBS); - dump_pusch_stats(gNB); + FILE *fd=fopen("nr_ulsim.log","w"); + dump_pusch_stats(fd,gNB); printf("*****************************************\n"); printf("\n"); diff --git a/openair2/LAYER2/NR_MAC_UE/config_ue.c b/openair2/LAYER2/NR_MAC_UE/config_ue.c index 32226a4ea6..391fc1d1fb 100755 --- a/openair2/LAYER2/NR_MAC_UE/config_ue.c +++ b/openair2/LAYER2/NR_MAC_UE/config_ue.c @@ -725,7 +725,7 @@ int nr_rrc_mac_config_req_ue( ra->rach_ConfigDedicated = scell_group_config->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink; } mac->scc = scell_group_config->spCellConfig->reconfigurationWithSync->spCellConfigCommon; - mac->physCellId = *mac->scc->physCellId; + mac->physCellId = *mac->scc->physCellId; config_common_ue(mac,module_id,cc_idP); mac->crnti = scell_group_config->spCellConfig->reconfigurationWithSync->newUE_Identity; LOG_I(MAC,"Configuring CRNTI %x\n",mac->crnti); diff --git a/openair2/RRC/NR/rrc_gNB_NGAP.c b/openair2/RRC/NR/rrc_gNB_NGAP.c index 76fd777a78..dd59711584 100644 --- a/openair2/RRC/NR/rrc_gNB_NGAP.c +++ b/openair2/RRC/NR/rrc_gNB_NGAP.c @@ -304,10 +304,12 @@ nr_rrc_pdcp_config_security( uint8_t *kRRCenc = NULL; uint8_t *kRRCint = NULL; uint8_t *kUPenc = NULL; - uint8_t *k_kdf = NULL; static int print_keys= 1; #ifndef PHYSIM + + uint8_t *k_kdf = NULL; + /* Derive the keys from kgnb */ if (SRB_configList != NULL) { k_kdf = NULL; From 1d07f2559508d595f765a4a1dd32f42df71a3263 Mon Sep 17 00:00:00 2001 From: Remi Hardy Date: Mon, 3 May 2021 11:42:51 +0200 Subject: [PATCH 293/579] update ssPBCH_BlockPower in conf file for N310 --- ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpn310.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpn310.conf b/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpn310.conf index 809203f672..e6e0c5c0f8 100644 --- a/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpn310.conf +++ b/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpn310.conf @@ -188,7 +188,7 @@ gNBs = nrofUplinkSlots = 2; nrofUplinkSymbols = 4; //0; //4; - ssPBCH_BlockPower = -25; + ssPBCH_BlockPower = -15; } ); From 4ae5ac690c254a366ed08ccad144de9de2685818 Mon Sep 17 00:00:00 2001 From: hardy Date: Mon, 3 May 2021 13:19:35 +0200 Subject: [PATCH 294/579] missing parameter in InitializeUE --- ci-scripts/cls_oaicitest.py | 2 +- ci-scripts/main.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index 8674710ceb..7b75cf82c5 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -367,7 +367,7 @@ class OaiCiTest(): except: os.kill(os.getppid(),signal.SIGUSR1) - def InitializeUE(self,HTML,COTS_UE, InfraUE): + def InitializeUE(self,HTML,RAN,EPC, COTS_UE, InfraUE): if self.ue_id=='':#no ID specified, then it is a COTS controlled by ADB if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '': HELP.GenericHelp(CONST.Version) diff --git a/ci-scripts/main.py b/ci-scripts/main.py index 2396a73d92..47e1265985 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -711,7 +711,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re elif action == 'Terminate_eNB': RAN.TerminateeNB(HTML, EPC) elif action == 'Initialize_UE': - CiTestObj.InitializeUE(HTML,COTS_UE, InfraUE) + CiTestObj.InitializeUE(HTML,RAN, EPC, COTS_UE, InfraUE) elif action == 'Terminate_UE': CiTestObj.TerminateUE(HTML,COTS_UE) elif action == 'Attach_UE': From 158c0639d6aa3530edffd6471be131c5ac1e7087 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Mon, 3 May 2021 17:36:02 +0200 Subject: [PATCH 295/579] CI: fix pipeline Signed-off-by: Raphael Defosseux --- ci-scripts/Jenkinsfile-GitLab-Container | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-scripts/Jenkinsfile-GitLab-Container b/ci-scripts/Jenkinsfile-GitLab-Container index e2dc8eb63f..a4d7a4bf92 100644 --- a/ci-scripts/Jenkinsfile-GitLab-Container +++ b/ci-scripts/Jenkinsfile-GitLab-Container @@ -179,7 +179,7 @@ pipeline { stage ("Image Test Processes") { parallel { stage ("Physical Simulators") { - when { expression {doFlexranCtrlTest && doMandatoryTests} } + when { expression {doMandatoryTests} } steps { script { triggerSlaveJob ('RAN-PhySim-Cluster', 'Test-Physim-Cluster') From c2bf3aabf6bb55f49020a7e10f71480154504286 Mon Sep 17 00:00:00 2001 From: sfn Date: Fri, 30 Apr 2021 23:55:44 +0200 Subject: [PATCH 296/579] Support high cqi with 2 layers for mimo precoding PDSCH --- .../NR_UE_TRANSPORT/nr_dlsch_demodulation.c | 114 ++++++++++++------ 1 file changed, 75 insertions(+), 39 deletions(-) diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c index 92b2fbfca7..2d44aca767 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c @@ -111,7 +111,7 @@ uint8_t nr_zero_forcing_rx_2layers(int **rxdataF_comp, static void nr_dlsch_layer_demapping(int16_t **llr_cw, uint8_t Nl, uint8_t mod_order, - uint16_t length, + uint32_t length, int32_t codeword_TB0, int32_t codeword_TB1, int16_t **llr_layers); @@ -447,7 +447,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, //LOG_I(PHY, "avgs Power per SC is %d\n", avgs); median[(aatx*frame_parms->nb_antennas_rx)+aarx] = avg[(aatx*frame_parms->nb_antennas_rx)+aarx]; } - pdsch_vars[gNB_id]->log2_maxh = (log2_approx(avgs)/2)+3; + pdsch_vars[gNB_id]->log2_maxh = (log2_approx(avgs)/2) + 1; //LOG_I(PHY, "avgs Power per SC is %d lg2_maxh %d\n", avgs, pdsch_vars[gNB_id]->log2_maxh); if (dlsch0_harq->mimo_mode == NR_DUALSTREAM) { @@ -650,7 +650,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, /* at last symbol in a slot calculate LLR's for whole slot */ if(symbol == (startSymbIdx + nbSymb -1)) { - for(uint8_t i =startSymbIdx; i <= nbSymb;i++) { + for(uint8_t i =startSymbIdx; i < (startSymbIdx+nbSymb);i++) { /* re evaluating the first symbol flag as LLR's are done in symbol loop */ if(i == startSymbIdx && i < 3) { first_symbol_flag =1; @@ -815,7 +815,6 @@ void nr_dlsch_channel_compensation(int **rxdataF_ext, unsigned char aatx,aarx,atx; __m128i *dl_ch128,*dl_ch128_2,*dl_ch_mag128,*dl_ch_mag128b,*dl_ch_mag128r,*rxdataF128,*rxdataF_comp128,*rho128; __m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128,QAM_amp128b,QAM_amp128r; - QAM_amp128b = _mm_setzero_si128(); uint32_t nb_rb_0 = length/12 + ((length%12)?1:0); for (aatx=0; aatx2) { + if (mod_order == 4) { + QAM_amp128 = _mm_set1_epi16(QAM16_n1); //2/sqrt(10) + QAM_amp128b = _mm_setzero_si128(); + QAM_amp128r = _mm_setzero_si128(); + } else if (mod_order == 6) { + QAM_amp128 = _mm_set1_epi16(QAM64_n1); //4/sqrt{42} + QAM_amp128b = _mm_set1_epi16(QAM64_n2); //2/sqrt{42} + QAM_amp128r = _mm_setzero_si128(); + } else if (mod_order == 8) { + QAM_amp128 = _mm_set1_epi16(QAM256_n1); //8/sqrt{170} + QAM_amp128b = _mm_set1_epi16(QAM256_n2);//4/sqrt{170} + QAM_amp128r = _mm_set1_epi16(QAM256_n3);//2/sqrt{170} + } + dl_ch_mag128_0 = (__m128i *)&dl_ch_mag[0][symbol*nb_rb*12]; + dl_ch_mag128b_0 = (__m128i *)&dl_ch_magb[0][symbol*nb_rb*12]; + dl_ch_mag128r_0 = (__m128i *)&dl_ch_magr[0][symbol*nb_rb*12]; + } + for (int rb=0; rb<3*nb_rb_0; rb++) { if (mod_order>2) { - //The update value of dl_ch_mag128, dl_ch_mag128b, and dl_ch_mag128r shall go here - //printf("\n Signal mag after ZF \n"); + int sum_det =0; + for (int k=0; k<4;k++) { + sum_det += ((((int *)&determ_fin_128[0])[k])>>2); + //printf("det_%d = %d\n",k,sum_det); + } + + mmtmpD2 = _mm_slli_epi32(determ_fin_128[0],5); + mmtmpD2 = _mm_srai_epi32(mmtmpD2,log2_approx(sum_det)); + mmtmpD2 = _mm_slli_epi32(mmtmpD2,5); + + mmtmpD3 = _mm_unpacklo_epi32(mmtmpD2,mmtmpD2); + + mmtmpD2 = _mm_unpackhi_epi32(mmtmpD2,mmtmpD2); + + mmtmpD2 = _mm_packs_epi32(mmtmpD3,mmtmpD2); + + dl_ch_mag128_0[0] = mmtmpD2; + dl_ch_mag128b_0[0] = mmtmpD2; + dl_ch_mag128r_0[0] = mmtmpD2; + + dl_ch_mag128_0[0] = _mm_mulhi_epi16(dl_ch_mag128_0[0],QAM_amp128); + dl_ch_mag128_0[0] = _mm_slli_epi16(dl_ch_mag128_0[0],1); + + dl_ch_mag128b_0[0] = _mm_mulhi_epi16(dl_ch_mag128b_0[0],QAM_amp128b); + dl_ch_mag128b_0[0] = _mm_slli_epi16(dl_ch_mag128b_0[0],1); + + dl_ch_mag128r_0[0] = _mm_mulhi_epi16(dl_ch_mag128r_0[0],QAM_amp128r); + dl_ch_mag128r_0[0] = _mm_slli_epi16(dl_ch_mag128r_0[0],1); + //print_shorts("mag layer 1:",(int16_t*)&dl_ch_mag128_0[0]); //print_shorts("mag layer 2:",(int16_t*)&dl_ch_mag128_1[0]); //print_shorts("magb layer 1:",(int16_t*)&dl_ch_mag128b_0[0]); @@ -2941,9 +2980,6 @@ uint8_t nr_zero_forcing_rx_2layers(int **rxdataF_comp, dl_ch_mag128_0 += 1; dl_ch_mag128b_0 += 1; dl_ch_mag128r_0 += 1; - dl_ch_mag128_1 += 1; - dl_ch_mag128b_1 += 1; - dl_ch_mag128r_1 += 1; rxdataF_comp128_0 += 1; rxdataF_comp128_1 += 1; after_mf_a_128 += 1; @@ -2959,7 +2995,7 @@ uint8_t nr_zero_forcing_rx_2layers(int **rxdataF_comp, static void nr_dlsch_layer_demapping(int16_t **llr_cw, uint8_t Nl, uint8_t mod_order, - uint16_t length, + uint32_t length, int32_t codeword_TB0, int32_t codeword_TB1, int16_t **llr_layers) { @@ -3097,7 +3133,7 @@ static int nr_dlsch_llr(NR_UE_PDSCH **pdsch_vars, nr_dlsch_16qam_llr(frame_parms, pdsch_vars[gNB_id]->rxdataF_comp0[l*frame_parms->nb_antennas_rx], pdsch_vars[gNB_id]->layer_llr[l]+llr_offset_symbol, - pdsch_vars[gNB_id]->dl_ch_mag0[l*frame_parms->nb_antennas_rx], + pdsch_vars[gNB_id]->dl_ch_mag0[0], symbol, len, first_symbol_flag, @@ -3119,8 +3155,8 @@ static int nr_dlsch_llr(NR_UE_PDSCH **pdsch_vars, nr_dlsch_64qam_llr(frame_parms, pdsch_vars[gNB_id]->rxdataF_comp0[l*frame_parms->nb_antennas_rx], pdsch_vars[gNB_id]->layer_llr[l]+llr_offset_symbol, - pdsch_vars[gNB_id]->dl_ch_mag0[l*frame_parms->nb_antennas_rx], - pdsch_vars[gNB_id]->dl_ch_magb0[l*frame_parms->nb_antennas_rx], + pdsch_vars[gNB_id]->dl_ch_mag0[0], + pdsch_vars[gNB_id]->dl_ch_magb0[0], symbol, len, first_symbol_flag, @@ -3143,9 +3179,9 @@ static int nr_dlsch_llr(NR_UE_PDSCH **pdsch_vars, nr_dlsch_256qam_llr(frame_parms, pdsch_vars[gNB_id]->rxdataF_comp0[l*frame_parms->nb_antennas_rx], pdsch_vars[gNB_id]->layer_llr[l]+llr_offset_symbol, - pdsch_vars[gNB_id]->dl_ch_mag0[l*frame_parms->nb_antennas_rx], - pdsch_vars[gNB_id]->dl_ch_magb0[l*frame_parms->nb_antennas_rx], - pdsch_vars[gNB_id]->dl_ch_magr0[l*frame_parms->nb_antennas_rx], + pdsch_vars[gNB_id]->dl_ch_mag0[0], + pdsch_vars[gNB_id]->dl_ch_magb0[0], + pdsch_vars[gNB_id]->dl_ch_magr0[0], symbol, len, first_symbol_flag, From 221cd2a3a2309f171620861dfac8392ab89ee104 Mon Sep 17 00:00:00 2001 From: Thomas Schlichter Date: Mon, 3 May 2021 17:43:38 +0200 Subject: [PATCH 297/579] gNB: fix memory allocation for multiple layers in new_gNB_dlsch() --- openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c | 13 +++++++------ openair1/PHY/defs_nr_common.h | 8 ++++---- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c b/openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c index b441635246..eb4af15f61 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c +++ b/openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c @@ -191,14 +191,15 @@ NR_gNB_DLSCH_t *new_gNB_dlsch(NR_DL_FRAME_PARMS *frame_parms, AssertFatal(harq->d[r], "cannot allocate harq->d[%d]\n", r); // max size for coded output bzero(harq->c[r], 8448); bzero(harq->d[r], (3 * 8448)); - harq->e = malloc16(14 * N_RB * 12 * 8); - AssertFatal(harq->e, "cannot allocate harq->e\n"); - bzero(harq->e, 14 * N_RB * 12 * 8); - harq->f = malloc16(14 * N_RB * 12 * 8); - AssertFatal(harq->f, "cannot allocate harq->f\n"); - bzero(harq->f, 14 * N_RB * 12 * 8); } + harq->e = malloc16(N_RB * NR_SYMBOLS_PER_SLOT * NR_NB_SC_PER_RB * 8 * NR_MAX_NB_LAYERS); + AssertFatal(harq->e, "cannot allocate harq->e\n"); + bzero(harq->e, N_RB * NR_SYMBOLS_PER_SLOT * NR_NB_SC_PER_RB * 8 * NR_MAX_NB_LAYERS); + harq->f = malloc16(N_RB * NR_SYMBOLS_PER_SLOT * NR_NB_SC_PER_RB * 8 * NR_MAX_NB_LAYERS); + AssertFatal(harq->f, "cannot allocate harq->f\n"); + bzero(harq->f, N_RB * NR_SYMBOLS_PER_SLOT * NR_NB_SC_PER_RB * 8 * NR_MAX_NB_LAYERS); + return(dlsch); } diff --git a/openair1/PHY/defs_nr_common.h b/openair1/PHY/defs_nr_common.h index 398252c37b..8b3b920c48 100644 --- a/openair1/PHY/defs_nr_common.h +++ b/openair1/PHY/defs_nr_common.h @@ -93,18 +93,18 @@ #define NR_MAX_CSET_DURATION 3 #define NR_MAX_NB_RBG 18 -#define NR_MAX_NB_LAYERS 8 // SU-MIMO (3GPP TS 38.211 V15.4.0 section 7.3.1.3) +#define NR_MAX_NB_LAYERS 2 // 8 // SU-MIMO (3GPP TS 38.211 V15.4.0 section 7.3.1.3) #define NR_MAX_NB_CODEWORDS 2 #define NR_MAX_NB_HARQ_PROCESSES 16 -#define NR_MAX_PDSCH_ENCODED_LENGTH NR_MAX_NB_RB*NR_SYMBOLS_PER_SLOT*NR_NB_SC_PER_RB*8*NR_MAX_NB_LAYERS // 8 is the maximum modulation order (it was 950984 before !!) +#define NR_MAX_PDSCH_ENCODED_LENGTH (NR_MAX_NB_RB*NR_SYMBOLS_PER_SLOT*NR_NB_SC_PER_RB*8*NR_MAX_NB_LAYERS) // 8 is the maximum modulation order (it was 950984 before !!) #define NR_MAX_PUSCH_ENCODED_LENGTH NR_MAX_PDSCH_ENCODED_LENGTH #define NR_MAX_PDSCH_TBS 3824 #define NR_MAX_SIB_LENGTH 2976 // 3GPP TS 38.331 section 5.2.1 - The physical layer imposes a limit to the maximum size a SIB can take. The maximum SIB1 or SI message size is 2976 bits. -#define MAX_NUM_NR_DLSCH_SEGMENTS 34 +#define MAX_NUM_NR_DLSCH_SEGMENTS (NR_MAX_NB_LAYERS*34) #define MAX_NR_DLSCH_PAYLOAD_BYTES (MAX_NUM_NR_DLSCH_SEGMENTS*1056) -#define MAX_NUM_NR_ULSCH_SEGMENTS MAX_NUM_NR_DLSCH_SEGMENTS +#define MAX_NUM_NR_ULSCH_SEGMENTS 34 #define MAX_NR_ULSCH_PAYLOAD_BYTES (MAX_NUM_NR_ULSCH_SEGMENTS*1056) #define MAX_NUM_NR_CHANNEL_BITS (14*273*12*8) // 14 symbols, 273 RB From ad10ef0dfede70fe996ec8a97c41bc1fdd378028 Mon Sep 17 00:00:00 2001 From: francescomani Date: Mon, 3 May 2021 17:59:08 +0200 Subject: [PATCH 298/579] to remove unused PUCCH resources and extend PUSCH tda allocation to 13 symbols --- ci-scripts/conf_files/benetel-5g.conf | 2 +- .../gnb.band261.tm1.32PRB.usrpn300.conf | 2 +- .../gnb.band66.tm1.106PRB.usrpn300.conf | 2 +- .../gnb.band78.tm1.106PRB.usrpn300.conf | 2 +- .../gnb.band78.tm1.fr1.106PRB.usrpb210.conf | 2 +- .../gnb.band78.tm1.fr1.106PRB.usrpn310.conf | 2 +- openair2/RRC/NR/rrc_gNB_reconfig.c | 35 +-- .../GENERIC-LTE-EPC/CONF/benetel-5g.conf | 2 +- .../gnb.band22.tm1.106PRB.adrv9371zc706.conf | 289 ------------------ .../CONF/gnb.band257.tm1.32PRB.usrpn300.conf | 3 +- .../CONF/gnb.band257.tm1.32PRB.usrpx300.conf | 2 +- .../CONF/gnb.band257.tm1.66PRB.usrpn300.conf | 2 +- .../CONF/gnb.band261.tm1.32PRB.usrpn300.conf | 2 +- .../CONF/gnb.band66.tm1.106PRB.usrpn300.conf | 2 +- .../CONF/gnb.band66.tm1.106PRB.usrpx300.conf | 2 +- .../gnb.band78.106PRB.30kHz,usrpb2x0.conf | 2 +- .../CONF/gnb.band78.106PRB.slave.conf | 2 +- .../CONF/gnb.band78.slave.conf | 2 +- .../gnb.band78.tm1.106PRB.PTRS.usrpx300.conf | 3 +- .../gnb.band78.tm1.106PRB.adrv9371zc706.conf | 288 ----------------- .../CONF/gnb.band78.tm1.106PRB.usrpb210.conf | 2 +- .../CONF/gnb.band78.tm1.106PRB.usrpn300.conf | 2 +- .../CONF/gnb.band78.tm1.106PRB.usrpx300.conf | 4 +- .../CONF/gnb.band78.tm1.217PRB.usrpn300.conf | 2 +- .../CONF/gnb.band78.tm1.217PRB.usrpx300.conf | 2 +- .../CONF/gnb.band78.tm1.24PRB.usrpb210.conf | 5 +- .../CONF/gnb.band78.tm1.24PRB.usrpn300.conf | 5 +- .../CONF/gnb.band78.tm1.24PRB.usrpx300.conf | 5 +- .../CONF/gnb.band78.tm1.273PRB.usrpn300.conf | 2 +- .../GENERIC-LTE-EPC/CONF/testing_gnb.conf | 2 +- .../CONF/testing_gnb_24PRB.conf | 4 +- .../CONF/testing_gnb_n310.conf | 2 +- .../gnb.sa.band41.fr1.106PRB.usrpb210.conf | 2 +- .../gnb.sa.band78.fr1.106PRB.usrpb210.conf | 2 +- 34 files changed, 37 insertions(+), 652 deletions(-) delete mode 100644 targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band22.tm1.106PRB.adrv9371zc706.conf delete mode 100644 targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.adrv9371zc706.conf diff --git a/ci-scripts/conf_files/benetel-5g.conf b/ci-scripts/conf_files/benetel-5g.conf index 9adead3a68..5cf0eca629 100644 --- a/ci-scripts/conf_files/benetel-5g.conf +++ b/ci-scripts/conf_files/benetel-5g.conf @@ -126,7 +126,7 @@ gNBs = # pusch-ConfigCommon (up to 16 elements) initialULBWPk2_0 = 2; # used for UL slot initialULBWPmappingType_0 = 1 - initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 + initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13 initialULBWPk2_1 = 2; # used for mixed slot initialULBWPmappingType_1 = 1; diff --git a/ci-scripts/conf_files/gnb.band261.tm1.32PRB.usrpn300.conf b/ci-scripts/conf_files/gnb.band261.tm1.32PRB.usrpn300.conf index f0c1caef7e..9dea0e50d6 100644 --- a/ci-scripts/conf_files/gnb.band261.tm1.32PRB.usrpn300.conf +++ b/ci-scripts/conf_files/gnb.band261.tm1.32PRB.usrpn300.conf @@ -123,7 +123,7 @@ gNBs = initialULBWPk2_0 = 6; initialULBWPmappingType_0 = 1 # this is SS=0 L=11 - initialULBWPstartSymbolAndLength_0 = 55; + initialULBWPstartSymbolAndLength_0 = 41; initialULBWPk2_1 = 6; initialULBWPmappingType_1 = 1; diff --git a/ci-scripts/conf_files/gnb.band66.tm1.106PRB.usrpn300.conf b/ci-scripts/conf_files/gnb.band66.tm1.106PRB.usrpn300.conf index 6d08dfb5c1..1209a6f227 100644 --- a/ci-scripts/conf_files/gnb.band66.tm1.106PRB.usrpn300.conf +++ b/ci-scripts/conf_files/gnb.band66.tm1.106PRB.usrpn300.conf @@ -121,7 +121,7 @@ gNBs = # pusch-ConfigCommon (up to 16 elements) initialULBWPk2_0 = 6; # used for UL slot initialULBWPmappingType_0 = 1 - initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 + initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13 initialULBWPk2_1 = 6; # used for mixed slot initialULBWPmappingType_1 = 1; diff --git a/ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf b/ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf index 43e4c6b493..c80879ae53 100644 --- a/ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf +++ b/ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf @@ -120,7 +120,7 @@ gNBs = # pusch-ConfigCommon (up to 16 elements) initialULBWPk2_0 = 6; # used for UL slot initialULBWPmappingType_0 = 1 - initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 + initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13 initialULBWPk2_1 = 6; # used for mixed slot initialULBWPmappingType_1 = 1; diff --git a/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf b/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf index 846623e0c1..f0d5130f83 100644 --- a/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf +++ b/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf @@ -122,7 +122,7 @@ gNBs = # pusch-ConfigCommon (up to 16 elements) initialULBWPk2_0 = 2; # used for UL slot initialULBWPmappingType_0 = 1 - initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 + initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13 initialULBWPk2_1 = 2; # used for mixed slot initialULBWPmappingType_1 = 1; diff --git a/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpn310.conf b/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpn310.conf index 809203f672..2ae97ef298 100644 --- a/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpn310.conf +++ b/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpn310.conf @@ -136,7 +136,7 @@ gNBs = initialULBWPk2_0 = 2; initialULBWPmappingType_0 = 1 # this is SS=0 L=11 - initialULBWPstartSymbolAndLength_0 = 55; + initialULBWPstartSymbolAndLength_0 = 41; initialULBWPk2_1 = 2; initialULBWPmappingType_1 = 1; diff --git a/openair2/RRC/NR/rrc_gNB_reconfig.c b/openair2/RRC/NR/rrc_gNB_reconfig.c index cd5ded9714..2cad926020 100644 --- a/openair2/RRC/NR/rrc_gNB_reconfig.c +++ b/openair2/RRC/NR/rrc_gNB_reconfig.c @@ -949,22 +949,16 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco NR_PUCCH_ResourceSet_t *pucchresset1=calloc(1,sizeof(*pucchresset1)); pucchresset0->pucch_ResourceSetId = 0; NR_PUCCH_ResourceId_t *pucchresset0id0=calloc(1,sizeof(*pucchresset0id0)); - NR_PUCCH_ResourceId_t *pucchresset0id1=calloc(1,sizeof(*pucchresset0id1)); *pucchresset0id0=1; ASN_SEQUENCE_ADD(&pucchresset0->resourceList.list,pucchresset0id0); - *pucchresset0id1=2; - ASN_SEQUENCE_ADD(&pucchresset0->resourceList.list,pucchresset0id1); pucchresset0->maxPayloadSize=NULL; ASN_SEQUENCE_ADD(&pucch_Config->resourceSetToAddModList->list,pucchresset0); pucchresset1->pucch_ResourceSetId = 1; NR_PUCCH_ResourceId_t *pucchresset1id0=calloc(1,sizeof(*pucchresset1id0)); - NR_PUCCH_ResourceId_t *pucchresset1id1=calloc(1,sizeof(*pucchresset1id1)); - *pucchresset1id0=3; + *pucchresset1id0=2; ASN_SEQUENCE_ADD(&pucchresset1->resourceList.list,pucchresset1id0); - *pucchresset1id1=4; - ASN_SEQUENCE_ADD(&pucchresset1->resourceList.list,pucchresset1id1); pucchresset1->maxPayloadSize=NULL; ASN_SEQUENCE_ADD(&pucch_Config->resourceSetToAddModList->list,pucchresset1); @@ -974,6 +968,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco NR_PUCCH_Resource_t *pucchres1=calloc(1,sizeof(*pucchres1)); NR_PUCCH_Resource_t *pucchres2=calloc(1,sizeof(*pucchres2)); NR_PUCCH_Resource_t *pucchres3=calloc(1,sizeof(*pucchres3)); + pucchres0->pucch_ResourceId=1; pucchres0->startingPRB=8; pucchres0->intraSlotFrequencyHopping=NULL; @@ -985,18 +980,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco pucchres0->format.choice.format0->startingSymbolIndex=13; ASN_SEQUENCE_ADD(&pucch_Config->resourceToAddModList->list,pucchres0); - pucchres1->pucch_ResourceId=2; - pucchres1->startingPRB=8; - pucchres1->intraSlotFrequencyHopping=NULL; - pucchres1->secondHopPRB=NULL; - pucchres1->format.present= NR_PUCCH_Resource__format_PR_format0; - pucchres1->format.choice.format0=calloc(1,sizeof(*pucchres1->format.choice.format0)); - pucchres1->format.choice.format0->initialCyclicShift=0; - pucchres1->format.choice.format0->nrofSymbols=1; - pucchres1->format.choice.format0->startingSymbolIndex=12; - ASN_SEQUENCE_ADD(&pucch_Config->resourceToAddModList->list,pucchres1); - - pucchres2->pucch_ResourceId=3; + pucchres2->pucch_ResourceId=2; pucchres2->startingPRB=0; pucchres2->intraSlotFrequencyHopping=NULL; pucchres2->secondHopPRB=NULL; @@ -1007,17 +991,6 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco pucchres2->format.choice.format2->startingSymbolIndex=13; ASN_SEQUENCE_ADD(&pucch_Config->resourceToAddModList->list,pucchres2); - pucchres3->pucch_ResourceId=4; - pucchres3->startingPRB=0; - pucchres3->intraSlotFrequencyHopping=NULL; - pucchres3->secondHopPRB=NULL; - pucchres3->format.present= NR_PUCCH_Resource__format_PR_format2; - pucchres3->format.choice.format2=calloc(1,sizeof(*pucchres3->format.choice.format2)); - pucchres3->format.choice.format2->nrofPRBs=8; - pucchres3->format.choice.format2->nrofSymbols=1; - pucchres3->format.choice.format2->startingSymbolIndex=12; - ASN_SEQUENCE_ADD(&pucch_Config->resourceToAddModList->list,pucchres3); - pucch_Config->format2=calloc(1,sizeof(*pucch_Config->format2)); pucch_Config->format2->present=NR_SetupRelease_PUCCH_FormatConfig_PR_setup; NR_PUCCH_FormatConfig_t *pucchfmt2 = calloc(1,sizeof(*pucchfmt2)); @@ -1180,7 +1153,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco csirep1->reportConfigType.choice.periodic->reportSlotConfig.choice.slots320 = 49; NR_PUCCH_CSI_Resource_t *pucchcsires1 = calloc(1,sizeof(*pucchcsires1)); pucchcsires1->uplinkBandwidthPartId=1; - pucchcsires1->pucch_Resource=3; + pucchcsires1->pucch_Resource=2; ASN_SEQUENCE_ADD(&csirep1->reportConfigType.choice.periodic->pucch_CSI_ResourceList.list,pucchcsires1); csirep1->reportQuantity.present = NR_CSI_ReportConfig__reportQuantity_PR_ssb_Index_RSRP; csirep1->reportQuantity.choice.ssb_Index_RSRP=(NULL_t)0; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-5g.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-5g.conf index 4147ec6ae2..cc44ffd27b 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-5g.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/benetel-5g.conf @@ -127,7 +127,7 @@ gNBs = # pusch-ConfigCommon (up to 16 elements) initialULBWPk2_0 = 2; # used for UL slot initialULBWPmappingType_0 = 1 - initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 + initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13 initialULBWPk2_1 = 2; # used for mixed slot initialULBWPmappingType_1 = 1; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band22.tm1.106PRB.adrv9371zc706.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band22.tm1.106PRB.adrv9371zc706.conf deleted file mode 100644 index 5fd4b465b3..0000000000 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band22.tm1.106PRB.adrv9371zc706.conf +++ /dev/null @@ -1,289 +0,0 @@ -Active_gNBs = ( "gNB-Eurecom-5GNRBox"); -# Asn1_verbosity, choice in: none, info, annoying -Asn1_verbosity = "none"; - -gNBs = -( - { - ////////// Identification parameters: - gNB_ID = 0xe00; - - cell_type = "CELL_MACRO_GNB"; - - gNB_name = "gNB-Eurecom-5GNRBox"; - - // Tracking area code, 0x0000 and 0xfffe are reserved values - tracking_area_code = 1; - - plmn_list = ({mcc = 208; mnc = 93; mnc_length = 2;}); - - tr_s_preference = "local_mac" - - ////////// 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 = 106; - 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 : - { - # timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500] - timer_poll_retransmit = 80; - - # timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200] - timer_reordering = 35; - - # timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500] - timer_status_prohibit = 0; - - # poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)] - poll_pdu = 4; - - # poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)] - poll_byte = 99999; - - # max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32] - max_retx_threshold = 4; - } - - # ------- SCTP definitions - SCTP : - { - # Number of streams to use in input/output - SCTP_INSTREAMS = 2; - SCTP_OUTSTREAMS = 2; - }; - - - ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.26"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); - - NETWORK_INTERFACES : - { - - GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; - GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24"; - GNB_INTERFACE_NAME_FOR_S1U = "eth0"; - GNB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24"; - GNB_PORT_FOR_S1U = 2152; # Spec 2152 - }; - } -); - -MACRLCs = ( - { - num_cc = 1; - tr_s_preference = "local_L1"; - tr_n_preference = "local_RRC"; - } -); - -L1s = ( - { - num_cc = 1; - tr_n_preference = "local_mac"; - } -); - -RUs = ( - { - local_rf = "yes" - nb_tx = 1 - nb_rx = 1 - att_tx = 0 - att_rx = 0; - bands = [7]; - max_pdschReferenceSignalPower = -27; - max_rxgain = 114; - eNB_instances = [0]; - sdr_addrs = "addr=192.168.10.2,second_addr=192.168.20.2,mgmt_addr=192.168.100.8"; - - } -); - -NETWORK_CONTROLLER : -{ - FLEXRAN_ENABLED = "no"; - FLEXRAN_INTERFACE_NAME = "lo"; - FLEXRAN_IPV4_ADDRESS = "127.0.0.1"; - FLEXRAN_PORT = 2210; - FLEXRAN_CACHE = "/mnt/oai_agent_cache"; - FLEXRAN_AWAIT_RECONF = "no"; -}; - - log_config : - { - global_log_level ="info"; - global_log_verbosity ="medium"; - hw_log_level ="info"; - hw_log_verbosity ="medium"; - phy_log_level ="info"; - phy_log_verbosity ="medium"; - mac_log_level ="info"; - mac_log_verbosity ="high"; - rlc_log_level ="info"; - rlc_log_verbosity ="medium"; - pdcp_log_level ="info"; - pdcp_log_verbosity ="medium"; - rrc_log_level ="info"; - rrc_log_verbosity ="medium"; - }; - diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpn300.conf index e21cccf231..e0b721bf5e 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpn300.conf @@ -122,8 +122,7 @@ gNBs = # pusch-ConfigCommon (up to 16 elements) initialULBWPk2_0 = 6; initialULBWPmappingType_0 = 1 - # this is SS=0 L=11 - initialULBWPstartSymbolAndLength_0 = 55; + initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13 initialULBWPk2_1 = 6; initialULBWPmappingType_1 = 1; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpx300.conf index 6e56c87dde..bf581f78ba 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.32PRB.usrpx300.conf @@ -122,7 +122,7 @@ gNBs = # pusch-ConfigCommon (up to 16 elements) initialULBWPk2_0 = 6; # used for UL slot initialULBWPmappingType_0 = 1 - initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 + initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13 initialULBWPk2_1 = 6; # used for mixed slot initialULBWPmappingType_1 = 1; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.66PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.66PRB.usrpn300.conf index adb392328f..e018aef006 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.66PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band257.tm1.66PRB.usrpn300.conf @@ -120,7 +120,7 @@ gNBs = # pusch-ConfigCommon (up to 16 elements) initialULBWPk2_0 = 2; # used for UL slot initialULBWPmappingType_0 = 1 - initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 + initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13 initialULBWPk2_1 = 2; # used for mixed slot (not used here) initialULBWPmappingType_1 = 1; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band261.tm1.32PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band261.tm1.32PRB.usrpn300.conf index 07e236104f..a2233b72bc 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band261.tm1.32PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band261.tm1.32PRB.usrpn300.conf @@ -122,7 +122,7 @@ gNBs = # pusch-ConfigCommon (up to 16 elements) initialULBWPk2_0 = 6; # used for UL slot initialULBWPmappingType_0 = 1 - initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 + initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13 initialULBWPk2_1 = 6; # used for mixed slot initialULBWPmappingType_1 = 1; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpn300.conf index 95c02ffbe8..2028f40552 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpn300.conf @@ -121,7 +121,7 @@ gNBs = # pusch-ConfigCommon (up to 16 elements) initialULBWPk2_0 = 6; # used for UL slot initialULBWPmappingType_0 = 1 - initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 + initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13 initialULBWPk2_1 = 6; # used for mixed slot initialULBWPmappingType_1 = 1; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpx300.conf index a6e9aecaf3..35c4924ba1 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpx300.conf @@ -121,7 +121,7 @@ gNBs = # pusch-ConfigCommon (up to 16 elements) initialULBWPk2_0 = 6; # used for UL slot initialULBWPmappingType_0 = 1 - initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 + initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13 initialULBWPk2_1 = 6; # used for mixed slot initialULBWPmappingType_1 = 1; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.30kHz,usrpb2x0.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.30kHz,usrpb2x0.conf index b45d7c2f61..f90adae46b 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.30kHz,usrpb2x0.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.30kHz,usrpb2x0.conf @@ -120,7 +120,7 @@ gNBs = # pusch-ConfigCommon (up to 16 elements) initialULBWPk2_0 = 2; # used for UL slot initialULBWPmappingType_0 = 1 - initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 + initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13 initialULBWPk2_1 = 2; # used for mixed slot initialULBWPmappingType_1 = 1; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.slave.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.slave.conf index 9f76f7c71a..aa61153c93 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.slave.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.106PRB.slave.conf @@ -120,7 +120,7 @@ gNBs = # pusch-ConfigCommon (up to 16 elements) initialULBWPk2_0 = 2; # used for UL slot initialULBWPmappingType_0 = 1 - initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 + initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13 initialULBWPk2_1 = 2; # used for mixed slot initialULBWPmappingType_1 = 1; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.slave.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.slave.conf index c79133e956..a0ee7f8a6d 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.slave.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.slave.conf @@ -120,7 +120,7 @@ gNBs = # pusch-ConfigCommon (up to 16 elements) initialULBWPk2_0 = 2; # used for UL slot initialULBWPmappingType_0 = 1 - initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 + initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13 initialULBWPk2_1 = 2; # used for mixed slot initialULBWPmappingType_1 = 1; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.PTRS.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.PTRS.usrpx300.conf index ad99b4ce32..d08234ab16 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.PTRS.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.PTRS.usrpx300.conf @@ -120,8 +120,7 @@ gNBs = # pusch-ConfigCommon (up to 16 elements) initialULBWPk2_0 = 6; initialULBWPmappingType_0 = 1 - # this is SS=0 L=11 - initialULBWPstartSymbolAndLength_0 = 55; + initialULBWPstartSymbolAndLength_0 = 41; initialULBWPk2_1 = 6; initialULBWPmappingType_1 = 1; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.adrv9371zc706.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.adrv9371zc706.conf deleted file mode 100644 index 5610694d7d..0000000000 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.adrv9371zc706.conf +++ /dev/null @@ -1,288 +0,0 @@ -Active_gNBs = ( "gNB-Eurecom-5GNRBox"); -# Asn1_verbosity, choice in: none, info, annoying -Asn1_verbosity = "none"; - -gNBs = -( - { - ////////// Identification parameters: - gNB_ID = 0xe00; - - cell_type = "CELL_MACRO_GNB"; - - gNB_name = "gNB-Eurecom-5GNRBox"; - - // Tracking area code, 0x0000 and 0xfffe are reserved values - tracking_area_code = 1; - - plmn_list = ({mcc = 208; mnc = 93; mnc_length = 2;}); - - tr_s_preference = "local_mac" - - ////////// 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 = 0; - Nid_cell = 0; - N_RB_DL = 106; - 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 : - { - # timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500] - timer_poll_retransmit = 80; - - # timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200] - timer_reordering = 35; - - # timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500] - timer_status_prohibit = 0; - - # poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)] - poll_pdu = 4; - - # poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)] - poll_byte = 99999; - - # max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32] - max_retx_threshold = 4; - } - - # ------- SCTP definitions - SCTP : - { - # Number of streams to use in input/output - SCTP_INSTREAMS = 2; - SCTP_OUTSTREAMS = 2; - }; - - - ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.26"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); - - NETWORK_INTERFACES : - { - - GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; - GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24"; - GNB_INTERFACE_NAME_FOR_S1U = "eth0"; - GNB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24"; - GNB_PORT_FOR_S1U = 2152; # Spec 2152 - }; - } -); - -MACRLCs = ( - { - num_cc = 1; - tr_s_preference = "local_L1"; - tr_n_preference = "local_RRC"; - } -); - -L1s = ( - { - num_cc = 1; - tr_n_preference = "local_mac"; - } -); - -RUs = ( - { - local_rf = "yes" - nb_tx = 1 - nb_rx = 1 - att_tx = 0 - att_rx = 0; - bands = [7]; - max_pdschReferenceSignalPower = -27; - max_rxgain = 114; - eNB_instances = [0]; - sdr_addrs = "addr=192.168.10.2,second_addr=192.168.20.2,mgmt_addr=192.168.100.8"; - - } -); - -NETWORK_CONTROLLER : -{ - FLEXRAN_ENABLED = "no"; - FLEXRAN_INTERFACE_NAME = "lo"; - FLEXRAN_IPV4_ADDRESS = "127.0.0.1"; - FLEXRAN_PORT = 2210; - FLEXRAN_CACHE = "/mnt/oai_agent_cache"; - FLEXRAN_AWAIT_RECONF = "no"; -}; - - log_config : - { - global_log_level ="info"; - global_log_verbosity ="medium"; - hw_log_level ="info"; - hw_log_verbosity ="medium"; - phy_log_level ="info"; - phy_log_verbosity ="medium"; - mac_log_level ="info"; - mac_log_verbosity ="high"; - rlc_log_level ="info"; - rlc_log_verbosity ="medium"; - pdcp_log_level ="info"; - pdcp_log_verbosity ="medium"; - rrc_log_level ="info"; - rrc_log_verbosity ="medium"; - }; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpb210.conf index 80e06a491b..f22d5f781f 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpb210.conf @@ -120,7 +120,7 @@ gNBs = # pusch-ConfigCommon (up to 16 elements) initialULBWPk2_0 = 2; # used for UL slot initialULBWPmappingType_0 = 1 - initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 + initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13 initialULBWPk2_1 = 2; # used for mixed slot initialULBWPmappingType_1 = 1; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf index e7824186bb..99fd8e3857 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf @@ -120,7 +120,7 @@ gNBs = # pusch-ConfigCommon (up to 16 elements) initialULBWPk2_0 = 6; # used for (full) UL slot initialULBWPmappingType_0 = 1 - initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 + initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13 initialULBWPk2_1 = 6; # used for UL part mixed slot initialULBWPmappingType_1 = 1; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf index 62c73523d6..57f9956853 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf @@ -121,9 +121,9 @@ gNBs = # pusch-ConfigCommon (up to 16 elements) initialULBWPk2_0 = 6; # used for UL slot initialULBWPmappingType_0 = 1 - initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 - initialULBWPk2_1 = 6; # used for mixed slot + initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13 + initialULBWPk2_1 = 6; # used for mixed slot initialULBWPmappingType_1 = 1; initialULBWPstartSymbolAndLength_1 = 69; # this is SS=10 L=2 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 57be93b34b..85479c48dd 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 @@ -120,7 +120,7 @@ gNBs = # pusch-ConfigCommon (up to 16 elements) initialULBWPk2_0 = 6; # used for UL slot initialULBWPmappingType_0 = 1 - initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 + initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13 initialULBWPk2_1 = 6; # used for mixed slot initialULBWPmappingType_1 = 1; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpx300.conf index 536d1a9959..4c6b7d3ed7 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpx300.conf @@ -120,7 +120,7 @@ gNBs = # pusch-ConfigCommon (up to 16 elements) initialULBWPk2_0 = 2; # used for UL slot initialULBWPmappingType_0 = 1 - initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 + initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13 initialULBWPk2_1 = 2; # used for mixed slot initialULBWPmappingType_1 = 1; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpb210.conf index bccffcd7c8..b4f40d2205 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpb210.conf @@ -121,17 +121,14 @@ gNBs = # pusch-ConfigCommon (up to 16 elements) initialULBWPk2_0 = 6; initialULBWPmappingType_0 = 1 - # this is SS=0 L=11 - initialULBWPstartSymbolAndLength_0 = 55; + initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13 initialULBWPk2_1 = 6; initialULBWPmappingType_1 = 1; - # this is SS=0 L=12 initialULBWPstartSymbolAndLength_1 = 69; initialULBWPk2_2 = 7; initialULBWPmappingType_2 = 1; - # this is SS=10 L=4 initialULBWPstartSymbolAndLength_2 = 52; msg3_DeltaPreamble = 1; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpn300.conf index 862b2b1399..639b11828b 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpn300.conf @@ -121,17 +121,14 @@ gNBs = # pusch-ConfigCommon (up to 16 elements) initialULBWPk2_0 = 6; initialULBWPmappingType_0 = 1 - # this is SS=0 L=11 - initialULBWPstartSymbolAndLength_0 = 55; + initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13 initialULBWPk2_1 = 6; initialULBWPmappingType_1 = 1; - # this is SS=0 L=12 initialULBWPstartSymbolAndLength_1 = 69; initialULBWPk2_2 = 7; initialULBWPmappingType_2 = 1; - # this is SS=10 L=4 initialULBWPstartSymbolAndLength_2 = 52; msg3_DeltaPreamble = 1; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpx300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpx300.conf index 9b464a8edc..b93b530bed 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpx300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.24PRB.usrpx300.conf @@ -121,17 +121,14 @@ gNBs = # pusch-ConfigCommon (up to 16 elements) initialULBWPk2_0 = 6; initialULBWPmappingType_0 = 1 - # this is SS=0 L=11 - initialULBWPstartSymbolAndLength_0 = 55; + initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13 initialULBWPk2_1 = 6; initialULBWPmappingType_1 = 1; - # this is SS=0 L=12 initialULBWPstartSymbolAndLength_1 = 69; initialULBWPk2_2 = 7; initialULBWPmappingType_2 = 1; - # this is SS=10 L=4 initialULBWPstartSymbolAndLength_2 = 52; msg3_DeltaPreamble = 1; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.273PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.273PRB.usrpn300.conf index b785888658..21b12f0cae 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.273PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.273PRB.usrpn300.conf @@ -120,7 +120,7 @@ gNBs = # pusch-ConfigCommon (up to 16 elements) initialULBWPk2_0 = 6; # used for UL slot initialULBWPmappingType_0 = 1 - initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 + initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13 initialULBWPk2_1 = 6; # used for mixed slot initialULBWPmappingType_1 = 1; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb.conf index 30cce9f7ca..bdb8b8518a 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb.conf @@ -122,7 +122,7 @@ gNBs = # pusch-ConfigCommon (up to 16 elements) initialULBWPk2_0 = 2; # used for UL slot initialULBWPmappingType_0 = 1 - initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 + initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13 initialULBWPk2_1 = 2; # used for mixed slot initialULBWPmappingType_1 = 1; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_24PRB.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_24PRB.conf index 185edc5666..febf152387 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_24PRB.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_24PRB.conf @@ -135,8 +135,8 @@ gNBs = # pusch-ConfigCommon (up to 16 elements) initialULBWPk2_0 = 2; initialULBWPmappingType_0 = 1 - # this is SS=0 L=12 - initialULBWPstartSymbolAndLength_0 = 55; + # this is SS=0 L=13 + initialULBWPstartSymbolAndLength_0 = 41; initialULBWPk2_1 = 2; initialULBWPmappingType_1 = 1; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_n310.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_n310.conf index 6441db0328..767459aecb 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_n310.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb_n310.conf @@ -120,7 +120,7 @@ gNBs = # pusch-ConfigCommon (up to 16 elements) initialULBWPk2_0 = 2; # used for UL slot initialULBWPmappingType_0 = 1 - initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 + initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13 initialULBWPk2_1 = 2; # used for mixed slot initialULBWPmappingType_1 = 1; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf index f82eb09c7b..0f66d2fb92 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf @@ -125,7 +125,7 @@ gNBs = # pusch-ConfigCommon (up to 16 elements) initialULBWPk2_0 = 6; # used for UL slot initialULBWPmappingType_0 = 1 - initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 + initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13 initialULBWPk2_1 = 6; # used for mixed slot initialULBWPmappingType_1 = 1; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf index bbf1c09bb2..52805981b8 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf @@ -125,7 +125,7 @@ gNBs = # pusch-ConfigCommon (up to 16 elements) initialULBWPk2_0 = 6; # used for UL slot initialULBWPmappingType_0 = 1 - initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 + initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13 initialULBWPk2_1 = 6; # used for mixed slot initialULBWPmappingType_1 = 1; From c0f33940489496f330ae443366be81f6b7737a2f Mon Sep 17 00:00:00 2001 From: rmagueta Date: Mon, 3 May 2021 18:07:07 +0100 Subject: [PATCH 299/579] Fix LTE build error --- cmake_targets/CMakeLists.txt | 4 ++++ cmake_targets/build_oai | 1 + openair2/F1AP/f1ap_du_rrc_message_transfer.c | 10 +++++++--- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index b452ae1fad..b252833c5a 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -335,6 +335,10 @@ else (CUDA_FOUND) ) endif () +if(NR) + add_definitions(-DNR=1) +endif() + if (SANITIZE_ADDRESS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -fno-common") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-common") diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai index 358053a060..2eb04b1695 100755 --- a/cmake_targets/build_oai +++ b/cmake_targets/build_oai @@ -620,6 +620,7 @@ function main() { echo "set ( SKIP_SHARED_LIB_FLAG $SKIP_SHARED_LIB_FLAG )" >> $cmake_file echo "set ( ITTI_SIM $ITTI_SIM )" >> $cmake_file echo "set ( RFSIM_NAS $RFSIM_NAS )" >> $cmake_file + echo "set ( NR \"${NR}\" )" >> $cmake_file echo "set ( SANITIZE_ADDRESS $SANITIZE_ADDRESS )" >> $cmake_file echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file cd $DIR/$build_dir/build diff --git a/openair2/F1AP/f1ap_du_rrc_message_transfer.c b/openair2/F1AP/f1ap_du_rrc_message_transfer.c index dc92cfe384..a5bb50547e 100644 --- a/openair2/F1AP/f1ap_du_rrc_message_transfer.c +++ b/openair2/F1AP/f1ap_du_rrc_message_transfer.c @@ -1256,7 +1256,6 @@ int DU_handle_DL_NR_RRC_MESSAGE_TRANSFER(instance_t instance, RC.nrrrc[ctxt.module_id], ctxt.rnti); - gNB_RRC_INST *rrc = RC.nrrrc[ctxt.module_id]; if (srb_id == 0) { NR_DL_CCCH_Message_t* dl_ccch_msg=NULL; asn_dec_rval_t dec_rval; @@ -1300,7 +1299,10 @@ int DU_handle_DL_NR_RRC_MESSAGE_TRANSFER(instance_t instance, rrcSetup_ies->masterCellGroup.size,0,0); AssertFatal(dec_rval.code == RC_OK, "could not decode masterCellGroup\n"); - // configure MAC +#if NR + gNB_RRC_INST *rrc = RC.nrrrc[ctxt.module_id]; + + // configure MAC rrc_mac_config_req_gNB(ctxt.module_id, rrc->carrier.ssb_SubcarrierOffset, rrc->carrier.pdsch_AntennaPorts, @@ -1310,7 +1312,7 @@ int DU_handle_DL_NR_RRC_MESSAGE_TRANSFER(instance_t instance, ue_context_p->ue_context.rnti, ue_context_p->ue_context.masterCellGroup ); - // rrc_rlc_config_asn1_req + // rrc_rlc_config_asn1_req nr_rrc_rlc_config_asn1_req(&ctxt, ue_context_p->ue_context.SRB_configList, NULL, @@ -1318,6 +1320,8 @@ int DU_handle_DL_NR_RRC_MESSAGE_TRANSFER(instance_t instance, NULL, NULL, NULL); +#endif + // This should be somewhere in the f1ap_cudu_ue_inst_t /*int macrlc_instance = 0; From 6079b1a829fc53e795e4afae5664f5f38b74cc8a Mon Sep 17 00:00:00 2001 From: rmagueta Date: Mon, 3 May 2021 18:22:20 +0100 Subject: [PATCH 300/579] Put back AssertFatal --- openair1/PHY/CODING/nr_rate_matching.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openair1/PHY/CODING/nr_rate_matching.c b/openair1/PHY/CODING/nr_rate_matching.c index 0553bc19bf..b1ce6ab0de 100644 --- a/openair1/PHY/CODING/nr_rate_matching.c +++ b/openair1/PHY/CODING/nr_rate_matching.c @@ -493,8 +493,8 @@ int nr_rate_matching_ldpc_rx(uint8_t Ilbrm, } ind = (index_k0[BG-1][rvidx]*Ncb/N)*Z; -// AssertFatal(Foffset <= E,"Foffset %d > E %d\n",Foffset,E); -// AssertFatal(Foffset <= Ncb,"Foffset %d > Ncb %d\n",Foffset,Ncb); + AssertFatal(Foffset <= E,"Foffset %d > E %d\n",Foffset,E); + AssertFatal(Foffset <= Ncb,"Foffset %d > Ncb %d\n",Foffset,Ncb); #ifdef RM_DEBUG printf("nr_rate_matching_ldpc_rx: Clear %d, E %d, k0 %d, Ncb %d, rvidx %d\n", clear, E, ind, Ncb, rvidx); From 48305fd14d5883367562f58d1381b86865456b5e Mon Sep 17 00:00:00 2001 From: rmagueta Date: Mon, 3 May 2021 19:13:32 +0100 Subject: [PATCH 301/579] Fix warning after merge --- openair2/RRC/NR/MESSAGES/asn1_msg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/RRC/NR/MESSAGES/asn1_msg.c b/openair2/RRC/NR/MESSAGES/asn1_msg.c index 47dadb9c23..921322fbdf 100755 --- a/openair2/RRC/NR/MESSAGES/asn1_msg.c +++ b/openair2/RRC/NR/MESSAGES/asn1_msg.c @@ -1034,7 +1034,7 @@ void fill_initial_SpCellConfig(rnti_t rnti, AssertFatal(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.subcarrierSpacing==NR_SubcarrierSpacing_kHz30, "SCS != 30kHz\n"); AssertFatal(scc->tdd_UL_DL_ConfigurationCommon->pattern1.dl_UL_TransmissionPeriodicity==NR_TDD_UL_DL_Pattern__dl_UL_TransmissionPeriodicity_ms5, - "TDD period != 5ms : %d\n",scc->tdd_UL_DL_ConfigurationCommon->pattern1.dl_UL_TransmissionPeriodicity); + "TDD period != 5ms : %ld\n",scc->tdd_UL_DL_ConfigurationCommon->pattern1.dl_UL_TransmissionPeriodicity); schedulingRequestResourceConfig->periodicityAndOffset->choice.sl40 = 10*((rnti>>1)&3) + (rnti&2); schedulingRequestResourceConfig->resource = calloc(1,sizeof(*schedulingRequestResourceConfig->resource)); From ad0be5b161f3868a1f9cbd7bb078968287d45c5b Mon Sep 17 00:00:00 2001 From: rmagueta Date: Mon, 3 May 2021 20:15:20 +0100 Subject: [PATCH 302/579] Fix build errors after merge --- openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c | 1 - 1 file changed, 1 deletion(-) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c index 214ec5079a..0a58ee8492 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c @@ -632,7 +632,6 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac, pusch_config_pdu->bwp_size = n_RB_ULBWP; - fapi_nr_pusch_config_dedicated_t *pusch_config_dedicated = &mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated; NR_PUSCH_Config_t *pusch_Config = mac->ULbwp[0] ? mac->ULbwp[0]->bwp_Dedicated->pusch_Config->choice.setup : NULL; // Basic sanity check for MCS value to check for a false or erroneous DCI From e0960c35d3e393c5ef83bc73a86c757564fb628f Mon Sep 17 00:00:00 2001 From: hardy Date: Tue, 4 May 2021 08:37:30 +0200 Subject: [PATCH 303/579] removed in code comments --- ci-scripts/cls_module_ue.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/ci-scripts/cls_module_ue.py b/ci-scripts/cls_module_ue.py index 2df7b2e8b8..a94af5bcda 100644 --- a/ci-scripts/cls_module_ue.py +++ b/ci-scripts/cls_module_ue.py @@ -40,16 +40,6 @@ import subprocess class Module_UE: -# ID: idefix -# State : enabled -# Kind : quectel -# Process : quectel-cm -# WakeupScript : ci_qtel.py -# UENetwork : wwan0 -# HostIPAddress : 192.168.18.188 -# HostUsername : oaicicd -# HostPassword : oaicicd -# HostSourceCodePath : none def __init__(self,Module): #create attributes as in the Module dictionary From 64e42cacf2cb68ade414fafeee8282c67525f2b5 Mon Sep 17 00:00:00 2001 From: francescomani Date: Tue, 4 May 2021 11:47:48 +0200 Subject: [PATCH 304/579] implementation of handling csi and harq in the same pucch2 --- openair1/PHY/NR_TRANSPORT/pucch_rx.c | 4 +- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 14 +-- .../LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c | 14 +-- .../LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c | 11 +-- .../LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c | 87 +++++++++---------- openair2/LAYER2/NR_MAC_gNB/mac_proto.h | 8 +- openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h | 3 + openair2/RRC/NR/rrc_gNB_reconfig.c | 5 +- 8 files changed, 77 insertions(+), 69 deletions(-) diff --git a/openair1/PHY/NR_TRANSPORT/pucch_rx.c b/openair1/PHY/NR_TRANSPORT/pucch_rx.c index ba29a2176b..8145cf893c 100644 --- a/openair1/PHY/NR_TRANSPORT/pucch_rx.c +++ b/openair1/PHY/NR_TRANSPORT/pucch_rx.c @@ -1621,7 +1621,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB, if (pucch_pdu->bit_len_harq>0) { int harq_bytes=pucch_pdu->bit_len_harq>>3; if ((pucch_pdu->bit_len_harq&7) > 0) harq_bytes++; - uci_pdu->pduBitmap|=1; + uci_pdu->pduBitmap|=2; uci_pdu->harq.harq_payload = (uint8_t*)malloc(harq_bytes); uci_pdu->harq.harq_crc = decoderState; int i=0; @@ -1635,7 +1635,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB, } if (pucch_pdu->sr_flag == 1) { - uci_pdu->pduBitmap|=2; + uci_pdu->pduBitmap|=1; uci_pdu->sr.sr_bit_len = 1; uci_pdu->sr.sr_payload = malloc(1); uci_pdu->sr.sr_payload[0] = decodedPayload[0]&1; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index cdf7eb24ff..9cb645fdb0 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -1162,9 +1162,11 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra harq->is_waiting = true; ra->harq_pid = current_harq_pid; - nr_acknack_scheduling(module_idP, UE_id, frameP, slotP); - harq->feedback_slot = sched_ctrl->sched_pucch->ul_slot; - harq->feedback_frame = sched_ctrl->sched_pucch->frame; + int alloc = nr_acknack_scheduling(module_idP, UE_id, frameP, slotP); + AssertFatal(alloc>=0,"Couldn't find a pucch allocation for ack nack (msg4)\n"); + NR_sched_pucch_t *pucch = &sched_ctrl->sched_pucch[alloc]; + harq->feedback_slot = pucch->ul_slot; + harq->feedback_frame = pucch->frame; // Bytes to be transmitted uint8_t *buf = (uint8_t *) harq->tb; @@ -1361,10 +1363,10 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra dci_payload.rv = pdsch_pdu_rel15->rvIndex[0]; dci_payload.harq_pid = current_harq_pid; dci_payload.ndi = harq->ndi; - dci_payload.dai[0].val = (sched_ctrl->sched_pucch->dai_c-1)&3; + dci_payload.dai[0].val = (pucch->dai_c-1)&3; dci_payload.tpc = sched_ctrl->tpc1; // TPC for PUCCH: table 7.2.1-1 in 38.213 - dci_payload.pucch_resource_indicator = sched_ctrl->sched_pucch->resource_indicator; - dci_payload.pdsch_to_harq_feedback_timing_indicator.val = sched_ctrl->sched_pucch->timing_indicator; + dci_payload.pucch_resource_indicator = pucch->resource_indicator; + dci_payload.pdsch_to_harq_feedback_timing_indicator.val = pucch->timing_indicator; LOG_D(NR_MAC, "[RAPROC] DCI type 1 payload: freq_alloc %d (%d,%d,%d), time_alloc %d, vrb to prb %d, mcs %d tb_scaling %d \n", diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index e17fb5e346..cb1a73edae 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -492,8 +492,8 @@ bool allocate_dl_retransmission(module_id_t module_id, /* Find PUCCH occasion: if it fails, undo CCE allocation (undoing PUCCH * allocation after CCE alloc fail would be more complex) */ - const bool alloc = nr_acknack_scheduling(module_id, UE_id, frame, slot); - if (!alloc) { + const int alloc = nr_acknack_scheduling(module_id, UE_id, frame, slot); + if (alloc<0) { LOG_D(MAC, "%s(): could not find PUCCH for UE %d/%04x@%d.%d\n", __func__, @@ -509,6 +509,8 @@ bool allocate_dl_retransmission(module_id_t module_id, return false; } + sched_ctrl->sched_pdsch.pucch_allocation = alloc; + /* just reuse from previous scheduling opportunity, set new start RB */ sched_ctrl->sched_pdsch = *retInfo; sched_ctrl->sched_pdsch.rbStart = rbStart; @@ -615,8 +617,8 @@ void pf_dl(module_id_t module_id, /* Find PUCCH occasion: if it fails, undo CCE allocation (undoing PUCCH * allocation after CCE alloc fail would be more complex) */ - const bool alloc = nr_acknack_scheduling(module_id, UE_id, frame, slot); - if (!alloc) { + const int alloc = nr_acknack_scheduling(module_id, UE_id, frame, slot); + if (alloc<0) { LOG_D(MAC, "%s(): could not find PUCCH for UE %d/%04x@%d.%d\n", __func__, @@ -648,7 +650,7 @@ void pf_dl(module_id_t module_id, scc, UE_info->secondaryCellGroup[UE_id], sched_ctrl->active_bwp, tda, num_dmrs_cdm_grps_no_data, ps); sched_pdsch->Qm = nr_get_Qm_dl(sched_pdsch->mcs, ps->mcsTableIdx); sched_pdsch->R = nr_get_code_rate_dl(sched_pdsch->mcs, ps->mcsTableIdx); - + sched_pdsch->pucch_allocation = alloc; uint32_t TBS = 0; uint16_t rbSize; const int oh = 2 + (sched_ctrl->num_total_bytes >= 256) @@ -811,7 +813,7 @@ void nr_schedule_ue_spec(module_id_t module_id, NR_UE_harq_t *harq = &sched_ctrl->harq_processes[current_harq_pid]; DevAssert(!harq->is_waiting); add_tail_nr_list(&sched_ctrl->feedback_dl_harq, current_harq_pid); - NR_sched_pucch_t *pucch = &sched_ctrl->sched_pucch[0]; + NR_sched_pucch_t *pucch = &sched_ctrl->sched_pucch[sched_pdsch->pucch_allocation]; harq->feedback_frame = pucch->frame; harq->feedback_slot = pucch->ul_slot; harq->is_waiting = true; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c index 21875789a9..a0e5289500 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c @@ -335,8 +335,8 @@ void nr_preprocessor_phytest(module_id_t module_id, __func__, UE_id); - const bool alloc = nr_acknack_scheduling(module_id, UE_id, frame, slot); - if (!alloc) { + const int alloc = nr_acknack_scheduling(module_id, UE_id, frame, slot); + if (alloc < 0) { LOG_D(MAC, "%s(): could not find PUCCH for UE %d/%04x@%d.%d\n", __func__, @@ -351,12 +351,13 @@ void nr_preprocessor_phytest(module_id_t module_id, return; } - AssertFatal(alloc, - "could not find uplink slot for PUCCH (RNTI %04x@%d.%d)!\n", - rnti, frame, slot); + //AssertFatal(alloc, + // "could not find uplink slot for PUCCH (RNTI %04x@%d.%d)!\n", + // rnti, frame, slot); NR_sched_pdsch_t *sched_pdsch = &sched_ctrl->sched_pdsch; NR_pdsch_semi_static_t *ps = &sched_ctrl->pdsch_semi_static; + sched_pdsch->pucch_allocation = alloc; sched_pdsch->rbStart = rbStart; sched_pdsch->rbSize = rbSize; const int tda = RC.nrmac[module_id]->preferred_dl_tda[sched_ctrl->active_bwp->bwp_Id][slot]; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c index 800c23a9a0..ccae32b698 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c @@ -553,9 +553,6 @@ void nr_csi_meas_reporting(int Mod_idP, for (int i = start; i < start + len; ++i) { vrb_map_UL[i] |= mask; } - AssertFatal(!curr_pucch->simultaneous_harqcsi, - "UE %04x has simultaneous HARQ/CSI configured, but we don't support that\n", - UE_info->rnti[UE_id]); } } } @@ -1088,10 +1085,10 @@ void handle_nr_uci_pucch_2_3_4(module_id_t mod_id, // function to update pucch scheduling parameters in UE list when a USS DL is scheduled -bool nr_acknack_scheduling(int mod_id, - int UE_id, - frame_t frame, - sub_frame_t slot) +int nr_acknack_scheduling(int mod_id, + int UE_id, + frame_t frame, + sub_frame_t slot) { const NR_ServingCellConfigCommon_t *scc = RC.nrmac[mod_id]->common_channels->ServingCellConfigCommon; const int n_slots_frame = nr_slots_per_frame[*scc->ssbSubcarrierSpacing]; @@ -1101,6 +1098,7 @@ bool nr_acknack_scheduling(int mod_id, const int nr_slots_period = tdd->nrofDownlinkSlots + tdd->nrofUplinkSlots + nr_mix_slots; const int first_ul_slot_tdd = tdd->nrofDownlinkSlots + nr_slots_period * (slot / nr_slots_period); const int CC_id = 0; + NR_sched_pucch_t *csi_pucch; AssertFatal(slot < first_ul_slot_tdd + (tdd->nrofUplinkSymbols != 0), "cannot handle multiple TDD periods (yet): slot %d first_ul_slot_tdd %d nrofUplinkSlots %ld\n", @@ -1120,7 +1118,6 @@ bool nr_acknack_scheduling(int mod_id, "%s(): csi_bits %d in sched_pucch[0]\n", __func__, pucch->csi_bits); - /* if the currently allocated PUCCH of this UE is full, allocate it */ if (pucch->dai_c == 2) { /* advance the UL slot information in PUCCH by one so we won't schedule in @@ -1132,17 +1129,13 @@ bool nr_acknack_scheduling(int mod_id, pucch->frame = s == n_slots_frame - 1 ? (f + 1) % 1024 : f; pucch->ul_slot = (s + 1) % n_slots_frame; // we assume that only two indices over the array sched_pucch exist - NR_sched_pucch_t *csi_pucch = &sched_ctrl->sched_pucch[1]; + csi_pucch = &sched_ctrl->sched_pucch[1]; // skip the CSI PUCCH if it is present and if in the next frame/slot + // and if we don't multiplex if (csi_pucch->csi_bits > 0 && csi_pucch->frame == pucch->frame - && csi_pucch->ul_slot == pucch->ul_slot) { - AssertFatal(!csi_pucch->simultaneous_harqcsi, - "%s(): %d.%d cannot handle simultaneous_harqcsi, but found for UE %d\n", - __func__, - pucch->frame, - pucch->ul_slot, - UE_id); + && csi_pucch->ul_slot == pucch->ul_slot + && !csi_pucch->simultaneous_harqcsi) { nr_fill_nfapi_pucch(mod_id, frame, slot, csi_pucch, UE_id); memset(csi_pucch, 0, sizeof(*csi_pucch)); pucch->frame = s >= n_slots_frame - 2 ? (f + 1) % 1024 : f; @@ -1156,7 +1149,7 @@ bool nr_acknack_scheduling(int mod_id, if ((pucch->frame == frame && (pucch->ul_slot >= first_ul_slot_tdd + nr_ulmix_slots)) || (pucch->frame == frame + 1)) - return false; + return -1; // this is hardcoded for now as ue specific NR_SearchSpace__searchSpaceType_PR ss_type = NR_SearchSpace__searchSpaceType_PR_ue_Specific; @@ -1190,7 +1183,7 @@ bool nr_acknack_scheduling(int mod_id, pucch->timing_indicator = i; pucch->dai_c++; // retain old resource indicator, and we are good - return true; + return 0; } /* we need to find a new PUCCH occasion */ @@ -1213,30 +1206,6 @@ bool nr_acknack_scheduling(int mod_id, // advance ul_slot if it is not reachable by UE pucch->ul_slot = max(pucch->ul_slot, slot + pdsch_to_harq_feedback[0]); - // is there already CSI in this slot? - NR_sched_pucch_t *csi_pucch = &sched_ctrl->sched_pucch[1]; - // skip the CSI PUCCH if it is present and if in the next frame/slot - if (csi_pucch->csi_bits > 0 - && csi_pucch->frame == pucch->frame - && csi_pucch->ul_slot == pucch->ul_slot) { - AssertFatal(!csi_pucch->simultaneous_harqcsi, - "%s(): %d.%d cannot handle simultaneous_harqcsi, but found for UE %d\n", - __func__, - pucch->frame, - pucch->ul_slot, - UE_id); - nr_fill_nfapi_pucch(mod_id, frame, slot, csi_pucch, UE_id); - memset(csi_pucch, 0, sizeof(*csi_pucch)); - /* advance the UL slot information in PUCCH by one so we won't schedule in - * the same slot again */ - const int f = pucch->frame; - const int s = pucch->ul_slot; - memset(pucch, 0, sizeof(*pucch)); - pucch->frame = s == n_slots_frame - 1 ? (f + 1) % 1024 : f; - pucch->ul_slot = (s + 1) % n_slots_frame; - return nr_acknack_scheduling(mod_id, UE_id, frame, slot); - } - // Find the right timing_indicator value. int i = 0; while (i < 8) { @@ -1252,8 +1221,38 @@ bool nr_acknack_scheduling(int mod_id, slot, UE_id, pucch->ul_slot); - return false; + return -1; } + + // is there already CSI in this slot? + csi_pucch = &sched_ctrl->sched_pucch[1]; + if (csi_pucch->csi_bits > 0 + && csi_pucch->frame == pucch->frame + && csi_pucch->ul_slot == pucch->ul_slot) { + // skip the CSI PUCCH if it is present and if in the next frame/slot + // and if we don't multiplex + // FIXME currently we support at most 11 bits in pucch2 so skip also in that case + if(!csi_pucch->simultaneous_harqcsi + || ((csi_pucch->csi_bits + csi_pucch->dai_c) == 11)) { + nr_fill_nfapi_pucch(mod_id, frame, slot, csi_pucch, UE_id); + memset(csi_pucch, 0, sizeof(*csi_pucch)); + /* advance the UL slot information in PUCCH by one so we won't schedule in + * the same slot again */ + const int f = pucch->frame; + const int s = pucch->ul_slot; + memset(pucch, 0, sizeof(*pucch)); + pucch->frame = s == n_slots_frame - 1 ? (f + 1) % 1024 : f; + pucch->ul_slot = (s + 1) % n_slots_frame; + return nr_acknack_scheduling(mod_id, UE_id, frame, slot); + } + // multiplexing harq and csi in a pucch + else { + csi_pucch->timing_indicator = i; + csi_pucch->dai_c++; + return 1; + } + } + pucch->timing_indicator = i; // index in the list of timing indicators pucch->dai_c++; @@ -1272,7 +1271,7 @@ bool nr_acknack_scheduling(int mod_id, LOG_W(MAC, "symbol 0x%x is not free for PUCCH alloc in vrb_map_UL at RB %ld and slot %d.%d\n", symb, resource->startingPRB, pucch->frame, pucch->ul_slot); vrb_map_UL[resource->startingPRB] |= symb; } - return true; + return 0; } diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h index 4bf82dd002..1010ebafda 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h +++ b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h @@ -186,10 +186,10 @@ void nr_csi_meas_reporting(int Mod_idP, frame_t frameP, sub_frame_t slotP); -bool nr_acknack_scheduling(int Mod_idP, - int UE_id, - frame_t frameP, - sub_frame_t slotP); +int nr_acknack_scheduling(int Mod_idP, + int UE_id, + frame_t frameP, + sub_frame_t slotP); void get_pdsch_to_harq_feedback(int Mod_idP, int UE_id, diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h index 52255b8f32..c1ec27580f 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h +++ b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h @@ -389,6 +389,9 @@ typedef struct NR_sched_pdsch { /// DL HARQ PID to use for this UE, or -1 for "any new" int8_t dl_harq_pid; + // pucch format allocation + uint8_t pucch_allocation; + /// the Time Domain Allocation used for this transmission. Note that this is /// only important for retransmissions; otherwise, the TDA in /// NR_pdsch_semi_static_t has precedence diff --git a/openair2/RRC/NR/rrc_gNB_reconfig.c b/openair2/RRC/NR/rrc_gNB_reconfig.c index e7e60aa312..24a24ecaf1 100644 --- a/openair2/RRC/NR/rrc_gNB_reconfig.c +++ b/openair2/RRC/NR/rrc_gNB_reconfig.c @@ -1036,10 +1036,11 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco pucchfmt2->interslotFrequencyHopping=NULL; pucchfmt2->additionalDMRS=NULL; pucchfmt2->maxCodeRate=calloc(1,sizeof(*pucchfmt2->maxCodeRate)); - *pucchfmt2->maxCodeRate=NR_PUCCH_MaxCodeRate_zeroDot25; + *pucchfmt2->maxCodeRate=NR_PUCCH_MaxCodeRate_zeroDot35; pucchfmt2->nrofSlots=NULL; pucchfmt2->pi2BPSK=NULL; - pucchfmt2->simultaneousHARQ_ACK_CSI=NULL; + pucchfmt2->simultaneousHARQ_ACK_CSI=calloc(1,sizeof(*pucchfmt2->simultaneousHARQ_ACK_CSI)); + *pucchfmt2->simultaneousHARQ_ACK_CSI=NR_PUCCH_FormatConfig__simultaneousHARQ_ACK_CSI_true; // for scheduling requestresource pucch_Config->schedulingRequestResourceToAddModList = calloc(1,sizeof(*pucch_Config->schedulingRequestResourceToAddModList)); From 8fab3da97ea126d7fa80ade351539c7d213a7d28 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Tue, 4 May 2021 12:07:02 +0100 Subject: [PATCH 305/579] Fix segmentation fault after merge --- openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c | 2 +- .../LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c | 27 +++++++++++++++++-- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c index 0a58ee8492..a395af6f9a 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c @@ -714,7 +714,7 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac, } /* FREQ_HOPPING_FLAG */ - if ((pusch_Config->frequencyHopping!=NULL) && (pusch_Config->resourceAllocation != NR_PUSCH_Config__resourceAllocation_resourceAllocationType0)){ + if ((pusch_Config!=NULL) && (pusch_Config->frequencyHopping!=NULL) && (pusch_Config->resourceAllocation != NR_PUSCH_Config__resourceAllocation_resourceAllocationType0)){ pusch_config_pdu->frequency_hopping = dci->frequency_hopping_flag.val; } diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c index f5270a2bab..cb3414a1a1 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c @@ -1276,10 +1276,21 @@ bool nr_acknack_scheduling(int mod_id, pucch->dai_c++; pucch->resource_indicator = 0; // each UE has dedicated PUCCH resources + NR_PUCCH_Config_t *pucch_Config = NULL; + if (sched_ctrl->active_ubwp) { + pucch_Config = sched_ctrl->active_ubwp->bwp_Dedicated->pucch_Config->choice.setup; + } else if (RC.nrmac[mod_id]->UE_info.CellGroup[UE_id] && + RC.nrmac[mod_id]->UE_info.CellGroup[UE_id]->spCellConfig && + RC.nrmac[mod_id]->UE_info.CellGroup[UE_id]->spCellConfig->spCellConfigDedicated && + RC.nrmac[mod_id]->UE_info.CellGroup[UE_id]->spCellConfig->spCellConfigDedicated->uplinkConfig && + RC.nrmac[mod_id]->UE_info.CellGroup[UE_id]->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP && + RC.nrmac[mod_id]->UE_info.CellGroup[UE_id]->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP->pucch_Config->choice.setup) { + pucch_Config = RC.nrmac[mod_id]->UE_info.CellGroup[UE_id]->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP->pucch_Config->choice.setup; + } + /* verify that at that slot and symbol, resources are free. We only do this * for initialCyclicShift 0 (we assume it always has that one), so other * initialCyclicShifts can overlap with ICS 0!*/ - const NR_PUCCH_Config_t *pucch_Config = sched_ctrl->active_ubwp->bwp_Dedicated->pucch_Config->choice.setup; const NR_PUCCH_Resource_t *resource = pucch_Config->resourceToAddModList->list.array[pucch->resource_indicator]; DevAssert(resource->format.present == NR_PUCCH_Resource__format_PR_format0); if (resource->format.choice.format0->initialCyclicShift == 0) { @@ -1431,7 +1442,19 @@ void nr_sr_reporting(int Mod_idP, frame_t SFN, sub_frame_t slot) NR_list_t *UE_list = &UE_info->list; for (int UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; - NR_PUCCH_Config_t *pucch_Config = sched_ctrl->active_ubwp->bwp_Dedicated->pucch_Config->choice.setup; + + NR_PUCCH_Config_t *pucch_Config = NULL; + if (sched_ctrl->active_ubwp) { + pucch_Config = sched_ctrl->active_ubwp->bwp_Dedicated->pucch_Config->choice.setup; + } else if (RC.nrmac[Mod_idP]->UE_info.CellGroup[UE_id] && + RC.nrmac[Mod_idP]->UE_info.CellGroup[UE_id]->spCellConfig && + RC.nrmac[Mod_idP]->UE_info.CellGroup[UE_id]->spCellConfig->spCellConfigDedicated && + RC.nrmac[Mod_idP]->UE_info.CellGroup[UE_id]->spCellConfig->spCellConfigDedicated->uplinkConfig && + RC.nrmac[Mod_idP]->UE_info.CellGroup[UE_id]->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP && + RC.nrmac[Mod_idP]->UE_info.CellGroup[UE_id]->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP->pucch_Config->choice.setup) { + pucch_Config = RC.nrmac[Mod_idP]->UE_info.CellGroup[UE_id]->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP->pucch_Config->choice.setup; + } + AssertFatal(pucch_Config->schedulingRequestResourceToAddModList->list.count>0,"NO SR configuration available"); for (int SR_resource_id =0; SR_resource_id < pucch_Config->schedulingRequestResourceToAddModList->list.count;SR_resource_id++) { From e04e09e5d45d9808fb7a0ae1afb5455eeeaa5c29 Mon Sep 17 00:00:00 2001 From: Thomas Schlichter Date: Tue, 4 May 2021 13:24:00 +0200 Subject: [PATCH 306/579] fix warnings about missing const in polar_encoder_fast() parameter list make t_nrPolar_params a constant input to all nr polar encoders and nr polar decoders --- .../CODING/nrPolar_tools/nr_polar_decoder.c | 8 ++++---- .../PHY/CODING/nrPolar_tools/nr_polar_defs.h | 20 +++++++++---------- .../CODING/nrPolar_tools/nr_polar_encoder.c | 10 +++++----- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c index 18db8a01fb..8fe115b23a 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c @@ -40,9 +40,9 @@ #include "assertions.h" int8_t polar_decoder(double *input, - uint32_t *out, - t_nrPolar_params *polarParams, - uint8_t listSize) + uint32_t *out, + const t_nrPolar_params *polarParams, + uint8_t listSize) { //Assumes no a priori knowledge. uint8_t ***bit = nr_alloc_uint8_3D_array(polarParams->N, (polarParams->n+1), 2*listSize); @@ -299,7 +299,7 @@ int8_t polar_decoder(double *input, int8_t polar_decoder_dci(double *input, uint32_t *out, - t_nrPolar_params *polarParams, + const t_nrPolar_params *polarParams, uint8_t listSize, uint16_t n_RNTI) { uint8_t ***bit = nr_alloc_uint8_3D_array(polarParams->N, (polarParams->n+1), 2*listSize); diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h b/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h index a44a08a701..c2e9fd9381 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h @@ -138,22 +138,22 @@ typedef struct nrPolar_params t_nrPolar_params; void polar_encoder(uint32_t *input, uint32_t *output, - t_nrPolar_params *polarParams); + const t_nrPolar_params *polarParams); void polar_encoder_dci(uint32_t *in, uint32_t *out, - t_nrPolar_params *polarParams, + const t_nrPolar_params *polarParams, uint16_t n_RNTI); void polar_encoder_fast(uint64_t *A, void *out, int32_t crcmask, uint8_t ones_flag, - t_nrPolar_params *polarParams); + const t_nrPolar_params *polarParams); int8_t polar_decoder(double *input, - uint32_t *output, - t_nrPolar_params *polarParams, + uint32_t *output, + const t_nrPolar_params *polarParams, uint8_t listSize); uint32_t polar_decoder_int16(int16_t *input, @@ -163,21 +163,21 @@ uint32_t polar_decoder_int16(int16_t *input, int8_t polar_decoder_dci(double *input, uint32_t *out, - t_nrPolar_params *polarParams, + const t_nrPolar_params *polarParams, uint8_t listSize, uint16_t n_RNTI); void generic_polar_decoder(const t_nrPolar_params *pp, - decoder_node_t *node); + decoder_node_t *node); void applyFtoleft(const t_nrPolar_params *pp, - decoder_node_t *node); + decoder_node_t *node); void applyGtoright(const t_nrPolar_params *pp, - decoder_node_t *node); + decoder_node_t *node); void computeBeta(const t_nrPolar_params *pp, - decoder_node_t *node); + decoder_node_t *node); void build_decoder_tree(t_nrPolar_params *pp); void build_polar_tables(t_nrPolar_params *polarParams); diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_encoder.c b/openair1/PHY/CODING/nrPolar_tools/nr_polar_encoder.c index 27c062c217..e61b3dff9b 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_encoder.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_encoder.c @@ -43,7 +43,7 @@ void polar_encoder(uint32_t *in, uint32_t *out, - t_nrPolar_params *polarParams) { + const t_nrPolar_params *polarParams) { if (1) {//polarParams->idx == 0 || polarParams->idx == 1) { //PBCH or PDCCH /* uint64_t B = (((uint64_t)*in)&((((uint64_t)1)<<32)-1)) | (((uint64_t)crc24c((uint8_t*)in,polarParams->payloadBits)>>8)<payloadBits); @@ -154,7 +154,7 @@ void polar_encoder(uint32_t *in, void polar_encoder_dci(uint32_t *in, uint32_t *out, - t_nrPolar_params *polarParams, + const t_nrPolar_params *polarParams, uint16_t n_RNTI) { #ifdef DEBUG_POLAR_ENCODER_DCI printf("[polar_encoder_dci] in: [0]->0x%08x \t [1]->0x%08x \t [2]->0x%08x \t [3]->0x%08x\n", in[0], in[1], in[2], in[3]); @@ -251,9 +251,9 @@ void polar_encoder_dci(uint32_t *in, #endif } -static inline void polar_rate_matching(t_nrPolar_params *polarParams,void *in,void *out) __attribute__((always_inline)); +static inline void polar_rate_matching(const t_nrPolar_params *polarParams,void *in,void *out) __attribute__((always_inline)); -static inline void polar_rate_matching(t_nrPolar_params *polarParams,void *in,void *out) { +static inline void polar_rate_matching(const t_nrPolar_params *polarParams,void *in,void *out) { // handle rate matching with a single 128 bit word using bit shuffling // can be done with SIMD intrisics if needed @@ -411,7 +411,7 @@ void polar_encoder_fast(uint64_t *A, void *out, int32_t crcmask, uint8_t ones_flag, - t_nrPolar_params *polarParams) { + const t_nrPolar_params *polarParams) { // AssertFatal(polarParams->K > 32, "K = %d < 33, is not supported yet\n",polarParams->K); AssertFatal(polarParams->K < 129, "K = %d > 128, is not supported yet\n",polarParams->K); AssertFatal(polarParams->payloadBits < 65, "payload bits = %d > 64, is not supported yet\n",polarParams->payloadBits); From 662cda8a873d6bba1d864caa2cf8acce998862bb Mon Sep 17 00:00:00 2001 From: rmagueta Date: Tue, 4 May 2021 12:30:16 +0100 Subject: [PATCH 307/579] Fix build warnings after merge --- openair1/PHY/NR_UE_TRANSPORT/dci_nr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c index bd8f6e4849..4cf25ac5a6 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c @@ -896,7 +896,7 @@ uint16_t nr_dci_false_detection(uint64_t *dci, int rnti) { uint32_t encoder_output[NR_MAX_DCI_SIZE_DWORD]; - polar_encoder_fast(dci, (void*)encoder_output, rnti, 1, polar_param); + polar_encoder_fast(dci, (void*)encoder_output, rnti, 1, (t_nrPolar_params *)polar_param); uint8_t *enout_p = (uint8_t*)encoder_output; uint16_t x = 0; @@ -957,7 +957,7 @@ uint8_t nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue, n_rnti = rel15->rnti; LOG_D(PHY, "(%i.%i) dci indication (rnti %x,dci format %s,n_CCE %d,payloadSize %d)\n", proc->frame_rx, proc->nr_slot_rx,n_rnti,nr_dci_format_string[rel15->dci_format_options[k]],CCEind,dci_length); if (crc == n_rnti) { - LOG_D(PHY, "(%i.%i) Received dci indication (rnti %x,dci format %d,n_CCE %d,payloadSize %d,payload %llx)\n", + LOG_D(PHY, "(%i.%i) Received dci indication (rnti %x,dci format %s,n_CCE %d,payloadSize %d,payload %llx)\n", proc->frame_rx, proc->nr_slot_rx,n_rnti,nr_dci_format_string[rel15->dci_format_options[k]],CCEind,dci_length,*(unsigned long long*)dci_estimation); uint16_t mb = nr_dci_false_detection(dci_estimation,tmp_e,currentPtrDCI,L*108,n_rnti); ue->dci_thres = (ue->dci_thres + mb) / 2; From 1c2c00f260a5ed8c2fe5d43e98bb6c2a40fdd5c1 Mon Sep 17 00:00:00 2001 From: francescomani Date: Tue, 4 May 2021 13:46:17 +0200 Subject: [PATCH 308/579] fix warning --- openair1/PHY/NR_UE_TRANSPORT/dci_nr.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c index c1cebc64a8..cc8767863f 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c @@ -878,10 +878,10 @@ void nr_pdcch_unscrambling(int16_t *z, * re-encoded DCI bits and returns the number of mismatched bits */ uint16_t nr_dci_false_detection(uint64_t *dci, - int16_t *soft_in, - const t_nrPolar_params *polar_param, - int encoded_length, - int rnti) { + int16_t *soft_in, + t_nrPolar_params *polar_param, + int encoded_length, + int rnti) { uint32_t encoder_output[NR_MAX_DCI_SIZE_DWORD]; polar_encoder_fast(dci, (void*)encoder_output, rnti, 1, polar_param); @@ -922,7 +922,7 @@ uint8_t nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue, for (int k = 0; k < rel15->num_dci_options; k++) { int dci_length = rel15->dci_length_options[k]; uint64_t dci_estimation[2]= {0}; - const t_nrPolar_params *currentPtrDCI = nr_polar_params(NR_POLAR_DCI_MESSAGE_TYPE, dci_length, L, 1, &ue->polarList); + t_nrPolar_params *currentPtrDCI = nr_polar_params(NR_POLAR_DCI_MESSAGE_TYPE, dci_length, L, 1, &ue->polarList); LOG_D(PHY, "Trying DCI candidate %d of %d number of candidates, CCE %d (%d), L %d\n", j, rel15->number_of_candidates, CCEind, CCEind*9*6*2, L); From 4f64703d5a2bf50b6d0959b6a9d472fd3be9730f Mon Sep 17 00:00:00 2001 From: hardy Date: Tue, 4 May 2021 14:28:39 +0200 Subject: [PATCH 309/579] adding review form column to dashb --- ci-scripts/ran_dashboard.py | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/ci-scripts/ran_dashboard.py b/ci-scripts/ran_dashboard.py index 601cda1722..4f18638e68 100644 --- a/ci-scripts/ran_dashboard.py +++ b/ci-scripts/ran_dashboard.py @@ -40,6 +40,8 @@ import shlex #lexical analysis import json #json structures import datetime #now() and date formating from datetime import datetime +import re +import gitlab #----------------------------------------------------------- # Class Declaration @@ -79,7 +81,7 @@ class gDashboard: #line 2 empty #line 3 is for the column names i=3 - row =["MR","Created_at","Author","Title","Assignee", "Reviewer", "CAN START","IN PROGRESS","COMPLETED","OK MERGE","Merge conflicts"] + row =["MR","Created_at","Author","Title","Assignee", "Reviewer", "CAN START","IN PROGRESS","COMPLETED","Review Form","OK MERGE","Merge conflicts"] self.sheet.insert_row(row, index=i, value_input_option='RAW') #line 4 onward, MR data lines @@ -120,10 +122,32 @@ class gDashboard: else: conflicts = "" + + #add a column flagging that the review form is present + #we use gitlab API to parse the MR notes + gl = gitlab.Gitlab.from_config('OAI') + project_id = 223 + project = gl.projects.get(project_id) + #get the opened MR in the project + mrs = project.mergerequests.list(state='opened') + for m in range (0,len(mrs)): + if mrs[m].iid==self.d[x]['iid']:#check the iid is the one we are on + mr_notes = mrs[m].notes.list(all=True) + n=0 + found=False + review_form="" + while found==False and n Date: Tue, 4 May 2021 16:19:42 +0100 Subject: [PATCH 310/579] Fix SRB2 warning for SA --- openair2/RRC/NR/MESSAGES/asn1_msg.c | 49 +++++++++++++++++++++++++++-- openair2/RRC/NR/rrc_gNB.c | 17 +++++----- 2 files changed, 54 insertions(+), 12 deletions(-) diff --git a/openair2/RRC/NR/MESSAGES/asn1_msg.c b/openair2/RRC/NR/MESSAGES/asn1_msg.c index 9dfb20765a..5a07b58024 100755 --- a/openair2/RRC/NR/MESSAGES/asn1_msg.c +++ b/openair2/RRC/NR/MESSAGES/asn1_msg.c @@ -1185,11 +1185,15 @@ void fill_initial_cellGroupConfig(rnti_t rnti, NR_ServingCellConfigCommon_t *scc) { NR_RLC_BearerConfig_t *rlc_BearerConfig = NULL; + NR_RLC_BearerConfig_t *rlc_BearerConfig2 = NULL; NR_RLC_Config_t *rlc_Config = NULL; + NR_RLC_Config_t *rlc_Config2 = NULL; NR_LogicalChannelConfig_t *logicalChannelConfig = NULL; + NR_LogicalChannelConfig_t *logicalChannelConfig2= NULL; NR_MAC_CellGroupConfig_t *mac_CellGroupConfig = NULL; NR_PhysicalCellGroupConfig_t *physicalCellGroupConfig = NULL; long *logicalChannelGroup = NULL; + long *logicalChannelGroup2 = NULL; cellGroupConfig->cellGroupId = 0; @@ -1218,8 +1222,8 @@ void fill_initial_cellGroupConfig(rnti_t rnti, rlc_Config->choice.am->ul_AM_RLC.maxRetxThreshold = NR_UL_AM_RLC__maxRetxThreshold_t8; //} rlc_BearerConfig->rlc_Config = rlc_Config; - - + + //if (0) { logicalChannelConfig = calloc(1, sizeof(NR_LogicalChannelConfig_t)); logicalChannelConfig->ul_SpecificParameters = calloc(1, sizeof(*logicalChannelConfig->ul_SpecificParameters)); @@ -1236,6 +1240,41 @@ void fill_initial_cellGroupConfig(rnti_t rnti, rlc_BearerConfig->mac_LogicalChannelConfig = logicalChannelConfig; ASN_SEQUENCE_ADD(&cellGroupConfig->rlc_BearerToAddModList->list, rlc_BearerConfig); + + // SRB2 + rlc_BearerConfig2 = calloc(1, sizeof(NR_RLC_BearerConfig_t)); + rlc_BearerConfig2->logicalChannelIdentity = 2; + rlc_BearerConfig2->servedRadioBearer = calloc(1, sizeof(*rlc_BearerConfig2->servedRadioBearer)); + rlc_BearerConfig2->servedRadioBearer->present = NR_RLC_BearerConfig__servedRadioBearer_PR_srb_Identity; + rlc_BearerConfig2->servedRadioBearer->choice.srb_Identity = 2; + rlc_BearerConfig2->reestablishRLC = NULL; + rlc_Config2 = calloc(1, sizeof(NR_RLC_Config_t)); + rlc_Config2->present = NR_RLC_Config_PR_am; + rlc_Config2->choice.am = calloc(1, sizeof(*rlc_Config2->choice.am)); + rlc_Config2->choice.am->dl_AM_RLC.sn_FieldLength = calloc(1, sizeof(NR_SN_FieldLengthAM_t)); + *(rlc_Config2->choice.am->dl_AM_RLC.sn_FieldLength) = NR_SN_FieldLengthAM_size12; + rlc_Config2->choice.am->dl_AM_RLC.t_Reassembly = NR_T_Reassembly_ms35; + rlc_Config2->choice.am->dl_AM_RLC.t_StatusProhibit = NR_T_StatusProhibit_ms0; + rlc_Config2->choice.am->ul_AM_RLC.sn_FieldLength = calloc(1, sizeof(NR_SN_FieldLengthAM_t)); + *(rlc_Config2->choice.am->ul_AM_RLC.sn_FieldLength) = NR_SN_FieldLengthAM_size12; + rlc_Config2->choice.am->ul_AM_RLC.t_PollRetransmit = NR_T_PollRetransmit_ms45; + rlc_Config2->choice.am->ul_AM_RLC.pollPDU = NR_PollPDU_infinity; + rlc_Config2->choice.am->ul_AM_RLC.pollByte = NR_PollByte_infinity; + rlc_Config2->choice.am->ul_AM_RLC.maxRetxThreshold = NR_UL_AM_RLC__maxRetxThreshold_t8; + rlc_BearerConfig2->rlc_Config = rlc_Config2; + logicalChannelConfig2 = calloc(1, sizeof(NR_LogicalChannelConfig_t)); + logicalChannelConfig2->ul_SpecificParameters = calloc(1, sizeof(*logicalChannelConfig2->ul_SpecificParameters)); + logicalChannelConfig2->ul_SpecificParameters->priority = 1; + logicalChannelConfig2->ul_SpecificParameters->prioritisedBitRate = NR_LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_infinity; + logicalChannelGroup2 = CALLOC(1, sizeof(long)); + *logicalChannelGroup2 = 0; + logicalChannelConfig2->ul_SpecificParameters->logicalChannelGroup = logicalChannelGroup2; + logicalChannelConfig2->ul_SpecificParameters->schedulingRequestID = CALLOC(1, sizeof(*logicalChannelConfig2->ul_SpecificParameters->schedulingRequestID)); + *logicalChannelConfig2->ul_SpecificParameters->schedulingRequestID = 0; + logicalChannelConfig2->ul_SpecificParameters->logicalChannelSR_Mask = 0; + logicalChannelConfig2->ul_SpecificParameters->logicalChannelSR_DelayTimerApplied = 0; + rlc_BearerConfig2->mac_LogicalChannelConfig = logicalChannelConfig2; + ASN_SEQUENCE_ADD(&cellGroupConfig->rlc_BearerToAddModList->list, rlc_BearerConfig2); cellGroupConfig->rlc_BearerToReleaseList = NULL; @@ -1297,6 +1336,7 @@ uint8_t do_RRCSetup(rrc_gNB_ue_context_t *const ue_context_pP, NR_RRCSetup_t *rrcSetup; NR_RRCSetup_IEs_t *ie; NR_SRB_ToAddMod_t *SRB1_config = NULL; + NR_SRB_ToAddMod_t *SRB2_config = NULL; NR_PDCP_Config_t *pdcp_Config = NULL; NR_CellGroupConfig_t *cellGroupConfig = NULL; char masterCellGroup_buf[1000]; @@ -1336,6 +1376,11 @@ uint8_t do_RRCSetup(rrc_gNB_ue_context_t *const ue_context_pP, ie->radioBearerConfig.srb_ToAddModList = *SRB_configList; ASN_SEQUENCE_ADD(&(*SRB_configList)->list, SRB1_config); + SRB2_config = calloc(1, sizeof(NR_SRB_ToAddMod_t)); + SRB2_config->srb_Identity = 2; + SRB2_config->pdcp_Config = pdcp_Config; + ASN_SEQUENCE_ADD(&(*SRB_configList)->list, SRB2_config); + ie->radioBearerConfig.srb3_ToRelease = NULL; ie->radioBearerConfig.drb_ToAddModList = NULL; ie->radioBearerConfig.drb_ToReleaseList = NULL; diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index d636e1e5dd..2887c8a32e 100755 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -113,12 +113,11 @@ extern boolean_t nr_rrc_pdcp_config_asn1_req( struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_bearer2add_list); extern rlc_op_status_t nr_rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP, - const NR_SRB_ToAddModList_t * const srb2add_listP, - const NR_DRB_ToAddModList_t * const drb2add_listP, - const NR_DRB_ToReleaseList_t * const drb2release_listP, - const LTE_PMCH_InfoList_r9_t * const pmch_InfoList_r9_pP, - struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_srb_bearer2add_list, - struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_drb_bearer2add_list); + const NR_SRB_ToAddModList_t * const srb2add_listP, + const NR_DRB_ToAddModList_t * const drb2add_listP, + const NR_DRB_ToReleaseList_t * const drb2release_listP, + const LTE_PMCH_InfoList_r9_t * const pmch_InfoList_r9_pP, + struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_bearer2add_list); static inline uint64_t bitStr_to_uint64(BIT_STRING_t *asn); @@ -502,8 +501,7 @@ rrc_gNB_generate_RRCSetup( NULL, NULL, NULL, - ue_context_pP->ue_context.masterCellGroup->rlc_BearerToAddModList, - NULL); + ue_context_pP->ue_context.masterCellGroup->rlc_BearerToAddModList); nr_rrc_pdcp_config_asn1_req(ctxt_pP, ue_context_pP->ue_context.SRB_configList, NULL, @@ -1285,8 +1283,7 @@ rrc_gNB_process_RRCReconfigurationComplete( DRB_configList, DRB_Release_configList2, NULL, - ue_context_pP->ue_context.masterCellGroup->rlc_BearerToAddModList, - NULL); + ue_context_pP->ue_context.masterCellGroup->rlc_BearerToAddModList); } #endif From 5916450327d7ffcf9610437565f8917713241d3d Mon Sep 17 00:00:00 2001 From: rmagueta Date: Tue, 4 May 2021 18:45:05 +0100 Subject: [PATCH 311/579] Fix SRB2 warning for NSA --- openair1/SCHED_NR/phy_procedures_nr_gNB.c | 2 +- openair2/RRC/NR/rrc_gNB_reconfig.c | 43 ++++++++++++++++------- 2 files changed, 32 insertions(+), 13 deletions(-) diff --git a/openair1/SCHED_NR/phy_procedures_nr_gNB.c b/openair1/SCHED_NR/phy_procedures_nr_gNB.c index 4b9c419a72..49e5fac495 100644 --- a/openair1/SCHED_NR/phy_procedures_nr_gNB.c +++ b/openair1/SCHED_NR/phy_procedures_nr_gNB.c @@ -679,7 +679,7 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) dB_fixed_x10(gNB->pusch_vars[ULSCH_id]->ulsch_noise_power_tot) + gNB->pusch_thres) { NR_gNB_SCH_STATS_t *stats=get_ulsch_stats(gNB,ulsch); - LOG_I(PHY, "PUSCH not detected in %d.%d (%d,%d,%d)\n",frame_rx,slot_rx, + LOG_D(PHY, "PUSCH not detected in %d.%d (%d,%d,%d)\n",frame_rx,slot_rx, dB_fixed_x10(gNB->pusch_vars[ULSCH_id]->ulsch_power_tot), dB_fixed_x10(gNB->pusch_vars[ULSCH_id]->ulsch_noise_power_tot),gNB->pusch_thres); nr_fill_indication(gNB,frame_rx, slot_rx, ULSCH_id, harq_pid, 1); diff --git a/openair2/RRC/NR/rrc_gNB_reconfig.c b/openair2/RRC/NR/rrc_gNB_reconfig.c index 31f8a4ef33..a69ff59fa8 100644 --- a/openair2/RRC/NR/rrc_gNB_reconfig.c +++ b/openair2/RRC/NR/rrc_gNB_reconfig.c @@ -164,12 +164,23 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco secondaryCellGroup->rlc_BearerToAddModList = calloc(1,sizeof(*secondaryCellGroup->rlc_BearerToAddModList)); ASN_SEQUENCE_ADD(&secondaryCellGroup->rlc_BearerToAddModList->list, RLC_BearerConfig); - NR_RLC_BearerConfig_t *RLC_BearerConfig2 = calloc(1,sizeof(*RLC_BearerConfig2)); - nr_rlc_bearer_init(RLC_BearerConfig2, NR_RLC_BearerConfig__servedRadioBearer_PR_srb_Identity); - nr_drb_config(RLC_BearerConfig2->rlc_Config, NR_RLC_Config_PR_am); - nr_rlc_bearer_init_ul_spec(RLC_BearerConfig2->mac_LogicalChannelConfig); - *RLC_BearerConfig2->mac_LogicalChannelConfig->ul_SpecificParameters->logicalChannelGroup = 0; // FIXME: this should be obtained in nr_rlc_bearer_init_ul_spec() - ASN_SEQUENCE_ADD(&secondaryCellGroup->rlc_BearerToAddModList->list, RLC_BearerConfig2); + NR_RLC_BearerConfig_t *RLC_BearerConfig_srb1 = calloc(1,sizeof(*RLC_BearerConfig_srb1)); + nr_rlc_bearer_init(RLC_BearerConfig_srb1, NR_RLC_BearerConfig__servedRadioBearer_PR_srb_Identity); + nr_drb_config(RLC_BearerConfig_srb1->rlc_Config, NR_RLC_Config_PR_am); + nr_rlc_bearer_init_ul_spec(RLC_BearerConfig_srb1->mac_LogicalChannelConfig); + // FIXME: this should be obtained in nr_rlc_bearer_init_ul_spec() + *RLC_BearerConfig_srb1->mac_LogicalChannelConfig->ul_SpecificParameters->logicalChannelGroup = 0; + ASN_SEQUENCE_ADD(&secondaryCellGroup->rlc_BearerToAddModList->list, RLC_BearerConfig_srb1); + + NR_RLC_BearerConfig_t *RLC_BearerConfig_srb2 = calloc(1,sizeof(*RLC_BearerConfig_srb2)); + nr_rlc_bearer_init(RLC_BearerConfig_srb2, NR_RLC_BearerConfig__servedRadioBearer_PR_srb_Identity); + nr_drb_config(RLC_BearerConfig_srb2->rlc_Config, NR_RLC_Config_PR_am); + nr_rlc_bearer_init_ul_spec(RLC_BearerConfig_srb2->mac_LogicalChannelConfig); + // FIXME: this should be obtained in nr_rlc_bearer_init_ul_spec() + *RLC_BearerConfig_srb2->mac_LogicalChannelConfig->ul_SpecificParameters->logicalChannelGroup = 0; + RLC_BearerConfig_srb2->logicalChannelIdentity = 2; + RLC_BearerConfig_srb2->servedRadioBearer->choice.srb_Identity = 2; + ASN_SEQUENCE_ADD(&secondaryCellGroup->rlc_BearerToAddModList->list, RLC_BearerConfig_srb2); secondaryCellGroup->mac_CellGroupConfig=calloc(1,sizeof(*secondaryCellGroup->mac_CellGroupConfig)); secondaryCellGroup->mac_CellGroupConfig->drx_Config = NULL; @@ -1291,12 +1302,20 @@ void fill_default_rbconfig(NR_RadioBearerConfig_t *rbconfig, e_NR_SecurityConfig__keyToUse key_to_use) { rbconfig->srb_ToAddModList = calloc(1,sizeof(*rbconfig->srb_ToAddModList)); - NR_SRB_ToAddMod_t *srb_ToAddMod = calloc(1,sizeof(*srb_ToAddMod)); - srb_ToAddMod->srb_Identity = rb_id; - srb_ToAddMod->reestablishPDCP = NULL; - srb_ToAddMod->discardOnPDCP = NULL; - srb_ToAddMod->pdcp_Config = NULL; - ASN_SEQUENCE_ADD(&rbconfig->srb_ToAddModList->list,srb_ToAddMod); + + NR_SRB_ToAddMod_t *srb1_ToAddMod = calloc(1,sizeof(*srb1_ToAddMod)); + srb1_ToAddMod->srb_Identity = 1; + srb1_ToAddMod->reestablishPDCP = NULL; + srb1_ToAddMod->discardOnPDCP = NULL; + srb1_ToAddMod->pdcp_Config = NULL; + ASN_SEQUENCE_ADD(&rbconfig->srb_ToAddModList->list,srb1_ToAddMod); + + NR_SRB_ToAddMod_t *srb2_ToAddMod = calloc(1,sizeof(*srb2_ToAddMod)); + srb2_ToAddMod->srb_Identity = 2; + srb2_ToAddMod->reestablishPDCP = NULL; + srb2_ToAddMod->discardOnPDCP = NULL; + srb2_ToAddMod->pdcp_Config = NULL; + ASN_SEQUENCE_ADD(&rbconfig->srb_ToAddModList->list,srb2_ToAddMod); rbconfig->srb3_ToRelease = NULL; rbconfig->drb_ToAddModList = calloc(1,sizeof(*rbconfig->drb_ToAddModList)); From ffca5124b59ca286da38e9458bad21b74084466e Mon Sep 17 00:00:00 2001 From: francescomani Date: Wed, 5 May 2021 10:06:42 +0200 Subject: [PATCH 312/579] Revert "fix warning" This reverts commit 1c2c00f260a5ed8c2fe5d43e98bb6c2a40fdd5c1. --- openair1/PHY/NR_UE_TRANSPORT/dci_nr.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c index cc8767863f..c1cebc64a8 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c @@ -878,10 +878,10 @@ void nr_pdcch_unscrambling(int16_t *z, * re-encoded DCI bits and returns the number of mismatched bits */ uint16_t nr_dci_false_detection(uint64_t *dci, - int16_t *soft_in, - t_nrPolar_params *polar_param, - int encoded_length, - int rnti) { + int16_t *soft_in, + const t_nrPolar_params *polar_param, + int encoded_length, + int rnti) { uint32_t encoder_output[NR_MAX_DCI_SIZE_DWORD]; polar_encoder_fast(dci, (void*)encoder_output, rnti, 1, polar_param); @@ -922,7 +922,7 @@ uint8_t nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue, for (int k = 0; k < rel15->num_dci_options; k++) { int dci_length = rel15->dci_length_options[k]; uint64_t dci_estimation[2]= {0}; - t_nrPolar_params *currentPtrDCI = nr_polar_params(NR_POLAR_DCI_MESSAGE_TYPE, dci_length, L, 1, &ue->polarList); + const t_nrPolar_params *currentPtrDCI = nr_polar_params(NR_POLAR_DCI_MESSAGE_TYPE, dci_length, L, 1, &ue->polarList); LOG_D(PHY, "Trying DCI candidate %d of %d number of candidates, CCE %d (%d), L %d\n", j, rel15->number_of_candidates, CCEind, CCEind*9*6*2, L); From 668bb056dfc4c62f69ebf7b52810c476fe61c019 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Wed, 5 May 2021 10:59:02 +0200 Subject: [PATCH 313/579] CI: hotfix on the target creation detection Signed-off-by: Raphael Defosseux --- ci-scripts/cls_containerize.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index 6c8a2deb77..2c8a2cd339 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -343,7 +343,7 @@ class Containerize(): startOfTargetImageCreation = False buildStatus = False for line in inputfile: - result = re.search('FROM .* as ' + image + '$', str(line)) + result = re.search('FROM .* [aA][sS] ' + image + '$', str(line)) if result is not None: startOfTargetImageCreation = True if startOfTargetImageCreation: From 0816940fb5edafd7d1d7257619e4f0923b1ee145 Mon Sep 17 00:00:00 2001 From: Roberto Louro Magueta Date: Wed, 5 May 2021 15:13:52 +0200 Subject: [PATCH 314/579] Revert "Revert "Call the right function for the initiation of gtp-u task at gNB"" This reverts commit 278bfa8d6a905bdf0095a34d12086cf7becf0115 --- executables/nr-softmodem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/executables/nr-softmodem.c b/executables/nr-softmodem.c index 35142983c4..c7e636736b 100644 --- a/executables/nr-softmodem.c +++ b/executables/nr-softmodem.c @@ -363,7 +363,7 @@ int create_gNB_tasks(uint32_t gnb_nb) { } } - if (itti_create_task (TASK_GTPV1_U, >pv1u_gNB_task, NULL) < 0) { + if (itti_create_task (TASK_GTPV1_U, &nr_gtpv1u_gNB_task, NULL) < 0) { LOG_E(GTPU, "Create task for GTPV1U failed\n"); return -1; } From 8e5ccb00fdbcf0a9ffffd8f32afc42750a005baf Mon Sep 17 00:00:00 2001 From: rmagueta Date: Wed, 5 May 2021 14:18:37 +0100 Subject: [PATCH 315/579] Replace AssertFatal by LOG_E when UDP bind socket fails --- openair3/UDP/udp_eNB_task.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openair3/UDP/udp_eNB_task.c b/openair3/UDP/udp_eNB_task.c index 515dd9a17f..05729ba6b1 100644 --- a/openair3/UDP/udp_eNB_task.c +++ b/openair3/UDP/udp_eNB_task.c @@ -169,8 +169,8 @@ int udp_eNB_create_socket(int port, char *ip_addr, task_id_t task_id) if ((rc = bind(sd, (struct sockaddr *)&sin, sizeof(struct sockaddr_in))) < 0) { close(sd); - AssertFatal(rc >= 0, "UDP: Failed to bind socket: (%s:%d) address %s port %d\n", - strerror(errno), errno, ip_addr, port); + LOG_E(UDP_, "Failed to bind socket: (%s:%d) address %s port %d\n", strerror(errno), errno, ip_addr, port); + return -1; } /* Create a new descriptor for this connection */ From f59dcb9b1a6bafb03209f3d9ea349f6a074064cd Mon Sep 17 00:00:00 2001 From: rmagueta Date: Wed, 5 May 2021 14:25:46 +0100 Subject: [PATCH 316/579] Change LOG levels --- openair1/PHY/INIT/nr_init_ru.c | 2 +- openair2/LAYER2/NR_MAC_gNB/config.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openair1/PHY/INIT/nr_init_ru.c b/openair1/PHY/INIT/nr_init_ru.c index 2bd7d90620..cb3fd076a7 100644 --- a/openair1/PHY/INIT/nr_init_ru.c +++ b/openair1/PHY/INIT/nr_init_ru.c @@ -120,7 +120,7 @@ int nr_phy_init_RU(RU_t *ru) { AssertFatal(RC.nb_nr_L1_inst <= NUMBER_OF_eNB_MAX,"gNB instances %d > %d\n", RC.nb_nr_L1_inst,NUMBER_OF_gNB_MAX); - LOG_E(PHY,"[INIT] %s() RC.nb_nr_L1_inst:%d \n", __FUNCTION__, RC.nb_nr_L1_inst); + LOG_I(PHY,"[INIT] %s() RC.nb_nr_L1_inst:%d \n", __FUNCTION__, RC.nb_nr_L1_inst); int beam_count = 0; if (ru->nb_tx>1) {//Enable beamforming when nb_tx > 1 diff --git a/openair2/LAYER2/NR_MAC_gNB/config.c b/openair2/LAYER2/NR_MAC_gNB/config.c index e5a472acae..45c5103493 100644 --- a/openair2/LAYER2/NR_MAC_gNB/config.c +++ b/openair2/LAYER2/NR_MAC_gNB/config.c @@ -377,7 +377,7 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP, pdsch_AntennaPorts, pusch_AntennaPorts, scc); - LOG_E(NR_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); + LOG_D(NR_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); // if in nFAPI mode if ( (NFAPI_MODE == NFAPI_MODE_PNF || NFAPI_MODE == NFAPI_MODE_VNF) && (RC.nrmac[Mod_idP]->if_inst->NR_PHY_config_req == NULL) ){ From e5498d21a22ee1f9b8521d8a75aafd656f4d116e Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Wed, 5 May 2021 16:46:15 +0200 Subject: [PATCH 317/579] CI: fixing the detection for the end of execution on pods Signed-off-by: Raphael Defosseux --- ci-scripts/cls_physim1.py | 11 +++++++---- ci-scripts/sshconnection.py | 19 +++++++++++++++++++ 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/ci-scripts/cls_physim1.py b/ci-scripts/cls_physim1.py index 41beb1e096..86150a1470 100644 --- a/ci-scripts/cls_physim1.py +++ b/ci-scripts/cls_physim1.py @@ -154,6 +154,7 @@ class PhySim: sys.exit(-1) else: logging.debug('\u001B[1m Podman Login to OC Cluster Registry Successfully\u001B[0m') + time.sleep(2) mySSH.command('oc create -f openshift/oai-physim-image-stream.yml', '\$', 6) if mySSH.getBefore().count('(AlreadyExists):') == 0 and mySSH.getBefore().count('created') == 0: logging.error(f'\u001B[1m Image Stream "oai-physim" Creation Failed on OC Cluster {ocProjectName}\u001B[0m') @@ -161,7 +162,9 @@ class PhySim: sys.exit(-1) else: logging.debug(f'\u001B[1m Image Stream "oai-physim" created on OC project {ocProjectName}\u001B[0m') + time.sleep(2) mySSH.command(f'sudo podman tag oai-physim:{imageTag} default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/{self.OCProjectName}/oai-physim:{imageTag}', '\$', 6) + time.sleep(2) mySSH.command(f'sudo podman push default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/{self.OCProjectName}/oai-physim:{imageTag} --tls-verify=false', '\$', 30) if mySSH.getBefore().count('Storing signatures') == 0: logging.error('\u001B[1m Image "oai-physim" push to OC Cluster Registry Failed\u001B[0m') @@ -171,6 +174,7 @@ class PhySim: logging.debug('\u001B[1m Image "oai-physim" push to OC Cluster Registry Successfully\u001B[0m') # Using helm charts deployment + time.sleep(5) mySSH.command(f'sed -i -e "s#TAG#{imageTag}#g" ./charts/physims/values.yaml', '\$', 6) mySSH.command('helm install physim ./charts/physims/ | tee -a cmake_targets/log/physim_helm_summary.txt 2>&1', '\$', 6) if mySSH.getBefore().count('STATUS: deployed') == 0: @@ -203,11 +207,10 @@ class PhySim: # doing a deep copy! tmpPodNames = podNames.copy() while(count < 28 and isFinished == False): - time.sleep(58) + time.sleep(60) for podName in tmpPodNames: - mySSH.command(f'oc logs --tail=1 {podName} 2>&1', '\$', 6, silent=True, resync=True) - time.sleep(2) - if mySSH.getBefore().count('FINISHED') != 0: + mySSH.command2(f'oc logs --tail=1 {podName} 2>&1', 6, silent=True) + if mySSH.cmd2Results.count('FINISHED') != 0: logging.debug(podName + ' is finished') tmpPodNames.remove(podName) if not tmpPodNames: diff --git a/ci-scripts/sshconnection.py b/ci-scripts/sshconnection.py index 4a0992436b..b4087c9695 100644 --- a/ci-scripts/sshconnection.py +++ b/ci-scripts/sshconnection.py @@ -35,6 +35,7 @@ import pexpect # pexpect import logging import time # sleep import re +import subprocess import sys #----------------------------------------------------------- @@ -44,6 +45,9 @@ class SSHConnection(): def __init__(self): self.ssh = '' self.picocom_closure = False + self.ipaddress = '' + self.username = '' + self.cmd2Results = '' def disablePicocomClosure(self): self.picocom_closure = False @@ -98,6 +102,8 @@ class SSHConnection(): pass else: sys.exit('SSH Connection Failed') + self.ipaddress = ipaddress + self.username = username @@ -146,10 +152,23 @@ class SSHConnection(): logging.debug('Expected Line : ' + expectedline) sys.exit(self.sshresponse) + def command2(self, commandline, timeout, silent=False): + if not silent: + logging.debug(commandline) + self.cmd2Results = '' + myHost = self.username + '@' + self.ipaddress + # CAUTION: THIS METHOD IMPLIES THAT THERE ARE VALID SSH KEYS + # BETWEEN THE PYTHON EXECUTOR NODE AND THE REMOTE HOST + # OTHERWISE IT WON'T WORK + lSsh = subprocess.Popen(["ssh", "%s" % myHost, commandline],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE) + self.cmd2Results = str(lSsh.stdout.readlines()) + def close(self): self.ssh.timeout = 5 self.ssh.sendline('exit') self.sshresponse = self.ssh.expect([pexpect.EOF, pexpect.TIMEOUT]) + self.ipaddress = '' + self.username = '' if self.sshresponse == 0: pass elif self.sshresponse == 1: From bd1283e40a8126b37de549fc8a258513c1a4388c Mon Sep 17 00:00:00 2001 From: rmagueta Date: Wed, 5 May 2021 17:39:57 +0100 Subject: [PATCH 318/579] Fix phy-simulators --- openair1/PHY/NR_TRANSPORT/pucch_rx.c | 1 - openair1/SIMULATION/NR_PHY/dlsim.c | 3 +-- openair1/SIMULATION/NR_PHY/pucchsim.c | 2 ++ openair1/SIMULATION/NR_PHY/ulsim.c | 2 +- openair2/LAYER2/NR_MAC_UE/config_ue.c | 2 +- openair2/LAYER2/NR_MAC_UE/main_ue_nr.c | 6 ++++-- 6 files changed, 9 insertions(+), 7 deletions(-) diff --git a/openair1/PHY/NR_TRANSPORT/pucch_rx.c b/openair1/PHY/NR_TRANSPORT/pucch_rx.c index 63987b0514..8ebb937d05 100644 --- a/openair1/PHY/NR_TRANSPORT/pucch_rx.c +++ b/openair1/PHY/NR_TRANSPORT/pucch_rx.c @@ -174,7 +174,6 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB, pucch_GroupHopping_t pucch_GroupHopping = pucch_pdu->group_hop_flag + (pucch_pdu->sequence_hop_flag<<1); - AssertFatal(pucch_pdu->bit_len_harq > 0 || pucch_pdu->sr_flag > 0, "Either bit_len_harq (%d) or sr_flag (%d) must be > 0\n", pucch_pdu->bit_len_harq,pucch_pdu->sr_flag); diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index 3380429803..848ae2920e 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -918,8 +918,7 @@ int main(int argc, char **argv) //Configure UE rrc.carrier.MIB = (uint8_t*) malloc(4); rrc.carrier.sizeof_MIB = do_MIB_NR(&rrc,0); - - nr_rrc_mac_config_req_ue(0,0,0,rrc.carrier.mib.message.choice.mib, rrc.carrier.sib1->servingCellConfigCommon, UE_info->CellGroup[0], secondaryCellGroup); + nr_rrc_mac_config_req_ue(0,0,0,rrc.carrier.mib.message.choice.mib, NULL, NULL, secondaryCellGroup); nr_dcireq_t dcireq; diff --git a/openair1/SIMULATION/NR_PHY/pucchsim.c b/openair1/SIMULATION/NR_PHY/pucchsim.c index f65cb9eb81..749703d230 100644 --- a/openair1/SIMULATION/NR_PHY/pucchsim.c +++ b/openair1/SIMULATION/NR_PHY/pucchsim.c @@ -551,6 +551,8 @@ int main(int argc, char **argv) pucch_pdu.initial_cyclic_shift = 0; pucch_pdu.start_symbol_index = startingSymbolIndex; pucch_pdu.prb_start = startingPRB; + pucch_pdu.bwp_start = 0; + pucch_pdu.freq_hop_flag = 0; nr_decode_pucch0(gNB, nr_frame_tx, nr_slot_tx,&uci_pdu,&pucch_pdu); if(sr_flag==1){ if (uci_pdu.sr->sr_indication == 0 || uci_pdu.sr->sr_confidence_level == 1) diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c index 55e1ed08f3..4dc9622664 100644 --- a/openair1/SIMULATION/NR_PHY/ulsim.c +++ b/openair1/SIMULATION/NR_PHY/ulsim.c @@ -757,7 +757,7 @@ int main(int argc, char **argv) rrc.carrier.MIB = (uint8_t*) malloc(4); rrc.carrier.sizeof_MIB = do_MIB_NR(&rrc,0); - nr_rrc_mac_config_req_ue(0,0,0,rrc.carrier.mib.message.choice.mib, rrc.carrier.sib1->servingCellConfigCommon, secondaryCellGroup, secondaryCellGroup); + nr_rrc_mac_config_req_ue(0,0,0,rrc.carrier.mib.message.choice.mib, NULL, NULL, secondaryCellGroup); nr_ue_phy_config_request(&UE_mac->phy_config); diff --git a/openair2/LAYER2/NR_MAC_UE/config_ue.c b/openair2/LAYER2/NR_MAC_UE/config_ue.c index 391fc1d1fb..be723b4cd6 100755 --- a/openair2/LAYER2/NR_MAC_UE/config_ue.c +++ b/openair2/LAYER2/NR_MAC_UE/config_ue.c @@ -717,7 +717,7 @@ int nr_rrc_mac_config_req_ue( mac->common_configuration_complete = 1; } if(scell_group_config != NULL ){ - mac->cg = cell_group_config; + mac->cg = scell_group_config; mac->servCellIndex = *scell_group_config->spCellConfig->servCellIndex; config_control_ue(mac); if (scell_group_config->spCellConfig->reconfigurationWithSync) { diff --git a/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c b/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c index abb98cbc8b..768f65bf63 100644 --- a/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c +++ b/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c @@ -87,8 +87,10 @@ NR_UE_MAC_INST_t * nr_l2_init_ue(NR_UE_RRC_INST_t* rrc_inst) } else { LOG_I(MAC,"Running without CellGroupConfig\n"); nr_rrc_mac_config_req_ue(0,0,0,NULL,NULL,NULL,NULL); - AssertFatal(rlc_module_init(0) == 0, "%s: Could not initialize RLC layer\n", __FUNCTION__); - } + if(get_softmodem_params()->sa == 1) { + AssertFatal(rlc_module_init(0) == 0, "%s: Could not initialize RLC layer\n", __FUNCTION__); + } + } return (nr_ue_mac_inst); } From 055f147d133a425eccc33f8c2a78ee44a945e32e Mon Sep 17 00:00:00 2001 From: rmagueta Date: Wed, 5 May 2021 19:59:24 +0100 Subject: [PATCH 319/579] Fix build in phy-simulators --- openair1/SIMULATION/NR_PHY/dlsim.c | 6 ++++++ openair1/SIMULATION/NR_PHY/prachsim.c | 6 ++++++ openair1/SIMULATION/NR_PHY/ulsim.c | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index 848ae2920e..c924e28dc8 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -129,6 +129,12 @@ rrc_data_ind( { } +int ocp_gtpv1u_create_s1u_tunnel(instance_t instance, + const gtpv1u_enb_create_tunnel_req_t *create_tunnel_req, + gtpv1u_enb_create_tunnel_resp_t *create_tunnel_resp) { + return 0; +} + int gtpv1u_create_s1u_tunnel( const instance_t instanceP, diff --git a/openair1/SIMULATION/NR_PHY/prachsim.c b/openair1/SIMULATION/NR_PHY/prachsim.c index 9cd72d1a9c..6ca7a9dde0 100644 --- a/openair1/SIMULATION/NR_PHY/prachsim.c +++ b/openair1/SIMULATION/NR_PHY/prachsim.c @@ -92,6 +92,12 @@ rrc_data_ind( { } +int ocp_gtpv1u_create_s1u_tunnel(instance_t instance, + const gtpv1u_enb_create_tunnel_req_t *create_tunnel_req, + gtpv1u_enb_create_tunnel_resp_t *create_tunnel_resp) { + return 0; +} + int gtpv1u_create_s1u_tunnel( const instance_t instanceP, diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c index 4dc9622664..a99a47dc54 100644 --- a/openair1/SIMULATION/NR_PHY/ulsim.c +++ b/openair1/SIMULATION/NR_PHY/ulsim.c @@ -121,6 +121,12 @@ rrc_data_ind( { } +int ocp_gtpv1u_create_s1u_tunnel(instance_t instance, + const gtpv1u_enb_create_tunnel_req_t *create_tunnel_req, + gtpv1u_enb_create_tunnel_resp_t *create_tunnel_resp) { + return 0; +} + int gtpv1u_create_s1u_tunnel( const instance_t instanceP, From a8308db7bc3fda6fdb5f0c40601f5d7dbcef22ef Mon Sep 17 00:00:00 2001 From: francescomani Date: Thu, 6 May 2021 09:34:25 +0200 Subject: [PATCH 320/579] fixes for FR2 RA --- openair1/SCHED_NR_UE/phy_procedures_nr_ue.c | 2 +- openair2/LAYER2/NR_MAC_UE/mac_defs.h | 1 + openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 8 ++++---- openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c index 6a03d0d905..179a25bad9 100644 --- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c +++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c @@ -142,7 +142,7 @@ void nr_fill_rx_indication(fapi_nr_rx_indication_t *rx_ind, case FAPI_NR_RX_PDU_TYPE_SSB: rx_ind->rx_indication_body[n_pdus - 1].ssb_pdu.pdu = ue->pbch_vars[gNB_id]->decoded_output; rx_ind->rx_indication_body[n_pdus - 1].ssb_pdu.additional_bits = ue->pbch_vars[gNB_id]->xtra_byte; - rx_ind->rx_indication_body[n_pdus - 1].ssb_pdu.ssb_index = frame_parms->ssb_index; + rx_ind->rx_indication_body[n_pdus - 1].ssb_pdu.ssb_index = (frame_parms->ssb_index)&0x7; rx_ind->rx_indication_body[n_pdus - 1].ssb_pdu.ssb_length = frame_parms->Lmax; rx_ind->rx_indication_body[n_pdus - 1].ssb_pdu.cell_id = frame_parms->Nid_cell; rx_ind->rx_indication_body[n_pdus - 1].ssb_pdu.ssb_start_subcarrier = frame_parms->ssb_start_subcarrier; diff --git a/openair2/LAYER2/NR_MAC_UE/mac_defs.h b/openair2/LAYER2/NR_MAC_UE/mac_defs.h index 145b15828b..5f7ab73605 100755 --- a/openair2/LAYER2/NR_MAC_UE/mac_defs.h +++ b/openair2/LAYER2/NR_MAC_UE/mac_defs.h @@ -384,6 +384,7 @@ typedef struct { NR_Type0_PDCCH_CSS_config_t type0_PDCCH_CSS_config; NR_SearchSpace_t *search_space_zero; NR_ControlResourceSet_t *coreset0; + frequency_range_t frequency_range; dci_pdu_rel15_t def_dci_pdu_rel15[8]; diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index a26d272f81..e2971628ea 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -109,7 +109,6 @@ int8_t nr_ue_decode_mib(module_id_t module_id, NR_UE_MAC_INST_t *mac = get_mac_inst(module_id); mac->physCellId = cell_id; - frequency_range_t frequency_range; nr_mac_rrc_data_ind_ue( module_id, cc_id, gNB_index, 0, 0, 0, NR_BCCH_BCH, (uint8_t *) pduP, 3 ); // fixed 3 bytes MIB PDU AssertFatal(mac->mib != NULL, "nr_ue_decode_mib() mac->mib == NULL\n"); @@ -125,16 +124,17 @@ int8_t nr_ue_decode_mib(module_id_t module_id, frame = frame << 4; frame = frame | frame_number_4lsb; if(ssb_length == 64){ - frequency_range = FR2; + mac->frequency_range = FR2; for (int i=0; i<3; i++) ssb_index += (((extra_bits>>(7-i))&0x01)<<(3+i)); }else{ - frequency_range = FR1; + mac->frequency_range = FR1; if(ssb_subcarrier_offset_msb){ ssb_subcarrier_offset = ssb_subcarrier_offset | 0x10; } } + LOG_D(MAC,"system frame number(6 MSB bits): %d\n", mac->mib->systemFrameNumber.buf[0]); LOG_D(MAC,"system frame number(with LSB): %d\n", (int)frame); LOG_D(MAC,"subcarrier spacing (0=15or60, 1=30or120): %d\n", (int)mac->mib->subCarrierSpacingCommon); @@ -163,7 +163,7 @@ int8_t nr_ue_decode_mib(module_id_t module_id, ssb_subcarrier_offset, ssb_start_symbol, scs_ssb, - frequency_range, + mac->frequency_range, ssb_index, ssb_offset_point_a); diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c index a395af6f9a..a85aba0130 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c @@ -1215,7 +1215,7 @@ static void build_ro_list(NR_UE_MAC_INST_t *mac) { prach_config_info_p = get_prach_config_info(fr2_flag, config_index, unpaired); - if (fr2_flag > 0) { //FR2 + if (mac->frequency_range == FR2) { //FR2 x = prach_config_info_p[2]; y = prach_config_info_p[3]; From 3dc9e3d19c0faacfa47cd0b425d51eb9ad60a2bf Mon Sep 17 00:00:00 2001 From: hardy Date: Thu, 6 May 2021 10:49:30 +0200 Subject: [PATCH 321/579] [CI] hotfix, gNB N310 conf file update --- .../gnb.band78.tm1.fr1.106PRB.usrpn310.conf | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpn310.conf b/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpn310.conf index 809203f672..5e480bce54 100644 --- a/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpn310.conf +++ b/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpn310.conf @@ -61,24 +61,15 @@ gNBs = initialDLBWPk0_0 = 0; #initialULBWPmappingType #0=typeA,1=typeB - initialDLBWPmappingType_0 = 0; + initialDLBWPmappingType_0 = 0;#for DL slot #this is SS=1,L=13 initialDLBWPstartSymbolAndLength_0 = 40; - initialDLBWPk0_1 = 0; + initialDLBWPk0_1 = 0;#for mixed slot initialDLBWPmappingType_1 = 0; - #this is SS=2,L=12 - initialDLBWPstartSymbolAndLength_1 = 53; + #this is SS=1,L=5 + initialDLBWPstartSymbolAndLength_1 = 57; - initialDLBWPk0_2 = 0; - initialDLBWPmappingType_2 = 0; - #this is SS=1,L=12 - initialDLBWPstartSymbolAndLength_2 = 54; - - initialDLBWPk0_3 = 0; - initialDLBWPmappingType_3 = 0; - #this is SS=1,L=4 //5 (4 is for 43, 5 is for 57) - initialDLBWPstartSymbolAndLength_3 = 57; //43; //57; #uplinkConfigCommon #frequencyInfoUL ul_frequencyBand = 78; @@ -103,7 +94,7 @@ gNBs = prach_msg1_FDM = 0; prach_msg1_FrequencyStart = 0; zeroCorrelationZoneConfig = 13; - preambleReceivedTargetPower = -100; + preambleReceivedTargetPower = -90; #preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200) preambleTransMax = 6; #powerRampingStep From f75d0126d2bdfbb9d5cf79250267ad2560ebd45f Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Thu, 6 May 2021 11:18:01 +0200 Subject: [PATCH 322/579] CI: fix renaming artifact Signed-off-by: Raphael Defosseux --- ci-scripts/Jenkinsfile-physim-deploy | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci-scripts/Jenkinsfile-physim-deploy b/ci-scripts/Jenkinsfile-physim-deploy index 2d2cf054b5..eac572e6cd 100644 --- a/ci-scripts/Jenkinsfile-physim-deploy +++ b/ci-scripts/Jenkinsfile-physim-deploy @@ -221,9 +221,9 @@ pipeline { archiveArtifacts artifacts: "physim_deploytest_logs_${env.BUILD_ID}.zip" } if (fileExists("test_results.html")) { - sh "mv test_results.html test_results_${env.JOB_NAME}.html" - sh "sed -i -e 's#TEMPLATE_JOB_NAME#${JOB_NAME}#' -e 's@build #TEMPLATE_BUILD_ID@build #${BUILD_ID}@' -e 's#Build-ID: TEMPLATE_BUILD_ID#Build-ID: ${BUILD_ID}#' -e 's#TEMPLATE_STAGE_NAME#${testStageName}#' test_results_${JOB_NAME}.html" - archiveArtifacts artifacts: "test_results_${env.JOB_NAME}.html" + sh "mv test_results.html test_results-${env.JOB_NAME}.html" + sh "sed -i -e 's#TEMPLATE_JOB_NAME#${JOB_NAME}#' -e 's@build #TEMPLATE_BUILD_ID@build #${BUILD_ID}@' -e 's#Build-ID: TEMPLATE_BUILD_ID#Build-ID: ${BUILD_ID}#' -e 's#TEMPLATE_STAGE_NAME#${testStageName}#' test_results-${JOB_NAME}.html" + archiveArtifacts artifacts: "test_results-${env.JOB_NAME}.html" } } } From 9f16383331de2217bcabed44394dbf81338a9683 Mon Sep 17 00:00:00 2001 From: Parminder Singh Date: Thu, 6 May 2021 10:51:35 +0200 Subject: [PATCH 323/579] Call common pusch procedure in ulsim - The TX signal is prepared but not sent which leads to all 0's TX signal. --- openair1/SIMULATION/NR_PHY/ulsim.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c index 6911a3f4a9..36bb9118f7 100644 --- a/openair1/SIMULATION/NR_PHY/ulsim.c +++ b/openair1/SIMULATION/NR_PHY/ulsim.c @@ -1108,6 +1108,11 @@ int main(int argc, char **argv) phy_procedures_nrUE_TX(UE, &UE_proc, gNB_id); + /* We need to call common sending function to send signal */ + LOG_D(PHY, "Sending Uplink data \n"); + nr_ue_pusch_common_procedures(UE, + slot, + &UE->frame_parms,1); if (n_trials==1) { LOG_M("txsig0.m","txs0", UE->common_vars.txdata[0],frame_parms->samples_per_subframe*10,1,1); From 5bacfb4015a79c9c40ee32e01289b1fcab555986 Mon Sep 17 00:00:00 2001 From: francescomani Date: Thu, 6 May 2021 15:32:23 +0200 Subject: [PATCH 324/579] another attempt at fixing FR2 RA --- openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c | 4 ++-- openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h | 2 +- openair2/LAYER2/NR_MAC_UE/config_ue.c | 5 +++-- openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c | 4 +--- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c index 7004cf7aaf..9df5be86a9 100644 --- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c +++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c @@ -1179,12 +1179,12 @@ int get_format0(uint8_t index, return format; } -int64_t *get_prach_config_info(int fr2_flag, +int64_t *get_prach_config_info(frequency_range_t freq_range, uint8_t index, uint8_t unpaired) { int64_t *prach_config_info_p; - if (fr2_flag > 0) { //FR2 + if (freq_range == FR2) { //FR2 prach_config_info_p = table_6_3_3_2_4_prachConfig_Index[index]; } else { // FR1 diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h index c6cb0341ac..449ddcf49c 100644 --- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h +++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h @@ -113,7 +113,7 @@ int ul_ant_bits(NR_DMRS_UplinkConfig_t *NR_DMRS_UplinkConfig,long transformPreco int get_format0(uint8_t index, uint8_t unpaired,frequency_range_t); -int64_t *get_prach_config_info(int fr2_flag, +int64_t *get_prach_config_info(frequency_range_t freq_range, uint8_t index, uint8_t unpaired); diff --git a/openair2/LAYER2/NR_MAC_UE/config_ue.c b/openair2/LAYER2/NR_MAC_UE/config_ue.c index be723b4cd6..bf87eb3ae5 100755 --- a/openair2/LAYER2/NR_MAC_UE/config_ue.c +++ b/openair2/LAYER2/NR_MAC_UE/config_ue.c @@ -209,7 +209,7 @@ void config_common_ue(NR_UE_MAC_INST_t *mac, } uint32_t band = *scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0]; - frequency_range_t frequency_range = band<100?FR1:FR2; + mac->frequency_range = band<100?FR1:FR2; lte_frame_type_t frame_type = get_frame_type(*scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0], *scc->ssbSubcarrierSpacing); @@ -320,7 +320,8 @@ void config_common_ue(NR_UE_MAC_INST_t *mac, cfg->prach_config.num_prach_fd_occasions_list[i].k1 = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.msg1_FrequencyStart; cfg->prach_config.num_prach_fd_occasions_list[i].prach_zero_corr_conf = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.zeroCorrelationZoneConfig; - cfg->prach_config.num_prach_fd_occasions_list[i].num_root_sequences = compute_nr_root_seq(scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup, nb_preambles, frame_type,frequency_range); + cfg->prach_config.num_prach_fd_occasions_list[i].num_root_sequences = compute_nr_root_seq(scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup, + nb_preambles, frame_type,mac->frequency_range); //cfg->prach_config.num_prach_fd_occasions_list[i].num_unused_root_sequences = ??? } diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c index a85aba0130..ede05abfcc 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c @@ -1210,10 +1210,8 @@ static void build_ro_list(NR_UE_MAC_INST_t *mac) { int unpaired = mac->phy_config.config_req.cell_config.frame_duplex_type; // Identify the proper PRACH Configuration Index table according to the operating frequency LOG_D(NR_MAC,"mu = %u, PRACH config index = %u, unpaired = %u\n", mu, config_index, unpaired); - int fr2_flag=0; - if (downlink_frequency[0][0] > 6e9) fr2_flag = 1; - prach_config_info_p = get_prach_config_info(fr2_flag, config_index, unpaired); + prach_config_info_p = get_prach_config_info(mac->frequency_range, config_index, unpaired); if (mac->frequency_range == FR2) { //FR2 From 9512e914faa9f3f56cf33dc517ccd9c2688505ec Mon Sep 17 00:00:00 2001 From: rmagueta Date: Thu, 6 May 2021 17:46:12 +0100 Subject: [PATCH 325/579] Temporary fix for skip DL slots with invalid dl_DataToUL_ACK timing with OAI UE --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index 6adc65ad37..84ef218120 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -785,6 +785,11 @@ void nr_schedule_ue_spec(module_id_t module_id, if (!is_xlsch_in_slot(gNB_mac->dlsch_slot_bitmap[slot / 64], slot)) return; + // FIXME: Feedback timing for ack/nack are not adapted for OAI UE, which has a rx/tx delay of 6 slots. + // As k2 for pusch needs to be at least 6, dl_DataToUL_ACK needs to be not lower than 6. + if(IS_SOFTMODEM_RFSIM && slot!=1) + return; + /* PREPROCESSOR */ gNB_mac->pre_processor_dl(module_id, frame, slot); From d2ddfa1fbd613a57b3397010578a7e11d9229bd5 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Thu, 6 May 2021 18:41:26 +0100 Subject: [PATCH 326/579] Update SA config files --- .../gnb.sa.band41.fr1.106PRB.usrpb210.conf | 57 ++++++++++--------- .../gnb.sa.band78.fr1.106PRB.usrpb210.conf | 42 +++++--------- 2 files changed, 42 insertions(+), 57 deletions(-) diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf index f82eb09c7b..483f868077 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf @@ -1,4 +1,4 @@ -Active_gNBs = ( "gNB-Eurecom-5GNRBox"); +Active_gNBs = ( "gNB-Eurecom-DU"); # Asn1_verbosity, choice in: none, info, annoying Asn1_verbosity = "none"; @@ -7,15 +7,28 @@ gNBs = { ////////// Identification parameters: gNB_ID = 0xe00; - - cell_type = "CELL_MACRO_GNB"; - gNB_name = "gNB-Eurecom-5GNRBox"; + gNB_name = "gNB-Eurecom-DU"; // Tracking area code, 0x0000 and 0xfffe are reserved values tracking_area_code = 1; - plmn_list = ({mcc = 208; mnc = 92; mnc_length = 2;}); + plmn_list = ({ + mcc = 208; + mnc = 99; + mnc_length = 2; + snssaiList = ( + { + sst = 1; + sd = 0x1; // 0 false, else true + }, + { + sst = 1; + sd = 0x112233; // 0 false, else true + } + ); - tr_s_preference = "local_mac" + }); + + nr_cellid = 12345678L; ////////// Physical parameters: @@ -51,8 +64,8 @@ gNBs = dl_carrierBandwidth = 106; #initialDownlinkBWP #genericParameters - # this is RBstart=41,L=24 (275*(L-1))+RBstart - initialDLBWPlocationAndBandwidth = 12952; # 6366 12925 12956 28875 + # this is RBstart=27,L=48 (275*(L-1))+RBstart + initialDLBWPlocationAndBandwidth = 12952; # 6366 12925 12956 28875 12952 # subcarrierSpacing # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 initialDLBWPsubcarrierSpacing = 1; @@ -191,35 +204,21 @@ gNBs = ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.26"; + amf_ip_address = ( { ipv4 = "192.168.70.132"; ipv6 = "192:168:30::17"; active = "yes"; preference = "ipv4"; } ); - ///X2 - enable_x2 = "no"; - t_reloc_prep = 1000; /* unit: millisecond */ - tx2_reloc_overall = 2000; /* unit: millisecond */ - t_dc_prep = 1000; /* unit: millisecond */ - t_dc_overall = 2000; /* unit: millisecond */ - target_enb_x2_ip_address = ( - { ipv4 = "CI_FR1_CTL_ENB_IP_ADDR"; - ipv6 = "192:168:30::17"; - preference = "ipv4"; - } - ); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_S1_MME = "eth0"; - GNB_IPV4_ADDRESS_FOR_S1_MME = "CI_GNB_IP_ADDR"; - GNB_INTERFACE_NAME_FOR_S1U = "eth0"; - GNB_IPV4_ADDRESS_FOR_S1U = "CI_GNB_IP_ADDR"; + GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai"; + GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.70.129/24"; + GNB_INTERFACE_NAME_FOR_NGU = "demo-oai"; + GNB_IPV4_ADDRESS_FOR_NGU = "192.168.70.129/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 - GNB_IPV4_ADDRESS_FOR_X2C = "CI_GNB_IP_ADDR"; - GNB_PORT_FOR_X2C = 36422; # Spec 36422 }; } @@ -238,7 +237,7 @@ L1s = ( num_cc = 1; tr_n_preference = "local_mac"; pusch_proc_threads = 8; - } + } ); RUs = ( @@ -292,5 +291,7 @@ rfsimulator : pdcp_log_verbosity ="medium"; rrc_log_level ="info"; rrc_log_verbosity ="medium"; + ngap_log_level ="debug"; + ngap_log_verbosity ="medium"; }; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf index 0603c60403..ecdc822fdc 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf @@ -1,4 +1,4 @@ -Active_gNBs = ( "gNB-Eurecom-5GNRBox"); +Active_gNBs = ( "gNB-Eurecom-DU"); # Asn1_verbosity, choice in: none, info, annoying Asn1_verbosity = "none"; @@ -7,9 +7,7 @@ gNBs = { ////////// Identification parameters: gNB_ID = 0xe00; - - cell_type = "CELL_MACRO_GNB"; - gNB_name = "gNB-Eurecom-5GNRBox"; + gNB_name = "gNB-Eurecom-DU"; // Tracking area code, 0x0000 and 0xfffe are reserved values tracking_area_code = 1; @@ -17,20 +15,20 @@ gNBs = mcc = 208; mnc = 99; mnc_length = 2; - snssaiList = ( - { + snssaiList = ( + { sst = 1; - sd = 0x010203; // 0 false, else true + sd = 0x1; // 0 false, else true }, - { + { sst = 1; sd = 0x112233; // 0 false, else true } ); }); - - tr_s_preference = "local_mac" + + nr_cellid = 12345678L; ////////// Physical parameters: @@ -206,35 +204,21 @@ gNBs = ////////// MME parameters: - amf_ip_address = ( { ipv4 = "192.168.69.131"; + amf_ip_address = ( { ipv4 = "192.168.70.132"; ipv6 = "192:168:30::17"; active = "yes"; preference = "ipv4"; } ); - ///X2 - enable_x2 = "no"; - t_reloc_prep = 1000; /* unit: millisecond */ - tx2_reloc_overall = 2000; /* unit: millisecond */ - t_dc_prep = 1000; /* unit: millisecond */ - t_dc_overall = 2000; /* unit: millisecond */ - target_enb_x2_ip_address = ( - { ipv4 = "CI_FR1_CTL_ENB_IP_ADDR"; - ipv6 = "192:168:30::17"; - preference = "ipv4"; - } - ); NETWORK_INTERFACES : { - GNB_INTERFACE_NAME_FOR_NG_AMF = "eth0"; - GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.18.198/24"; - GNB_INTERFACE_NAME_FOR_NGU = "eth0"; - GNB_IPV4_ADDRESS_FOR_NGU = "192.168.18.198/24"; + GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai"; + GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.70.129/24"; + GNB_INTERFACE_NAME_FOR_NGU = "demo-oai"; + GNB_IPV4_ADDRESS_FOR_NGU = "192.168.70.129/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 - GNB_IPV4_ADDRESS_FOR_X2C = "192.168.18.198/24"; - GNB_PORT_FOR_X2C = 36422; # Spec 36422 }; } From 4db9c78450d896965ffd486d7cbe8e03d824f3b5 Mon Sep 17 00:00:00 2001 From: Thomas Schlichter Date: Thu, 6 May 2021 20:27:56 +0200 Subject: [PATCH 327/579] fix PDSCH DMRS configuration type 2 --- openair1/PHY/INIT/nr_init.c | 21 ---- openair1/PHY/INIT/nr_init_ue.c | 8 -- openair1/PHY/NR_REFSIG/nr_dmrs_rx.c | 15 ++- openair1/PHY/NR_REFSIG/refsig_defs_ue.h | 3 +- .../nr_dl_channel_estimation.c | 84 ++++++++-------- openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h | 24 ++--- .../NR_UE_TRANSPORT/nr_dlsch_demodulation.c | 21 ++-- openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c | 1 - openair1/PHY/impl_defs_nr.h | 29 ------ openair1/SCHED_NR_UE/phy_procedures_nr_ue.c | 97 +++++++++---------- openair1/SIMULATION/NR_PHY/dlsim.c | 50 +++++----- openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c | 2 +- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 15 +-- 13 files changed, 149 insertions(+), 221 deletions(-) diff --git a/openair1/PHY/INIT/nr_init.c b/openair1/PHY/INIT/nr_init.c index e05045d3ed..a3f7501016 100644 --- a/openair1/PHY/INIT/nr_init.c +++ b/openair1/PHY/INIT/nr_init.c @@ -586,27 +586,6 @@ void init_nr_transport(PHY_VARS_gNB *gNB) { exit(-1); } - /* - LOG_I(PHY,"Initializing nFAPI for ULSCH, UE %d\n",i); - // [hna] added here for RT implementation - uint8_t harq_pid = 0; - nfapi_nr_ul_config_ulsch_pdu *rel15_ul = &gNB->ulsch[i+1][j]->harq_processes[harq_pid]->ulsch_pdu; - - // --------- setting rel15_ul parameters ---------- - rel15_ul->rnti = 0x1234; - rel15_ul->ulsch_pdu_rel15.start_rb = 0; - rel15_ul->ulsch_pdu_rel15.number_rbs = 50; - rel15_ul->ulsch_pdu_rel15.start_symbol = 2; - rel15_ul->ulsch_pdu_rel15.number_symbols = 12; - rel15_ul->ulsch_pdu_rel15.length_dmrs = gNB->dmrs_UplinkConfig.pusch_maxLength; - rel15_ul->ulsch_pdu_rel15.Qm = 2; - rel15_ul->ulsch_pdu_rel15.R = 679; - rel15_ul->ulsch_pdu_rel15.mcs = 9; - rel15_ul->ulsch_pdu_rel15.rv = 0; - rel15_ul->ulsch_pdu_rel15.n_layers = 1; - /////////////////////////////////////////////////// - */ - } } diff --git a/openair1/PHY/INIT/nr_init_ue.c b/openair1/PHY/INIT/nr_init_ue.c index 855acc01ff..0934270c6d 100644 --- a/openair1/PHY/INIT/nr_init_ue.c +++ b/openair1/PHY/INIT/nr_init_ue.c @@ -142,8 +142,6 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, uint16_t N_n_scid[2] = {0,1}; // [HOTFIX] This is a temporary implementation of scramblingID0 and scramblingID1 which are given by DMRS-UplinkConfig int n_scid; abstraction_flag = 0; - // dmrs_UplinkConfig_t *dmrs_Uplink_Config = &ue->pusch_config.dmrs_UplinkConfig; - // ptrs_UplinkConfig_t *ptrs_Uplink_Config = &ue->pusch_config.dmrs_UplinkConfig.ptrs_UplinkConfig; LOG_I(PHY, "Initializing UE vars (abstraction %u) for gNB TXant %u, UE RXant %u\n", abstraction_flag, fp->nb_antennas_tx, fp->nb_antennas_rx); //LOG_D(PHY,"[MSC_NEW][FRAME 00000][PHY_UE][MOD %02u][]\n", ue->Mod_id+NB_gNB_INST); phy_init_nr_top(ue); @@ -201,13 +199,7 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, } //------------- config DMRS parameters--------------// - // dmrs_Uplink_Config->pusch_dmrs_type = pusch_dmrs_type1; - // dmrs_Uplink_Config->pusch_dmrs_AdditionalPosition = pusch_dmrs_pos0; - // dmrs_Uplink_Config->pusch_maxLength = pusch_len1; - //-------------------------------------------------// - ue->dmrs_DownlinkConfig.pdsch_dmrs_type = pdsch_dmrs_type1; ue->dmrs_DownlinkConfig.pdsch_dmrs_AdditionalPosition = pdsch_dmrs_pos0; - ue->dmrs_DownlinkConfig.pdsch_maxLength = pdsch_len1; //-------------------------------------------------// ue->nr_gold_pusch_dmrs = (uint32_t ****)malloc16(fp->slots_per_frame*sizeof(uint32_t ***)); diff --git a/openair1/PHY/NR_REFSIG/nr_dmrs_rx.c b/openair1/PHY/NR_REFSIG/nr_dmrs_rx.c index 5a4b1adbb8..920b78eac2 100644 --- a/openair1/PHY/NR_REFSIG/nr_dmrs_rx.c +++ b/openair1/PHY/NR_REFSIG/nr_dmrs_rx.c @@ -111,9 +111,10 @@ int nr_pdsch_dmrs_rx(PHY_VARS_NR_UE *ue, int32_t *output, unsigned short p, unsigned char lp, - unsigned short nb_pdsch_rb) + unsigned short nb_pdsch_rb, + uint8_t config_type) { - int8_t w,config_type; + int8_t w; short *mod_table; unsigned char idx=0; @@ -121,18 +122,16 @@ int nr_pdsch_dmrs_rx(PHY_VARS_NR_UE *ue, array_of_w *wf; array_of_w *wt; - config_type = ue->dmrs_DownlinkConfig.pdsch_dmrs_type; - - wf = (config_type==pdsch_dmrs_type1) ? wf1 : wf2; - wt = (config_type==pdsch_dmrs_type1) ? wt1 : wt2; + wf = (config_type==NFAPI_NR_DMRS_TYPE1) ? wf1 : wf2; + wt = (config_type==NFAPI_NR_DMRS_TYPE1) ? wt1 : wt2; if (config_type > 1) LOG_E(PHY,"Bad PDSCH DMRS config type %d\n", config_type); - if ((p>=1000) && (p<((config_type==pdsch_dmrs_type1) ? 1008 : 1012))) { + if ((p>=1000) && (p<((config_type==NFAPI_NR_DMRS_TYPE1) ? 1008 : 1012))) { if (ue->frame_parms.Ncp == NORMAL) { - for (int i=0; ithread_id, eNB_offset,ue->frame_parms.ofdm_symbol_size, + printf("PBCH DMRS Correlation : ThreadId %d, gNB_id %d , OFDM size %d, Ncp=%d, Ns=%d, k=%d symbol %d\n",proc->thread_id, gNB_id,ue->frame_parms.ofdm_symbol_size, ue->frame_parms.Ncp,Ns,k, symbol); #endif @@ -198,7 +198,7 @@ int nr_pbch_dmrs_correlation(PHY_VARS_NR_UE *ue, int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, - uint8_t eNB_offset, + uint8_t gNB_id, unsigned char Ns, unsigned char symbol, int dmrss, @@ -213,10 +213,8 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue, int ch_offset,symbol_offset; //int slot_pbch; - //uint16_t Nid_cell = (eNB_offset == 0) ? ue->frame_parms.Nid_cell : ue->measurements.adj_cell_id[eNB_offset-1]; - uint8_t nushift; - int **dl_ch_estimates =ue->pbch_vars[eNB_offset]->dl_ch_estimates; + int **dl_ch_estimates =ue->pbch_vars[gNB_id]->dl_ch_estimates; int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[proc->thread_id].rxdataF; nushift = ue->frame_parms.Nid_cell%4; @@ -239,7 +237,7 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue, k = nushift; #ifdef DEBUG_CH - printf("PBCH Channel Estimation : ThreadId %d, eNB_offset %d ch_offset %d, OFDM size %d, Ncp=%d, Ns=%d, k=%d symbol %d\n",proc->thread_id, eNB_offset,ch_offset,ue->frame_parms.ofdm_symbol_size, + printf("PBCH Channel Estimation : ThreadId %d, gNB_id %d ch_offset %d, OFDM size %d, Ncp=%d, Ns=%d, k=%d symbol %d\n",proc->thread_id, gNB_id,ch_offset,ue->frame_parms.ofdm_symbol_size, ue->frame_parms.Ncp,Ns,k, symbol); #endif @@ -456,12 +454,12 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue, // do ifft of channel estimate for (aarx=0; aarxframe_parms.nb_antennas_rx; aarx++) for (p=0; pframe_parms.nb_antenna_ports_gNB; p++) { - if (ue->pbch_vars[eNB_offset]->dl_ch_estimates[(p*ue->frame_parms.nb_antennas_rx)+aarx]) + if (ue->pbch_vars[gNB_id]->dl_ch_estimates[(p*ue->frame_parms.nb_antennas_rx)+aarx]) { LOG_D(PHY,"Channel Impulse Computation Slot %d ThreadId %d Symbol %d ch_offset %d\n", Ns, proc->thread_id, symbol, ch_offset); idft(idftsizeidx, - (int16_t*) &ue->pbch_vars[eNB_offset]->dl_ch_estimates[(p*ue->frame_parms.nb_antennas_rx)+aarx][ch_offset], - (int16_t*) ue->pbch_vars[eNB_offset]->dl_ch_estimates_time[(p*ue->frame_parms.nb_antennas_rx)+aarx],1); + (int16_t*) &ue->pbch_vars[gNB_id]->dl_ch_estimates[(p*ue->frame_parms.nb_antennas_rx)+aarx][ch_offset], + (int16_t*) ue->pbch_vars[gNB_id]->dl_ch_estimates_time[(p*ue->frame_parms.nb_antennas_rx)+aarx],1); } } } @@ -474,7 +472,7 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue, int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, - uint8_t eNB_offset, + uint8_t gNB_id, unsigned char Ns, unsigned char symbol, unsigned short coreset_start_subcarrier, @@ -487,9 +485,7 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue, int16_t ch[2],*pil,*rxF,*dl_ch,*fl,*fm,*fr; int ch_offset,symbol_offset; - //uint16_t Nid_cell = (eNB_offset == 0) ? ue->frame_parms.Nid_cell : ue->measurements.adj_cell_id[eNB_offset-1]; - - int **dl_ch_estimates =ue->pdcch_vars[proc->thread_id][eNB_offset]->dl_ch_estimates; + int **dl_ch_estimates =ue->pdcch_vars[proc->thread_id][gNB_id]->dl_ch_estimates; int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[proc->thread_id].rxdataF; @@ -503,7 +499,7 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue, k = coreset_start_subcarrier; #ifdef DEBUG_PDCCH - printf("PDCCH Channel Estimation : ThreadId %d, eNB_offset %d ch_offset %d, OFDM size %d, Ncp=%d, Ns=%d, k=%d symbol %d\n",proc->thread_id, eNB_offset,ch_offset,ue->frame_parms.ofdm_symbol_size, + printf("PDCCH Channel Estimation : ThreadId %d, gNB_id %d ch_offset %d, OFDM size %d, Ncp=%d, Ns=%d, k=%d symbol %d\n",proc->thread_id, gNB_id,ch_offset,ue->frame_parms.ofdm_symbol_size, ue->frame_parms.Ncp,Ns,k, symbol); #endif @@ -521,7 +517,7 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue, // generate pilot int pilot[nb_rb_coreset * 3] __attribute__((aligned(16))); - nr_pdcch_dmrs_rx(ue,eNB_offset,Ns,ue->nr_gold_pdcch[eNB_offset][Ns][symbol], &pilot[0],2000,nb_rb_coreset); + nr_pdcch_dmrs_rx(ue,gNB_id,Ns,ue->nr_gold_pdcch[gNB_id][Ns][symbol], &pilot[0],2000,nb_rb_coreset); for (aarx=0; aarxframe_parms.nb_antennas_rx; aarx++) { @@ -656,7 +652,7 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue, int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, - uint8_t eNB_offset, + uint8_t gNB_id, bool is_SI, unsigned char Ns, unsigned short p, @@ -673,10 +669,12 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue, int16_t *fl,*fm,*fr,*fml,*fmr,*fmm,*fdcl,*fdcr,*fdclh,*fdcrh, *frl, *frr; int ch_offset,symbol_offset; - //uint16_t Nid_cell = (eNB_offset == 0) ? ue->frame_parms.Nid_cell : ue->measurements.adj_cell_id[eNB_offset-1]; + NR_UE_DLSCH_t **dlsch = ue->dlsch[proc->thread_id][gNB_id]; + const unsigned char harq_pid = dlsch[0]->current_harq_pid; + NR_DL_UE_HARQ_t *dlsch0_harq = dlsch[0]->harq_processes[harq_pid]; uint8_t nushift; - int **dl_ch_estimates =ue->pdsch_vars[proc->thread_id][eNB_offset]->dl_ch_estimates; + int **dl_ch_estimates =ue->pdsch_vars[proc->thread_id][gNB_id]->dl_ch_estimates; int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[proc->thread_id].rxdataF; if (ue->high_speed_flag == 0) @@ -690,7 +688,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue, int re_offset = k; #ifdef DEBUG_CH - printf("PDSCH Channel Estimation : ThreadId %d, eNB_offset %d ch_offset %d, symbol_offset %d OFDM size %d, Ncp=%d, Ns=%d, k=%d symbol %d\n",proc->thread_id, eNB_offset,ch_offset,symbol_offset,ue->frame_parms.ofdm_symbol_size, + printf("PDSCH Channel Estimation : ThreadId %d, gNB_id %d ch_offset %d, symbol_offset %d OFDM size %d, Ncp=%d, Ns=%d, k=%d symbol %d\n",proc->thread_id, gNB_id,ch_offset,symbol_offset,ue->frame_parms.ofdm_symbol_size, ue->frame_parms.Ncp,Ns,k, symbol); #endif @@ -699,7 +697,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue, if (is_SI) { rb_offset -= BWPStart; } - uint8_t config_type = ue->dmrs_DownlinkConfig.pdsch_dmrs_type; + uint8_t config_type = dlsch0_harq->dmrsConfigType; int8_t delta = get_delta(p, config_type); // checking if re-initialization of scrambling IDs is needed @@ -709,9 +707,9 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue, nr_gold_pdsch(ue,ue->scramblingID); } - nr_pdsch_dmrs_rx(ue,Ns,ue->nr_gold_pdsch[eNB_offset][Ns][symbol][0], &pilot[0],1000+p,0,nb_rb_pdsch+rb_offset); + nr_pdsch_dmrs_rx(ue, Ns, ue->nr_gold_pdsch[gNB_id][Ns][symbol][0], &pilot[0], 1000+p, 0, nb_rb_pdsch+rb_offset, config_type); - if (config_type == pdsch_dmrs_type1){ + if (config_type == NFAPI_NR_DMRS_TYPE1){ nushift = (p>>1)&1; if (p<4) ue->frame_parms.nushift = nushift; switch (delta) { @@ -751,7 +749,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue, return -1; break; } - } else {//pdsch_dmrs_type2 + } else {//NFAPI_NR_DMRS_TYPE2 nushift = delta; if (p<6) ue->frame_parms.nushift = nushift; switch (delta) { @@ -793,7 +791,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue, } for (aarx=0; aarxframe_parms.nb_antennas_rx; aarx++) { - pil = (int16_t *)&pilot[rb_offset*((config_type==pdsch_dmrs_type1) ? 6:4)]; + pil = (int16_t *)&pilot[rb_offset*((config_type==NFAPI_NR_DMRS_TYPE1) ? 6:4)]; k = k % ue->frame_parms.ofdm_symbol_size; re_offset = k; rxF = (int16_t *)&rxdataF[aarx][(symbol_offset+re_offset+nushift)]; @@ -811,7 +809,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue, printf("dl_ch addr %p nushift %d\n",dl_ch,nushift); #endif - if (config_type == pdsch_dmrs_type1) { + if (config_type == NFAPI_NR_DMRS_TYPE1) { // Treat first 2 pilots specially (left edge) ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15); @@ -948,7 +946,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue, uint16_t idxDC = 2*(ue->frame_parms.ofdm_symbol_size - bwp_start_subcarrier); uint16_t idxPil = idxDC/2; re_offset = k; - pil = (int16_t *)&pilot[rb_offset*((config_type==pdsch_dmrs_type1) ? 6:4)]; + pil = (int16_t *)&pilot[rb_offset*((config_type==NFAPI_NR_DMRS_TYPE1) ? 6:4)]; pil += (idxPil-2); dl_ch += (idxDC-4); dl_ch = memset(dl_ch, 0, sizeof(int16_t)*10); @@ -994,7 +992,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue, 8); } } - } else { //pdsch_dmrs_type2 |dmrs_r,dmrs_l,0,0,0,0,dmrs_r,dmrs_l,0,0,0,0| + } else { //NFAPI_NR_DMRS_TYPE2 |dmrs_r,dmrs_l,0,0,0,0,dmrs_r,dmrs_l,0,0,0,0| // Treat first 4 pilots specially (left edge) ch_l[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15); @@ -1224,16 +1222,15 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue, * * NAME : nr_pdsch_ptrs_processing * - * PARAMETERS : ue : ue data structure + * PARAMETERS : PHY_VARS_NR_UE : ue data structure * NR_UE_PDSCH : pdsch_vars pointer * NR_DL_FRAME_PARMS : frame_parms pointer * NR_DL_UE_HARQ_t : dlsch0_harq pointer * NR_DL_UE_HARQ_t : dlsch1_harq pointer - * uint8_t : eNB_id, + * uint8_t : gNB_id, * uint8_t : nr_slot_rx, * unsigned char : symbol, * uint32_t : nb_re_pdsch, - * unsigned char : harq_pid * uint16_t : rnti * RX_type_t : rx_type * RETURN : Nothing @@ -1249,11 +1246,10 @@ void nr_pdsch_ptrs_processing(PHY_VARS_NR_UE *ue, NR_DL_FRAME_PARMS *frame_parms, NR_DL_UE_HARQ_t *dlsch0_harq, NR_DL_UE_HARQ_t *dlsch1_harq, - uint8_t eNB_id, + uint8_t gNB_id, uint8_t nr_slot_rx, unsigned char symbol, uint32_t nb_re_pdsch, - unsigned char harq_pid, uint16_t rnti, RX_type_t rx_type) { @@ -1284,7 +1280,7 @@ void nr_pdsch_ptrs_processing(PHY_VARS_NR_UE *ue, ptrsSymbPos = &dlsch0_harq->ptrs_symbols; ptrsSymbIdx = &dlsch0_harq->ptrs_symbol_index; ptrsReOffset = &dlsch0_harq->PTRSReOffset; - dmrsConfigType = &dlsch0_harq->ptrs_symbol_index; + dmrsConfigType = &dlsch0_harq->dmrsConfigType; nb_rb = &dlsch0_harq->nb_rb; } if(dlsch1_harq) { @@ -1297,13 +1293,13 @@ void nr_pdsch_ptrs_processing(PHY_VARS_NR_UE *ue, ptrsSymbPos = &dlsch1_harq->ptrs_symbols; ptrsSymbIdx = &dlsch1_harq->ptrs_symbol_index; ptrsReOffset = &dlsch1_harq->PTRSReOffset; - dmrsConfigType = &dlsch1_harq->ptrs_symbol_index; + dmrsConfigType = &dlsch1_harq->dmrsConfigType; nb_rb = &dlsch1_harq->nb_rb; } /* loop over antennas */ for (int aarx=0; aarxnb_antennas_rx; aarx++) { - phase_per_symbol = (int16_t*)pdsch_vars[eNB_id]->ptrs_phase_per_slot[aarx]; - ptrs_re_symbol = (int32_t*)pdsch_vars[eNB_id]->ptrs_re_per_slot[aarx]; + phase_per_symbol = (int16_t*)pdsch_vars[gNB_id]->ptrs_phase_per_slot[aarx]; + ptrs_re_symbol = (int32_t*)pdsch_vars[gNB_id]->ptrs_re_per_slot[aarx]; ptrs_re_symbol[symbol] = 0; phase_per_symbol[(2*symbol)+1] = 0; // Imag /* set DMRS estimates to 0 angle with magnitude 1 */ @@ -1337,11 +1333,11 @@ void nr_pdsch_ptrs_processing(PHY_VARS_NR_UE *ue, /*------------------------------------------------------------------------------------------------------- */ nr_ptrs_cpe_estimation(*K_ptrs,*ptrsReOffset,*dmrsConfigType,*nb_rb, rnti, - (int16_t *)&pdsch_vars[eNB_id]->dl_ch_ptrs_estimates_ext[aarx][symbol*nb_re_pdsch], + (int16_t *)&pdsch_vars[gNB_id]->dl_ch_ptrs_estimates_ext[aarx][symbol*nb_re_pdsch], nr_slot_rx, symbol,frame_parms->ofdm_symbol_size, - (int16_t*)&pdsch_vars[eNB_id]->rxdataF_comp0[aarx][(symbol * nb_re_pdsch)], - ue->nr_gold_pdsch[eNB_id][nr_slot_rx][symbol][0], + (int16_t*)&pdsch_vars[gNB_id]->rxdataF_comp0[aarx][(symbol * nb_re_pdsch)], + ue->nr_gold_pdsch[gNB_id][nr_slot_rx][symbol][0], &phase_per_symbol[2* symbol], &ptrs_re_symbol[symbol]); } @@ -1360,9 +1356,9 @@ void nr_pdsch_ptrs_processing(PHY_VARS_NR_UE *ue, } } #ifdef DEBUG_DL_PTRS - LOG_M("ptrsEst.m","est",pdsch_vars[eNB_id]->ptrs_phase_per_slot[aarx],frame_parms->symbols_per_slot,1,1 ); + LOG_M("ptrsEst.m","est",pdsch_vars[gNB_id]->ptrs_phase_per_slot[aarx],frame_parms->symbols_per_slot,1,1 ); LOG_M("rxdataF_bf_ptrs_comp.m","bf_ptrs_cmp", - &pdsch_vars[eNB_id]->rxdataF_comp0[aarx][(*startSymbIndex) * NR_NB_SC_PER_RB * (*nb_rb) ], + &pdsch_vars[gNB_id]->rxdataF_comp0[aarx][(*startSymbIndex) * NR_NB_SC_PER_RB * (*nb_rb) ], (*nb_rb) * NR_NB_SC_PER_RB * (*nbSymb),1,1); #endif /*------------------------------------------------------------------------------------------------------- */ @@ -1375,9 +1371,9 @@ void nr_pdsch_ptrs_processing(PHY_VARS_NR_UE *ue, #ifdef DEBUG_DL_PTRS printf("[PHY][DL][PTRS]: Rotate Symbol %2d with %d + j* %d\n", i, phase_per_symbol[2* i],phase_per_symbol[(2* i) +1]); #endif - rotate_cpx_vector((int16_t*)&pdsch_vars[eNB_id]->rxdataF_comp0[aarx][(i * (*nb_rb) * NR_NB_SC_PER_RB)], + rotate_cpx_vector((int16_t*)&pdsch_vars[gNB_id]->rxdataF_comp0[aarx][(i * (*nb_rb) * NR_NB_SC_PER_RB)], &phase_per_symbol[2* i], - (int16_t*)&pdsch_vars[eNB_id]->rxdataF_comp0[aarx][(i * (*nb_rb) * NR_NB_SC_PER_RB)], + (int16_t*)&pdsch_vars[gNB_id]->rxdataF_comp0[aarx][(i * (*nb_rb) * NR_NB_SC_PER_RB)], ((*nb_rb) * NR_NB_SC_PER_RB), 15); }// if not DMRS Symbol }// symbol loop diff --git a/openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h b/openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h index 1466fabe5d..c5330ce2f2 100644 --- a/openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h +++ b/openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h @@ -34,17 +34,14 @@ /*! \brief This function performs channel estimation including frequency and temporal interpolation -\param phy_vars_ue Pointer to UE PHY variables -\param eNB_id Index of target eNB -\param eNB_offset Offset for interfering eNB (in terms cell ID mod 3) +\param ue Pointer to UE PHY variables +\param gNB_id Index of target gNB \param Ns slot number (0..19) -\param p antenna port -\param l symbol within slot -\param symbol symbol within frame +\param symbol symbol within slot */ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, - uint8_t eNB_offset, + uint8_t gNB_id, unsigned char Ns, unsigned char symbol, unsigned short coreset_start_subcarrier, @@ -52,7 +49,7 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue, int nr_pbch_dmrs_correlation(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, - uint8_t eNB_offset, + uint8_t gNB_id, unsigned char Ns, unsigned char symbol, int dmrss, @@ -60,7 +57,7 @@ int nr_pbch_dmrs_correlation(PHY_VARS_NR_UE *ue, int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, - uint8_t eNB_offset, + uint8_t gNB_id, unsigned char Ns, unsigned char symbol, int dmrss, @@ -69,7 +66,7 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue, int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, - uint8_t eNB_offset, + uint8_t gNB_id, bool is_SI, unsigned char Ns, unsigned short p, @@ -80,7 +77,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue, void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms, PHY_VARS_NR_UE *ue, - module_id_t eNB_id, + module_id_t gNB_id, uint8_t frame, uint8_t subframe, unsigned char clear, @@ -102,7 +99,7 @@ void nr_ue_rrc_measurements(PHY_VARS_NR_UE *ue, void phy_adjust_gain_nr(PHY_VARS_NR_UE *ue, uint32_t rx_power_fil_dB, - uint8_t eNB_id); + uint8_t gNB_id); int16_t get_nr_PL(uint8_t Mod_id, uint8_t CC_id, uint8_t gNB_index); @@ -111,11 +108,10 @@ void nr_pdsch_ptrs_processing(PHY_VARS_NR_UE *ue, NR_DL_FRAME_PARMS *frame_parms, NR_DL_UE_HARQ_t *dlsch0_harq, NR_DL_UE_HARQ_t *dlsch1_harq, - uint8_t eNB_id, + uint8_t gNB_id, uint8_t nr_slot_rx, unsigned char symbol, uint32_t nb_re_pdsch, - unsigned char harq_pid, uint16_t rnti, RX_type_t rx_type); diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c index 2d44aca767..6bdf10aa68 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c @@ -186,8 +186,6 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, //int16_t *pllr_symbol_cw0_deint; //int16_t *pllr_symbol_cw1_deint; //uint16_t bundle_L = 2; - uint8_t pilots=0; - uint8_t config_type;// We should not use ue->dmrs_DownlinkConfig.pdsch_dmrs_type; uint16_t n_tx=1, n_rx=1; int32_t median[16]; uint32_t len; @@ -344,8 +342,8 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, printf("Demod dlsch0_harq->pmi_alloc %d\n", dlsch0_harq->pmi_alloc); #endif - pilots = ((1<dlDmrsSymbPos)>0 ? 1 : 0; - config_type = dlsch0_harq->dmrsConfigType; + uint8_t pilots = (dlsch0_harq->dlDmrsSymbPos >> symbol) & 1; + uint8_t config_type = dlsch0_harq->dmrsConfigType; if (beamforming_mode==0) {//No beamforming #if UE_TIMING_TRACE @@ -389,7 +387,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, return(-1); } - len = (pilots==1)? ((config_type==pdsch_dmrs_type1)?nb_rb*(12-6*dlsch0_harq->n_dmrs_cdm_groups): nb_rb*(12-4*dlsch0_harq->n_dmrs_cdm_groups)):(nb_rb*12); + len = (pilots==1)? ((config_type==NFAPI_NR_DMRS_TYPE1)?nb_rb*(12-6*dlsch0_harq->n_dmrs_cdm_groups): nb_rb*(12-4*dlsch0_harq->n_dmrs_cdm_groups)):(nb_rb*12); #if UE_TIMING_TRACE stop_meas(&ue->generic_stat_bis[proc->thread_id][slot]); @@ -643,7 +641,6 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, nr_slot_rx, symbol, (nb_rb*12), - harq_pid, dlsch[0]->rnti,rx_type); pdsch_vars[gNB_id]->dl_valid_re[symbol-1] -= pdsch_vars[gNB_id]->ptrs_re_per_slot[0][symbol]; } @@ -2061,7 +2058,7 @@ unsigned short nr_dlsch_extract_rbs_single(int **rxdataF, unsigned char j=0; - if (config_type==pdsch_dmrs_type1) { + if (config_type==NFAPI_NR_DMRS_TYPE1) { AssertFatal(n_dmrs_cdm_groups == 1 || n_dmrs_cdm_groups == 2, "n_dmrs_cdm_groups %d is illegal\n",n_dmrs_cdm_groups); nushift = n_dmrs_cdm_groups -1;//delta in Table 7.4.1.1.2-1 @@ -2097,7 +2094,7 @@ unsigned short nr_dlsch_extract_rbs_single(int **rxdataF, rxF_ext+=12; } else {//the symbol contains DMRS j=0; - if (config_type==pdsch_dmrs_type1){ + if (config_type==NFAPI_NR_DMRS_TYPE1){ if (nushift == 0) {//data is multiplexed for (i = (1-nushift); i<12; i+=2) { rxF_ext[j]=rxF[i]; @@ -2107,7 +2104,7 @@ unsigned short nr_dlsch_extract_rbs_single(int **rxdataF, dl_ch0_ext+=6; rxF_ext+=6; } - } else {//pdsch_dmrs_type2 + } else {//NFAPI_NR_DMRS_TYPE2 for (i = (2+nushift); i<6; i++) { rxF_ext[j]=rxF[i]; dl_ch0_ext[j]=dl_ch0[i]; @@ -2155,7 +2152,7 @@ unsigned short nr_dlsch_extract_rbs_multiple(int **rxdataF, int *dl_ch0,*dl_ch0_ext,*rxF,*rxF_ext; int8_t validDmrsEst = 0; //store last DMRS Symbol index - if (config_type==pdsch_dmrs_type1) { + if (config_type==NFAPI_NR_DMRS_TYPE1) { AssertFatal(n_dmrs_cdm_groups == 1 || n_dmrs_cdm_groups == 2, "n_dmrs_cdm_groups %d is illegal\n",n_dmrs_cdm_groups); nushift = n_dmrs_cdm_groups -1;//delta in Table 7.4.1.1.2-1 @@ -2193,7 +2190,7 @@ unsigned short nr_dlsch_extract_rbs_multiple(int **rxdataF, } else {//the symbol contains DMRS j=0; - if (config_type==pdsch_dmrs_type1) { + if (config_type==NFAPI_NR_DMRS_TYPE1) { if (nushift == 0) {//data is multiplexed for (i = (1-nushift); i<12; i+=2) { if (aatx==0) rxF_ext[j]=rxF[i]; @@ -2204,7 +2201,7 @@ unsigned short nr_dlsch_extract_rbs_multiple(int **rxdataF, if (aatx==0) rxF_ext+=6; } } - else {//pdsch_dmrs_type2 + else {//NFAPI_NR_DMRS_TYPE2 for (i = (2+nushift); i<6; i++) { if (aatx==0) rxF_ext[j]=rxF[i]; dl_ch0_ext[j]=dl_ch0[i]; diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c index 60b87fae08..8ba1b80cc2 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c @@ -114,7 +114,6 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE, NR_DL_FRAME_PARMS *frame_parms = &UE->frame_parms; NR_UE_PUSCH *pusch_ue = UE->pusch_vars[thread_id][gNB_id]; - // ptrs_UplinkConfig_t *ptrs_Uplink_Config = &UE->pusch_config.dmrs_UplinkConfig.ptrs_UplinkConfig; uint8_t num_of_codewords = 1; // tmp assumption int Nid_cell = 0; diff --git a/openair1/PHY/impl_defs_nr.h b/openair1/PHY/impl_defs_nr.h index fad578c8b0..750f00e1cb 100644 --- a/openair1/PHY/impl_defs_nr.h +++ b/openair1/PHY/impl_defs_nr.h @@ -493,10 +493,6 @@ typedef struct{ // The IE PUSCH-ServingCellConfig is used to configure UE specif typedef struct{ // CSI-MeasConfig IE is used to configure CSI-RS (reference signals) uint8_t reportTriggerSize; } csi_MeasConfig_t; -typedef enum { - pdsch_dmrs_type1 = 0, - pdsch_dmrs_type2 = 1 -} pdsch_dmrs_type_t; typedef enum { pusch_dmrs_type1 = 0, pusch_dmrs_type2 = 1 @@ -518,10 +514,6 @@ typedef enum { offset10 = 2, offset11 = 3, } ptrs_resource_elementoffset_t; -typedef enum { - pdsch_len1 = 1, - pdsch_len2 = 2 -} pdsch_maxLength_t; typedef enum { pusch_len1 = 1, pusch_len2 = 2 @@ -535,28 +527,11 @@ typedef struct { uint16_t n_rb0; uint16_t n_rb1; } ptrs_frequency_density_t; -typedef struct { // The IE PTRS-UplinkConfig is used to configure uplink Phase-Tracking-Reference-Signals (PTRS) - uint8_t num_ptrs_ports; - ptrs_resource_elementoffset_t resourceElementOffset; - ptrs_time_density_t timeDensity; - ptrs_frequency_density_t frequencyDensity; - uint32_t ul_ptrs_power; -} ptrs_UplinkConfig_t; typedef struct { // The IE DMRS-DownlinkConfig is used to configure downlink demodulation reference signals for PDSCH - pdsch_dmrs_type_t pdsch_dmrs_type; pdsch_dmrs_AdditionalPosition_t pdsch_dmrs_AdditionalPosition; - pdsch_maxLength_t pdsch_maxLength; uint16_t scramblingID0; uint16_t scramblingID1; } dmrs_DownlinkConfig_t; -typedef struct { // The IE DMRS-UplinkConfig is used to configure uplink demodulation reference signals for PUSCH - pusch_dmrs_type_t pusch_dmrs_type; - pusch_dmrs_AdditionalPosition_t pusch_dmrs_AdditionalPosition; - pusch_maxLength_t pusch_maxLength; - ptrs_UplinkConfig_t ptrs_UplinkConfig; - uint16_t scramblingID0; - uint16_t scramblingID1; -} dmrs_UplinkConfig_t; typedef struct { /* * Serving cell ID of a PSCell. The PCell of the Master Cell Group uses ID = 0 @@ -640,10 +615,6 @@ typedef struct { * resourceAllocation */ ul_resourceAllocation_t ul_resourceAllocation; -/* - * DMRS-Uplinkconfig - */ - dmrs_UplinkConfig_t dmrs_UplinkConfig; /* * rgb_Size */ diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c index e801e79ae4..125cc3702f 100644 --- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c +++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c @@ -287,7 +287,7 @@ void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue, void nr_ue_measurement_procedures(uint16_t l, PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, - uint8_t eNB_id, + uint8_t gNB_id, uint16_t slot){ NR_DL_FRAME_PARMS *frame_parms=&ue->frame_parms; @@ -307,7 +307,7 @@ void nr_ue_measurement_procedures(uint16_t l, #if T_TRACER if(slot == 0) - T(T_UE_PHY_MEAS, T_INT(eNB_id), T_INT(ue->Mod_id), T_INT(frame_rx%1024), T_INT(nr_slot_rx), + T(T_UE_PHY_MEAS, T_INT(gNB_id), T_INT(ue->Mod_id), T_INT(frame_rx%1024), T_INT(nr_slot_rx), T_INT((int)(10*log10(ue->measurements.rsrp[0])-ue->rx_total_gain_dB)), T_INT((int)ue->measurements.rx_rssi_dBm[0]), T_INT((int)(ue->measurements.rx_power_avg_dB[0] - ue->measurements.n0_power_avg_dB)), @@ -326,8 +326,8 @@ void nr_ue_measurement_procedures(uint16_t l, VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GAIN_CONTROL, VCD_FUNCTION_IN); - //printf("start adjust gain power avg db %d\n", ue->measurements.rx_power_avg_dB[eNB_id]); - phy_adjust_gain_nr (ue,ue->measurements.rx_power_avg_dB[eNB_id],eNB_id); + //printf("start adjust gain power avg db %d\n", ue->measurements.rx_power_avg_dB[gNB_id]); + phy_adjust_gain_nr (ue,ue->measurements.rx_power_avg_dB[gNB_id],gNB_id); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GAIN_CONTROL, VCD_FUNCTION_OUT); @@ -737,12 +737,12 @@ int nr_ue_pdcch_procedures(uint8_t gNB_id, } #endif // NR_PDCCH_SCHED -int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int eNB_id, PDSCH_t pdsch, NR_UE_DLSCH_t *dlsch0, NR_UE_DLSCH_t *dlsch1) { +int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int gNB_id, PDSCH_t pdsch, NR_UE_DLSCH_t *dlsch0, NR_UE_DLSCH_t *dlsch1) { int frame_rx = proc->frame_rx; int nr_slot_rx = proc->nr_slot_rx; int m; - int i_mod,eNB_id_i,dual_stream_UE; + int i_mod,gNB_id_i,dual_stream_UE; int first_symbol_flag=0; if (!dlsch0) @@ -760,15 +760,14 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int eNB_ uint16_t s1 = dlsch0_harq->nb_symbols; bool is_SI = dlsch0->rnti_type == _SI_RNTI_; - LOG_D(PHY,"[UE %d] PDSCH type %d active in nr_slot_rx %d, harq_pid %d (%d), rb_start %d, nb_rb %d, symbol_start %d, nb_symbols %d, DMRS mask %x\n",ue->Mod_id,pdsch,nr_slot_rx,harq_pid,dlsch0->harq_processes[harq_pid]->status,pdsch_start_rb,pdsch_nb_rb,s0,s1,dlsch0->harq_processes[harq_pid]->dlDmrsSymbPos); + LOG_D(PHY,"[UE %d] PDSCH type %d active in nr_slot_rx %d, harq_pid %d (%d), rb_start %d, nb_rb %d, symbol_start %d, nb_symbols %d, DMRS mask %x\n",ue->Mod_id,pdsch,nr_slot_rx,harq_pid,dlsch0_harq->status,pdsch_start_rb,pdsch_nb_rb,s0,s1,dlsch0_harq->dlDmrsSymbPos); for (m = s0; m < (s0 +s1); m++) { - if (((1<harq_processes[harq_pid]->dlDmrsSymbPos) > 0) { - ue->dmrs_DownlinkConfig.pdsch_dmrs_type = dlsch0_harq->dmrsConfigType;//DL channel estimation uses ue->dmrs_DownlinkConfig.pdsch_dmrs_type + if (dlsch0_harq->dlDmrsSymbPos & (1 << m)) { for (uint8_t aatx=0; aatxNl; aatx++) {//for MIMO Config: it shall loop over no_layers nr_pdsch_channel_estimation(ue, proc, - 0 /*eNB_id*/, + gNB_id, is_SI, nr_slot_rx, aatx /*p*/, @@ -783,7 +782,7 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int eNB_ char filename[100]; for (uint8_t aarx=0; aarxframe_parms.nb_antennas_rx; aarx++) { sprintf(filename,"PDSCH_CHANNEL_frame%d_slot%d_sym%d_port%d_rx%d.m", nr_frame_rx, nr_slot_rx, m, aatx,aarx); - int **dl_ch_estimates = ue->pdsch_vars[proc->thread_id][eNB_id]->dl_ch_estimates; + int **dl_ch_estimates = ue->pdsch_vars[proc->thread_id][gNB_id]->dl_ch_estimates; LOG_M(filename,"channel_F",&dl_ch_estimates[aatx*ue->frame_parms.nb_antennas_rx+aarx][ue->frame_parms.ofdm_symbol_size*m],ue->frame_parms.ofdm_symbol_size, 1, 1); } #endif @@ -796,7 +795,7 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int eNB_ uint16_t first_symbol_with_data = s0; uint32_t dmrs_data_re; - if (dlsch0_harq->dmrsConfigType == pdsch_dmrs_type1) + if (dlsch0_harq->dmrsConfigType == NFAPI_NR_DMRS_TYPE1) dmrs_data_re = 12 - 6 * dlsch0_harq->n_dmrs_cdm_groups; else dmrs_data_re = 12 - 4 * dlsch0_harq->n_dmrs_cdm_groups; @@ -808,7 +807,7 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int eNB_ for (m = s0; m < (s1 + s0); m++) { dual_stream_UE = 0; - eNB_id_i = eNB_id+1; + gNB_id_i = gNB_id+1; i_mod = 0; if (( m==first_symbol_with_data ) && (m<4)) first_symbol_flag = 1; @@ -827,15 +826,15 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int eNB_ if (nr_rx_pdsch(ue, proc, pdsch, - eNB_id, - eNB_id_i, + gNB_id, + gNB_id_i, frame_rx, nr_slot_rx, m, first_symbol_flag, dual_stream_UE, i_mod, - dlsch0->current_harq_pid) < 0) + harq_pid) < 0) return -1; } else AssertFatal(1==0,"Not RA_PDSCH, SI_PDSCH or PDSCH\n"); @@ -858,7 +857,7 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int eNB_ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, - int eNB_id, + int gNB_id, PDSCH_t pdsch, NR_UE_DLSCH_t *dlsch0, NR_UE_DLSCH_t *dlsch1, @@ -878,7 +877,7 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue, fapi_nr_rx_indication_t rx_ind; uint16_t number_pdus = 1; // params for UL time alignment procedure - NR_UL_TIME_ALIGNMENT_t *ul_time_alignment = &ue->ul_time_alignment[eNB_id]; + NR_UL_TIME_ALIGNMENT_t *ul_time_alignment = &ue->ul_time_alignment[gNB_id]; uint8_t is_cw0_active = dlsch0->harq_processes[harq_pid]->status; uint16_t nb_symb_sch = dlsch0->harq_processes[harq_pid]->nb_symbols; @@ -915,7 +914,7 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue, case RA_PDSCH: case P_PDSCH: case PDSCH: - pdsch_vars = ue->pdsch_vars[proc->thread_id][eNB_id]; + pdsch_vars = ue->pdsch_vars[proc->thread_id][gNB_id]; break; case PMCH: case PDSCH1: @@ -933,8 +932,8 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue, *dlsch_errors=0; if (pdsch == RA_PDSCH) { - if (ue->prach_resources[eNB_id]!=NULL) - dlsch0->rnti = ue->prach_resources[eNB_id]->ra_RNTI; + if (ue->prach_resources[gNB_id]!=NULL) + dlsch0->rnti = ue->prach_resources[gNB_id]->ra_RNTI; else { LOG_E(PHY,"[UE %d] Frame %d, nr_slot_rx %d: FATAL, prach_resources is NULL\n", ue->Mod_id, frame_rx, nr_slot_rx); //mac_xface->macphy_exit("prach_resources is NULL"); @@ -975,7 +974,7 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue, LOG_I(PHY,"start ldpc decode for CW 0 for AbsSubframe %d.%d / %d --> Nl %d \n", frame_rx, nr_slot_rx, harq_pid, dlsch0->harq_processes[harq_pid]->Nl); LOG_I(PHY,"start ldpc decode for CW 0 for AbsSubframe %d.%d / %d --> G %d \n", frame_rx, nr_slot_rx, harq_pid, dlsch0->harq_processes[harq_pid]->G); LOG_I(PHY,"start ldpc decode for CW 0 for AbsSubframe %d.%d / %d --> Kmimo %d \n", frame_rx, nr_slot_rx, harq_pid, dlsch0->Kmimo); - LOG_I(PHY,"start ldpc decode for CW 0 for AbsSubframe %d.%d / %d --> Pdcch Sym %d \n", frame_rx, nr_slot_rx, harq_pid, ue->pdcch_vars[proc->thread_id][eNB_id]->num_pdcch_symbols); + LOG_I(PHY,"start ldpc decode for CW 0 for AbsSubframe %d.%d / %d --> Pdcch Sym %d \n", frame_rx, nr_slot_rx, harq_pid, ue->pdcch_vars[proc->thread_id][gNB_id]->num_pdcch_symbols); #endif #if UE_TIMING_TRACE @@ -986,7 +985,7 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue, { ret = nr_dlsch_decoding_mthread(ue, proc, - eNB_id, + gNB_id, pdsch_vars->llr[0], &ue->frame_parms, dlsch0, @@ -1003,7 +1002,7 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue, { ret = nr_dlsch_decoding(ue, proc, - eNB_id, + gNB_id, pdsch_vars->llr[0], &ue->frame_parms, dlsch0, @@ -1061,7 +1060,7 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue, LOG_I(PHY,"start ldpc decode for CW 1 for AbsSubframe %d.%d / %d --> Nl %d \n", frame_rx, nr_slot_rx, harq_pid, dlsch1->harq_processes[harq_pid]->Nl); LOG_I(PHY,"start ldpc decode for CW 1 for AbsSubframe %d.%d / %d --> G %d \n", frame_rx, nr_slot_rx, harq_pid, dlsch1->harq_processes[harq_pid]->G); LOG_I(PHY,"start ldpc decode for CW 1 for AbsSubframe %d.%d / %d --> Kmimo %d \n", frame_rx, nr_slot_rx, harq_pid, dlsch1->Kmimo); - LOG_I(PHY,"start ldpc decode for CW 1 for AbsSubframe %d.%d / %d --> Pdcch Sym %d \n", frame_rx, nr_slot_rx, harq_pid, ue->pdcch_vars[proc->thread_id][eNB_id]->num_pdcch_symbols); + LOG_I(PHY,"start ldpc decode for CW 1 for AbsSubframe %d.%d / %d --> Pdcch Sym %d \n", frame_rx, nr_slot_rx, harq_pid, ue->pdcch_vars[proc->thread_id][gNB_id]->num_pdcch_symbols); #endif #if UE_TIMING_TRACE @@ -1072,7 +1071,7 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue, { ret1 = nr_dlsch_decoding_mthread(ue, proc, - eNB_id, + gNB_id, pdsch_vars->llr[1], &ue->frame_parms, dlsch1, @@ -1089,7 +1088,7 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue, { ret1 = nr_dlsch_decoding(ue, proc, - eNB_id, + gNB_id, pdsch_vars->llr[1], &ue->frame_parms, dlsch1, @@ -1131,18 +1130,18 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue, switch (pdsch) { case RA_PDSCH: - nr_fill_dl_indication(&dl_indication, NULL, &rx_ind, proc, ue, eNB_id); - nr_fill_rx_indication(&rx_ind, FAPI_NR_RX_PDU_TYPE_RAR, eNB_id, ue, dlsch0, number_pdus); + nr_fill_dl_indication(&dl_indication, NULL, &rx_ind, proc, ue, gNB_id); + nr_fill_rx_indication(&rx_ind, FAPI_NR_RX_PDU_TYPE_RAR, gNB_id, ue, dlsch0, number_pdus); - ue->UE_mode[eNB_id] = RA_RESPONSE; + ue->UE_mode[gNB_id] = RA_RESPONSE; break; case PDSCH: - nr_fill_dl_indication(&dl_indication, NULL, &rx_ind, proc, ue, eNB_id); - nr_fill_rx_indication(&rx_ind, FAPI_NR_RX_PDU_TYPE_DLSCH, eNB_id, ue, dlsch0, number_pdus); + nr_fill_dl_indication(&dl_indication, NULL, &rx_ind, proc, ue, gNB_id); + nr_fill_rx_indication(&rx_ind, FAPI_NR_RX_PDU_TYPE_DLSCH, gNB_id, ue, dlsch0, number_pdus); break; case SI_PDSCH: - nr_fill_dl_indication(&dl_indication, NULL, &rx_ind, proc, ue, eNB_id); - nr_fill_rx_indication(&rx_ind, FAPI_NR_RX_PDU_TYPE_SIB, eNB_id, ue, dlsch0, number_pdus); + nr_fill_dl_indication(&dl_indication, NULL, &rx_ind, proc, ue, gNB_id); + nr_fill_rx_indication(&rx_ind, FAPI_NR_RX_PDU_TYPE_SIB, gNB_id, ue, dlsch0, number_pdus); break; default: break; @@ -1433,9 +1432,9 @@ void *UE_thread_slot1_dl_processing(void *arg) { #endif // start slave thread for Pdsch Procedure (slot1) // do procedures for C-RNTI - uint8_t eNB_id = 0; + uint8_t gNB_id = 0; - if (ue->dlsch[proc->thread_id][eNB_id][0]->active == 1) { + if (ue->dlsch[proc->thread_id][gNB_id][0]->active == 1) { //wait until first ofdm symbol is processed //wait = 0; //while(proc->first_symbol_available == 0) @@ -1448,9 +1447,9 @@ void *UE_thread_slot1_dl_processing(void *arg) { //VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_IN); ue_pdsch_procedures(ue, proc, - eNB_id, + gNB_id, PDSCH, - ue->dlsch[proc->thread_id][eNB_id][0], + ue->dlsch[proc->thread_id][gNB_id][0], NULL, (ue->frame_parms.symbols_per_slot>>1), ue->frame_parms.symbols_per_slot-1, @@ -1460,12 +1459,12 @@ void *UE_thread_slot1_dl_processing(void *arg) { } // do procedures for SI-RNTI - if ((ue->dlsch_SI[eNB_id]) && (ue->dlsch_SI[eNB_id]->active == 1)) { + if ((ue->dlsch_SI[gNB_id]) && (ue->dlsch_SI[gNB_id]->active == 1)) { ue_pdsch_procedures(ue, proc, - eNB_id, + gNB_id, SI_PDSCH, - ue->dlsch_SI[eNB_id], + ue->dlsch_SI[gNB_id], NULL, (ue->frame_parms.symbols_per_slot>>1), ue->frame_parms.symbols_per_slot-1, @@ -1473,24 +1472,24 @@ void *UE_thread_slot1_dl_processing(void *arg) { } // do procedures for P-RNTI - if ((ue->dlsch_p[eNB_id]) && (ue->dlsch_p[eNB_id]->active == 1)) { + if ((ue->dlsch_p[gNB_id]) && (ue->dlsch_p[gNB_id]->active == 1)) { ue_pdsch_procedures(ue, proc, - eNB_id, + gNB_id, P_PDSCH, - ue->dlsch_p[eNB_id], + ue->dlsch_p[gNB_id], NULL, (ue->frame_parms.symbols_per_slot>>1), ue->frame_parms.symbols_per_slot-1, abstraction_flag); } // do procedures for RA-RNTI - if ((ue->dlsch_ra[eNB_id]) && (ue->dlsch_ra[eNB_id]->active == 1) && (UE_mode != PUSCH)) { + if ((ue->dlsch_ra[gNB_id]) && (ue->dlsch_ra[gNB_id]->active == 1) && (UE_mode != PUSCH)) { ue_pdsch_procedures(ue, proc, - eNB_id, + gNB_id, RA_PDSCH, - ue->dlsch_ra[eNB_id], + ue->dlsch_ra[gNB_id], NULL, (ue->frame_parms.symbols_per_slot>>1), ue->frame_parms.symbols_per_slot-1, @@ -1650,7 +1649,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue, #if UE_TIMING_TRACE start_meas(&ue->dlsch_channel_estimation_stats); #endif - nr_pbch_channel_estimation(ue,proc,0,nr_slot_rx,(ue->symbol_offset+i)%(fp->symbols_per_slot),i-1,(fp->ssb_index)&7,fp->half_frame_bit); + nr_pbch_channel_estimation(ue,proc,gNB_id,nr_slot_rx,(ue->symbol_offset+i)%(fp->symbols_per_slot),i-1,(fp->ssb_index)&7,fp->half_frame_bit); #if UE_TIMING_TRACE stop_meas(&ue->dlsch_channel_estimation_stats); #endif @@ -1710,7 +1709,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue, if (coreset_nb_rb > 0) nr_pdcch_channel_estimation(ue, proc, - 0, + gNB_id, nr_slot_rx, l, fp->first_carrier_offset+(pdcch_vars->pdcch_config[n_ss].BWPStart + coreset_start_rb)*12, diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index e3c07f910e..ddeb2a0d54 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -214,7 +214,7 @@ int oai_nfapi_ul_tti_req(nfapi_nr_ul_tti_request_t *ul_tti_req){ return(0); } // needed for some functions openair0_config_t openair0_cfg[MAX_CARDS]; void update_ptrs_config(NR_CellGroupConfig_t *secondaryCellGroup, uint16_t *rbSize, uint8_t *mcsIndex,int8_t *ptrs_arg); -void update_dmrs_config(NR_CellGroupConfig_t *scg,PHY_VARS_NR_UE *ue, int8_t* dmrs_arg); +void update_dmrs_config(NR_CellGroupConfig_t *scg, int8_t* dmrs_arg); extern void fix_scd(NR_ServingCellConfig_t *scd);// forward declaration /* specific dlsim DL preprocessor: uses rbStart/rbSize/mcs/nrOfLayers from command line of @@ -742,7 +742,7 @@ int main(int argc, char **argv) fix_scd(scd); /* -U option modify DMRS */ if(modify_dmrs) { - update_dmrs_config(secondaryCellGroup, NULL,dmrs_arg); + update_dmrs_config(secondaryCellGroup, dmrs_arg); } /* -T option enable PTRS */ if(enable_ptrs) { @@ -872,9 +872,6 @@ int main(int argc, char **argv) exit(-1); } - if(modify_dmrs) { - update_dmrs_config( NULL,UE,dmrs_arg); - } init_nr_ue_transport(UE,0); nr_gold_pbch(UE); @@ -1402,11 +1399,12 @@ void update_ptrs_config(NR_CellGroupConfig_t *secondaryCellGroup, uint16_t *rbSi rrc_config_dl_ptrs_params(bwp, ptrsFreqDenst, ptrsTimeDenst, &epre_Ratio, &reOffset); } -void update_dmrs_config(NR_CellGroupConfig_t *scg,PHY_VARS_NR_UE *ue, int8_t* dmrs_arg) +void update_dmrs_config(NR_CellGroupConfig_t *scg, int8_t* dmrs_arg) { int8_t mapping_type = typeA;//default value int8_t add_pos = pdsch_dmrs_pos0;//default value - int8_t dmrs_config_type = pdsch_dmrs_type1;//default value + int8_t dmrs_config_type = NFAPI_NR_DMRS_TYPE1;//default value + if(dmrs_arg[0] == 0) { mapping_type = typeA; } @@ -1418,28 +1416,26 @@ void update_dmrs_config(NR_CellGroupConfig_t *scg,PHY_VARS_NR_UE *ue, int8_t* dm add_pos = dmrs_arg[1]; } /* DMRS Conf Type 1 or 2 */ - if(dmrs_arg[2] >= 1 && dmrs_arg[2] <3 ) { - dmrs_config_type = dmrs_arg[2]-1; + if(dmrs_arg[2] == 1) { + dmrs_config_type = NFAPI_NR_DMRS_TYPE1; + } else if(dmrs_arg[2] == 2) { + dmrs_config_type = NFAPI_NR_DMRS_TYPE2; } - if(scg != NULL) { - NR_BWP_Downlink_t *bwp = scg->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[0]; - *bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition = add_pos; - if (dmrs_config_type == pdsch_dmrs_type2) - bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type = calloc(1,sizeof(*bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type)); - else bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type = NULL; - for (int i=0;ibwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.count;i++) { - bwp->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[i]->mappingType = mapping_type; - } - } - if(ue != NULL) { - for (int i=0;iPDSCH_Config.pdsch_TimeDomainResourceAllocation[i]->mappingType = mapping_type; - } - ue->dmrs_DownlinkConfig.pdsch_dmrs_AdditionalPosition = add_pos; - if (dmrs_config_type == pdsch_dmrs_type2) - ue->dmrs_DownlinkConfig.pdsch_dmrs_type = pdsch_dmrs_type2; - else ue->dmrs_DownlinkConfig.pdsch_dmrs_type = pdsch_dmrs_type1; + NR_BWP_Downlink_t *bwp = scg->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[0]; + NR_DMRS_DownlinkConfig_t *dmrs_config; + if(mapping_type == typeA) + dmrs_config = (NR_DMRS_DownlinkConfig_t *)bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup; + else + dmrs_config = (NR_DMRS_DownlinkConfig_t *)bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeB->choice.setup; + *dmrs_config->dmrs_AdditionalPosition = add_pos; + if (dmrs_config_type == NFAPI_NR_DMRS_TYPE2) + dmrs_config->dmrs_Type = calloc(1,sizeof(*dmrs_config->dmrs_Type)); + else + dmrs_config->dmrs_Type = NULL; + for (int i=0;ibwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.count;i++) { + bwp->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.array[i]->mappingType = mapping_type; } + printf("[DLSIM] DMRS Config is modified with Mapping Type %d, Additional Positions %d Config. Type %d \n", dmrs_arg[0], add_pos, dmrs_arg[2] ); } diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c index 7140279a03..3ed95a9d61 100644 --- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c +++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c @@ -2444,7 +2444,7 @@ uint8_t get_L_ptrs(uint8_t mcs1, uint8_t mcs2, uint8_t mcs3, uint8_t I_mcs, uint * * NAME : get_K_ptrs * -* PARAMETERS : ptrs_UplinkConfig PTRS uplink configuration +* PARAMETERS : nrb0, nrb1 PTRS uplink configuration * N_RB number of RBs scheduled for PUSCH * * RETURN : the parameter K_ptrs diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 03f8109638..f53540ea97 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -613,11 +613,14 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr dl_config->dl_config_list[dl_config->number_pdus].pdu_type = FAPI_NR_DL_CONFIG_TYPE_DLSCH; } if( (ra->RA_window_cnt >= 0 && rnti == ra->ra_rnti) || (rnti == ra->t_crnti) ) { - dlsch_config_pdu_1_0->BWPSize = NRRIV2BW(mac->scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); if (get_softmodem_params()->sa) { + dlsch_config_pdu_1_0->BWPSize = NRRIV2BW(mac->scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); dlsch_config_pdu_1_0->BWPStart = NRRIV2PRBOFFSET(mac->scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + dlsch_config_pdu_1_0->SubcarrierSpacing = mac->scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.subcarrierSpacing; } else { // NSA mode is not using the Initial BWP + dlsch_config_pdu_1_0->BWPSize = NRRIV2BW(mac->DLbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); dlsch_config_pdu_1_0->BWPStart = NRRIV2PRBOFFSET(mac->DLbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + dlsch_config_pdu_1_0->SubcarrierSpacing = mac->DLbwp[0]->bwp_Common->genericParameters.subcarrierSpacing; pdsch_config = mac->DLbwp[0]->bwp_Dedicated->pdsch_Config->choice.setup; } } else { @@ -645,7 +648,7 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr mac->scc->dmrs_TypeA_Position, dlsch_config_pdu_1_0->number_symbols, dlsch_config_pdu_1_0->start_symbol); - dlsch_config_pdu_1_0->dmrsConfigType = (pdsch_config) ? (mac->DLbwp[0]->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type == NULL ? 0 : 1) : 0; + dlsch_config_pdu_1_0->dmrsConfigType = (pdsch_config) ? (pdsch_config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type == NULL ? NFAPI_NR_DMRS_TYPE1 : NFAPI_NR_DMRS_TYPE2) : NFAPI_NR_DMRS_TYPE1; /* number of DM-RS CDM groups without data according to subclause 5.1.6.2 of 3GPP TS 38.214 version 15.9.0 Release 15 */ if (dlsch_config_pdu_1_0->number_symbols == 2) dlsch_config_pdu_1_0->n_dmrs_cdm_groups = 1; @@ -812,7 +815,7 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr mac->scc->dmrs_TypeA_Position, dlsch_config_pdu_1_1->number_symbols, dlsch_config_pdu_1_1->start_symbol); - dlsch_config_pdu_1_1->dmrsConfigType = mac->DLbwp[dl_bwp_id-1]->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type == NULL ? 0 : 1; + dlsch_config_pdu_1_1->dmrsConfigType = mac->DLbwp[dl_bwp_id-1]->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type == NULL ? NFAPI_NR_DMRS_TYPE1 : NFAPI_NR_DMRS_TYPE2; /* TODO: fix number of DM-RS CDM groups without data according to subclause 5.1.6.2 of 3GPP TS 38.214, using tables 7.3.1.2.2-1, 7.3.1.2.2-2, 7.3.1.2.2-3, 7.3.1.2.2-4 of 3GPP TS 38.212 */ dlsch_config_pdu_1_1->n_dmrs_cdm_groups = 1; @@ -909,7 +912,7 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr dlsch_config_pdu_1_1->dmrs_ports[3] = table_7_3_2_3_3_2_oneCodeword[dci->antenna_ports.val][4]; dlsch_config_pdu_1_1->n_front_load_symb = table_7_3_2_3_3_2_oneCodeword[dci->antenna_ports.val][5]; } - if (n_codewords == 1) { + if (n_codewords == 2) { dlsch_config_pdu_1_1->n_dmrs_cdm_groups = table_7_3_2_3_3_2_twoCodeword[dci->antenna_ports.val][0]; dlsch_config_pdu_1_1->dmrs_ports[0] = table_7_3_2_3_3_2_twoCodeword[dci->antenna_ports.val][1]; dlsch_config_pdu_1_1->dmrs_ports[1] = table_7_3_2_3_3_2_twoCodeword[dci->antenna_ports.val][2]; @@ -931,7 +934,7 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr dlsch_config_pdu_1_1->dmrs_ports[2] = table_7_3_2_3_3_3_oneCodeword[dci->antenna_ports.val][3]; dlsch_config_pdu_1_1->dmrs_ports[3] = table_7_3_2_3_3_3_oneCodeword[dci->antenna_ports.val][4]; } - if (n_codewords == 1) { + if (n_codewords == 2) { dlsch_config_pdu_1_1->n_dmrs_cdm_groups = table_7_3_2_3_3_3_twoCodeword[dci->antenna_ports.val][0]; dlsch_config_pdu_1_1->dmrs_ports[0] = table_7_3_2_3_3_3_twoCodeword[dci->antenna_ports.val][1]; dlsch_config_pdu_1_1->dmrs_ports[1] = table_7_3_2_3_3_3_twoCodeword[dci->antenna_ports.val][2]; @@ -951,7 +954,7 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr dlsch_config_pdu_1_1->dmrs_ports[3] = table_7_3_2_3_3_4_oneCodeword[dci->antenna_ports.val][4]; dlsch_config_pdu_1_1->n_front_load_symb = table_7_3_2_3_3_4_oneCodeword[dci->antenna_ports.val][5]; } - if (n_codewords == 1) { + if (n_codewords == 2) { dlsch_config_pdu_1_1->n_dmrs_cdm_groups = table_7_3_2_3_3_4_twoCodeword[dci->antenna_ports.val][0]; dlsch_config_pdu_1_1->dmrs_ports[0] = table_7_3_2_3_3_4_twoCodeword[dci->antenna_ports.val][1]; dlsch_config_pdu_1_1->dmrs_ports[1] = table_7_3_2_3_3_4_twoCodeword[dci->antenna_ports.val][2]; From 405bbac936ae1de2ef33b28be366b1ec67d6d765 Mon Sep 17 00:00:00 2001 From: hardy Date: Thu, 6 May 2021 23:01:54 +0200 Subject: [PATCH 328/579] CI hotfix for rt stats table in HTML --- ci-scripts/ran.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index f5f53c20b7..63c3b7cbad 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -636,7 +636,8 @@ class RANManagement(): HTML.CreateHtmlTestRow(self.runtime_stats, 'OK', CONST.ALL_PROCESSES_OK) else: HTML.CreateHtmlTestRow(self.runtime_stats, 'OK', CONST.ALL_PROCESSES_OK) - if len(self.datalog_rt_stats)!=0: + #display rt stats for gNB only + if len(self.datalog_rt_stats)!=0 and nodeB_prefix == 'g': HTML.CreateHtmlDataLogTable(self.datalog_rt_stats) self.eNBmbmsEnables[int(self.eNB_instance)] = False self.eNBstatuses[int(self.eNB_instance)] = -1 From f5a76d7983fea8ad74f4dc952e99b4a3fbd0ed6b Mon Sep 17 00:00:00 2001 From: hardy Date: Thu, 6 May 2021 23:41:15 +0200 Subject: [PATCH 329/579] fix test retry due to N310 init issue --- ci-scripts/xml_files/benetel_nsa_quectel.xml | 1 + ci-scripts/xml_files/fr1_nsa_quectel.xml | 1 + 2 files changed, 2 insertions(+) diff --git a/ci-scripts/xml_files/benetel_nsa_quectel.xml b/ci-scripts/xml_files/benetel_nsa_quectel.xml index d505d0e190..7130180753 100644 --- a/ci-scripts/xml_files/benetel_nsa_quectel.xml +++ b/ci-scripts/xml_files/benetel_nsa_quectel.xml @@ -24,6 +24,7 @@ TEST-NSA-FR1-TM1 NSA Ping DL UL with QUECTEL tasks + 3 030000 040000 diff --git a/ci-scripts/xml_files/fr1_nsa_quectel.xml b/ci-scripts/xml_files/fr1_nsa_quectel.xml index 67480ebb81..c48aa70739 100644 --- a/ci-scripts/xml_files/fr1_nsa_quectel.xml +++ b/ci-scripts/xml_files/fr1_nsa_quectel.xml @@ -24,6 +24,7 @@ TEST-NSA-FR1-TM1 NSA Ping DL UL with QUECTEL tasks + 3 030000 040000 From 31b12e2e0c2fb0c9755a8151bcef5baea56ad82b Mon Sep 17 00:00:00 2001 From: Luis Pereira Date: Fri, 7 May 2021 10:16:21 +0200 Subject: [PATCH 330/579] Revert "Temporary fix for skip DL slots with invalid dl_DataToUL_ACK timing with OAI UE" This reverts commit 9512e914faa9f3f56cf33dc517ccd9c2688505ec --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index 84ef218120..6adc65ad37 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -785,11 +785,6 @@ void nr_schedule_ue_spec(module_id_t module_id, if (!is_xlsch_in_slot(gNB_mac->dlsch_slot_bitmap[slot / 64], slot)) return; - // FIXME: Feedback timing for ack/nack are not adapted for OAI UE, which has a rx/tx delay of 6 slots. - // As k2 for pusch needs to be at least 6, dl_DataToUL_ACK needs to be not lower than 6. - if(IS_SOFTMODEM_RFSIM && slot!=1) - return; - /* PREPROCESSOR */ gNB_mac->pre_processor_dl(module_id, frame, slot); From 8c023d7c66719ae0d045217c8497138dbbc74701 Mon Sep 17 00:00:00 2001 From: Parminder Singh Date: Fri, 7 May 2021 10:32:05 +0200 Subject: [PATCH 331/579] Added uplink processing check to avoid false detection in ULSIM. - In case no signal is received then energy of ULSCH is zero, the phy_procedures_gNB_uespec_RX will return 1 as an error. --- openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c | 2 +- openair1/SCHED_NR/phy_procedures_nr_gNB.c | 7 ++++--- openair1/SCHED_NR/sched_nr.h | 2 +- openair1/SIMULATION/NR_PHY/ulsim.c | 10 +++++----- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c b/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c index c1bca8d2a0..de7db1acb7 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c +++ b/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c @@ -1222,7 +1222,7 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB, for (aarx = 0; aarx < frame_parms->nb_antennas_rx; aarx++) { gNB->pusch_vars[ulsch_id]->ulsch_power[aarx] = signal_energy_nodc(&gNB->pusch_vars[ulsch_id]->ul_ch_estimates[aarx][symbol*frame_parms->ofdm_symbol_size], rel15_ul->rb_size*12); - if (gNB->pusch_vars[ulsch_id]->ulsch_power[aarx]==1) return (1); + if (gNB->pusch_vars[ulsch_id]->ulsch_power[aarx]<=1) return (1); } } diff --git a/openair1/SCHED_NR/phy_procedures_nr_gNB.c b/openair1/SCHED_NR/phy_procedures_nr_gNB.c index d68cacece2..1c92140307 100644 --- a/openair1/SCHED_NR/phy_procedures_nr_gNB.c +++ b/openair1/SCHED_NR/phy_procedures_nr_gNB.c @@ -523,7 +523,7 @@ void phy_procedures_gNB_common_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) } -void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) { +int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) { /* those variables to log T_GNB_PHY_PUCCH_PUSCH_IQ only when we try to decode */ int pucch_decode_done = 0; int pusch_decode_done = 0; @@ -652,10 +652,10 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) start_meas(&gNB->rx_pusch_stats); for(uint8_t symbol = symbol_start; symbol < symbol_end; symbol++) { no_sig = nr_rx_pusch(gNB, ULSCH_id, frame_rx, slot_rx, symbol, harq_pid); - if (no_sig && (get_softmodem_params()->phy_test == 0)) { + if (no_sig) { LOG_I(PHY, "PUSCH not detected in symbol %d\n",symbol); nr_fill_indication(gNB,frame_rx, slot_rx, ULSCH_id, harq_pid, 1); - return; + return 1; } } stop_meas(&gNB->rx_pusch_stats); @@ -682,4 +682,5 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) } VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_UESPEC_RX,0); + return 0; } diff --git a/openair1/SCHED_NR/sched_nr.h b/openair1/SCHED_NR/sched_nr.h index e0cf20d862..5e31c08d38 100644 --- a/openair1/SCHED_NR/sched_nr.h +++ b/openair1/SCHED_NR/sched_nr.h @@ -38,7 +38,7 @@ void fill_ul_rb_mask(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx); void nr_set_ssb_first_subcarrier(nfapi_nr_config_request_scf_t *cfg, NR_DL_FRAME_PARMS *fp); void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB, int frame_tx, int slot_tx, int do_meas); void phy_procedures_gNB_common_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx); -void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx); +int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx); void L1_nr_prach_procedures(PHY_VARS_gNB *gNB,int frame,int slot); void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame,int slot,nfapi_nr_dl_tti_ssb_pdu ssb_pdu); void nr_feptx_ofdm(RU_t *ru,int frame_tx,int tti_tx); diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c index 36bb9118f7..00c0905182 100644 --- a/openair1/SIMULATION/NR_PHY/ulsim.c +++ b/openair1/SIMULATION/NR_PHY/ulsim.c @@ -303,7 +303,7 @@ int main(int argc, char **argv) if ( load_configmodule(argc,argv,CONFIG_ENABLECMDLINEONLY) == 0 ) { exit_fun("[NR_ULSIM] Error, configuration module init failed\n"); } - + int ul_proc_error = 0; // uplink processing checking status flag //logInit(); randominit(0); @@ -1184,7 +1184,7 @@ int main(int argc, char **argv) phy_procedures_gNB_common_RX(gNB, frame, slot); - phy_procedures_gNB_uespec_RX(gNB, frame, slot); + ul_proc_error = phy_procedures_gNB_uespec_RX(gNB, frame, slot); if (n_trials==1 && round==0) { LOG_M("rxsig0.m","rx0",&gNB->common_vars.rxdata[0][slot_offset],slot_length,1,1); @@ -1214,9 +1214,9 @@ int main(int argc, char **argv) &gNB->pusch_vars[0]->llr[0],(nb_symb_sch-1)*NR_NB_SC_PER_RB * pusch_pdu->rb_size * mod_order,1,0); } //////////////////////////////////////////////////////////// - - if (gNB->ulsch[0][0]->last_iteration_cnt >= - gNB->ulsch[0][0]->max_ldpc_iterations+1) { + + if ((gNB->ulsch[0][0]->last_iteration_cnt >= + gNB->ulsch[0][0]->max_ldpc_iterations+1) || ul_proc_error == 1) { error_flag = 1; n_errors[round]++; crc_status = 1; From 0ea7946da8f001363438b655efaa4b45c56b7cbd Mon Sep 17 00:00:00 2001 From: matzakos Date: Fri, 7 May 2021 15:05:05 +0200 Subject: [PATCH 332/579] Remove redundant call to init_pdcp for noS1 --- executables/nr-softmodem.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/executables/nr-softmodem.c b/executables/nr-softmodem.c index c7e636736b..4eac9e36a1 100644 --- a/executables/nr-softmodem.c +++ b/executables/nr-softmodem.c @@ -739,10 +739,6 @@ if(!IS_SOFTMODEM_NOS1) #endif LOG_I(HW, "Version: %s\n", PACKAGE_VERSION); - - if(IS_SOFTMODEM_NOS1) - init_pdcp(); - if (RC.nb_nr_L1_inst > 0) RCconfig_NR_L1(); From 31d73a7bf2d861e26e7efba5816bc1060e1a1dc4 Mon Sep 17 00:00:00 2001 From: matzakos Date: Fri, 7 May 2021 15:06:52 +0200 Subject: [PATCH 333/579] Remove artificial triggering of RRC Setup Request from nrUE --- executables/nr-uesoftmodem.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/executables/nr-uesoftmodem.c b/executables/nr-uesoftmodem.c index ded2ddcecf..fe5e0a4269 100644 --- a/executables/nr-uesoftmodem.c +++ b/executables/nr-uesoftmodem.c @@ -530,14 +530,6 @@ int main( int argc, char **argv ) { // wait for end of program printf("TYPE TO TERMINATE\n"); - //Don't understand why generation of RRCSetupRequest is called here. It seems wrong - protocol_ctxt_t ctxt_pP = {0}; - ctxt_pP.enb_flag = ENB_FLAG_NO; - ctxt_pP.rnti = 0x1234; - RC.nrrrc = (gNB_RRC_INST **)malloc(1*sizeof(gNB_RRC_INST *)); - RC.nrrrc[0] = (gNB_RRC_INST*)malloc(sizeof(gNB_RRC_INST)); - RC.nrrrc[0]->node_type = ngran_gNB; - nr_rrc_ue_generate_RRCSetupRequest(ctxt_pP.module_id, 0); if (create_tasks_nrue(1) < 0) { printf("cannot create ITTI tasks\n"); exit(-1); // need a softer mode From eed0c89febe511b6978e273e4706c0a78b9c5b30 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Fri, 7 May 2021 20:13:17 +0100 Subject: [PATCH 334/579] CCE-to-REG mapping extended for 2 or more DCI symbols --- openair1/PHY/NR_TRANSPORT/nr_dci.c | 100 ++++++++++++----------- openair1/PHY/NR_TRANSPORT/nr_dci_tools.c | 10 +-- 2 files changed, 56 insertions(+), 54 deletions(-) diff --git a/openair1/PHY/NR_TRANSPORT/nr_dci.c b/openair1/PHY/NR_TRANSPORT/nr_dci.c index 3f6eb00bcb..c093b23ca3 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dci.c +++ b/openair1/PHY/NR_TRANSPORT/nr_dci.c @@ -181,62 +181,64 @@ void nr_generate_dci(PHY_VARS_gNB *gNB, } /*Mapping the encoded DCI along with the DMRS */ - for (int cce_count = 0; cce_count < dci_pdu->AggregationLevel; cce_count ++) { + for(int symbol = 0; symbol < pdcch_pdu_rel15->DurationSymbols; symbol++) { + for (int cce_count = 0; cce_count < dci_pdu->AggregationLevel; cce_count+=pdcch_pdu_rel15->DurationSymbols) { - int8_t cce_idx = reg_list_order[cce_count]; + int8_t cce_idx = reg_list_order[cce_count]; - for (int reg_in_cce_idx = 0; reg_in_cce_idx < NR_NB_REG_PER_CCE; reg_in_cce_idx++) { + for (int reg_in_cce_idx = 0; reg_in_cce_idx < NR_NB_REG_PER_CCE; reg_in_cce_idx++) { - k = cset_start_sc + gNB->cce_list[d][cce_idx].reg_list[reg_in_cce_idx].start_sc_idx; - - if (k >= frame_parms.ofdm_symbol_size) - k -= frame_parms.ofdm_symbol_size; - - l = cset_start_symb + gNB->cce_list[d][cce_idx].reg_list[reg_in_cce_idx].symb_idx; - - // dmrs index depends on reference point for k according to 38.211 7.4.1.3.2 - if (pdcch_pdu_rel15->CoreSetType == NFAPI_NR_CSET_CONFIG_PDCCH_CONFIG) - dmrs_idx =(gNB->cce_list[d][cce_idx].reg_list[reg_in_cce_idx].reg_idx / pdcch_pdu_rel15->DurationSymbols) * 3; - else - dmrs_idx = (gNB->cce_list[d][cce_idx].reg_list[reg_in_cce_idx].reg_idx / pdcch_pdu_rel15->DurationSymbols + rb_offset) * 3; - - k_prime = 0; - - for (int m = 0; m < NR_NB_SC_PER_RB; m++) { - if (m == (k_prime << 2) + 1) { // DMRS if not already mapped - ((int16_t *) txdataF)[(l * frame_parms.ofdm_symbol_size + k) << 1] = - (amp * mod_dmrs[l][dmrs_idx << 1]) >> 15; - ((int16_t *) txdataF)[((l * frame_parms.ofdm_symbol_size + k) << 1) + 1] = - (amp * mod_dmrs[l][(dmrs_idx << 1) + 1]) >> 15; - -#ifdef DEBUG_PDCCH_DMRS - printf("PDCCH DMRS: l %d position %d => (%d,%d)\n",l,k,((int16_t *)txdataF)[(l*frame_parms.ofdm_symbol_size + k)<<1], - ((int16_t *)txdataF)[((l*frame_parms.ofdm_symbol_size + k)<<1)+1]); -#endif - - dmrs_idx++; - k_prime++; - - } else { // DCI payload - ((int16_t *) txdataF)[(l * frame_parms.ofdm_symbol_size + k) << 1] = (amp * mod_dci[dci_idx << 1]) >> 15; - ((int16_t *) txdataF)[((l * frame_parms.ofdm_symbol_size + k) << 1) + 1] = - (amp * mod_dci[(dci_idx << 1) + 1]) >> 15; -#ifdef DEBUG_DCI - printf("PDCCH: l %d position %d => (%d,%d)\n",l,k,((int16_t *)txdataF)[(l*frame_parms.ofdm_symbol_size + k)<<1], - ((int16_t *)txdataF)[((l*frame_parms.ofdm_symbol_size + k)<<1)+1]); -#endif - - dci_idx++; - } - - k++; + k = cset_start_sc + gNB->cce_list[d][cce_idx].reg_list[reg_in_cce_idx].start_sc_idx; if (k >= frame_parms.ofdm_symbol_size) k -= frame_parms.ofdm_symbol_size; - } // m - } // reg_in_cce_idx - } // cce_count + l = cset_start_symb + symbol; + + // dmrs index depends on reference point for k according to 38.211 7.4.1.3.2 + if (pdcch_pdu_rel15->CoreSetType == NFAPI_NR_CSET_CONFIG_PDCCH_CONFIG) + dmrs_idx = (gNB->cce_list[d][cce_idx].reg_list[reg_in_cce_idx].reg_idx) * 3; + else + dmrs_idx = (gNB->cce_list[d][cce_idx].reg_list[reg_in_cce_idx].reg_idx + rb_offset) * 3; + + k_prime = 0; + + for (int m = 0; m < NR_NB_SC_PER_RB; m++) { + if (m == (k_prime << 2) + 1) { // DMRS if not already mapped + ((int16_t *) txdataF)[(l * frame_parms.ofdm_symbol_size + k) << 1] = + (amp * mod_dmrs[l][dmrs_idx << 1]) >> 15; + ((int16_t *) txdataF)[((l * frame_parms.ofdm_symbol_size + k) << 1) + 1] = + (amp * mod_dmrs[l][(dmrs_idx << 1) + 1]) >> 15; + +#ifdef DEBUG_PDCCH_DMRS + printf("PDCCH DMRS: l %d position %d => (%d,%d)\n",l,k,((int16_t *)txdataF)[(l*frame_parms.ofdm_symbol_size + k)<<1], + ((int16_t *)txdataF)[((l*frame_parms.ofdm_symbol_size + k)<<1)+1]); +#endif + + dmrs_idx++; + k_prime++; + + } else { // DCI payload + ((int16_t *) txdataF)[(l * frame_parms.ofdm_symbol_size + k) << 1] = (amp * mod_dci[dci_idx << 1]) >> 15; + ((int16_t *) txdataF)[((l * frame_parms.ofdm_symbol_size + k) << 1) + 1] = + (amp * mod_dci[(dci_idx << 1) + 1]) >> 15; +#ifdef DEBUG_DCI + printf("PDCCH: l %d position %d => (%d,%d)\n",l,k,((int16_t *)txdataF)[(l*frame_parms.ofdm_symbol_size + k)<<1], + ((int16_t *)txdataF)[((l*frame_parms.ofdm_symbol_size + k)<<1)+1]); +#endif + + dci_idx++; + } + + k++; + + if (k >= frame_parms.ofdm_symbol_size) + k -= frame_parms.ofdm_symbol_size; + + } // m + } // reg_in_cce_idx + } // cce_count + } // symbol LOG_D(PHY, "DCI: payloadSize = %d | payload = %llx\n", diff --git a/openair1/PHY/NR_TRANSPORT/nr_dci_tools.c b/openair1/PHY/NR_TRANSPORT/nr_dci_tools.c index 3814c78295..98c14cf188 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dci_tools.c +++ b/openair1/PHY/NR_TRANSPORT/nr_dci_tools.c @@ -136,7 +136,7 @@ void nr_fill_cce_list(PHY_VARS_gNB *gNB, uint8_t m, nfapi_nr_dl_tti_pdcch_pdu_r get_coreset_rballoc(pdcch_pdu_rel15->FreqDomainResource,&n_rb,&rb_offset); - int N_reg = n_rb * pdcch_pdu_rel15->DurationSymbols; + int N_reg = n_rb; int C=-1; AssertFatal(N_reg > 0,"N_reg cannot be 0\n"); @@ -174,8 +174,8 @@ void nr_fill_cce_list(PHY_VARS_gNB *gNB, uint8_t m, nfapi_nr_dl_tti_pdcch_pdu_r for (uint8_t reg_idx=0; reg_idxreg_list[reg_idx]; reg->reg_idx = bsize*idx + reg_idx; - reg->start_sc_idx = (reg->reg_idx/pdcch_pdu_rel15->DurationSymbols) * NR_NB_SC_PER_RB; - reg->symb_idx = reg->reg_idx % pdcch_pdu_rel15->DurationSymbols; + reg->start_sc_idx = reg->reg_idx * NR_NB_SC_PER_RB; + reg->symb_idx = 0; LOG_D(PHY, "reg %d symbol %d start subcarrier %d\n", reg->reg_idx, reg->symb_idx, reg->start_sc_idx); } } @@ -185,8 +185,8 @@ void nr_fill_cce_list(PHY_VARS_gNB *gNB, uint8_t m, nfapi_nr_dl_tti_pdcch_pdu_r for (uint8_t reg_idx=0; reg_idxreg_list[reg_idx]; reg->reg_idx = cce->cce_idx*NR_NB_REG_PER_CCE + reg_idx; - reg->start_sc_idx = (reg->reg_idx/pdcch_pdu_rel15->DurationSymbols) * NR_NB_SC_PER_RB; - reg->symb_idx = reg->reg_idx % pdcch_pdu_rel15->DurationSymbols; + reg->start_sc_idx = reg->reg_idx * NR_NB_SC_PER_RB; + reg->symb_idx = 0; LOG_D(PHY, "reg %d symbol %d start subcarrier %d\n", reg->reg_idx, reg->symb_idx, reg->start_sc_idx); } From 0aff278472fe028b50c58419725046512564c6ec Mon Sep 17 00:00:00 2001 From: Remi Hardy Date: Sun, 9 May 2021 17:51:02 +0200 Subject: [PATCH 335/579] CI fix quectel nic name --- ci-scripts/ci_ueinfra.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-scripts/ci_ueinfra.yaml b/ci-scripts/ci_ueinfra.yaml index 1b39891382..c778b1cad3 100644 --- a/ci-scripts/ci_ueinfra.yaml +++ b/ci-scripts/ci_ueinfra.yaml @@ -8,7 +8,7 @@ idefix: WakeupScript : ci_ctl_qtel.py /dev/ttyUSB2 wup DetachScript : ci_ctl_qtel.py /dev/ttyUSB2 detach PLMN : 22201 - UENetwork : wwan0 + UENetwork : enxb22a941dbf00 HostIPAddress : 192.168.18.188 HostUsername : oaicicd HostPassword : oaicicd From 71b08183277cae4ff78030aaf89f5729d522cdac Mon Sep 17 00:00:00 2001 From: hardy Date: Mon, 10 May 2021 09:58:05 +0200 Subject: [PATCH 336/579] added cleaning of module ue iperf artifacts --- ci-scripts/cls_oaicitest.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index 7b75cf82c5..cb09eb3ddb 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -2203,10 +2203,14 @@ class OaiCiTest(): logging.debug("Iperf for Module in DL mode detected") #server side UE SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword) + cmd = 'rm iperf_server_ ' + self.testCase_id + '_' + self.ue_id + '.log' + SSH.command(cmd,'\$',5) cmd = 'echo $USER; nohup iperf -s -B ' + UE_IPAddress + ' -u 2>&1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' SSH.command(cmd,'\$',5) #client side EPC SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password) + cmd = 'rm iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log' + SSH.command(cmd,'\$',5) cmd = 'iperf -c ' + UE_IPAddress + ' ' + self.iperf_args + ' 2>&1 > iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log' SSH.command(cmd,'\$',int(iperf_time)*5.0) @@ -2221,10 +2225,14 @@ class OaiCiTest(): logging.debug("Iperf for Module in UL mode detected") #server side EPC SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password) + cmd = 'rm iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' + SSH.command(cmd,'\$',5) cmd = 'echo $USER; nohup iperf -s -u 2>&1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' SSH.command(cmd,'\$',5) #client side UE SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword) + cmd = 'rm iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log' + SSH.command(cmd,'\$',5) cmd = 'iperf -B ' + UE_IPAddress + ' ' + '-c ' + EPC.IPAddress + ' ' + self.iperf_args + ' > iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log' SSH.command(cmd,'\$',int(iperf_time)*5.0) From c631c96975d61156337e6d1e98668168f6372cf4 Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Mon, 10 May 2021 10:29:49 +0100 Subject: [PATCH 337/579] bug fixes --- cmake_targets/CMakeLists.txt | 2 +- common/utils/LOG/log.c | 2 +- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c | 2 +- openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c | 12 +++++++++++- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 95af74d9de..887a2a103b 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -351,7 +351,7 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath -Wl,${CMAKE_CU ######################### # set a flag for changes in the source code # these changes are related to hardcoded path to include .h files -set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -g3 -O0 -DMALLOC_CHECK_=3") +set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -g3 -Og -DMALLOC_CHECK_=3") set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS} -g3 -DMALLOC_CHECK_=3 -O2 -fno-delete-null-pointer-checks") set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} -O3") diff --git a/common/utils/LOG/log.c b/common/utils/LOG/log.c index 8029ba826b..d0a53a755b 100644 --- a/common/utils/LOG/log.c +++ b/common/utils/LOG/log.c @@ -460,7 +460,7 @@ int logInit (void) register_log_component("LOCALIZE","log",LOCALIZE); register_log_component("NAS","log",NAS); register_log_component("UDP","",UDP_); - register_log_component("GTPV1U","",GTPU); + register_log_component("GTPU","",GTPU); register_log_component("S1AP","",S1AP); register_log_component("F1AP","",F1AP); register_log_component("M2AP","",M2AP); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c index 289b80cc9d..7024307a78 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c @@ -322,7 +322,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frame, sub_frame_t slot){ - protocol_ctxt_t ctxt; + protocol_ctxt_t ctxt={0}; PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, ENB_FLAG_YES, NOT_A_RNTI, frame, slot,module_idP); const int bwp_id = 1; diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c index 9cf06c9b7f..0d21ba9302 100644 --- a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c +++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c @@ -700,7 +700,17 @@ void pdcp_run(const protocol_ctxt_t *const ctxt_pP) { MessageDef *msg_p; int result; - protocol_ctxt_t ctxt; + protocol_ctxt_t ctxt={.module_id=0, + .enb_flag=1, + .instance=0, + .rnti=0, + .frame=-1, + .subframe=-1, + .eNB_index=0, + .configured=true, + .brOption=false + }; + while (1) { itti_poll_msg(ctxt_pP->enb_flag ? TASK_PDCP_ENB : TASK_PDCP_UE, &msg_p); From 2508a020ec8eb6b663c45c33b936a4115cba6f14 Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Mon, 10 May 2021 11:52:43 +0200 Subject: [PATCH 338/579] fix random crash (uninitialized memory) --- openair2/RRC/NR/rrc_gNB.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index 2887c8a32e..4f8efd129d 100755 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -2787,7 +2787,16 @@ void *rrc_gnb_task(void *args_p) { int result; //SRB_INFO *srb_info_p; //int CC_id; - protocol_ctxt_t ctxt; + protocol_ctxt_t ctxt={.module_id=0, + .enb_flag=1, + .instance=0, + .rnti=0, + .frame=-1, + .subframe=-1, + .eNB_index=0, + .configured=true, + .brOption=false + }; itti_mark_task_ready(TASK_RRC_GNB); LOG_I(NR_RRC,"Entering main loop of NR_RRC message task\n"); @@ -3228,7 +3237,7 @@ rrc_gNB_generate_RRCRelease( GNB_RRC_DCCH_DATA_IND (message_p).size = size; itti_send_msg_to_task (TASK_RRC_UE_SIM, ctxt_pP->instance, message_p); #else - if (NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) { + if (NODE_IS_CU(RC.nrrrc[ctxt_pP->module_id]->node_type)) { MessageDef *m = itti_alloc_new_message(TASK_RRC_GNB, 0, F1AP_UE_CONTEXT_RELEASE_CMD); F1AP_UE_CONTEXT_RELEASE_CMD(m).rnti = ctxt_pP->rnti; F1AP_UE_CONTEXT_RELEASE_CMD(m).cause = F1AP_CAUSE_RADIO_NETWORK; From df084c5825f467e3091c9829c7b3f2c90ab3a3bf Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Mon, 10 May 2021 14:04:51 +0200 Subject: [PATCH 339/579] CI: some cosmetics changes and better handling physim cluster deployment errors Signed-off-by: Raphael Defosseux --- ci-scripts/cls_containerize.py | 4 +- ci-scripts/cls_oaicitest.py | 4 +- ci-scripts/cls_physim.py | 382 +++++++++--------- ci-scripts/cls_physim1.py | 76 +++- ci-scripts/cls_static_code_analysis.py | 4 +- ci-scripts/constants.py | 5 + ci-scripts/html.py | 10 + ci-scripts/main.py | 2 +- ci-scripts/ran.py | 4 +- .../xml_files/container_image_build.xml | 1 + 10 files changed, 275 insertions(+), 217 deletions(-) diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index 2c8a2cd339..dff0838d49 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -162,7 +162,7 @@ class Containerize(): # on RedHat/CentOS .git extension is mandatory result = re.search('([a-zA-Z0-9\:\-\.\/])+\.git', self.ranRepository) if result is not None: - full_ran_repo_name = self.ranRepository + full_ran_repo_name = self.ranRepository.replace('git/', 'git') else: full_ran_repo_name = self.ranRepository + '.git' mySSH.command('mkdir -p ' + lSourcePath, '\$', 5) @@ -176,7 +176,7 @@ class Containerize(): mySSH.command('mkdir -p cmake_targets/log', '\$', 5) # if the commit ID is provided use it to point to it if self.ranCommitID != '': - mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 5) + mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 30) # if the branch is not develop, then it is a merge request and we need to do # the potential merge. Note that merge conflicts should already been checked earlier imageTag = 'develop' diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index 7b75cf82c5..5c882618e4 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -177,7 +177,7 @@ class OaiCiTest(): ue_prefix = '' result = re.search('([a-zA-Z0-9\:\-\.\/])+\.git', self.ranRepository) if result is not None: - full_ran_repo_name = self.ranRepository + full_ran_repo_name = self.ranRepository.replace('git/', 'git') else: full_ran_repo_name = self.ranRepository + '.git' SSH.command('mkdir -p ' + self.UESourceCodePath, '\$', 5) @@ -220,7 +220,7 @@ class OaiCiTest(): # if the commit ID is provided use it to point to it if self.ranCommitID != '': - SSH.command('git checkout -f ' + self.ranCommitID, '\$', 5) + SSH.command('git checkout -f ' + self.ranCommitID, '\$', 30) # if the branch is not develop, then it is a merge request and we need to do # the potential merge. Note that merge conflicts should already been checked earlier if self.ranAllowMerge: diff --git a/ci-scripts/cls_physim.py b/ci-scripts/cls_physim.py index 4ca36b8cf0..e825b2f7bd 100644 --- a/ci-scripts/cls_physim.py +++ b/ci-scripts/cls_physim.py @@ -1,191 +1,191 @@ -# * 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 -# */ -#--------------------------------------------------------------------- -# Python for CI of OAI-eNB + COTS-UE -# -# Required Python Version -# Python 3.x -# -# Required Python Package -# pexpect -#--------------------------------------------------------------------- - -#to use logging.info() -import logging -#to create a SSH object locally in the methods -import sshconnection -#to update the HTML object -import html -from multiprocessing import SimpleQueue -#for log folder maintenance -import os - -class PhySim: - def __init__(self): - self.buildargs = "" - self.runargs = "" - self.eNBIpAddr = "" - self.eNBUserName = "" - self.eNBPassWord = "" - self.eNBSourceCodePath = "" - self.ranRepository = "" - self.ranBranch = "" - self.ranCommitID= "" - self.ranAllowMerge= "" - self.ranTargetBranch= "" - self.exitStatus=0 - self.forced_workspace_cleanup=False - #private attributes - self.__workSpacePath='' - self.__buildLogFile='compile_phy_sim.log' - self.__runLogFile='' - self.__runResults=[] - self.__runLogPath='phy_sim_logs' - - -#----------------- -#PRIVATE Methods -#----------------- - - def __CheckResults_PhySim(self,HTML,CONST,testcase_id): - mySSH = sshconnection.SSHConnection() - mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord) - #retrieve run log file and store it locally$ - mySSH.copyin(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord, self.__workSpacePath+self.__runLogFile, '.') - mySSH.close() - #parse results looking for Encoding and Decoding mean values - self.__runResults=[] - with open(self.__runLogFile) as f: - for line in f: - if 'mean' in line: - self.__runResults.append(line) - #the values are appended for each mean value (2), so we take these 2 values from the list - info=self.__runResults[0]+self.__runResults[1] - - #once parsed move the local logfile to its folder for tidiness - os.system('mv '+self.__runLogFile+' '+ self.__runLogPath+'/.') - - #updating the HTML with results - html_cell = '
' + info  + '
' - html_queue=SimpleQueue() - html_queue.put(html_cell) - HTML.CreateHtmlTestRowQueue(self.runargs, 'OK', 1, html_queue) - return HTML - - - def __CheckBuild_PhySim(self, HTML, CONST): - self.__workSpacePath=self.eNBSourceCodePath+'/cmake_targets/' - mySSH = sshconnection.SSHConnection() - mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord) - #retrieve compile log file and store it locally - mySSH.copyin(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord, self.__workSpacePath+self.__buildLogFile, '.') - #delete older run log file - mySSH.command('rm ' + self.__workSpacePath+self.__runLogFile, '\$', 5) - mySSH.close() - #check build result from local compile log file - buildStatus=False - with open(self.__buildLogFile) as f: - #nr_prachsim is the last compile step - if 'nr_prachsim compiled' in f.read(): - buildStatus=True - #update HTML based on build status - if buildStatus: - HTML.CreateHtmlTestRow(self.buildargs, 'OK', CONST.ALL_PROCESSES_OK, 'LDPC') - self.exitStatus=0 - else: - logging.error('\u001B[1m Building Physical Simulators Failed\u001B[0m') - HTML.CreateHtmlTestRow(self.buildargs, 'KO', CONST.ALL_PROCESSES_OK, 'LDPC') - HTML.CreateHtmlTabFooter(False) - #exitStatus=1 will do a sys.exit in main - self.exitStatus=1 - return HTML - - -#-----------------$ -#PUBLIC Methods$ -#-----------------$ - - def Build_PhySim(self,htmlObj,constObj): - mySSH = sshconnection.SSHConnection() - mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord) - - #create working dir - mySSH.command('mkdir -p ' + self.eNBSourceCodePath, '\$', 5) - mySSH.command('cd ' + self.eNBSourceCodePath, '\$', 5) - - if not self.ranRepository.lower().endswith('.git'): - self.ranRepository+='.git' - - #git clone - mySSH.command('if [ ! -e .git ]; then stdbuf -o0 git clone ' + self.ranRepository + ' .; else stdbuf -o0 git fetch --prune; fi', '\$', 600) - #git config - mySSH.command('git config user.email "jenkins@openairinterface.org"', '\$', 5) - mySSH.command('git config user.name "OAI Jenkins"', '\$', 5) - - #git clean depending on self.forced_workspace_cleanup captured in xml - if self.forced_workspace_cleanup==True: - logging.info('Cleaning workspace ...') - mySSH.command('echo ' + self.eNBPassWord + ' | sudo -S git clean -x -d -ff', '\$', 30) - else: - logging.info('Workspace cleaning was disabled') - - # if the commit ID is provided, use it to point to it - if self.ranCommitID != '': - mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 5) - # if the branch is not develop, then it is a merge request and we need to do - # the potential merge. Note that merge conflicts should have already been checked earlier - if (self.ranAllowMerge): - if self.ranTargetBranch == '': - if (self.ranBranch != 'develop') and (self.ranBranch != 'origin/develop'): - mySSH.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 5) - else: - logging.info('Merging with the target branch: ' + self.ranTargetBranch) - mySSH.command('git merge --ff origin/' + self.ranTargetBranch + ' -m "Temporary merge for CI"', '\$', 5) - - #build - mySSH.command('source oaienv', '\$', 5) - mySSH.command('cd cmake_targets', '\$', 5) - mySSH.command('mkdir -p log', '\$', 5) - mySSH.command('chmod 777 log', '\$', 5) - mySSH.command('stdbuf -o0 ./build_oai ' + self.buildargs + ' 2>&1 | stdbuf -o0 tee ' + self.__buildLogFile, 'Bypassing the Tests|build have failed', 1500) - - mySSH.close() - #check build status and update HTML object - lHTML = html.HTMLManagement() - lHTML=self.__CheckBuild_PhySim(htmlObj,constObj) - return lHTML - - - def Run_PhySim(self,htmlObj,constObj,testcase_id): - #create run logs folder locally - os.system('mkdir -p ./'+self.__runLogPath) - #log file is tc_.log remotely - self.__runLogFile='physim_'+str(testcase_id)+'.log' - #open a session for test run - mySSH = sshconnection.SSHConnection() - mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord) - mySSH.command('cd '+self.__workSpacePath,'\$',5) - #run and redirect the results to a log file - mySSH.command(self.__workSpacePath+'phy_simulators/build/ldpctest ' + self.runargs + ' >> '+self.__runLogFile, '\$', 30) - mySSH.close() - #return updated HTML to main - lHTML = html.HTMLManagement() - lHTML=self.__CheckResults_PhySim(htmlObj,constObj,testcase_id) - return lHTML +# * 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 +# */ +#--------------------------------------------------------------------- +# Python for CI of OAI-eNB + COTS-UE +# +# Required Python Version +# Python 3.x +# +# Required Python Package +# pexpect +#--------------------------------------------------------------------- + +#to use logging.info() +import logging +#to create a SSH object locally in the methods +import sshconnection +#to update the HTML object +import html +from multiprocessing import SimpleQueue +#for log folder maintenance +import os + +class PhySim: + def __init__(self): + self.buildargs = "" + self.runargs = "" + self.eNBIpAddr = "" + self.eNBUserName = "" + self.eNBPassWord = "" + self.eNBSourceCodePath = "" + self.ranRepository = "" + self.ranBranch = "" + self.ranCommitID= "" + self.ranAllowMerge= "" + self.ranTargetBranch= "" + self.exitStatus=0 + self.forced_workspace_cleanup=False + #private attributes + self.__workSpacePath='' + self.__buildLogFile='compile_phy_sim.log' + self.__runLogFile='' + self.__runResults=[] + self.__runLogPath='phy_sim_logs' + + +#----------------- +#PRIVATE Methods +#----------------- + + def __CheckResults_PhySim(self,HTML,CONST,testcase_id): + mySSH = sshconnection.SSHConnection() + mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord) + #retrieve run log file and store it locally$ + mySSH.copyin(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord, self.__workSpacePath+self.__runLogFile, '.') + mySSH.close() + #parse results looking for Encoding and Decoding mean values + self.__runResults=[] + with open(self.__runLogFile) as f: + for line in f: + if 'mean' in line: + self.__runResults.append(line) + #the values are appended for each mean value (2), so we take these 2 values from the list + info=self.__runResults[0]+self.__runResults[1] + + #once parsed move the local logfile to its folder for tidiness + os.system('mv '+self.__runLogFile+' '+ self.__runLogPath+'/.') + + #updating the HTML with results + html_cell = '
' + info  + '
' + html_queue=SimpleQueue() + html_queue.put(html_cell) + HTML.CreateHtmlTestRowQueue(self.runargs, 'OK', 1, html_queue) + return HTML + + + def __CheckBuild_PhySim(self, HTML, CONST): + self.__workSpacePath=self.eNBSourceCodePath+'/cmake_targets/' + mySSH = sshconnection.SSHConnection() + mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord) + #retrieve compile log file and store it locally + mySSH.copyin(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord, self.__workSpacePath+self.__buildLogFile, '.') + #delete older run log file + mySSH.command('rm ' + self.__workSpacePath+self.__runLogFile, '\$', 5) + mySSH.close() + #check build result from local compile log file + buildStatus=False + with open(self.__buildLogFile) as f: + #nr_prachsim is the last compile step + if 'nr_prachsim compiled' in f.read(): + buildStatus=True + #update HTML based on build status + if buildStatus: + HTML.CreateHtmlTestRow(self.buildargs, 'OK', CONST.ALL_PROCESSES_OK, 'LDPC') + self.exitStatus=0 + else: + logging.error('\u001B[1m Building Physical Simulators Failed\u001B[0m') + HTML.CreateHtmlTestRow(self.buildargs, 'KO', CONST.ALL_PROCESSES_OK, 'LDPC') + HTML.CreateHtmlTabFooter(False) + #exitStatus=1 will do a sys.exit in main + self.exitStatus=1 + return HTML + + +#-----------------$ +#PUBLIC Methods$ +#-----------------$ + + def Build_PhySim(self,htmlObj,constObj): + mySSH = sshconnection.SSHConnection() + mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord) + + #create working dir + mySSH.command('mkdir -p ' + self.eNBSourceCodePath, '\$', 5) + mySSH.command('cd ' + self.eNBSourceCodePath, '\$', 5) + + if not self.ranRepository.lower().endswith('.git'): + self.ranRepository+='.git' + + #git clone + mySSH.command('if [ ! -e .git ]; then stdbuf -o0 git clone ' + self.ranRepository + ' .; else stdbuf -o0 git fetch --prune; fi', '\$', 600) + #git config + mySSH.command('git config user.email "jenkins@openairinterface.org"', '\$', 5) + mySSH.command('git config user.name "OAI Jenkins"', '\$', 5) + + #git clean depending on self.forced_workspace_cleanup captured in xml + if self.forced_workspace_cleanup==True: + logging.info('Cleaning workspace ...') + mySSH.command('echo ' + self.eNBPassWord + ' | sudo -S git clean -x -d -ff', '\$', 30) + else: + logging.info('Workspace cleaning was disabled') + + # if the commit ID is provided, use it to point to it + if self.ranCommitID != '': + mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 30) + # if the branch is not develop, then it is a merge request and we need to do + # the potential merge. Note that merge conflicts should have already been checked earlier + if (self.ranAllowMerge): + if self.ranTargetBranch == '': + if (self.ranBranch != 'develop') and (self.ranBranch != 'origin/develop'): + mySSH.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 5) + else: + logging.info('Merging with the target branch: ' + self.ranTargetBranch) + mySSH.command('git merge --ff origin/' + self.ranTargetBranch + ' -m "Temporary merge for CI"', '\$', 5) + + #build + mySSH.command('source oaienv', '\$', 5) + mySSH.command('cd cmake_targets', '\$', 5) + mySSH.command('mkdir -p log', '\$', 5) + mySSH.command('chmod 777 log', '\$', 5) + mySSH.command('stdbuf -o0 ./build_oai ' + self.buildargs + ' 2>&1 | stdbuf -o0 tee ' + self.__buildLogFile, 'Bypassing the Tests|build have failed', 1500) + + mySSH.close() + #check build status and update HTML object + lHTML = html.HTMLManagement() + lHTML=self.__CheckBuild_PhySim(htmlObj,constObj) + return lHTML + + + def Run_PhySim(self,htmlObj,constObj,testcase_id): + #create run logs folder locally + os.system('mkdir -p ./'+self.__runLogPath) + #log file is tc_.log remotely + self.__runLogFile='physim_'+str(testcase_id)+'.log' + #open a session for test run + mySSH = sshconnection.SSHConnection() + mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord) + mySSH.command('cd '+self.__workSpacePath,'\$',5) + #run and redirect the results to a log file + mySSH.command(self.__workSpacePath+'phy_simulators/build/ldpctest ' + self.runargs + ' >> '+self.__runLogFile, '\$', 30) + mySSH.close() + #return updated HTML to main + lHTML = html.HTMLManagement() + lHTML=self.__CheckResults_PhySim(htmlObj,constObj,testcase_id) + return lHTML diff --git a/ci-scripts/cls_physim1.py b/ci-scripts/cls_physim1.py index 86150a1470..1c82526831 100644 --- a/ci-scripts/cls_physim1.py +++ b/ci-scripts/cls_physim1.py @@ -64,7 +64,7 @@ class PhySim: #PUBLIC Methods$ #-----------------$ - def Deploy_PhySim(self, HTML): + def Deploy_PhySim(self, HTML, RAN): if self.ranRepository == '' or self.ranBranch == '' or self.ranCommitID == '': HELP.GenericHelp(CONST.Version) sys.exit('Insufficient Parameter') @@ -88,9 +88,10 @@ class PhySim: # on RedHat/CentOS .git extension is mandatory result = re.search('([a-zA-Z0-9\:\-\.\/])+\.git', self.ranRepository) if result is not None: - full_ran_repo_name = self.ranRepository + full_ran_repo_name = self.ranRepository.replace('git/', 'git') else: full_ran_repo_name = self.ranRepository + '.git' + mySSH.command('echo ' + lPassWord + ' | sudo rm -Rf ' + lSourcePath, '\$', 30) mySSH.command('mkdir -p ' + lSourcePath, '\$', 5) mySSH.command('cd ' + lSourcePath, '\$', 5) mySSH.command('if [ ! -e .git ]; then stdbuf -o0 git clone ' + full_ran_repo_name + ' .; else stdbuf -o0 git fetch --prune; fi', '\$', 600) @@ -102,9 +103,15 @@ class PhySim: mySSH.command('mkdir -p cmake_targets/log', '\$', 5) # if the commit ID is provided use it to point to it if self.ranCommitID != '': - mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 5) + mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 30) if self.ranAllowMerge: imageTag = "ci-temp" + if self.ranTargetBranch == '': + if (self.ranBranch != 'develop') and (self.ranBranch != 'origin/develop'): + mySSH.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 5) + else: + logging.debug('Merging with the target branch: ' + self.ranTargetBranch) + mySSH.command('git merge --ff origin/' + self.ranTargetBranch + ' -m "Temporary merge for CI"', '\$', 5) else: imageTag = "develop" # Check if image is exist on the Red Hat server, before pushing it to OC cluster @@ -112,7 +119,9 @@ class PhySim: if mySSH.getBefore().count('no such image') != 0: logging.error('\u001B[1m No such image oai-physim\u001B[0m') mySSH.close() - sys.exit(-1) + HTML.CreateHtmlTestRow('N/A', 'KO', CONST.PHYSIM_IMAGE_ABSENT) + RAN.prematureExit = True + return else: result = re.search('Size *= *(?P[0-9\-]+) *bytes', mySSH.getBefore()) if result is not None: @@ -135,14 +144,18 @@ class PhySim: if mySSH.getBefore().count('Login successful.') == 0: logging.error('\u001B[1m OC Cluster Login Failed\u001B[0m') mySSH.close() - sys.exit(-1) + HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_LOGIN_FAIL) + RAN.prematureExit = True + return else: logging.debug('\u001B[1m Login to OC Cluster Successfully\u001B[0m') mySSH.command(f'oc project {ocProjectName}', '\$', 6) if mySSH.getBefore().count(f'Already on project "{ocProjectName}"') == 0 and mySSH.getBefore().count(f'Now using project "{self.OCProjectName}"') == 0: logging.error(f'\u001B[1m Unable to access OC project {ocProjectName}\u001B[0m') mySSH.close() - sys.exit(-1) + HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_PROJECT_FAIL) + RAN.prematureExit = True + return else: logging.debug(f'\u001B[1m Now using project {ocProjectName}\u001B[0m') @@ -151,7 +164,9 @@ class PhySim: if mySSH.getBefore().count('Login Succeeded!') == 0: logging.error('\u001B[1m Podman Login to OC Cluster Registry Failed\u001B[0m') mySSH.close() - sys.exit(-1) + HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_LOGIN_FAIL) + RAN.prematureExit = True + return else: logging.debug('\u001B[1m Podman Login to OC Cluster Registry Successfully\u001B[0m') time.sleep(2) @@ -159,7 +174,9 @@ class PhySim: if mySSH.getBefore().count('(AlreadyExists):') == 0 and mySSH.getBefore().count('created') == 0: logging.error(f'\u001B[1m Image Stream "oai-physim" Creation Failed on OC Cluster {ocProjectName}\u001B[0m') mySSH.close() - sys.exit(-1) + HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_IS_FAIL) + RAN.prematureExit = True + return else: logging.debug(f'\u001B[1m Image Stream "oai-physim" created on OC project {ocProjectName}\u001B[0m') time.sleep(2) @@ -169,7 +186,9 @@ class PhySim: if mySSH.getBefore().count('Storing signatures') == 0: logging.error('\u001B[1m Image "oai-physim" push to OC Cluster Registry Failed\u001B[0m') mySSH.close() - sys.exit(-1) + HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_IS_FAIL) + RAN.prematureExit = True + return else: logging.debug('\u001B[1m Image "oai-physim" push to OC Cluster Registry Successfully\u001B[0m') @@ -180,9 +199,18 @@ class PhySim: if mySSH.getBefore().count('STATUS: deployed') == 0: logging.error('\u001B[1m Deploying PhySim Failed using helm chart on OC Cluster\u001B[0m') mySSH.command('helm uninstall physim >> cmake_targets/log/physim_helm_summary.txt 2>&1', '\$', 6) + isFinished1 = False + while(isFinished1 == False): + time.sleep(20) + mySSH.command('oc get pods -l app.kubernetes.io/instance=physim', '\$', 6, resync=True) + if re.search('No resources found', mySSH.getBefore()): + isFinished1 = True + mySSH.command(f'sudo podman rmi default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/{self.OCProjectName}/oai-physim:{imageTag}', '\$', 6) + mySSH.command('oc delete is oai-physim', '\$', 6) mySSH.close() self.AnalyzeLogFile_phySim(HTML) - sys.exit(-1) + RAN.prematureExit = True + return else: logging.debug('\u001B[1m Deployed PhySim Successfully using helm chart\u001B[0m') isRunning = False @@ -200,7 +228,18 @@ class PhySim: mySSH.command('oc get pods -l app.kubernetes.io/instance=physim 2>&1 | tee -a cmake_targets/log/physim_pods_summary.txt', '\$', 6) mySSH.command('helm uninstall physim >> cmake_targets/log/physim_helm_summary.txt 2>&1', '\$', 6) self.AnalyzeLogFile_phySim(HTML) - sys.exit(-1) + isFinished1 = False + while(isFinished1 == False): + time.sleep(20) + mySSH.command('oc get pods -l app.kubernetes.io/instance=physim', '\$', 6, resync=True) + if re.search('No resources found', mySSH.getBefore()): + isFinished1 = True + mySSH.command(f'sudo podman rmi default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/{self.OCProjectName}/oai-physim:{imageTag}', '\$', 6) + mySSH.command('oc delete is oai-physim', '\$', 6) + HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_PHYSIM_DEPLOY_FAIL) + HTML.CreateHtmlTestRowPhySimTestResult(self.testSummary,self.testResult) + RAN.prematureExit = True + return # Waiting to complete the running test count = 0 isFinished = False @@ -240,8 +279,15 @@ class PhySim: mySSH.command('oc logout', '\$', 6) mySSH.close() self.AnalyzeLogFile_phySim(HTML) - if self.testStatus == False: - sys.exit(-1) + if self.testStatus: + HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK) + HTML.CreateHtmlTestRowPhySimTestResult(self.testSummary,self.testResult) + logging.info('\u001B[1m Physical Simulator Pass\u001B[0m') + else: + RAN.prematureExit = True + HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ALL_PROCESSES_OK) + HTML.CreateHtmlTestRowPhySimTestResult(self.testSummary,self.testResult) + logging.info('\u001B[1m Physical Simulator Fail\u001B[0m') def AnalyzeLogFile_phySim(self, HTML): lIpAddr = self.eNBIPAddress @@ -258,7 +304,6 @@ class PhySim: os.mkdir(f'./physim_test_logs_{self.testCase_id}') mySSH.copyin(lIpAddr, lUserName, lPassWord, lSourcePath + '/cmake_targets/physim_test_log_' + self.testCase_id + '/*', './physim_test_logs_' + self.testCase_id) mySSH.command('rm -rf ./physim_test_log_'+ self.testCase_id, '\$', 5) - mySSH.command('oc logout', '\$', 6) mySSH.close() # physim test log analysis nextt = 0 @@ -289,7 +334,4 @@ class PhySim: self.testSummary['Nbfail'] = self.testCount[2] if self.testSummary['Nbfail'] == 0: self.testStatus = True - HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK) - HTML.CreateHtmlTestRowPhySimTestResult(self.testSummary,self.testResult) - logging.info('\u001B[1m Physical Simulator Pass\u001B[0m') return 0 diff --git a/ci-scripts/cls_static_code_analysis.py b/ci-scripts/cls_static_code_analysis.py index 980efb4f8a..1680f3e560 100644 --- a/ci-scripts/cls_static_code_analysis.py +++ b/ci-scripts/cls_static_code_analysis.py @@ -101,7 +101,7 @@ class StaticCodeAnalysis(): # on RedHat/CentOS .git extension is mandatory result = re.search('([a-zA-Z0-9\:\-\.\/])+\.git', self.ranRepository) if result is not None: - full_ran_repo_name = self.ranRepository + full_ran_repo_name = self.ranRepository.replace('git/', 'git') else: full_ran_repo_name = self.ranRepository + '.git' mySSH.command('mkdir -p ' + lSourcePath, '\$', 5) @@ -115,7 +115,7 @@ class StaticCodeAnalysis(): mySSH.command('mkdir -p cmake_targets/log', '\$', 5) # if the commit ID is provided use it to point to it if self.ranCommitID != '': - mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 5) + mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 30) mySSH.command('docker image rm oai-cppcheck:bionic oai-cppcheck:xenial || true', '\$', 60) mySSH.command('docker build --tag oai-cppcheck:xenial --file ci-scripts/docker/Dockerfile.cppcheck.xenial . > cmake_targets/log/cppcheck-xenial.txt 2>&1', '\$', 600) diff --git a/ci-scripts/constants.py b/ci-scripts/constants.py index a0e1ac5c45..bb110bc0e8 100644 --- a/ci-scripts/constants.py +++ b/ci-scripts/constants.py @@ -60,6 +60,11 @@ OAI_UE_PROCESS_SEG_FAULT = -25 OAI_UE_PROCESS_NO_MBMS_MSGS = -26 OAI_UE_PROCESS_OK = +6 INVALID_PARAMETER = -50 +PHYSIM_IMAGE_ABSENT = -60 +OC_LOGIN_FAIL = -61 +OC_PROJECT_FAIL = -62 +OC_IS_FAIL = -63 +OC_PHYSIM_DEPLOY_FAIL = -64 UE_STATUS_DETACHED = 0 UE_STATUS_DETACHING = 1 diff --git a/ci-scripts/html.py b/ci-scripts/html.py index de4e049adb..9eadf30279 100644 --- a/ci-scripts/html.py +++ b/ci-scripts/html.py @@ -365,6 +365,16 @@ class HTMLManagement(): self.htmlFile.write(' KO - SPGW process not found\n') elif (processesStatus == CONST.UE_IP_ADDRESS_ISSUE): self.htmlFile.write(' KO - Could not retrieve UE IP address\n') + elif (processesStatus == CONST.PHYSIM_IMAGE_ABSENT): + self.htmlFile.write(' KO - No such image oai-physim\n') + elif (processesStatus == CONST.OC_LOGIN_FAIL): + self.htmlFile.write(' KO - Could not log onto cluster\n') + elif (processesStatus == CONST.OC_PROJECT_FAIL): + self.htmlFile.write(' KO - Could not register into cluster project\n') + elif (processesStatus == CONST.OC_IS_FAIL): + self.htmlFile.write(' KO - Could not create Image Stream\n') + elif (processesStatus == CONST.OC_PHYSIM_DEPLOY_FAIL): + self.htmlFile.write(' KO - Could not properly deploy physim on cluster\n') else: self.htmlFile.write(' ' + str(status) + '\n') else: diff --git a/ci-scripts/main.py b/ci-scripts/main.py index 389e7f8614..3f5b57e016 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -786,7 +786,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re elif action == 'Cppcheck_Analysis': SCA.CppCheckAnalysis(HTML) elif action == 'Deploy_Run_PhySim': - PHYSIM.Deploy_PhySim(HTML) + PHYSIM.Deploy_PhySim(HTML, RAN) else: sys.exit('Invalid class (action) from xml') if not RAN.prematureExit: diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index 7079773a34..49601d9cc9 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -144,7 +144,7 @@ class RANManagement(): # on RedHat/CentOS .git extension is mandatory result = re.search('([a-zA-Z0-9\:\-\.\/])+\.git', self.ranRepository) if result is not None: - full_ran_repo_name = self.ranRepository + full_ran_repo_name = self.ranRepository.replace('git/', 'git') else: full_ran_repo_name = self.ranRepository + '.git' mySSH.command('mkdir -p ' + lSourcePath, '\$', 5) @@ -187,7 +187,7 @@ class RANManagement(): mySSH.command('echo ' + lPassWord + ' | sudo -S git clean -x -d -ff', '\$', 30) # if the commit ID is provided use it to point to it if self.ranCommitID != '': - mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 5) + mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 30) # if the branch is not develop, then it is a merge request and we need to do # the potential merge. Note that merge conflicts should already been checked earlier if (self.ranAllowMerge): diff --git a/ci-scripts/xml_files/container_image_build.xml b/ci-scripts/xml_files/container_image_build.xml index 430729c49c..e7eabc0794 100644 --- a/ci-scripts/xml_files/container_image_build.xml +++ b/ci-scripts/xml_files/container_image_build.xml @@ -35,6 +35,7 @@ all 0 0 + True
From 657bcd8f46a6e4ac245b82a32b9c0ff75f665e0f Mon Sep 17 00:00:00 2001 From: rmagueta Date: Mon, 10 May 2021 20:11:26 +0100 Subject: [PATCH 340/579] CCE-to-REG mapping extended for 2 or more DCI symbols at UE --- openair1/PHY/NR_TRANSPORT/nr_dci.c | 6 ++--- openair1/PHY/NR_UE_TRANSPORT/dci_nr.c | 34 ++++++++++++++++----------- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/openair1/PHY/NR_TRANSPORT/nr_dci.c b/openair1/PHY/NR_TRANSPORT/nr_dci.c index c093b23ca3..d208167855 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dci.c +++ b/openair1/PHY/NR_TRANSPORT/nr_dci.c @@ -181,7 +181,7 @@ void nr_generate_dci(PHY_VARS_gNB *gNB, } /*Mapping the encoded DCI along with the DMRS */ - for(int symbol = 0; symbol < pdcch_pdu_rel15->DurationSymbols; symbol++) { + for(int symbol_idx = 0; symbol_idx < pdcch_pdu_rel15->DurationSymbols; symbol_idx++) { for (int cce_count = 0; cce_count < dci_pdu->AggregationLevel; cce_count+=pdcch_pdu_rel15->DurationSymbols) { int8_t cce_idx = reg_list_order[cce_count]; @@ -193,7 +193,7 @@ void nr_generate_dci(PHY_VARS_gNB *gNB, if (k >= frame_parms.ofdm_symbol_size) k -= frame_parms.ofdm_symbol_size; - l = cset_start_symb + symbol; + l = cset_start_symb + symbol_idx; // dmrs index depends on reference point for k according to 38.211 7.4.1.3.2 if (pdcch_pdu_rel15->CoreSetType == NFAPI_NR_CSET_CONFIG_PDCCH_CONFIG) @@ -238,7 +238,7 @@ void nr_generate_dci(PHY_VARS_gNB *gNB, } // m } // reg_in_cce_idx } // cce_count - } // symbol + } // symbol_idx LOG_D(PHY, "DCI: payloadSize = %d | payload = %llx\n", diff --git a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c index c1cebc64a8..15303bb0c8 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c @@ -132,7 +132,7 @@ void nr_pdcch_demapping_deinterleaving(uint32_t *llr, if (reg_bundle_size_L != 0) { // interleaving will be done only if reg_bundle_size_L != 0 coreset_interleaved = 1; - coreset_C = (uint32_t) ((coreset_nbr_rb * coreset_time_dur) / (coreset_interleaver_size_R * reg_bundle_size_L)); + coreset_C = (uint32_t) (coreset_nbr_rb / (coreset_interleaver_size_R * reg_bundle_size_L)); } else { reg_bundle_size_L = 6; } @@ -140,7 +140,7 @@ void nr_pdcch_demapping_deinterleaving(uint32_t *llr, int f_bundle_j_list[NR_MAX_PDCCH_AGG_LEVEL] = {}; - for (int reg = 0; reg < ((coreset_nbr_rb * coreset_time_dur)); reg++) { + for (int reg = 0; reg < coreset_nbr_rb; reg++) { if ((reg % reg_bundle_size_L) == 0) { if (r == coreset_interleaver_size_R) { r = 0; @@ -148,7 +148,7 @@ void nr_pdcch_demapping_deinterleaving(uint32_t *llr, } bundle_j = (c * coreset_interleaver_size_R) + r; - f_bundle_j = ((r * coreset_C) + c + n_shift) % ((coreset_nbr_rb * coreset_time_dur) / reg_bundle_size_L); + f_bundle_j = ((r * coreset_C) + c + n_shift) % (coreset_nbr_rb / reg_bundle_size_L); if (coreset_interleaved == 0) f_bundle_j = bundle_j; @@ -174,22 +174,28 @@ void nr_pdcch_demapping_deinterleaving(uint32_t *llr, } } - for(int reg=0; reg<((coreset_nbr_rb*coreset_time_dur)); reg++) { + int rb = 0; + for (int c_id = 0; c_id < number_of_candidates; c_id++ ) { + for (int symbol_idx = 0; symbol_idx < coreset_time_dur; symbol_idx++) { + for (int cce_count = CCE[c_id/coreset_time_dur]+c_id%coreset_time_dur; cce_count < CCE[c_id/coreset_time_dur]+c_id%coreset_time_dur+L[c_id]; cce_count += coreset_time_dur) { + for (int reg_in_cce_idx = 0; reg_in_cce_idx < NR_NB_REG_PER_CCE; reg_in_cce_idx++) { - f_reg = (f_bundle_j_list_ord[reg/6]*reg_bundle_size_L)+(reg%reg_bundle_size_L); - index_z = 9*reg; - index_llr = 9*((uint16_t)floor(f_reg/coreset_time_dur)+((f_reg%coreset_time_dur)*(coreset_nbr_rb))); + f_reg = (f_bundle_j_list_ord[cce_count] * reg_bundle_size_L) + reg_in_cce_idx; + index_z = 9 * rb; + index_llr = (uint16_t) (f_reg + symbol_idx * coreset_nbr_rb) * 9; - for (int i=0; i<9; i++) { - z[index_z + i] = llr[index_llr + i]; + for (int i = 0; i < 9; i++) { + z[index_z + i] = llr[index_llr + i]; #ifdef NR_PDCCH_DCI_DEBUG - LOG_D(PHY,"[reg=%d,bundle_j=%d] z[%d]=(%d,%d) <-> \t[f_reg=%d,fbundle_j=%d] llr[%d]=(%d,%d) \n", - reg,bundle_j,(index_z + i),*(int16_t *) &z[index_z + i],*(1 + (int16_t *) &z[index_z + i]), - f_reg,f_bundle_j,(index_llr + i),*(int16_t *) &llr[index_llr + i], *(1 + (int16_t *) &llr[index_llr + i])); + LOG_I(PHY,"[cce_count=%d,reg_in_cce_idx=%d,bundle_j=%d,symbol_idx=%d,candidate=%d] z[%d]=(%d,%d) <-> \t[f_reg=%d,fbundle_j=%d] llr[%d]=(%d,%d) \n", + cce_count,reg_in_cce_idx,bundle_j,symbol_idx,c_id,(index_z + i),*(int16_t *) &z[index_z + i],*(1 + (int16_t *) &z[index_z + i]), + f_reg,f_bundle_j,(index_llr + i),*(int16_t *) &llr[index_llr + i], *(1 + (int16_t *) &llr[index_llr + i])); #endif + } + rb++; + } + } } - - if ((reg%reg_bundle_size_L) == 0) r++; } } From a2574a93974439171c2a7cf8138252ffc3f4699b Mon Sep 17 00:00:00 2001 From: hardy Date: Mon, 10 May 2021 15:23:47 +0200 Subject: [PATCH 341/579] fix a bug in IperfNoS1, from moduleUE related work --- ci-scripts/cls_oaicitest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index 7b75cf82c5..e2851abc25 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -2535,7 +2535,7 @@ class OaiCiTest(): if (os.path.isfile('iperf_server_' + self.testCase_id + '.log')): os.remove('iperf_server_' + self.testCase_id + '.log') SSH.copyin(iServerIPAddr, iServerUser, iServerPasswd, '/tmp/tmp_iperf_server_' + self.testCase_id + '.log', 'iperf_server_' + self.testCase_id + '_OAI-UE.log') - filename='iperf_server_' + self.testCase_id + '_' + device_id + '.log' + filename='iperf_server_' + self.testCase_id + '_OAI-UE.log' self.Iperf_analyzeV2Server(lock, '10.0.1.2', 'OAI-UE', status_queue, modified_options,filename,0) # copying on the EPC server for logCollection From f1da217dc38f38539374b869f3a36b78e6264a57 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Tue, 11 May 2021 12:17:58 +0100 Subject: [PATCH 342/579] Do not call nr_ue_prach_scheduler in phy_test mode --- openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c index 5b020b5988..553df102fb 100644 --- a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c +++ b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c @@ -97,8 +97,7 @@ int nr_ue_ul_indication(nr_uplink_indication_t *ul_info){ NR_TDD_UL_DL_ConfigCommon_t *tdd_UL_DL_ConfigurationCommon = mac->scc != NULL ? mac->scc->tdd_UL_DL_ConfigurationCommon : mac->scc_SIB->tdd_UL_DL_ConfigurationCommon; - - if (is_nr_UL_slot(tdd_UL_DL_ConfigurationCommon, ul_info->slot_tx, mac->frame_type) /*&& get_softmodem_params()->do_ra*/) + if (is_nr_UL_slot(tdd_UL_DL_ConfigurationCommon, ul_info->slot_tx, mac->frame_type) && !get_softmodem_params()->phy_test) nr_ue_prach_scheduler(module_id, ul_info->frame_tx, ul_info->slot_tx, ul_info->thread_id); switch(ret){ From 7d3c60ed3702ddce79c5f95e063ff2bded862fc6 Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Tue, 11 May 2021 14:34:27 +0200 Subject: [PATCH 343/579] small fixes, make all compile is same tree --- cmake_targets/CMakeLists.txt | 5 +---- cmake_targets/build_oai | 4 ---- common/config/config_cmdline.c | 2 +- openair1/PHY/NR_UE_TRANSPORT/nr_prach.c | 2 +- openair1/PHY/TOOLS/nr_phy_scope.c | 2 +- openair2/F1AP/f1ap_du_rrc_message_transfer.c | 3 +-- .../LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c | 2 +- targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp | 12 ++++++++---- targets/RT/USER/lte-softmodem.c | 3 --- targets/RT/USER/lte-uesoftmodem.c | 1 - 10 files changed, 14 insertions(+), 22 deletions(-) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 887a2a103b..78192fbf56 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -335,10 +335,6 @@ else (CUDA_FOUND) ) endif () -if(NR) - add_definitions(-DNR=1) -endif() - if (SANITIZE_ADDRESS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -fno-common") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-common") @@ -2908,6 +2904,7 @@ add_executable(lte-softmodem ${OPENAIR_TARGETS}/ARCH/COMMON/record_player.c ${OPENAIR2_DIR}/RRC/NAS/nas_config.c ${OPENAIR2_DIR}/RRC/NAS/rb_config.c + ${OPENAIR2_DIR}/F1AP/dummy_enb.c ${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c ${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/multicast_link.c ${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/socket.c diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai index 2eb04b1695..d59cada4e0 100755 --- a/cmake_targets/build_oai +++ b/cmake_targets/build_oai @@ -66,7 +66,6 @@ UE_DEBUG_TRACE="False" UE_TIMING_TRACE="False" USRP_REC_PLAY="False" BUILD_ECLIPSE=0 -NR="False" ITTI_SIM="False" RFSIM_NAS="False" SANITIZE_ADDRESS="False" @@ -250,7 +249,6 @@ function main() { shift;; --gNB) gNB=1 - NR="True" echo_info "Will compile gNB" shift;; -a | --agent) @@ -262,7 +260,6 @@ function main() { shift;; --nrUE) nrUE=1 - NR="True" rfsimNas=1 RFSIM_NAS="True" echo_info "Will compile NR UE" @@ -620,7 +617,6 @@ function main() { echo "set ( SKIP_SHARED_LIB_FLAG $SKIP_SHARED_LIB_FLAG )" >> $cmake_file echo "set ( ITTI_SIM $ITTI_SIM )" >> $cmake_file echo "set ( RFSIM_NAS $RFSIM_NAS )" >> $cmake_file - echo "set ( NR \"${NR}\" )" >> $cmake_file echo "set ( SANITIZE_ADDRESS $SANITIZE_ADDRESS )" >> $cmake_file echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file cd $DIR/$build_dir/build diff --git a/common/config/config_cmdline.c b/common/config/config_cmdline.c index 1df1bc16f7..f5dfae06b6 100644 --- a/common/config/config_cmdline.c +++ b/common/config/config_cmdline.c @@ -211,7 +211,7 @@ int config_process_cmdline(paramdef_t *cfgoptions,int numoptions, char *prefix) while (c > 0 ) { char *oneargv = strdup(config_get_if()->argv[i]); /* we use strtok_r which modifies its string paramater, and we don't want argv to be modified */ - + if(!oneargv) abort(); /* first check help options, either --help, -h or --help_
*/ if (strncmp(oneargv, "-h",2) == 0 || strncmp(oneargv, "--help",6) == 0 ) { char *tokctx = NULL; diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_prach.c b/openair1/PHY/NR_UE_TRANSPORT/nr_prach.c index 76fe180aba..5ce35a5cb6 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_prach.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_prach.c @@ -66,7 +66,7 @@ int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint8_t slot){ uint8_t Mod_id, fd_occasion, preamble_index, restricted_set, not_found; uint16_t rootSequenceIndex, prach_fmt_id, NCS, *prach_root_sequence_map, preamble_offset = 0; - uint16_t preamble_shift = 0, preamble_index0, n_shift_ra, n_shift_ra_bar, d_start, numshift, N_ZC, u, offset, offset2, first_nonzero_root_idx; + uint16_t preamble_shift = 0, preamble_index0, n_shift_ra, n_shift_ra_bar, d_start=0, numshift, N_ZC, u, offset, offset2, first_nonzero_root_idx; int16_t prach_tmp[98304*2*4] __attribute__((aligned(32))); int16_t Ncp = 0, amp, *prach, *prach2, *prachF, *Xu; diff --git a/openair1/PHY/TOOLS/nr_phy_scope.c b/openair1/PHY/TOOLS/nr_phy_scope.c index 90a252dc98..c840149507 100644 --- a/openair1/PHY/TOOLS/nr_phy_scope.c +++ b/openair1/PHY/TOOLS/nr_phy_scope.c @@ -240,7 +240,7 @@ static void genericWaterFall (OAIgraph_t *graph, scopeSample_t *values, const in for (int pix=0; pixw; pix++) { scopeSample_t *end=values+(pix+1)*samplesPerPixel; end-=2; - AssertFatal(end <= values+datasize,"diff : %u", end-values+datasize); + AssertFatal(end <= values+datasize,"diff : %ld", end-values+datasize); double val=0; for (scopeSample_t *s=values+(pix)*samplesPerPixel; diff --git a/openair2/F1AP/f1ap_du_rrc_message_transfer.c b/openair2/F1AP/f1ap_du_rrc_message_transfer.c index a5bb50547e..3fe26345ff 100644 --- a/openair2/F1AP/f1ap_du_rrc_message_transfer.c +++ b/openair2/F1AP/f1ap_du_rrc_message_transfer.c @@ -90,8 +90,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, if (RC.nrrrc[instance]->node_type == ngran_gNB_DU) { LOG_I(F1AP, "node is gNB DU, call DU_handle_DL_NR_RRC_MESSAGE_TRANSFER \n"); - DU_handle_DL_NR_RRC_MESSAGE_TRANSFER(instance, assoc_id, stream, pdu); - return 0; + return DU_handle_DL_NR_RRC_MESSAGE_TRANSFER(instance, assoc_id, stream, pdu); } LOG_D(F1AP, "DU_handle_DL_RRC_MESSAGE_TRANSFER \n"); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index 51a71427c5..2e7f6f2bc9 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -1998,7 +1998,7 @@ void get_pdsch_to_harq_feedback(int Mod_idP, if (CellGroup && CellGroup->spCellConfig->spCellConfigDedicated->uplinkConfig->uplinkBWP_ToAddModList) ubwp = CellGroup->spCellConfig->spCellConfigDedicated->uplinkConfig->uplinkBWP_ToAddModList->list.array[bwp_id-1]; - NR_SearchSpace_t *ss; + NR_SearchSpace_t *ss=NULL; // common search type uses DCI format 1_0 if (ss_type == NR_SearchSpace__searchSpaceType_PR_common) { diff --git a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp index c830aeb18e..771ce37104 100644 --- a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp +++ b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp @@ -1240,10 +1240,14 @@ extern "C" { set_rx_gain_offset(&openair0_cfg[0],i,bw_gain_adjust); ::uhd::gain_range_t gain_range = s->usrp->get_rx_gain_range(i); // limit to maximum gain - AssertFatal( openair0_cfg[0].rx_gain[i]-openair0_cfg[0].rx_gain_offset[i] <= gain_range.stop(), - "RX Gain too high, lower by %f dB\n", - openair0_cfg[0].rx_gain[i]-openair0_cfg[0].rx_gain_offset[i] - gain_range.stop()); - s->usrp->set_rx_gain(openair0_cfg[0].rx_gain[i]-openair0_cfg[0].rx_gain_offset[i],i); + double gain=openair0_cfg[0].rx_gain[i]-openair0_cfg[0].rx_gain_offset[i]; + if ( gain > gain_range.stop()) { + LOG_E(HW,"RX Gain too high, lower by %f dB\n", + gain - gain_range.stop()); + gain=gain_range.stop(); + } + + s->usrp->set_rx_gain(gain,i); LOG_I(HW,"RX Gain %d %f (%f) => %f (max %f)\n",i, openair0_cfg[0].rx_gain[i],openair0_cfg[0].rx_gain_offset[i], openair0_cfg[0].rx_gain[i]-openair0_cfg[0].rx_gain_offset[i],gain_range.stop()); diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index ca54792ced..890888dc81 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -103,9 +103,6 @@ pthread_cond_t nfapi_sync_cond; pthread_mutex_t nfapi_sync_mutex; int nfapi_sync_var=-1; //!< protected by mutex \ref nfapi_sync_mutex -msc_interface_t msc_interface; - - uint16_t sf_ahead=4; pthread_cond_t sync_cond; diff --git a/targets/RT/USER/lte-uesoftmodem.c b/targets/RT/USER/lte-uesoftmodem.c index 3714b0dc6f..bfd11f42f9 100644 --- a/targets/RT/USER/lte-uesoftmodem.c +++ b/targets/RT/USER/lte-uesoftmodem.c @@ -86,7 +86,6 @@ #include "lte-softmodem.h" -msc_interface_t msc_interface; /* temporary compilation wokaround (UE/eNB split */ uint16_t sf_ahead; From 5919b891bbe60128ada59fa801d0f176d43484aa Mon Sep 17 00:00:00 2001 From: rmagueta Date: Tue, 11 May 2021 15:00:39 +0100 Subject: [PATCH 344/579] Fix new cppcheck errors/warnings --- openair2/LAYER2/nr_pdcp/nr_pdcp_ue_manager.h | 2 +- openair2/RRC/NR/MESSAGES/asn1_msg.c | 144 +++++++++---------- openair2/RRC/NR/MESSAGES/asn1_msg.h | 2 +- openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c | 2 +- 4 files changed, 71 insertions(+), 79 deletions(-) diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_ue_manager.h b/openair2/LAYER2/nr_pdcp/nr_pdcp_ue_manager.h index 3329f856b7..742e0e84be 100644 --- a/openair2/LAYER2/nr_pdcp/nr_pdcp_ue_manager.h +++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_ue_manager.h @@ -28,7 +28,7 @@ typedef void nr_pdcp_ue_manager_t; typedef struct nr_pdcp_ue_t { int rnti; - nr_pdcp_entity_t *srb[2]; + nr_pdcp_entity_t *srb[3]; nr_pdcp_entity_t *drb[5]; } nr_pdcp_ue_t; diff --git a/openair2/RRC/NR/MESSAGES/asn1_msg.c b/openair2/RRC/NR/MESSAGES/asn1_msg.c index 5a07b58024..b720c1fb6f 100755 --- a/openair2/RRC/NR/MESSAGES/asn1_msg.c +++ b/openair2/RRC/NR/MESSAGES/asn1_msg.c @@ -1083,40 +1083,36 @@ void fill_initial_SpCellConfig(rnti_t rnti, void fill_mastercellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig, NR_CellGroupConfig_t *ue_context_mastercellGroup) { - NR_RLC_BearerConfig_t *rlc_BearerConfig = NULL; - NR_RLC_Config_t *rlc_Config = NULL; - NR_LogicalChannelConfig_t *logicalChannelConfig = NULL; - - long *logicalChannelGroup = NULL; - cellGroupConfig->cellGroupId = 0; + cellGroupConfig->rlc_BearerToReleaseList = NULL; + cellGroupConfig->rlc_BearerToAddModList = calloc(1, sizeof(*cellGroupConfig->rlc_BearerToAddModList)); - /* Rlc Bearer Config */ - /* TS38.331 9.2.1 Default SRB configurations */ - cellGroupConfig->rlc_BearerToAddModList = calloc(1, sizeof(*cellGroupConfig->rlc_BearerToAddModList)); + // RLC Bearer Config + // TS38.331 9.2.1 Default SRB configurations + NR_RLC_BearerConfig_t *rlc_BearerConfig = NULL; + NR_RLC_Config_t *rlc_Config = NULL; + NR_LogicalChannelConfig_t *logicalChannelConfig = NULL; + long *logicalChannelGroup = NULL; rlc_BearerConfig = calloc(1, sizeof(NR_RLC_BearerConfig_t)); rlc_BearerConfig->logicalChannelIdentity = 2; rlc_BearerConfig->servedRadioBearer = calloc(1, sizeof(*rlc_BearerConfig->servedRadioBearer)); rlc_BearerConfig->servedRadioBearer->present = NR_RLC_BearerConfig__servedRadioBearer_PR_srb_Identity; rlc_BearerConfig->servedRadioBearer->choice.srb_Identity = 2; rlc_BearerConfig->reestablishRLC = NULL; - //if (0) { - rlc_Config = calloc(1, sizeof(NR_RLC_Config_t)); - rlc_Config->present = NR_RLC_Config_PR_am; - rlc_Config->choice.am = calloc(1, sizeof(*rlc_Config->choice.am)); - rlc_Config->choice.am->dl_AM_RLC.sn_FieldLength = calloc(1, sizeof(NR_SN_FieldLengthAM_t)); - *(rlc_Config->choice.am->dl_AM_RLC.sn_FieldLength) = NR_SN_FieldLengthAM_size12; - rlc_Config->choice.am->dl_AM_RLC.t_Reassembly = NR_T_Reassembly_ms35; - rlc_Config->choice.am->dl_AM_RLC.t_StatusProhibit = NR_T_StatusProhibit_ms0; - rlc_Config->choice.am->ul_AM_RLC.sn_FieldLength = calloc(1, sizeof(NR_SN_FieldLengthAM_t)); - *(rlc_Config->choice.am->ul_AM_RLC.sn_FieldLength) = NR_SN_FieldLengthAM_size12; - rlc_Config->choice.am->ul_AM_RLC.t_PollRetransmit = NR_T_PollRetransmit_ms45; - rlc_Config->choice.am->ul_AM_RLC.pollPDU = NR_PollPDU_infinity; - rlc_Config->choice.am->ul_AM_RLC.pollByte = NR_PollByte_infinity; - rlc_Config->choice.am->ul_AM_RLC.maxRetxThreshold = NR_UL_AM_RLC__maxRetxThreshold_t8; - //} + rlc_Config = calloc(1, sizeof(NR_RLC_Config_t)); + rlc_Config->present = NR_RLC_Config_PR_am; + rlc_Config->choice.am = calloc(1, sizeof(*rlc_Config->choice.am)); + rlc_Config->choice.am->dl_AM_RLC.sn_FieldLength = calloc(1, sizeof(NR_SN_FieldLengthAM_t)); + *(rlc_Config->choice.am->dl_AM_RLC.sn_FieldLength) = NR_SN_FieldLengthAM_size12; + rlc_Config->choice.am->dl_AM_RLC.t_Reassembly = NR_T_Reassembly_ms35; + rlc_Config->choice.am->dl_AM_RLC.t_StatusProhibit = NR_T_StatusProhibit_ms0; + rlc_Config->choice.am->ul_AM_RLC.sn_FieldLength = calloc(1, sizeof(NR_SN_FieldLengthAM_t)); + *(rlc_Config->choice.am->ul_AM_RLC.sn_FieldLength) = NR_SN_FieldLengthAM_size12; + rlc_Config->choice.am->ul_AM_RLC.t_PollRetransmit = NR_T_PollRetransmit_ms45; + rlc_Config->choice.am->ul_AM_RLC.pollPDU = NR_PollPDU_infinity; + rlc_Config->choice.am->ul_AM_RLC.pollByte = NR_PollByte_infinity; + rlc_Config->choice.am->ul_AM_RLC.maxRetxThreshold = NR_UL_AM_RLC__maxRetxThreshold_t8; rlc_BearerConfig->rlc_Config = rlc_Config; - logicalChannelConfig = calloc(1, sizeof(NR_LogicalChannelConfig_t)); logicalChannelConfig->ul_SpecificParameters = calloc(1, sizeof(*logicalChannelConfig->ul_SpecificParameters)); logicalChannelConfig->ul_SpecificParameters->priority = 3; @@ -1129,55 +1125,50 @@ void fill_mastercellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig, NR_CellGr *logicalChannelConfig->ul_SpecificParameters->schedulingRequestID = 0; logicalChannelConfig->ul_SpecificParameters->logicalChannelSR_Mask = 0; logicalChannelConfig->ul_SpecificParameters->logicalChannelSR_DelayTimerApplied = 0; - //} rlc_BearerConfig->mac_LogicalChannelConfig = logicalChannelConfig; - ASN_SEQUENCE_ADD(&cellGroupConfig->rlc_BearerToAddModList->list, rlc_BearerConfig); ASN_SEQUENCE_ADD(&ue_context_mastercellGroup->rlc_BearerToAddModList->list, rlc_BearerConfig); - /*DRB Configuration*/ - rlc_BearerConfig = calloc(1, sizeof(NR_RLC_BearerConfig_t)); - rlc_BearerConfig->logicalChannelIdentity = 4; - rlc_BearerConfig->servedRadioBearer = calloc(1, sizeof(*rlc_BearerConfig->servedRadioBearer)); - rlc_BearerConfig->servedRadioBearer->present = NR_RLC_BearerConfig__servedRadioBearer_PR_drb_Identity; - rlc_BearerConfig->servedRadioBearer->choice.drb_Identity = 1; - rlc_BearerConfig->reestablishRLC = NULL; - //if (0) { - rlc_Config = calloc(1, sizeof(NR_RLC_Config_t)); - rlc_Config->present = NR_RLC_Config_PR_am; - rlc_Config->choice.am = calloc(1, sizeof(*rlc_Config->choice.am)); - rlc_Config->choice.am->dl_AM_RLC.sn_FieldLength = calloc(1, sizeof(NR_SN_FieldLengthAM_t)); - *(rlc_Config->choice.am->dl_AM_RLC.sn_FieldLength) = NR_SN_FieldLengthAM_size18; - rlc_Config->choice.am->dl_AM_RLC.t_Reassembly = NR_T_Reassembly_ms80; - rlc_Config->choice.am->dl_AM_RLC.t_StatusProhibit = NR_T_StatusProhibit_ms10; - rlc_Config->choice.am->ul_AM_RLC.sn_FieldLength = calloc(1, sizeof(NR_SN_FieldLengthAM_t)); - *(rlc_Config->choice.am->ul_AM_RLC.sn_FieldLength) = NR_SN_FieldLengthAM_size18; - rlc_Config->choice.am->ul_AM_RLC.t_PollRetransmit = NR_T_PollRetransmit_ms80; - rlc_Config->choice.am->ul_AM_RLC.pollPDU = NR_PollPDU_p64; - rlc_Config->choice.am->ul_AM_RLC.pollByte = NR_PollByte_kB125; - rlc_Config->choice.am->ul_AM_RLC.maxRetxThreshold = NR_UL_AM_RLC__maxRetxThreshold_t4; - //} - rlc_BearerConfig->rlc_Config = rlc_Config; - logicalChannelConfig = calloc(1, sizeof(NR_LogicalChannelConfig_t)); - logicalChannelConfig->ul_SpecificParameters = calloc(1, sizeof(*logicalChannelConfig->ul_SpecificParameters)); - logicalChannelConfig->ul_SpecificParameters->priority = 13; - logicalChannelConfig->ul_SpecificParameters->prioritisedBitRate = NR_LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_kBps8; - logicalChannelConfig->ul_SpecificParameters->bucketSizeDuration = NR_LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms100; - logicalChannelGroup = CALLOC(1, sizeof(long)); - *logicalChannelGroup = 1; - logicalChannelConfig->ul_SpecificParameters->logicalChannelGroup = logicalChannelGroup; - logicalChannelConfig->ul_SpecificParameters->schedulingRequestID = CALLOC(1, sizeof(*logicalChannelConfig->ul_SpecificParameters->schedulingRequestID)); - *logicalChannelConfig->ul_SpecificParameters->schedulingRequestID = 0; - logicalChannelConfig->ul_SpecificParameters->logicalChannelSR_Mask = 0; - logicalChannelConfig->ul_SpecificParameters->logicalChannelSR_DelayTimerApplied = 0; - - rlc_BearerConfig->mac_LogicalChannelConfig = logicalChannelConfig; - - ASN_SEQUENCE_ADD(&cellGroupConfig->rlc_BearerToAddModList->list, rlc_BearerConfig); - ASN_SEQUENCE_ADD(&ue_context_mastercellGroup->rlc_BearerToAddModList->list, rlc_BearerConfig); - - cellGroupConfig->rlc_BearerToReleaseList = NULL; - + // DRB Configuration + NR_RLC_BearerConfig_t *rlc_BearerConfig_drb = NULL; + NR_RLC_Config_t *rlc_Config_drb = NULL; + NR_LogicalChannelConfig_t *logicalChannelConfig_drb = NULL; + long *logicalChannelGroup_drb = NULL; + rlc_BearerConfig_drb = calloc(1, sizeof(NR_RLC_BearerConfig_t)); + rlc_BearerConfig_drb->logicalChannelIdentity = 4; + rlc_BearerConfig_drb->servedRadioBearer = calloc(1, sizeof(*rlc_BearerConfig_drb->servedRadioBearer)); + rlc_BearerConfig_drb->servedRadioBearer->present = NR_RLC_BearerConfig__servedRadioBearer_PR_drb_Identity; + rlc_BearerConfig_drb->servedRadioBearer->choice.drb_Identity = 1; + rlc_BearerConfig_drb->reestablishRLC = NULL; + rlc_Config_drb = calloc(1, sizeof(NR_RLC_Config_t)); + rlc_Config_drb->present = NR_RLC_Config_PR_am; + rlc_Config_drb->choice.am = calloc(1, sizeof(*rlc_Config_drb->choice.am)); + rlc_Config_drb->choice.am->dl_AM_RLC.sn_FieldLength = calloc(1, sizeof(NR_SN_FieldLengthAM_t)); + *(rlc_Config_drb->choice.am->dl_AM_RLC.sn_FieldLength) = NR_SN_FieldLengthAM_size18; + rlc_Config_drb->choice.am->dl_AM_RLC.t_Reassembly = NR_T_Reassembly_ms80; + rlc_Config_drb->choice.am->dl_AM_RLC.t_StatusProhibit = NR_T_StatusProhibit_ms10; + rlc_Config_drb->choice.am->ul_AM_RLC.sn_FieldLength = calloc(1, sizeof(NR_SN_FieldLengthAM_t)); + *(rlc_Config_drb->choice.am->ul_AM_RLC.sn_FieldLength) = NR_SN_FieldLengthAM_size18; + rlc_Config_drb->choice.am->ul_AM_RLC.t_PollRetransmit = NR_T_PollRetransmit_ms80; + rlc_Config_drb->choice.am->ul_AM_RLC.pollPDU = NR_PollPDU_p64; + rlc_Config_drb->choice.am->ul_AM_RLC.pollByte = NR_PollByte_kB125; + rlc_Config_drb->choice.am->ul_AM_RLC.maxRetxThreshold = NR_UL_AM_RLC__maxRetxThreshold_t4; + rlc_BearerConfig_drb->rlc_Config = rlc_Config_drb; + logicalChannelConfig_drb = calloc(1, sizeof(NR_LogicalChannelConfig_t)); + logicalChannelConfig_drb->ul_SpecificParameters = calloc(1, sizeof(*logicalChannelConfig_drb->ul_SpecificParameters)); + logicalChannelConfig_drb->ul_SpecificParameters->priority = 13; + logicalChannelConfig_drb->ul_SpecificParameters->prioritisedBitRate = NR_LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_kBps8; + logicalChannelConfig_drb->ul_SpecificParameters->bucketSizeDuration = NR_LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms100; + logicalChannelGroup_drb = CALLOC(1, sizeof(long)); + *logicalChannelGroup_drb = 1; + logicalChannelConfig_drb->ul_SpecificParameters->logicalChannelGroup = logicalChannelGroup_drb; + logicalChannelConfig_drb->ul_SpecificParameters->schedulingRequestID = CALLOC(1, sizeof(*logicalChannelConfig_drb->ul_SpecificParameters->schedulingRequestID)); + *logicalChannelConfig_drb->ul_SpecificParameters->schedulingRequestID = 0; + logicalChannelConfig_drb->ul_SpecificParameters->logicalChannelSR_Mask = 0; + logicalChannelConfig_drb->ul_SpecificParameters->logicalChannelSR_DelayTimerApplied = 0; + rlc_BearerConfig_drb->mac_LogicalChannelConfig = logicalChannelConfig_drb; + ASN_SEQUENCE_ADD(&cellGroupConfig->rlc_BearerToAddModList->list, rlc_BearerConfig_drb); + ASN_SEQUENCE_ADD(&ue_context_mastercellGroup->rlc_BearerToAddModList->list, rlc_BearerConfig_drb); } void fill_initial_cellGroupConfig(rnti_t rnti, @@ -1635,7 +1626,7 @@ uint8_t do_NR_RRCRelease(uint8_t *buffer, } //------------------------------------------------------------------------------ -uint16_t do_RRCReconfiguration( +int16_t do_RRCReconfiguration( const protocol_ctxt_t *const ctxt_pP, uint8_t *buffer, uint8_t Transaction_id, @@ -1699,8 +1690,12 @@ uint16_t do_RRCReconfiguration( ie->lateNonCriticalExtension = NULL; // nonCriticalExtension - if (cellGroupConfig || dedicatedNAS_MessageList) - ie->nonCriticalExtension = calloc(1, sizeof(NR_RRCReconfiguration_v1530_IEs_t)); + if (cellGroupConfig || dedicatedNAS_MessageList) { + ie->nonCriticalExtension = calloc(1, sizeof(NR_RRCReconfiguration_v1530_IEs_t)); + if (dedicatedNAS_MessageList) + ie->nonCriticalExtension->dedicatedNAS_MessageList = dedicatedNAS_MessageList; + } + if(cellGroupConfig!=NULL){ enc_rval = uper_encode_to_buffer(&asn_DEF_NR_CellGroupConfig, NULL, @@ -1719,9 +1714,6 @@ uint16_t do_RRCReconfiguration( ie->nonCriticalExtension->masterCellGroup->size = (enc_rval.encoded+7)/8; } - if (dedicatedNAS_MessageList) - ie->nonCriticalExtension->dedicatedNAS_MessageList = dedicatedNAS_MessageList; - dl_dcch_msg.message.choice.c1->choice.rrcReconfiguration->criticalExtensions.choice.rrcReconfiguration = ie; //if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { diff --git a/openair2/RRC/NR/MESSAGES/asn1_msg.h b/openair2/RRC/NR/MESSAGES/asn1_msg.h index 4dd6fd939f..4993e03601 100644 --- a/openair2/RRC/NR/MESSAGES/asn1_msg.h +++ b/openair2/RRC/NR/MESSAGES/asn1_msg.h @@ -117,7 +117,7 @@ uint8_t do_NR_SA_UECapabilityEnquiry( const protocol_ctxt_t *const ctxt_pP, uint8_t do_NR_RRCRelease(uint8_t *buffer, uint8_t Transaction_id); -uint16_t do_RRCReconfiguration( +int16_t do_RRCReconfiguration( const protocol_ctxt_t *const ctxt_pP, uint8_t *buffer, uint8_t Transaction_id, diff --git a/openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c b/openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c index 5479e176eb..11c41394eb 100644 --- a/openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c +++ b/openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c @@ -901,7 +901,7 @@ nwGtpv1uProcessUdpReq( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle, case NW_GTP_END_MARKER: #if defined(LOG_GTPU) && LOG_GTPU > 0 for(int i =1; i<= udpDataLen; i++){ - printf("%02x ", udpData[i-1]); + printf("%02x ", (uint8_t)udpData[i-1]); if(i % 20 == 0)printf("\n"); } #endif From f04008a4238f949b67dcf1435553796d2bf144bb Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Tue, 11 May 2021 16:14:39 +0200 Subject: [PATCH 345/579] add file --- openair2/F1AP/dummy_enb.c | 40 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 openair2/F1AP/dummy_enb.c diff --git a/openair2/F1AP/dummy_enb.c b/openair2/F1AP/dummy_enb.c new file mode 100644 index 0000000000..0b419e3332 --- /dev/null +++ b/openair2/F1AP/dummy_enb.c @@ -0,0 +1,40 @@ +#include "COMMON/platform_types.h" +#include "COMMON/platform_constants.h" +#include "common/ran_context.h" + +#include "common/utils/LOG/log.h" +#include "common/utils/LOG/vcd_signal_dumper.h" + +#include "NR_BCCH-BCH-Message.h" +#include "NR_ServingCellConfigCommon.h" + +#include "LAYER2/NR_MAC_gNB/mac_proto.h" +#include "SCHED_NR/phy_frame_config_nr.h" + +#include "NR_MIB.h" +#include "LAYER2/NR_MAC_COMMON/nr_mac_common.h" +#include "../../../../nfapi/oai_integration/vendor_ext.h" +/* Softmodem params */ +#include "executables/softmodem-common.h" + + +int rrc_mac_config_req_gNB(module_id_t Mod_idP, + int ssb_SubcarrierOffset, + int pdsch_AntennaPorts, + int pusch_AntennaPorts, + NR_ServingCellConfigCommon_t *scc, + int add_ue, + uint32_t rnti, + NR_CellGroupConfig_t *CellGroup){ +abort(); +return 0; +} +rlc_op_status_t nr_rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP, + const NR_SRB_ToAddModList_t * const srb2add_listP, + const NR_DRB_ToAddModList_t * const drb2add_listP, + const NR_DRB_ToReleaseList_t * const drb2release_listP, + const LTE_PMCH_InfoList_r9_t * const pmch_InfoList_r9_pP, + struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_bearer2add_list){ +abort(); +return 0; +} From 9c417e1a149268c201cbba29c502f06646257da1 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Tue, 11 May 2021 15:38:49 +0100 Subject: [PATCH 346/579] Fix uplink data in phy-test --- openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c index ede05abfcc..57331fb65e 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c @@ -1002,7 +1002,7 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in } else { if ( (mac->UL_ndi[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id] != ulcfg_pdu->pusch_config_pdu.pusch_data.new_data_indicator || - mac->first_ul_tx[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id]==1) && ra->ra_state == RA_SUCCEEDED){ + mac->first_ul_tx[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id]==1)){ // Getting IP traffic to be transmitted data_existing = nr_ue_get_sdu(mod_id, From bfd7954fb7102a6b42c68dcc7a741fe3a9ca0b21 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Tue, 11 May 2021 15:43:40 +0100 Subject: [PATCH 347/579] Fix srb cppcheck errors/warnings --- openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c | 8 ++++---- openair2/LAYER2/nr_pdcp/nr_pdcp_ue_manager.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c index 0d21ba9302..9323a9da85 100644 --- a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c +++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c @@ -548,7 +548,7 @@ static void deliver_sdu_srb(void *_ue, nr_pdcp_entity_t *entity, int srb_id; int i; - for (i = 0; i < 3; i++) { + for (i = 0; i < 2; i++) { if (entity == ue->srb[i]) { srb_id = i+1; goto srb_found; @@ -591,7 +591,7 @@ static void deliver_pdu_srb(void *_ue, nr_pdcp_entity_t *entity, int i; mem_block_t *memblock; - for (i = 0; i < 3; i++) { + for (i = 0; i < 2; i++) { if (entity == ue->srb[i]) { srb_id = i+1; goto srb_found; @@ -1096,7 +1096,7 @@ void pdcp_config_set_security( /* TODO: proper handling of DRBs, for the moment only SRBs are handled */ - if (rb_id >= 1 && rb_id <= 3) { + if (rb_id >= 1 && rb_id <= 2) { rb = ue->srb[rb_id - 1]; if (rb == NULL) { @@ -1146,7 +1146,7 @@ static boolean_t pdcp_data_req_srb( ue = nr_pdcp_manager_get_ue(nr_pdcp_ue_manager, rnti); - if (rb_id < 1 || rb_id > 3) + if (rb_id < 1 || rb_id > 2) rb = NULL; else rb = ue->srb[rb_id - 1]; diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_ue_manager.h b/openair2/LAYER2/nr_pdcp/nr_pdcp_ue_manager.h index 742e0e84be..3329f856b7 100644 --- a/openair2/LAYER2/nr_pdcp/nr_pdcp_ue_manager.h +++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_ue_manager.h @@ -28,7 +28,7 @@ typedef void nr_pdcp_ue_manager_t; typedef struct nr_pdcp_ue_t { int rnti; - nr_pdcp_entity_t *srb[3]; + nr_pdcp_entity_t *srb[2]; nr_pdcp_entity_t *drb[5]; } nr_pdcp_ue_t; From e7a43fb3946ca8e9d3821b811710c9a95eb05924 Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Tue, 11 May 2021 22:26:50 +0200 Subject: [PATCH 348/579] fix 4G DL rb id --- openair3/ocp-gtpu/gtp_itf.cpp | 71 +++++++++++++++++++++-------------- openair3/ocp-gtpu/gtp_itf.h | 2 +- 2 files changed, 43 insertions(+), 30 deletions(-) diff --git a/openair3/ocp-gtpu/gtp_itf.cpp b/openair3/ocp-gtpu/gtp_itf.cpp index 2862a4d906..985a4d7eb3 100644 --- a/openair3/ocp-gtpu/gtp_itf.cpp +++ b/openair3/ocp-gtpu/gtp_itf.cpp @@ -62,7 +62,7 @@ typedef struct { typedef struct { rnti_t rnti; - ebi_t rb_id; + ebi_t incoming_rb_id; gtpCallback callBack; } rntiData_t; @@ -156,14 +156,14 @@ static int gtpv1uCreateAndSendMsg(int h, uint32_t peerIp, uint16_t peerPort, te static void gtpv1uSend(instance_t instance, gtpv1u_enb_tunnel_data_req_t *req, bool seqNumFlag, bool npduNumFlag) { uint8_t *buffer=req->buffer+req->offset; size_t length=req->length; - uint64_t rnti=req->rnti; + rnti_t rnti=req->rnti; int rab_id=req->rab_id; pthread_mutex_lock(&globGtp.gtp_lock); auto inst=&globGtp.instances[compatInst(instance)]; auto ptrRnti=inst->ue2te_mapping.find(rnti); if ( ptrRnti==inst->ue2te_mapping.end() ) { - LOG_E(GTPU, "gtpv1uSend failed: while getting ue rnti %lx in hashtable ue_mapping\n", rnti); + LOG_E(GTPU, "gtpv1uSend failed: while getting ue rnti %x in hashtable ue_mapping\n", rnti); pthread_mutex_unlock(&globGtp.gtp_lock); return; } @@ -171,11 +171,11 @@ static void gtpv1uSend(instance_t instance, gtpv1u_enb_tunnel_data_req_t *req, b auto ptr=ptrRnti->second.bearers; if ( ptr.find(rab_id) == ptr.end() ) { - LOG_E(GTPU,"sending a packet to a non existant RNTI:RAB: %lx/%x\n", rnti, rab_id); + LOG_E(GTPU,"sending a packet to a non existant RNTI:RAB: %x/%x\n", rnti, rab_id); pthread_mutex_unlock(&globGtp.gtp_lock); return; } else - LOG_D(GTPU,"sending a packet to RNTI:RAB:teid %lx/%x/%x, len %lu, oldseq %d, oldnum %d\n", + LOG_D(GTPU,"sending a packet to RNTI:RAB:teid %x/%x/%x, len %lu, oldseq %d, oldnum %d\n", rnti, rab_id,ptr[rab_id].teid_outgoing,length, ptr[rab_id].seqNum,ptr[rab_id].npduNum ); if(seqNumFlag) @@ -197,14 +197,14 @@ static void gtpv1uSend(instance_t instance, gtpv1u_enb_tunnel_data_req_t *req, b static void gtpv1uSend2(instance_t instance, gtpv1u_gnb_tunnel_data_req_t *req, bool seqNumFlag, bool npduNumFlag) { uint8_t *buffer=req->buffer+req->offset; size_t length=req->length; - uint64_t rnti=req->rnti; + rnti_t rnti=req->rnti; int rab_id=req->pdusession_id; pthread_mutex_lock(&globGtp.gtp_lock); auto inst=&globGtp.instances[compatInst(instance)]; auto ptrRnti=inst->ue2te_mapping.find(rnti); if ( ptrRnti==inst->ue2te_mapping.end() ) { - LOG_E(GTPU, "gtpv1uSend failed: while getting ue rnti %lx in hashtable ue_mapping\n", rnti); + LOG_E(GTPU, "gtpv1uSend failed: while getting ue rnti %x in hashtable ue_mapping\n", rnti); pthread_mutex_unlock(&globGtp.gtp_lock); return; } @@ -212,11 +212,11 @@ static void gtpv1uSend2(instance_t instance, gtpv1u_gnb_tunnel_data_req_t *req, auto ptr=ptrRnti->second.bearers; if ( ptr.find(rab_id) == ptr.end() ) { - LOG_E(GTPU,"sending a packet to a non existant RNTI:RAB: %lx/%x\n", rnti, rab_id); + LOG_E(GTPU,"sending a packet to a non existant RNTI:RAB: %x/%x\n", rnti, rab_id); pthread_mutex_unlock(&globGtp.gtp_lock); return; } else - LOG_D(GTPU,"sending a packet to RNTI:RAB:teid %lx/%x/%x, len %lu, oldseq %d, oldnum %d\n", + LOG_D(GTPU,"sending a packet to RNTI:RAB:teid %x/%x/%x, len %lu, oldseq %d, oldnum %d\n", rnti, rab_id,ptr[rab_id].teid_outgoing,length, ptr[rab_id].seqNum,ptr[rab_id].npduNum ); if(seqNumFlag) @@ -236,14 +236,14 @@ static void gtpv1uSend2(instance_t instance, gtpv1u_gnb_tunnel_data_req_t *req, } static void gtpv1uEndTunnel(instance_t instance, gtpv1u_enb_tunnel_data_req_t *req) { - uint64_t rnti=req->rnti; + rnti_t rnti=req->rnti; int rab_id=req->rab_id; pthread_mutex_lock(&globGtp.gtp_lock); auto inst=&globGtp.instances[compatInst(instance)]; auto ptrRnti=inst->ue2te_mapping.find(rnti); if ( ptrRnti==inst->ue2te_mapping.end() ) { - LOG_E(GTPU, "gtpv1uSend failed: while getting ue rnti %lx in hashtable ue_mapping\n", rnti); + LOG_E(GTPU, "gtpv1uSend failed: while getting ue rnti %x in hashtable ue_mapping\n", rnti); pthread_mutex_unlock(&globGtp.gtp_lock); return; } @@ -251,11 +251,11 @@ static void gtpv1uEndTunnel(instance_t instance, gtpv1u_enb_tunnel_data_req_t *r auto ptr=ptrRnti->second.bearers; if ( ptr.find(rab_id) == ptr.end() ) { - LOG_E(GTPU,"sending a packet to a non existant RNTI:RAB: %lx/%x\n", rnti, rab_id); + LOG_E(GTPU,"sending a packet to a non existant RNTI:RAB: %x/%x\n", rnti, rab_id); pthread_mutex_unlock(&globGtp.gtp_lock); return; } else - LOG_D(GTPU,"sending a end packet packet to RNTI:RAB:teid %lx/%x/%x\n", + LOG_D(GTPU,"sending a end packet packet to RNTI:RAB:teid %x/%x/%x\n", rnti, rab_id,ptr[rab_id].teid_outgoing); ocp_gtpv1u_bearer_t tmp=ptr[rab_id]; @@ -386,8 +386,8 @@ instance_t ocp_gtpv1Init(openAddr_t context) { return id; } -teid_t newGtpuCreateTunnel(instance_t instance, rnti_t rnti, int bearer_id, teid_t outgoing_teid, - transport_layer_addr_t remoteAddr, int port, gtpCallback callBack) { +teid_t newGtpuCreateTunnel(instance_t instance, rnti_t rnti, int incoming_bearer_id, int outgoing_bearer_id, teid_t outgoing_teid, + transport_layer_addr_t remoteAddr, int port, gtpCallback callBack) { pthread_mutex_lock(&globGtp.gtp_lock); auto inst=&globGtp.instances[instance]; auto it=inst->ue2te_mapping.find(rnti); @@ -400,17 +400,17 @@ teid_t newGtpuCreateTunnel(instance_t instance, rnti_t rnti, int bearer_id, teid uint32_t incoming_teid=gtpv1uNewTeid(); while ( inst->te2ue_mapping.find(incoming_teid) != inst->te2ue_mapping.end() ) { - LOG_W(GTPU, "generated a random Teid that exists, re-generating (%u)\n",incoming_teid); + LOG_W(GTPU, "generated a random Teid that exists, re-generating (%x)\n",incoming_teid); incoming_teid=gtpv1uNewTeid(); }; inst->te2ue_mapping[incoming_teid].rnti=rnti; - inst->te2ue_mapping[incoming_teid].rb_id= outgoing_teid; + inst->te2ue_mapping[incoming_teid].incoming_rb_id= incoming_bearer_id; inst->te2ue_mapping[incoming_teid].callBack=callBack; - auto tmp=&inst->ue2te_mapping[rnti].bearers[bearer_id]; + auto tmp=&inst->ue2te_mapping[rnti].bearers[outgoing_bearer_id]; int addrs_length_in_bytes = remoteAddr.length / 8; @@ -433,14 +433,15 @@ teid_t newGtpuCreateTunnel(instance_t instance, rnti_t rnti, int bearer_id, teid default: AssertFatal(false, "SGW Address size impossible"); } - + tmp->teid_incoming = incoming_teid; tmp->outgoing_port=port; tmp->teid_outgoing= outgoing_teid; pthread_mutex_unlock(&globGtp.gtp_lock); - LOG_I(GTPU, "Created tunnel for RNTI %x, teid for DL: %d, teid for UL %d\n", + LOG_I(GTPU, "Created tunnel for RNTI %x, bearer: %d/%d teid for DL: %x, teid for UL %x\n", rnti, - tmp->teid_incoming, + outgoing_bearer_id, incoming_bearer_id, + tmp->teid_incoming, tmp->teid_outgoing); return incoming_teid; } @@ -448,13 +449,18 @@ teid_t newGtpuCreateTunnel(instance_t instance, rnti_t rnti, int bearer_id, teid int ocp_gtpv1u_create_s1u_tunnel(instance_t instance, const gtpv1u_enb_create_tunnel_req_t *create_tunnel_req, gtpv1u_enb_create_tunnel_resp_t *create_tunnel_resp) { - LOG_D(GTPU, "Start create tunnels for RNTI %x, num_tunnels %d, sgw_S1u_teid %d\n", + LOG_D(GTPU, "Start create tunnels for RNTI %x, num_tunnels %d, sgw_S1u_teid %x\n", create_tunnel_req->rnti, create_tunnel_req->num_tunnels, create_tunnel_req->sgw_S1u_teid[0]); for (int i = 0; i < create_tunnel_req->num_tunnels; i++) { + AssertFatal(create_tunnel_req->eps_bearer_id[i] > 4, + "From legacy code not clear, seems impossible (bearer=%d)\n", + create_tunnel_req->eps_bearer_id[i]); + int incoming_rb_id=create_tunnel_req->eps_bearer_id[i]-4; teid_t teid=newGtpuCreateTunnel(compatInst(instance), create_tunnel_req->rnti, + incoming_rb_id, create_tunnel_req->eps_bearer_id[i], create_tunnel_req->sgw_S1u_teid[i], create_tunnel_req->sgw_addr[i], 2152, @@ -477,7 +483,7 @@ int ocp_gtpv1u_update_s1u_tunnel( const gtpv1u_enb_create_tunnel_req_t *const create_tunnel_req, const rnti_t prior_rnti ) { - LOG_D(GTPU, "Start update tunnels for old RNTI %x, new RNTI %x, num_tunnels %d, sgw_S1u_teid %d, eps_bearer_id %d\n", + LOG_D(GTPU, "Start update tunnels for old RNTI %x, new RNTI %x, num_tunnels %d, sgw_S1u_teid %x, eps_bearer_id %x\n", prior_rnti, create_tunnel_req->rnti, create_tunnel_req->num_tunnels, @@ -509,13 +515,14 @@ int ocp_gtpv1u_update_s1u_tunnel( int gtpv1u_create_ngu_tunnel( const instance_t instance, const gtpv1u_gnb_create_tunnel_req_t *const create_tunnel_req, gtpv1u_gnb_create_tunnel_resp_t *const create_tunnel_resp) { - LOG_D(GTPU, "Start create tunnels for RNTI %x, num_tunnels %d, sgw_S1u_teid %d\n", + LOG_D(GTPU, "Start create tunnels for RNTI %x, num_tunnels %d, sgw_S1u_teid %x\n", create_tunnel_req->rnti, create_tunnel_req->num_tunnels, create_tunnel_req->upf_NGu_teid[0]); for (int i = 0; i < create_tunnel_req->num_tunnels; i++) { teid_t teid=newGtpuCreateTunnel(compatInst(instance), create_tunnel_req->rnti, + create_tunnel_req->pdusession_id[i], create_tunnel_req->pdusession_id[i], create_tunnel_req->upf_NGu_teid[i], create_tunnel_req->upf_addr[i], 2152, @@ -560,13 +567,19 @@ int newGtpuDeleteTunnel(instance_t instance, rnti_t rnti) { return -1; } + int nb=0; + for (auto j=it->second.bearers.begin(); j!=it->second.bearers.end(); - ++j) + ++j) { inst->te2ue_mapping.erase(j->second.teid_incoming); + nb++; + } inst->ue2te_mapping.erase(it); pthread_mutex_unlock(&globGtp.gtp_lock); + LOG_I(GTPU, "Deleted all tunnels for RNTI %d (%d tunnels deleted)\n", + rnti, nb); return !GTPNOK; } @@ -634,7 +647,7 @@ static int Gtpv1uHandleEndMarker(int h, auto tunnel=inst->te2ue_mapping.find(ntohl(msgHdr->teid)); if ( tunnel == inst->te2ue_mapping.end() ) { - LOG_E(GTPU,"Received a incoming packet on unknown teid (%d) Dropping!\n", msgHdr->teid); + LOG_E(GTPU,"Received a incoming packet on unknown teid (%x) Dropping!\n", msgHdr->teid); pthread_mutex_unlock(&globGtp.gtp_lock); return GTPNOK; } @@ -653,7 +666,7 @@ static int Gtpv1uHandleEndMarker(int h, ctxt.configured = 0; ctxt.brOption = 0; const srb_flag_t srb_flag=SRB_FLAG_NO; - const rb_id_t rb_id=tunnel->second.rb_id; + const rb_id_t rb_id=tunnel->second.incoming_rb_id; const mui_t mui=RLC_MUI_UNDEFINED; const confirm_t confirm=RLC_SDU_CONFIRM_NO; const pdcp_transmission_mode_t mode=PDCP_TRANSMISSION_MODE_DATA; @@ -695,7 +708,7 @@ static int Gtpv1uHandleGpdu(int h, auto tunnel=inst->te2ue_mapping.find(ntohl(msgHdr->teid)); if ( tunnel == inst->te2ue_mapping.end() ) { - LOG_E(GTPU,"Received a incoming packet on unknown teid (%d) Dropping!\n", msgHdr->teid); + LOG_E(GTPU,"Received a incoming packet on unknown teid (%x) Dropping!\n", msgHdr->teid); pthread_mutex_unlock(&globGtp.gtp_lock); return GTPNOK; } @@ -719,7 +732,7 @@ static int Gtpv1uHandleGpdu(int h, ctxt.configured = 0; ctxt.brOption = 0; const srb_flag_t srb_flag=SRB_FLAG_NO; - const rb_id_t rb_id=tunnel->second.rb_id; + const rb_id_t rb_id=tunnel->second.incoming_rb_id; const mui_t mui=RLC_MUI_UNDEFINED; const confirm_t confirm=RLC_SDU_CONFIRM_NO; const sdu_size_t sdu_buffer_size=msgBufLen-offset; diff --git a/openair3/ocp-gtpu/gtp_itf.h b/openair3/ocp-gtpu/gtp_itf.h index 9819ed9485..dd406e27cd 100644 --- a/openair3/ocp-gtpu/gtp_itf.h +++ b/openair3/ocp-gtpu/gtp_itf.h @@ -60,7 +60,7 @@ int ocp_gtpv1u_create_x2u_tunnel( // New API -teid_t newGtpuCreateTunnel(instance_t instance, rnti_t rnti, int bearer_id, teid_t teid, +teid_t newGtpuCreateTunnel(instance_t instance, rnti_t rnti, int incoming_bearer_id, int outgoing_rb_id, teid_t teid, transport_layer_addr_t remoteAddr, int port, gtpCallback callBack); instance_t ocp_gtpv1Init(openAddr_t context); void *ocp_gtpv1uTask(void *args); From 052f254306dfc11a3b419a3d7ac8c923fab5d22b Mon Sep 17 00:00:00 2001 From: francescomani Date: Wed, 12 May 2021 10:23:58 +0200 Subject: [PATCH 349/579] fix in a condition for pucch2 --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c index ccae32b698..5892ab8e8e 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c @@ -1233,7 +1233,7 @@ int nr_acknack_scheduling(int mod_id, // and if we don't multiplex // FIXME currently we support at most 11 bits in pucch2 so skip also in that case if(!csi_pucch->simultaneous_harqcsi - || ((csi_pucch->csi_bits + csi_pucch->dai_c) == 11)) { + || ((csi_pucch->csi_bits + csi_pucch->dai_c) >= 11)) { nr_fill_nfapi_pucch(mod_id, frame, slot, csi_pucch, UE_id); memset(csi_pucch, 0, sizeof(*csi_pucch)); /* advance the UL slot information in PUCCH by one so we won't schedule in From 9769fb623197a99f37a4edc6508b70cb9b7be0df Mon Sep 17 00:00:00 2001 From: hardy Date: Mon, 10 May 2021 15:23:47 +0200 Subject: [PATCH 350/579] fix a bug in IperfNoS1, from moduleUE related work --- ci-scripts/cls_oaicitest.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index cb09eb3ddb..a3a31fef14 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -2203,9 +2203,9 @@ class OaiCiTest(): logging.debug("Iperf for Module in DL mode detected") #server side UE SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword) - cmd = 'rm iperf_server_ ' + self.testCase_id + '_' + self.ue_id + '.log' + cmd = 'rm iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' SSH.command(cmd,'\$',5) - cmd = 'echo $USER; nohup iperf -s -B ' + UE_IPAddress + ' -u 2>&1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' + cmd = 'echo $USER; nohup iperf -s -B ' + UE_IPAddress + ' -u -i 1 2>&1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' SSH.command(cmd,'\$',5) #client side EPC SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password) @@ -2227,7 +2227,7 @@ class OaiCiTest(): SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password) cmd = 'rm iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' SSH.command(cmd,'\$',5) - cmd = 'echo $USER; nohup iperf -s -u 2>&1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' + cmd = 'echo $USER; nohup iperf -s -u -i 1 2>&1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' SSH.command(cmd,'\$',5) #client side UE SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword) @@ -2543,7 +2543,7 @@ class OaiCiTest(): if (os.path.isfile('iperf_server_' + self.testCase_id + '.log')): os.remove('iperf_server_' + self.testCase_id + '.log') SSH.copyin(iServerIPAddr, iServerUser, iServerPasswd, '/tmp/tmp_iperf_server_' + self.testCase_id + '.log', 'iperf_server_' + self.testCase_id + '_OAI-UE.log') - filename='iperf_server_' + self.testCase_id + '_' + device_id + '.log' + filename='iperf_server_' + self.testCase_id + '_OAI-UE.log' self.Iperf_analyzeV2Server(lock, '10.0.1.2', 'OAI-UE', status_queue, modified_options,filename,0) # copying on the EPC server for logCollection From 3d908be3a15158460ecd3ef4ad80d79a9c58a8d4 Mon Sep 17 00:00:00 2001 From: hardy Date: Mon, 10 May 2021 22:48:54 +0200 Subject: [PATCH 351/579] new nsa markers for enb and gnb when terminating --- ci-scripts/cls_oaicitest.py | 9 ++++---- ci-scripts/ran.py | 44 ++++++++++++++++++++++++++++++++++--- 2 files changed, 46 insertions(+), 7 deletions(-) diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index a3a31fef14..73a6fe9bb7 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -1513,7 +1513,8 @@ class OaiCiTest(): SSH.command('cat ' + EPC.SourceCodePath + '/scripts/ping_' + self.testCase_id + '_' + device_id + '.log', '\$', 5) else: #launch from Module SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword) - cmd = 'ping -I ' + UE_IPAddress + ' ' + self.ping_args + ' ' + EPC.IPAddress + ' 2>&1 > ping_' + self.testCase_id + '_' + self.ue_id + '.log' + #ping from module NIC rather than IP address to make sure round trip is over the air + cmd = 'ping -I ' + ModuleUE.UENetwork + ' ' + self.ping_args + ' ' + EPC.IPAddress + ' 2>&1 > ping_' + self.testCase_id + '_' + self.ue_id + '.log' SSH.command(cmd,'\$',int(ping_time[0])*1.5) #copy the ping log file to have it locally for analysis (ping stats) SSH.copyin(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword, 'ping_' + self.testCase_id + '_' + self.ue_id + '.log', '.') @@ -2205,7 +2206,7 @@ class OaiCiTest(): SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword) cmd = 'rm iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' SSH.command(cmd,'\$',5) - cmd = 'echo $USER; nohup iperf -s -B ' + UE_IPAddress + ' -u -i 1 2>&1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' + cmd = 'echo $USER; nohup /opt/iperf-2.0.10/iperf -s -B ' + UE_IPAddress + ' -u -i 1 2>&1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' SSH.command(cmd,'\$',5) #client side EPC SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password) @@ -2227,13 +2228,13 @@ class OaiCiTest(): SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password) cmd = 'rm iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' SSH.command(cmd,'\$',5) - cmd = 'echo $USER; nohup iperf -s -u -i 1 2>&1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' + cmd = 'echo $USER; nohup iperf3 -s 2>&1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' SSH.command(cmd,'\$',5) #client side UE SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword) cmd = 'rm iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log' SSH.command(cmd,'\$',5) - cmd = 'iperf -B ' + UE_IPAddress + ' ' + '-c ' + EPC.IPAddress + ' ' + self.iperf_args + ' > iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log' + cmd = 'iperf3 ' + '-c ' + EPC.IPAddress + ' ' + self.iperf_args + ' > iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log' SSH.command(cmd,'\$',int(iperf_time)*5.0) #copy the 2 resulting files locally diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index 7079773a34..4b677016ef 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -703,6 +703,8 @@ class RANManagement(): real_time_stats = {} #count "problem receiving samples" msg pb_receiving_samples_cnt = 0 + #NSA specific log markers + nsa_markers ={'SgNBReleaseRequestAcknowledge': [],'FAILURE': [], 'scgFailureInformationNR-r15': [], 'SgNBReleaseRequest': []} #the datalog config file has to be loaded datalog_rt_stats_file='datalog_rt_stats.yaml' @@ -718,8 +720,9 @@ class RANManagement(): datalog_rt_stats = yaml.load(f,Loader=yaml.FullLoader) rt_keys = datalog_rt_stats['Ref'] #we use the keys from the Ref field - + line_cnt=0 #log file line counter for line in enb_log_file.readlines(): + line_cnt+=1 # Runtime statistics result = re.search('Run time:' ,str(line)) if result is not None: @@ -895,7 +898,13 @@ class RANManagement(): #count "problem receiving samples" msg result = re.search('\[PHY\]\s+problem receiving samples', str(line)) if result is not None: - pb_receiving_samples_cnt += 1 + pb_receiving_samples_cnt += 1 + + #nsa markers logging + for k in nsa_markers: + result = re.search(k, line) + if result is not None: + nsa_markers[k].append(line_cnt) enb_log_file.close() logging.debug(' File analysis completed') @@ -904,7 +913,7 @@ class RANManagement(): else: nodeB_prefix = 'g' - if self.air_interface[self.eNB_instance] == 'nr-softmodem': + if nodeB_prefix == 'g': if ulschReceiveOK > 0: statMsg = nodeB_prefix + 'NB showed ' + str(ulschReceiveOK) + ' "ULSCH received ok" message(s)' logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m') @@ -931,6 +940,19 @@ class RANManagement(): htmlMsg = statMsg+'\n' logging.debug(statMsg) htmleNBFailureMsg += htmlMsg + #nsa markers + statMsg = 'logfile line count = ' + str(line_cnt) + htmlMsg = statMsg+'\n' + logging.debug(statMsg) + htmleNBFailureMsg += htmlMsg + statMsg = 'SgNBReleaseRequestAcknowledge = ' + str(len(nsa_markers['SgNBReleaseRequestAcknowledge'])) + ' occurences , starting line ' + str(nsa_markers['SgNBReleaseRequestAcknowledge'][0]) + htmlMsg = statMsg+'\n' + logging.debug(statMsg) + htmleNBFailureMsg += htmlMsg + statMsg = 'FAILURE = ' + str(len(nsa_markers['FAILURE'])) + ' occurences' + htmlMsg = statMsg+'\n' + logging.debug(statMsg) + htmleNBFailureMsg += htmlMsg #ulsch and dlsch statistics if len(dlsch_ulsch_stats)!=0: #check if dictionary is not empty @@ -962,6 +984,22 @@ class RANManagement(): logging.debug('No real time stats found in the log file') htmleNBFailureMsg += statMsg + else: + #nsa markers + statMsg = 'logfile line count = ' + str(line_cnt) + htmlMsg = statMsg+'\n' + logging.debug(statMsg) + htmleNBFailureMsg += htmlMsg + statMsg = 'SgNBReleaseRequest = ' + str(len(nsa_markers['SgNBReleaseRequest'])) + ' occurences , starting line ' + str(nsa_markers['SgNBReleaseRequest'][0]) + htmlMsg = statMsg+'\n' + logging.debug(statMsg) + htmleNBFailureMsg += htmlMsg + statMsg = 'scgFailureInformationNR-r15 = ' + str(len(nsa_markers['scgFailureInformationNR-r15'])) + ' occurences' + htmlMsg = statMsg+'\n' + logging.debug(statMsg) + htmleNBFailureMsg += htmlMsg + + if uciStatMsgCount > 0: statMsg = nodeB_prefix + 'NB showed ' + str(uciStatMsgCount) + ' "uci->stat" message(s)' logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m') From 318d4c08c96ac2d72a939d5206527df861721818 Mon Sep 17 00:00:00 2001 From: Remi Hardy Date: Wed, 12 May 2021 10:35:05 +0200 Subject: [PATCH 352/579] several bugfixes + make pipelines work for DL, iperf UL KO --- ci-scripts/cls_module_ue.py | 2 +- ci-scripts/cls_oaicitest.py | 38 +++++++++++++------- ci-scripts/ran.py | 10 ++++-- ci-scripts/xml_files/benetel_nsa_quectel.xml | 4 +-- ci-scripts/xml_files/fr1_nsa_quectel.xml | 8 ++--- 5 files changed, 39 insertions(+), 23 deletions(-) diff --git a/ci-scripts/cls_module_ue.py b/ci-scripts/cls_module_ue.py index a94af5bcda..abfa8c1106 100644 --- a/ci-scripts/cls_module_ue.py +++ b/ci-scripts/cls_module_ue.py @@ -91,7 +91,7 @@ class Module_UE: def Command(self,cmd): mySSH = sshconnection.SSHConnection() mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword) - mySSH.command('echo ' + self.HostPassword + ' | sudo -S python3 ' + self.cmd_dict[cmd],'\$',5) + mySSH.command('echo ' + self.HostPassword + ' | sudo -S python3 ' + self.cmd_dict[cmd],'\$',10) time.sleep(5) logging.debug("Module "+ cmd) mySSH.close() diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index 73a6fe9bb7..1e3e9e0134 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -1514,7 +1514,7 @@ class OaiCiTest(): else: #launch from Module SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword) #ping from module NIC rather than IP address to make sure round trip is over the air - cmd = 'ping -I ' + ModuleUE.UENetwork + ' ' + self.ping_args + ' ' + EPC.IPAddress + ' 2>&1 > ping_' + self.testCase_id + '_' + self.ue_id + '.log' + cmd = 'ping -I ' + Module_UE.UENetwork + ' ' + self.ping_args + ' ' + EPC.IPAddress + ' 2>&1 > ping_' + self.testCase_id + '_' + self.ue_id + '.log' SSH.command(cmd,'\$',int(ping_time[0])*1.5) #copy the ping log file to have it locally for analysis (ping stats) SSH.copyin(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword, 'ping_' + self.testCase_id + '_' + self.ue_id + '.log', '.') @@ -1958,7 +1958,7 @@ class OaiCiTest(): if type==0: result = re.search('(?P[0-9\.]+ [KMG]bits\/sec) +(?P[0-9\.]+ ms) +(?P[0-9]+)/ +(?P[0-9]+)', str(line)) else: - result = re.search('^\[ 3\].+ +(?P[0-9\.]+ [KMG]bits\/sec) +(?P[0-9\.]+ ms) +(?P[0-9]+)\/(?P[0-9]+)', str(line)) + result = re.search('^\[ \d\].+ +(?P[0-9\.]+ [KMG]bits\/sec) +(?P[0-9\.]+ ms) +(?P[0-9]+)\/(?P[0-9]+)', str(line)) if result is not None: bitrate = result.group('bitrate') @@ -2206,7 +2206,7 @@ class OaiCiTest(): SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword) cmd = 'rm iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' SSH.command(cmd,'\$',5) - cmd = 'echo $USER; nohup /opt/iperf-2.0.10/iperf -s -B ' + UE_IPAddress + ' -u -i 1 2>&1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' + cmd = 'echo $USER; nohup /opt/iperf-2.0.10/iperf -s -B ' + UE_IPAddress + ' -u 2>&1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' SSH.command(cmd,'\$',5) #client side EPC SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password) @@ -2214,7 +2214,6 @@ class OaiCiTest(): SSH.command(cmd,'\$',5) cmd = 'iperf -c ' + UE_IPAddress + ' ' + self.iperf_args + ' 2>&1 > iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log' SSH.command(cmd,'\$',int(iperf_time)*5.0) - #copy the 2 resulting files locally SSH.copyin(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword, 'iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log', '.') SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, 'iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log', '.') @@ -2222,26 +2221,41 @@ class OaiCiTest(): filename='iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, self.iperf_args,filename,1) - elif self.iperf_direction=="UL": + elif self.iperf_direction=="UL":#does not work at the moment logging.debug("Iperf for Module in UL mode detected") #server side EPC SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password) cmd = 'rm iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' SSH.command(cmd,'\$',5) - cmd = 'echo $USER; nohup iperf3 -s 2>&1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' - SSH.command(cmd,'\$',5) + + #cmd = 'echo $USER; nohup iperf3 -s -i 1 2>&1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' + #SSH.command(cmd,'\$',5) + + HOST=EPC.IPAddress + COMMAND='echo $USER; nohup iperf3 -s -i 1 2>&1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' + logging.debug(COMMAND) + subprocess.Popen(["ssh", "%s" % HOST, COMMAND],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE) + #client side UE SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword) cmd = 'rm iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log' SSH.command(cmd,'\$',5) - cmd = 'iperf3 ' + '-c ' + EPC.IPAddress + ' ' + self.iperf_args + ' > iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log' - SSH.command(cmd,'\$',int(iperf_time)*5.0) + + +# SSH.command('iperf3 -c ' + EPC.IPAddress + ' ' + self.iperf_args + ' 2>&1 > iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log', '\$', int(iperf_time)*5.0) + + HOST=Module_UE.HostIPAddress + COMMAND='iperf3 -c ' + EPC.IPAddress + ' ' + self.iperf_args + ' 2>&1 > iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log' + logging.debug(COMMAND) + subprocess.Popen(["ssh", "%s" % HOST, COMMAND],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE) + + #copy the 2 resulting files locally - SSH.copyin(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword, 'iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log', '.') - SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, 'iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log', '.') + SSH.copyin(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword, 'iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log', '.') + SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, 'iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log', '.') #send for analysis - filename='iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' + filename='iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log' self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, self.iperf_args,filename,1) else : logging.debug("Incorrect or missing IPERF direction in XML") diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index 4b677016ef..cad00b36d9 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -945,7 +945,10 @@ class RANManagement(): htmlMsg = statMsg+'\n' logging.debug(statMsg) htmleNBFailureMsg += htmlMsg - statMsg = 'SgNBReleaseRequestAcknowledge = ' + str(len(nsa_markers['SgNBReleaseRequestAcknowledge'])) + ' occurences , starting line ' + str(nsa_markers['SgNBReleaseRequestAcknowledge'][0]) + if len(nsa_markers['SgNBReleaseRequestAcknowledge'])!=0: + statMsg = 'SgNBReleaseRequestAcknowledge = ' + str(len(nsa_markers['SgNBReleaseRequestAcknowledge'])) + ' occurences , starting line ' + str(nsa_markers['SgNBReleaseRequestAcknowledge'][0]) + else: + statMsg = 'SgNBReleaseRequestAcknowledge = ' + str(len(nsa_markers['SgNBReleaseRequestAcknowledge'])) + ' occurences' htmlMsg = statMsg+'\n' logging.debug(statMsg) htmleNBFailureMsg += htmlMsg @@ -990,7 +993,10 @@ class RANManagement(): htmlMsg = statMsg+'\n' logging.debug(statMsg) htmleNBFailureMsg += htmlMsg - statMsg = 'SgNBReleaseRequest = ' + str(len(nsa_markers['SgNBReleaseRequest'])) + ' occurences , starting line ' + str(nsa_markers['SgNBReleaseRequest'][0]) + if len(nsa_markers['SgNBReleaseRequest'])!=0: + statMsg = 'SgNBReleaseRequest = ' + str(len(nsa_markers['SgNBReleaseRequest'])) + ' occurences , starting line ' + str(nsa_markers['SgNBReleaseRequest'][0]) + else: + statMsg = 'SgNBReleaseRequest = ' + str(len(nsa_markers['SgNBReleaseRequest'])) + ' occurences' htmlMsg = statMsg+'\n' logging.debug(statMsg) htmleNBFailureMsg += htmlMsg diff --git a/ci-scripts/xml_files/benetel_nsa_quectel.xml b/ci-scripts/xml_files/benetel_nsa_quectel.xml index 7130180753..2dd27b634f 100644 --- a/ci-scripts/xml_files/benetel_nsa_quectel.xml +++ b/ci-scripts/xml_files/benetel_nsa_quectel.xml @@ -30,19 +30,17 @@ 040000 000002 010000 - 000001 050000 050001 000001 070000 000001 - 070001 + 070000 000001 010002 000001 080001 080000 - diff --git a/ci-scripts/xml_files/fr1_nsa_quectel.xml b/ci-scripts/xml_files/fr1_nsa_quectel.xml index c48aa70739..6c2bd6bd26 100644 --- a/ci-scripts/xml_files/fr1_nsa_quectel.xml +++ b/ci-scripts/xml_files/fr1_nsa_quectel.xml @@ -30,19 +30,17 @@ 040000 000002 010000 - 000001 050000 050001 000001 070000 000001 - 070001 + 070000 000001 010002 000001 080001 080000 - @@ -82,13 +80,13 @@ IdleSleep Sleep - 10 + 5 IdleSleep Sleep - 30 + 20 From 59bbef3b2f76b6d4d096cad83fdf2f66fa7f9691 Mon Sep 17 00:00:00 2001 From: Remi Hardy Date: Wed, 12 May 2021 10:57:40 +0200 Subject: [PATCH 353/579] change NSA test trigger (tag) --- ci-scripts/Jenkinsfile-trig-nsa | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-scripts/Jenkinsfile-trig-nsa b/ci-scripts/Jenkinsfile-trig-nsa index 5ace29d866..8bb3b212a9 100644 --- a/ci-scripts/Jenkinsfile-trig-nsa +++ b/ci-scripts/Jenkinsfile-trig-nsa @@ -37,7 +37,7 @@ pipeline { steps { script { //retrieve MR that are opened nd with tag READY_TO_BE_MERGED - MR_LIST= sh returnStdout: true, script: 'curl --silent "https://gitlab.eurecom.fr/api/v4/projects/oai%2Fopenairinterface5g/merge_requests?state=opened&per_page=100&milestone=REVIEW_COMPLETED_AND_APPROVED" | jq ".[].iid" || true ' + MR_LIST= sh returnStdout: true, script: 'curl --silent "https://gitlab.eurecom.fr/api/v4/projects/oai%2Fopenairinterface5g/merge_requests?state=opened&per_page=100&milestone=NSA" | jq ".[].iid" || true ' echo "List of selected MR:\n${MR_LIST}" def MR_ARRAY = MR_LIST.split('\n') //for every selected MR, retrieve the branch name and the latest commit From 985d02f8e14778a928ce094f9b757e8803f331e0 Mon Sep 17 00:00:00 2001 From: Remi Hardy Date: Wed, 12 May 2021 13:36:15 +0200 Subject: [PATCH 354/579] align nsa-usrp and nsa-benetel tests --- ci-scripts/xml_files/benetel_nsa_quectel.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ci-scripts/xml_files/benetel_nsa_quectel.xml b/ci-scripts/xml_files/benetel_nsa_quectel.xml index 2dd27b634f..442ad0e92f 100644 --- a/ci-scripts/xml_files/benetel_nsa_quectel.xml +++ b/ci-scripts/xml_files/benetel_nsa_quectel.xml @@ -80,13 +80,13 @@ IdleSleep Sleep - 10 + 5 IdleSleep Sleep - 30 + 20 @@ -108,8 +108,8 @@ Iperf - iperf (DL/20Mbps/UDP)(20 sec)(single-ue profile) - -u -b 20M -t 20 -i 1 + iperf (DL/20Mbps/UDP)(60 sec)(single-ue profile) + -u -b 20M -t 60 -i 1 DL idefix 50 @@ -118,8 +118,8 @@ Iperf - iperf (UL/3Mbps/UDP)(20 sec)(single-ue profile) - -u -b 3M -t 20 -i 1 + iperf (UL/3Mbps/UDP)(60 sec)(single-ue profile) + -u -b 3M -t 60 -i 1 UL idefix 50 From ee6b77023f20f42daaf6bb145f5b3f3ef1add9c1 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Wed, 12 May 2021 14:20:35 +0100 Subject: [PATCH 355/579] Update gnb.band78.tm1.106PRB.usrpn300.conf to a valid pair absoluteFrequencySSB/dl_absoluteFrequencyPointA for 106 RBs --- ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf b/ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf index 4afbfdcda0..c061d4d35e 100644 --- a/ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf +++ b/ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf @@ -34,10 +34,10 @@ gNBs = # downlinkConfigCommon #frequencyInfoDL # this is 3600 MHz + 43 PRBs@30kHz SCS (same as initial BWP) - absoluteFrequencySSB = 641032; + absoluteFrequencySSB = 641280; dl_frequencyBand = 78; # this is 3600 MHz - dl_absoluteFrequencyPointA = 640000; + dl_absoluteFrequencyPointA = 640008; #scs-SpecificCarrierList dl_offstToCarrier = 0; # subcarrierSpacing From 0ef6ef2b2874d75ef47392201de98c88ed88ca7f Mon Sep 17 00:00:00 2001 From: rmagueta Date: Wed, 12 May 2021 19:29:10 +0100 Subject: [PATCH 356/579] Code format improvements in differences for develop --- executables/nr-gnb.c | 3 - executables/nr-ru.c | 2 +- executables/nr-softmodem.c | 4 - executables/nr-ue.c | 6 +- executables/nr-uesoftmodem.c | 1 + openair1/PHY/NR_TRANSPORT/nr_dci_tools.c | 5 +- openair1/PHY/NR_TRANSPORT/nr_dlsch.c | 2 - openair1/PHY/NR_TRANSPORT/pucch_rx.c | 6 +- .../PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c | 1 - openair1/PHY/NR_UE_TRANSPORT/nr_prach.c | 12 +-- openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c | 5 +- openair1/PHY/NR_UE_TRANSPORT/pucch_nr.h | 11 ++- openair1/SCHED_NR/nr_prach_procedures.c | 3 +- openair1/SCHED_NR/phy_procedures_nr_gNB.c | 1 - openair1/SCHED_NR_UE/fapi_nr_ue_l1.c | 2 +- openair1/SCHED_NR_UE/phy_procedures_nr_ue.c | 1 - openair1/SCHED_NR_UE/pucch_uci_ue_nr.c | 43 ++++----- openair2/F1AP/f1ap_cu_interface_management.c | 95 +++++++++---------- openair2/F1AP/f1ap_cu_rrc_message_transfer.c | 3 +- openair2/F1AP/f1ap_cu_ue_context_management.c | 6 +- openair2/F1AP/f1ap_du_interface_management.c | 23 ++--- openair2/F1AP/f1ap_du_rrc_message_transfer.c | 65 ++++++------- openair2/F1AP/f1ap_du_rrc_message_transfer.h | 4 +- openair2/F1AP/f1ap_du_task.c | 13 ++- openair2/GNB_APP/gnb_app.c | 3 +- openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c | 4 +- openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h | 4 +- openair2/LAYER2/NR_MAC_UE/config_ue.c | 8 +- openair2/LAYER2/NR_MAC_UE/mac_defs.h | 2 +- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 22 ++--- openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c | 21 ++-- .../LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c | 4 +- .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 2 +- openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h | 1 - openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c | 12 +-- openair2/LAYER2/nr_pdcp/nr_pdcp_entity.h | 2 + openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c | 9 +- openair2/LAYER2/nr_rlc/nr_rlc_oai_api.h | 2 +- openair2/LAYER2/rlc_v2/rlc_oai_api.c | 3 +- openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c | 2 +- openair2/RRC/LTE/L2_interface.c | 3 +- openair2/RRC/NR/L2_nr_interface.c | 7 +- openair2/RRC/NR/MESSAGES/asn1_msg.c | 5 +- openair2/RRC/NR/MESSAGES/asn1_msg.h | 9 +- openair2/RRC/NR/nr_rrc_proto.h | 2 +- openair2/RRC/NR/rrc_gNB.c | 12 +-- openair2/RRC/NR/rrc_gNB_NGAP.c | 2 - openair2/RRC/NR_UE/L2_interface_ue.c | 2 +- openair2/RRC/NR_UE/rrc_UE.c | 35 ++++--- openair2/SIMULATION/NR_RRC/itti_sim.c | 2 +- openair3/NAS/NR_UE/nr_nas_msg_sim.c | 1 - openair3/ocp-gtpu/gtp_itf.cpp | 6 +- 52 files changed, 225 insertions(+), 279 deletions(-) diff --git a/executables/nr-gnb.c b/executables/nr-gnb.c index 5a2f251750..ee3feca464 100644 --- a/executables/nr-gnb.c +++ b/executables/nr-gnb.c @@ -404,7 +404,6 @@ void init_gNB_Tpool(int inst) { if(opp_enabled == 1) threadCreate(&proc->process_stats_thread, process_stats_thread,(void *)gNB, "time_meas", -1, OAI_PRIORITY_RT_LOW); threadCreate(&proc->L1_stats_thread,nrL1_stats_thread,(void*)gNB,"L1_stats",-1,OAI_PRIORITY_RT_LOW); - } @@ -493,8 +492,6 @@ printf("after %p\n", gNB->common_vars.rxdataF[aa]); } - - void init_gNB(int single_thread_flag,int wait_for_sync) { int inst; diff --git a/executables/nr-ru.c b/executables/nr-ru.c index f4a6510ad7..98e81e1594 100644 --- a/executables/nr-ru.c +++ b/executables/nr-ru.c @@ -1979,7 +1979,7 @@ void RCconfig_RU(void) } else { LOG_I(PHY,"Setting time source to internal\n"); - RC.ru[j]->openair0_cfg.time_source = internal; + RC.ru[j]->openair0_cfg.time_source = internal; } if (strcmp(*(RUParamList.paramarray[j][RU_LOCAL_RF_IDX].strptr), "yes") == 0) { diff --git a/executables/nr-softmodem.c b/executables/nr-softmodem.c index 4eac9e36a1..d52959f131 100644 --- a/executables/nr-softmodem.c +++ b/executables/nr-softmodem.c @@ -745,10 +745,6 @@ if(!IS_SOFTMODEM_NOS1) // don't create if node doesn't connect to RRC/S1/GTP AssertFatal(create_gNB_tasks(1) == 0,"cannot create ITTI tasks\n"); - - - - /* Start the agent. If it is turned off in the configuration, it won't start */ /* RCconfig_nr_flexran(); diff --git a/executables/nr-ue.c b/executables/nr-ue.c index 51448a747f..0ff68b131a 100644 --- a/executables/nr-ue.c +++ b/executables/nr-ue.c @@ -715,11 +715,13 @@ void *UE_thread(void *arg) { if (openair0_cfg[0].duplex_mode == duplex_mode_TDD) { uint8_t tdd_period = mac->phy_config.config_req.tdd_table.tdd_period_in_slots; + int nrofUplinkSlots = 0; if (mac->scc_SIB) - nrofUplinkSlots = mac->scc_SIB->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSlots; + nrofUplinkSlots = mac->scc_SIB->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSlots; else if (mac->scc) - nrofUplinkSlots = mac->scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSlots; + nrofUplinkSlots = mac->scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSlots; + uint8_t num_UL_slots = nrofUplinkSlots + (nrofUplinkSlots != 0); uint8_t first_tx_slot = tdd_period - num_UL_slots; diff --git a/executables/nr-uesoftmodem.c b/executables/nr-uesoftmodem.c index fe5e0a4269..8d25061277 100644 --- a/executables/nr-uesoftmodem.c +++ b/executables/nr-uesoftmodem.c @@ -183,6 +183,7 @@ struct timespec clock_difftime(struct timespec start, struct timespec end) { void print_difftimes(void) { LOG_I(HW,"difftimes min = %lu ns ; max = %lu ns\n", min_diff_time.tv_nsec, max_diff_time.tv_nsec); } + int create_tasks_nrue(uint32_t ue_nb) { LOG_D(NR_RRC, "%s(ue_nb:%d)\n", __FUNCTION__, ue_nb); itti_wait_ready(1); diff --git a/openair1/PHY/NR_TRANSPORT/nr_dci_tools.c b/openair1/PHY/NR_TRANSPORT/nr_dci_tools.c index 4775851a65..6b86e8805e 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dci_tools.c +++ b/openair1/PHY/NR_TRANSPORT/nr_dci_tools.c @@ -255,10 +255,7 @@ void nr_fill_dci(PHY_VARS_gNB *gNB, dlsch->harq_mask |= (1<rnti = pdcch_pdu_rel15->dci_pdu[i].RNTI; - // nr_fill_cce_list(gNB,0); - - - + // nr_fill_cce_list(gNB,0); } } diff --git a/openair1/PHY/NR_TRANSPORT/nr_dlsch.c b/openair1/PHY/NR_TRANSPORT/nr_dlsch.c index d06c4bbb1c..96c4957bed 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dlsch.c +++ b/openair1/PHY/NR_TRANSPORT/nr_dlsch.c @@ -82,7 +82,6 @@ void nr_pdsch_codeword_scrambling_optim(uint8_t *in, s=lte_gold_generic(&x1, &x2, 1); - #if defined(__AVX2__) for (int i=0; i<((size>>5)+((size&0x1f) > 0 ? 1 : 0)); i++) { in32=_mm256_movemask_epi8(_mm256_slli_epi16(((__m256i*)in)[i],7)); @@ -162,7 +161,6 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB, uint32_t encoded_length = nb_re*Qm; int16_t mod_dmrs[14][n_dmrs<<1] __attribute__ ((aligned(16))); - /* PTRS */ uint16_t beta_ptrs = 1; uint8_t ptrs_symbol = 0; diff --git a/openair1/PHY/NR_TRANSPORT/pucch_rx.c b/openair1/PHY/NR_TRANSPORT/pucch_rx.c index 8ebb937d05..911a858d12 100644 --- a/openair1/PHY/NR_TRANSPORT/pucch_rx.c +++ b/openair1/PHY/NR_TRANSPORT/pucch_rx.c @@ -296,7 +296,8 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB, for(i=0;inr_of_symbols;l++) { - corr_re[l]=0;corr_im[l]=0; + corr_re[l]=0; + corr_im[l]=0; seq_index = (pucch_pdu->initial_cyclic_shift+ mcs[i]+ gNB->pucch0_lut.lut[cs_ind][slot][l+pucch_pdu->start_symbol_index])%12; @@ -346,7 +347,6 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB, index=maxpos; - // estimate CQI for MAC (from antenna port 0 only) int max_n0 = uci_stats->pucch0_n00>uci_stats->pucch0_n01 ? uci_stats->pucch0_n00:uci_stats->pucch0_n01; int SNRtimes10 = dB_fixed_times10(signal_energy_nodc(&rxdataF[0][pucch_pdu->start_symbol_index*frame_parms->ofdm_symbol_size+re_offset[0]],12)) - (10*max_n0); @@ -399,7 +399,6 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB, uci_stats->pucch0_positive_SR++; } uci_stats->pucch01_trials++; - } else { uci_pdu->harq = calloc(1,sizeof(*uci_pdu->harq)); @@ -1643,7 +1642,6 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB, } } - void dump_uci_stats(FILE *fd,PHY_VARS_gNB *gNB,int frame) { int strpos=0; diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c index b85b777566..4f6871ca4f 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c @@ -701,7 +701,6 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue, VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_COMBINE_SEG, VCD_FUNCTION_OUT); dlsch->last_iteration_cnt = ret; - // log_dump(PHY, harq_process->b, 60, LOG_DUMP_CHAR,"nrue pdsch rx frame %d %d: ", frame, nr_slot_rx ); return(ret); } diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_prach.c b/openair1/PHY/NR_UE_TRANSPORT/nr_prach.c index 5ce35a5cb6..0d372deedf 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_prach.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_prach.c @@ -218,12 +218,12 @@ int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint8_t slot){ k *= 2; LOG_I(PHY, "PRACH [UE %d] in slot %d, placing PRACH in position %d, msg1 frequency start %d (k1 %d), preamble_offset %d, first_nonzero_root_idx %d\n", Mod_id, - slot, - k, - n_ra_prb, - nrUE_config->prach_config.num_prach_fd_occasions_list[fd_occasion].k1, - preamble_offset, - first_nonzero_root_idx); + slot, + k, + n_ra_prb, + nrUE_config->prach_config.num_prach_fd_occasions_list[fd_occasion].k1, + preamble_offset, + first_nonzero_root_idx); Xu = (int16_t*)ue->X_u[preamble_offset-first_nonzero_root_idx]; diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c index 18fe11d40a..2d750a3456 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c @@ -164,8 +164,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE, /////////// //////////////////////////////////////////////////////////////////// - //log_dump(PHY, harq_process_ul_ue->a, 16, LOG_DUMP_CHAR,"nrue pusch tx frame %d %d: ", frame, slot); - + /////////////////////////ULSCH scrambling///////////////////////// /////////// @@ -365,7 +364,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE, // TODO: performance improvement, we can skip the modulation of DMRS symbols outside the bandwidth part // Perform this on gold sequence, not required when SC FDMA operation is done, - LOG_D(PHY,"DMRS in symbol %d\n",l); + LOG_D(PHY,"DMRS in symbol %d\n",l); nr_modulation(pusch_dmrs[l][0], n_dmrs*2, DMRS_MOD_ORDER, mod_dmrs); // currently only codeword 0 is modulated. Qm = 2 as DMRS is QPSK modulated } else { diff --git a/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.h b/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.h index cb4b59c92f..665dec2443 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.h +++ b/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.h @@ -54,11 +54,12 @@ void nr_generate_pucch0(PHY_VARS_NR_UE *ue, int16_t amp, int nr_slot_tx, uint8_t m0, - uint8_t mcs, + uint8_t mcs, uint8_t nrofSymbols, uint8_t startingSymbolIndex, uint16_t startingPRB, - uint16_t secondHopPRB); + uint16_t secondHopPRB); + void nr_generate_pucch1(PHY_VARS_NR_UE *ue, int32_t **txdataF, NR_DL_FRAME_PARMS *frame_parms, @@ -73,10 +74,11 @@ void nr_generate_pucch1(PHY_VARS_NR_UE *ue, uint16_t startingPRB_intraSlotHopping, uint8_t timeDomainOCC, uint8_t nr_bit); + void nr_generate_pucch2(PHY_VARS_NR_UE *ue, uint16_t crnti, - uint32_t dmrs_scrambling_id, - uint32_t data_scrambling_id, + uint32_t dmrs_scrambling_id, + uint32_t data_scrambling_id, int32_t **txdataF, NR_DL_FRAME_PARMS *frame_parms, PUCCH_CONFIG_DEDICATED *pucch_config_dedicated, @@ -88,6 +90,7 @@ void nr_generate_pucch2(PHY_VARS_NR_UE *ue, uint8_t nrofPRB, uint16_t startingPRB, uint8_t nr_bit); + void nr_generate_pucch3_4(PHY_VARS_NR_UE *ue, uint16_t crnti, int32_t **txdataF, diff --git a/openair1/SCHED_NR/nr_prach_procedures.c b/openair1/SCHED_NR/nr_prach_procedures.c index 533dbb8e1a..c95d3dc937 100644 --- a/openair1/SCHED_NR/nr_prach_procedures.c +++ b/openair1/SCHED_NR/nr_prach_procedures.c @@ -121,8 +121,7 @@ void L1_nr_prach_procedures(PHY_VARS_gNB *gNB,int frame,int slot) { max_preamble_delay[0], gNB->prach_energy_counter); - if ((gNB->prach_energy_counter == 100) && - (max_preamble_energy[0] > gNB->measurements.prach_I0+gNB->prach_thres)) { + if ((gNB->prach_energy_counter == 100) && (max_preamble_energy[0] > gNB->measurements.prach_I0+gNB->prach_thres)) { LOG_I(PHY,"[gNB %d][RAPROC] Frame %d, slot %d Initiating RA procedure with preamble %d, energy %d.%d dB, delay %d start symbol %u freq index %u\n", gNB->Mod_id, diff --git a/openair1/SCHED_NR/phy_procedures_nr_gNB.c b/openair1/SCHED_NR/phy_procedures_nr_gNB.c index 49e5fac495..2c820e30cc 100644 --- a/openair1/SCHED_NR/phy_procedures_nr_gNB.c +++ b/openair1/SCHED_NR/phy_procedures_nr_gNB.c @@ -259,7 +259,6 @@ void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req) { LOG_D(PHY, "ULSCH received ok \n"); nr_fill_indication(gNB,ulsch_harq->frame, ulsch_harq->slot, rdata->ulsch_id, rdata->harq_pid, 0); - //log_dump(PHY, ulsch_harq->b, 16, LOG_DUMP_CHAR,"gnb pusch rx frame %d %d: ", ulsch_harq->frame, ulsch_harq->slot); } else { LOG_D(PHY,"[gNB %d] ULSCH: Setting NAK for SFN/SF %d/%d (pid %d, status %d, round %d, TBS %d) r %d\n", gNB->Mod_id, ulsch_harq->frame, ulsch_harq->slot, diff --git a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c index 06e1266208..c276de847d 100644 --- a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c +++ b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c @@ -274,7 +274,7 @@ int8_t nr_ue_phy_config_request(nr_phy_config_t *phy_config){ if(phy_config != NULL) { memcpy(nrUE_config,&phy_config->config_req,sizeof(fapi_nr_config_request_t)); if (PHY_vars_UE_g[phy_config->Mod_id][phy_config->CC_id]->UE_mode[0] == NOT_SYNCHED) - PHY_vars_UE_g[phy_config->Mod_id][phy_config->CC_id]->UE_mode[0] = PRACH; + PHY_vars_UE_g[phy_config->Mod_id][phy_config->CC_id]->UE_mode[0] = PRACH; } return 0; } diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c index 179a25bad9..e3d4c54f5a 100644 --- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c +++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c @@ -2062,7 +2062,6 @@ void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t } else { - nr_prach = nr_ue_get_rach(prach_resources, &ue->prach_vars[0]->prach_pdu, mod_id, ue->CC_id, frame_tx, gNB_id, nr_slot_tx); LOG_D(PHY, "In %s:[%d.%d] getting PRACH resources : %d\n", __FUNCTION__, frame_tx, nr_slot_tx,nr_prach); } diff --git a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c index 6ca3f856e4..dccd65436c 100644 --- a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c +++ b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c @@ -564,10 +564,8 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_ int N_CS = initial_pucch_resource[initial_pucch_id].nb_CS_indexes; /* see TS 38213 Table 9.2.1-1: PUCCH resource sets before dedicated PUCCH resource configuration */ - BWPsize = NRRIV2BW(mac->scc_SIB->uplinkConfigCommon->initialUplinkBWP.genericParameters.locationAndBandwidth, - MAX_BWP_SIZE); - BWPstart = NRRIV2PRBOFFSET(mac->scc_SIB->uplinkConfigCommon->initialUplinkBWP.genericParameters.locationAndBandwidth, - MAX_BWP_SIZE); + BWPsize = NRRIV2BW(mac->scc_SIB->uplinkConfigCommon->initialUplinkBWP.genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + BWPstart = NRRIV2PRBOFFSET(mac->scc_SIB->uplinkConfigCommon->initialUplinkBWP.genericParameters.locationAndBandwidth, MAX_BWP_SIZE); int RB_BWP_offset; if (initial_pucch_id == 15) { RB_BWP_offset =BWPsize/4; @@ -601,9 +599,8 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_ else if ((pucch_resource_set != MAX_NB_OF_PUCCH_RESOURCE_SETS) && (pucch_resource_id != MAX_NB_OF_PUCCH_RESOURCES)) { /* check that current configuration is supported */ if (mac->cg && - mac->cg->physicalCellGroupConfig && - (mac->cg->physicalCellGroupConfig->harq_ACK_SpatialBundlingPUCCH != NULL || - mac->cg->physicalCellGroupConfig->pdsch_HARQ_ACK_Codebook != 1)) { + mac->cg->physicalCellGroupConfig && + (mac->cg->physicalCellGroupConfig->harq_ACK_SpatialBundlingPUCCH != NULL || mac->cg->physicalCellGroupConfig->pdsch_HARQ_ACK_Codebook != 1)) { LOG_E(PHY,"PUCCH Unsupported cell group configuration : at line %d in function %s of file %s \n", LINE_FILE , __func__, FILE_NAME); return(FALSE); } @@ -618,17 +615,17 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_ } NR_PUCCH_Config_t *pucch_Config; if (bwp_id>0 && - mac->ULbwp[bwp_id-1] && - mac->ULbwp[bwp_id-1]->bwp_Dedicated && + mac->ULbwp[bwp_id-1] && + mac->ULbwp[bwp_id-1]->bwp_Dedicated && mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config && mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup) pucch_Config = mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup; else if (bwp_id==0 && - mac->cg && - mac->cg->spCellConfig && - mac->cg->spCellConfig->spCellConfigDedicated && - mac->cg->spCellConfig->spCellConfigDedicated->uplinkConfig && - mac->cg->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP && + mac->cg && + mac->cg->spCellConfig && + mac->cg->spCellConfig->spCellConfigDedicated && + mac->cg->spCellConfig->spCellConfigDedicated->uplinkConfig && + mac->cg->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP && mac->cg->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP->pucch_Config && mac->cg->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP->pucch_Config->choice.setup) { pucch_Config = mac->cg->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP->pucch_Config->choice.setup; @@ -683,9 +680,7 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_ int O_CRC = 0; nb_symbols = nb_symbols_total; /* by default, it can be reduced due to symbols reserved for dmrs */ - pucch_resource = format>1 ? - mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->resourceToAddModList->list.array[pucch_resource_id]: - 0; + pucch_resource = format>1 ? mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->resourceToAddModList->list.array[pucch_resource_id] : 0; switch(format) { case pucch_format0_nr: @@ -864,13 +859,13 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_ case pucch_format0_nr: { int pucch_GroupHopping = mac->ULbwp[bwp_id-1] ? - mac->ULbwp[bwp_id-1]->bwp_Common->pucch_ConfigCommon->choice.setup->pucch_GroupHopping: - mac->scc_SIB->uplinkConfigCommon->initialUplinkBWP.pucch_ConfigCommon->choice.setup->pucch_GroupHopping; + mac->ULbwp[bwp_id-1]->bwp_Common->pucch_ConfigCommon->choice.setup->pucch_GroupHopping: + mac->scc_SIB->uplinkConfigCommon->initialUplinkBWP.pucch_ConfigCommon->choice.setup->pucch_GroupHopping; int hoppingId = mac->ULbwp[bwp_id-1] ? - mac->ULbwp[bwp_id-1]->bwp_Common->pucch_ConfigCommon->choice.setup->hoppingId[0]: - (mac->scc_SIB->uplinkConfigCommon->initialUplinkBWP.pucch_ConfigCommon->choice.setup->hoppingId? - mac->scc_SIB->uplinkConfigCommon->initialUplinkBWP.pucch_ConfigCommon->choice.setup->hoppingId[0]: - mac->physCellId); + mac->ULbwp[bwp_id-1]->bwp_Common->pucch_ConfigCommon->choice.setup->hoppingId[0]: + (mac->scc_SIB->uplinkConfigCommon->initialUplinkBWP.pucch_ConfigCommon->choice.setup->hoppingId? + mac->scc_SIB->uplinkConfigCommon->initialUplinkBWP.pucch_ConfigCommon->choice.setup->hoppingId[0]: + mac->physCellId); nr_generate_pucch0(ue,ue->common_vars.txdataF, &ue->frame_parms, pucch_GroupHopping, @@ -1319,7 +1314,7 @@ boolean_t select_pucch_resource(PHY_VARS_NR_UE *ue, NR_UE_MAC_INST_t *mac, uint8 current_resource_id = r_PUCCH; } else { - current_resource_id = resourceSetToAddModList->list.array[pucch_resource_set_id]->resourceList.list.array[pucch_resource_indicator][0]; + current_resource_id = resourceSetToAddModList->list.array[pucch_resource_set_id]->resourceList.list.array[pucch_resource_indicator][0]; } } diff --git a/openair2/F1AP/f1ap_cu_interface_management.c b/openair2/F1AP/f1ap_cu_interface_management.c index 88d0a8ec59..6ab6932f88 100644 --- a/openair2/F1AP/f1ap_cu_interface_management.c +++ b/openair2/F1AP/f1ap_cu_interface_management.c @@ -349,58 +349,55 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance, /* optional */ /* - nRPCI */ if (1) { - cells_to_be_activated_list_item.nRPCI = (F1AP_NRPCI_t *)calloc(1, sizeof(F1AP_NRPCI_t)); - *cells_to_be_activated_list_item.nRPCI = f1ap_setup_resp->cells_to_activate[i].nrpci; // int 0..1007 + cells_to_be_activated_list_item.nRPCI = (F1AP_NRPCI_t *)calloc(1, sizeof(F1AP_NRPCI_t)); + *cells_to_be_activated_list_item.nRPCI = f1ap_setup_resp->cells_to_activate[i].nrpci; // int 0..1007 } /* optional */ /* - gNB-CU System Information */ if (1) { - /* 3.1.2 gNB-CUSystem Information */ - F1AP_Cells_to_be_Activated_List_ItemExtIEs_t *cells_to_be_activated_list_itemExtIEs; - cells_to_be_activated_list_itemExtIEs = (F1AP_Cells_to_be_Activated_List_ItemExtIEs_t *)calloc(1, sizeof(F1AP_Cells_to_be_Activated_List_ItemExtIEs_t)); - cells_to_be_activated_list_itemExtIEs->id = F1AP_ProtocolIE_ID_id_gNB_CUSystemInformation; - cells_to_be_activated_list_itemExtIEs->criticality = F1AP_Criticality_reject; - cells_to_be_activated_list_itemExtIEs->extensionValue.present = F1AP_Cells_to_be_Activated_List_ItemExtIEs__extensionValue_PR_GNB_CUSystemInformation; - - F1AP_GNB_CUSystemInformation_t *gNB_CUSystemInformation = (F1AP_GNB_CUSystemInformation_t *)calloc(1, sizeof(F1AP_GNB_CUSystemInformation_t)); - //LOG_I(F1AP, "%s() SI %d size %d: ", __func__, i, f1ap_setup_resp->SI_container_length[i][0]); - //for (int n = 0; n < f1ap_setup_resp->SI_container_length[i][0]; n++) - // printf("%02x ", f1ap_setup_resp->SI_container[i][0][n]); - //printf("\n"); - - // for (int sIBtype=2;sIBtype<33;sIBtype++) { //21 ? 33 ? - for (int sIBtype=2;sIBtype<21;sIBtype++) { - if (f1ap_setup_resp->cells_to_activate[i].SI_container[sIBtype]!=NULL) { - AssertFatal(sIBtype < 6 || sIBtype == 9, "Illegal SI type %d\n",sIBtype); - F1AP_SibtypetobeupdatedListItem_t *sib_item = calloc(1,sizeof(*sib_item)); - memset((void*)sib_item,0,sizeof(*sib_item)); - sib_item->sIBtype = sIBtype; - OCTET_STRING_fromBuf(&sib_item->sIBmessage, - (const char*)f1ap_setup_resp->cells_to_activate[i].SI_container[sIBtype], - f1ap_setup_resp->cells_to_activate[i].SI_container_length[sIBtype]); - - LOG_D(F1AP, "f1ap_setup_resp->SI_container_length[%d][%d] = %d \n", i,sIBtype,f1ap_setup_resp->cells_to_activate[i].SI_container_length[sIBtype]); - ASN_SEQUENCE_ADD(&gNB_CUSystemInformation->sibtypetobeupdatedlist.list,sib_item); - } - } - cells_to_be_activated_list_itemExtIEs->extensionValue.choice.GNB_CUSystemInformation = *gNB_CUSystemInformation; - - - F1AP_ProtocolExtensionContainer_154P112_t p_154P112_t; - memset((void *)&p_154P112_t, 0, sizeof(F1AP_ProtocolExtensionContainer_154P112_t)); - - ASN_SEQUENCE_ADD(&p_154P112_t.list, - cells_to_be_activated_list_itemExtIEs); - cells_to_be_activated_list_item.iE_Extensions = (struct F1AP_ProtocolExtensionContainer*)&p_154P112_t; - - free(gNB_CUSystemInformation); - gNB_CUSystemInformation = NULL; + /* 3.1.2 gNB-CUSystem Information */ + F1AP_Cells_to_be_Activated_List_ItemExtIEs_t *cells_to_be_activated_list_itemExtIEs; + cells_to_be_activated_list_itemExtIEs = (F1AP_Cells_to_be_Activated_List_ItemExtIEs_t *)calloc(1, sizeof(F1AP_Cells_to_be_Activated_List_ItemExtIEs_t)); + cells_to_be_activated_list_itemExtIEs->id = F1AP_ProtocolIE_ID_id_gNB_CUSystemInformation; + cells_to_be_activated_list_itemExtIEs->criticality = F1AP_Criticality_reject; + cells_to_be_activated_list_itemExtIEs->extensionValue.present = F1AP_Cells_to_be_Activated_List_ItemExtIEs__extensionValue_PR_GNB_CUSystemInformation; + + F1AP_GNB_CUSystemInformation_t *gNB_CUSystemInformation = (F1AP_GNB_CUSystemInformation_t *)calloc(1, sizeof(F1AP_GNB_CUSystemInformation_t)); + //LOG_I(F1AP, "%s() SI %d size %d: ", __func__, i, f1ap_setup_resp->SI_container_length[i][0]); + //for (int n = 0; n < f1ap_setup_resp->SI_container_length[i][0]; n++) + // printf("%02x ", f1ap_setup_resp->SI_container[i][0][n]); + //printf("\n"); + + // for (int sIBtype=2;sIBtype<33;sIBtype++) { //21 ? 33 ? + for (int sIBtype=2;sIBtype<21;sIBtype++) { + if (f1ap_setup_resp->cells_to_activate[i].SI_container[sIBtype]!=NULL) { + AssertFatal(sIBtype < 6 || sIBtype == 9, "Illegal SI type %d\n",sIBtype); + F1AP_SibtypetobeupdatedListItem_t *sib_item = calloc(1,sizeof(*sib_item)); + memset((void*)sib_item,0,sizeof(*sib_item)); + sib_item->sIBtype = sIBtype; + OCTET_STRING_fromBuf(&sib_item->sIBmessage, + (const char*)f1ap_setup_resp->cells_to_activate[i].SI_container[sIBtype], + f1ap_setup_resp->cells_to_activate[i].SI_container_length[sIBtype]); + + LOG_D(F1AP, "f1ap_setup_resp->SI_container_length[%d][%d] = %d \n", i,sIBtype,f1ap_setup_resp->cells_to_activate[i].SI_container_length[sIBtype]); + ASN_SEQUENCE_ADD(&gNB_CUSystemInformation->sibtypetobeupdatedlist.list,sib_item); + } + } + cells_to_be_activated_list_itemExtIEs->extensionValue.choice.GNB_CUSystemInformation = *gNB_CUSystemInformation; + + F1AP_ProtocolExtensionContainer_154P112_t p_154P112_t; + memset((void *)&p_154P112_t, 0, sizeof(F1AP_ProtocolExtensionContainer_154P112_t)); + + ASN_SEQUENCE_ADD(&p_154P112_t.list, cells_to_be_activated_list_itemExtIEs); + cells_to_be_activated_list_item.iE_Extensions = (struct F1AP_ProtocolExtensionContainer*)&p_154P112_t; + + free(gNB_CUSystemInformation); + gNB_CUSystemInformation = NULL; } /* ADD */ cells_to_be_activated_list_item_ies->value.choice.Cells_to_be_Activated_List_Item = cells_to_be_activated_list_item; - ASN_SEQUENCE_ADD(&ie->value.choice.Cells_to_be_Activated_List.list, - cells_to_be_activated_list_item_ies); + ASN_SEQUENCE_ADD(&ie->value.choice.Cells_to_be_Activated_List.list, cells_to_be_activated_list_item_ies); } ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); } @@ -571,9 +568,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu ie->criticality = F1AP_Criticality_reject; ie->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_Cells_to_be_Activated_List; - for (i=0; - inum_cells_to_activate; - i++) { + for (i=0; inum_cells_to_activate; i++) { F1AP_Cells_to_be_Activated_List_ItemIEs_t *cells_to_be_activated_list_item_ies; cells_to_be_activated_list_item_ies = (F1AP_Cells_to_be_Activated_List_ItemIEs_t *)calloc(1, sizeof(F1AP_Cells_to_be_Activated_List_ItemIEs_t)); @@ -833,8 +828,6 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu gnb_cu_tnl_association_to_update_item_ies); } ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); - - */ /* @@ -942,8 +935,8 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu LOG_E(F1AP, "Failed to encode F1 gNB-CU CONFIGURATION UPDATE\n"); return -1; } - - printf("F1AP gNB-CU CONFIGURATION UPDATE : "); + + LOG_I(F1AP, "F1AP gNB-CU CONFIGURATION UPDATE : "); for (int i=0;iassoc_id, buffer, len, 0); diff --git a/openair2/F1AP/f1ap_cu_rrc_message_transfer.c b/openair2/F1AP/f1ap_cu_rrc_message_transfer.c index 2a029a3ac5..0255da0f29 100644 --- a/openair2/F1AP/f1ap_cu_rrc_message_transfer.c +++ b/openair2/F1AP/f1ap_cu_rrc_message_transfer.c @@ -169,7 +169,6 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance, } } } - AssertFatal(rrc_inst>=0,"couldn't find an RRC instance for nr_cell %llu\n",(unsigned long long int)nr_cellid); int f1ap_uid = f1ap_add_ue(&f1ap_cu_inst[rrc_inst], rrc_inst, CC_id, 0, rnti); @@ -344,7 +343,7 @@ int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance, F1AP_ULRRCMessageTransfer_t *container; F1AP_ULRRCMessageTransferIEs_t *ie; - + uint64_t cu_ue_f1ap_id; uint64_t du_ue_f1ap_id; uint64_t srb_id; diff --git a/openair2/F1AP/f1ap_cu_ue_context_management.c b/openair2/F1AP/f1ap_cu_ue_context_management.c index 85c992f757..2f30a9d817 100644 --- a/openair2/F1AP/f1ap_cu_ue_context_management.c +++ b/openair2/F1AP/f1ap_cu_ue_context_management.c @@ -440,7 +440,6 @@ if (0) { DRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->packetErrorRate.pER_Scalar = 1L; DRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->packetErrorRate.pER_Exponent = 6L; - /* OPTIONAL */ /* delayCritical */ if (0) { @@ -582,8 +581,9 @@ if (0) { /* packetErrorRate */ flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.qoS_Characteristics.choice.dynamic_5QI->packetErrorRate.pER_Scalar = 1L; - flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.qoS_Characteristics.choice.dynamic_5QI->packetErrorRate.pER_Exponent = 6L; - /* OPTIONAL */ + flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.qoS_Characteristics.choice.dynamic_5QI->packetErrorRate.pER_Exponent = 6L; + + /* OPTIONAL */ /* delayCritical */ if (0) { flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.qoS_Characteristics.choice.dynamic_5QI->delayCritical = (long *)calloc(1, sizeof(long)); diff --git a/openair2/F1AP/f1ap_du_interface_management.c b/openair2/F1AP/f1ap_du_interface_management.c index 6f43240e66..e2e09c15c2 100644 --- a/openair2/F1AP/f1ap_du_interface_management.c +++ b/openair2/F1AP/f1ap_du_interface_management.c @@ -195,11 +195,11 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) { served_cell_information.nRPCI = f1ap_du_data->nr_pci[i]; // int 0..1007 /* - fiveGS_TAC */ - uint8_t fiveGS_TAC[3]; - served_cell_information.fiveGS_TAC=calloc(1,sizeof(*served_cell_information.fiveGS_TAC)); - fiveGS_TAC[0] = ((uint8_t*)&f1ap_du_data->tac[i])[2]; - fiveGS_TAC[1] = ((uint8_t*)&f1ap_du_data->tac[i])[1]; - fiveGS_TAC[2] = ((uint8_t*)&f1ap_du_data->tac[i])[0]; + uint8_t fiveGS_TAC[3]; + served_cell_information.fiveGS_TAC=calloc(1,sizeof(*served_cell_information.fiveGS_TAC)); + fiveGS_TAC[0] = ((uint8_t*)&f1ap_du_data->tac[i])[2]; + fiveGS_TAC[1] = ((uint8_t*)&f1ap_du_data->tac[i])[1]; + fiveGS_TAC[2] = ((uint8_t*)&f1ap_du_data->tac[i])[0]; OCTET_STRING_fromBuf(served_cell_information.fiveGS_TAC, (const char *)fiveGS_TAC, 3); @@ -719,10 +719,10 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance, served_cell_information.nRPCI = f1ap_setup_req->nr_pci[i]; // int 0..1007 /* - fiveGS_TAC */ - uint8_t fiveGS_TAC[3]; - fiveGS_TAC[0] = ((uint8_t*)&f1ap_setup_req->tac[i])[2]; - fiveGS_TAC[1] = ((uint8_t*)&f1ap_setup_req->tac[i])[1]; - fiveGS_TAC[2] = ((uint8_t*)&f1ap_setup_req->tac[i])[0]; + uint8_t fiveGS_TAC[3]; + fiveGS_TAC[0] = ((uint8_t*)&f1ap_setup_req->tac[i])[2]; + fiveGS_TAC[1] = ((uint8_t*)&f1ap_setup_req->tac[i])[1]; + fiveGS_TAC[2] = ((uint8_t*)&f1ap_setup_req->tac[i])[0]; OCTET_STRING_fromBuf(served_cell_information.fiveGS_TAC, (const char *)fiveGS_TAC, 3); @@ -740,7 +740,6 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance, MCC_MNC_TO_PLMNID(f1ap_du_data->mcc[i], f1ap_du_data->mnc[i], f1ap_du_data->mnc_digit_length[i], &servedPLMN_item->pLMN_Identity); ASN_SEQUENCE_ADD(&served_cell_information.servedPLMNs.list, servedPLMN_item); - // // /* - CHOICE NR-MODE-Info */ F1AP_NR_Mode_Info_t nR_Mode_Info; @@ -885,7 +884,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance, served_cell_information.nRPCI = f1ap_setup_req->nr_pci[i]; // int 0..1007 /* - fiveGS_TAC */ - served_cell_information.fiveGS_TAC=calloc(1,sizeof(*served_cell_information.fiveGS_TAC)); + served_cell_information.fiveGS_TAC=calloc(1,sizeof(*served_cell_information.fiveGS_TAC)); OCTET_STRING_fromBuf(served_cell_information.fiveGS_TAC, (const char *) &f1ap_setup_req->tac[i], 3); @@ -903,8 +902,6 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance, MCC_MNC_TO_PLMNID(f1ap_du_data->mcc[i], f1ap_du_data->mnc[i], f1ap_du_data->mnc_digit_length[i], &servedPLMN_item->pLMN_Identity); ASN_SEQUENCE_ADD(&served_cell_information.servedPLMNs.list, servedPLMN_item); - - // // /* - CHOICE NR-MODE-Info */ F1AP_NR_Mode_Info_t nR_Mode_Info; diff --git a/openair2/F1AP/f1ap_du_rrc_message_transfer.c b/openair2/F1AP/f1ap_du_rrc_message_transfer.c index 3fe26345ff..605c0bf47e 100644 --- a/openair2/F1AP/f1ap_du_rrc_message_transfer.c +++ b/openair2/F1AP/f1ap_du_rrc_message_transfer.c @@ -479,36 +479,36 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, DRB2LCHAN[i] = (uint8_t) * DRB_configList->list.array[i]->logicalChannelIdentity; } - rrc_mac_config_req_eNB( - ctxt.module_id, - 0,0,0,0,0,0, - 0, - ue_context_p->ue_context.rnti, - (LTE_BCCH_BCH_Message_t *) NULL, - (LTE_RadioResourceConfigCommonSIB_t *) NULL, - (LTE_RadioResourceConfigCommonSIB_t *) NULL, - physicalConfigDedicated, - (LTE_SCellToAddMod_r10_t *)NULL, - //(struct PhysicalConfigDedicatedSCell_r10 *)NULL, - (LTE_MeasObjectToAddMod_t **) NULL, - mac_MainConfig, - DRB2LCHAN[i], - DRB_configList->list.array[i]->logicalChannelConfig, - measGapConfig, - (LTE_TDD_Config_t *) NULL, - NULL, - (LTE_SchedulingInfoList_t *) NULL, - 0, NULL, NULL, (LTE_MBSFN_SubframeConfigList_t *) NULL - , 0, (LTE_MBSFN_AreaInfoList_r9_t *) NULL, (LTE_PMCH_InfoList_r9_t *) NULL, - (LTE_SystemInformationBlockType1_v1310_IEs_t *)NULL, - 0, - (LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL, - (LTE_SchedulingInfo_MBMS_r14_t *) NULL, - (struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL, - (LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL, - (LTE_MBSFN_AreaInfoList_r9_t *) NULL, - (LTE_MBSFNAreaConfiguration_r9_t*) NULL - ); + rrc_mac_config_req_eNB( + ctxt.module_id, + 0,0,0,0,0,0, + 0, + ue_context_p->ue_context.rnti, + (LTE_BCCH_BCH_Message_t *) NULL, + (LTE_RadioResourceConfigCommonSIB_t *) NULL, + (LTE_RadioResourceConfigCommonSIB_t *) NULL, + physicalConfigDedicated, + (LTE_SCellToAddMod_r10_t *)NULL, + //(struct PhysicalConfigDedicatedSCell_r10 *)NULL, + (LTE_MeasObjectToAddMod_t **) NULL, + mac_MainConfig, + DRB2LCHAN[i], + DRB_configList->list.array[i]->logicalChannelConfig, + measGapConfig, + (LTE_TDD_Config_t *) NULL, + NULL, + (LTE_SchedulingInfoList_t *) NULL, + 0, NULL, NULL, (LTE_MBSFN_SubframeConfigList_t *) NULL + , 0, (LTE_MBSFN_AreaInfoList_r9_t *) NULL, (LTE_PMCH_InfoList_r9_t *) NULL, + (LTE_SystemInformationBlockType1_v1310_IEs_t *)NULL, + 0, + (LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL, + (LTE_SchedulingInfo_MBMS_r14_t *) NULL, + (struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL, + (LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL, + (LTE_MBSFN_AreaInfoList_r9_t *) NULL, + (LTE_MBSFNAreaConfiguration_r9_t*) NULL + ); } } else { // remove LCHAN from MAC/PHY @@ -883,13 +883,10 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP, ie->id = F1AP_ProtocolIE_ID_id_DUtoCURRCContainer; ie->criticality = F1AP_Criticality_reject; ie->value.present = F1AP_InitialULRRCMessageTransferIEs__value_PR_DUtoCURRCContainer; - OCTET_STRING_fromBuf(&ie->value.choice.DUtoCURRCContainer, - (char *)sdu2P, - sdu2_lenP); + OCTET_STRING_fromBuf(&ie->value.choice.DUtoCURRCContainer, (char *)sdu2P, sdu2_lenP); ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); } - /* encode */ if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { LOG_E(F1AP, "Failed to encode F1 INITIAL UL RRC MESSAGE TRANSFER\n"); diff --git a/openair2/F1AP/f1ap_du_rrc_message_transfer.h b/openair2/F1AP/f1ap_du_rrc_message_transfer.h index 0bb6371fe8..bf09a8b1f4 100644 --- a/openair2/F1AP/f1ap_du_rrc_message_transfer.h +++ b/openair2/F1AP/f1ap_du_rrc_message_transfer.h @@ -50,7 +50,7 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP, rnti_t rntiP, const uint8_t *sduP, sdu_size_t sdu_lenP, - const uint8_t *sdu2P, - sdu_size_t sdu2_lenP); + const uint8_t *sdu2P, + sdu_size_t sdu2_lenP); #endif /* F1AP_DU_RRC_MESSAGE_TRANSFER_H_ */ diff --git a/openair2/F1AP/f1ap_du_task.c b/openair2/F1AP/f1ap_du_task.c index 726d5629f8..8594345cc9 100644 --- a/openair2/F1AP/f1ap_du_task.c +++ b/openair2/F1AP/f1ap_du_task.c @@ -160,13 +160,13 @@ void *F1AP_DU_task(void *arg) { &F1AP_SETUP_REQ(received_msg)); break; case F1AP_GNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE: - DU_send_gNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE(ITTI_MSG_DESTINATION_INSTANCE(received_msg), + DU_send_gNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE(ITTI_MSG_DESTINATION_INSTANCE(received_msg), &F1AP_GNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE(received_msg)); - break; + break; case F1AP_GNB_CU_CONFIGURATION_UPDATE_FAILURE: - DU_send_gNB_CU_CONFIGURATION_UPDATE_FAILURE(ITTI_MSG_DESTINATION_INSTANCE(received_msg), + DU_send_gNB_CU_CONFIGURATION_UPDATE_FAILURE(ITTI_MSG_DESTINATION_INSTANCE(received_msg), &F1AP_GNB_CU_CONFIGURATION_UPDATE_FAILURE(received_msg)); - break; + break; case SCTP_NEW_ASSOCIATION_RESP: // 1. store the respon @@ -190,9 +190,8 @@ void *F1AP_DU_task(void *arg) { DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(0,0,0,msg->crnti, msg->rrc_container, msg->rrc_container_length, - msg->du2cu_rrc_container, - msg->du2cu_rrc_container_length - ); + msg->du2cu_rrc_container, + msg->du2cu_rrc_container_length); break; case F1AP_UL_RRC_MESSAGE: // to rrc diff --git a/openair2/GNB_APP/gnb_app.c b/openair2/GNB_APP/gnb_app.c index b5c5efa244..0ac8162955 100644 --- a/openair2/GNB_APP/gnb_app.c +++ b/openair2/GNB_APP/gnb_app.c @@ -176,12 +176,11 @@ void *gNB_app_task(void *args_p) /* for no gcc warnings */ (void)instance; - int cell_to_activate = 0; + int cell_to_activate = 0; itti_mark_task_ready (TASK_GNB_APP); LOG_I(PHY, "%s() Task ready initialize structures\n", __FUNCTION__); - if (RC.nb_nr_macrlc_inst>0) RCconfig_nr_macrlc(); LOG_I(PHY, "%s() RC.nb_nr_L1_inst:%d\n", __FUNCTION__, RC.nb_nr_L1_inst); diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c index 9df5be86a9..5be080d30c 100644 --- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c +++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c @@ -2906,7 +2906,7 @@ int is_nr_DL_slot(NR_TDD_UL_DL_ConfigCommon_t *tdd_UL_DL_ConfigurationCommon,slo if (tdd_UL_DL_ConfigurationCommon->pattern2) { if (tdd_UL_DL_ConfigurationCommon->pattern2->ext1 && - tdd_UL_DL_ConfigurationCommon->pattern2->ext1->dl_UL_TransmissionPeriodicity_v1530) + tdd_UL_DL_ConfigurationCommon->pattern2->ext1->dl_UL_TransmissionPeriodicity_v1530) period2 = 3000+*tdd_UL_DL_ConfigurationCommon->pattern2->ext1->dl_UL_TransmissionPeriodicity_v1530; else period2 = tdd_period_to_num[tdd_UL_DL_ConfigurationCommon->pattern2->dl_UL_TransmissionPeriodicity]; @@ -2938,7 +2938,7 @@ int is_nr_UL_slot(NR_TDD_UL_DL_ConfigCommon_t *tdd_UL_DL_ConfigurationCommon, sl if (tdd_UL_DL_ConfigurationCommon->pattern2) { if (tdd_UL_DL_ConfigurationCommon->pattern2->ext1 && - tdd_UL_DL_ConfigurationCommon->pattern2->ext1->dl_UL_TransmissionPeriodicity_v1530) + tdd_UL_DL_ConfigurationCommon->pattern2->ext1->dl_UL_TransmissionPeriodicity_v1530) period2 = 3000+*tdd_UL_DL_ConfigurationCommon->pattern2->ext1->dl_UL_TransmissionPeriodicity_v1530; else period2 = tdd_period_to_num[tdd_UL_DL_ConfigurationCommon->pattern2->dl_UL_TransmissionPeriodicity]; diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h index 449ddcf49c..7f6a722925 100644 --- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h +++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h @@ -57,8 +57,8 @@ uint16_t nr_dci_size(const NR_BWP_UplinkCommon_t *initialULBWP, const NR_CellGroupConfig_t *cg, dci_pdu_rel15_t *dci_pdu, nr_dci_format_t format, - nr_rnti_type_t rnti_type, - uint16_t N_RB, + nr_rnti_type_t rnti_type, + uint16_t N_RB, int bwp_id); void find_aggregation_candidates(uint8_t *aggregation_level, diff --git a/openair2/LAYER2/NR_MAC_UE/config_ue.c b/openair2/LAYER2/NR_MAC_UE/config_ue.c index bf87eb3ae5..21e3baa17c 100755 --- a/openair2/LAYER2/NR_MAC_UE/config_ue.c +++ b/openair2/LAYER2/NR_MAC_UE/config_ue.c @@ -173,12 +173,12 @@ void config_common_ue(NR_UE_MAC_INST_t *mac, for (i=0; i<5; i++) { if (i==scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing) { - cfg->carrier_config.dl_grid_size[i] = scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->carrierBandwidth; - cfg->carrier_config.dl_k0[i] = scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->offsetToCarrier; + cfg->carrier_config.dl_grid_size[i] = scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->carrierBandwidth; + cfg->carrier_config.dl_k0[i] = scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->offsetToCarrier; } else { - cfg->carrier_config.dl_grid_size[i] = 0; - cfg->carrier_config.dl_k0[i] = 0; + cfg->carrier_config.dl_grid_size[i] = 0; + cfg->carrier_config.dl_k0[i] = 0; } } diff --git a/openair2/LAYER2/NR_MAC_UE/mac_defs.h b/openair2/LAYER2/NR_MAC_UE/mac_defs.h index 5f7ab73605..fc02662a63 100755 --- a/openair2/LAYER2/NR_MAC_UE/mac_defs.h +++ b/openair2/LAYER2/NR_MAC_UE/mac_defs.h @@ -315,7 +315,7 @@ typedef struct { typedef struct { NR_ServingCellConfigCommon_t *scc; - NR_ServingCellConfigCommonSIB_t *scc_SIB; + NR_ServingCellConfigCommonSIB_t *scc_SIB; NR_CellGroupConfig_t *cg; int servCellIndex; NR_CSI_ReportConfig_t *csirc; diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index e2971628ea..af2a80b968 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -134,7 +134,6 @@ int8_t nr_ue_decode_mib(module_id_t module_id, } } - LOG_D(MAC,"system frame number(6 MSB bits): %d\n", mac->mib->systemFrameNumber.buf[0]); LOG_D(MAC,"system frame number(with LSB): %d\n", (int)frame); LOG_D(MAC,"subcarrier spacing (0=15or60, 1=30or120): %d\n", (int)mac->mib->subCarrierSpacingCommon); @@ -375,10 +374,10 @@ int8_t nr_ue_process_dci_time_dom_resource_assignment(NR_UE_MAC_INST_t *mac, if(pusch_config_pdu != NULL){ NR_PUSCH_TimeDomainResourceAllocationList_t *pusch_TimeDomainAllocationList = NULL; if (mac->ULbwp[0] && - mac->ULbwp[0]->bwp_Dedicated && - mac->ULbwp[0]->bwp_Dedicated->pusch_Config && - mac->ULbwp[0]->bwp_Dedicated->pusch_Config->choice.setup && - mac->ULbwp[0]->bwp_Dedicated->pusch_Config->choice.setup->pusch_TimeDomainAllocationList) { + mac->ULbwp[0]->bwp_Dedicated && + mac->ULbwp[0]->bwp_Dedicated->pusch_Config && + mac->ULbwp[0]->bwp_Dedicated->pusch_Config->choice.setup && + mac->ULbwp[0]->bwp_Dedicated->pusch_Config->choice.setup->pusch_TimeDomainAllocationList) { pusch_TimeDomainAllocationList = mac->ULbwp[0]->bwp_Dedicated->pusch_Config->choice.setup->pusch_TimeDomainAllocationList->choice.setup; } else if (mac->ULbwp[0] && @@ -419,7 +418,6 @@ int8_t nr_ue_process_dci_time_dom_resource_assignment(NR_UE_MAC_INST_t *mac, } LOG_D(NR_MAC,"start_symbol = %i\n", pusch_config_pdu->start_symbol_index); LOG_D(NR_MAC,"number_symbols = %i\n", pusch_config_pdu->nr_of_symbols); - } return 0; } @@ -672,9 +670,9 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr } /* dmrs symbol positions*/ dlsch_config_pdu_1_0->dlDmrsSymbPos = fill_dmrs_mask(pdsch_config, - mac->mib->dmrs_TypeA_Position, - dlsch_config_pdu_1_0->number_symbols, - dlsch_config_pdu_1_0->start_symbol); + mac->mib->dmrs_TypeA_Position, + dlsch_config_pdu_1_0->number_symbols, + dlsch_config_pdu_1_0->start_symbol); dlsch_config_pdu_1_0->dmrsConfigType = (mac->DLbwp[0] != NULL) ? (mac->DLbwp[0]->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type == NULL ? 0 : 1) : 0; /* number of DM-RS CDM groups without data according to subclause 5.1.6.2 of 3GPP TS 38.214 version 15.9.0 Release 15 */ if (dlsch_config_pdu_1_0->number_symbols == 2) @@ -1230,9 +1228,11 @@ uint8_t nr_extract_dci_info(NR_UE_MAC_INST_t *mac, //Identifier for DCI formats pos++; dci_pdu_rel15->format_indicator = (*dci_pdu>>(dci_size-pos))&1; + + //switch to DCI_0_0 if (dci_pdu_rel15->format_indicator == 0) - //switch to DCI_0_0 - return 2+nr_extract_dci_info(mac, NR_UL_DCI_FORMAT_0_0, dci_size, rnti, dci_pdu, dci_pdu_rel15); + return 2+nr_extract_dci_info(mac, NR_UL_DCI_FORMAT_0_0, dci_size, rnti, dci_pdu, dci_pdu_rel15); + #ifdef DEBUG_EXTRACT_DCI LOG_D(MAC,"Format indicator %d (%d bits) N_RB_BWP %d => %d (0x%lx)\n",dci_pdu_rel15->format_indicator,1,N_RB,dci_size-pos,*dci_pdu); #endif diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c index 57331fb65e..5f5689fc9b 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c @@ -620,8 +620,7 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac, int target_ss; bool valid_ptrs_setup = 0; uint16_t n_RB_ULBWP; - if (mac->ULbwp[0] && - mac->ULbwp[0]->bwp_Common) { + if (mac->ULbwp[0] && mac->ULbwp[0]->bwp_Common) { n_RB_ULBWP = NRRIV2BW(mac->ULbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); pusch_config_pdu->bwp_start = NRRIV2PRBOFFSET(mac->ULbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); } @@ -770,11 +769,11 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac, /* PTRS */ if (mac->ULbwp[0] && - mac->ULbwp[0]->bwp_Dedicated && - mac->ULbwp[0]->bwp_Dedicated->pusch_Config && - mac->ULbwp[0]->bwp_Dedicated->pusch_Config->choice.setup && - mac->ULbwp[0]->bwp_Dedicated->pusch_Config->choice.setup->dmrs_UplinkForPUSCH_MappingTypeB && - mac->ULbwp[0]->bwp_Dedicated->pusch_Config->choice.setup->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->phaseTrackingRS) { + mac->ULbwp[0]->bwp_Dedicated && + mac->ULbwp[0]->bwp_Dedicated->pusch_Config && + mac->ULbwp[0]->bwp_Dedicated->pusch_Config->choice.setup && + mac->ULbwp[0]->bwp_Dedicated->pusch_Config->choice.setup->dmrs_UplinkForPUSCH_MappingTypeB && + mac->ULbwp[0]->bwp_Dedicated->pusch_Config->choice.setup->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->phaseTrackingRS) { if (pusch_config_pdu->transform_precoding == transform_precoder_disabled) { nfapi_nr_ue_ptrs_ports_t ptrs_ports_list; pusch_config_pdu->pusch_ptrs.ptrs_ports_list = &ptrs_ports_list; @@ -989,7 +988,7 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in mac->UL_ndi[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id], ulcfg_pdu->pusch_config_pdu.pusch_data.new_data_indicator, TBS_bytes, - ra->ra_state ); + ra->ra_state); if (ra->ra_state == WAIT_RAR && !ra->cfra){ memcpy(ulsch_input_buffer, mac->ulsch_pdu.payload, TBS_bytes); LOG_D(NR_MAC,"[RAPROC] Msg3 to be transmitted:\n"); @@ -998,7 +997,7 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in } LOG_D(NR_MAC,"Flipping NDI for harq_id %d (Msg3)\n",ulcfg_pdu->pusch_config_pdu.pusch_data.new_data_indicator); mac->UL_ndi[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id] = ulcfg_pdu->pusch_config_pdu.pusch_data.new_data_indicator; - mac->first_ul_tx[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id] = 0; + mac->first_ul_tx[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id] = 0; } else { if ( (mac->UL_ndi[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id] != ulcfg_pdu->pusch_config_pdu.pusch_data.new_data_indicator || @@ -1088,6 +1087,7 @@ int nr_ue_pusch_scheduler(NR_UE_MAC_INST_t *mac, int delta = 0; NR_BWP_Uplink_t *ubwp = mac->ULbwp[0]; + // Get the numerology to calculate the Tx frame and slot int mu = ubwp ? ubwp->bwp_Common->genericParameters.subcarrierSpacing : @@ -1619,7 +1619,7 @@ static void map_ssb_to_ro(NR_UE_MAC_INST_t *mac) { for (ssb_idx=0; ssb_idx %d\n", + LOG_D(NR_MAC,"Checking ssb_idx %d => %d\n", ssb_idx,ssb_list.tx_ssb[ssb_idx].transmitted); // Map only the transmitted ssb_idx @@ -1823,7 +1823,6 @@ void nr_ue_prach_scheduler(module_id_t module_idP, frame_t frameP, sub_frame_t s ra->generate_nr_prach = GENERATE_IDLE; // Reset flag for PRACH generation NR_TDD_UL_DL_ConfigCommon_t *tdd_config = scc==NULL ? scc_SIB->tdd_UL_DL_ConfigurationCommon : scc->tdd_UL_DL_ConfigurationCommon; - if (is_nr_UL_slot(tdd_config, slotP, mac->frame_type)) { // WIP Need to get the proper selected ssb_idx diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c index cb3414a1a1..7beb130819 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c @@ -481,7 +481,7 @@ void nr_csi_meas_reporting(int Mod_idP, const NR_CellGroupConfig_t *CellGroup = UE_info->CellGroup[UE_id]; NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; if (!CellGroup || !CellGroup->spCellConfig || !CellGroup->spCellConfig->spCellConfigDedicated || - !CellGroup->spCellConfig->spCellConfigDedicated->csi_MeasConfig) continue; + !CellGroup->spCellConfig->spCellConfigDedicated->csi_MeasConfig) continue; const NR_CSI_MeasConfig_t *csi_measconfig = CellGroup->spCellConfig->spCellConfigDedicated->csi_MeasConfig->choice.setup; AssertFatal(csi_measconfig->csi_ReportConfigToAddModList->list.count > 0, "NO CSI report configuration available"); @@ -1197,7 +1197,7 @@ bool nr_acknack_scheduling(int mod_id, memset(pucch, 0, sizeof(*pucch)); pucch->frame = s == n_slots_frame - 1 ? (f + 1) % 1024 : f; pucch->ul_slot = (s + 1) % n_slots_frame; - return nr_acknack_scheduling(mod_id, UE_id, frame, slot,pucch->r_pucch); + return nr_acknack_scheduling(mod_id, UE_id, frame, slot, pucch->r_pucch); } pucch->timing_indicator = i; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 5e5641ae14..6c6ab78880 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -566,6 +566,7 @@ void handle_nr_ul_harq(module_id_t mod_id, add_tail_nr_list(&sched_ctrl->retrans_ul_harq, harq_pid); } } + /* * When data are received on PHY and transmitted to MAC */ @@ -662,7 +663,6 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, } } else if(sduP) { - bool no_sig = true; for (int k = 0; k < sdu_lenP; k++) { if(sduP[k]!=0) { diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h index 88f8952dab..7a8414a743 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h +++ b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h @@ -80,7 +80,6 @@ #define NR_NB_RA_PROC_MAX 4 #define MAX_NUM_OF_SSB 64 - /*! \brief NR_list_t is a "list" (of users, HARQ processes, slices, ...). * Especially useful in the scheduler and to keep "classes" of users. */ typedef struct { diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c b/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c index 6898d4ff71..1d1dd6fcab 100644 --- a/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c +++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c @@ -49,8 +49,7 @@ static void nr_pdcp_entity_recv_pdu(nr_pdcp_entity_t *entity, return; } - if (entity->type != NR_PDCP_SRB && - !(buffer[0] & 0x80)) { + if (entity->type != NR_PDCP_SRB && !(buffer[0] & 0x80)) { LOG_E(PDCP, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__); exit(1); } @@ -66,8 +65,7 @@ static void nr_pdcp_entity_recv_pdu(nr_pdcp_entity_t *entity, header_size = 3; } /* SRBs always have MAC-I, even if integrity is not active */ - if (entity->has_integrity - || entity->type == NR_PDCP_SRB) { + if (entity->has_integrity || entity->type == NR_PDCP_SRB) { integrity_size = 4; } else { integrity_size = 0; @@ -182,8 +180,7 @@ static void nr_pdcp_entity_recv_sdu(nr_pdcp_entity_t *entity, } /* SRBs always have MAC-I, even if integrity is not active */ - if (entity->has_integrity - || entity->type == NR_PDCP_SRB) { + if (entity->has_integrity || entity->type == NR_PDCP_SRB) { integrity_size = 4; } else { integrity_size = 0; @@ -196,8 +193,9 @@ static void nr_pdcp_entity_recv_sdu(nr_pdcp_entity_t *entity, (unsigned char *)buf + header_size + size, (unsigned char *)buf, header_size + size, entity->rb_id, count, entity->is_gnb ? 1 : 0); + + // set MAC-I to 0 for SRBs with integrity not active else if (integrity_size == 4) - /* set MAC-I to 0 for SRBs with integrity not active */ memset(buf + header_size + size, 0, 4); if (entity->has_ciphering) diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.h b/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.h index 5bdc6f7892..09cb09f936 100644 --- a/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.h +++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.h @@ -40,6 +40,7 @@ typedef struct nr_pdcp_entity_t { void (*recv_sdu)(struct nr_pdcp_entity_t *entity, char *buffer, int size, int sdu_id); void (*delete)(struct nr_pdcp_entity_t *entity); + /* set_security: pass -1 to integrity_algorithm / ciphering_algorithm * to keep the current algorithm * pass NULL to integrity_key / ciphering_key @@ -50,6 +51,7 @@ typedef struct nr_pdcp_entity_t { char *integrity_key, int ciphering_algorithm, char *ciphering_key); + void (*set_time)(struct nr_pdcp_entity_t *entity, uint64_t now); /* callbacks provided to the PDCP module */ diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c index 9323a9da85..a06d39913f 100644 --- a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c +++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c @@ -960,7 +960,6 @@ boolean_t rrc_pdcp_config_asn1_req( return 0; } - void nr_DRB_preconfiguration(uint16_t crnti) { @@ -1056,7 +1055,6 @@ void nr_DRB_preconfiguration(uint16_t crnti) } - uint64_t get_pdcp_optmask(void) { return pdcp_optmask; @@ -1118,7 +1116,6 @@ void pdcp_config_set_security( nr_pdcp_manager_unlock(nr_pdcp_ue_manager); } - static boolean_t pdcp_data_req_srb( protocol_ctxt_t *ctxt_pP, const rb_id_t rb_id, @@ -1227,12 +1224,10 @@ boolean_t pdcp_data_req( ) { if (srb_flagP) { - return pdcp_data_req_srb(ctxt_pP, rb_id, muiP, confirmP, sdu_buffer_size, - sdu_buffer); + return pdcp_data_req_srb(ctxt_pP, rb_id, muiP, confirmP, sdu_buffer_size, sdu_buffer); } else{ - return pdcp_data_req_drb(ctxt_pP, rb_id, muiP, confirmP, sdu_buffer_size, - sdu_buffer); + return pdcp_data_req_drb(ctxt_pP, rb_id, muiP, confirmP, sdu_buffer_size, sdu_buffer); } } diff --git a/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.h b/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.h index 1a4c7789f8..6b3c228163 100644 --- a/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.h +++ b/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.h @@ -46,4 +46,4 @@ void nr_rlc_bearer_init(NR_RLC_BearerConfig_t *RLC_BearerConfig, NR_RLC_BearerCo void nr_drb_config(struct NR_RLC_Config *rlc_Config, NR_RLC_Config_PR rlc_config_pr); -void nr_rlc_bearer_init_ul_spec(struct NR_LogicalChannelConfig *mac_LogicalChannelConfig); +void nr_rlc_bearer_init_ul_spec(struct NR_LogicalChannelConfig *mac_LogicalChannelConfig); \ No newline at end of file diff --git a/openair2/LAYER2/rlc_v2/rlc_oai_api.c b/openair2/LAYER2/rlc_v2/rlc_oai_api.c index 9f04cdce50..0cf4b85fa2 100644 --- a/openair2/LAYER2/rlc_v2/rlc_oai_api.c +++ b/openair2/LAYER2/rlc_v2/rlc_oai_api.c @@ -1041,5 +1041,4 @@ void du_rlc_data_req(const protocol_ctxt_t *const ctxt_pP, sdu_size_t sdu_sizeP, mem_block_t *sdu_pP){ -} - +} \ No newline at end of file diff --git a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c index 553df102fb..4576dbcc9b 100644 --- a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c +++ b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c @@ -60,7 +60,7 @@ int handle_bcch_bch(module_id_t module_id, int cc_id, ssb_length, // Lssb = 64 is not support ssb_index, pduP, - ssb_start_subcarrier, + ssb_start_subcarrier, cell_id); } diff --git a/openair2/RRC/LTE/L2_interface.c b/openair2/RRC/LTE/L2_interface.c index cd99ddfedc..e502230b50 100644 --- a/openair2/RRC/LTE/L2_interface.c +++ b/openair2/RRC/LTE/L2_interface.c @@ -318,8 +318,7 @@ mac_rrc_data_ind( sduP, sdu_lenP, NULL, - 0 - ); + 0); return(0); } diff --git a/openair2/RRC/NR/L2_nr_interface.c b/openair2/RRC/NR/L2_nr_interface.c index e3a12ff771..c381edfec4 100644 --- a/openair2/RRC/NR/L2_nr_interface.c +++ b/openair2/RRC/NR/L2_nr_interface.c @@ -44,10 +44,7 @@ #include "NR_MIB.h" #include "NR_BCCH-BCH-Message.h" #include "rrc_gNB_UE_context.h" -#include - - -#include "RRC/NR/MESSAGES/asn1_msg.h" +#include "openair2/RRC/NR/MESSAGES/asn1_msg.h" extern RAN_CONTEXT_t RC; @@ -364,4 +361,4 @@ int8_t nr_mac_rrc_data_ind(const module_id_t module_idP, } return 0; -} +} \ No newline at end of file diff --git a/openair2/RRC/NR/MESSAGES/asn1_msg.c b/openair2/RRC/NR/MESSAGES/asn1_msg.c index b720c1fb6f..d3df245eac 100755 --- a/openair2/RRC/NR/MESSAGES/asn1_msg.c +++ b/openair2/RRC/NR/MESSAGES/asn1_msg.c @@ -1214,7 +1214,6 @@ void fill_initial_cellGroupConfig(rnti_t rnti, //} rlc_BearerConfig->rlc_Config = rlc_Config; - //if (0) { logicalChannelConfig = calloc(1, sizeof(NR_LogicalChannelConfig_t)); logicalChannelConfig->ul_SpecificParameters = calloc(1, sizeof(*logicalChannelConfig->ul_SpecificParameters)); @@ -1432,7 +1431,6 @@ uint8_t do_RRCSetup(rrc_gNB_ue_context_t *const ue_context_pP, LOG_D(NR_RRC,"RRCSetup Encoded %zd bits (%zd bytes)\n", enc_rval.encoded,(enc_rval.encoded+7)/8); return((enc_rval.encoded+7)/8); - } uint8_t do_NR_SecurityModeCommand( @@ -1636,8 +1634,7 @@ int16_t do_RRCReconfiguration( NR_SecurityConfig_t *security_config, NR_SDAP_Config_t *sdap_config, NR_MeasConfig_t *meas_config, - struct NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList - *dedicatedNAS_MessageList, + struct NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList *dedicatedNAS_MessageList, NR_MAC_CellGroupConfig_t *mac_CellGroupConfig, NR_CellGroupConfig_t *cellGroupConfig) //------------------------------------------------------------------------------ diff --git a/openair2/RRC/NR/MESSAGES/asn1_msg.h b/openair2/RRC/NR/MESSAGES/asn1_msg.h index 4993e03601..419352255a 100644 --- a/openair2/RRC/NR/MESSAGES/asn1_msg.h +++ b/openair2/RRC/NR/MESSAGES/asn1_msg.h @@ -102,8 +102,9 @@ void fill_mastercellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig, NR_CellGr uint8_t do_RRCSetup(rrc_gNB_ue_context_t *const ue_context_pP, uint8_t *const buffer, const uint8_t transaction_id, - OCTET_STRING_t *masterCellGroup_from_DU, - NR_ServingCellConfigCommon_t *scc); + OCTET_STRING_t *masterCellGroup_from_DU, + NR_ServingCellConfigCommon_t *scc); + uint8_t do_NR_SecurityModeCommand( const protocol_ctxt_t *const ctxt_pP, uint8_t *const buffer, @@ -117,6 +118,7 @@ uint8_t do_NR_SA_UECapabilityEnquiry( const protocol_ctxt_t *const ctxt_pP, uint8_t do_NR_RRCRelease(uint8_t *buffer, uint8_t Transaction_id); + int16_t do_RRCReconfiguration( const protocol_ctxt_t *const ctxt_pP, uint8_t *buffer, @@ -127,8 +129,7 @@ int16_t do_RRCReconfiguration( NR_SecurityConfig_t *security_config, NR_SDAP_Config_t *sdap_config, NR_MeasConfig_t *meas_config, - struct NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList - *dedicatedNAS_MessageList, + struct NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList *dedicatedNAS_MessageList, NR_MAC_CellGroupConfig_t *mac_CellGroupConfig, NR_CellGroupConfig_t *cellGroupConfig); diff --git a/openair2/RRC/NR/nr_rrc_proto.h b/openair2/RRC/NR/nr_rrc_proto.h index feb2321cd4..ff7547832e 100644 --- a/openair2/RRC/NR/nr_rrc_proto.h +++ b/openair2/RRC/NR/nr_rrc_proto.h @@ -186,7 +186,7 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP, const uint8_t *buffer, int buffer_length, OCTET_STRING_t *du_to_cu_rrc_container, - const int CC_id); + const int CC_id); void rrc_gNB_generate_dedicatedRRCReconfiguration_release( diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index 4f8efd129d..2571ad8e55 100755 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -801,8 +801,8 @@ rrc_gNB_generate_defaultRRCReconfiguration( memset(buffer, 0, RRC_BUF_SIZE); size = do_RRCReconfiguration(ctxt_pP, buffer, xid, - NULL,//*SRB_configList2, - NULL,//*DRB_configList, + NULL, //*SRB_configList2, + NULL, //*DRB_configList, NULL, NULL, NULL, @@ -1736,7 +1736,7 @@ rrc_gNB_process_RRCConnectionReestablishmentComplete( int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP, const uint8_t *buffer, int buffer_length, - OCTET_STRING_t *du_to_cu_rrc_container, + OCTET_STRING_t *du_to_cu_rrc_container, const int CC_id) { module_id_t Idx; @@ -1861,9 +1861,9 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP, LOG_E(RRC, "%s:%d:%s: rrc_gNB_get_next_free_ue_context returned NULL\n", __FILE__, __LINE__, __FUNCTION__); } - if (ue_context_p != NULL) { - ue_context_p->ue_context.Initialue_identity_5g_s_TMSI.presence = TRUE; - ue_context_p->ue_context.ng_5G_S_TMSI_Part1 = s_tmsi_part1; + if (ue_context_p != NULL) { + ue_context_p->ue_context.Initialue_identity_5g_s_TMSI.presence = TRUE; + ue_context_p->ue_context.ng_5G_S_TMSI_Part1 = s_tmsi_part1; } } } else { diff --git a/openair2/RRC/NR/rrc_gNB_NGAP.c b/openair2/RRC/NR/rrc_gNB_NGAP.c index afd4af2ccc..222f6a2375 100644 --- a/openair2/RRC/NR/rrc_gNB_NGAP.c +++ b/openair2/RRC/NR/rrc_gNB_NGAP.c @@ -490,7 +490,6 @@ rrc_gNB_send_NGAP_NAS_FIRST_REQ( itti_send_msg_to_task (TASK_NGAP, ctxt_pP->instance, message_p); } - //------------------------------------------------------------------------------ int rrc_gNB_process_NGAP_INITIAL_CONTEXT_SETUP_REQ( @@ -736,7 +735,6 @@ rrc_gNB_process_NGAP_DOWNLINK_NAS( struct rrc_gNB_ue_context_s *ue_context_p = NULL; protocol_ctxt_t ctxt; memset(&ctxt, 0, sizeof(protocol_ctxt_t)); - ue_initial_id = NGAP_DOWNLINK_NAS (msg_p).ue_initial_id; gNB_ue_ngap_id = NGAP_DOWNLINK_NAS (msg_p).gNB_ue_ngap_id; ue_context_p = rrc_gNB_get_ue_context_from_ngap_ids(instance, ue_initial_id, gNB_ue_ngap_id); diff --git a/openair2/RRC/NR_UE/L2_interface_ue.c b/openair2/RRC/NR_UE/L2_interface_ue.c index be952d10d1..a601698e56 100644 --- a/openair2/RRC/NR_UE/L2_interface_ue.c +++ b/openair2/RRC/NR_UE/L2_interface_ue.c @@ -133,7 +133,7 @@ int8_t nr_mac_rrc_data_req_ue(const module_id_t Mod_idP, memcpy(buffer_pP, (uint8_t*)NR_UE_rrc_inst[Mod_idP].Srb0[gNB_id].Tx_buffer.Payload, NR_UE_rrc_inst[Mod_idP].Srb0[gNB_id].Tx_buffer.payload_size); for(int i = 0; imessage.choice.mib; - //memcpy( (void *)mib, - // (void *)&bcch_message->message.choice.mib, - // sizeof(NR_MIB_t) ); + //memcpy( (void *)mib, + // (void *)&bcch_message->message.choice.mib, + // sizeof(NR_MIB_t) ); nr_rrc_mac_config_req_ue( 0, 0, 0, NR_UE_rrc_inst[module_id].mib, NULL, NULL, NULL); } @@ -585,7 +585,6 @@ int8_t nr_rrc_ue_decode_NR_BCCH_BCH_Message( return 0; } - const char siWindowLength[10][5] = {"5s", "10s", "20s", "40s", "80s", "160s", "320s", "640s", "1280s","ERR"};// {"1ms","2ms","5ms","10ms","15ms","20ms","40ms","80ms","ERR"}; const short siWindowLength_int[9] = {5,10,20,40,80,160,320,640,1280};//{1,2,5,10,15,20,40,80}; @@ -1177,7 +1176,7 @@ int8_t nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message( if(sib1 != NULL){ SEQUENCE_free(&asn_DEF_NR_SIB1, (void *)sib1, 1 ); } - NR_UE_rrc_inst[module_id].Info[gNB_index].SIStatus|=1; + NR_UE_rrc_inst[module_id].Info[gNB_index].SIStatus|=1; sib1 = bcch_message->message.choice.c1->choice.systemInformationBlockType1; if (*(int64_t*)sib1 != 1) { NR_UE_rrc_inst[module_id].sib1[gNB_index] = sib1; @@ -1186,21 +1185,21 @@ int8_t nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message( } LOG_I(NR_RRC, "SIB1 decoded\n"); - /// dump_SIB1(); + /// dump_SIB1(); // FIXME: improve condition for the RA trigger // Check for on-demand not broadcasted SI check_requested_SI_List(module_id, NR_UE_rrc_inst[module_id].requested_SI_List, *sib1); if( nr_rrc_get_state(module_id) <= RRC_STATE_IDLE_NR ) { NR_UE_rrc_inst[module_id].ra_trigger = INITIAL_ACCESS_FROM_RRC_IDLE; // TODO: remove flag after full RA procedures implemented - // get_softmodem_params()->do_ra = 1; - LOG_I(PHY,"Setting state to NR_RRC_SI_RECEIVED\n"); - nr_rrc_set_state (module_id, NR_RRC_SI_RECEIVED); + // get_softmodem_params()->do_ra = 1; + LOG_I(PHY,"Setting state to NR_RRC_SI_RECEIVED\n"); + nr_rrc_set_state (module_id, NR_RRC_SI_RECEIVED); } - // take ServingCellConfigCommon and configure L1/L2 - NR_UE_rrc_inst[module_id].servingCellConfigCommonSIB = sib1->servingCellConfigCommon; - nr_rrc_mac_config_req_ue(module_id,0,0,NULL,sib1->servingCellConfigCommon,NULL,NULL); - nr_rrc_ue_generate_ra_msg(module_id,gNB_index); + // take ServingCellConfigCommon and configure L1/L2 + NR_UE_rrc_inst[module_id].servingCellConfigCommonSIB = sib1->servingCellConfigCommon; + nr_rrc_mac_config_req_ue(module_id,0,0,NULL,sib1->servingCellConfigCommon,NULL,NULL); + nr_rrc_ue_generate_ra_msg(module_id,gNB_index); } else { LOG_E(NR_RRC, "SIB1 not decoded\n"); } @@ -1265,7 +1264,6 @@ nr_rrc_ue_process_masterCellGroup( //TODO (resume all suspended radio bearers and resume SCG transmission for all radio bearers, if suspended) // NSA procedures } - if( cellGroupConfig->rlc_BearerToReleaseList != NULL){ //TODO (perform RLC bearer release as specified in 5.3.5.5.3) @@ -1285,14 +1283,14 @@ nr_rrc_ue_process_masterCellGroup( if( cellGroupConfig->spCellConfig != NULL){ if (NR_UE_rrc_inst[ctxt_pP->module_id].cell_group_config && - NR_UE_rrc_inst[ctxt_pP->module_id].cell_group_config->spCellConfig) { + NR_UE_rrc_inst[ctxt_pP->module_id].cell_group_config->spCellConfig) { memcpy(NR_UE_rrc_inst[ctxt_pP->module_id].cell_group_config->spCellConfig,cellGroupConfig->spCellConfig, sizeof(struct NR_SpCellConfig)); } else { if (NR_UE_rrc_inst[ctxt_pP->module_id].cell_group_config) - NR_UE_rrc_inst[ctxt_pP->module_id].cell_group_config->spCellConfig = cellGroupConfig->spCellConfig; + NR_UE_rrc_inst[ctxt_pP->module_id].cell_group_config->spCellConfig = cellGroupConfig->spCellConfig; else - NR_UE_rrc_inst[ctxt_pP->module_id].cell_group_config = cellGroupConfig; + NR_UE_rrc_inst[ctxt_pP->module_id].cell_group_config = cellGroupConfig; } LOG_I(RRC,"Sending CellGroupConfig to MAC\n"); nr_rrc_mac_config_req_ue(ctxt_pP->module_id,0,0,NULL,NULL,cellGroupConfig,NULL); @@ -1354,6 +1352,7 @@ static void rrc_ue_generate_RRCSetupComplete( for (int i=0;irnti; rrc_data_req_ue( ctxt_pP, diff --git a/openair2/SIMULATION/NR_RRC/itti_sim.c b/openair2/SIMULATION/NR_RRC/itti_sim.c index 01b3fbfa35..f982c5362d 100644 --- a/openair2/SIMULATION/NR_RRC/itti_sim.c +++ b/openair2/SIMULATION/NR_RRC/itti_sim.c @@ -404,7 +404,7 @@ int create_tasks_nrue(uint32_t ue_nb) { return -1; } - printf("create TASK_NAS_NRUE\n"); + LOG_I(NR_RRC,"create TASK_NAS_NRUE\n"); if (itti_create_task (TASK_NAS_NRUE, nas_nrue_task, NULL) < 0) { LOG_E(NR_RRC, "Create task for NAS UE failed\n"); return -1; diff --git a/openair3/NAS/NR_UE/nr_nas_msg_sim.c b/openair3/NAS/NR_UE/nr_nas_msg_sim.c index d862091776..55e21390bf 100644 --- a/openair3/NAS/NR_UE/nr_nas_msg_sim.c +++ b/openair3/NAS/NR_UE/nr_nas_msg_sim.c @@ -47,7 +47,6 @@ uint8_t k[16] = {0x51, 0x22, 0x25, 0x02, 0x14,0xc3, 0x3e, 0x72, 0x3a, 0x5d, 0xd5 // OPC: 981d464c7c52eb6e5036234984ad0bcf const uint8_t opc[16] = {0x98, 0x1d, 0x46, 0x4c,0x7c,0x52,0xeb, 0x6e, 0x50, 0x36, 0x23, 0x49, 0x84, 0xad, 0x0b, 0xcf};*/ - char netName[] = "5G:mnc099.mcc208.3gppnetwork.org"; char imsi[] = "2089900007487"; //"208990100001100"; // USIM_API_K: fe c8 6b a6 eb 70 7e d0 89 05 75 7b 1b b4 4b 8f diff --git a/openair3/ocp-gtpu/gtp_itf.cpp b/openair3/ocp-gtpu/gtp_itf.cpp index 985a4d7eb3..34a5dceeeb 100644 --- a/openair3/ocp-gtpu/gtp_itf.cpp +++ b/openair3/ocp-gtpu/gtp_itf.cpp @@ -121,10 +121,8 @@ static int gtpv1uCreateAndSendMsg(int h, uint32_t peerIp, uint16_t peerPort, te msgHdr->version=1; msgHdr->msgType=GTP_GPDU; msgHdr->msgLength=htons(msgLen); - if ( seqNumFlag || extHdrFlag || npduNumFlag) msgHdr->msgLength+=4; - msgHdr->teid=htonl(teid); if(seqNumFlag || extHdrFlag || npduNumFlag) { @@ -814,8 +812,8 @@ void gtpv1uReceiver(int h) { void *ocp_gtpv1uTask(void *args) { while(1) { /* Trying to fetch a message from the message queue. - If the queue is empty, this function will block till a - message is sent to the task. + If the queue is empty, this function will block till a + message is sent to the task. */ MessageDef *message_p = NULL; itti_receive_msg(OCP_GTPV1_U, &message_p); From 1bad80c692e213cea6998a35086e3e497302bb72 Mon Sep 17 00:00:00 2001 From: Roberto Louro Magueta Date: Thu, 13 May 2021 16:46:19 +0200 Subject: [PATCH 357/579] Revert "Update gnb.band78.tm1.106PRB.usrpn300.conf to a valid pair..." This reverts commit ee6b77023f20f42daaf6bb145f5b3f3ef1add9c1 --- ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf b/ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf index c061d4d35e..4afbfdcda0 100644 --- a/ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf +++ b/ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf @@ -34,10 +34,10 @@ gNBs = # downlinkConfigCommon #frequencyInfoDL # this is 3600 MHz + 43 PRBs@30kHz SCS (same as initial BWP) - absoluteFrequencySSB = 641280; + absoluteFrequencySSB = 641032; dl_frequencyBand = 78; # this is 3600 MHz - dl_absoluteFrequencyPointA = 640008; + dl_absoluteFrequencyPointA = 640000; #scs-SpecificCarrierList dl_offstToCarrier = 0; # subcarrierSpacing From a6069f7481a9a70867c16e7154c0016f11cdeab5 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Thu, 13 May 2021 16:30:21 +0100 Subject: [PATCH 358/579] Fix dl_carrier assignment --- executables/softmodem-common.h | 2 +- openair1/PHY/NR_UE_TRANSPORT/nr_ue_rf_helpers.c | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/executables/softmodem-common.h b/executables/softmodem-common.h index 7ab1f926c6..e4b4f11c0d 100644 --- a/executables/softmodem-common.h +++ b/executables/softmodem-common.h @@ -136,7 +136,7 @@ extern int usrp_tx_thread; {"wait-for-sync", NULL, PARAMFLAG_BOOL, iptr:&WAIT_FOR_SYNC, defintval:0, TYPE_INT, 0}, \ {"single-thread-enable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, iptr:&SINGLE_THREAD_FLAG, defintval:0, TYPE_INT, 0}, \ {"C" , CONFIG_HLP_DLF, 0, u64ptr:&(downlink_frequency[0][0]), defuintval:3619200000, TYPE_UINT64, 0}, \ - {"CO" , CONFIG_HLP_ULF, 0, iptr:&(uplink_frequency_offset[0][0]), defintval:3619200000, TYPE_INT, 0}, \ + {"CO" , CONFIG_HLP_ULF, 0, iptr:&(uplink_frequency_offset[0][0]), defintval:0, TYPE_INT, 0}, \ {"a" , CONFIG_HLP_CHOFF, 0, iptr:&CHAIN_OFFSET, defintval:0, TYPE_INT, 0}, \ {"d" , CONFIG_HLP_SOFTS, PARAMFLAG_BOOL, uptr:(uint32_t *)&do_forms, defintval:0, TYPE_INT8, 0}, \ {"q" , CONFIG_HLP_STMON, PARAMFLAG_BOOL, iptr:&opp_enabled, defintval:0, TYPE_INT, 0}, \ diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_ue_rf_helpers.c b/openair1/PHY/NR_UE_TRANSPORT/nr_ue_rf_helpers.c index 76fc5f298f..6cf782d9d8 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_ue_rf_helpers.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_ue_rf_helpers.c @@ -31,13 +31,15 @@ #include "PHY/defs_nr_UE.h" #include "PHY/phy_extern_nr_ue.h" #include "nr_transport_proto_ue.h" +#include "executables/softmodem-common.h" void nr_get_carrier_frequencies(NR_DL_FRAME_PARMS *fp, uint64_t *dl_carrier, uint64_t *ul_carrier){ - if (downlink_frequency[0][0]) - *dl_carrier = downlink_frequency[0][0]; - else + if (get_softmodem_params()->phy_test==1 || get_softmodem_params()->do_ra==1 || !downlink_frequency[0][0]) { *dl_carrier = fp->dl_CarrierFreq; + } else { + *dl_carrier = downlink_frequency[0][0]; + } if (uplink_frequency_offset[0][0]) *ul_carrier = *dl_carrier + uplink_frequency_offset[0][0]; From b62e8d9c1fbb735e64c73ceeda58ddba979a53fc Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Thu, 13 May 2021 16:31:42 +0100 Subject: [PATCH 359/579] Change LOG level --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 6c6ab78880..bf444f7037 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -657,7 +657,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, } if (ul_cqi < 128) UE_info->UE_sched_ctrl[UE_id].pusch_consecutive_dtx_cnt++; if (UE_info->UE_sched_ctrl[UE_id].pusch_consecutive_dtx_cnt >= pusch_failure_thres) { - LOG_I(NR_MAC,"Detected UL Failure on PUSCH, stopping scheduling\n"); + LOG_D(NR_MAC,"Detected UL Failure on PUSCH, stopping scheduling\n"); UE_info->UE_sched_ctrl[UE_id].ul_failure = 1; } } From e15231264a22f3cb3a6eb4e4f1141f0b5374abb0 Mon Sep 17 00:00:00 2001 From: Francesco Mani Date: Fri, 14 May 2021 07:10:40 +0000 Subject: [PATCH 360/579] Update description of function nr_acknack_scheduling --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c index 5892ab8e8e..f53f79ba49 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c @@ -1085,6 +1085,10 @@ void handle_nr_uci_pucch_2_3_4(module_id_t mod_id, // function to update pucch scheduling parameters in UE list when a USS DL is scheduled +// this function returns an index to NR_sched_pucch structure +// currently this structure contains PUCCH0 at index 0 and PUCCH2 at index 1 +// if the function returns -1 it was not possible to schedule acknack +// when current pucch is ready to be scheduled nr_fill_nfapi_pucch is called int nr_acknack_scheduling(int mod_id, int UE_id, frame_t frame, From b5bbfdade3d0df8bdb39dacf5b6195d1693ef3af Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Sun, 16 May 2021 23:57:35 +0200 Subject: [PATCH 361/579] after merge, remain compile errors --- cmake_targets/CMakeLists.txt | 81 ++++++++++-------- cmake_targets/build_oai | 1 + cmake_targets/tools/make_asn1c_includes.sh | 18 ++-- common/ran_context.h | 2 +- common/utils/telnetsrv/telnetsrv.h | 1 + executables/nr-ru.c | 5 +- executables/nr-uesoftmodem.c | 2 +- executables/nr-uesoftmodem.h | 3 - openair1/PHY/TOOLS/lte_phy_scope.h | 1 + openair1/PHY/TOOLS/nr_phy_scope.c | 2 +- openair2/COMMON/mac_rrc_primitives.h | 6 +- openair2/COMMON/tasks_def.h | 89 -------------------- openair2/ENB_APP/flexran_agent_ran_api.c | 2 +- openair2/F1AP/f1ap_du_rrc_message_transfer.c | 2 +- openair2/GNB_APP/gnb_config.h | 2 +- openair2/RRC/LTE/L2_interface.c | 8 +- openair2/RRC/LTE/rrc_UE.c | 6 +- openair2/RRC/LTE/rrc_defs.h | 6 +- openair2/RRC/LTE/rrc_eNB.c | 62 +++++++------- openair2/RRC/LTE/rrc_eNB_GTPV1U.c | 4 +- openair2/RRC/LTE/rrc_eNB_S1AP.c | 2 +- openair2/RRC/NR_UE/rrc_UE.c | 10 +-- openair2/SIMULATION/NR_RRC/itti_sim.c | 14 ++- openair3/GTPV1-U/gtpv1u_eNB.c | 6 +- 24 files changed, 138 insertions(+), 197 deletions(-) delete mode 100644 openair2/COMMON/tasks_def.h diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index fe03a9c68d..3a18a26ec1 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -454,7 +454,7 @@ set (RRC_FULL_DIR ${asn1_generated_dir}/RRC_${RRC_ASN1_VERSION}) # Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make if (${RU} STREQUAL 0) - execute_process(COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${RRC_FULL_DIR}" "${RRC_GRAMMAR}" "LTE_" + execute_process(COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "LTE_" " " "${RRC_FULL_DIR}" "${RRC_GRAMMAR}" RESULT_VARIABLE ret) endif (${RU} STREQUAL 0) @@ -464,7 +464,7 @@ endif (NOT ${ret} STREQUAL 0) file(GLOB rrc_source ${RRC_FULL_DIR}/*.c) add_custom_target ( rrc_flag ALL - ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${RRC_FULL_DIR}" "${RRC_GRAMMAR}" "LTE_" + ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "LTE_" " " "${RRC_FULL_DIR}" "${RRC_GRAMMAR}" DEPENDS ${RRC_GRAMMAR} ) @@ -486,8 +486,9 @@ set (NR_RRC_FULL_DIR ${asn1_generated_dir}/RRC_${NR_RRC_ASN1_VERSION}) # Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make if (${RU} STREQUAL 0) - execute_process(COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${NR_RRC_FULL_DIR}" "${NR_RRC_GRAMMAR}" "NR_" "-findirect-choice" - RESULT_VARIABLE ret) + execute_process( + COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "NR_" "-findirect-choice" "${NR_RRC_FULL_DIR}" "${NR_RRC_GRAMMAR}" + RESULT_VARIABLE ret) if (NOT ${ret} STREQUAL 0) message(FATAL_ERROR "${ret}: error") endif () @@ -497,7 +498,7 @@ endif (${RU} STREQUAL 0) add_custom_target ( nr_rrc_flag ALL - ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${NR_RRC_FULL_DIR}" "${NR_RRC_GRAMMAR}" "NR_" "-findirect-choice" + ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "NR_" "-findirect-choice" "${NR_RRC_FULL_DIR}" "${NR_RRC_GRAMMAR}" DEPENDS ${NR_RRC_GRAMMAR} ) @@ -523,8 +524,9 @@ set(S1AP_C_DIR ${asn1_generated_dir}/S1AP_${S1AP_RELEASE}) # Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make if (${RU} STREQUAL 0) - execute_process(COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${S1AP_C_DIR}" "${S1AP_ASN_DIR}/${S1AP_ASN_FILES}" "S1AP_" -fno-include-deps - RESULT_VARIABLE ret) + execute_process( + COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "S1AP_" -fno-include-deps "${S1AP_C_DIR}" "${S1AP_ASN_DIR}/${S1AP_ASN_FILES}" + RESULT_VARIABLE ret) if (NOT ${ret} STREQUAL 0) message(FATAL_ERROR "${ret}: error") endif (NOT ${ret} STREQUAL 0) @@ -533,7 +535,7 @@ endif (${RU} STREQUAL 0) add_custom_target ( s1ap_flag ALL - ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${S1AP_C_DIR}" "${S1AP_ASN_DIR}/${S1AP_ASN_FILES}" "S1AP_" -fno-include-deps + ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "S1AP_" -fno-include-deps "${S1AP_C_DIR}" "${S1AP_ASN_DIR}/${S1AP_ASN_FILES}" DEPENDS "${S1AP_ASN_DIR}/${S1AP_ASN_FILES}" ) @@ -578,8 +580,9 @@ set(NGAP_ASN_DIR ${NGAP_DIR}/MESSAGES/ASN1/ASN1_files) set(NGAP_C_DIR ${asn1_generated_dir}/NGAP_${NGAP_RELEASE}) # Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make -execute_process(COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${NGAP_C_DIR}" "${NGAP_ASN_DIR}/${NGAP_ASN_FILES}" "NGAP_" -fno-include-deps -findirect-choice - RESULT_VARIABLE ret) +execute_process( + COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "NGAP_" "-fno-include-deps -findirect-choice" "${NGAP_C_DIR}" "${NGAP_ASN_DIR}/${NGAP_ASN_FILES}" + RESULT_VARIABLE ret) if (NOT ${ret} STREQUAL 0) message(FATAL_ERROR "${ret}: error") endif (NOT ${ret} STREQUAL 0) @@ -587,7 +590,7 @@ file(GLOB NGAP_source ${NGAP_C_DIR}/*.c) add_custom_target ( ngap_flag ALL - ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${NGAP_C_DIR}" "${NGAP_ASN_DIR}/${NGAP_ASN_FILES}" "NGAP_" -fno-include-deps + ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "NGAP_" "-fno-include-deps -findirect-choice" "${NGAP_C_DIR}" "${NGAP_ASN_DIR}/${NGAP_ASN_FILES}" DEPENDS "${NGAP_ASN_DIR}/${NGAP_ASN_FILES}" ) @@ -645,8 +648,9 @@ set(M2AP_C_DIR ${asn1_generated_dir}/M2AP_${M2AP_RELEASE}) # Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make if (${RU} STREQUAL 0) - execute_process(COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${M2AP_C_DIR}" "${M2AP_ASN_DIR}/${M2AP_ASN_FILES}" "M2AP_" -fno-include-deps -DEMIT_ASN_DEBUG=1 - RESULT_VARIABLE ret) + execute_process( + COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "M2AP_" "-fno-include-deps -DEMIT_ASN_DEBUG=1" "${M2AP_C_DIR}" "${M2AP_ASN_DIR}/${M2AP_ASN_FILES}" + RESULT_VARIABLE ret) if (NOT ${ret} STREQUAL 0) message(FATAL_ERROR "${ret}: error") endif (NOT ${ret} STREQUAL 0) @@ -656,7 +660,7 @@ file(GLOB M2AP_source ${M2AP_C_DIR}/*.c) add_custom_target ( m2_flag ALL - COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${M2AP_C_DIR}" "${M2AP_ASN_DIR}/${M2AP_ASN_FILES}" "M2AP_" -fno-include-deps + COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "M2AP_" "-fno-include-deps -DEMIT_ASN_DEBUG=1" "${M2AP_C_DIR}" "${M2AP_ASN_DIR}/${M2AP_ASN_FILES}" DEPENDS ${M2AP_ASN_DIR}/${M2AP_ASN_FILES} ) @@ -717,8 +721,9 @@ set(M3AP_C_DIR ${asn1_generated_dir}/M3AP_${M3AP_RELEASE}) # Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make if (${RU} STREQUAL 0) - execute_process(COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${M3AP_C_DIR}" "${M3AP_ASN_DIR}/${M3AP_ASN_FILES}" "M3AP_" -fno-include-deps - RESULT_VARIABLE ret) + execute_process( + COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "M3AP_" -fno-include-deps "${M3AP_C_DIR}" "${M3AP_ASN_DIR}/${M3AP_ASN_FILES}" + RESULT_VARIABLE ret) if (NOT ${ret} STREQUAL 0) message(FATAL_ERROR "${ret}: error") endif (NOT ${ret} STREQUAL 0) @@ -728,7 +733,7 @@ file(GLOB M3AP_source ${M3AP_C_DIR}/*.c) add_custom_target ( m3_flag ALL - COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${M3AP_C_DIR}" "${M3AP_ASN_DIR}/${M3AP_ASN_FILES}" "M3AP_" -fno-include-deps + COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "M3AP_" -fno-include-deps "${M3AP_C_DIR}" "${M3AP_ASN_DIR}/${M3AP_ASN_FILES}" DEPENDS ${M3AP_ASN_DIR}/${M3AP_ASN_FILES} ) @@ -773,8 +778,9 @@ set(X2AP_ASN_DIR ${X2AP_DIR}/MESSAGES/ASN1/${X2AP_RELEASE}) set(X2AP_C_DIR ${asn1_generated_dir}/X2AP_${X2AP_RELEASE}) # Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make if (${RU} STREQUAL 0) - execute_process(COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${X2AP_C_DIR}" "${X2AP_ASN_DIR}/${X2AP_ASN_FILES}" "X2AP_" -fno-include-deps - RESULT_VARIABLE ret) + execute_process( + COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "X2AP_" -fno-include-deps "${X2AP_C_DIR}" "${X2AP_ASN_DIR}/${X2AP_ASN_FILES}" + RESULT_VARIABLE ret) if (NOT ${ret} STREQUAL 0) message(FATAL_ERROR "${ret}: error") endif (NOT ${ret} STREQUAL 0) @@ -784,7 +790,7 @@ file(GLOB X2AP_source ${X2AP_C_DIR}/*.c) add_custom_target ( x2_flag ALL - COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${X2AP_C_DIR}" "${X2AP_ASN_DIR}/${X2AP_ASN_FILES}" "X2AP_" -fno-include-deps + COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "X2AP_" -fno-include-deps "${X2AP_C_DIR}" "${X2AP_ASN_DIR}/${X2AP_ASN_FILES}" DEPENDS ${X2AP_ASN_DIR}/${X2AP_ASN_FILES} ) @@ -833,20 +839,25 @@ set(F1AP_ASN_FILES if (${RU} STREQUAL 0) set(F1AP_ASN_GENERATED_C_DIR ${asn1_generated_dir}/F1AP_${ASN1RELDIR}) message("calling ASN1C_PREFIX=F1AP_ asn1c -gen-PER -no-gen-OER -fcompound-names -no-gen-example -findirect-choice -fno-include-deps -D ${F1AP_ASN_GENERATED_C_DIR} ${F1AP_ASN_FILES}") - execute_process(COMMAND mkdir -p ${F1AP_ASN_GENERATED_C_DIR} - COMMAND env "ASN1C_PREFIX=F1AP_" asn1c -gen-PER -no-gen-OER -fcompound-names -no-gen-example -findirect-choice -fno-include-deps -D ${F1AP_ASN_GENERATED_C_DIR} ${F1AP_ASN_FILES} - RESULT_VARIABLE ret - OUTPUT_QUIET - ERROR_QUIET) + execute_process( + COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "F1AP_" "-findirect-choice -fno-include-deps" ${F1AP_ASN_GENERATED_C_DIR} ${F1AP_ASN_FILES} + RESULT_VARIABLE ret + ) if (NOT ${ret} STREQUAL 0) message(FATAL_ERROR "asn1c: error") endif (NOT ${ret} STREQUAL 0) - -file(GLOB F1AP_ASN_GENERATED_C_FILES ${F1AP_ASN_GENERATED_C_DIR}/*.c) -add_library(F1AP_LIB - ${F1AP_ASN_GENERATED_C_FILES} -) + + add_custom_target ( + f1_flag ALL + COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "F1AP_" "-findirect-choice -fno-include-deps" ${F1AP_ASN_GENERATED_C_DIR} ${F1AP_ASN_FILES} + DEPENDS ${F1AP_ASN_FILES} + ) + file(GLOB F1AP_ASN_GENERATED_C_FILES ${F1AP_ASN_GENERATED_C_DIR}/*.c) + add_library(F1AP_LIB + ${F1AP_ASN_GENERATED_C_FILES} + ) + add_dependencies (F1AP_LIB f1_flag) include_directories ("${F1AP_ASN_GENERATED_C_DIR}") include_directories ("${F1AP_DIR}") @@ -858,7 +869,6 @@ add_library(F1AP endif (${RU} STREQUAL 0) - # Hardware dependant options ################################### add_list1_option(NB_ANTENNAS_RX "4" "Number of antennas in reception" "1" "2" "4") @@ -866,8 +876,6 @@ add_list1_option(NB_ANTENNAS_TX "4" "Number of antennas in transmission" "1" "2" add_list2_option(RF_BOARD "EXMIMO" "RF head type" "None" "OAI_USRP" "OAI_BLADERF" "OAI_LMSSDR" "OAI_SIMU") - - add_list2_option(TRANSP_PRO "None" "Transport protocol type" "None" "ETHERNET") #NOKIA config enhancement set (CONFIG_ROOTDIR @@ -3212,7 +3220,7 @@ target_link_libraries (nr-uesoftmodem NFAPI_USER_LIB MISC_NFAPI_NR_LIB S1AP_LIB S1AP_ENB ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${ATLAS_LIBRARIES} NFAPI_USER_LIB S1AP_LIB S1AP_ENB - ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${ATLAS_LIBRARIES} LIB_5GNAS_GNB + ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${ATLAS_LIBRARIES} LIB_5GNAS_GNB ${NAS_SIM_LIB} -Wl,--end-group z dl) target_link_libraries (nr-uesoftmodem ${LIBXML2_LIBRARIES}) @@ -3650,6 +3658,9 @@ add_executable(nr-ittisim ${OPENAIR_DIR}/common/utils/system.c ${OPENAIR_DIR}/common/utils/nr/nr_common.c ${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c + ${OPENAIR_DIR}/common/utils/lte/ue_power.c + ${OPENAIR_DIR}/common/utils/lte/prach_utils.c + ${OPENAIR2_DIR}/ENB_APP/flexran_agent_ran_api_to_fix.c ${XFORMSINTERFACE_SOURCE} ${T_SOURCE} ${CONFIG_SOURCES} @@ -3662,7 +3673,7 @@ target_link_libraries (nr-ittisim ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7 ${MSC_LIB} ${RAL_LIB} ${NAS_SIM_LIB} RRC_LIB NR_RRC_LIB NGAP_LIB NGAP_GNB S1AP_LIB S1AP_ENB L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB X2AP_LIB X2AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB ${PROTO_AGENT_LIB} ${FSPT_MSG_LIB} - PHY_NR_UE SCHED_NR_UE_LIB NR_L2_UE + PHY_NR_UE SCHED_NR_UE_LIB NR_L2_UE -Wl,--end-group z dl) target_link_libraries (nr-ittisim ${LIBXML2_LIBRARIES}) diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai index 07aa150921..279b9489e0 100755 --- a/cmake_targets/build_oai +++ b/cmake_targets/build_oai @@ -70,6 +70,7 @@ NR="False" ITTI_SIM="False" SANITIZE_ADDRESS="False" OPTIONAL_LIBRARIES="telnetsrv enbscope uescope nrscope msc" +RU=0 trap handle_ctrl_c INT function print_help() { diff --git a/cmake_targets/tools/make_asn1c_includes.sh b/cmake_targets/tools/make_asn1c_includes.sh index 1598678a73..00c88d6497 100755 --- a/cmake_targets/tools/make_asn1c_includes.sh +++ b/cmake_targets/tools/make_asn1c_includes.sh @@ -1,13 +1,19 @@ #!/bin/bash -GENERATED_FULL_DIR=$1 -shift -ASN1_SOURCE_DIR=$1 -shift export ASN1C_PREFIX=$1 shift -options=$* +options=$1 +shift +GENERATED_FULL_DIR=$1 +shift +ASN1_SOURCE_DIR=$* done_flag="$GENERATED_FULL_DIR"/done -if [ "$done_flag" -ot $ASN1_SOURCE_DIR ] ; then +rebuild=0 +for f in $ASN1_SOURCE_DIR ; do + if [ "$done_flag" -ot "$f" ] ; then + rebuild=1 + fi +done +if [ $rebuild -eq 1 ] ; then rm -f "$GENERATED_FULL_DIR"/${ASN1C_PREFIX}*.c "$GENERATED_FULL_DIR"/${ASN1C_PREFIX}*.h mkdir -p "$GENERATED_FULL_DIR" asn1c -pdu=all -fcompound-names -gen-PER -no-gen-OER -no-gen-example $options -D $GENERATED_FULL_DIR $ASN1_SOURCE_DIR |& egrep -v "^Copied|^Compiled" | sort -u diff --git a/common/ran_context.h b/common/ran_context.h index 5a18225329..db981e9182 100644 --- a/common/ran_context.h +++ b/common/ran_context.h @@ -122,5 +122,5 @@ typedef struct { pthread_cond_t ru_cond; } RAN_CONTEXT_t; - +extern RAN_CONTEXT_t RC; #endif diff --git a/common/utils/telnetsrv/telnetsrv.h b/common/utils/telnetsrv/telnetsrv.h index b66641d5c8..59655501d3 100644 --- a/common/utils/telnetsrv/telnetsrv.h +++ b/common/utils/telnetsrv/telnetsrv.h @@ -31,6 +31,7 @@ #ifndef TELNETSRV_H #define TELNETSRV_H +#include #define TELNETSRV_MODNAME "telnetsrv" #define TELNET_PORT 9090 diff --git a/executables/nr-ru.c b/executables/nr-ru.c index c068bef775..0a042ba9b1 100644 --- a/executables/nr-ru.c +++ b/executables/nr-ru.c @@ -112,6 +112,7 @@ void configure_ru(int idx, void *arg); void configure_rru(int idx, void *arg); int attach_rru(RU_t *ru); int connect_rau(RU_t *ru); +static void NRRCconfig_RU(void); uint16_t sf_ahead; uint16_t slot_ahead; @@ -1837,7 +1838,7 @@ void init_NR_RU(char *rf_config_file) pthread_cond_init(&RC.ru_cond,NULL); // read in configuration file) printf("configuring RU from file\n"); - RCconfig_RU(); + NRRCconfig_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()); LOG_D(PHY,"Process RUs RC.nb_RU:%d\n",RC.nb_RU); @@ -1912,7 +1913,7 @@ void stop_RU(int nb_ru) /* --------------------------------------------------------*/ /* from here function to use configuration module */ -void RCconfig_RU(void) +static void NRRCconfig_RU(void) { int i = 0, j = 0; paramdef_t RUParams[] = RUPARAMS_DESC; diff --git a/executables/nr-uesoftmodem.c b/executables/nr-uesoftmodem.c index 13a191a18a..83b3d433aa 100644 --- a/executables/nr-uesoftmodem.c +++ b/executables/nr-uesoftmodem.c @@ -82,7 +82,6 @@ unsigned short config_frames[4] = {2,9,11,13}; // current status is that every UE has a DL scope for a SINGLE eNB (eNB_id=0) #include "PHY/TOOLS/phy_scope_interface.h" #include "PHY/TOOLS/nr_phy_scope.h" -#define NRUE_MAIN #include #include "executables/softmodem-common.h" #include "executables/thread-common.h" @@ -90,6 +89,7 @@ unsigned short config_frames[4] = {2,9,11,13}; extern const char *duplex_mode[]; msc_interface_t msc_interface; THREAD_STRUCT thread_struct; +nrUE_params_t nrUE_params; // Thread variables pthread_cond_t nfapi_sync_cond; diff --git a/executables/nr-uesoftmodem.h b/executables/nr-uesoftmodem.h index 5902c8cca8..5c082b7bbb 100644 --- a/executables/nr-uesoftmodem.h +++ b/executables/nr-uesoftmodem.h @@ -72,9 +72,6 @@ extern uint64_t get_nrUE_optmask(void); extern uint64_t set_nrUE_optmask(uint64_t bitmask); extern nrUE_params_t *get_nrUE_params(void); -#ifdef NRUE_MAIN -nrUE_params_t nrUE_params; -#endif // In nr-ue.c extern int setup_nr_ue_buffers(PHY_VARS_NR_UE **phy_vars_ue, openair0_config_t *openair0_cfg); diff --git a/openair1/PHY/TOOLS/lte_phy_scope.h b/openair1/PHY/TOOLS/lte_phy_scope.h index af9858ebad..1873fabea0 100644 --- a/openair1/PHY/TOOLS/lte_phy_scope.h +++ b/openair1/PHY/TOOLS/lte_phy_scope.h @@ -28,6 +28,7 @@ #include "PHY/defs_eNB.h" #include "PHY/defs_UE.h" #include "PHY/impl_defs_top.h" +#include /* Forms and Objects */ diff --git a/openair1/PHY/TOOLS/nr_phy_scope.c b/openair1/PHY/TOOLS/nr_phy_scope.c index 90a252dc98..c840149507 100644 --- a/openair1/PHY/TOOLS/nr_phy_scope.c +++ b/openair1/PHY/TOOLS/nr_phy_scope.c @@ -240,7 +240,7 @@ static void genericWaterFall (OAIgraph_t *graph, scopeSample_t *values, const in for (int pix=0; pixw; pix++) { scopeSample_t *end=values+(pix+1)*samplesPerPixel; end-=2; - AssertFatal(end <= values+datasize,"diff : %u", end-values+datasize); + AssertFatal(end <= values+datasize,"diff : %ld", end-values+datasize); double val=0; for (scopeSample_t *s=values+(pix)*samplesPerPixel; diff --git a/openair2/COMMON/mac_rrc_primitives.h b/openair2/COMMON/mac_rrc_primitives.h index 4a0a6027bc..5a45f2f196 100644 --- a/openair2/COMMON/mac_rrc_primitives.h +++ b/openair2/COMMON/mac_rrc_primitives.h @@ -189,7 +189,7 @@ typedef struct MEAS_REQ_TABLE_ENTRY { MAC_MEAS_REQ Mac_meas_req; unsigned int Last_report_frame; unsigned int Next_check_frame; - uint8_t Status; + uint8_t StatusMeas; uint8_t Meas_req_status; uint8_t Rx_activity; //uint8_t Meas_Direction;//??? @@ -269,7 +269,7 @@ typedef struct { char Wideband_sinr; uint8_t Forg_fact; unsigned short Rep_interval; - uint8_t Status; + uint8_t StatusMeas; unsigned int Last_report_frame; unsigned int Next_check_frame; uint8_t Active; @@ -299,7 +299,7 @@ typedef struct { unsigned short Rep_interval; unsigned int Last_report_frame; unsigned int Next_check_frame; - uint8_t Status; //IDLE,NEED_rADIO_CONFIG, RADIO_CONFIG_TX, RADIO_CONFIG_ok + uint8_t StatusMeas; //IDLE,NEED_rADIO_CONFIG, RADIO_CONFIG_TX, RADIO_CONFIG_ok uint8_t Active; } __attribute__ ((__packed__)) DEFAULT_CH_MEAS; #define DEFAULT_eNB_MEAS_SIZE sizeof(DEFAULT_eNB_MEAS) diff --git a/openair2/COMMON/tasks_def.h b/openair2/COMMON/tasks_def.h deleted file mode 100644 index 33b6d5f9d4..0000000000 --- a/openair2/COMMON/tasks_def.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * 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 - */ - -// This task is mandatory and must always be placed in first position -TASK_DEF(TASK_TIMER, TASK_PRIORITY_MAX, 10) - -// Other possible tasks in the process - -// Common tasks: - -/// Bearers Manager task -TASK_DEF(TASK_BM, TASK_PRIORITY_MED, 200) - -// eNodeB tasks and sub-tasks: - -/// Radio Resource Control task -TASK_DEF(TASK_RRC_ENB, TASK_PRIORITY_MED, 200) - -// Define here for now -TASK_DEF(TASK_RRC_ENB_NB_IoT, TASK_PRIORITY_MED, 200) - -TASK_DEF(TASK_RRC_GNB, TASK_PRIORITY_MED, 200) - -/// S1ap task -/// RAL task for ENB -TASK_DEF(TASK_RAL_ENB, TASK_PRIORITY_MED, 200) - -// UDP TASK -TASK_DEF(TASK_UDP, TASK_PRIORITY_MED, 1000) -// GTP_V1U task -TASK_DEF(TASK_GTPV1_U, TASK_PRIORITY_MED, 1000) -TASK_DEF(TASK_S1AP, TASK_PRIORITY_MED, 200) -TASK_DEF(TASK_CU_F1, TASK_PRIORITY_MED, 200) -TASK_DEF(TASK_DU_F1, TASK_PRIORITY_MED, 200) -/// M3ap task, acts as both source and target -TASK_DEF(TASK_M3AP, TASK_PRIORITY_MED, 200) -/// M3ap task, acts as both source and target -TASK_DEF(TASK_M3AP_MME, TASK_PRIORITY_MED, 200) -/// M3ap task, acts as both source and target -TASK_DEF(TASK_M3AP_MCE, TASK_PRIORITY_MED, 200) -/// M2ap task, acts as both source and target -TASK_DEF(TASK_M2AP_MCE, TASK_PRIORITY_MED, 200) -TASK_DEF(TASK_M2AP_ENB, TASK_PRIORITY_MED, 200) -/// X2ap task, acts as both source and target -TASK_DEF(TASK_X2AP, TASK_PRIORITY_MED, 200) -/// Sctp task (Used by both S1AP and X2AP) -TASK_DEF(TASK_SCTP, TASK_PRIORITY_MED, 200) -/// eNB APP task -TASK_DEF(TASK_ENB_APP, TASK_PRIORITY_MED, 200) -/// gNB APP task -TASK_DEF(TASK_GNB_APP, TASK_PRIORITY_MED, 200) -/// eNB Agent task -TASK_DEF(TASK_FLEXRAN_AGENT, TASK_PRIORITY_MED, 200) -TASK_DEF(TASK_PROTO_AGENT, TASK_PRIORITY_MED, 200) -// UE tasks and sub-tasks: - -/// Radio Resource Control task -TASK_DEF(TASK_RRC_UE, TASK_PRIORITY_MED, 200) -TASK_DEF(TASK_RRC_NRUE, TASK_PRIORITY_MED, 200) -/// Non Access Stratum task -TASK_DEF(TASK_NAS_UE, TASK_PRIORITY_MED, 200) -TASK_DEF(TASK_RAL_UE, TASK_PRIORITY_MED, 200) - -//MESSAGE GENERATOR TASK -TASK_DEF(TASK_MSC, TASK_PRIORITY_MED, 200) - -#ifdef ITTI_SIM -TASK_DEF(TASK_RRC_GNB_SIM, TASK_PRIORITY_MED, 200) -TASK_DEF(TASK_RRC_UE_SIM, TASK_PRIORITY_MED, 200) -#endif - diff --git a/openair2/ENB_APP/flexran_agent_ran_api.c b/openair2/ENB_APP/flexran_agent_ran_api.c index 070ce1be03..68d1f3311f 100644 --- a/openair2/ENB_APP/flexran_agent_ran_api.c +++ b/openair2/ENB_APP/flexran_agent_ran_api.c @@ -888,7 +888,7 @@ uint8_t flexran_get_rrc_status(mid_t mod_id, rnti_t rnti) { if (!ue_context_p) return RRC_INACTIVE; - return ue_context_p->ue_context.Status; + return ue_context_p->ue_context.StatusRrc; } uint64_t flexran_get_ue_aggregated_max_bitrate_dl(mid_t mod_id, mid_t ue_id) { diff --git a/openair2/F1AP/f1ap_du_rrc_message_transfer.c b/openair2/F1AP/f1ap_du_rrc_message_transfer.c index 74840439e0..1d6e729ab2 100644 --- a/openair2/F1AP/f1ap_du_rrc_message_transfer.c +++ b/openair2/F1AP/f1ap_du_rrc_message_transfer.c @@ -721,7 +721,7 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(instance_t instance, } else { LOG_I(F1AP, "Processing RRCConnectionSetupComplete UE %x\n", rnti); - ue_context_p->ue_context.Status = RRC_CONNECTED; + ue_context_p->ue_context.StatusRrc = RRC_CONNECTED; } break; diff --git a/openair2/GNB_APP/gnb_config.h b/openair2/GNB_APP/gnb_config.h index 0d965171ef..4f305b1f4d 100644 --- a/openair2/GNB_APP/gnb_config.h +++ b/openair2/GNB_APP/gnb_config.h @@ -92,7 +92,7 @@ typedef struct ru_config_s { uint8_t if_compress; } ru_config_t; */ -extern void RCconfig_RU(void); +extern void NRRCconfig_RU(void); extern void RCconfig_nr_flexran(void); extern void RCconfig_NR_L1(void); extern void RCconfig_nr_macrlc(void); diff --git a/openair2/RRC/LTE/L2_interface.c b/openair2/RRC/LTE/L2_interface.c index d9682b466f..0bc63237b3 100644 --- a/openair2/RRC/LTE/L2_interface.c +++ b/openair2/RRC/LTE/L2_interface.c @@ -349,12 +349,12 @@ mac_rrc_data_ind( ue_context_p = rrc_eNB_get_ue_context(RC.rrc[ctxt.module_id],rntiP); if(ue_context_p) { - if (ue_context_p->ue_context.Status != RRC_RECONFIGURED) { - LOG_E(RRC,"[eNB %d] Received C-RNTI ,but UE %x status(%d) not RRC_RECONFIGURED\n",module_idP,rntiP,ue_context_p->ue_context.Status); + if (ue_context_p->ue_context.StatusRrc != RRC_RECONFIGURED) { + LOG_E(RRC,"[eNB %d] Received C-RNTI ,but UE %x status(%d) not RRC_RECONFIGURED\n",module_idP,rntiP,ue_context_p->ue_context.StatusRrc); return (-1); } rrc_eNB_generate_defaultRRCConnectionReconfiguration(&ctxt,ue_context_p,0); - ue_context_p->ue_context.Status = RRC_RECONFIGURED; + ue_context_p->ue_context.StatusRrc = RRC_RECONFIGURED; } } @@ -376,7 +376,7 @@ mac_eNB_get_rrc_status( ue_context_p = rrc_eNB_get_ue_context(RC.rrc[Mod_idP], rntiP); if (ue_context_p != NULL) { - return(ue_context_p->ue_context.Status); + return(ue_context_p->ue_context.StatusRrc); } else { return RRC_INACTIVE; } diff --git a/openair2/RRC/LTE/rrc_UE.c b/openair2/RRC/LTE/rrc_UE.c index e3d28d8a0f..b2230df623 100644 --- a/openair2/RRC/LTE/rrc_UE.c +++ b/openair2/RRC/LTE/rrc_UE.c @@ -492,7 +492,7 @@ rrc_t310_expiration( UE_rrc_inst[ctxt_pP->module_id].Srb2[eNB_index].Srb_info.Srb_id, Rlc_info_um); UE_rrc_inst[ctxt_pP->module_id].Srb2[eNB_index].Active = 0; - UE_rrc_inst[ctxt_pP->module_id].Srb2[eNB_index].Status = IDLE; + UE_rrc_inst[ctxt_pP->module_id].Srb2[eNB_index].StatusSrb = IDLE; UE_rrc_inst[ctxt_pP->module_id].Srb2[eNB_index].Next_check_frame = 0; } } else { // Restablishment procedure @@ -671,7 +671,7 @@ rrc_ue_establish_srb1( { // add descriptor from RRC PDU UE_rrc_inst[ue_mod_idP].Srb1[eNB_index].Active = 1; - UE_rrc_inst[ue_mod_idP].Srb1[eNB_index].Status = RADIO_CONFIG_OK;//RADIO CFG + UE_rrc_inst[ue_mod_idP].Srb1[eNB_index].StatusSrb = RADIO_CONFIG_OK;//RADIO CFG UE_rrc_inst[ue_mod_idP].Srb1[eNB_index].Srb_info.Srb_id = 1; // copy default configuration for now // memcpy(&UE_rrc_inst[ue_mod_idP].Srb1[eNB_index].Srb_info.Lchan_desc[0],&DCCH_LCHAN_DESC,LCHAN_DESC_SIZE); @@ -695,7 +695,7 @@ rrc_ue_establish_srb2( { // add descriptor from RRC PDU UE_rrc_inst[ue_mod_idP].Srb2[eNB_index].Active = 1; - UE_rrc_inst[ue_mod_idP].Srb2[eNB_index].Status = RADIO_CONFIG_OK;//RADIO CFG + UE_rrc_inst[ue_mod_idP].Srb2[eNB_index].StatusSrb = RADIO_CONFIG_OK;//RADIO CFG UE_rrc_inst[ue_mod_idP].Srb2[eNB_index].Srb_info.Srb_id = 2; // copy default configuration for now // memcpy(&UE_rrc_inst[ue_mod_idP].Srb2[eNB_index].Srb_info.Lchan_desc[0],&DCCH_LCHAN_DESC,LCHAN_DESC_SIZE); diff --git a/openair2/RRC/LTE/rrc_defs.h b/openair2/RRC/LTE/rrc_defs.h index 6615541662..1c02c3de46 100644 --- a/openair2/RRC/LTE/rrc_defs.h +++ b/openair2/RRC/LTE/rrc_defs.h @@ -519,13 +519,13 @@ typedef struct RB_INFO_TABLE_ENTRY_s { RB_INFO Rb_info; uint8_t Active; uint32_t Next_check_frame; - uint8_t Status; + uint8_t StatusRb; } RB_INFO_TABLE_ENTRY; typedef struct SRB_INFO_TABLE_ENTRY_s { SRB_INFO Srb_info; uint8_t Active; - uint8_t Status; + uint8_t StatusSrb; uint32_t Next_check_frame; } SRB_INFO_TABLE_ENTRY; @@ -599,7 +599,7 @@ typedef struct eNB_RRC_UE_s { LTE_CipheringAlgorithm_r12_t ciphering_algorithm; e_LTE_SecurityAlgorithmConfig__integrityProtAlgorithm integrity_algorithm; - uint8_t Status; // RRC status, type enum UE_STATE_t + uint8_t StatusRrc; // RRC status, type enum UE_STATE_t rnti_t rnti; int gnb_rnti; //RNTI of the UE at the gNB if in ENDC connection int gnb_x2_assoc_id; diff --git a/openair2/RRC/LTE/rrc_eNB.c b/openair2/RRC/LTE/rrc_eNB.c index 52c3495948..f86b0ddbae 100644 --- a/openair2/RRC/LTE/rrc_eNB.c +++ b/openair2/RRC/LTE/rrc_eNB.c @@ -1202,7 +1202,7 @@ rrc_eNB_process_RRCConnectionSetupComplete( LOG_I(RRC, PROTOCOL_RRC_CTXT_UE_FMT" [RAPROC] Logical Channel UL-DCCH, " "processing LTE_RRCConnectionSetupComplete from UE (SRB1 Active)\n", PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP)); ue_context_pP->ue_context.Srb1.Active = 1; - ue_context_pP->ue_context.Status = RRC_CONNECTED; + ue_context_pP->ue_context.StatusRrc = RRC_CONNECTED; ue_context_pP->ue_context.ue_rrc_inactivity_timer = 1; // set rrc inactivity timer when UE goes into RRC_CONNECTED T(T_ENB_RRC_CONNECTION_SETUP_COMPLETE, T_INT(ctxt_pP->module_id), @@ -1578,7 +1578,7 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete( int measurements_enabled; uint8_t next_xid = rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id); int ret = 0; - ue_context_pP->ue_context.Status = RRC_CONNECTED; + ue_context_pP->ue_context.StatusRrc = RRC_CONNECTED; ue_context_pP->ue_context.ue_rrc_inactivity_timer = 1; // set rrc inactivity when UE goes into RRC_CONNECTED ue_context_pP->ue_context.reestablishment_xid = next_xid; SRB_configList2 = &ue_context_pP->ue_context.SRB_configList2[xid]; @@ -2208,7 +2208,7 @@ rrc_eNB_generate_RRCConnectionRelease( #if 0 if(ue_context_pP != NULL) { - if(ue_context_pP->ue_context.Status == RRC_NR_NSA) { + if(ue_context_pP->ue_context.StatusRrc == RRC_NR_NSA) { //rrc_eNB_generate_SgNBReleaseRequest(ctxt_pP,ue_context_pP); } } @@ -4586,9 +4586,9 @@ rrc_eNB_process_MeasurementReport( /* TODO: improve NR triggering */ if (measResults2->measId == 7) { - if ((ue_context_pP->ue_context.Status != RRC_NR_NSA) && (ue_context_pP->ue_context.Status != RRC_NR_NSA_RECONFIGURED)) { + if ((ue_context_pP->ue_context.StatusRrc != RRC_NR_NSA) && (ue_context_pP->ue_context.StatusRrc != RRC_NR_NSA_RECONFIGURED)) { MessageDef *msg; - ue_context_pP->ue_context.Status = RRC_NR_NSA; + ue_context_pP->ue_context.StatusRrc = RRC_NR_NSA; ue_context_pP->ue_context.gnb_rnti = -1; // set when receiving X2AP_ENDC_SGNB_ADDITION_REQ_ACK ue_context_pP->ue_context.gnb_x2_assoc_id = -1; // set when receiving X2AP_ENDC_SGNB_ADDITION_REQ_ACK @@ -4724,12 +4724,12 @@ rrc_eNB_process_MeasurementReport( LOG_D(RRC, "A3 event is triggered...\n"); /* if the UE is not in handover mode, start handover procedure */ - if (ue_context_pP->ue_context.Status != RRC_HO_EXECUTION) { + if (ue_context_pP->ue_context.StatusRrc != RRC_HO_EXECUTION) { MessageDef *msg; LOG_I(RRC, "Send HO preparation message at frame %d and subframe %d \n", ctxt_pP->frame, ctxt_pP->subframe); /* HO info struct may not be needed anymore */ ue_context_pP->ue_context.handover_info = CALLOC(1, sizeof(*(ue_context_pP->ue_context.handover_info))); - ue_context_pP->ue_context.Status = RRC_HO_EXECUTION; + ue_context_pP->ue_context.StatusRrc = RRC_HO_EXECUTION; ue_context_pP->ue_context.handover_info->state = HO_REQUEST; /* HO Preparation message */ msg = itti_alloc_new_message(TASK_RRC_ENB, 0, X2AP_HANDOVER_REQ); @@ -4861,7 +4861,7 @@ void rrc_eNB_process_handoverPreparationInformation(int mod_id, x2ap_handover_re RB_INSERT(rrc_ue_tree_s, &RC.rrc[mod_id]->rrc_ue_head, ue_context_target_p); LOG_D(RRC, "eNB %d: Created new UE context uid %u\n", mod_id, ue_context_target_p->local_uid); ue_context_target_p->ue_context.handover_info = CALLOC(1, sizeof(*(ue_context_target_p->ue_context.handover_info))); - //ue_context_target_p->ue_context.Status = RRC_HO_EXECUTION; + //ue_context_target_p->ue_context.StatusRrc = RRC_HO_EXECUTION; //ue_context_target_p->ue_context.handover_info->state = HO_ACK; ue_context_target_p->ue_context.handover_info->x2_id = m->x2_id; ue_context_target_p->ue_context.handover_info->assoc_id = m->target_assoc_id; @@ -4936,7 +4936,7 @@ void rrc_eNB_process_handoverPreparationInformation(int mod_id, x2ap_handover_re } rrc_eNB_process_X2AP_TUNNEL_SETUP_REQ(mod_id, ue_context_target_p); - ue_context_target_p->ue_context.Status = RRC_HO_EXECUTION; + ue_context_target_p->ue_context.StatusRrc = RRC_HO_EXECUTION; ue_context_target_p->ue_context.handover_info->state = HO_ACK; } @@ -5051,7 +5051,7 @@ flexran_rrc_eNB_trigger_handover (int mod_id, LOG_D(RRC, "Handover is triggered by FlexRAN controller...\n"); /* if the UE is not in handover mode, start handover procedure */ - if (ue_context_pP->ue_context.Status != RRC_HO_EXECUTION) { + if (ue_context_pP->ue_context.StatusRrc != RRC_HO_EXECUTION) { MessageDef *msg; LOG_I(RRC, "Send HO preparation message at frame %d and subframe %d \n", ctxt_pP->frame, ctxt_pP->subframe); /* Check memory leakage for handover info */ @@ -5059,7 +5059,7 @@ flexran_rrc_eNB_trigger_handover (int mod_id, //free(ue_context_pP->ue_context.handover_info); //} ue_context_pP->ue_context.handover_info = CALLOC(1, sizeof(*(ue_context_pP->ue_context.handover_info))); - ue_context_pP->ue_context.Status = RRC_HO_EXECUTION; + ue_context_pP->ue_context.StatusRrc = RRC_HO_EXECUTION; ue_context_pP->ue_context.handover_info->state = HO_REQUEST; /* HO Preparation message */ msg = itti_alloc_new_message(TASK_RRC_ENB, 0, X2AP_HANDOVER_REQ); @@ -5120,7 +5120,7 @@ check_handovers( RB_FOREACH(ue_context_p, rrc_ue_tree_s, &(RC.rrc[ctxt_pP->module_id]->rrc_ue_head)) { ctxt_pP->rnti = ue_context_p->ue_id_rnti; - if (ue_context_p->ue_context.Status == RRC_HO_EXECUTION && ue_context_p->ue_context.handover_info != NULL) { + if (ue_context_p->ue_context.StatusRrc == RRC_HO_EXECUTION && ue_context_p->ue_context.handover_info != NULL) { /* in the source, UE in HO_PREPARE mode */ if (ue_context_p->ue_context.handover_info->state == HO_PREPARE) { LOG_D(RRC, @@ -5171,7 +5171,7 @@ check_handovers( } } - if (ue_context_p->ue_context.Status == RRC_RECONFIGURED + if (ue_context_p->ue_context.StatusRrc == RRC_RECONFIGURED && ue_context_p->ue_context.handover_info != NULL && ue_context_p->ue_context.handover_info->forwarding_state == FORWARDING_NO_EMPTY ) { MessageDef *msg_p; @@ -5237,7 +5237,7 @@ check_handovers( ue_context_p->ue_context.handover_info->forwarding_state = FORWARDING_EMPTY; } - if( ue_context_p->ue_context.Status == RRC_RECONFIGURED && + if( ue_context_p->ue_context.StatusRrc == RRC_RECONFIGURED && ue_context_p->ue_context.handover_info != NULL && ue_context_p->ue_context.handover_info->forwarding_state == FORWARDING_EMPTY && ue_context_p->ue_context.handover_info->endmark_state == ENDMARK_NO_EMPTY && @@ -7228,7 +7228,7 @@ rrc_eNB_decode_ccch( } //c-plane not end - if((ue_context_p->ue_context.Status != RRC_RECONFIGURED) && (ue_context_p->ue_context.reestablishment_cause == LTE_ReestablishmentCause_spare1)) { + if((ue_context_p->ue_context.StatusRrc != RRC_RECONFIGURED) && (ue_context_p->ue_context.reestablishment_cause == LTE_ReestablishmentCause_spare1)) { LOG_E(RRC, PROTOCOL_RRC_CTXT_UE_FMT" LTE_RRCConnectionReestablishmentRequest (UE %x c-plane is not end), let's reject the UE\n", PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),c_rnti); @@ -7240,9 +7240,9 @@ rrc_eNB_decode_ccch( LOG_E(RRC, PROTOCOL_RRC_CTXT_UE_FMT" RRRCConnectionReconfigurationComplete(Previous) don't receive, delete the Previous UE,\nprevious Status %d, new Status RRC_RECONFIGURED\n", PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP), - ue_context_p->ue_context.Status + ue_context_p->ue_context.StatusRrc ); - ue_context_p->ue_context.Status = RRC_RECONFIGURED; + ue_context_p->ue_context.StatusRrc = RRC_RECONFIGURED; protocol_ctxt_t ctxt_old_p; PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt_old_p, ctxt_pP->instance, @@ -8014,7 +8014,7 @@ rrc_eNB_decode_dcch( int flexran_agent_handover = 0; if (EPC_MODE_ENABLED) { - if (ue_context_p->ue_context.Status == RRC_RECONFIGURED) { + if (ue_context_p->ue_context.StatusRrc == RRC_RECONFIGURED) { dedicated_DRB = 1; LOG_I(RRC, PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_RECONFIGURED (dedicated DRB, xid %ld)\n", @@ -8039,7 +8039,7 @@ rrc_eNB_decode_dcch( dedicated_DRB = 2; RC.mac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].crnti_reconfigurationcomplete_flag = 0; } - } else if (ue_context_p->ue_context.Status == RRC_HO_EXECUTION) { + } else if (ue_context_p->ue_context.StatusRrc == RRC_HO_EXECUTION) { int16_t UE_id = find_UE_id(ctxt_pP->module_id, ctxt_pP->rnti); if(UE_id == -1) { @@ -8053,7 +8053,7 @@ rrc_eNB_decode_dcch( RC.rrc[ctxt_pP->module_id]->Nb_ue++; dedicated_DRB = 3; RC.mac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].crnti_reconfigurationcomplete_flag = 0; - ue_context_p->ue_context.Status = RRC_RECONFIGURED; + ue_context_p->ue_context.StatusRrc = RRC_RECONFIGURED; if(ue_context_p->ue_context.handover_info) { ue_context_p->ue_context.handover_info->state = HO_CONFIGURED; @@ -8062,7 +8062,7 @@ rrc_eNB_decode_dcch( LOG_I(RRC, PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_HO_EXECUTION (xid %ld)\n", PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.rrc_TransactionIdentifier); - } else if(ue_context_p->ue_context.Status == RRC_NR_NSA) { + } else if(ue_context_p->ue_context.StatusRrc == RRC_NR_NSA) { //Looking for a condition to trigger S1AP E-RAB-Modification-indication, based on the reception of RRCConnectionReconfigurationComplete //including NR specific elements. if(ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.criticalExtensions.choice.rrcConnectionReconfigurationComplete_r8. @@ -8081,7 +8081,7 @@ rrc_eNB_decode_dcch( nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension ->scg_ConfigResponseNR_r15!=NULL) { dedicated_DRB = -1; /* put a value that does not run anything below */ - ue_context_p->ue_context.Status = RRC_NR_NSA_RECONFIGURED; + ue_context_p->ue_context.StatusRrc = RRC_NR_NSA_RECONFIGURED; /*Trigger E-RAB Modification Indication */ rrc_eNB_send_E_RAB_Modification_Indication(ctxt_pP, ue_context_p); /* send reconfiguration complete to gNB */ @@ -8095,7 +8095,7 @@ rrc_eNB_decode_dcch( } } else { dedicated_DRB = 0; - ue_context_p->ue_context.Status = RRC_RECONFIGURED; + ue_context_p->ue_context.StatusRrc = RRC_RECONFIGURED; LOG_I(RRC, PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_RECONFIGURED (default DRB, xid %ld)\n", PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.rrc_TransactionIdentifier); @@ -8104,7 +8104,7 @@ rrc_eNB_decode_dcch( ue_context_p->ue_context.reestablishment_xid = -1; } else { dedicated_DRB = 1; - ue_context_p->ue_context.Status = RRC_RECONFIGURED; + ue_context_p->ue_context.StatusRrc = RRC_RECONFIGURED; LOG_I(RRC, PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_RECONFIGURED (dedicated DRB, xid %ld)\n", PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.rrc_TransactionIdentifier); @@ -9272,8 +9272,8 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) { } /* remove UE from gNB if UE is in NSA mode */ - if (ue_to_be_removed[cur_ue]->ue_context.Status == RRC_NR_NSA || - ue_to_be_removed[cur_ue]->ue_context.Status == RRC_NR_NSA_RECONFIGURED) { + if (ue_to_be_removed[cur_ue]->ue_context.StatusRrc == RRC_NR_NSA || + ue_to_be_removed[cur_ue]->ue_context.StatusRrc == RRC_NR_NSA_RECONFIGURED) { MessageDef *message_p; message_p = itti_alloc_new_message(TASK_RRC_ENB, 0, X2AP_ENDC_SGNB_RELEASE_REQUEST); X2AP_ENDC_SGNB_RELEASE_REQUEST(message_p).rnti = ue_to_be_removed[cur_ue]->ue_context.gnb_rnti; @@ -9281,7 +9281,7 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) { X2AP_ENDC_SGNB_RELEASE_REQUEST(message_p).cause = X2AP_CAUSE_RADIO_CONNECTION_WITH_UE_LOST; itti_send_msg_to_task(TASK_X2AP, ctxt_pP->module_id, message_p); /* set state to RRC_NR_NSA_DELETED to avoid sending X2AP_ENDC_SGNB_RELEASE_REQUEST again later */ - ue_to_be_removed[cur_ue]->ue_context.Status = RRC_NR_NSA_DELETED; + ue_to_be_removed[cur_ue]->ue_context.StatusRrc = RRC_NR_NSA_DELETED; } rrc_eNB_free_UE(ctxt_pP->module_id, ue_to_be_removed[cur_ue]); @@ -9451,13 +9451,13 @@ void rrc_eNB_process_ENDC_DC_prep_timeout(module_id_t module_id, x2ap_ENDC_dc_pr return; } - if (ue_context->ue_context.Status != RRC_NR_NSA) { + if (ue_context->ue_context.StatusRrc != RRC_NR_NSA) { LOG_E(RRC, "receiving DC prep timeout for UE rnti %d not in state RRC_NR_NSA\n", m->rnti); return; } LOG_I(RRC, "DC prep timeout for UE rnti %d, put back to RRC_RECONFIGURED mode\n", m->rnti); - ue_context->ue_context.Status = RRC_RECONFIGURED; + ue_context->ue_context.StatusRrc = RRC_RECONFIGURED; } void rrc_eNB_process_ENDC_sgNB_release_required(module_id_t module_id, x2ap_ENDC_sgnb_release_required_t *m) @@ -9478,7 +9478,7 @@ void rrc_eNB_process_ENDC_sgNB_release_required(module_id_t module_id, x2ap_ENDC ue_context->ue_context.ue_release_timer_thres_rrc = 100; ue_context->ue_context.ue_release_timer_rrc = 1; - ue_context->ue_context.Status = RRC_NR_NSA_DELETED; + ue_context->ue_context.StatusRrc = RRC_NR_NSA_DELETED; PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, module_id, /* TODO: should be 'instance' */ @@ -9744,7 +9744,7 @@ void *rrc_enb_process_itti_msg(void *notUsed) { if (X2AP_HANDOVER_CANCEL(msg_p).cause == X2AP_T_RELOC_PREP_TIMEOUT) { /* for prep timeout, simply return to normal state */ /* TODO: be sure that it's correct to set Status to RRC_RECONFIGURED */ - ue_context_p->ue_context.Status = RRC_RECONFIGURED; + ue_context_p->ue_context.StatusRrc = RRC_RECONFIGURED; /* TODO: be sure free is enough here (check memory leaks) */ free(ue_context_p->ue_context.handover_info); ue_context_p->ue_context.handover_info = NULL; diff --git a/openair2/RRC/LTE/rrc_eNB_GTPV1U.c b/openair2/RRC/LTE/rrc_eNB_GTPV1U.c index 64f84ddc4d..a6af6a4163 100644 --- a/openair2/RRC/LTE/rrc_eNB_GTPV1U.c +++ b/openair2/RRC/LTE/rrc_eNB_GTPV1U.c @@ -188,7 +188,7 @@ boolean_t gtpv_data_req_new ( struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[ctxt->module_id], ctxt->rnti); if(ue_context_p == NULL || ue_context_p->ue_context.handover_info == NULL || - ue_context_p->ue_context.Status != RRC_HO_EXECUTION) { + ue_context_p->ue_context.StatusRrc != RRC_HO_EXECUTION) { LOG_E(RRC,"incoming GTP-U for X2 in non HO context\n"); return false; } @@ -215,7 +215,7 @@ boolean_t gtpv_data_req_new ( /* target enb */ // We have 2*2=4 cases (data or end marker) * (from source, from EPC) - if (ue_context_p->ue_context.Status == RRC_RECONFIGURED) { + if (ue_context_p->ue_context.StatusRrc == RRC_RECONFIGURED) { // It should come from remote eNB // case end marker by EPC is not possible ? if (task==TASK_END_MARKER) { diff --git a/openair2/RRC/LTE/rrc_eNB_S1AP.c b/openair2/RRC/LTE/rrc_eNB_S1AP.c index f64a109f75..1cb575d1dd 100644 --- a/openair2/RRC/LTE/rrc_eNB_S1AP.c +++ b/openair2/RRC/LTE/rrc_eNB_S1AP.c @@ -1072,7 +1072,7 @@ int rrc_eNB_process_S1AP_INITIAL_CONTEXT_SETUP_REQ(MessageDef *msg_p, const char ue_context_p->ue_context.nr_security.kgNB); // in case, send the S1SP initial context response if it is not sent with the attach complete message - if (ue_context_p->ue_context.Status == RRC_RECONFIGURED) { + if (ue_context_p->ue_context.StatusRrc == RRC_RECONFIGURED) { LOG_I(RRC, "Sending rrc_eNB_send_S1AP_INITIAL_CONTEXT_SETUP_RESP, cause %ld\n", ue_context_p->ue_context.reestablishment_cause); //if(ue_context_p->ue_context.reestablishment_cause == ReestablishmentCause_spare1){} rrc_eNB_send_S1AP_INITIAL_CONTEXT_SETUP_RESP(&ctxt,ue_context_p); diff --git a/openair2/RRC/NR_UE/rrc_UE.c b/openair2/RRC/NR_UE/rrc_UE.c index 191933a80b..86948230a5 100644 --- a/openair2/RRC/NR_UE/rrc_UE.c +++ b/openair2/RRC/NR_UE/rrc_UE.c @@ -1736,13 +1736,13 @@ void nr_rrc_ue_generate_RRCSetupRequest(module_id_t module_id, const uint8_t gNB MessageDef *message_p; uint8_t *message_buffer; message_buffer = itti_malloc (TASK_RRC_NRUE,TASK_RRC_GNB_SIM, - NR_UE_rrc_inst[ctxt_pP->module_id].Srb0[gNB_index].Tx_buffer.payload_size); - memcpy (message_buffer, (uint8_t*)NR_UE_rrc_inst[ctxt_pP->module_id].Srb0[gNB_index].Tx_buffer.Payload, - NR_UE_rrc_inst[ctxt_pP->module_id].Srb0[gNB_index].Tx_buffer.payload_size); + NR_UE_rrc_inst[module_id].Srb0[gNB_index].Tx_buffer.payload_size); + memcpy (message_buffer, (uint8_t*)NR_UE_rrc_inst[module_id].Srb0[gNB_index].Tx_buffer.Payload, + NR_UE_rrc_inst[module_id].Srb0[gNB_index].Tx_buffer.payload_size); message_p = itti_alloc_new_message (TASK_RRC_NRUE, 0, UE_RRC_CCCH_DATA_IND); GNB_RRC_CCCH_DATA_IND (message_p).sdu = message_buffer; - GNB_RRC_CCCH_DATA_IND (message_p).size = NR_UE_rrc_inst[ctxt_pP->module_id].Srb0[gNB_index].Tx_buffer.payload_size; - itti_send_msg_to_task (TASK_RRC_GNB_SIM, ctxt_pP->instance, message_p); + GNB_RRC_CCCH_DATA_IND (message_p).size = NR_UE_rrc_inst[module_id].Srb0[gNB_index].Tx_buffer.payload_size; + itti_send_msg_to_task (TASK_RRC_GNB_SIM, gNB_index, message_p); #endif } } diff --git a/openair2/SIMULATION/NR_RRC/itti_sim.c b/openair2/SIMULATION/NR_RRC/itti_sim.c index d583346a89..82906b45f8 100644 --- a/openair2/SIMULATION/NR_RRC/itti_sim.c +++ b/openair2/SIMULATION/NR_RRC/itti_sim.c @@ -81,12 +81,13 @@ unsigned short config_frames[4] = {2,9,11,13}; #include "RRC/NR_UE/rrc_proto.h" #include "RRC/NR_UE/rrc_vars.h" #include "openair3/NAS/UE/nas_ue_task.h" +#include +#include pthread_cond_t nfapi_sync_cond; pthread_mutex_t nfapi_sync_mutex; int nfapi_sync_var=-1; //!< protected by mutex \ref nfapi_sync_mutex -uint8_t nfapi_mode = 0; // Default to monolithic mode uint32_t timing_advance = 0; uint64_t num_missed_slots=0; @@ -94,7 +95,18 @@ int split73=0; void sendFs6Ul(PHY_VARS_eNB *eNB, int UE_id, int harq_pid, int segmentID, int16_t *data, int dataLen, int r_offset) { AssertFatal(false, "Must not be called in this context\n"); } +void sendFs6Ulharq(enum pckType type, int UEid, PHY_VARS_eNB *eNB, LTE_eNB_UCI *uci, int frame, int subframe, uint8_t *harq_ack, uint8_t tdd_mapping_mode, uint16_t tdd_multiplexing_mask, uint16_t rnti, int32_t stat) { + AssertFatal(false, "Must not be called in this context\n"); +} +nrUE_params_t nrUE_params; +nrUE_params_t *get_nrUE_params(void) { + return &nrUE_params; +} + +void processSlotTX(void *arg) {} + +THREAD_STRUCT thread_struct; pthread_cond_t sync_cond; pthread_mutex_t sync_mutex; int sync_var=-1; //!< protected by mutex \ref sync_mutex. diff --git a/openair3/GTPV1-U/gtpv1u_eNB.c b/openair3/GTPV1-U/gtpv1u_eNB.c index e1ea5cb08e..0fe2741d7b 100644 --- a/openair3/GTPV1-U/gtpv1u_eNB.c +++ b/openair3/GTPV1-U/gtpv1u_eNB.c @@ -281,7 +281,7 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req( (ue_context_p->ue_context.handover_info->state < HO_FORWARDING_COMPLETE)) { if(msgType == NW_GTP_END_MARKER) { /* in the source enb, UE in RRC_HO_EXECUTION mode */ - if (ue_context_p->ue_context.Status == RRC_HO_EXECUTION && ue_context_p->ue_context.handover_info->state == HO_COMPLETE) { + if (ue_context_p->ue_context.StatusRrc == RRC_HO_EXECUTION && ue_context_p->ue_context.handover_info->state == HO_COMPLETE) { /* set handover state */ //ue_context_p->ue_context.handover_info->state = HO_END_MARKER; MessageDef *msg; @@ -299,10 +299,10 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req( } } - if (ue_context_p->ue_context.Status == RRC_HO_EXECUTION || ue_context_p->ue_context.Status == RRC_RECONFIGURED) { + if (ue_context_p->ue_context.StatusRrc == RRC_HO_EXECUTION || ue_context_p->ue_context.StatusRrc == RRC_RECONFIGURED) { int msgsrc = gtpv1u_eNB_get_msgsource(ue_context_p, teid); LOG_D(GTPU,"UE INFO.ueStatus %d, handover state %d, forwarding state %d, from %s. message type %s\n", - ue_context_p->ue_context.Status, + ue_context_p->ue_context.StatusRrc, ue_context_p->ue_context.handover_info->state, ue_context_p->ue_context.handover_info->forwarding_state, msgsrc == GTPV1U_MSG_FROM_SOURCE_ENB?"Source eNB":"EPC", From fd3a45de82ed1e43df19bea1d36b62f40a6b66e3 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Mon, 17 May 2021 12:01:32 +0100 Subject: [PATCH 362/579] Fix build issues --- cmake_targets/CMakeLists.txt | 30 ++++++++++--------- executables/nr-gnb.c | 2 +- executables/nr-ru.c | 6 ++-- executables/nr-softmodem.c | 2 ++ .../PHY/NR_TRANSPORT/nr_ulsch_demodulation.c | 25 +++++++++------- openair1/PHY/NR_TRANSPORT/pucch_rx.c | 2 +- openair1/SCHED_NR/phy_procedures_nr_gNB.c | 12 ++++---- openair2/F1AP/f1ap_du_rrc_message_transfer.c | 2 +- openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c | 2 +- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 5 ++-- 10 files changed, 48 insertions(+), 40 deletions(-) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index ea14da19db..568a645617 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -531,24 +531,24 @@ if (${RU} STREQUAL 0) file(GLOB S1AP_source ${S1AP_C_DIR}/*.c) endif (${RU} STREQUAL 0) - add_custom_target ( - s1ap_flag ALL - ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${S1AP_C_DIR}" "${S1AP_ASN_DIR}/${S1AP_ASN_FILES}" "S1AP_" -fno-include-deps - DEPENDS "${S1AP_ASN_DIR}/${S1AP_ASN_FILES}" +add_custom_target ( + s1ap_flag ALL + ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${S1AP_C_DIR}" "${S1AP_ASN_DIR}/${S1AP_ASN_FILES}" "S1AP_" -fno-include-deps + DEPENDS "${S1AP_ASN_DIR}/${S1AP_ASN_FILES}" +) + +add_library(S1AP_LIB + ${S1AP_source} + ${S1AP_DIR}/s1ap_common.c ) +add_dependencies(S1AP_LIB rrc_flag s1ap_flag) - add_library(S1AP_LIB - ${S1AP_source} - ${S1AP_DIR}/s1ap_common.c - ) - add_dependencies(S1AP_LIB rrc_flag s1ap_flag) - - include_directories ("${S1AP_C_DIR}") - include_directories ("${S1AP_DIR}") +include_directories ("${S1AP_C_DIR}") +include_directories ("${S1AP_DIR}") add_library(S1AP_ENB - ${S1AP_DIR}/s1ap_eNB.c - ${S1AP_DIR}/s1ap_eNB_context_management_procedures.c + ${S1AP_DIR}/s1ap_eNB.c + ${S1AP_DIR}/s1ap_eNB_context_management_procedures.c ${S1AP_DIR}/s1ap_eNB_decoder.c ${S1AP_DIR}/s1ap_eNB_encoder.c ${S1AP_DIR}/s1ap_eNB_handlers.c @@ -813,6 +813,7 @@ add_dependencies(X2AP_ENB X2AP_LIB rrc_flag x2_flag) # F1AP ############## +set (F1AP_RELEASE R16) add_list1_option(F1AP_RELEASE R16 "F1AP ASN.1 grammar version" R16) set(F1AP_DIR ${OPENAIR2_DIR}/F1AP) if (${F1AP_RELEASE} STREQUAL "R16") @@ -1020,6 +1021,7 @@ add_boolean_option(PRE_SCD_THREAD False "enable UE_EXPANSION w add_boolean_option(UESIM_EXPANSION False "enable UESIM_EXPANSION with max 256 UE") add_boolean_option(ITTI_SIM False "enable itti simulator") add_boolean_option(RFSIM_NAS False "enable rfsim nas") + ######################## # Include order ########################## diff --git a/executables/nr-gnb.c b/executables/nr-gnb.c index ee3feca464..ea675eba9e 100644 --- a/executables/nr-gnb.c +++ b/executables/nr-gnb.c @@ -359,7 +359,7 @@ void *nrL1_stats_thread(void *param) { AssertFatal(fd!=NULL,"Cannot open ngL1_stats.log\n"); dump_nr_I0_stats(fd,gNB); dump_pusch_stats(fd,gNB); - // dump_uci_stats(fd,eNB,eNB->proc.L1_proc_tx.frame_tx); + // nr_dump_uci_stats(fd,eNB,eNB->proc.L1_proc_tx.frame_tx); fclose(fd); } return(NULL); diff --git a/executables/nr-ru.c b/executables/nr-ru.c index 98e81e1594..45599b841b 100644 --- a/executables/nr-ru.c +++ b/executables/nr-ru.c @@ -63,7 +63,7 @@ #include "common/utils/LOG/log.h" #include "common/utils/LOG/vcd_signal_dumper.h" -#include "enb_config.h" +#include "gnb_config.h" #include #ifdef SMBV @@ -1981,7 +1981,7 @@ void RCconfig_RU(void) LOG_I(PHY,"Setting time source to internal\n"); RC.ru[j]->openair0_cfg.time_source = internal; } - + if (strcmp(*(RUParamList.paramarray[j][RU_LOCAL_RF_IDX].strptr), "yes") == 0) { if ( !(config_isparamset(RUParamList.paramarray[j],RU_LOCAL_IF_NAME_IDX)) ) { RC.ru[j]->if_south = LOCAL_RF; @@ -2051,7 +2051,7 @@ void RCconfig_RU(void) RC.ru[j]->if_south = REMOTE_IF4p5; RC.ru[j]->function = NGFI_RAU_IF4p5; RC.ru[j]->eth_params.transp_preference = ETH_RAW_IF4p5_MODE; - } + } } /* strcmp(local_rf, "yes") != 0 */ RC.ru[j]->nb_tx = *(RUParamList.paramarray[j][RU_NB_TX_IDX].uptr); diff --git a/executables/nr-softmodem.c b/executables/nr-softmodem.c index 89857e98bb..b803b6e79e 100644 --- a/executables/nr-softmodem.c +++ b/executables/nr-softmodem.c @@ -164,6 +164,8 @@ uint32_t timing_advance = 0; uint64_t num_missed_slots=0; // counter for the number of missed slots #include +#include + int split73=0; void sendFs6Ul(PHY_VARS_eNB *eNB, int UE_id, int harq_pid, int segmentID, int16_t *data, int dataLen, int r_offset) { AssertFatal(false, "Must not be called in this context\n"); diff --git a/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c b/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c index c7cc301341..7a4555d254 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c +++ b/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c @@ -1184,7 +1184,7 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB, start_meas(&gNB->ulsch_channel_estimation_stats); for(uint8_t symbol = rel15_ul->start_symbol_index; symbol < (rel15_ul->start_symbol_index + rel15_ul->nr_of_symbols); symbol++) { uint8_t dmrs_symbol_flag = (rel15_ul->ul_dmrs_symb_pos >> symbol) & 0x01; - LOG_D(PHY,"symbol %d, dmrs_symbol_flag :%d\n", symbol, dmrs_symbol_flag); + LOG_D(PHY, "symbol %d, dmrs_symbol_flag :%d\n", symbol, dmrs_symbol_flag); if (dmrs_symbol_flag == 1) { if (gNB->pusch_vars[ulsch_id]->dmrs_symbol == INVALID_VALUE) gNB->pusch_vars[ulsch_id]->dmrs_symbol = symbol; @@ -1199,17 +1199,20 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB, nr_gnb_measurements(gNB, ulsch_id, harq_pid, symbol); - for (aarx = 0; aarx < frame_parms->nb_antennas_rx; aarx++) { - if (symbol == rel15_ul->start_symbol_index) { - gNB->pusch_vars[ulsch_id]->ulsch_power[aarx]=0; - gNB->pusch_vars[ulsch_id]->ulsch_noise_power[aarx]=0; + for (aarx = 0; aarx < frame_parms->nb_antennas_rx; aarx++) { + if (symbol == rel15_ul->start_symbol_index) { + gNB->pusch_vars[ulsch_id]->ulsch_power[aarx] = 0; + gNB->pusch_vars[ulsch_id]->ulsch_noise_power[aarx] = 0; + } + gNB->pusch_vars[ulsch_id]->ulsch_power[aarx] += signal_energy_nodc( + &gNB->pusch_vars[ulsch_id]->ul_ch_estimates[aarx][symbol * frame_parms->ofdm_symbol_size], + rel15_ul->rb_size * 12); + for (int rb = 0; rb < rel15_ul->rb_size; rb++) { + gNB->pusch_vars[ulsch_id]->ulsch_noise_power[aarx] += + gNB->measurements.n0_subband_power[aarx][rel15_ul->bwp_start + rel15_ul->rb_start + rb] / + rel15_ul->rb_size; + } } - gNB->pusch_vars[ulsch_id]->ulsch_power[aarx] += signal_energy_nodc(&gNB->pusch_vars[ulsch_id]->ul_ch_estimates[aarx][symbol*frame_parms->ofdm_symbol_size], - rel15_ul->rb_size*12); - for (int rb=0;rbrb_size;rb++) { - gNB->pusch_vars[ulsch_id]->ulsch_noise_power[aarx]+=gNB->measurements.n0_subband_power[aarx][rel15_ul->bwp_start+rel15_ul->rb_start+rb]/rel15_ul->rb_size; - } - } } stop_meas(&gNB->ulsch_channel_estimation_stats); diff --git a/openair1/PHY/NR_TRANSPORT/pucch_rx.c b/openair1/PHY/NR_TRANSPORT/pucch_rx.c index 911a858d12..425a24a388 100644 --- a/openair1/PHY/NR_TRANSPORT/pucch_rx.c +++ b/openair1/PHY/NR_TRANSPORT/pucch_rx.c @@ -1642,7 +1642,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB, } } -void dump_uci_stats(FILE *fd,PHY_VARS_gNB *gNB,int frame) { +void nr_dump_uci_stats(FILE *fd,PHY_VARS_gNB *gNB,int frame) { int strpos=0; char output[16384]; diff --git a/openair1/SCHED_NR/phy_procedures_nr_gNB.c b/openair1/SCHED_NR/phy_procedures_nr_gNB.c index 6993532928..cd59a0d92b 100644 --- a/openair1/SCHED_NR/phy_procedures_nr_gNB.c +++ b/openair1/SCHED_NR/phy_procedures_nr_gNB.c @@ -614,6 +614,7 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) for (int ULSCH_id=0;ULSCH_idnumber_of_nr_ulsch_max;ULSCH_id++) { NR_gNB_ULSCH_t *ulsch = gNB->ulsch[ULSCH_id][0]; int harq_pid; + int no_sig; NR_UL_gNB_HARQ_t *ulsch_harq; if ((ulsch) && @@ -659,13 +660,14 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) pusch_decode_done = 1; - uint8_t symbol_start = ulsch_harq->ulsch_pdu.start_symbol_index; - uint8_t symbol_end = symbol_start + ulsch_harq->ulsch_pdu.nr_of_symbols; VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_RX_PUSCH,1); start_meas(&gNB->rx_pusch_stats); - for (uint8_t symbol = symbol_start; symbol < symbol_end; symbol++) { - nr_rx_pusch(gNB, ULSCH_id, frame_rx, slot_rx, symbol, harq_pid); - } + no_sig = nr_rx_pusch(gNB, ULSCH_id, frame_rx, slot_rx, harq_pid); + if (no_sig && (get_softmodem_params()->phy_test == 0)) { + LOG_D(PHY, "PUSCH not detected in frame %d, slot %d\n", frame_rx, slot_rx); + nr_fill_indication(gNB, frame_rx, slot_rx, ULSCH_id, harq_pid, 1); + return; + } gNB->pusch_vars[ULSCH_id]->ulsch_power_tot=0; gNB->pusch_vars[ULSCH_id]->ulsch_noise_power_tot=0; for (int aarx=0;aarxframe_parms.nb_antennas_rx;aarx++) { diff --git a/openair2/F1AP/f1ap_du_rrc_message_transfer.c b/openair2/F1AP/f1ap_du_rrc_message_transfer.c index 605c0bf47e..b5dbc1bdd4 100644 --- a/openair2/F1AP/f1ap_du_rrc_message_transfer.c +++ b/openair2/F1AP/f1ap_du_rrc_message_transfer.c @@ -1070,7 +1070,7 @@ int DU_send_UL_NR_RRC_MESSAGE_TRANSFER(instance_t instance, } else { LOG_I(F1AP, "Processing RRCSetupComplete UE %x\n", rnti); - ue_context_p->ue_context.Status = NR_RRC_CONNECTED; + ue_context_p->ue_context.status = NR_RRC_CONNECTED; } break; diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c index 87cc5fae38..82be6ade24 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c @@ -772,7 +772,7 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac, } /* DMRS */ - l_prime_mask = get_l_prime(pusch_config_pdu->nr_of_symbols, mappingtype, add_pos, dmrslength, pusch_config_pdu->start_symbol_index, scc->dmrs_TypeA_Position); + l_prime_mask = get_l_prime(pusch_config_pdu->nr_of_symbols, mappingtype, add_pos, dmrslength, pusch_config_pdu->start_symbol_index, mac->scc->dmrs_TypeA_Position); if ((mac->ULbwp[0] && pusch_config_pdu->transform_precoding == transform_precoder_disabled)) pusch_config_pdu->num_dmrs_cdm_grps_no_data = 1; else if (*dci_format == NR_UL_DCI_FORMAT_0_0 || (mac->ULbwp[0] && pusch_config_pdu->transform_precoding == transform_precoder_enabled)) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 8080ca28ab..3e19bb34ca 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -806,19 +806,19 @@ void nr_add_msg3(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t int scs = scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.subcarrierSpacing; int fh = 0; int startSymbolAndLength = scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[ra->Msg3_tda_id]->startSymbolAndLength; + int mappingtype = scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[ra->Msg3_tda_id]->mappingType; if (ra->CellGroup) { AssertFatal(ra->CellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.count == 1, "downlinkBWP_ToAddModList has %d BWP!\n", ra->CellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.count); NR_BWP_Uplink_t *ubwp = ra->CellGroup->spCellConfig->spCellConfigDedicated->uplinkConfig->uplinkBWP_ToAddModList->list.array[ra->bwp_id - 1]; - startSymbolAndLength = ubwp->bwp_Common->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[ra->Msg3_tda_id]->startSymbolAndLength; + mappingtype = ubwp->bwp_Common->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[ra->Msg3_tda_id]->mappingType; abwp_size = NRRIV2BW(ubwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); abwp_start = NRRIV2PRBOFFSET(ubwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); scs = ubwp->bwp_Common->genericParameters.subcarrierSpacing; fh = ubwp->bwp_Dedicated->pusch_Config->choice.setup->frequencyHopping ? 1 : 0; - } LOG_D(NR_MAC, "Frame %d, Subframe %d Adding Msg3 UL Config Request for (%d,%d) : (%d,%d,%d) for rnti: %d\n", @@ -833,7 +833,6 @@ void nr_add_msg3(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t int start_symbol_index,nr_of_symbols; SLIV2SL(startSymbolAndLength, &start_symbol_index, &nr_of_symbols); - int mappingtype = ubwp->bwp_Common->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[ra->Msg3_tda_id]->mappingType; pusch_pdu->pdu_bit_map = PUSCH_PDU_BITMAP_PUSCH_DATA; pusch_pdu->rnti = ra->rnti; From bee7e57b4b78044a7b35db3807ee90127120def0 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Mon, 17 May 2021 14:55:20 +0200 Subject: [PATCH 363/579] RHEL8-UHD support: revert back to 4.0.0.0 version Signed-off-by: Raphael Defosseux --- cmake_targets/tools/build_helper | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index fb3f2e7b9a..30fdb7eb1e 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -321,7 +321,7 @@ install_usrp_uhd_driver_from_source(){ rm -rf /tmp/uhd git clone https://github.com/EttusResearch/uhd.git cd uhd - git checkout tags/v3.14.0.0 + git checkout tags/v4.0.0.0 mkdir -p host/build cd host/build $CMAKE ../ From 6dab5f4a8d98802c937a857ac63e6569da2a3303 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Mon, 17 May 2021 14:40:41 +0100 Subject: [PATCH 364/579] Fix segmentations fault after merge --- .../lte_ul_channel_estimation.c | 2 +- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 28 ++++++++++++++----- openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c | 21 ++++++++++---- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 8 ++---- 4 files changed, 39 insertions(+), 20 deletions(-) diff --git a/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c b/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c index eab9b3f321..0ce716ef20 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c @@ -35,7 +35,7 @@ static int16_t ru_90c[2*128] = {32767, 0,32766, -402,32758, -804,32746, -1206,32 #define SCALE 0x3FFF static const short conjugate[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1}; -static const short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1}; +//static const short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1}; extern unsigned short dftsizes[34]; extern int16_t *ul_ref_sigs_rx[30][2][34]; diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 255e399d1c..49b31ddd6b 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -318,12 +318,16 @@ int8_t nr_ue_process_dci_time_dom_resource_assignment(NR_UE_MAC_INST_t *mac, */ if(dlsch_config_pdu != NULL){ NR_PDSCH_TimeDomainResourceAllocationList_t *pdsch_TimeDomainAllocationList = NULL; - if (mac->DLbwp[0] && mac->DLbwp[0]->bwp_Dedicated->pdsch_Config->choice.setup->pdsch_TimeDomainAllocationList) + if (mac->DLbwp[0] && + mac->DLbwp[0]->bwp_Dedicated && + mac->DLbwp[0]->bwp_Dedicated->pdsch_Config && + mac->DLbwp[0]->bwp_Dedicated->pdsch_Config->choice.setup->pdsch_TimeDomainAllocationList) pdsch_TimeDomainAllocationList = mac->DLbwp[0]->bwp_Dedicated->pdsch_Config->choice.setup->pdsch_TimeDomainAllocationList->choice.setup; else if (mac->DLbwp[0] && mac->DLbwp[0]->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList) pdsch_TimeDomainAllocationList = mac->DLbwp[0]->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList; else if (mac->scc_SIB && mac->scc_SIB->downlinkConfigCommon.initialDownlinkBWP.pdsch_ConfigCommon->choice.setup) pdsch_TimeDomainAllocationList = mac->scc_SIB->downlinkConfigCommon.initialDownlinkBWP.pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList; + if (pdsch_TimeDomainAllocationList && use_default==false) { if (time_domain_ind >= pdsch_TimeDomainAllocationList->list.count) { @@ -670,12 +674,17 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr } NR_PDSCH_TimeDomainResourceAllocationList_t *pdsch_TimeDomainAllocationList = NULL; - if (mac->DLbwp[0]->bwp_Dedicated->pdsch_Config->choice.setup->pdsch_TimeDomainAllocationList) + if (mac->DLbwp[0] && + mac->DLbwp[0]->bwp_Dedicated && + mac->DLbwp[0]->bwp_Dedicated->pdsch_Config && + mac->DLbwp[0]->bwp_Dedicated->pdsch_Config->choice.setup->pdsch_TimeDomainAllocationList) pdsch_TimeDomainAllocationList = mac->DLbwp[0]->bwp_Dedicated->pdsch_Config->choice.setup->pdsch_TimeDomainAllocationList->choice.setup; - else if (mac->DLbwp[0]->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList) + else if (mac->DLbwp[0] && mac->DLbwp[0]->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList) pdsch_TimeDomainAllocationList = mac->DLbwp[0]->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList; + else if (mac->scc_SIB && mac->scc_SIB->downlinkConfigCommon.initialDownlinkBWP.pdsch_ConfigCommon->choice.setup) + pdsch_TimeDomainAllocationList = mac->scc_SIB->downlinkConfigCommon.initialDownlinkBWP.pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList; - int mappingtype = pdsch_TimeDomainAllocationList->list.array[dci->time_domain_assignment.val]->mappingType; + int mappingtype = pdsch_TimeDomainAllocationList ? pdsch_TimeDomainAllocationList->list.array[dci->time_domain_assignment.val]->mappingType : ((dlsch_config_pdu_1_0->start_symbol <= 3)? typeA: typeB); /* dmrs symbol positions*/ dlsch_config_pdu_1_0->dlDmrsSymbPos = fill_dmrs_mask(pdsch_config, @@ -865,12 +874,17 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr } NR_PDSCH_TimeDomainResourceAllocationList_t *pdsch_TimeDomainAllocationList = NULL; - if (mac->DLbwp[0]->bwp_Dedicated->pdsch_Config->choice.setup->pdsch_TimeDomainAllocationList) + if (mac->DLbwp[0] && + mac->DLbwp[0]->bwp_Dedicated && + mac->DLbwp[0]->bwp_Dedicated->pdsch_Config && + mac->DLbwp[0]->bwp_Dedicated->pdsch_Config->choice.setup->pdsch_TimeDomainAllocationList) pdsch_TimeDomainAllocationList = mac->DLbwp[0]->bwp_Dedicated->pdsch_Config->choice.setup->pdsch_TimeDomainAllocationList->choice.setup; - else if (mac->DLbwp[0]->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList) + else if (mac->DLbwp[0] && mac->DLbwp[0]->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList) pdsch_TimeDomainAllocationList = mac->DLbwp[0]->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList; + else if (mac->scc_SIB && mac->scc_SIB->downlinkConfigCommon.initialDownlinkBWP.pdsch_ConfigCommon->choice.setup) + pdsch_TimeDomainAllocationList = mac->scc_SIB->downlinkConfigCommon.initialDownlinkBWP.pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList; - int mappingtype = pdsch_TimeDomainAllocationList->list.array[dci->time_domain_assignment.val]->mappingType; + int mappingtype = pdsch_TimeDomainAllocationList ? pdsch_TimeDomainAllocationList->list.array[dci->time_domain_assignment.val]->mappingType : ((dlsch_config_pdu_1_1->start_symbol <= 3)? typeA: typeB); /* dmrs symbol positions*/ dlsch_config_pdu_1_1->dlDmrsSymbPos = fill_dmrs_mask(pdsch_config, diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c index 82be6ade24..a6ba9930b2 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c @@ -585,7 +585,7 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac, pusch_config_pdu->start_symbol_index = StartSymbolIndex; pusch_config_pdu->nr_of_symbols = NrOfSymbols; - l_prime_mask = get_l_prime(NrOfSymbols, mappingtype, add_pos, dmrslength, StartSymbolIndex, mac->scc->dmrs_TypeA_Position); + l_prime_mask = get_l_prime(NrOfSymbols, mappingtype, add_pos, dmrslength, StartSymbolIndex, mac->scc ? mac->scc->dmrs_TypeA_Position : mac->mib->dmrs_TypeA_Position); LOG_D(MAC, "MSG3 start_sym:%d NR Symb:%d mappingtype:%d , DMRS_MASK:%x\n", pusch_config_pdu->start_symbol_index, pusch_config_pdu->nr_of_symbols, mappingtype, l_prime_mask); #ifdef DEBUG_MSG3 @@ -679,18 +679,27 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac, } NR_PUSCH_TimeDomainResourceAllocationList_t *pusch_TimeDomainAllocationList = NULL; - if (pusch_Config->pusch_TimeDomainAllocationList) { + if (pusch_Config && pusch_Config->pusch_TimeDomainAllocationList) { pusch_TimeDomainAllocationList = pusch_Config->pusch_TimeDomainAllocationList->choice.setup; } - else if (mac->ULbwp[0]->bwp_Common->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList) { + else if (mac->ULbwp[0] && + mac->ULbwp[0]->bwp_Common&& + mac->ULbwp[0]->bwp_Common->pusch_ConfigCommon&& + mac->ULbwp[0]->bwp_Common->pusch_ConfigCommon->choice.setup && + mac->ULbwp[0]->bwp_Common->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList) { pusch_TimeDomainAllocationList = mac->ULbwp[0]->bwp_Common->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList; } + else if (mac->scc_SIB->uplinkConfigCommon->initialUplinkBWP.pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList) + pusch_TimeDomainAllocationList=mac->scc_SIB->uplinkConfigCommon->initialUplinkBWP.pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList; + else AssertFatal(1==0,"need to fall back to default PUSCH time-domain allocations\n"); int mappingtype = pusch_TimeDomainAllocationList->list.array[dci->time_domain_assignment.val]->mappingType; NR_DMRS_UplinkConfig_t *NR_DMRS_ulconfig = NULL; - NR_DMRS_ulconfig = (mappingtype == NR_PUSCH_TimeDomainResourceAllocation__mappingType_typeA) - ? pusch_Config->dmrs_UplinkForPUSCH_MappingTypeA->choice.setup : pusch_Config->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup; + if(pusch_Config) { + NR_DMRS_ulconfig = (mappingtype == NR_PUSCH_TimeDomainResourceAllocation__mappingType_typeA) + ? pusch_Config->dmrs_UplinkForPUSCH_MappingTypeA->choice.setup : pusch_Config->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup; + } /* TRANSFORM PRECODING ------------------------------------------------------------------------------------------*/ @@ -772,7 +781,7 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac, } /* DMRS */ - l_prime_mask = get_l_prime(pusch_config_pdu->nr_of_symbols, mappingtype, add_pos, dmrslength, pusch_config_pdu->start_symbol_index, mac->scc->dmrs_TypeA_Position); + l_prime_mask = get_l_prime(pusch_config_pdu->nr_of_symbols, mappingtype, add_pos, dmrslength, pusch_config_pdu->start_symbol_index, mac->scc ? mac->scc->dmrs_TypeA_Position : mac->mib->dmrs_TypeA_Position); if ((mac->ULbwp[0] && pusch_config_pdu->transform_precoding == transform_precoder_disabled)) pusch_config_pdu->num_dmrs_cdm_grps_no_data = 1; else if (*dci_format == NR_UL_DCI_FORMAT_0_0 || (mac->ULbwp[0] && pusch_config_pdu->transform_precoding == transform_precoder_enabled)) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 3e19bb34ca..8e96584ea8 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -976,9 +976,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra LOG_D(MAC,"Msg2 startSymbolIndex.nrOfSymbols %d.%d\n",startSymbolIndex,nrOfSymbols); - int mappingtype = ra->CellGroup->spCellConfig->spCellConfigDedicated-> - downlinkBWP_ToAddModList->list.array[ra->bwp_id-1]->bwp_Common->pdsch_ConfigCommon->choice.setup-> - pdsch_TimeDomainAllocationList->list.array[time_domain_assignment]->mappingType; + int mappingtype = pdsch_TimeDomainAllocationList->list.array[time_domain_assignment]->mappingType; // look up the PDCCH PDU for this CC, BWP, and CORESET. If it does not exist, create it. This is especially // important if we have multiple RAs, and the DLSCH has to reuse them, so we need to mark them @@ -1252,9 +1250,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra SLIV2SL(startSymbolAndLength, &startSymbolIndex, &nrOfSymbols); AssertFatal(startSymbolIndex >= 0, "StartSymbolIndex is negative\n"); - int mappingtype = ra->CellGroup->spCellConfig->spCellConfigDedicated-> - downlinkBWP_ToAddModList->list.array[ra->bwp_id-1]->bwp_Common->pdsch_ConfigCommon->choice.setup-> - pdsch_TimeDomainAllocationList->list.array[time_domain_assignment]->mappingType; + int mappingtype = pdsch_TimeDomainAllocationList->list.array[time_domain_assignment]->mappingType; uint16_t dlDmrsSymbPos = fill_dmrs_mask(NULL, scc->dmrs_TypeA_Position, From ff31beac07a6ed6f65c64afa2166573f15354a1a Mon Sep 17 00:00:00 2001 From: hardy Date: Mon, 17 May 2021 18:35:32 +0200 Subject: [PATCH 365/579] fixing test retry with different IP adresses assigned to module UE --- ci-scripts/cls_oaicitest.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index e2851abc25..9880b5fbf6 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -392,7 +392,6 @@ class OaiCiTest(): status=Module_UE.GetModuleIPAddress() if status==0: HTML.CreateHtmlTestRow(Module_UE.UEIPAddress, 'OK', CONST.ALL_PROCESSES_OK) - self.UEIPAddresses.append(Module_UE.UEIPAddress) logging.debug('UE IP addresss : '+ Module_UE.UEIPAddress) else: #status==-1 failed to retrieve IP address HTML.CreateHtmlTestRow('N/A', 'KO', CONST.UE_IP_ADDRESS_ISSUE) @@ -1732,10 +1731,10 @@ class OaiCiTest(): self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC) return else: + self.UEIPAddresses=[] Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id]) Module_UE.GetModuleIPAddress() - if Module_UE.UEIPAddress not in self.UEIPAddresses: - self.UEIPAddresses.append(Module_UE.UEIPAddress) + self.UEIPAddresses.append(Module_UE.UEIPAddress) logging.debug(self.UEIPAddresses) multi_jobs = [] i = 0 @@ -2597,10 +2596,10 @@ class OaiCiTest(): self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC) return else: #is a module + self.UEIPAddresses=[] Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id]) Module_UE.GetModuleIPAddress() - if Module_UE.UEIPAddress not in self.UEIPAddresses: - self.UEIPAddresses.append(Module_UE.UEIPAddress) + self.UEIPAddresses.append(Module_UE.UEIPAddress) From 8393744c3f26c85f6549a590339216c560e28c1b Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Wed, 14 Apr 2021 15:34:26 +0200 Subject: [PATCH 366/579] nr: bugfix: bad check 38.323 5.2.2.1 says: "if t-Reordering is running, and if RX_DELIV >= RX_REORD" Let's do as is said. --- openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c b/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c index 1822239171..83c005ac55 100644 --- a/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c +++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c @@ -138,7 +138,7 @@ static void nr_pdcp_entity_recv_pdu(nr_pdcp_entity_t *entity, entity->rx_deliv = count; } - if (entity->t_reordering_start != 0 && entity->rx_deliv > entity->rx_reord) { + if (entity->t_reordering_start != 0 && entity->rx_deliv >= entity->rx_reord) { /* stop and reset t-Reordering */ entity->t_reordering_start = 0; } From 913f40228025b82b92a6071c1830ef3b2a3cc234 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Wed, 14 Apr 2021 15:38:26 +0200 Subject: [PATCH 367/579] nr: pdcp: accept "infinity" for t-reordering "infinity" is -1 in the code. --- openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c | 4 ++++ openair2/LAYER2/nr_pdcp/nr_pdcp_entity.h | 4 ++-- openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c | 8 +++++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c b/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c index 83c005ac55..f8c4d70130 100644 --- a/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c +++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c @@ -217,6 +217,10 @@ static void check_t_reordering(nr_pdcp_entity_t *entity) { uint32_t count; + /* if t_reordering is set to "infinity" (seen as -1) then do nothing */ + if (entity->t_reordering == -1) + return; + if (entity->t_reordering_start == 0 || entity->t_current <= entity->t_reordering_start + entity->t_reordering) return; diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.h b/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.h index 4ae7a45abb..2d391eb3e0 100644 --- a/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.h +++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.h @@ -55,8 +55,8 @@ typedef struct nr_pdcp_entity_t { int rb_id; int sn_size; /* SN size, in bits */ - int t_reordering; /* unit: ms */ - int discard_timer; /* unit: ms */ + int t_reordering; /* unit: ms, -1 for infinity */ + int discard_timer; /* unit: ms, -1 for infinity */ int sn_max; /* (2^SN_size) - 1 */ int window_size; /* 2^(SN_size - 1) */ diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c index 39b770508e..c106d8e4fd 100644 --- a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c +++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c @@ -610,11 +610,17 @@ static void add_drb_am(int is_gnb, int rnti, struct NR_DRB_ToAddMod *s, nr_pdcp_ue_t *ue; int drb_id = s->drb_Identity; - int t_reordering = decode_t_reordering(*s->pdcp_Config->t_Reordering); + int t_reordering; int sn_size_ul = decode_sn_size_ul(*s->pdcp_Config->drb->pdcp_SN_SizeUL); int sn_size_dl = decode_sn_size_dl(*s->pdcp_Config->drb->pdcp_SN_SizeDL); int discard_timer = decode_discard_timer(*s->pdcp_Config->drb->discardTimer); + /* if pdcp_Config->t_Reordering is not present, it means infinity (-1) */ + if (s->pdcp_Config->t_Reordering != NULL) + t_reordering = decode_t_reordering(*s->pdcp_Config->t_Reordering); + else + t_reordering = -1; + /* TODO(?): accept different UL and DL SN sizes? */ if (sn_size_ul != sn_size_dl) { LOG_E(PDCP, "%s:%d:%s: fatal, bad SN sizes, must be same. ul=%d, dl=%d\n", From e257f76dd0b326e4415f6f2c6f29f1290283107a Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Wed, 14 Apr 2021 15:47:08 +0200 Subject: [PATCH 368/579] nr: rlc: minor: set log level to error for max retx reached Just in case there is a problem, better to see it. max retx reached means "radio link failure". We should do something about it at some point. For the moment, let's inform the user that there is a problem. We can set back to LOG_D later in time when we deal with it properly. --- openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c b/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c index 66553e813b..7cd1a87784 100644 --- a/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c +++ b/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c @@ -561,7 +561,7 @@ static void max_retx_reached(void *_ue, nr_rlc_entity_t *entity) exit(1); rb_found: - LOG_D(RLC, "max RETX reached on %s %d\n", + LOG_E(RLC, "max RETX reached on %s %d\n", is_srb ? "SRB" : "DRB", rb_id); From a8691d5d22bddf687b3ea9e2ad8fcd06e6afc12d Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Tue, 18 May 2021 13:37:05 +0200 Subject: [PATCH 369/579] CI: increased timeouts on uhd_find_devices commands Signed-off-by: Raphael Defosseux --- ci-scripts/cls_oaicitest.py | 6 +++--- ci-scripts/ran.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index 73d6f52f71..57a8688a95 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -421,13 +421,13 @@ class OaiCiTest(): SSH = sshconnection.SSHConnection() SSH.open(self.UEIPAddress, self.UEUserName, self.UEPassword) # b2xx_fx3_utils reset procedure - SSH.command('echo ' + self.UEPassword + ' | sudo -S uhd_find_devices', '\$', 60) + SSH.command('echo ' + self.UEPassword + ' | sudo -S uhd_find_devices', '\$', 90) result = re.search('type: b200', SSH.getBefore()) if result is not None: logging.debug('Found a B2xx device --> resetting it') SSH.command('echo ' + self.UEPassword + ' | sudo -S b2xx_fx3_utils --reset-device', '\$', 10) # Reloading FGPA bin firmware - SSH.command('echo ' + self.UEPassword + ' | sudo -S uhd_find_devices', '\$', 60) + SSH.command('echo ' + self.UEPassword + ' | sudo -S uhd_find_devices', '\$', 90) result = re.search('type: n3xx', str(SSH.getBefore())) if result is not None: logging.debug('Found a N3xx device --> resetting it') @@ -3424,7 +3424,7 @@ class OaiCiTest(): UhdVersion = result.group('uhd_version') logging.debug('UHD Version is: ' + UhdVersion) HTML.UhdVersion[idx]=UhdVersion - SSH.command('echo ' + Password + ' | sudo -S uhd_find_devices', '\$', 60) + SSH.command('echo ' + Password + ' | sudo -S uhd_find_devices', '\$', 90) usrp_boards = re.findall('product: ([0-9A-Za-z]+)\\\\r\\\\n', SSH.getBefore()) count = 0 for board in usrp_boards: diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index c1710575ae..83945b3c17 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -388,13 +388,13 @@ class RANManagement(): # do not reset board twice in IF4.5 case result = re.search('^rru|^enb|^du.band', str(config_file)) if result is not None: - mySSH.command('echo ' + lPassWord + ' | sudo -S uhd_find_devices', '\$', 60) + mySSH.command('echo ' + lPassWord + ' | sudo -S uhd_find_devices', '\$', 90) result = re.search('type: b200', mySSH.getBefore()) if result is not None: logging.debug('Found a B2xx device --> resetting it') mySSH.command('echo ' + lPassWord + ' | sudo -S b2xx_fx3_utils --reset-device', '\$', 10) # Reloading FGPA bin firmware - mySSH.command('echo ' + lPassWord + ' | sudo -S uhd_find_devices', '\$', 60) + mySSH.command('echo ' + lPassWord + ' | sudo -S uhd_find_devices', '\$', 90) # Make a copy and adapt to EPC / eNB IP addresses mySSH.command('cp ' + full_config_file + ' ' + ci_full_config_file, '\$', 5) localMmeIpAddr = EPC.MmeIPAddress From 081fbd359357521ad49ef75d31cd51ffcb0faaa6 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Tue, 18 May 2021 18:45:11 +0100 Subject: [PATCH 370/579] Make all compile in same tree --- openair2/F1AP/f1ap_du_rrc_message_transfer.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/openair2/F1AP/f1ap_du_rrc_message_transfer.c b/openair2/F1AP/f1ap_du_rrc_message_transfer.c index b5dbc1bdd4..fcfcb5b545 100644 --- a/openair2/F1AP/f1ap_du_rrc_message_transfer.c +++ b/openair2/F1AP/f1ap_du_rrc_message_transfer.c @@ -1295,10 +1295,8 @@ int DU_handle_DL_NR_RRC_MESSAGE_TRANSFER(instance_t instance, rrcSetup_ies->masterCellGroup.size,0,0); AssertFatal(dec_rval.code == RC_OK, "could not decode masterCellGroup\n"); -#if NR - gNB_RRC_INST *rrc = RC.nrrrc[ctxt.module_id]; - // configure MAC + gNB_RRC_INST *rrc = RC.nrrrc[ctxt.module_id]; rrc_mac_config_req_gNB(ctxt.module_id, rrc->carrier.ssb_SubcarrierOffset, rrc->carrier.pdsch_AntennaPorts, @@ -1308,6 +1306,7 @@ int DU_handle_DL_NR_RRC_MESSAGE_TRANSFER(instance_t instance, ue_context_p->ue_context.rnti, ue_context_p->ue_context.masterCellGroup ); + // rrc_rlc_config_asn1_req nr_rrc_rlc_config_asn1_req(&ctxt, ue_context_p->ue_context.SRB_configList, @@ -1316,7 +1315,6 @@ int DU_handle_DL_NR_RRC_MESSAGE_TRANSFER(instance_t instance, NULL, NULL, NULL); -#endif // This should be somewhere in the f1ap_cudu_ue_inst_t /*int macrlc_instance = 0; From b719f5712e142a512c8b52f7b22cca90982f9ef6 Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Wed, 19 May 2021 09:52:09 +0200 Subject: [PATCH 371/579] fix constant in weird case 'NO_RRC', linked to 'RU' compilation case --- openair2/COMMON/platform_constants.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openair2/COMMON/platform_constants.h b/openair2/COMMON/platform_constants.h index f1e6271ed8..bec03900c3 100644 --- a/openair2/COMMON/platform_constants.h +++ b/openair2/COMMON/platform_constants.h @@ -36,8 +36,8 @@ #include "LTE_asn_constant.h" #include "NR_asn_constant.h" #else -#define LTE_maxDRB 14 -#define LTE_maxDRB_NB_r13 5 +#define LTE_maxDRB 11 +#define LTE_maxDRB_NB_r13 2 #define NR_MAXDRB 14 #endif From d40486b1001f273cea5b9c1bcf6057a9a6e6878d Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Wed, 19 May 2021 12:08:51 +0200 Subject: [PATCH 372/579] fix again RU compilation case --- cmake_targets/CMakeLists.txt | 6 ------ openair2/COMMON/platform_constants.h | 5 ----- targets/ARCH/COMMON/common_lib.h | 3 +++ 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 3a18a26ec1..8d8e88455a 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -439,10 +439,6 @@ set(asn1_generated_dir ${OPENAIR_BIN_DIR}) set(protoc_call "${OPENAIR_CMAKE}/tools/generate_protobuf") set(protobuf_generated_dir ${OPENAIR_BIN_DIR}) -if (${RU} STREQUAL 1) -add_definitions(-DNO_RRC) -endif (${RU} STREQUAL 1) - # RRC ###### set (RRC_ASN1_VERSION "Rel15") @@ -485,7 +481,6 @@ add_definitions(-DNR_RRC_VERSION=${NR_RRC_VERSION}) set (NR_RRC_FULL_DIR ${asn1_generated_dir}/RRC_${NR_RRC_ASN1_VERSION}) # Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make -if (${RU} STREQUAL 0) execute_process( COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "NR_" "-findirect-choice" "${NR_RRC_FULL_DIR}" "${NR_RRC_GRAMMAR}" RESULT_VARIABLE ret) @@ -494,7 +489,6 @@ if (NOT ${ret} STREQUAL 0) endif () file(GLOB nr_rrc_source ${NR_RRC_FULL_DIR}/*.c) file(GLOB nr_rrc_h ${NR_RRC_FULL_DIR}/*.h) -endif (${RU} STREQUAL 0) add_custom_target ( nr_rrc_flag ALL diff --git a/openair2/COMMON/platform_constants.h b/openair2/COMMON/platform_constants.h index bec03900c3..acfc0920aa 100644 --- a/openair2/COMMON/platform_constants.h +++ b/openair2/COMMON/platform_constants.h @@ -32,14 +32,9 @@ #ifndef __PLATFORM_CONSTANTS_H__ # define __PLATFORM_CONSTANTS_H__ -#ifndef NO_RRC #include "LTE_asn_constant.h" #include "NR_asn_constant.h" -#else -#define LTE_maxDRB 11 -#define LTE_maxDRB_NB_r13 2 #define NR_MAXDRB 14 -#endif #ifdef JUMBO_FRAME #define NL_MAX_PAYLOAD 18000 /* this should cover the max mtu size*/ diff --git a/targets/ARCH/COMMON/common_lib.h b/targets/ARCH/COMMON/common_lib.h index 2ab6d29d30..7b934822ea 100644 --- a/targets/ARCH/COMMON/common_lib.h +++ b/targets/ARCH/COMMON/common_lib.h @@ -561,7 +561,10 @@ extern int read_recplayconfig(recplay_conf_t **recplay_conf, recplay_state_t **r extern void iqrecorder_end(openair0_device *device); +#include +#ifndef gettid #define gettid() syscall(__NR_gettid) +#endif /*@}*/ From 997b198bb1186bde3065a7f184f06aeab779ef4a Mon Sep 17 00:00:00 2001 From: rmagueta Date: Wed, 19 May 2021 12:28:40 +0100 Subject: [PATCH 373/579] Fix issues after merge --- executables/nr-ru.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/executables/nr-ru.c b/executables/nr-ru.c index 26d7d723ea..421ff4ad3e 100644 --- a/executables/nr-ru.c +++ b/executables/nr-ru.c @@ -24,14 +24,8 @@ #include #include #include -#include -#include -#include #include #include -#include -#include -#include #include #include @@ -39,7 +33,6 @@ #include "common/utils/assertions.h" #include "common/utils/system.h" -#include "msc.h" #include "../../ARCH/COMMON/common_lib.h" #include "../../ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.h" @@ -50,20 +43,15 @@ #include "PHY/types.h" #include "PHY/defs_nr_common.h" #include "PHY/phy_extern.h" -#include "PHY/LTE_TRANSPORT/transport_proto.h" #include "PHY/NR_TRANSPORT/nr_transport_proto.h" #include "PHY/INIT/phy_init.h" -#include "SCHED/sched_eNB.h" #include "SCHED_NR/sched_nr.h" #include "LAYER2/NR_MAC_COMMON/nr_mac_extern.h" -#include "RRC/LTE/rrc_extern.h" -#include "PHY_INTERFACE/phy_interface.h" #include "common/utils/LOG/log.h" #include "common/utils/LOG/vcd_signal_dumper.h" -#include "gnb_config.h" #include #ifdef SMBV From c8acf1baa77e4fcb87dbdef02a3059411279b46b Mon Sep 17 00:00:00 2001 From: hardy Date: Wed, 19 May 2021 14:53:01 +0200 Subject: [PATCH 374/579] solve iperf UL implementation for module UE --- ci-scripts/cls_oaicitest.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index e2851abc25..cfd68c9b99 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -2221,19 +2221,22 @@ class OaiCiTest(): logging.debug("Iperf for Module in UL mode detected") #server side EPC SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password) - cmd = 'echo $USER; nohup iperf -s -u 2>&1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' + cmd = 'rm iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' + SSH.command(cmd,'\$',5) + cmd = 'echo $USER; nohup iperf -s -i 1 -u 2>&1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' SSH.command(cmd,'\$',5) #client side UE SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword) - cmd = 'iperf -B ' + UE_IPAddress + ' ' + '-c ' + EPC.IPAddress + ' ' + self.iperf_args + ' > iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log' - SSH.command(cmd,'\$',int(iperf_time)*5.0) + cmd = 'rm iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log' + SSH.command(cmd,'\$',5) + SSH.command('/opt/iperf-2.0.10/iperf -c 192.172.0.1 ' + self.iperf_args + ' 2>&1 > iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log', '\$', int(iperf_time)*5.0) #copy the 2 resulting files locally - SSH.copyin(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword, 'iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log', '.') - SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, 'iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log', '.') + SSH.copyin(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword, 'iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log', '.') + SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, 'iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log', '.') #send for analysis - filename='iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' - self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, self.iperf_args,filename,1) + filename='iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log' + self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, self.iperf_args,filename,1) else : logging.debug("Incorrect or missing IPERF direction in XML") From e96a4b04d81b363414a76dbfab07d79c0dbc2b0d Mon Sep 17 00:00:00 2001 From: rmagueta Date: Wed, 19 May 2021 14:05:10 +0100 Subject: [PATCH 375/579] Fix issue after merge --- openair1/SCHED_NR/phy_procedures_nr_gNB.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair1/SCHED_NR/phy_procedures_nr_gNB.c b/openair1/SCHED_NR/phy_procedures_nr_gNB.c index 86d3a1e90a..99065a75ae 100644 --- a/openair1/SCHED_NR/phy_procedures_nr_gNB.c +++ b/openair1/SCHED_NR/phy_procedures_nr_gNB.c @@ -686,7 +686,7 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) { nr_fill_indication(gNB,frame_rx, slot_rx, ULSCH_id, harq_pid, 1); gNB->pusch_vars[ULSCH_id]->DTX=1; stats->DTX++; - return; + return 1; } else gNB->pusch_vars[ULSCH_id]->DTX=0; stop_meas(&gNB->rx_pusch_stats); From dc0260697dcb59ec009431457fa378bce115dd26 Mon Sep 17 00:00:00 2001 From: hardy Date: Wed, 19 May 2021 15:12:05 +0200 Subject: [PATCH 376/579] update nsa benetel with UL test step --- ci-scripts/xml_files/benetel_nsa_base.xml | 162 ------------------- ci-scripts/xml_files/benetel_nsa_quectel.xml | 8 +- 2 files changed, 4 insertions(+), 166 deletions(-) delete mode 100644 ci-scripts/xml_files/benetel_nsa_base.xml diff --git a/ci-scripts/xml_files/benetel_nsa_base.xml b/ci-scripts/xml_files/benetel_nsa_base.xml deleted file mode 100644 index 0aed28dffa..0000000000 --- a/ci-scripts/xml_files/benetel_nsa_base.xml +++ /dev/null @@ -1,162 +0,0 @@ - - - TEST-FR1-TM1 - FR1 - tasks - - 010000 - 030000 - 040000 - 010001 - 000001 - 050000 - 050001 - 000001 - 060000 - 060001 - 000001 - 070000 - 070001 - 010002 - 000001 - 080001 - 080000 - 010003 - - - - - Initialize_UE - Initialize UE - - - - Terminate_UE - Terminate UE - - - - Attach_UE - Attach UE - - - - Detach_UE - Detach UE - - - - - Initialize_eNB - Initialize eNB - -O ci-scripts/conf_files/benetel-4g.conf - 0 - 0 - lte - - - - - Initialize_eNB - Initialize gNB - -O ci-scripts/conf_files/benetel-5g.conf - 1 - 1 - nr - - - - IdleSleep - Sleep - 20 - - - - Ping - Ping: 20pings in 20sec - -c 20 - 50 - - - - Ping - Ping: 100pings in 20sec - -c 100 -i 0.2 - 50 - - - - - Iperf - iperf (DL/2.5Mbps/UDP)(60 sec)(single-ue profile) - -u -b 2.5M -t 60 -i 1 - 50 - single-ue - - - - Iperf - iperf (UL/1.5Mbps/UDP)(60 sec)(single-ue profile) - -u -b 1.5M -t 60 -i 1 -R - 50 - single-ue - - - - - Iperf - iperf (DL/20Mbps/UDP)(20 sec)(single-ue profile) - -u -b 20M -t 20 -i 1 - 50 - single-ue - - - - Iperf - iperf (UL/3Mbps/UDP)(20 sec)(single-ue profile) - -u -b 3M -t 20 -i 1 -R - 50 - single-ue - - - - - - Terminate_eNB - Terminate eNB - 0 - 0 - lte - - - - Terminate_eNB - Terminate gNB - 1 - 1 - nr - - - - diff --git a/ci-scripts/xml_files/benetel_nsa_quectel.xml b/ci-scripts/xml_files/benetel_nsa_quectel.xml index 7130180753..b6282c1861 100644 --- a/ci-scripts/xml_files/benetel_nsa_quectel.xml +++ b/ci-scripts/xml_files/benetel_nsa_quectel.xml @@ -110,8 +110,8 @@ Iperf - iperf (DL/20Mbps/UDP)(20 sec)(single-ue profile) - -u -b 20M -t 20 -i 1 + iperf (DL/20Mbps/UDP)(60 sec)(single-ue profile) + -u -b 20M -t 60 -i 1 DL idefix 50 @@ -120,8 +120,8 @@ Iperf - iperf (UL/3Mbps/UDP)(20 sec)(single-ue profile) - -u -b 3M -t 20 -i 1 + iperf (UL/3Mbps/UDP)(60 sec)(single-ue profile) + -u -b 3M -t 60 -i 1 UL idefix 50 From 5af1e3fc97926c1d27785891545a8f80eb53b2f7 Mon Sep 17 00:00:00 2001 From: hardy Date: Wed, 19 May 2021 15:15:15 +0200 Subject: [PATCH 377/579] adding nsa benetel long run 2x20min test --- .../xml_files/benetel_nsa_quectel_longrun.xml | 149 ++++++++++++++++++ 1 file changed, 149 insertions(+) create mode 100644 ci-scripts/xml_files/benetel_nsa_quectel_longrun.xml diff --git a/ci-scripts/xml_files/benetel_nsa_quectel_longrun.xml b/ci-scripts/xml_files/benetel_nsa_quectel_longrun.xml new file mode 100644 index 0000000000..93c0c5a00a --- /dev/null +++ b/ci-scripts/xml_files/benetel_nsa_quectel_longrun.xml @@ -0,0 +1,149 @@ + + + TEST-NSA-FR1-TM1 + NSA Ping DL UL with QUECTEL + tasks + 3 + + 030000 + 040000 + 000002 + 010000 + 000001 + 050000 + 050001 + 000001 + 070000 + 000001 + 070001 + 000001 + 010002 + 000001 + 080001 + 080000 + + + + + + Initialize_UE + Initialize Quectel + idefix + + + + + Detach_UE + Detach UE + idefix + + + + + Initialize_eNB + Initialize eNB + -O ci-scripts/conf_files/benetel-4g.conf + 0 + 0 + lte + + + + + Initialize_eNB + Initialize gNB + -O ci-scripts/conf_files/benetel-5g.conf -q + 1 + 1 + nr + + + + IdleSleep + Sleep + 10 + + + + IdleSleep + Sleep + 30 + + + + + Ping + Ping: 20pings in 20sec + idefix + -c 20 + 50 + + + + Ping + Ping: 100pings in 20sec + idefix + -c 100 -i 0.2 + 50 + + + + Iperf + iperf (DL/20Mbps/UDP)(20 min)(single-ue profile) + -u -b 20M -t 1200 -i 1 + DL + idefix + 50 + single-ue + + + + Iperf + iperf (UL/3Mbps/UDP)(20 min)(single-ue profile) + -u -b 2M -t 1200 -i 1 + UL + idefix + 50 + single-ue + + + + + Terminate_eNB + Terminate eNB + 0 + 0 + lte + + + + Terminate_eNB + Terminate gNB + 1 + 1 + nr + + + + From 7a71c6c64a88b4a951ea961a9b79725d2de4d7db Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Tue, 18 May 2021 13:37:05 +0200 Subject: [PATCH 378/579] CI: increased timeouts on uhd_find_devices commands Signed-off-by: Raphael Defosseux --- ci-scripts/cls_oaicitest.py | 6 +++--- ci-scripts/ran.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index 73d6f52f71..57a8688a95 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -421,13 +421,13 @@ class OaiCiTest(): SSH = sshconnection.SSHConnection() SSH.open(self.UEIPAddress, self.UEUserName, self.UEPassword) # b2xx_fx3_utils reset procedure - SSH.command('echo ' + self.UEPassword + ' | sudo -S uhd_find_devices', '\$', 60) + SSH.command('echo ' + self.UEPassword + ' | sudo -S uhd_find_devices', '\$', 90) result = re.search('type: b200', SSH.getBefore()) if result is not None: logging.debug('Found a B2xx device --> resetting it') SSH.command('echo ' + self.UEPassword + ' | sudo -S b2xx_fx3_utils --reset-device', '\$', 10) # Reloading FGPA bin firmware - SSH.command('echo ' + self.UEPassword + ' | sudo -S uhd_find_devices', '\$', 60) + SSH.command('echo ' + self.UEPassword + ' | sudo -S uhd_find_devices', '\$', 90) result = re.search('type: n3xx', str(SSH.getBefore())) if result is not None: logging.debug('Found a N3xx device --> resetting it') @@ -3424,7 +3424,7 @@ class OaiCiTest(): UhdVersion = result.group('uhd_version') logging.debug('UHD Version is: ' + UhdVersion) HTML.UhdVersion[idx]=UhdVersion - SSH.command('echo ' + Password + ' | sudo -S uhd_find_devices', '\$', 60) + SSH.command('echo ' + Password + ' | sudo -S uhd_find_devices', '\$', 90) usrp_boards = re.findall('product: ([0-9A-Za-z]+)\\\\r\\\\n', SSH.getBefore()) count = 0 for board in usrp_boards: diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index c1710575ae..83945b3c17 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -388,13 +388,13 @@ class RANManagement(): # do not reset board twice in IF4.5 case result = re.search('^rru|^enb|^du.band', str(config_file)) if result is not None: - mySSH.command('echo ' + lPassWord + ' | sudo -S uhd_find_devices', '\$', 60) + mySSH.command('echo ' + lPassWord + ' | sudo -S uhd_find_devices', '\$', 90) result = re.search('type: b200', mySSH.getBefore()) if result is not None: logging.debug('Found a B2xx device --> resetting it') mySSH.command('echo ' + lPassWord + ' | sudo -S b2xx_fx3_utils --reset-device', '\$', 10) # Reloading FGPA bin firmware - mySSH.command('echo ' + lPassWord + ' | sudo -S uhd_find_devices', '\$', 60) + mySSH.command('echo ' + lPassWord + ' | sudo -S uhd_find_devices', '\$', 90) # Make a copy and adapt to EPC / eNB IP addresses mySSH.command('cp ' + full_config_file + ' ' + ci_full_config_file, '\$', 5) localMmeIpAddr = EPC.MmeIPAddress From 3b560229c4f82b29fcc109c266d99bae157bc817 Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Wed, 19 May 2021 08:52:09 +0100 Subject: [PATCH 379/579] fix constant in weird case 'NO_RRC', linked to 'RU' compilation case --- openair2/COMMON/platform_constants.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openair2/COMMON/platform_constants.h b/openair2/COMMON/platform_constants.h index 1a48a9bb97..c68e4699a9 100644 --- a/openair2/COMMON/platform_constants.h +++ b/openair2/COMMON/platform_constants.h @@ -35,9 +35,9 @@ #ifndef NO_RRC #include "LTE_asn_constant.h" #include "NR_asn_constant.h" -#else -#define LTE_maxDRB 14 -#define LTE_maxDRB_NB_r13 5 +#else +#define LTE_maxDRB 11 +#define LTE_maxDRB_NB_r13 2 #define NR_MAXDRB 14 #endif From 96e3d00ac7c1604c9d372d6849573bbd8717984b Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Wed, 19 May 2021 12:08:51 +0200 Subject: [PATCH 380/579] fix again RU compilation case --- cmake_targets/CMakeLists.txt | 6 ------ openair2/COMMON/platform_constants.h | 5 ----- targets/ARCH/COMMON/common_lib.h | 3 +++ 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 86ca0b1f8b..53b435e496 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -439,10 +439,6 @@ set(asn1_generated_dir ${OPENAIR_BIN_DIR}) set(protoc_call "${OPENAIR_CMAKE}/tools/generate_protobuf") set(protobuf_generated_dir ${OPENAIR_BIN_DIR}) -if (${RU} STREQUAL 1) -add_definitions(-DNO_RRC) -endif (${RU} STREQUAL 1) - # RRC ###### set (RRC_ASN1_VERSION "Rel15") @@ -485,7 +481,6 @@ add_definitions(-DNR_RRC_VERSION=${NR_RRC_VERSION}) set (NR_RRC_FULL_DIR ${asn1_generated_dir}/RRC_${NR_RRC_ASN1_VERSION}) # Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make -if (${RU} STREQUAL 0) execute_process( COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "NR_" "-findirect-choice" "${NR_RRC_FULL_DIR}" "${NR_RRC_GRAMMAR}" RESULT_VARIABLE ret) @@ -494,7 +489,6 @@ if (NOT ${ret} STREQUAL 0) endif () file(GLOB nr_rrc_source ${NR_RRC_FULL_DIR}/*.c) file(GLOB nr_rrc_h ${NR_RRC_FULL_DIR}/*.h) -endif (${RU} STREQUAL 0) add_custom_target ( nr_rrc_flag ALL diff --git a/openair2/COMMON/platform_constants.h b/openair2/COMMON/platform_constants.h index c68e4699a9..c56a31711a 100644 --- a/openair2/COMMON/platform_constants.h +++ b/openair2/COMMON/platform_constants.h @@ -32,14 +32,9 @@ #ifndef __PLATFORM_CONSTANTS_H__ # define __PLATFORM_CONSTANTS_H__ -#ifndef NO_RRC #include "LTE_asn_constant.h" #include "NR_asn_constant.h" -#else -#define LTE_maxDRB 11 -#define LTE_maxDRB_NB_r13 2 #define NR_MAXDRB 14 -#endif #ifdef JUMBO_FRAME #define NL_MAX_PAYLOAD 18000 /* this should cover the max mtu size*/ diff --git a/targets/ARCH/COMMON/common_lib.h b/targets/ARCH/COMMON/common_lib.h index 2ab6d29d30..7b934822ea 100644 --- a/targets/ARCH/COMMON/common_lib.h +++ b/targets/ARCH/COMMON/common_lib.h @@ -561,7 +561,10 @@ extern int read_recplayconfig(recplay_conf_t **recplay_conf, recplay_state_t **r extern void iqrecorder_end(openair0_device *device); +#include +#ifndef gettid #define gettid() syscall(__NR_gettid) +#endif /*@}*/ From 921f624b6820f12cc8911d07e1d069a2b45f9aff Mon Sep 17 00:00:00 2001 From: hardy Date: Wed, 19 May 2021 13:53:01 +0100 Subject: [PATCH 381/579] solve iperf UL implementation for module UE --- ci-scripts/cls_oaicitest.py | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index 57a8688a95..1ed3a59aac 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -391,7 +391,7 @@ class OaiCiTest(): Module_UE.Command("wup") status=Module_UE.GetModuleIPAddress() if status==0: - HTML.CreateHtmlTestRow(Module_UE.UEIPAddress, 'OK', CONST.ALL_PROCESSES_OK) + HTML.CreateHtmlTestRow(Module_UE.UEIPAddress, 'OK', CONST.ALL_PROCESSES_OK) logging.debug('UE IP addresss : '+ Module_UE.UEIPAddress) else: #status==-1 failed to retrieve IP address HTML.CreateHtmlTestRow('N/A', 'KO', CONST.UE_IP_ADDRESS_ISSUE) @@ -1512,8 +1512,8 @@ class OaiCiTest(): SSH.command('cat ' + EPC.SourceCodePath + '/scripts/ping_' + self.testCase_id + '_' + device_id + '.log', '\$', 5) else: #launch from Module SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword) - #ping from module NIC rather than IP address to make sure round trip is over the air - cmd = 'ping -I ' + Module_UE.UENetwork + ' ' + self.ping_args + ' ' + EPC.IPAddress + ' 2>&1 > ping_' + self.testCase_id + '_' + self.ue_id + '.log' + #ping from module NIC rather than IP address to make sure round trip is over the air + cmd = 'ping -I ' + Module_UE.UENetwork + ' ' + self.ping_args + ' ' + EPC.IPAddress + ' 2>&1 > ping_' + self.testCase_id + '_' + self.ue_id + '.log' SSH.command(cmd,'\$',int(ping_time[0])*1.5) #copy the ping log file to have it locally for analysis (ping stats) SSH.copyin(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword, 'ping_' + self.testCase_id + '_' + self.ue_id + '.log', '.') @@ -2205,13 +2205,13 @@ class OaiCiTest(): SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword) cmd = 'rm iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' SSH.command(cmd,'\$',5) - cmd = 'echo $USER; nohup /opt/iperf-2.0.10/iperf -s -B ' + UE_IPAddress + ' -u 2>&1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' + cmd = 'echo $USER; nohup /opt/iperf-2.0.10/iperf -s -B ' + UE_IPAddress + ' -u 2>&1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' SSH.command(cmd,'\$',5) #client side EPC SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password) cmd = 'rm iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log' SSH.command(cmd,'\$',5) - cmd = 'iperf -c ' + UE_IPAddress + ' ' + self.iperf_args + ' 2>&1 > iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log' + cmd = 'iperf -c ' + UE_IPAddress + ' ' + self.iperf_args + ' 2>&1 > iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log' SSH.command(cmd,'\$',int(iperf_time)*5.0) #copy the 2 resulting files locally SSH.copyin(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword, 'iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log', '.') @@ -2226,7 +2226,9 @@ class OaiCiTest(): SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password) cmd = 'rm iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' SSH.command(cmd,'\$',5) - + cmd = 'echo $USER; nohup iperf -s -i 1 -u 2>&1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' + SSH.command(cmd,'\$',5) + #cmd = 'echo $USER; nohup iperf3 -s -i 1 2>&1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' #SSH.command(cmd,'\$',5) @@ -2239,23 +2241,19 @@ class OaiCiTest(): SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword) cmd = 'rm iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log' SSH.command(cmd,'\$',5) - - -# SSH.command('iperf3 -c ' + EPC.IPAddress + ' ' + self.iperf_args + ' 2>&1 > iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log', '\$', int(iperf_time)*5.0) + SSH.command('/opt/iperf-2.0.10/iperf -c 192.172.0.1 ' + self.iperf_args + ' 2>&1 > iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log', '\$', int(iperf_time)*5.0) HOST=Module_UE.HostIPAddress COMMAND='iperf3 -c ' + EPC.IPAddress + ' ' + self.iperf_args + ' 2>&1 > iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log' logging.debug(COMMAND) subprocess.Popen(["ssh", "%s" % HOST, COMMAND],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE) - - #copy the 2 resulting files locally SSH.copyin(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword, 'iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log', '.') SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, 'iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log', '.') #send for analysis filename='iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log' - self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, self.iperf_args,filename,1) + self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, self.iperf_args,filename,1) else : logging.debug("Incorrect or missing IPERF direction in XML") From 56ec847b47426f8f3011e3a08f32022b59a75f32 Mon Sep 17 00:00:00 2001 From: hardy Date: Wed, 19 May 2021 15:12:05 +0200 Subject: [PATCH 382/579] update nsa benetel with UL test step --- ci-scripts/xml_files/benetel_nsa_base.xml | 162 ---------------------- 1 file changed, 162 deletions(-) delete mode 100644 ci-scripts/xml_files/benetel_nsa_base.xml diff --git a/ci-scripts/xml_files/benetel_nsa_base.xml b/ci-scripts/xml_files/benetel_nsa_base.xml deleted file mode 100644 index 0aed28dffa..0000000000 --- a/ci-scripts/xml_files/benetel_nsa_base.xml +++ /dev/null @@ -1,162 +0,0 @@ - - - TEST-FR1-TM1 - FR1 - tasks - - 010000 - 030000 - 040000 - 010001 - 000001 - 050000 - 050001 - 000001 - 060000 - 060001 - 000001 - 070000 - 070001 - 010002 - 000001 - 080001 - 080000 - 010003 - - - - - Initialize_UE - Initialize UE - - - - Terminate_UE - Terminate UE - - - - Attach_UE - Attach UE - - - - Detach_UE - Detach UE - - - - - Initialize_eNB - Initialize eNB - -O ci-scripts/conf_files/benetel-4g.conf - 0 - 0 - lte - - - - - Initialize_eNB - Initialize gNB - -O ci-scripts/conf_files/benetel-5g.conf - 1 - 1 - nr - - - - IdleSleep - Sleep - 20 - - - - Ping - Ping: 20pings in 20sec - -c 20 - 50 - - - - Ping - Ping: 100pings in 20sec - -c 100 -i 0.2 - 50 - - - - - Iperf - iperf (DL/2.5Mbps/UDP)(60 sec)(single-ue profile) - -u -b 2.5M -t 60 -i 1 - 50 - single-ue - - - - Iperf - iperf (UL/1.5Mbps/UDP)(60 sec)(single-ue profile) - -u -b 1.5M -t 60 -i 1 -R - 50 - single-ue - - - - - Iperf - iperf (DL/20Mbps/UDP)(20 sec)(single-ue profile) - -u -b 20M -t 20 -i 1 - 50 - single-ue - - - - Iperf - iperf (UL/3Mbps/UDP)(20 sec)(single-ue profile) - -u -b 3M -t 20 -i 1 -R - 50 - single-ue - - - - - - Terminate_eNB - Terminate eNB - 0 - 0 - lte - - - - Terminate_eNB - Terminate gNB - 1 - 1 - nr - - - - From 9f64696d3b21fd26745e14398d608af783f99084 Mon Sep 17 00:00:00 2001 From: hardy Date: Wed, 19 May 2021 15:15:15 +0200 Subject: [PATCH 383/579] adding nsa benetel long run 2x20min test --- .../xml_files/benetel_nsa_quectel_longrun.xml | 149 ++++++++++++++++++ 1 file changed, 149 insertions(+) create mode 100644 ci-scripts/xml_files/benetel_nsa_quectel_longrun.xml diff --git a/ci-scripts/xml_files/benetel_nsa_quectel_longrun.xml b/ci-scripts/xml_files/benetel_nsa_quectel_longrun.xml new file mode 100644 index 0000000000..93c0c5a00a --- /dev/null +++ b/ci-scripts/xml_files/benetel_nsa_quectel_longrun.xml @@ -0,0 +1,149 @@ + + + TEST-NSA-FR1-TM1 + NSA Ping DL UL with QUECTEL + tasks + 3 + + 030000 + 040000 + 000002 + 010000 + 000001 + 050000 + 050001 + 000001 + 070000 + 000001 + 070001 + 000001 + 010002 + 000001 + 080001 + 080000 + + + + + + Initialize_UE + Initialize Quectel + idefix + + + + + Detach_UE + Detach UE + idefix + + + + + Initialize_eNB + Initialize eNB + -O ci-scripts/conf_files/benetel-4g.conf + 0 + 0 + lte + + + + + Initialize_eNB + Initialize gNB + -O ci-scripts/conf_files/benetel-5g.conf -q + 1 + 1 + nr + + + + IdleSleep + Sleep + 10 + + + + IdleSleep + Sleep + 30 + + + + + Ping + Ping: 20pings in 20sec + idefix + -c 20 + 50 + + + + Ping + Ping: 100pings in 20sec + idefix + -c 100 -i 0.2 + 50 + + + + Iperf + iperf (DL/20Mbps/UDP)(20 min)(single-ue profile) + -u -b 20M -t 1200 -i 1 + DL + idefix + 50 + single-ue + + + + Iperf + iperf (UL/3Mbps/UDP)(20 min)(single-ue profile) + -u -b 2M -t 1200 -i 1 + UL + idefix + 50 + single-ue + + + + + Terminate_eNB + Terminate eNB + 0 + 0 + lte + + + + Terminate_eNB + Terminate gNB + 1 + 1 + nr + + + + From 49ea1197bbcd37def9d737c564ca6b6f675ccfa1 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Wed, 19 May 2021 16:04:54 +0100 Subject: [PATCH 384/579] Fix CI UE status "oaitun_ue1 interface is either NOT mounted or NOT configured" --- ci-scripts/cls_oaicitest.py | 2 +- openair2/RRC/NAS/nas_config.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index 08a136c9ba..c617ed831b 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -581,7 +581,7 @@ class OaiCiTest(): SSH.command('ifconfig oaitun_ue1', '\$', 4) SSH.command('ifconfig oaitun_ue1', '\$', 4) # ifconfig output is different between ubuntu 16 and ubuntu 18 - result = re.search('inet addr:1|inet 1', SSH.getBefore()) + result = re.search('inet addr:[0-9]|inet [0-9]', SSH.getBefore()) if result is not None: logging.debug('\u001B[1m oaitun_ue1 interface is mounted and configured\u001B[0m') tunnelInterfaceStatus = True diff --git a/openair2/RRC/NAS/nas_config.c b/openair2/RRC/NAS/nas_config.c index dc12e96830..2eb439b9e9 100644 --- a/openair2/RRC/NAS/nas_config.c +++ b/openair2/RRC/NAS/nas_config.c @@ -61,9 +61,9 @@ void nas_getparams(void) { /* configuration parameters for netlink, includes network parameters when running in noS1 mode */ /* optname helpstr paramflags XXXptr defXXXval type numelt */ /*--------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ - {"NetworkPrefix", NASHLP_NETPREFIX, 0, strptr:&baseNetAddress, defstrval:"60.60", TYPE_STRING, 0 }, + {"NetworkPrefix", NASHLP_NETPREFIX, 0, strptr:&baseNetAddress, defstrval:"10.0", TYPE_STRING, 0 }, {"NetworkMask", NASHLP_NETMASK, 0, strptr:&netMask, defstrval:"255.255.255.0", TYPE_STRING, 0 }, - {"BroadcastAddr", NASHLP_BROADCASTADDR, 0, strptr:&broadcastAddr, defstrval:"60.60.255.255", TYPE_STRING, 0 }, + {"BroadcastAddr", NASHLP_BROADCASTADDR, 0, strptr:&broadcastAddr, defstrval:"10.0.255.255", TYPE_STRING, 0 }, }; config_get( nasoptions,sizeof(nasoptions)/sizeof(paramdef_t),"nas.noS1"); } From c3f429b022fcb175b07255d19c64f748db6ddb73 Mon Sep 17 00:00:00 2001 From: hardy Date: Wed, 19 May 2021 22:59:06 +0200 Subject: [PATCH 385/579] update for benetel long run --- .../Jenkinsfile-tmp-multi-enb-benetel-long | 304 ++++++++++++++++++ ci-scripts/Jenkinsfile-trig-nsa | 2 +- ci-scripts/xml_files/benetel_nsa_quectel.xml | 1 - 3 files changed, 305 insertions(+), 2 deletions(-) create mode 100644 ci-scripts/Jenkinsfile-tmp-multi-enb-benetel-long diff --git a/ci-scripts/Jenkinsfile-tmp-multi-enb-benetel-long b/ci-scripts/Jenkinsfile-tmp-multi-enb-benetel-long new file mode 100644 index 0000000000..fb7f3738d2 --- /dev/null +++ b/ci-scripts/Jenkinsfile-tmp-multi-enb-benetel-long @@ -0,0 +1,304 @@ +#!/bin/groovy +/* + * 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 + */ + +// Template Jenkins Declarative Pipeline script to run Test w/ RF HW + +// Location of the python executor node shall be in the same subnet as the others servers +def pythonExecutor = params.pythonExecutor + +// Location of the test XML file to be run +def testXMLFile = params.pythonTestXmlFile +def mainPythonAllXmlFiles = "" +def buildStageStatus = true + +// Name of the test stage +def testStageName = params.pipelineTestStageName + +// Name of the phone resource +def ciSmartPhonesResource1 = params.SmartPhonesResource1 +def ciSmartPhonesResource2 = params.SmartPhonesResource2 + +// Global Parameters. Populated when the master job +// triggers the slave job with parameters +def eNB_Repository = "https://gitlab.eurecom.fr/oai/openairinterface5g.git" +def eNB_Branch = "develop" +def eNB_CommitID +def eNB_AllowMergeRequestProcess = false +def eNB_TargetBranch = "develop" +def eNB_MR = "develop" + +pipeline { + agent { + label pythonExecutor + } + options { + disableConcurrentBuilds() + ansiColor('xterm') + lock(extra: [[resource: ciSmartPhonesResource2]], resource: ciSmartPhonesResource1) + } + stages { + stage("Build Init") { + steps { + script { + //retrieve latest commit ID from branch + latest_commit_from_branch= sh returnStdout: true, script: 'git log -1 origin/${eNB_Branch} | grep commit' + echo "Branch ${eNB_Branch}" + echo "${latest_commit_from_branch}" + tmp=latest_commit_from_branch.split() + echo "${tmp}" + eNB_CommitID = tmp[1] + echo "eNB_CommitID ${eNB_CommitID}" + // update the build name and description + buildName "${params.eNB_MR}" + buildDescription "Commit : ${eNB_CommitID}" + } + } + } + stage ("Verify Parameters") { + steps { + script { + echo '\u2705 \u001B[32mVerify Parameters\u001B[0m' + def allParametersPresent = true + + // It is already to late to check it + if (params.pythonExecutor != null) { + echo "eNB CI executor node : ${pythonExecutor}" + } + // If not present picking a default Stage Name + if (params.pipelineTestStageName == null) { + // picking default + testStageName = 'Template Test Stage' + } + + if (params.SmartPhonesResource1 == null) { + allParametersPresent = false + } + if (params.SmartPhonesResource2 == null) { + allParametersPresent = false + } + // 1st eNB parameters + if (params.eNB_IPAddress == null) { + allParametersPresent = false + } + if (params.eNB_SourceCodePath == null) { + allParametersPresent = false + } + if (params.eNB_Credentials == null) { + allParametersPresent = false + } + // 2nd eNB parameters + if (params.eNB1_IPAddress == null) { + allParametersPresent = false + } + if (params.eNB1_SourceCodePath == null) { + allParametersPresent = false + } + if (params.eNB1_Credentials == null) { + allParametersPresent = false + } + // 3rd eNB parameters + if (params.eNB2_IPAddress == null) { + allParametersPresent = false + } + if (params.eNB2_SourceCodePath == null) { + allParametersPresent = false + } + if (params.eNB2_Credentials == null) { + allParametersPresent = false + } + // the following 4 parameters should be pushed by the master trigger + // if not present, take the job GIT variables (used for developing) + if (params.eNB_Repository == null) { + eNB_Repository = env.GIT_URL + } else { + eNB_Repository = params.eNB_Repository + } + echo "eNB_Repository : ${eNB_Repository}" + if (params.eNB_Branch == null) { + eNB_Branch = env.GIT_BRANCH + } else { + eNB_Branch = params.eNB_Branch + } + echo "eNB_Branch : ${eNB_Branch}" + //if (params.eNB_CommitID == null) { + // eNB_CommitID = env.GIT_COMMIT + //} else { + // eNB_CommitID = params.eNB_CommitID + //} + echo "eNB_CommitID : ${eNB_CommitID}" + if (params.eNB_AllowMergeRequestProcess!= null) { + eNB_AllowMergeRequestProcess = params.eNB_AllowMergeRequestProcess + if (eNB_AllowMergeRequestProcess) { + if (params.eNB_TargetBranch != null) { + eNB_TargetBranch = params.eNB_TargetBranch + } else { + eNB_TargetBranch = 'develop' + } + echo "eNB_TargetBranch : ${eNB_TargetBranch}" + } + } + + if (params.EPC_IPAddress == null) { + allParametersPresent = false + } + if (params.EPC_Type == null) { + allParametersPresent = false + } + if (params.EPC_SourceCodePath == null) { + allParametersPresent = false + } + if (params.EPC_Credentials == null) { + allParametersPresent = false + } + + if (params.ADB_IPAddress == null) { + allParametersPresent = false + } + if (params.ADB_Credentials == null) { + allParametersPresent = false + } + + if (allParametersPresent) { + echo "All parameters are present" + if (eNB_AllowMergeRequestProcess) { + sh "git fetch" + sh "./ci-scripts/doGitLabMerge.sh --src-branch ${eNB_Branch} --src-commit ${eNB_CommitID} --target-branch ${eNB_TargetBranch} --target-commit latest" + } else { + sh "git fetch" + sh "git checkout -f ${eNB_CommitID}" + } + } else { + echo "Some parameters are missing" + sh "./ci-scripts/fail.sh" + } + } + } + } + stage ("Build and Test") { + steps { + script { + dir ('ci-scripts') { + echo "\u2705 \u001B[32m${testStageName}\u001B[0m" + // If not present picking a default XML file + if (params.pythonTestXmlFile == null) { + // picking default + testXMLFile = 'xml_files/enb_usrpB210_band7_50PRB.xml' + echo "Test XML file(default): ${testXMLFile}" + mainPythonAllXmlFiles += "--XMLTestFile=" + testXMLFile + " " + } else { + String[] myXmlTestSuite = testXMLFile.split("\\r?\\n") + for (xmlFile in myXmlTestSuite) { + if (fileExists(xmlFile)) { + mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " " + echo "Test XML file : ${xmlFile}" + } + } + } + withCredentials([ + [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'], + [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB1_Credentials}", usernameVariable: 'eNB1_Username', passwordVariable: 'eNB1_Password'], + [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB2_Credentials}", usernameVariable: 'eNB2_Username', passwordVariable: 'eNB2_Password'], + [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'], + [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.ADB_Credentials}", usernameVariable: 'ADB_Username', passwordVariable: 'ADB_Password'] + ]) { + sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} ${mainPythonAllXmlFiles}" + String[] myXmlTestSuite = testXMLFile.split("\\r?\\n") + for (xmlFile in myXmlTestSuite) { + if (fileExists(xmlFile)) { + try { + sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --eNB1IPAddress=${params.eNB1_IPAddress} --eNB1UserName=${eNB1_Username} --eNB1Password=${eNB1_Password} --eNB1SourceCodePath=${params.eNB1_SourceCodePath} --eNB2IPAddress=${params.eNB2_IPAddress} --eNB2UserName=${eNB2_Username} --eNB2Password=${eNB2_Password} --eNB2SourceCodePath=${params.eNB2_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} --XMLTestFile=${xmlFile}" + } catch (Exception e) { + currentBuild.result = 'FAILURE' + buildStageStatus = false + } + } + } + sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}" + } + } + } + } + } + stage('Log Collection') { + parallel { + stage('Log Collection (eNB - Build)') { + steps { + withCredentials([ + [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'] + ]) { + echo '\u2705 \u001B[32mLog Collection (eNB - Build)\u001B[0m' + sh "python3 ci-scripts/main.py --mode=LogCollectBuild --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath}" + + echo '\u2705 \u001B[32mLog Transfer (eNB - Build)\u001B[0m' + sh "sshpass -p \'${eNB_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${eNB_Username}@${params.eNB_IPAddress}:${eNB_SourceCodePath}/cmake_targets/build.log.zip ./build.log.${env.BUILD_ID}.zip || true" + } + script { + if(fileExists("build.log.${env.BUILD_ID}.zip")) { + archiveArtifacts "build.log.${env.BUILD_ID}.zip" + } + } + } + } + stage('Log Collection (eNB - Run)') { + steps { + withCredentials([ + [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'] + ]) { + echo '\u2705 \u001B[32mLog Collection (eNB - Run)\u001B[0m' + sh "python3 ci-scripts/main.py --mode=LogCollecteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath}" + + echo '\u2705 \u001B[32mLog Transfer (eNB - Run)\u001B[0m' + sh "sshpass -p \'${eNB_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${eNB_Username}@${params.eNB_IPAddress}:${eNB_SourceCodePath}/cmake_targets/enb.log.zip ./enb.log.${env.BUILD_ID}.zip || true" + } + script { + if(fileExists("enb.log.${env.BUILD_ID}.zip")) { + archiveArtifacts "enb.log.${env.BUILD_ID}.zip" + } + if(fileExists("ci-scripts/test_results.html")) { + sh "mv ci-scripts/test_results.html test_results-${JOB_NAME}.html" + sh "sed -i -e 's#TEMPLATE_JOB_NAME#${JOB_NAME}#' -e 's@build #TEMPLATE_BUILD_ID@build #${BUILD_ID}@' -e 's#Build-ID: TEMPLATE_BUILD_ID#Build-ID: ${BUILD_ID}#' -e 's#TEMPLATE_STAGE_NAME#${testStageName}#' test_results-${JOB_NAME}.html" + archiveArtifacts "test_results-${JOB_NAME}.html" + } + } + } + } + } + } + } + + post { + always { + script { + if (params.pipelineZipsConsoleLog != null) { + if (params.pipelineZipsConsoleLog) { + echo "Archiving Jenkins console log" + sh "wget --no-check-certificate --no-proxy ${env.JENKINS_URL}/job/${env.JOB_NAME}/${env.BUILD_ID}/consoleText -O consoleText.log || true" + sh "zip -m consoleText.log.${env.BUILD_ID}.zip consoleText.log || true" + if(fileExists("consoleText.log.${env.BUILD_ID}.zip")) { + archiveArtifacts "consoleText.log.${env.BUILD_ID}.zip" + } + } + } + } + } + } +} diff --git a/ci-scripts/Jenkinsfile-trig-nsa b/ci-scripts/Jenkinsfile-trig-nsa index 5ace29d866..b9172225ca 100644 --- a/ci-scripts/Jenkinsfile-trig-nsa +++ b/ci-scripts/Jenkinsfile-trig-nsa @@ -37,7 +37,7 @@ pipeline { steps { script { //retrieve MR that are opened nd with tag READY_TO_BE_MERGED - MR_LIST= sh returnStdout: true, script: 'curl --silent "https://gitlab.eurecom.fr/api/v4/projects/oai%2Fopenairinterface5g/merge_requests?state=opened&per_page=100&milestone=REVIEW_COMPLETED_AND_APPROVED" | jq ".[].iid" || true ' + MR_LIST= sh returnStdout: true, script: 'curl --silent "https://gitlab.eurecom.fr/api/v4/projects/oai%2Fopenairinterface5g/merge_requests?state=opened&per_page=100&labels=NSA" | jq ".[].iid" || true ' echo "List of selected MR:\n${MR_LIST}" def MR_ARRAY = MR_LIST.split('\n') //for every selected MR, retrieve the branch name and the latest commit diff --git a/ci-scripts/xml_files/benetel_nsa_quectel.xml b/ci-scripts/xml_files/benetel_nsa_quectel.xml index b6282c1861..1e08fc54dc 100644 --- a/ci-scripts/xml_files/benetel_nsa_quectel.xml +++ b/ci-scripts/xml_files/benetel_nsa_quectel.xml @@ -42,7 +42,6 @@ 000001 080001 080000 - From 449bab30c7cb2998a35d45562ffddb1e21587afc Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Thu, 20 May 2021 14:20:00 +0200 Subject: [PATCH 386/579] fix nr UE bug: random freeze (mutex not init) --- executables/nr-ue.c | 2 +- openair1/SCHED/phy_procedures_lte_eNb.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/executables/nr-ue.c b/executables/nr-ue.c index 0ff68b131a..53ec70330c 100644 --- a/executables/nr-ue.c +++ b/executables/nr-ue.c @@ -608,7 +608,7 @@ void *UE_thread(void *arg) { thread_idx = absolute_slot % NR_RX_NB_TH; int slot_nr = absolute_slot % nb_slot_frame; notifiedFIFO_elt_t *msgToPush; - AssertFatal((msgToPush=pullTpool(&freeBlocks,&(get_nrUE_params()->Tpool))) != NULL,"chained list failure"); + AssertFatal((msgToPush=pullNotifiedFIFO_nothreadSafe(&freeBlocks)) != NULL,"chained list failure"); nr_rxtx_thread_data_t *curMsg=(nr_rxtx_thread_data_t *)NotifiedFifoData(msgToPush); curMsg->UE=UE; // update thread index for received subframe diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c index f40f760f45..973c921d23 100644 --- a/openair1/SCHED/phy_procedures_lte_eNb.c +++ b/openair1/SCHED/phy_procedures_lte_eNb.c @@ -55,7 +55,6 @@ #include "common/ran_context.h" extern RAN_CONTEXT_t RC; -nfapi_ue_release_request_body_t release_rntis; int16_t get_hundred_times_delta_IF_eNB(PHY_VARS_eNB *eNB,uint16_t ULSCH_id,uint8_t harq_pid, uint8_t bw_factor) { uint32_t Nre,sumKr,MPR_x100,Kr,r; From 20f88953161c5e865b812361b71d65ce0f2fb6b4 Mon Sep 17 00:00:00 2001 From: Thomas Schlichter Date: Thu, 20 May 2021 16:11:38 +0200 Subject: [PATCH 387/579] fix nr_dlsim: make dmrs_config_type optional again --- openair1/SIMULATION/NR_PHY/dlsim.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index b042a667eb..3c9511f05e 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -1428,8 +1428,6 @@ void update_dmrs_config(NR_CellGroupConfig_t *scg, int8_t* dmrs_arg) dmrs_config_type = NFAPI_NR_DMRS_TYPE1; } else if(dmrs_arg[2] == 2) { dmrs_config_type = NFAPI_NR_DMRS_TYPE2; - } else { - AssertFatal(1==0,"Incorrect DMRS Configuration Type, valid options 1-type1, 2-type2\n"); } NR_BWP_Downlink_t *bwp = scg->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[0]; From 71a5ae24543522335ec735d65a47608810b86086 Mon Sep 17 00:00:00 2001 From: Thomas Schlichter Date: Thu, 20 May 2021 16:24:11 +0200 Subject: [PATCH 388/579] NR_UE: further cleanup of DMRS configuration --- openair1/PHY/INIT/nr_init_ue.c | 17 --- .../nr_dl_channel_estimation.c | 8 +- openair1/PHY/defs_nr_UE.h | 3 - openair1/PHY/impl_defs_nr.h | 109 +----------------- openair1/SCHED_NR_UE/phy_procedures_nr_ue.c | 35 ++++-- .../SCHED_NR_UE/pucch_power_control_ue_nr.c | 6 +- 6 files changed, 37 insertions(+), 141 deletions(-) diff --git a/openair1/PHY/INIT/nr_init_ue.c b/openair1/PHY/INIT/nr_init_ue.c index 3bb59bdece..68947b0c6b 100644 --- a/openair1/PHY/INIT/nr_init_ue.c +++ b/openair1/PHY/INIT/nr_init_ue.c @@ -186,23 +186,6 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, /////////////////////////PUSCH DMRS init///////////////////////// /////////// - - // default values until overwritten by RRCConnectionReconfiguration - - for (i=0; ipusch_config.pusch_TimeDomainResourceAllocation[i] = (PUSCH_TimeDomainResourceAllocation_t *)malloc16(sizeof(PUSCH_TimeDomainResourceAllocation_t)); - ue->pusch_config.pusch_TimeDomainResourceAllocation[i]->mappingType = typeB; - } - - for (i=0;iPDSCH_Config.pdsch_TimeDomainResourceAllocation[i] = (PDSCH_TimeDomainResourceAllocation_t *)malloc16(sizeof(PDSCH_TimeDomainResourceAllocation_t)); - ue->PDSCH_Config.pdsch_TimeDomainResourceAllocation[i]->mappingType = typeA; - } - - //------------- config DMRS parameters--------------// - ue->dmrs_DownlinkConfig.pdsch_dmrs_AdditionalPosition = pdsch_dmrs_pos0; - //-------------------------------------------------// - ue->nr_gold_pusch_dmrs = (uint32_t ****)malloc16(fp->slots_per_frame*sizeof(uint32_t ***)); pusch_dmrs = ue->nr_gold_pusch_dmrs; n_scid = 0; // This quantity is indicated by higher layer parameter dmrs-SeqInitialization diff --git a/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c b/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c index 14748ebe28..1268c79f18 100644 --- a/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c +++ b/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c @@ -701,11 +701,11 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue, int8_t delta = get_delta(p, config_type); // checking if re-initialization of scrambling IDs is needed - if ((ue->dmrs_DownlinkConfig.scramblingID0 != ue->scramblingID[0]) || (ue->dmrs_DownlinkConfig.scramblingID1 != ue->scramblingID[1])){ - ue->scramblingID[0]=ue->dmrs_DownlinkConfig.scramblingID0; - ue->scramblingID[1]=ue->dmrs_DownlinkConfig.scramblingID1; + /*if ((XXX.scramblingID0 != ue->scramblingID[0]) || (XXX.scramblingID1 != ue->scramblingID[1])){ + ue->scramblingID[0] = XXX.scramblingID0; + ue->scramblingID[1] = XXX.scramblingID1; nr_gold_pdsch(ue,ue->scramblingID); - } + }*/ nr_pdsch_dmrs_rx(ue, Ns, ue->nr_gold_pdsch[gNB_id][Ns][symbol][0], &pilot[0], 1000+p, 0, nb_rb_pdsch+rb_offset, config_type); diff --git a/openair1/PHY/defs_nr_UE.h b/openair1/PHY/defs_nr_UE.h index e3c0737838..026a242053 100644 --- a/openair1/PHY/defs_nr_UE.h +++ b/openair1/PHY/defs_nr_UE.h @@ -968,17 +968,14 @@ typedef struct { CellGroupConfig_t cell_group_config; PDSCH_ServingCellConfig_t PDSCH_ServingCellConfig; - PDSCH_Config_t PDSCH_Config; PUCCH_ConfigCommon_nr_t pucch_config_common_nr[NUMBER_OF_CONNECTED_gNB_MAX]; PUCCH_Config_t pucch_config_dedicated_nr[NUMBER_OF_CONNECTED_gNB_MAX]; - PUSCH_Config_t pusch_config; SRS_NR srs; crossCarrierSchedulingConfig_t crossCarrierSchedulingConfig; supplementaryUplink_t supplementaryUplink; - dmrs_DownlinkConfig_t dmrs_DownlinkConfig; csi_MeasConfig_t csi_MeasConfig; PUSCH_ServingCellConfig_t PUSCH_ServingCellConfig; diff --git a/openair1/PHY/impl_defs_nr.h b/openair1/PHY/impl_defs_nr.h index a3093f3d22..f4d53f0bf7 100644 --- a/openair1/PHY/impl_defs_nr.h +++ b/openair1/PHY/impl_defs_nr.h @@ -401,62 +401,6 @@ typedef struct{ int startSymbolAndLength; }PDSCH_TimeDomainResourceAllocation_t; -typedef struct { -/* - * resourceAllocation - */ - dl_resourceAllocation_t dl_resourceAllocation; -/* - * corresponds to I, where I the number of entries in the higher layer parameter pdsch-AllocationList - */ - uint8_t n_pdsh_alloc_list; -/* - * rateMatchPatternToAddModList - */ - rateMatchPattern_t rateMatchPatternToAddModList[MAX_NR_RATE_MATCH_PATTERNS]; -/* - * rateMatchPatternToReleaseList - */ - uint8_t rateMatchPatternToReleaseList[MAX_NR_RATE_MATCH_PATTERNS]; - /* - * n_rateMatchPatterns indicates the number of rateMatchPatterns defined currently - */ - uint8_t n_rateMatchPatterns; - /* - * zp-CSI-RS-ResourceToAddModList - */ - zp_CSI_RS_Resource_t zp_CSI_RS_Resource[MAX_NR_ZP_CSI_RS_RESOURCES]; - /* - * zp-CSI-RS-ResourceToReleaseList - */ - uint8_t zp_CSI_RS_ResourceId[MAX_NR_ZP_CSI_RS_RESOURCES]; - /* - * n_zp-CSI-RS-Resource - */ - uint8_t n_zp_CSI_RS_ResourceId; -/* - * rgb_Size - */ - dl_rgb_Size_t dl_rgbSize; -/* - * prb-BundlingType - */ - prb_bundleType_t prbBundleType; -/* - * pdsch-HARQ-ACK-Codebook: this is part of the IE PhysicalCellGroupConfig which is used to configure cell-group specific L1 parameters (TS 38.331) - */ - pdsch_HARQ_ACK_Codebook_t pdsch_HARQ_ACK_Codebook; - ////////////////////////////////////////////////////////////////////////////////################################ - -/* - Maximum number of code words that a single DCI may schedule. This changes the number of MCS/RV/NDI bits in the DCI message from 1 to 2. -*/ - maxNrofCodeWordsScheduledByDCI_t maxNrofCodeWordsScheduledByDCI; - - - PDSCH_TimeDomainResourceAllocation_t *pdsch_TimeDomainResourceAllocation[MAX_NR_OF_DL_ALLOCATIONS]; - -} PDSCH_Config_t; /*********************************************************************** * @@ -507,6 +451,7 @@ typedef enum { typedef enum { pdsch_dmrs_pos0 = 0, pdsch_dmrs_pos1 = 1, + pdsch_dmrs_pos2 = 2, pdsch_dmrs_pos3 = 3, } pdsch_dmrs_AdditionalPosition_t; typedef enum { @@ -534,11 +479,6 @@ typedef struct { uint16_t n_rb0; uint16_t n_rb1; } ptrs_frequency_density_t; -typedef struct { // The IE DMRS-DownlinkConfig is used to configure downlink demodulation reference signals for PDSCH - pdsch_dmrs_AdditionalPosition_t pdsch_dmrs_AdditionalPosition; - uint16_t scramblingID0; - uint16_t scramblingID1; -} dmrs_DownlinkConfig_t; typedef struct { /* * Serving cell ID of a PSCell. The PCell of the Master Cell Group uses ID = 0 @@ -603,53 +543,6 @@ typedef struct { betaOffset_type_t betaOffset_type; betaOffset_t betaOffset; } uci_onPusch_t; -typedef struct { -/* - * txConfig - */ - txConfig_t txConfig; -/* - * frequencyHopping - */ - frequencyHopping_t frequencyHopping; -/* - * frequencyHoppingOffsetLists - */ - uint16_t frequencyHoppingOffsetLists[4]; - // n_frequencyHoppingOffsetLists contains the number of offsets listed. We can list up to 4 offsets - uint8_t n_frequencyHoppingOffsetLists; -/* - * resourceAllocation - */ - ul_resourceAllocation_t ul_resourceAllocation; -/* - * rgb_Size - */ - ul_rgb_Size_t ul_rgbSize; -/* - * corresponds to I, where I the number of entries in the higher layer parameter pusch-AllocationList - */ - uint8_t n_push_alloc_list; -/* - * transformPrecoder - */ -transformPrecoder_t transformPrecoder; -/* - * codebookSubset - */ -codebookSubset_t codebookSubset; -/* - * maxRank - */ -uint8_t maxRank; -/* - * uci_onPusch - */ -uci_onPusch_t uci_onPusch; -////////////////////////////////////////////////////////////////////////////////################################ - PUSCH_PowerControl_t pusch_PowerControl; - PUSCH_TimeDomainResourceAllocation_t *pusch_TimeDomainResourceAllocation[MAX_NR_OF_UL_ALLOCATIONS]; -} PUSCH_Config_t; /*********************************************************************** * diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c index 125cc3702f..b8bbc0b5d4 100644 --- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c +++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c @@ -1155,7 +1155,7 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue, } } - if (ue->mac_enabled == 1) { + if (ue->mac_enabled == 1) { // TODO: move this from PHY to MAC layer! /* Time Alignment procedure // - UE processing capability 1 @@ -1176,11 +1176,34 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue, const int Ta_max = 3846; // Max value of 12 bits TA Command const double N_TA_max = Ta_max * bw_scaling * tc_factor; + NR_UE_MAC_INST_t *mac = get_mac_inst(0); + + NR_BWP_Id_t ul_bwp_id = mac->UL_BWP_Id; + NR_PUSCH_Config_t *pusch_Config = mac->ULbwp[ul_bwp_id-1]->bwp_Dedicated->pusch_Config->choice.setup; + NR_PUSCH_TimeDomainResourceAllocationList_t *pusch_TimeDomainAllocationList = pusch_Config->pusch_TimeDomainAllocationList->choice.setup; + long mapping_type_ul = pusch_TimeDomainAllocationList->list.array[0]->mappingType; + + NR_BWP_Id_t dl_bwp_id = mac->DL_BWP_Id; + NR_PDSCH_Config_t *pdsch_Config = mac->DLbwp[dl_bwp_id-1]->bwp_Dedicated->pdsch_Config->choice.setup; + NR_PDSCH_TimeDomainResourceAllocationList_t *pdsch_TimeDomainAllocationList = pdsch_Config->pdsch_TimeDomainAllocationList->choice.setup; + long mapping_type_dl = pdsch_TimeDomainAllocationList->list.array[0]->mappingType; + + NR_DMRS_DownlinkConfig_t *NR_DMRS_dlconfig; + if (mapping_type_dl == NR_PDSCH_TimeDomainResourceAllocation__mappingType_typeA) + NR_DMRS_dlconfig = (NR_DMRS_DownlinkConfig_t *)pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup; + else + NR_DMRS_dlconfig = (NR_DMRS_DownlinkConfig_t *)pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeB->choice.setup; + + pdsch_dmrs_AdditionalPosition_t add_pos_dl = pdsch_dmrs_pos2; + if (NR_DMRS_dlconfig->dmrs_AdditionalPosition) + add_pos_dl = *NR_DMRS_dlconfig->dmrs_AdditionalPosition; + /* PDSCH decoding time N_1 for processing capability 1 */ int N_1; - if (ue->dmrs_DownlinkConfig.pdsch_dmrs_AdditionalPosition == pdsch_dmrs_pos0) + + if (add_pos_dl == pdsch_dmrs_pos0) N_1 = pdsch_N_1_capability_1[numerology][1]; - else if (ue->dmrs_DownlinkConfig.pdsch_dmrs_AdditionalPosition == pdsch_dmrs_pos1 || ue->dmrs_DownlinkConfig.pdsch_dmrs_AdditionalPosition == 2) // TODO set to pdsch_dmrs_pos2 when available + else if (add_pos_dl == pdsch_dmrs_pos1 || add_pos_dl == pdsch_dmrs_pos2) N_1 = pdsch_N_1_capability_1[numerology][2]; else N_1 = pdsch_N_1_capability_1[numerology][3]; @@ -1191,8 +1214,7 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue, /* d_1_1 depending on the number of PDSCH symbols allocated */ const int d = 0; // TODO number of overlapping symbols of the scheduling PDCCH and the scheduled PDSCH int d_1_1 = 0; - mappingType_t mapping_type_dl = ue->PDSCH_Config.pdsch_TimeDomainResourceAllocation[0]->mappingType; - if (mapping_type_dl == typeA) + if (mapping_type_dl == NR_PDSCH_TimeDomainResourceAllocation__mappingType_typeA) if (nb_symb_sch + start_symbol < 7) d_1_1 = 7 - (nb_symb_sch + start_symbol); else @@ -1207,8 +1229,7 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue, /* d_2_1 */ int d_2_1; - mappingType_t mapping_type_ul = ue->pusch_config.pusch_TimeDomainResourceAllocation[0]->mappingType; - if (mapping_type_ul == typeB && start_symbol != 0) + if (mapping_type_ul == NR_PUSCH_TimeDomainResourceAllocation__mappingType_typeB && start_symbol != 0) d_2_1 = 0; else d_2_1 = 1; diff --git a/openair1/SCHED_NR_UE/pucch_power_control_ue_nr.c b/openair1/SCHED_NR_UE/pucch_power_control_ue_nr.c index f43f4d98c9..fadfba6bce 100644 --- a/openair1/SCHED_NR_UE/pucch_power_control_ue_nr.c +++ b/openair1/SCHED_NR_UE/pucch_power_control_ue_nr.c @@ -158,13 +158,14 @@ int16_t get_pucch_tx_power_ue(PHY_VARS_NR_UE *ue, } } - int k2; - if (power_config->twoPUCCH_PC_AdjustmentStates > 1) { LOG_E(PHY,"PUCCH power control adjustment states with 2 states not yet implemented : at line %d in function %s of file %s \n", LINE_FILE , __func__, __FILE__); return (PUCCH_POWER_DEFAULT); } +#if 0 + int k2; + /* response to a detection by the UE of a DCI format 1_0 or DCI format 1_1 */ //int K_PUCCH = 0; if (O_ACK != 0) { @@ -201,6 +202,7 @@ int16_t get_pucch_tx_power_ue(PHY_VARS_NR_UE *ue, } //K_PUCCH = N_SYMB_SLOT * k2; /* the product of a number of symbols per slot and the minimum of the values provided by higher layer parameter k2 */ } +#endif int contributor = (10 * log10((double)(pow(2,(ue->frame_parms.numerology_index)) * nb_of_prbs))); From c1a8c3fd15189c5edd650cd5608a32832c54eab0 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Thu, 20 May 2021 15:27:31 +0100 Subject: [PATCH 389/579] Fix all RRC status to StatusRrc --- openair2/F1AP/f1ap_du_rrc_message_transfer.c | 2 +- openair2/RRC/LITE/rrc_common.c | 2 +- openair2/RRC/NR/nr_rrc_defs.h | 2 +- openair2/RRC/NR/rrc_gNB.c | 10 +++++----- openair2/RRC/NR/rrc_gNB_NGAP.c | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/openair2/F1AP/f1ap_du_rrc_message_transfer.c b/openair2/F1AP/f1ap_du_rrc_message_transfer.c index 10fdd0ad7a..c820791094 100644 --- a/openair2/F1AP/f1ap_du_rrc_message_transfer.c +++ b/openair2/F1AP/f1ap_du_rrc_message_transfer.c @@ -1070,7 +1070,7 @@ int DU_send_UL_NR_RRC_MESSAGE_TRANSFER(instance_t instance, } else { LOG_I(F1AP, "Processing RRCSetupComplete UE %x\n", rnti); - ue_context_p->ue_context.status = NR_RRC_CONNECTED; + ue_context_p->ue_context.StatusRrc = NR_RRC_CONNECTED; } break; diff --git a/openair2/RRC/LITE/rrc_common.c b/openair2/RRC/LITE/rrc_common.c index 027a629992..f0279f0ef2 100644 --- a/openair2/RRC/LITE/rrc_common.c +++ b/openair2/RRC/LITE/rrc_common.c @@ -392,7 +392,7 @@ rrc_rx_tx( current_timestamp_ms, ctxt_pP->frame, estimated_distance); - LOG_D(LOCALIZE, " RRC status %d\n", ue_context_p->ue_context.Status); + LOG_D(LOCALIZE, " RRC status %d\n", ue_context_p->ue_context.StatusRrc); push_front(&RC.rrc[ctxt_pP->module_id]->loc_list, estimated_distance); RC.rrc[ctxt_pP->module_id]->reference_timestamp_ms = current_timestamp_ms; diff --git a/openair2/RRC/NR/nr_rrc_defs.h b/openair2/RRC/NR/nr_rrc_defs.h index 480f0414d5..5efb2e1e64 100644 --- a/openair2/RRC/NR/nr_rrc_defs.h +++ b/openair2/RRC/NR/nr_rrc_defs.h @@ -317,7 +317,7 @@ typedef struct gNB_RRC_UE_s { NR_CipheringAlgorithm_t ciphering_algorithm; e_NR_IntegrityProtAlgorithm integrity_algorithm; - uint8_t status; + uint8_t StatusRrc; rnti_t rnti; uint64_t random_ue_identity; diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index 9ae3724dec..1788ecf0fa 100755 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -687,7 +687,7 @@ rrc_gNB_process_RRCSetupComplete( PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP)); ue_context_pP->ue_context.Srb1.Active = 1; ue_context_pP->ue_context.Srb1.Srb_info.Srb_id = 1; - ue_context_pP->ue_context.status = NR_RRC_CONNECTED; + ue_context_pP->ue_context.StatusRrc = NR_RRC_CONNECTED; if (AMF_MODE_ENABLED) { rrc_gNB_send_NGAP_NAS_FIRST_REQ(ctxt_pP, ue_context_pP, rrcSetupComplete); @@ -1495,7 +1495,7 @@ rrc_gNB_process_RRCConnectionReestablishmentComplete( uint8_t next_xid = rrc_gNB_get_next_transaction_identifier(ctxt_pP->module_id); int ret = 0; - ue_context_pP->ue_context.status = NR_RRC_CONNECTED; + ue_context_pP->ue_context.StatusRrc = NR_RRC_CONNECTED; ue_context_pP->ue_context.ue_rrc_inactivity_timer = 1; // set rrc inactivity when UE goes into RRC_CONNECTED ue_context_pP->ue_context.reestablishment_xid = next_xid; SRB_configList2 = &ue_context_pP->ue_context.SRB_configList2[xid]; @@ -1990,7 +1990,7 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP, } #endif //c-plane not end - if((ue_context_p->ue_context.status != NR_RRC_RECONFIGURED) && (ue_context_p->ue_context.reestablishment_cause == NR_ReestablishmentCause_spare1)) { + if((ue_context_p->ue_context.StatusRrc != NR_RRC_RECONFIGURED) && (ue_context_p->ue_context.reestablishment_cause == NR_ReestablishmentCause_spare1)) { LOG_E(NR_RRC, PROTOCOL_NR_RRC_CTXT_UE_FMT" NR_RRCReestablishmentRequest (UE %x c-plane is not end), RRC establishment failed \n", PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP),c_rnti); @@ -2002,9 +2002,9 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP, LOG_E(NR_RRC, PROTOCOL_NR_RRC_CTXT_UE_FMT" RRRCReconfigurationComplete(Previous) don't receive, delete the Previous UE,\nprevious Status %d, new Status NR_RRC_RECONFIGURED\n", PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP), - ue_context_p->ue_context.status + ue_context_p->ue_context.StatusRrc ); - ue_context_p->ue_context.status = NR_RRC_RECONFIGURED; + ue_context_p->ue_context.StatusRrc = NR_RRC_RECONFIGURED; protocol_ctxt_t ctxt_old_p; PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt_old_p, ctxt_pP->instance, diff --git a/openair2/RRC/NR/rrc_gNB_NGAP.c b/openair2/RRC/NR/rrc_gNB_NGAP.c index fb1533c518..482f228fdb 100644 --- a/openair2/RRC/NR/rrc_gNB_NGAP.c +++ b/openair2/RRC/NR/rrc_gNB_NGAP.c @@ -579,7 +579,7 @@ rrc_gNB_process_NGAP_INITIAL_CONTEXT_SETUP_REQ( } // in case, send the S1SP initial context response if it is not sent with the attach complete message - if (ue_context_p->ue_context.status == NR_RRC_RECONFIGURED) { + if (ue_context_p->ue_context.StatusRrc == NR_RRC_RECONFIGURED) { LOG_I(NR_RRC, "Sending rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP, cause %ld\n", ue_context_p->ue_context.reestablishment_cause); rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP(&ctxt,ue_context_p); } From d62f92c6a737ed0f3081e21a28aa689225d90ec4 Mon Sep 17 00:00:00 2001 From: Thomas Schlichter Date: Thu, 20 May 2021 18:32:51 +0200 Subject: [PATCH 390/579] NR_UE: remove several unused structures from PHY layer --- openair1/PHY/defs_nr_UE.h | 13 -- openair1/PHY/impl_defs_nr.h | 287 ++---------------------------------- 2 files changed, 9 insertions(+), 291 deletions(-) diff --git a/openair1/PHY/defs_nr_UE.h b/openair1/PHY/defs_nr_UE.h index 026a242053..0625c6b050 100644 --- a/openair1/PHY/defs_nr_UE.h +++ b/openair1/PHY/defs_nr_UE.h @@ -963,22 +963,9 @@ typedef struct { //#if defined(UPGRADE_RAT_NR) #if 1 - SystemInformationBlockType1_nr_t systemInformationBlockType1_nr; - - CellGroupConfig_t cell_group_config; - PDSCH_ServingCellConfig_t PDSCH_ServingCellConfig; - PUCCH_ConfigCommon_nr_t pucch_config_common_nr[NUMBER_OF_CONNECTED_gNB_MAX]; PUCCH_Config_t pucch_config_dedicated_nr[NUMBER_OF_CONNECTED_gNB_MAX]; - - SRS_NR srs; - - crossCarrierSchedulingConfig_t crossCarrierSchedulingConfig; - supplementaryUplink_t supplementaryUplink; - csi_MeasConfig_t csi_MeasConfig; - PUSCH_ServingCellConfig_t PUSCH_ServingCellConfig; - #endif uint8_t ncs_cell[20][7]; diff --git a/openair1/PHY/impl_defs_nr.h b/openair1/PHY/impl_defs_nr.h index f4d53f0bf7..93dbf513e8 100644 --- a/openair1/PHY/impl_defs_nr.h +++ b/openair1/PHY/impl_defs_nr.h @@ -339,68 +339,22 @@ typedef struct { * ************************************************************************/ -/* FFS TODO_NR partial structure that should be complete */ - -typedef enum { - semiStatic = 0, - dynamic = 1 -} pdsch_HARQ_ACK_Codebook_t; - - -////////////////////////////////////////////////////////////////////////////////################################ #define MAX_NR_RATE_MATCH_PATTERNS 4 #define MAX_NR_ZP_CSI_RS_RESOURCES 32 #define MAX_NR_OF_DL_ALLOCATIONS 16 #define MAX_NR_OF_UL_ALLOCATIONS (16) -typedef enum{ - dl_resourceAllocationType0 = 1, - dl_resourceAllocationType1 = 2, - dl_dynamicSwitch = 3 -} dl_resourceAllocation_t; -typedef enum{ - dl_rgb_config1 = 1, - dl_rgb_config2 = 2 -} dl_rgb_Size_t; typedef enum { - st_n4 = 1, - st_wideband = 2 -} static_bundleSize_t; -typedef enum { - dy_1_n4 = 1, - dy_1_wideband = 2, - dy_1_n2_wideband = 3, - dy_1_n4_wideband = 4 -} bundleSizeSet1_t; -typedef enum { - dy_2_n4 = 1, - dy_2_wideband = 2, -} bundleSizeSet2_t; -typedef struct{ - bundleSizeSet1_t bundleSizeSet1; - bundleSizeSet2_t bundleSizeSet2; -} dynamic_bundleSize_t; -typedef struct { - static_bundleSize_t staticBundling; - dynamic_bundleSize_t dynamicBundlig; -} prb_bundleType_t; -typedef enum { - nb_code_n1 = 1, - nb_code_n2 = 2 -} maxNrofCodeWordsScheduledByDCI_t; -typedef struct{ -// to be defined FIXME!!! -}rateMatchPattern_t; -typedef struct{ -// to be defined FIXME!!! -}zp_CSI_RS_Resource_t; + typeA = 0, + typeB = 1 +} mappingType_t; -typedef struct{ - int k0; - int mappingType; - int startSymbolAndLength; - -}PDSCH_TimeDomainResourceAllocation_t; +typedef enum { + pdsch_dmrs_pos0 = 0, + pdsch_dmrs_pos1 = 1, + pdsch_dmrs_pos2 = 2, + pdsch_dmrs_pos3 = 3, +} pdsch_dmrs_AdditionalPosition_t; /*********************************************************************** * @@ -410,99 +364,20 @@ typedef struct{ * ************************************************************************/ - -typedef enum { - enable_tpc_accumulation = 0, /* by default it is enable */ - disable_tpc_accumulation = 1 -} tpc_Accumulation_t; - -typedef enum { - typeA = 0, - typeB = 1 -} mappingType_t; - -typedef struct { - tpc_Accumulation_t tpc_Accumulation; -} PUSCH_PowerControl_t; - -typedef struct { - - uint8_t k2; - mappingType_t mappingType; - uint8_t startSymbolAndLength; -} PUSCH_TimeDomainResourceAllocation_t; -////////////////////////////////////////////////////////////////////////////////################################ -typedef enum{ - maxCodeBlockGroupsPerTransportBlock_n2 = 2, - maxCodeBlockGroupsPerTransportBlock_n4 = 4, - maxCodeBlockGroupsPerTransportBlock_n6 = 6, - maxCodeBlockGroupsPerTransportBlock_n8 = 8 -} maxCodeBlockGroupsPerTransportBlock_t; -typedef struct{ // The IE PUSCH-ServingCellConfig is used to configure UE specific PUSCH parameters that are common across the UE's BWPs of one serving cell - maxCodeBlockGroupsPerTransportBlock_t maxCodeBlockGroupsPerTransportBlock; -} PUSCH_ServingCellConfig_t; -typedef struct{ // CSI-MeasConfig IE is used to configure CSI-RS (reference signals) - uint8_t reportTriggerSize; -} csi_MeasConfig_t; typedef enum { pusch_dmrs_type1 = 0, pusch_dmrs_type2 = 1 } pusch_dmrs_type_t; -typedef enum { - pdsch_dmrs_pos0 = 0, - pdsch_dmrs_pos1 = 1, - pdsch_dmrs_pos2 = 2, - pdsch_dmrs_pos3 = 3, -} pdsch_dmrs_AdditionalPosition_t; typedef enum { pusch_dmrs_pos0 = 0, pusch_dmrs_pos1 = 1, pusch_dmrs_pos2 = 2, pusch_dmrs_pos3 = 3, } pusch_dmrs_AdditionalPosition_t; -typedef enum { - offset00 = 0, - offset01 = 1, - offset10 = 2, - offset11 = 3, -} ptrs_resource_elementoffset_t; typedef enum { pusch_len1 = 1, pusch_len2 = 2 } pusch_maxLength_t; -typedef struct { - uint8_t ptrs_mcs1; - uint8_t ptrs_mcs2; - uint8_t ptrs_mcs3; -} ptrs_time_density_t; -typedef struct { - uint16_t n_rb0; - uint16_t n_rb1; -} ptrs_frequency_density_t; -typedef struct { -/* - * Serving cell ID of a PSCell. The PCell of the Master Cell Group uses ID = 0 - */ - uint8_t servCellIndex; -}servCellIndex_t; -typedef struct{ - uint8_t cif_presence; -}own_t; -typedef struct{ - servCellIndex_t scheduling_cell_id; - uint8_t cif_InSchedulingCell; -}other_t; -typedef struct{ - own_t own; - other_t other; -}schedulingCellInfo_t; -typedef struct{ - schedulingCellInfo_t schedulingCellInfo; -} crossCarrierSchedulingConfig_t; -typedef struct{ - // this variable will be filled with '1' if SUL is supported and '0' if SUL is not supported - uint8_t supplementaryUplink; -}supplementaryUplink_t; typedef enum { txConfig_codebook = 1, @@ -761,150 +636,6 @@ typedef struct { PUCCH_PowerControl_t pucch_PowerControl; } PUCCH_Config_t; -/*********************************************************************** -* -* FUNCTIONALITY : PhysicalCellGroupConfig -* -* DESCRIPTION : Physical cell group configuration -* -************************************************************************/ - -typedef uint16_t RNTI_value_t; - -typedef struct { -/* - -- Enables spatial bundling of HARQ ACKs. It is configured per cell group (i.e. for all the cells within the cell group) for PUCCH - -- reporting of HARQ-ACK. It is only applicable when more than 4 layers are possible to schedule. - -- Corresponds to L1 parameter 'HARQ-ACK-spatial-bundling' (see 38.213, section FFS_Section) - -- Absence indicates that spatial bundling is disabled. -*/ - bool harq_ACK_SpatialBundlingPUCCH; -/* - -- Enables spatial bundling of HARQ ACKs. It is configured per cell group (i.e. for all the cells within the cell group) for PUSCH - -- reporting of HARQ-ACK. It is only applicable when more than 4 layers are possible to schedule. - -- Corresponds to L1 parameter 'HARQ-ACK-spatial-bundling' (see 38.213, section FFS_Section) - -- Absence indicates that spatial bundling is disabled. -*/ - bool harq_ACK_SpatialBundlingPUSCH; -/* - -- The maximum transmit power to be used by the UE in this NR cell group. -*/ - uint8_t p_NR; -/* - -- The PDSCH HARQ-ACK codebook is either semi-static of dynamic. This is applicable to both CA and none CA operation. - -- Corresponds to L1 parameter 'HARQ-ACK-codebook' (see 38.213, section FFS_Section) -*/ - pdsch_HARQ_ACK_Codebook_t pdsch_HARQ_ACK_Codebook; -/* - -- RNTI used for SRS TPC commands on DCI. Corresponds to L1 parameter 'TPC-SRS-RNTI' (see 38.213, section 10) -*/ - RNTI_value_t tpc_SRS_RNTI; -/* - -- RNTI used for PUCCH TPC commands on DCI. Corresponds to L1 parameter 'TPC-PUCCH-RNTI' (see 38.213, section 10). -*/ - RNTI_value_t tpc_PUCCH_RNTI; -/* - -- RNTI used for PUSCH TPC commands on DCI. Corresponds to L1 parameter 'TPC-PUSCH-RNTI' (see 38.213, section 10) -*/ - RNTI_value_t tpc_PUSCH_RNTI; -} PhysicalCellGroupConfig_t; - -/*********************************************************************** -* -* FUNCTIONALITY : CellGroupConfig -* -* DESCRIPTION : Cell Group configuration -* -************************************************************************/ - -/* FFS TODO_NR partial structure that should be complete */ - -typedef struct { -/* - cellGroupId CellGroupId, - - -- Logical Channel configuration and association with radio bearers: - rlc-BearerToAddModList SEQUENCE (SIZE(1..maxLC-ID)) OF RLC-Bearer-Config OPTIONAL, -- Need N - rlc-BearerToReleaseList SEQUENCE (SIZE(1..maxLC-ID)) OF LogicalChannelIdentity OPTIONAL, -- Need N - - -- Parameters applicable for the entire cell group: - mac-CellGroupConfig MAC-CellGroupConfig OPTIONAL, -- Need M -*/ - PhysicalCellGroupConfig_t physicalCellGroupConfig; -/* - -- Serving Cell specific parameters (SpCell and SCells) - spCellConfig SpCellConfig OPTIONAL, -- Need M - sCellToAddModList SEQUENCE (SIZE (1..maxNrofSCells)) OF SCellConfig OPTIONAL, -- Need N - -- List of seconary serving cells to be released (not applicable for SpCells) - sCellToReleaseList SEQUENCE (SIZE (1..maxNrofSCells)) OF SCellIndex OPTIONAL, -- Need N - ... - */ -} CellGroupConfig_t; - -/*********************************************************************** -* -* FUNCTIONALITY : PDSCH_ServingCellConfig -* -* DESCRIPTION : pdsch serving cell configuration -* -************************************************************************/ - -/* FFS TODO_NR partial structure that should be complete */ - -typedef int PDSCH_CodeBlockGroupTransmission_t; /* dummy struct which should be change by correct structure */ - -typedef enum { - xOh6 = 0, - xOh12 = 1, - xOh18 = 2 -} xOverhead_t; - -typedef enum { - n2_dl_harq = 2, - n4_dl_harq = 4, - n6_dl_harq = 6, - n10_dl_harq = 10, - n12_dl_harq = 12, - n16_dl_harq = 16 -} nrofHARQ_ProcessesForPDSCH_t; -typedef enum{ - maxCodeBlockGroupsPerTransportBlock_dl_n2 = 2, - maxCodeBlockGroupsPerTransportBlock_dl_n4 = 4, - maxCodeBlockGroupsPerTransportBlock_dl_n6 = 6, - maxCodeBlockGroupsPerTransportBlock_dl_n8 = 8 -} maxCodeBlockGroupsPerTransportBlock_dl_t; - -typedef struct { -/* - -- Enables and configures code-block-group (CBG) based transmission (see 38.213, section 9.1.1) -*/ - PDSCH_CodeBlockGroupTransmission_t *codeBlockGroupTransmission; -/* - -- Accounts for overhead from CSI-RS, CORESET, etc. If the field is absent, the UE applies value xOh0. - -- Corresponds to L1 parameter 'Xoh-PDSCH' (see 38.214, section 5.1.3.2) -*/ - xOverhead_t xOverhead; -/* - -- The number of HARQ processes to be used on the PDSCH of a serving cell. n2 corresponds to 2 HARQ processes, n4 to 4 HARQ processes - -- and so on. If the field is absent, the UE uses 8 HARQ processes. - -- Corresponds to L1 parameter 'number-HARQ-process-PDSCH' (see 38.214, section REF) -*/ - nrofHARQ_ProcessesForPDSCH_t nrofHARQ_ProcessesForPDSCH; -/* - -- The ID of the serving cell (of the same cell group) to use for PUCCH. - -- If the field is absent, the UE sends the HARQ feedback on the PUCCH of the SpCell of this cell group. -*/ - uint8_t pucch_Cell; -/* - * maxCodeBlockGroupsPerTransportBlock_dl_t - */ - maxCodeBlockGroupsPerTransportBlock_dl_t maxCodeBlockGroupsPerTransportBlock_dl; -/* - * codeBlockGroupFlushIndicator (boolean) - */ - uint8_t codeBlockGroupFlushIndicator; -} PDSCH_ServingCellConfig_t; - /*********************************************************************** * * FUNCTIONALITY : Scheduling Request Configuration (SR) From 581c0f062a90b2bff8e8a0af00afd8a96516af56 Mon Sep 17 00:00:00 2001 From: Thomas Schlichter Date: Thu, 20 May 2021 19:03:14 +0200 Subject: [PATCH 391/579] update FEATURE_SET.md --- doc/FEATURE_SET.md | 44 ++++++++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/doc/FEATURE_SET.md b/doc/FEATURE_SET.md index 2171fc2f1f..7c202dc52d 100644 --- a/doc/FEATURE_SET.md +++ b/doc/FEATURE_SET.md @@ -257,7 +257,7 @@ The following features are valid for the gNB and the 5G-NR UE. * FDD * Normal CP * 30 kHz subcarrier spacing -* Bandwidths up to 80MHz (217 Physical Resource Blocks) +* Bandwidths: 10, 20, 40, 80, 100MHz (273 Physical Resource Blocks) * Intermediate downlink and uplink frequencies to interface with IF equipment * Single antenna port (single beam) * Slot format: 14 OFDM symbols in UL or DL @@ -277,10 +277,20 @@ The following features are valid for the gNB and the 5G-NR UE. - user-specific search space configured by RRC - DCI formats: 00, 10 (01 and 11 **under integration**) * Generation of NR-PDSCH (including Segmentation, LDPC encoding, rate matching, scrambling, modulation, RB mapping, etc). - - Single symbol DMRS, DMRS-TypeA-Position Pos2, DMRS configuration type 1 - - PDSCH mapping type A + - PDSCH mapping type A and B + - DMRS configuration type 1 and 2 + - Single and multiple DMRS symbols + - PTRS support + - Support for 1, 2 and 4 TX antennas + - Support for up to 2 layers (currently limited to DMRS configuration type 2) * NR-CSI Generation of sequence at PHY (**under integration**) * NR-PUSCH (including Segmentation, LDPC encoding, rate matching, scrambling, modulation, RB mapping, etc). + - PUSCH mapping type A and B + - DMRS configuration type 1 and 2 + - Single and multiple DMRS symbols + - PTRS support + - Support for 1 RX antenna + - Support for 1 layer * NR-PUCCH - Format 0 (2 bits, mainly for ACK/NACK) - Format 2 (up to 64 bits, mainly for CSI feedback) @@ -320,27 +330,33 @@ The following features are valid for the gNB and the 5G-NR UE. - Creates TUN interface to PDCP to inject and receive user-place traffic - Will only work with OAI gNB configured in the same mode -## UE PHY Layer ## +## NR UE PHY Layer ## * Initial synchronization * Time tracking based on PBCH DMRS -* Time tracking based on PBCH DMRS * Frequency offset estimation -* PBCH RX -* PDCCH RX -* PDSCH RX, including a first version of dual stream receiver for PDSCH * 30KHz SCS for FR1 and 120 KHz SCS for FR2 -* Generation of NR-PSS/NR-SSS +* Reception of NR-PSS/NR-SSS * NR-PBCH supports multiple SSBs and flexible periodicity -* Generation of NR-PDCCH for SIB1 (including generation of DCI, polar encoding, scrambling, modulation, RB mapping, etc) +* Reception of NR-PDCCH for SIB1 (including reception of DCI, polar decoding, de-scrambling, de-modulation, RB de-mapping, etc) - common search space configured by MIB - user-specific search space configured by RRC - DCI formats: 00, 10 (01 and 11 **under integration**) -* Generation of NR-PDSCH (including Segmentation, LDPC encoding, rate matching, scrambling, modulation, RB mapping, etc). - - Single symbol DMRS, DMRS-TypeA-Position Pos2, DMRS configuration type 1 - - PDSCH mapping type A +* Reception of NR-PDSCH (including Segmentation, LDPC decoding, rate de-matching, de-scrambling, de-modulation, RB de-mapping, etc). + - PDSCH mapping type A and B + - DMRS configuration type 1 and 2 + - Single and multiple DMRS symbols + - PTRS support + - Support for 1, 2 and 4 RX antennas + - Support for up to 2 layers (currently limited to DMRS configuration type 2) * NR-CSI Generation of sequence at PHY (**under integration**) * NR-PUSCH (including Segmentation, LDPC encoding, rate matching, scrambling, modulation, RB mapping, etc). + - PUSCH mapping type A and B + - DMRS configuration type 1 and 2 + - Single and multiple DMRS symbols + - PTRS support + - Support for 1 TX antenna + - Support for 1 layer * NR-PUCCH - Format 0 (2 bits, mainly for ACK/NACK) - Format 2 (up to 64 bits, mainly for CSI feedback) @@ -351,7 +367,7 @@ The following features are valid for the gNB and the 5G-NR UE. * Encoder and decoder for short block -## UE Higher Layers ## +## NR UE Higher Layers ## **UE MAC** * Minimum system information (MSI) From f2c564444a574f87e2d95a7515269086c266f79d Mon Sep 17 00:00:00 2001 From: hardy Date: Fri, 21 May 2021 09:59:19 +0200 Subject: [PATCH 392/579] fix nsa benetel testcase (not correctly merged) --- ci-scripts/xml_files/benetel_nsa_quectel.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-scripts/xml_files/benetel_nsa_quectel.xml b/ci-scripts/xml_files/benetel_nsa_quectel.xml index 442ad0e92f..ed93f59e81 100644 --- a/ci-scripts/xml_files/benetel_nsa_quectel.xml +++ b/ci-scripts/xml_files/benetel_nsa_quectel.xml @@ -35,7 +35,7 @@ 000001 070000 000001 - 070000 + 070001 000001 010002 000001 From c19ba39eaae497e6a80e5794ed74a23eb13ef9b7 Mon Sep 17 00:00:00 2001 From: hardy Date: Fri, 21 May 2021 16:15:44 +0200 Subject: [PATCH 393/579] reverted from MR1153 to make Benetel UL traffic run ok --- ci-scripts/conf_files/benetel-5g.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-scripts/conf_files/benetel-5g.conf b/ci-scripts/conf_files/benetel-5g.conf index 5cf0eca629..9adead3a68 100644 --- a/ci-scripts/conf_files/benetel-5g.conf +++ b/ci-scripts/conf_files/benetel-5g.conf @@ -126,7 +126,7 @@ gNBs = # pusch-ConfigCommon (up to 16 elements) initialULBWPk2_0 = 2; # used for UL slot initialULBWPmappingType_0 = 1 - initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13 + initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12 initialULBWPk2_1 = 2; # used for mixed slot initialULBWPmappingType_1 = 1; From 56def3a18e936249979928ab19ef7176ed28d194 Mon Sep 17 00:00:00 2001 From: francescomani Date: Fri, 21 May 2021 17:11:09 +0200 Subject: [PATCH 394/579] fixing bugs in pucch ue functions --- openair1/SCHED_NR_UE/pucch_uci_ue_nr.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c index 0455c481d5..0cb0546dfe 100644 --- a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c +++ b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c @@ -497,7 +497,8 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_ pucch_resource_set = find_pucch_resource_set( mac, gNB_id, N_UCI); if (pucch_resource_set != MAX_NB_OF_PUCCH_RESOURCE_SETS) { pucch_resource_indicator = 0; - pucch_resource_id = mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->resourceSetToAddModList->list.array[pucch_resource_set]->resourceList.list.array[pucch_resource_indicator][0]; /* get the first resource of the set */ + /* get the first resource of the set */ + pucch_resource_id = mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->resourceSetToAddModList->list.array[pucch_resource_set]->resourceList.list.array[pucch_resource_indicator][0]; } else { LOG_W(PHY,"PUCCH no resource set found for CSI at line %d in function %s of file %s \n", LINE_FILE , __func__, FILE_NAME); @@ -639,7 +640,6 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_ int O_CRC = 0; nb_symbols = nb_symbols_total; /* by default, it can be reduced due to symbols reserved for dmrs */ - pucch_resource = mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->resourceToAddModList->list.array[pucch_resource_id]; switch(format) { case pucch_format0_nr: @@ -1122,7 +1122,7 @@ boolean_t select_pucch_resource(PHY_VARS_NR_UE *ue, NR_UE_MAC_INST_t *mac, uint8 int current_resource_id = MAX_NB_OF_PUCCH_RESOURCES; pucch_format_nr_t format_pucch; int ready_pucch_resource_id = FALSE; /* in the case that it is already given */ - NR_PUCCH_Resource_t *pucch_resource; + NR_PUCCH_Resource_t *pucch_resource = NULL; NR_BWP_Id_t bwp_id = mac->UL_BWP_Id; /* ini values to unset */ @@ -1193,6 +1193,7 @@ boolean_t select_pucch_resource(PHY_VARS_NR_UE *ue, NR_UE_MAC_INST_t *mac, uint8 } if (resource_set_found == TRUE) { + if (pucch_resource_indicator < MAX_PUCCH_RESOURCE_INDICATOR) { // Verify that the value of pucch_resource_indicator is valid if (mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->resourceSetToAddModList->list.array[pucch_resource_set_id]->resourceList.list.count <= pucch_resource_indicator) @@ -1202,7 +1203,6 @@ boolean_t select_pucch_resource(PHY_VARS_NR_UE *ue, NR_UE_MAC_INST_t *mac, uint8 } /* check if resource indexing by pucch_resource_indicator of this set is compatible */ if ((ready_pucch_resource_id == TRUE) || (mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->resourceSetToAddModList->list.array[pucch_resource_set_id]->resourceList.list.array[pucch_resource_indicator][0] != MAX_NB_OF_PUCCH_RESOURCES)) { - if (ready_pucch_resource_id == TRUE) { current_resource_id = *resource_id; } @@ -1236,17 +1236,14 @@ boolean_t select_pucch_resource(PHY_VARS_NR_UE *ue, NR_UE_MAC_INST_t *mac, uint8 } } - /*uint8_t pucch_resource_count = mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->resourceToAddModList.list.count; + uint8_t pucch_resource_count = mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->resourceToAddModList->list.count; for (uint8_t i=0; iULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->resourceToAddModList.list.array[i]->pucch_ResourceId == current_resource_id) - pucch_resource = mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->resourceToAddModList.list.array[i]; - }*/ - - pucch_resource = mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->resourceToAddModList->list.array[current_resource_id]; + if (mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->resourceToAddModList->list.array[i]->pucch_ResourceId == current_resource_id) + pucch_resource = mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->resourceToAddModList->list.array[i]; + } if (pucch_resource != NULL) { - format_pucch = mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->resourceToAddModList->list.array[current_resource_id]->format.present; + format_pucch = pucch_resource->format.present; nb_symbols_for_tx = get_nb_symbols_pucch(pucch_resource, format_pucch); - if (check_pucch_format(mac, gNB_id, format_pucch, nb_symbols_for_tx, uci_size) == TRUE) { *resource_set_id = pucch_resource_set_id; *resource_id = current_resource_id; From 1c440be48eab8196aa920c05f9209f503d323e34 Mon Sep 17 00:00:00 2001 From: Thomas Schlichter Date: Fri, 21 May 2021 17:57:34 +0200 Subject: [PATCH 395/579] NR_UE: in nr_ue_dlsch_procedures() use TimeDomainAllocationList from bwp_Common if there is none in bwp_Dedicated --- openair1/SCHED_NR_UE/phy_procedures_nr_ue.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c index b8bbc0b5d4..fe65019e3e 100644 --- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c +++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c @@ -1179,13 +1179,21 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue, NR_UE_MAC_INST_t *mac = get_mac_inst(0); NR_BWP_Id_t ul_bwp_id = mac->UL_BWP_Id; - NR_PUSCH_Config_t *pusch_Config = mac->ULbwp[ul_bwp_id-1]->bwp_Dedicated->pusch_Config->choice.setup; - NR_PUSCH_TimeDomainResourceAllocationList_t *pusch_TimeDomainAllocationList = pusch_Config->pusch_TimeDomainAllocationList->choice.setup; + NR_PUSCH_TimeDomainResourceAllocationList_t *pusch_TimeDomainAllocationList = NULL; + if (mac->ULbwp[ul_bwp_id-1]->bwp_Dedicated->pusch_Config->choice.setup->pusch_TimeDomainAllocationList) + pusch_TimeDomainAllocationList = mac->ULbwp[ul_bwp_id-1]->bwp_Dedicated->pusch_Config->choice.setup->pusch_TimeDomainAllocationList->choice.setup; + else if (mac->ULbwp[ul_bwp_id-1]->bwp_Common->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList) + pusch_TimeDomainAllocationList = mac->ULbwp[ul_bwp_id-1]->bwp_Common->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList; long mapping_type_ul = pusch_TimeDomainAllocationList->list.array[0]->mappingType; NR_BWP_Id_t dl_bwp_id = mac->DL_BWP_Id; NR_PDSCH_Config_t *pdsch_Config = mac->DLbwp[dl_bwp_id-1]->bwp_Dedicated->pdsch_Config->choice.setup; - NR_PDSCH_TimeDomainResourceAllocationList_t *pdsch_TimeDomainAllocationList = pdsch_Config->pdsch_TimeDomainAllocationList->choice.setup; + NR_PDSCH_TimeDomainResourceAllocationList_t *pdsch_TimeDomainAllocationList = NULL; + if (pdsch_Config->pdsch_TimeDomainAllocationList) { + pdsch_TimeDomainAllocationList = pdsch_Config->pdsch_TimeDomainAllocationList->choice.setup; + } else if (mac->DLbwp[dl_bwp_id-1]->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList) { + pdsch_TimeDomainAllocationList = mac->DLbwp[dl_bwp_id-1]->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList; + } long mapping_type_dl = pdsch_TimeDomainAllocationList->list.array[0]->mappingType; NR_DMRS_DownlinkConfig_t *NR_DMRS_dlconfig; From fe09b529b3640bad730d42fa6623b4662b2b8d1b Mon Sep 17 00:00:00 2001 From: Francesco Mani Date: Sat, 22 May 2021 06:22:42 +0000 Subject: [PATCH 396/579] Apply 1 suggestion(s) to 1 file(s) --- openair1/SCHED_NR_UE/pucch_uci_ue_nr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c index 0cb0546dfe..f6f331ec21 100644 --- a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c +++ b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c @@ -417,7 +417,7 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_ int dmrs_scrambling_id=0,data_scrambling_id=0; NR_UE_MAC_INST_t *mac = get_mac_inst(0); - NR_PUCCH_Resource_t *pucch_resource; + NR_PUCCH_Resource_t *pucch_resource = NULL; uint16_t crnti = mac->crnti; NR_BWP_Id_t bwp_id = mac->UL_BWP_Id; From e26c1f6f6d726f49c593195b663e3f7e3f90a2b3 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Sat, 22 May 2021 12:47:53 +0200 Subject: [PATCH 397/579] nr pdcp: bugfix: bad HFN computation at PDU reception --- openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c b/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c index 1822239171..91564f18b4 100644 --- a/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c +++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c @@ -77,7 +77,7 @@ static void nr_pdcp_entity_recv_pdu(nr_pdcp_entity_t *entity, } rx_deliv_sn = entity->rx_deliv & entity->sn_max; - rx_deliv_hfn = (entity->rx_deliv >> entity->sn_size) & ~entity->sn_max; + rx_deliv_hfn = entity->rx_deliv >> entity->sn_size; if (rcvd_sn < rx_deliv_sn - entity->window_size) { rcvd_hfn = rx_deliv_hfn + 1; From 02cedc0ca16c9baceae368aacbb16cb2a5b70f7d Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Sat, 22 May 2021 12:49:05 +0200 Subject: [PATCH 398/579] nr pdcp: bugfix: better nettle version detection This fix may fail to work. we should stop supporting old versions of nettle at some point. --- openair2/LAYER2/nr_pdcp/nr_pdcp_security_nea2.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_security_nea2.c b/openair2/LAYER2/nr_pdcp/nr_pdcp_security_nea2.c index fc07f661dd..52afe95673 100644 --- a/openair2/LAYER2/nr_pdcp/nr_pdcp_security_nea2.c +++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_security_nea2.c @@ -27,12 +27,21 @@ #include #include +#ifndef NETTLE_VERSION_MAJOR +/* hack: include bignum.h, not version.h because version.h does not exist + * in old versions and bignum.h includes version.h (as of today). + * May completely fail to work... maybe we should skip support of old + * versions of nettle. + */ +#include +#endif + void *nr_pdcp_security_nea2_init(unsigned char *ciphering_key) { void *ctx = calloc(1, nettle_aes128.context_size); if (ctx == NULL) exit(1); -#if NETTLE_VERSION_MAJOR < 3 +#if !defined(NETTLE_VERSION_MAJOR) || NETTLE_VERSION_MAJOR < 3 nettle_aes128.set_encrypt_key(ctx, 16, ciphering_key); #else nettle_aes128.set_encrypt_key(ctx, ciphering_key); From 824faeb163157a2852f08b06ebb930364d2f9c0f Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Sat, 22 May 2021 17:11:19 +0100 Subject: [PATCH 399/579] Avoid a segmentation fault in LTE when first_uci_stats is NULL --- openair1/PHY/LTE_TRANSPORT/pucch.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/openair1/PHY/LTE_TRANSPORT/pucch.c b/openair1/PHY/LTE_TRANSPORT/pucch.c index 585a9d92a5..3270066448 100644 --- a/openair1/PHY/LTE_TRANSPORT/pucch.c +++ b/openair1/PHY/LTE_TRANSPORT/pucch.c @@ -982,7 +982,14 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, break; } else if (first_uci_stats == NULL && eNB->uci_stats[i].rnti == 0) first_uci_stats = &eNB->uci_stats[i]; - if (uci_stats == NULL) { uci_stats=first_uci_stats; uci_stats->rnti = eNB->uci_vars[UCI_id].rnti;} + if (uci_stats == NULL) { + if (first_uci_stats == NULL) { + LOG_E(PHY,"first_uci_stats is NULL\n"); + return -1; + } + uci_stats=first_uci_stats; + uci_stats->rnti = eNB->uci_vars[UCI_id].rnti; + } AssertFatal(uci_stats!=NULL,"No stat index found\n"); uci_stats->frame = frame; From 08832facaae88a5c4e40e4c3e3678b02075b4205 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Mon, 24 May 2021 14:51:42 +0100 Subject: [PATCH 400/579] Fix setup parameters for F1U --- openair2/F1AP/f1ap_cu_task.c | 7 ++++++- openair2/F1AP/f1ap_du_task.c | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/openair2/F1AP/f1ap_cu_task.c b/openair2/F1AP/f1ap_cu_task.c index 24aec70b57..4e4ade111c 100644 --- a/openair2/F1AP/f1ap_cu_task.c +++ b/openair2/F1AP/f1ap_cu_task.c @@ -72,11 +72,16 @@ void cu_task_handle_sctp_association_resp(instance_t instance, sctp_new_associat f1ap_du_data_from_du->sctp_out_streams = sctp_new_association_resp->out_streams; /* setup parameters for F1U and start the server */ - const cudu_params_t params = { + const cudu_params_t params = RC.nrrrc[instance]->node_type == ngran_gNB_CU ? (cudu_params_t){ .local_ipv4_address = RC.nrrrc[instance]->eth_params_s.my_addr, .local_port = RC.nrrrc[instance]->eth_params_s.my_portd, .remote_ipv4_address = RC.nrrrc[instance]->eth_params_s.remote_addr, .remote_port = RC.nrrrc[instance]->eth_params_s.remote_portd + } : (cudu_params_t){ + .local_ipv4_address = RC.rrc[instance]->eth_params_s.my_addr, + .local_port = RC.rrc[instance]->eth_params_s.my_portd, + .remote_ipv4_address = RC.rrc[instance]->eth_params_s.remote_addr, + .remote_port = RC.rrc[instance]->eth_params_s.remote_portd }; AssertFatal(proto_agent_start(instance, ¶ms) == 0, "could not start PROTO_AGENT for F1U on instance %ld!\n", instance); diff --git a/openair2/F1AP/f1ap_du_task.c b/openair2/F1AP/f1ap_du_task.c index 934e8d4210..3e50e7816b 100644 --- a/openair2/F1AP/f1ap_du_task.c +++ b/openair2/F1AP/f1ap_du_task.c @@ -102,11 +102,16 @@ void du_task_handle_sctp_association_resp(instance_t instance, sctp_new_associat f1ap_du_data->default_sctp_stream_id = 0; /* setup parameters for F1U and start the server */ - const cudu_params_t params = { + const cudu_params_t params = RC.nrrrc[instance]->node_type == ngran_gNB_DU ? (cudu_params_t){ .local_ipv4_address = RC.nrmac[instance]->eth_params_n.my_addr, .local_port = RC.nrmac[instance]->eth_params_n.my_portd, .remote_ipv4_address = RC.nrmac[instance]->eth_params_n.remote_addr, .remote_port = RC.nrmac[instance]->eth_params_n.remote_portd + } : (cudu_params_t){ + .local_ipv4_address = RC.mac[instance]->eth_params_n.my_addr, + .local_port = RC.mac[instance]->eth_params_n.my_portd, + .remote_ipv4_address = RC.mac[instance]->eth_params_n.remote_addr, + .remote_port = RC.mac[instance]->eth_params_n.remote_portd }; AssertFatal(proto_agent_start(instance, ¶ms) == 0, "could not start PROTO_AGENT for F1U on instance %ld!\n", instance); From 6d311e9e63cfbee4c155192eeab99e10ad377910 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Mon, 24 May 2021 15:52:02 +0100 Subject: [PATCH 401/579] Avoid segmentation fault when RC.nrrrc is not present --- openair2/F1AP/f1ap_cu_interface_management.c | 4 ++-- openair2/F1AP/f1ap_cu_rrc_message_transfer.c | 6 +++--- openair2/F1AP/f1ap_cu_task.c | 4 ++-- openair2/F1AP/f1ap_du_interface_management.c | 4 ++-- openair2/F1AP/f1ap_du_rrc_message_transfer.c | 4 ++-- openair2/F1AP/f1ap_du_task.c | 4 ++-- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/openair2/F1AP/f1ap_cu_interface_management.c b/openair2/F1AP/f1ap_cu_interface_management.c index 4104fce837..2d393ad520 100644 --- a/openair2/F1AP/f1ap_cu_interface_management.c +++ b/openair2/F1AP/f1ap_cu_interface_management.c @@ -246,14 +246,14 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance, ); if (num_cells_available > 0) { - if (RC.nrrrc[0]->node_type == ngran_gNB_CU) { + if (RC.nrrrc && RC.nrrrc[0]->node_type == ngran_gNB_CU) { itti_send_msg_to_task(TASK_RRC_GNB, GNB_MODULE_ID_TO_INSTANCE(instance), message_p); } else { itti_send_msg_to_task(TASK_RRC_ENB, ENB_MODULE_ID_TO_INSTANCE(instance), message_p); } } else { CU_send_F1_SETUP_FAILURE(instance); - if (RC.nrrrc[0]->node_type == ngran_gNB_CU) { + if (RC.nrrrc && RC.nrrrc[0]->node_type == ngran_gNB_CU) { itti_free(TASK_RRC_GNB,message_p); } else { itti_free(TASK_RRC_ENB,message_p); diff --git a/openair2/F1AP/f1ap_cu_rrc_message_transfer.c b/openair2/F1AP/f1ap_cu_rrc_message_transfer.c index 1b1e8b1299..604cacb176 100644 --- a/openair2/F1AP/f1ap_cu_rrc_message_transfer.c +++ b/openair2/F1AP/f1ap_cu_rrc_message_transfer.c @@ -116,7 +116,7 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance, F1AP_ProtocolIE_ID_id_RRCContainer, true); AssertFatal(ie!=NULL,"RRCContainer is missing\n"); // create an ITTI message and copy SDU - if (RC.nrrrc[GNB_INSTANCE_TO_MODULE_ID(instance)]->node_type == ngran_gNB_CU) { + if (RC.nrrrc && RC.nrrrc[GNB_INSTANCE_TO_MODULE_ID(instance)]->node_type == ngran_gNB_CU) { message_p = itti_alloc_new_message (TASK_CU_F1, 0, NR_RRC_MAC_CCCH_DATA_IND); memset (NR_RRC_MAC_CCCH_DATA_IND (message_p).sdu, 0, CCCH_SDU_SIZE); ccch_sdu_len = ie->value.choice.RRCContainer.size; @@ -150,7 +150,7 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance, } // Find instance from nr_cellid int rrc_inst = -1; - if (RC.nrrrc[GNB_INSTANCE_TO_MODULE_ID(instance)]->node_type == ngran_gNB_CU) { + if (RC.nrrrc && RC.nrrrc[GNB_INSTANCE_TO_MODULE_ID(instance)]->node_type == ngran_gNB_CU) { for (int i=0;inode_type == ngran_gNB_CU) { + if (RC.nrrrc && RC.nrrrc[GNB_INSTANCE_TO_MODULE_ID(instance)]->node_type == ngran_gNB_CU) { NR_RRC_MAC_CCCH_DATA_IND (message_p).frame = 0; NR_RRC_MAC_CCCH_DATA_IND (message_p).sub_frame = 0; NR_RRC_MAC_CCCH_DATA_IND (message_p).sdu_size = ccch_sdu_len; diff --git a/openair2/F1AP/f1ap_cu_task.c b/openair2/F1AP/f1ap_cu_task.c index 4e4ade111c..b261d8e85b 100644 --- a/openair2/F1AP/f1ap_cu_task.c +++ b/openair2/F1AP/f1ap_cu_task.c @@ -72,7 +72,7 @@ void cu_task_handle_sctp_association_resp(instance_t instance, sctp_new_associat f1ap_du_data_from_du->sctp_out_streams = sctp_new_association_resp->out_streams; /* setup parameters for F1U and start the server */ - const cudu_params_t params = RC.nrrrc[instance]->node_type == ngran_gNB_CU ? (cudu_params_t){ + const cudu_params_t params = (RC.nrrrc && RC.nrrrc[instance]->node_type == ngran_gNB_CU) ? (cudu_params_t){ .local_ipv4_address = RC.nrrrc[instance]->eth_params_s.my_addr, .local_port = RC.nrrrc[instance]->eth_params_s.my_portd, .remote_ipv4_address = RC.nrrrc[instance]->eth_params_s.remote_addr, @@ -114,7 +114,7 @@ void cu_task_send_sctp_init_req(instance_t enb_id) { message_p->ittiMsg.sctp_init.ipv4 = 1; message_p->ittiMsg.sctp_init.ipv6 = 0; message_p->ittiMsg.sctp_init.nb_ipv4_addr = 1; - if (RC.nrrrc[0]->node_type == ngran_gNB_CU) { + if (RC.nrrrc && RC.nrrrc[0]->node_type == ngran_gNB_CU) { message_p->ittiMsg.sctp_init.ipv4_address[0] = inet_addr(RC.nrrrc[enb_id]->eth_params_s.my_addr); } else{ message_p->ittiMsg.sctp_init.ipv4_address[0] = inet_addr(RC.rrc[enb_id]->eth_params_s.my_addr); diff --git a/openair2/F1AP/f1ap_du_interface_management.c b/openair2/F1AP/f1ap_du_interface_management.c index e75580cece..39b4802cf6 100644 --- a/openair2/F1AP/f1ap_du_interface_management.c +++ b/openair2/F1AP/f1ap_du_interface_management.c @@ -600,7 +600,7 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance, 0,0,//MSC_AS_TIME_ARGS(ctxt_pP), assoc_id); - if (RC.nrrrc[0]->node_type == ngran_gNB_DU) { + if (RC.nrrrc && RC.nrrrc[0]->node_type == ngran_gNB_DU) { LOG_D(F1AP, "Sending F1AP_SETUP_RESP ITTI message to GNB_APP with assoc_id (%d->%d)\n", assoc_id,ENB_MODULE_ID_TO_INSTANCE(assoc_id)); itti_send_msg_to_task(TASK_GNB_APP, GNB_MODULE_ID_TO_INSTANCE(assoc_id), msg_p); @@ -1212,7 +1212,7 @@ int DU_handle_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, 0,0,//MSC_AS_TIME_ARGS(ctxt_pP), assoc_id); - if (RC.nrrrc[0]->node_type == ngran_gNB_DU) { + if (RC.nrrrc && RC.nrrrc[0]->node_type == ngran_gNB_DU) { LOG_D(F1AP, "Sending F1AP_GNB_CU_CONFIGURATION_UPDATE ITTI message to GNB_APP with assoc_id (%d->%d)\n", assoc_id,ENB_MODULE_ID_TO_INSTANCE(assoc_id)); itti_send_msg_to_task(TASK_GNB_APP, GNB_MODULE_ID_TO_INSTANCE(assoc_id), msg_p); diff --git a/openair2/F1AP/f1ap_du_rrc_message_transfer.c b/openair2/F1AP/f1ap_du_rrc_message_transfer.c index c820791094..f1c1684518 100644 --- a/openair2/F1AP/f1ap_du_rrc_message_transfer.c +++ b/openair2/F1AP/f1ap_du_rrc_message_transfer.c @@ -88,7 +88,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { - if (RC.nrrrc[instance]->node_type == ngran_gNB_DU) { + if (RC.nrrrc && RC.nrrrc[instance]->node_type == ngran_gNB_DU) { LOG_I(F1AP, "node is gNB DU, call DU_handle_DL_NR_RRC_MESSAGE_TRANSFER \n"); return DU_handle_DL_NR_RRC_MESSAGE_TRANSFER(instance, assoc_id, stream, pdu); } @@ -893,7 +893,7 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP, return -1; } - if (RC.nrrrc[module_idP]->node_type == ngran_gNB_DU) { + if (RC.nrrrc && RC.nrrrc[module_idP]->node_type == ngran_gNB_DU) { struct rrc_gNB_ue_context_s* ue_context_p = rrc_gNB_allocate_new_UE_context(RC.nrrrc[module_idP]); ue_context_p->ue_id_rnti = rntiP; ue_context_p->ue_context.rnti = rntiP; diff --git a/openair2/F1AP/f1ap_du_task.c b/openair2/F1AP/f1ap_du_task.c index 3e50e7816b..20e47ddaa5 100644 --- a/openair2/F1AP/f1ap_du_task.c +++ b/openair2/F1AP/f1ap_du_task.c @@ -102,7 +102,7 @@ void du_task_handle_sctp_association_resp(instance_t instance, sctp_new_associat f1ap_du_data->default_sctp_stream_id = 0; /* setup parameters for F1U and start the server */ - const cudu_params_t params = RC.nrrrc[instance]->node_type == ngran_gNB_DU ? (cudu_params_t){ + const cudu_params_t params = (RC.nrrrc && RC.nrrrc[instance]->node_type == ngran_gNB_DU) ? (cudu_params_t){ .local_ipv4_address = RC.nrmac[instance]->eth_params_n.my_addr, .local_port = RC.nrmac[instance]->eth_params_n.my_portd, .remote_ipv4_address = RC.nrmac[instance]->eth_params_n.remote_addr, @@ -201,7 +201,7 @@ void *F1AP_DU_task(void *arg) { case F1AP_UL_RRC_MESSAGE: // to rrc LOG_I(F1AP, "DU Task Received F1AP_UL_RRC_MESSAGE\n"); - if (RC.nrrrc[0]->node_type == ngran_gNB_DU) { + if (RC.nrrrc && RC.nrrrc[0]->node_type == ngran_gNB_DU) { DU_send_UL_NR_RRC_MESSAGE_TRANSFER(ITTI_MSG_DESTINATION_INSTANCE(received_msg), &F1AP_UL_RRC_MESSAGE(received_msg)); } else { From 2a0510e29dd85d072fd7e608c89683199e3165d4 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Mon, 24 May 2021 16:17:11 +0100 Subject: [PATCH 402/579] Fix num_dmrs_cdm_grps_no_data in allocate_dl_retransmission --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index acd91f829a..e1b46ccfa3 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -453,7 +453,8 @@ bool allocate_dl_retransmission(module_id_t module_id, int rbStart = NRRIV2PRBOFFSET(genericParameters->locationAndBandwidth, MAX_BWP_SIZE); NR_pdsch_semi_static_t *ps = &sched_ctrl->pdsch_semi_static; - const uint8_t num_dmrs_cdm_grps_no_data = ps->nrOfSymbols == 2 ? 1 : 2; + const long f = sched_ctrl->search_space->searchSpaceType->choice.ue_Specific->dci_Formats; + const uint8_t num_dmrs_cdm_grps_no_data = sched_ctrl->active_bwp ? (f ? 1 : (ps->nrOfSymbols == 2 ? 1 : 2)) : (ps->nrOfSymbols == 2 ? 1 : 2); int rbSize = 0; const int tda = sched_ctrl->active_bwp ? RC.nrmac[module_id]->preferred_dl_tda[sched_ctrl->active_bwp->bwp_Id][slot] : 1; From db4769bc359e66083cd38b745e59ae93811ed959 Mon Sep 17 00:00:00 2001 From: Xenofon Foukas Date: Mon, 24 May 2021 16:33:12 +0100 Subject: [PATCH 403/579] Fixes to L2NFAPI_NOS1 dataplane traffic forwarding This commit fixes a bug that makes the dataplane traffic of all the emulated UEs to go through the interface of the first UE (oaitun_ue1). The fix uses the last octet of the IP assigned to each UE to map it to its UE_id, which is then used to get its RNTI and the correct PDCP queue. For the emulator to work properly, the routing tables of the emulated UEs must also be set. This patch introduces a script (setup_routes.sh) in cmake_targets/tools that configures the routing tables. This script must be run at the UE host machine once the UEs have successfully attached, passing the number of emulated UEs as the argument. For example, in the case of 16 emulated UEs, one must run "./setup_routes.sh 16". --- cmake_targets/tools/setup_routes.sh | 13 +++++++++++++ openair2/LAYER2/PDCP_v10.1.0/pdcp.c | 8 +++++++- openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c | 7 ++++++- 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100755 cmake_targets/tools/setup_routes.sh diff --git a/cmake_targets/tools/setup_routes.sh b/cmake_targets/tools/setup_routes.sh new file mode 100755 index 0000000000..67fe250be7 --- /dev/null +++ b/cmake_targets/tools/setup_routes.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +for i in $(seq 1 $1); +do + let table=1000+$i + echo "sudo ip route add 10.0.1.0/24 dev oaitun_ue$i table $table" + sudo ip route add 10.0.1.0/24 dev oaitun_ue$i table $table + echo "sudo ip route add default via 10.0.1.1 dev oaitun_ue$i table $table" + sudo ip route add default via 10.0.1.1 dev oaitun_ue$i table $table + let octet=$i+1 + echo "sudo ip rule add from 10.0.1.$octet table $table" + sudo ip rule add from 10.0.1.$octet table $table +done diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c index 51d3cfc8f3..cddb666bfd 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c @@ -1081,7 +1081,13 @@ pdcp_data_ind( pdcpHead->inst = 1; } } // nfapi_mode - } + } else { + if (UE_NAS_USE_TUN) { + pdcpHead->inst = ctxt_pP->module_id; + } else if (ENB_NAS_USE_TUN) { + pdcpHead->inst = 0; + } + } } else { pdcpHead->rb_id = rb_id + (ctxt_pP->module_id * LTE_maxDRB); pdcpHead->inst = ctxt_pP->module_id; diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c index 8ff3c06cd4..cc44572abd 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c @@ -43,6 +43,7 @@ extern int otg_enabled; #include #include #include +#include #define rtf_put write #define rtf_get read @@ -222,7 +223,11 @@ int pdcp_fifo_read_input_sdus_fromtun (const protocol_ctxt_t *const ctxt_pP) { key = PDCP_COLL_KEY_DEFAULT_DRB_VALUE(ctxt.module_id, ctxt.rnti, ctxt.enb_flag); h_rc = hashtable_get(pdcp_coll_p, key, (void **)&pdcp_p); } else { // => ENB_NAS_USE_TUN - ctxt.rnti=pdcp_eNB_UE_instance_to_rnti[0]; + /* Get the IP from a packet */ + struct ip *ip_pack = (struct ip *) nl_rx_buf; + /* Use last octet of destination IP to get index of UE */ + int ue_indx = ((ip_pack->ip_dst.s_addr >> 24) - 2) % MAX_MOBILES_PER_ENB; + ctxt.rnti=pdcp_eNB_UE_instance_to_rnti[ue_indx]; ctxt.enb_flag=ENB_FLAG_YES; ctxt.module_id=0; key = PDCP_COLL_KEY_VALUE(ctxt.module_id, ctxt.rnti, ctxt.enb_flag, rab_id, SRB_FLAG_NO); From 145dd0c9bf42bf82ef7dc9c1f040b29b741df5cf Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Tue, 25 May 2021 12:32:03 +0100 Subject: [PATCH 404/579] Update condition to preconfigure DRB in phy-test mode --- openair2/LAYER2/NR_MAC_gNB/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/main.c b/openair2/LAYER2/NR_MAC_gNB/main.c index 23a5059355..9974c08a18 100644 --- a/openair2/LAYER2/NR_MAC_gNB/main.c +++ b/openair2/LAYER2/NR_MAC_gNB/main.c @@ -96,12 +96,12 @@ void mac_top_init_gNB(void) // These should be out of here later pdcp_layer_init(); - if(!(get_softmodem_params()->do_ra || get_softmodem_params()->sa) ) + if(IS_SOFTMODEM_NOS1 && get_softmodem_params()->phy_test) nr_DRB_preconfiguration(0x1234); rrc_init_nr_global_param(); - }else { + } else { RC.nrmac = NULL; } From fb413c8bde9433b605cefc954bfafdee6922d7ec Mon Sep 17 00:00:00 2001 From: francescomani Date: Fri, 21 May 2021 16:11:09 +0100 Subject: [PATCH 405/579] fixing bugs in pucch ue functions --- openair1/SCHED_NR_UE/pucch_uci_ue_nr.c | 71 ++++++++++++++------------ 1 file changed, 37 insertions(+), 34 deletions(-) diff --git a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c index dccd65436c..51ab488e6a 100644 --- a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c +++ b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c @@ -221,7 +221,7 @@ static float RSRP_meas_mapping_nr[98] -43 } ; - + long binary_search_float_nr( float elements[], @@ -476,33 +476,34 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_ mac->cg->spCellConfig->spCellConfigDedicated->csi_MeasConfig&& mac->cg->spCellConfig->spCellConfigDedicated->csi_MeasConfig->choice.setup) { NR_CSI_MeasConfig_t *csi_MeasConfig = mac->cg->spCellConfig->spCellConfigDedicated->csi_MeasConfig->choice.setup; - + uint16_t report_slot_csi =csi_MeasConfig->csi_ReportConfigToAddModList->list.array[0]->reportConfigType.choice.periodic->reportSlotConfig.choice.slots320; - - //if (mac->csirc->reportQuantity.choice.ssb_Index_RSRP){ + + //if (mac->csirc->reportQuantity.choice.ssb_Index_RSRP){ if (report_slot_csi == proc->nr_slot_tx) csi_status = get_csi_nr(mac, ue, gNB_id, &csi_payload); else csi_status = 0; //} - + O_CSI = cqi_status + ri_status + csi_status; - + /* Part - II */ /* if payload is empty or only negative SR -> no pucch transmission */ - + if(O_ACK == 0) { N_UCI = O_SR + O_CSI; if ((N_UCI == 0) || ((O_CSI == 0) && (sr_payload == 0))) { /* TS 38.213 9.2.4 UE procedure for reporting SR */ - NR_TST_PHY_PRINTF("PUCCH No feedback AbsSubframe %d.%d \n", frame_tx%1024, nr_slot_tx); - LOG_D(PHY,"PUCCH No feedback AbsSubframe %d.%d \n", frame_tx%1024, nr_slot_tx); - return (FALSE); + NR_TST_PHY_PRINTF("PUCCH No feedback AbsSubframe %d.%d \n", frame_tx%1024, nr_slot_tx); + LOG_D(PHY,"PUCCH No feedback AbsSubframe %d.%d \n", frame_tx%1024, nr_slot_tx); + return (FALSE); } else { /* a resource set and a resource should be find according to payload size */ pucch_resource_set = find_pucch_resource_set( mac, gNB_id, N_UCI); if (pucch_resource_set != MAX_NB_OF_PUCCH_RESOURCE_SETS) { pucch_resource_indicator = 0; + /* get the first resource of the set */ pucch_resource_id = mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->resourceSetToAddModList->list.array[pucch_resource_set]->resourceList.list.array[pucch_resource_indicator][0]; /* get the first resource of the set */ } else { @@ -510,7 +511,7 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_ O_CSI = 0; csi_payload = 0; } - + if (O_CSI == 0) { /* only SR has to be send */ /* in this case there is no DCI related to PUCCH parameters so pucch resource should be get from sr configuration */ @@ -528,7 +529,7 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_ } } - N_UCI = O_SR + O_ACK + O_CSI; + N_UCI = O_SR + O_ACK + O_CSI; if (N_UCI ==0) return(TRUE); /* Part - III */ @@ -680,7 +681,6 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_ int O_CRC = 0; nb_symbols = nb_symbols_total; /* by default, it can be reduced due to symbols reserved for dmrs */ - pucch_resource = format>1 ? mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->resourceToAddModList->list.array[pucch_resource_id] : 0; switch(format) { case pucch_format0_nr: @@ -867,18 +867,18 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_ mac->scc_SIB->uplinkConfigCommon->initialUplinkBWP.pucch_ConfigCommon->choice.setup->hoppingId[0]: mac->physCellId); nr_generate_pucch0(ue,ue->common_vars.txdataF, - &ue->frame_parms, - pucch_GroupHopping, - hoppingId, - tx_amp, - nr_slot_tx, - (uint8_t)m_0, - (uint8_t)m_CS, - nb_symbols_total, - starting_symbol_index, - startingPRB, - secondHopPRB - ); + &ue->frame_parms, + pucch_GroupHopping, + hoppingId, + tx_amp, + nr_slot_tx, + (uint8_t)m_0, + (uint8_t)m_CS, + nb_symbols_total, + starting_symbol_index, + startingPRB, + secondHopPRB + ); break; } case pucch_format1_nr: @@ -1072,8 +1072,8 @@ uint8_t get_downlink_ack(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_t U_DAI_c = number_harq_feedback/number_of_code_word; N_m_c_rx = number_harq_feedback; int N_SPS_c = 0; /* FFS TODO_NR multicells and SPS are not supported at the moment */ - if (mac->cg != NULL && - mac->cg->physicalCellGroupConfig != NULL && + if (mac->cg != NULL && + mac->cg->physicalCellGroupConfig != NULL && mac->cg->physicalCellGroupConfig->harq_ACK_SpatialBundlingPUCCH != NULL) { int N_TB_max_DL = mac->DLbwp[0]->bwp_Dedicated->pdsch_Config->choice.setup->maxNrofCodeWordsScheduledByDCI[0]; *n_HARQ_ACK = (((V_DAI_m_DL - U_DAI_c)%4) * N_TB_max_DL) + N_m_c_rx + N_SPS_c; @@ -1179,7 +1179,7 @@ boolean_t select_pucch_resource(PHY_VARS_NR_UE *ue, NR_UE_MAC_INST_t *mac, uint8 int current_resource_id = MAX_NB_OF_PUCCH_RESOURCES; pucch_format_nr_t format_pucch; int ready_pucch_resource_id = FALSE; /* in the case that it is already given */ - NR_PUCCH_Resource_t *pucch_resource; + NR_PUCCH_Resource_t *pucch_resource = NULL; NR_BWP_Id_t bwp_id = mac->UL_BWP_Id; /* ini values to unset */ @@ -1267,6 +1267,7 @@ boolean_t select_pucch_resource(PHY_VARS_NR_UE *ue, NR_UE_MAC_INST_t *mac, uint8 } if (resource_set_found == TRUE) { + if (pucch_resource_indicator < MAX_PUCCH_RESOURCE_INDICATOR) { // Verify that the value of pucch_resource_indicator is valid struct NR_PUCCH_Config__resourceSetToAddModList *resourceSetToAddModList = NULL; @@ -1275,9 +1276,8 @@ boolean_t select_pucch_resource(PHY_VARS_NR_UE *ue, NR_UE_MAC_INST_t *mac, uint8 AssertFatal(mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->resourceSetToAddModList!=NULL,"mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->resourceSetToAddModList is null\n"); resourceSetToAddModList = mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->resourceSetToAddModList; resourceToAddModList = mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->resourceToAddModList; - } - else if (bwp_id == 0 && mac->cg->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP->pucch_Config->choice.setup->resourceSetToAddModList!=NULL) { - resourceSetToAddModList = mac->cg->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP->pucch_Config->choice.setup->resourceSetToAddModList; + } else if (bwp_id == 0 && mac->cg->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP->pucch_Config->choice.setup->resourceSetToAddModList!=NULL) { + resourceSetToAddModList = mac->cg->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP->pucch_Config->choice.setup->resourceSetToAddModList; resourceToAddModList = mac->cg->spCellConfig->spCellConfigDedicated->uplinkConfig->initialUplinkBWP->pucch_Config->choice.setup->resourceToAddModList; } if (resourceSetToAddModList->list.array[pucch_resource_set_id]->resourceList.list.count <= pucch_resource_indicator) @@ -1318,11 +1318,14 @@ boolean_t select_pucch_resource(PHY_VARS_NR_UE *ue, NR_UE_MAC_INST_t *mac, uint8 } } - pucch_resource = resourceToAddModList->list.array[current_resource_id]; + uint8_t pucch_resource_count = resourceToAddModList->list.count; + for (uint8_t i=0; ilist.array[i]->pucch_ResourceId == current_resource_id) + pucch_resource = resourceToAddModList->list.array[i]; + } if (pucch_resource != NULL) { - format_pucch = resourceToAddModList->list.array[current_resource_id]->format.present; + format_pucch = pucch_resource->format.present; nb_symbols_for_tx = get_nb_symbols_pucch(pucch_resource, format_pucch); - if (check_pucch_format(mac, gNB_id, format_pucch, nb_symbols_for_tx, uci_size) == TRUE) { *resource_set_id = pucch_resource_set_id; *resource_id = current_resource_id; From 1e4d4b1e0489d35240205b4964bb5a8918768a1b Mon Sep 17 00:00:00 2001 From: Francesco Mani Date: Sat, 22 May 2021 06:22:42 +0000 Subject: [PATCH 406/579] Apply 1 suggestion(s) to 1 file(s) --- openair1/SCHED_NR_UE/pucch_uci_ue_nr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c index 51ab488e6a..1dc8145d90 100644 --- a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c +++ b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c @@ -418,7 +418,7 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_ int dmrs_scrambling_id=0,data_scrambling_id=0; NR_UE_MAC_INST_t *mac = get_mac_inst(0); - NR_PUCCH_Resource_t *pucch_resource; + NR_PUCCH_Resource_t *pucch_resource = NULL; uint16_t crnti = mac->crnti; NR_BWP_Id_t bwp_id = mac->UL_BWP_Id; From aa6b36a60fb56965a9d91cc1fd74ac883b8a9cef Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Tue, 25 May 2021 14:41:30 +0200 Subject: [PATCH 407/579] [RHEL8][CONTAINER] Runtime check when creating pThreads It looks like : - when running on a Fedora-host - with generic kernel - in a container - even in privileged mode That is not enough and priority/schedule settings is not allowed. So at runtime, we check and in case, we don't set up priorities. Signed-off-by: Raphael Defosseux --- common/utils/system.c | 86 +++++++++++++++++++++++++++++------- common/utils/system.h | 8 ++++ targets/RT/USER/lte-ue.c | 22 ++++++--- targets/RT/USER/rt_wrapper.c | 53 +++++++++++++--------- 4 files changed, 125 insertions(+), 44 deletions(-) diff --git a/common/utils/system.c b/common/utils/system.c index 4c6c1a4dc0..c8de386958 100644 --- a/common/utils/system.c +++ b/common/utils/system.c @@ -96,6 +96,51 @@ static void read_pipe(int p, char *b, int size) { } } +static int baseRunTimeCommand(char* cmd) { + FILE *fp; + size_t retSize = 0; + + fp = popen(cmd, "r"); + + memset(cmd, 1, 200); + retSize = fread(cmd, 1, 200, fp); + fclose(fp); + + if (retSize == 0) { + return 0; + } + return atoi(cmd); +} + +int checkIfFedoraDistribution(void) { + char cmd[200]; + + memset(cmd, 1, 200); + sprintf(cmd, "cat /etc/os-release | grep ID_LIKE | grep -ic fedora || true"); + return baseRunTimeCommand(cmd); +} + +int checkIfGenericKernelOnFedora(void) { + char cmd[200]; + + memset(cmd, 1, 200); + sprintf(cmd, "uname -a | grep -c rt || true"); + return (1 - baseRunTimeCommand(cmd)); +} + +int checkIfInsideContainer(void) { + char cmd[200]; + int res = 0; + + memset(cmd, 1, 200); + sprintf(cmd, "cat /proc/self/cgroup | egrep -c 'libpod|podman|kubepods' || true"); + res = baseRunTimeCommand(cmd); + if (res > 0) + return 1; + else + return 0; +} + /********************************************************************/ /* background process */ /********************************************************************/ @@ -200,29 +245,38 @@ void start_background_system(void) { void threadCreate(pthread_t* t, void * (*func)(void*), void * param, char* name, int affinity, int priority){ pthread_attr_t attr; int ret; + int settingPriority = 1; ret=pthread_attr_init(&attr); AssertFatal(ret==0,"ret: %d, errno: %d\n",ret, errno); ret=pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); AssertFatal(ret==0,"ret: %d, errno: %d\n",ret, errno); ret=pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED); AssertFatal(ret==0,"ret: %d, errno: %d\n",ret, errno); - ret=pthread_attr_setschedpolicy(&attr, SCHED_OAI); - AssertFatal(ret==0,"ret: %d, errno: %d\n",ret, errno); - if(prioritysched_get_priority_max(SCHED_FIFO)) { - LOG_E(TMR,"Prio not possible: %d, min is %d, max: %d, forced in the range\n", - priority, - sched_get_priority_min(SCHED_OAI), - sched_get_priority_max(SCHED_OAI)); - if(prioritysched_get_priority_max(SCHED_OAI)) - priority=sched_get_priority_max(SCHED_OAI); + if (checkIfFedoraDistribution()) + if (checkIfGenericKernelOnFedora()) + if (checkIfInsideContainer()) + settingPriority = 0; + + if (settingPriority) { + ret=pthread_attr_setschedpolicy(&attr, SCHED_OAI); + AssertFatal(ret==0,"ret: %d, errno: %d\n",ret, errno); + if(prioritysched_get_priority_max(SCHED_FIFO)) { + LOG_E(TMR,"Prio not possible: %d, min is %d, max: %d, forced in the range\n", + priority, + sched_get_priority_min(SCHED_OAI), + sched_get_priority_max(SCHED_OAI)); + if(prioritysched_get_priority_max(SCHED_OAI)) + priority=sched_get_priority_max(SCHED_OAI); + } + AssertFatal(priority<=sched_get_priority_max(SCHED_OAI),""); + struct sched_param sparam={0}; + sparam.sched_priority = priority; + ret=pthread_attr_setschedparam(&attr, &sparam); + AssertFatal(ret==0,"ret: %d, errno: %d\n",ret, errno); } - AssertFatal(priority<=sched_get_priority_max(SCHED_OAI),""); - struct sched_param sparam={0}; - sparam.sched_priority = priority; - ret=pthread_attr_setschedparam(&attr, &sparam); - AssertFatal(ret==0,"ret: %d, errno: %d\n",ret, errno); + ret=pthread_create(t, &attr, func, param); AssertFatal(ret==0,"ret: %d, errno: %d\n",ret, errno); diff --git a/common/utils/system.h b/common/utils/system.h index fbfd338a1a..c76fef9144 100644 --- a/common/utils/system.h +++ b/common/utils/system.h @@ -58,6 +58,14 @@ void thread_top_init(char *thread_name, uint64_t deadline, uint64_t period); +/**************************************************** + * Functions to check system at runtime. + ****************************************************/ + +int checkIfFedoraDistribution(void); +int checkIfGenericKernelOnFedora(void); +int checkIfInsideContainer(void); + #ifdef __cplusplus } #endif diff --git a/targets/RT/USER/lte-ue.c b/targets/RT/USER/lte-ue.c index cc084d18c5..6e6c2533b4 100644 --- a/targets/RT/USER/lte-ue.c +++ b/targets/RT/USER/lte-ue.c @@ -32,6 +32,7 @@ #include "lte-softmodem.h" #include "rt_wrapper.h" +#include "system.h" #include "LAYER2/MAC/mac.h" #include "RRC/LTE/rrc_extern.h" @@ -230,14 +231,23 @@ void init_thread(int sched_runtime, } #else + int settingPriority = 1; - if (CPU_COUNT(cpuset) > 0) - AssertFatal( 0 == pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), cpuset), ""); + if (checkIfFedoraDistribution()) + if (checkIfGenericKernelOnFedora()) + if (checkIfInsideContainer()) + settingPriority = 0; + + if (settingPriority) { + if (CPU_COUNT(cpuset) > 0) + AssertFatal( 0 == pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), cpuset), ""); + + struct sched_param sp; + sp.sched_priority = sched_fifo; + AssertFatal(pthread_setschedparam(pthread_self(),SCHED_FIFO,&sp)==0, + "Can't set thread priority, Are you root?\n"); + } - struct sched_param sp; - sp.sched_priority = sched_fifo; - AssertFatal(pthread_setschedparam(pthread_self(),SCHED_FIFO,&sp)==0, - "Can't set thread priority, Are you root?\n"); /* Check the actual affinity mask assigned to the thread */ cpu_set_t *cset=CPU_ALLOC(CPU_SETSIZE); diff --git a/targets/RT/USER/rt_wrapper.c b/targets/RT/USER/rt_wrapper.c index b051868825..da3a2d3cfe 100644 --- a/targets/RT/USER/rt_wrapper.c +++ b/targets/RT/USER/rt_wrapper.c @@ -43,6 +43,7 @@ #include #include #include "rt_wrapper.h" +#include "system.h" #include #include @@ -294,6 +295,7 @@ void thread_top_init(char *thread_name, struct sched_param sparam; char cpu_affinity[1024]; cpu_set_t cpuset; + int settingPriority = 1; /* Set affinity mask to include CPUs 2 to MAX_CPUS */ /* CPU 0 is reserved for UHD threads */ @@ -340,30 +342,37 @@ void thread_top_init(char *thread_name, } } - memset(&sparam, 0, sizeof(sparam)); - sparam.sched_priority = sched_get_priority_max(SCHED_FIFO); - policy = SCHED_FIFO ; - - s = pthread_setschedparam(pthread_self(), policy, &sparam); - if (s != 0) { - perror("pthread_setschedparam : "); - exit_fun("Error setting thread priority"); - } - - s = pthread_getschedparam(pthread_self(), &policy, &sparam); - if (s != 0) { - perror("pthread_getschedparam : "); - exit_fun("Error getting thread priority"); - } + if (checkIfFedoraDistribution()) + if (checkIfGenericKernelOnFedora()) + if (checkIfInsideContainer()) + settingPriority = 0; - pthread_setname_np(pthread_self(), thread_name); + if (settingPriority) { + memset(&sparam, 0, sizeof(sparam)); + sparam.sched_priority = sched_get_priority_max(SCHED_FIFO); + policy = SCHED_FIFO; + + s = pthread_setschedparam(pthread_self(), policy, &sparam); + if (s != 0) { + perror("pthread_setschedparam : "); + exit_fun("Error setting thread priority"); + } + + s = pthread_getschedparam(pthread_self(), &policy, &sparam); + if (s != 0) { + perror("pthread_getschedparam : "); + exit_fun("Error getting thread priority"); + } - LOG_I(HW, "[SCHED][eNB] %s started on CPU %d, sched_policy = %s , priority = %d, CPU Affinity=%s \n",thread_name,sched_getcpu(), - (policy == SCHED_FIFO) ? "SCHED_FIFO" : - (policy == SCHED_RR) ? "SCHED_RR" : - (policy == SCHED_OTHER) ? "SCHED_OTHER" : - "???", - sparam.sched_priority, cpu_affinity ); + pthread_setname_np(pthread_self(), thread_name); + + LOG_I(HW, "[SCHED][eNB] %s started on CPU %d, sched_policy = %s , priority = %d, CPU Affinity=%s \n",thread_name,sched_getcpu(), + (policy == SCHED_FIFO) ? "SCHED_FIFO" : + (policy == SCHED_RR) ? "SCHED_RR" : + (policy == SCHED_OTHER) ? "SCHED_OTHER" : + "???", + sparam.sched_priority, cpu_affinity ); + } #endif //LOW_LATENCY From 13990e614caff9c42e7595cf2795be98e3d0c9d5 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Tue, 25 May 2021 15:08:51 +0100 Subject: [PATCH 408/579] Fix nRNRB for LTE --- openair2/F1AP/f1ap_du_interface_management.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/openair2/F1AP/f1ap_du_interface_management.c b/openair2/F1AP/f1ap_du_interface_management.c index 39b4802cf6..85248d7b3a 100644 --- a/openair2/F1AP/f1ap_du_interface_management.c +++ b/openair2/F1AP/f1ap_du_interface_management.c @@ -43,8 +43,12 @@ extern RAN_CONTEXT_t RC; int nrb_lut[29] = {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}; int to_NRNRB(int nrb) { - for (int i=0;i<29;i++) if (nrb_lut[i] == nrb) return i; - AssertFatal(1==0,"nrb %d is not in the list of possible NRNRB\n",nrb); + if (RC.nrrrc) { + for (int i=0;i<29;i++) if (nrb_lut[i] == nrb) return i; + AssertFatal(1==0,"nrb %d is not in the list of possible NRNRB\n",nrb); + } else { + return nrb; + } } int DU_handle_RESET(instance_t instance, From f20744611783fcc24e9af5d97c709ed4106ffbde Mon Sep 17 00:00:00 2001 From: rmagueta Date: Wed, 26 May 2021 02:50:06 +0100 Subject: [PATCH 409/579] Temporary commit (will be reverted) --- openair2/F1AP/f1ap_cu_interface_management.c | 3 +++ openair2/F1AP/f1ap_cu_rrc_message_transfer.c | 1 + openair2/F1AP/f1ap_cu_ue_context_management.c | 7 +++++-- openair2/F1AP/f1ap_du_interface_management.c | 3 +++ openair2/F1AP/f1ap_du_rrc_message_transfer.c | 3 +++ openair2/F1AP/f1ap_du_ue_context_management.c | 4 ++++ 6 files changed, 19 insertions(+), 2 deletions(-) diff --git a/openair2/F1AP/f1ap_cu_interface_management.c b/openair2/F1AP/f1ap_cu_interface_management.c index 2d393ad520..8b5c7354b1 100644 --- a/openair2/F1AP/f1ap_cu_interface_management.c +++ b/openair2/F1AP/f1ap_cu_interface_management.c @@ -402,6 +402,7 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance, } /* encode */ + LOG_I(F1AP, "f1ap_encode_pdu(): 1\n"); if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { LOG_E(F1AP, "Failed to encode F1 setup response\n"); return -1; @@ -488,6 +489,7 @@ int CU_send_F1_SETUP_FAILURE(instance_t instance) { } /* encode */ + LOG_I(F1AP, "f1ap_encode_pdu(): 2\n"); if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { LOG_E(F1AP, "Failed to encode F1 setup failure\n"); return -1; @@ -930,6 +932,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu /* encode */ + LOG_I(F1AP, "f1ap_encode_pdu(): 3\n"); if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { LOG_E(F1AP, "Failed to encode F1 gNB-CU CONFIGURATION UPDATE\n"); return -1; diff --git a/openair2/F1AP/f1ap_cu_rrc_message_transfer.c b/openair2/F1AP/f1ap_cu_rrc_message_transfer.c index 604cacb176..72b8a0420a 100644 --- a/openair2/F1AP/f1ap_cu_rrc_message_transfer.c +++ b/openair2/F1AP/f1ap_cu_rrc_message_transfer.c @@ -318,6 +318,7 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance, ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); /* encode */ + LOG_I(F1AP, "f1ap_encode_pdu(): 4\n"); if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { LOG_E(F1AP, "Failed to encode F1 DL RRC MESSAGE TRANSFER \n"); return -1; diff --git a/openair2/F1AP/f1ap_cu_ue_context_management.c b/openair2/F1AP/f1ap_cu_ue_context_management.c index 4c8eef8a05..2925e5c137 100644 --- a/openair2/F1AP/f1ap_cu_ue_context_management.c +++ b/openair2/F1AP/f1ap_cu_ue_context_management.c @@ -151,7 +151,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); -if (0) { + /* mandatory */ /* c7. Candidate_SpCell_List */ ie = (F1AP_UEContextSetupRequestIEs_t *)calloc(1, sizeof(F1AP_UEContextSetupRequestIEs_t)); @@ -709,7 +709,7 @@ if (0) { } ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); -} + /* OPTIONAL */ /* InactivityMonitoringRequest */ if (0) { @@ -762,6 +762,7 @@ if (0) { } /* encode */ + LOG_I(F1AP, "f1ap_encode_pdu(): 5\n"); if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { LOG_E(F1AP, "Failed to encode F1 UE CONTEXT SETUP REQUEST\n"); return -1; @@ -978,6 +979,7 @@ int CU_send_UE_CONTEXT_RELEASE_COMMAND(instance_t instance, ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); /* encode */ + LOG_I(F1AP, "f1ap_encode_pdu(): 6\n"); if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { LOG_E(F1AP, "Failed to encode F1 context release command\n"); return -1; @@ -1534,6 +1536,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) { ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); /* encode */ + LOG_I(F1AP, "f1ap_encode_pdu(): 7\n"); if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { LOG_E(F1AP, "Failed to encode F1 UE CONTEXT_MODIFICATION REQUEST\n"); return -1; diff --git a/openair2/F1AP/f1ap_du_interface_management.c b/openair2/F1AP/f1ap_du_interface_management.c index 85248d7b3a..bccc1804c7 100644 --- a/openair2/F1AP/f1ap_du_interface_management.c +++ b/openair2/F1AP/f1ap_du_interface_management.c @@ -420,6 +420,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) { ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); /* encode */ + LOG_I(F1AP, "f1ap_encode_pdu(): 8\n"); if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { LOG_E(F1AP, "Failed to encode F1 setup request\n"); return -1; @@ -1045,6 +1046,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance, + LOG_I(F1AP, "f1ap_encode_pdu(): 9\n"); if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { LOG_E(F1AP, "Failed to encode F1 gNB-DU CONFIGURATION UPDATE\n"); return -1; @@ -1279,6 +1281,7 @@ int DU_send_gNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance, ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); /* encode */ + LOG_I(F1AP, "f1ap_encode_pdu(): 10\n"); if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { LOG_E(F1AP, "Failed to encode GNB-DU-Configuration-Update-Acknowledge\n"); return -1; diff --git a/openair2/F1AP/f1ap_du_rrc_message_transfer.c b/openair2/F1AP/f1ap_du_rrc_message_transfer.c index f1c1684518..296efe2c56 100644 --- a/openair2/F1AP/f1ap_du_rrc_message_transfer.c +++ b/openair2/F1AP/f1ap_du_rrc_message_transfer.c @@ -789,6 +789,7 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(instance_t instance, } } /* encode */ + LOG_I(F1AP, "f1ap_encode_pdu(): 11\n"); if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { LOG_E(F1AP, "Failed to encode F1 UL RRC MESSAGE TRANSFER\n"); return -1; @@ -888,6 +889,7 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP, } /* encode */ + LOG_I(F1AP, "f1ap_encode_pdu(): 12\n"); if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { LOG_E(F1AP, "Failed to encode F1 INITIAL UL RRC MESSAGE TRANSFER\n"); return -1; @@ -1120,6 +1122,7 @@ int DU_send_UL_NR_RRC_MESSAGE_TRANSFER(instance_t instance, } } /* encode */ + LOG_I(F1AP, "f1ap_encode_pdu(): 13\n"); if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { LOG_E(F1AP, "Failed to encode F1 UL RRC MESSAGE TRANSFER \n"); return -1; diff --git a/openair2/F1AP/f1ap_du_ue_context_management.c b/openair2/F1AP/f1ap_du_ue_context_management.c index 51bf7da32d..62aaec6c39 100644 --- a/openair2/F1AP/f1ap_du_ue_context_management.c +++ b/openair2/F1AP/f1ap_du_ue_context_management.c @@ -539,6 +539,7 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance) { } /* encode */ + LOG_I(F1AP, "f1ap_encode_pdu(): 14\n"); if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { LOG_E(F1AP, "Failed to encode F1 UE CONTEXT SETUP RESPONSE\n"); return -1; @@ -622,6 +623,7 @@ int DU_send_UE_CONTEXT_RELEASE_REQUEST(instance_t instance, ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); /* encode */ + LOG_I(F1AP, "f1ap_encode_pdu(): 15\n"); if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { LOG_E(F1AP, "Failed to encode F1 context release request\n"); return -1; @@ -842,6 +844,7 @@ int DU_send_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance, uint8_t *buffer; uint32_t len; + LOG_I(F1AP, "f1ap_encode_pdu(): 16\n"); if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { LOG_E(F1AP, "Failed to encode F1 context release complete\n"); return -1; @@ -1209,6 +1212,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) { } /* encode */ + LOG_I(F1AP, "f1ap_encode_pdu(): 17\n"); if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { LOG_E(F1AP, "Failed to encode F1 UE CONTEXT MODIFICATION RESPONSE\n"); return -1; From 1b4faa8ddd12a1d11a11d5ae1a1b6313e5362d86 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Wed, 26 May 2021 10:00:45 +0200 Subject: [PATCH 410/579] fix added cppcheck errors Signed-off-by: Raphael Defosseux --- common/utils/system.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/utils/system.c b/common/utils/system.c index c8de386958..37622932ff 100644 --- a/common/utils/system.c +++ b/common/utils/system.c @@ -102,8 +102,8 @@ static int baseRunTimeCommand(char* cmd) { fp = popen(cmd, "r"); - memset(cmd, 1, 200); - retSize = fread(cmd, 1, 200, fp); + memset(cmd, 1, sizeof(*cmd)); + retSize = fread(cmd, 1, sizeof(*cmd), fp); fclose(fp); if (retSize == 0) { From 35d6cb706fc2960cc4e3d84ad5df6ea67ca9fa2a Mon Sep 17 00:00:00 2001 From: Roberto Louro Magueta Date: Wed, 26 May 2021 12:14:39 +0200 Subject: [PATCH 411/579] Revert "Temporary commit (will be reverted)" This reverts commit f20744611783fcc24e9af5d97c709ed4106ffbde --- openair2/F1AP/f1ap_cu_interface_management.c | 3 --- openair2/F1AP/f1ap_cu_rrc_message_transfer.c | 1 - openair2/F1AP/f1ap_cu_ue_context_management.c | 7 ++----- openair2/F1AP/f1ap_du_interface_management.c | 3 --- openair2/F1AP/f1ap_du_rrc_message_transfer.c | 3 --- openair2/F1AP/f1ap_du_ue_context_management.c | 4 ---- 6 files changed, 2 insertions(+), 19 deletions(-) diff --git a/openair2/F1AP/f1ap_cu_interface_management.c b/openair2/F1AP/f1ap_cu_interface_management.c index 8b5c7354b1..2d393ad520 100644 --- a/openair2/F1AP/f1ap_cu_interface_management.c +++ b/openair2/F1AP/f1ap_cu_interface_management.c @@ -402,7 +402,6 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance, } /* encode */ - LOG_I(F1AP, "f1ap_encode_pdu(): 1\n"); if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { LOG_E(F1AP, "Failed to encode F1 setup response\n"); return -1; @@ -489,7 +488,6 @@ int CU_send_F1_SETUP_FAILURE(instance_t instance) { } /* encode */ - LOG_I(F1AP, "f1ap_encode_pdu(): 2\n"); if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { LOG_E(F1AP, "Failed to encode F1 setup failure\n"); return -1; @@ -932,7 +930,6 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu /* encode */ - LOG_I(F1AP, "f1ap_encode_pdu(): 3\n"); if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { LOG_E(F1AP, "Failed to encode F1 gNB-CU CONFIGURATION UPDATE\n"); return -1; diff --git a/openair2/F1AP/f1ap_cu_rrc_message_transfer.c b/openair2/F1AP/f1ap_cu_rrc_message_transfer.c index 72b8a0420a..604cacb176 100644 --- a/openair2/F1AP/f1ap_cu_rrc_message_transfer.c +++ b/openair2/F1AP/f1ap_cu_rrc_message_transfer.c @@ -318,7 +318,6 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance, ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); /* encode */ - LOG_I(F1AP, "f1ap_encode_pdu(): 4\n"); if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { LOG_E(F1AP, "Failed to encode F1 DL RRC MESSAGE TRANSFER \n"); return -1; diff --git a/openair2/F1AP/f1ap_cu_ue_context_management.c b/openair2/F1AP/f1ap_cu_ue_context_management.c index 2925e5c137..4c8eef8a05 100644 --- a/openair2/F1AP/f1ap_cu_ue_context_management.c +++ b/openair2/F1AP/f1ap_cu_ue_context_management.c @@ -151,7 +151,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); - +if (0) { /* mandatory */ /* c7. Candidate_SpCell_List */ ie = (F1AP_UEContextSetupRequestIEs_t *)calloc(1, sizeof(F1AP_UEContextSetupRequestIEs_t)); @@ -709,7 +709,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, } ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); - +} /* OPTIONAL */ /* InactivityMonitoringRequest */ if (0) { @@ -762,7 +762,6 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, } /* encode */ - LOG_I(F1AP, "f1ap_encode_pdu(): 5\n"); if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { LOG_E(F1AP, "Failed to encode F1 UE CONTEXT SETUP REQUEST\n"); return -1; @@ -979,7 +978,6 @@ int CU_send_UE_CONTEXT_RELEASE_COMMAND(instance_t instance, ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); /* encode */ - LOG_I(F1AP, "f1ap_encode_pdu(): 6\n"); if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { LOG_E(F1AP, "Failed to encode F1 context release command\n"); return -1; @@ -1536,7 +1534,6 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) { ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); /* encode */ - LOG_I(F1AP, "f1ap_encode_pdu(): 7\n"); if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { LOG_E(F1AP, "Failed to encode F1 UE CONTEXT_MODIFICATION REQUEST\n"); return -1; diff --git a/openair2/F1AP/f1ap_du_interface_management.c b/openair2/F1AP/f1ap_du_interface_management.c index bccc1804c7..85248d7b3a 100644 --- a/openair2/F1AP/f1ap_du_interface_management.c +++ b/openair2/F1AP/f1ap_du_interface_management.c @@ -420,7 +420,6 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) { ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); /* encode */ - LOG_I(F1AP, "f1ap_encode_pdu(): 8\n"); if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { LOG_E(F1AP, "Failed to encode F1 setup request\n"); return -1; @@ -1046,7 +1045,6 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance, - LOG_I(F1AP, "f1ap_encode_pdu(): 9\n"); if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { LOG_E(F1AP, "Failed to encode F1 gNB-DU CONFIGURATION UPDATE\n"); return -1; @@ -1281,7 +1279,6 @@ int DU_send_gNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance, ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); /* encode */ - LOG_I(F1AP, "f1ap_encode_pdu(): 10\n"); if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { LOG_E(F1AP, "Failed to encode GNB-DU-Configuration-Update-Acknowledge\n"); return -1; diff --git a/openair2/F1AP/f1ap_du_rrc_message_transfer.c b/openair2/F1AP/f1ap_du_rrc_message_transfer.c index 296efe2c56..f1c1684518 100644 --- a/openair2/F1AP/f1ap_du_rrc_message_transfer.c +++ b/openair2/F1AP/f1ap_du_rrc_message_transfer.c @@ -789,7 +789,6 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(instance_t instance, } } /* encode */ - LOG_I(F1AP, "f1ap_encode_pdu(): 11\n"); if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { LOG_E(F1AP, "Failed to encode F1 UL RRC MESSAGE TRANSFER\n"); return -1; @@ -889,7 +888,6 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP, } /* encode */ - LOG_I(F1AP, "f1ap_encode_pdu(): 12\n"); if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { LOG_E(F1AP, "Failed to encode F1 INITIAL UL RRC MESSAGE TRANSFER\n"); return -1; @@ -1122,7 +1120,6 @@ int DU_send_UL_NR_RRC_MESSAGE_TRANSFER(instance_t instance, } } /* encode */ - LOG_I(F1AP, "f1ap_encode_pdu(): 13\n"); if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { LOG_E(F1AP, "Failed to encode F1 UL RRC MESSAGE TRANSFER \n"); return -1; diff --git a/openair2/F1AP/f1ap_du_ue_context_management.c b/openair2/F1AP/f1ap_du_ue_context_management.c index 62aaec6c39..51bf7da32d 100644 --- a/openair2/F1AP/f1ap_du_ue_context_management.c +++ b/openair2/F1AP/f1ap_du_ue_context_management.c @@ -539,7 +539,6 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance) { } /* encode */ - LOG_I(F1AP, "f1ap_encode_pdu(): 14\n"); if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { LOG_E(F1AP, "Failed to encode F1 UE CONTEXT SETUP RESPONSE\n"); return -1; @@ -623,7 +622,6 @@ int DU_send_UE_CONTEXT_RELEASE_REQUEST(instance_t instance, ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); /* encode */ - LOG_I(F1AP, "f1ap_encode_pdu(): 15\n"); if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { LOG_E(F1AP, "Failed to encode F1 context release request\n"); return -1; @@ -844,7 +842,6 @@ int DU_send_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance, uint8_t *buffer; uint32_t len; - LOG_I(F1AP, "f1ap_encode_pdu(): 16\n"); if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { LOG_E(F1AP, "Failed to encode F1 context release complete\n"); return -1; @@ -1212,7 +1209,6 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) { } /* encode */ - LOG_I(F1AP, "f1ap_encode_pdu(): 17\n"); if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { LOG_E(F1AP, "Failed to encode F1 UE CONTEXT MODIFICATION RESPONSE\n"); return -1; From 9bbfd60d2f284622cf1ac65b942cb8fb16fc0084 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Wed, 26 May 2021 11:35:10 +0100 Subject: [PATCH 412/579] Revert if in CU_send_UE_CONTEXT_SETUP_REQUEST to LTE version --- openair2/F1AP/f1ap_cu_ue_context_management.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openair2/F1AP/f1ap_cu_ue_context_management.c b/openair2/F1AP/f1ap_cu_ue_context_management.c index 4c8eef8a05..30d225bb4a 100644 --- a/openair2/F1AP/f1ap_cu_ue_context_management.c +++ b/openair2/F1AP/f1ap_cu_ue_context_management.c @@ -151,7 +151,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); -if (0) { + /* mandatory */ /* c7. Candidate_SpCell_List */ ie = (F1AP_UEContextSetupRequestIEs_t *)calloc(1, sizeof(F1AP_UEContextSetupRequestIEs_t)); @@ -709,7 +709,7 @@ if (0) { } ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); -} + /* OPTIONAL */ /* InactivityMonitoringRequest */ if (0) { From 65d24ae205dd5ba296345c9760c3273ab3829843 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Wed, 26 May 2021 11:37:21 +0100 Subject: [PATCH 413/579] Add condition in CU_handle_F1_SETUP_REQUEST to LTE version --- openair2/F1AP/f1ap_cu_interface_management.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openair2/F1AP/f1ap_cu_interface_management.c b/openair2/F1AP/f1ap_cu_interface_management.c index 2d393ad520..b86ebb5c13 100644 --- a/openair2/F1AP/f1ap_cu_interface_management.c +++ b/openair2/F1AP/f1ap_cu_interface_management.c @@ -103,7 +103,11 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance, assoc_id, stream); } - message_p = itti_alloc_new_message(TASK_CU_F1, 0, F1AP_SETUP_REQ); + if (RC.nrrrc && RC.nrrrc[0]->node_type == ngran_gNB_CU) { + message_p = itti_alloc_new_message(TASK_CU_F1, 0, F1AP_SETUP_REQ); + } else { + message_p = itti_alloc_new_message(TASK_RRC_ENB, 0, F1AP_SETUP_REQ); + } /* assoc_id */ F1AP_SETUP_REQ(message_p).assoc_id = assoc_id; From f4e7c2ae0ae01d5c8dc7639e9b04b83fa8b85dc9 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Wed, 26 May 2021 16:15:42 +0200 Subject: [PATCH 414/579] [Docker] adding OAI LTE RU target build in a container image Signed-off-by: Raphael Defosseux --- ci-scripts/cls_containerize.py | 2 + docker/Dockerfile.lteRU.rhel8.2 | 99 +++++++++++++++++++++++++++++ docker/Dockerfile.lteRU.ubuntu18 | 94 +++++++++++++++++++++++++++ docker/scripts/lte_ru_entrypoint.sh | 62 ++++++++++++++++++ 4 files changed, 257 insertions(+) create mode 100644 docker/Dockerfile.lteRU.rhel8.2 create mode 100644 docker/Dockerfile.lteRU.ubuntu18 create mode 100755 docker/scripts/lte_ru_entrypoint.sh diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index dff0838d49..f32e8b3864 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -150,6 +150,8 @@ class Containerize(): imageNames.append(('oai-nr-ue', 'nrUE')) if self.host == 'Red Hat': imageNames.append(('oai-physim', 'phySim')) + if self.host == 'Ubuntu': + imageNames.append(('oai-lte-ru', 'lteRU')) if len(imageNames) == 0: imageNames.append(('oai-enb', 'eNB')) diff --git a/docker/Dockerfile.lteRU.rhel8.2 b/docker/Dockerfile.lteRU.rhel8.2 new file mode 100644 index 0000000000..35078de007 --- /dev/null +++ b/docker/Dockerfile.lteRU.rhel8.2 @@ -0,0 +1,99 @@ +#/* +# * 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 +# */ +#--------------------------------------------------------------------- +# +# Dockerfile for the Open-Air-Interface BUILD service +# Valid for RHEL8 +# +#--------------------------------------------------------------------- + +FROM ran-build:latest AS ru-build + +RUN rm -Rf /oai-ran +WORKDIR /oai-ran +COPY . . + +#run build_oai to build the target image +RUN /bin/sh oaienv && \ + cd cmake_targets && \ + mkdir -p log && \ + ./build_oai --RU --ninja -w USRP --verbose-ci + +RUN yum install -y python3-pip && \ + pip3 install --ignore-installed pyyaml && \ + python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml + +#start from scratch for target executable +FROM registry.access.redhat.com/ubi8/ubi:latest as oai-lte-ru +ENV TZ=Europe/Paris + +RUN yum update -y && \ + yum install -y --enablerepo="ubi-8-codeready-builder" \ + tzdata \ + atlas \ + net-tools \ + iputils \ + iproute && \ + echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \ + echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf + +WORKDIR /opt/oai-lte-ru/bin +COPY --from=ru-build /oai-ran/targets/bin/oairu.Rel15 . +COPY --from=ru-build /oai-ran/docker/scripts/lte_ru_entrypoint.sh entrypoint.sh + +WORKDIR /usr/local/lib/ +COPY --from=ru-build /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 . +COPY --from=ru-build /oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 . +COPY --from=ru-build /oai-ran/targets/bin/librfsimulator.so.Rel15 . +COPY --from=ru-build /oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 . +COPY --from=ru-build /oai-ran/targets/bin/libparams_libconfig.so . +COPY --from=ru-build /oai-ran/cmake_targets/ran_build/build/libdfts.so . + +# Copying from the ran-build image the USRP needed packages +COPY --from=ru-build /lib64/libconfig.so.9 /lib64 +COPY --from=ru-build /lib64/libblas.so.3 /lib64 +COPY --from=ru-build /lib64/liblapack.so.3 /lib64 +COPY --from=ru-build /lib64/liblapacke.so.3 /lib64 +COPY --from=ru-build /lib64/libboost_chrono.so.1.66.0 /lib64 +COPY --from=ru-build /lib64/libboost_date_time.so.1.66.0 /lib64 +COPY --from=ru-build /lib64/libboost_filesystem.so.1.66.0 /lib64 +COPY --from=ru-build /lib64/libboost_program_options.so.1.66.0 /lib64 +COPY --from=ru-build /lib64/libboost_serialization.so.1.66.0 /lib64 +COPY --from=ru-build /lib64/libboost_thread.so.1.66.0 /lib64 +COPY --from=ru-build /lib64/libboost_system.so.1.66.0 /lib64 +COPY --from=ru-build /lib64/libboost_unit_test_framework.so.1.66.0 /lib64 +COPY --from=ru-build /lib64/libboost_atomic.so.1.66.0 /lib64 +COPY --from=ru-build /lib64/libboost_timer.so.1.66.0 /lib64 +COPY --from=ru-build /usr/local/lib64/libuhd.so.4.0.0 /usr/local/lib64 + +RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so" && \ + /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so" && \ + /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so" && \ + ldconfig + +# Copy the relevant configuration files for RRU +WORKDIR /opt/oai-lte-ru/etc +COPY --from=ru-build /oai-ran/docker/etc/rru* ./ + +WORKDIR /opt/oai-lte-ru + +ENTRYPOINT ["/opt/oai-lte-ru/bin/entrypoint.sh"] +CMD ["/opt/oai-lte-ru/bin/oairu.Rel15", "-O", "/opt/oai-lte-ru/etc/rru.conf"] diff --git a/docker/Dockerfile.lteRU.ubuntu18 b/docker/Dockerfile.lteRU.ubuntu18 new file mode 100644 index 0000000000..381d63d9f3 --- /dev/null +++ b/docker/Dockerfile.lteRU.ubuntu18 @@ -0,0 +1,94 @@ +#/* +# * 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 +# */ +#--------------------------------------------------------------------- +# +# Dockerfile for the Open-Air-Interface BUILD service +# Valid for Ubuntu 18.04 +# +#--------------------------------------------------------------------- + +FROM ran-build:latest AS ru-build + +RUN rm -Rf /oai-ran +WORKDIR /oai-ran +COPY . . + +#run build_oai to build the target image +RUN /bin/sh oaienv && \ + cd cmake_targets && \ + mkdir -p log && \ + ./build_oai --RU --ninja -w USRP --verbose-ci + +RUN apt-get install -y python3-pip && \ + pip3 install --ignore-installed pyyaml && \ + python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml + +#start from scratch for target executable +FROM ubuntu:bionic as oai-lte-ru +ENV DEBIAN_FRONTEND=noninteractive +ENV TZ=Europe/Paris + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \ + DEBIAN_FRONTEND=noninteractive apt-get install --yes \ + tzdata \ + software-properties-common \ + libblas3 \ + libatlas3-base \ + libconfig9 \ + net-tools \ + iputils-ping \ + iproute2 && \ + # Install UHD driver from ettus ppa + # At time of writing, it is 3.14 + add-apt-repository ppa:ettusresearch/uhd --yes && \ + apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install --yes \ + python \ + libusb-1.0-0 \ + libuhd003 \ + uhd-host && \ + rm -rf /var/lib/apt/lists/* + +WORKDIR /opt/oai-lte-ru/bin +COPY --from=ru-build /oai-ran/targets/bin/oairu.Rel15 . +COPY --from=ru-build /oai-ran/docker/scripts/lte_ru_entrypoint.sh entrypoint.sh + +WORKDIR /usr/local/lib/ +COPY --from=ru-build /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 . +COPY --from=ru-build /oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 . +COPY --from=ru-build /oai-ran/targets/bin/librfsimulator.so.Rel15 . +COPY --from=ru-build /oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 . +COPY --from=ru-build /oai-ran/targets/bin/libparams_libconfig.so . +COPY --from=ru-build /oai-ran/cmake_targets/ran_build/build/libdfts.so . +RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so" && \ + /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so" && \ + /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so" && \ + ldconfig + +# Copy the relevant configuration files for RRU +WORKDIR /opt/oai-lte-ru/etc +COPY --from=ru-build /oai-ran/docker/etc/rru* ./ + +WORKDIR /opt/oai-lte-ru + +ENTRYPOINT ["/opt/oai-lte-ru/bin/entrypoint.sh"] +CMD ["/opt/oai-lte-ru/bin/oairu.Rel15", "-O", "/opt/oai-lte-ru/etc/rru.conf"] diff --git a/docker/scripts/lte_ru_entrypoint.sh b/docker/scripts/lte_ru_entrypoint.sh new file mode 100755 index 0000000000..f466e25ec2 --- /dev/null +++ b/docker/scripts/lte_ru_entrypoint.sh @@ -0,0 +1,62 @@ +#!/bin/bash + +set -euo pipefail + +PREFIX=/opt/oai-lte-ru + +# Based another env var, pick one template to use +if [[ -v USE_FDD_RRU ]]; then ln -s $PREFIX/etc/rru.fdd.conf $PREFIX/etc/rru.conf; fi +if [[ -v USE_TDD_RRU ]]; then ln -s $PREFIX/etc/rru.tdd.conf $PREFIX/etc/rru.conf; fi + +# Only this template will be manipulated +CONFIG_FILES=`ls $PREFIX/etc/rru.conf || true` + +for c in ${CONFIG_FILES}; do + # grep variable names (format: ${VAR}) from template to be rendered + VARS=$(grep -oP '@[a-zA-Z0-9_]+@' ${c} | sort | uniq | xargs) + + # create sed expressions for substituting each occurrence of ${VAR} + # with the value of the environment variable "VAR" + EXPRESSIONS="" + for v in ${VARS}; do + NEW_VAR=`echo $v | sed -e "s#@##g"` + if [[ "${!NEW_VAR}x" == "x" ]]; then + echo "Error: Environment variable '${NEW_VAR}' is not set." \ + "Config file '$(basename $c)' requires all of $VARS." + exit 1 + fi + EXPRESSIONS="${EXPRESSIONS};s|${v}|${!NEW_VAR}|g" + done + EXPRESSIONS="${EXPRESSIONS#';'}" + + # render template and inline replace config file + sed -i "${EXPRESSIONS}" ${c} +done + +# Load the USRP binaries +if [[ -v USE_B2XX ]]; then + /usr/lib/uhd/utils/uhd_images_downloader.py -t b2xx +elif [[ -v USE_X3XX ]]; then + /usr/lib/uhd/utils/uhd_images_downloader.py -t x3xx +elif [[ -v USE_N3XX ]]; then + /usr/lib/uhd/utils/uhd_images_downloader.py -t n3xx +fi + +echo "==================================" +echo "== Starting eNB soft modem" +if [[ -v USE_ADDITIONAL_OPTIONS ]]; then + echo "Additional option(s): ${USE_ADDITIONAL_OPTIONS}" + new_args=() + while [[ $# -gt 0 ]]; do + new_args+=("$1") + shift + done + for word in ${USE_ADDITIONAL_OPTIONS}; do + new_args+=("$word") + done + echo "${new_args[@]}" + exec "${new_args[@]}" +else + echo "$@" + exec "$@" +fi From c7bad3db4a0e86fc5aabf35d5fe3f6d1822321cf Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Wed, 26 May 2021 17:14:00 +0200 Subject: [PATCH 415/579] [Docker] adding IF4.5 template conf files for eNB target image Signed-off-by: Raphael Defosseux --- ...nd40.tm1.25PRB.FairScheduler.usrpb210.conf | 172 ++++++++-------- ...rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf | 186 +++++++++--------- docker/scripts/enb_entrypoint.sh | 2 + docker/scripts/enb_parameters.yaml | 90 ++++++++- docker/scripts/generateTemplate.py | 8 +- 5 files changed, 275 insertions(+), 183 deletions(-) diff --git a/ci-scripts/conf_files/rcc.band40.tm1.25PRB.FairScheduler.usrpb210.conf b/ci-scripts/conf_files/rcc.band40.tm1.25PRB.FairScheduler.usrpb210.conf index 419598647b..7f6bff304d 100644 --- a/ci-scripts/conf_files/rcc.band40.tm1.25PRB.FairScheduler.usrpb210.conf +++ b/ci-scripts/conf_files/rcc.band40.tm1.25PRB.FairScheduler.usrpb210.conf @@ -19,54 +19,54 @@ eNBs = tracking_area_code = 1; plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } ); - ////////// Physical parameters: + ////////// Physical parameters: component_carriers = ( { - node_function = "NGFI_RCC_IF4p5"; - node_timing = "synch_to_ext_device"; - node_synch_ref = 0; - frame_type = "TDD"; - tdd_config = 1; - tdd_config_s = 0; - prefix_type = "NORMAL"; - eutra_band = 40; - downlink_frequency = 2350000000L; - uplink_frequency_offset = 0; - Nid_cell = 0; - N_RB_DL = 25; - Nid_cell_mbsfn = 0; - nb_antenna_ports = 1; - nb_antennas_tx = 1; - nb_antennas_rx = 1; - tx_gain = 90; - rx_gain = 125; - prach_root = 0; - prach_config_index = 0; - prach_high_speed = "DISABLE"; - prach_zero_correlation = 1; - prach_freq_offset = 2; - pucch_delta_shift = 1; - pucch_nRB_CQI = 1; - pucch_nCS_AN = 0; - pucch_n1_AN = 0; - pdsch_referenceSignalPower =-27; - pdsch_p_b = 0; - pusch_n_SB = 1; - pusch_enable64QAM = "DISABLE"; - pusch_hoppingMode = "interSubFrame"; - pusch_hoppingOffset = 0; - pusch_groupHoppingEnabled = "ENABLE"; - pusch_groupAssignment = 0; - pusch_sequenceHoppingEnabled = "DISABLE"; - pusch_nDMRS1 = 1; - phich_duration = "NORMAL"; - phich_resource = "ONESIXTH"; - srs_enable = "DISABLE"; - /* srs_BandwidthConfig =; - srs_SubframeConfig =; - srs_ackNackST =; - srs_MaxUpPts =;*/ + node_function = "NGFI_RCC_IF4p5"; + node_timing = "synch_to_ext_device"; + node_synch_ref = 0; + frame_type = "TDD"; + tdd_config = 1; + tdd_config_s = 0; + prefix_type = "NORMAL"; + eutra_band = 40; + downlink_frequency = 2350000000L; + uplink_frequency_offset = 0; + Nid_cell = 0; + N_RB_DL = 25; + Nid_cell_mbsfn = 0; + nb_antenna_ports = 1; + nb_antennas_tx = 1; + nb_antennas_rx = 1; + tx_gain = 90; + rx_gain = 125; + prach_root = 0; + prach_config_index = 0; + prach_high_speed = "DISABLE"; + prach_zero_correlation = 1; + prach_freq_offset = 2; + pucch_delta_shift = 1; + pucch_nRB_CQI = 1; + pucch_nCS_AN = 0; + pucch_n1_AN = 0; + pdsch_referenceSignalPower =-27; + pdsch_p_b = 0; + pusch_n_SB = 1; + pusch_enable64QAM = "DISABLE"; + pusch_hoppingMode = "interSubFrame"; + pusch_hoppingOffset = 0; + pusch_groupHoppingEnabled = "ENABLE"; + pusch_groupAssignment = 0; + pusch_sequenceHoppingEnabled = "DISABLE"; + pusch_nDMRS1 = 1; + phich_duration = "NORMAL"; + phich_resource = "ONESIXTH"; + srs_enable = "DISABLE"; + /* srs_BandwidthConfig =; + srs_SubframeConfig =; + srs_ackNackST =; + srs_MaxUpPts =;*/ pusch_p0_Nominal = -96; pusch_alpha = "AL1"; @@ -76,7 +76,7 @@ eNBs = pucch_deltaF_Format1b = "deltaF3"; pucch_deltaF_Format2 = "deltaF0"; pucch_deltaF_Format2a = "deltaF0"; - pucch_deltaF_Format2b = "deltaF0"; + pucch_deltaF_Format2b = "deltaF0"; rach_numberOfRA_Preambles = 64; rach_preamblesGroupAConfig = "DISABLE"; @@ -92,17 +92,17 @@ eNBs = rach_macContentionResolutionTimer = 48; rach_maxHARQ_Msg3Tx = 4; - pcch_default_PagingCycle = 128; - pcch_nB = "oneT"; - bcch_modificationPeriodCoeff = 2; - ue_TimersAndConstants_t300 = 1000; - ue_TimersAndConstants_t301 = 1000; - ue_TimersAndConstants_t310 = 1000; - ue_TimersAndConstants_t311 = 10000; - ue_TimersAndConstants_n310 = 20; - ue_TimersAndConstants_n311 = 1; + pcch_default_PagingCycle = 128; + pcch_nB = "oneT"; + bcch_modificationPeriodCoeff = 2; + ue_TimersAndConstants_t300 = 1000; + ue_TimersAndConstants_t301 = 1000; + ue_TimersAndConstants_t310 = 1000; + ue_TimersAndConstants_t311 = 10000; + ue_TimersAndConstants_n310 = 20; + ue_TimersAndConstants_n311 = 1; - ue_TransmissionMode = 1; + ue_TransmissionMode = 1; } ); @@ -148,7 +148,7 @@ eNBs = enable_measurement_reports = "no"; ///X2 - enable_x2 = "no"; + enable_x2 = "no"; t_reloc_prep = 1000; /* unit: millisecond */ tx2_reloc_overall = 2000; /* unit: millisecond */ t_dc_prep = 1000; /* unit: millisecond */ @@ -186,41 +186,41 @@ eNBs = } ); MACRLCs = ( - { - num_cc = 1; - tr_s_preference = "local_L1"; - tr_n_preference = "local_RRC"; - scheduler_mode = "fairRR"; - puSch10xSnr = 200; - puCch10xSnr = 200; - } + { + num_cc = 1; + tr_s_preference = "local_L1"; + tr_n_preference = "local_RRC"; + scheduler_mode = "fairRR"; + puSch10xSnr = 200; + puCch10xSnr = 200; + } ); L1s = ( - { - num_cc = 1; - tr_n_preference = "local_mac"; - } + { + num_cc = 1; + tr_n_preference = "local_mac"; + } ); RUs = ( - { - local_if_name = "lo"; - remote_address = "127.0.0.2"; - local_address = "127.0.0.1"; - local_portc = 50000; - remote_portc = 50000; - local_portd = 50001; - remote_portd = 50001; - local_rf = "no" - tr_preference = "udp_if4p5" - nb_tx = 1 - nb_rx = 1 - att_tx = 0 - att_rx = 0; - eNB_instances = [0]; - } -); + { + local_if_name = "lo"; + remote_address = "127.0.0.2"; + local_address = "127.0.0.1"; + local_portc = 50000; + remote_portc = 50000; + local_portd = 50001; + remote_portd = 50001; + local_rf = "no" + tr_preference = "udp_if4p5" + nb_tx = 1 + nb_rx = 1 + att_tx = 0 + att_rx = 0; + eNB_instances = [0]; + } +); THREAD_STRUCT = ( { diff --git a/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf b/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf index 2c3c11b84f..574c8b2545 100644 --- a/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf +++ b/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf @@ -25,51 +25,51 @@ eNBs = component_carriers = ( { - node_function = "NGFI_RCC_IF4p5"; - node_timing = "synch_to_ext_device"; - node_synch_ref = 0; - frame_type = "FDD"; - tdd_config = 3; - tdd_config_s = 0; - prefix_type = "NORMAL"; - eutra_band = 7; - downlink_frequency = 2680000000L; - uplink_frequency_offset = -120000000; - Nid_cell = 0; - N_RB_DL = 25; - Nid_cell_mbsfn = 0; - nb_antenna_ports = 1; - nb_antennas_tx = 1; - nb_antennas_rx = 1; - tx_gain = 90; - rx_gain = 125; - pbch_repetition = "FALSE"; - prach_root = 0; - prach_config_index = 0; - prach_high_speed = "DISABLE"; - prach_zero_correlation = 1; - prach_freq_offset = 2; - pucch_delta_shift = 1; - pucch_nRB_CQI = 0; - pucch_nCS_AN = 0; - pucch_n1_AN = 0; - pdsch_referenceSignalPower = -25; - pdsch_p_b = 0; - pusch_n_SB = 1; - pusch_enable64QAM = "DISABLE"; - pusch_hoppingMode = "interSubFrame"; - pusch_hoppingOffset = 0; - pusch_groupHoppingEnabled = "ENABLE"; - pusch_groupAssignment = 0; - pusch_sequenceHoppingEnabled = "DISABLE"; - pusch_nDMRS1 = 1; - phich_duration = "NORMAL"; - phich_resource = "ONESIXTH"; - srs_enable = "DISABLE"; - /* srs_BandwidthConfig =; - srs_SubframeConfig =; - srs_ackNackST =; - srs_MaxUpPts =;*/ + node_function = "NGFI_RCC_IF4p5"; + node_timing = "synch_to_ext_device"; + node_synch_ref = 0; + frame_type = "FDD"; + tdd_config = 3; + tdd_config_s = 0; + prefix_type = "NORMAL"; + eutra_band = 7; + downlink_frequency = 2680000000L; + uplink_frequency_offset = -120000000; + Nid_cell = 0; + N_RB_DL = 25; + Nid_cell_mbsfn = 0; + nb_antenna_ports = 1; + nb_antennas_tx = 1; + nb_antennas_rx = 1; + tx_gain = 90; + rx_gain = 125; + pbch_repetition = "FALSE"; + prach_root = 0; + prach_config_index = 0; + prach_high_speed = "DISABLE"; + prach_zero_correlation = 1; + prach_freq_offset = 2; + pucch_delta_shift = 1; + pucch_nRB_CQI = 0; + pucch_nCS_AN = 0; + pucch_n1_AN = 0; + pdsch_referenceSignalPower = -25; + pdsch_p_b = 0; + pusch_n_SB = 1; + pusch_enable64QAM = "DISABLE"; + pusch_hoppingMode = "interSubFrame"; + pusch_hoppingOffset = 0; + pusch_groupHoppingEnabled = "ENABLE"; + pusch_groupAssignment = 0; + pusch_sequenceHoppingEnabled = "DISABLE"; + pusch_nDMRS1 = 1; + phich_duration = "NORMAL"; + phich_resource = "ONESIXTH"; + srs_enable = "DISABLE"; + /* srs_BandwidthConfig =; + srs_SubframeConfig =; + srs_ackNackST =; + srs_MaxUpPts =;*/ pusch_p0_Nominal = -96; pusch_alpha = "AL1"; @@ -79,7 +79,7 @@ eNBs = pucch_deltaF_Format1b = "deltaF3"; pucch_deltaF_Format2 = "deltaF0"; pucch_deltaF_Format2a = "deltaF0"; - pucch_deltaF_Format2b = "deltaF0"; + pucch_deltaF_Format2b = "deltaF0"; rach_numberOfRA_Preambles = 64; rach_preamblesGroupAConfig = "DISABLE"; @@ -97,25 +97,25 @@ eNBs = pcch_default_PagingCycle = 128; pcch_nB = "oneT"; - bcch_modificationPeriodCoeff = 2; - ue_TimersAndConstants_t300 = 1000; - ue_TimersAndConstants_t301 = 1000; - ue_TimersAndConstants_t310 = 1000; - ue_TimersAndConstants_t311 = 10000; - ue_TimersAndConstants_n310 = 20; - ue_TimersAndConstants_n311 = 1; - ue_TransmissionMode = 1; + bcch_modificationPeriodCoeff = 2; + ue_TimersAndConstants_t300 = 1000; + ue_TimersAndConstants_t301 = 1000; + ue_TimersAndConstants_t310 = 1000; + ue_TimersAndConstants_t311 = 10000; + ue_TimersAndConstants_n310 = 20; + ue_TimersAndConstants_n311 = 1; + ue_TransmissionMode = 1; //Parameters for SIB18 - rxPool_sc_CP_Len = "normal"; - rxPool_sc_Period = "sf40"; - rxPool_data_CP_Len = "normal"; - rxPool_ResourceConfig_prb_Num = 20; - rxPool_ResourceConfig_prb_Start = 5; - rxPool_ResourceConfig_prb_End = 44; - rxPool_ResourceConfig_offsetIndicator_present = "prSmall"; - rxPool_ResourceConfig_offsetIndicator_choice = 0; - rxPool_ResourceConfig_subframeBitmap_present = "prBs40"; + rxPool_sc_CP_Len = "normal"; + rxPool_sc_Period = "sf40"; + rxPool_data_CP_Len = "normal"; + rxPool_ResourceConfig_prb_Num = 20; + rxPool_ResourceConfig_prb_Start = 5; + rxPool_ResourceConfig_prb_End = 44; + rxPool_ResourceConfig_offsetIndicator_present = "prSmall"; + rxPool_ResourceConfig_offsetIndicator_choice = 0; + rxPool_ResourceConfig_subframeBitmap_present = "prBs40"; rxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "00000000000000000000"; rxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5; rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0; @@ -185,7 +185,7 @@ eNBs = enable_measurement_reports = "no"; ///X2 - enable_x2 = "no"; + enable_x2 = "no"; t_reloc_prep = 1000; /* unit: millisecond */ tx2_reloc_overall = 2000; /* unit: millisecond */ t_dc_prep = 1000; /* unit: millisecond */ @@ -205,21 +205,21 @@ eNBs = ); MACRLCs = ( - { - num_cc = 1; - tr_s_preference = "local_L1"; - tr_n_preference = "local_RRC"; - phy_test_mode = 0; - puSch10xSnr = 160; - puCch10xSnr = 160; - } + { + num_cc = 1; + tr_s_preference = "local_L1"; + tr_n_preference = "local_RRC"; + phy_test_mode = 0; + puSch10xSnr = 160; + puCch10xSnr = 160; + } ); L1s = ( - { - num_cc = 1; - tr_n_preference = "local_mac"; - } + { + num_cc = 1; + tr_n_preference = "local_mac"; + } ); RUs = ( @@ -260,20 +260,20 @@ NETWORK_CONTROLLER : FLEXRAN_AWAIT_RECONF = "no"; }; - log_config : - { - global_log_level ="info"; - global_log_verbosity ="medium"; - hw_log_level ="info"; - hw_log_verbosity ="medium"; - phy_log_level ="info"; - phy_log_verbosity ="medium"; - mac_log_level ="info"; - mac_log_verbosity ="high"; - rlc_log_level ="info"; - rlc_log_verbosity ="medium"; - pdcp_log_level ="info"; - pdcp_log_verbosity ="medium"; - rrc_log_level ="info"; - rrc_log_verbosity ="medium"; - }; +log_config : +{ + global_log_level ="info"; + global_log_verbosity ="medium"; + hw_log_level ="info"; + hw_log_verbosity ="medium"; + phy_log_level ="info"; + phy_log_verbosity ="medium"; + mac_log_level ="info"; + mac_log_verbosity ="high"; + rlc_log_level ="info"; + rlc_log_verbosity ="medium"; + pdcp_log_level ="info"; + pdcp_log_verbosity ="medium"; + rrc_log_level ="info"; + rrc_log_verbosity ="medium"; +}; diff --git a/docker/scripts/enb_entrypoint.sh b/docker/scripts/enb_entrypoint.sh index dbe97360f6..6810a86416 100755 --- a/docker/scripts/enb_entrypoint.sh +++ b/docker/scripts/enb_entrypoint.sh @@ -11,6 +11,8 @@ if [[ -v USE_FDD_DU ]]; then ln -s $PREFIX/etc/du.fdd.conf $PREFIX/etc/enb.conf; if [[ -v USE_FDD_MONO ]]; then ln -s $PREFIX/etc/enb.fdd.conf $PREFIX/etc/enb.conf; fi if [[ -v USE_TDD_MONO ]]; then ln -s $PREFIX/etc/enb.tdd.conf $PREFIX/etc/enb.conf; fi if [[ -v USE_FDD_FAPI_RCC ]]; then ln -s $PREFIX/etc/rcc.nfapi.fdd.conf $PREFIX/etc/enb.conf; fi +if [[ -v USE_FDD_IF4P5_RCC ]]; then ln -s $PREFIX/etc/rcc.if4p5.fdd.conf $PREFIX/etc/enb.conf; fi +if [[ -v USE_TDD_IF4P5_RCC ]]; then ln -s $PREFIX/etc/rcc.if4p5.tdd.conf $PREFIX/etc/enb.conf; fi if [[ -v USE_FDD_RRU ]]; then ln -s $PREFIX/etc/rru.fdd.conf $PREFIX/etc/enb.conf; fi if [[ -v USE_TDD_RRU ]]; then ln -s $PREFIX/etc/rru.tdd.conf $PREFIX/etc/enb.conf; fi diff --git a/docker/scripts/enb_parameters.yaml b/docker/scripts/enb_parameters.yaml index d115d177ab..749600f47d 100644 --- a/docker/scripts/enb_parameters.yaml +++ b/docker/scripts/enb_parameters.yaml @@ -25,7 +25,7 @@ dest_dir: docker/etc - configurations: - - filePrefix: cu + - filePrefix: cu.band7.tm1.25PRB outputfilename: "cu.fdd.conf" config: - key: Active_eNBs @@ -68,7 +68,7 @@ - key: ENB_IPV4_ADDRESS_FOR_X2C env: "@F1_CU_IP_ADDRESS@" - - filePrefix: du + - filePrefix: du.band7.tm1.25PRB outputfilename: "du.fdd.conf" config: - key: Active_eNBs @@ -248,3 +248,89 @@ - key: ENB_IPV4_ADDRESS_FOR_X2C env: "@F1_CU_IP_ADDRESS@" + - filePrefix: "rcc.band7.tm1.if4p5.lo.25PRB" + outputfilename: "rcc.if4p5.fdd.conf" + config: + - key: Active_eNBs + env: "@ENB_NAME@" + - key: eNB_name + env: "@ENB_NAME@" + - key: plmn_list + env: + mcc: "@MCC@" + mnc: "@MNC@" + mnc_length: "@MNC_LENGTH@" + - key: tracking_area_code + env: "@TAC@" + - key: eutra_band + env: "@UTRA_BAND_ID@" + - key: downlink_frequency + env: "@DL_FREQUENCY_IN_MHZ@000000" + - key: uplink_frequency_offset + env: "@UL_FREQUENCY_OFFSET_IN_MHZ@000000" + - key: Nid_cell + env: "@NID_CELL@" + - key: N_RB_DL + env: "@NB_PRB@" + - key: ipv4 + env: "@MME_S1C_IP_ADDRESS@" + - key: ENB_INTERFACE_NAME_FOR_S1_MME + env: "@RCC_IF_NAME@" + - key: ENB_IPV4_ADDRESS_FOR_S1_MME + env: "@RCC_S1C_IP_ADDRESS@" + - key: ENB_INTERFACE_NAME_FOR_S1U + env: "@RCC_IF_NAME@" + - key: ENB_IPV4_ADDRESS_FOR_S1U + env: "@RCC_IP_ADDRESS@" + - key: ENB_IPV4_ADDRESS_FOR_X2C + env: "@RCC_IP_ADDRESS@" + - key: local_if_name + env: "@IF4P5_IF_NAME@" + - key: remote_address + env: "@IF4P5_RRU_IP_ADDRESS@" + - key: local_address + env: "@IF4P5_RCC_IP_ADDRESS@" + + - filePrefix: "rcc.band40.tm1.25PRB" + outputfilename: "rcc.if4p5.tdd.conf" + config: + - key: Active_eNBs + env: "@ENB_NAME@" + - key: eNB_name + env: "@ENB_NAME@" + - key: plmn_list + env: + mcc: "@MCC@" + mnc: "@MNC@" + mnc_length: "@MNC_LENGTH@" + - key: tracking_area_code + env: "@TAC@" + - key: eutra_band + env: "@UTRA_BAND_ID@" + - key: downlink_frequency + env: "@DL_FREQUENCY_IN_MHZ@000000" + - key: uplink_frequency_offset + env: "@UL_FREQUENCY_OFFSET_IN_MHZ@000000" + - key: Nid_cell + env: "@NID_CELL@" + - key: N_RB_DL + env: "@NB_PRB@" + - key: ipv4 + env: "@MME_S1C_IP_ADDRESS@" + - key: ENB_INTERFACE_NAME_FOR_S1_MME + env: "@RCC_IF_NAME@" + - key: ENB_IPV4_ADDRESS_FOR_S1_MME + env: "@RCC_S1C_IP_ADDRESS@" + - key: ENB_INTERFACE_NAME_FOR_S1U + env: "@RCC_IF_NAME@" + - key: ENB_IPV4_ADDRESS_FOR_S1U + env: "@RCC_IP_ADDRESS@" + - key: ENB_IPV4_ADDRESS_FOR_X2C + env: "@RCC_IP_ADDRESS@" + - key: local_if_name + env: "@IF4P5_IF_NAME@" + - key: remote_address + env: "@IF4P5_RRU_IP_ADDRESS@" + - key: local_address + env: "@IF4P5_RCC_IP_ADDRESS@" + diff --git a/docker/scripts/generateTemplate.py b/docker/scripts/generateTemplate.py index 418476d395..5ce0d146e5 100644 --- a/docker/scripts/generateTemplate.py +++ b/docker/scripts/generateTemplate.py @@ -39,20 +39,24 @@ def main(): for config in data[1]["configurations"]: filePrefix = config["filePrefix"] outputfilename = config["outputfilename"] + print('================================================') print('filePrefix = ' + filePrefix) print('outputfilename = ' + outputfilename) for inputfile in dir: if inputfile.find(filePrefix) >=0: - prefix_outputfile = {"cu": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}', - "du": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}', + prefix_outputfile = {"cu.band7.tm1.25PRB": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}', + "du.band7.tm1.25PRB": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}', "rru.fdd": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}', "rru.tdd": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}', "enb.band7.tm1.25PRB.usrpb210": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}', "enb.band40.tm1.25PRB.FairScheduler.usrpb210": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}', "rcc.band7.tm1.nfapi": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}', + "rcc.band7.tm1.if4p5.lo.25PRB": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}', + "rcc.band40.tm1.25PRB": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}', "ue.nfapi": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}', "ue_sim_ci": f'{data[0]["paths"]["dest_dir"]}/{outputfilename}' } + print('inputfile = ' + inputfile) if filePrefix in prefix_outputfile: outputfile1 = prefix_outputfile[filePrefix] From a257024cf19967bafc2d55e2877c4899887bcff7 Mon Sep 17 00:00:00 2001 From: Roberto Louro Magueta Date: Wed, 26 May 2021 17:16:00 +0200 Subject: [PATCH 416/579] Revert "Add condition in CU_handle_F1_SETUP_REQUEST to LTE version" This reverts commit 65d24ae205dd5ba296345c9760c3273ab3829843 --- openair2/F1AP/f1ap_cu_interface_management.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/openair2/F1AP/f1ap_cu_interface_management.c b/openair2/F1AP/f1ap_cu_interface_management.c index b86ebb5c13..2d393ad520 100644 --- a/openair2/F1AP/f1ap_cu_interface_management.c +++ b/openair2/F1AP/f1ap_cu_interface_management.c @@ -103,11 +103,7 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance, assoc_id, stream); } - if (RC.nrrrc && RC.nrrrc[0]->node_type == ngran_gNB_CU) { - message_p = itti_alloc_new_message(TASK_CU_F1, 0, F1AP_SETUP_REQ); - } else { - message_p = itti_alloc_new_message(TASK_RRC_ENB, 0, F1AP_SETUP_REQ); - } + message_p = itti_alloc_new_message(TASK_CU_F1, 0, F1AP_SETUP_REQ); /* assoc_id */ F1AP_SETUP_REQ(message_p).assoc_id = assoc_id; From 56c5a0b3c3f1df831383e115776d84af7fdc2846 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Wed, 26 May 2021 16:19:07 +0100 Subject: [PATCH 417/579] Fix SI_container index for LTE --- openair2/RRC/LTE/rrc_eNB.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openair2/RRC/LTE/rrc_eNB.c b/openair2/RRC/LTE/rrc_eNB.c index f84a02a477..3fdc56a811 100644 --- a/openair2/RRC/LTE/rrc_eNB.c +++ b/openair2/RRC/LTE/rrc_eNB.c @@ -8843,8 +8843,8 @@ void handle_f1_setup_req(f1ap_setup_req_t *f1_setup_req) { F1AP_SETUP_RESP (msg_p).cells_to_activate[cu_cell_ind].nrpci = f1_setup_req->nr_pci[i]; int num_SI= 0; if (rrc->carrier[0].SIB23) { - F1AP_SETUP_RESP (msg_p).cells_to_activate[cu_cell_ind].SI_container[num_SI] = rrc->carrier[0].SIB23; - F1AP_SETUP_RESP (msg_p).cells_to_activate[cu_cell_ind].SI_container_length[num_SI] = rrc->carrier[0].sizeof_SIB23; + F1AP_SETUP_RESP (msg_p).cells_to_activate[cu_cell_ind].SI_container[2+num_SI] = rrc->carrier[0].SIB23; + F1AP_SETUP_RESP (msg_p).cells_to_activate[cu_cell_ind].SI_container_length[2+num_SI] = rrc->carrier[0].sizeof_SIB23; //printf("SI %d size %d: ", 0, F1AP_SETUP_RESP(msg_p).SI_container_length[j][num_SI]); //for (int n = 0; n < F1AP_SETUP_RESP(msg_p).SI_container_length[j][num_SI]; n++) // printf("%02x ", F1AP_SETUP_RESP(msg_p).SI_container[0][num_SI][n]); From 44f7766a3d3a45684e0262a7f823494d1632b049 Mon Sep 17 00:00:00 2001 From: hardy Date: Wed, 26 May 2021 17:39:19 +0200 Subject: [PATCH 418/579] adding SA rfsim test --- ci-scripts/reportTestLocally.sh | 76 +++++++++++++++++ ci-scripts/runTestOnVM.sh | 147 +++++++++++++++++++++++++++++--- 2 files changed, 213 insertions(+), 10 deletions(-) diff --git a/ci-scripts/reportTestLocally.sh b/ci-scripts/reportTestLocally.sh index 105c95786f..27a7a58a84 100755 --- a/ci-scripts/reportTestLocally.sh +++ b/ci-scripts/reportTestLocally.sh @@ -748,6 +748,82 @@ function report_test { echo " Statistics" >> ./test_simulator_results.html echo " " >> ./test_simulator_results.html + #SA + EPC_CONFIGS=("noS1") + TRANS_MODES=("tdd") + FR_MODE=("SA") + BW_CASES=(106) + for CN_CONFIG in ${EPC_CONFIGS[@]} + do + for TMODE in ${TRANS_MODES[@]} + do + for BW in ${BW_CASES[@]} + do + echo " " >> ./test_simulator_results.html + if [[ $CN_CONFIG =~ .*wS1.* ]] + then + echo " Test with EPC (aka withS1): ${TMODE} -- ${BW}PRB -- ${FR_MODE}" >> ./test_simulator_results.html + else + echo " Test without EPC (aka noS1): ${TMODE} -- ${BW}PRB -- ${FR_MODE}" >> ./test_simulator_results.html + fi + echo " " >> ./test_simulator_results.html + + + #SA test (--sa option) + + SA_ENB_LOG=$ARCHIVES_LOC/${TMODE}_${BW}prb_${CN_CONFIG}_gnb_sa_test.log + SA_UE_LOG=$ARCHIVES_LOC/${TMODE}_${BW}prb_${CN_CONFIG}_ue_sa_test.log + if [ -f $RA_ENB_LOG ] && [ -f $RA_UE_LOG ] + then + #get rid of full path + NAME_ENB=`echo $SA_ENB_LOG | sed -e "s#$ARCHIVES_LOC/##"` + NAME_UE=`echo $SA_UE_LOG | sed -e "s#$ARCHIVES_LOC/##"` + echo " " >> ./test_simulator_results.html + echo " $NAME_ENB --- $NAME_UE" >> ./test_simulator_results.html + echo " Check if SA proc succeeded" >> ./test_simulator_results.html + + + RRC_CHECK=`egrep -c "Received rrcSetupComplete" $SA_ENB_LOG` + CBRA_CHECK=`egrep -c "Received Ack of RA-Msg4\. CBRA procedure succeeded" $SA_ENB_LOG` + SIB1_CHECK=`egrep -c "SIB1 decoded" $SA_UE_LOG + + + if [ $RRC_CHECK -gt 0 ] && [ $CBRA_CHECK -gt 0 ] && [ $SIB1_CHECK -gt 0 ] + then + echo " OK" >> ./test_simulator_results.html + else + echo " KO" >> ./test_simulator_results.html + fi + + echo "
" >> ./test_simulator_results.html
+                    if [ $RRC_CHECK -gt 0 ]
+                    then
+                        echo "- Received rrcSetupComplete OK" >> ./test_simulator_results.html
+                    else
+                        echo "- Received rrcSetupComplete KO" >> ./test_simulator_results.html
+                    fi
+                    if [ $CBRA_CHECK -gt 0 ]
+                    then
+                        echo "- CBRA procedure succeeded OK" >> ./test_simulator_results.html
+                    else
+                        echo "- CBRA procedure succeeded KO" >> ./test_simulator_results.html
+                    fi
+                    if [ $SIB1_CHECK -gt 0 ]
+                    then
+                        echo "- SIB1 decoded OK" >> ./test_simulator_results.html
+                    else
+                        echo "- SIB1 decoded KO" >> ./test_simulator_results.html
+                    fi
+
+                    echo "        
" >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + fi + + done + done + done + + EPC_CONFIGS=("noS1") TRANS_MODES=("tdd") FR_MODE=("FR2") diff --git a/ci-scripts/runTestOnVM.sh b/ci-scripts/runTestOnVM.sh index fc35370e0a..d600c0e5c9 100755 --- a/ci-scripts/runTestOnVM.sh +++ b/ci-scripts/runTestOnVM.sh @@ -277,6 +277,46 @@ function check_ping_result { } +function check_sa_result { + local LOC_GNB_LOG=$1 + local LOC_UE_LOG=$2 + + #if log files exist + if [ -f $LOC_GNB_LOG ] && [ -f $LOC_UE_LOG ] + then + + #gNB SA test + #console check + echo "Checking gNB Log for SA success" + egrep "Received rrcSetupComplete" $1 + egrep "Received Ack of RA-Msg4\. CBRA procedure succeeded" $1 + + #script check + local RRC_CHECK=`egrep -c "Received rrcSetupComplete" $1` + local CBRA_CHECK=`egrep -c "Received Ack of RA-Msg4\. CBRA procedure succeeded" $1` + + #UE SA test + #console check + echo 'Checking UE Log for SA success' + egrep "SIB1 decoded" $2 + #script check + local SIB1_CHECK=`egrep -c "SIB1 decoded" $2` + + #generate status + if [ $RRC_CHECK -eq 0 ] || [ $CBRA_CHECK -eq 0 ] || [ $SIB1_CHECK -eq 0 ] + then + SA_STATUS=-1 + echo "SA test FAILED, could not find the markers" + fi + #case where log files do not exist + else + echo "SA test log files not present" + SA_STATUS=-1 + fi + +} + + function check_ra_result { local LOC_GNB_LOG=$1 local LOC_UE_LOG=$2 @@ -1209,8 +1249,8 @@ function start_rf_sim_gnb { local LOC_CONF_FILE=$5 # 1 is with S1 and 0 without S1 aka noS1 local LOC_S1_CONFIGURATION=$6 - #LOC_RA_TEST=1 will run the RA test check - local LOC_RA_TEST=$7 + #LOC_RA_SA_TEST=1 will run the RA test check ; =2 will run the SA test + local LOC_RA_SA_TEST=$7 if [ -e rbconfig.raw ]; then rm -f rbconfig.raw; fi if [ -e reconfig.raw ]; then rm -f reconfig.raw; fi @@ -1233,11 +1273,13 @@ function start_rf_sim_gnb { echo "sudo rm -f r*config.raw" >> $1 if [ $LOC_S1_CONFIGURATION -eq 0 ] then - if [ $LOC_RA_TEST -eq 0 ] #no RA test => use --phy-test option + if [ $LOC_RA_SA_TEST -eq 0 ] #no RA test => use --phy-test option then echo "echo \"./nr-softmodem -O /home/ubuntu/tmp/ci-scripts/conf_files/ci-$LOC_CONF_FILE --log_config.global_log_options level,nocolor --parallel-config PARALLEL_SINGLE_THREAD --noS1 --nokrnmod 1 --rfsim --phy-test --lowmem --noS1\" > ./my-nr-softmodem-run.sh " >> $1 - else #RA test => use --do-ra option + elif [ $LOC_RA_SA_TEST -eq 1 ] #RA test => use --do-ra option echo "echo \"./nr-softmodem -O /home/ubuntu/tmp/ci-scripts/conf_files/ci-$LOC_CONF_FILE --log_config.global_log_options level,nocolor --parallel-config PARALLEL_SINGLE_THREAD --rfsim --do-ra --lowmem --noS1\" > ./my-nr-softmodem-run.sh " >> $1 + else #SA test => use --sa option + echo "echo \"./nr-softmodem -O /home/ubuntu/tmp/ci-scripts/conf_files/ci-$LOC_CONF_FILE --log_config.global_log_options level,nocolor --parallel-config PARALLEL_SINGLE_THREAD --rfsim --sa --lowmem \" > ./my-nr-softmodem-run.sh " >> $1 fi fi echo "chmod 775 ./my-nr-softmodem-run.sh" >> $1 @@ -1273,7 +1315,7 @@ function start_rf_sim_gnb { fi # check noS1 config only outside RA test (as it does not support noS1) - if [ $LOC_S1_CONFIGURATION -eq 0 ] && [ $LOC_RA_TEST -eq 0 ] + if [ $LOC_S1_CONFIGURATION -eq 0 ] && [ $LOC_RA_SA_TEST -eq 0 ] then echo "ifconfig oaitun_enb1 | egrep -c \"inet addr\"" > $1 # Checking oaitun_enb1 interface has now an IP address @@ -1318,8 +1360,8 @@ function start_rf_sim_nr_ue { local LOC_FREQUENCY=$6 # 1 is with S1 and 0 without S1 aka noS1 local LOC_S1_CONFIGURATION=$7 - #LOC_RA_TEST=1 will run the RA test check - local LOC_RA_TEST=$8 + #LOC_RA_SA_TEST=1 will run the RA test check ; =2 will run the SA test + local LOC_RA_SA_TEST=$8 # Copy the RAW files from the gNB run scp -o StrictHostKeyChecking=no rbconfig.raw ubuntu@$LOC_NR_UE_VM_IP_ADDR:/home/ubuntu/tmp @@ -1336,11 +1378,13 @@ function start_rf_sim_nr_ue { echo "cd /home/ubuntu/tmp/cmake_targets/ran_build/build/" >> $1 if [ $LOC_S1_CONFIGURATION -eq 0 ] then - if [ $LOC_RA_TEST -eq 0 ] #no RA test => use --phy-test option + if [ $LOC_RA_SA_TEST -eq 0 ] #no RA test => use --phy-test option then echo "echo \"./nr-uesoftmodem --nokrnmod 1 --rfsim --phy-test --rrc_config_path /home/ubuntu/tmp/cmake_targets/ran_build/build/ --log_config.global_log_options level,nocolor --noS1\" > ./my-nr-softmodem-run.sh " >> $1 - else #RA test => use --do-ra option + elif [ $LOC_RA_SA_TEST -eq 1 ] #RA test => use --do-ra option echo "echo \"./nr-uesoftmodem --rfsim --do-ra --log_config.global_log_options level,nocolor --rrc_config_path /home/ubuntu/tmp/cmake_targets/ran_build/build/\" > ./my-nr-softmodem-run.sh " >> $1 + else #SA test => use --sa option + echo "echo \"./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --rfsim --sa --log_config.global_log_options level,nocolor\" > ./my-nr-softmodem-run.sh " >> $1 fi fi echo "chmod 775 ./my-nr-softmodem-run.sh" >> $1 @@ -1375,7 +1419,7 @@ function start_rf_sim_nr_ue { echo "RF-SIM NR-UE is sync'ed w/ gNB" fi # Checking oaitun_ue1 interface has now an IP address (only outside RA test) - if [ $LOC_RA_TEST -eq 0 ] + if [ $LOC_RA_SA_TEST -eq 0 ] then i="0" echo "ifconfig oaitun_ue1 | egrep -c \"inet addr\"" > $1 @@ -2189,6 +2233,88 @@ function run_test_on_vm { if [[ "$RUN_OPTIONS" == "complex" ]] && [[ $VM_NAME =~ .*-rf-sim.* ]] then + echo "############################################################" + echo "SA TEST" + echo "############################################################" + #SA test, attention : has a different config file from the rest of the test + CN_CONFIG="noS1" + CONF_FILE=gnb.sa.band78.fr1.106PRB.usrpb210.conf + S1_NOS1_CFG=0 + PRB=106 + FREQUENCY=3510 + + if [ ! -d $ARCHIVES_LOC ] + then + mkdir --parents $ARCHIVES_LOC + fi + + local try_cnt=0 + NR_STATUS=0 + + ######### start of SA TEST loop + while [ $try_cnt -lt 5 ] #5 because it hardly succeed within CI + do + + SYNC_STATUS=0 + SA_STATUS=0 + rm -f $ARCHIVES_LOC/tdd_${PRB}prb_${CN_CONFIG}*sa_test.log + + echo "############################################################" + echo "${CN_CONFIG} : Starting the gNB" + echo "############################################################" + CURRENT_GNB_LOG_FILE=tdd_${PRB}prb_${CN_CONFIG}_gnb_sa_test.log + #last argument = 2 is to enable --sa for SA test + start_rf_sim_gnb $GNB_VM_CMDS "$GNB_VM_IP_ADDR" $CURRENT_GNB_LOG_FILE $PRB $CONF_FILE $S1_NOS1_CFG 2 + + echo "############################################################" + echo "${CN_CONFIG} : Starting the NR-UE" + echo "############################################################" + CURRENT_NR_UE_LOG_FILE=tdd_${PRB}prb_${CN_CONFIG}_ue_sa_test.log + #last argument = 2 is to enable --sa for SA test + start_rf_sim_nr_ue $NR_UE_VM_CMDS $NR_UE_VM_IP_ADDR $GNB_VM_IP_ADDR $CURRENT_NR_UE_LOG_FILE $PRB $FREQUENCY $S1_NOS1_CFG 2 + if [ $NR_UE_SYNC -eq 0 ] + then + echo "Problem w/ gNB and NR-UE not syncing" + terminate_enb_ue_basic_sim $NR_UE_VM_CMDS $NR_UE_VM_IP_ADDR 2 + terminate_enb_ue_basic_sim $GNB_VM_CMDS $GNB_VM_IP_ADDR 1 + scp -o StrictHostKeyChecking=no ubuntu@$GNB_VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_GNB_LOG_FILE $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$NR_UE_VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_NR_UE_LOG_FILE $ARCHIVES_LOC + SYNC_STATUS=-1 + try_cnt=$((try_cnt+1)) + continue + fi + + echo "############################################################" + echo "${CN_CONFIG} : Terminate gNB/NR-UE simulators" + echo "############################################################" + sleep 20 + terminate_enb_ue_basic_sim $NR_UE_VM_CMDS $NR_UE_VM_IP_ADDR 2 + terminate_enb_ue_basic_sim $GNB_VM_CMDS $GNB_VM_IP_ADDR 1 + scp -o StrictHostKeyChecking=no ubuntu@$GNB_VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_GNB_LOG_FILE $ARCHIVES_LOC + scp -o StrictHostKeyChecking=no ubuntu@$NR_UE_VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_NR_UE_LOG_FILE $ARCHIVES_LOC + + #check SA markers in gNB and NR UE log files + echo "############################################################" + echo "${CN_CONFIG} : Checking SA on gNB / NR-UE" + echo "############################################################" + + # Proper check to be done when SA test is working! + check_sa_result $ARCHIVES_LOC/$CURRENT_GNB_LOG_FILE $ARCHIVES_LOC/$CURRENT_NR_UE_LOG_FILE + if [ $SA_STATUS -ne 0 ] + then + echo "SA test NOT OK" + echo "try_cnt = " $try_cnt + try_cnt=$((try_cnt+1)) + else + try_cnt=$((try_cnt+10)) + fi + done + ########### end SA test + + sleep 30 + + + echo "############################################################" echo "RA TEST FR2" echo "############################################################" @@ -2493,6 +2619,7 @@ function run_test_on_vm { echo "Checking run status" echo "############################################################" + if [ $SA_STATUS -ne 0 ]; then NR_STATUS=-1; fi if [ $RA_FR2_STATUS -ne 0 ]; then NR_STATUS=-1; fi if [ $RA_STATUS -ne 0 ]; then NR_STATUS=-1; fi if [ $SYNC_STATUS -ne 0 ]; then NR_STATUS=-1; fi From 39e3196ec99bece1bd6d081110bf60e1e9913fe5 Mon Sep 17 00:00:00 2001 From: hardy Date: Wed, 26 May 2021 17:42:17 +0200 Subject: [PATCH 419/579] fix typo --- ci-scripts/reportTestLocally.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-scripts/reportTestLocally.sh b/ci-scripts/reportTestLocally.sh index 27a7a58a84..7290507b4e 100755 --- a/ci-scripts/reportTestLocally.sh +++ b/ci-scripts/reportTestLocally.sh @@ -785,7 +785,7 @@ function report_test { RRC_CHECK=`egrep -c "Received rrcSetupComplete" $SA_ENB_LOG` CBRA_CHECK=`egrep -c "Received Ack of RA-Msg4\. CBRA procedure succeeded" $SA_ENB_LOG` - SIB1_CHECK=`egrep -c "SIB1 decoded" $SA_UE_LOG + SIB1_CHECK=`egrep -c "SIB1 decoded" $SA_UE_LOG` if [ $RRC_CHECK -gt 0 ] && [ $CBRA_CHECK -gt 0 ] && [ $SIB1_CHECK -gt 0 ] From 2be74a6452596d1ccef629199332fa98912777e8 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Wed, 26 May 2021 17:53:06 +0100 Subject: [PATCH 420/579] Revert dci format indicator assignment for NR_UL_DCI_FORMAT_0_0 --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index a3a55a4171..b6f0fd5fe8 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -1333,7 +1333,7 @@ void fill_dci_pdu_rel15(const NR_ServingCellConfigCommon_t *scc, case NR_RNTI_C: // indicating a UL DCI format 1bit pos=1; - //*dci_pdu |= ((uint64_t)dci_pdu_rel15->format_indicator & 1) << (dci_size - pos); + *dci_pdu |= ((uint64_t)dci_pdu_rel15->format_indicator & 1) << (dci_size - pos); // Freq domain assignment max 16 bit fsize = (int)ceil(log2((N_RB * (N_RB + 1)) >> 1)); pos+=fsize; From 8d096b22fd132aaccd2420195d2ba521a083e87e Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Wed, 26 May 2021 22:24:03 +0100 Subject: [PATCH 421/579] Remove unused variable --- openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c | 1 - 1 file changed, 1 deletion(-) diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c index a06d39913f..7c69b72c2a 100644 --- a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c +++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c @@ -54,7 +54,6 @@ hash_table_t *pdcp_coll_p; static uint64_t pdcp_optmask; ngran_node_t node_type = ngran_gNB; -uint8_t first_dcch = 0; uint8_t proto_agent_flag = 0; /****************************************************************************/ From 892dcfa295292d8e5fdea541c27155e15a12c403 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Wed, 26 May 2021 22:29:16 +0100 Subject: [PATCH 422/579] Fix another SI_container index for LTE --- openair2/ENB_APP/enb_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c index 9b4f3c7261..8aa0772362 100644 --- a/openair2/ENB_APP/enb_config.c +++ b/openair2/ENB_APP/enb_config.c @@ -3167,7 +3167,7 @@ void handle_f1ap_setup_resp(f1ap_setup_resp_t *resp) { (check_plmn_identity(carrier, resp->cells_to_activate[j].mcc, resp->cells_to_activate[j].mnc, resp->cells_to_activate[j].mnc_digit_length)>0 && resp->cells_to_activate[j].nrpci == carrier->physCellId)) { // copy system information and decode it - for (si_ind=2; si_indcells_to_activate[j].num_SI; si_ind++) { + for (si_ind=2; si_indcells_to_activate[j].num_SI + 2; si_ind++) { //printf("SI %d size %d: ", si_ind, resp->SI_container_length[j][si_ind]); //for (int n=0;nSI_container_length[j][si_ind];n++) // printf("%02x ",resp->SI_container[j][si_ind][n]); From a9527371e709834be7b27c03033b8d855caa7505 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Wed, 26 May 2021 22:33:55 +0100 Subject: [PATCH 423/579] Add logs for debug segmentation fault (to be reverted) --- openair2/ENB_APP/enb_config.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c index 8aa0772362..03101eef83 100644 --- a/openair2/ENB_APP/enb_config.c +++ b/openair2/ENB_APP/enb_config.c @@ -3166,12 +3166,15 @@ void handle_f1ap_setup_resp(f1ap_setup_resp_t *resp) { if (RC.rrc[i]->nr_cellid == resp->cells_to_activate[j].nr_cellid && (check_plmn_identity(carrier, resp->cells_to_activate[j].mcc, resp->cells_to_activate[j].mnc, resp->cells_to_activate[j].mnc_digit_length)>0 && resp->cells_to_activate[j].nrpci == carrier->physCellId)) { + + LOG_I(ENB_APP, "Copy system information and decode it for %i number of SI\n", resp->cells_to_activate[j].num_SI); + // copy system information and decode it for (si_ind=2; si_indcells_to_activate[j].num_SI + 2; si_ind++) { - //printf("SI %d size %d: ", si_ind, resp->SI_container_length[j][si_ind]); - //for (int n=0;nSI_container_length[j][si_ind];n++) - // printf("%02x ",resp->SI_container[j][si_ind][n]); - //printf("\n"); + printf("SI %d size %d: ", si_ind, resp->cells_to_activate[j].SI_container_length[si_ind]); + for (int n=0;ncells_to_activate[j].SI_container_length[si_ind];n++) + printf("%02x ",resp->cells_to_activate[j].SI_container[si_ind][n]); + printf("\n"); if (si_ind==6) si_ind=9; if (resp->cells_to_activate[j].SI_container[si_ind] != NULL) { extract_and_decode_SI(i, From 28ca9cfc384897e06aac5ba40fc4dfa223933a4b Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Thu, 27 May 2021 06:24:48 +0100 Subject: [PATCH 424/579] Temporary commit (to be reverted) --- openair2/ENB_APP/enb_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c index 03101eef83..d85ae95262 100644 --- a/openair2/ENB_APP/enb_config.c +++ b/openair2/ENB_APP/enb_config.c @@ -3170,7 +3170,7 @@ void handle_f1ap_setup_resp(f1ap_setup_resp_t *resp) { LOG_I(ENB_APP, "Copy system information and decode it for %i number of SI\n", resp->cells_to_activate[j].num_SI); // copy system information and decode it - for (si_ind=2; si_indcells_to_activate[j].num_SI + 2; si_ind++) { + for (si_ind=2; si_ind<10; si_ind++) { printf("SI %d size %d: ", si_ind, resp->cells_to_activate[j].SI_container_length[si_ind]); for (int n=0;ncells_to_activate[j].SI_container_length[si_ind];n++) printf("%02x ",resp->cells_to_activate[j].SI_container[si_ind][n]); From b17b688c58cbfdb0fe7154928ca3e0daca1e1987 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Thu, 27 May 2021 07:53:05 +0100 Subject: [PATCH 425/579] Temporary commit #2 (to be reverted) --- openair2/RRC/LTE/rrc_eNB.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/openair2/RRC/LTE/rrc_eNB.c b/openair2/RRC/LTE/rrc_eNB.c index 3fdc56a811..9bd2e41c4c 100644 --- a/openair2/RRC/LTE/rrc_eNB.c +++ b/openair2/RRC/LTE/rrc_eNB.c @@ -8845,10 +8845,10 @@ void handle_f1_setup_req(f1ap_setup_req_t *f1_setup_req) { if (rrc->carrier[0].SIB23) { F1AP_SETUP_RESP (msg_p).cells_to_activate[cu_cell_ind].SI_container[2+num_SI] = rrc->carrier[0].SIB23; F1AP_SETUP_RESP (msg_p).cells_to_activate[cu_cell_ind].SI_container_length[2+num_SI] = rrc->carrier[0].sizeof_SIB23; - //printf("SI %d size %d: ", 0, F1AP_SETUP_RESP(msg_p).SI_container_length[j][num_SI]); - //for (int n = 0; n < F1AP_SETUP_RESP(msg_p).SI_container_length[j][num_SI]; n++) - // printf("%02x ", F1AP_SETUP_RESP(msg_p).SI_container[0][num_SI][n]); - //printf("\n"); + printf("SI %d size %d: ", 0, F1AP_SETUP_RESP (msg_p).cells_to_activate[cu_cell_ind].SI_container_length[2+num_SI]); + for (int n = 0; n < F1AP_SETUP_RESP (msg_p).cells_to_activate[cu_cell_ind].SI_container_length[2+num_SI]; n++) + printf("%02x ", F1AP_SETUP_RESP (msg_p).cells_to_activate[cu_cell_ind].SI_container[2+num_SI][n]); + printf("\n"); num_SI++; } From fb0b99af3e78a8371a7ddc0b46194fb30424d2a2 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Thu, 27 May 2021 11:56:17 +0100 Subject: [PATCH 426/579] Fix another SI_container index for LTE --- openair2/F1AP/f1ap_du_interface_management.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/openair2/F1AP/f1ap_du_interface_management.c b/openair2/F1AP/f1ap_du_interface_management.c index 85248d7b3a..9b92845cab 100644 --- a/openair2/F1AP/f1ap_du_interface_management.c +++ b/openair2/F1AP/f1ap_du_interface_management.c @@ -553,10 +553,10 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance, for (int si = 0;si < gNB_CUSystemInformation->sibtypetobeupdatedlist.list.count;si++) { F1AP_SibtypetobeupdatedListItem_t *sib_item = gNB_CUSystemInformation->sibtypetobeupdatedlist.list.array[si]; size_t size = sib_item->sIBmessage.size; - F1AP_SETUP_RESP (msg_p).cells_to_activate[i].SI_container_length[si] = size; - LOG_D(F1AP, "F1AP: SI_container_length[%d][%d] %ld bytes\n", i, (int)sib_item->sIBtype, size); - F1AP_SETUP_RESP (msg_p).cells_to_activate[i].SI_container[si] = malloc(F1AP_SETUP_RESP (msg_p).cells_to_activate[i].SI_container_length[si]); - memcpy((void*)F1AP_SETUP_RESP (msg_p).cells_to_activate[i].SI_container[si], + F1AP_SETUP_RESP (msg_p).cells_to_activate[i].SI_container_length[sib_item->sIBtype] = size; + LOG_I(F1AP, "F1AP: SI_container_length[%d][%d] %ld bytes\n", i, (int)sib_item->sIBtype, size); + F1AP_SETUP_RESP (msg_p).cells_to_activate[i].SI_container[sib_item->sIBtype] = malloc(size); + memcpy((void*)F1AP_SETUP_RESP (msg_p).cells_to_activate[i].SI_container[sib_item->sIBtype], (void*)sib_item->sIBmessage.buf, size); } @@ -1168,10 +1168,10 @@ int DU_handle_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, for (int si = 0;si < gNB_CUSystemInformation->sibtypetobeupdatedlist.list.count;si++) { F1AP_SibtypetobeupdatedListItem_t *sib_item = gNB_CUSystemInformation->sibtypetobeupdatedlist.list.array[si]; size_t size = sib_item->sIBmessage.size; - F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].SI_container_length[si] = size; - LOG_D(F1AP, "F1AP: SI_container_length[%d][%d] %ld bytes\n", i, (int)sib_item->sIBtype, size); - F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].SI_container[si] = malloc(F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].SI_container_length[si]); - memcpy((void*)F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].SI_container[si], + F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].SI_container_length[sib_item->sIBtype] = size; + LOG_I(F1AP, "F1AP: SI_container_length[%d][%d] %ld bytes\n", i, (int)sib_item->sIBtype, size); + F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].SI_container[sib_item->sIBtype] = malloc(size); + memcpy((void*)F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).cells_to_activate[i].SI_container[sib_item->sIBtype], (void*)sib_item->sIBmessage.buf, size); } From 6e981f6b65d706504287d4d3f8453942d6c80c28 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Thu, 27 May 2021 14:59:22 +0200 Subject: [PATCH 427/579] CI: removing all credentials Signed-off-by: Raphael Defosseux --- ci-scripts/Jenkinsfile-gitlab | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/ci-scripts/Jenkinsfile-gitlab b/ci-scripts/Jenkinsfile-gitlab index d5c526acb3..576ae7b055 100644 --- a/ci-scripts/Jenkinsfile-gitlab +++ b/ci-scripts/Jenkinsfile-gitlab @@ -30,8 +30,6 @@ def sendSocialMediaMessage(pipeChannel, pipeColor, pipeMessage) { } } -def doFlexranCtrlTest = false - // Location of the executor node def nodeExecutor = params.nodeExecutor @@ -66,9 +64,6 @@ pipeline { echo "Platform is ${env.TESTPLATFORM_OWNER}" } - if (params.FlexRanRtcGitLabRepository_Credentials != null) { - doFlexranCtrlTest = true - } if (fileExists("flexran")) { sh "rm -Rf flexran > /dev/null 2>&1" } @@ -141,15 +136,13 @@ pipeline { // For the moment, there is no fail criteria. Just a notification of number of files that do not follow sh "./ci-scripts/checkCodingFormattingRules.sh" } - if (doFlexranCtrlTest && doMandatoryTests) { + // With Mosaic 5G being part of OSA and making all it's repositories public + // No need to pass credentials to clone flexran-rtc + if (doMandatoryTests) { sh "mkdir flexran" dir ('flexran') { - withCredentials([ - [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.FlexRanRtcGitLabRepository_Credentials}", usernameVariable: 'git_username', passwordVariable: 'git_password'] - ]) { - sh "git clone https://${git_username}:${git_password}@gitlab.eurecom.fr/flexran/flexran-rtc.git . > ../git_clone.log 2>&1" - sh "git checkout develop >> ../git_clone.log 2>&1" - } + sh "git clone https://gitlab.eurecom.fr/flexran/flexran-rtc.git . > ../git_clone.log 2>&1" + sh "git checkout develop >> ../git_clone.log 2>&1" sh "zip -r -qq flexran.zip ." } } @@ -315,7 +308,7 @@ pipeline { stages { stage ("Build Flexran Controller") { when { - expression {doFlexranCtrlTest && doMandatoryTests} + expression {doMandatoryTests} } steps { lock (vmResource) { From a5bab48bf805b4d40bd24c684121343d03793a30 Mon Sep 17 00:00:00 2001 From: hardy Date: Thu, 27 May 2021 00:00:09 +0200 Subject: [PATCH 428/579] fix syntax error --- ci-scripts/runTestOnVM.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ci-scripts/runTestOnVM.sh b/ci-scripts/runTestOnVM.sh index d600c0e5c9..ec36bd21b1 100755 --- a/ci-scripts/runTestOnVM.sh +++ b/ci-scripts/runTestOnVM.sh @@ -1277,6 +1277,7 @@ function start_rf_sim_gnb { then echo "echo \"./nr-softmodem -O /home/ubuntu/tmp/ci-scripts/conf_files/ci-$LOC_CONF_FILE --log_config.global_log_options level,nocolor --parallel-config PARALLEL_SINGLE_THREAD --noS1 --nokrnmod 1 --rfsim --phy-test --lowmem --noS1\" > ./my-nr-softmodem-run.sh " >> $1 elif [ $LOC_RA_SA_TEST -eq 1 ] #RA test => use --do-ra option + then echo "echo \"./nr-softmodem -O /home/ubuntu/tmp/ci-scripts/conf_files/ci-$LOC_CONF_FILE --log_config.global_log_options level,nocolor --parallel-config PARALLEL_SINGLE_THREAD --rfsim --do-ra --lowmem --noS1\" > ./my-nr-softmodem-run.sh " >> $1 else #SA test => use --sa option echo "echo \"./nr-softmodem -O /home/ubuntu/tmp/ci-scripts/conf_files/ci-$LOC_CONF_FILE --log_config.global_log_options level,nocolor --parallel-config PARALLEL_SINGLE_THREAD --rfsim --sa --lowmem \" > ./my-nr-softmodem-run.sh " >> $1 @@ -1382,6 +1383,7 @@ function start_rf_sim_nr_ue { then echo "echo \"./nr-uesoftmodem --nokrnmod 1 --rfsim --phy-test --rrc_config_path /home/ubuntu/tmp/cmake_targets/ran_build/build/ --log_config.global_log_options level,nocolor --noS1\" > ./my-nr-softmodem-run.sh " >> $1 elif [ $LOC_RA_SA_TEST -eq 1 ] #RA test => use --do-ra option + then echo "echo \"./nr-uesoftmodem --rfsim --do-ra --log_config.global_log_options level,nocolor --rrc_config_path /home/ubuntu/tmp/cmake_targets/ran_build/build/\" > ./my-nr-softmodem-run.sh " >> $1 else #SA test => use --sa option echo "echo \"./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --rfsim --sa --log_config.global_log_options level,nocolor\" > ./my-nr-softmodem-run.sh " >> $1 From 8fbf444598451ebf059056c5464c3d42e407e853 Mon Sep 17 00:00:00 2001 From: hardy Date: Thu, 27 May 2021 15:26:22 +0200 Subject: [PATCH 429/579] add/update sa conf file --- .../gnb.band78.sa.fr1.106PRB.usrpb210.conf | 297 ++++++++++++++++++ ci-scripts/runTestOnVM.sh | 2 +- 2 files changed, 298 insertions(+), 1 deletion(-) create mode 100644 ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.usrpb210.conf diff --git a/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.usrpb210.conf b/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.usrpb210.conf new file mode 100644 index 0000000000..494be845a6 --- /dev/null +++ b/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.usrpb210.conf @@ -0,0 +1,297 @@ +Active_gNBs = ( "gNB-Eurecom-DU"); +# Asn1_verbosity, choice in: none, info, annoying +Asn1_verbosity = "none"; + +gNBs = +( + { + ////////// Identification parameters: + gNB_ID = 0xe00; + gNB_name = "gNB-Eurecom-DU"; + + // Tracking area code, 0x0000 and 0xfffe are reserved values + tracking_area_code = 1; + plmn_list = ({ + mcc = 222; + mnc = 01; + mnc_length = 2; + snssaiList = ( + { + sst = 1; + sd = 0x1; // 0 false, else true + }, + { + sst = 1; + sd = 0x112233; // 0 false, else true + } + ); + + }); + + nr_cellid = 12345678L; + + ////////// Physical parameters: + + ssb_SubcarrierOffset = 0; + pdsch_AntennaPorts = 1; + pusch_AntennaPorts = 1; + + pdcch_ConfigSIB1 = ( + { + controlResourceSetZero = 12; + searchSpaceZero = 0; + } + ); + + servingCellConfigCommon = ( + { + #spCellConfigCommon + + physCellId = 0; + +# downlinkConfigCommon + #frequencyInfoDL + # this is 3600 MHz + 43 PRBs@30kHz SCS (same as initial BWP) + absoluteFrequencySSB = 641280; + dl_frequencyBand = 78; + # this is 3600 MHz + dl_absoluteFrequencyPointA = 640008; + #scs-SpecificCarrierList + dl_offstToCarrier = 0; +# subcarrierSpacing +# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + dl_subcarrierSpacing = 1; + dl_carrierBandwidth = 106; + #initialDownlinkBWP + #genericParameters + # this is RBstart=27,L=48 (275*(L-1))+RBstart + initialDLBWPlocationAndBandwidth = 12952; # 6366 12925 12956 28875 12952 +# 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; #for DL slot + initialDLBWPmappingType_0 = 0; #0=typeA,1=typeB + initialDLBWPstartSymbolAndLength_0 = 40; #this is SS=1,L=13 + + initialDLBWPk0_1 = 0; #for mixed slot + initialDLBWPmappingType_1 = 0; + initialDLBWPstartSymbolAndLength_1 = 57; #this is SS=1,L=5 + + #uplinkConfigCommon + #frequencyInfoUL + ul_frequencyBand = 78; + #scs-SpecificCarrierList + ul_offstToCarrier = 0; +# subcarrierSpacing +# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + ul_subcarrierSpacing = 1; + ul_carrierBandwidth = 106; + pMax = 20; + #initialUplinkBWP + #genericParameters + initialULBWPlocationAndBandwidth = 12952; +# 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 = -96; +#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200) + preambleTransMax = 6; +#powerRampingStep +# 0=dB0,1=dB2,2=dB4,3=dB6 + powerRampingStep = 1; +#ra_ReponseWindow +#1,2,4,8,10,20,40,80 + ra_ResponseWindow = 4; +#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR +#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4; +#oneHalf (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14; +#ra_ContentionResolutionTimer +#(0..7) 8,16,24,32,40,48,56,64 + ra_ContentionResolutionTimer = 7; + rsrp_ThresholdSSB = 19; +#prach-RootSequenceIndex_PR +#1 = 839, 2 = 139 + prach_RootSequenceIndex_PR = 2; + 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 = 6; # used for UL slot + initialULBWPmappingType_0 = 1 + initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13 + + initialULBWPk2_1 = 6; # used for mixed slot + initialULBWPmappingType_1 = 1; + initialULBWPstartSymbolAndLength_1 = 69; # this is SS=0 L=12 + + initialULBWPk2_2 = 7; # used for Msg.3 during RA + initialULBWPmappingType_2 = 1; + initialULBWPstartSymbolAndLength_2 = 52; # this is SS=10 L=4 + + 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 = 1; + +# 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 = 1; + # pattern1 + # dl_UL_TransmissionPeriodicity + # 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10 + dl_UL_TransmissionPeriodicity = 6; + nrofDownlinkSlots = 7; + nrofDownlinkSymbols = 6; + nrofUplinkSlots = 2; + nrofUplinkSymbols = 4; + + ssPBCH_BlockPower = -25; + } + + ); + + + # ------- SCTP definitions + SCTP : + { + # Number of streams to use in input/output + SCTP_INSTREAMS = 2; + SCTP_OUTSTREAMS = 2; + }; + + + ////////// MME parameters: + amf_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; + ipv6 = "192:168:30::17"; + active = "yes"; + preference = "ipv4"; + } + ); + + + NETWORK_INTERFACES : + { + GNB_INTERFACE_NAME_FOR_NG_AMF = "eth0"; + GNB_IPV4_ADDRESS_FOR_NG_AMF = "CI_GNB_IP_ADDR"; + GNB_INTERFACE_NAME_FOR_NGU = "eth0"; + GNB_IPV4_ADDRESS_FOR_NGU = "CI_GNB_IP_ADDR"; + GNB_PORT_FOR_S1U = 2152; # Spec 2152 + }; + + } +); + +MACRLCs = ( + { + num_cc = 1; + tr_s_preference = "local_L1"; + tr_n_preference = "local_RRC"; + } +); + +L1s = ( + { + num_cc = 1; + tr_n_preference = "local_mac"; + pusch_proc_threads = 8; + } +); + +RUs = ( + { + local_rf = "yes" + nb_tx = 1 + nb_rx = 1 + att_tx = 0 + att_rx = 0; + bands = [7]; + max_pdschReferenceSignalPower = -27; + max_rxgain = 114; + eNB_instances = [0]; + #beamforming 1x4 matrix: + bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000]; + clock_src = "internal"; + } +); + +THREAD_STRUCT = ( + { + #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT" + parallel_config = "PARALLEL_SINGLE_THREAD"; + #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" + worker_config = "WORKER_ENABLE"; + } +); + +rfsimulator : +{ + serveraddr = "server"; + serverport = "4043"; + options = (); #("saviq"); or/and "chanmod" + modelname = "AWGN"; + IQfile = "/tmp/rfsimulator.iqs"; +}; + + log_config : + { + global_log_level ="info"; + global_log_verbosity ="medium"; + hw_log_level ="info"; + hw_log_verbosity ="medium"; + phy_log_level ="info"; + phy_log_verbosity ="medium"; + mac_log_level ="info"; + mac_log_verbosity ="high"; + rlc_log_level ="info"; + rlc_log_verbosity ="medium"; + pdcp_log_level ="info"; + pdcp_log_verbosity ="medium"; + rrc_log_level ="info"; + rrc_log_verbosity ="medium"; + ngap_log_level ="debug"; + ngap_log_verbosity ="medium"; + }; + diff --git a/ci-scripts/runTestOnVM.sh b/ci-scripts/runTestOnVM.sh index ec36bd21b1..1241b5b4cc 100755 --- a/ci-scripts/runTestOnVM.sh +++ b/ci-scripts/runTestOnVM.sh @@ -2240,7 +2240,7 @@ function run_test_on_vm { echo "############################################################" #SA test, attention : has a different config file from the rest of the test CN_CONFIG="noS1" - CONF_FILE=gnb.sa.band78.fr1.106PRB.usrpb210.conf + CONF_FILE=gnb.band78.sa.fr1.106PRB.usrpb210.conf S1_NOS1_CFG=0 PRB=106 FREQUENCY=3510 From 8456908ef8e37c1a7197e2097de3df0f74806835 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Thu, 27 May 2021 15:49:30 +0200 Subject: [PATCH 430/579] F1Setup procedure working for both LTE and NR --- openair2/F1AP/f1ap_du_interface_management.c | 2 +- openair2/GNB_APP/gnb_config.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/openair2/F1AP/f1ap_du_interface_management.c b/openair2/F1AP/f1ap_du_interface_management.c index 9b92845cab..fd75465fa3 100644 --- a/openair2/F1AP/f1ap_du_interface_management.c +++ b/openair2/F1AP/f1ap_du_interface_management.c @@ -392,6 +392,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) { (const char*)f1ap_du_data->mib[i],//f1ap_du_data->mib, f1ap_du_data->mib_length[i]); + LOG_I(F1AP,"Filling SIB1_message for cell %d, length %d\n",i,f1ap_du_data->sib1_length[i]); OCTET_STRING_fromBuf(&gNB_DU_System_Information->sIB1_message, // sept. 2018 (const char*)f1ap_du_data->sib1[i], f1ap_du_data->sib1_length[i]); @@ -589,7 +590,6 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance, } // switch ie } // for IE AssertFatal(TransactionId!=-1,"TransactionId was not sent\n"); - AssertFatal(num_cells_to_activate>0,"No cells activated\n"); F1AP_SETUP_RESP (msg_p).num_cells_to_activate = num_cells_to_activate; for (int i=0;icells_to_activate[j].SI_container[si_ind], - resp->cells_to_activate[j].SI_container_length[si_ind]); + resp->cells_to_activate[j].SI_container[2+si_ind], + resp->cells_to_activate[j].SI_container_length[2+si_ind]); } // perform MAC/L1 common configuration @@ -1986,8 +1986,8 @@ int gNB_app_handle_f1ap_gnb_cu_configuration_update(f1ap_gnb_cu_configuration_up du_extract_and_decode_SI(i, si_ind, - gnb_cu_cfg_update->cells_to_activate[j].SI_container[si_ind], - gnb_cu_cfg_update->cells_to_activate[j].SI_container_length[si_ind]); + gnb_cu_cfg_update->cells_to_activate[j].SI_container[2+si_ind], + gnb_cu_cfg_update->cells_to_activate[j].SI_container_length[2+si_ind]); } // perform MAC/L1 common configuration From 4473ac7c00836e4541474ffaf67e6e12d2c61b15 Mon Sep 17 00:00:00 2001 From: Luis Pereira Date: Thu, 27 May 2021 17:05:44 +0200 Subject: [PATCH 431/579] Revert "Temporary commit #2 (to be reverted)" This reverts commit b17b688c58cbfdb0fe7154928ca3e0daca1e1987 --- openair2/RRC/LTE/rrc_eNB.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/openair2/RRC/LTE/rrc_eNB.c b/openair2/RRC/LTE/rrc_eNB.c index 9bd2e41c4c..3fdc56a811 100644 --- a/openair2/RRC/LTE/rrc_eNB.c +++ b/openair2/RRC/LTE/rrc_eNB.c @@ -8845,10 +8845,10 @@ void handle_f1_setup_req(f1ap_setup_req_t *f1_setup_req) { if (rrc->carrier[0].SIB23) { F1AP_SETUP_RESP (msg_p).cells_to_activate[cu_cell_ind].SI_container[2+num_SI] = rrc->carrier[0].SIB23; F1AP_SETUP_RESP (msg_p).cells_to_activate[cu_cell_ind].SI_container_length[2+num_SI] = rrc->carrier[0].sizeof_SIB23; - printf("SI %d size %d: ", 0, F1AP_SETUP_RESP (msg_p).cells_to_activate[cu_cell_ind].SI_container_length[2+num_SI]); - for (int n = 0; n < F1AP_SETUP_RESP (msg_p).cells_to_activate[cu_cell_ind].SI_container_length[2+num_SI]; n++) - printf("%02x ", F1AP_SETUP_RESP (msg_p).cells_to_activate[cu_cell_ind].SI_container[2+num_SI][n]); - printf("\n"); + //printf("SI %d size %d: ", 0, F1AP_SETUP_RESP(msg_p).SI_container_length[j][num_SI]); + //for (int n = 0; n < F1AP_SETUP_RESP(msg_p).SI_container_length[j][num_SI]; n++) + // printf("%02x ", F1AP_SETUP_RESP(msg_p).SI_container[0][num_SI][n]); + //printf("\n"); num_SI++; } From 5040d32964fa1c3a11f2926ca800f0d0c15f4c6f Mon Sep 17 00:00:00 2001 From: Luis Pereira Date: Thu, 27 May 2021 17:06:44 +0200 Subject: [PATCH 432/579] Revert "Temporary commit (to be reverted)" This reverts commit 28ca9cfc384897e06aac5ba40fc4dfa223933a4b --- openair2/ENB_APP/enb_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c index d85ae95262..03101eef83 100644 --- a/openair2/ENB_APP/enb_config.c +++ b/openair2/ENB_APP/enb_config.c @@ -3170,7 +3170,7 @@ void handle_f1ap_setup_resp(f1ap_setup_resp_t *resp) { LOG_I(ENB_APP, "Copy system information and decode it for %i number of SI\n", resp->cells_to_activate[j].num_SI); // copy system information and decode it - for (si_ind=2; si_ind<10; si_ind++) { + for (si_ind=2; si_indcells_to_activate[j].num_SI + 2; si_ind++) { printf("SI %d size %d: ", si_ind, resp->cells_to_activate[j].SI_container_length[si_ind]); for (int n=0;ncells_to_activate[j].SI_container_length[si_ind];n++) printf("%02x ",resp->cells_to_activate[j].SI_container[si_ind][n]); From ed0d8ee0be7e31dc751499afa365201749e54789 Mon Sep 17 00:00:00 2001 From: Luis Pereira Date: Thu, 27 May 2021 17:07:20 +0200 Subject: [PATCH 433/579] Revert "Add logs for debug segmentation fault (to be reverted)" This reverts commit a9527371e709834be7b27c03033b8d855caa7505 --- openair2/ENB_APP/enb_config.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c index 03101eef83..8aa0772362 100644 --- a/openair2/ENB_APP/enb_config.c +++ b/openair2/ENB_APP/enb_config.c @@ -3166,15 +3166,12 @@ void handle_f1ap_setup_resp(f1ap_setup_resp_t *resp) { if (RC.rrc[i]->nr_cellid == resp->cells_to_activate[j].nr_cellid && (check_plmn_identity(carrier, resp->cells_to_activate[j].mcc, resp->cells_to_activate[j].mnc, resp->cells_to_activate[j].mnc_digit_length)>0 && resp->cells_to_activate[j].nrpci == carrier->physCellId)) { - - LOG_I(ENB_APP, "Copy system information and decode it for %i number of SI\n", resp->cells_to_activate[j].num_SI); - // copy system information and decode it for (si_ind=2; si_indcells_to_activate[j].num_SI + 2; si_ind++) { - printf("SI %d size %d: ", si_ind, resp->cells_to_activate[j].SI_container_length[si_ind]); - for (int n=0;ncells_to_activate[j].SI_container_length[si_ind];n++) - printf("%02x ",resp->cells_to_activate[j].SI_container[si_ind][n]); - printf("\n"); + //printf("SI %d size %d: ", si_ind, resp->SI_container_length[j][si_ind]); + //for (int n=0;nSI_container_length[j][si_ind];n++) + // printf("%02x ",resp->SI_container[j][si_ind][n]); + //printf("\n"); if (si_ind==6) si_ind=9; if (resp->cells_to_activate[j].SI_container[si_ind] != NULL) { extract_and_decode_SI(i, From 55936d24bf960ea573beff8cb6006a77c0380113 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Thu, 27 May 2021 16:14:19 +0100 Subject: [PATCH 434/579] Refactor some logs --- openair2/ENB_APP/enb_config.c | 6 +++--- openair2/RRC/LTE/rrc_eNB.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c index 8aa0772362..4751596931 100644 --- a/openair2/ENB_APP/enb_config.c +++ b/openair2/ENB_APP/enb_config.c @@ -3168,9 +3168,9 @@ void handle_f1ap_setup_resp(f1ap_setup_resp_t *resp) { resp->cells_to_activate[j].nrpci == carrier->physCellId)) { // copy system information and decode it for (si_ind=2; si_indcells_to_activate[j].num_SI + 2; si_ind++) { - //printf("SI %d size %d: ", si_ind, resp->SI_container_length[j][si_ind]); - //for (int n=0;nSI_container_length[j][si_ind];n++) - // printf("%02x ",resp->SI_container[j][si_ind][n]); + //printf("SI %d size %d: ", si_ind, resp->cells_to_activate[j].SI_container_length[si_ind]); + //for (int n=0;ncells_to_activate[j].SI_container_length[si_ind];n++) + // printf("%02x ",resp->cells_to_activate[j].SI_container[si_ind][n]); //printf("\n"); if (si_ind==6) si_ind=9; if (resp->cells_to_activate[j].SI_container[si_ind] != NULL) { diff --git a/openair2/RRC/LTE/rrc_eNB.c b/openair2/RRC/LTE/rrc_eNB.c index 3fdc56a811..789dc6ba48 100644 --- a/openair2/RRC/LTE/rrc_eNB.c +++ b/openair2/RRC/LTE/rrc_eNB.c @@ -8845,9 +8845,9 @@ void handle_f1_setup_req(f1ap_setup_req_t *f1_setup_req) { if (rrc->carrier[0].SIB23) { F1AP_SETUP_RESP (msg_p).cells_to_activate[cu_cell_ind].SI_container[2+num_SI] = rrc->carrier[0].SIB23; F1AP_SETUP_RESP (msg_p).cells_to_activate[cu_cell_ind].SI_container_length[2+num_SI] = rrc->carrier[0].sizeof_SIB23; - //printf("SI %d size %d: ", 0, F1AP_SETUP_RESP(msg_p).SI_container_length[j][num_SI]); - //for (int n = 0; n < F1AP_SETUP_RESP(msg_p).SI_container_length[j][num_SI]; n++) - // printf("%02x ", F1AP_SETUP_RESP(msg_p).SI_container[0][num_SI][n]); + //printf("SI %d size %d: ", 0, F1AP_SETUP_RESP (msg_p).cells_to_activate[cu_cell_ind].SI_container_length[2+num_SI]); + //for (int n = 0; n < F1AP_SETUP_RESP (msg_p).cells_to_activate[cu_cell_ind].SI_container_length[2+num_SI]; n++) + // printf("%02x ", F1AP_SETUP_RESP (msg_p).cells_to_activate[cu_cell_ind].SI_container[2+num_SI][n]); //printf("\n"); num_SI++; } From e78e296eb05861b11b8b9f0911b0f2b50796c41b Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Thu, 27 May 2021 16:52:00 +0100 Subject: [PATCH 435/579] Avoid assertion in F1 for LTE --- openair2/F1AP/f1ap_cu_rrc_message_transfer.c | 25 +++++++++++--------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/openair2/F1AP/f1ap_cu_rrc_message_transfer.c b/openair2/F1AP/f1ap_cu_rrc_message_transfer.c index 604cacb176..c9c640e009 100644 --- a/openair2/F1AP/f1ap_cu_rrc_message_transfer.c +++ b/openair2/F1AP/f1ap_cu_rrc_message_transfer.c @@ -136,18 +136,21 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance, printf("%02x ", RRC_MAC_CCCH_DATA_IND (message_p).sdu[i]); printf("\n"); - /* DUtoCURRCContainer */ - F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_InitialULRRCMessageTransferIEs_t, ie, container, - F1AP_ProtocolIE_ID_id_DUtoCURRCContainer, true); - if (ie) { - NR_RRC_MAC_CCCH_DATA_IND (message_p).du_to_cu_rrc_container = malloc(sizeof(OCTET_STRING_t)); - NR_RRC_MAC_CCCH_DATA_IND (message_p).du_to_cu_rrc_container->size = ie->value.choice.DUtoCURRCContainer.size; - NR_RRC_MAC_CCCH_DATA_IND (message_p).du_to_cu_rrc_container->buf = malloc(ie->value.choice.DUtoCURRCContainer.size); - memcpy(NR_RRC_MAC_CCCH_DATA_IND (message_p).du_to_cu_rrc_container->buf, - ie->value.choice.DUtoCURRCContainer.buf, - ie->value.choice.DUtoCURRCContainer.size); - + if (RC.nrrrc && RC.nrrrc[GNB_INSTANCE_TO_MODULE_ID(instance)]->node_type == ngran_gNB_CU) { + /* DUtoCURRCContainer */ + F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_InitialULRRCMessageTransferIEs_t, ie, container, + F1AP_ProtocolIE_ID_id_DUtoCURRCContainer, true); + if (ie) { + NR_RRC_MAC_CCCH_DATA_IND (message_p).du_to_cu_rrc_container = malloc(sizeof(OCTET_STRING_t)); + NR_RRC_MAC_CCCH_DATA_IND (message_p).du_to_cu_rrc_container->size = ie->value.choice.DUtoCURRCContainer.size; + NR_RRC_MAC_CCCH_DATA_IND (message_p).du_to_cu_rrc_container->buf = malloc( + ie->value.choice.DUtoCURRCContainer.size); + memcpy(NR_RRC_MAC_CCCH_DATA_IND (message_p).du_to_cu_rrc_container->buf, + ie->value.choice.DUtoCURRCContainer.buf, + ie->value.choice.DUtoCURRCContainer.size); + } } + // Find instance from nr_cellid int rrc_inst = -1; if (RC.nrrrc && RC.nrrrc[GNB_INSTANCE_TO_MODULE_ID(instance)]->node_type == ngran_gNB_CU) { From 6c494737f0476c83cc077a1026238d6c1a331392 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Fri, 28 May 2021 00:20:33 +0100 Subject: [PATCH 436/579] Revert LTE related code in DU_handle_UE_CONTEXT_SETUP_REQUEST --- openair2/F1AP/f1ap_du_ue_context_management.c | 84 ++++++++++--------- 1 file changed, 43 insertions(+), 41 deletions(-) diff --git a/openair2/F1AP/f1ap_du_ue_context_management.c b/openair2/F1AP/f1ap_du_ue_context_management.c index 51bf7da32d..b79e9feb58 100644 --- a/openair2/F1AP/f1ap_du_ue_context_management.c +++ b/openair2/F1AP/f1ap_du_ue_context_management.c @@ -108,22 +108,52 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance, f1ap_ue_context_setup_req->cellULConfigured = NULL; } - /* CUtoDURRCInformation */ - /* Candidate_SpCell_List */ - /* optional */ - /* DRXCycle */ - /* optional */ - /* ResourceCoordinationTransferContainer */ - /* SCell_ToBeSetup_List */ - /* SRBs_ToBeSetup_List */ - /* DRBs_ToBeSetup_List */ - /* Decode DRBs_ToBeSetup_List */ - if(0) { + if (RC.nrrrc) { + /* RRCContainer */ F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextSetupRequestIEs_t, ie, container, - F1AP_ProtocolIE_ID_id_DRBs_ToBeSetup_List, true); + F1AP_ProtocolIE_ID_id_RRCContainer, false); + if (ie) { + /* correct here */ + f1ap_ue_context_setup_req->rrc_container = malloc(ie->value.choice.RRCContainer.size); + memcpy(f1ap_ue_context_setup_req->rrc_container, ie->value.choice.RRCContainer.buf, ie->value.choice.RRCContainer.size); + } else { + LOG_E(F1AP, "can't find RRCContainer in UEContextSetupRequestIEs by id %ld \n", F1AP_ProtocolIE_ID_id_RRCContainer); + } + + // AssertFatal(0, "check configuration, send to appropriate handler\n"); + + protocol_ctxt_t ctxt; + // ctxt.rnti = f1ap_get_rnti_by_du_id(&f1ap_du_inst[instance], ie->value.choice.GNB_DU_UE_F1AP_ID); + ctxt.rnti = 0x1234; + ctxt.module_id = instance; + ctxt.instance = instance; + ctxt.enb_flag = 1; + + mem_block_t *pdcp_pdu_p = NULL; + pdcp_pdu_p = get_free_mem_block(ie->value.choice.RRCContainer.size, __func__); + if (pdcp_pdu_p != NULL) { + memset(pdcp_pdu_p->data, 0, ie->value.choice.RRCContainer.size); + memcpy(&pdcp_pdu_p->data[0], ie->value.choice.RRCContainer.buf, ie->value.choice.RRCContainer.size); + + /* for rfsim */ + du_rlc_data_req(&ctxt, 1, 0x00, 1, 1, 0, ie->value.choice.RRCContainer.size, pdcp_pdu_p); + } + } else { + /* CUtoDURRCInformation */ + /* Candidate_SpCell_List */ + /* optional */ + /* DRXCycle */ + /* optional */ + /* ResourceCoordinationTransferContainer */ + /* SCell_ToBeSetup_List */ + /* SRBs_ToBeSetup_List */ + /* DRBs_ToBeSetup_List */ + /* Decode DRBs_ToBeSetup_List */ + F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextSetupRequestIEs_t, ie, container, + F1AP_ProtocolIE_ID_id_DRBs_ToBeSetup_List, true); f1ap_ue_context_setup_req->drbs_to_be_setup_length = ie->value.choice.DRBs_ToBeSetup_List.list.count; f1ap_ue_context_setup_req->drbs_to_be_setup = calloc(f1ap_ue_context_setup_req->drbs_to_be_setup_length, - sizeof(f1ap_drb_to_be_setup_t)); + sizeof(f1ap_drb_to_be_setup_t)); AssertFatal(f1ap_ue_context_setup_req->drbs_to_be_setup, "could not allocate memory for f1ap_ue_context_setup_req->drbs_to_be_setup\n"); @@ -153,35 +183,7 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance, } } } - /* RRCContainer */ - F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextSetupRequestIEs_t, ie, container, - F1AP_ProtocolIE_ID_id_RRCContainer, false); - if (ie) { - /* correct here */ - f1ap_ue_context_setup_req->rrc_container = malloc(ie->value.choice.RRCContainer.size); - memcpy(f1ap_ue_context_setup_req->rrc_container, ie->value.choice.RRCContainer.buf, ie->value.choice.RRCContainer.size); - } else { - LOG_E(F1AP, "can't find RRCContainer in UEContextSetupRequestIEs by id %ld \n", F1AP_ProtocolIE_ID_id_RRCContainer); - } - // AssertFatal(0, "check configuration, send to appropriate handler\n"); - - protocol_ctxt_t ctxt; - // ctxt.rnti = f1ap_get_rnti_by_du_id(&f1ap_du_inst[instance], ie->value.choice.GNB_DU_UE_F1AP_ID); - ctxt.rnti = 0x1234; - ctxt.module_id = instance; - ctxt.instance = instance; - ctxt.enb_flag = 1; - - mem_block_t *pdcp_pdu_p = NULL; - pdcp_pdu_p = get_free_mem_block(ie->value.choice.RRCContainer.size, __func__); - if (pdcp_pdu_p != NULL) { - memset(pdcp_pdu_p->data, 0, ie->value.choice.RRCContainer.size); - memcpy(&pdcp_pdu_p->data[0], ie->value.choice.RRCContainer.buf, ie->value.choice.RRCContainer.size); - - /* for rfsim */ - du_rlc_data_req(&ctxt, 1, 0x00, 1, 1, 0, ie->value.choice.RRCContainer.size, pdcp_pdu_p); - } return 0; } From ffb6fa7cc661828c2c476ca72d15c72628d855b1 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Fri, 28 May 2021 00:38:46 +0100 Subject: [PATCH 437/579] Add logs for cellId in F1 --- openair2/F1AP/f1ap_cu_interface_management.c | 3 +++ openair2/F1AP/f1ap_cu_ue_context_management.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/openair2/F1AP/f1ap_cu_interface_management.c b/openair2/F1AP/f1ap_cu_interface_management.c index 2d393ad520..7eeb614329 100644 --- a/openair2/F1AP/f1ap_cu_interface_management.c +++ b/openair2/F1AP/f1ap_cu_interface_management.c @@ -590,6 +590,9 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu &nRCGI.nRCellIdentity); cells_to_be_activated_list_item.nRCGI = nRCGI; + LOG_I(F1AP,"f1ap_gnb_cu_configuration_update->cells_to_activate[i].nr_cellid = %i (123456)\n", f1ap_gnb_cu_configuration_update->cells_to_activate[i].nr_cellid); + LOG_I(F1AP,"f1ap_gnb_cu_configuration_update->cells_to_activate[i].nrpci = %i (321)\n", f1ap_gnb_cu_configuration_update->cells_to_activate[i].nrpci); + // optional // -nRPCI cells_to_be_activated_list_item.nRPCI = (F1AP_NRPCI_t *)calloc(1, sizeof(F1AP_NRPCI_t)); diff --git a/openair2/F1AP/f1ap_cu_ue_context_management.c b/openair2/F1AP/f1ap_cu_ue_context_management.c index 30d225bb4a..54cd4dfc5e 100644 --- a/openair2/F1AP/f1ap_cu_ue_context_management.c +++ b/openair2/F1AP/f1ap_cu_ue_context_management.c @@ -265,6 +265,9 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, f1ap_ue_context_setup_req->mnc_digit_length, &nRCGI.pLMN_Identity); NR_CELL_ID_TO_BIT_STRING(123456, &nRCGI.nRCellIdentity); + + LOG_I(F1AP,"(1) f1ap_ue_context_setup_req->nr_cellid = %lu (123456)\n", f1ap_ue_context_setup_req->nr_cellid); + scell_toBeSetup_item.sCell_ID = nRCGI; /* 10.1.2 sCellIndex */ From fa33b048b05761fccf5bc04418196c83e7a034af Mon Sep 17 00:00:00 2001 From: Luis Pereira Date: Fri, 28 May 2021 07:02:42 +0200 Subject: [PATCH 438/579] Revert "Add logs for cellId in F1" This reverts commit ffb6fa7cc661828c2c476ca72d15c72628d855b1 --- openair2/F1AP/f1ap_cu_interface_management.c | 3 --- openair2/F1AP/f1ap_cu_ue_context_management.c | 3 --- 2 files changed, 6 deletions(-) diff --git a/openair2/F1AP/f1ap_cu_interface_management.c b/openair2/F1AP/f1ap_cu_interface_management.c index 7eeb614329..2d393ad520 100644 --- a/openair2/F1AP/f1ap_cu_interface_management.c +++ b/openair2/F1AP/f1ap_cu_interface_management.c @@ -590,9 +590,6 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu &nRCGI.nRCellIdentity); cells_to_be_activated_list_item.nRCGI = nRCGI; - LOG_I(F1AP,"f1ap_gnb_cu_configuration_update->cells_to_activate[i].nr_cellid = %i (123456)\n", f1ap_gnb_cu_configuration_update->cells_to_activate[i].nr_cellid); - LOG_I(F1AP,"f1ap_gnb_cu_configuration_update->cells_to_activate[i].nrpci = %i (321)\n", f1ap_gnb_cu_configuration_update->cells_to_activate[i].nrpci); - // optional // -nRPCI cells_to_be_activated_list_item.nRPCI = (F1AP_NRPCI_t *)calloc(1, sizeof(F1AP_NRPCI_t)); diff --git a/openair2/F1AP/f1ap_cu_ue_context_management.c b/openair2/F1AP/f1ap_cu_ue_context_management.c index 54cd4dfc5e..30d225bb4a 100644 --- a/openair2/F1AP/f1ap_cu_ue_context_management.c +++ b/openair2/F1AP/f1ap_cu_ue_context_management.c @@ -265,9 +265,6 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, f1ap_ue_context_setup_req->mnc_digit_length, &nRCGI.pLMN_Identity); NR_CELL_ID_TO_BIT_STRING(123456, &nRCGI.nRCellIdentity); - - LOG_I(F1AP,"(1) f1ap_ue_context_setup_req->nr_cellid = %lu (123456)\n", f1ap_ue_context_setup_req->nr_cellid); - scell_toBeSetup_item.sCell_ID = nRCGI; /* 10.1.2 sCellIndex */ From 2632d81d36723801e565ac40231e74eb43077514 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Fri, 28 May 2021 10:36:52 +0200 Subject: [PATCH 439/579] CI: adding setting the routes for L2 Simulator in noS1 mode Signed-off-by: Raphael Defosseux --- ci-scripts/runTestOnVM.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ci-scripts/runTestOnVM.sh b/ci-scripts/runTestOnVM.sh index fc35370e0a..b9a1adb6af 100755 --- a/ci-scripts/runTestOnVM.sh +++ b/ci-scripts/runTestOnVM.sh @@ -964,6 +964,12 @@ function start_l2_sim_ue { echo "ifconfig" > $1 ssh -T -o StrictHostKeyChecking=no ubuntu@$LOC_UE_VM_IP_ADDR < $1 rm $1 + else + echo "Setting Routes for all UEs" + echo "cd /home/ubuntu/tmp/cmake_targets/tools" > $1 + echo "./setup_routes.sh $LOC_NB_UES" >> $1 + ssh -T -o StrictHostKeyChecking=no ubuntu@$LOC_UE_VM_IP_ADDR < $1 + rm $1 fi } From a3b5b905b21f49e93b8aacfece016ed3050f22ae Mon Sep 17 00:00:00 2001 From: francescomani Date: Fri, 28 May 2021 12:08:34 +0200 Subject: [PATCH 440/579] bugfixes for phy-test mode and BWP less than 50 PRBs --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c | 13 ++++++++++++- .../LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c | 12 +++++++----- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 2 +- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c index 6e1b99fa6b..66f10b9a55 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c @@ -284,6 +284,8 @@ void nr_preprocessor_phytest(module_id_t module_id, const int bwpSize = NRRIV2BW(sched_ctrl->active_bwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); int rbStart = 0; int rbSize = 0; + if (target_dl_bw>bwpSize) + target_dl_bw = bwpSize; uint16_t *vrb_map = RC.nrmac[module_id]->common_channels[CC_id].vrb_map; /* loop ensures that we allocate exactly target_dl_bw, or return */ while (true) { @@ -445,7 +447,16 @@ bool nr_ul_preprocessor_phytest(module_id_t module_id, frame_t frame, sub_frame_ nr_set_pusch_semi_static(scc, sched_ctrl->active_ubwp, dci_format, tda, num_dmrs_cdm_grps_no_data, ps); uint16_t rbStart = 0; - uint16_t rbSize = target_ul_bw; + uint16_t rbSize; + + const int bw = NRRIV2BW(sched_ctrl->active_ubwp ? + sched_ctrl->active_ubwp->bwp_Common->genericParameters.locationAndBandwidth : + scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + + if (target_ul_bw>bw) + rbSize = bw; + else + rbSize = target_ul_bw; uint16_t *vrb_map_UL = &RC.nrmac[module_id]->common_channels[CC_id].vrb_map_UL[sched_slot * MAX_BWP_SIZE]; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index b6f0fd5fe8..4b52b20f37 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -599,7 +599,7 @@ void nr_configure_css_dci_initial(nfapi_nr_dl_tti_pdcch_pdu_rel15_t* pdcch_pdu, } void config_uldci(const NR_BWP_Uplink_t *ubwp, - const NR_ServingCellConfigCommon_t *scc, + const NR_ServingCellConfigCommon_t *scc, const nfapi_nr_pusch_pdu_t *pusch_pdu, dci_pdu_rel15_t *dci_pdu_rel15, int dci_format, @@ -610,6 +610,7 @@ void config_uldci(const NR_BWP_Uplink_t *ubwp, const int bw = NRRIV2BW(ubwp ? ubwp->bwp_Common->genericParameters.locationAndBandwidth : scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + dci_pdu_rel15->frequency_domain_assignment.val = PRBalloc_to_locationandbandwidth0(pusch_pdu->rb_size, pusch_pdu->rb_start, bw); dci_pdu_rel15->time_domain_assignment.val = time_domain_assignment; @@ -672,6 +673,7 @@ int nr_get_default_pucch_res(int pucch_ResourceCommon) { return(default_pucch_csset[pucch_ResourceCommon]); } + void nr_configure_pdcch(nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu, NR_SearchSpace_t *ss, NR_ControlResourceSet_t *coreset, @@ -738,15 +740,15 @@ void nr_configure_pdcch(nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu, // This function configures pucch pdu fapi structure void nr_configure_pucch(nfapi_nr_pucch_pdu_t* pucch_pdu, - NR_ServingCellConfigCommon_t *scc, - NR_CellGroupConfig_t *CellGroup, - NR_BWP_Uplink_t *bwp, + NR_ServingCellConfigCommon_t *scc, + NR_CellGroupConfig_t *CellGroup, + NR_BWP_Uplink_t *bwp, uint16_t rnti, uint8_t pucch_resource, uint16_t O_csi, uint16_t O_ack, uint8_t O_sr, - int r_pucch) { + int r_pucch) { NR_PUCCH_Config_t *pucch_Config; NR_PUCCH_Resource_t *pucchres; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index bf444f7037..20bf6d85c2 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -1569,7 +1569,7 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot) n_ubwp = CellGroup->spCellConfig->spCellConfigDedicated->uplinkConfig->uplinkBWP_ToAddModList->list.count; config_uldci(sched_ctrl->active_ubwp, - scc, + scc, pusch_pdu, &uldci_payload, ps->dci_format, From 9ae4d8639a8f2280c9ef3e9e542af61e9c054a4d Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Fri, 28 May 2021 12:38:44 +0100 Subject: [PATCH 441/579] Fix fiveGS_TAC byte order for LTE --- openair2/F1AP/f1ap_du_interface_management.c | 42 ++++++++++++-------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/openair2/F1AP/f1ap_du_interface_management.c b/openair2/F1AP/f1ap_du_interface_management.c index fd75465fa3..59e1fe8bbe 100644 --- a/openair2/F1AP/f1ap_du_interface_management.c +++ b/openair2/F1AP/f1ap_du_interface_management.c @@ -199,14 +199,19 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) { served_cell_information.nRPCI = f1ap_du_data->nr_pci[i]; // int 0..1007 /* - fiveGS_TAC */ - uint8_t fiveGS_TAC[3]; - served_cell_information.fiveGS_TAC=calloc(1,sizeof(*served_cell_information.fiveGS_TAC)); - fiveGS_TAC[0] = ((uint8_t*)&f1ap_du_data->tac[i])[2]; - fiveGS_TAC[1] = ((uint8_t*)&f1ap_du_data->tac[i])[1]; - fiveGS_TAC[2] = ((uint8_t*)&f1ap_du_data->tac[i])[0]; - OCTET_STRING_fromBuf(served_cell_information.fiveGS_TAC, - (const char *)fiveGS_TAC, - 3); + if (RC.nrrrc) { + uint8_t fiveGS_TAC[3]; + fiveGS_TAC[0] = ((uint8_t*)&f1ap_du_data->tac[i])[2]; + fiveGS_TAC[1] = ((uint8_t*)&f1ap_du_data->tac[i])[1]; + fiveGS_TAC[2] = ((uint8_t*)&f1ap_du_data->tac[i])[0]; + OCTET_STRING_fromBuf(served_cell_information.fiveGS_TAC, + (const char *)fiveGS_TAC, + 3); + } else { + OCTET_STRING_fromBuf(served_cell_information.fiveGS_TAC, + (const char*)&f1ap_du_data->tac[i], + 3); + } /* - Configured_EPS_TAC */ if(0){ @@ -725,13 +730,19 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance, served_cell_information.nRPCI = f1ap_setup_req->nr_pci[i]; // int 0..1007 /* - fiveGS_TAC */ - uint8_t fiveGS_TAC[3]; - fiveGS_TAC[0] = ((uint8_t*)&f1ap_setup_req->tac[i])[2]; - fiveGS_TAC[1] = ((uint8_t*)&f1ap_setup_req->tac[i])[1]; - fiveGS_TAC[2] = ((uint8_t*)&f1ap_setup_req->tac[i])[0]; - OCTET_STRING_fromBuf(served_cell_information.fiveGS_TAC, - (const char *)fiveGS_TAC, - 3); + if (RC.nrrrc) { + uint8_t fiveGS_TAC[3]; + fiveGS_TAC[0] = ((uint8_t*)&f1ap_setup_req->tac[i])[2]; + fiveGS_TAC[1] = ((uint8_t*)&f1ap_setup_req->tac[i])[1]; + fiveGS_TAC[2] = ((uint8_t*)&f1ap_setup_req->tac[i])[0]; + OCTET_STRING_fromBuf(served_cell_information.fiveGS_TAC, + (const char *)fiveGS_TAC, + 3); + } else { + OCTET_STRING_fromBuf(served_cell_information.fiveGS_TAC, + (const char *) &f1ap_setup_req->tac[i], + 3); + } /* - Configured_EPS_TAC */ if(1){ @@ -890,7 +901,6 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance, served_cell_information.nRPCI = f1ap_setup_req->nr_pci[i]; // int 0..1007 /* - fiveGS_TAC */ - served_cell_information.fiveGS_TAC=calloc(1,sizeof(*served_cell_information.fiveGS_TAC)); OCTET_STRING_fromBuf(served_cell_information.fiveGS_TAC, (const char *) &f1ap_setup_req->tac[i], 3); From ef509a981074640710c2c14dc3b2b6d3aabacd29 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Fri, 28 May 2021 14:07:22 +0100 Subject: [PATCH 442/579] Uncomment fields in F1 gNB-CU CONFIGURATION UPDATE --- openair2/F1AP/f1ap_cu_interface_management.c | 428 +++++++++---------- 1 file changed, 214 insertions(+), 214 deletions(-) diff --git a/openair2/F1AP/f1ap_cu_interface_management.c b/openair2/F1AP/f1ap_cu_interface_management.c index 2d393ad520..ee07ae0588 100644 --- a/openair2/F1AP/f1ap_cu_interface_management.c +++ b/openair2/F1AP/f1ap_cu_interface_management.c @@ -648,251 +648,251 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu } - /* - // c3. Cells_to_be_Deactivated_List - // - ie = (F1AP_GNBCUConfigurationUpdateIEs_t *)calloc(1, sizeof(F1AP_GNBCUConfigurationUpdateIEs_t)); - ie->id = F1AP_ProtocolIE_ID_id_Cells_to_be_Deactivated_List; - ie->criticality = F1AP_Criticality_reject; - ie->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_Cells_to_be_Deactivated_List; + if(!RC.nrrrc) { - for (i=0; - i<1; - i++) { + /* mandatory */ + /* c3. Cells_to_be_Deactivated_List */ + ie = (F1AP_GNBCUConfigurationUpdateIEs_t *)calloc(1, sizeof(F1AP_GNBCUConfigurationUpdateIEs_t)); + ie->id = F1AP_ProtocolIE_ID_id_Cells_to_be_Deactivated_List; + ie->criticality = F1AP_Criticality_reject; + ie->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_Cells_to_be_Deactivated_List; - F1AP_Cells_to_be_Deactivated_List_ItemIEs_t *cells_to_be_deactivated_list_item_ies; - cells_to_be_deactivated_list_item_ies = (F1AP_Cells_to_be_Deactivated_List_ItemIEs_t *)calloc(1, sizeof(F1AP_Cells_to_be_Deactivated_List_ItemIEs_t)); - cells_to_be_deactivated_list_item_ies->id = F1AP_ProtocolIE_ID_id_Cells_to_be_Activated_List_Item; - cells_to_be_deactivated_list_item_ies->criticality = F1AP_Criticality_reject; - cells_to_be_deactivated_list_item_ies->value.present = F1AP_Cells_to_be_Deactivated_List_ItemIEs__value_PR_Cells_to_be_Deactivated_List_Item; + for (i=0; + i<1; + i++) { - // 3.1 cells to be Deactivated list item - F1AP_Cells_to_be_Deactivated_List_Item_t cells_to_be_deactivated_list_item; - memset((void *)&cells_to_be_deactivated_list_item, 0, sizeof(F1AP_Cells_to_be_Deactivated_List_Item_t)); + F1AP_Cells_to_be_Deactivated_List_ItemIEs_t *cells_to_be_deactivated_list_item_ies; + cells_to_be_deactivated_list_item_ies = (F1AP_Cells_to_be_Deactivated_List_ItemIEs_t *)calloc(1, sizeof(F1AP_Cells_to_be_Deactivated_List_ItemIEs_t)); + cells_to_be_deactivated_list_item_ies->id = F1AP_ProtocolIE_ID_id_Cells_to_be_Activated_List_Item; + cells_to_be_deactivated_list_item_ies->criticality = F1AP_Criticality_reject; + cells_to_be_deactivated_list_item_ies->value.present = F1AP_Cells_to_be_Deactivated_List_ItemIEs__value_PR_Cells_to_be_Deactivated_List_Item; + + // 3.1 cells to be Deactivated list item + F1AP_Cells_to_be_Deactivated_List_Item_t cells_to_be_deactivated_list_item; + memset((void *)&cells_to_be_deactivated_list_item, 0, sizeof(F1AP_Cells_to_be_Deactivated_List_Item_t)); - F1AP_NRCGI_t nRCGI; - memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t)); - MCC_MNC_TO_PLMNID(mcc, mnc, mnc_digit_length, - &nRCGI.pLMN_Identity); - NR_CELL_ID_TO_BIT_STRING(123456, &nRCGI.nRCellIdentity); - cells_to_be_deactivated_list_item.nRCGI = nRCGI; + F1AP_NRCGI_t nRCGI; + memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t)); + MCC_MNC_TO_PLMNID(f1ap_gnb_cu_configuration_update->cells_to_activate[i].mcc, + f1ap_gnb_cu_configuration_update->cells_to_activate[i].mnc, + f1ap_gnb_cu_configuration_update->cells_to_activate[i].mnc_digit_length, + &nRCGI.pLMN_Identity); + NR_CELL_ID_TO_BIT_STRING(f1ap_gnb_cu_configuration_update->cells_to_activate[i].nr_cellid, &nRCGI.nRCellIdentity); + cells_to_be_deactivated_list_item.nRCGI = nRCGI; - cells_to_be_deactivated_list_item_ies->value.choice.Cells_to_be_Deactivated_List_Item = cells_to_be_deactivated_list_item; - ASN_SEQUENCE_ADD(&ie->value.choice.Cells_to_be_Deactivated_List.list, - cells_to_be_deactivated_list_item_ies); - } - ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); -*/ + cells_to_be_deactivated_list_item_ies->value.choice.Cells_to_be_Deactivated_List_Item = cells_to_be_deactivated_list_item; + ASN_SEQUENCE_ADD(&ie->value.choice.Cells_to_be_Deactivated_List.list, + cells_to_be_deactivated_list_item_ies); + } + ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); - /* - // c4. GNB_CU_TNL_Association_To_Add_List + /* mandatory */ + /* c4. GNB_CU_TNL_Association_To_Add_List */ + ie = (F1AP_GNBCUConfigurationUpdateIEs_t *)calloc(1, sizeof(F1AP_GNBCUConfigurationUpdateIEs_t)); + ie->id = F1AP_ProtocolIE_ID_id_GNB_CU_TNL_Association_To_Add_List; + ie->criticality = F1AP_Criticality_reject; + ie->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_GNB_CU_TNL_Association_To_Add_List; - ie = (F1AP_GNBCUConfigurationUpdateIEs_t *)calloc(1, sizeof(F1AP_GNBCUConfigurationUpdateIEs_t)); - ie->id = F1AP_ProtocolIE_ID_id_GNB_CU_TNL_Association_To_Add_List; - ie->criticality = F1AP_Criticality_reject; - ie->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_GNB_CU_TNL_Association_To_Add_List; + for (i=0; + i<1; + i++) { - for (i=0; - i<1; - i++) { + F1AP_GNB_CU_TNL_Association_To_Add_ItemIEs_t *gnb_cu_tnl_association_to_add_item_ies; + gnb_cu_tnl_association_to_add_item_ies = (F1AP_GNB_CU_TNL_Association_To_Add_ItemIEs_t *)calloc(1, sizeof(F1AP_GNB_CU_TNL_Association_To_Add_ItemIEs_t)); + gnb_cu_tnl_association_to_add_item_ies->id = F1AP_ProtocolIE_ID_id_GNB_CU_TNL_Association_To_Add_Item; + gnb_cu_tnl_association_to_add_item_ies->criticality = F1AP_Criticality_reject; + gnb_cu_tnl_association_to_add_item_ies->value.present = F1AP_GNB_CU_TNL_Association_To_Add_ItemIEs__value_PR_GNB_CU_TNL_Association_To_Add_Item; - F1AP_GNB_CU_TNL_Association_To_Add_ItemIEs_t *gnb_cu_tnl_association_to_add_item_ies; - gnb_cu_tnl_association_to_add_item_ies = (F1AP_GNB_CU_TNL_Association_To_Add_ItemIEs_t *)calloc(1, sizeof(F1AP_GNB_CU_TNL_Association_To_Add_ItemIEs_t)); - gnb_cu_tnl_association_to_add_item_ies->id = F1AP_ProtocolIE_ID_id_GNB_CU_TNL_Association_To_Add_Item; - gnb_cu_tnl_association_to_add_item_ies->criticality = F1AP_Criticality_reject; - gnb_cu_tnl_association_to_add_item_ies->value.present = F1AP_GNB_CU_TNL_Association_To_Add_ItemIEs__value_PR_GNB_CU_TNL_Association_To_Add_Item; - - // 4.1 GNB_CU_TNL_Association_To_Add_Item - F1AP_GNB_CU_TNL_Association_To_Add_Item_t gnb_cu_tnl_association_to_add_item; - memset((void *)&gnb_cu_tnl_association_to_add_item, 0, sizeof(F1AP_GNB_CU_TNL_Association_To_Add_Item_t)); + // 4.1 GNB_CU_TNL_Association_To_Add_Item + F1AP_GNB_CU_TNL_Association_To_Add_Item_t gnb_cu_tnl_association_to_add_item; + memset((void *)&gnb_cu_tnl_association_to_add_item, 0, sizeof(F1AP_GNB_CU_TNL_Association_To_Add_Item_t)); - // 4.1.1 tNLAssociationTransportLayerAddress - F1AP_CP_TransportLayerAddress_t transportLayerAddress; - memset((void *)&transportLayerAddress, 0, sizeof(F1AP_CP_TransportLayerAddress_t)); - transportLayerAddress.present = F1AP_CP_TransportLayerAddress_PR_endpoint_IP_address; - TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &transportLayerAddress.choice.endpoint_IP_address); - - // memset((void *)&transportLayerAddress, 0, sizeof(F1AP_CP_TransportLayerAddress_t)); - // transportLayerAddress.present = F1AP_CP_TransportLayerAddress_PR_endpoint_IP_address_and_port; - // transportLayerAddress.choice.endpoint_IP_address_and_port = (F1AP_Endpoint_IP_address_and_port_t *)calloc(1, sizeof(F1AP_Endpoint_IP_address_and_port_t)); - // TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &transportLayerAddress.choice.endpoint_IP_address_and_port.endpoint_IP_address); + // 4.1.1 tNLAssociationTransportLayerAddress + F1AP_CP_TransportLayerAddress_t transportLayerAddress; + memset((void *)&transportLayerAddress, 0, sizeof(F1AP_CP_TransportLayerAddress_t)); + transportLayerAddress.present = F1AP_CP_TransportLayerAddress_PR_endpoint_IP_address; + TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &transportLayerAddress.choice.endpoint_IP_address); - gnb_cu_tnl_association_to_add_item.tNLAssociationTransportLayerAddress = transportLayerAddress; + // memset((void *)&transportLayerAddress, 0, sizeof(F1AP_CP_TransportLayerAddress_t)); + // transportLayerAddress.present = F1AP_CP_TransportLayerAddress_PR_endpoint_IP_address_and_port; + // transportLayerAddress.choice.endpoint_IP_address_and_port = (F1AP_Endpoint_IP_address_and_port_t *)calloc(1, sizeof(F1AP_Endpoint_IP_address_and_port_t)); + // TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &transportLayerAddress.choice.endpoint_IP_address_and_port.endpoint_IP_address); - // 4.1.2 tNLAssociationUsage - gnb_cu_tnl_association_to_add_item.tNLAssociationUsage = F1AP_TNLAssociationUsage_non_ue; - + gnb_cu_tnl_association_to_add_item.tNLAssociationTransportLayerAddress = transportLayerAddress; + + // 4.1.2 tNLAssociationUsage + gnb_cu_tnl_association_to_add_item.tNLAssociationUsage = F1AP_TNLAssociationUsage_non_ue; - gnb_cu_tnl_association_to_add_item_ies->value.choice.GNB_CU_TNL_Association_To_Add_Item = gnb_cu_tnl_association_to_add_item; - ASN_SEQUENCE_ADD(&ie->value.choice.GNB_CU_TNL_Association_To_Add_List.list, - gnb_cu_tnl_association_to_add_item_ies); - } - ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); - */ - - /* - - // c5. GNB_CU_TNL_Association_To_Remove_List - ie = (F1AP_GNBCUConfigurationUpdateIEs_t *)calloc(1, sizeof(F1AP_GNBCUConfigurationUpdateIEs_t)); - ie->id = F1AP_ProtocolIE_ID_id_GNB_CU_TNL_Association_To_Remove_List; - ie->criticality = F1AP_Criticality_reject; - ie->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_GNB_CU_TNL_Association_To_Remove_List; - for (i=0; - i<1; - i++) { - - F1AP_GNB_CU_TNL_Association_To_Remove_ItemIEs_t *gnb_cu_tnl_association_to_remove_item_ies; - gnb_cu_tnl_association_to_remove_item_ies = (F1AP_GNB_CU_TNL_Association_To_Remove_ItemIEs_t *)calloc(1, sizeof(F1AP_GNB_CU_TNL_Association_To_Remove_ItemIEs_t)); - gnb_cu_tnl_association_to_remove_item_ies->id = F1AP_ProtocolIE_ID_id_GNB_CU_TNL_Association_To_Remove_Item; - gnb_cu_tnl_association_to_remove_item_ies->criticality = F1AP_Criticality_reject; - gnb_cu_tnl_association_to_remove_item_ies->value.present = F1AP_GNB_CU_TNL_Association_To_Remove_ItemIEs__value_PR_GNB_CU_TNL_Association_To_Remove_Item; - - // 4.1 GNB_CU_TNL_Association_To_Remove_Item - F1AP_GNB_CU_TNL_Association_To_Remove_Item_t gnb_cu_tnl_association_to_remove_item; - memset((void *)&gnb_cu_tnl_association_to_remove_item, 0, sizeof(F1AP_GNB_CU_TNL_Association_To_Remove_Item_t)); + gnb_cu_tnl_association_to_add_item_ies->value.choice.GNB_CU_TNL_Association_To_Add_Item = gnb_cu_tnl_association_to_add_item; + ASN_SEQUENCE_ADD(&ie->value.choice.GNB_CU_TNL_Association_To_Add_List.list, + gnb_cu_tnl_association_to_add_item_ies); + } + ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); - // 4.1.1 tNLAssociationTransportLayerAddress - F1AP_CP_TransportLayerAddress_t transportLayerAddress; - memset((void *)&transportLayerAddress, 0, sizeof(F1AP_CP_TransportLayerAddress_t)); - transportLayerAddress.present = F1AP_CP_TransportLayerAddress_PR_endpoint_IP_address; - TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &transportLayerAddress.choice.endpoint_IP_address); - - // memset((void *)&transportLayerAddress, 0, sizeof(F1AP_CP_TransportLayerAddress_t)); - // transportLayerAddress.present = F1AP_CP_TransportLayerAddress_PR_endpoint_IP_address_and_port; - // transportLayerAddress.choice.endpoint_IP_address_and_port = (F1AP_Endpoint_IP_address_and_port_t *)calloc(1, sizeof(F1AP_Endpoint_IP_address_and_port_t)); - // TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &transportLayerAddress.choice.endpoint_IP_address_and_port.endpoint_IP_address); + /* mandatory */ + /* c5. GNB_CU_TNL_Association_To_Remove_List */ + ie = (F1AP_GNBCUConfigurationUpdateIEs_t *)calloc(1, sizeof(F1AP_GNBCUConfigurationUpdateIEs_t)); + ie->id = F1AP_ProtocolIE_ID_id_GNB_CU_TNL_Association_To_Remove_List; + ie->criticality = F1AP_Criticality_reject; + ie->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_GNB_CU_TNL_Association_To_Remove_List; + for (i=0; + i<1; + i++) { - gnb_cu_tnl_association_to_remove_item.tNLAssociationTransportLayerAddress = transportLayerAddress; - + F1AP_GNB_CU_TNL_Association_To_Remove_ItemIEs_t *gnb_cu_tnl_association_to_remove_item_ies; + gnb_cu_tnl_association_to_remove_item_ies = (F1AP_GNB_CU_TNL_Association_To_Remove_ItemIEs_t *)calloc(1, sizeof(F1AP_GNB_CU_TNL_Association_To_Remove_ItemIEs_t)); + gnb_cu_tnl_association_to_remove_item_ies->id = F1AP_ProtocolIE_ID_id_GNB_CU_TNL_Association_To_Remove_Item; + gnb_cu_tnl_association_to_remove_item_ies->criticality = F1AP_Criticality_reject; + gnb_cu_tnl_association_to_remove_item_ies->value.present = F1AP_GNB_CU_TNL_Association_To_Remove_ItemIEs__value_PR_GNB_CU_TNL_Association_To_Remove_Item; + + // 4.1 GNB_CU_TNL_Association_To_Remove_Item + F1AP_GNB_CU_TNL_Association_To_Remove_Item_t gnb_cu_tnl_association_to_remove_item; + memset((void *)&gnb_cu_tnl_association_to_remove_item, 0, sizeof(F1AP_GNB_CU_TNL_Association_To_Remove_Item_t)); - gnb_cu_tnl_association_to_remove_item_ies->value.choice.GNB_CU_TNL_Association_To_Remove_Item = gnb_cu_tnl_association_to_remove_item; - ASN_SEQUENCE_ADD(&ie->value.choice.GNB_CU_TNL_Association_To_Remove_List.list, - gnb_cu_tnl_association_to_remove_item_ies); - } - ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); - */ + // 4.1.1 tNLAssociationTransportLayerAddress + F1AP_CP_TransportLayerAddress_t transportLayerAddress; + memset((void *)&transportLayerAddress, 0, sizeof(F1AP_CP_TransportLayerAddress_t)); + transportLayerAddress.present = F1AP_CP_TransportLayerAddress_PR_endpoint_IP_address; + TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &transportLayerAddress.choice.endpoint_IP_address); - /* - //c6. GNB_CU_TNL_Association_To_Update_List - ie = (F1AP_GNBCUConfigurationUpdateIEs_t *)calloc(1, sizeof(F1AP_GNBCUConfigurationUpdateIEs_t)); - ie->id = F1AP_ProtocolIE_ID_id_GNB_CU_TNL_Association_To_Update_List; - ie->criticality = F1AP_Criticality_reject; - ie->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_GNB_CU_TNL_Association_To_Update_List; - for (i=0; - i<1; - i++) { + // memset((void *)&transportLayerAddress, 0, sizeof(F1AP_CP_TransportLayerAddress_t)); + // transportLayerAddress.present = F1AP_CP_TransportLayerAddress_PR_endpoint_IP_address_and_port; + // transportLayerAddress.choice.endpoint_IP_address_and_port = (F1AP_Endpoint_IP_address_and_port_t *)calloc(1, sizeof(F1AP_Endpoint_IP_address_and_port_t)); + // TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &transportLayerAddress.choice.endpoint_IP_address_and_port.endpoint_IP_address); - F1AP_GNB_CU_TNL_Association_To_Update_ItemIEs_t *gnb_cu_tnl_association_to_update_item_ies; - gnb_cu_tnl_association_to_update_item_ies = (F1AP_GNB_CU_TNL_Association_To_Update_ItemIEs_t *)calloc(1, sizeof(F1AP_GNB_CU_TNL_Association_To_Update_ItemIEs_t)); - gnb_cu_tnl_association_to_update_item_ies->id = F1AP_ProtocolIE_ID_id_GNB_CU_TNL_Association_To_Update_Item; - gnb_cu_tnl_association_to_update_item_ies->criticality = F1AP_Criticality_reject; - gnb_cu_tnl_association_to_update_item_ies->value.present = F1AP_GNB_CU_TNL_Association_To_Update_ItemIEs__value_PR_GNB_CU_TNL_Association_To_Update_Item; - - // 4.1 GNB_CU_TNL_Association_To_Update_Item - F1AP_GNB_CU_TNL_Association_To_Update_Item_t gnb_cu_tnl_association_to_update_item; - memset((void *)&gnb_cu_tnl_association_to_update_item, 0, sizeof(F1AP_GNB_CU_TNL_Association_To_Update_Item_t)); + gnb_cu_tnl_association_to_remove_item.tNLAssociationTransportLayerAddress = transportLayerAddress; - // 4.1.1 tNLAssociationTransportLayerAddress - F1AP_CP_TransportLayerAddress_t transportLayerAddress; - memset((void *)&transportLayerAddress, 0, sizeof(F1AP_CP_TransportLayerAddress_t)); - transportLayerAddress.present = F1AP_CP_TransportLayerAddress_PR_endpoint_IP_address; - TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &transportLayerAddress.choice.endpoint_IP_address); - - // memset((void *)&transportLayerAddress, 0, sizeof(F1AP_CP_TransportLayerAddress_t)); - // transportLayerAddress.present = F1AP_CP_TransportLayerAddress_PR_endpoint_IP_address_and_port; - // transportLayerAddress.choice.endpoint_IP_address_and_port = (F1AP_Endpoint_IP_address_and_port_t *)calloc(1, sizeof(F1AP_Endpoint_IP_address_and_port_t)); - // TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &transportLayerAddress.choice.endpoint_IP_address_and_port.endpoint_IP_address); - gnb_cu_tnl_association_to_update_item.tNLAssociationTransportLayerAddress = transportLayerAddress; - - - // 4.1.2 tNLAssociationUsage - if (1) { - gnb_cu_tnl_association_to_update_item.tNLAssociationUsage = (F1AP_TNLAssociationUsage_t *)calloc(1, sizeof(F1AP_TNLAssociationUsage_t)); - *gnb_cu_tnl_association_to_update_item.tNLAssociationUsage = F1AP_TNLAssociationUsage_non_ue; - } - - - gnb_cu_tnl_association_to_update_item_ies->value.choice.GNB_CU_TNL_Association_To_Update_Item = gnb_cu_tnl_association_to_update_item; - ASN_SEQUENCE_ADD(&ie->value.choice.GNB_CU_TNL_Association_To_Update_List.list, - gnb_cu_tnl_association_to_update_item_ies); - } - ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); - */ - - /* - // c7. Cells_to_be_Barred_List - ie = (F1AP_GNBCUConfigurationUpdateIEs_t *)calloc(1, sizeof(F1AP_GNBCUConfigurationUpdateIEs_t)); - ie->id = F1AP_ProtocolIE_ID_id_Cells_to_be_Barred_List; - ie->criticality = F1AP_Criticality_reject; - ie->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_Cells_to_be_Barred_List; - for (i=0; - i<1; - i++) { - - F1AP_Cells_to_be_Barred_ItemIEs_t *cells_to_be_barred_item_ies; - cells_to_be_barred_item_ies = (F1AP_Cells_to_be_Barred_ItemIEs_t *)calloc(1, sizeof(F1AP_Cells_to_be_Barred_ItemIEs_t)); - cells_to_be_barred_item_ies->id = F1AP_ProtocolIE_ID_id_Cells_to_be_Activated_List_Item; - cells_to_be_barred_item_ies->criticality = F1AP_Criticality_reject; - cells_to_be_barred_item_ies->value.present = F1AP_Cells_to_be_Barred_ItemIEs__value_PR_Cells_to_be_Barred_Item; - - // 7.1 cells to be Deactivated list item - F1AP_Cells_to_be_Barred_Item_t cells_to_be_barred_item; - memset((void *)&cells_to_be_barred_item, 0, sizeof(F1AP_Cells_to_be_Barred_Item_t)); - - // - nRCGI - F1AP_NRCGI_t nRCGI; - memset(&nRCGI,0,sizeof(F1AP_NRCGI_t)); - MCC_MNC_TO_PLMNID(mcc, mnc, mnc_digit_length, - &nRCGI.pLMN_Identity); - NR_CELL_ID_TO_BIT_STRING(123456, &nRCGI.nRCellIdentity); - cells_to_be_barred_item.nRCGI = nRCGI; - - // 7.2 cellBarred - cells_to_be_barred_item.cellBarred = F1AP_CellBarred_not_barred; - - cells_to_be_barred_item_ies->value.choice.Cells_to_be_Barred_Item = cells_to_be_barred_item; - ASN_SEQUENCE_ADD(&ie->value.choice.Cells_to_be_Barred_List.list, - cells_to_be_barred_item_ies); - } - ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); - - */ - - /* - // c8. Protected_EUTRA_Resources_List - ie = (F1AP_GNBCUConfigurationUpdateIEs_t *)calloc(1, sizeof(F1AP_GNBCUConfigurationUpdateIEs_t)); - ie->id = F1AP_ProtocolIE_ID_id_Protected_EUTRA_Resources_List; - ie->criticality = F1AP_Criticality_reject; - ie->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_Protected_EUTRA_Resources_List; - - for (i=0; - i<1; - i++) { + gnb_cu_tnl_association_to_remove_item_ies->value.choice.GNB_CU_TNL_Association_To_Remove_Item = gnb_cu_tnl_association_to_remove_item; + ASN_SEQUENCE_ADD(&ie->value.choice.GNB_CU_TNL_Association_To_Remove_List.list, + gnb_cu_tnl_association_to_remove_item_ies); + } + ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); - F1AP_Protected_EUTRA_Resources_ItemIEs_t *protected_eutra_resources_item_ies; + /* mandatory */ + /* c6. GNB_CU_TNL_Association_To_Update_List */ + ie = (F1AP_GNBCUConfigurationUpdateIEs_t *)calloc(1, sizeof(F1AP_GNBCUConfigurationUpdateIEs_t)); + ie->id = F1AP_ProtocolIE_ID_id_GNB_CU_TNL_Association_To_Update_List; + ie->criticality = F1AP_Criticality_reject; + ie->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_GNB_CU_TNL_Association_To_Update_List; + for (i=0; + i<1; + i++) { - // 8.1 SpectrumSharingGroupID - protected_eutra_resources_item_ies = (F1AP_Protected_EUTRA_Resources_ItemIEs_t *)calloc(1, sizeof(F1AP_Protected_EUTRA_Resources_ItemIEs_t)); - protected_eutra_resources_item_ies->id = F1AP_ProtocolIE_ID_id_Protected_EUTRA_Resources_List; - protected_eutra_resources_item_ies->criticality = F1AP_Criticality_reject; - protected_eutra_resources_item_ies->value.present = F1AP_Protected_EUTRA_Resources_ItemIEs__value_PR_Protected_EUTRA_Resources_Item; - ((F1AP_Protected_EUTRA_Resources_Item_t*)&protected_eutra_resources_item_ies->value.choice.Protected_EUTRA_Resources_Item)->spectrumSharingGroupID = 123L; - memset(&protected_eutra_resources_item_ies->value.choice.Protected_EUTRA_Resources_Item,0, - sizeof(F1AP_Protected_EUTRA_Resources_Item_t)); - ASN_SEQUENCE_ADD(&ie->value.choice.Protected_EUTRA_Resources_List.list, protected_eutra_resources_item_ies); + F1AP_GNB_CU_TNL_Association_To_Update_ItemIEs_t *gnb_cu_tnl_association_to_update_item_ies; + gnb_cu_tnl_association_to_update_item_ies = (F1AP_GNB_CU_TNL_Association_To_Update_ItemIEs_t *)calloc(1, sizeof(F1AP_GNB_CU_TNL_Association_To_Update_ItemIEs_t)); + gnb_cu_tnl_association_to_update_item_ies->id = F1AP_ProtocolIE_ID_id_GNB_CU_TNL_Association_To_Update_Item; + gnb_cu_tnl_association_to_update_item_ies->criticality = F1AP_Criticality_reject; + gnb_cu_tnl_association_to_update_item_ies->value.present = F1AP_GNB_CU_TNL_Association_To_Update_ItemIEs__value_PR_GNB_CU_TNL_Association_To_Update_Item; + + // 4.1 GNB_CU_TNL_Association_To_Update_Item + F1AP_GNB_CU_TNL_Association_To_Update_Item_t gnb_cu_tnl_association_to_update_item; + memset((void *)&gnb_cu_tnl_association_to_update_item, 0, sizeof(F1AP_GNB_CU_TNL_Association_To_Update_Item_t)); + // 4.1.1 tNLAssociationTransportLayerAddress + F1AP_CP_TransportLayerAddress_t transportLayerAddress; + memset((void *)&transportLayerAddress, 0, sizeof(F1AP_CP_TransportLayerAddress_t)); + transportLayerAddress.present = F1AP_CP_TransportLayerAddress_PR_endpoint_IP_address; + TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &transportLayerAddress.choice.endpoint_IP_address); + + // memset((void *)&transportLayerAddress, 0, sizeof(F1AP_CP_TransportLayerAddress_t)); + // transportLayerAddress.present = F1AP_CP_TransportLayerAddress_PR_endpoint_IP_address_and_port; + // transportLayerAddress.choice.endpoint_IP_address_and_port = (F1AP_Endpoint_IP_address_and_port_t *)calloc(1, sizeof(F1AP_Endpoint_IP_address_and_port_t)); + // TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &transportLayerAddress.choice.endpoint_IP_address_and_port.endpoint_IP_address); + + gnb_cu_tnl_association_to_update_item.tNLAssociationTransportLayerAddress = transportLayerAddress; + + + // 4.1.2 tNLAssociationUsage + if (1) { + gnb_cu_tnl_association_to_update_item.tNLAssociationUsage = (F1AP_TNLAssociationUsage_t *)calloc(1, sizeof(F1AP_TNLAssociationUsage_t)); + *gnb_cu_tnl_association_to_update_item.tNLAssociationUsage = F1AP_TNLAssociationUsage_non_ue; + } + + + gnb_cu_tnl_association_to_update_item_ies->value.choice.GNB_CU_TNL_Association_To_Update_Item = gnb_cu_tnl_association_to_update_item; + ASN_SEQUENCE_ADD(&ie->value.choice.GNB_CU_TNL_Association_To_Update_List.list, + gnb_cu_tnl_association_to_update_item_ies); + } + ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); + + + /* mandatory */ + /* c7. Cells_to_be_Barred_List */ + ie = (F1AP_GNBCUConfigurationUpdateIEs_t *)calloc(1, sizeof(F1AP_GNBCUConfigurationUpdateIEs_t)); + ie->id = F1AP_ProtocolIE_ID_id_Cells_to_be_Barred_List; + ie->criticality = F1AP_Criticality_reject; + ie->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_Cells_to_be_Barred_List; + for (i=0; + i<1; + i++) { + + F1AP_Cells_to_be_Barred_ItemIEs_t *cells_to_be_barred_item_ies; + cells_to_be_barred_item_ies = (F1AP_Cells_to_be_Barred_ItemIEs_t *)calloc(1, sizeof(F1AP_Cells_to_be_Barred_ItemIEs_t)); + cells_to_be_barred_item_ies->id = F1AP_ProtocolIE_ID_id_Cells_to_be_Activated_List_Item; + cells_to_be_barred_item_ies->criticality = F1AP_Criticality_reject; + cells_to_be_barred_item_ies->value.present = F1AP_Cells_to_be_Barred_ItemIEs__value_PR_Cells_to_be_Barred_Item; + + // 7.1 cells to be Deactivated list item + F1AP_Cells_to_be_Barred_Item_t cells_to_be_barred_item; + memset((void *)&cells_to_be_barred_item, 0, sizeof(F1AP_Cells_to_be_Barred_Item_t)); + + // - nRCGI + F1AP_NRCGI_t nRCGI; + memset(&nRCGI,0,sizeof(F1AP_NRCGI_t)); + MCC_MNC_TO_PLMNID(f1ap_gnb_cu_configuration_update->cells_to_activate[i].mcc, + f1ap_gnb_cu_configuration_update->cells_to_activate[i].mnc, + f1ap_gnb_cu_configuration_update->cells_to_activate[i].mnc_digit_length, + &nRCGI.pLMN_Identity); + NR_CELL_ID_TO_BIT_STRING(f1ap_gnb_cu_configuration_update->cells_to_activate[i].nr_cellid, &nRCGI.nRCellIdentity); + cells_to_be_barred_item.nRCGI = nRCGI; + + // 7.2 cellBarred + cells_to_be_barred_item.cellBarred = F1AP_CellBarred_not_barred; + + cells_to_be_barred_item_ies->value.choice.Cells_to_be_Barred_Item = cells_to_be_barred_item; + ASN_SEQUENCE_ADD(&ie->value.choice.Cells_to_be_Barred_List.list, + cells_to_be_barred_item_ies); + } + ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); + + + /* mandatory */ + /* c8. Protected_EUTRA_Resources_List */ + ie = (F1AP_GNBCUConfigurationUpdateIEs_t *)calloc(1, sizeof(F1AP_GNBCUConfigurationUpdateIEs_t)); + ie->id = F1AP_ProtocolIE_ID_id_Protected_EUTRA_Resources_List; + ie->criticality = F1AP_Criticality_reject; + ie->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_Protected_EUTRA_Resources_List; + + for (i=0; + i<1; + i++) { + + + F1AP_Protected_EUTRA_Resources_ItemIEs_t *protected_eutra_resources_item_ies; + + // 8.1 SpectrumSharingGroupID + protected_eutra_resources_item_ies = (F1AP_Protected_EUTRA_Resources_ItemIEs_t *)calloc(1, sizeof(F1AP_Protected_EUTRA_Resources_ItemIEs_t)); + protected_eutra_resources_item_ies->id = F1AP_ProtocolIE_ID_id_Protected_EUTRA_Resources_List; + protected_eutra_resources_item_ies->criticality = F1AP_Criticality_reject; + protected_eutra_resources_item_ies->value.present = F1AP_Protected_EUTRA_Resources_ItemIEs__value_PR_Protected_EUTRA_Resources_Item; + ((F1AP_Protected_EUTRA_Resources_Item_t*)&protected_eutra_resources_item_ies->value.choice.Protected_EUTRA_Resources_Item)->spectrumSharingGroupID = 123L; + memset(&protected_eutra_resources_item_ies->value.choice.Protected_EUTRA_Resources_Item,0, + sizeof(F1AP_Protected_EUTRA_Resources_Item_t)); + ASN_SEQUENCE_ADD(&ie->value.choice.Protected_EUTRA_Resources_List.list, protected_eutra_resources_item_ies); + + /* F1AP_Served_EUTRA_Cells_Information_t served_eutra_cells_information; memset((void *)&served_eutra_cells_information, 0, sizeof(F1AP_Served_EUTRA_Cells_Information_t)); @@ -923,10 +923,10 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu ASN_SEQUENCE_ADD(&protected_eutra_resources_item_ies->value.choice.ListofEUTRACellsinGNBDUCoordination.list, &served_eutra_cells_information); ASN_SEQUENCE_ADD(&ie->value.choice.Protected_EUTRA_Resources_List.list, protected_eutra_resources_item_ies); - + */ + } + ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); } - ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); - */ /* encode */ From 372982d502c7c87188eef83766005b49b8fac836 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Sat, 29 May 2021 00:13:55 +0100 Subject: [PATCH 443/579] Temporary revert of GTPU --- cmake_targets/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 53b435e496..f444b2311b 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -414,7 +414,7 @@ add_boolean_option(UE_AUTOTEST_TRACE False "Activate UE autotest specific logs add_boolean_option(UE_DEBUG_TRACE False "Activate UE debug trace") add_boolean_option(UE_TIMING_TRACE False "Activate UE timing trace") add_boolean_option(DEBUG_CONSOLE False "makes debugging easier, disables stdout/stderr buffering") -add_boolean_option(NEW_GTPU True "NEW_GTP") +add_boolean_option(NEW_GTPU False "NEW_GTP") set (OCP_ITTI ${OPENAIR_DIR}/common/utils/ocp_itti) add_library(ITTI From 8c80b8347898d29a795d7c149b1a83adb25f74ea Mon Sep 17 00:00:00 2001 From: Roberto Louro Magueta Date: Sat, 29 May 2021 17:50:50 +0200 Subject: [PATCH 444/579] Revert "Temporary revert of GTPU" This reverts commit 372982d502c7c87188eef83766005b49b8fac836 --- cmake_targets/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index f444b2311b..53b435e496 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -414,7 +414,7 @@ add_boolean_option(UE_AUTOTEST_TRACE False "Activate UE autotest specific logs add_boolean_option(UE_DEBUG_TRACE False "Activate UE debug trace") add_boolean_option(UE_TIMING_TRACE False "Activate UE timing trace") add_boolean_option(DEBUG_CONSOLE False "makes debugging easier, disables stdout/stderr buffering") -add_boolean_option(NEW_GTPU False "NEW_GTP") +add_boolean_option(NEW_GTPU True "NEW_GTP") set (OCP_ITTI ${OPENAIR_DIR}/common/utils/ocp_itti) add_library(ITTI From 024808e6faae4e5fe20edd66a6fce909e5aa049a Mon Sep 17 00:00:00 2001 From: rmagueta Date: Sat, 29 May 2021 20:35:53 +0100 Subject: [PATCH 445/579] Revert more pieces of code to LTE --- openair2/F1AP/f1ap_cu_interface_management.c | 94 ++++++++++--------- openair2/F1AP/f1ap_cu_rrc_message_transfer.c | 22 +++-- openair2/F1AP/f1ap_cu_ue_context_management.c | 20 ++-- openair2/F1AP/f1ap_du_interface_management.c | 20 ++-- 4 files changed, 85 insertions(+), 71 deletions(-) diff --git a/openair2/F1AP/f1ap_cu_interface_management.c b/openair2/F1AP/f1ap_cu_interface_management.c index ee07ae0588..5b29a1bcc3 100644 --- a/openair2/F1AP/f1ap_cu_interface_management.c +++ b/openair2/F1AP/f1ap_cu_interface_management.c @@ -315,17 +315,17 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance, /* mandatory */ /* c3. cells to be Activated list */ int num_cells_to_activate = f1ap_setup_resp->num_cells_to_activate; - LOG_D(F1AP, "num_cells_to_activate = %d \n", num_cells_to_activate); + LOG_I(F1AP, "num_cells_to_activate = %d \n", num_cells_to_activate); if (num_cells_to_activate >0) { ie = (F1AP_F1SetupResponseIEs_t *)calloc(1, sizeof(F1AP_F1SetupResponseIEs_t)); ie->id = F1AP_ProtocolIE_ID_id_Cells_to_be_Activated_List; ie->criticality = F1AP_Criticality_reject; ie->value.present = F1AP_F1SetupResponseIEs__value_PR_Cells_to_be_Activated_List; + for (i=0; icells_to_activate[i].mcc, f1ap_setup_resp->cells_to_activate[i].mnc, f1ap_setup_resp->cells_to_activate[i].mnc_digit_length); F1AP_Cells_to_be_Activated_List_ItemIEs_t *cells_to_be_activated_list_item_ies; cells_to_be_activated_list_item_ies = (F1AP_Cells_to_be_Activated_List_ItemIEs_t *)calloc(1, sizeof(F1AP_Cells_to_be_Activated_List_ItemIEs_t)); @@ -379,7 +379,7 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance, (const char*)f1ap_setup_resp->cells_to_activate[i].SI_container[sIBtype], f1ap_setup_resp->cells_to_activate[i].SI_container_length[sIBtype]); - LOG_D(F1AP, "f1ap_setup_resp->SI_container_length[%d][%d] = %d \n", i,sIBtype,f1ap_setup_resp->cells_to_activate[i].SI_container_length[sIBtype]); + LOG_I(F1AP, "f1ap_setup_resp->SI_container_length[%d][%d] = %d \n", i,sIBtype,f1ap_setup_resp->cells_to_activate[i].SI_container_length[sIBtype]); ASN_SEQUENCE_ADD(&gNB_CUSystemInformation->sibtypetobeupdatedlist.list,sib_item); } } @@ -569,6 +569,9 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu for (i=0; inum_cells_to_activate; i++) { + LOG_I(F1AP, "(%d) mcc = %d, mnc = %d, mnc_digit_length = %d\n", + i, f1ap_gnb_cu_configuration_update->cells_to_activate[i].mcc, f1ap_gnb_cu_configuration_update->cells_to_activate[i].mnc, f1ap_gnb_cu_configuration_update->cells_to_activate[i].mnc_digit_length); + F1AP_Cells_to_be_Activated_List_ItemIEs_t *cells_to_be_activated_list_item_ies; cells_to_be_activated_list_item_ies = (F1AP_Cells_to_be_Activated_List_ItemIEs_t *)calloc(1, sizeof(F1AP_Cells_to_be_Activated_List_ItemIEs_t)); cells_to_be_activated_list_item_ies->id = F1AP_ProtocolIE_ID_id_Cells_to_be_Activated_List_Item; @@ -590,53 +593,56 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu &nRCGI.nRCellIdentity); cells_to_be_activated_list_item.nRCGI = nRCGI; - // optional - // -nRPCI - cells_to_be_activated_list_item.nRPCI = (F1AP_NRPCI_t *)calloc(1, sizeof(F1AP_NRPCI_t)); - *cells_to_be_activated_list_item.nRPCI = f1ap_gnb_cu_configuration_update->cells_to_activate[i].nrpci; // int 0..1007 + if(RC.nrrrc) { - // optional - // 3.1.2 gNB-CUSystem Information - F1AP_Cells_to_be_Activated_List_ItemExtIEs_t *cells_to_be_activated_list_itemExtIEs; - cells_to_be_activated_list_itemExtIEs = (F1AP_Cells_to_be_Activated_List_ItemExtIEs_t *)calloc(1, sizeof(F1AP_Cells_to_be_Activated_List_ItemExtIEs_t)); - cells_to_be_activated_list_itemExtIEs->id = F1AP_ProtocolIE_ID_id_gNB_CUSystemInformation; - cells_to_be_activated_list_itemExtIEs->criticality = F1AP_Criticality_reject; - cells_to_be_activated_list_itemExtIEs->extensionValue.present = F1AP_Cells_to_be_Activated_List_ItemExtIEs__extensionValue_PR_GNB_CUSystemInformation; + // optional + // -nRPCI + cells_to_be_activated_list_item.nRPCI = (F1AP_NRPCI_t *)calloc(1, sizeof(F1AP_NRPCI_t)); + *cells_to_be_activated_list_item.nRPCI = f1ap_gnb_cu_configuration_update->cells_to_activate[i].nrpci; // int 0..1007 - if (f1ap_gnb_cu_configuration_update->cells_to_activate[i].num_SI > 0) { - F1AP_GNB_CUSystemInformation_t *gNB_CUSystemInformation = (F1AP_GNB_CUSystemInformation_t *)calloc(1, sizeof(F1AP_GNB_CUSystemInformation_t)); - //LOG_I(F1AP, "%s() SI %d size %d: ", __func__, i, f1ap_setup_resp->SI_container_length[i][0]); - //for (int n = 0; n < f1ap_setup_resp->SI_container_length[i][0]; n++) - // printf("%02x ", f1ap_setup_resp->SI_container[i][0][n]); - //printf("\n"); + // optional + // 3.1.2 gNB-CUSystem Information + F1AP_Cells_to_be_Activated_List_ItemExtIEs_t *cells_to_be_activated_list_itemExtIEs; + cells_to_be_activated_list_itemExtIEs = (F1AP_Cells_to_be_Activated_List_ItemExtIEs_t *)calloc(1, sizeof(F1AP_Cells_to_be_Activated_List_ItemExtIEs_t)); + cells_to_be_activated_list_itemExtIEs->id = F1AP_ProtocolIE_ID_id_gNB_CUSystemInformation; + cells_to_be_activated_list_itemExtIEs->criticality = F1AP_Criticality_reject; + cells_to_be_activated_list_itemExtIEs->extensionValue.present = F1AP_Cells_to_be_Activated_List_ItemExtIEs__extensionValue_PR_GNB_CUSystemInformation; - // for (int sIBtype=2;sIBtype<33;sIBtype++) { //21 ? 33 ? - for (int sIBtype=2;sIBtype<21;sIBtype++) { - if (f1ap_gnb_cu_configuration_update->cells_to_activate[i].SI_container[sIBtype]!=NULL) { - AssertFatal(sIBtype < 6 || sIBtype == 9, "Illegal SI type %d\n",sIBtype); - F1AP_SibtypetobeupdatedListItem_t *sib_item = calloc(1,sizeof(*sib_item)); - memset((void*)sib_item,0,sizeof(*sib_item)); - sib_item->sIBtype = sIBtype; - OCTET_STRING_fromBuf(&sib_item->sIBmessage, - (const char*)f1ap_gnb_cu_configuration_update->cells_to_activate[i].SI_container[sIBtype], - f1ap_gnb_cu_configuration_update->cells_to_activate[i].SI_container_length[sIBtype]); + if (f1ap_gnb_cu_configuration_update->cells_to_activate[i].num_SI > 0) { + F1AP_GNB_CUSystemInformation_t *gNB_CUSystemInformation = (F1AP_GNB_CUSystemInformation_t *)calloc(1, sizeof(F1AP_GNB_CUSystemInformation_t)); + //LOG_I(F1AP, "%s() SI %d size %d: ", __func__, i, f1ap_setup_resp->SI_container_length[i][0]); + //for (int n = 0; n < f1ap_setup_resp->SI_container_length[i][0]; n++) + // printf("%02x ", f1ap_setup_resp->SI_container[i][0][n]); + //printf("\n"); - LOG_D(F1AP, "f1ap_setup_resp->SI_container_length[%d][%d] = %d \n", i,sIBtype,f1ap_gnb_cu_configuration_update->cells_to_activate[i].SI_container_length[sIBtype]); - ASN_SEQUENCE_ADD(&gNB_CUSystemInformation->sibtypetobeupdatedlist.list,sib_item); - } - } - cells_to_be_activated_list_itemExtIEs->extensionValue.choice.GNB_CUSystemInformation = *gNB_CUSystemInformation; + // for (int sIBtype=2;sIBtype<33;sIBtype++) { //21 ? 33 ? + for (int sIBtype=2;sIBtype<21;sIBtype++) { + if (f1ap_gnb_cu_configuration_update->cells_to_activate[i].SI_container[sIBtype]!=NULL) { + AssertFatal(sIBtype < 6 || sIBtype == 9, "Illegal SI type %d\n",sIBtype); + F1AP_SibtypetobeupdatedListItem_t *sib_item = calloc(1,sizeof(*sib_item)); + memset((void*)sib_item,0,sizeof(*sib_item)); + sib_item->sIBtype = sIBtype; + OCTET_STRING_fromBuf(&sib_item->sIBmessage, + (const char*)f1ap_gnb_cu_configuration_update->cells_to_activate[i].SI_container[sIBtype], + f1ap_gnb_cu_configuration_update->cells_to_activate[i].SI_container_length[sIBtype]); + + LOG_D(F1AP, "f1ap_setup_resp->SI_container_length[%d][%d] = %d \n", i,sIBtype,f1ap_gnb_cu_configuration_update->cells_to_activate[i].SI_container_length[sIBtype]); + ASN_SEQUENCE_ADD(&gNB_CUSystemInformation->sibtypetobeupdatedlist.list,sib_item); + } + } + cells_to_be_activated_list_itemExtIEs->extensionValue.choice.GNB_CUSystemInformation = *gNB_CUSystemInformation; - F1AP_ProtocolExtensionContainer_154P112_t p_154P112_t; - memset((void *)&p_154P112_t, 0, sizeof(F1AP_ProtocolExtensionContainer_154P112_t)); + F1AP_ProtocolExtensionContainer_154P112_t p_154P112_t; + memset((void *)&p_154P112_t, 0, sizeof(F1AP_ProtocolExtensionContainer_154P112_t)); - ASN_SEQUENCE_ADD(&p_154P112_t.list, - cells_to_be_activated_list_itemExtIEs); - cells_to_be_activated_list_item.iE_Extensions = (struct F1AP_ProtocolExtensionContainer*)&p_154P112_t; + ASN_SEQUENCE_ADD(&p_154P112_t.list, + cells_to_be_activated_list_itemExtIEs); + cells_to_be_activated_list_item.iE_Extensions = (struct F1AP_ProtocolExtensionContainer*)&p_154P112_t; - free(gNB_CUSystemInformation); - gNB_CUSystemInformation = NULL; + free(gNB_CUSystemInformation); + gNB_CUSystemInformation = NULL; + } } // ADD diff --git a/openair2/F1AP/f1ap_cu_rrc_message_transfer.c b/openair2/F1AP/f1ap_cu_rrc_message_transfer.c index c9c640e009..eebe2a64b2 100644 --- a/openair2/F1AP/f1ap_cu_rrc_message_transfer.c +++ b/openair2/F1AP/f1ap_cu_rrc_message_transfer.c @@ -130,13 +130,13 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance, ccch_sdu_len); } - LOG_I(F1AP, "%s() RRCContainer (CCCH) size %ld: ", __func__, - ie->value.choice.RRCContainer.size); - for (int i = 0; i < ie->value.choice.RRCContainer.size; i++) - printf("%02x ", RRC_MAC_CCCH_DATA_IND (message_p).sdu[i]); - printf("\n"); - if (RC.nrrrc && RC.nrrrc[GNB_INSTANCE_TO_MODULE_ID(instance)]->node_type == ngran_gNB_CU) { + + LOG_I(F1AP, "%s() RRCContainer (CCCH) size %ld: ", __func__, ie->value.choice.RRCContainer.size); + for (int i = 0; i < ie->value.choice.RRCContainer.size; i++) + printf("%02x ", RRC_MAC_CCCH_DATA_IND (message_p).sdu[i]); + printf("\n"); + /* DUtoCURRCContainer */ F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_InitialULRRCMessageTransferIEs_t, ie, container, F1AP_ProtocolIE_ID_id_DUtoCURRCContainer, true); @@ -295,10 +295,12 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance, OCTET_STRING_fromBuf(&ie->value.choice.RRCContainer, (const char*)f1ap_dl_rrc->rrc_container, f1ap_dl_rrc->rrc_container_length); ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); - LOG_I(F1AP, "%s() RRCContainer size %d: ", __func__, f1ap_dl_rrc->rrc_container_length); - for (int i = 0; i < ie->value.choice.RRCContainer.size; i++) - printf("%02x ", f1ap_dl_rrc->rrc_container[i]); - printf("\n"); + if (RC.nrrrc && RC.nrrrc[GNB_INSTANCE_TO_MODULE_ID(instance)]->node_type == ngran_gNB_CU) { + LOG_I(F1AP, "%s() RRCContainer size %d: ", __func__, f1ap_dl_rrc->rrc_container_length); + for (int i = 0; i < ie->value.choice.RRCContainer.size; i++) + printf("%02x ", f1ap_dl_rrc->rrc_container[i]); + printf("\n"); + } /* optional */ /* c7. RAT_FrequencyPriorityInformation */ diff --git a/openair2/F1AP/f1ap_cu_ue_context_management.c b/openair2/F1AP/f1ap_cu_ue_context_management.c index 30d225bb4a..e3bd62079b 100644 --- a/openair2/F1AP/f1ap_cu_ue_context_management.c +++ b/openair2/F1AP/f1ap_cu_ue_context_management.c @@ -742,13 +742,15 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, /* OPTIONAL */ /* RRCContainer */ - ie = (F1AP_UEContextSetupRequestIEs_t *)calloc(1, sizeof(F1AP_UEContextSetupRequestIEs_t)); - ie->id = F1AP_ProtocolIE_ID_id_RRCContainer; - ie->criticality = F1AP_Criticality_reject; - ie->value.present = F1AP_UEContextSetupRequestIEs__value_PR_RRCContainer; - OCTET_STRING_fromBuf(&ie->value.choice.RRCContainer, (const char*)f1ap_ue_context_setup_req->rrc_container, - f1ap_ue_context_setup_req->rrc_container_length); - ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); + if(RC.nrrrc) { + ie = (F1AP_UEContextSetupRequestIEs_t *)calloc(1, sizeof(F1AP_UEContextSetupRequestIEs_t)); + ie->id = F1AP_ProtocolIE_ID_id_RRCContainer; + ie->criticality = F1AP_Criticality_reject; + ie->value.present = F1AP_UEContextSetupRequestIEs__value_PR_RRCContainer; + OCTET_STRING_fromBuf(&ie->value.choice.RRCContainer, (const char*)f1ap_ue_context_setup_req->rrc_container, + f1ap_ue_context_setup_req->rrc_container_length); + ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); + } /* OPTIONAL */ /* MaskedIMEISV */ @@ -781,7 +783,9 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, LOG_D(F1AP,"F1AP UEContextSetupRequest Encoded %u bits\n", len); - cu_f1ap_itti_send_sctp_data_req(instance, f1ap_assoc_id /* BK: fix me*/ , buffer, len, 0 /* BK: fix me*/); + if(RC.nrrrc) { + cu_f1ap_itti_send_sctp_data_req(instance, f1ap_assoc_id /* BK: fix me*/ , buffer, len, 0 /* BK: fix me*/); + } return 0; } diff --git a/openair2/F1AP/f1ap_du_interface_management.c b/openair2/F1AP/f1ap_du_interface_management.c index 59e1fe8bbe..f56e37df57 100644 --- a/openair2/F1AP/f1ap_du_interface_management.c +++ b/openair2/F1AP/f1ap_du_interface_management.c @@ -415,15 +415,17 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) { /* mandatory */ /* c5. RRC VERSION */ - ie = (F1AP_F1SetupRequestIEs_t *)calloc(1, sizeof(F1AP_F1SetupRequestIEs_t)); - ie->id = F1AP_ProtocolIE_ID_id_GNB_DU_RRC_Version; - ie->criticality = F1AP_Criticality_reject; - ie->value.present = F1AP_F1SetupRequestIEs__value_PR_RRC_Version; - ie->value.choice.RRC_Version.latest_RRC_Version.buf=calloc(1,sizeof(char)); - ie->value.choice.RRC_Version.latest_RRC_Version.buf[0] = 0xe0; - ie->value.choice.RRC_Version.latest_RRC_Version.size = 1; - ie->value.choice.RRC_Version.latest_RRC_Version.bits_unused = 5; - ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); + if(RC.nrrrc) { + ie = (F1AP_F1SetupRequestIEs_t *) calloc(1, sizeof(F1AP_F1SetupRequestIEs_t)); + ie->id = F1AP_ProtocolIE_ID_id_GNB_DU_RRC_Version; + ie->criticality = F1AP_Criticality_reject; + ie->value.present = F1AP_F1SetupRequestIEs__value_PR_RRC_Version; + ie->value.choice.RRC_Version.latest_RRC_Version.buf = calloc(1, sizeof(char)); + ie->value.choice.RRC_Version.latest_RRC_Version.buf[0] = 0xe0; + ie->value.choice.RRC_Version.latest_RRC_Version.size = 1; + ie->value.choice.RRC_Version.latest_RRC_Version.bits_unused = 5; + ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); + } /* encode */ if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { From 769da284fb0419042f5475a87c1d41fb7a3f8310 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Sun, 30 May 2021 12:33:21 +0100 Subject: [PATCH 446/579] Change some hardcode values --- openair2/F1AP/f1ap_cu_ue_context_management.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/openair2/F1AP/f1ap_cu_ue_context_management.c b/openair2/F1AP/f1ap_cu_ue_context_management.c index e3bd62079b..317f0058b2 100644 --- a/openair2/F1AP/f1ap_cu_ue_context_management.c +++ b/openair2/F1AP/f1ap_cu_ue_context_management.c @@ -264,7 +264,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, f1ap_ue_context_setup_req->mnc, f1ap_ue_context_setup_req->mnc_digit_length, &nRCGI.pLMN_Identity); - NR_CELL_ID_TO_BIT_STRING(123456, &nRCGI.nRCellIdentity); + NR_CELL_ID_TO_BIT_STRING(12345678, &nRCGI.nRCellIdentity); scell_toBeSetup_item.sCell_ID = nRCGI; /* 10.1.2 sCellIndex */ @@ -1085,8 +1085,8 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) { // for test int mcc = 208; - int mnc = 93; - int mnc_digit_length = 8; + int mnc = 92; + int mnc_digit_length = 2; /* Create */ /* 0. Message Type */ @@ -1127,7 +1127,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) { F1AP_NRCGI_t nRCGI; MCC_MNC_TO_PLMNID(mcc, mnc, mnc_digit_length, &nRCGI.pLMN_Identity); - NR_CELL_ID_TO_BIT_STRING(123456, &nRCGI.nRCellIdentity); + NR_CELL_ID_TO_BIT_STRING(12345678, &nRCGI.nRCellIdentity); ie->value.choice.NRCGI = nRCGI; ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); @@ -1252,7 +1252,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) { memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t)); MCC_MNC_TO_PLMNID(mcc, mnc, mnc_digit_length, &nRCGI.pLMN_Identity); - NR_CELL_ID_TO_BIT_STRING(123456, &nRCGI.nRCellIdentity); + NR_CELL_ID_TO_BIT_STRING(12345678, &nRCGI.nRCellIdentity); scell_toBeSetupMod_item.sCell_ID = nRCGI; /* sCellIndex */ @@ -1292,7 +1292,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) { memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t)); MCC_MNC_TO_PLMNID(mcc, mnc, mnc_digit_length, &nRCGI.pLMN_Identity); - NR_CELL_ID_TO_BIT_STRING(123456, &nRCGI.nRCellIdentity); + NR_CELL_ID_TO_BIT_STRING(12345678, &nRCGI.nRCellIdentity); scell_toBeRemoved_item.sCell_ID = nRCGI; /* ADD */ From 64aa42d6468c47a6a68ce02ce1f6e3df93b29406 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Sun, 30 May 2021 20:16:55 +0100 Subject: [PATCH 447/579] Change hardcoded task id to TASK_VARIABLE --- executables/nr-softmodem.c | 4 +-- openair2/F1AP/f1ap_cu_interface_management.c | 4 +-- openair2/LAYER2/PDCP_v10.1.0/pdcp.c | 2 +- openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c | 2 +- openair2/RRC/LTE/rrc_eNB.c | 2 +- openair2/RRC/LTE/rrc_eNB_GTPV1U.c | 14 +++++----- openair2/RRC/NR/rrc_gNB.c | 3 ++- openair2/RRC/NR/rrc_gNB_NGAP.c | 8 +++++- openair2/SIMULATION/NR_RRC/itti_sim.c | 2 +- openair3/GTPV1-U/gtpv1u_eNB.c | 27 ++++++++++---------- openair3/GTPV1-U/gtpv1u_gNB.c | 15 ++++++----- openair3/GTPV1-U/gtpv1u_task.c | 20 +++++++-------- openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c | 6 ++--- targets/COMMON/create_tasks.c | 2 +- targets/COMMON/create_tasks_mbms.c | 2 +- 15 files changed, 60 insertions(+), 53 deletions(-) diff --git a/executables/nr-softmodem.c b/executables/nr-softmodem.c index b803b6e79e..2400e1b744 100644 --- a/executables/nr-softmodem.c +++ b/executables/nr-softmodem.c @@ -370,7 +370,7 @@ int create_gNB_tasks(uint32_t gnb_nb) { } } - if (itti_create_task (TASK_GTPV1_U, &nr_gtpv1u_gNB_task, NULL) < 0) { + if (itti_create_task (TASK_VARIABLE, &nr_gtpv1u_gNB_task, NULL) < 0) { LOG_E(GTPU, "Create task for GTPV1U failed\n"); return -1; } @@ -395,7 +395,7 @@ int create_gNB_tasks(uint32_t gnb_nb) { } } - if (itti_create_task (TASK_GTPV1_U, &nr_gtpv1u_gNB_task, NULL) < 0) { + if (itti_create_task (TASK_VARIABLE, &nr_gtpv1u_gNB_task, NULL) < 0) { LOG_E(GTPU, "Create task for GTPV1U failed\n"); return -1; } diff --git a/openair2/F1AP/f1ap_cu_interface_management.c b/openair2/F1AP/f1ap_cu_interface_management.c index 5b29a1bcc3..c147836e9f 100644 --- a/openair2/F1AP/f1ap_cu_interface_management.c +++ b/openair2/F1AP/f1ap_cu_interface_management.c @@ -324,7 +324,7 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance, for (i=0; icells_to_activate[i].mcc, f1ap_setup_resp->cells_to_activate[i].mnc, f1ap_setup_resp->cells_to_activate[i].mnc_digit_length); F1AP_Cells_to_be_Activated_List_ItemIEs_t *cells_to_be_activated_list_item_ies; @@ -569,7 +569,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu for (i=0; inum_cells_to_activate; i++) { - LOG_I(F1AP, "(%d) mcc = %d, mnc = %d, mnc_digit_length = %d\n", + LOG_I(F1AP, "(cell %d) mcc = %d, mnc = %d, mnc_digit_length = %d\n", i, f1ap_gnb_cu_configuration_update->cells_to_activate[i].mcc, f1ap_gnb_cu_configuration_update->cells_to_activate[i].mnc, f1ap_gnb_cu_configuration_update->cells_to_activate[i].mnc_digit_length); F1AP_Cells_to_be_Activated_List_ItemIEs_t *cells_to_be_activated_list_item_ies; diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c index 51d3cfc8f3..c4c4e80c23 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c @@ -1012,7 +1012,7 @@ pdcp_data_ind( rb_id + 4, sdu_buffer_sizeP - payload_offset); //LOG_T(PDCP,"Sending to GTPV1U %d bytes\n", sdu_buffer_sizeP - payload_offset); - gtpu_buffer_p = itti_malloc(TASK_PDCP_ENB, TASK_GTPV1_U, + gtpu_buffer_p = itti_malloc(TASK_PDCP_ENB, TASK_VARIABLE, sdu_buffer_sizeP - payload_offset + GTPU_HEADER_OVERHEAD_MAX); AssertFatal(gtpu_buffer_p != NULL, "OUT OF MEMORY"); memcpy(>pu_buffer_p[GTPU_HEADER_OVERHEAD_MAX], &sdu_buffer_pP->data[payload_offset], sdu_buffer_sizeP - payload_offset); diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c index 7c69b72c2a..c325c1239b 100644 --- a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c +++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c @@ -481,7 +481,7 @@ static void deliver_sdu_drb(void *_ue, nr_pdcp_entity_t *entity, int offset=0; if (entity->has_sdap == 1 && entity->has_sdapULheader == 1) offset = 1; // this is the offset of the SDAP header in bytes - gtpu_buffer_p = itti_malloc(TASK_PDCP_ENB, TASK_GTPV1_U, + gtpu_buffer_p = itti_malloc(TASK_PDCP_ENB, TASK_VARIABLE, size + GTPU_HEADER_OVERHEAD_MAX - offset); AssertFatal(gtpu_buffer_p != NULL, "OUT OF MEMORY"); memcpy(>pu_buffer_p[GTPU_HEADER_OVERHEAD_MAX], buf+offset, size-offset); diff --git a/openair2/RRC/LTE/rrc_eNB.c b/openair2/RRC/LTE/rrc_eNB.c index 789dc6ba48..31d39f2934 100644 --- a/openair2/RRC/LTE/rrc_eNB.c +++ b/openair2/RRC/LTE/rrc_eNB.c @@ -8157,7 +8157,7 @@ rrc_eNB_decode_dcch( } } - itti_send_msg_to_task(TASK_GTPV1_U, ctxt_pP->instance, msg_delete_tunnels_p); + itti_send_msg_to_task(TASK_VARIABLE, ctxt_pP->instance, msg_delete_tunnels_p); //S1AP_E_RAB_RELEASE_RESPONSE rrc_eNB_send_S1AP_E_RAB_RELEASE_RESPONSE(ctxt_pP, ue_context_p, diff --git a/openair2/RRC/LTE/rrc_eNB_GTPV1U.c b/openair2/RRC/LTE/rrc_eNB_GTPV1U.c index a6af6a4163..8081747708 100644 --- a/openair2/RRC/LTE/rrc_eNB_GTPV1U.c +++ b/openair2/RRC/LTE/rrc_eNB_GTPV1U.c @@ -121,11 +121,11 @@ gtpv_data_req( LOG_I(GTPU,"gtpv_data_req task_id = TASK_DATA_FORWARDING\n"); - message_buffer = itti_malloc (TASK_GTPV1_U, TASK_DATA_FORWARDING, sdu_sizeP); + message_buffer = itti_malloc (TASK_VARIABLE, TASK_DATA_FORWARDING, sdu_sizeP); memcpy (message_buffer, buffer_pP, sdu_sizeP); - message_p = itti_alloc_new_message (TASK_GTPV1_U, 0, GTPV1U_ENB_DATA_FORWARDING_IND); + message_p = itti_alloc_new_message (TASK_VARIABLE, 0, GTPV1U_ENB_DATA_FORWARDING_IND); GTPV1U_ENB_DATA_FORWARDING_IND (message_p).frame = ctxt_pP->frame; GTPV1U_ENB_DATA_FORWARDING_IND (message_p).enb_flag = ctxt_pP->enb_flag; GTPV1U_ENB_DATA_FORWARDING_IND (message_p).rb_id = rb_idP; @@ -144,11 +144,11 @@ gtpv_data_req( LOG_I(GTPU,"gtpv_data_req task_id = TASK_END_MARKER\n"); - message_buffer = itti_malloc (TASK_GTPV1_U, TASK_END_MARKER, sdu_sizeP); + message_buffer = itti_malloc (TASK_VARIABLE, TASK_END_MARKER, sdu_sizeP); memcpy (message_buffer, buffer_pP, sdu_sizeP); - message_p = itti_alloc_new_message (TASK_GTPV1_U, 0, GTPV1U_ENB_END_MARKER_IND); + message_p = itti_alloc_new_message (TASK_VARIABLE, 0, GTPV1U_ENB_END_MARKER_IND); GTPV1U_ENB_END_MARKER_IND (message_p).frame = ctxt_pP->frame; GTPV1U_ENB_END_MARKER_IND (message_p).enb_flag = ctxt_pP->enb_flag; GTPV1U_ENB_END_MARKER_IND (message_p).rb_id = rb_idP; @@ -201,15 +201,15 @@ boolean_t gtpv_data_req_new ( //ue_context_p->ue_context.handover_info->state = HO_END_MARKER; MessageDef *msg; // Configure end marker - msg = itti_alloc_new_message(TASK_GTPV1_U, 0, GTPV1U_ENB_END_MARKER_REQ); - GTPV1U_ENB_END_MARKER_REQ(msg).buffer = itti_malloc(TASK_GTPV1_U, TASK_GTPV1_U, GTPU_HEADER_OVERHEAD_MAX + sdu_buffer_sizeP); + msg = itti_alloc_new_message(TASK_VARIABLE, 0, GTPV1U_ENB_END_MARKER_REQ); + GTPV1U_ENB_END_MARKER_REQ(msg).buffer = itti_malloc(TASK_VARIABLE, TASK_VARIABLE, GTPU_HEADER_OVERHEAD_MAX + sdu_buffer_sizeP); memcpy(>PV1U_ENB_END_MARKER_REQ(msg).buffer[GTPU_HEADER_OVERHEAD_MAX], sdu_buffer_pP, sdu_buffer_sizeP); GTPV1U_ENB_END_MARKER_REQ(msg).length = sdu_buffer_sizeP; GTPV1U_ENB_END_MARKER_REQ(msg).rnti = ctxt->rnti; GTPV1U_ENB_END_MARKER_REQ(msg).rab_id = rb_idP; GTPV1U_ENB_END_MARKER_REQ(msg).offset = GTPU_HEADER_OVERHEAD_MAX; LOG_I(GTPU, "Send End Marker to GTPV1-U at frame %d and subframe %d \n", ctxt->frame,ctxt->subframe); - itti_send_msg_to_task(TASK_GTPV1_U, ENB_MODULE_ID_TO_INSTANCE(ctxt->module_id), msg); + itti_send_msg_to_task(TASK_VARIABLE, ENB_MODULE_ID_TO_INSTANCE(ctxt->module_id), msg); return NW_GTPV1U_OK; } diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index 1788ecf0fa..652e353d0b 100755 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -88,6 +88,7 @@ #include "executables/softmodem-common.h" #include #include +#include #include "BIT_STRING.h" #include "assertions.h" @@ -2270,7 +2271,7 @@ rrc_gNB_decode_dcch( } } - itti_send_msg_to_task(TASK_GTPV1_U, ctxt_pP->instance, msg_delete_tunnels_p); + itti_send_msg_to_task(TASK_VARIABLE, ctxt_pP->instance, msg_delete_tunnels_p); //NGAP_PDUSESSION_RELEASE_RESPONSE rrc_gNB_send_NGAP_PDUSESSION_RELEASE_RESPONSE(ctxt_pP, ue_context_p, xid); } else { diff --git a/openair2/RRC/NR/rrc_gNB_NGAP.c b/openair2/RRC/NR/rrc_gNB_NGAP.c index 482f228fdb..319b1dc88e 100644 --- a/openair2/RRC/NR/rrc_gNB_NGAP.c +++ b/openair2/RRC/NR/rrc_gNB_NGAP.c @@ -59,6 +59,12 @@ #include "NR_UE-CapabilityRAT-ContainerList.h" #include "f1ap_messages_types.h" +#if defined(NEW_GTPU) +#define TASK_VARIABLE OCP_GTPV1_U +#else +#define TASK_VARIABLE TASK_GTPV1_U +#endif + extern RAN_CONTEXT_t RC; /* Value to indicate an invalid UE initial id */ @@ -1422,7 +1428,7 @@ rrc_gNB_process_NGAP_PDUSESSION_RELEASE_COMMAND( } } - itti_send_msg_to_task(TASK_GTPV1_U, instance, msg_delete_tunnels_p); + itti_send_msg_to_task(TASK_VARIABLE, instance, msg_delete_tunnels_p); //NGAP_PDUSESSION_RELEASE_RESPONSE rrc_gNB_send_NGAP_PDUSESSION_RELEASE_RESPONSE(&ctxt, ue_context_p, xid); LOG_I(NR_RRC, "Send PDU Session Release Response \n"); diff --git a/openair2/SIMULATION/NR_RRC/itti_sim.c b/openair2/SIMULATION/NR_RRC/itti_sim.c index bb39f53135..9fb9366885 100644 --- a/openair2/SIMULATION/NR_RRC/itti_sim.c +++ b/openair2/SIMULATION/NR_RRC/itti_sim.c @@ -310,7 +310,7 @@ int create_gNB_tasks(uint32_t gnb_nb) { } } - if (itti_create_task (TASK_GTPV1_U, &nr_gtpv1u_gNB_task, NULL) < 0) { + if (itti_create_task (TASK_VARIABLE, &nr_gtpv1u_gNB_task, NULL) < 0) { LOG_E(GTPU, "Create task for GTPV1U failed\n"); return -1; } diff --git a/openair3/GTPV1-U/gtpv1u_eNB.c b/openair3/GTPV1-U/gtpv1u_eNB.c index 0fe2741d7b..8e852fa54c 100644 --- a/openair3/GTPV1-U/gtpv1u_eNB.c +++ b/openair3/GTPV1-U/gtpv1u_eNB.c @@ -52,6 +52,7 @@ #include "gtpv1u_eNB_task.h" #include "rrc_eNB_GTPV1U.h" #include +#include #undef GTP_DUMP_SOCKET @@ -136,7 +137,7 @@ static int gtpv1u_eNB_send_init_udp(const Gtpv1uS1Req *req) { // Create and alloc new message MessageDef *message_p; struct in_addr addr= {0}; - message_p = itti_alloc_new_message(TASK_GTPV1_U, 0, UDP_INIT); + message_p = itti_alloc_new_message(TASK_VARIABLE, 0, UDP_INIT); if (message_p == NULL) { return -1; @@ -185,7 +186,7 @@ NwGtpv1uRcT gtpv1u_eNB_send_udp_msg( // Create and alloc new message MessageDef *message_p = NULL; udp_data_req_t *udp_data_req_p = NULL; - message_p = itti_alloc_new_message(TASK_GTPV1_U, 0, UDP_DATA_REQ); + message_p = itti_alloc_new_message(TASK_VARIABLE, 0, UDP_DATA_REQ); if (message_p) { #if defined(LOG_GTPU) && LOG_GTPU > 0 @@ -286,15 +287,15 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req( //ue_context_p->ue_context.handover_info->state = HO_END_MARKER; MessageDef *msg; // Configure end marker - msg = itti_alloc_new_message(TASK_GTPV1_U, 0, GTPV1U_ENB_END_MARKER_REQ); - GTPV1U_ENB_END_MARKER_REQ(msg).buffer = itti_malloc(TASK_GTPV1_U, TASK_GTPV1_U, GTPU_HEADER_OVERHEAD_MAX + buffer_len); + msg = itti_alloc_new_message(TASK_VARIABLE, 0, GTPV1U_ENB_END_MARKER_REQ); + GTPV1U_ENB_END_MARKER_REQ(msg).buffer = itti_malloc(TASK_VARIABLE, TASK_VARIABLE, GTPU_HEADER_OVERHEAD_MAX + buffer_len); memcpy(>PV1U_ENB_END_MARKER_REQ(msg).buffer[GTPU_HEADER_OVERHEAD_MAX], buffer, buffer_len); GTPV1U_ENB_END_MARKER_REQ(msg).length = buffer_len; GTPV1U_ENB_END_MARKER_REQ(msg).rnti = ctxt.rnti; GTPV1U_ENB_END_MARKER_REQ(msg).rab_id = gtpv1u_teid_data_p->eps_bearer_id; GTPV1U_ENB_END_MARKER_REQ(msg).offset = GTPU_HEADER_OVERHEAD_MAX; LOG_I(GTPU, "Send End Marker to GTPV1-U at frame %d and subframe %d \n", ctxt.frame,ctxt.subframe); - itti_send_msg_to_task(TASK_GTPV1_U, ENB_MODULE_ID_TO_INSTANCE(ctxt.module_id), msg); + itti_send_msg_to_task(TASK_VARIABLE, ENB_MODULE_ID_TO_INSTANCE(ctxt.module_id), msg); return NW_GTPV1U_OK; } } @@ -359,8 +360,8 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req( if (ue_context_p->ue_context.handover_info->state == HO_COMPLETE) { MessageDef *msg; // Configure target - msg = itti_alloc_new_message(TASK_GTPV1_U, 0, GTPV1U_ENB_DATA_FORWARDING_REQ); - GTPV1U_ENB_DATA_FORWARDING_REQ(msg).buffer = itti_malloc(TASK_GTPV1_U, TASK_GTPV1_U, GTPU_HEADER_OVERHEAD_MAX + buffer_len); + msg = itti_alloc_new_message(TASK_VARIABLE, 0, GTPV1U_ENB_DATA_FORWARDING_REQ); + GTPV1U_ENB_DATA_FORWARDING_REQ(msg).buffer = itti_malloc(TASK_VARIABLE, TASK_VARIABLE, GTPU_HEADER_OVERHEAD_MAX + buffer_len); memcpy(>PV1U_ENB_DATA_FORWARDING_REQ(msg).buffer[GTPU_HEADER_OVERHEAD_MAX], buffer, buffer_len); GTPV1U_ENB_DATA_FORWARDING_REQ(msg).length = buffer_len; GTPV1U_ENB_DATA_FORWARDING_REQ(msg).rnti = ctxt.rnti; @@ -378,7 +379,7 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req( LOG_T(GTPU, "\n"); #endif LOG_I(GTPU, "Send data forwarding to GTPV1-U at frame %d and subframe %d \n", ctxt.frame,ctxt.subframe); - itti_send_msg_to_task(TASK_GTPV1_U, ENB_MODULE_ID_TO_INSTANCE(ctxt.module_id), msg); + itti_send_msg_to_task(TASK_VARIABLE, ENB_MODULE_ID_TO_INSTANCE(ctxt.module_id), msg); return NW_GTPV1U_OK; } @@ -585,7 +586,7 @@ static NwGtpv1uRcT gtpv1u_start_timer_wrapper( if (tmrType == NW_GTPV1U_TMR_TYPE_ONE_SHOT) { timer_setup(timeoutSec, timeoutUsec, - TASK_GTPV1_U, + TASK_VARIABLE, INSTANCE_DEFAULT, TIMER_ONE_SHOT, timeoutArg, @@ -593,7 +594,7 @@ static NwGtpv1uRcT gtpv1u_start_timer_wrapper( } else { timer_setup(timeoutSec, timeoutUsec, - TASK_GTPV1_U, + TASK_VARIABLE, INSTANCE_DEFAULT, TIMER_PERIODIC, timeoutArg, @@ -1123,7 +1124,7 @@ int gtpv1u_delete_s1u_tunnel( hashtable_rc_t hash_rc = HASH_TABLE_KEY_NOT_EXISTS; teid_t teid_eNB = 0; int erab_index = 0; - message_p = itti_alloc_new_message(TASK_GTPV1_U, 0, GTPV1U_ENB_DELETE_TUNNEL_RESP); + message_p = itti_alloc_new_message(TASK_VARIABLE, 0, GTPV1U_ENB_DELETE_TUNNEL_RESP); GTPV1U_ENB_DELETE_TUNNEL_RESP(message_p).rnti = req_pP->rnti; GTPV1U_ENB_DELETE_TUNNEL_RESP(message_p).status = 0; hash_rc = hashtable_get(RC.gtpv1u_data_g->ue_mapping, req_pP->rnti, (void **)>pv1u_ue_data_p); @@ -1287,7 +1288,7 @@ void *gtpv1u_eNB_process_itti_msg(void *notUsed) { instance_t instance; MessageDef *received_message_p = NULL; int rc = 0; - itti_receive_msg(TASK_GTPV1_U, &received_message_p); + itti_receive_msg(TASK_VARIABLE, &received_message_p); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_ENB_TASK, VCD_FUNCTION_IN); DevAssert(received_message_p != NULL); instance = ITTI_MSG_DESTINATION_INSTANCE(received_message_p); @@ -1591,7 +1592,7 @@ void *gtpv1u_eNB_task(void *args) { int rc = 0; rc = gtpv1u_eNB_init(); AssertFatal(rc == 0, "gtpv1u_eNB_init Failed"); - itti_mark_task_ready(TASK_GTPV1_U); + itti_mark_task_ready(TASK_VARIABLE); MSC_START_USE(); while(1) { diff --git a/openair3/GTPV1-U/gtpv1u_gNB.c b/openair3/GTPV1-U/gtpv1u_gNB.c index d3f26aeff1..986195b2b5 100644 --- a/openair3/GTPV1-U/gtpv1u_gNB.c +++ b/openair3/GTPV1-U/gtpv1u_gNB.c @@ -27,6 +27,7 @@ */ #include #include +#include #include "mme_config.h" #include "intertask_interface.h" @@ -86,7 +87,7 @@ static NwGtpv1uRcT gtpv1u_start_timer_wrapper( if (tmrType == NW_GTPV1U_TMR_TYPE_ONE_SHOT) { timer_setup(timeoutSec, timeoutUsec, - TASK_GTPV1_U, + TASK_VARIABLE, INSTANCE_DEFAULT, TIMER_ONE_SHOT, timeoutArg, @@ -94,7 +95,7 @@ static NwGtpv1uRcT gtpv1u_start_timer_wrapper( } else { timer_setup(timeoutSec, timeoutUsec, - TASK_GTPV1_U, + TASK_VARIABLE, INSTANCE_DEFAULT, TIMER_PERIODIC, timeoutArg, @@ -302,7 +303,7 @@ void *gtpv1u_gNB_task(void *args) { int rc = 0; rc = gtpv1u_gNB_init(); AssertFatal(rc == 0, "gtpv1u_eNB_init Failed"); - itti_mark_task_ready(TASK_GTPV1_U); + itti_mark_task_ready(TASK_VARIABLE); MSC_START_USE(); while(1) { @@ -755,7 +756,7 @@ int gtpv1u_delete_ngu_tunnel( hashtable_rc_t hash_rc = HASH_TABLE_KEY_NOT_EXISTS; teid_t teid_gNB = 0; int pdusession_index = 0; - message_p = itti_alloc_new_message(TASK_GTPV1_U, 0, GTPV1U_GNB_DELETE_TUNNEL_RESP); + message_p = itti_alloc_new_message(TASK_VARIABLE, 0, GTPV1U_GNB_DELETE_TUNNEL_RESP); GTPV1U_GNB_DELETE_TUNNEL_RESP(message_p).rnti = req_pP->rnti; GTPV1U_GNB_DELETE_TUNNEL_RESP(message_p).status = 0; hash_rc = hashtable_get(RC.nr_gtpv1u_data_g->ue_mapping, req_pP->rnti, (void **)>pv1u_ue_data_p); @@ -826,7 +827,7 @@ static int gtpv1u_gNB_send_init_udp(const Gtpv1uNGReq *req) { // Create and alloc new message MessageDef *message_p; struct in_addr addr= {0}; - message_p = itti_alloc_new_message(TASK_GTPV1_U, 0, UDP_INIT); + message_p = itti_alloc_new_message(TASK_VARIABLE, 0, UDP_INIT); if (message_p == NULL) { return -1; @@ -938,7 +939,7 @@ void *gtpv1u_gNB_process_itti_msg(void *notUsed) { instance_t instance; MessageDef *received_message_p = NULL; int rc = 0; - itti_receive_msg(TASK_GTPV1_U, &received_message_p); + itti_receive_msg(TASK_VARIABLE, &received_message_p); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_ENB_TASK, VCD_FUNCTION_IN); DevAssert(received_message_p != NULL); instance = received_message_p->ittiMsgHeader.originInstance; @@ -1007,7 +1008,7 @@ void *nr_gtpv1u_gNB_task(void *args) { int rc = 0; rc = nr_gtpv1u_gNB_init(); AssertFatal(rc == 0, "gtpv1u_gNB_init Failed"); - itti_mark_task_ready(TASK_GTPV1_U); + itti_mark_task_ready(TASK_VARIABLE); MSC_START_USE(); while(1) { diff --git a/openair3/GTPV1-U/gtpv1u_task.c b/openair3/GTPV1-U/gtpv1u_task.c index 1339839cf9..235677172d 100644 --- a/openair3/GTPV1-U/gtpv1u_task.c +++ b/openair3/GTPV1-U/gtpv1u_task.c @@ -162,7 +162,7 @@ NwGtpv1uRcT gtpv1u_send_udp_msg( MessageDef *message_p; udp_data_req_t *udp_data_req_p; - message_p = itti_alloc_new_message(TASK_GTPV1_U, UDP_DATA_REQ); + message_p = itti_alloc_new_message(TASK_VARIABLE, UDP_DATA_REQ); udp_data_req_p = &message_p->ittiMsg.udp_data_req; @@ -202,7 +202,7 @@ NwGtpv1uRcT gtpv1u_process_stack_req( pUlpApi->apiInfo.recvMsgInfo.teid, ((NwGtpv1uMsgT*)pUlpApi->apiInfo.recvMsgInfo.hMsg)->msgBufLen); - message_p = itti_alloc_new_message(TASK_GTPV1_U, GTPV1U_TUNNEL_DATA_IND); + message_p = itti_alloc_new_message(TASK_VARIABLE, GTPV1U_TUNNEL_DATA_IND); if (message_p == NULL) { return -1; @@ -282,7 +282,7 @@ static int gtpv1u_create_s1u_tunnel(Gtpv1uCreateTunnelReq *create_tunnel_reqP) // gtpv1u_teid2enb_info->enb_ip_addr.address.ipv4_address[3] = 2; - message_p = itti_alloc_new_message(TASK_GTPV1_U, GTPV1U_CREATE_TUNNEL_RESP); + message_p = itti_alloc_new_message(TASK_VARIABLE, GTPV1U_CREATE_TUNNEL_RESP); message_p->ittiMsg.gtpv1uCreateTunnelResp.S1u_teid = s1u_teid; message_p->ittiMsg.gtpv1uCreateTunnelResp.context_teid = create_tunnel_reqP->context_teid; message_p->ittiMsg.gtpv1uCreateTunnelResp.eps_bearer_id = create_tunnel_reqP->eps_bearer_id; @@ -312,7 +312,7 @@ static int gtpv1u_delete_s1u_tunnel(Teid_t context_teidP, Teid_t S1U_teidP) MessageDef *message_p; GTPU_DEBUG("Rx GTPV1U_DELETE_TUNNEL Context %u S1U teid %u\n", context_teidP, S1U_teidP); - message_p = itti_alloc_new_message(TASK_GTPV1_U, GTPV1U_DELETE_TUNNEL_RESP); + message_p = itti_alloc_new_message(TASK_VARIABLE, GTPV1U_DELETE_TUNNEL_RESP); message_p->ittiMsg.gtpv1uDeleteTunnelResp.S1u_teid = S1U_teidP; message_p->ittiMsg.gtpv1uDeleteTunnelResp.context_teid = context_teidP; @@ -338,7 +338,7 @@ static int gtpv1u_update_s1u_tunnel(Gtpv1uUpdateTunnelReq *reqP) reqP->context_teid, reqP->sgw_S1u_teid, reqP->enb_S1u_teid); - message_p = itti_alloc_new_message(TASK_GTPV1_U, GTPV1U_UPDATE_TUNNEL_RESP); + message_p = itti_alloc_new_message(TASK_VARIABLE, GTPV1U_UPDATE_TUNNEL_RESP); hash_rc = hashtable_get(gtpv1u_sgw_data.S1U_mapping, reqP->sgw_S1u_teid, (void**)>pv1u_teid2enb_info); @@ -376,7 +376,7 @@ static NwGtpv1uRcT gtpv1u_start_timer_wrapper( if (tmrType == NW_GTPV1U_TMR_TYPE_ONE_SHOT) { timer_setup(timeoutSec, timeoutUsec, - TASK_GTPV1_U, + TASK_VARIABLE, INSTANCE_DEFAULT, TIMER_ONE_SHOT, timeoutArg, @@ -384,7 +384,7 @@ static NwGtpv1uRcT gtpv1u_start_timer_wrapper( } else { timer_setup(timeoutSec, timeoutUsec, - TASK_GTPV1_U, + TASK_VARIABLE, INSTANCE_DEFAULT, TIMER_PERIODIC, timeoutArg, @@ -406,7 +406,7 @@ static NwGtpv1uRcT gtpv1u_stop_timer_wrapper( static void *gtpv1u_thread(void *args) { - itti_mark_task_ready(TASK_GTPV1_U); + itti_mark_task_ready(TASK_VARIABLE); MSC_START_USE(); while(1) { @@ -415,7 +415,7 @@ static void *gtpv1u_thread(void *args) * message is sent to the task. */ MessageDef *received_message_p = NULL; - itti_receive_msg(TASK_GTPV1_U, &received_message_p); + itti_receive_msg(TASK_VARIABLE, &received_message_p); DevAssert(received_message_p != NULL); @@ -474,7 +474,7 @@ int gtpv1u_init(const mme_config_t *mme_config_p) gtpv1u_sgw_data.sgw_ip_address_for_S1u_S12_S4_up = mme_config_p->ipv4.sgw_ip_address_for_S1u_S12_S4_up; - if (itti_create_task(TASK_GTPV1_U, >pv1u_thread, NULL) < 0) { + if (itti_create_task(TASK_VARIABLE, >pv1u_thread, NULL) < 0) { GTPU_ERROR("gtpv1u phtread_create: %s", strerror(errno)); return -1; } diff --git a/openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c b/openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c index 11c41394eb..7427bbf950 100644 --- a/openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c +++ b/openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c @@ -34,6 +34,7 @@ #include #include #include +#include #include "NwTypes.h" #include "NwUtils.h" @@ -641,10 +642,7 @@ nwGtpv1uHandleEchoReq(NW_IN NwGtpv1uStackT *thiz, * tool, I saw that there were 6 bytes accessed after bufLen in nwGtpv1uCreateAndSendMsg * the value "16" has been chosen arbitrarily, just bigger than 6 */ - ((NwGtpv1uMsgT*)hMsg)->msgBuf = itti_malloc( - TASK_GTPV1_U, - TASK_UDP, - bufLen + 16 /* CROUX - dirty +16, to be fixed! */); + ((NwGtpv1uMsgT*)hMsg)->msgBuf = itti_malloc(TASK_VARIABLE, TASK_UDP, bufLen + 16 /* CROUX - dirty +16, to be fixed! */); ((NwGtpv1uMsgT*)hMsg)->msgBufLen = bufLen; NW_ASSERT(NW_GTPV1U_OK == rc); diff --git a/targets/COMMON/create_tasks.c b/targets/COMMON/create_tasks.c index 3e0d97f60a..d391d47992 100644 --- a/targets/COMMON/create_tasks.c +++ b/targets/COMMON/create_tasks.c @@ -73,7 +73,7 @@ int create_tasks(uint32_t enb_nb) { rc = itti_create_task(TASK_UDP, udp_eNB_task, NULL); AssertFatal(rc >= 0, "Create task for UDP failed\n"); } - rc = itti_create_task(TASK_GTPV1_U, gtpv1u_eNB_task, NULL); + rc = itti_create_task(TASK_VARIABLE, gtpv1u_eNB_task, NULL); AssertFatal(rc >= 0, "Create task for GTPV1U failed\n"); if (is_x2ap_enabled()) { rc = itti_create_task(TASK_X2AP, x2ap_task, NULL); diff --git a/targets/COMMON/create_tasks_mbms.c b/targets/COMMON/create_tasks_mbms.c index 579e851ea7..837bb96b5e 100644 --- a/targets/COMMON/create_tasks_mbms.c +++ b/targets/COMMON/create_tasks_mbms.c @@ -115,7 +115,7 @@ int create_tasks_mbms(uint32_t enb_nb) { // AssertFatal(rc >= 0, "Create task for SCTP failed\n"); rc = itti_create_task(TASK_UDP, udp_eNB_task, NULL); AssertFatal(rc >= 0, "Create task for UDP failed\n"); - rc = itti_create_task(TASK_GTPV1_U, gtpv1u_eNB_task, NULL); + rc = itti_create_task(TASK_VARIABLE, gtpv1u_eNB_task, NULL); AssertFatal(rc >= 0, "Create task for GTPV1U failed\n"); } /// From 1145a5516c8de8faa83298bc97b41f959d05a8cd Mon Sep 17 00:00:00 2001 From: Roberto Louro Magueta Date: Mon, 31 May 2021 02:05:38 +0200 Subject: [PATCH 448/579] Revert "Change hardcoded task id to TASK_VARIABLE" This reverts commit 64aa42d6468c47a6a68ce02ce1f6e3df93b29406 --- executables/nr-softmodem.c | 4 +-- openair2/F1AP/f1ap_cu_interface_management.c | 4 +-- openair2/LAYER2/PDCP_v10.1.0/pdcp.c | 2 +- openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c | 2 +- openair2/RRC/LTE/rrc_eNB.c | 2 +- openair2/RRC/LTE/rrc_eNB_GTPV1U.c | 14 +++++----- openair2/RRC/NR/rrc_gNB.c | 3 +-- openair2/RRC/NR/rrc_gNB_NGAP.c | 8 +----- openair2/SIMULATION/NR_RRC/itti_sim.c | 2 +- openair3/GTPV1-U/gtpv1u_eNB.c | 27 ++++++++++---------- openair3/GTPV1-U/gtpv1u_gNB.c | 15 +++++------ openair3/GTPV1-U/gtpv1u_task.c | 20 +++++++-------- openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c | 6 +++-- targets/COMMON/create_tasks.c | 2 +- targets/COMMON/create_tasks_mbms.c | 2 +- 15 files changed, 53 insertions(+), 60 deletions(-) diff --git a/executables/nr-softmodem.c b/executables/nr-softmodem.c index 2400e1b744..b803b6e79e 100644 --- a/executables/nr-softmodem.c +++ b/executables/nr-softmodem.c @@ -370,7 +370,7 @@ int create_gNB_tasks(uint32_t gnb_nb) { } } - if (itti_create_task (TASK_VARIABLE, &nr_gtpv1u_gNB_task, NULL) < 0) { + if (itti_create_task (TASK_GTPV1_U, &nr_gtpv1u_gNB_task, NULL) < 0) { LOG_E(GTPU, "Create task for GTPV1U failed\n"); return -1; } @@ -395,7 +395,7 @@ int create_gNB_tasks(uint32_t gnb_nb) { } } - if (itti_create_task (TASK_VARIABLE, &nr_gtpv1u_gNB_task, NULL) < 0) { + if (itti_create_task (TASK_GTPV1_U, &nr_gtpv1u_gNB_task, NULL) < 0) { LOG_E(GTPU, "Create task for GTPV1U failed\n"); return -1; } diff --git a/openair2/F1AP/f1ap_cu_interface_management.c b/openair2/F1AP/f1ap_cu_interface_management.c index c147836e9f..5b29a1bcc3 100644 --- a/openair2/F1AP/f1ap_cu_interface_management.c +++ b/openair2/F1AP/f1ap_cu_interface_management.c @@ -324,7 +324,7 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance, for (i=0; icells_to_activate[i].mcc, f1ap_setup_resp->cells_to_activate[i].mnc, f1ap_setup_resp->cells_to_activate[i].mnc_digit_length); F1AP_Cells_to_be_Activated_List_ItemIEs_t *cells_to_be_activated_list_item_ies; @@ -569,7 +569,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu for (i=0; inum_cells_to_activate; i++) { - LOG_I(F1AP, "(cell %d) mcc = %d, mnc = %d, mnc_digit_length = %d\n", + LOG_I(F1AP, "(%d) mcc = %d, mnc = %d, mnc_digit_length = %d\n", i, f1ap_gnb_cu_configuration_update->cells_to_activate[i].mcc, f1ap_gnb_cu_configuration_update->cells_to_activate[i].mnc, f1ap_gnb_cu_configuration_update->cells_to_activate[i].mnc_digit_length); F1AP_Cells_to_be_Activated_List_ItemIEs_t *cells_to_be_activated_list_item_ies; diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c index c4c4e80c23..51d3cfc8f3 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c @@ -1012,7 +1012,7 @@ pdcp_data_ind( rb_id + 4, sdu_buffer_sizeP - payload_offset); //LOG_T(PDCP,"Sending to GTPV1U %d bytes\n", sdu_buffer_sizeP - payload_offset); - gtpu_buffer_p = itti_malloc(TASK_PDCP_ENB, TASK_VARIABLE, + gtpu_buffer_p = itti_malloc(TASK_PDCP_ENB, TASK_GTPV1_U, sdu_buffer_sizeP - payload_offset + GTPU_HEADER_OVERHEAD_MAX); AssertFatal(gtpu_buffer_p != NULL, "OUT OF MEMORY"); memcpy(>pu_buffer_p[GTPU_HEADER_OVERHEAD_MAX], &sdu_buffer_pP->data[payload_offset], sdu_buffer_sizeP - payload_offset); diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c index c325c1239b..7c69b72c2a 100644 --- a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c +++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c @@ -481,7 +481,7 @@ static void deliver_sdu_drb(void *_ue, nr_pdcp_entity_t *entity, int offset=0; if (entity->has_sdap == 1 && entity->has_sdapULheader == 1) offset = 1; // this is the offset of the SDAP header in bytes - gtpu_buffer_p = itti_malloc(TASK_PDCP_ENB, TASK_VARIABLE, + gtpu_buffer_p = itti_malloc(TASK_PDCP_ENB, TASK_GTPV1_U, size + GTPU_HEADER_OVERHEAD_MAX - offset); AssertFatal(gtpu_buffer_p != NULL, "OUT OF MEMORY"); memcpy(>pu_buffer_p[GTPU_HEADER_OVERHEAD_MAX], buf+offset, size-offset); diff --git a/openair2/RRC/LTE/rrc_eNB.c b/openair2/RRC/LTE/rrc_eNB.c index 31d39f2934..789dc6ba48 100644 --- a/openair2/RRC/LTE/rrc_eNB.c +++ b/openair2/RRC/LTE/rrc_eNB.c @@ -8157,7 +8157,7 @@ rrc_eNB_decode_dcch( } } - itti_send_msg_to_task(TASK_VARIABLE, ctxt_pP->instance, msg_delete_tunnels_p); + itti_send_msg_to_task(TASK_GTPV1_U, ctxt_pP->instance, msg_delete_tunnels_p); //S1AP_E_RAB_RELEASE_RESPONSE rrc_eNB_send_S1AP_E_RAB_RELEASE_RESPONSE(ctxt_pP, ue_context_p, diff --git a/openair2/RRC/LTE/rrc_eNB_GTPV1U.c b/openair2/RRC/LTE/rrc_eNB_GTPV1U.c index 8081747708..a6af6a4163 100644 --- a/openair2/RRC/LTE/rrc_eNB_GTPV1U.c +++ b/openair2/RRC/LTE/rrc_eNB_GTPV1U.c @@ -121,11 +121,11 @@ gtpv_data_req( LOG_I(GTPU,"gtpv_data_req task_id = TASK_DATA_FORWARDING\n"); - message_buffer = itti_malloc (TASK_VARIABLE, TASK_DATA_FORWARDING, sdu_sizeP); + message_buffer = itti_malloc (TASK_GTPV1_U, TASK_DATA_FORWARDING, sdu_sizeP); memcpy (message_buffer, buffer_pP, sdu_sizeP); - message_p = itti_alloc_new_message (TASK_VARIABLE, 0, GTPV1U_ENB_DATA_FORWARDING_IND); + message_p = itti_alloc_new_message (TASK_GTPV1_U, 0, GTPV1U_ENB_DATA_FORWARDING_IND); GTPV1U_ENB_DATA_FORWARDING_IND (message_p).frame = ctxt_pP->frame; GTPV1U_ENB_DATA_FORWARDING_IND (message_p).enb_flag = ctxt_pP->enb_flag; GTPV1U_ENB_DATA_FORWARDING_IND (message_p).rb_id = rb_idP; @@ -144,11 +144,11 @@ gtpv_data_req( LOG_I(GTPU,"gtpv_data_req task_id = TASK_END_MARKER\n"); - message_buffer = itti_malloc (TASK_VARIABLE, TASK_END_MARKER, sdu_sizeP); + message_buffer = itti_malloc (TASK_GTPV1_U, TASK_END_MARKER, sdu_sizeP); memcpy (message_buffer, buffer_pP, sdu_sizeP); - message_p = itti_alloc_new_message (TASK_VARIABLE, 0, GTPV1U_ENB_END_MARKER_IND); + message_p = itti_alloc_new_message (TASK_GTPV1_U, 0, GTPV1U_ENB_END_MARKER_IND); GTPV1U_ENB_END_MARKER_IND (message_p).frame = ctxt_pP->frame; GTPV1U_ENB_END_MARKER_IND (message_p).enb_flag = ctxt_pP->enb_flag; GTPV1U_ENB_END_MARKER_IND (message_p).rb_id = rb_idP; @@ -201,15 +201,15 @@ boolean_t gtpv_data_req_new ( //ue_context_p->ue_context.handover_info->state = HO_END_MARKER; MessageDef *msg; // Configure end marker - msg = itti_alloc_new_message(TASK_VARIABLE, 0, GTPV1U_ENB_END_MARKER_REQ); - GTPV1U_ENB_END_MARKER_REQ(msg).buffer = itti_malloc(TASK_VARIABLE, TASK_VARIABLE, GTPU_HEADER_OVERHEAD_MAX + sdu_buffer_sizeP); + msg = itti_alloc_new_message(TASK_GTPV1_U, 0, GTPV1U_ENB_END_MARKER_REQ); + GTPV1U_ENB_END_MARKER_REQ(msg).buffer = itti_malloc(TASK_GTPV1_U, TASK_GTPV1_U, GTPU_HEADER_OVERHEAD_MAX + sdu_buffer_sizeP); memcpy(>PV1U_ENB_END_MARKER_REQ(msg).buffer[GTPU_HEADER_OVERHEAD_MAX], sdu_buffer_pP, sdu_buffer_sizeP); GTPV1U_ENB_END_MARKER_REQ(msg).length = sdu_buffer_sizeP; GTPV1U_ENB_END_MARKER_REQ(msg).rnti = ctxt->rnti; GTPV1U_ENB_END_MARKER_REQ(msg).rab_id = rb_idP; GTPV1U_ENB_END_MARKER_REQ(msg).offset = GTPU_HEADER_OVERHEAD_MAX; LOG_I(GTPU, "Send End Marker to GTPV1-U at frame %d and subframe %d \n", ctxt->frame,ctxt->subframe); - itti_send_msg_to_task(TASK_VARIABLE, ENB_MODULE_ID_TO_INSTANCE(ctxt->module_id), msg); + itti_send_msg_to_task(TASK_GTPV1_U, ENB_MODULE_ID_TO_INSTANCE(ctxt->module_id), msg); return NW_GTPV1U_OK; } diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index 652e353d0b..1788ecf0fa 100755 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -88,7 +88,6 @@ #include "executables/softmodem-common.h" #include #include -#include #include "BIT_STRING.h" #include "assertions.h" @@ -2271,7 +2270,7 @@ rrc_gNB_decode_dcch( } } - itti_send_msg_to_task(TASK_VARIABLE, ctxt_pP->instance, msg_delete_tunnels_p); + itti_send_msg_to_task(TASK_GTPV1_U, ctxt_pP->instance, msg_delete_tunnels_p); //NGAP_PDUSESSION_RELEASE_RESPONSE rrc_gNB_send_NGAP_PDUSESSION_RELEASE_RESPONSE(ctxt_pP, ue_context_p, xid); } else { diff --git a/openair2/RRC/NR/rrc_gNB_NGAP.c b/openair2/RRC/NR/rrc_gNB_NGAP.c index 319b1dc88e..482f228fdb 100644 --- a/openair2/RRC/NR/rrc_gNB_NGAP.c +++ b/openair2/RRC/NR/rrc_gNB_NGAP.c @@ -59,12 +59,6 @@ #include "NR_UE-CapabilityRAT-ContainerList.h" #include "f1ap_messages_types.h" -#if defined(NEW_GTPU) -#define TASK_VARIABLE OCP_GTPV1_U -#else -#define TASK_VARIABLE TASK_GTPV1_U -#endif - extern RAN_CONTEXT_t RC; /* Value to indicate an invalid UE initial id */ @@ -1428,7 +1422,7 @@ rrc_gNB_process_NGAP_PDUSESSION_RELEASE_COMMAND( } } - itti_send_msg_to_task(TASK_VARIABLE, instance, msg_delete_tunnels_p); + itti_send_msg_to_task(TASK_GTPV1_U, instance, msg_delete_tunnels_p); //NGAP_PDUSESSION_RELEASE_RESPONSE rrc_gNB_send_NGAP_PDUSESSION_RELEASE_RESPONSE(&ctxt, ue_context_p, xid); LOG_I(NR_RRC, "Send PDU Session Release Response \n"); diff --git a/openair2/SIMULATION/NR_RRC/itti_sim.c b/openair2/SIMULATION/NR_RRC/itti_sim.c index 9fb9366885..bb39f53135 100644 --- a/openair2/SIMULATION/NR_RRC/itti_sim.c +++ b/openair2/SIMULATION/NR_RRC/itti_sim.c @@ -310,7 +310,7 @@ int create_gNB_tasks(uint32_t gnb_nb) { } } - if (itti_create_task (TASK_VARIABLE, &nr_gtpv1u_gNB_task, NULL) < 0) { + if (itti_create_task (TASK_GTPV1_U, &nr_gtpv1u_gNB_task, NULL) < 0) { LOG_E(GTPU, "Create task for GTPV1U failed\n"); return -1; } diff --git a/openair3/GTPV1-U/gtpv1u_eNB.c b/openair3/GTPV1-U/gtpv1u_eNB.c index 8e852fa54c..0fe2741d7b 100644 --- a/openair3/GTPV1-U/gtpv1u_eNB.c +++ b/openair3/GTPV1-U/gtpv1u_eNB.c @@ -52,7 +52,6 @@ #include "gtpv1u_eNB_task.h" #include "rrc_eNB_GTPV1U.h" #include -#include #undef GTP_DUMP_SOCKET @@ -137,7 +136,7 @@ static int gtpv1u_eNB_send_init_udp(const Gtpv1uS1Req *req) { // Create and alloc new message MessageDef *message_p; struct in_addr addr= {0}; - message_p = itti_alloc_new_message(TASK_VARIABLE, 0, UDP_INIT); + message_p = itti_alloc_new_message(TASK_GTPV1_U, 0, UDP_INIT); if (message_p == NULL) { return -1; @@ -186,7 +185,7 @@ NwGtpv1uRcT gtpv1u_eNB_send_udp_msg( // Create and alloc new message MessageDef *message_p = NULL; udp_data_req_t *udp_data_req_p = NULL; - message_p = itti_alloc_new_message(TASK_VARIABLE, 0, UDP_DATA_REQ); + message_p = itti_alloc_new_message(TASK_GTPV1_U, 0, UDP_DATA_REQ); if (message_p) { #if defined(LOG_GTPU) && LOG_GTPU > 0 @@ -287,15 +286,15 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req( //ue_context_p->ue_context.handover_info->state = HO_END_MARKER; MessageDef *msg; // Configure end marker - msg = itti_alloc_new_message(TASK_VARIABLE, 0, GTPV1U_ENB_END_MARKER_REQ); - GTPV1U_ENB_END_MARKER_REQ(msg).buffer = itti_malloc(TASK_VARIABLE, TASK_VARIABLE, GTPU_HEADER_OVERHEAD_MAX + buffer_len); + msg = itti_alloc_new_message(TASK_GTPV1_U, 0, GTPV1U_ENB_END_MARKER_REQ); + GTPV1U_ENB_END_MARKER_REQ(msg).buffer = itti_malloc(TASK_GTPV1_U, TASK_GTPV1_U, GTPU_HEADER_OVERHEAD_MAX + buffer_len); memcpy(>PV1U_ENB_END_MARKER_REQ(msg).buffer[GTPU_HEADER_OVERHEAD_MAX], buffer, buffer_len); GTPV1U_ENB_END_MARKER_REQ(msg).length = buffer_len; GTPV1U_ENB_END_MARKER_REQ(msg).rnti = ctxt.rnti; GTPV1U_ENB_END_MARKER_REQ(msg).rab_id = gtpv1u_teid_data_p->eps_bearer_id; GTPV1U_ENB_END_MARKER_REQ(msg).offset = GTPU_HEADER_OVERHEAD_MAX; LOG_I(GTPU, "Send End Marker to GTPV1-U at frame %d and subframe %d \n", ctxt.frame,ctxt.subframe); - itti_send_msg_to_task(TASK_VARIABLE, ENB_MODULE_ID_TO_INSTANCE(ctxt.module_id), msg); + itti_send_msg_to_task(TASK_GTPV1_U, ENB_MODULE_ID_TO_INSTANCE(ctxt.module_id), msg); return NW_GTPV1U_OK; } } @@ -360,8 +359,8 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req( if (ue_context_p->ue_context.handover_info->state == HO_COMPLETE) { MessageDef *msg; // Configure target - msg = itti_alloc_new_message(TASK_VARIABLE, 0, GTPV1U_ENB_DATA_FORWARDING_REQ); - GTPV1U_ENB_DATA_FORWARDING_REQ(msg).buffer = itti_malloc(TASK_VARIABLE, TASK_VARIABLE, GTPU_HEADER_OVERHEAD_MAX + buffer_len); + msg = itti_alloc_new_message(TASK_GTPV1_U, 0, GTPV1U_ENB_DATA_FORWARDING_REQ); + GTPV1U_ENB_DATA_FORWARDING_REQ(msg).buffer = itti_malloc(TASK_GTPV1_U, TASK_GTPV1_U, GTPU_HEADER_OVERHEAD_MAX + buffer_len); memcpy(>PV1U_ENB_DATA_FORWARDING_REQ(msg).buffer[GTPU_HEADER_OVERHEAD_MAX], buffer, buffer_len); GTPV1U_ENB_DATA_FORWARDING_REQ(msg).length = buffer_len; GTPV1U_ENB_DATA_FORWARDING_REQ(msg).rnti = ctxt.rnti; @@ -379,7 +378,7 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req( LOG_T(GTPU, "\n"); #endif LOG_I(GTPU, "Send data forwarding to GTPV1-U at frame %d and subframe %d \n", ctxt.frame,ctxt.subframe); - itti_send_msg_to_task(TASK_VARIABLE, ENB_MODULE_ID_TO_INSTANCE(ctxt.module_id), msg); + itti_send_msg_to_task(TASK_GTPV1_U, ENB_MODULE_ID_TO_INSTANCE(ctxt.module_id), msg); return NW_GTPV1U_OK; } @@ -586,7 +585,7 @@ static NwGtpv1uRcT gtpv1u_start_timer_wrapper( if (tmrType == NW_GTPV1U_TMR_TYPE_ONE_SHOT) { timer_setup(timeoutSec, timeoutUsec, - TASK_VARIABLE, + TASK_GTPV1_U, INSTANCE_DEFAULT, TIMER_ONE_SHOT, timeoutArg, @@ -594,7 +593,7 @@ static NwGtpv1uRcT gtpv1u_start_timer_wrapper( } else { timer_setup(timeoutSec, timeoutUsec, - TASK_VARIABLE, + TASK_GTPV1_U, INSTANCE_DEFAULT, TIMER_PERIODIC, timeoutArg, @@ -1124,7 +1123,7 @@ int gtpv1u_delete_s1u_tunnel( hashtable_rc_t hash_rc = HASH_TABLE_KEY_NOT_EXISTS; teid_t teid_eNB = 0; int erab_index = 0; - message_p = itti_alloc_new_message(TASK_VARIABLE, 0, GTPV1U_ENB_DELETE_TUNNEL_RESP); + message_p = itti_alloc_new_message(TASK_GTPV1_U, 0, GTPV1U_ENB_DELETE_TUNNEL_RESP); GTPV1U_ENB_DELETE_TUNNEL_RESP(message_p).rnti = req_pP->rnti; GTPV1U_ENB_DELETE_TUNNEL_RESP(message_p).status = 0; hash_rc = hashtable_get(RC.gtpv1u_data_g->ue_mapping, req_pP->rnti, (void **)>pv1u_ue_data_p); @@ -1288,7 +1287,7 @@ void *gtpv1u_eNB_process_itti_msg(void *notUsed) { instance_t instance; MessageDef *received_message_p = NULL; int rc = 0; - itti_receive_msg(TASK_VARIABLE, &received_message_p); + itti_receive_msg(TASK_GTPV1_U, &received_message_p); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_ENB_TASK, VCD_FUNCTION_IN); DevAssert(received_message_p != NULL); instance = ITTI_MSG_DESTINATION_INSTANCE(received_message_p); @@ -1592,7 +1591,7 @@ void *gtpv1u_eNB_task(void *args) { int rc = 0; rc = gtpv1u_eNB_init(); AssertFatal(rc == 0, "gtpv1u_eNB_init Failed"); - itti_mark_task_ready(TASK_VARIABLE); + itti_mark_task_ready(TASK_GTPV1_U); MSC_START_USE(); while(1) { diff --git a/openair3/GTPV1-U/gtpv1u_gNB.c b/openair3/GTPV1-U/gtpv1u_gNB.c index 986195b2b5..d3f26aeff1 100644 --- a/openair3/GTPV1-U/gtpv1u_gNB.c +++ b/openair3/GTPV1-U/gtpv1u_gNB.c @@ -27,7 +27,6 @@ */ #include #include -#include #include "mme_config.h" #include "intertask_interface.h" @@ -87,7 +86,7 @@ static NwGtpv1uRcT gtpv1u_start_timer_wrapper( if (tmrType == NW_GTPV1U_TMR_TYPE_ONE_SHOT) { timer_setup(timeoutSec, timeoutUsec, - TASK_VARIABLE, + TASK_GTPV1_U, INSTANCE_DEFAULT, TIMER_ONE_SHOT, timeoutArg, @@ -95,7 +94,7 @@ static NwGtpv1uRcT gtpv1u_start_timer_wrapper( } else { timer_setup(timeoutSec, timeoutUsec, - TASK_VARIABLE, + TASK_GTPV1_U, INSTANCE_DEFAULT, TIMER_PERIODIC, timeoutArg, @@ -303,7 +302,7 @@ void *gtpv1u_gNB_task(void *args) { int rc = 0; rc = gtpv1u_gNB_init(); AssertFatal(rc == 0, "gtpv1u_eNB_init Failed"); - itti_mark_task_ready(TASK_VARIABLE); + itti_mark_task_ready(TASK_GTPV1_U); MSC_START_USE(); while(1) { @@ -756,7 +755,7 @@ int gtpv1u_delete_ngu_tunnel( hashtable_rc_t hash_rc = HASH_TABLE_KEY_NOT_EXISTS; teid_t teid_gNB = 0; int pdusession_index = 0; - message_p = itti_alloc_new_message(TASK_VARIABLE, 0, GTPV1U_GNB_DELETE_TUNNEL_RESP); + message_p = itti_alloc_new_message(TASK_GTPV1_U, 0, GTPV1U_GNB_DELETE_TUNNEL_RESP); GTPV1U_GNB_DELETE_TUNNEL_RESP(message_p).rnti = req_pP->rnti; GTPV1U_GNB_DELETE_TUNNEL_RESP(message_p).status = 0; hash_rc = hashtable_get(RC.nr_gtpv1u_data_g->ue_mapping, req_pP->rnti, (void **)>pv1u_ue_data_p); @@ -827,7 +826,7 @@ static int gtpv1u_gNB_send_init_udp(const Gtpv1uNGReq *req) { // Create and alloc new message MessageDef *message_p; struct in_addr addr= {0}; - message_p = itti_alloc_new_message(TASK_VARIABLE, 0, UDP_INIT); + message_p = itti_alloc_new_message(TASK_GTPV1_U, 0, UDP_INIT); if (message_p == NULL) { return -1; @@ -939,7 +938,7 @@ void *gtpv1u_gNB_process_itti_msg(void *notUsed) { instance_t instance; MessageDef *received_message_p = NULL; int rc = 0; - itti_receive_msg(TASK_VARIABLE, &received_message_p); + itti_receive_msg(TASK_GTPV1_U, &received_message_p); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_ENB_TASK, VCD_FUNCTION_IN); DevAssert(received_message_p != NULL); instance = received_message_p->ittiMsgHeader.originInstance; @@ -1008,7 +1007,7 @@ void *nr_gtpv1u_gNB_task(void *args) { int rc = 0; rc = nr_gtpv1u_gNB_init(); AssertFatal(rc == 0, "gtpv1u_gNB_init Failed"); - itti_mark_task_ready(TASK_VARIABLE); + itti_mark_task_ready(TASK_GTPV1_U); MSC_START_USE(); while(1) { diff --git a/openair3/GTPV1-U/gtpv1u_task.c b/openair3/GTPV1-U/gtpv1u_task.c index 235677172d..1339839cf9 100644 --- a/openair3/GTPV1-U/gtpv1u_task.c +++ b/openair3/GTPV1-U/gtpv1u_task.c @@ -162,7 +162,7 @@ NwGtpv1uRcT gtpv1u_send_udp_msg( MessageDef *message_p; udp_data_req_t *udp_data_req_p; - message_p = itti_alloc_new_message(TASK_VARIABLE, UDP_DATA_REQ); + message_p = itti_alloc_new_message(TASK_GTPV1_U, UDP_DATA_REQ); udp_data_req_p = &message_p->ittiMsg.udp_data_req; @@ -202,7 +202,7 @@ NwGtpv1uRcT gtpv1u_process_stack_req( pUlpApi->apiInfo.recvMsgInfo.teid, ((NwGtpv1uMsgT*)pUlpApi->apiInfo.recvMsgInfo.hMsg)->msgBufLen); - message_p = itti_alloc_new_message(TASK_VARIABLE, GTPV1U_TUNNEL_DATA_IND); + message_p = itti_alloc_new_message(TASK_GTPV1_U, GTPV1U_TUNNEL_DATA_IND); if (message_p == NULL) { return -1; @@ -282,7 +282,7 @@ static int gtpv1u_create_s1u_tunnel(Gtpv1uCreateTunnelReq *create_tunnel_reqP) // gtpv1u_teid2enb_info->enb_ip_addr.address.ipv4_address[3] = 2; - message_p = itti_alloc_new_message(TASK_VARIABLE, GTPV1U_CREATE_TUNNEL_RESP); + message_p = itti_alloc_new_message(TASK_GTPV1_U, GTPV1U_CREATE_TUNNEL_RESP); message_p->ittiMsg.gtpv1uCreateTunnelResp.S1u_teid = s1u_teid; message_p->ittiMsg.gtpv1uCreateTunnelResp.context_teid = create_tunnel_reqP->context_teid; message_p->ittiMsg.gtpv1uCreateTunnelResp.eps_bearer_id = create_tunnel_reqP->eps_bearer_id; @@ -312,7 +312,7 @@ static int gtpv1u_delete_s1u_tunnel(Teid_t context_teidP, Teid_t S1U_teidP) MessageDef *message_p; GTPU_DEBUG("Rx GTPV1U_DELETE_TUNNEL Context %u S1U teid %u\n", context_teidP, S1U_teidP); - message_p = itti_alloc_new_message(TASK_VARIABLE, GTPV1U_DELETE_TUNNEL_RESP); + message_p = itti_alloc_new_message(TASK_GTPV1_U, GTPV1U_DELETE_TUNNEL_RESP); message_p->ittiMsg.gtpv1uDeleteTunnelResp.S1u_teid = S1U_teidP; message_p->ittiMsg.gtpv1uDeleteTunnelResp.context_teid = context_teidP; @@ -338,7 +338,7 @@ static int gtpv1u_update_s1u_tunnel(Gtpv1uUpdateTunnelReq *reqP) reqP->context_teid, reqP->sgw_S1u_teid, reqP->enb_S1u_teid); - message_p = itti_alloc_new_message(TASK_VARIABLE, GTPV1U_UPDATE_TUNNEL_RESP); + message_p = itti_alloc_new_message(TASK_GTPV1_U, GTPV1U_UPDATE_TUNNEL_RESP); hash_rc = hashtable_get(gtpv1u_sgw_data.S1U_mapping, reqP->sgw_S1u_teid, (void**)>pv1u_teid2enb_info); @@ -376,7 +376,7 @@ static NwGtpv1uRcT gtpv1u_start_timer_wrapper( if (tmrType == NW_GTPV1U_TMR_TYPE_ONE_SHOT) { timer_setup(timeoutSec, timeoutUsec, - TASK_VARIABLE, + TASK_GTPV1_U, INSTANCE_DEFAULT, TIMER_ONE_SHOT, timeoutArg, @@ -384,7 +384,7 @@ static NwGtpv1uRcT gtpv1u_start_timer_wrapper( } else { timer_setup(timeoutSec, timeoutUsec, - TASK_VARIABLE, + TASK_GTPV1_U, INSTANCE_DEFAULT, TIMER_PERIODIC, timeoutArg, @@ -406,7 +406,7 @@ static NwGtpv1uRcT gtpv1u_stop_timer_wrapper( static void *gtpv1u_thread(void *args) { - itti_mark_task_ready(TASK_VARIABLE); + itti_mark_task_ready(TASK_GTPV1_U); MSC_START_USE(); while(1) { @@ -415,7 +415,7 @@ static void *gtpv1u_thread(void *args) * message is sent to the task. */ MessageDef *received_message_p = NULL; - itti_receive_msg(TASK_VARIABLE, &received_message_p); + itti_receive_msg(TASK_GTPV1_U, &received_message_p); DevAssert(received_message_p != NULL); @@ -474,7 +474,7 @@ int gtpv1u_init(const mme_config_t *mme_config_p) gtpv1u_sgw_data.sgw_ip_address_for_S1u_S12_S4_up = mme_config_p->ipv4.sgw_ip_address_for_S1u_S12_S4_up; - if (itti_create_task(TASK_VARIABLE, >pv1u_thread, NULL) < 0) { + if (itti_create_task(TASK_GTPV1_U, >pv1u_thread, NULL) < 0) { GTPU_ERROR("gtpv1u phtread_create: %s", strerror(errno)); return -1; } diff --git a/openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c b/openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c index 7427bbf950..11c41394eb 100644 --- a/openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c +++ b/openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c @@ -34,7 +34,6 @@ #include #include #include -#include #include "NwTypes.h" #include "NwUtils.h" @@ -642,7 +641,10 @@ nwGtpv1uHandleEchoReq(NW_IN NwGtpv1uStackT *thiz, * tool, I saw that there were 6 bytes accessed after bufLen in nwGtpv1uCreateAndSendMsg * the value "16" has been chosen arbitrarily, just bigger than 6 */ - ((NwGtpv1uMsgT*)hMsg)->msgBuf = itti_malloc(TASK_VARIABLE, TASK_UDP, bufLen + 16 /* CROUX - dirty +16, to be fixed! */); + ((NwGtpv1uMsgT*)hMsg)->msgBuf = itti_malloc( + TASK_GTPV1_U, + TASK_UDP, + bufLen + 16 /* CROUX - dirty +16, to be fixed! */); ((NwGtpv1uMsgT*)hMsg)->msgBufLen = bufLen; NW_ASSERT(NW_GTPV1U_OK == rc); diff --git a/targets/COMMON/create_tasks.c b/targets/COMMON/create_tasks.c index d391d47992..3e0d97f60a 100644 --- a/targets/COMMON/create_tasks.c +++ b/targets/COMMON/create_tasks.c @@ -73,7 +73,7 @@ int create_tasks(uint32_t enb_nb) { rc = itti_create_task(TASK_UDP, udp_eNB_task, NULL); AssertFatal(rc >= 0, "Create task for UDP failed\n"); } - rc = itti_create_task(TASK_VARIABLE, gtpv1u_eNB_task, NULL); + rc = itti_create_task(TASK_GTPV1_U, gtpv1u_eNB_task, NULL); AssertFatal(rc >= 0, "Create task for GTPV1U failed\n"); if (is_x2ap_enabled()) { rc = itti_create_task(TASK_X2AP, x2ap_task, NULL); diff --git a/targets/COMMON/create_tasks_mbms.c b/targets/COMMON/create_tasks_mbms.c index 837bb96b5e..579e851ea7 100644 --- a/targets/COMMON/create_tasks_mbms.c +++ b/targets/COMMON/create_tasks_mbms.c @@ -115,7 +115,7 @@ int create_tasks_mbms(uint32_t enb_nb) { // AssertFatal(rc >= 0, "Create task for SCTP failed\n"); rc = itti_create_task(TASK_UDP, udp_eNB_task, NULL); AssertFatal(rc >= 0, "Create task for UDP failed\n"); - rc = itti_create_task(TASK_VARIABLE, gtpv1u_eNB_task, NULL); + rc = itti_create_task(TASK_GTPV1_U, gtpv1u_eNB_task, NULL); AssertFatal(rc >= 0, "Create task for GTPV1U failed\n"); } /// From 7379717ddfd8a0834f7fde0aaab8ffa95d39b8be Mon Sep 17 00:00:00 2001 From: Xue Song Date: Mon, 31 May 2021 17:36:18 +0900 Subject: [PATCH 449/579] Remove duplicate code In the UE executable, delete the initialization of NR.nrrrc and check the NULL of NR.nrrrc --- executables/nr-softmodem.c | 25 ----------------------- executables/nr-uesoftmodem.c | 4 ---- openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c | 2 +- 3 files changed, 1 insertion(+), 30 deletions(-) diff --git a/executables/nr-softmodem.c b/executables/nr-softmodem.c index b803b6e79e..7fb9f8b19f 100644 --- a/executables/nr-softmodem.c +++ b/executables/nr-softmodem.c @@ -377,31 +377,6 @@ int create_gNB_tasks(uint32_t gnb_nb) { } } - if (AMF_MODE_ENABLED && (get_softmodem_params()->phy_test==0 && get_softmodem_params()->do_ra==1)){ - if (gnb_nb > 0) { - if(NGAP_CONF_MODE){ - if (itti_create_task (TASK_NGAP, ngap_gNB_task, NULL) < 0) { - LOG_E(NGAP, "Create task for NGAP failed\n"); - return -1; - } - } else { - LOG_E(NGAP, "Ngap task not created\n"); - } - - if(!emulate_rf){ - if (itti_create_task (TASK_UDP, udp_eNB_task, NULL) < 0) { - LOG_E(UDP_, "Create task for UDP failed\n"); - return -1; - } - } - - if (itti_create_task (TASK_GTPV1_U, &nr_gtpv1u_gNB_task, NULL) < 0) { - LOG_E(GTPU, "Create task for GTPV1U failed\n"); - return -1; - } - } - } - if (gnb_nb > 0) { if (itti_create_task (TASK_GNB_APP, gNB_app_task, NULL) < 0) { LOG_E(GNB_APP, "Create task for gNB APP failed\n"); diff --git a/executables/nr-uesoftmodem.c b/executables/nr-uesoftmodem.c index 4bdcfa23a0..a61f3ea881 100644 --- a/executables/nr-uesoftmodem.c +++ b/executables/nr-uesoftmodem.c @@ -452,10 +452,6 @@ int main( int argc, char **argv ) { #endif LOG_I(HW, "Version: %s\n", PACKAGE_VERSION); - RC.nrrrc = (gNB_RRC_INST **)malloc(1*sizeof(gNB_RRC_INST *)); - RC.nrrrc[0] = (gNB_RRC_INST*)malloc(sizeof(gNB_RRC_INST)); - RC.nrrrc[0]->node_type = ngran_gNB; - init_NR_UE(1,rrc_config_path); if(IS_SOFTMODEM_NOS1 || get_softmodem_params()->sa) init_pdcp(); diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c index 7c69b72c2a..fa504bb1bf 100644 --- a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c +++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c @@ -607,7 +607,7 @@ srb_found: LOG_D(PDCP, "%s(): (srb %d) calling rlc_data_req size %d\n", __func__, srb_id, size); //for (i = 0; i < size; i++) printf(" %2.2x", (unsigned char)memblock->data[i]); //printf("\n"); - if (!NODE_IS_CU(RC.nrrrc[0]->node_type)) { + if ((RC.nrrrc == NULL) || (!NODE_IS_CU(RC.nrrrc[0]->node_type))) { ctxt.module_id = 0; ctxt.enb_flag = 1; ctxt.instance = 0; From a205dcbf44208701ae35e3ac5bad45b4530e9d5f Mon Sep 17 00:00:00 2001 From: rmagueta Date: Mon, 31 May 2021 12:10:24 +0100 Subject: [PATCH 450/579] Fix GTP for LTE --- executables/nr-softmodem.c | 4 ++-- openair2/ENB_APP/enb_config.c | 2 +- openair2/LAYER2/PDCP_v10.1.0/pdcp.c | 2 +- openair2/RRC/LTE/rrc_eNB.c | 2 +- openair2/RRC/LTE/rrc_eNB_S1AP.c | 2 +- openair2/RRC/NR/rrc_gNB_nsa.c | 2 +- openair3/ocp-gtpu/gtp_itf.h | 16 ++++++++-------- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/executables/nr-softmodem.c b/executables/nr-softmodem.c index b803b6e79e..b8eae43b73 100644 --- a/executables/nr-softmodem.c +++ b/executables/nr-softmodem.c @@ -370,7 +370,7 @@ int create_gNB_tasks(uint32_t gnb_nb) { } } - if (itti_create_task (TASK_GTPV1_U, &nr_gtpv1u_gNB_task, NULL) < 0) { + if (itti_create_task (TASK_GTPV1_U, &nr_gtpv1u_gNB_task_var, NULL) < 0) { LOG_E(GTPU, "Create task for GTPV1U failed\n"); return -1; } @@ -395,7 +395,7 @@ int create_gNB_tasks(uint32_t gnb_nb) { } } - if (itti_create_task (TASK_GTPV1_U, &nr_gtpv1u_gNB_task, NULL) < 0) { + if (itti_create_task (TASK_GTPV1_U, &nr_gtpv1u_gNB_task_var, NULL) < 0) { LOG_E(GTPU, "Create task for GTPV1U failed\n"); return -1; } diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c index 4751596931..790cca0fec 100644 --- a/openair2/ENB_APP/enb_config.c +++ b/openair2/ENB_APP/enb_config.c @@ -2076,7 +2076,7 @@ int RCconfig_gtpu(void ) { GTPV1U_ENB_S1_REQ(message).enb_port_for_S1u_S12_S4_up = enb_port_for_S1U; strcpy(GTPV1U_ENB_S1_REQ(message).addrStr,address); sprintf(GTPV1U_ENB_S1_REQ(message).portStr,"%d", enb_port_for_S1U); - itti_send_msg_to_task (TASK_VARIABLE, 0, message); // data model is wrong: gtpu doesn't have enb_id (or module_id) + itti_send_msg_to_task (TASK_GTPV1_U, 0, message); // data model is wrong: gtpu doesn't have enb_id (or module_id) } else LOG_E(GTPU,"invalid address for S1U\n"); diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c index 51d3cfc8f3..822be130a1 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c @@ -1023,7 +1023,7 @@ pdcp_data_ind( GTPV1U_ENB_TUNNEL_DATA_REQ(message_p).offset = GTPU_HEADER_OVERHEAD_MAX; GTPV1U_ENB_TUNNEL_DATA_REQ(message_p).rnti = ctxt_pP->rnti; GTPV1U_ENB_TUNNEL_DATA_REQ(message_p).rab_id = rb_id + 4; - itti_send_msg_to_task(TASK_VARIABLE, INSTANCE_DEFAULT, message_p); + itti_send_msg_to_task(TASK_GTPV1_U, INSTANCE_DEFAULT, message_p); packet_forwarded = TRUE; } } else { diff --git a/openair2/RRC/LTE/rrc_eNB.c b/openair2/RRC/LTE/rrc_eNB.c index 789dc6ba48..80f842f7ea 100644 --- a/openair2/RRC/LTE/rrc_eNB.c +++ b/openair2/RRC/LTE/rrc_eNB.c @@ -4999,7 +4999,7 @@ void rrc_eNB_handover_ue_context_release( ue_context_p->ue_context.enb_gtp_ebi[e_rab] = 0; } - itti_send_msg_to_task(TASK_VARIABLE, ctxt_pP->module_id, msg_delete_tunnels_p); + itti_send_msg_to_task(TASK_GTPV1_U, ctxt_pP->module_id, msg_delete_tunnels_p); struct rrc_ue_s1ap_ids_s *rrc_ue_s1ap_ids = NULL; rrc_ue_s1ap_ids = rrc_eNB_S1AP_get_ue_ids(RC.rrc[ctxt_pP->module_id], 0, eNB_ue_s1ap_id); diff --git a/openair2/RRC/LTE/rrc_eNB_S1AP.c b/openair2/RRC/LTE/rrc_eNB_S1AP.c index 1cb575d1dd..ce4de8190f 100644 --- a/openair2/RRC/LTE/rrc_eNB_S1AP.c +++ b/openair2/RRC/LTE/rrc_eNB_S1AP.c @@ -1788,7 +1788,7 @@ int rrc_eNB_process_S1AP_E_RAB_RELEASE_COMMAND(MessageDef *msg_p, const char *ms } } - itti_send_msg_to_task(TASK_VARIABLE, instance, msg_delete_tunnels_p); + itti_send_msg_to_task(TASK_GTPV1_U, instance, msg_delete_tunnels_p); //S1AP_E_RAB_RELEASE_RESPONSE rrc_eNB_send_S1AP_E_RAB_RELEASE_RESPONSE(&ctxt, ue_context_p, xid); } diff --git a/openair2/RRC/NR/rrc_gNB_nsa.c b/openair2/RRC/NR/rrc_gNB_nsa.c index c7be5f30f3..7ea23b8d0d 100644 --- a/openair2/RRC/NR/rrc_gNB_nsa.c +++ b/openair2/RRC/NR/rrc_gNB_nsa.c @@ -292,7 +292,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_ create_tunnel_req.num_tunnels = m->nb_e_rabs_tobeadded; RB_INSERT(rrc_nr_ue_tree_s, &RC.nrrrc[rrc->module_id]->rrc_ue_head, ue_context_p); PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, rrc->module_id, GNB_FLAG_YES, ue_context_p->ue_id_rnti, 0, 0,rrc->module_id); - gtpv1u_create_s1u_tunnel( + gtpv1u_create_s1u_tunnel_var( ctxt.instance, &create_tunnel_req, &create_tunnel_resp); diff --git a/openair3/ocp-gtpu/gtp_itf.h b/openair3/ocp-gtpu/gtp_itf.h index dd406e27cd..b23ea5a042 100644 --- a/openair3/ocp-gtpu/gtp_itf.h +++ b/openair3/ocp-gtpu/gtp_itf.h @@ -9,15 +9,15 @@ extern "C" { #include #if defined(NEW_GTPU) -#define gtpv1u_create_s1u_tunnel ocp_gtpv1u_create_s1u_tunnel -#define gtpv1u_update_s1u_tunnel ocp_gtpv1u_update_s1u_tunnel -#define gtpv1u_delete_s1u_tunnel ocp_gtpv1u_delete_s1u_tunnel -#define gtpv1u_create_x2u_tunnel ocp_gtpv1u_create_x2u_tunnel -#define gtpv1u_eNB_task ocp_gtpv1uTask -#define nr_gtpv1u_gNB_task ocp_gtpv1uTask -#define TASK_VARIABLE OCP_GTPV1_U +#define gtpv1u_create_s1u_tunnel_var ocp_gtpv1u_create_s1u_tunnel +#define gtpv1u_update_s1u_tunnel_var ocp_gtpv1u_update_s1u_tunnel +#define gtpv1u_delete_s1u_tunnel_var ocp_gtpv1u_delete_s1u_tunnel +#define gtpv1u_create_x2u_tunnel_var ocp_gtpv1u_create_x2u_tunnel +#define gtpv1u_eNB_task_var ocp_gtpv1uTask +#define nr_gtpv1u_gNB_task_var ocp_gtpv1uTask +#define TASK_VARIABLE OCP_GTPV1_U #else -#define TASK_VARIABLE TASK_GTPV1_U +#define TASK_VARIABLE TASK_GTPV1_U #endif typedef boolean_t (*gtpCallback)( From 2e518d95fab8c7c31d237bd64f0f4382064d95e9 Mon Sep 17 00:00:00 2001 From: Roberto Louro Magueta Date: Mon, 31 May 2021 14:13:46 +0200 Subject: [PATCH 451/579] Revert "Merge remote-tracking branch 'remotes/oai/develop-NR_SA_F1AP_5GRECORDS' into..." This reverts commit 4100dc333813ca54cdacdf80f1dd5daab5e4bfe6 --- executables/nr-softmodem.c | 2 +- openair2/ENB_APP/enb_config.c | 2 +- openair2/LAYER2/PDCP_v10.1.0/pdcp.c | 2 +- openair2/RRC/LTE/rrc_eNB.c | 2 +- openair2/RRC/LTE/rrc_eNB_S1AP.c | 2 +- openair2/RRC/NR/rrc_gNB_nsa.c | 2 +- openair3/ocp-gtpu/gtp_itf.h | 16 ++++++++-------- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/executables/nr-softmodem.c b/executables/nr-softmodem.c index d8727b3f7d..7fb9f8b19f 100644 --- a/executables/nr-softmodem.c +++ b/executables/nr-softmodem.c @@ -370,7 +370,7 @@ int create_gNB_tasks(uint32_t gnb_nb) { } } - if (itti_create_task (TASK_GTPV1_U, &nr_gtpv1u_gNB_task_var, NULL) < 0) { + if (itti_create_task (TASK_GTPV1_U, &nr_gtpv1u_gNB_task, NULL) < 0) { LOG_E(GTPU, "Create task for GTPV1U failed\n"); return -1; } diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c index 790cca0fec..4751596931 100644 --- a/openair2/ENB_APP/enb_config.c +++ b/openair2/ENB_APP/enb_config.c @@ -2076,7 +2076,7 @@ int RCconfig_gtpu(void ) { GTPV1U_ENB_S1_REQ(message).enb_port_for_S1u_S12_S4_up = enb_port_for_S1U; strcpy(GTPV1U_ENB_S1_REQ(message).addrStr,address); sprintf(GTPV1U_ENB_S1_REQ(message).portStr,"%d", enb_port_for_S1U); - itti_send_msg_to_task (TASK_GTPV1_U, 0, message); // data model is wrong: gtpu doesn't have enb_id (or module_id) + itti_send_msg_to_task (TASK_VARIABLE, 0, message); // data model is wrong: gtpu doesn't have enb_id (or module_id) } else LOG_E(GTPU,"invalid address for S1U\n"); diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c index 822be130a1..51d3cfc8f3 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c @@ -1023,7 +1023,7 @@ pdcp_data_ind( GTPV1U_ENB_TUNNEL_DATA_REQ(message_p).offset = GTPU_HEADER_OVERHEAD_MAX; GTPV1U_ENB_TUNNEL_DATA_REQ(message_p).rnti = ctxt_pP->rnti; GTPV1U_ENB_TUNNEL_DATA_REQ(message_p).rab_id = rb_id + 4; - itti_send_msg_to_task(TASK_GTPV1_U, INSTANCE_DEFAULT, message_p); + itti_send_msg_to_task(TASK_VARIABLE, INSTANCE_DEFAULT, message_p); packet_forwarded = TRUE; } } else { diff --git a/openair2/RRC/LTE/rrc_eNB.c b/openair2/RRC/LTE/rrc_eNB.c index 80f842f7ea..789dc6ba48 100644 --- a/openair2/RRC/LTE/rrc_eNB.c +++ b/openair2/RRC/LTE/rrc_eNB.c @@ -4999,7 +4999,7 @@ void rrc_eNB_handover_ue_context_release( ue_context_p->ue_context.enb_gtp_ebi[e_rab] = 0; } - itti_send_msg_to_task(TASK_GTPV1_U, ctxt_pP->module_id, msg_delete_tunnels_p); + itti_send_msg_to_task(TASK_VARIABLE, ctxt_pP->module_id, msg_delete_tunnels_p); struct rrc_ue_s1ap_ids_s *rrc_ue_s1ap_ids = NULL; rrc_ue_s1ap_ids = rrc_eNB_S1AP_get_ue_ids(RC.rrc[ctxt_pP->module_id], 0, eNB_ue_s1ap_id); diff --git a/openair2/RRC/LTE/rrc_eNB_S1AP.c b/openair2/RRC/LTE/rrc_eNB_S1AP.c index ce4de8190f..1cb575d1dd 100644 --- a/openair2/RRC/LTE/rrc_eNB_S1AP.c +++ b/openair2/RRC/LTE/rrc_eNB_S1AP.c @@ -1788,7 +1788,7 @@ int rrc_eNB_process_S1AP_E_RAB_RELEASE_COMMAND(MessageDef *msg_p, const char *ms } } - itti_send_msg_to_task(TASK_GTPV1_U, instance, msg_delete_tunnels_p); + itti_send_msg_to_task(TASK_VARIABLE, instance, msg_delete_tunnels_p); //S1AP_E_RAB_RELEASE_RESPONSE rrc_eNB_send_S1AP_E_RAB_RELEASE_RESPONSE(&ctxt, ue_context_p, xid); } diff --git a/openair2/RRC/NR/rrc_gNB_nsa.c b/openair2/RRC/NR/rrc_gNB_nsa.c index 7ea23b8d0d..c7be5f30f3 100644 --- a/openair2/RRC/NR/rrc_gNB_nsa.c +++ b/openair2/RRC/NR/rrc_gNB_nsa.c @@ -292,7 +292,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_ create_tunnel_req.num_tunnels = m->nb_e_rabs_tobeadded; RB_INSERT(rrc_nr_ue_tree_s, &RC.nrrrc[rrc->module_id]->rrc_ue_head, ue_context_p); PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, rrc->module_id, GNB_FLAG_YES, ue_context_p->ue_id_rnti, 0, 0,rrc->module_id); - gtpv1u_create_s1u_tunnel_var( + gtpv1u_create_s1u_tunnel( ctxt.instance, &create_tunnel_req, &create_tunnel_resp); diff --git a/openair3/ocp-gtpu/gtp_itf.h b/openair3/ocp-gtpu/gtp_itf.h index b23ea5a042..dd406e27cd 100644 --- a/openair3/ocp-gtpu/gtp_itf.h +++ b/openair3/ocp-gtpu/gtp_itf.h @@ -9,15 +9,15 @@ extern "C" { #include #if defined(NEW_GTPU) -#define gtpv1u_create_s1u_tunnel_var ocp_gtpv1u_create_s1u_tunnel -#define gtpv1u_update_s1u_tunnel_var ocp_gtpv1u_update_s1u_tunnel -#define gtpv1u_delete_s1u_tunnel_var ocp_gtpv1u_delete_s1u_tunnel -#define gtpv1u_create_x2u_tunnel_var ocp_gtpv1u_create_x2u_tunnel -#define gtpv1u_eNB_task_var ocp_gtpv1uTask -#define nr_gtpv1u_gNB_task_var ocp_gtpv1uTask -#define TASK_VARIABLE OCP_GTPV1_U +#define gtpv1u_create_s1u_tunnel ocp_gtpv1u_create_s1u_tunnel +#define gtpv1u_update_s1u_tunnel ocp_gtpv1u_update_s1u_tunnel +#define gtpv1u_delete_s1u_tunnel ocp_gtpv1u_delete_s1u_tunnel +#define gtpv1u_create_x2u_tunnel ocp_gtpv1u_create_x2u_tunnel +#define gtpv1u_eNB_task ocp_gtpv1uTask +#define nr_gtpv1u_gNB_task ocp_gtpv1uTask +#define TASK_VARIABLE OCP_GTPV1_U #else -#define TASK_VARIABLE TASK_GTPV1_U +#define TASK_VARIABLE TASK_GTPV1_U #endif typedef boolean_t (*gtpCallback)( From 42365c9a0f67bd78ec8aa72d2cf892082177cbdc Mon Sep 17 00:00:00 2001 From: rmagueta Date: Mon, 31 May 2021 13:55:40 +0100 Subject: [PATCH 452/579] Set NEW_GTPU to false --- cmake_targets/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 53b435e496..f444b2311b 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -414,7 +414,7 @@ add_boolean_option(UE_AUTOTEST_TRACE False "Activate UE autotest specific logs add_boolean_option(UE_DEBUG_TRACE False "Activate UE debug trace") add_boolean_option(UE_TIMING_TRACE False "Activate UE timing trace") add_boolean_option(DEBUG_CONSOLE False "makes debugging easier, disables stdout/stderr buffering") -add_boolean_option(NEW_GTPU True "NEW_GTP") +add_boolean_option(NEW_GTPU False "NEW_GTP") set (OCP_ITTI ${OPENAIR_DIR}/common/utils/ocp_itti) add_library(ITTI From ff531831be954449fcf731cda1423b7a271fa521 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Tue, 1 Jun 2021 14:54:42 +0100 Subject: [PATCH 453/579] Avoid decoding UL-CCCH with all zeros --- openair2/LAYER2/MAC/eNB_scheduler_RA.c | 2 +- openair2/LAYER2/MAC/eNB_scheduler_ulsch.c | 25 ++++++++++++++++++++++- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_RA.c b/openair2/LAYER2/MAC/eNB_scheduler_RA.c index 8a400af1f3..4425df560f 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_RA.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_RA.c @@ -1288,7 +1288,7 @@ initiate_ra_proc(module_id_t module_idP, prach_ParametersListCE_r13 = &ext4_prach->prach_ParametersListCE_r13; } - LOG_D(MAC, + LOG_I(MAC, "[eNB %d][RAPROC] CC_id %d Frame %d, Subframe %d Initiating RA procedure for preamble index %d, timing offset %d\n", module_idP, CC_id, frameP, subframeP, preamble_index, timing_offset); LOG_D(MAC, diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c index c83cc1d9d3..92f85f8b87 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c @@ -303,7 +303,17 @@ rx_sdu(const module_id_t enb_mod_idP, first_rb = ra->msg3_first_rb; - if (sduP == NULL) { // we've got an error on Msg3 + bool no_sig = true; + if (sduP) { + for (int k = 0; k < sdu_lenP; k++) { + if(sduP[k]!=0) { + no_sig = false; + break; + } + } + } + + if (no_sig || sduP == NULL) { // we've got an error on Msg3 LOG_D(MAC, "[eNB %d] CC_id %d, RA %d ULSCH in error in round %d/%d\n", enb_mod_idP, CC_idP, @@ -690,6 +700,19 @@ rx_sdu(const module_id_t enb_mod_idP, break; } + bool no_sig = true; + for (int k = 0; k < sdu_lenP; k++) { + if(sduP[k]!=0) { + no_sig = false; + break; + } + } + + if(no_sig) { + LOG_W(MAC, "No signal\n"); + break; + } + LOG_D(MAC, "[eNB %d][RAPROC] CC_id %d Frame %d, Received CCCH: %x.%x.%x.%x.%x.%x, Terminating RA procedure for UE rnti %x\n", enb_mod_idP, CC_idP, From 22ef918b11190aa40b838cf0ac59268121cb8a8b Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Tue, 1 Jun 2021 18:10:49 +0100 Subject: [PATCH 454/579] Fix removed declaration of "message_p" --- openair2/RRC/NR/rrc_gNB_NGAP.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/RRC/NR/rrc_gNB_NGAP.c b/openair2/RRC/NR/rrc_gNB_NGAP.c index 482f228fdb..44e2651f4d 100644 --- a/openair2/RRC/NR/rrc_gNB_NGAP.c +++ b/openair2/RRC/NR/rrc_gNB_NGAP.c @@ -826,7 +826,7 @@ rrc_gNB_process_NGAP_DOWNLINK_NAS( uint8_t *message_buffer; message_buffer = itti_malloc (TASK_RRC_GNB, TASK_RRC_UE_SIM, length); memcpy (message_buffer, buffer, length); - message_p = itti_alloc_new_message (TASK_RRC_GNB, 0, GNB_RRC_DCCH_DATA_IND); + MessageDef *message_p = itti_alloc_new_message (TASK_RRC_GNB, 0, GNB_RRC_DCCH_DATA_IND); GNB_RRC_DCCH_DATA_IND (message_p).rbid = DCCH; GNB_RRC_DCCH_DATA_IND (message_p).sdu = message_buffer; GNB_RRC_DCCH_DATA_IND (message_p).size = length; From 9068db43e04b029a80e789e7e6ce54d6944d9c84 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Tue, 1 Jun 2021 19:00:07 +0100 Subject: [PATCH 455/579] Update CMakeLists.txt to choose NEW_GTPU for NR binaries, and keep legacy GTPU for LTE --- cmake_targets/CMakeLists.txt | 128 +++++++++++++++++------------------ 1 file changed, 63 insertions(+), 65 deletions(-) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index f444b2311b..7d4489816d 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -320,7 +320,7 @@ if (CUDA_FOUND) set(CUDA_CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${C_FLAGS_PROCESSOR} -Wno-packed-bitfield-compat -fPIC -Wall -fno-strict-aliasing -rdynamic -std=c++11 -D CUDA_FLAG" ) - + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP -D${MKVER} -D CUDA_FLAG" ) @@ -414,7 +414,6 @@ add_boolean_option(UE_AUTOTEST_TRACE False "Activate UE autotest specific logs add_boolean_option(UE_DEBUG_TRACE False "Activate UE debug trace") add_boolean_option(UE_TIMING_TRACE False "Activate UE timing trace") add_boolean_option(DEBUG_CONSOLE False "makes debugging easier, disables stdout/stderr buffering") -add_boolean_option(NEW_GTPU False "NEW_GTP") set (OCP_ITTI ${OPENAIR_DIR}/common/utils/ocp_itti) add_library(ITTI @@ -496,7 +495,7 @@ add_custom_target ( DEPENDS ${NR_RRC_GRAMMAR} ) -add_library(NR_RRC_LIB ${nr_rrc_h} ${nr_rrc_source} +add_library(NR_RRC_LIB ${nr_rrc_h} ${nr_rrc_source} ${OPENAIR2_DIR}/RRC/NR/MESSAGES/asn1_msg.c ) add_dependencies(NR_RRC_LIB nr_rrc_flag) @@ -530,7 +529,7 @@ endif (${RU} STREQUAL 0) add_custom_target ( s1ap_flag ALL ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "S1AP_" -fno-include-deps "${S1AP_C_DIR}" "${S1AP_ASN_DIR}/${S1AP_ASN_FILES}" - DEPENDS "${S1AP_ASN_DIR}/${S1AP_ASN_FILES}" + DEPENDS "${S1AP_ASN_DIR}/${S1AP_ASN_FILES}" ) add_library(S1AP_LIB @@ -585,7 +584,7 @@ file(GLOB NGAP_source ${NGAP_C_DIR}/*.c) add_custom_target ( ngap_flag ALL ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "NGAP_" "-fno-include-deps -findirect-choice" "${NGAP_C_DIR}" "${NGAP_ASN_DIR}/${NGAP_ASN_FILES}" - DEPENDS "${NGAP_ASN_DIR}/${NGAP_ASN_FILES}" + DEPENDS "${NGAP_ASN_DIR}/${NGAP_ASN_FILES}" ) add_library(NGAP_LIB @@ -1504,11 +1503,11 @@ add_dependencies(SCHED_UE_LIB rrc_flag) set(SCHED_SRC_NR_UE ${OPENAIR1_DIR}/SCHED_NR_UE/phy_procedures_nr_ue.c ${OPENAIR1_DIR}/SCHED_NR/phy_procedures_nr_common.c - ${OPENAIR1_DIR}/SCHED_NR_UE/fapi_nr_ue_l1.c + ${OPENAIR1_DIR}/SCHED_NR_UE/fapi_nr_ue_l1.c ${OPENAIR1_DIR}/SCHED_NR_UE/phy_frame_config_nr_ue.c ${OPENAIR1_DIR}/SCHED_NR_UE/harq_nr.c ${OPENAIR1_DIR}/SCHED_NR_UE/pucch_uci_ue_nr.c - ${OPENAIR1_DIR}/SCHED_NR_UE/pucch_power_control_ue_nr.c + ${OPENAIR1_DIR}/SCHED_NR_UE/pucch_power_control_ue_nr.c ) add_library(SCHED_NR_UE_LIB ${SCHED_SRC_NR_UE}) @@ -1818,7 +1817,7 @@ set(PHY_SRC_UE ${PHY_POLARSRC} ${PHY_SMALLBLOCKSRC} ${PHY_NR_CODINGIF} - ${OPENAIR1_DIR}/PHY/NR_TRANSPORT/pucch_rx.c + ${OPENAIR1_DIR}/PHY/NR_TRANSPORT/pucch_rx.c ${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_uci_tools_common.c ) set(PHY_NR_UE_SRC @@ -1997,7 +1996,7 @@ set(NR_RLC_SRC ${OPENAIR2_DIR}/LAYER2/nr_rlc/nr_rlc_sdu.c ${OPENAIR2_DIR}/LAYER2/nr_rlc/nr_rlc_ue_manager.c ) - + set(NR_PDCP_SRC ${OPENAIR2_DIR}/LAYER2/nr_pdcp/nr_pdcp_oai_api.c ${OPENAIR2_DIR}/LAYER2/nr_pdcp/nr_pdcp_ue_manager.c @@ -2030,7 +2029,7 @@ set(L2_SRC ${RRC_DIR}/L2_interface_common.c ${RRC_DIR}/L2_interface_ue.c ) - + set(L2_RRC_SRC ${OPENAIR2_DIR}/LAYER2/openair2_proc.c # ${RRC_DIR}/rrc_UE.c @@ -2076,14 +2075,14 @@ set(L2_SRC_UE ${RRC_DIR}/L2_interface_common.c ${RRC_DIR}/L2_interface_ue.c ) - + set(L2_RRC_SRC_UE ${RRC_DIR}/rrc_UE.c ${RRC_DIR}/rrc_common.c ${RRC_DIR}/L2_interface_common.c ${RRC_DIR}/L2_interface_ue.c - ) - + ) + set(NR_L2_SRC_UE ${NR_RLC_SRC} ${NR_PDCP_SRC} @@ -2141,7 +2140,7 @@ set (MAC_SRC_UE ${MAC_DIR}/rar_tools_ue.c ${MAC_DIR}/config_ue.c ) - + set (MAC_NR_SRC_UE ${NR_UE_PHY_INTERFACE_DIR}/NR_IF_Module.c ${NR_UE_MAC_DIR}/config_ue.c @@ -2213,6 +2212,7 @@ add_library(L2_NR ${MAC_NR_SRC} ${GNB_APP_SRC} ) +target_compile_definitions(L2_NR PUBLIC NEW_GTPU) add_library(L2_LTE_NR ${L2_RRC_SRC} @@ -2220,7 +2220,8 @@ add_library(L2_LTE_NR ${ENB_APP_SRC} ${MCE_APP_SRC} ) - +target_compile_definitions(L2_LTE_NR PUBLIC NEW_GTPU) + add_dependencies(L2_NR rrc_flag nr_rrc_flag s1ap_flag x2_flag) add_library(L2_UE @@ -2267,6 +2268,7 @@ add_library (GTPV1U_OCP ${RRC_DIR}/rrc_eNB_GTPV1U.c ${OPENAIR3_DIR}/ocp-gtpu/gtp_itf.cpp ) +target_compile_definitions(GTPV1U_OCP PUBLIC NEW_GTPU) add_dependencies(GTPV1U_OCP rrc_flag) include_directories(${OPENAIR3_DIR}/ocp-gtp) @@ -2285,12 +2287,6 @@ set (NR_GTPV1U_SRC add_library(NR_GTPV1U ${NR_GTPV1U_SRC}) add_dependencies(NR_GTPV1U rrc_flag) -if (${NEW_GTPU}) -set(GTPV1U GTPV1U_OCP) -else() -set(GTPV1U NR_GTPV1U) -endif() - set (MME_APP_SRC ${OPENAIR3_DIR}/MME_APP/mme_app.c ${OPENAIR3_DIR}/MME_APP/mme_config.c @@ -2762,7 +2758,7 @@ add_library(SIMU_COMMON # Simulation library ########################## -set (SIMUSRC +set (SIMUSRC ${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c ${OPENAIR1_DIR}/SIMULATION/TOOLS/multipath_channel.c ${OPENAIR1_DIR}/SIMULATION/TOOLS/multipath_tv_channel.c @@ -2825,7 +2821,7 @@ add_library(nrscope MODULE ${XFORMS_SOURCE_NR}) target_link_libraries(nrscope ${XFORMS_LIBRARIES}) -add_library(rfsimulator MODULE +add_library(rfsimulator MODULE ${OPENAIR_TARGETS}/ARCH/rfsimulator/simulator.c ${OPENAIR_TARGETS}/ARCH/rfsimulator/apply_channelmod.c ${OPENAIR_TARGETS}/ARCH/rfsimulator/new_channel_sim.c @@ -2833,7 +2829,7 @@ add_library(rfsimulator MODULE ) target_link_libraries(rfsimulator SIMU_COMMON ${ATLAS_LIBRARIES}) -add_library(oai_iqplayer MODULE +add_library(oai_iqplayer MODULE ${OPENAIR_TARGETS}/ARCH/iqplayer/iqplayer_lib.c ) set(CMAKE_MODULE_PATH "${OPENAIR_DIR}/cmake_targets/tools/MODULES" "${CMAKE_MODULE_PATH}") @@ -2903,7 +2899,7 @@ add_executable(measurement_display ${OPENAIR_DIR}/common/utils/threadPool/measurement_display.c) target_link_libraries (measurement_display minimal_lib) -add_executable(test5Gnas +add_executable(test5Gnas ${OPENAIR_DIR}/openair3/TEST/test5Gnas.c ) target_link_libraries (test5Gnas LIB_5GNAS_GNB CONFIG_LIB minimal_lib ) @@ -2947,11 +2943,11 @@ add_dependencies(lte-softmodem rrc_flag s1ap_flag x2_flag oai_iqplayer) target_link_libraries (lte-softmodem -Wl,--start-group - RRC_LIB NR_RRC_LIB S1AP_LIB S1AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB X2AP_LIB X2AP_ENB M3AP_LIB M3AP_ENB ${GTPV1U} SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB SCHED_RU_LIB + RRC_LIB NR_RRC_LIB S1AP_LIB S1AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB X2AP_LIB X2AP_ENB M3AP_LIB M3AP_ENB NR_GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB SCHED_RU_LIB PHY_COMMON PHY PHY_RU LFDS L2 L2_LTE NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB LFDS7 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} ${FSPT_MSG_LIB} ${PROTO_AGENT_LIB} -Wl,--end-group z dl) - + target_link_libraries (lte-softmodem ${LIBXML2_LIBRARIES}) target_link_libraries (lte-softmodem pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES}) target_link_libraries (lte-softmodem ${LIB_LMS_LIBRARIES}) @@ -2990,7 +2986,7 @@ add_dependencies(ocp-enb rrc_flag s1ap_flag x2_flag oai_iqplayer coding params_l target_link_libraries (ocp-enb -Wl,--start-group - RRC_LIB NR_RRC_LIB S1AP_LIB S1AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB X2AP_LIB X2AP_ENB M3AP_LIB M3AP_ENB ${GTPV1U} SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB SCHED_RU_LIB + RRC_LIB NR_RRC_LIB S1AP_LIB S1AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB X2AP_LIB X2AP_ENB M3AP_LIB M3AP_ENB NR_GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB SCHED_RU_LIB PHY_COMMON PHY PHY_RU LFDS L2 L2_LTE NFAPI_COMMON_LIB NFAPI_LIB MISC_NFAPI_LTE_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB LFDS7 SIMU_COMMON ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} ${FSPT_MSG_LIB} ${PROTO_AGENT_LIB} -Wl,--end-group z dl) @@ -3087,7 +3083,7 @@ target_link_libraries (lte-uesoftmodem -Wl,--start-group RRC_LIB NR_RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB F1AP F1AP_LIB - ${GTPV1U} SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON + NR_GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_UE PHY_RU LFDS L2_UE L2_LTE LFDS7 SIMU_COMMON SIMU NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${ATLAS_LIBRARIES} -Wl,--end-group z dl) @@ -3128,10 +3124,11 @@ add_executable(nr-softmodem ${OPENAIR2_DIR}/ENB_APP/flexran_agent_ran_api_to_fix.c ) +target_compile_definitions(nr-softmodem PUBLIC NEW_GTPU) target_link_libraries (nr-softmodem -Wl,--start-group - UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_NR_COMMON PHY_RU LFDS ${GTPV1U} SECU_CN SECU_OSA - ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} RRC_LIB NR_RRC_LIB + UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_NR_COMMON PHY_RU LFDS GTPV1U_OCP SECU_CN SECU_OSA + ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} RRC_LIB NR_RRC_LIB NGAP_LIB NGAP_GNB S1AP_LIB S1AP_ENB L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB X2AP_LIB X2AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB ${PROTO_AGENT_LIB} ${FSPT_MSG_LIB} -Wl,--end-group z dl) @@ -3169,8 +3166,8 @@ add_executable(ocp-gnb target_link_libraries (ocp-gnb -Wl,--start-group - UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_NR_COMMON PHY_RU LFDS ${GTPV1U} SECU_CN SECU_OSA - ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} RRC_LIB NR_RRC_LIB + UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_NR_COMMON PHY_RU LFDS GTPV1U_OCP SECU_CN SECU_OSA + ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} RRC_LIB NR_RRC_LIB NGAP_LIB NGAP_GNB S1AP_LIB S1AP_ENB L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB X2AP_LIB X2AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB SIMU_COMMON -Wl,--end-group z dl) @@ -3248,7 +3245,7 @@ target_link_libraries (dlsim_tm4 pthread m rt ${CONFIG_LIB} ${ATLAS_LIBRARIES} ${T_LIB} ) -add_executable(rftest +add_executable(rftest ${OPENAIR_DIR}/openair1/PHY/TOOLS/calibration_test.c ${OPENAIR_DIR}/openair1/PHY/TOOLS/calibration_scope.c ${OPENAIR_DIR}/common/utils/system.c @@ -3259,7 +3256,7 @@ add_executable(rftest ) target_link_libraries(rftest minimal_lib PHY_NR_COMMON pthread dl m forms ${T_LIB} ) -add_executable(polartest +add_executable(polartest ${OPENAIR1_DIR}/PHY/CODING/TESTBENCH/polartest.c ${OPENAIR_DIR}/common/utils/backtrace.c ${OPENAIR_DIR}/common/utils/nr/nr_common.c @@ -3272,7 +3269,7 @@ target_link_libraries(polartest m pthread ${ATLAS_LIBRARIES} dl ) -add_executable(smallblocktest +add_executable(smallblocktest ${OPENAIR1_DIR}/PHY/CODING/TESTBENCH/smallblocktest.c ${OPENAIR_DIR}/common/utils/backtrace.c ${OPENAIR_DIR}/common/utils/nr/nr_common.c @@ -3290,17 +3287,17 @@ target_link_libraries(smallblocktest # temp_C_flag = CMAKE_C_FLAGS #set(CMAKE_C_FLAGS " ") -set (TEMP_C_FLAG ${CMAKE_C_FLAGS}) +set (TEMP_C_FLAG ${CMAKE_C_FLAGS}) set (CMAKE_C_FLAGS ${CUDA_CMAKE_C_FLAGS}) -set (TEMP_CXX_FLAG ${CMAKE_CXX_FLAGS}) +set (TEMP_CXX_FLAG ${CMAKE_CXX_FLAGS}) set (CMAKE_CXX_FLAGS ${CUDA_CMAKE_CXX_FLAGS}) if (CUDA_FOUND) ################################################### -# For CUDA library +# For CUDA library ################################################### - - CUDA_ADD_LIBRARY(LDPC_CU + + CUDA_ADD_LIBRARY(LDPC_CU ${OPENAIR1_DIR}/PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_decoder_LYC.cu ) CUDA_ADD_CUFFT_TO_TARGET(LDPC_CU) @@ -3310,14 +3307,14 @@ if (CUDA_FOUND) ${SHLIB_LOADER_SOURCES} ) target_link_libraries(ldpctest -ldl - -Wl,--start-group - LDPC_CU UTIL SIMU PHY_NR CONFIG_LIB + -Wl,--start-group + LDPC_CU UTIL SIMU PHY_NR CONFIG_LIB -Wl,--end-group m pthread ${ATLAS_LIBRARIES} dl ) else (CUDA_FOUND) - add_executable(ldpctest + add_executable(ldpctest ${PHY_NR_CODINGIF} ${OPENAIR1_DIR}/PHY/CODING/TESTBENCH/ldpctest.c ${T_SOURCE} @@ -3329,21 +3326,21 @@ set (CMAKE_C_FLAGS ${TEMP_C_FLAG}) set (CMAKE_CXX_FLAGS ${TEMP_CXX_FLAG}) -# add_executable(ldpctest +# add_executable(ldpctest # ${PHY_NR_CODINGIF} # ${OPENAIR1_DIR}/PHY/CODING/TESTBENCH/ldpctest.c # ${T_SOURCE} # ${SHLIB_LOADER_SOURCES} # ) -add_dependencies( ldpctest ldpc_orig ldpc_optim ldpc_optim8seg ldpc ) +add_dependencies( ldpctest ldpc_orig ldpc_optim ldpc_optim8seg ldpc ) target_link_libraries(ldpctest -Wl,--start-group UTIL SIMU_COMMON SIMU PHY_NR PHY_COMMON PHY_NR_COMMON CONFIG_LIB -Wl,--end-group m pthread ${ATLAS_LIBRARIES} dl ) -add_executable(nr_dlschsim - ${OPENAIR1_DIR}/SIMULATION/NR_PHY/dlschsim.c +add_executable(nr_dlschsim + ${OPENAIR1_DIR}/SIMULATION/NR_PHY/dlschsim.c ${OPENAIR_DIR}/common/utils/system.c ${OPENAIR_DIR}/common/utils/nr/nr_common.c ${OPENAIR_DIR}/common/utils/utils.c @@ -3352,13 +3349,13 @@ add_executable(nr_dlschsim ${T_SOURCE} ${SHLIB_LOADER_SOURCES} ) -target_link_libraries(nr_dlschsim +target_link_libraries(nr_dlschsim -Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl ) -add_executable(nr_pbchsim - ${OPENAIR1_DIR}/SIMULATION/NR_PHY/pbchsim.c +add_executable(nr_pbchsim + ${OPENAIR1_DIR}/SIMULATION/NR_PHY/pbchsim.c ${OPENAIR_DIR}/common/utils/system.c ${OPENAIR_DIR}/common/utils/nr/nr_common.c ${OPENAIR_DIR}/common/utils/utils.c @@ -3373,8 +3370,8 @@ target_link_libraries(nr_pbchsim ) #PUCCH ---> Prashanth -add_executable(nr_pucchsim - ${OPENAIR1_DIR}/SIMULATION/NR_PHY/pucchsim.c +add_executable(nr_pucchsim + ${OPENAIR1_DIR}/SIMULATION/NR_PHY/pucchsim.c ${OPENAIR_DIR}/common/utils/backtrace.c ${OPENAIR_DIR}/common/utils/nr/nr_common.c ${OPENAIR_DIR}/common/utils/system.c @@ -3402,7 +3399,7 @@ add_executable(nr_dlsim ${UTIL_SRC} ${T_SOURCE} ${SHLIB_LOADER_SOURCES} - ) + ) target_link_libraries(nr_dlsim -Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_LTE_NR L2_NR HASHTABLE X2AP_ENB X2AP_LIB SECU_CN NGAP_GNB -Wl,--end-group m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} ${OPENSSL_LIBRARIES} dl @@ -3410,7 +3407,7 @@ target_link_libraries(nr_dlsim target_compile_definitions(nr_dlsim PUBLIC -DPHYSICAL_SIMULATOR) add_executable(nr_prachsim - ${OPENAIR1_DIR}/SIMULATION/NR_PHY/prachsim.c + ${OPENAIR1_DIR}/SIMULATION/NR_PHY/prachsim.c ${OPENAIR_DIR}/common/utils/utils.c ${OPENAIR_DIR}/common/utils/system.c ${OPENAIR_DIR}/common/utils/nr/nr_common.c @@ -3422,7 +3419,7 @@ add_executable(nr_prachsim ${UTIL_SRC} ${T_SOURCE} ${SHLIB_LOADER_SOURCES}) -target_link_libraries(nr_prachsim +target_link_libraries(nr_prachsim -Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_RU PHY_NR_UE MAC_NR_COMMON SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_LTE_NR L2_NR HASHTABLE X2AP_ENB X2AP_LIB SECU_CN NGAP_GNB -Wl,--end-group m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} ${OPENSSL_LIBRARIES} dl) @@ -3462,7 +3459,7 @@ target_link_libraries(nr_ulsim target_compile_definitions(nr_ulsim PUBLIC -DPHYSICAL_SIMULATOR) foreach(myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim prachsim syncsim) - + add_executable(${myExe} ${OPENAIR1_DIR}/SIMULATION/LTE_PHY/${myExe}.c ${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c @@ -3482,7 +3479,7 @@ foreach(myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim pr -Wl,--start-group SIMU_COMMON SIMU UTIL SCHED_LIB SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_NR_COMMON PHY PHY_UE PHY_RU LFDS ${ITTI_LIB} LFDS7 -Wl,--end-group pthread m rt ${CONFIG_LIB} ${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${T_LIB} dl ) - + endforeach(myExe) add_executable(test_epc_generate_scenario @@ -3494,7 +3491,7 @@ add_executable(test_epc_generate_scenario ${OPENAIR3_DIR}/S1AP/s1ap_eNB_defs.h ) target_link_libraries (test_epc_generate_scenario - -Wl,--start-group RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB F1AP_LIB F1AP ${GTPV1U} LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB PHY LFDS ${ITTI_LIB} ${MSC_LIB} L2 -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${CONFIG_LIB} + -Wl,--start-group RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB F1AP_LIB F1AP NR_GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB PHY LFDS ${ITTI_LIB} ${MSC_LIB} L2 -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${CONFIG_LIB} ) add_executable(test_epc_play_scenario @@ -3513,7 +3510,7 @@ add_executable(test_epc_play_scenario ) target_include_directories(test_epc_play_scenario PUBLIC /usr/local/share/asn1c) target_link_libraries (test_epc_play_scenario - -Wl,--start-group RRC_LIB S1AP_LIB X2AP_LIB X2AP_ENB M3AP_LIB M3AP_ENB F1AP_LIB F1AP ${GTPV1U} LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB PHY_NR_COMMON PHY_COMMON PHY PHY_UE LFDS ${ITTI_LIB} ${MSC_LIB} -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${CONFIG_LIB} + -Wl,--start-group RRC_LIB S1AP_LIB X2AP_LIB X2AP_ENB M3AP_LIB M3AP_ENB F1AP_LIB F1AP NR_GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB PHY_NR_COMMON PHY_COMMON PHY PHY_UE LFDS ${ITTI_LIB} ${MSC_LIB} -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${CONFIG_LIB} ) @@ -3545,13 +3542,13 @@ endforeach(myExe) if (${T_TRACER}) foreach(i #all "add_executable" definitions (except tests, rb_tool, updatefw) - lte-softmodem lte-uesoftmodem nr-softmodem + lte-softmodem lte-uesoftmodem nr-softmodem nr-uesoftmodem dlsim dlsim_tm4 dlsim_tm7 nr-ittisim ulsim pbchsim scansim mbmssim pdcchsim pucchsim prachsim syncsim nr_ulsim nr_dlsim nr_dlschsim nr_pbchsim nr_pucchsim nr_ulschsim ldpctest polartest smallblocktest cu_test du_test #all "add_library" definitions - ITTI RRC_LIB NR_RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB F1AP_LIB F1AP + ITTI RRC_LIB NR_RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB F1AP_LIB F1AP params_libconfig oai_exmimodevif oai_usrpdevif oai_bladerfdevif oai_lmssdrdevif oai_iqplayer oai_eth_transpro oai_mobipass tcp_bridge tcp_bridge_oai coding FLPT_MSG ASYNC_IF FLEXRAN_AGENT HASHTABLE MSC UTIL OMG_SUMO @@ -3559,7 +3556,7 @@ if (${T_TRACER}) NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_VNF_LIB NFAPI_USER_LIB PHY_COMMON PHY PHY_UE PHY_NR PHY_NR_COMMON PHY_NR_UE PHY_RU PHY_MEX L2 L2_LTE L2_NR L2_LTE_NR L2_UE NR_L2_UE L2_UE_LTE_NR MAC_NR_COMMON MAC_NR MAC_UE_NR NGAP_GNB - CN_UTILS ${GTPV1U} SCTP_CLIENT MME_APP UDP LIB_NAS_UE NB_IoT LFDS LFDS7 SIMU_COMMON SIMU SIMU_ETH OPENAIR0_LIB + CN_UTILS NR_GTPV1U GTPV1U_OCP SCTP_CLIENT MME_APP UDP LIB_NAS_UE NB_IoT LFDS LFDS7 SIMU_COMMON SIMU SIMU_ETH OPENAIR0_LIB ldpc_orig ldpc_optim ldpc_optim8seg ldpc PROTO_AGENT dfts) if (TARGET ${i}) add_dependencies(${i} generate_T) @@ -3664,11 +3661,12 @@ add_executable(nr-ittisim ${CONFIG_SOURCES} ${SHLIB_LOADER_SOURCES} ) +target_compile_definitions(nr-ittisim PUBLIC NEW_GTPU) target_link_libraries (nr-ittisim -Wl,--start-group - UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_NR_COMMON PHY_RU LFDS ${GTPV1U} SECU_CN SECU_OSA - ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7 ${MSC_LIB} ${RAL_LIB} ${NAS_SIM_LIB} RRC_LIB NR_RRC_LIB + UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_NR_COMMON PHY_RU LFDS GTPV1U_OCP SECU_CN SECU_OSA + ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7 ${MSC_LIB} ${RAL_LIB} ${NAS_SIM_LIB} RRC_LIB NR_RRC_LIB NGAP_LIB NGAP_GNB S1AP_LIB S1AP_ENB L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB X2AP_LIB X2AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB ${PROTO_AGENT_LIB} ${FSPT_MSG_LIB} PHY_NR_UE SCHED_NR_UE_LIB NR_L2_UE From 5406a4534d31675b32c83b47606fc13b1f06fb5e Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Wed, 2 Jun 2021 16:29:19 +0100 Subject: [PATCH 456/579] Release RNTI of LTE PHY when RA does not succeed --- openair1/PHY/LTE_TRANSPORT/dci_tools.c | 25 +++++++++++++------ openair1/PHY/LTE_TRANSPORT/transport_common.h | 3 ++- openair2/LAYER2/MAC/eNB_scheduler_ulsch.c | 19 ++++++++++++++ openair2/LAYER2/MAC/mac.h | 2 ++ openair2/RRC/LTE/rrc_eNB.c | 5 ++-- 5 files changed, 43 insertions(+), 11 deletions(-) diff --git a/openair1/PHY/LTE_TRANSPORT/dci_tools.c b/openair1/PHY/LTE_TRANSPORT/dci_tools.c index f11a39e249..61af617d6e 100644 --- a/openair1/PHY/LTE_TRANSPORT/dci_tools.c +++ b/openair1/PHY/LTE_TRANSPORT/dci_tools.c @@ -61,12 +61,17 @@ int find_dlsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type) { if (eNB->dlsch[i][0] == NULL) continue; LOG_D(PHY,"searching for rnti %x : UE index %d=> harq_mask %x, rnti %x, first_free_index %d\n", rnti,i,eNB->dlsch[i][0]->harq_mask,eNB->dlsch[i][0]->rnti,first_free_index); - if ((eNB->dlsch[i][0]->harq_mask >0) && - (eNB->dlsch[i][0]->rnti==rnti)) return i; - else if ((eNB->dlsch[i][0]->harq_mask == 0) && (first_free_index==-1)) first_free_index=i; + if (type == SEARCH_EXIST_RA) { + if (eNB->dlsch[i][0]->rnti==rnti) return i; + } else { + if ((eNB->dlsch[i][0]->harq_mask >0) && + (eNB->dlsch[i][0]->rnti==rnti)) return i; + else if ((eNB->dlsch[i][0]->harq_mask == 0) && (first_free_index==-1)) first_free_index=i; + } + } - if (type == SEARCH_EXIST) + if (type == SEARCH_EXIST_RA || type == SEARCH_EXIST) return -1; if (first_free_index != -1) @@ -83,12 +88,16 @@ int find_ulsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type) { for (int i=0; iulsch[i]==NULL) continue; - if ((eNB->ulsch[i]->harq_mask >0) && - (eNB->ulsch[i]->rnti==rnti)) return i; - else if ((eNB->ulsch[i]->harq_mask == 0) && (first_free_index==-1)) first_free_index=i; + if (type == SEARCH_EXIST_RA) { + if (eNB->ulsch[i]->rnti == rnti) return i; + } else { + if ((eNB->ulsch[i]->harq_mask >0) && + (eNB->ulsch[i]->rnti==rnti)) return i; + else if ((eNB->ulsch[i]->harq_mask == 0) && (first_free_index==-1)) first_free_index=i; + } } - if (type == SEARCH_EXIST) + if (type == SEARCH_EXIST_RA || type == SEARCH_EXIST) return -1; if (first_free_index != -1) diff --git a/openair1/PHY/LTE_TRANSPORT/transport_common.h b/openair1/PHY/LTE_TRANSPORT/transport_common.h index 7c1065736d..93ca7195de 100644 --- a/openair1/PHY/LTE_TRANSPORT/transport_common.h +++ b/openair1/PHY/LTE_TRANSPORT/transport_common.h @@ -93,7 +93,8 @@ #define PMI_2A_R1_1j 2 typedef enum { SEARCH_EXIST=0, - SEARCH_EXIST_OR_FREE + SEARCH_EXIST_OR_FREE, + SEARCH_EXIST_RA } find_type_t; typedef enum { diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c index 92f85f8b87..bb8b0ce487 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c @@ -314,6 +314,11 @@ rx_sdu(const module_id_t enb_mod_idP, } if (no_sig || sduP == NULL) { // we've got an error on Msg3 + + if(no_sig) { + LOG_W(MAC,"No signal in Msg3\n"); + } + LOG_D(MAC, "[eNB %d] CC_id %d, RA %d ULSCH in error in round %d/%d\n", enb_mod_idP, CC_idP, @@ -322,6 +327,20 @@ rx_sdu(const module_id_t enb_mod_idP, (int) mac->common_channels[CC_idP].radioResourceConfigCommon->rach_ConfigCommon.maxHARQ_Msg3Tx); if (ra->msg3_round >= mac->common_channels[CC_idP].radioResourceConfigCommon->rach_ConfigCommon.maxHARQ_Msg3Tx - 1) { + + // Release RNTI of LTE PHY when RA does not succeed + UE_free_list_t *free_list = NULL; + pthread_mutex_lock(&lock_ue_freelist); + free_list = &mac->UE_free_list; + free_list->UE_free_ctrl[free_list->tail_freelist].rnti = current_rnti; + free_list->UE_free_ctrl[free_list->tail_freelist].removeContextFlg = 1; + free_list->UE_free_ctrl[free_list->tail_freelist].raFlag = 1; + free_list->num_UEs++; + mac->UE_release_req.ue_release_request_body.ue_release_request_TLVs_list[mac->UE_release_req.ue_release_request_body.number_of_TLVs].rnti = current_rnti; + mac->UE_release_req.ue_release_request_body.number_of_TLVs++; + free_list->tail_freelist = (free_list->tail_freelist + 1) % (NUMBER_OF_UE_MAX+1); + pthread_mutex_unlock(&lock_ue_freelist); + cancel_ra_proc(enb_mod_idP, CC_idP, frameP, current_rnti); nfapi_hi_dci0_request_t *hi_dci0_req = NULL; uint8_t sf_ahead_dl = ul_subframe2_k_phich(&mac->common_channels[CC_idP], subframeP); diff --git a/openair2/LAYER2/MAC/mac.h b/openair2/LAYER2/MAC/mac.h index 062f613526..cb93c2feb8 100644 --- a/openair2/LAYER2/MAC/mac.h +++ b/openair2/LAYER2/MAC/mac.h @@ -1192,6 +1192,8 @@ typedef struct { rnti_t rnti; ///remove UE context flag boolean_t removeContextFlg; + ///remove RA flag + boolean_t raFlag; } UE_free_ctrl_t; /*! \brief REMOVE UE list used by eNB to order UEs/CC for deleting*/ typedef struct { diff --git a/openair2/RRC/LTE/rrc_eNB.c b/openair2/RRC/LTE/rrc_eNB.c index 789dc6ba48..006f03a63e 100644 --- a/openair2/RRC/LTE/rrc_eNB.c +++ b/openair2/RRC/LTE/rrc_eNB.c @@ -997,6 +997,7 @@ void put_UE_in_freelist(module_id_t mod_id, rnti_t rnti, boolean_t removeFlag) { free_list = &eNB_MAC->UE_free_list; free_list->UE_free_ctrl[free_list->tail_freelist].rnti = rnti; free_list->UE_free_ctrl[free_list->tail_freelist].removeContextFlg = removeFlag; + free_list->UE_free_ctrl[free_list->tail_freelist].raFlag = 0; free_list->num_UEs++; eNB_MAC->UE_release_req.ue_release_request_body.ue_release_request_TLVs_list[eNB_MAC->UE_release_req.ue_release_request_body.number_of_TLVs].rnti = rnti; eNB_MAC->UE_release_req.ue_release_request_body.number_of_TLVs++; @@ -1046,12 +1047,12 @@ void release_UE_in_freeList(module_id_t mod_id) { eNB_PHY = RC.eNB[mod_id][CC_id]; int id; // clean ULSCH entries for rnti - id = find_ulsch(rnti,eNB_PHY,SEARCH_EXIST); + id = find_ulsch(rnti,eNB_PHY,eNB_MAC->UE_free_list.UE_free_ctrl[ue_num].raFlag ? SEARCH_EXIST_RA : SEARCH_EXIST); if (id>=0) clean_eNb_ulsch(eNB_PHY->ulsch[id]); // clean DLSCH entries for rnti - id = find_dlsch(rnti,eNB_PHY,SEARCH_EXIST); + id = find_dlsch(rnti,eNB_PHY,eNB_MAC->UE_free_list.UE_free_ctrl[ue_num].raFlag ? SEARCH_EXIST_RA : SEARCH_EXIST); if (id>=0) clean_eNb_dlsch(eNB_PHY->dlsch[id][0]); From b98cf717e5f3ad17250386692f776d8b185e329d Mon Sep 17 00:00:00 2001 From: rmagueta Date: Wed, 2 Jun 2021 19:11:04 +0100 Subject: [PATCH 457/579] Fix worker_config --- ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf | 2 +- configuration/bladeRF/enb-band7-5mhz.conf | 2 +- doc/testing_gnb_w_cots_ue_resources/enb.conf | 2 +- targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_eNB_band13.conf | 2 +- targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_enb.conf | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf b/ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf index 33aae14dac..8addae1062 100644 --- a/ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf +++ b/ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf @@ -244,7 +244,7 @@ MACRLCs = ( THREAD_STRUCT = ( { parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; - worker_config = "ENABLE"; + worker_config = "WORKER_ENABLE"; } ); diff --git a/configuration/bladeRF/enb-band7-5mhz.conf b/configuration/bladeRF/enb-band7-5mhz.conf index 9156a74fb0..9d19207522 100644 --- a/configuration/bladeRF/enb-band7-5mhz.conf +++ b/configuration/bladeRF/enb-band7-5mhz.conf @@ -238,7 +238,7 @@ MACRLCs = ( THREAD_STRUCT = ( { parallel_config = "PARALLEL_RU_L1_TRX_SPLITaaaaaa"; - worker_config = "ENABLE"; + worker_config = "WORKER_ENABLE"; } ); diff --git a/doc/testing_gnb_w_cots_ue_resources/enb.conf b/doc/testing_gnb_w_cots_ue_resources/enb.conf index 35249aac25..a6bbd98bda 100755 --- a/doc/testing_gnb_w_cots_ue_resources/enb.conf +++ b/doc/testing_gnb_w_cots_ue_resources/enb.conf @@ -238,7 +238,7 @@ MACRLCs = ( THREAD_STRUCT = ( { parallel_config = "PARALLEL_RU_L1_TRX_SPLITaaaaaa"; - worker_config = "ENABLE"; + worker_config = "WORKER_ENABLE"; } ); diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_eNB_band13.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_eNB_band13.conf index 1e32905733..1d8f61e442 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_eNB_band13.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_eNB_band13.conf @@ -240,7 +240,7 @@ MACRLCs = ( THREAD_STRUCT = ( { parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; - worker_config = "ENABLE"; + worker_config = "WORKER_ENABLE"; } ); diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_enb.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_enb.conf index d26ebcd590..7e9a55d924 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_enb.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_enb.conf @@ -241,7 +241,7 @@ MACRLCs = ( THREAD_STRUCT = ( { parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; - worker_config = "ENABLE"; + worker_config = "WORKER_ENABLE"; } ); From 0f98a57162f1838909d3f9b84d2b0e55243da5e5 Mon Sep 17 00:00:00 2001 From: matzakos Date: Wed, 2 Jun 2021 20:57:45 +0200 Subject: [PATCH 458/579] Remove redundant hack to send RRCSetupRequest through DCCH in F1 (CU/DU) mode -Instead RRCSetupRequest is sent from DU to CU through nr_mac_rrc_data_ind()->DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER() and then through F1AP to CU. --- openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c b/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c index 464d010104..a749420ca4 100644 --- a/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c +++ b/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c @@ -48,7 +48,6 @@ extern RAN_CONTEXT_t RC; #include static nr_rlc_ue_manager_t *nr_rlc_ue_manager; -uint8_t ccch_flag = 1; /* TODO: handle time a bit more properly */ static uint64_t nr_rlc_current_time; @@ -491,23 +490,6 @@ rb_found: if (NODE_IS_DU(type) && is_srb == 1) { MessageDef *msg; - if (ccch_flag) { - /* for rfsim, because UE send RRCSetupRequest in SRB1 */ - LOG_I(RLC, "[MSG] RRC Setup Request\n"); - msg = itti_alloc_new_message(TASK_RLC_ENB, 0, F1AP_INITIAL_UL_RRC_MESSAGE); - F1AP_INITIAL_UL_RRC_MESSAGE(msg).gNB_DU_ue_id = 0; - F1AP_INITIAL_UL_RRC_MESSAGE(msg).mcc = RC.nrrrc[0]->configuration.mcc[0]; - F1AP_INITIAL_UL_RRC_MESSAGE(msg).mnc = RC.nrrrc[0]->configuration.mnc[0]; - F1AP_INITIAL_UL_RRC_MESSAGE(msg).mnc_digit_length = RC.nrrrc[0]->configuration.mnc_digit_length[0]; - F1AP_INITIAL_UL_RRC_MESSAGE(msg).nr_cellid = RC.nrrrc[0]->nr_cellid; - F1AP_INITIAL_UL_RRC_MESSAGE(msg).crnti = ue->rnti; - F1AP_INITIAL_UL_RRC_MESSAGE(msg).rrc_container = (unsigned char *)buf; - F1AP_INITIAL_UL_RRC_MESSAGE(msg).rrc_container_length = size; - itti_send_msg_to_task(TASK_DU_F1, ENB_MODULE_ID_TO_INSTANCE(0), msg); - ccch_flag = 0; - return; - } - msg = itti_alloc_new_message(TASK_RLC_ENB, 0, F1AP_UL_RRC_MESSAGE); F1AP_UL_RRC_MESSAGE(msg).rnti = ue->rnti; F1AP_UL_RRC_MESSAGE(msg).srb_id = rb_id; From c9a9c619c7ee979bae70e568ae80b99058e779d8 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Thu, 3 Jun 2021 13:47:38 +0100 Subject: [PATCH 459/579] Add some LOGs --- openair2/F1AP/f1ap_cu_interface_management.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/openair2/F1AP/f1ap_cu_interface_management.c b/openair2/F1AP/f1ap_cu_interface_management.c index 5b29a1bcc3..8a42fef511 100644 --- a/openair2/F1AP/f1ap_cu_interface_management.c +++ b/openair2/F1AP/f1ap_cu_interface_management.c @@ -142,7 +142,7 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance, /* tac */ if (served_cells_item_p->served_Cell_Information.fiveGS_TAC) { OCTET_STRING_TO_INT16(served_cells_item_p->served_Cell_Information.fiveGS_TAC, F1AP_SETUP_REQ(message_p).tac[i]); - LOG_D(F1AP, "F1AP_SETUP_REQ(message_p).tac[%d] %d \n", i, F1AP_SETUP_REQ(message_p).tac[i]); + LOG_I(F1AP, "F1AP_SETUP_REQ(message_p).tac[%d] %d \n", i, F1AP_SETUP_REQ(message_p).tac[i]); } /* - nRCGI */ TBCD_TO_MCC_MNC(&(served_cells_item_p->served_Cell_Information.nRCGI.pLMN_Identity), F1AP_SETUP_REQ(message_p).mcc[i], @@ -153,7 +153,7 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance, // NR cellID BIT_STRING_TO_NR_CELL_IDENTITY(&served_cells_item_p->served_Cell_Information.nRCGI.nRCellIdentity, F1AP_SETUP_REQ(message_p).nr_cellid[i]); - LOG_D(F1AP, "[SCTP %d] Received nRCGI: MCC %d, MNC %d, CELL_ID %llu\n", assoc_id, + LOG_I(F1AP, "[SCTP %d] Received nRCGI: MCC %d, MNC %d, CELL_ID %llu\n", assoc_id, F1AP_SETUP_REQ(message_p).mcc[i], F1AP_SETUP_REQ(message_p).mnc[i], (long long unsigned int)F1AP_SETUP_REQ(message_p).nr_cellid[i]); @@ -324,8 +324,12 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance, for (i=0; icells_to_activate[i].mcc, f1ap_setup_resp->cells_to_activate[i].mnc, f1ap_setup_resp->cells_to_activate[i].mnc_digit_length); + LOG_I(F1AP, "[c3] (cell %d) mcc = %d, mnc = %d, mnc_digit_length = %d, nr_cellid = %lu\n", + i, + f1ap_setup_resp->cells_to_activate[i].mcc, + f1ap_setup_resp->cells_to_activate[i].mnc, + f1ap_setup_resp->cells_to_activate[i].mnc_digit_length, + f1ap_setup_resp->cells_to_activate[i].nr_cellid); F1AP_Cells_to_be_Activated_List_ItemIEs_t *cells_to_be_activated_list_item_ies; cells_to_be_activated_list_item_ies = (F1AP_Cells_to_be_Activated_List_ItemIEs_t *)calloc(1, sizeof(F1AP_Cells_to_be_Activated_List_ItemIEs_t)); @@ -569,8 +573,12 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu for (i=0; inum_cells_to_activate; i++) { - LOG_I(F1AP, "(%d) mcc = %d, mnc = %d, mnc_digit_length = %d\n", - i, f1ap_gnb_cu_configuration_update->cells_to_activate[i].mcc, f1ap_gnb_cu_configuration_update->cells_to_activate[i].mnc, f1ap_gnb_cu_configuration_update->cells_to_activate[i].mnc_digit_length); + LOG_I(F1AP, "[c2] (cell %d) mcc = %d, mnc = %d, mnc_digit_length = %d, nr_cellid = %lu\n", + i, + f1ap_gnb_cu_configuration_update->cells_to_activate[i].mcc, + f1ap_gnb_cu_configuration_update->cells_to_activate[i].mnc, + f1ap_gnb_cu_configuration_update->cells_to_activate[i].mnc_digit_length, + f1ap_gnb_cu_configuration_update->cells_to_activate[i].nr_cellid); F1AP_Cells_to_be_Activated_List_ItemIEs_t *cells_to_be_activated_list_item_ies; cells_to_be_activated_list_item_ies = (F1AP_Cells_to_be_Activated_List_ItemIEs_t *)calloc(1, sizeof(F1AP_Cells_to_be_Activated_List_ItemIEs_t)); From af8d115daec3337919cf4febb1c33f9c0a314b0f Mon Sep 17 00:00:00 2001 From: rmagueta Date: Thu, 3 Jun 2021 16:01:51 +0100 Subject: [PATCH 460/579] Revert more pieces of code for LTE --- openair2/F1AP/f1ap_cu_interface_management.c | 10 +++++++--- openair2/F1AP/f1ap_du_interface_management.c | 8 ++++++++ openair2/F1AP/f1ap_du_rrc_message_transfer.c | 2 +- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/openair2/F1AP/f1ap_cu_interface_management.c b/openair2/F1AP/f1ap_cu_interface_management.c index 8a42fef511..77147fd4d3 100644 --- a/openair2/F1AP/f1ap_cu_interface_management.c +++ b/openair2/F1AP/f1ap_cu_interface_management.c @@ -103,7 +103,11 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance, assoc_id, stream); } - message_p = itti_alloc_new_message(TASK_CU_F1, 0, F1AP_SETUP_REQ); + if(RC.nrrrc) { + message_p = itti_alloc_new_message(TASK_CU_F1, 0, F1AP_SETUP_REQ); + } else { + message_p = itti_alloc_new_message(TASK_RRC_ENB, 0, F1AP_SETUP_REQ); + } /* assoc_id */ F1AP_SETUP_REQ(message_p).assoc_id = assoc_id; @@ -165,7 +169,7 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance, served_cells_item_p->served_Cell_Information.nRCGI.nRCellIdentity.buf[4]); /* - nRPCI */ F1AP_SETUP_REQ(message_p).nr_pci[i] = served_cells_item_p->served_Cell_Information.nRPCI; - LOG_D(F1AP, "F1AP_SETUP_REQ(message_p).nr_pci[%d] %d \n", + LOG_I(F1AP, "F1AP_SETUP_REQ(message_p).nr_pci[%d] %d \n", i, F1AP_SETUP_REQ(message_p).nr_pci[i]); // System Information @@ -548,7 +552,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage; pdu.choice.initiatingMessage = (F1AP_InitiatingMessage_t *)calloc(1, sizeof(F1AP_InitiatingMessage_t)); pdu.choice.initiatingMessage->procedureCode = F1AP_ProcedureCode_id_gNBCUConfigurationUpdate; - pdu.choice.initiatingMessage->criticality = F1AP_Criticality_reject; + pdu.choice.initiatingMessage->criticality = F1AP_Criticality_ignore; pdu.choice.initiatingMessage->value.present = F1AP_InitiatingMessage__value_PR_GNBCUConfigurationUpdate; out = &pdu.choice.initiatingMessage->value.choice.GNBCUConfigurationUpdate; diff --git a/openair2/F1AP/f1ap_du_interface_management.c b/openair2/F1AP/f1ap_du_interface_management.c index f56e37df57..3c2ab63e51 100644 --- a/openair2/F1AP/f1ap_du_interface_management.c +++ b/openair2/F1AP/f1ap_du_interface_management.c @@ -1087,6 +1087,10 @@ int DU_handle_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { + if(!RC.nrrrc) { + return 0; + } + LOG_D(F1AP, "DU_handle_gNB_CU_CONFIGURATION_UPDATE\n"); AssertFatal(pdu->present == F1AP_F1AP_PDU_PR_initiatingMessage, @@ -1250,6 +1254,10 @@ int DU_send_gNB_CU_CONFIGURATION_UPDATE_FAILURE(instance_t instance, int DU_send_gNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance, f1ap_gnb_cu_configuration_update_acknowledge_t *GNBCUConfigurationUpdateAcknowledge) { + if(!RC.nrrrc) { + return 0; + } + AssertFatal(GNBCUConfigurationUpdateAcknowledge->num_cells_failed_to_be_activated == 0, "%d cells failed to activate\n", GNBCUConfigurationUpdateAcknowledge->num_cells_failed_to_be_activated); diff --git a/openair2/F1AP/f1ap_du_rrc_message_transfer.c b/openair2/F1AP/f1ap_du_rrc_message_transfer.c index f1c1684518..dae90d4fa6 100644 --- a/openair2/F1AP/f1ap_du_rrc_message_transfer.c +++ b/openair2/F1AP/f1ap_du_rrc_message_transfer.c @@ -878,7 +878,7 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP, /* optional */ /* c5. DUtoCURRCContainer */ - if (sdu2P) { + if (sdu2P && RC.nrrrc) { ie = (F1AP_InitialULRRCMessageTransferIEs_t *)calloc(1, sizeof(F1AP_InitialULRRCMessageTransferIEs_t)); ie->id = F1AP_ProtocolIE_ID_id_DUtoCURRCContainer; ie->criticality = F1AP_Criticality_reject; From 5724498b1f7d879b3e13e190b84660d220c56787 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Thu, 3 Jun 2021 16:10:04 +0100 Subject: [PATCH 461/579] Temporary hardcoded UhdVersion for CI (to be reverted) --- ci-scripts/cls_oaicitest.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index 1d6165db23..eb557b3487 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -581,7 +581,7 @@ class OaiCiTest(): SSH.command('ifconfig oaitun_ue1', '\$', 4) SSH.command('ifconfig oaitun_ue1', '\$', 4) # ifconfig output is different between ubuntu 16 and ubuntu 18 - result = re.search('inet addr:[0-9]|inet [0-9]', SSH.getBefore()) + result = re.search('inet addr:1|inet 1', SSH.getBefore()) if result is not None: logging.debug('\u001B[1m oaitun_ue1 interface is mounted and configured\u001B[0m') tunnelInterfaceStatus = True @@ -3399,14 +3399,14 @@ class OaiCiTest(): SSH.command('dpkg --list | egrep --color=never libuhd003', '\$', 5) result = re.search('libuhd003:amd64 *(?P[0-9\.]+)', SSH.getBefore()) if result is not None: - UhdVersion = result.group('uhd_version') + UhdVersion = '3.13.0.1-0' logging.debug('UHD Version is: ' + UhdVersion) HTML.UhdVersion[idx]=UhdVersion else: SSH.command('uhd_config_info --version', '\$', 5) result = re.search('UHD (?P[a-zA-Z0-9\.\-]+)', SSH.getBefore()) if result is not None: - UhdVersion = result.group('uhd_version') + UhdVersion = '3.13.0.1-0' logging.debug('UHD Version is: ' + UhdVersion) HTML.UhdVersion[idx]=UhdVersion SSH.command('echo ' + Password + ' | sudo -S uhd_find_devices', '\$', 90) From cc71b3f88a049321b208d2eb83c1e0565986d524 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Thu, 3 Jun 2021 19:09:48 +0100 Subject: [PATCH 462/579] Skip PDCP integrity verification --- openair2/UTIL/OSA/osa_stream_eia.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openair2/UTIL/OSA/osa_stream_eia.c b/openair2/UTIL/OSA/osa_stream_eia.c index 980a4ae3c1..4a6b158058 100644 --- a/openair2/UTIL/OSA/osa_stream_eia.c +++ b/openair2/UTIL/OSA/osa_stream_eia.c @@ -306,6 +306,8 @@ int stream_check_integrity(uint8_t algorithm, stream_cipher_t *stream_cipher, ui return -1; } + // FIXME: Skip PDCP integrity verification, integrity verification is failing... to be fixed later + /* if (memcmp(result, expected, 4) != 0) { LOG_E(OSA, "Mismatch found in integrity for algorithm %u,\n" "\tgot %02x.%02x.%02x.%02x, expecting %02x.%02x.%02x.%02x\n", @@ -313,6 +315,7 @@ int stream_check_integrity(uint8_t algorithm, stream_cipher_t *stream_cipher, ui expected[1], expected[2], expected[3]); return -1; } + */ } /* Integrity verification succeeded */ From cf3e74082ae550c0f5fcf0946818ae9a6849ddc2 Mon Sep 17 00:00:00 2001 From: Luis Pereira Date: Fri, 4 Jun 2021 07:10:01 +0200 Subject: [PATCH 463/579] Revert "Temporary hardcoded UhdVersion for CI (to be reverted)" This reverts commit 5724498b1f7d879b3e13e190b84660d220c56787 --- ci-scripts/cls_oaicitest.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index eb557b3487..1d6165db23 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -581,7 +581,7 @@ class OaiCiTest(): SSH.command('ifconfig oaitun_ue1', '\$', 4) SSH.command('ifconfig oaitun_ue1', '\$', 4) # ifconfig output is different between ubuntu 16 and ubuntu 18 - result = re.search('inet addr:1|inet 1', SSH.getBefore()) + result = re.search('inet addr:[0-9]|inet [0-9]', SSH.getBefore()) if result is not None: logging.debug('\u001B[1m oaitun_ue1 interface is mounted and configured\u001B[0m') tunnelInterfaceStatus = True @@ -3399,14 +3399,14 @@ class OaiCiTest(): SSH.command('dpkg --list | egrep --color=never libuhd003', '\$', 5) result = re.search('libuhd003:amd64 *(?P[0-9\.]+)', SSH.getBefore()) if result is not None: - UhdVersion = '3.13.0.1-0' + UhdVersion = result.group('uhd_version') logging.debug('UHD Version is: ' + UhdVersion) HTML.UhdVersion[idx]=UhdVersion else: SSH.command('uhd_config_info --version', '\$', 5) result = re.search('UHD (?P[a-zA-Z0-9\.\-]+)', SSH.getBefore()) if result is not None: - UhdVersion = '3.13.0.1-0' + UhdVersion = result.group('uhd_version') logging.debug('UHD Version is: ' + UhdVersion) HTML.UhdVersion[idx]=UhdVersion SSH.command('echo ' + Password + ' | sudo -S uhd_find_devices', '\$', 90) From 72654d70b2488b18d99b788df352e6071b67e762 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Fri, 4 Jun 2021 18:24:12 +0100 Subject: [PATCH 464/579] Revert build for ITTI_SIM OR RFSIM_NAS in CMakeLists --- cmake_targets/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 7d4489816d..b8992573cd 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -2565,7 +2565,7 @@ if(NAS_UE) endif() -#if(ITTI_SIM OR RFSIM_NAS) +if(ITTI_SIM OR RFSIM_NAS) set(libnas_ue_api_OBJS ${NAS_SRC}UE/API/USER/at_command.c ${NAS_SRC}UE/API/USER/at_error.c @@ -2691,7 +2691,7 @@ endif() include_directories(${NAS_SRC}UE/EMM/SAP) include_directories(${NAS_SRC}UE/ESM) include_directories(${NAS_SRC}UE/ESM/SAP) -#endif() +endif() # nbiot add_definitions("-DNUMBER_OF_UE_MAX_NB_IoT=16") From 3585d7da7b7feadfe9d898056b3a01af19015abe Mon Sep 17 00:00:00 2001 From: rmagueta Date: Fri, 4 Jun 2021 19:45:32 +0100 Subject: [PATCH 465/579] Temporary assigment of incoming_rb_id in newGtpuCreateTunnel --- openair3/ocp-gtpu/gtp_itf.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair3/ocp-gtpu/gtp_itf.cpp b/openair3/ocp-gtpu/gtp_itf.cpp index 34a5dceeeb..7cb5d83762 100644 --- a/openair3/ocp-gtpu/gtp_itf.cpp +++ b/openair3/ocp-gtpu/gtp_itf.cpp @@ -404,7 +404,7 @@ teid_t newGtpuCreateTunnel(instance_t instance, rnti_t rnti, int incoming_bearer inst->te2ue_mapping[incoming_teid].rnti=rnti; - inst->te2ue_mapping[incoming_teid].incoming_rb_id= incoming_bearer_id; + inst->te2ue_mapping[incoming_teid].incoming_rb_id= outgoing_teid; inst->te2ue_mapping[incoming_teid].callBack=callBack; From 126db8c96a7bb540bc54f4178f9017605c7bff8e Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Fri, 4 Jun 2021 21:37:46 +0100 Subject: [PATCH 466/579] Revert rlc_data_req instead of du_rlc_data_req for LTE --- .../LAYER2/PROTO_AGENT/proto_agent_common.c | 37 ++++++++++--------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/openair2/LAYER2/PROTO_AGENT/proto_agent_common.c b/openair2/LAYER2/PROTO_AGENT/proto_agent_common.c index 1709c387cf..d7ddcf8b12 100644 --- a/openair2/LAYER2/PROTO_AGENT/proto_agent_common.c +++ b/openair2/LAYER2/PROTO_AGENT/proto_agent_common.c @@ -367,23 +367,26 @@ int proto_agent_pdcp_data_req_process(mod_id_t mod_id, const void *params, Proto if (!pdcp_pdu_p) goto error; memcpy(pdcp_pdu_p->data, rlc_data->fsp_pdu->fsp_pdu_data.data, pdcp_pdu_size); - // result = rlc_data_req(&ctxt_pP - // ,srb_flagP - // ,flag_MBMS - // ,rb_idP - // ,muiP - // ,confirmP - // ,pdcp_pdu_size - // ,pdcp_pdu_p - // ,NULL - // ,NULL - // ); - LOG_D(PROTO_AGENT, "proto_agent received pdcp_data_req \n"); - // for (int i = 0; i < pdcp_pdu_size; i++) - // printf(" %2.2x", (unsigned char)pdcp_pdu_p->data[i]); - // printf("\n"); - du_rlc_data_req(&ctxt_pP, srb_flagP, flag_MBMS, rb_idP, muiP, confirmP, pdcp_pdu_size, pdcp_pdu_p); - result = 1; + if (RC.nrrrc) { + LOG_D(PROTO_AGENT, "proto_agent received pdcp_data_req \n"); + // for (int i = 0; i < pdcp_pdu_size; i++) + // printf(" %2.2x", (unsigned char)pdcp_pdu_p->data[i]); + // printf("\n"); + du_rlc_data_req(&ctxt_pP, srb_flagP, flag_MBMS, rb_idP, muiP, confirmP, pdcp_pdu_size, pdcp_pdu_p); + result = 1; + } else { + result = rlc_data_req(&ctxt_pP + ,srb_flagP + ,flag_MBMS + ,rb_idP + ,muiP + ,confirmP + ,pdcp_pdu_size + ,pdcp_pdu_p + ,NULL + ,NULL + ); + } return result; error: From 37cf95c40a42faf76a3146d86d2aa67fed188028 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Fri, 4 Jun 2021 21:48:50 +0100 Subject: [PATCH 467/579] Fix indentation --- .../LAYER2/PROTO_AGENT/proto_agent_common.c | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/openair2/LAYER2/PROTO_AGENT/proto_agent_common.c b/openair2/LAYER2/PROTO_AGENT/proto_agent_common.c index d7ddcf8b12..4572f2d724 100644 --- a/openair2/LAYER2/PROTO_AGENT/proto_agent_common.c +++ b/openair2/LAYER2/PROTO_AGENT/proto_agent_common.c @@ -375,16 +375,16 @@ int proto_agent_pdcp_data_req_process(mod_id_t mod_id, const void *params, Proto du_rlc_data_req(&ctxt_pP, srb_flagP, flag_MBMS, rb_idP, muiP, confirmP, pdcp_pdu_size, pdcp_pdu_p); result = 1; } else { - result = rlc_data_req(&ctxt_pP - ,srb_flagP - ,flag_MBMS - ,rb_idP - ,muiP - ,confirmP - ,pdcp_pdu_size - ,pdcp_pdu_p - ,NULL - ,NULL + result = rlc_data_req(&ctxt_pP + ,srb_flagP + ,flag_MBMS + ,rb_idP + ,muiP + ,confirmP + ,pdcp_pdu_size + ,pdcp_pdu_p + ,NULL + ,NULL ); } return result; From 98e9ee81c5936482fad4e4280c45f52614840034 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Sat, 5 Jun 2021 02:22:38 +0100 Subject: [PATCH 468/579] Fix build --- .../LAYER2/PROTO_AGENT/proto_agent_common.c | 29 +++++-------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/openair2/LAYER2/PROTO_AGENT/proto_agent_common.c b/openair2/LAYER2/PROTO_AGENT/proto_agent_common.c index 4572f2d724..f19d7526fe 100644 --- a/openair2/LAYER2/PROTO_AGENT/proto_agent_common.c +++ b/openair2/LAYER2/PROTO_AGENT/proto_agent_common.c @@ -33,10 +33,9 @@ #include "PHY/phy_extern.h" #include "proto_agent_common.h" #include "common/utils/LOG/log.h" +#include "common/ran_context.h" -#include "RRC/LTE/rrc_extern.h" -#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h" -#include "rrc_eNB_UE_context.h" +extern RAN_CONTEXT_t RC; /* * message primitives @@ -364,7 +363,10 @@ int proto_agent_pdcp_data_req_process(mod_id_t mod_id, const void *params, Proto pdcp_pdu_size = rlc_data->fsp_pdu->fsp_pdu_data.len; pdcp_pdu_p = get_free_mem_block(pdcp_pdu_size, __func__); - if (!pdcp_pdu_p) goto error; + if (!pdcp_pdu_p) { + LOG_E(PROTO_AGENT, "%s: an error occured\n", __FUNCTION__); + return -1; + } memcpy(pdcp_pdu_p->data, rlc_data->fsp_pdu->fsp_pdu_data.data, pdcp_pdu_size); if (RC.nrrrc) { @@ -375,26 +377,9 @@ int proto_agent_pdcp_data_req_process(mod_id_t mod_id, const void *params, Proto du_rlc_data_req(&ctxt_pP, srb_flagP, flag_MBMS, rb_idP, muiP, confirmP, pdcp_pdu_size, pdcp_pdu_p); result = 1; } else { - result = rlc_data_req(&ctxt_pP - ,srb_flagP - ,flag_MBMS - ,rb_idP - ,muiP - ,confirmP - ,pdcp_pdu_size - ,pdcp_pdu_p - ,NULL - ,NULL - ); + result = rlc_data_req(&ctxt_pP, srb_flagP, flag_MBMS, rb_idP, muiP, confirmP, pdcp_pdu_size, pdcp_pdu_p, NULL, NULL); } return result; -error: - - if (pdcp_pdu_p) - free_mem_block(pdcp_pdu_p, __func__); - - LOG_E(PROTO_AGENT, "%s: an error occured\n", __FUNCTION__); - return -1; } int proto_agent_destroy_pdcp_data_ind(Protocol__FlexsplitMessage *msg) { From 98caeb10e1da95c7e34bba6057faa804f7f02f94 Mon Sep 17 00:00:00 2001 From: Roberto Louro Magueta Date: Sat, 5 Jun 2021 09:34:22 +0200 Subject: [PATCH 469/579] Revert "Temporary assigment of incoming_rb_id in newGtpuCreateTunnel" This reverts commit 3585d7da7b7feadfe9d898056b3a01af19015abe --- openair3/ocp-gtpu/gtp_itf.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair3/ocp-gtpu/gtp_itf.cpp b/openair3/ocp-gtpu/gtp_itf.cpp index 7cb5d83762..34a5dceeeb 100644 --- a/openair3/ocp-gtpu/gtp_itf.cpp +++ b/openair3/ocp-gtpu/gtp_itf.cpp @@ -404,7 +404,7 @@ teid_t newGtpuCreateTunnel(instance_t instance, rnti_t rnti, int incoming_bearer inst->te2ue_mapping[incoming_teid].rnti=rnti; - inst->te2ue_mapping[incoming_teid].incoming_rb_id= outgoing_teid; + inst->te2ue_mapping[incoming_teid].incoming_rb_id= incoming_bearer_id; inst->te2ue_mapping[incoming_teid].callBack=callBack; From e72a6798c1a19c37f93b323db1b1ea9a44a47717 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Sat, 5 Jun 2021 14:20:39 +0100 Subject: [PATCH 470/579] Change some LOG levels --- executables/nr-uesoftmodem.c | 8 +- openair1/PHY/INIT/nr_parms.c | 6 +- openair1/PHY/NR_UE_TRANSPORT/dci_nr.c | 4 +- .../PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c | 8 +- openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c | 2 +- openair1/SCHED_NR_UE/pucch_uci_ue_nr.c | 4 +- openair2/COMMON/gtpv1_u_messages_types.h | 12 +- openair2/F1AP/f1ap_cu_interface_management.c | 23 +- openair2/F1AP/f1ap_cu_rrc_message_transfer.c | 8 +- openair2/F1AP/f1ap_decoder.c | 2 +- openair2/F1AP/f1ap_du_interface_management.c | 2 +- openair2/F1AP/f1ap_du_interface_management.h | 6 +- openair2/F1AP/f1ap_encoder.c | 2 +- openair2/GNB_APP/MACRLC_nr_paramdef.h | 8 +- openair2/GNB_APP/gnb_app.c | 2 +- openair2/GNB_APP/gnb_config.c | 7 +- openair2/LAYER2/MAC/eNB_scheduler_RA.c | 2 +- openair2/LAYER2/MAC/eNB_scheduler_ulsch.c | 4 +- openair2/LAYER2/NR_MAC_UE/config_ue.c | 4 +- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 2 +- openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c | 10 +- openair2/LAYER2/NR_MAC_gNB/config.c | 2 +- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c | 14 +- .../LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c | 5 +- .../NR_MAC_gNB/gNB_scheduler_primitives.c | 2 +- openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c | 1 + openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c | 4 +- openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c | 6 +- openair2/RRC/NR/L2_nr_interface.c | 4 +- openair2/RRC/NR/MESSAGES/asn1_msg.c | 62 ++-- openair2/RRC/NR/rrc_gNB.c | 57 ++-- openair2/RRC/NR/rrc_gNB_NGAP.c | 2 +- openair2/RRC/NR/rrc_gNB_nsa.c | 2 +- openair2/RRC/NR_UE/L2_interface_ue.c | 16 +- openair2/RRC/NR_UE/rrc_UE.c | 293 +++++++++--------- openair2/SIMULATION/NR_RRC/itti_sim.c | 2 +- openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c | 2 +- openair3/ocp-gtpu/gtp_itf.cpp | 5 +- 38 files changed, 300 insertions(+), 305 deletions(-) diff --git a/executables/nr-uesoftmodem.c b/executables/nr-uesoftmodem.c index a61f3ea881..1502d95a78 100644 --- a/executables/nr-uesoftmodem.c +++ b/executables/nr-uesoftmodem.c @@ -153,8 +153,9 @@ int transmission_mode = 1; int numerology = 0; int oaisim_flag = 0; int emulate_rf = 0; -uint32_t N_RB_DL=106; -char uecap_xer[1024],uecap_xer_in=0; +uint32_t N_RB_DL = 106; +char uecap_xer_in = 0; +char uecap_xer[1024]; /* see file openair2/LAYER2/MAC/main.c for why abstraction_flag is needed * this is very hackish - find a proper solution @@ -335,8 +336,9 @@ void set_options(int CC_id, PHY_VARS_NR_UE *UE){ LOG_I(PHY, "Set UE frame_type %d\n", fp->frame_type); } - LOG_I(PHY, "Set UE N_RB_DL %d\n", N_RB_DL); fp->N_RB_DL = N_RB_DL; + + LOG_I(PHY, "Set UE N_RB_DL %d\n", N_RB_DL); LOG_I(PHY, "Set UE nb_rx_antenna %d, nb_tx_antenna %d, threequarter_fs %d\n", fp->nb_antennas_rx, fp->nb_antennas_tx, fp->threequarter_fs); } diff --git a/openair1/PHY/INIT/nr_parms.c b/openair1/PHY/INIT/nr_parms.c index 9aabc5e1e9..3a9d8a6c18 100644 --- a/openair1/PHY/INIT/nr_parms.c +++ b/openair1/PHY/INIT/nr_parms.c @@ -261,11 +261,11 @@ int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *fp, LOG_I(PHY, "Initializing frame parms: set nb_antenna_ports_gNB %d, tdd_config, %d, Nid_cell %d\n", fp->nb_antenna_ports_gNB, fp->tdd_config, fp->Nid_cell); - uint64_t dl_bw_khz = (12*config->carrier_config.dl_grid_size[config->ssb_config.scs_common])*(15<ssb_config.scs_common); - LOG_I(PHY,"dl_bw_kHz %lu\n",dl_bw_khz); fp->dl_CarrierFreq = ((dl_bw_khz>>1) + config->carrier_config.dl_frequency)*1000 ; - LOG_I(PHY,"dl_CarrierFreq %lu\n",fp->dl_CarrierFreq); + + LOG_D(PHY,"dl_bw_kHz %lu\n",dl_bw_khz); + LOG_D(PHY,"dl_CarrierFreq %lu\n",fp->dl_CarrierFreq); uint64_t ul_bw_khz = (12*config->carrier_config.ul_grid_size[config->ssb_config.scs_common])*(15<ssb_config.scs_common); fp->ul_CarrierFreq = ((ul_bw_khz>>1) + config->carrier_config.uplink_frequency)*1000 ; diff --git a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c index e46af39ba8..5d4d9df47e 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c @@ -732,8 +732,10 @@ int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue, rel15 = &pdcch_vars->pdcch_config[i]; int n_rb,rb_offset; get_coreset_rballoc(rel15->coreset.frequency_domain_resource,&n_rb,&rb_offset); + LOG_D(PHY,"pdcch coreset: freq %x, n_rb %d, rb_offset %d\n", - rel15->coreset.frequency_domain_resource[0],n_rb,rb_offset); + rel15->coreset.frequency_domain_resource[0],n_rb,rb_offset); + for (int s=rel15->coreset.StartSymbolIndex; s<(rel15->coreset.StartSymbolIndex+rel15->coreset.duration); s++) { LOG_D(PHY,"in nr_pdcch_extract_rbs_single(rxdataF -> rxdataF_ext || dl_ch_estimates -> dl_ch_estimates_ext)\n"); diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c index 1adc81d556..8f3d1987bc 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c @@ -264,13 +264,15 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch, LOG_D(PHY,"ulsch coding nb_rb %d, Nl = %d\n", nb_rb, harq_process->pusch_pdu.nrOfLayers); LOG_D(PHY,"ulsch coding A %d G %d mod_order %d\n", A,G, mod_order); - LOG_D(PHY,"harq_pid %d harq_process->ndi %d, pusch_data.new_data_indicator %d\n",harq_pid,harq_process->ndi,harq_process->pusch_pdu.pusch_data.new_data_indicator); + LOG_D(PHY,"harq_pid %d harq_process->ndi %d, pusch_data.new_data_indicator %d\n", + harq_pid,harq_process->ndi,harq_process->pusch_pdu.pusch_data.new_data_indicator); + if (harq_process->first_tx == 1 || harq_process->ndi != harq_process->pusch_pdu.pusch_data.new_data_indicator) { // this is a new packet #ifdef DEBUG_ULSCH_CODING printf("encoding thinks this is a new packet \n"); #endif - harq_process->first_tx=0; + harq_process->first_tx = 0; ///////////////////////// a---->| add CRC |---->b ///////////////////////// /////////// /* @@ -413,7 +415,7 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch, /////////// /////////////////////////////////////////////////////////////////////////////// - LOG_D(PHY,"setting ndi to %d from pusch_data\n",harq_process->pusch_pdu.pusch_data.new_data_indicator); + LOG_D(PHY,"setting ndi to %d from pusch_data\n", harq_process->pusch_pdu.pusch_data.new_data_indicator); harq_process->ndi = harq_process->pusch_pdu.pusch_data.new_data_indicator; } F = harq_process->F; diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c index 2d750a3456..fae6b5b2e7 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c @@ -147,7 +147,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE, get_num_re_dmrs(pusch_pdu, &nb_dmrs_re_per_rb, &number_dmrs_symbols); LOG_D(PHY,"ulsch %x : start_rb %d bwp_start %d start_sc %d start_symbol %d num_symbols %d cdmgrpsnodata %d num_dmrs %d dmrs_re_per_rb %d\n", - rnti,start_rb,pusch_pdu->bwp_start,start_sc,start_symbol,number_of_symbols,cdm_grps_no_data,number_dmrs_symbols,nb_dmrs_re_per_rb); + rnti,start_rb,pusch_pdu->bwp_start,start_sc,start_symbol,number_of_symbols,cdm_grps_no_data,number_dmrs_symbols,nb_dmrs_re_per_rb); // TbD num_of_mod_symbols is set but never used N_RE_prime = NR_NB_SC_PER_RB*number_of_symbols - nb_dmrs_re_per_rb*number_dmrs_symbols - N_PRB_oh; diff --git a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c index 1dc8145d90..a63829419a 100644 --- a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c +++ b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c @@ -558,7 +558,7 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_ /* use of initial pucch configuration provided by system information 1 */ /***********************************************************************/ if (initial_pucch_id != NB_INITIAL_PUCCH_RESOURCE) { - LOG_I(MAC,"Selecting INITIAL PUCCH Resource\n"); + LOG_D(MAC,"Selecting INITIAL PUCCH Resource\n"); format = initial_pucch_resource[initial_pucch_id].format; starting_symbol_index = initial_pucch_resource[initial_pucch_id].startingSymbolIndex; nb_symbols_total = initial_pucch_resource[initial_pucch_id].nrofSymbols; @@ -989,8 +989,6 @@ uint8_t get_downlink_ack(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_t int V_DAI_m_DL = 0; NR_UE_MAC_INST_t *mac = get_mac_inst(0); - - if (mac->DLbwp[0] && mac->DLbwp[0]->bwp_Dedicated && mac->DLbwp[0]->bwp_Dedicated->pdsch_Config && diff --git a/openair2/COMMON/gtpv1_u_messages_types.h b/openair2/COMMON/gtpv1_u_messages_types.h index 63911d46cb..75df3253f6 100644 --- a/openair2/COMMON/gtpv1_u_messages_types.h +++ b/openair2/COMMON/gtpv1_u_messages_types.h @@ -168,23 +168,23 @@ typedef struct gtpv1u_enb_end_marker_ind_s { uint32_t sdu_size; uint8_t *sdu_p; uint8_t mode; - uint16_t rnti; - uint8_t module_id; + uint16_t rnti; + uint8_t module_id; uint8_t eNB_index; } gtpv1u_enb_end_marker_ind_t; typedef struct { in_addr_t enb_ip_address_for_S1u_S12_S4_up; tcp_udp_port_t enb_port_for_S1u_S12_S4_up; - char addrStr[256]; - char portStr[256]; + char addrStr[256]; + char portStr[256]; } Gtpv1uS1Req; typedef struct { in_addr_t gnb_ip_address_for_NGu_up; tcp_udp_port_t gnb_port_for_NGu_up; - char addrStr[256]; - char portStr[256]; + char addrStr[256]; + char portStr[256]; } Gtpv1uNGReq; typedef struct gtpv1u_gnb_create_tunnel_req_s { rnti_t rnti; diff --git a/openair2/F1AP/f1ap_cu_interface_management.c b/openair2/F1AP/f1ap_cu_interface_management.c index 77147fd4d3..057d0d97a0 100644 --- a/openair2/F1AP/f1ap_cu_interface_management.c +++ b/openair2/F1AP/f1ap_cu_interface_management.c @@ -146,7 +146,7 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance, /* tac */ if (served_cells_item_p->served_Cell_Information.fiveGS_TAC) { OCTET_STRING_TO_INT16(served_cells_item_p->served_Cell_Information.fiveGS_TAC, F1AP_SETUP_REQ(message_p).tac[i]); - LOG_I(F1AP, "F1AP_SETUP_REQ(message_p).tac[%d] %d \n", i, F1AP_SETUP_REQ(message_p).tac[i]); + LOG_D(F1AP, "F1AP_SETUP_REQ(message_p).tac[%d] %d \n", i, F1AP_SETUP_REQ(message_p).tac[i]); } /* - nRCGI */ TBCD_TO_MCC_MNC(&(served_cells_item_p->served_Cell_Information.nRCGI.pLMN_Identity), F1AP_SETUP_REQ(message_p).mcc[i], @@ -157,7 +157,7 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance, // NR cellID BIT_STRING_TO_NR_CELL_IDENTITY(&served_cells_item_p->served_Cell_Information.nRCGI.nRCellIdentity, F1AP_SETUP_REQ(message_p).nr_cellid[i]); - LOG_I(F1AP, "[SCTP %d] Received nRCGI: MCC %d, MNC %d, CELL_ID %llu\n", assoc_id, + LOG_D(F1AP, "[SCTP %d] Received nRCGI: MCC %d, MNC %d, CELL_ID %llu\n", assoc_id, F1AP_SETUP_REQ(message_p).mcc[i], F1AP_SETUP_REQ(message_p).mnc[i], (long long unsigned int)F1AP_SETUP_REQ(message_p).nr_cellid[i]); @@ -169,7 +169,7 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance, served_cells_item_p->served_Cell_Information.nRCGI.nRCellIdentity.buf[4]); /* - nRPCI */ F1AP_SETUP_REQ(message_p).nr_pci[i] = served_cells_item_p->served_Cell_Information.nRPCI; - LOG_I(F1AP, "F1AP_SETUP_REQ(message_p).nr_pci[%d] %d \n", + LOG_D(F1AP, "F1AP_SETUP_REQ(message_p).nr_pci[%d] %d \n", i, F1AP_SETUP_REQ(message_p).nr_pci[i]); // System Information @@ -319,7 +319,7 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance, /* mandatory */ /* c3. cells to be Activated list */ int num_cells_to_activate = f1ap_setup_resp->num_cells_to_activate; - LOG_I(F1AP, "num_cells_to_activate = %d \n", num_cells_to_activate); + LOG_D(F1AP, "num_cells_to_activate = %d \n", num_cells_to_activate); if (num_cells_to_activate >0) { ie = (F1AP_F1SetupResponseIEs_t *)calloc(1, sizeof(F1AP_F1SetupResponseIEs_t)); ie->id = F1AP_ProtocolIE_ID_id_Cells_to_be_Activated_List; @@ -328,7 +328,7 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance, for (i=0; icells_to_activate[i].mcc, f1ap_setup_resp->cells_to_activate[i].mnc, @@ -387,7 +387,7 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance, (const char*)f1ap_setup_resp->cells_to_activate[i].SI_container[sIBtype], f1ap_setup_resp->cells_to_activate[i].SI_container_length[sIBtype]); - LOG_I(F1AP, "f1ap_setup_resp->SI_container_length[%d][%d] = %d \n", i,sIBtype,f1ap_setup_resp->cells_to_activate[i].SI_container_length[sIBtype]); + LOG_D(F1AP, "f1ap_setup_resp->SI_container_length[%d][%d] = %d \n", i,sIBtype,f1ap_setup_resp->cells_to_activate[i].SI_container_length[sIBtype]); ASN_SEQUENCE_ADD(&gNB_CUSystemInformation->sibtypetobeupdatedlist.list,sib_item); } } @@ -577,7 +577,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu for (i=0; inum_cells_to_activate; i++) { - LOG_I(F1AP, "[c2] (cell %d) mcc = %d, mnc = %d, mnc_digit_length = %d, nr_cellid = %lu\n", + LOG_D(F1AP, "[c2] (cell %d) mcc = %d, mnc = %d, mnc_digit_length = %d, nr_cellid = %lu\n", i, f1ap_gnb_cu_configuration_update->cells_to_activate[i].mcc, f1ap_gnb_cu_configuration_update->cells_to_activate[i].mnc, @@ -953,9 +953,10 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu return -1; } - LOG_I(F1AP, "F1AP gNB-CU CONFIGURATION UPDATE : "); - for (int i=0;iassoc_id, buffer, len, 0); return 0; } @@ -971,7 +972,7 @@ int CU_handle_gNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance, uint32_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu) { - LOG_I(F1AP,"Cell Configuration ok (assoc_id %d)\n",assoc_id); + LOG_D(F1AP,"Cell Configuration ok (assoc_id %d)\n",assoc_id); return(0); } diff --git a/openair2/F1AP/f1ap_cu_rrc_message_transfer.c b/openair2/F1AP/f1ap_cu_rrc_message_transfer.c index eebe2a64b2..03cfcc7329 100644 --- a/openair2/F1AP/f1ap_cu_rrc_message_transfer.c +++ b/openair2/F1AP/f1ap_cu_rrc_message_transfer.c @@ -132,10 +132,10 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance, if (RC.nrrrc && RC.nrrrc[GNB_INSTANCE_TO_MODULE_ID(instance)]->node_type == ngran_gNB_CU) { - LOG_I(F1AP, "%s() RRCContainer (CCCH) size %ld: ", __func__, ie->value.choice.RRCContainer.size); - for (int i = 0; i < ie->value.choice.RRCContainer.size; i++) - printf("%02x ", RRC_MAC_CCCH_DATA_IND (message_p).sdu[i]); - printf("\n"); + LOG_D(F1AP, "%s() RRCContainer (CCCH) size %ld: ", __func__, ie->value.choice.RRCContainer.size); + //for (int i = 0; i < ie->value.choice.RRCContainer.size; i++) + // printf("%02x ", RRC_MAC_CCCH_DATA_IND (message_p).sdu[i]); + //printf("\n"); /* DUtoCURRCContainer */ F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_InitialULRRCMessageTransferIEs_t, ie, container, diff --git a/openair2/F1AP/f1ap_decoder.c b/openair2/F1AP/f1ap_decoder.c index 1b35ca6ccf..ac55db7fda 100644 --- a/openair2/F1AP/f1ap_decoder.c +++ b/openair2/F1AP/f1ap_decoder.c @@ -161,7 +161,7 @@ int f1ap_decode_pdu(F1AP_F1AP_PDU_t *pdu, const uint8_t *const buffer, uint32_t 0, 0); - if (1 /*asn1_decoder_xer_print*/) { + if (asn1_decoder_xer_print) { LOG_E(F1AP, "----------------- ASN1 DECODER PRINT START----------------- \n"); xer_fprint(stdout, &asn_DEF_F1AP_F1AP_PDU, pdu); LOG_E(F1AP, "----------------- ASN1 DECODER PRINT END ----------------- \n"); diff --git a/openair2/F1AP/f1ap_du_interface_management.c b/openair2/F1AP/f1ap_du_interface_management.c index 3c2ab63e51..b6ece9b13f 100644 --- a/openair2/F1AP/f1ap_du_interface_management.c +++ b/openair2/F1AP/f1ap_du_interface_management.c @@ -397,7 +397,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) { (const char*)f1ap_du_data->mib[i],//f1ap_du_data->mib, f1ap_du_data->mib_length[i]); - LOG_I(F1AP,"Filling SIB1_message for cell %d, length %d\n",i,f1ap_du_data->sib1_length[i]); + LOG_D(F1AP,"Filling SIB1_message for cell %d, length %d\n",i,f1ap_du_data->sib1_length[i]); OCTET_STRING_fromBuf(&gNB_DU_System_Information->sIB1_message, // sept. 2018 (const char*)f1ap_du_data->sib1[i], f1ap_du_data->sib1_length[i]); diff --git a/openair2/F1AP/f1ap_du_interface_management.h b/openair2/F1AP/f1ap_du_interface_management.h index f15decb6f5..619b725f38 100644 --- a/openair2/F1AP/f1ap_du_interface_management.h +++ b/openair2/F1AP/f1ap_du_interface_management.h @@ -98,17 +98,17 @@ int DU_handle_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, F1AP_F1AP_PDU_t *pdu); int DU_send_gNB_CU_CONFIGURATION_UPDATE_FAILURE(instance_t instance, - f1ap_gnb_cu_configuration_update_failure_t *GNBCUConfigurationUpdateFailure); + f1ap_gnb_cu_configuration_update_failure_t *GNBCUConfigurationUpdateFailure); int DU_send_gNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance, - f1ap_gnb_cu_configuration_update_acknowledge_t *GNBCUConfigurationUpdateAcknowledge); + f1ap_gnb_cu_configuration_update_acknowledge_t *GNBCUConfigurationUpdateAcknowledge); /* * gNB-DU Resource Coordination */ int DU_send_gNB_DU_RESOURCE_COORDINATION_REQUEST(instance_t instance, - F1AP_GNBDUResourceCoordinationRequest_t *GNBDUResourceCoordinationRequest); + F1AP_GNBDUResourceCoordinationRequest_t *GNBDUResourceCoordinationRequest); int DU_handle_gNB_DU_RESOURCE_COORDINATION_RESPONSE(instance_t instance, uint32_t assoc_id, diff --git a/openair2/F1AP/f1ap_encoder.c b/openair2/F1AP/f1ap_encoder.c index 7bafa9e266..6e5f0f4e49 100644 --- a/openair2/F1AP/f1ap_encoder.c +++ b/openair2/F1AP/f1ap_encoder.c @@ -33,7 +33,7 @@ #include "f1ap_common.h" #include "f1ap_encoder.h" -int asn1_encoder_xer_print = 1; +int asn1_encoder_xer_print = 0; /* static inline int f1ap_encode_initiating(f1ap_message *message, diff --git a/openair2/GNB_APP/MACRLC_nr_paramdef.h b/openair2/GNB_APP/MACRLC_nr_paramdef.h index 0dcb4829f4..bf8b32f591 100644 --- a/openair2/GNB_APP/MACRLC_nr_paramdef.h +++ b/openair2/GNB_APP/MACRLC_nr_paramdef.h @@ -84,10 +84,10 @@ {CONFIG_STRING_MACRLC_LOCAL_S_PORTD, NULL, 0, uptr:NULL, defintval:50021, TYPE_UINT, 0}, \ {CONFIG_STRING_MACRLC_REMOTE_S_PORTD, NULL, 0, uptr:NULL, defintval:50021, TYPE_UINT, 0}, \ {CONFIG_STRING_MACRLC_ULSCH_MAX_SLOTS_INACTIVITY, "Maximum number of slots before a UE is scheduled ULSCH due to inactivity", 0, uptr:NULL, defintval:200, TYPE_UINT, 0}, \ -{CONFIG_STRING_MACRLC_PUSCHTARGETSNRX10, NULL, 0, iptr:NULL, defintval:200, TYPE_INT, 0}, \ -{CONFIG_STRING_MACRLC_PUCCHTARGETSNRX10, NULL, 0, iptr:NULL, defintval:150, TYPE_INT, 0}, \ -{CONFIG_STRING_MACRLC_PUCCHFAILURETHRES, NULL, 0, iptr:NULL, defintval:10, TYPE_INT, 0}, \ -{CONFIG_STRING_MACRLC_PUSCHFAILURETHRES, NULL, 0, iptr:NULL, defintval:10, TYPE_INT, 0}, \ +{CONFIG_STRING_MACRLC_PUSCHTARGETSNRX10, NULL, 0, iptr:NULL, defintval:200, TYPE_INT, 0}, \ +{CONFIG_STRING_MACRLC_PUCCHTARGETSNRX10, NULL, 0, iptr:NULL, defintval:150, TYPE_INT, 0}, \ +{CONFIG_STRING_MACRLC_PUCCHFAILURETHRES, NULL, 0, iptr:NULL, defintval:10, TYPE_INT, 0}, \ +{CONFIG_STRING_MACRLC_PUSCHFAILURETHRES, NULL, 0, iptr:NULL, defintval:10, TYPE_INT, 0}, \ } #define MACRLC_CC_IDX 0 #define MACRLC_TRANSPORT_N_PREFERENCE_IDX 1 diff --git a/openair2/GNB_APP/gnb_app.c b/openair2/GNB_APP/gnb_app.c index 0ac8162955..149dde9d73 100644 --- a/openair2/GNB_APP/gnb_app.c +++ b/openair2/GNB_APP/gnb_app.c @@ -140,7 +140,7 @@ static void init_pdcp(void) { uint32_t pdcp_initmask = (IS_SOFTMODEM_NOS1) ? (PDCP_USE_NETLINK_BIT | LINK_ENB_PDCP_TO_IP_DRIVER_BIT) : LINK_ENB_PDCP_TO_GTPV1U_BIT; if (IS_SOFTMODEM_NOS1) { - printf("IS_SOFTMODEM_NOS1 option enabled \n"); + LOG_I(PDCP, "IS_SOFTMODEM_NOS1 option enabled\n"); pdcp_initmask = pdcp_initmask | ENB_NAS_USE_TUN_BIT | SOFTMODEM_NOKRNMOD_BIT; } diff --git a/openair2/GNB_APP/gnb_config.c b/openair2/GNB_APP/gnb_config.c index 1447f4a8bf..a07261493b 100644 --- a/openair2/GNB_APP/gnb_config.c +++ b/openair2/GNB_APP/gnb_config.c @@ -727,7 +727,7 @@ void RCconfig_nr_macrlc() { RC.nrmac[j]->ulsch_max_slots_inactivity = *(MacRLC_ParamList.paramarray[j][MACRLC_ULSCH_MAX_SLOTS_INACTIVITY].uptr); }// for (j=0;j 0 - printf("No %s configuration found \n", CONFIG_STRING_MACRLC_LIST); + LOG_E(PHY,"No %s configuration found\n", CONFIG_STRING_MACRLC_LIST); // AssertFatal (0,"No " CONFIG_STRING_MACRLC_LIST " configuration found"); } @@ -1301,13 +1301,14 @@ int RCconfig_NR_NG(MessageDef *msg_p, uint32_t i) { NGAP_REGISTER_GNB_REQ (msg_p).amf_ip_address[j].ipv4 = 1; NGAP_REGISTER_GNB_REQ (msg_p).amf_ip_address[j].ipv6 = 1; } -/* not in configuration yet ... + /* not in configuration yet ... if (NGParamList.paramarray[l][GNB_AMF_BROADCAST_PLMN_INDEX].iptr) NGAP_REGISTER_GNB_REQ(msg_p).broadcast_plmn_num[l] = NGParamList.paramarray[l][GNB_AMF_BROADCAST_PLMN_INDEX].numelt; else NGAP_REGISTER_GNB_REQ(msg_p).broadcast_plmn_num[l] = 0; -*/ + */ + AssertFatal(NGAP_REGISTER_GNB_REQ(msg_p).broadcast_plmn_num[l] <= NGAP_REGISTER_GNB_REQ(msg_p).num_plmn, "List of broadcast PLMN to be sent to AMF can not be longer than actual " "PLMN list (max %d, but is %d)\n", diff --git a/openair2/LAYER2/MAC/eNB_scheduler_RA.c b/openair2/LAYER2/MAC/eNB_scheduler_RA.c index 4425df560f..8a400af1f3 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_RA.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_RA.c @@ -1288,7 +1288,7 @@ initiate_ra_proc(module_id_t module_idP, prach_ParametersListCE_r13 = &ext4_prach->prach_ParametersListCE_r13; } - LOG_I(MAC, + LOG_D(MAC, "[eNB %d][RAPROC] CC_id %d Frame %d, Subframe %d Initiating RA procedure for preamble index %d, timing offset %d\n", module_idP, CC_id, frameP, subframeP, preamble_index, timing_offset); LOG_D(MAC, diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c index bb8b0ce487..d4f486f761 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c @@ -316,7 +316,7 @@ rx_sdu(const module_id_t enb_mod_idP, if (no_sig || sduP == NULL) { // we've got an error on Msg3 if(no_sig) { - LOG_W(MAC,"No signal in Msg3\n"); + LOG_D(MAC,"No signal in Msg3\n"); } LOG_D(MAC, "[eNB %d] CC_id %d, RA %d ULSCH in error in round %d/%d\n", @@ -728,7 +728,7 @@ rx_sdu(const module_id_t enb_mod_idP, } if(no_sig) { - LOG_W(MAC, "No signal\n"); + LOG_D(MAC, "No signal\n"); break; } diff --git a/openair2/LAYER2/NR_MAC_UE/config_ue.c b/openair2/LAYER2/NR_MAC_UE/config_ue.c index 21e3baa17c..af24add77d 100755 --- a/openair2/LAYER2/NR_MAC_UE/config_ue.c +++ b/openair2/LAYER2/NR_MAC_UE/config_ue.c @@ -314,9 +314,9 @@ void config_common_ue(NR_UE_MAC_INST_t *mac, for (i=0; iprach_config.num_prach_fd_occasions; i++) { cfg->prach_config.num_prach_fd_occasions_list[i].num_prach_fd_occasions = i; if (cfg->prach_config.prach_sequence_length) - cfg->prach_config.num_prach_fd_occasions_list[i].prach_root_sequence_index = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->prach_RootSequenceIndex.choice.l139; + cfg->prach_config.num_prach_fd_occasions_list[i].prach_root_sequence_index = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->prach_RootSequenceIndex.choice.l139; else - cfg->prach_config.num_prach_fd_occasions_list[i].prach_root_sequence_index = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->prach_RootSequenceIndex.choice.l839; + cfg->prach_config.num_prach_fd_occasions_list[i].prach_root_sequence_index = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->prach_RootSequenceIndex.choice.l839; cfg->prach_config.num_prach_fd_occasions_list[i].k1 = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.msg1_FrequencyStart; cfg->prach_config.num_prach_fd_occasions_list[i].prach_zero_corr_conf = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.zeroCorrelationZoneConfig; diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 49b31ddd6b..2bac03fc4f 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -63,7 +63,7 @@ #include "common/utils/LOG/vcd_signal_dumper.h" //#define ENABLE_MAC_PAYLOAD_DEBUG 1 -#define DEBUG_EXTRACT_DCI +//#define DEBUG_EXTRACT_DCI //#define DEBUG_RAR extern uint32_t N_RB_DL; diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c index a6ba9930b2..4a16b2939c 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c @@ -1437,9 +1437,9 @@ static void build_ssb_list(NR_UE_MAC_INST_t *mac) { for (uint8_t bit_nb=7; bit_nb<=7; bit_nb--) { // If SSB is transmitted if ((ssb_positionsInBurst>>bit_nb) & 0x01) { - ssb_list.nb_tx_ssb++; - ssb_list.tx_ssb[ssb_idx].transmitted = true; - LOG_D(NR_MAC,"SSB idx %d transmitted\n", ssb_idx); + ssb_list.nb_tx_ssb++; + ssb_list.tx_ssb[ssb_idx].transmitted = true; + LOG_D(NR_MAC,"SSB idx %d transmitted\n", ssb_idx); } ssb_idx++; } @@ -2072,7 +2072,7 @@ nr_ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP, ulsch_buffer[j] = 0; } - //#if defined(ENABLE_MAC_PAYLOAD_DEBUG) +#if defined(ENABLE_MAC_PAYLOAD_DEBUG) LOG_I(NR_MAC, "Printing UL MAC payload UE side, payload_offset: %d \n", payload_offset); for (int i = 0; i < buflen ; i++) { //harq_process_ul_ue->a[i] = (unsigned char) rand(); @@ -2080,7 +2080,7 @@ nr_ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP, printf("%02x ",(unsigned char)ulsch_buffer[i]); } printf("\n"); - //#endif +#endif return 1; } diff --git a/openair2/LAYER2/NR_MAC_gNB/config.c b/openair2/LAYER2/NR_MAC_gNB/config.c index 45c5103493..3046bde098 100644 --- a/openair2/LAYER2/NR_MAC_gNB/config.c +++ b/openair2/LAYER2/NR_MAC_gNB/config.c @@ -462,7 +462,7 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP, NR_UE_info_t *UE_info = &RC.nrmac[Mod_idP]->UE_info; if (add_ue == 1 && get_softmodem_params()->phy_test) { const int UE_id = add_new_nr_ue(Mod_idP, rnti, CellGroup); - LOG_I(PHY,"Added new UE_id %d/%x with initial CellGroup\n",UE_id,rnti); + LOG_I(NR_MAC,"Added new UE_id %d/%x with initial CellGroup\n",UE_id,rnti); } else if (add_ue == 1 && !get_softmodem_params()->phy_test) { const int CC_id = 0; NR_COMMON_channels_t *cc = &RC.nrmac[Mod_idP]->common_channels[CC_id]; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c index 7024307a78..007f8db669 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c @@ -66,7 +66,7 @@ void dump_mac_stats(gNB_MAC_INST *gNB) NR_UE_info_t *UE_info = &gNB->UE_info; int num = 1; for (int UE_id = UE_info->list.head; UE_id >= 0; UE_id = UE_info->list.next[UE_id]) { - LOG_I(MAC, "UE ID %d RNTI %04x (%d/%d) PH %d dB PCMAX %d dBm\n", + LOG_I(NR_MAC, "UE ID %d RNTI %04x (%d/%d) PH %d dB PCMAX %d dBm\n", UE_id, UE_info->rnti[UE_id], num++, @@ -75,16 +75,16 @@ void dump_mac_stats(gNB_MAC_INST *gNB) UE_info->UE_sched_ctrl[UE_id].pcmax); NR_mac_stats_t *stats = &UE_info->mac_stats[UE_id]; const int avg_rsrp = stats->num_rsrp_meas > 0 ? stats->cumul_rsrp / stats->num_rsrp_meas : 0; - LOG_I(MAC, "UE %d: dlsch_rounds %d/%d/%d/%d, dlsch_errors %d, average RSRP %d (%d meas)\n", + LOG_I(NR_MAC, "UE %d: dlsch_rounds %d/%d/%d/%d, dlsch_errors %d, average RSRP %d (%d meas)\n", UE_id, stats->dlsch_rounds[0], stats->dlsch_rounds[1], stats->dlsch_rounds[2], stats->dlsch_rounds[3], stats->dlsch_errors, avg_rsrp, stats->num_rsrp_meas); stats->num_rsrp_meas = 0; stats->cumul_rsrp = 0 ; - LOG_I(MAC, "UE %d: dlsch_total_bytes %d\n", UE_id, stats->dlsch_total_bytes); + LOG_I(NR_MAC, "UE %d: dlsch_total_bytes %d\n", UE_id, stats->dlsch_total_bytes); const NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; - LOG_I(MAC, "UE %d: ulsch_rounds %d/%d/%d/%d, ulsch_errors %d, PUSCH SNR %2.1f dB, PUCCH SNR %2.1f dB, noise rssi %2.1f dB\n", + LOG_I(NR_MAC, "UE %d: ulsch_rounds %d/%d/%d/%d, ulsch_errors %d, PUSCH SNR %2.1f dB, PUCCH SNR %2.1f dB, noise rssi %2.1f dB\n", UE_id, stats->ulsch_rounds[0], stats->ulsch_rounds[1], stats->ulsch_rounds[2], stats->ulsch_rounds[3], @@ -92,15 +92,15 @@ void dump_mac_stats(gNB_MAC_INST *gNB) (float) sched_ctrl->pusch_snrx10 / 10, (float) sched_ctrl->pucch_snrx10 / 10, (float) (sched_ctrl->raw_rssi - 1280) / 10); - LOG_I(MAC, + LOG_I(NR_MAC, "UE %d: ulsch_total_bytes_scheduled %d, ulsch_total_bytes_received %d\n", UE_id, stats->ulsch_total_bytes_scheduled, stats->ulsch_total_bytes_rx); for (int lc_id = 0; lc_id < 63; lc_id++) { if (stats->lc_bytes_tx[lc_id] > 0) - LOG_D(MAC, "UE %d: LCID %d: %d bytes TX\n", UE_id, lc_id, stats->lc_bytes_tx[lc_id]); + LOG_D(NR_MAC, "UE %d: LCID %d: %d bytes TX\n", UE_id, lc_id, stats->lc_bytes_tx[lc_id]); if (stats->lc_bytes_rx[lc_id] > 0) - LOG_D(MAC, "UE %d: LCID %d: %d bytes RX\n", UE_id, lc_id, stats->lc_bytes_rx[lc_id]); + LOG_D(NR_MAC, "UE %d: LCID %d: %d bytes RX\n", UE_id, lc_id, stats->lc_bytes_rx[lc_id]); } } print_meas(&gNB->eNB_scheduler, "DL & UL scheduling timing stats", NULL, NULL); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index e1b46ccfa3..5850d26f8b 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -998,9 +998,8 @@ void nr_schedule_ue_spec(module_id_t module_id, memset(&dci_payload, 0, sizeof(dci_pdu_rel15_t)); // bwp indicator const int n_dl_bwp = bwp ? UE_info->CellGroup[UE_id]->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.count : 0; - AssertFatal(n_dl_bwp <= 1, - "downlinkBWP_ToAddModList has %d BWP!\n", - n_dl_bwp); + AssertFatal(n_dl_bwp <= 1, "downlinkBWP_ToAddModList has %d BWP!\n", n_dl_bwp); + // as per table 7.3.1.1.2-1 in 38.212 dci_payload.bwp_indicator.val = bwp ? (n_dl_bwp < 4 ? bwp->bwp_Id : bwp->bwp_Id - 1) : 0; if (bwp) AssertFatal(bwp->bwp_Dedicated->pdsch_Config->choice.setup->resourceAllocation == NR_PDSCH_Config__resourceAllocation_resourceAllocationType1, diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index b6f0fd5fe8..3f0baae8c7 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -1822,7 +1822,7 @@ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP, NR_CellGroupConfig_t *CellG for (int i = 0; i < MAX_MOBILES_PER_GNB; i++) { if (UE_info->active[i]) { - LOG_I(NR_MAC,"UE %x is active, skipping\n",rntiP); + LOG_D(NR_MAC,"UE %x is active, skipping\n",rntiP); continue; } int UE_id = i; diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c b/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c index 1d1dd6fcab..ce5065c5cd 100644 --- a/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c +++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c @@ -64,6 +64,7 @@ static void nr_pdcp_entity_recv_pdu(nr_pdcp_entity_t *entity, buffer[2]; header_size = 3; } + /* SRBs always have MAC-I, even if integrity is not active */ if (entity->has_integrity || entity->type == NR_PDCP_SRB) { integrity_size = 4; diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c index fa504bb1bf..7853a4b2bd 100644 --- a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c +++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c @@ -534,7 +534,7 @@ rb_found: memblock = get_free_mem_block(size, __FUNCTION__); memcpy(memblock->data, buf, size); - LOG_I(PDCP, "%s(): (srb %d) calling rlc_data_req size %d\n", __func__, rb_id, size); + LOG_D(PDCP, "%s(): (srb %d) calling rlc_data_req size %d\n", __func__, rb_id, size); //for (i = 0; i < size; i++) printf(" %2.2x", (unsigned char)memblock->data[i]); //printf("\n"); enqueue_rlc_data_req(&ctxt, 0, MBMS_FLAG_NO, rb_id, sdu_id, 0, size, memblock, NULL, NULL); @@ -718,7 +718,7 @@ void pdcp_run(const protocol_ctxt_t *const ctxt_pP) } switch (ITTI_MSG_ID(msg_p)) { case RRC_DCCH_DATA_REQ: - LOG_I(PDCP, "Received RRC_DCCH_DATA_REQ type at PDCP task \n"); + LOG_D(PDCP, "Received RRC_DCCH_DATA_REQ type at PDCP task \n"); PROTOCOL_CTXT_SET_BY_MODULE_ID( &ctxt, RRC_DCCH_DATA_REQ(msg_p).module_id, diff --git a/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c b/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c index a749420ca4..16b16cd44d 100644 --- a/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c +++ b/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c @@ -448,7 +448,7 @@ static void deliver_sdu(void *_ue, nr_rlc_entity_t *entity, char *buf, int size) exit(1); rb_found: - LOG_I(RLC, "%s:%d:%s: delivering SDU (rnti %d is_srb %d rb_id %d) size %d\n", + LOG_D(RLC, "%s:%d:%s: delivering SDU (rnti %d is_srb %d rb_id %d) size %d", __FILE__, __LINE__, __FUNCTION__, ue->rnti, is_srb, rb_id, size); memblock = get_free_mem_block(size, __func__); @@ -640,7 +640,7 @@ static void add_rlc_srb(int rnti, struct NR_SRB_ToAddMod *s, NR_RLC_BearerConfig int t_reassembly; int sn_field_length; - LOG_I(RLC,"Trying to add SRB %d\n",srb_id); + LOG_D(RLC,"Trying to add SRB %d\n",srb_id); if (srb_id != 1 && srb_id != 2) { LOG_E(RLC, "%s:%d:%s: fatal, bad srb id %d\n", __FILE__, __LINE__, __FUNCTION__, srb_id); @@ -707,7 +707,7 @@ static void add_rlc_srb(int rnti, struct NR_SRB_ToAddMod *s, NR_RLC_BearerConfig sn_field_length); nr_rlc_ue_add_srb_rlc_entity(ue, srb_id, nr_rlc_am); - LOG_I(RLC, "%s:%d:%s: added srb %d to UE with RNTI 0x%x\n", __FILE__, __LINE__, __FUNCTION__, srb_id, rnti); + LOG_D(RLC, "%s:%d:%s: added srb %d to UE with RNTI 0x%x\n", __FILE__, __LINE__, __FUNCTION__, srb_id, rnti); } nr_rlc_manager_unlock(nr_rlc_ue_manager); } diff --git a/openair2/RRC/NR/L2_nr_interface.c b/openair2/RRC/NR/L2_nr_interface.c index c381edfec4..2f7da79185 100644 --- a/openair2/RRC/NR/L2_nr_interface.c +++ b/openair2/RRC/NR/L2_nr_interface.c @@ -166,7 +166,7 @@ nr_rrc_data_req( //------------------------------------------------------------------------------ { if(sdu_sizeP == 255) { - LOG_I(NR_RRC,"sdu_sizeP == 255"); + LOG_D(RRC,"sdu_sizeP == 255"); return FALSE; } @@ -332,7 +332,7 @@ int8_t nr_mac_rrc_data_ind(const module_id_t module_idP, int sdu2_len = (enc_rval.encoded+7)/8; if (enc_rval.encoded == -1) { - LOG_I(F1AP,"Could not encoded cellGroupConfig, failed element %s\n",enc_rval.failed_type->name); + LOG_E(F1AP,"Could not encoded cellGroupConfig, failed element %s\n",enc_rval.failed_type->name); exit(-1); } /* do ITTI message */ diff --git a/openair2/RRC/NR/MESSAGES/asn1_msg.c b/openair2/RRC/NR/MESSAGES/asn1_msg.c index d3df245eac..bacb9716b1 100755 --- a/openair2/RRC/NR/MESSAGES/asn1_msg.c +++ b/openair2/RRC/NR/MESSAGES/asn1_msg.c @@ -1197,38 +1197,32 @@ void fill_initial_cellGroupConfig(rnti_t rnti, rlc_BearerConfig->servedRadioBearer->present = NR_RLC_BearerConfig__servedRadioBearer_PR_srb_Identity; rlc_BearerConfig->servedRadioBearer->choice.srb_Identity = 1; rlc_BearerConfig->reestablishRLC = NULL; - //if (0) { - rlc_Config = calloc(1, sizeof(NR_RLC_Config_t)); - rlc_Config->present = NR_RLC_Config_PR_am; - rlc_Config->choice.am = calloc(1, sizeof(*rlc_Config->choice.am)); - rlc_Config->choice.am->dl_AM_RLC.sn_FieldLength = calloc(1, sizeof(NR_SN_FieldLengthAM_t)); - *(rlc_Config->choice.am->dl_AM_RLC.sn_FieldLength) = NR_SN_FieldLengthAM_size12; - rlc_Config->choice.am->dl_AM_RLC.t_Reassembly = NR_T_Reassembly_ms35; - rlc_Config->choice.am->dl_AM_RLC.t_StatusProhibit = NR_T_StatusProhibit_ms0; - rlc_Config->choice.am->ul_AM_RLC.sn_FieldLength = calloc(1, sizeof(NR_SN_FieldLengthAM_t)); - *(rlc_Config->choice.am->ul_AM_RLC.sn_FieldLength) = NR_SN_FieldLengthAM_size12; - rlc_Config->choice.am->ul_AM_RLC.t_PollRetransmit = NR_T_PollRetransmit_ms45; - rlc_Config->choice.am->ul_AM_RLC.pollPDU = NR_PollPDU_infinity; - rlc_Config->choice.am->ul_AM_RLC.pollByte = NR_PollByte_infinity; - rlc_Config->choice.am->ul_AM_RLC.maxRetxThreshold = NR_UL_AM_RLC__maxRetxThreshold_t8; - //} + rlc_Config = calloc(1, sizeof(NR_RLC_Config_t)); + rlc_Config->present = NR_RLC_Config_PR_am; + rlc_Config->choice.am = calloc(1, sizeof(*rlc_Config->choice.am)); + rlc_Config->choice.am->dl_AM_RLC.sn_FieldLength = calloc(1, sizeof(NR_SN_FieldLengthAM_t)); + *(rlc_Config->choice.am->dl_AM_RLC.sn_FieldLength) = NR_SN_FieldLengthAM_size12; + rlc_Config->choice.am->dl_AM_RLC.t_Reassembly = NR_T_Reassembly_ms35; + rlc_Config->choice.am->dl_AM_RLC.t_StatusProhibit = NR_T_StatusProhibit_ms0; + rlc_Config->choice.am->ul_AM_RLC.sn_FieldLength = calloc(1, sizeof(NR_SN_FieldLengthAM_t)); + *(rlc_Config->choice.am->ul_AM_RLC.sn_FieldLength) = NR_SN_FieldLengthAM_size12; + rlc_Config->choice.am->ul_AM_RLC.t_PollRetransmit = NR_T_PollRetransmit_ms45; + rlc_Config->choice.am->ul_AM_RLC.pollPDU = NR_PollPDU_infinity; + rlc_Config->choice.am->ul_AM_RLC.pollByte = NR_PollByte_infinity; + rlc_Config->choice.am->ul_AM_RLC.maxRetxThreshold = NR_UL_AM_RLC__maxRetxThreshold_t8; rlc_BearerConfig->rlc_Config = rlc_Config; - - //if (0) { - logicalChannelConfig = calloc(1, sizeof(NR_LogicalChannelConfig_t)); - logicalChannelConfig->ul_SpecificParameters = calloc(1, sizeof(*logicalChannelConfig->ul_SpecificParameters)); - logicalChannelConfig->ul_SpecificParameters->priority = 1; - logicalChannelConfig->ul_SpecificParameters->prioritisedBitRate = NR_LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_infinity; - logicalChannelGroup = CALLOC(1, sizeof(long)); - *logicalChannelGroup = 0; - logicalChannelConfig->ul_SpecificParameters->logicalChannelGroup = logicalChannelGroup; - logicalChannelConfig->ul_SpecificParameters->schedulingRequestID = CALLOC(1, sizeof(*logicalChannelConfig->ul_SpecificParameters->schedulingRequestID)); - *logicalChannelConfig->ul_SpecificParameters->schedulingRequestID = 0; - logicalChannelConfig->ul_SpecificParameters->logicalChannelSR_Mask = 0; - logicalChannelConfig->ul_SpecificParameters->logicalChannelSR_DelayTimerApplied = 0; - //} + logicalChannelConfig = calloc(1, sizeof(NR_LogicalChannelConfig_t)); + logicalChannelConfig->ul_SpecificParameters = calloc(1, sizeof(*logicalChannelConfig->ul_SpecificParameters)); + logicalChannelConfig->ul_SpecificParameters->priority = 1; + logicalChannelConfig->ul_SpecificParameters->prioritisedBitRate = NR_LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_infinity; + logicalChannelGroup = CALLOC(1, sizeof(long)); + *logicalChannelGroup = 0; + logicalChannelConfig->ul_SpecificParameters->logicalChannelGroup = logicalChannelGroup; + logicalChannelConfig->ul_SpecificParameters->schedulingRequestID = CALLOC(1, sizeof(*logicalChannelConfig->ul_SpecificParameters->schedulingRequestID)); + *logicalChannelConfig->ul_SpecificParameters->schedulingRequestID = 0; + logicalChannelConfig->ul_SpecificParameters->logicalChannelSR_Mask = 0; + logicalChannelConfig->ul_SpecificParameters->logicalChannelSR_DelayTimerApplied = 0; rlc_BearerConfig->mac_LogicalChannelConfig = logicalChannelConfig; - ASN_SEQUENCE_ADD(&cellGroupConfig->rlc_BearerToAddModList->list, rlc_BearerConfig); // SRB2 @@ -1460,9 +1454,9 @@ uint8_t do_NR_SecurityModeCommand( dl_dcch_msg.message.choice.c1->choice.securityModeCommand->criticalExtensions.choice.securityModeCommand->securityConfigSMC.securityAlgorithmConfig.integrityProtAlgorithm = integrityProtAlgorithm; -// if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { + if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { xer_fprint(stdout, &asn_DEF_NR_DL_DCCH_Message, (void *)&dl_dcch_msg); -// } + } enc_rval = uper_encode_to_buffer(&asn_DEF_NR_DL_DCCH_Message, NULL, @@ -1920,8 +1914,8 @@ do_NR_DLInformationTransfer( encoded = uper_encode_to_new_buffer (&asn_DEF_NR_DL_DCCH_Message, NULL, (void *) &dl_dcch_msg, (void **)buffer); AssertFatal(encoded > 0,"ASN1 message encoding failed (%s, %ld)!\n", "DLInformationTransfer", encoded); - LOG_I(NR_RRC,"DLInformationTransfer Encoded %zd bytes\n", encoded); - for (int i=0;iue_context.rnti); #ifndef ITTI_SIM - LOG_I(NR_RRC,"Configuring PDCP DRBs/SRBs for UE %x\n",ue_context_pP->ue_context.rnti); + LOG_D(NR_RRC,"Configuring PDCP DRBs/SRBs for UE %x\n",ue_context_pP->ue_context.rnti); nr_rrc_pdcp_config_asn1_req(ctxt_pP, SRB_configList, // NULL, @@ -1277,7 +1277,7 @@ rrc_gNB_process_RRCReconfigurationComplete( ue_context_pP->ue_context.masterCellGroup->rlc_BearerToAddModList); /* Refresh SRBs/DRBs */ if (!NODE_IS_CU(RC.nrrrc[ctxt_pP->module_id]->node_type)) { - LOG_I(NR_RRC,"Configuring RLC DRBs/SRBs for UE %x\n",ue_context_pP->ue_context.rnti); + LOG_D(NR_RRC,"Configuring RLC DRBs/SRBs for UE %x\n",ue_context_pP->ue_context.rnti); nr_rrc_rlc_config_asn1_req(ctxt_pP, SRB_configList, // NULL, DRB_configList, @@ -2179,8 +2179,10 @@ rrc_gNB_decode_dcch( LOG_D(NR_RRC, PROTOCOL_NR_RRC_CTXT_UE_FMT" Decoding UL-DCCH Message\n", PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP)); - for (int i=0;ibuf); - free(NR_RRC_MAC_CCCH_DATA_IND(msg_p).du_to_cu_rrc_container); + free(NR_RRC_MAC_CCCH_DATA_IND(msg_p).du_to_cu_rrc_container->buf); + free(NR_RRC_MAC_CCCH_DATA_IND(msg_p).du_to_cu_rrc_container); } + break; /* Messages from PDCP */ @@ -3087,14 +3093,14 @@ rrc_gNB_generate_SecurityModeCommand( GNB_RRC_DCCH_DATA_IND (message_p).size = size; itti_send_msg_to_task (TASK_RRC_UE_SIM, ctxt_pP->instance, message_p); #else - LOG_I(NR_RRC,"calling rrc_data_req :securityModeCommand\n"); + LOG_D(NR_RRC,"calling rrc_data_req :securityModeCommand\n"); nr_rrc_data_req(ctxt_pP, - DCCH, - rrc_gNB_mui++, - SDU_CONFIRM_NO, - size, - buffer, - PDCP_TRANSMISSION_MODE_CONTROL); + DCCH, + rrc_gNB_mui++, + SDU_CONFIRM_NO, + size, + buffer, + PDCP_TRANSMISSION_MODE_CONTROL); #endif break; @@ -3169,14 +3175,13 @@ rrc_gNB_generate_UECapabilityEnquiry( GNB_RRC_DCCH_DATA_IND (message_p).size = size; itti_send_msg_to_task (TASK_RRC_UE_SIM, ctxt_pP->instance, message_p); #else - nr_rrc_data_req( - ctxt_pP, - DCCH, - rrc_gNB_mui++, - SDU_CONFIRM_NO, - size, - buffer, - PDCP_TRANSMISSION_MODE_CONTROL); + nr_rrc_data_req(ctxt_pP, + DCCH, + rrc_gNB_mui++, + SDU_CONFIRM_NO, + size, + buffer, + PDCP_TRANSMISSION_MODE_CONTROL); #endif break; diff --git a/openair2/RRC/NR/rrc_gNB_NGAP.c b/openair2/RRC/NR/rrc_gNB_NGAP.c index 44e2651f4d..619880da59 100644 --- a/openair2/RRC/NR/rrc_gNB_NGAP.c +++ b/openair2/RRC/NR/rrc_gNB_NGAP.c @@ -686,7 +686,7 @@ rrc_gNB_process_security( /* Save security parameters */ ue_context_pP->ue_context.security_capabilities = *security_capabilities_pP; // translation - LOG_I(NR_RRC, + LOG_D(NR_RRC, "[gNB %d] NAS security_capabilities.encryption_algorithms %u AS ciphering_algorithm %lu NAS security_capabilities.integrity_algorithms %u AS integrity_algorithm %u\n", ctxt_pP->module_id, ue_context_pP->ue_context.security_capabilities.nRencryption_algorithms, diff --git a/openair2/RRC/NR/rrc_gNB_nsa.c b/openair2/RRC/NR/rrc_gNB_nsa.c index c7be5f30f3..e18895e0bd 100644 --- a/openair2/RRC/NR/rrc_gNB_nsa.c +++ b/openair2/RRC/NR/rrc_gNB_nsa.c @@ -350,7 +350,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_ rrc_mac_config_req_gNB(rrc->module_id, rrc->carrier.ssb_SubcarrierOffset, rrc->carrier.pdsch_AntennaPorts, - rrc->carrier.pusch_AntennaPorts, + rrc->carrier.pusch_AntennaPorts, rrc->carrier.servingcellconfigcommon, 1, // add_ue flag ue_context_p->ue_id_rnti, diff --git a/openair2/RRC/NR_UE/L2_interface_ue.c b/openair2/RRC/NR_UE/L2_interface_ue.c index a601698e56..5c9293dcf9 100644 --- a/openair2/RRC/NR_UE/L2_interface_ue.c +++ b/openair2/RRC/NR_UE/L2_interface_ue.c @@ -83,7 +83,7 @@ nr_mac_rrc_data_ind_ue( case CCCH: if (pdu_len>0) { - LOG_I(NR_RRC,"[UE %d] Received SDU for CCCH on SRB %u from gNB %d\n",module_id,channel & RAB_OFFSET,gNB_index); + LOG_T(NR_RRC,"[UE %d] Received SDU for CCCH on SRB %u from gNB %d\n",module_id,channel & RAB_OFFSET,gNB_index); MessageDef *message_p; int msg_sdu_size = CCCH_SDU_SIZE; @@ -129,13 +129,12 @@ int8_t nr_mac_rrc_data_req_ue(const module_id_t Mod_idP, //NR_UE_rrc_inst[Mod_idP].Info[gNB_id].T300_active = 1; //NR_UE_rrc_inst[Mod_idP].Info[gNB_id].T300_cnt = 0; - LOG_I(NR_RRC, "nr_mac_rrc_data_req_ue: Payload size = %i\n", NR_UE_rrc_inst[Mod_idP].Srb0[gNB_id].Tx_buffer.payload_size); + LOG_D(NR_RRC, "nr_mac_rrc_data_req_ue: Payload size = %i\n", NR_UE_rrc_inst[Mod_idP].Srb0[gNB_id].Tx_buffer.payload_size); memcpy(buffer_pP, (uint8_t*)NR_UE_rrc_inst[Mod_idP].Srb0[gNB_id].Tx_buffer.Payload, NR_UE_rrc_inst[Mod_idP].Srb0[gNB_id].Tx_buffer.payload_size); for(int i = 0; iframe; diff --git a/openair2/RRC/NR_UE/rrc_UE.c b/openair2/RRC/NR_UE/rrc_UE.c index b24e13e0dd..cb8eca9504 100644 --- a/openair2/RRC/NR_UE/rrc_UE.c +++ b/openair2/RRC/NR_UE/rrc_UE.c @@ -567,7 +567,7 @@ int8_t nr_rrc_ue_decode_NR_BCCH_BCH_Message( buffer_len ); if ((dec_rval.code != RC_OK) || (dec_rval.consumed == 0)) { - LOG_I(NR_RRC,"NR_BCCH_BCH decode error\n"); + LOG_E(NR_RRC,"NR_BCCH_BCH decode error\n"); // free the memory SEQUENCE_free( &asn_DEF_NR_BCCH_BCH_Message, (void *)bcch_message, 1 ); return -1; @@ -1194,7 +1194,7 @@ int8_t nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message( NR_UE_rrc_inst[module_id].ra_trigger = INITIAL_ACCESS_FROM_RRC_IDLE; // TODO: remove flag after full RA procedures implemented // get_softmodem_params()->do_ra = 1; - LOG_I(PHY,"Setting state to NR_RRC_SI_RECEIVED\n"); + LOG_D(PHY,"Setting state to NR_RRC_SI_RECEIVED\n"); nr_rrc_set_state (module_id, NR_RRC_SI_RECEIVED); } // take ServingCellConfigCommon and configure L1/L2 @@ -1255,11 +1255,12 @@ nr_rrc_ue_process_masterCellGroup( { NR_CellGroupConfig_t *cellGroupConfig=NULL; uper_decode(NULL, - &asn_DEF_NR_CellGroupConfig, //might be added prefix later - (void **)&cellGroupConfig, - (uint8_t *)masterCellGroup->buf, - masterCellGroup->size, 0, 0); + &asn_DEF_NR_CellGroupConfig, //might be added prefix later + (void **)&cellGroupConfig, + (uint8_t *)masterCellGroup->buf, + masterCellGroup->size, 0, 0); xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, (const void*)cellGroupConfig); + if( cellGroupConfig->spCellConfig != NULL && cellGroupConfig->spCellConfig->reconfigurationWithSync != NULL){ //TODO (perform Reconfiguration with sync according to 5.3.5.5.2) //TODO (resume all suspended radio bearers and resume SCG transmission for all radio bearers, if suspended) @@ -1293,7 +1294,7 @@ nr_rrc_ue_process_masterCellGroup( else NR_UE_rrc_inst[ctxt_pP->module_id].cell_group_config = cellGroupConfig; } - LOG_I(RRC,"Sending CellGroupConfig to MAC\n"); + LOG_D(RRC,"Sending CellGroupConfig to MAC\n"); nr_rrc_mac_config_req_ue(ctxt_pP->module_id,0,0,NULL,NULL,cellGroupConfig,NULL); //TODO (configure the SpCell as specified in 5.3.5.5.7) } @@ -1351,18 +1352,18 @@ static void rrc_ue_generate_RRCSetupComplete( "[FRAME %05d][RRC_UE][MOD %02d][][--- PDCP_DATA_REQ/%d Bytes (RRCSetupComplete to gNB %d MUI %d) --->][PDCP][MOD %02d][RB %02d]\n", ctxt_pP->frame, ctxt_pP->module_id+NB_RN_INST, size, gNB_index, nr_rrc_mui, ctxt_pP->module_id+NB_eNB_INST, DCCH); - for (int i=0;irnti; - rrc_data_req_ue( - ctxt_pP, - DCCH, - nr_rrc_mui++, - SDU_CONFIRM_NO, - size, - buffer, - PDCP_TRANSMISSION_MODE_CONTROL); + rrc_data_req_ue(ctxt_pP, + DCCH, + nr_rrc_mui++, + SDU_CONFIRM_NO, + size, + buffer, + PDCP_TRANSMISSION_MODE_CONTROL); + #ifdef ITTI_SIM MessageDef *message_p; uint8_t *message_buffer; @@ -1382,7 +1383,7 @@ int8_t nr_rrc_ue_decode_ccch( const protocol_ctxt_t *const ctxt_pP, const NR_SRB asn_dec_rval_t dec_rval; int rval=0; VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_CCCH, VCD_FUNCTION_IN); - LOG_I(RRC,"[NR UE%d] Decoding DL-CCCH message (%d bytes), State %d\n",ctxt_pP->module_id,Srb_info->Rx_buffer.payload_size, + LOG_D(RRC,"[NR UE%d] Decoding DL-CCCH message (%d bytes), State %d\n",ctxt_pP->module_id,Srb_info->Rx_buffer.payload_size, NR_UE_rrc_inst[ctxt_pP->module_id].Info[gNB_index].State); dec_rval = uper_decode(NULL, &asn_DEF_NR_DL_CCCH_Message, @@ -1390,9 +1391,9 @@ int8_t nr_rrc_ue_decode_ccch( const protocol_ctxt_t *const ctxt_pP, const NR_SRB (uint8_t *)Srb_info->Rx_buffer.Payload, 100,0,0); - //if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { + if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { xer_fprint(stdout,&asn_DEF_NR_DL_CCCH_Message,(void *)dl_ccch_msg); - //} + } if ((dec_rval.code != RC_OK) && (dec_rval.consumed==0)) { LOG_E(RRC,"[UE %d] Frame %d : Failed to decode DL-CCCH-Message (%zu bytes)\n",ctxt_pP->module_id,ctxt_pP->frame,dec_rval.consumed); @@ -1592,19 +1593,19 @@ int8_t nr_rrc_ue_decode_ccch( const protocol_ctxt_t *const ctxt_pP, const NR_SRB { switch (*securityModeCommand->criticalExtensions.choice.securityModeCommand->securityConfigSMC.securityAlgorithmConfig.integrityProtAlgorithm) { case NR_IntegrityProtAlgorithm_nia1: - LOG_I(NR_RRC,"[UE %d] Integrity protection algorithm is set to nia1\n",ctxt_pP->module_id); - securityMode |= 1 << 5; - break; + LOG_I(NR_RRC,"[UE %d] Integrity protection algorithm is set to nia1\n",ctxt_pP->module_id); + securityMode |= 1 << 5; + break; case NR_IntegrityProtAlgorithm_nia2: - LOG_I(NR_RRC,"[UE %d] Integrity protection algorithm is set to nia2\n",ctxt_pP->module_id); - securityMode |= 1 << 6; - break; + LOG_I(NR_RRC,"[UE %d] Integrity protection algorithm is set to nia2\n",ctxt_pP->module_id); + securityMode |= 1 << 6; + break; default: - LOG_I(NR_RRC,"[UE %d] Integrity protection algorithm is set to none\n",ctxt_pP->module_id); - securityMode |= 0x70 ; - break; + LOG_I(NR_RRC,"[UE %d] Integrity protection algorithm is set to none\n",ctxt_pP->module_id); + securityMode |= 0x70 ; + break; } NR_UE_rrc_inst[ctxt_pP->module_id].integrityProtAlgorithm = @@ -1633,8 +1634,7 @@ int8_t nr_rrc_ue_decode_ccch( const protocol_ctxt_t *const ctxt_pP, const NR_SRB pdcp_t *pdcp_p = NULL; hash_key_t key = HASHTABLE_NOT_A_KEY_VALUE; hashtable_rc_t h_rc; - key = PDCP_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, - ctxt_pP->enb_flag, DCCH, SRB_FLAG_YES); + key = PDCP_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, DCCH, SRB_FLAG_YES); h_rc = hashtable_get(pdcp_coll_p, key, (void **) &pdcp_p); if (h_rc == HASH_TABLE_OK) { @@ -1662,12 +1662,11 @@ int8_t nr_rrc_ue_decode_ccch( const protocol_ctxt_t *const ctxt_pP, const NR_SRB if (securityMode != 0xff) { pdcp_config_set_security(ctxt_pP, pdcp_p, 0, 0, - NR_UE_rrc_inst[ctxt_pP->module_id].cipheringAlgorithm - | (NR_UE_rrc_inst[ctxt_pP->module_id].integrityProtAlgorithm << 4), - kRRCenc, kRRCint, kUPenc); + NR_UE_rrc_inst[ctxt_pP->module_id].cipheringAlgorithm + | (NR_UE_rrc_inst[ctxt_pP->module_id].integrityProtAlgorithm << 4), + kRRCenc, kRRCint, kUPenc); } else { - LOG_I(NR_RRC, "skipped pdcp_config_set_security() as securityMode == 0x%02x", - securityMode); + LOG_I(NR_RRC, "skipped pdcp_config_set_security() as securityMode == 0x%02x", securityMode); } } else { LOG_I(NR_RRC, "Could not get PDCP instance where key=0x%ld\n", key); @@ -1682,10 +1681,10 @@ int8_t nr_rrc_ue_decode_ccch( const protocol_ctxt_t *const ctxt_pP, const NR_SRB LOG_I(NR_RRC,"[UE %d] SFN/SF %d/%d: Receiving from SRB1 (DL-DCCH), encoding securityModeComplete (gNB %d), rrc_TransactionIdentifier: %ld\n", ctxt_pP->module_id,ctxt_pP->frame, ctxt_pP->subframe, gNB_index, securityModeCommand->rrc_TransactionIdentifier); enc_rval = uper_encode_to_buffer(&asn_DEF_NR_UL_DCCH_Message, - NULL, - (void *)&ul_dcch_msg, - buffer, - 100); + NULL, + (void *)&ul_dcch_msg, + buffer, + 100); AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %jd)!\n", enc_rval.failed_type->name, enc_rval.encoded); @@ -1713,14 +1712,13 @@ int8_t nr_rrc_ue_decode_ccch( const protocol_ctxt_t *const ctxt_pP, const NR_SRB GNB_RRC_DCCH_DATA_IND (message_p).size = (enc_rval.encoded + 7) / 8; itti_send_msg_to_task (TASK_RRC_GNB_SIM, ctxt_pP->instance, message_p); #else - rrc_data_req_ue ( - ctxt_pP, - DCCH, - nr_rrc_mui++, - SDU_CONFIRM_NO, - (enc_rval.encoded + 7) / 8, - buffer, - PDCP_TRANSMISSION_MODE_CONTROL); + rrc_data_req_ue (ctxt_pP, + DCCH, + nr_rrc_mui++, + SDU_CONFIRM_NO, + (enc_rval.encoded + 7) / 8, + buffer, + PDCP_TRANSMISSION_MODE_CONTROL); #endif } else LOG_W(NR_RRC,"securityModeCommand->criticalExtensions.present (%d) != NR_SecurityModeCommand__criticalExtensions_PR_securityModeCommand\n", @@ -1757,13 +1755,13 @@ int8_t nr_rrc_ue_decode_ccch( const protocol_ctxt_t *const ctxt_pP, const NR_SRB module_id, NR_UE_rrc_inst[module_id].Srb0[gNB_index].Tx_buffer.payload_size, gNB_index); for (i=0; imeasObjectToRemoveList != NULL) { for (i = 0; i < measConfig->measObjectToRemoveList->list.count; i++) { - ind = *measConfig->measObjectToRemoveList->list.array[i]; - free(NR_UE_rrc_inst[ctxt_pP->module_id].MeasObj[gNB_index][ind-1]); + ind = *measConfig->measObjectToRemoveList->list.array[i]; + free(NR_UE_rrc_inst[ctxt_pP->module_id].MeasObj[gNB_index][ind-1]); } } @@ -1894,10 +1892,10 @@ nr_rrc_ue_establish_srb2( ind = measConfig->measObjectToAddModList->list.array[i]->measObjectId; if (NR_UE_rrc_inst[ctxt_pP->module_id].MeasObj[gNB_index][ind-1]) { - LOG_D(NR_RRC, "Modifying measurement object %ld\n",ind); - memcpy((char *)NR_UE_rrc_inst[ctxt_pP->module_id].MeasObj[gNB_index][ind-1], - (char *)measObj, - sizeof(NR_MeasObjectToAddMod_t)); + LOG_D(NR_RRC, "Modifying measurement object %ld\n",ind); + memcpy((char *)NR_UE_rrc_inst[ctxt_pP->module_id].MeasObj[gNB_index][ind-1], + (char *)measObj, + sizeof(NR_MeasObjectToAddMod_t)); } else { LOG_I(NR_RRC, "Adding measurement object %ld\n", ind); @@ -1913,8 +1911,8 @@ nr_rrc_ue_establish_srb2( if (measConfig->reportConfigToRemoveList != NULL) { for (i = 0; i < measConfig->reportConfigToRemoveList->list.count; i++) { - ind = *measConfig->reportConfigToRemoveList->list.array[i]; - free(NR_UE_rrc_inst[ctxt_pP->module_id].ReportConfig[gNB_index][ind-1]); + ind = *measConfig->reportConfigToRemoveList->list.array[i]; + free(NR_UE_rrc_inst[ctxt_pP->module_id].ReportConfig[gNB_index][ind-1]); } } @@ -1925,23 +1923,23 @@ nr_rrc_ue_establish_srb2( reportConfig = measConfig->reportConfigToAddModList->list.array[i]; if (NR_UE_rrc_inst[ctxt_pP->module_id].ReportConfig[gNB_index][ind-1]) { - LOG_I(NR_RRC, "Modifying Report Configuration %ld\n", ind-1); - memcpy((char *)NR_UE_rrc_inst[ctxt_pP->module_id].ReportConfig[gNB_index][ind-1], - (char *)measConfig->reportConfigToAddModList->list.array[i], - sizeof(NR_ReportConfigToAddMod_t)); + LOG_I(NR_RRC, "Modifying Report Configuration %ld\n", ind-1); + memcpy((char *)NR_UE_rrc_inst[ctxt_pP->module_id].ReportConfig[gNB_index][ind-1], + (char *)measConfig->reportConfigToAddModList->list.array[i], + sizeof(NR_ReportConfigToAddMod_t)); } else { - LOG_D(NR_RRC,"Adding Report Configuration %ld %p \n", ind-1, measConfig->reportConfigToAddModList->list.array[i]); - if (reportConfig->reportConfig.present == NR_ReportConfigToAddMod__reportConfig_PR_reportConfigNR) { - NR_UE_rrc_inst[ctxt_pP->module_id].ReportConfig[gNB_index][ind-1] = measConfig->reportConfigToAddModList->list.array[i]; - } + LOG_D(NR_RRC,"Adding Report Configuration %ld %p \n", ind-1, measConfig->reportConfigToAddModList->list.array[i]); + if (reportConfig->reportConfig.present == NR_ReportConfigToAddMod__reportConfig_PR_reportConfigNR) { + NR_UE_rrc_inst[ctxt_pP->module_id].ReportConfig[gNB_index][ind-1] = measConfig->reportConfigToAddModList->list.array[i]; + } } } } if (measConfig->measIdToRemoveList != NULL) { for (i = 0; i < measConfig->measIdToRemoveList->list.count; i++) { - ind = *measConfig->measIdToRemoveList->list.array[i]; - free(NR_UE_rrc_inst[ctxt_pP->module_id].MeasId[gNB_index][ind-1]); + ind = *measConfig->measIdToRemoveList->list.array[i]; + free(NR_UE_rrc_inst[ctxt_pP->module_id].MeasId[gNB_index][ind-1]); } } @@ -1950,13 +1948,13 @@ nr_rrc_ue_establish_srb2( ind = measConfig->measIdToAddModList->list.array[i]->measId; if (NR_UE_rrc_inst[ctxt_pP->module_id].MeasId[gNB_index][ind-1]) { - LOG_D(NR_RRC, "Modifying Measurement ID %ld\n",ind-1); - memcpy((char *)NR_UE_rrc_inst[ctxt_pP->module_id].MeasId[gNB_index][ind-1], - (char *)measConfig->measIdToAddModList->list.array[i], - sizeof(NR_MeasIdToAddMod_t)); + LOG_D(NR_RRC, "Modifying Measurement ID %ld\n",ind-1); + memcpy((char *)NR_UE_rrc_inst[ctxt_pP->module_id].MeasId[gNB_index][ind-1], + (char *)measConfig->measIdToAddModList->list.array[i], + sizeof(NR_MeasIdToAddMod_t)); } else { - LOG_D(NR_RRC, "Adding Measurement ID %ld %p\n", ind-1, measConfig->measIdToAddModList->list.array[i]); - NR_UE_rrc_inst[ctxt_pP->module_id].MeasId[gNB_index][ind-1] = measConfig->measIdToAddModList->list.array[i]; + LOG_D(NR_RRC, "Adding Measurement ID %ld %p\n", ind-1, measConfig->measIdToAddModList->list.array[i]); + NR_UE_rrc_inst[ctxt_pP->module_id].MeasId[gNB_index][ind-1] = measConfig->measIdToAddModList->list.array[i]; } } } @@ -2011,10 +2009,8 @@ nr_rrc_ue_establish_srb2( if (radioBearerConfig->srb_ToAddModList != NULL) { if (radioBearerConfig->securityConfig != NULL) { if (*radioBearerConfig->securityConfig->keyToUse == NR_SecurityConfig__keyToUse_master) { - NR_UE_rrc_inst[ctxt_pP->module_id].cipheringAlgorithm = - radioBearerConfig->securityConfig->securityAlgorithmConfig->cipheringAlgorithm; - NR_UE_rrc_inst[ctxt_pP->module_id].integrityProtAlgorithm = - *radioBearerConfig->securityConfig->securityAlgorithmConfig->integrityProtAlgorithm; + NR_UE_rrc_inst[ctxt_pP->module_id].cipheringAlgorithm = radioBearerConfig->securityConfig->securityAlgorithmConfig->cipheringAlgorithm; + NR_UE_rrc_inst[ctxt_pP->module_id].integrityProtAlgorithm = *radioBearerConfig->securityConfig->securityAlgorithmConfig->integrityProtAlgorithm; } } @@ -2318,40 +2314,39 @@ nr_rrc_ue_establish_srb2( itti_send_msg_to_task(TASK_NAS_UE, ctxt_pP->instance, msg_p); break; case NR_DL_DCCH_MessageType__c1_PR_ueCapabilityEnquiry: - LOG_I(NR_RRC, "[UE %d] Received Capability Enquiry (gNB %d)\n", - ctxt_pP->module_id,gNB_indexP); - nr_rrc_ue_process_ueCapabilityEnquiry( - ctxt_pP, - dl_dcch_msg->message.choice.c1->choice.ueCapabilityEnquiry, - gNB_indexP); - break; + LOG_I(NR_RRC, "[UE %d] Received Capability Enquiry (gNB %d)\n", ctxt_pP->module_id,gNB_indexP); + nr_rrc_ue_process_ueCapabilityEnquiry( + ctxt_pP, + dl_dcch_msg->message.choice.c1->choice.ueCapabilityEnquiry, + gNB_indexP); + break; case NR_DL_DCCH_MessageType__c1_PR_rrcReestablishment: - LOG_I(NR_RRC, - "[UE%d] Frame %d : Logical Channel DL-DCCH (SRB1), Received RRCReestablishment\n", - ctxt_pP->module_id, - ctxt_pP->frame); - nr_rrc_ue_generate_rrcReestablishmentComplete( - ctxt_pP, - dl_dcch_msg->message.choice.c1->choice.rrcReestablishment, - gNB_indexP); - break; + LOG_I(NR_RRC, + "[UE%d] Frame %d : Logical Channel DL-DCCH (SRB1), Received RRCReestablishment\n", + ctxt_pP->module_id, + ctxt_pP->frame); + nr_rrc_ue_generate_rrcReestablishmentComplete( + ctxt_pP, + dl_dcch_msg->message.choice.c1->choice.rrcReestablishment, + gNB_indexP); + break; case NR_DL_DCCH_MessageType__c1_PR_dlInformationTransfer: { - NR_DLInformationTransfer_t *dlInformationTransfer = dl_dcch_msg->message.choice.c1->choice.dlInformationTransfer; + NR_DLInformationTransfer_t *dlInformationTransfer = dl_dcch_msg->message.choice.c1->choice.dlInformationTransfer; - if (dlInformationTransfer->criticalExtensions.present - == NR_DLInformationTransfer__criticalExtensions_PR_dlInformationTransfer) { - /* This message hold a dedicated info NAS payload, forward it to NAS */ - NR_DedicatedNAS_Message_t *dedicatedNAS_Message = - dlInformationTransfer->criticalExtensions.choice.dlInformationTransfer->dedicatedNAS_Message; + if (dlInformationTransfer->criticalExtensions.present + == NR_DLInformationTransfer__criticalExtensions_PR_dlInformationTransfer) { + /* This message hold a dedicated info NAS payload, forward it to NAS */ + NR_DedicatedNAS_Message_t *dedicatedNAS_Message = + dlInformationTransfer->criticalExtensions.choice.dlInformationTransfer->dedicatedNAS_Message; - MessageDef *msg_p; - msg_p = itti_alloc_new_message(TASK_RRC_NRUE, 0, NAS_DOWNLINK_DATA_IND); - NAS_DOWNLINK_DATA_IND(msg_p).UEid = ctxt_pP->module_id; // TODO set the UEid to something else ? - NAS_DOWNLINK_DATA_IND(msg_p).nasMsg.length = dedicatedNAS_Message->size; - NAS_DOWNLINK_DATA_IND(msg_p).nasMsg.data = dedicatedNAS_Message->buf; - itti_send_msg_to_task(TASK_NAS_NRUE, ctxt_pP->instance, msg_p); - } + MessageDef *msg_p; + msg_p = itti_alloc_new_message(TASK_RRC_NRUE, 0, NAS_DOWNLINK_DATA_IND); + NAS_DOWNLINK_DATA_IND(msg_p).UEid = ctxt_pP->module_id; // TODO set the UEid to something else ? + NAS_DOWNLINK_DATA_IND(msg_p).nasMsg.length = dedicatedNAS_Message->size; + NAS_DOWNLINK_DATA_IND(msg_p).nasMsg.data = dedicatedNAS_Message->buf; + itti_send_msg_to_task(TASK_NAS_NRUE, ctxt_pP->instance, msg_p); + } } break; @@ -2366,15 +2361,15 @@ nr_rrc_ue_establish_srb2( case NR_DL_DCCH_MessageType__c1_PR_counterCheck: break; case NR_DL_DCCH_MessageType__c1_PR_securityModeCommand: - LOG_I(NR_RRC, "[UE %d] Received securityModeCommand (gNB %d)\n", - ctxt_pP->module_id, gNB_indexP); - nr_rrc_ue_process_securityModeCommand( - ctxt_pP, - dl_dcch_msg->message.choice.c1->choice.securityModeCommand, - gNB_indexP); + LOG_I(NR_RRC, "[UE %d] Received securityModeCommand (gNB %d)\n", + ctxt_pP->module_id, gNB_indexP); + nr_rrc_ue_process_securityModeCommand( + ctxt_pP, + dl_dcch_msg->message.choice.c1->choice.securityModeCommand, + gNB_indexP); - break; - } + break; + } } return 0; } @@ -2397,48 +2392,48 @@ nr_rrc_ue_establish_srb2( switch (ITTI_MSG_ID(msg_p)) { case TERMINATE_MESSAGE: - LOG_W(NR_RRC, " *** Exiting RRC thread\n"); - itti_exit_task (); - break; + LOG_W(NR_RRC, " *** Exiting RRC thread\n"); + itti_exit_task (); + break; case MESSAGE_TEST: - LOG_D(NR_RRC, "[UE %d] Received %s\n", ue_mod_id, ITTI_MSG_NAME (msg_p)); - break; + LOG_D(NR_RRC, "[UE %d] Received %s\n", ue_mod_id, ITTI_MSG_NAME (msg_p)); + break; case NR_RRC_MAC_BCCH_DATA_IND: - LOG_D(NR_RRC, "[UE %d] Received %s: frameP %d, gNB %d\n", ue_mod_id, ITTI_MSG_NAME (msg_p), - NR_RRC_MAC_BCCH_DATA_IND (msg_p).frame, NR_RRC_MAC_BCCH_DATA_IND (msg_p).gnb_index); - PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, ue_mod_id, GNB_FLAG_NO, NOT_A_RNTI, NR_RRC_MAC_BCCH_DATA_IND (msg_p).frame, 0,NR_RRC_MAC_BCCH_DATA_IND (msg_p).gnb_index); - nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message (ctxt.module_id, - NR_RRC_MAC_BCCH_DATA_IND (msg_p).gnb_index, - NR_RRC_MAC_BCCH_DATA_IND (msg_p).sdu, - NR_RRC_MAC_BCCH_DATA_IND (msg_p).sdu_size, - NR_RRC_MAC_BCCH_DATA_IND (msg_p).rsrq, - NR_RRC_MAC_BCCH_DATA_IND (msg_p).rsrp); - break; + LOG_D(NR_RRC, "[UE %d] Received %s: frameP %d, gNB %d\n", ue_mod_id, ITTI_MSG_NAME (msg_p), + NR_RRC_MAC_BCCH_DATA_IND (msg_p).frame, NR_RRC_MAC_BCCH_DATA_IND (msg_p).gnb_index); + PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, ue_mod_id, GNB_FLAG_NO, NOT_A_RNTI, NR_RRC_MAC_BCCH_DATA_IND (msg_p).frame, 0,NR_RRC_MAC_BCCH_DATA_IND (msg_p).gnb_index); + nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message (ctxt.module_id, + NR_RRC_MAC_BCCH_DATA_IND (msg_p).gnb_index, + NR_RRC_MAC_BCCH_DATA_IND (msg_p).sdu, + NR_RRC_MAC_BCCH_DATA_IND (msg_p).sdu_size, + NR_RRC_MAC_BCCH_DATA_IND (msg_p).rsrq, + NR_RRC_MAC_BCCH_DATA_IND (msg_p).rsrp); + break; case NR_RRC_MAC_CCCH_DATA_IND: - LOG_I(NR_RRC, "[UE %d] RNTI %x Received %s: frameP %d, gNB %d\n", - ue_mod_id, - NR_RRC_MAC_CCCH_DATA_IND (msg_p).rnti, - ITTI_MSG_NAME (msg_p), - NR_RRC_MAC_CCCH_DATA_IND (msg_p).frame, - NR_RRC_MAC_CCCH_DATA_IND (msg_p).gnb_index); - srb_info_p = &NR_UE_rrc_inst[ue_mod_id].Srb0[NR_RRC_MAC_CCCH_DATA_IND (msg_p).gnb_index]; - memcpy (srb_info_p->Rx_buffer.Payload, NR_RRC_MAC_CCCH_DATA_IND (msg_p).sdu, - NR_RRC_MAC_CCCH_DATA_IND (msg_p).sdu_size); - srb_info_p->Rx_buffer.payload_size = NR_RRC_MAC_CCCH_DATA_IND (msg_p).sdu_size; - PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, instance, GNB_FLAG_NO, NR_RRC_MAC_CCCH_DATA_IND (msg_p).rnti, NR_RRC_MAC_CCCH_DATA_IND (msg_p).frame, 0); - // PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, ue_mod_id, GNB_FLAG_NO, NR_RRC_MAC_CCCH_DATA_IND (msg_p).rnti, NR_RRC_MAC_CCCH_DATA_IND (msg_p).frame, 0, NR_RRC_MAC_CCCH_DATA_IND (msg_p).gnb_index); - nr_rrc_ue_decode_ccch (&ctxt, - srb_info_p, - NR_RRC_MAC_CCCH_DATA_IND (msg_p).gnb_index); - break; + LOG_D(NR_RRC, "[UE %d] RNTI %x Received %s: frameP %d, gNB %d\n", + ue_mod_id, + NR_RRC_MAC_CCCH_DATA_IND (msg_p).rnti, + ITTI_MSG_NAME (msg_p), + NR_RRC_MAC_CCCH_DATA_IND (msg_p).frame, + NR_RRC_MAC_CCCH_DATA_IND (msg_p).gnb_index); + srb_info_p = &NR_UE_rrc_inst[ue_mod_id].Srb0[NR_RRC_MAC_CCCH_DATA_IND (msg_p).gnb_index]; + memcpy (srb_info_p->Rx_buffer.Payload, NR_RRC_MAC_CCCH_DATA_IND (msg_p).sdu, + NR_RRC_MAC_CCCH_DATA_IND (msg_p).sdu_size); + srb_info_p->Rx_buffer.payload_size = NR_RRC_MAC_CCCH_DATA_IND (msg_p).sdu_size; + PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, instance, GNB_FLAG_NO, NR_RRC_MAC_CCCH_DATA_IND (msg_p).rnti, NR_RRC_MAC_CCCH_DATA_IND (msg_p).frame, 0); + // PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, ue_mod_id, GNB_FLAG_NO, NR_RRC_MAC_CCCH_DATA_IND (msg_p).rnti, NR_RRC_MAC_CCCH_DATA_IND (msg_p).frame, 0, NR_RRC_MAC_CCCH_DATA_IND (msg_p).gnb_index); + nr_rrc_ue_decode_ccch (&ctxt, + srb_info_p, + NR_RRC_MAC_CCCH_DATA_IND (msg_p).gnb_index); + break; /* PDCP messages */ case NR_RRC_DCCH_DATA_IND: PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, NR_RRC_DCCH_DATA_IND (msg_p).module_id, GNB_FLAG_NO, NR_RRC_DCCH_DATA_IND (msg_p).rnti, NR_RRC_DCCH_DATA_IND (msg_p).frame, 0,NR_RRC_DCCH_DATA_IND (msg_p).gNB_index); - LOG_I(NR_RRC, "[UE %d] Received %s: frameP %d, DCCH %d, gNB %d\n", + LOG_D(NR_RRC, "[UE %d] Received %s: frameP %d, DCCH %d, gNB %d\n", NR_RRC_DCCH_DATA_IND (msg_p).module_id, ITTI_MSG_NAME (msg_p), NR_RRC_DCCH_DATA_IND (msg_p).frame, diff --git a/openair2/SIMULATION/NR_RRC/itti_sim.c b/openair2/SIMULATION/NR_RRC/itti_sim.c index bb39f53135..0cd022217d 100644 --- a/openair2/SIMULATION/NR_RRC/itti_sim.c +++ b/openair2/SIMULATION/NR_RRC/itti_sim.c @@ -416,7 +416,7 @@ int create_tasks_nrue(uint32_t ue_nb) { return -1; } - LOG_I(NR_RRC,"create TASK_NAS_NRUE\n"); + LOG_D(NR_RRC,"create TASK_NAS_NRUE\n"); if (itti_create_task (TASK_NAS_NRUE, nas_nrue_task, NULL) < 0) { LOG_E(NR_RRC, "Create task for NAS UE failed\n"); return -1; diff --git a/openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c b/openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c index 11c41394eb..0d962cad7d 100644 --- a/openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c +++ b/openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c @@ -59,7 +59,7 @@ extern "C" { #endif -#define LOG_GTPU 1 +//#define LOG_GTPU 1 /*--------------------------------------------------------------------------* * P R I V A T E F U N C T I O N S * *--------------------------------------------------------------------------*/ diff --git a/openair3/ocp-gtpu/gtp_itf.cpp b/openair3/ocp-gtpu/gtp_itf.cpp index 34a5dceeeb..0ff4d79b9a 100644 --- a/openair3/ocp-gtpu/gtp_itf.cpp +++ b/openair3/ocp-gtpu/gtp_itf.cpp @@ -436,7 +436,7 @@ teid_t newGtpuCreateTunnel(instance_t instance, rnti_t rnti, int incoming_bearer tmp->outgoing_port=port; tmp->teid_outgoing= outgoing_teid; pthread_mutex_unlock(&globGtp.gtp_lock); - LOG_I(GTPU, "Created tunnel for RNTI %x, bearer: %d/%d teid for DL: %x, teid for UL %x\n", + LOG_D(GTPU, "Created tunnel for RNTI %x, bearer: %d/%d teid for DL: %x, teid for UL %x\n", rnti, outgoing_bearer_id, incoming_bearer_id, tmp->teid_incoming, @@ -576,8 +576,7 @@ int newGtpuDeleteTunnel(instance_t instance, rnti_t rnti) { inst->ue2te_mapping.erase(it); pthread_mutex_unlock(&globGtp.gtp_lock); - LOG_I(GTPU, "Deleted all tunnels for RNTI %d (%d tunnels deleted)\n", - rnti, nb); + LOG_I(GTPU, "Deleted all tunnels for RNTI %d (%d tunnels deleted)\n", rnti, nb); return !GTPNOK; } From e8655d680ae6eea31b014ff132e1c4d8106378dd Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Sun, 6 Jun 2021 13:19:33 +0100 Subject: [PATCH 471/579] Update SA documentation in RUNMODEM.md --- doc/RUNMODEM.md | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/doc/RUNMODEM.md b/doc/RUNMODEM.md index 8d84646e07..dc7a982310 100644 --- a/doc/RUNMODEM.md +++ b/doc/RUNMODEM.md @@ -134,22 +134,24 @@ With the RF simulator (on the same machine): ## SA setup with OAI -The sa flag is used to run gNB in standalone mode. Currently OAI in NR standalone mode transmits and receives SIB1 and triggers the RA procedure for initial access. +The sa flag is used to run gNB in standalone mode. -In order to run gNB in standalone mode, the following flag is needed at gNB: +In order to run gNB and UE in standalone mode, the following flag is needed: `--sa` -### Run OAI in sa mode - -At the gNB the --sa flag does the following -- it reads the RRC configuration from the configuration file -- it encodes the RRCConfiguration and the RBconfig message and stores them in the binary files rbconfig.raw and reconfig.raw -- the RRC encodes SIB1 according the configuration file and transmits it through PDSCH +At the gNB the --sa flag does the following: +- The RRC encodes SIB1 according to the configuration file and transmits it through NR-BCCH-DL-SCH. At the UE the --sa flag will: -- Read the binary files rbconfig.raw and reconfig.raw from the current directory (a different directory can be specified with the flag --rrc_config_path) and process them -- After the successful decoding of a SIB1 at RRC, the UE will start the 5G NR Initial Access Procedure by triggering the RA procedure. +- Decode SIB1 and starts the 5G NR Initial Access Procedure for SA: + 1) 5G-NR RRC Connection Setup + 2) NAS Authentication and Security + 3) 5G-NR AS Security Procedure + 4) 5G-NR RRC Reconfiguration + 5) Start Downlink and Uplink Data Transfer + +### Run OAI in SA mode From the `cmake_targets/ran_build/build` folder: @@ -159,13 +161,13 @@ gNB on machine 1: UE on machine 2: -`sudo ./nr-uesoftmodem --rrc_config_path . --sa` +`sudo ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --sa` With the RF simulator (on the same machine): `sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf --rfsim --sa` -`sudo ./nr-uesoftmodem --rrc_config_path . --rfsim --sa` +`sudo ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --rfsim --sa` ## IF setup with OAI From c7f0a287b025cb0927715c85179fac72729469fb Mon Sep 17 00:00:00 2001 From: rmagueta Date: Sun, 6 Jun 2021 18:59:28 +0100 Subject: [PATCH 472/579] Update dummy_enb.c --- openair2/F1AP/dummy_enb.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/openair2/F1AP/dummy_enb.c b/openair2/F1AP/dummy_enb.c index 0b419e3332..ee98b9ec46 100644 --- a/openair2/F1AP/dummy_enb.c +++ b/openair2/F1AP/dummy_enb.c @@ -1,3 +1,24 @@ +/* + * 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 + */ + #include "COMMON/platform_types.h" #include "COMMON/platform_constants.h" #include "common/ran_context.h" From 54666a932c0f5369a63d18fa3e54275db349aeb9 Mon Sep 17 00:00:00 2001 From: Luis Pereira Date: Mon, 7 Jun 2021 10:24:33 +0200 Subject: [PATCH 473/579] Revert "Skip PDCP integrity verification" This reverts commit cc71b3f88a049321b208d2eb83c1e0565986d524 --- openair2/UTIL/OSA/osa_stream_eia.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/openair2/UTIL/OSA/osa_stream_eia.c b/openair2/UTIL/OSA/osa_stream_eia.c index 4a6b158058..980a4ae3c1 100644 --- a/openair2/UTIL/OSA/osa_stream_eia.c +++ b/openair2/UTIL/OSA/osa_stream_eia.c @@ -306,8 +306,6 @@ int stream_check_integrity(uint8_t algorithm, stream_cipher_t *stream_cipher, ui return -1; } - // FIXME: Skip PDCP integrity verification, integrity verification is failing... to be fixed later - /* if (memcmp(result, expected, 4) != 0) { LOG_E(OSA, "Mismatch found in integrity for algorithm %u,\n" "\tgot %02x.%02x.%02x.%02x, expecting %02x.%02x.%02x.%02x\n", @@ -315,7 +313,6 @@ int stream_check_integrity(uint8_t algorithm, stream_cipher_t *stream_cipher, ui expected[1], expected[2], expected[3]); return -1; } - */ } /* Integrity verification succeeded */ From 773f2a58e4c66362cf4ddfb36640cdd46d2e3563 Mon Sep 17 00:00:00 2001 From: Remi Hardy Date: Mon, 7 Jun 2021 22:52:33 +0200 Subject: [PATCH 474/579] add QLog traces and fix autoterminate for module --- ci-scripts/ci_ueinfra.yaml | 2 +- ci-scripts/cls_module_ue.py | 15 ++++- ci-scripts/cls_oaicitest.py | 83 +++++++++++++----------- ci-scripts/main.py | 14 ++-- ci-scripts/ran.py | 2 +- ci-scripts/xml_files/fr1_nsa_quectel.xml | 6 +- 6 files changed, 71 insertions(+), 51 deletions(-) diff --git a/ci-scripts/ci_ueinfra.yaml b/ci-scripts/ci_ueinfra.yaml index c778b1cad3..67331fdfb2 100644 --- a/ci-scripts/ci_ueinfra.yaml +++ b/ci-scripts/ci_ueinfra.yaml @@ -8,7 +8,7 @@ idefix: WakeupScript : ci_ctl_qtel.py /dev/ttyUSB2 wup DetachScript : ci_ctl_qtel.py /dev/ttyUSB2 detach PLMN : 22201 - UENetwork : enxb22a941dbf00 + UENetwork : wwan0 HostIPAddress : 192.168.18.188 HostUsername : oaicicd HostPassword : oaicicd diff --git a/ci-scripts/cls_module_ue.py b/ci-scripts/cls_module_ue.py index abfa8c1106..3130dbfa7d 100644 --- a/ci-scripts/cls_module_ue.py +++ b/ci-scripts/cls_module_ue.py @@ -126,7 +126,18 @@ class Module_UE: logging.debug('\u001B[1;37;41m Module IP Address Not Found! \u001B[0m') return -1 + def EnableTrace(self): + mySSH = sshconnection.SSHConnection() + mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword) + #delete old artifacts + mySSH.command('echo ' + self.HostPassword + ' | sudo -S rm -rf ci_qlog','\$',5) + #start Trace + mySSH.command('echo $USER; nohup sudo -E QLog/QLog -s ci_qlog -f NR5G.cfg &','\$', 5) + mySSH.close() - - + def DisableTrace(self): + mySSH = sshconnection.SSHConnection() + mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword) + mySSH.command('echo ' + self.HostPassword + ' | sudo -S killall --signal=SIGINT *QLog*', '\$',5) + mySSH.close() diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index 7202e7c881..a9507b9c5d 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -389,17 +389,21 @@ class OaiCiTest(): is_module=Module_UE.CheckCMProcess() if is_module: Module_UE.Command("wup") + logging.debug("Waiting for IP address to be assigned") + time.sleep(20) + logging.debug("Retrieve IP address") status=Module_UE.GetModuleIPAddress() + Module_UE.EnableTrace() if status==0: HTML.CreateHtmlTestRow(Module_UE.UEIPAddress, 'OK', CONST.ALL_PROCESSES_OK) logging.debug('UE IP addresss : '+ Module_UE.UEIPAddress) else: #status==-1 failed to retrieve IP address HTML.CreateHtmlTestRow('N/A', 'KO', CONST.UE_IP_ADDRESS_ISSUE) - self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC) + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE) return - def InitializeOAIUE(self,HTML,RAN,EPC,COTS_UE): + def InitializeOAIUE(self,HTML,RAN,EPC,COTS_UE,InfraUE): if self.UEIPAddress == '' or self.UEUserName == '' or self.UEPassword == '' or self.UESourceCodePath == '': HELP.GenericHelp(CONST.Version) sys.exit('Insufficient Parameter') @@ -623,7 +627,7 @@ class OaiCiTest(): HTML.htmlUEFailureMsg='nr-uesoftmodem did NOT synced' HTML.CreateHtmlTestRow(self.air_interface + ' ' + self.Initialize_OAI_UE_args, 'KO', CONST.OAI_UE_PROCESS_COULD_NOT_SYNC, 'OAI UE') logging.error('\033[91mInitialize OAI UE Failed! \033[0m') - self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC) + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE) def checkDevTTYisUnlocked(self): SSH = sshconnection.SSHConnection() @@ -701,7 +705,7 @@ class OaiCiTest(): HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK) self.checkDevTTYisUnlocked() - def AttachCatM(self,HTML,RAN,COTS_UE,EPC): + def AttachCatM(self,HTML,RAN,COTS_UE,EPC,InfraUE): if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '': HELP.GenericHelp(CONST.Version) sys.exit('Insufficient Parameter') @@ -774,9 +778,9 @@ class OaiCiTest(): html_cell = '
CAT-M module Attachment Failed
' html_queue.put(html_cell) HTML.CreateHtmlTestRowQueue('N/A', 'KO', 1, html_queue) - self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC) + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE) - def PingCatM(self,HTML,RAN,EPC,COTS_UE): + def PingCatM(self,HTML,RAN,EPC,COTS_UE,InfraUE): if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.SourceCodePath == '': HELP.GenericHelp(CONST.Version) sys.exit('Insufficient Parameter') @@ -785,7 +789,7 @@ class OaiCiTest(): pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC) if (pStatus < 0): HTML.CreateHtmlTestRow(self.ping_args, 'KO', pStatus) - self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC) + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE) return try: statusQueue = SimpleQueue() @@ -806,7 +810,7 @@ class OaiCiTest(): moduleIPAddr = result.group('ipaddr') else: HTML.CreateHtmlTestRow(self.ping_args, 'KO', pStatus) - self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC) + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE) return ping_time = re.findall("-c (\d+)",str(self.ping_args)) device_id = 'catm' @@ -870,7 +874,7 @@ class OaiCiTest(): HTML.CreateHtmlTestRowQueue(self.ping_args, 'OK', 1, statusQueue) else: HTML.CreateHtmlTestRowQueue(self.ping_args, 'KO', 1, statusQueue) - self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC) + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE) except: os.kill(os.getppid(),signal.SIGUSR1) @@ -962,7 +966,7 @@ class OaiCiTest(): except: os.kill(os.getppid(),signal.SIGUSR1) - def AttachUE(self,HTML,RAN,EPC,COTS_UE): + def AttachUE(self,HTML,RAN,EPC,COTS_UE,InfraUE): if self.ue_id=='':#no ID specified, then it is a COTS controlled by ADB if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '': HELP.GenericHelp(CONST.Version) @@ -972,7 +976,7 @@ class OaiCiTest(): pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC) if (pStatus < 0): HTML.CreateHtmlTestRow('N/A', 'KO', pStatus) - self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC) + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE) return multi_jobs = [] status_queue = SimpleQueue() @@ -991,7 +995,7 @@ class OaiCiTest(): if (status_queue.empty()): HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ALL_PROCESSES_OK) - self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC) + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE) return else: attach_status = True @@ -1020,7 +1024,7 @@ class OaiCiTest(): time.sleep(5) else: HTML.CreateHtmlTestRowQueue('N/A', 'KO', len(self.UEDevices), html_queue) - self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC) + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE) def DetachUE_common(self, device_id, idx,COTS_UE): try: @@ -1054,7 +1058,7 @@ class OaiCiTest(): pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC) if (pStatus < 0): HTML.CreateHtmlTestRow('N/A', 'KO', pStatus) - self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC) + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE) return multi_jobs = [] cnt = 0 @@ -1079,6 +1083,7 @@ class OaiCiTest(): else:#if an ID is specified, it is a module from the yaml infrastructure file Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id]) Module_UE.Command("detach") + Module_UE.DisableTrace() HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK) @@ -1329,7 +1334,7 @@ class OaiCiTest(): except: os.kill(os.getppid(),signal.SIGUSR1) - def CheckStatusUE(self,HTML,RAN,EPC,COTS_UE): + def CheckStatusUE(self,HTML,RAN,EPC,COTS_UE,InfraUE): if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '': HELP.GenericHelp(CONST.Version) sys.exit('Insufficient Parameter') @@ -1376,7 +1381,7 @@ class OaiCiTest(): if (status_queue.empty()): HTML.CreateHtmlTestRow(htmlOptions, 'KO', CONST.ALL_PROCESSES_OK) - self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC) + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE) else: check_status = True html_queue = SimpleQueue() @@ -1392,7 +1397,7 @@ class OaiCiTest(): HTML.CreateHtmlTestRowQueue(htmlOptions, 'OK', len(self.UEDevices), html_queue) else: HTML.CreateHtmlTestRowQueue(htmlOptions, 'KO', len(self.UEDevices), html_queue) - self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC) + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE) def GetAllUEIPAddresses(self): SSH = sshconnection.SSHConnection() @@ -1612,14 +1617,14 @@ class OaiCiTest(): html_queue.put(html_cell) HTML.CreateHtmlTestRowQueue(self.ping_args, 'KO', len(self.UEDevices), html_queue) - def PingNoS1(self,HTML,RAN,EPC,COTS_UE): + def PingNoS1(self,HTML,RAN,EPC,COTS_UE,InfraUE): SSH=sshconnection.SSHConnection() check_eNB = True check_OAI_UE = True pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC) if (pStatus < 0): HTML.CreateHtmlTestRow(self.ping_args, 'KO', pStatus) - self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC) + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE) return ping_from_eNB = re.search('oaitun_enb1', str(self.ping_args)) if ping_from_eNB is not None: @@ -1708,7 +1713,7 @@ class OaiCiTest(): def Ping(self,HTML,RAN,EPC,COTS_UE, InfraUE): result = re.search('noS1', str(RAN.Initialize_eNB_args)) if result is not None: - self.PingNoS1(HTML,RAN,EPC,COTS_UE) + self.PingNoS1(HTML,RAN,EPC,COTS_UE,InfraUE) return if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.SourceCodePath == '': HELP.GenericHelp(CONST.Version) @@ -1721,7 +1726,7 @@ class OaiCiTest(): pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC) if (pStatus < 0): HTML.CreateHtmlTestRow(self.ping_args, 'KO', pStatus) - self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC) + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE) return if self.ue_id=="": @@ -1729,7 +1734,7 @@ class OaiCiTest(): ueIpStatus = self.GetAllUEIPAddresses() if (ueIpStatus < 0): HTML.CreateHtmlTestRow(self.ping_args, 'KO', CONST.UE_IP_ADDRESS_ISSUE) - self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC) + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE) return else: self.UEIPAddresses=[] @@ -1756,7 +1761,7 @@ class OaiCiTest(): if (status_queue.empty()): HTML.CreateHtmlTestRow(self.ping_args, 'KO', CONST.ALL_PROCESSES_OK) - self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC) + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE) else: ping_status = True html_queue = SimpleQueue() @@ -1773,7 +1778,7 @@ class OaiCiTest(): HTML.CreateHtmlTestRowQueue(self.ping_args, 'OK', len(self.UEDevices), html_queue) else: HTML.CreateHtmlTestRowQueue(self.ping_args, 'KO', len(self.UEDevices), html_queue) - self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC) + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE) def Iperf_ComputeTime(self): result = re.search('-t (?P\d+)', str(self.iperf_args)) @@ -2467,7 +2472,7 @@ class OaiCiTest(): except: os.kill(os.getppid(),signal.SIGUSR1) - def IperfNoS1(self,HTML,RAN,EPC,COTS_UE): + def IperfNoS1(self,HTML,RAN,EPC,COTS_UE,InfraUE): SSH = sshconnection.SSHConnection() if RAN.eNBIPAddress == '' or RAN.eNBUserName == '' or RAN.eNBPassword == '' or self.UEIPAddress == '' or self.UEUserName == '' or self.UEPassword == '': HELP.GenericHelp(CONST.Version) @@ -2477,7 +2482,7 @@ class OaiCiTest(): pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC) if (pStatus < 0): HTML.CreateHtmlTestRow(self.iperf_args, 'KO', pStatus) - self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC) + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE) return server_on_enb = re.search('-R', str(self.iperf_args)) if server_on_enb is not None: @@ -2576,12 +2581,12 @@ class OaiCiTest(): HTML.CreateHtmlTestRowQueue(self.iperf_args, 'OK', len(self.UEDevices), html_queue) else: HTML.CreateHtmlTestRowQueue(self.iperf_args, 'KO', len(self.UEDevices), html_queue) - self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC) + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE) def Iperf(self,HTML,RAN,EPC,COTS_UE, InfraUE): result = re.search('noS1', str(RAN.Initialize_eNB_args)) if result is not None: - self.IperfNoS1(HTML,RAN,EPC,COTS_UE) + self.IperfNoS1(HTML,RAN,EPC,COTS_UE,InfraUE) return if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.SourceCodePath == '' or self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '': HELP.GenericHelp(CONST.Version) @@ -2594,14 +2599,14 @@ class OaiCiTest(): pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC) if (pStatus < 0): HTML.CreateHtmlTestRow(self.iperf_args, 'KO', pStatus) - self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC) + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE) return if self.ue_id=="":#is not a module, follow legacy code ueIpStatus = self.GetAllUEIPAddresses() if (ueIpStatus < 0): HTML.CreateHtmlTestRow(self.iperf_args, 'KO', CONST.UE_IP_ADDRESS_ISSUE) - self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC) + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE) return else: #is a module self.UEIPAddresses=[] @@ -2646,7 +2651,7 @@ class OaiCiTest(): if (status_queue.empty()): HTML.CreateHtmlTestRow(self.iperf_args, 'KO', CONST.ALL_PROCESSES_OK) - self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC) + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfaUE) else: iperf_status = True iperf_noperf = False @@ -2668,7 +2673,7 @@ class OaiCiTest(): HTML.CreateHtmlTestRowQueue(self.iperf_args, 'OK', len(self.UEDevices), html_queue) else: HTML.CreateHtmlTestRowQueue(self.iperf_args, 'KO', len(self.UEDevices), html_queue) - self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC) + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE) def CheckProcessExist(self, check_eNB, check_OAI_UE,RAN,EPC): multi_jobs = [] @@ -3088,7 +3093,7 @@ class OaiCiTest(): job.join() HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK) - def TerminateOAIUE(self,HTML,RAN,COTS_UE,EPC): + def TerminateOAIUE(self,HTML,RAN,COTS_UE,EPC, InfraUE): SSH = sshconnection.SSHConnection() SSH.open(self.UEIPAddress, self.UEUserName, self.UEPassword) SSH.command('cd ' + self.UESourceCodePath + '/cmake_targets', '\$', 5) @@ -3129,11 +3134,11 @@ class OaiCiTest(): # Not an error then if (logStatus != CONST.OAI_UE_PROCESS_COULD_NOT_SYNC) or (ueAction != 'Sniffing'): self.Initialize_OAI_UE_args = '' - self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC) + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE) else: if (logStatus == CONST.OAI_UE_PROCESS_COULD_NOT_SYNC): self.Initialize_OAI_UE_args = '' - self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC) + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE) else: logging.debug('\u001B[1m' + ueAction + ' Completed \u001B[0m') HTML.htmlUEFailureMsg='' + ueAction + ' Completed\n' + HTML.htmlUEFailureMsg @@ -3142,7 +3147,7 @@ class OaiCiTest(): else: HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK) - def AutoTerminateUEandeNB(self,HTML,RAN,COTS_UE,EPC): + def AutoTerminateUEandeNB(self,HTML,RAN,COTS_UE,EPC,InfraUE): if (self.ADBIPAddress != 'none'): self.testCase_id = 'AUTO-KILL-UE' HTML.testCase_id=self.testCase_id @@ -3156,7 +3161,7 @@ class OaiCiTest(): self.desc = 'Automatic Termination of OAI-UE' HTML.desc='Automatic Termination of OAI-UE' self.ShowTestID() - self.TerminateOAIUE(HTML,RAN,COTS_UE,EPC) + self.TerminateOAIUE(HTML,RAN,COTS_UE,EPC,InfraUE) if (RAN.Initialize_eNB_args != ''): self.testCase_id = 'AUTO-KILL-RAN' HTML.testCase_id=self.testCase_id @@ -3176,6 +3181,10 @@ class OaiCiTest(): HTML.desc='Automatic Termination of FlexRan CTL' self.ShowTestID() self.TerminateFlexranCtrl(HTML,RAN,EPC) + if self.ue_id!='': + Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id]) + Module_UE.Command("detach") + Module_UE.DisableTrace() RAN.prematureExit=True def IdleSleep(self,HTML): diff --git a/ci-scripts/main.py b/ci-scripts/main.py index 3f5b57e016..f99229053d 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -474,7 +474,7 @@ elif re.match('^TerminateOAIUE$', mode, re.IGNORECASE): HELP.GenericHelp(CONST.Version) sys.exit('Insufficient Parameter') signal.signal(signal.SIGUSR1, receive_signal) - CiTestObj.TerminateOAIUE(HTML,RAN,COTS_UE,EPC) + CiTestObj.TerminateOAIUE(HTML,RAN,COTS_UE,EPC,InfraUE) elif re.match('^TerminateHSS$', mode, re.IGNORECASE): if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.Type == '' or EPC.SourceCodePath == '': HELP.GenericHelp(CONST.Version) @@ -717,7 +717,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re elif action == 'Terminate_UE': CiTestObj.TerminateUE(HTML,COTS_UE) elif action == 'Attach_UE': - CiTestObj.AttachUE(HTML,RAN,EPC,COTS_UE) + CiTestObj.AttachUE(HTML,RAN,EPC,COTS_UE,InfraUE) elif action == 'Detach_UE': CiTestObj.DetachUE(HTML,RAN,EPC,COTS_UE,InfraUE) elif action == 'DataDisable_UE': @@ -725,23 +725,23 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re elif action == 'DataEnable_UE': CiTestObj.DataEnableUE(HTML) elif action == 'CheckStatusUE': - CiTestObj.CheckStatusUE(HTML,RAN,EPC,COTS_UE) + CiTestObj.CheckStatusUE(HTML,RAN,EPC,COTS_UE,InfraUE) elif action == 'Build_OAI_UE': CiTestObj.BuildOAIUE(HTML) elif action == 'Initialize_OAI_UE': - CiTestObj.InitializeOAIUE(HTML,RAN,EPC,COTS_UE) + CiTestObj.InitializeOAIUE(HTML,RAN,EPC,COTS_UE,InfraUE) elif action == 'Terminate_OAI_UE': - CiTestObj.TerminateOAIUE(HTML,RAN,COTS_UE,EPC) + CiTestObj.TerminateOAIUE(HTML,RAN,COTS_UE,EPC,InfraUE) elif action == 'Initialize_CatM_module': CiTestObj.InitializeCatM(HTML) elif action == 'Terminate_CatM_module': CiTestObj.TerminateCatM(HTML) elif action == 'Attach_CatM_module': - CiTestObj.AttachCatM(HTML,RAN,COTS_UE,EPC) + CiTestObj.AttachCatM(HTML,RAN,COTS_UE,EPC,InfraUE) elif action == 'Detach_CatM_module': CiTestObj.TerminateCatM(HTML) elif action == 'Ping_CatM_module': - CiTestObj.PingCatM(HTML,RAN,EPC,COTS_UE,EPC) + CiTestObj.PingCatM(HTML,RAN,EPC,COTS_UE,EPC,InfraUE) elif action == 'Ping': CiTestObj.Ping(HTML,RAN,EPC,COTS_UE, InfraUE) elif action == 'Iperf': diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index 83945b3c17..66c8392662 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -388,7 +388,7 @@ class RANManagement(): # do not reset board twice in IF4.5 case result = re.search('^rru|^enb|^du.band', str(config_file)) if result is not None: - mySSH.command('echo ' + lPassWord + ' | sudo -S uhd_find_devices', '\$', 90) + mySSH.command2('echo ' + lPassWord + ' | sudo -S uhd_find_devices', '\$', 90) result = re.search('type: b200', mySSH.getBefore()) if result is not None: logging.debug('Found a B2xx device --> resetting it') diff --git a/ci-scripts/xml_files/fr1_nsa_quectel.xml b/ci-scripts/xml_files/fr1_nsa_quectel.xml index 6c2bd6bd26..8992221608 100644 --- a/ci-scripts/xml_files/fr1_nsa_quectel.xml +++ b/ci-scripts/xml_files/fr1_nsa_quectel.xml @@ -24,7 +24,7 @@ TEST-NSA-FR1-TM1 NSA Ping DL UL with QUECTEL tasks - 3 + 1 030000 040000 @@ -61,7 +61,7 @@ Initialize_eNB Initialize eNB - -O ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf + -O ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf --T_stdout 0 0 0 lte @@ -71,7 +71,7 @@ Initialize_eNB Initialize gNB - -O ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpn310.conf -q + -O ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf -E -q 1 1 nr From 1b69c2a00dfa53ffd8e130bfa671eb1347816164 Mon Sep 17 00:00:00 2001 From: Masayuki Harada Date: Tue, 8 Jun 2021 15:32:12 +0900 Subject: [PATCH 475/579] Remove pdcp_layer_init_for_CU function and merge to pdcp_layer_init. --- executables/nr-softmodem.c | 1 - openair2/GNB_APP/gnb_app.c | 4 +--- openair2/GNB_APP/gnb_config.c | 2 +- openair2/LAYER2/nr_pdcp/nr_pdcp.h | 1 - openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c | 21 ++++----------------- 5 files changed, 6 insertions(+), 23 deletions(-) diff --git a/executables/nr-softmodem.c b/executables/nr-softmodem.c index 7fb9f8b19f..929aeb672a 100644 --- a/executables/nr-softmodem.c +++ b/executables/nr-softmodem.c @@ -625,7 +625,6 @@ static void wait_nfapi_init(char *thread_name) { void init_pdcp(void) { if (!NODE_IS_DU(RC.nrrrc[0]->node_type)) { // pdcp_layer_init(); - // pdcp_layer_init_for_CU(); uint32_t pdcp_initmask = (IS_SOFTMODEM_NOS1) ? (PDCP_USE_NETLINK_BIT | LINK_ENB_PDCP_TO_IP_DRIVER_BIT) : LINK_ENB_PDCP_TO_GTPV1U_BIT; if (IS_SOFTMODEM_NOS1) { diff --git a/openair2/GNB_APP/gnb_app.c b/openair2/GNB_APP/gnb_app.c index 149dde9d73..83869f2591 100644 --- a/openair2/GNB_APP/gnb_app.c +++ b/openair2/GNB_APP/gnb_app.c @@ -135,8 +135,7 @@ static uint32_t gNB_app_register_x2(uint32_t gnb_id_start, uint32_t gnb_id_end) static void init_pdcp(void) { if (!NODE_IS_DU(RC.nrrrc[0]->node_type)) { - // pdcp_layer_init(); - // pdcp_layer_init_for_CU(); + pdcp_layer_init(); uint32_t pdcp_initmask = (IS_SOFTMODEM_NOS1) ? (PDCP_USE_NETLINK_BIT | LINK_ENB_PDCP_TO_IP_DRIVER_BIT) : LINK_ENB_PDCP_TO_GTPV1U_BIT; if (IS_SOFTMODEM_NOS1) { @@ -226,7 +225,6 @@ void *gNB_app_task(void *args_p) LOG_E(F1AP, "Create task for F1AP CU failed\n"); AssertFatal(1==0,"exiting"); } - pdcp_layer_init_for_CU(); } if (NODE_IS_DU(RC.nrrrc[0]->node_type)) { diff --git a/openair2/GNB_APP/gnb_config.c b/openair2/GNB_APP/gnb_config.c index a07261493b..456d7cd6de 100644 --- a/openair2/GNB_APP/gnb_config.c +++ b/openair2/GNB_APP/gnb_config.c @@ -2086,7 +2086,7 @@ void nr_read_config_and_init(void) { } if (NODE_IS_CU(RC.nrrrc[0]->node_type)) { - pdcp_layer_init_for_CU(); + pdcp_layer_init(); // nr_DRB_preconfiguration(0x1234); rrc_init_nr_global_param(); } diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp.h b/openair2/LAYER2/nr_pdcp/nr_pdcp.h index a5f182c822..94939a0421 100644 --- a/openair2/LAYER2/nr_pdcp/nr_pdcp.h +++ b/openair2/LAYER2/nr_pdcp/nr_pdcp.h @@ -24,7 +24,6 @@ #ifndef _NR_PDCP_H_ #define _NR_PDCP_H_ -void pdcp_layer_init_for_CU(void); void nr_pdcp_layer_init_ue(void); void nr_DRB_preconfiguration(uint16_t crnti); diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c index 7853a4b2bd..8278a494be 100644 --- a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c +++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c @@ -369,27 +369,14 @@ void pdcp_layer_init(void) if (pthread_mutex_unlock(&m) != 0) abort(); nr_pdcp_ue_manager = new_nr_pdcp_ue_manager(1); - init_nr_rlc_data_req_queue(); + + if ((RC.nrrrc == NULL) || (!NODE_IS_CU(RC.nrrrc[0]->node_type))) { + init_nr_rlc_data_req_queue(); + } nr_pdcp_init_timer_thread(nr_pdcp_ue_manager); } -void pdcp_layer_init_for_CU(void) -{ - /* hack: be sure to initialize only once */ - static pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER; - static int initialized = 0; - if (pthread_mutex_lock(&m) != 0) abort(); - if (initialized) { - if (pthread_mutex_unlock(&m) != 0) abort(); - return; - } - initialized = 1; - if (pthread_mutex_unlock(&m) != 0) abort(); - - nr_pdcp_ue_manager = new_nr_pdcp_ue_manager(1); -} - #include "nfapi/oai_integration/vendor_ext.h" #include "targets/RT/USER/lte-softmodem.h" #include "openair2/RRC/NAS/nas_config.h" From 97d097347687d0caf1f6ccc2386a3a01f5a85af6 Mon Sep 17 00:00:00 2001 From: Remi Hardy Date: Tue, 8 Jun 2021 17:38:40 +0200 Subject: [PATCH 476/579] update module mgt and log collect for nsa test --- ci-scripts/cls_module_ue.py | 10 +++++++++- ci-scripts/cls_oaicitest.py | 14 +++++++++----- ci-scripts/ran.py | 20 ++++++++++++++++++-- ci-scripts/xml_files/fr1_nsa_quectel.xml | 8 ++------ 4 files changed, 38 insertions(+), 14 deletions(-) diff --git a/ci-scripts/cls_module_ue.py b/ci-scripts/cls_module_ue.py index 3130dbfa7d..e3ea863b21 100644 --- a/ci-scripts/cls_module_ue.py +++ b/ci-scripts/cls_module_ue.py @@ -101,7 +101,7 @@ class Module_UE: def GetModuleIPAddress(self): HOST=self.HostIPAddress response= [] - tentative = 10 + tentative = 3 while (len(response)==0) and (tentative>0): COMMAND="ip a show dev " + self.UENetwork + " | grep inet | grep " + self.UENetwork logging.debug(COMMAND) @@ -141,3 +141,11 @@ class Module_UE: mySSH.command('echo ' + self.HostPassword + ' | sudo -S killall --signal=SIGINT *QLog*', '\$',5) mySSH.close() + + def DisableCM(self): + mySSH = sshconnection.SSHConnection() + mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword) + mySSH.command('echo ' + self.HostPassword + ' | sudo -S killall --signal SIGKILL *'+self.Process['Name']+'*', '\$', 5) + mySSH.close() + + diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index a9507b9c5d..31230a3df3 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -388,12 +388,13 @@ class OaiCiTest(): Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id]) is_module=Module_UE.CheckCMProcess() if is_module: + Module_UE.EnableTrace() + time.sleep(5) Module_UE.Command("wup") logging.debug("Waiting for IP address to be assigned") time.sleep(20) logging.debug("Retrieve IP address") status=Module_UE.GetModuleIPAddress() - Module_UE.EnableTrace() if status==0: HTML.CreateHtmlTestRow(Module_UE.UEIPAddress, 'OK', CONST.ALL_PROCESSES_OK) logging.debug('UE IP addresss : '+ Module_UE.UEIPAddress) @@ -1084,6 +1085,7 @@ class OaiCiTest(): Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id]) Module_UE.Command("detach") Module_UE.DisableTrace() + Module_UE.DisableCM() HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK) @@ -3148,6 +3150,12 @@ class OaiCiTest(): HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK) def AutoTerminateUEandeNB(self,HTML,RAN,COTS_UE,EPC,InfraUE): + if self.ue_id!='': + Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id]) + Module_UE.Command("detach") + Module_UE.DisableTrace() + Module_UE.DisableCM() + if (self.ADBIPAddress != 'none'): self.testCase_id = 'AUTO-KILL-UE' HTML.testCase_id=self.testCase_id @@ -3181,10 +3189,6 @@ class OaiCiTest(): HTML.desc='Automatic Termination of FlexRan CTL' self.ShowTestID() self.TerminateFlexranCtrl(HTML,RAN,EPC) - if self.ue_id!='': - Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id]) - Module_UE.Command("detach") - Module_UE.DisableTrace() RAN.prematureExit=True def IdleSleep(self,HTML): diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index 66c8392662..b7675cfdac 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -344,6 +344,21 @@ class RANManagement(): HTML.CreateHtmlTestRow(self.air_interface[self.eNB_instance] + ' ' + self.Initialize_eNB_args, 'KO', self.pStatus) HTML.CreateHtmlTabFooter(False) sys.exit(1) + #Get pcap on S1 and X2 interface always + if (self.air_interface[self.eNB_instance] == 'lte-softmodem') or (self.air_interface[self.eNB_instance] == 'ocp-enb'): + mySSH.open(lIpAddr, lUserName, lPassWord) + mySSH.command('ip addr show | awk -f /tmp/active_net_interfaces.awk | egrep -v "lo|tun"', '\$', 5) + result = re.search('interfaceToUse=(?P[a-zA-Z0-9\-\_]+)done', mySSH.getBefore()) + if result is not None: + eth_interface = result.group('eth_interface') + logging.debug('\u001B[1m Launching tshark on interface ' + eth_interface + '\u001B[0m') + pcapfile = 'enb_' + self.testCase_id + '_s1x2log.pcap' + mySSH.command('echo ' + lPassWord + ' | sudo -S rm -f /tmp/' + pcapfile , '\$', 5) + mySSH.command('echo $USER; nohup sudo -E tshark -i ' + eth_interface + ' -w /tmp/' + pcapfile + ' 2>&1 &','\$', 5) + mySSH.close() + + + # If tracer options is on, running tshark on EPC side and capture traffic b/ EPC and eNB result = re.search('T_stdout', str(self.Initialize_eNB_args)) if (result is not None): @@ -650,9 +665,10 @@ class RANManagement(): mySSH.open(self.eNBIPAddress, self.eNBUserName, self.eNBPassword) mySSH.command('cd ' + self.eNBSourceCodePath, '\$', 5) mySSH.command('cd cmake_targets', '\$', 5) + mySSH.command('cp /tmp/enb_*_s1x2log.pcap .','\$',20) mySSH.command('echo ' + self.eNBPassword + ' | sudo -S rm -f enb.log.zip', '\$', 5) - mySSH.command('echo ' + self.eNBPassword + ' | sudo -S zip enb.log.zip enb*.log core* enb_*record.raw enb_*.pcap enb_*txt physim_*.log', '\$', 60) - mySSH.command('echo ' + self.eNBPassword + ' | sudo -S rm enb*.log core* enb_*record.raw enb_*.pcap enb_*txt', '\$', 5) + mySSH.command('echo ' + self.eNBPassword + ' | sudo -S zip enb.log.zip enb*.log core* enb_*record.raw enb_*.pcap enb_*txt physim_*.log *stats.log', '\$', 60) + mySSH.command('echo ' + self.eNBPassword + ' | sudo -S rm enb*.log core* enb_*record.raw enb_*.pcap enb_*txt physim_*.log *stats.log', '\$', 5) mySSH.close() def AnalyzeLogFile_eNB(self, eNBlogFile, HTML): diff --git a/ci-scripts/xml_files/fr1_nsa_quectel.xml b/ci-scripts/xml_files/fr1_nsa_quectel.xml index 8992221608..7ac7b990db 100644 --- a/ci-scripts/xml_files/fr1_nsa_quectel.xml +++ b/ci-scripts/xml_files/fr1_nsa_quectel.xml @@ -30,15 +30,11 @@ 040000 000002 010000 + 000001 050000 050001 000001 - 070000 - 000001 - 070000 - 000001 010002 - 000001 080001 080000 @@ -61,7 +57,7 @@ Initialize_eNB Initialize eNB - -O ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf --T_stdout 0 + -O ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf 0 0 lte From 19aadc07bbd0107a51304c70e4a94fb048c89401 Mon Sep 17 00:00:00 2001 From: hardy Date: Wed, 9 Jun 2021 09:04:59 +0200 Subject: [PATCH 477/579] no longer need 3 resources reservation --- ci-scripts/Jenkinsfile-tmp-multi-enb-nsa | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa b/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa index 66d12eed33..1e4933838b 100644 --- a/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa +++ b/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa @@ -33,10 +33,9 @@ def buildStageStatus = true // Name of the test stage def testStageName = params.pipelineTestStageName -// Name of the phone resource +// Name of the phone/server resource def ciSmartPhonesResource1 = params.SmartPhonesResource1 def ciSmartPhonesResource2 = params.SmartPhonesResource2 -def ciSmartPhonesResource3 = params.SmartPhonesResource3 // Global Parameters. Normally they should be populated when the master job // triggers the slave job with parameters @@ -53,7 +52,7 @@ pipeline { options { disableConcurrentBuilds() ansiColor('xterm') - lock(extra: [[resource: ciSmartPhonesResource2],[resource: ciSmartPhonesResource3]], resource: ciSmartPhonesResource1) + lock(extra: [[resource: ciSmartPhonesResource2]], resource: ciSmartPhonesResource1) } stages { stage("Build Init") { @@ -85,9 +84,6 @@ pipeline { if (params.SmartPhonesResource2 == null) { allParametersPresent = false } - if (params.SmartPhonesResource3== null) { - allParametersPresent = false - } // 1st eNB parameters if (params.eNB_IPAddress == null) { allParametersPresent = false From 4e238b87004c4c1932aa0bae6c88f637c7778c4a Mon Sep 17 00:00:00 2001 From: hardy Date: Wed, 9 Jun 2021 10:25:29 +0200 Subject: [PATCH 478/579] fixing copy of pcap artifacts --- ci-scripts/ran.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index b7675cfdac..2108fb7c8b 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -665,7 +665,7 @@ class RANManagement(): mySSH.open(self.eNBIPAddress, self.eNBUserName, self.eNBPassword) mySSH.command('cd ' + self.eNBSourceCodePath, '\$', 5) mySSH.command('cd cmake_targets', '\$', 5) - mySSH.command('cp /tmp/enb_*_s1x2log.pcap .','\$',20) + mySSH.command('echo ' + self.eNBPassword + ' | sudo -S cp /tmp/enb_*_s1x2log.pcap .','\$',20) mySSH.command('echo ' + self.eNBPassword + ' | sudo -S rm -f enb.log.zip', '\$', 5) mySSH.command('echo ' + self.eNBPassword + ' | sudo -S zip enb.log.zip enb*.log core* enb_*record.raw enb_*.pcap enb_*txt physim_*.log *stats.log', '\$', 60) mySSH.command('echo ' + self.eNBPassword + ' | sudo -S rm enb*.log core* enb_*record.raw enb_*.pcap enb_*txt physim_*.log *stats.log', '\$', 5) From 19f5c7baa20ebc91a01aa152a2ec645a5061e481 Mon Sep 17 00:00:00 2001 From: hardy Date: Wed, 9 Jun 2021 12:23:05 +0200 Subject: [PATCH 479/579] nsa test for usrp update --- ci-scripts/xml_files/fr1_nsa_quectel.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ci-scripts/xml_files/fr1_nsa_quectel.xml b/ci-scripts/xml_files/fr1_nsa_quectel.xml index 7ac7b990db..1deb81dd27 100644 --- a/ci-scripts/xml_files/fr1_nsa_quectel.xml +++ b/ci-scripts/xml_files/fr1_nsa_quectel.xml @@ -34,6 +34,10 @@ 050000 050001 000001 + 070000 + 000001 + 070001 + 000001 010002 080001 080000 From 09a6d825b7369bf04e9c4300f7f3f8d9e9d4dda2 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Wed, 9 Jun 2021 12:37:16 +0100 Subject: [PATCH 480/579] Avoid read null pointer file --- common/utils/system.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/common/utils/system.c b/common/utils/system.c index 37622932ff..bf87bd45c2 100644 --- a/common/utils/system.c +++ b/common/utils/system.c @@ -101,10 +101,13 @@ static int baseRunTimeCommand(char* cmd) { size_t retSize = 0; fp = popen(cmd, "r"); - - memset(cmd, 1, sizeof(*cmd)); - retSize = fread(cmd, 1, sizeof(*cmd), fp); - fclose(fp); + if(fp) { + memset(cmd, 1, sizeof(*cmd)); + retSize = fread(cmd, 1, sizeof(*cmd), fp); + fclose(fp); + } else { + LOG_D(HW,"%s:%d:%s: Cannot open %s\n", __FILE__, __LINE__, __FUNCTION__, cmd); + } if (retSize == 0) { return 0; From 688cb7ae4e3529cb1c3230e0b3ca82b48bb4e03b Mon Sep 17 00:00:00 2001 From: hardy Date: Wed, 9 Jun 2021 14:18:36 +0200 Subject: [PATCH 481/579] Qlog archive mgt --- ci-scripts/cls_module_ue.py | 13 ++++++++++++- ci-scripts/cls_oaicitest.py | 6 ++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ci-scripts/cls_module_ue.py b/ci-scripts/cls_module_ue.py index e3ea863b21..bc79b87c66 100644 --- a/ci-scripts/cls_module_ue.py +++ b/ci-scripts/cls_module_ue.py @@ -37,7 +37,7 @@ import time import re import subprocess - +from datetime import datetime class Module_UE: @@ -149,3 +149,14 @@ class Module_UE: mySSH.close() + def LogCollect(self): + mySSH = sshconnection.SSHConnection() + mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword) + #archive qlog to /opt/ci_qlogs with datetime suffix + now=datetime.now() + now_string = now.strftime("%Y/%m/%d-%H:%M") + source='ci_qlog' + destination='/opt/ci_qlogs/ci_qlog_'+now_string + mySSH.command('echo ' + self.HostPassword + ' | sudo -S cp -r '+source+' '+destination,'\$', 20) + mySSH.close() + return destination diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index 31230a3df3..809af4ebec 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -1086,7 +1086,8 @@ class OaiCiTest(): Module_UE.Command("detach") Module_UE.DisableTrace() Module_UE.DisableCM() - HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK) + archive_destination=Module_UE.LogCollect() + HTML.CreateHtmlTestRow('QLog at : '+archive_destination, 'OK', CONST.ALL_PROCESSES_OK) @@ -3155,7 +3156,8 @@ class OaiCiTest(): Module_UE.Command("detach") Module_UE.DisableTrace() Module_UE.DisableCM() - + archive_destination=Module_UE.LogCollect() + HTML.CreateHtmlTestRow('QLog at : '+archive_destination, 'OK', CONST.ALL_PROCESSES_OK) if (self.ADBIPAddress != 'none'): self.testCase_id = 'AUTO-KILL-UE' HTML.testCase_id=self.testCase_id From 2c2d8bbf62673c4518fea5edc174e29b862838be Mon Sep 17 00:00:00 2001 From: hardy Date: Wed, 9 Jun 2021 15:51:07 +0200 Subject: [PATCH 482/579] fixing tshark termination ; zip of QLog file --- ci-scripts/cls_module_ue.py | 6 +++--- ci-scripts/ran.py | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ci-scripts/cls_module_ue.py b/ci-scripts/cls_module_ue.py index bc79b87c66..f93cb9f036 100644 --- a/ci-scripts/cls_module_ue.py +++ b/ci-scripts/cls_module_ue.py @@ -154,9 +154,9 @@ class Module_UE: mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword) #archive qlog to /opt/ci_qlogs with datetime suffix now=datetime.now() - now_string = now.strftime("%Y/%m/%d-%H:%M") + now_string = now.strftime("%Y%m%d-%H%M") source='ci_qlog' - destination='/opt/ci_qlogs/ci_qlog_'+now_string - mySSH.command('echo ' + self.HostPassword + ' | sudo -S cp -r '+source+' '+destination,'\$', 20) + destination='/opt/ci_qlogs/ci_qlog_'+now_string+'.zip' + mySSH.command('echo $USER; echo ' + self.HostPassword + ' | nohup sudo -S zip -r '+destination+' '+source+' &','\$', 10) mySSH.close() return destination diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index 2108fb7c8b..5fb7dd39e8 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -594,6 +594,10 @@ class RANManagement(): mySSH.command('echo ' + lPassWord + ' | sudo -S killall --signal SIGKILL -r .*-softmodem ocp-enb || true', '\$', 5) time.sleep(5) mySSH.command('rm -f my-lte-softmodem-run' + str(self.eNB_instance) + '.sh', '\$', 5) + #stopping tshark on eNB side + logging.debug('\u001B[1m Stopping tshark \u001B[0m') + mySSH.command('echo ' + lPassWord + ' | sudo -S killall --signal SIGKILL tshark', '\$', 5) + time.sleep(1) mySSH.close() # If tracer options is on, stopping tshark on EPC side result = re.search('T_stdout', str(self.Initialize_eNB_args)) From 2f84dc6bd0dc6bdfbd46a1b9594cf5cab412bc85 Mon Sep 17 00:00:00 2001 From: hardy Date: Wed, 9 Jun 2021 21:45:50 +0200 Subject: [PATCH 483/579] making enb pcap generation optional in xml --- ci-scripts/main.py | 1 + ci-scripts/ran.py | 10 ++++++---- ci-scripts/xml_files/fr1_nsa_quectel.xml | 1 + 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ci-scripts/main.py b/ci-scripts/main.py index f99229053d..cbd323366b 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -152,6 +152,7 @@ def GetParametersFromXML(action): RAN.eNB_serverId[RAN.eNB_instance]=eNB_serverId elif action == 'Initialize_eNB': + RAN.eNB_Trace=test.findtext('eNB_Trace') RAN.Initialize_eNB_args=test.findtext('Initialize_eNB_args') eNB_instance=test.findtext('eNB_instance') if (eNB_instance is None): diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index 5fb7dd39e8..4f12dee5e5 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -93,6 +93,7 @@ class RANManagement(): self.epcPcapFile = '' self.runtime_stats= '' self.datalog_rt_stats={} + self.eNB_Trace = '' #if 'yes', Tshark will be launched at initialization @@ -344,8 +345,9 @@ class RANManagement(): HTML.CreateHtmlTestRow(self.air_interface[self.eNB_instance] + ' ' + self.Initialize_eNB_args, 'KO', self.pStatus) HTML.CreateHtmlTabFooter(False) sys.exit(1) - #Get pcap on S1 and X2 interface always - if (self.air_interface[self.eNB_instance] == 'lte-softmodem') or (self.air_interface[self.eNB_instance] == 'ocp-enb'): + #Get pcap on S1 and X2 eNB interface, if enabled in the xml + #will not work for gNB at this stage + if ((self.air_interface[self.eNB_instance] == 'lte-softmodem') or (self.air_interface[self.eNB_instance] == 'ocp-enb')) and self.eNB_Trace=='yes': mySSH.open(lIpAddr, lUserName, lPassWord) mySSH.command('ip addr show | awk -f /tmp/active_net_interfaces.awk | egrep -v "lo|tun"', '\$', 5) result = re.search('interfaceToUse=(?P[a-zA-Z0-9\-\_]+)done', mySSH.getBefore()) @@ -594,7 +596,7 @@ class RANManagement(): mySSH.command('echo ' + lPassWord + ' | sudo -S killall --signal SIGKILL -r .*-softmodem ocp-enb || true', '\$', 5) time.sleep(5) mySSH.command('rm -f my-lte-softmodem-run' + str(self.eNB_instance) + '.sh', '\$', 5) - #stopping tshark on eNB side + #stopping tshark (valid if eNB and enabled in xml, will not harm otherwise) logging.debug('\u001B[1m Stopping tshark \u001B[0m') mySSH.command('echo ' + lPassWord + ' | sudo -S killall --signal SIGKILL tshark', '\$', 5) time.sleep(1) @@ -669,7 +671,7 @@ class RANManagement(): mySSH.open(self.eNBIPAddress, self.eNBUserName, self.eNBPassword) mySSH.command('cd ' + self.eNBSourceCodePath, '\$', 5) mySSH.command('cd cmake_targets', '\$', 5) - mySSH.command('echo ' + self.eNBPassword + ' | sudo -S cp /tmp/enb_*_s1x2log.pcap .','\$',20) + mySSH.command('echo ' + self.eNBPassword + ' | sudo -S mv /tmp/enb_*_s1x2log.pcap .','\$',20) mySSH.command('echo ' + self.eNBPassword + ' | sudo -S rm -f enb.log.zip', '\$', 5) mySSH.command('echo ' + self.eNBPassword + ' | sudo -S zip enb.log.zip enb*.log core* enb_*record.raw enb_*.pcap enb_*txt physim_*.log *stats.log', '\$', 60) mySSH.command('echo ' + self.eNBPassword + ' | sudo -S rm enb*.log core* enb_*record.raw enb_*.pcap enb_*txt physim_*.log *stats.log', '\$', 5) diff --git a/ci-scripts/xml_files/fr1_nsa_quectel.xml b/ci-scripts/xml_files/fr1_nsa_quectel.xml index 1deb81dd27..fbaa32aea7 100644 --- a/ci-scripts/xml_files/fr1_nsa_quectel.xml +++ b/ci-scripts/xml_files/fr1_nsa_quectel.xml @@ -65,6 +65,7 @@ 0 0 lte + yes From cd25915cd029fdb545ade12dee05a50c3bf0b687 Mon Sep 17 00:00:00 2001 From: hardy Date: Thu, 10 Jun 2021 13:18:35 +0200 Subject: [PATCH 484/579] new html log to detect errors (removing ue) --- ci-scripts/ran.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index 4f12dee5e5..20a8867922 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -729,6 +729,8 @@ class RANManagement(): real_time_stats = {} #count "problem receiving samples" msg pb_receiving_samples_cnt = 0 + #count "removing UE" msg + removing_ue = 0 #NSA specific log markers nsa_markers ={'SgNBReleaseRequestAcknowledge': [],'FAILURE': [], 'scgFailureInformationNR-r15': [], 'SgNBReleaseRequest': []} @@ -925,6 +927,10 @@ class RANManagement(): result = re.search('\[PHY\]\s+problem receiving samples', str(line)) if result is not None: pb_receiving_samples_cnt += 1 + #count "Removing UE" msg + result = re.search('\[MAC\]\s+Removing UE', str(line)) + if result is not None: + removing_ue += 1 #nsa markers logging for k in nsa_markers: @@ -1014,6 +1020,11 @@ class RANManagement(): htmleNBFailureMsg += statMsg else: + #Removing UE log + statMsg = '[MAC] Removing UE msg count = '+str(removing_ue) + htmlMsg = statMsg+'\n' + logging.debug(statMsg) + htmleNBFailureMsg += htmlMsg #nsa markers statMsg = 'logfile line count = ' + str(line_cnt) htmlMsg = statMsg+'\n' From dafa4487900abf905df96aef3948264942d9c474 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Thu, 10 Jun 2021 16:37:56 +0200 Subject: [PATCH 485/579] CI: fix command2, killing record process and building w/ ninja Signed-off-by: Raphael Defosseux --- ci-scripts/ran.py | 3 ++- ci-scripts/xml_files/enb_ue_usrp210_band7_build.xml | 2 +- ci-scripts/xml_files/enb_usrp210_band13_build.xml | 2 +- ci-scripts/xml_files/enb_usrp210_band40_build.xml | 2 +- ci-scripts/xml_files/enb_usrp210_band7_build.xml | 2 +- ci-scripts/xml_files/if4p5_usrp210_band40_build.xml | 2 +- ci-scripts/xml_files/if4p5_usrp210_band7_build.xml | 2 +- ci-scripts/xml_files/x2ho_enb_usrp210_band13_build.xml | 2 +- 8 files changed, 9 insertions(+), 8 deletions(-) diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index 20a8867922..470572f2ff 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -405,7 +405,7 @@ class RANManagement(): # do not reset board twice in IF4.5 case result = re.search('^rru|^enb|^du.band', str(config_file)) if result is not None: - mySSH.command2('echo ' + lPassWord + ' | sudo -S uhd_find_devices', '\$', 90) + mySSH.command('echo ' + lPassWord + ' | sudo -S uhd_find_devices', '\$', 90) result = re.search('type: b200', mySSH.getBefore()) if result is not None: logging.debug('Found a B2xx device --> resetting it') @@ -618,6 +618,7 @@ class RANManagement(): mySSH.close() logging.debug('\u001B[1m Replaying RAW record file\u001B[0m') mySSH.open(lIpAddr, lUserName, lPassWord) + mySSH.command('killall --signal SIGKILL record', '\$', 5) mySSH.command('cd ' + lSourcePath + '/common/utils/T/tracer/', '\$', 5) enbLogFile = self.eNBLogFiles[int(self.eNB_instance)] raw_record_file = enbLogFile.replace('.log', '_record.raw') diff --git a/ci-scripts/xml_files/enb_ue_usrp210_band7_build.xml b/ci-scripts/xml_files/enb_ue_usrp210_band7_build.xml index 64c3517166..bfaaceaa2d 100644 --- a/ci-scripts/xml_files/enb_ue_usrp210_band7_build.xml +++ b/ci-scripts/xml_files/enb_ue_usrp210_band7_build.xml @@ -32,7 +32,7 @@ Build_eNB Build eNB (USRP) - -w USRP -c --eNB + -w USRP -c --eNB --ninja diff --git a/ci-scripts/xml_files/enb_usrp210_band13_build.xml b/ci-scripts/xml_files/enb_usrp210_band13_build.xml index 888a1230ae..53066573c8 100644 --- a/ci-scripts/xml_files/enb_usrp210_band13_build.xml +++ b/ci-scripts/xml_files/enb_usrp210_band13_build.xml @@ -33,7 +33,7 @@ Build_eNB Build eNB (USRP) - -w USRP -c --eNB + -w USRP -c --eNB --ninja diff --git a/ci-scripts/xml_files/enb_usrp210_band40_build.xml b/ci-scripts/xml_files/enb_usrp210_band40_build.xml index 64c3517166..bfaaceaa2d 100644 --- a/ci-scripts/xml_files/enb_usrp210_band40_build.xml +++ b/ci-scripts/xml_files/enb_usrp210_band40_build.xml @@ -32,7 +32,7 @@ Build_eNB Build eNB (USRP) - -w USRP -c --eNB + -w USRP -c --eNB --ninja diff --git a/ci-scripts/xml_files/enb_usrp210_band7_build.xml b/ci-scripts/xml_files/enb_usrp210_band7_build.xml index 64c3517166..bfaaceaa2d 100644 --- a/ci-scripts/xml_files/enb_usrp210_band7_build.xml +++ b/ci-scripts/xml_files/enb_usrp210_band7_build.xml @@ -32,7 +32,7 @@ Build_eNB Build eNB (USRP) - -w USRP -c --eNB + -w USRP -c --eNB --ninja diff --git a/ci-scripts/xml_files/if4p5_usrp210_band40_build.xml b/ci-scripts/xml_files/if4p5_usrp210_band40_build.xml index ab221c918d..d383dbb61b 100644 --- a/ci-scripts/xml_files/if4p5_usrp210_band40_build.xml +++ b/ci-scripts/xml_files/if4p5_usrp210_band40_build.xml @@ -33,7 +33,7 @@ Build_eNB Build eNB (USRP -- Ethernet Fronthaul) - -w USRP -c --eNB + -w USRP -c --eNB --ninja diff --git a/ci-scripts/xml_files/if4p5_usrp210_band7_build.xml b/ci-scripts/xml_files/if4p5_usrp210_band7_build.xml index ab221c918d..d383dbb61b 100644 --- a/ci-scripts/xml_files/if4p5_usrp210_band7_build.xml +++ b/ci-scripts/xml_files/if4p5_usrp210_band7_build.xml @@ -33,7 +33,7 @@ Build_eNB Build eNB (USRP -- Ethernet Fronthaul) - -w USRP -c --eNB + -w USRP -c --eNB --ninja diff --git a/ci-scripts/xml_files/x2ho_enb_usrp210_band13_build.xml b/ci-scripts/xml_files/x2ho_enb_usrp210_band13_build.xml index c5a912a33d..0ac6bfcc0d 100644 --- a/ci-scripts/xml_files/x2ho_enb_usrp210_band13_build.xml +++ b/ci-scripts/xml_files/x2ho_enb_usrp210_band13_build.xml @@ -42,7 +42,7 @@ Build_eNB Build Slave eNB (USRP) - -w USRP -c --eNB + -w USRP -c --eNB --ninja 1 1 From 328664b4d607ee341e16a73de23f4698046cf6f1 Mon Sep 17 00:00:00 2001 From: hardy Date: Thu, 10 Jun 2021 21:55:28 +0200 Subject: [PATCH 486/579] remove benetel from nsa trigger (temporarily) --- ci-scripts/Jenkinsfile-trig-nsa | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ci-scripts/Jenkinsfile-trig-nsa b/ci-scripts/Jenkinsfile-trig-nsa index b9172225ca..8f623ffb05 100644 --- a/ci-scripts/Jenkinsfile-trig-nsa +++ b/ci-scripts/Jenkinsfile-trig-nsa @@ -36,7 +36,7 @@ pipeline { stage ("Launcher") { steps { script { - //retrieve MR that are opened nd with tag READY_TO_BE_MERGED + //retrieve MR that are opened nd with tag NSA MR_LIST= sh returnStdout: true, script: 'curl --silent "https://gitlab.eurecom.fr/api/v4/projects/oai%2Fopenairinterface5g/merge_requests?state=opened&per_page=100&labels=NSA" | jq ".[].iid" || true ' echo "List of selected MR:\n${MR_LIST}" def MR_ARRAY = MR_LIST.split('\n') @@ -48,7 +48,7 @@ pipeline { COMMIT_ID=COMMIT_ID.trim() echo "Testing NSA on : ${MR} ${SRC_BRANCH} ${COMMIT_ID}" //calling NSA sub job - build job: "RAN-CI-NSA-B210-N310-ModuleUE", wait : false, propagate : false, parameters: [ + build job: "RAN-NSA-Mini-Module", wait : false, propagate : false, parameters: [ string(name: 'eNB_MR', value: String.valueOf(MR)), string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)), string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)), @@ -56,13 +56,13 @@ pipeline { booleanParam(name: 'eNB_AllowMergeRequestProcess', value: Boolean.valueOf(ALLOW_MERGE)) ] //calling Benetel sub job - build job: "RAN-CI-BENETEL", wait : false, propagate : false, parameters: [ - string(name: 'eNB_MR', value: String.valueOf(MR)), - string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)), - string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)), - string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)), - booleanParam(name: 'eNB_AllowMergeRequestProcess', value: Boolean.valueOf(ALLOW_MERGE)) - ] + //build job: "RAN-CI-BENETEL", wait : false, propagate : false, parameters: [ + // string(name: 'eNB_MR', value: String.valueOf(MR)), + // string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)), + // string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)), + // string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)), + // booleanParam(name: 'eNB_AllowMergeRequestProcess', value: Boolean.valueOf(ALLOW_MERGE)) + //] } } } From 1c0640a21b766f989546de70aa33f8ebb4afdb45 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Fri, 11 Jun 2021 12:12:14 +0100 Subject: [PATCH 487/579] Remove SRB configuration from gNB in NSA --- openair2/RRC/NR/rrc_gNB_nsa.c | 12 +++--- openair2/RRC/NR/rrc_gNB_reconfig.c | 63 ++++++++++++++++-------------- 2 files changed, 40 insertions(+), 35 deletions(-) diff --git a/openair2/RRC/NR/rrc_gNB_nsa.c b/openair2/RRC/NR/rrc_gNB_nsa.c index e18895e0bd..6f64714b6c 100644 --- a/openair2/RRC/NR/rrc_gNB_nsa.c +++ b/openair2/RRC/NR/rrc_gNB_nsa.c @@ -377,7 +377,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_ nr_rrc_pdcp_config_asn1_req( &ctxt, - ue_context_p->ue_context.rb_config->srb_ToAddModList, + (NR_SRB_ToAddModList_t *) NULL, ue_context_p->ue_context.rb_config->drb_ToAddModList , ue_context_p->ue_context.rb_config->drb_ToReleaseList, (ue_context_p->ue_context.integrity_algorithm << 4) | ue_context_p->ue_context.ciphering_algorithm, @@ -390,11 +390,11 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_ ue_context_p->ue_context.secondaryCellGroup->rlc_BearerToAddModList); nr_rrc_rlc_config_asn1_req (&ctxt, - ue_context_p->ue_context.rb_config->srb_ToAddModList, - ue_context_p->ue_context.rb_config->drb_ToAddModList, - ue_context_p->ue_context.rb_config->drb_ToReleaseList, - (LTE_PMCH_InfoList_r9_t *) NULL, - ue_context_p->ue_context.secondaryCellGroup->rlc_BearerToAddModList); + (NR_SRB_ToAddModList_t *) NULL, + ue_context_p->ue_context.rb_config->drb_ToAddModList, + ue_context_p->ue_context.rb_config->drb_ToReleaseList, + (LTE_PMCH_InfoList_r9_t *) NULL, + ue_context_p->ue_context.secondaryCellGroup->rlc_BearerToAddModList); LOG_D(RRC, "%s:%d: done RRC PDCP/RLC ASN1 request for UE rnti %x\n", __FUNCTION__, __LINE__, ctxt.rnti); diff --git a/openair2/RRC/NR/rrc_gNB_reconfig.c b/openair2/RRC/NR/rrc_gNB_reconfig.c index 604ed7ffa4..1b9b2b8f42 100644 --- a/openair2/RRC/NR/rrc_gNB_reconfig.c +++ b/openair2/RRC/NR/rrc_gNB_reconfig.c @@ -164,23 +164,25 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco secondaryCellGroup->rlc_BearerToAddModList = calloc(1,sizeof(*secondaryCellGroup->rlc_BearerToAddModList)); ASN_SEQUENCE_ADD(&secondaryCellGroup->rlc_BearerToAddModList->list, RLC_BearerConfig); - NR_RLC_BearerConfig_t *RLC_BearerConfig_srb1 = calloc(1,sizeof(*RLC_BearerConfig_srb1)); - nr_rlc_bearer_init(RLC_BearerConfig_srb1, NR_RLC_BearerConfig__servedRadioBearer_PR_srb_Identity); - nr_drb_config(RLC_BearerConfig_srb1->rlc_Config, NR_RLC_Config_PR_am); - nr_rlc_bearer_init_ul_spec(RLC_BearerConfig_srb1->mac_LogicalChannelConfig); - // FIXME: this should be obtained in nr_rlc_bearer_init_ul_spec() - *RLC_BearerConfig_srb1->mac_LogicalChannelConfig->ul_SpecificParameters->logicalChannelGroup = 0; - ASN_SEQUENCE_ADD(&secondaryCellGroup->rlc_BearerToAddModList->list, RLC_BearerConfig_srb1); + if (0) { + NR_RLC_BearerConfig_t *RLC_BearerConfig_srb1 = calloc(1,sizeof(*RLC_BearerConfig_srb1)); + nr_rlc_bearer_init(RLC_BearerConfig_srb1, NR_RLC_BearerConfig__servedRadioBearer_PR_srb_Identity); + nr_drb_config(RLC_BearerConfig_srb1->rlc_Config, NR_RLC_Config_PR_am); + nr_rlc_bearer_init_ul_spec(RLC_BearerConfig_srb1->mac_LogicalChannelConfig); + // FIXME: this should be obtained in nr_rlc_bearer_init_ul_spec() + *RLC_BearerConfig_srb1->mac_LogicalChannelConfig->ul_SpecificParameters->logicalChannelGroup = 0; + ASN_SEQUENCE_ADD(&secondaryCellGroup->rlc_BearerToAddModList->list, RLC_BearerConfig_srb1); - NR_RLC_BearerConfig_t *RLC_BearerConfig_srb2 = calloc(1,sizeof(*RLC_BearerConfig_srb2)); - nr_rlc_bearer_init(RLC_BearerConfig_srb2, NR_RLC_BearerConfig__servedRadioBearer_PR_srb_Identity); - nr_drb_config(RLC_BearerConfig_srb2->rlc_Config, NR_RLC_Config_PR_am); - nr_rlc_bearer_init_ul_spec(RLC_BearerConfig_srb2->mac_LogicalChannelConfig); - // FIXME: this should be obtained in nr_rlc_bearer_init_ul_spec() - *RLC_BearerConfig_srb2->mac_LogicalChannelConfig->ul_SpecificParameters->logicalChannelGroup = 0; - RLC_BearerConfig_srb2->logicalChannelIdentity = 2; - RLC_BearerConfig_srb2->servedRadioBearer->choice.srb_Identity = 2; - ASN_SEQUENCE_ADD(&secondaryCellGroup->rlc_BearerToAddModList->list, RLC_BearerConfig_srb2); + NR_RLC_BearerConfig_t *RLC_BearerConfig_srb2 = calloc(1,sizeof(*RLC_BearerConfig_srb2)); + nr_rlc_bearer_init(RLC_BearerConfig_srb2, NR_RLC_BearerConfig__servedRadioBearer_PR_srb_Identity); + nr_drb_config(RLC_BearerConfig_srb2->rlc_Config, NR_RLC_Config_PR_am); + nr_rlc_bearer_init_ul_spec(RLC_BearerConfig_srb2->mac_LogicalChannelConfig); + // FIXME: this should be obtained in nr_rlc_bearer_init_ul_spec() + *RLC_BearerConfig_srb2->mac_LogicalChannelConfig->ul_SpecificParameters->logicalChannelGroup = 0; + RLC_BearerConfig_srb2->logicalChannelIdentity = 2; + RLC_BearerConfig_srb2->servedRadioBearer->choice.srb_Identity = 2; + ASN_SEQUENCE_ADD(&secondaryCellGroup->rlc_BearerToAddModList->list, RLC_BearerConfig_srb2); + } secondaryCellGroup->mac_CellGroupConfig=calloc(1,sizeof(*secondaryCellGroup->mac_CellGroupConfig)); secondaryCellGroup->mac_CellGroupConfig->drx_Config = NULL; @@ -1275,21 +1277,24 @@ void fill_default_rbconfig(NR_RadioBearerConfig_t *rbconfig, e_NR_CipheringAlgorithm ciphering_algorithm, e_NR_SecurityConfig__keyToUse key_to_use) { - rbconfig->srb_ToAddModList = calloc(1,sizeof(*rbconfig->srb_ToAddModList)); + rbconfig->srb_ToAddModList = NULL; - NR_SRB_ToAddMod_t *srb1_ToAddMod = calloc(1,sizeof(*srb1_ToAddMod)); - srb1_ToAddMod->srb_Identity = 1; - srb1_ToAddMod->reestablishPDCP = NULL; - srb1_ToAddMod->discardOnPDCP = NULL; - srb1_ToAddMod->pdcp_Config = NULL; - ASN_SEQUENCE_ADD(&rbconfig->srb_ToAddModList->list,srb1_ToAddMod); + if (0) { + rbconfig->srb_ToAddModList = calloc(1,sizeof(*rbconfig->srb_ToAddModList)); + NR_SRB_ToAddMod_t *srb1_ToAddMod = calloc(1,sizeof(*srb1_ToAddMod)); + srb1_ToAddMod->srb_Identity = 1; + srb1_ToAddMod->reestablishPDCP = NULL; + srb1_ToAddMod->discardOnPDCP = NULL; + srb1_ToAddMod->pdcp_Config = NULL; + ASN_SEQUENCE_ADD(&rbconfig->srb_ToAddModList->list,srb1_ToAddMod); - NR_SRB_ToAddMod_t *srb2_ToAddMod = calloc(1,sizeof(*srb2_ToAddMod)); - srb2_ToAddMod->srb_Identity = 2; - srb2_ToAddMod->reestablishPDCP = NULL; - srb2_ToAddMod->discardOnPDCP = NULL; - srb2_ToAddMod->pdcp_Config = NULL; - ASN_SEQUENCE_ADD(&rbconfig->srb_ToAddModList->list,srb2_ToAddMod); + NR_SRB_ToAddMod_t *srb2_ToAddMod = calloc(1,sizeof(*srb2_ToAddMod)); + srb2_ToAddMod->srb_Identity = 2; + srb2_ToAddMod->reestablishPDCP = NULL; + srb2_ToAddMod->discardOnPDCP = NULL; + srb2_ToAddMod->pdcp_Config = NULL; + ASN_SEQUENCE_ADD(&rbconfig->srb_ToAddModList->list,srb2_ToAddMod); + } rbconfig->srb3_ToRelease = NULL; rbconfig->drb_ToAddModList = calloc(1,sizeof(*rbconfig->drb_ToAddModList)); From 630b8b5806c36de229310504fc86d606e56684a8 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Fri, 11 Jun 2021 16:22:16 +0100 Subject: [PATCH 488/579] Differentiate NSA and SA in some pieces of code --- openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c | 1 - openair2/RRC/NR/rrc_gNB.c | 67 ++++++++++++----------- openair2/RRC/NR/rrc_gNB_nsa.c | 35 ++++++------ openair2/RRC/NR/rrc_gNB_reconfig.c | 4 +- 4 files changed, 54 insertions(+), 53 deletions(-) diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c index 8278a494be..20252e5376 100644 --- a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c +++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c @@ -1015,7 +1015,6 @@ void nr_DRB_preconfiguration(uint16_t crnti) PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, 0, ENB_FLAG_NO, crnti, 0, 0,0); } - // FIXME: integrity_algorithm was temporarily set to 0 nr_rrc_pdcp_config_asn1_req( &ctxt, (NR_SRB_ToAddModList_t *) NULL, diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index 0920b7ed17..c86586042d 100755 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -488,32 +488,33 @@ rrc_gNB_generate_RRCSetup( // configure MAC rrc_mac_config_req_gNB(rrc->module_id, - rrc->carrier.ssb_SubcarrierOffset, - rrc->carrier.pdsch_AntennaPorts, - rrc->carrier.pusch_AntennaPorts, - NULL, - 0, - ue_context_pP->ue_context.rnti, - ue_context_pP->ue_context.masterCellGroup - ); + rrc->carrier.ssb_SubcarrierOffset, + rrc->carrier.pdsch_AntennaPorts, + rrc->carrier.pusch_AntennaPorts, + NULL, + 0, + ue_context_pP->ue_context.rnti, + get_softmodem_params()->sa ? ue_context_pP->ue_context.masterCellGroup : (NR_CellGroupConfig_t *)NULL); + nr_rrc_rlc_config_asn1_req(ctxt_pP, - ue_context_pP->ue_context.SRB_configList, - NULL, - NULL, - NULL, - ue_context_pP->ue_context.masterCellGroup->rlc_BearerToAddModList); + ue_context_pP->ue_context.SRB_configList, + NULL, + NULL, + NULL, + get_softmodem_params()->sa ? ue_context_pP->ue_context.masterCellGroup->rlc_BearerToAddModList : NULL); + nr_rrc_pdcp_config_asn1_req(ctxt_pP, - ue_context_pP->ue_context.SRB_configList, - NULL, - NULL, - 0xff, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - ue_context_pP->ue_context.masterCellGroup->rlc_BearerToAddModList); + ue_context_pP->ue_context.SRB_configList, + NULL, + NULL, + 0xff, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + get_softmodem_params()->sa ? ue_context_pP->ue_context.masterCellGroup->rlc_BearerToAddModList : NULL); #endif } break; @@ -1267,23 +1268,23 @@ rrc_gNB_process_RRCReconfigurationComplete( SRB_configList, // NULL, DRB_configList, DRB_Release_configList2, - 0, // already configured during the securitymodecommand + 0xff, // already configured during the securitymodecommand kRRCenc, kRRCint, kUPenc, NULL, NULL, NULL, - ue_context_pP->ue_context.masterCellGroup->rlc_BearerToAddModList); + get_softmodem_params()->sa ? ue_context_pP->ue_context.masterCellGroup->rlc_BearerToAddModList : NULL); /* Refresh SRBs/DRBs */ if (!NODE_IS_CU(RC.nrrrc[ctxt_pP->module_id]->node_type)) { LOG_D(NR_RRC,"Configuring RLC DRBs/SRBs for UE %x\n",ue_context_pP->ue_context.rnti); nr_rrc_rlc_config_asn1_req(ctxt_pP, - SRB_configList, // NULL, - DRB_configList, - DRB_Release_configList2, - NULL, - ue_context_pP->ue_context.masterCellGroup->rlc_BearerToAddModList); + SRB_configList, // NULL, + DRB_configList, + DRB_Release_configList2, + NULL, + get_softmodem_params()->sa ? ue_context_pP->ue_context.masterCellGroup->rlc_BearerToAddModList : NULL); } #endif @@ -1891,7 +1892,9 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP, CC_id); // FIXME: Check the best place to perform this DRB configuration - nr_DRB_preconfiguration(ctxt_pP->rnti); + if(get_softmodem_params()->sa) { + nr_DRB_preconfiguration(ctxt_pP->rnti); + } } break; diff --git a/openair2/RRC/NR/rrc_gNB_nsa.c b/openair2/RRC/NR/rrc_gNB_nsa.c index 6f64714b6c..3313e9339b 100644 --- a/openair2/RRC/NR/rrc_gNB_nsa.c +++ b/openair2/RRC/NR/rrc_gNB_nsa.c @@ -375,26 +375,25 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_ ctxt.eNB_index); } - nr_rrc_pdcp_config_asn1_req( - &ctxt, - (NR_SRB_ToAddModList_t *) NULL, - ue_context_p->ue_context.rb_config->drb_ToAddModList , - ue_context_p->ue_context.rb_config->drb_ToReleaseList, - (ue_context_p->ue_context.integrity_algorithm << 4) | ue_context_p->ue_context.ciphering_algorithm, - NULL, /* kRRCenc - unused */ - NULL, /* kRRCint - unused */ - kUPenc, /* kUPenc */ - NULL, /* kUPint - unused */ - NULL, - NULL, - ue_context_p->ue_context.secondaryCellGroup->rlc_BearerToAddModList); + nr_rrc_pdcp_config_asn1_req(&ctxt, + get_softmodem_params()->sa ? ue_context_p->ue_context.rb_config->srb_ToAddModList : (NR_SRB_ToAddModList_t *) NULL, + ue_context_p->ue_context.rb_config->drb_ToAddModList , + ue_context_p->ue_context.rb_config->drb_ToReleaseList, + (ue_context_p->ue_context.integrity_algorithm << 4) | ue_context_p->ue_context.ciphering_algorithm, + NULL, /* kRRCenc - unused */ + NULL, /* kRRCint - unused */ + kUPenc, /* kUPenc */ + NULL, /* kUPint - unused */ + NULL, + NULL, + ue_context_p->ue_context.secondaryCellGroup->rlc_BearerToAddModList); nr_rrc_rlc_config_asn1_req (&ctxt, - (NR_SRB_ToAddModList_t *) NULL, - ue_context_p->ue_context.rb_config->drb_ToAddModList, - ue_context_p->ue_context.rb_config->drb_ToReleaseList, - (LTE_PMCH_InfoList_r9_t *) NULL, - ue_context_p->ue_context.secondaryCellGroup->rlc_BearerToAddModList); + get_softmodem_params()->sa ? ue_context_p->ue_context.rb_config->srb_ToAddModList : (NR_SRB_ToAddModList_t *) NULL, + ue_context_p->ue_context.rb_config->drb_ToAddModList, + ue_context_p->ue_context.rb_config->drb_ToReleaseList, + (LTE_PMCH_InfoList_r9_t *) NULL, + ue_context_p->ue_context.secondaryCellGroup->rlc_BearerToAddModList); LOG_D(RRC, "%s:%d: done RRC PDCP/RLC ASN1 request for UE rnti %x\n", __FUNCTION__, __LINE__, ctxt.rnti); diff --git a/openair2/RRC/NR/rrc_gNB_reconfig.c b/openair2/RRC/NR/rrc_gNB_reconfig.c index 1b9b2b8f42..11a7e653f5 100644 --- a/openair2/RRC/NR/rrc_gNB_reconfig.c +++ b/openair2/RRC/NR/rrc_gNB_reconfig.c @@ -164,7 +164,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco secondaryCellGroup->rlc_BearerToAddModList = calloc(1,sizeof(*secondaryCellGroup->rlc_BearerToAddModList)); ASN_SEQUENCE_ADD(&secondaryCellGroup->rlc_BearerToAddModList->list, RLC_BearerConfig); - if (0) { + if (get_softmodem_params()->sa) { NR_RLC_BearerConfig_t *RLC_BearerConfig_srb1 = calloc(1,sizeof(*RLC_BearerConfig_srb1)); nr_rlc_bearer_init(RLC_BearerConfig_srb1, NR_RLC_BearerConfig__servedRadioBearer_PR_srb_Identity); nr_drb_config(RLC_BearerConfig_srb1->rlc_Config, NR_RLC_Config_PR_am); @@ -1279,7 +1279,7 @@ void fill_default_rbconfig(NR_RadioBearerConfig_t *rbconfig, rbconfig->srb_ToAddModList = NULL; - if (0) { + if (get_softmodem_params()->sa) { rbconfig->srb_ToAddModList = calloc(1,sizeof(*rbconfig->srb_ToAddModList)); NR_SRB_ToAddMod_t *srb1_ToAddMod = calloc(1,sizeof(*srb1_ToAddMod)); srb1_ToAddMod->srb_Identity = 1; From 2a6ebaaaae035f49d9712d935c356f2e4e6f4bcc Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Tue, 8 Jun 2021 11:31:47 +0200 Subject: [PATCH 489/579] Fixes on the array size computation. This work is based on feedback from Thomas Schlichter. His comments and suggestions were made just after the original MR was merged. Signed-off-by: Raphael Defosseux --- common/utils/system.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/common/utils/system.c b/common/utils/system.c index 37622932ff..2ed986fe85 100644 --- a/common/utils/system.c +++ b/common/utils/system.c @@ -96,14 +96,14 @@ static void read_pipe(int p, char *b, int size) { } } -static int baseRunTimeCommand(char* cmd) { +static int baseRunTimeCommand(char* cmd, size_t cmdSize) { FILE *fp; size_t retSize = 0; fp = popen(cmd, "r"); - memset(cmd, 1, sizeof(*cmd)); - retSize = fread(cmd, 1, sizeof(*cmd), fp); + memset(cmd, 0, cmdSize); + retSize = fread(cmd, 1, cmdSize, fp); fclose(fp); if (retSize == 0) { @@ -115,26 +115,26 @@ static int baseRunTimeCommand(char* cmd) { int checkIfFedoraDistribution(void) { char cmd[200]; - memset(cmd, 1, 200); + memset(cmd, 0, 200); sprintf(cmd, "cat /etc/os-release | grep ID_LIKE | grep -ic fedora || true"); - return baseRunTimeCommand(cmd); + return baseRunTimeCommand(cmd, 200); } int checkIfGenericKernelOnFedora(void) { char cmd[200]; - memset(cmd, 1, 200); + memset(cmd, 0, 200); sprintf(cmd, "uname -a | grep -c rt || true"); - return (1 - baseRunTimeCommand(cmd)); + return (1 - baseRunTimeCommand(cmd, 200)); } int checkIfInsideContainer(void) { char cmd[200]; int res = 0; - memset(cmd, 1, 200); + memset(cmd, 0, 200); sprintf(cmd, "cat /proc/self/cgroup | egrep -c 'libpod|podman|kubepods' || true"); - res = baseRunTimeCommand(cmd); + res = baseRunTimeCommand(cmd, 200); if (res > 0) return 1; else From f0ff8b7cbe01afe120653b818bb60ac902468595 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Mon, 14 Jun 2021 17:57:48 +0100 Subject: [PATCH 490/579] Remove call nr_DRB_preconfiguration after rrc_gNB_generate_RRCSetup --- openair2/RRC/NR/rrc_gNB.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index c86586042d..d58de911db 100755 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -1890,11 +1890,6 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP, du_to_cu_rrc_container, gnb_rrc_inst->carrier.servingcellconfigcommon, CC_id); - - // FIXME: Check the best place to perform this DRB configuration - if(get_softmodem_params()->sa) { - nr_DRB_preconfiguration(ctxt_pP->rnti); - } } break; From 7011c0d97ebdb2a5e37cadc4a6cc8218619687e7 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Mon, 14 Jun 2021 19:03:40 +0100 Subject: [PATCH 491/579] Temporary assigment of incoming_rb_id in newGtpuCreateTunnel --- openair3/ocp-gtpu/gtp_itf.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openair3/ocp-gtpu/gtp_itf.cpp b/openair3/ocp-gtpu/gtp_itf.cpp index 0ff4d79b9a..b9ae610d67 100644 --- a/openair3/ocp-gtpu/gtp_itf.cpp +++ b/openair3/ocp-gtpu/gtp_itf.cpp @@ -404,7 +404,10 @@ teid_t newGtpuCreateTunnel(instance_t instance, rnti_t rnti, int incoming_bearer inst->te2ue_mapping[incoming_teid].rnti=rnti; - inst->te2ue_mapping[incoming_teid].incoming_rb_id= incoming_bearer_id; + inst->te2ue_mapping[incoming_teid].incoming_rb_id= outgoing_teid; + + LOG_I(GTPU, "incoming_bearer_id = %i\n",incoming_bearer_id); + LOG_I(GTPU, "outgoing_teid = %i\n",outgoing_teid); inst->te2ue_mapping[incoming_teid].callBack=callBack; From 5b5b48d32b1669d42715ff5eed8983bce8c060c5 Mon Sep 17 00:00:00 2001 From: Roberto Louro Magueta Date: Mon, 14 Jun 2021 20:52:37 +0200 Subject: [PATCH 492/579] Revert "Temporary assigment of incoming_rb_id in newGtpuCreateTunnel" This reverts commit 7011c0d97ebdb2a5e37cadc4a6cc8218619687e7 --- openair3/ocp-gtpu/gtp_itf.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/openair3/ocp-gtpu/gtp_itf.cpp b/openair3/ocp-gtpu/gtp_itf.cpp index b9ae610d67..0ff4d79b9a 100644 --- a/openair3/ocp-gtpu/gtp_itf.cpp +++ b/openair3/ocp-gtpu/gtp_itf.cpp @@ -404,10 +404,7 @@ teid_t newGtpuCreateTunnel(instance_t instance, rnti_t rnti, int incoming_bearer inst->te2ue_mapping[incoming_teid].rnti=rnti; - inst->te2ue_mapping[incoming_teid].incoming_rb_id= outgoing_teid; - - LOG_I(GTPU, "incoming_bearer_id = %i\n",incoming_bearer_id); - LOG_I(GTPU, "outgoing_teid = %i\n",outgoing_teid); + inst->te2ue_mapping[incoming_teid].incoming_rb_id= incoming_bearer_id; inst->te2ue_mapping[incoming_teid].callBack=callBack; From 1198ef18dc523bdf3825ab847b052bb935cb9c29 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Tue, 15 Jun 2021 15:35:53 +0200 Subject: [PATCH 493/579] Add missing function calls for proper gtp-u initialization in NSA scenario --- executables/nr-softmodem.c | 4 ++++ openair2/GNB_APP/gnb_app.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/executables/nr-softmodem.c b/executables/nr-softmodem.c index 929aeb672a..632e2d8d30 100644 --- a/executables/nr-softmodem.c +++ b/executables/nr-softmodem.c @@ -388,6 +388,10 @@ int create_gNB_tasks(uint32_t gnb_nb) { LOG_E(NR_RRC, "Create task for NR RRC gNB failed\n"); return -1; } + if (itti_create_task (TASK_GTPV1_U, &nr_gtpv1u_gNB_task, NULL) < 0) { + LOG_E(GTPU, "Create task for GTPV1U failed\n"); + return -1; + } } return 0; diff --git a/openair2/GNB_APP/gnb_app.c b/openair2/GNB_APP/gnb_app.c index 83869f2591..66302d056b 100644 --- a/openair2/GNB_APP/gnb_app.c +++ b/openair2/GNB_APP/gnb_app.c @@ -212,8 +212,8 @@ void *gNB_app_task(void *args_p) } /* For the CU case the gNB registration with the AMF might have to take place after the F1 setup, as the PLMN info - * can originate from the DU. */ - if (AMF_MODE_ENABLED && !NODE_IS_DU(RC.nrrrc[0]->node_type) && !NODE_IS_CU(RC.nrrrc[0]->node_type)) { + * can originate from the DU. Add check on whether x2ap is enabled to account for ENDC NSA scenario.*/ + if ((AMF_MODE_ENABLED || is_x2ap_enabled()) && !NODE_IS_DU(RC.nrrrc[0]->node_type) && !NODE_IS_CU(RC.nrrrc[0]->node_type)) { /* Try to register each gNB */ //registered_gnb = 0; __attribute__((unused)) uint32_t register_gnb_pending = gNB_app_register (gnb_id_start, gnb_id_end); From 66ab8e12a58726b122bc8e9589c47a94724de348 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Tue, 15 Jun 2021 16:36:54 +0200 Subject: [PATCH 494/579] Avoid double call of gtpu task and call it only for the NSA and SA scenarios --- executables/nr-softmodem.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/executables/nr-softmodem.c b/executables/nr-softmodem.c index 632e2d8d30..4727d09b04 100644 --- a/executables/nr-softmodem.c +++ b/executables/nr-softmodem.c @@ -370,10 +370,10 @@ int create_gNB_tasks(uint32_t gnb_nb) { } } - if (itti_create_task (TASK_GTPV1_U, &nr_gtpv1u_gNB_task, NULL) < 0) { + /*if (itti_create_task (TASK_GTPV1_U, &nr_gtpv1u_gNB_task, NULL) < 0) { LOG_E(GTPU, "Create task for GTPV1U failed\n"); return -1; - } + }*/ } } @@ -388,9 +388,12 @@ int create_gNB_tasks(uint32_t gnb_nb) { LOG_E(NR_RRC, "Create task for NR RRC gNB failed\n"); return -1; } - if (itti_create_task (TASK_GTPV1_U, &nr_gtpv1u_gNB_task, NULL) < 0) { - LOG_E(GTPU, "Create task for GTPV1U failed\n"); - return -1; + //Use check on x2ap to consider the NSA scenario and check on AMF_MODE_ENABLED for the SA scenario + if(is_x2ap_enabled() || AMF_MODE_ENABLED){ + if (itti_create_task (TASK_GTPV1_U, &nr_gtpv1u_gNB_task, NULL) < 0) { + LOG_E(GTPU, "Create task for GTPV1U failed\n"); + return -1; + } } } From 534a58c5583ea1a49e5e8e75fe0a402f545f580e Mon Sep 17 00:00:00 2001 From: hardy Date: Tue, 15 Jun 2021 09:58:43 +0200 Subject: [PATCH 495/579] fix iperf + tune max_rxgain for our setup --- ci-scripts/cls_oaicitest.py | 9 ++++++++- .../conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf | 2 +- .../conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf | 2 +- ci-scripts/xml_files/fr1_nsa_quectel.xml | 4 ++-- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index 809af4ebec..d3d1d70c13 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -2234,7 +2234,7 @@ class OaiCiTest(): SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password) cmd = 'rm iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' SSH.command(cmd,'\$',5) - cmd = 'echo $USER; nohup iperf -s -i 1 -u 2>&1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' + cmd = 'echo $USER; nohup iperf -s -u 2>&1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' SSH.command(cmd,'\$',5) #client side UE @@ -2252,6 +2252,13 @@ class OaiCiTest(): else : logging.debug("Incorrect or missing IPERF direction in XML") + SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword) + cmd = 'killall --signal=SIGKILL iperf' + SSH.command(cmd,'\$',5) + SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password) + cmd = 'killall --signal=SIGKILL iperf' + SSH.command(cmd,'\$',5) + SSH.close() return diff --git a/ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf b/ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf index 33aae14dac..ca1710ca47 100644 --- a/ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf +++ b/ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf @@ -264,7 +264,7 @@ RUs = ( att_rx = 0; bands = [7]; max_pdschReferenceSignalPower = -27; - max_rxgain = 118; + max_rxgain = 115; eNB_instances = [0]; # clock_src = "external"; } diff --git a/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf b/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf index f0d5130f83..72e0e19c6a 100644 --- a/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf +++ b/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf @@ -248,7 +248,7 @@ RUs = ( att_rx = 0; bands = [7]; max_pdschReferenceSignalPower = -27; - max_rxgain = 114; + max_rxgain = 111; eNB_instances = [0]; # clock_src = "external"; } diff --git a/ci-scripts/xml_files/fr1_nsa_quectel.xml b/ci-scripts/xml_files/fr1_nsa_quectel.xml index fbaa32aea7..2e8c07968d 100644 --- a/ci-scripts/xml_files/fr1_nsa_quectel.xml +++ b/ci-scripts/xml_files/fr1_nsa_quectel.xml @@ -110,7 +110,7 @@ Iperf iperf (DL/20Mbps/UDP)(60 sec)(single-ue profile) - -u -b 20M -t 60 -i 1 + -u -b 20M -t 60 DL idefix 50 @@ -120,7 +120,7 @@ Iperf iperf (UL/3Mbps/UDP)(60 sec)(single-ue profile) - -u -b 3M -t 60 -i 1 + -u -b 3M -t 60 UL idefix 50 From 5ef64f467a522316c1a9370a0322273ccc5dff5d Mon Sep 17 00:00:00 2001 From: hardy Date: Wed, 16 Jun 2021 13:40:08 +0200 Subject: [PATCH 496/579] update att_tx in config to improve 5g attach in our setup --- ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf | 2 +- ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf b/ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf index ca1710ca47..056c4bdb6a 100644 --- a/ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf +++ b/ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf @@ -260,7 +260,7 @@ RUs = ( local_rf = "yes" nb_tx = 1 nb_rx = 1 - att_tx = 0 + att_tx = 3 att_rx = 0; bands = [7]; max_pdschReferenceSignalPower = -27; diff --git a/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf b/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf index 72e0e19c6a..5838e96999 100644 --- a/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf +++ b/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf @@ -244,7 +244,7 @@ RUs = ( local_rf = "yes" nb_tx = 1 nb_rx = 1 - att_tx = 0 + att_tx = 3 att_rx = 0; bands = [7]; max_pdschReferenceSignalPower = -27; From 5bce383cc9d9de5464715e18cf0745e48cb5c84b Mon Sep 17 00:00:00 2001 From: matzakos Date: Wed, 16 Jun 2021 22:44:02 +0200 Subject: [PATCH 497/579] Remove X2 data RB tree entry at eNB after receiving sctp shutdown event from gNB -If the gNB crashes when the X2 connection is established with the eNB, an sctp shutdown event is received from the eNB. However the x2 data related with the connection were not removed from the RB tree. Then if the gNB tried to reconnect, it made the eNB exit because the eNB had kept the previous data. Now we remove the x2 data as soon as the sctp shutdown event is received so that the eNB does not exit anymore at the next connection attempts. --- openair2/X2AP/x2ap_eNB.c | 5 +++++ openair3/SCTP/sctp_eNB_task.c | 1 + 2 files changed, 6 insertions(+) diff --git a/openair2/X2AP/x2ap_eNB.c b/openair2/X2AP/x2ap_eNB.c index 0474d417df..84900ca581 100644 --- a/openair2/X2AP/x2ap_eNB.c +++ b/openair2/X2AP/x2ap_eNB.c @@ -116,6 +116,11 @@ void x2ap_eNB_handle_sctp_association_resp(instance_t instance, sctp_new_associa /* some sanity check - to be refined at some point */ if (sctp_new_association_resp->sctp_state != SCTP_STATE_ESTABLISHED) { X2AP_ERROR("x2ap_enb_data_p not NULL and sctp state not SCTP_STATE_ESTABLISHED, what to do?\n"); + if (sctp_new_association_resp->sctp_state == SCTP_STATE_SHUTDOWN){ + RB_REMOVE(x2ap_enb_map, &instance_p->x2ap_enb_head, x2ap_enb_data_p); + return; + } + exit(1); } diff --git a/openair3/SCTP/sctp_eNB_task.c b/openair3/SCTP/sctp_eNB_task.c index af49c5c350..912675ad1c 100644 --- a/openair3/SCTP/sctp_eNB_task.c +++ b/openair3/SCTP/sctp_eNB_task.c @@ -985,6 +985,7 @@ sctp_eNB_read_from_socket( if (SCTP_SHUTDOWN_EVENT == snp->sn_header.sn_type) { itti_unsubscribe_event_fd(TASK_SCTP, sctp_cnx->sd); + SCTP_DEBUG("Received SCTP SHUTDOWN EVENT\n"); close(sctp_cnx->sd); sctp_itti_send_association_resp( From 1c244de78220298c709e72fd977563459f1a8584 Mon Sep 17 00:00:00 2001 From: Thomas Schlichter Date: Wed, 16 Jun 2021 16:59:04 +0200 Subject: [PATCH 498/579] gNB: add nrOfLayers to sched_pdsch --- openair1/SIMULATION/NR_PHY/dlsim.c | 5 +++-- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c | 3 +-- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c | 5 +++-- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c | 3 ++- openair2/LAYER2/NR_MAC_gNB/mac_proto.h | 3 +-- openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h | 1 + 6 files changed, 11 insertions(+), 9 deletions(-) diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index 3c9511f05e..c1a58abb32 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -257,6 +257,7 @@ void nr_dlsim_preprocessor(module_id_t module_id, * configuration */ ps->mcsTableIdx = g_mcsTableIdx; + sched_pdsch->nrOfLayers = g_nrOfLayers; sched_pdsch->Qm = nr_get_Qm_dl(sched_pdsch->mcs, ps->mcsTableIdx); sched_pdsch->R = nr_get_code_rate_dl(sched_pdsch->mcs, ps->mcsTableIdx); sched_pdsch->tb_size = nr_compute_tbs(sched_pdsch->Qm, @@ -266,7 +267,7 @@ void nr_dlsim_preprocessor(module_id_t module_id, ps->N_PRB_DMRS * ps->N_DMRS_SLOT, 0 /* N_PRB_oh, 0 for initialBWP */, 0 /* tb_scaling */, - g_nrOfLayers) + sched_pdsch->nrOfLayers) >> 3; /* the simulator assumes the HARQ PID is equal to the slot number */ @@ -1002,7 +1003,7 @@ int main(int argc, char **argv) gNB_mac->UE_info.num_pdcch_cand[0][i] = 0; if (css_flag == 0) { - nr_schedule_ue_spec(0, frame, slot, g_nrOfLayers); + nr_schedule_ue_spec(0, frame, slot); } else { nr_schedule_css_dlsch_phytest(0,frame,slot); } diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c index b8ab8febb4..36f687b5cd 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c @@ -326,7 +326,6 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, ENB_FLAG_YES, NOT_A_RNTI, frame, slot,module_idP); const int bwp_id = 1; - uint8_t nrOfLayers = 1; gNB_MAC_INST *gNB = RC.nrmac[module_idP]; NR_COMMON_channels_t *cc = gNB->common_channels; @@ -419,7 +418,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, nr_schedule_ulsch(module_idP, frame, slot); // This schedules the DCI for Downlink and PDSCH - nr_schedule_ue_spec(module_idP, frame, slot, nrOfLayers); + nr_schedule_ue_spec(module_idP, frame, slot); nr_schedule_pucch(module_idP, frame, slot); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index ea40a3f907..373d472135 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -571,6 +571,7 @@ void pf_dl(module_id_t module_id, /* Calculate coeff */ sched_pdsch->mcs = 9; + sched_pdsch->nrOfLayers = 1; uint32_t tbs = pf_tbs[ps->mcsTableIdx][sched_pdsch->mcs]; coeff_ue[UE_id] = (float) tbs / thr_ue[UE_id]; LOG_D(MAC,"b %d, thr_ue[%d] %f, tbs %d, coeff_ue[%d] %f\n", @@ -747,8 +748,7 @@ nr_pp_impl_dl nr_init_fr1_dlsch_preprocessor(module_id_t module_id, int CC_id) void nr_schedule_ue_spec(module_id_t module_id, frame_t frame, - sub_frame_t slot, - uint8_t nrOfLayers) { + sub_frame_t slot) { gNB_MAC_INST *gNB_mac = RC.nrmac[module_id]; if (!is_xlsch_in_slot(gNB_mac->dlsch_slot_bitmap[slot / 64], slot)) return; @@ -783,6 +783,7 @@ void nr_schedule_ue_spec(module_id_t module_id, const rnti_t rnti = UE_info->rnti[UE_id]; /* POST processing */ + const uint8_t nrOfLayers = sched_pdsch->nrOfLayers; const uint16_t R = sched_pdsch->R; const uint8_t Qm = sched_pdsch->Qm; const uint32_t TBS = sched_pdsch->tb_size; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c index adfcd79b8e..0d51bc8c22 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c @@ -370,6 +370,7 @@ void nr_preprocessor_phytest(module_id_t module_id, nr_set_pdsch_semi_static( scc, UE_info->secondaryCellGroup[UE_id], sched_ctrl->active_bwp, tda, num_dmrs_cdm_grps_no_data, ps); + sched_pdsch->nrOfLayers = 1; sched_pdsch->mcs = target_dl_mcs; sched_pdsch->Qm = nr_get_Qm_dl(sched_pdsch->mcs, ps->mcsTableIdx); sched_pdsch->R = nr_get_code_rate_dl(sched_pdsch->mcs, ps->mcsTableIdx); @@ -380,7 +381,7 @@ void nr_preprocessor_phytest(module_id_t module_id, ps->N_PRB_DMRS * ps->N_DMRS_SLOT, 0 /* N_PRB_oh, 0 for initialBWP */, 0 /* tb_scaling */, - 1 /* nrOfLayers */) + sched_pdsch->nrOfLayers) >> 3; /* get the PID of a HARQ process awaiting retransmission, or -1 otherwise */ diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h index 0a14afd2d0..1010ebafda 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h +++ b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h @@ -72,8 +72,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, * messages, statistics, HARQ handling, CEs, ... */ void nr_schedule_ue_spec(module_id_t module_id, frame_t frame, - sub_frame_t slot, - uint8_t nrOfLayers); + sub_frame_t slot); /* \brief default FR1 DL preprocessor init routine, returns preprocessor to call */ nr_pp_impl_dl nr_init_fr1_dlsch_preprocessor(module_id_t module_id, int CC_id); diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h index c1ec27580f..fadde38808 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h +++ b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h @@ -382,6 +382,7 @@ typedef struct NR_sched_pdsch { uint8_t mcs; /// TBS-related info + uint8_t nrOfLayers; uint16_t R; uint8_t Qm; uint32_t tb_size; From 8371109a9369bed0d89dbfe961c2f89d4a021b05 Mon Sep 17 00:00:00 2001 From: Remi Hardy Date: Wed, 16 Jun 2021 22:22:34 +0200 Subject: [PATCH 499/579] adding new class for log mgt/rotation on remote servers --- ci-scripts/cls_log_mgt.py | 103 ++++++++++++++++++++++++++++++++++++ ci-scripts/cls_module_ue.py | 8 +++ 2 files changed, 111 insertions(+) create mode 100644 ci-scripts/cls_log_mgt.py diff --git a/ci-scripts/cls_log_mgt.py b/ci-scripts/cls_log_mgt.py new file mode 100644 index 0000000000..36e7d51a4b --- /dev/null +++ b/ci-scripts/cls_log_mgt.py @@ -0,0 +1,103 @@ +# * 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 +# */ +#--------------------------------------------------------------------- +# +# Required Python Version +# Python 3.x +# +#--------------------------------------------------------------------- + +#USAGE: +# log=Log_Mgt(IPAddress,Password,Path) +# log.LogRotation() + + + + +import re +import subprocess +import logging +import math + +class Log_Mgt: + + def __init__(self,IPAddress,Password,Path): + self.IPAddress=IPAddress + self.Password=Password + self.path=Path + +#-----------------$ +#PRIVATE# Methods$ +#-----------------$ + + + def __CheckAvailSpace(self): + HOST=self.IPAddress + COMMAND="df "+ self.path + ssh = subprocess.Popen(["ssh", "%s" % HOST, COMMAND],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE) + result = ssh.stdout.readlines() + s=result[1].decode('utf-8').rstrip()#result[1] is the second line with the results we are looking for + tmp=s.split() + return tmp[3] #return avail space from the line + + def __GetOldestFile(self): + HOST=self.IPAddress + COMMAND="ls -rtl "+ self.path #-rtl will bring oldest file on top + ssh = subprocess.Popen(["ssh", "%s" % HOST, COMMAND],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE) + result = ssh.stdout.readlines() + s=result[1].decode('utf-8').rstrip() + tmp=s.split() + return tmp[8]#return filename from the line + + + def __AvgSize(self): + HOST=self.IPAddress + COMMAND="ls -rtl "+ self.path + ssh = subprocess.Popen(["ssh", "%s" % HOST, COMMAND],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE) + result = ssh.stdout.readlines() + total_size=0 + for i in range(1,len(result)): + s=result[i].decode('utf-8').rstrip() + tmp=s.split() + total_size+=int(tmp[4]) #get filesize + return math.floor(total_size/(len(result)-1)) #compute average file/artifact size + + +#-----------------$ +#PUBLIC Methods$ +#-----------------$ + + + def LogRotation(self): + avail_space =int(self.__CheckAvailSpace())*1000 #avail space in target folder, initially displayed in Gb + avg_size=self.__AvgSize() #average size of artifacts in the target folder + logging.debug("Avail Space : " + str(avail_space) + " / Artifact Avg Size : " + str(avg_size)) + if avail_space < 2*avg_size: #reserved space is 2x artifact file ; oldest file will be deleted + oldestfile=self.__GetOldestFile() + HOST=self.IPAddress + COMMAND="echo " + self.Password + " | sudo -S rm "+ self.path + "/" + oldestfile + logging.debug(COMMAND) + ssh = subprocess.Popen(["ssh", "%s" % HOST, COMMAND],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE) + else: + logging.debug("Still some space left for artifacts storage") + + + + diff --git a/ci-scripts/cls_module_ue.py b/ci-scripts/cls_module_ue.py index f93cb9f036..7f5c81d988 100644 --- a/ci-scripts/cls_module_ue.py +++ b/ci-scripts/cls_module_ue.py @@ -39,6 +39,9 @@ import subprocess from datetime import datetime +#for log rotation mgt +import cls_log_mgt + class Module_UE: def __init__(self,Module): @@ -157,6 +160,11 @@ class Module_UE: now_string = now.strftime("%Y%m%d-%H%M") source='ci_qlog' destination='/opt/ci_qlogs/ci_qlog_'+now_string+'.zip' + #qlog artifact is zipped into the target folder mySSH.command('echo $USER; echo ' + self.HostPassword + ' | nohup sudo -S zip -r '+destination+' '+source+' &','\$', 10) mySSH.close() + #post action : log cleaning to make sure enough space is reserved for the next run + Log_Mgt=cls_log_mgt.Log_Mgt(self.HostIPAddress, self.HostPassword, "/opt/ci_qlogs") + Log_Mgt.LogRotation() + return destination From 569dfb1420af7f7347b107573f39aa261d19ef13 Mon Sep 17 00:00:00 2001 From: hardy Date: Thu, 17 Jun 2021 15:25:09 +0200 Subject: [PATCH 500/579] change storage location of zipped qlog --- ci-scripts/cls_module_ue.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ci-scripts/cls_module_ue.py b/ci-scripts/cls_module_ue.py index 7f5c81d988..cb5c81e271 100644 --- a/ci-scripts/cls_module_ue.py +++ b/ci-scripts/cls_module_ue.py @@ -134,7 +134,7 @@ class Module_UE: mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword) #delete old artifacts mySSH.command('echo ' + self.HostPassword + ' | sudo -S rm -rf ci_qlog','\$',5) - #start Trace + #start Trace, artifact is created in home dir mySSH.command('echo $USER; nohup sudo -E QLog/QLog -s ci_qlog -f NR5G.cfg &','\$', 5) mySSH.close() @@ -155,16 +155,16 @@ class Module_UE: def LogCollect(self): mySSH = sshconnection.SSHConnection() mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword) - #archive qlog to /opt/ci_qlogs with datetime suffix + #archive qlog to USB stick in /media/usb-drive/ci_qlogs with datetime suffix now=datetime.now() now_string = now.strftime("%Y%m%d-%H%M") source='ci_qlog' - destination='/opt/ci_qlogs/ci_qlog_'+now_string+'.zip' + destination='/media/usb-drive/ci_qlogs/ci_qlog_'+now_string+'.zip' #qlog artifact is zipped into the target folder mySSH.command('echo $USER; echo ' + self.HostPassword + ' | nohup sudo -S zip -r '+destination+' '+source+' &','\$', 10) mySSH.close() #post action : log cleaning to make sure enough space is reserved for the next run - Log_Mgt=cls_log_mgt.Log_Mgt(self.HostIPAddress, self.HostPassword, "/opt/ci_qlogs") + Log_Mgt=cls_log_mgt.Log_Mgt(self.HostIPAddress, self.HostPassword, "/media/usb-drive/ci_qlogs") Log_Mgt.LogRotation() return destination From 7076ac9afc2e2d296fc54ca7dd73ad39744f7645 Mon Sep 17 00:00:00 2001 From: Panos Matzakos Date: Thu, 17 Jun 2021 13:30:48 +0000 Subject: [PATCH 501/579] Initiate tutorial for 5G SA setups (work in progress) --- doc/TESTING_5GSA_setup.md | 108 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 doc/TESTING_5GSA_setup.md diff --git a/doc/TESTING_5GSA_setup.md b/doc/TESTING_5GSA_setup.md new file mode 100644 index 0000000000..a3df436c41 --- /dev/null +++ b/doc/TESTING_5GSA_setup.md @@ -0,0 +1,108 @@ + +# OAI 5G SA tutorial [Under construction] + +In the following tutorial we describe how to deploy configure and test the two SA OAI setups: + + - SA setup with OAI gNB and COTS UE + - SA setup with OAI gNB and OAI UE + +The operating system and hardware requirements to support OAI 5G NR are described [here](https://gitlab.eurecom.fr/oai/openairinterface5g/-/wikis/5g-nr-development-and-setup). + +# 1. SA setup with COTS UE +At the moment of writing this document interoperability with the following COTS UE devices is being tested: + + - [Quectel RM500Q-GL](https://www.quectel.com/product/5g-rm500q-gl/) + - [Simcom SIMCOM8200EA](https://www.simcom.com/product/SIM8200G.html) + - Huawei Mate 30 Pro + + End-to-end control plane signaling to achieve a 5G SA connection, UE registration and PDU session establishment with the CN, as well as some basic user-plane traffic tests have been validated so far using the Quectel module and Huawei Mate 30 pro and partially validated with SIMCOM module. In terms of interoperability with different 5G Core Networks, so far this setup has been tested with: + + + - [OAI CN](https://openairinterface.org/oai-5g-core-network-project/) + - Nokia SA Box + - [Free CN](https://www.free5gc.org/) + + + ## 1.1 gNB build and configuration +At the moment of writing this document most of the code to support the SA setup is not merged into develop branch yet, but it is accessible through the following branches: + + - NR_SA_F1AP_5GRECORDS + - develop-NR_SA_F1AP_5GRECORDS (up-to-date with latest develop branch) + +To build the gNB executable: +```bash + cd cmake_targets + ./build_oai -I -w USRP #For first time installation only to install software dependencies + ./build_oai --gNB -w USRP +``` + +A reference configuration file for the gNB is provided [here](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop-NR_SA_F1AP_5GRECORDS/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf). + + +In the following, we highlight the fields of the file that have to be configured according to the configuration and interfaces of the Core Network. First, the PLMN section has to be filled with the proper values that match the configuration of the AMF and the UE USIM. +```bash + // Tracking area code, 0x0000 and 0xfffe are reserved values + tracking_area_code = 1; + plmn_list = ({ + mcc = 208; + mnc = 99; + mnc_length = 2; + snssaiList = ( + { + sst = 1; + sd = 0x1; // 0 false, else true + }, + { + sst = 1; + sd = 0x112233; // 0 false, else true + } + ); + }); +``` +Then, the source and destination IP interfaces for the communication with +the Core Network also need to be set as shown below. + +```bash + ////////// MME parameters: + amf_ip_address = ( { ipv4 = "192.168.70.132"; + ipv6 = "192:168:30::17"; + active = "yes"; + preference = "ipv4"; + } + ); + NETWORK_INTERFACES : + { + GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai"; + GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.70.129/24"; + GNB_INTERFACE_NAME_FOR_NGU = "demo-oai"; + GNB_IPV4_ADDRESS_FOR_NGU = "192.168.70.129/24"; + GNB_PORT_FOR_S1U = 2152; # Spec 2152 + }; +``` +In the first part (*amf_ip_address*) we specify the IP of the AMF and in the second part (*NETWORK_INTERFACES*) we specify the gNB local interface with AMF (N2 interface) and the UPF (N3 interface). + +### **gNB configuration in CU/DU split mode** +For the configuration of the gNB in CU and DU blocks the following sample configuration files are provided for the CU and DU entities respectively. +...... +At the point of writing this document the control-plane exchanges between the CU and the DU over *F1-C* interface have been validated. The integration of *F1-U* over gtp-u for the support of data plane traffic is ongoing. + +## 1.2 OAI 5G Core Network installation and configuration +The instructions for the installation of OAI CN components (AMF, SMF, NRF, UPF) using docker compose can be found [here](https://gitlab.eurecom.fr/oai/cn5g). Below are some complementary instructions which can be useful for the deployment... + + + ## 1.3 Execution of SA scenario + +After having configured the gNB, we can start the individual components in the following sequence: + + - Launch Core Network + - Launch gNB + - Launch COTS UE (disable airplane mode) + +The execution command to start the gNB is the following: +```bash +cd cmake_targets/ran_build/cuild +sudo ./nr-softmodem -E --sa -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf +``` + +# 2. SA Setup with OAI UE +For the setup with the OAI UE From 6fb9f92b84f71ae53383fedc32d2bfca9b9da9c8 Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Thu, 17 Jun 2021 16:40:34 +0200 Subject: [PATCH 502/579] replace itti message GTPV1U_DELETE_TUNNEL_REQ by direct call to gtpv1u_delete_s1u_tunnel() --- openair2/RRC/NR/rrc_gNB.c | 6 +----- openair2/RRC/NR/rrc_gNB_nsa.c | 20 ++++++-------------- targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp | 10 ++++------ 3 files changed, 11 insertions(+), 25 deletions(-) diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index d58de911db..4a1187c0b4 100755 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -2946,11 +2946,7 @@ void *rrc_gnb_task(void *args_p) { ///Nothing to do. Apparently everything is done in S1AP processing //LOG_I(RRC, "[eNB %d] Received message %s, not processed because procedure not synched\n", //instance, msg_name_p); - if (rrc_eNB_get_ue_context(RC.nrrrc[instance], GTPV1U_ENB_DELETE_TUNNEL_RESP(msg_p).rnti) - && rrc_eNB_get_ue_context(RC.nrrrc[instance], GTPV1U_ENB_DELETE_TUNNEL_RESP(msg_p).rnti)->ue_context.ue_release_timer_rrc > 0) { - rrc_eNB_get_ue_context(RC.nrrrc[instance], GTPV1U_ENB_DELETE_TUNNEL_RESP(msg_p).rnti)->ue_context.ue_release_timer_rrc = - rrc_eNB_get_ue_context(RC.nrrrc[instance], GTPV1U_ENB_DELETE_TUNNEL_RESP(msg_p).rnti)->ue_context.ue_release_timer_thres_rrc; - } + AssertFatal(false, "Removed double mechanism for same feature: now delete_tunnel() function should be called\n"); break; #endif diff --git a/openair2/RRC/NR/rrc_gNB_nsa.c b/openair2/RRC/NR/rrc_gNB_nsa.c index 3313e9339b..f8cc951bc3 100644 --- a/openair2/RRC/NR/rrc_gNB_nsa.c +++ b/openair2/RRC/NR/rrc_gNB_nsa.c @@ -402,7 +402,6 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_ void rrc_remove_nsa_user(gNB_RRC_INST *rrc, int rnti) { protocol_ctxt_t ctxt; rrc_gNB_ue_context_t *ue_context; - MessageDef *msg_delete_tunnels_p; int e_rab; LOG_D(RRC, "calling rrc_remove_nsa_user rnti %d\n", rnti); @@ -419,25 +418,18 @@ void rrc_remove_nsa_user(gNB_RRC_INST *rrc, int rnti) { rrc_rlc_remove_ue(&ctxt); mac_remove_nr_ue(rrc->module_id, rnti); - - /* delete gtp tunnel */ - msg_delete_tunnels_p = itti_alloc_new_message(TASK_RRC_GNB, 0, GTPV1U_ENB_DELETE_TUNNEL_REQ); - memset(>PV1U_ENB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p), 0, sizeof(GTPV1U_ENB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p))); - GTPV1U_ENB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p).rnti = rnti; - GTPV1U_ENB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p).from_gnb = 1; - - LOG_D(RRC, "ue_context->ue_context.nb_of_e_rabs %d\n", ue_context->ue_context.nb_of_e_rabs); + gtpv1u_enb_delete_tunnel_req_t tmp={0}; + tmp.rnti=rnti; + tmp.from_gnb=1; + LOG_D(RRC, "ue_context->ue_context.nb_of_e_rabs %d will be deleted for rnti %d\n", ue_context->ue_context.nb_of_e_rabs, rnti); for (e_rab = 0; e_rab < ue_context->ue_context.nb_of_e_rabs; e_rab++) { - GTPV1U_ENB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p).eps_bearer_id[GTPV1U_ENB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p).num_erab++] = - ue_context->ue_context.gnb_gtp_ebi[e_rab]; + tmp.eps_bearer_id[tmp.num_erab++]= ue_context->ue_context.gnb_gtp_ebi[e_rab]; // erase data ue_context->ue_context.gnb_gtp_teid[e_rab] = 0; memset(&ue_context->ue_context.gnb_gtp_addrs[e_rab], 0, sizeof(ue_context->ue_context.gnb_gtp_addrs[e_rab])); ue_context->ue_context.gnb_gtp_ebi[e_rab] = 0; } - - itti_send_msg_to_task(TASK_VARIABLE, rrc->module_id, msg_delete_tunnels_p); - + gtpv1u_delete_s1u_tunnel(rrc->module_id, &tmp); /* remove context */ rrc_gNB_remove_ue_context(&ctxt, rrc, ue_context); } diff --git a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp index fd4a830a02..81e2cbbb37 100644 --- a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp +++ b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp @@ -272,7 +272,7 @@ static int sync_to_gps(openair0_device *device) { */ static int trx_usrp_start(openair0_device *device) { usrp_state_t *s = (usrp_state_t *)device->priv; - +#if 0 // setup GPIO for TDD, GPIO(4) = ATR_RX //set data direction register (DDR) to output s->usrp->set_gpio_attr("FP0", "DDR", 0xfff, 0xfff); @@ -286,6 +286,7 @@ static int trx_usrp_start(openair0_device *device) { // set the output pins to 1 s->usrp->set_gpio_attr("FP0", "OUT", 7<<7, 0xf80); +#endif s->wait_for_first_pps = 1; s->rx_count = 0; s->tx_count = 0; @@ -953,14 +954,9 @@ extern "C" { LOG_I(HW, "openair0_cfg[0].clock_source == '%d' (internal = %d, external = %d)\n", openair0_cfg[0].clock_source,internal,external); usrp_state_t *s ; - if ( device->priv == NULL) { s=(usrp_state_t *)calloc(sizeof(usrp_state_t),1); device->priv=s; AssertFatal( s!=NULL,"USRP device: memory allocation failure\n"); - } else { - LOG_E(HW, "multiple device init detected\n"); - return 0; - } device->openair0_cfg = openair0_cfg; device->trx_start_func = trx_usrp_start; @@ -1000,10 +996,12 @@ extern "C" { if (device_adds.size() == 0) { LOG_E(HW,"No USRP Device Found.\n "); free(s); +abort(); return -1; } else if (device_adds.size() > 1) { LOG_E(HW,"More than one USRP Device Found. Please specify device more precisely in config file.\n"); free(s); +abort(); return -1; } From b9268222a380ad19556a0f3122a61b494da5a122 Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Thu, 17 Jun 2021 16:59:20 +0200 Subject: [PATCH 503/579] revert wrong commit on targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp --- targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp index 81e2cbbb37..fd4a830a02 100644 --- a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp +++ b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp @@ -272,7 +272,7 @@ static int sync_to_gps(openair0_device *device) { */ static int trx_usrp_start(openair0_device *device) { usrp_state_t *s = (usrp_state_t *)device->priv; -#if 0 + // setup GPIO for TDD, GPIO(4) = ATR_RX //set data direction register (DDR) to output s->usrp->set_gpio_attr("FP0", "DDR", 0xfff, 0xfff); @@ -286,7 +286,6 @@ static int trx_usrp_start(openair0_device *device) { // set the output pins to 1 s->usrp->set_gpio_attr("FP0", "OUT", 7<<7, 0xf80); -#endif s->wait_for_first_pps = 1; s->rx_count = 0; s->tx_count = 0; @@ -954,9 +953,14 @@ extern "C" { LOG_I(HW, "openair0_cfg[0].clock_source == '%d' (internal = %d, external = %d)\n", openair0_cfg[0].clock_source,internal,external); usrp_state_t *s ; + if ( device->priv == NULL) { s=(usrp_state_t *)calloc(sizeof(usrp_state_t),1); device->priv=s; AssertFatal( s!=NULL,"USRP device: memory allocation failure\n"); + } else { + LOG_E(HW, "multiple device init detected\n"); + return 0; + } device->openair0_cfg = openair0_cfg; device->trx_start_func = trx_usrp_start; @@ -996,12 +1000,10 @@ extern "C" { if (device_adds.size() == 0) { LOG_E(HW,"No USRP Device Found.\n "); free(s); -abort(); return -1; } else if (device_adds.size() > 1) { LOG_E(HW,"More than one USRP Device Found. Please specify device more precisely in config file.\n"); free(s); -abort(); return -1; } From 0108d75ecd8381ef9d87a811f5d55d9344f7b81e Mon Sep 17 00:00:00 2001 From: rmagueta Date: Thu, 17 Jun 2021 17:01:06 +0100 Subject: [PATCH 504/579] Reset variables in rrc_gNB_generate_RRCRelease --- openair2/RRC/NR/rrc_gNB.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index 4a1187c0b4..18ab54491d 100755 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -3204,6 +3204,8 @@ rrc_gNB_generate_RRCRelease( size = do_NR_RRCRelease(buffer,rrc_gNB_get_next_transaction_identifier(ctxt_pP->module_id)); ue_context_pP->ue_context.ue_reestablishment_timer = 0; ue_context_pP->ue_context.ue_release_timer = 0; + ue_context_pP->ue_context.ul_failure_timer = 0; + ue_context_pP->ue_context.ue_release_timer_rrc = 0; LOG_I(NR_RRC, PROTOCOL_NR_RRC_CTXT_UE_FMT" Logical Channel DL-DCCH, Generate RRCRelease (bytes %d)\n", PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP), From 867d78947608e2a83b8fddaebbfce3c0b1b3eeaf Mon Sep 17 00:00:00 2001 From: Florian Kaltenberger Date: Fri, 18 Jun 2021 09:15:40 +0000 Subject: [PATCH 505/579] Update TESTING_GNB_W_COTS_UE.md --- doc/TESTING_GNB_W_COTS_UE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/TESTING_GNB_W_COTS_UE.md b/doc/TESTING_GNB_W_COTS_UE.md index 5f9299f0ef..84f43bfc27 100644 --- a/doc/TESTING_GNB_W_COTS_UE.md +++ b/doc/TESTING_GNB_W_COTS_UE.md @@ -44,6 +44,7 @@ Our code might not work with all 5G phones yet, but we are constantly improving * Oppo Reno 5G * Samsung A90 5G +* Samsung A42 5G * Google Pixel 5G (note1) * Simcom SIMCOM8200EA * Quectel RM500Q-GL From 0d3b42465ab10a9016754498c831fab1b6e2ce0f Mon Sep 17 00:00:00 2001 From: hardy Date: Fri, 18 Jun 2021 14:53:06 +0200 Subject: [PATCH 506/579] support of module attach detach + new nsa tests --- ci-scripts/cls_oaicitest.py | 118 ++++++++----- ci-scripts/main.py | 13 ++ ci-scripts/xml_files/fr1_nsa_quectel.xml | 4 +- .../fr1_nsa_quectel_attach_detach.xml | 167 ++++++++++++++++++ ci-scripts/xml_files/fr1_nsa_quectel_long.xml | 148 ++++++++++++++++ 5 files changed, 400 insertions(+), 50 deletions(-) create mode 100644 ci-scripts/xml_files/fr1_nsa_quectel_attach_detach.xml create mode 100644 ci-scripts/xml_files/fr1_nsa_quectel_long.xml diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index d3d1d70c13..7283fba5af 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -994,38 +994,55 @@ class OaiCiTest(): for job in multi_jobs: job.join() - if (status_queue.empty()): - HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ALL_PROCESSES_OK) - self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE) - return - else: - attach_status = True - html_queue = SimpleQueue() - while (not status_queue.empty()): - count = status_queue.get() - if (count < 0): - attach_status = False - device_id = status_queue.get() - message = status_queue.get() - if (count < 0): - html_cell = '
UE (' + device_id + ')\n' + message + '
' - else: - html_cell = '
UE (' + device_id + ')\n' + message + ' in ' + str(count + 2) + ' seconds
' - html_queue.put(html_cell) - if (attach_status): - cnt = 0 - while cnt < len(self.UEDevices): - if self.UEDevicesStatus[cnt] == CONST.UE_STATUS_ATTACHING: - self.UEDevicesStatus[cnt] = CONST.UE_STATUS_ATTACHED - cnt += 1 - HTML.CreateHtmlTestRowQueue('N/A', 'OK', len(self.UEDevices), html_queue) - result = re.search('T_stdout', str(RAN.Initialize_eNB_args)) - if result is not None: - logging.debug('Waiting 5 seconds to fill up record file') - time.sleep(5) - else: - HTML.CreateHtmlTestRowQueue('N/A', 'KO', len(self.UEDevices), html_queue) + if (status_queue.empty()): + HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ALL_PROCESSES_OK) self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE) + return + else: + attach_status = True + html_queue = SimpleQueue() + while (not status_queue.empty()): + count = status_queue.get() + if (count < 0): + attach_status = False + device_id = status_queue.get() + message = status_queue.get() + if (count < 0): + html_cell = '
UE (' + device_id + ')\n' + message + '
' + else: + html_cell = '
UE (' + device_id + ')\n' + message + ' in ' + str(count + 2) + ' seconds
' + html_queue.put(html_cell) + if (attach_status): + cnt = 0 + while cnt < len(self.UEDevices): + if self.UEDevicesStatus[cnt] == CONST.UE_STATUS_ATTACHING: + self.UEDevicesStatus[cnt] = CONST.UE_STATUS_ATTACHED + cnt += 1 + HTML.CreateHtmlTestRowQueue('N/A', 'OK', len(self.UEDevices), html_queue) + result = re.search('T_stdout', str(RAN.Initialize_eNB_args)) + if result is not None: + logging.debug('Waiting 5 seconds to fill up record file') + time.sleep(5) + else: + HTML.CreateHtmlTestRowQueue('N/A', 'KO', len(self.UEDevices), html_queue) + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE) + + else: #if an ID is specified, it is a module from the yaml infrastructure file + #Attention, as opposed to InitializeUE, the connect manager process is not checked as it is supposed to be active already + #only 1- module wakeup, 2- check IP address + Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id]) + Module_UE.Command("wup") + logging.debug("Waiting for IP address to be assigned") + time.sleep(20) + logging.debug("Retrieve IP address") + status=Module_UE.GetModuleIPAddress() + if status==0: + HTML.CreateHtmlTestRow(Module_UE.UEIPAddress, 'OK', CONST.ALL_PROCESSES_OK) + logging.debug('UE IP addresss : '+ Module_UE.UEIPAddress) + else: #status==-1 failed to retrieve IP address + HTML.CreateHtmlTestRow('N/A', 'KO', CONST.UE_IP_ADDRESS_ISSUE) + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE) + return def DetachUE_common(self, device_id, idx,COTS_UE): try: @@ -1084,10 +1101,7 @@ class OaiCiTest(): else:#if an ID is specified, it is a module from the yaml infrastructure file Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id]) Module_UE.Command("detach") - Module_UE.DisableTrace() - Module_UE.DisableCM() - archive_destination=Module_UE.LogCollect() - HTML.CreateHtmlTestRow('QLog at : '+archive_destination, 'OK', CONST.ALL_PROCESSES_OK) + HTML.CreateHtmlTestRow('NA', 'OK', CONST.ALL_PROCESSES_OK) @@ -3089,19 +3103,27 @@ class OaiCiTest(): os.kill(os.getppid(),signal.SIGUSR1) def TerminateUE(self,HTML,COTS_UE): - terminate_ue_flag = False - self.GetAllUEDevices(terminate_ue_flag) - multi_jobs = [] - i = 0 - for device_id in self.UEDevices: - p = Process(target= self.TerminateUE_common, args = (device_id,i,COTS_UE,)) - p.daemon = True - p.start() - multi_jobs.append(p) - i += 1 - for job in multi_jobs: - job.join() - HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK) + if self.ue_id=='':#no ID specified, then it is a COTS controlled by ADB + terminate_ue_flag = False + self.GetAllUEDevices(terminate_ue_flag) + multi_jobs = [] + i = 0 + for device_id in self.UEDevices: + p = Process(target= self.TerminateUE_common, args = (device_id,i,COTS_UE,)) + p.daemon = True + p.start() + multi_jobs.append(p) + i += 1 + for job in multi_jobs: + job.join() + HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK) + else: #if an ID is specified, it is a module from the yaml infrastructure file + Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id]) + Module_UE.Command("detach") + Module_UE.DisableTrace() + Module_UE.DisableCM() + archive_destination=Module_UE.LogCollect() + HTML.CreateHtmlTestRow('QLog at : '+archive_destination, 'OK', CONST.ALL_PROCESSES_OK) def TerminateOAIUE(self,HTML,RAN,COTS_UE,EPC, InfraUE): SSH = sshconnection.SSHConnection() diff --git a/ci-scripts/main.py b/ci-scripts/main.py index cbd323366b..142ecdf202 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -210,12 +210,25 @@ def GetParametersFromXML(action): CiTestObj.ue_id = ue_id elif action == 'Attach_UE': + ue_id = test.findtext('id') + if (ue_id is None): + CiTestObj.ue_id = "" + else: + CiTestObj.ue_id = ue_id nbMaxUEtoAttach = test.findtext('nbMaxUEtoAttach') if (nbMaxUEtoAttach is None): CiTestObj.nbMaxUEtoAttach = -1 else: CiTestObj.nbMaxUEtoAttach = int(nbMaxUEtoAttach) + elif action == 'Terminate_UE': + ue_id = test.findtext('id') + if (ue_id is None): + CiTestObj.ue_id = "" + else: + CiTestObj.ue_id = ue_id + + elif action == 'CheckStatusUE': expectedNBUE = test.findtext('expectedNbOfConnectedUEs') if (expectedNBUE is None): diff --git a/ci-scripts/xml_files/fr1_nsa_quectel.xml b/ci-scripts/xml_files/fr1_nsa_quectel.xml index 2e8c07968d..980b55c30c 100644 --- a/ci-scripts/xml_files/fr1_nsa_quectel.xml +++ b/ci-scripts/xml_files/fr1_nsa_quectel.xml @@ -52,8 +52,8 @@ - Detach_UE - Detach UE + Terminate_UE + Terminate Quectel idefix diff --git a/ci-scripts/xml_files/fr1_nsa_quectel_attach_detach.xml b/ci-scripts/xml_files/fr1_nsa_quectel_attach_detach.xml new file mode 100644 index 0000000000..f78cd3bd82 --- /dev/null +++ b/ci-scripts/xml_files/fr1_nsa_quectel_attach_detach.xml @@ -0,0 +1,167 @@ + + + TEST-NSA-FR1-TM1 + NSA Ping Attach Detach with QUECTEL + tasks + 1 + + 030000 + 040000 + 000002 + 010000 + 000001 + 050000 + 000001 + 010004 + 000001 + 010003 + 000001 + 050000 + 000001 + 010004 + 000001 + 010003 + 000001 + 050000 + 000001 + 010002 + 080001 + 080000 + + + + + Initialize_UE + Initialize Quectel + idefix + + + + + Terminate_UE + Terminate Quectel + idefix + + + + Attach_UE + Attach Quectel + idefix + + + + Detach_UE + Detach Quectel + idefix + + + + + Initialize_eNB + Initialize eNB + -O ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf + 0 + 0 + lte + yes + + + + + Initialize_eNB + Initialize gNB + -O ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf -E -q + 1 + 1 + nr + + + + IdleSleep + Sleep + 5 + + + + IdleSleep + Sleep + 20 + + + + + Ping + Ping: 20pings in 20sec + idefix + -c 20 + 50 + + + + Ping + Ping: 100pings in 20sec + idefix + -c 100 -i 0.2 + 50 + + + + Iperf + iperf (DL/20Mbps/UDP)(60 sec)(single-ue profile) + -u -b 20M -t 60 + DL + idefix + 50 + single-ue + + + + Iperf + iperf (UL/3Mbps/UDP)(60 sec)(single-ue profile) + -u -b 3M -t 60 + UL + idefix + 50 + single-ue + + + + + Terminate_eNB + Terminate eNB + 0 + 0 + lte + + + + Terminate_eNB + Terminate gNB + 1 + 1 + nr + + + + diff --git a/ci-scripts/xml_files/fr1_nsa_quectel_long.xml b/ci-scripts/xml_files/fr1_nsa_quectel_long.xml new file mode 100644 index 0000000000..21ff7a63c5 --- /dev/null +++ b/ci-scripts/xml_files/fr1_nsa_quectel_long.xml @@ -0,0 +1,148 @@ + + + TEST-NSA-FR1-TM1 + NSA Ping DL UL with QUECTEL (Longer) + tasks + 1 + + 030000 + 040000 + 000002 + 010000 + 000001 + 050000 + 050001 + 000001 + 070000 + 000001 + 070001 + 000001 + 010002 + 080001 + 080000 + + + + + Initialize_UE + Initialize Quectel + idefix + + + + + Terminate_UE + Terminate Quectel + idefix + + + + + Initialize_eNB + Initialize eNB + -O ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf + 0 + 0 + lte + yes + + + + + Initialize_eNB + Initialize gNB + -O ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf -E -q + 1 + 1 + nr + + + + IdleSleep + Sleep + 5 + + + + IdleSleep + Sleep + 20 + + + + + Ping + Ping: 20pings in 20sec + idefix + -c 20 + 50 + + + + Ping + Ping: 100pings in 20sec + idefix + -c 100 -i 0.2 + 50 + + + + Iperf + iperf (DL/20Mbps/UDP)(600 sec)(single-ue profile) + -u -b 20M -t 600 + DL + idefix + 50 + single-ue + + + + Iperf + iperf (UL/3Mbps/UDP)(600 sec)(single-ue profile) + -u -b 3M -t 600 + UL + idefix + 50 + single-ue + + + + + Terminate_eNB + Terminate eNB + 0 + 0 + lte + + + + Terminate_eNB + Terminate gNB + 1 + 1 + nr + + + + From 6293f610875f9a24ecaccc973053b905035a6066 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Fri, 14 May 2021 14:53:58 +0100 Subject: [PATCH 507/579] small changes for multiple lcid handling in gNB scheduler. PUSCH DTX handling and suspension of scheduling when UL failure is detected --- openair1/SCHED_NR/phy_procedures_nr_gNB.c | 3 +- openair2/LAYER2/NR_MAC_gNB/config.c | 99 +++++++++++++++++-- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c | 9 +- .../LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c | 12 ++- .../NR_MAC_gNB/gNB_scheduler_primitives.c | 1 + .../LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c | 1 + .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 10 +- openair2/LAYER2/NR_MAC_gNB/mac_proto.h | 6 +- openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h | 2 + 9 files changed, 117 insertions(+), 26 deletions(-) diff --git a/openair1/SCHED_NR/phy_procedures_nr_gNB.c b/openair1/SCHED_NR/phy_procedures_nr_gNB.c index 99065a75ae..717487c101 100644 --- a/openair1/SCHED_NR/phy_procedures_nr_gNB.c +++ b/openair1/SCHED_NR/phy_procedures_nr_gNB.c @@ -355,7 +355,7 @@ void nr_ulsch_procedures(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int ULSCH } -void nr_fill_indication(PHY_VARS_gNB *gNB, int frame, int slot_rx, int ULSCH_id, uint8_t harq_pid, uint8_t crc_flag) { + void nr_fill_indication(PHY_VARS_gNB *gNB, int frame, int slot_rx, int ULSCH_id, uint8_t harq_pid, uint8_t crc_flag) { pthread_mutex_lock(&gNB->UL_INFO_mutex); @@ -683,6 +683,7 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) { LOG_D(PHY, "PUSCH not detected in %d.%d (%d,%d,%d)\n",frame_rx,slot_rx, dB_fixed_x10(gNB->pusch_vars[ULSCH_id]->ulsch_power_tot), dB_fixed_x10(gNB->pusch_vars[ULSCH_id]->ulsch_noise_power_tot),gNB->pusch_thres); + gNB->pusch_vars[ULSCH_id]->ulsch_power_tot = gNB->pusch_vars[ULSCH_id]->ulsch_noise_power_tot; nr_fill_indication(gNB,frame_rx, slot_rx, ULSCH_id, harq_pid, 1); gNB->pusch_vars[ULSCH_id]->DTX=1; stats->DTX++; diff --git a/openair2/LAYER2/NR_MAC_gNB/config.c b/openair2/LAYER2/NR_MAC_gNB/config.c index 3046bde098..87cc7851ff 100644 --- a/openair2/LAYER2/NR_MAC_gNB/config.c +++ b/openair2/LAYER2/NR_MAC_gNB/config.c @@ -54,6 +54,87 @@ extern RAN_CONTEXT_t RC; extern void mac_top_init_gNB(void); extern uint8_t nfapi_mode; +void process_rlcBearerConfig(struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_bearer2add_list, + struct NR_CellGroupConfig__rlc_BearerToReleaseList *rlc_bearer2release_list, + NR_UE_sched_ctrl_t *sched_ctrl) { + + if (rlc_bearer2add_list) + // keep lcids + for (int i=0;ilist.count;i++) { + sched_ctrl->lcid_mask |= (1<list.array[i]->logicalChannelIdentity); + LOG_I(NR_MAC,"Adding LCID %d (%s %d)\n", + (int)rlc_bearer2add_list->list.array[i]->logicalChannelIdentity, + rlc_bearer2add_list->list.array[i]->logicalChannelIdentity<4 ? "SRB" : "DRB", + (int)rlc_bearer2add_list->list.array[i]->logicalChannelIdentity); + } + if (rlc_bearer2release_list) + for (int i=0;ilist.count;i++) + sched_ctrl->lcid_mask |= (1<<*rlc_bearer2release_list->list.array[i]); + +} + + +void process_drx_Config(NR_UE_sched_ctrl_t *sched_ctrl,NR_SetupRelease_DRX_Config_t *drx_Config) { + if (!drx_Config) return; + AssertFatal(drx_Config->present != NR_SetupRelease_DRX_Config_PR_NOTHING, "Cannot have NR_SetupRelease_DRX_Config_PR_NOTHING\n"); + + if (drx_Config->present == NR_SetupRelease_DRX_Config_PR_setup) { + LOG_I(NR_MAC,"Adding DRX config\n"); + } + else { + LOG_I(NR_MAC,"Removing DRX config\n"); + } +} + +void process_schedulingRequestConfig(NR_UE_sched_ctrl_t *sched_ctrl,NR_SchedulingRequestConfig_t *schedulingRequestConfig) { + if (!schedulingRequestConfig) return; + + LOG_I(NR_MAC,"Adding SchedulingRequestconfig\n"); +} + +void process_bsrConfig(NR_UE_sched_ctrl_t *sched_ctrl,NR_BSR_Config_t *bsr_Config) { + if (!bsr_Config) return; + LOG_I(NR_MAC,"Adding BSR config\n"); +} + +void process_tag_Config(NR_UE_sched_ctrl_t *sched_ctrl,NR_TAG_Config_t *tag_Config) { + if (!tag_Config) return; + LOG_I(NR_MAC,"Adding TAG config\n"); +} + +void process_phr_Config(NR_UE_sched_ctrl_t *sched_ctrl,NR_SetupRelease_PHR_Config_t *phr_Config) { + if (!phr_Config) return; + AssertFatal(phr_Config->present != NR_SetupRelease_PHR_Config_PR_NOTHING, "Cannot have NR_SetupRelease_PHR_Config_PR_NOTHING\n"); + + if (phr_Config->present == NR_SetupRelease_PHR_Config_PR_setup) { + LOG_I(NR_MAC,"Adding PHR config\n"); + } + else { + LOG_I(NR_MAC,"Removing PHR config\n"); + } +} + +void process_CellGroup(NR_CellGroupConfig_t *CellGroup, NR_UE_sched_ctrl_t *sched_ctrl) { + + AssertFatal(CellGroup, "CellGroup is null\n"); + NR_MAC_CellGroupConfig_t *mac_CellGroupConfig = CellGroup->mac_CellGroupConfig; + + + if (mac_CellGroupConfig) { + process_drx_Config(sched_ctrl,mac_CellGroupConfig->drx_Config); + process_schedulingRequestConfig(sched_ctrl,mac_CellGroupConfig->schedulingRequestConfig); + process_bsrConfig(sched_ctrl,mac_CellGroupConfig->bsr_Config); + process_tag_Config(sched_ctrl,mac_CellGroupConfig->tag_Config); + process_phr_Config(sched_ctrl,mac_CellGroupConfig->phr_Config); + } + else { + // apply defaults + + } + + process_rlcBearerConfig(CellGroup->rlc_BearerToAddModList,CellGroup->rlc_BearerToReleaseList,sched_ctrl); + +} void config_common(int Mod_idP, int ssb_SubcarrierOffset, int pdsch_AntennaPorts, int pusch_AntennaPorts, NR_ServingCellConfigCommon_t *scc) { nfapi_nr_config_request_scf_t *cfg = &RC.nrmac[Mod_idP]->config[0]; @@ -339,9 +420,9 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP, int pdsch_AntennaPorts, int pusch_AntennaPorts, NR_ServingCellConfigCommon_t *scc, - int add_ue, + int add_ue, uint32_t rnti, - NR_CellGroupConfig_t *CellGroup){ + NR_CellGroupConfig_t *CellGroup) { if (scc != NULL ) { AssertFatal((scc->ssb_PositionsInBurst->present > 0) && (scc->ssb_PositionsInBurst->present < 4), "SSB Bitmap type %d is not valid\n",scc->ssb_PositionsInBurst->present); @@ -427,12 +508,12 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP, if (get_softmodem_params()->sa > 0) { NR_COMMON_channels_t *cc = &RC.nrmac[Mod_idP]->common_channels[0]; for (int n=0;nra[n].cfra = false; - cc->ra[n].rnti = 0; - cc->ra[n].preambles.num_preambles = MAX_NUM_NR_PRACH_PREAMBLES; - cc->ra[n].preambles.preamble_list = (uint8_t *) malloc(MAX_NUM_NR_PRACH_PREAMBLES*sizeof(uint8_t)); - for (int i = 0; i < MAX_NUM_NR_PRACH_PREAMBLES; i++) - cc->ra[n].preambles.preamble_list[i] = i; + cc->ra[n].cfra = false; + cc->ra[n].rnti = 0; + cc->ra[n].preambles.num_preambles = MAX_NUM_NR_PRACH_PREAMBLES; + cc->ra[n].preambles.preamble_list = (uint8_t *) malloc(MAX_NUM_NR_PRACH_PREAMBLES*sizeof(uint8_t)); + for (int i = 0; i < MAX_NUM_NR_PRACH_PREAMBLES; i++) + cc->ra[n].preambles.preamble_list[i] = i; } } } @@ -463,6 +544,7 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP, if (add_ue == 1 && get_softmodem_params()->phy_test) { const int UE_id = add_new_nr_ue(Mod_idP, rnti, CellGroup); LOG_I(NR_MAC,"Added new UE_id %d/%x with initial CellGroup\n",UE_id,rnti); + process_CellGroup(CellGroup,&UE_info->UE_sched_ctrl[UE_id]); } else if (add_ue == 1 && !get_softmodem_params()->phy_test) { const int CC_id = 0; NR_COMMON_channels_t *cc = &RC.nrmac[Mod_idP]->common_channels[CC_id]; @@ -510,6 +592,7 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP, const int UE_id = find_nr_UE_id(Mod_idP,rnti); UE_info->CellGroup[UE_id] = CellGroup; LOG_I(NR_MAC,"Modified UE_id %d/%x with CellGroup\n",UE_id,rnti); + process_CellGroup(CellGroup,&UE_info->UE_sched_ctrl[UE_id]); } } VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_FUNCTION_OUT); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c index 007f8db669..4464c3f9cf 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c @@ -83,15 +83,12 @@ void dump_mac_stats(gNB_MAC_INST *gNB) stats->num_rsrp_meas = 0; stats->cumul_rsrp = 0 ; LOG_I(NR_MAC, "UE %d: dlsch_total_bytes %d\n", UE_id, stats->dlsch_total_bytes); - const NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; - LOG_I(NR_MAC, "UE %d: ulsch_rounds %d/%d/%d/%d, ulsch_errors %d, PUSCH SNR %2.1f dB, PUCCH SNR %2.1f dB, noise rssi %2.1f dB\n", + LOG_I(NR_MAC, "UE %d: ulsch_rounds %d/%d/%d/%d, ulsch_DTX %d, ulsch_errors %d\n", UE_id, stats->ulsch_rounds[0], stats->ulsch_rounds[1], stats->ulsch_rounds[2], stats->ulsch_rounds[3], - stats->ulsch_errors, - (float) sched_ctrl->pusch_snrx10 / 10, - (float) sched_ctrl->pucch_snrx10 / 10, - (float) (sched_ctrl->raw_rssi - 1280) / 10); + stats->ulsch_DTX, + stats->ulsch_errors); LOG_I(NR_MAC, "UE %d: ulsch_total_bytes_scheduled %d, ulsch_total_bytes_received %d\n", UE_id, diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index 5850d26f8b..c159bab5a6 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -390,11 +390,11 @@ void nr_store_dlsch_buffer(module_id_t module_id, NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; sched_ctrl->num_total_bytes = 0; - if (loop_dcch_dtch == DL_SCH_LCID_DCCH1) + if ((sched_ctrl->lcid_mask&(1<<4)) > 0 && loop_dcch_dtch == DL_SCH_LCID_DCCH1) loop_dcch_dtch = DL_SCH_LCID_DTCH; - else if (loop_dcch_dtch == DL_SCH_LCID_DTCH) + else if ((sched_ctrl->lcid_mask&(1<<1)) > 0 && loop_dcch_dtch == DL_SCH_LCID_DTCH) loop_dcch_dtch = DL_SCH_LCID_DCCH; - else if (loop_dcch_dtch == DL_SCH_LCID_DCCH) + else if ((sched_ctrl->lcid_mask&(1<<2)) > 0 && loop_dcch_dtch == DL_SCH_LCID_DCCH) loop_dcch_dtch = DL_SCH_LCID_DCCH1; const int lcid = loop_dcch_dtch; @@ -423,10 +423,11 @@ void nr_store_dlsch_buffer(module_id_t module_id, return; LOG_D(NR_MAC, - "[%s][%d.%d], DTCH%d->DLSCH, RLC status %d bytes TA %d\n", + "[%s][%d.%d], %s%d->DLSCH, RLC status %d bytes TA %d\n", __func__, frame, slot, + lcid<4?"DCCH":"DTCH", lcid, sched_ctrl->rlc_status[lcid].bytes_in_buffer, sched_ctrl->ta_apply); @@ -654,7 +655,7 @@ void pf_dl(module_id_t module_id, * allocation after CCE alloc fail would be more complex) */ const int alloc = nr_acknack_scheduling(module_id, UE_id, frame, slot, -1); if (alloc<0) { - LOG_D(MAC, + LOG_D(NR_MAC, "%s(): could not find PUCCH for UE %d/%04x@%d.%d\n", __func__, UE_id, @@ -800,6 +801,7 @@ void nr_schedule_ue_spec(module_id_t module_id, NR_list_t *UE_list = &UE_info->list; for (int UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; + if (sched_ctrl->ul_failure==1) continue; NR_sched_pdsch_t *sched_pdsch = &sched_ctrl->sched_pdsch; UE_info->mac_stats[UE_id].dlsch_current_bytes = 0; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index 3f0baae8c7..64d9b72866 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -1839,6 +1839,7 @@ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP, NR_CellGroupConfig_t *CellG compute_csi_bitlen (CellGroup->spCellConfig->spCellConfigDedicated->csi_MeasConfig->choice.setup, UE_info, UE_id, mod_idP); NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; memset(sched_ctrl, 0, sizeof(*sched_ctrl)); + sched_ctrl->lcid_mask = 0; sched_ctrl->ta_frame = 0; sched_ctrl->ta_update = 31; sched_ctrl->ta_apply = false; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c index e130bdcf3d..58421a4f7c 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c @@ -131,6 +131,7 @@ void nr_schedule_pucch(int Mod_idP, for (int UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; + if (sched_ctrl->ul_failure==1) continue; const int n = sizeof(sched_ctrl->sched_pucch) / sizeof(*sched_ctrl->sched_pucch); for (int i = 0; i < n; i++) { NR_sched_pucch_t *curr_pucch = &UE_info->UE_sched_ctrl[UE_id].sched_pucch[i]; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index bf444f7037..363229e5bb 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -437,10 +437,10 @@ void nr_process_mac_pdu(module_id_t module_idP, mac_subheader_len = 2; } - LOG_D(NR_MAC, - "[UE %d] Frame %d : ULSCH -> UL-DTCH %d (gNB %d, %d bytes)\n", + LOG_D(NR_MAC, "[UE %d] Frame %d : ULSCH -> UL-%s %d (gNB %d, %d bytes)\n", module_idP, frameP, + rx_lcid<4?"DCCH":"DTCH", rx_lcid, module_idP, mac_sdu_len); @@ -655,7 +655,10 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, if (UE_scheduling_control->sched_ul_bytes < 0) UE_scheduling_control->sched_ul_bytes = 0; } - if (ul_cqi < 128) UE_info->UE_sched_ctrl[UE_id].pusch_consecutive_dtx_cnt++; + if (ul_cqi <= 128) { + UE_info->UE_sched_ctrl[UE_id].pusch_consecutive_dtx_cnt++; + UE_info->mac_stats[UE_id].ulsch_DTX++; + } if (UE_info->UE_sched_ctrl[UE_id].pusch_consecutive_dtx_cnt >= pusch_failure_thres) { LOG_D(NR_MAC,"Detected UL Failure on PUSCH, stopping scheduling\n"); UE_info->UE_sched_ctrl[UE_id].ul_failure = 1; @@ -1306,6 +1309,7 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot) const NR_list_t *UE_list = &UE_info->list; for (int UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; + if (sched_ctrl->ul_failure == 1) continue; UE_info->mac_stats[UE_id].ulsch_current_bytes = 0; /* dynamic PUSCH values (RB alloc, MCS, hence R, Qm, TBS) that change in diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h index f4947bd33a..ca12081a6f 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h +++ b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h @@ -52,9 +52,9 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP, int pdsch_AntennaPorts, int pusch_AntennaPorts, NR_ServingCellConfigCommon_t *scc, - int nsa_flag, - uint32_t rnti, - NR_CellGroupConfig_t *CellGroup + int nsa_flag, + uint32_t rnti, + NR_CellGroupConfig_t *CellGroup ); void clear_nr_nfapi_information(gNB_MAC_INST * gNB, diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h index edb5959122..8f73f5cdc7 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h +++ b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h @@ -558,6 +558,7 @@ typedef struct { /// per-LC status data mac_rlc_status_resp_t rlc_status[MAX_NUM_LCID]; + int lcid_mask; uint16_t ta_frame; int16_t ta_update; bool ta_apply; @@ -607,6 +608,7 @@ typedef struct { int dlsch_current_bytes; int ulsch_rounds[8]; int ulsch_errors; + int ulsch_DTX; int ulsch_total_bytes_scheduled; int ulsch_total_bytes_rx; int ulsch_current_bytes; From 5d11b7444edffa6c936fd5ab99470018346157e8 Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Mon, 21 Jun 2021 11:56:57 +0100 Subject: [PATCH 508/579] fix array overflow and wrong LCID --- openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c | 3 ++ openair2/COMMON/f1ap_messages_types.h | 2 +- openair2/F1AP/f1ap_du_rrc_message_transfer.c | 22 +++++++-------- openair2/F1AP/f1ap_du_rrc_message_transfer.h | 2 +- openair2/F1AP/f1ap_du_task.c | 2 +- openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c | 28 ++++++------------- .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 23 ++++++++------- openair3/ocp-gtpu/gtp_itf.cpp | 11 ++++++-- 8 files changed, 47 insertions(+), 46 deletions(-) diff --git a/openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c b/openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c index 437b444e91..2a3c16938a 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c +++ b/openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c @@ -44,6 +44,7 @@ #include "common/utils/LOG/vcd_signal_dumper.h" #include "common/utils/LOG/log.h" #include +#include //#define DEBUG_DLSCH_CODING //#define DEBUG_DLSCH_FREE 1 @@ -266,6 +267,8 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB, VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_DLSCH_ENCODING, VCD_FUNCTION_IN); A = rel15->TBSize[0]<<3; + if ( dlsch->rnti != SI_RNTI ) + trace_NRpdu(DIRECTION_DOWNLINK, a, rel15->TBSize[0], 0, WS_C_RNTI, dlsch->rnti, frame, slot,0, 0); NR_gNB_SCH_STATS_t *stats=NULL; int first_free=-1; diff --git a/openair2/COMMON/f1ap_messages_types.h b/openair2/COMMON/f1ap_messages_types.h index ecfde8d38b..c2fb4a9cf7 100644 --- a/openair2/COMMON/f1ap_messages_types.h +++ b/openair2/COMMON/f1ap_messages_types.h @@ -299,7 +299,7 @@ typedef struct f1ap_initial_ul_rrc_message_s { uint16_t crnti; uint8_t *rrc_container; int rrc_container_length; - uint8_t *du2cu_rrc_container; + int8_t *du2cu_rrc_container; int du2cu_rrc_container_length; } f1ap_initial_ul_rrc_message_t; diff --git a/openair2/F1AP/f1ap_du_rrc_message_transfer.c b/openair2/F1AP/f1ap_du_rrc_message_transfer.c index dae90d4fa6..07df0b4a78 100644 --- a/openair2/F1AP/f1ap_du_rrc_message_transfer.c +++ b/openair2/F1AP/f1ap_du_rrc_message_transfer.c @@ -806,7 +806,7 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP, rnti_t rntiP, const uint8_t *sduP, sdu_size_t sdu_lenP, - const uint8_t *sdu2P, + const int8_t *sdu2P, sdu_size_t sdu2_lenP) { F1AP_F1AP_PDU_t pdu; @@ -993,7 +993,7 @@ int DU_send_UL_NR_RRC_MESSAGE_TRANSFER(instance_t instance, if (msg->srb_id == 1 || msg->srb_id == 2) { struct rrc_gNB_ue_context_s* ue_context_p = rrc_gNB_get_ue_context(RC.nrrrc[instance], rnti); - + NR_UL_DCCH_Message_t* ul_dcch_msg=NULL; asn_dec_rval_t dec_rval; dec_rval = uper_decode(NULL, @@ -1001,7 +1001,7 @@ int DU_send_UL_NR_RRC_MESSAGE_TRANSFER(instance_t instance, (void**)&ul_dcch_msg, &ie->value.choice.RRCContainer.buf[1], // buf[0] includes the pdcp header msg->rrc_container_length, 0, 0); - + if ((dec_rval.code != RC_OK) && (dec_rval.consumed == 0)) { LOG_E(F1AP, " Failed to decode UL-DCCH (%zu bytes)\n",dec_rval.consumed); /* for rfsim, because UE send RRCSetupRequest in SRB1 */ @@ -1041,18 +1041,18 @@ int DU_send_UL_NR_RRC_MESSAGE_TRANSFER(instance_t instance, case NR_UL_DCCH_MessageType__c1_PR_rrcReconfigurationComplete: LOG_I(F1AP, "[MSG] RRC UL rrcReconfigurationComplete\n"); - + /* CDRX: activated when RRC Connection Reconfiguration Complete is received */ #if(0) int UE_id_mac = find_nr_UE_id(instance, rnti); - + if (UE_id_mac == -1) { LOG_E(F1AP, "Can't find UE_id(MAC) of UE rnti %x\n", rnti); break; } - + UE_sched_ctrl_t *UE_scheduling_control = &(RC.nrmac[instance]->UE_info.UE_sched_ctrl[UE_id_mac]); - + if (UE_scheduling_control->cdrx_waiting_ack == TRUE) { UE_scheduling_control->cdrx_waiting_ack = FALSE; UE_scheduling_control->cdrx_configured = TRUE; // Set to TRUE when RRC Connection Reconfiguration Complete is received @@ -1064,7 +1064,7 @@ int DU_send_UL_NR_RRC_MESSAGE_TRANSFER(instance_t instance, case NR_UL_DCCH_MessageType__c1_PR_rrcSetupComplete: LOG_I(F1AP, "[MSG] RRC UL rrcSetupComplete \n"); - + if(!ue_context_p){ LOG_E(F1AP, "Did not find the UE context associated with UE RNTOI %x, ue_context_p is NULL\n", rnti); @@ -1317,12 +1317,12 @@ int DU_handle_DL_NR_RRC_MESSAGE_TRANSFER(instance_t instance, NULL); // This should be somewhere in the f1ap_cudu_ue_inst_t - /*int macrlc_instance = 0; + /*int macrlc_instance = 0; rnti_t rnti = f1ap_get_rnti_by_du_id(&f1ap_du_inst[0], du_ue_f1ap_id); struct rrc_gNB_ue_context_s *ue_context_p = rrc_gNB_get_ue_context(RC.nrrrc[macrlc_instance],rnti); - */ - gNB_RRC_UE_t *ue_p = &ue_context_p->ue_context; + */ + gNB_RRC_UE_t *ue_p = &ue_context_p->ue_context; AssertFatal(ue_p->Srb0.Active == 1,"SRB0 is not active\n"); memcpy((void*)ue_p->Srb0.Tx_buffer.Payload, diff --git a/openair2/F1AP/f1ap_du_rrc_message_transfer.h b/openair2/F1AP/f1ap_du_rrc_message_transfer.h index bf09a8b1f4..3036c66d70 100644 --- a/openair2/F1AP/f1ap_du_rrc_message_transfer.h +++ b/openair2/F1AP/f1ap_du_rrc_message_transfer.h @@ -50,7 +50,7 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP, rnti_t rntiP, const uint8_t *sduP, sdu_size_t sdu_lenP, - const uint8_t *sdu2P, + const int8_t *sdu2P, sdu_size_t sdu2_lenP); #endif /* F1AP_DU_RRC_MESSAGE_TRANSFER_H_ */ diff --git a/openair2/F1AP/f1ap_du_task.c b/openair2/F1AP/f1ap_du_task.c index 20e47ddaa5..f1e32c1d3d 100644 --- a/openair2/F1AP/f1ap_du_task.c +++ b/openair2/F1AP/f1ap_du_task.c @@ -195,7 +195,7 @@ void *F1AP_DU_task(void *arg) { DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(0,0,0,msg->crnti, msg->rrc_container, msg->rrc_container_length, - msg->du2cu_rrc_container, + (char*)msg->du2cu_rrc_container, msg->du2cu_rrc_container_length); break; diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c index 4a16b2939c..509fd24f5b 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c @@ -1055,8 +1055,9 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in //and block this traffic from being forwarded to the upper layers at the gNB LOG_D(PHY, "In %s: Random data to be transmitted: TBS_bytes %d \n", __FUNCTION__, TBS_bytes); - // Make the first byte padding so that gNB ignores the PHY random - // data in the TB for the PHY at the MAC layer + //Give the first byte a dummy value (a value not corresponding to any valid LCID based on 38.321, Table 6.2.1-2) + //in order to distinguish the PHY random packets at the MAC layer of the gNB receiver from the normal packets that should + //have a valid LCID (nr_process_mac_pdu function) ulsch_input_buffer[0] = UL_SCH_LCID_PADDING; for (int i = 1; i < TBS_bytes; i++) { @@ -1964,6 +1965,7 @@ void nr_ue_prach_scheduler(module_id_t module_idP, frame_t frameP, sub_frame_t s } // if is_nr_UL_slot } +#define MAX_LCID 8 //Fixme: also defined in LCID table uint8_t nr_ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t subframe, uint8_t eNB_index, @@ -1971,16 +1973,15 @@ nr_ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP, uint8_t total_rlc_pdu_header_len = 0; int16_t buflen_remain = 0; uint8_t lcid = 0; - uint16_t sdu_lengths[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; - uint8_t sdu_lcids[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; + uint16_t sdu_lengths[MAX_LCID] = { 0 }; + uint8_t sdu_lcids[MAX_LCID] = { 0 }; uint16_t payload_offset = 0, num_sdus = 0; uint8_t ulsch_sdus[MAX_ULSCH_PAYLOAD_BYTES]; uint16_t sdu_length_total = 0; //unsigned short post_padding = 0; NR_UE_MAC_INST_t *mac = get_mac_inst(module_idP); - rlc_buffer_occupancy_t lcid_buffer_occupancy_old = - 0, lcid_buffer_occupancy_new = 0; + rlc_buffer_occupancy_t lcid_buffer_occupancy_new = 0; LOG_D(NR_MAC, "[UE %d] MAC PROCESS UL TRANSPORT BLOCK at frame%d subframe %d TBS=%d\n", module_idP, frameP, subframe, buflen); @@ -1990,12 +1991,9 @@ nr_ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP, // Check for DCCH first // TO DO: Multiplex in the order defined by the logical channel prioritization for (lcid = UL_SCH_LCID_SRB1; - lcid < NR_MAX_NUM_LCID; lcid++) { + lcid < MAX_LCID; lcid++) { - lcid_buffer_occupancy_old = mac_rlc_get_buffer_occupancy_ind(module_idP, mac->crnti, eNB_index, frameP, subframe, ENB_FLAG_NO, lcid); - lcid_buffer_occupancy_new = lcid_buffer_occupancy_old; - - if(lcid_buffer_occupancy_new){ + if( mac_rlc_get_buffer_occupancy_ind(module_idP, mac->crnti, eNB_index, frameP, subframe, ENB_FLAG_NO, lcid) ) { buflen_remain = buflen - (total_rlc_pdu_header_len + sdu_length_total + MAX_RLC_SDU_SUBHEADER_SIZE); @@ -2033,14 +2031,6 @@ nr_ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP, num_sdus++; } - /* Get updated BO after multiplexing this PDU */ - lcid_buffer_occupancy_new = mac_rlc_get_buffer_occupancy_ind(module_idP, - mac->crnti, - eNB_index, - frameP, - subframe, - ENB_FLAG_NO, - lcid); buflen_remain = buflen - (total_rlc_pdu_header_len + sdu_length_total + MAX_RLC_SDU_SUBHEADER_SIZE); } diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 363229e5bb..f31c3d5477 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -32,6 +32,8 @@ #include "LAYER2/NR_MAC_gNB/mac_proto.h" #include "executables/softmodem-common.h" #include "common/utils/nr/nr_common.h" +#include + //38.321 Table 6.1.3.1-1 const uint32_t NR_SHORT_BSR_TABLE[32] = { @@ -189,6 +191,7 @@ void nr_process_mac_pdu(module_id_t module_idP, uint16_t mac_ce_len, mac_subheader_len, mac_sdu_len; NR_UE_info_t *UE_info = &RC.nrmac[module_idP]->UE_info; + trace_NRpdu(DIRECTION_UPLINK, pduP, mac_pdu_len ,UE_id, WS_C_RNTI, UE_info->rnti[UE_id], frameP, 0,0, 0); NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; // For both DL/UL-SCH // Except: @@ -371,16 +374,16 @@ void nr_process_mac_pdu(module_id_t module_idP, } LOG_D(NR_MAC, "[UE %d] Frame %d : ULSCH -> UL-DCCH %d (gNB %d, %d bytes), rnti: %d \n", module_idP, frameP, rx_lcid, module_idP, mac_sdu_len, *UE_info->rnti); mac_rlc_data_ind(module_idP, - *UE_info->rnti, - module_idP, - frameP, - ENB_FLAG_YES, - MBMS_FLAG_NO, - rx_lcid, - (char *) (pdu_ptr + mac_subheader_len), - mac_sdu_len, - 1, - NULL); + UE_info->rnti[UE_id], + module_idP, + frameP, + ENB_FLAG_YES, + MBMS_FLAG_NO, + rx_lcid, + (char *) (pdu_ptr + mac_subheader_len), + mac_sdu_len, + 1, + NULL); break; case UL_SCH_LCID_SRB3: // todo diff --git a/openair3/ocp-gtpu/gtp_itf.cpp b/openair3/ocp-gtpu/gtp_itf.cpp index 0ff4d79b9a..82a1d782ec 100644 --- a/openair3/ocp-gtpu/gtp_itf.cpp +++ b/openair3/ocp-gtpu/gtp_itf.cpp @@ -436,11 +436,16 @@ teid_t newGtpuCreateTunnel(instance_t instance, rnti_t rnti, int incoming_bearer tmp->outgoing_port=port; tmp->teid_outgoing= outgoing_teid; pthread_mutex_unlock(&globGtp.gtp_lock); - LOG_D(GTPU, "Created tunnel for RNTI %x, bearer: %d/%d teid for DL: %x, teid for UL %x\n", + char ip4[INET_ADDRSTRLEN]; + char ip6[INET6_ADDRSTRLEN]; + + LOG_I(GTPU, "Created tunnel for RNTI %x, teid for DL: %d, teid for UL %d to remote IPv4: %s, IPv6 %s\n", rnti, - outgoing_bearer_id, incoming_bearer_id, tmp->teid_incoming, - tmp->teid_outgoing); + tmp->teid_outgoing, + inet_ntop(AF_INET,(void*)&tmp->outgoing_ip_addr, ip4,INET_ADDRSTRLEN ), + inet_ntop(AF_INET6,(void*)&tmp->outgoing_ip6_addr.s6_addr, ip6, INET6_ADDRSTRLEN)); + return incoming_teid; } From c9f72efc945fe75cf091b75e1e82b756d7bd3180 Mon Sep 17 00:00:00 2001 From: Panos Matzakos Date: Mon, 21 Jun 2021 16:13:48 +0000 Subject: [PATCH 509/579] Update TESTING_5GSA_setup.md for setup with OAI UE --- doc/TESTING_5GSA_setup.md | 68 +++++++++++++++++++++++++++++++++++---- 1 file changed, 61 insertions(+), 7 deletions(-) diff --git a/doc/TESTING_5GSA_setup.md b/doc/TESTING_5GSA_setup.md index a3df436c41..786af5e27c 100644 --- a/doc/TESTING_5GSA_setup.md +++ b/doc/TESTING_5GSA_setup.md @@ -24,7 +24,7 @@ At the moment of writing this document interoperability with the following COTS ## 1.1 gNB build and configuration -At the moment of writing this document most of the code to support the SA setup is not merged into develop branch yet, but it is accessible through the following branches: +At the moment of writing this document, most of the code to support the SA setup is not merged into develop branch yet, but it is accessible through the following branches: - NR_SA_F1AP_5GRECORDS - develop-NR_SA_F1AP_5GRECORDS (up-to-date with latest develop branch) @@ -32,7 +32,7 @@ At the moment of writing this document most of the code to support the SA setup To build the gNB executable: ```bash cd cmake_targets - ./build_oai -I -w USRP #For first time installation only to install software dependencies + ./build_oai -I -w USRP #For OAI first time installation only to install software dependencies ./build_oai --gNB -w USRP ``` @@ -87,8 +87,7 @@ For the configuration of the gNB in CU and DU blocks the following sample config At the point of writing this document the control-plane exchanges between the CU and the DU over *F1-C* interface have been validated. The integration of *F1-U* over gtp-u for the support of data plane traffic is ongoing. ## 1.2 OAI 5G Core Network installation and configuration -The instructions for the installation of OAI CN components (AMF, SMF, NRF, UPF) using docker compose can be found [here](https://gitlab.eurecom.fr/oai/cn5g). Below are some complementary instructions which can be useful for the deployment... - +The instructions for the installation of OAI CN components (AMF, SMF, NRF, UPF) using docker compose can be found [here](https://gitlab.eurecom.fr/oai/cn5g). Below are some complementary instructions which can be useful for the deployment. ## 1.3 Execution of SA scenario @@ -98,11 +97,66 @@ After having configured the gNB, we can start the individual components in the f - Launch gNB - Launch COTS UE (disable airplane mode) -The execution command to start the gNB is the following: +The execution command to start the gNB (in monolithic mode) is the following: ```bash -cd cmake_targets/ran_build/cuild +cd cmake_targets/ran_build/build sudo ./nr-softmodem -E --sa -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf ``` # 2. SA Setup with OAI UE -For the setup with the OAI UE +The SA setup with OAI UE has been validated with RFSIMULATOR for the moment. The control plane for the successful UE registration and PDU Session establishment has been verified with OAI and Nokia SA Box CNs. User-plane traffic validation after the establishment of the 5G connection is still pending for this setup. + +In the following, we provide the instructions on how to build, configure and execute this SA setup. + +## 2.1 Build and configuration +To build the gNB and OAI UE executables: + +```bash + cd cmake_targets + ./build_oai -I #For OAI first time installation only to install software dependencies + ./build_oai --gNB --nrUE -w SIMU +``` +The gNB configuration can be performed according to what is described in section 1.1, using the same reference configuration file as with the RF scenario. + +### NAS configuration for the OAI UE +At the moment, the NAS configuration parameters of the OAI UE are hardcoded in ***openair3/NAS/NR_UE/nr_nas_msg_sim.c***. More specifically: + + - The SUCI (*Subscription Concealed Identifier*) corresponding to default IMSI 2089900007487 is hardcoded in functions *generateRegistrationRequest()* and *generateIdentityResponse()* through the following lines: +```bash + mm_msg->registration_request.fgsmobileidentity.suci.typeofidentity = FGS_MOBILE_IDENTITY_SUCI; + mm_msg->registration_request.fgsmobileidentity.suci.mncdigit1 = 9; + mm_msg->registration_request.fgsmobileidentity.suci.mncdigit2 = 9; + mm_msg->registration_request.fgsmobileidentity.suci.mncdigit3 = 0xf; + mm_msg->registration_request.fgsmobileidentity.suci.mccdigit1 = 2; + mm_msg->registration_request.fgsmobileidentity.suci.mccdigit2 = 0; + mm_msg->registration_request.fgsmobileidentity.suci.mccdigit3 = 8; + mm_msg->registration_request.fgsmobileidentity.suci.schemeoutput = 0x4778; +``` + - USIM_API_K and OPc keys are hardcoded at the beginning of the file: +```bash +// USIM_API_K: fe c8 6b a6 eb 70 7e d0 89 05 75 7b 1b b4 4b 8f +uint8_t k[16] = {0xfe, 0xc8, 0x6b, 0xa6, 0xeb, 0x70, 0x7e, 0xd0, 0x89, 0x05, 0x75, 0x7b, 0x1b, 0xb4, 0x4b, 0x8f}; +// OPC: c4 24 49 36 3b ba d0 2b 66 d1 6b c9 75 d7 7c c1 +const uint8_t opc[16] = {0xc4, 0x24, 0x49, 0x36, 0x3b, 0xba, 0xd0, 0x2b, 0x66, 0xd1, 0x6b, 0xc9, 0x75, 0xd7, 0x7c, 0xc1}; +``` +- The NSSAI (*Network Slice Assistance Information*) and DNN (*Data Network Name*) are hardcoded in function *generatePduSessionEstablishRequest()* +```bash + uint8_t nssai[]={1,0,0,1}; //Corresponding to SST:1, SD:1 + uint8_t dnn[4]={0x4,0x6f,0x61,0x69}; //Corresponding to dnn:"oai" +``` +For interoperability with OAI or other CNs, it should be ensured that the configuration of the aforementioned parameters match the configuration of the corresponding subscribed user at the core network. +Hardcoding of the USIM information will soon be substituted with parsing those parameters from a configuration file. + +## 2.2 Execution of SA scenario + +The order of starting the different components should be the same as the one described in section 1.3. + + - To launch the gNB: + ```bash + sudo RFSIMULATOR=server ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf --rfsim --sa + ``` +- To launch the OAI UE: + ```bash +sudo RFSIMULATOR=127.0.0.1 ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --rfsim --sa --nokrnmod +``` +The IP address at the execution command of the OAI UE corresponds to the target IP of the gNB host that the RFSIMULATOR at the UE will connect to. In the above example, we assume that the gNB and UE are running on the same host so the specified address (127.0.0.1) is the one of the loopback interface. From 6cefe15467730b266cbc3d271f67e53c0f123afb Mon Sep 17 00:00:00 2001 From: rmagueta Date: Mon, 21 Jun 2021 17:48:47 +0100 Subject: [PATCH 510/579] Fix issues after cherry-pick --- openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c | 2 -- openair2/F1AP/f1ap_du_task.c | 2 +- openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c | 2 +- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 1 - openair2/RRC/NR/L2_nr_interface.c | 2 +- 5 files changed, 3 insertions(+), 6 deletions(-) diff --git a/openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c b/openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c index 2a3c16938a..1e372eb9e0 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c +++ b/openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c @@ -267,8 +267,6 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB, VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_DLSCH_ENCODING, VCD_FUNCTION_IN); A = rel15->TBSize[0]<<3; - if ( dlsch->rnti != SI_RNTI ) - trace_NRpdu(DIRECTION_DOWNLINK, a, rel15->TBSize[0], 0, WS_C_RNTI, dlsch->rnti, frame, slot,0, 0); NR_gNB_SCH_STATS_t *stats=NULL; int first_free=-1; diff --git a/openair2/F1AP/f1ap_du_task.c b/openair2/F1AP/f1ap_du_task.c index f1e32c1d3d..50f7cdff80 100644 --- a/openair2/F1AP/f1ap_du_task.c +++ b/openair2/F1AP/f1ap_du_task.c @@ -195,7 +195,7 @@ void *F1AP_DU_task(void *arg) { DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(0,0,0,msg->crnti, msg->rrc_container, msg->rrc_container_length, - (char*)msg->du2cu_rrc_container, + (const int8_t*)msg->du2cu_rrc_container, msg->du2cu_rrc_container_length); break; diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c index 509fd24f5b..5d8a82b82e 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c @@ -1997,7 +1997,7 @@ nr_ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP, buflen_remain = buflen - (total_rlc_pdu_header_len + sdu_length_total + MAX_RLC_SDU_SUBHEADER_SIZE); - LOG_I(NR_MAC, + LOG_D(NR_MAC, "[UE %d] Frame %d : UL-DXCH -> ULSCH, RLC %d has %d bytes to " "send (Transport Block size %d SDU Length Total %d , mac header len %d, buflen_remain %d )\n", //BSR byte before Tx=%d module_idP, frameP, lcid, lcid_buffer_occupancy_new, diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index f31c3d5477..615fcc7ba8 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -191,7 +191,6 @@ void nr_process_mac_pdu(module_id_t module_idP, uint16_t mac_ce_len, mac_subheader_len, mac_sdu_len; NR_UE_info_t *UE_info = &RC.nrmac[module_idP]->UE_info; - trace_NRpdu(DIRECTION_UPLINK, pduP, mac_pdu_len ,UE_id, WS_C_RNTI, UE_info->rnti[UE_id], frameP, 0,0, 0); NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; // For both DL/UL-SCH // Except: diff --git a/openair2/RRC/NR/L2_nr_interface.c b/openair2/RRC/NR/L2_nr_interface.c index 2f7da79185..1f4af2a98e 100644 --- a/openair2/RRC/NR/L2_nr_interface.c +++ b/openair2/RRC/NR/L2_nr_interface.c @@ -343,7 +343,7 @@ int8_t nr_mac_rrc_data_ind(const module_id_t module_idP, rntiP, sduP, sdu_lenP, - sdu2, + (const int8_t*)sdu2, sdu2_len ); return(0); From ac79ceb3f4dc0c554cc227891ca77e0b5dcf3dd7 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Mon, 21 Jun 2021 19:10:56 +0100 Subject: [PATCH 511/579] Fix build of phy-simulators --- openair1/SIMULATION/NR_PHY/dlsim.c | 4 ++++ openair1/SIMULATION/NR_PHY/prachsim.c | 4 ++++ openair1/SIMULATION/NR_PHY/ulsim.c | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index 54c3a68631..11f5d439ea 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -172,6 +172,10 @@ gtpv1u_update_ngu_tunnel( return 0; } +int ocp_gtpv1u_delete_s1u_tunnel(const instance_t instance, const gtpv1u_enb_delete_tunnel_req_t *const req_pP) { + return 0; +} + int nr_rrc_gNB_process_GTPV1U_CREATE_TUNNEL_RESP( const protocol_ctxt_t *const ctxt_pP, diff --git a/openair1/SIMULATION/NR_PHY/prachsim.c b/openair1/SIMULATION/NR_PHY/prachsim.c index 7fcbf8256b..93bed5514f 100644 --- a/openair1/SIMULATION/NR_PHY/prachsim.c +++ b/openair1/SIMULATION/NR_PHY/prachsim.c @@ -133,6 +133,10 @@ gtpv1u_update_ngu_tunnel( return 0; } +int ocp_gtpv1u_delete_s1u_tunnel(const instance_t instance, const gtpv1u_enb_delete_tunnel_req_t *const req_pP) { + return 0; +} + int nr_rrc_gNB_process_GTPV1U_CREATE_TUNNEL_RESP( const protocol_ctxt_t *const ctxt_pP, diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c index 1c28591aba..62f4420e75 100644 --- a/openair1/SIMULATION/NR_PHY/ulsim.c +++ b/openair1/SIMULATION/NR_PHY/ulsim.c @@ -136,6 +136,10 @@ gtpv1u_create_s1u_tunnel( return 0; } +int ocp_gtpv1u_delete_s1u_tunnel(const instance_t instance, const gtpv1u_enb_delete_tunnel_req_t *const req_pP) { + return 0; +} + int rrc_gNB_process_GTPV1U_CREATE_TUNNEL_RESP( const protocol_ctxt_t *const ctxt_pP, From 86225c3b8fd4fb61ec8bfadb9cb5d3652a5e80df Mon Sep 17 00:00:00 2001 From: Remi Hardy Date: Mon, 21 Jun 2021 14:35:14 +0200 Subject: [PATCH 512/579] implement optional Qlog trace --- ci-scripts/Jenkinsfile-trig-nsa | 25 ++++++++---- ci-scripts/cls_module_ue.py | 48 +++++++++++++----------- ci-scripts/cls_oaicitest.py | 7 +++- ci-scripts/main.py | 5 ++- ci-scripts/xml_files/fr1_nsa_quectel.xml | 1 + 5 files changed, 52 insertions(+), 34 deletions(-) diff --git a/ci-scripts/Jenkinsfile-trig-nsa b/ci-scripts/Jenkinsfile-trig-nsa index 8f623ffb05..1c479a5a2a 100644 --- a/ci-scripts/Jenkinsfile-trig-nsa +++ b/ci-scripts/Jenkinsfile-trig-nsa @@ -55,14 +55,23 @@ pipeline { string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)), booleanParam(name: 'eNB_AllowMergeRequestProcess', value: Boolean.valueOf(ALLOW_MERGE)) ] - //calling Benetel sub job - //build job: "RAN-CI-BENETEL", wait : false, propagate : false, parameters: [ - // string(name: 'eNB_MR', value: String.valueOf(MR)), - // string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)), - // string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)), - // string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)), - // booleanParam(name: 'eNB_AllowMergeRequestProcess', value: Boolean.valueOf(ALLOW_MERGE)) - //] + //calling NSA long sub job + build job: "RAN-NSA-Mini-Module-Long", wait : false, propagate : false, parameters: [ + string(name: 'eNB_MR', value: String.valueOf(MR)), + string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)), + string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)), + string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)), + booleanParam(name: 'eNB_AllowMergeRequestProcess', value: Boolean.valueOf(ALLOW_MERGE)) + ] + //calling NSA attach/detach job + build job: "RAN-NSA-Mini-Module-Attach-Detach", wait : false, propagate : false, parameters: [ + string(name: 'eNB_MR', value: String.valueOf(MR)), + string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)), + string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)), + string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)), + booleanParam(name: 'eNB_AllowMergeRequestProcess', value: Boolean.valueOf(ALLOW_MERGE)) + ] + } } } diff --git a/ci-scripts/cls_module_ue.py b/ci-scripts/cls_module_ue.py index cb5c81e271..0ad493ad40 100644 --- a/ci-scripts/cls_module_ue.py +++ b/ci-scripts/cls_module_ue.py @@ -50,7 +50,8 @@ class Module_UE: setattr(self, k, v) self.UEIPAddress = "" #dictionary linking command names and related module scripts - self.cmd_dict= {"wup": self.WakeupScript,"detach":self.DetachScript}#dictionary of function scripts + self.cmd_dict= {"wup": self.WakeupScript,"detach":self.DetachScript}#dictionary of function scripts + self.ue_trace='' @@ -130,13 +131,14 @@ class Module_UE: return -1 def EnableTrace(self): - mySSH = sshconnection.SSHConnection() - mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword) - #delete old artifacts - mySSH.command('echo ' + self.HostPassword + ' | sudo -S rm -rf ci_qlog','\$',5) - #start Trace, artifact is created in home dir - mySSH.command('echo $USER; nohup sudo -E QLog/QLog -s ci_qlog -f NR5G.cfg &','\$', 5) - mySSH.close() + if self.ue_trace=="yes": + mySSH = sshconnection.SSHConnection() + mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword) + #delete old artifacts + mySSH.command('echo ' + self.HostPassword + ' | sudo -S rm -rf ci_qlog','\$',5) + #start Trace, artifact is created in home dir + mySSH.command('echo $USER; nohup sudo -E QLog/QLog -s ci_qlog -f NR5G.cfg &','\$', 5) + mySSH.close() def DisableTrace(self): mySSH = sshconnection.SSHConnection() @@ -153,18 +155,20 @@ class Module_UE: def LogCollect(self): - mySSH = sshconnection.SSHConnection() - mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword) - #archive qlog to USB stick in /media/usb-drive/ci_qlogs with datetime suffix - now=datetime.now() - now_string = now.strftime("%Y%m%d-%H%M") - source='ci_qlog' - destination='/media/usb-drive/ci_qlogs/ci_qlog_'+now_string+'.zip' - #qlog artifact is zipped into the target folder - mySSH.command('echo $USER; echo ' + self.HostPassword + ' | nohup sudo -S zip -r '+destination+' '+source+' &','\$', 10) - mySSH.close() - #post action : log cleaning to make sure enough space is reserved for the next run - Log_Mgt=cls_log_mgt.Log_Mgt(self.HostIPAddress, self.HostPassword, "/media/usb-drive/ci_qlogs") - Log_Mgt.LogRotation() - + if self.ue_trace=="yes": + mySSH = sshconnection.SSHConnection() + mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword) + #archive qlog to USB stick in /media/usb-drive/ci_qlogs with datetime suffix + now=datetime.now() + now_string = now.strftime("%Y%m%d-%H%M") + source='ci_qlog' + destination='/media/usb-drive/ci_qlogs/ci_qlog_'+now_string+'.zip' + #qlog artifact is zipped into the target folder + mySSH.command('echo $USER; echo ' + self.HostPassword + ' | nohup sudo -S zip -r '+destination+' '+source+' &','\$', 10) + mySSH.close() + #post action : log cleaning to make sure enough space is reserved for the next run + Log_Mgt=cls_log_mgt.Log_Mgt(self.HostIPAddress, self.HostPassword, "/media/usb-drive/ci_qlogs") + Log_Mgt.LogRotation() + else: + destination="" return destination diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index 7283fba5af..6f61fddbc3 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -160,6 +160,7 @@ class OaiCiTest(): self.air_interface='' self.expectedNbOfConnectedUEs = 0 self.ue_id = '' #used for module identification + self.ue_trace ='' #used to enable QLog trace for Module UE, passed to Module UE object at InitializeUE() def BuildOAIUE(self,HTML): @@ -367,7 +368,7 @@ class OaiCiTest(): except: os.kill(os.getppid(),signal.SIGUSR1) - def InitializeUE(self,HTML,RAN,EPC, COTS_UE, InfraUE): + def InitializeUE(self,HTML,RAN,EPC, COTS_UE, InfraUE,ue_trace): if self.ue_id=='':#no ID specified, then it is a COTS controlled by ADB if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '': HELP.GenericHelp(CONST.Version) @@ -386,6 +387,7 @@ class OaiCiTest(): else: #if an ID is specified, it is a module from the yaml infrastructure file #RH Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id]) + Module_UE.ue_trace=ue_trace is_module=Module_UE.CheckCMProcess() if is_module: Module_UE.EnableTrace() @@ -3102,7 +3104,7 @@ class OaiCiTest(): except: os.kill(os.getppid(),signal.SIGUSR1) - def TerminateUE(self,HTML,COTS_UE): + def TerminateUE(self,HTML,COTS_UE,InfraUE,ue_trace): if self.ue_id=='':#no ID specified, then it is a COTS controlled by ADB terminate_ue_flag = False self.GetAllUEDevices(terminate_ue_flag) @@ -3119,6 +3121,7 @@ class OaiCiTest(): HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK) else: #if an ID is specified, it is a module from the yaml infrastructure file Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id]) + Module_UE.ue_trace=ue_trace Module_UE.Command("detach") Module_UE.DisableTrace() Module_UE.DisableCM() diff --git a/ci-scripts/main.py b/ci-scripts/main.py index 142ecdf202..066e67d6be 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -197,6 +197,7 @@ def GetParametersFromXML(action): elif action == 'Initialize_UE': ue_id = test.findtext('id') + CiTestObj.ue_trace=test.findtext('UE_Trace')#temporary variable, to be passed to Module_UE in Initialize_UE call if (ue_id is None): CiTestObj.ue_id = "" else: @@ -727,9 +728,9 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re elif action == 'Terminate_eNB': RAN.TerminateeNB(HTML, EPC) elif action == 'Initialize_UE': - CiTestObj.InitializeUE(HTML,RAN, EPC, COTS_UE, InfraUE) + CiTestObj.InitializeUE(HTML,RAN, EPC, COTS_UE, InfraUE, CiTestObj.ue_trace) elif action == 'Terminate_UE': - CiTestObj.TerminateUE(HTML,COTS_UE) + CiTestObj.TerminateUE(HTML,COTS_UE, InfraUE, CiTestObj.ue_trace) elif action == 'Attach_UE': CiTestObj.AttachUE(HTML,RAN,EPC,COTS_UE,InfraUE) elif action == 'Detach_UE': diff --git a/ci-scripts/xml_files/fr1_nsa_quectel.xml b/ci-scripts/xml_files/fr1_nsa_quectel.xml index 980b55c30c..7ec3a5f140 100644 --- a/ci-scripts/xml_files/fr1_nsa_quectel.xml +++ b/ci-scripts/xml_files/fr1_nsa_quectel.xml @@ -48,6 +48,7 @@ Initialize_UE Initialize Quectel idefix + yes
From 0cd356864a14fa96e98af06488d0d6ba802956fd Mon Sep 17 00:00:00 2001 From: rmagueta Date: Tue, 22 Jun 2021 12:34:20 +0100 Subject: [PATCH 513/579] Revert ul_failure option --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c | 1 - openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c | 1 - openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 1 - 3 files changed, 3 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index c159bab5a6..dd75f07930 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -801,7 +801,6 @@ void nr_schedule_ue_spec(module_id_t module_id, NR_list_t *UE_list = &UE_info->list; for (int UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; - if (sched_ctrl->ul_failure==1) continue; NR_sched_pdsch_t *sched_pdsch = &sched_ctrl->sched_pdsch; UE_info->mac_stats[UE_id].dlsch_current_bytes = 0; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c index 58421a4f7c..e130bdcf3d 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c @@ -131,7 +131,6 @@ void nr_schedule_pucch(int Mod_idP, for (int UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; - if (sched_ctrl->ul_failure==1) continue; const int n = sizeof(sched_ctrl->sched_pucch) / sizeof(*sched_ctrl->sched_pucch); for (int i = 0; i < n; i++) { NR_sched_pucch_t *curr_pucch = &UE_info->UE_sched_ctrl[UE_id].sched_pucch[i]; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 615fcc7ba8..8f38a4ea01 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -1311,7 +1311,6 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot) const NR_list_t *UE_list = &UE_info->list; for (int UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; - if (sched_ctrl->ul_failure == 1) continue; UE_info->mac_stats[UE_id].ulsch_current_bytes = 0; /* dynamic PUSCH values (RB alloc, MCS, hence R, Qm, TBS) that change in From 0649737aa7479afe6eb5459962c9b0d5b88982c7 Mon Sep 17 00:00:00 2001 From: Roberto Louro Magueta Date: Tue, 22 Jun 2021 13:50:04 +0200 Subject: [PATCH 514/579] Revert "Revert ul_failure option" This reverts commit 0cd356864a14fa96e98af06488d0d6ba802956fd --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c | 1 + openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c | 1 + openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 1 + 3 files changed, 3 insertions(+) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index dd75f07930..c159bab5a6 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -801,6 +801,7 @@ void nr_schedule_ue_spec(module_id_t module_id, NR_list_t *UE_list = &UE_info->list; for (int UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; + if (sched_ctrl->ul_failure==1) continue; NR_sched_pdsch_t *sched_pdsch = &sched_ctrl->sched_pdsch; UE_info->mac_stats[UE_id].dlsch_current_bytes = 0; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c index e130bdcf3d..58421a4f7c 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c @@ -131,6 +131,7 @@ void nr_schedule_pucch(int Mod_idP, for (int UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; + if (sched_ctrl->ul_failure==1) continue; const int n = sizeof(sched_ctrl->sched_pucch) / sizeof(*sched_ctrl->sched_pucch); for (int i = 0; i < n; i++) { NR_sched_pucch_t *curr_pucch = &UE_info->UE_sched_ctrl[UE_id].sched_pucch[i]; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 8f38a4ea01..615fcc7ba8 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -1311,6 +1311,7 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot) const NR_list_t *UE_list = &UE_info->list; for (int UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; + if (sched_ctrl->ul_failure == 1) continue; UE_info->mac_stats[UE_id].ulsch_current_bytes = 0; /* dynamic PUSCH values (RB alloc, MCS, hence R, Qm, TBS) that change in From 99ec7f095866e97a42e06baeeb7f74ef64aeb3a8 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Tue, 22 Jun 2021 13:05:52 +0100 Subject: [PATCH 515/579] Fix ul_failure option for phy_test mode --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c | 2 +- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c | 3 ++- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index c159bab5a6..4603b91877 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -801,7 +801,7 @@ void nr_schedule_ue_spec(module_id_t module_id, NR_list_t *UE_list = &UE_info->list; for (int UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; - if (sched_ctrl->ul_failure==1) continue; + if (sched_ctrl->ul_failure==1 && get_softmodem_params()->phy_test==0) continue; NR_sched_pdsch_t *sched_pdsch = &sched_ctrl->sched_pdsch; UE_info->mac_stats[UE_id].dlsch_current_bytes = 0; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c index 58421a4f7c..c7ee3fcff2 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c @@ -26,6 +26,7 @@ * \company Eurecom */ +#include #include "LAYER2/MAC/mac.h" #include "NR_MAC_gNB/nr_mac_gNB.h" #include "NR_MAC_COMMON/nr_mac_extern.h" @@ -131,7 +132,7 @@ void nr_schedule_pucch(int Mod_idP, for (int UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; - if (sched_ctrl->ul_failure==1) continue; + if (sched_ctrl->ul_failure==1 && get_softmodem_params()->phy_test==0) continue; const int n = sizeof(sched_ctrl->sched_pucch) / sizeof(*sched_ctrl->sched_pucch); for (int i = 0; i < n; i++) { NR_sched_pucch_t *curr_pucch = &UE_info->UE_sched_ctrl[UE_id].sched_pucch[i]; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 615fcc7ba8..3effe300ab 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -1311,7 +1311,7 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot) const NR_list_t *UE_list = &UE_info->list; for (int UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) { NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; - if (sched_ctrl->ul_failure == 1) continue; + if (sched_ctrl->ul_failure == 1 && get_softmodem_params()->phy_test==0) continue; UE_info->mac_stats[UE_id].ulsch_current_bytes = 0; /* dynamic PUSCH values (RB alloc, MCS, hence R, Qm, TBS) that change in From 49088aed1d16506bd29765814b7dfb77a3aa9a67 Mon Sep 17 00:00:00 2001 From: Remi Hardy Date: Tue, 22 Jun 2021 11:11:57 +0200 Subject: [PATCH 516/579] fix AutoTerminate --- ci-scripts/cls_oaicitest.py | 14 +++++--------- .../xml_files/fr1_nsa_quectel_attach_detach.xml | 1 + 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index 6f61fddbc3..5cf785b08e 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -3126,7 +3126,10 @@ class OaiCiTest(): Module_UE.DisableTrace() Module_UE.DisableCM() archive_destination=Module_UE.LogCollect() - HTML.CreateHtmlTestRow('QLog at : '+archive_destination, 'OK', CONST.ALL_PROCESSES_OK) + if Module_UE.ue_trace=='yes': + HTML.CreateHtmlTestRow('QLog at : '+archive_destination, 'OK', CONST.ALL_PROCESSES_OK) + else: + HTML.CreateHtmlTestRow('QLog trace is disabled', 'OK', CONST.ALL_PROCESSES_OK) def TerminateOAIUE(self,HTML,RAN,COTS_UE,EPC, InfraUE): SSH = sshconnection.SSHConnection() @@ -3183,20 +3186,13 @@ class OaiCiTest(): HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK) def AutoTerminateUEandeNB(self,HTML,RAN,COTS_UE,EPC,InfraUE): - if self.ue_id!='': - Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id]) - Module_UE.Command("detach") - Module_UE.DisableTrace() - Module_UE.DisableCM() - archive_destination=Module_UE.LogCollect() - HTML.CreateHtmlTestRow('QLog at : '+archive_destination, 'OK', CONST.ALL_PROCESSES_OK) if (self.ADBIPAddress != 'none'): self.testCase_id = 'AUTO-KILL-UE' HTML.testCase_id=self.testCase_id self.desc = 'Automatic Termination of UE' HTML.desc='Automatic Termination of UE' self.ShowTestID() - self.TerminateUE(HTML,COTS_UE) + self.TerminateUE(HTML,COTS_UE,InfraUE,self.ue_trace) if (self.Initialize_OAI_UE_args != ''): self.testCase_id = 'AUTO-KILL-OAI-UE' HTML.testCase_id=self.testCase_id diff --git a/ci-scripts/xml_files/fr1_nsa_quectel_attach_detach.xml b/ci-scripts/xml_files/fr1_nsa_quectel_attach_detach.xml index f78cd3bd82..2263f731c5 100644 --- a/ci-scripts/xml_files/fr1_nsa_quectel_attach_detach.xml +++ b/ci-scripts/xml_files/fr1_nsa_quectel_attach_detach.xml @@ -55,6 +55,7 @@ Initialize_UE Initialize Quectel idefix + yes
From 014c09fdddaae73aecd02cb29ab6ca9d933729f4 Mon Sep 17 00:00:00 2001 From: Remi Hardy Date: Tue, 22 Jun 2021 18:36:04 +0200 Subject: [PATCH 517/579] fix nsa job trigger --- ci-scripts/Jenkinsfile-trig-nsa | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci-scripts/Jenkinsfile-trig-nsa b/ci-scripts/Jenkinsfile-trig-nsa index 1c479a5a2a..44527a1a38 100644 --- a/ci-scripts/Jenkinsfile-trig-nsa +++ b/ci-scripts/Jenkinsfile-trig-nsa @@ -48,7 +48,7 @@ pipeline { COMMIT_ID=COMMIT_ID.trim() echo "Testing NSA on : ${MR} ${SRC_BRANCH} ${COMMIT_ID}" //calling NSA sub job - build job: "RAN-NSA-Mini-Module", wait : false, propagate : false, parameters: [ + build job: "RAN-NSA-Mini-Module", wait : true, propagate : false, parameters: [ string(name: 'eNB_MR', value: String.valueOf(MR)), string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)), string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)), @@ -56,7 +56,7 @@ pipeline { booleanParam(name: 'eNB_AllowMergeRequestProcess', value: Boolean.valueOf(ALLOW_MERGE)) ] //calling NSA long sub job - build job: "RAN-NSA-Mini-Module-Long", wait : false, propagate : false, parameters: [ + build job: "RAN-NSA-Mini-Module-Long", wait : true, propagate : false, parameters: [ string(name: 'eNB_MR', value: String.valueOf(MR)), string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)), string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)), @@ -64,7 +64,7 @@ pipeline { booleanParam(name: 'eNB_AllowMergeRequestProcess', value: Boolean.valueOf(ALLOW_MERGE)) ] //calling NSA attach/detach job - build job: "RAN-NSA-Mini-Module-Attach-Detach", wait : false, propagate : false, parameters: [ + build job: "RAN-NSA-Mini-Module-Attach-Detach", wait : true, propagate : false, parameters: [ string(name: 'eNB_MR', value: String.valueOf(MR)), string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)), string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)), From a675de4c8b41ba0329a0bc9ff3c8c7d2352d0005 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Tue, 22 Jun 2021 18:48:46 +0100 Subject: [PATCH 518/579] Initialization of ssb_mask and ssb_period at UE for SA --- executables/nr-uesoftmodem.c | 6 +++-- openair2/LAYER2/NR_MAC_UE/config_ue.c | 2 +- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 27 ++++++++++++-------- 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/executables/nr-uesoftmodem.c b/executables/nr-uesoftmodem.c index 1502d95a78..cbc79912a2 100644 --- a/executables/nr-uesoftmodem.c +++ b/executables/nr-uesoftmodem.c @@ -489,10 +489,12 @@ int main( int argc, char **argv ) { nrUE_config->carrier_config.ul_grid_size[nrUE_config->ssb_config.scs_common] = UE[CC_id]->frame_parms.N_RB_DL; nrUE_config->carrier_config.dl_frequency = (downlink_frequency[0][0] -(6*UE[CC_id]->frame_parms.N_RB_DL*(15000<ssb_config.scs_common)))/1000; nrUE_config->carrier_config.uplink_frequency = (downlink_frequency[0][0] -(6*UE[CC_id]->frame_parms.N_RB_DL*(15000<ssb_config.scs_common)))/1000; - nrUE_config->cell_config.frame_duplex_type = TDD; nrUE_config->ssb_table.ssb_offset_point_a = (UE[CC_id]->frame_parms.N_RB_DL - 20)>>1; - + // Initialize values, will be updated upon SIB1 reception + nrUE_config->cell_config.frame_duplex_type = TDD; + nrUE_config->ssb_table.ssb_mask_list[0].ssb_mask = 0xFFFFFFFF; + nrUE_config->ssb_table.ssb_period = 1; } nr_init_frame_parms_ue(&UE[CC_id]->frame_parms, nrUE_config, diff --git a/openair2/LAYER2/NR_MAC_UE/config_ue.c b/openair2/LAYER2/NR_MAC_UE/config_ue.c index af24add77d..3f08b70930 100755 --- a/openair2/LAYER2/NR_MAC_UE/config_ue.c +++ b/openair2/LAYER2/NR_MAC_UE/config_ue.c @@ -232,7 +232,7 @@ void config_common_ue(NR_UE_MAC_INST_t *mac, cfg->ssb_table.ssb_offset_point_a = absolute_diff/(12*scs_scaling) - 10; cfg->ssb_table.ssb_period = *scc->ssb_periodicityServingCell; cfg->ssb_table.ssb_subcarrier_offset = 0; // TODO currently not in RRC? - + switch (scc->ssb_PositionsInBurst->present) { case 1 : cfg->ssb_table.ssb_mask_list[0].ssb_mask = scc->ssb_PositionsInBurst->choice.shortBitmap.buf[0]<<24; diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 2bac03fc4f..ffcc57a45f 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -62,6 +62,7 @@ #include "common/utils/LOG/log.h" #include "common/utils/LOG/vcd_signal_dumper.h" +//#define DEBUG_MIB //#define ENABLE_MAC_PAYLOAD_DEBUG 1 //#define DEBUG_EXTRACT_DCI //#define DEBUG_RAR @@ -115,9 +116,10 @@ int8_t nr_ue_decode_mib(module_id_t module_id, //if(mac->mib != NULL){ uint16_t frame = (mac->mib->systemFrameNumber.buf[0] >> mac->mib->systemFrameNumber.bits_unused); uint16_t frame_number_4lsb = 0; + for (int i=0; i<4; i++) frame_number_4lsb |= ((extra_bits>>i)&1)<<(3-i); - uint8_t half_frame_bit = ( extra_bits >> 4 ) & 0x1; // extra bits[4] + uint8_t ssb_subcarrier_offset_msb = ( extra_bits >> 5 ) & 0x1; // extra bits[5] uint8_t ssb_subcarrier_offset = (uint8_t)mac->mib->ssb_SubcarrierOffset; @@ -134,15 +136,20 @@ int8_t nr_ue_decode_mib(module_id_t module_id, } } - LOG_D(MAC,"system frame number(6 MSB bits): %d\n", mac->mib->systemFrameNumber.buf[0]); - LOG_D(MAC,"system frame number(with LSB): %d\n", (int)frame); - LOG_D(MAC,"subcarrier spacing (0=15or60, 1=30or120): %d\n", (int)mac->mib->subCarrierSpacingCommon); - LOG_D(MAC,"ssb carrier offset(with MSB): %d\n", (int)ssb_subcarrier_offset); - LOG_D(MAC,"dmrs type A position (0=pos2,1=pos3): %d\n", (int)mac->mib->dmrs_TypeA_Position); - LOG_D(MAC,"cell barred (0=barred,1=notBarred): %d\n", (int)mac->mib->cellBarred); - LOG_D(MAC,"intra frequency reselection (0=allowed,1=notAllowed): %d\n", (int)mac->mib->intraFreqReselection); - LOG_D(MAC,"half frame bit(extra bits): %d\n", (int)half_frame_bit); - LOG_D(MAC,"ssb index(extra bits): %d\n", (int)ssb_index); +#ifdef DEBUG_MIB + uint8_t half_frame_bit = ( extra_bits >> 4 ) & 0x1; // extra bits[4] + LOG_I(MAC,"system frame number(6 MSB bits): %d\n", mac->mib->systemFrameNumber.buf[0]); + LOG_I(MAC,"system frame number(with LSB): %d\n", (int)frame); + LOG_I(MAC,"subcarrier spacing (0=15or60, 1=30or120): %d\n", (int)mac->mib->subCarrierSpacingCommon); + LOG_I(MAC,"ssb carrier offset(with MSB): %d\n", (int)ssb_subcarrier_offset); + LOG_I(MAC,"dmrs type A position (0=pos2,1=pos3): %d\n", (int)mac->mib->dmrs_TypeA_Position); + LOG_I(MAC,"controlResourceSetZero: %d\n", (int)mac->mib->pdcch_ConfigSIB1.controlResourceSetZero); + LOG_I(MAC,"searchSpaceZero: %d\n", (int)mac->mib->pdcch_ConfigSIB1.searchSpaceZero); + LOG_I(MAC,"cell barred (0=barred,1=notBarred): %d\n", (int)mac->mib->cellBarred); + LOG_I(MAC,"intra frequency reselection (0=allowed,1=notAllowed): %d\n", (int)mac->mib->intraFreqReselection); + LOG_I(MAC,"half frame bit(extra bits): %d\n", (int)half_frame_bit); + LOG_I(MAC,"ssb index(extra bits): %d\n", (int)ssb_index); +#endif //storing ssb index in the mac structure mac->mib_ssb = ssb_index; From 8cef72ef9b656fdb52d6adbba88eac4d45a27237 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Wed, 23 Jun 2021 05:01:51 +0100 Subject: [PATCH 519/579] Fix xer_printf buffer address --- openair2/RRC/NR/rrc_gNB.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index 18ab54491d..23e3391c85 100755 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -2189,7 +2189,10 @@ rrc_gNB_decode_dcch( sdu_sizeP, 0, 0); - // xer_fprint(stdout, &asn_DEF_NR_UL_DCCH_Message, (void *)&ul_dcch_msg); + + if (LOG_DEBUGFLAG(DEBUG_ASN1)) { + xer_fprint(stdout, &asn_DEF_NR_UL_DCCH_Message, (void *)ul_dcch_msg); + } { for (i = 0; i < sdu_sizeP; i++) { From 195a87fdc7dfb59a852f7dedc0deaa89dcc40e3e Mon Sep 17 00:00:00 2001 From: Remi Hardy Date: Wed, 23 Jun 2021 08:41:43 +0200 Subject: [PATCH 520/579] fixing missing (new) arguments in TerminateUE call --- ci-scripts/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-scripts/main.py b/ci-scripts/main.py index 066e67d6be..0718ee6396 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -483,7 +483,7 @@ elif re.match('^TerminateUE$', mode, re.IGNORECASE): HELP.GenericHelp(CONST.Version) sys.exit('Insufficient Parameter') signal.signal(signal.SIGUSR1, receive_signal) - CiTestObj.TerminateUE(HTML,COTS_UE) + CiTestObj.TerminateUE(HTML,COTS_UE,InfraUE,CiTestObj.ue_trace) elif re.match('^TerminateOAIUE$', mode, re.IGNORECASE): if CiTestObj.UEIPAddress == '' or CiTestObj.UEUserName == '' or CiTestObj.UEPassword == '': HELP.GenericHelp(CONST.Version) From 40157242139b0b42978b0f88fa89f3cf017c2f37 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Wed, 23 Jun 2021 11:29:37 +0100 Subject: [PATCH 521/579] Fix a regression in UE (LCID loop) --- openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c index 5d8a82b82e..b2364a6116 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c @@ -1992,9 +1992,9 @@ nr_ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP, // TO DO: Multiplex in the order defined by the logical channel prioritization for (lcid = UL_SCH_LCID_SRB1; lcid < MAX_LCID; lcid++) { + lcid_buffer_occupancy_new = mac_rlc_get_buffer_occupancy_ind(module_idP, mac->crnti, eNB_index, frameP, subframe, ENB_FLAG_NO, lcid); - if( mac_rlc_get_buffer_occupancy_ind(module_idP, mac->crnti, eNB_index, frameP, subframe, ENB_FLAG_NO, lcid) ) { - + if(lcid_buffer_occupancy_new) { buflen_remain = buflen - (total_rlc_pdu_header_len + sdu_length_total + MAX_RLC_SDU_SUBHEADER_SIZE); LOG_D(NR_MAC, @@ -2004,7 +2004,7 @@ nr_ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP, buflen, sdu_length_total, total_rlc_pdu_header_len, buflen_remain); // ,nr_ue_mac_inst->scheduling_info.BSR_bytes[nr_ue_mac_inst->scheduling_info.LCGID[lcid]] - while(buflen_remain > 0 && lcid_buffer_occupancy_new){ + while(buflen_remain > 0 && lcid_buffer_occupancy_new){ sdu_lengths[num_sdus] = mac_rlc_data_req(module_idP, mac->crnti, @@ -2031,13 +2031,14 @@ nr_ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP, num_sdus++; } + /* Get updated BO after multiplexing this PDU */ + lcid_buffer_occupancy_new = mac_rlc_get_buffer_occupancy_ind(module_idP,mac->crnti,eNB_index,frameP, subframe, ENB_FLAG_NO, lcid); buflen_remain = buflen - (total_rlc_pdu_header_len + sdu_length_total + MAX_RLC_SDU_SUBHEADER_SIZE); - } + } + } } -} - // Generate ULSCH PDU if (num_sdus>0) { payload_offset = nr_generate_ulsch_pdu(ulsch_sdus, @@ -2052,9 +2053,9 @@ nr_ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP, 0, // long_bsr 0, // post_padding buflen); // TBS in bytes + } else { + return 0; } - else - return 0; // Padding: fill remainder of ULSCH with 0 if (buflen - payload_offset > 0){ From 7017306cfb722d73521d41796efac97e69793a63 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Wed, 23 Jun 2021 21:13:26 +0100 Subject: [PATCH 522/579] RRCSetup should only configure SRB1 --- openair2/RRC/NR/MESSAGES/asn1_msg.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/openair2/RRC/NR/MESSAGES/asn1_msg.c b/openair2/RRC/NR/MESSAGES/asn1_msg.c index bacb9716b1..3b074f3fff 100755 --- a/openair2/RRC/NR/MESSAGES/asn1_msg.c +++ b/openair2/RRC/NR/MESSAGES/asn1_msg.c @@ -1320,7 +1320,6 @@ uint8_t do_RRCSetup(rrc_gNB_ue_context_t *const ue_context_pP, NR_RRCSetup_t *rrcSetup; NR_RRCSetup_IEs_t *ie; NR_SRB_ToAddMod_t *SRB1_config = NULL; - NR_SRB_ToAddMod_t *SRB2_config = NULL; NR_PDCP_Config_t *pdcp_Config = NULL; NR_CellGroupConfig_t *cellGroupConfig = NULL; char masterCellGroup_buf[1000]; @@ -1360,11 +1359,6 @@ uint8_t do_RRCSetup(rrc_gNB_ue_context_t *const ue_context_pP, ie->radioBearerConfig.srb_ToAddModList = *SRB_configList; ASN_SEQUENCE_ADD(&(*SRB_configList)->list, SRB1_config); - SRB2_config = calloc(1, sizeof(NR_SRB_ToAddMod_t)); - SRB2_config->srb_Identity = 2; - SRB2_config->pdcp_Config = pdcp_Config; - ASN_SEQUENCE_ADD(&(*SRB_configList)->list, SRB2_config); - ie->radioBearerConfig.srb3_ToRelease = NULL; ie->radioBearerConfig.drb_ToAddModList = NULL; ie->radioBearerConfig.drb_ToReleaseList = NULL; @@ -1387,8 +1381,6 @@ uint8_t do_RRCSetup(rrc_gNB_ue_context_t *const ue_context_pP, cellGroupConfig = calloc(1, sizeof(NR_CellGroupConfig_t)); fill_initial_cellGroupConfig(ue_context_pP->ue_context.rnti,cellGroupConfig,scc); - ue_p->masterCellGroup = cellGroupConfig; - enc_rval = uper_encode_to_buffer(&asn_DEF_NR_CellGroupConfig, NULL, (void *)cellGroupConfig, @@ -1407,8 +1399,10 @@ uint8_t do_RRCSetup(rrc_gNB_ue_context_t *const ue_context_pP, } } + ue_p->masterCellGroup = cellGroupConfig; + if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { - xer_fprint(stdout, &asn_DEF_NR_DL_CCCH_Message, (void *)&dl_ccch_msg); + xer_fprint(stdout, &asn_DEF_NR_DL_CCCH_Message, (void *)&dl_ccch_msg); } enc_rval = uper_encode_to_buffer(&asn_DEF_NR_DL_CCCH_Message, NULL, From 3613927bc8931804ff202d751fdb35d3d064c52b Mon Sep 17 00:00:00 2001 From: sfn Date: Wed, 19 May 2021 17:55:58 +0200 Subject: [PATCH 523/579] Extend rfsimulator to support 2 layers for DL transmission from cm line with option --l 1 or 2 --- executables/nr-softmodem-common.h | 1 + executables/nr-softmodem.h | 2 ++ executables/nr-uesoftmodem.c | 4 ++-- openair1/PHY/INIT/nr_init_ru.c | 4 ++-- openair1/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c | 2 +- openair1/SCHED_NR_UE/fapi_nr_ue_l1.c | 10 ++++++++-- openair1/SIMULATION/NR_PHY/dlsim.c | 1 - openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c | 3 ++- targets/ARCH/rfsimulator/simulator.c | 13 +++++++++---- 9 files changed, 27 insertions(+), 13 deletions(-) diff --git a/executables/nr-softmodem-common.h b/executables/nr-softmodem-common.h index 813ffcf8fa..00f786dfdc 100644 --- a/executables/nr-softmodem-common.h +++ b/executables/nr-softmodem-common.h @@ -69,6 +69,7 @@ #define CONFIG_HLP_EXMCAL "Calibrate the EXMIMO borad, available files: exmimo2_2arxg.lime exmimo2_2brxg.lime \n" #define CONFIG_HLP_ITTIL "Generate ITTI analyzser logs (similar to wireshark logs but with more details)\n" #define CONFIG_HLP_DLMCS_PHYTEST "Set the downlink MCS for PHYTEST mode\n" +#define CONFIG_HLP_DLNL_PHYTEST "Set the downlink nrOfLayers for PHYTEST mode\n" #define CONFIG_HLP_STMON "Enable processing timing measurement of lte softmodem on per subframe basis \n" #define CONFIG_HLP_PRB "Set the PRB, valid values: 6, 25, 50, 100 \n" #define CONFIG_HLP_MSLOTS "Skip the missed slots/subframes \n" diff --git a/executables/nr-softmodem.h b/executables/nr-softmodem.h index 928558013c..896c363cbf 100644 --- a/executables/nr-softmodem.h +++ b/executables/nr-softmodem.h @@ -22,6 +22,7 @@ {"A" , CONFIG_HLP_TADV, 0, uptr:&timing_advance, defintval:0, TYPE_UINT, 0}, \ {"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL, i8ptr:&threequarter_fs, defintval:0, TYPE_INT8, 0}, \ {"m" , CONFIG_HLP_DLMCS_PHYTEST,0, uptr:&target_dl_mcs, defintval:0, TYPE_UINT, 0}, \ + {"l" , CONFIG_HLP_DLNL_PHYTEST,0, uptr:&target_dl_Nl, defintval:0, TYPE_UINT, 0}, \ {"t" , CONFIG_HLP_ULMCS_PHYTEST,0, uptr:&target_ul_mcs, defintval:0, TYPE_UINT, 0}, \ {"M" , CONFIG_HLP_DLBW_PHYTEST,0, uptr:&target_dl_bw, defintval:0, TYPE_UINT, 0}, \ {"T" , CONFIG_HLP_ULBW_PHYTEST,0, uptr:&target_ul_bw, defintval:0, TYPE_UINT, 0}, \ @@ -34,6 +35,7 @@ #include "threads_t.h" extern threads_t threads; extern uint32_t target_dl_mcs; +extern uint32_t target_dl_Nl; extern uint32_t target_ul_mcs; extern uint32_t target_dl_bw; extern uint32_t target_ul_bw; diff --git a/executables/nr-uesoftmodem.c b/executables/nr-uesoftmodem.c index 83b3d433aa..231c266fee 100644 --- a/executables/nr-uesoftmodem.c +++ b/executables/nr-uesoftmodem.c @@ -354,8 +354,8 @@ void init_openair0(void) { openair0_cfg[card].num_rb_dl = frame_parms->N_RB_DL; openair0_cfg[card].clock_source = get_softmodem_params()->clock_source; openair0_cfg[card].time_source = get_softmodem_params()->timing_source; - openair0_cfg[card].tx_num_channels = min(2, frame_parms->nb_antennas_tx); - openair0_cfg[card].rx_num_channels = min(2, frame_parms->nb_antennas_rx); + openair0_cfg[card].tx_num_channels = min(4, frame_parms->nb_antennas_tx); + openair0_cfg[card].rx_num_channels = min(4, frame_parms->nb_antennas_rx); LOG_I(PHY, "HW: Configuring card %d, sample_rate %f, tx/rx num_channels %d/%d, duplex_mode %s\n", card, diff --git a/openair1/PHY/INIT/nr_init_ru.c b/openair1/PHY/INIT/nr_init_ru.c index 5ab46ccda2..f480b43f48 100644 --- a/openair1/PHY/INIT/nr_init_ru.c +++ b/openair1/PHY/INIT/nr_init_ru.c @@ -131,15 +131,15 @@ int nr_phy_init_RU(RU_t *ru) { } AssertFatal(ru->nb_bfw==(beam_count*ru->nb_tx),"Number of beam weights from config file is %d while the expected number is %d",ru->nb_bfw,(beam_count*ru->nb_tx)); - int l_ind = 0; for (i=0; inum_gNB; i++) { + int l_ind = 0; for (p=0;pnb_log_antennas;p++) { //if ((fp->L_ssb >> (63-p)) & 0x01) { ru->beam_weights[i][p] = (int32_t **)malloc16_clear(ru->nb_tx*sizeof(int32_t*)); for (j=0; jnb_tx; j++) { ru->beam_weights[i][p][j] = (int32_t *)malloc16_clear(fp->ofdm_symbol_size*sizeof(int32_t)); for (re=0; reofdm_symbol_size; re++) - ru->beam_weights[i][p][j][re] = ru->bw_list[j][l_ind]; + ru->beam_weights[i][p][j][re] = ru->bw_list[i][l_ind]; //printf("Beam Weight %08x for beam %d and tx %d\n",ru->bw_list[i][l_ind],p,j); l_ind++; } // for j diff --git a/openair1/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c b/openair1/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c index 3f52b29281..a85076b623 100644 --- a/openair1/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c +++ b/openair1/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c @@ -180,7 +180,7 @@ void nr_ue_measurements(PHY_VARS_NR_UE *ue, ue->measurements.wideband_cqi_avg[gNB_id] = dB_fixed2(ue->measurements.rx_power_avg[gNB_id], ue->measurements.n0_power_avg); ue->measurements.rx_rssi_dBm[gNB_id] = ue->measurements.rx_power_avg_dB[gNB_id] + 30 - 10*log10(pow(2, 30)) - ((int)openair0_cfg[0].rx_gain[0] - (int)openair0_cfg[0].rx_gain_offset[0]) - dB_fixed(ue->frame_parms.ofdm_symbol_size); - LOG_I(PHY, "[gNB %d] Slot %d, RSSI %d dBm/RE, RSSI (digital) %d dB, WBandCQI %d dB, rxPwrAvg %d, n0PwrAvg %d \n", + LOG_D(PHY, "[gNB %d] Slot %d, RSSI %d dBm/RE, RSSI (digital) %d dB, WBandCQI %d dB, rxPwrAvg %d, n0PwrAvg %d \n", gNB_id, slot, ue->measurements.rx_rssi_dBm[gNB_id], diff --git a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c index bc5f373d92..32bf006c57 100644 --- a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c +++ b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c @@ -120,8 +120,14 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){ dlsch0->g_pucch = dlsch_config_pdu->accumulated_delta_PUCCH; dlsch0_harq->harq_ack.pucch_resource_indicator = dlsch_config_pdu->pucch_resource_id; dlsch0_harq->harq_ack.slot_for_feedback_ack = (slot+dlsch_config_pdu->pdsch_to_harq_feedback_time_ind)%frame_parms.slots_per_frame; - if ((dlsch0_harq->Nl > 2)||(dlsch0_harq->Nl <= 0)) dlsch0_harq->Nl = 1; - //printf("no of layers Nl %d\n",dlsch0_harq->Nl); + + //get nrOfLayers from DCI info + uint8_t Nl = 0; + for (i = 0; i < 4; i++) { + if (dlsch_config_pdu->dmrs_ports[i] >= i) Nl += 1; + } + dlsch0_harq->Nl = Nl; + dlsch0_harq->mcs_table=dlsch_config_pdu->mcs_table; dlsch0_harq->harq_ack.rx_status = downlink_harq_process(dlsch0_harq, dlsch0->current_harq_pid, dlsch_config_pdu->ndi, dlsch0->rnti_type); if (dlsch0_harq->status != ACTIVE) { diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index c1a58abb32..7a69b39751 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -1149,7 +1149,6 @@ int main(int argc, char **argv) } nr_ue_dcireq(&dcireq); //to be replaced with function pointer later - UE_harq_process->Nl = g_nrOfLayers; nr_ue_scheduled_response(&scheduled_response); phy_procedures_nrUE_RX(UE, diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c index 0d51bc8c22..d75945e2bd 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c @@ -262,6 +262,7 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP, extern int getNrOfSymbols(NR_BWP_Downlink_t *bwp, int tda); extern uint8_t getN_PRB_DMRS(NR_BWP_Downlink_t *bwp, int numDmrsCdmGrpsNoData); uint32_t target_dl_mcs = 9; +uint32_t target_dl_Nl = 1; uint32_t target_dl_bw = 50; uint64_t dlsch_slot_bitmap = (1<<1); /* schedules whole bandwidth for first user, all the time */ @@ -370,7 +371,7 @@ void nr_preprocessor_phytest(module_id_t module_id, nr_set_pdsch_semi_static( scc, UE_info->secondaryCellGroup[UE_id], sched_ctrl->active_bwp, tda, num_dmrs_cdm_grps_no_data, ps); - sched_pdsch->nrOfLayers = 1; + sched_pdsch->nrOfLayers = target_dl_Nl; sched_pdsch->mcs = target_dl_mcs; sched_pdsch->Qm = nr_get_Qm_dl(sched_pdsch->mcs, ps->mcsTableIdx); sched_pdsch->R = nr_get_code_rate_dl(sched_pdsch->mcs, ps->mcsTableIdx); diff --git a/targets/ARCH/rfsimulator/simulator.c b/targets/ARCH/rfsimulator/simulator.c index 3bd4285cff..354709faa1 100644 --- a/targets/ARCH/rfsimulator/simulator.c +++ b/targets/ARCH/rfsimulator/simulator.c @@ -618,8 +618,8 @@ static bool flushInput(rfsimulator_state_t *t, int timeout, int nsamps_for_initi } static int rfsimulator_read(openair0_device *device, openair0_timestamp *ptimestamp, void **samplesVoid, int nsamps, int nbAnt) { - if (nbAnt != 1) { - LOG_W(HW, "rfsimulator: only 1 antenna tested\n"); + if (nbAnt > 4) { + LOG_W(HW, "rfsimulator: only 4 antenna tested\n"); } rfsimulator_state_t *t = device->priv; @@ -736,14 +736,19 @@ static int rfsimulator_read(openair0_device *device, openair0_timestamp *ptimest CirSize ); else { // no channel modeling + double H_awgn_mimo[4][4] ={{1.0, 0.5, 0.25, 0.125},//rx 0 + {0.5, 1.0, 0.5, 0.25}, //rx 1 + {0.25, 0.5, 1.0, 0.5}, //rx 2 + {0.125, 0.25, 0.5, 1.0}};//rx 3 + sample_t *out=(sample_t *)samplesVoid[a]; int nbAnt_tx = ptr->th.nbAnt;//number of Tx antennas //LOG_I(HW, "nbAnt_tx %d\n",nbAnt_tx); for (int i=0; i < nsamps; i++) {//loop over nsamps for (int a_tx=0; a_txcircularBuf[((t->nextTimestamp+i)*nbAnt_tx+a_tx)%CirSize].r; - out[i].i+=ptr->circularBuf[((t->nextTimestamp+i)*nbAnt_tx+a_tx)%CirSize].i; + out[i].r += (short)(ptr->circularBuf[((t->nextTimestamp+i)*nbAnt_tx+a_tx)%CirSize].r*H_awgn_mimo[a][a_tx]); + out[i].i += (short)(ptr->circularBuf[((t->nextTimestamp+i)*nbAnt_tx+a_tx)%CirSize].i*H_awgn_mimo[a][a_tx]); } // end for a_tx } // end for i (number of samps) } // end of no channel modeling From 3ac1f62bbb897abb81499020858cbf61654ab4c4 Mon Sep 17 00:00:00 2001 From: sfn Date: Wed, 19 May 2021 17:59:49 +0200 Subject: [PATCH 524/579] Enable DMRS Config Type 2 for MIMO transmission --- openair2/RRC/NR/rrc_gNB_reconfig.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openair2/RRC/NR/rrc_gNB_reconfig.c b/openair2/RRC/NR/rrc_gNB_reconfig.c index 8ed19e9d82..cef6bd1e99 100644 --- a/openair2/RRC/NR/rrc_gNB_reconfig.c +++ b/openair2/RRC/NR/rrc_gNB_reconfig.c @@ -644,7 +644,10 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco } bwp->bwp_Dedicated->pdsch_Config->choice.setup->dataScramblingIdentityPDSCH = NULL; - bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type=NULL;//calloc(1,sizeof(*bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type)); + if (n_physical_antenna_ports > 1)// for MIMO, we use DMRS Config Type 2 + bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type=calloc(1,sizeof(*bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type)); + else + bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type=NULL; bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->maxLength=NULL; bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->scramblingID0=NULL; bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->scramblingID1=NULL; From 3a7dc238e00aaf386512fe888f3a50ec632b0136 Mon Sep 17 00:00:00 2001 From: sfn Date: Wed, 9 Jun 2021 17:07:45 +0200 Subject: [PATCH 525/579] Fix PUCCH bugs --- openair1/PHY/NR_TRANSPORT/nr_dci.c | 8 +++----- openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c | 2 +- openair1/PHY/NR_UE_TRANSPORT/dci_nr.c | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/openair1/PHY/NR_TRANSPORT/nr_dci.c b/openair1/PHY/NR_TRANSPORT/nr_dci.c index d208167855..ea974452cc 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dci.c +++ b/openair1/PHY/NR_TRANSPORT/nr_dci.c @@ -257,13 +257,11 @@ void nr_generate_dci_top(PHY_VARS_gNB *gNB, AssertFatal(pdcch_pdu!=NULL || ul_dci_pdu!=NULL,"At least one pointer has to be !NULL\n"); - if (pdcch_pdu && ul_dci_pdu) { + if (pdcch_pdu) { nr_generate_dci(gNB,&pdcch_pdu->pdcch_pdu_rel15,gold_pdcch_dmrs,txdataF,amp,frame_parms); + } + if (ul_dci_pdu) { nr_generate_dci(gNB,&ul_dci_pdu->pdcch_pdu_rel15,gold_pdcch_dmrs,txdataF,amp,frame_parms); } - else if (pdcch_pdu) - nr_generate_dci(gNB,&pdcch_pdu->pdcch_pdu_rel15,gold_pdcch_dmrs,txdataF,amp,frame_parms); - else - nr_generate_dci(gNB,&ul_dci_pdu->pdcch_pdu_rel15,gold_pdcch_dmrs,txdataF,amp,frame_parms); } diff --git a/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c b/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c index 1268c79f18..176bd652df 100644 --- a/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c +++ b/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c @@ -496,7 +496,6 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue, symbol_offset = ue->frame_parms.ofdm_symbol_size*symbol; - k = coreset_start_subcarrier; #ifdef DEBUG_PDCCH printf("PDCCH Channel Estimation : ThreadId %d, gNB_id %d ch_offset %d, OFDM size %d, Ncp=%d, Ns=%d, k=%d symbol %d\n",proc->thread_id, gNB_id,ch_offset,ue->frame_parms.ofdm_symbol_size, @@ -522,6 +521,7 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue, for (aarx=0; aarxframe_parms.nb_antennas_rx; aarx++) { + k = coreset_start_subcarrier; pil = (int16_t *)&pilot[0]; rxF = (int16_t *)&rxdataF[aarx][(symbol_offset+k+1)]; dl_ch = (int16_t *)&dl_ch_estimates[aarx][ch_offset]; diff --git a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c index 15303bb0c8..3f4d395b29 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c @@ -747,7 +747,7 @@ int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue, for (aarx = 0; aarx < frame_parms->nb_antennas_rx; aarx++) avgs = cmax(avgs, avgP[aarx]); - log2_maxh = (log2_approx(avgs) / 2) + 5; //+frame_parms->nb_antennas_rx; + log2_maxh = (log2_approx(avgs) / 2) + 1; //+frame_parms->nb_antennas_rx; #ifdef UE_DEBUG_TRACE LOG_D(PHY,"slot %d: pdcch log2_maxh = %d (%d,%d)\n",slot,log2_maxh,avgP[0],avgs); #endif From ae3e3c5f39ced5d6a291316214d25e66526fbc6b Mon Sep 17 00:00:00 2001 From: sfn Date: Wed, 9 Jun 2021 17:08:47 +0200 Subject: [PATCH 526/579] Fix PDSCH precoding bug --- openair1/PHY/NR_TRANSPORT/nr_dlsch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair1/PHY/NR_TRANSPORT/nr_dlsch.c b/openair1/PHY/NR_TRANSPORT/nr_dlsch.c index 96918792a0..f94a266350 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dlsch.c +++ b/openair1/PHY/NR_TRANSPORT/nr_dlsch.c @@ -448,7 +448,7 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB, (void*)&txdataF_precoding[ap][2*(l*frame_parms->ofdm_symbol_size + txdataF_offset+ k)], NR_NB_SC_PER_RB*sizeof(int32_t)); else - memset((void*)&txdataF[ap][rel15->StartSymbolIndex*frame_parms->ofdm_symbol_size + txdataF_offset +k], + memset((void*)&txdataF[ap][l*frame_parms->ofdm_symbol_size + txdataF_offset + k], 0, NR_NB_SC_PER_RB*sizeof(int32_t)); k += NR_NB_SC_PER_RB; From c249ca0bd826204d4d82b532a2a5fc3cc29294fb Mon Sep 17 00:00:00 2001 From: francescomani Date: Thu, 24 Jun 2021 12:22:03 +0200 Subject: [PATCH 527/579] fix for empty mib at beginning of execution --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c | 6 +++++- openair2/LAYER2/NR_MAC_gNB/main.c | 2 ++ openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c index f93ad92a13..29a31e72b9 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c @@ -158,10 +158,14 @@ void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t slotP) dl_req = &dl_tti_request->dl_tti_request_body; // get MIB every 8 frames - if((slotP == 0) && (frameP & 7) == 0) { + if(((slotP == 0) && (frameP & 7) == 0) || + gNB->first_MIB) { mib_sdu_length = mac_rrc_nr_data_req(module_idP, CC_id, frameP, MIBCH, 0, 1, &cc->MIB_pdu.payload[0]); + // flag to avoid sending an empty MIB in the first frames of execution since gNB doesn't get at the beginning in frame 0 slot 0 + gNB->first_MIB = false; + LOG_D(MAC, "[gNB %d] Frame %d : MIB->BCH CC_id %d, Received %d bytes\n", module_idP, diff --git a/openair2/LAYER2/NR_MAC_gNB/main.c b/openair2/LAYER2/NR_MAC_gNB/main.c index 60b0cac215..fbb5cd578d 100644 --- a/openair2/LAYER2/NR_MAC_gNB/main.c +++ b/openair2/LAYER2/NR_MAC_gNB/main.c @@ -81,6 +81,8 @@ void mac_top_init_gNB(void) RC.nrmac[i]->ul_handle = 0; + RC.nrmac[i]->first_MIB = true; + if (get_softmodem_params()->phy_test) { RC.nrmac[i]->pre_processor_dl = nr_preprocessor_phytest; RC.nrmac[i]->pre_processor_ul = nr_ul_preprocessor_phytest; diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h index c1ec27580f..a7c2b9a64c 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h +++ b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h @@ -736,6 +736,7 @@ typedef struct gNB_MAC_INST_s { NR_CellGroupConfig_t *secondaryCellGroupCommon; NR_Type0_PDCCH_CSS_config_t type0_PDCCH_CSS_config[64]; + bool first_MIB; } gNB_MAC_INST; #endif /*__LAYER2_NR_MAC_GNB_H__ */ From e0769db455a0e34c8cdb932711065f6f4eff457b Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Thu, 24 Jun 2021 12:55:01 +0100 Subject: [PATCH 528/579] Remove SRB2 from fill_initial_cellGroupConfig --- openair2/RRC/NR/MESSAGES/asn1_msg.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openair2/RRC/NR/MESSAGES/asn1_msg.c b/openair2/RRC/NR/MESSAGES/asn1_msg.c index 3b074f3fff..cca6a71ddd 100755 --- a/openair2/RRC/NR/MESSAGES/asn1_msg.c +++ b/openair2/RRC/NR/MESSAGES/asn1_msg.c @@ -1225,6 +1225,7 @@ void fill_initial_cellGroupConfig(rnti_t rnti, rlc_BearerConfig->mac_LogicalChannelConfig = logicalChannelConfig; ASN_SEQUENCE_ADD(&cellGroupConfig->rlc_BearerToAddModList->list, rlc_BearerConfig); + /* // SRB2 rlc_BearerConfig2 = calloc(1, sizeof(NR_RLC_BearerConfig_t)); rlc_BearerConfig2->logicalChannelIdentity = 2; @@ -1259,6 +1260,7 @@ void fill_initial_cellGroupConfig(rnti_t rnti, logicalChannelConfig2->ul_SpecificParameters->logicalChannelSR_DelayTimerApplied = 0; rlc_BearerConfig2->mac_LogicalChannelConfig = logicalChannelConfig2; ASN_SEQUENCE_ADD(&cellGroupConfig->rlc_BearerToAddModList->list, rlc_BearerConfig2); + */ cellGroupConfig->rlc_BearerToReleaseList = NULL; From 4e449a0c403589c30fcefb062d2c60358ff3b1f0 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Thu, 24 Jun 2021 14:51:16 +0100 Subject: [PATCH 529/579] Fix build warnings --- openair2/RRC/NR/MESSAGES/asn1_msg.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/openair2/RRC/NR/MESSAGES/asn1_msg.c b/openair2/RRC/NR/MESSAGES/asn1_msg.c index cca6a71ddd..789fb84a28 100755 --- a/openair2/RRC/NR/MESSAGES/asn1_msg.c +++ b/openair2/RRC/NR/MESSAGES/asn1_msg.c @@ -1176,15 +1176,11 @@ void fill_initial_cellGroupConfig(rnti_t rnti, NR_ServingCellConfigCommon_t *scc) { NR_RLC_BearerConfig_t *rlc_BearerConfig = NULL; - NR_RLC_BearerConfig_t *rlc_BearerConfig2 = NULL; NR_RLC_Config_t *rlc_Config = NULL; - NR_RLC_Config_t *rlc_Config2 = NULL; NR_LogicalChannelConfig_t *logicalChannelConfig = NULL; - NR_LogicalChannelConfig_t *logicalChannelConfig2= NULL; NR_MAC_CellGroupConfig_t *mac_CellGroupConfig = NULL; NR_PhysicalCellGroupConfig_t *physicalCellGroupConfig = NULL; long *logicalChannelGroup = NULL; - long *logicalChannelGroup2 = NULL; cellGroupConfig->cellGroupId = 0; @@ -1227,6 +1223,10 @@ void fill_initial_cellGroupConfig(rnti_t rnti, /* // SRB2 + NR_RLC_BearerConfig_t *rlc_BearerConfig2 = NULL; + NR_RLC_Config_t *rlc_Config2 = NULL; + NR_LogicalChannelConfig_t *logicalChannelConfig2= NULL; + long *logicalChannelGroup2 = NULL; rlc_BearerConfig2 = calloc(1, sizeof(NR_RLC_BearerConfig_t)); rlc_BearerConfig2->logicalChannelIdentity = 2; rlc_BearerConfig2->servedRadioBearer = calloc(1, sizeof(*rlc_BearerConfig2->servedRadioBearer)); From c3c925bd4d8c77727451e0dabca280b01ce9796d Mon Sep 17 00:00:00 2001 From: rmagueta Date: Thu, 24 Jun 2021 15:20:55 +0100 Subject: [PATCH 530/579] Remove obsolete code from rrc_gNB_reconfig --- openair2/RRC/NR/rrc_gNB_reconfig.c | 39 ------------------------------ 1 file changed, 39 deletions(-) diff --git a/openair2/RRC/NR/rrc_gNB_reconfig.c b/openair2/RRC/NR/rrc_gNB_reconfig.c index 11a7e653f5..f3241e3185 100644 --- a/openair2/RRC/NR/rrc_gNB_reconfig.c +++ b/openair2/RRC/NR/rrc_gNB_reconfig.c @@ -164,29 +164,8 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco secondaryCellGroup->rlc_BearerToAddModList = calloc(1,sizeof(*secondaryCellGroup->rlc_BearerToAddModList)); ASN_SEQUENCE_ADD(&secondaryCellGroup->rlc_BearerToAddModList->list, RLC_BearerConfig); - if (get_softmodem_params()->sa) { - NR_RLC_BearerConfig_t *RLC_BearerConfig_srb1 = calloc(1,sizeof(*RLC_BearerConfig_srb1)); - nr_rlc_bearer_init(RLC_BearerConfig_srb1, NR_RLC_BearerConfig__servedRadioBearer_PR_srb_Identity); - nr_drb_config(RLC_BearerConfig_srb1->rlc_Config, NR_RLC_Config_PR_am); - nr_rlc_bearer_init_ul_spec(RLC_BearerConfig_srb1->mac_LogicalChannelConfig); - // FIXME: this should be obtained in nr_rlc_bearer_init_ul_spec() - *RLC_BearerConfig_srb1->mac_LogicalChannelConfig->ul_SpecificParameters->logicalChannelGroup = 0; - ASN_SEQUENCE_ADD(&secondaryCellGroup->rlc_BearerToAddModList->list, RLC_BearerConfig_srb1); - - NR_RLC_BearerConfig_t *RLC_BearerConfig_srb2 = calloc(1,sizeof(*RLC_BearerConfig_srb2)); - nr_rlc_bearer_init(RLC_BearerConfig_srb2, NR_RLC_BearerConfig__servedRadioBearer_PR_srb_Identity); - nr_drb_config(RLC_BearerConfig_srb2->rlc_Config, NR_RLC_Config_PR_am); - nr_rlc_bearer_init_ul_spec(RLC_BearerConfig_srb2->mac_LogicalChannelConfig); - // FIXME: this should be obtained in nr_rlc_bearer_init_ul_spec() - *RLC_BearerConfig_srb2->mac_LogicalChannelConfig->ul_SpecificParameters->logicalChannelGroup = 0; - RLC_BearerConfig_srb2->logicalChannelIdentity = 2; - RLC_BearerConfig_srb2->servedRadioBearer->choice.srb_Identity = 2; - ASN_SEQUENCE_ADD(&secondaryCellGroup->rlc_BearerToAddModList->list, RLC_BearerConfig_srb2); - } - secondaryCellGroup->mac_CellGroupConfig=calloc(1,sizeof(*secondaryCellGroup->mac_CellGroupConfig)); secondaryCellGroup->mac_CellGroupConfig->drx_Config = NULL; - secondaryCellGroup->mac_CellGroupConfig->schedulingRequestConfig = calloc(1,sizeof(*secondaryCellGroup->mac_CellGroupConfig->schedulingRequestConfig)); secondaryCellGroup->mac_CellGroupConfig->schedulingRequestConfig->schedulingRequestToAddModList = calloc(1,sizeof(*secondaryCellGroup->mac_CellGroupConfig->schedulingRequestConfig->schedulingRequestToAddModList)); NR_SchedulingRequestToAddMod_t *SchedulingRequestConf = calloc(1,sizeof(*SchedulingRequestConf)); @@ -1278,24 +1257,6 @@ void fill_default_rbconfig(NR_RadioBearerConfig_t *rbconfig, e_NR_SecurityConfig__keyToUse key_to_use) { rbconfig->srb_ToAddModList = NULL; - - if (get_softmodem_params()->sa) { - rbconfig->srb_ToAddModList = calloc(1,sizeof(*rbconfig->srb_ToAddModList)); - NR_SRB_ToAddMod_t *srb1_ToAddMod = calloc(1,sizeof(*srb1_ToAddMod)); - srb1_ToAddMod->srb_Identity = 1; - srb1_ToAddMod->reestablishPDCP = NULL; - srb1_ToAddMod->discardOnPDCP = NULL; - srb1_ToAddMod->pdcp_Config = NULL; - ASN_SEQUENCE_ADD(&rbconfig->srb_ToAddModList->list,srb1_ToAddMod); - - NR_SRB_ToAddMod_t *srb2_ToAddMod = calloc(1,sizeof(*srb2_ToAddMod)); - srb2_ToAddMod->srb_Identity = 2; - srb2_ToAddMod->reestablishPDCP = NULL; - srb2_ToAddMod->discardOnPDCP = NULL; - srb2_ToAddMod->pdcp_Config = NULL; - ASN_SEQUENCE_ADD(&rbconfig->srb_ToAddModList->list,srb2_ToAddMod); - } - rbconfig->srb3_ToRelease = NULL; rbconfig->drb_ToAddModList = calloc(1,sizeof(*rbconfig->drb_ToAddModList)); NR_DRB_ToAddMod_t *drb_ToAddMod = calloc(1,sizeof(*drb_ToAddMod)); From 9fa3e1a758262c8b67c192e1df322cec82b52a8c Mon Sep 17 00:00:00 2001 From: hardy Date: Sat, 26 Jun 2021 22:05:08 +0200 Subject: [PATCH 531/579] fix the module CM process start/check --- ci-scripts/cls_module_ue.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ci-scripts/cls_module_ue.py b/ci-scripts/cls_module_ue.py index 0ad493ad40..75b628fd1f 100644 --- a/ci-scripts/cls_module_ue.py +++ b/ci-scripts/cls_module_ue.py @@ -76,9 +76,10 @@ class Module_UE: logging.debug('Starting ' + self.Process['Name']) mySSH = sshconnection.SSHConnection() mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword) - mySSH.command('echo ' + self.HostPassword + ' | sudo -S ' + self.Process['Cmd'] + ' &','\$',5) + mySSH.command('echo $USER; echo ' + self.HostPassword + ' | nohup sudo -S ' + self.Process['Cmd'] + ' &','\$',5) mySSH.close() #checking the process + time.sleep(5) HOST=self.HostIPAddress COMMAND="ps aux | grep " + self.Process['Name'] + " | grep -v grep " logging.debug(COMMAND) From 18fae95fc7c54f0114e39428b94923ab367c57ad Mon Sep 17 00:00:00 2001 From: rmagueta Date: Tue, 29 Jun 2021 18:54:52 +0100 Subject: [PATCH 532/579] Fix UL TDA in config file for NSA --- ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf b/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf index 5838e96999..205922af0c 100644 --- a/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf +++ b/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf @@ -120,11 +120,11 @@ gNBs = # 0=unrestricted, 1=restricted type A, 2=restricted type B restrictedSetConfig = 0, # pusch-ConfigCommon (up to 16 elements) - initialULBWPk2_0 = 2; # used for UL slot + initialULBWPk2_0 = 6; # used for UL slot initialULBWPmappingType_0 = 1 initialULBWPstartSymbolAndLength_0 = 41; # this is SS=0 L=13 - initialULBWPk2_1 = 2; # used for mixed slot + initialULBWPk2_1 = 6; # used for mixed slot initialULBWPmappingType_1 = 1; initialULBWPstartSymbolAndLength_1 = 69; # this is SS=10 L=2 From 282fe1063e64c4f375db1f9a5b67b9130791edb4 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Wed, 30 Jun 2021 18:48:45 +0100 Subject: [PATCH 533/579] Fix build --- openair2/F1AP/dummy_enb.c | 37 +++---------------- openair2/F1AP/f1ap_du_rrc_message_transfer.c | 1 + openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 1 + openair2/RRC/NR/rrc_gNB.c | 4 +- 4 files changed, 9 insertions(+), 34 deletions(-) diff --git a/openair2/F1AP/dummy_enb.c b/openair2/F1AP/dummy_enb.c index ee98b9ec46..fe6dfb6a06 100644 --- a/openair2/F1AP/dummy_enb.c +++ b/openair2/F1AP/dummy_enb.c @@ -20,42 +20,15 @@ */ #include "COMMON/platform_types.h" -#include "COMMON/platform_constants.h" #include "common/ran_context.h" - #include "common/utils/LOG/log.h" -#include "common/utils/LOG/vcd_signal_dumper.h" - #include "NR_BCCH-BCH-Message.h" #include "NR_ServingCellConfigCommon.h" - -#include "LAYER2/NR_MAC_gNB/mac_proto.h" -#include "SCHED_NR/phy_frame_config_nr.h" - #include "NR_MIB.h" -#include "LAYER2/NR_MAC_COMMON/nr_mac_common.h" -#include "../../../../nfapi/oai_integration/vendor_ext.h" -/* Softmodem params */ -#include "executables/softmodem-common.h" +void apply_macrlc_config(gNB_RRC_INST *rrc, + rrc_gNB_ue_context_t *const ue_context_pP, + const protocol_ctxt_t *const ctxt_pP ) { +abort(); +} -int rrc_mac_config_req_gNB(module_id_t Mod_idP, - int ssb_SubcarrierOffset, - int pdsch_AntennaPorts, - int pusch_AntennaPorts, - NR_ServingCellConfigCommon_t *scc, - int add_ue, - uint32_t rnti, - NR_CellGroupConfig_t *CellGroup){ -abort(); -return 0; -} -rlc_op_status_t nr_rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP, - const NR_SRB_ToAddModList_t * const srb2add_listP, - const NR_DRB_ToAddModList_t * const drb2add_listP, - const NR_DRB_ToReleaseList_t * const drb2release_listP, - const LTE_PMCH_InfoList_r9_t * const pmch_InfoList_r9_pP, - struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_bearer2add_list){ -abort(); -return 0; -} diff --git a/openair2/F1AP/f1ap_du_rrc_message_transfer.c b/openair2/F1AP/f1ap_du_rrc_message_transfer.c index b438f040be..0c8f566fd6 100644 --- a/openair2/F1AP/f1ap_du_rrc_message_transfer.c +++ b/openair2/F1AP/f1ap_du_rrc_message_transfer.c @@ -1116,6 +1116,7 @@ int DU_handle_DL_NR_RRC_MESSAGE_TRANSFER(instance_t instance, RC.nrrrc[ctxt.module_id], ctxt.rnti); + gNB_RRC_INST *rrc = RC.nrrrc[ctxt.module_id]; if (srb_id == 0) { NR_DL_CCCH_Message_t* dl_ccch_msg=NULL; asn_dec_rval_t dec_rval; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 5d4b6316d9..5b69bbbbb5 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -1329,6 +1329,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra // look up the PDCCH PDU for this CC, BWP, and CORESET. If it does not exist, create it. This is especially // important if we have multiple RAs, and the DLSCH has to reuse them, so we need to mark them + const int bwpid = bwp ? bwp->bwp_Id : 0; const int coresetid = coreset->controlResourceSetId; nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu_rel15 = nr_mac->pdcch_pdu_idx[CC_id][bwpid][coresetid]; if (!pdcch_pdu_rel15) { diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index 88196c385c..8ad6b5c8e6 100755 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -414,7 +414,7 @@ void apply_pdcp_config(rrc_gNB_ue_context_t *const ue_context_pP, NULL, NULL, NULL, - ue_context_pP->ue_context.masterCellGroup->rlc_BearerToAddModList); + get_softmodem_params()->sa ? ue_context_pP->ue_context.masterCellGroup->rlc_BearerToAddModList : NULL); } @@ -3027,8 +3027,8 @@ int get_dl_mimo_layers(gNB_RRC_INST *rrc,NR_UE_NR_Capability_t *cap) { return(1); } void nr_rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) { + MessageDef *msg; - int id; rrc_gNB_ue_context_t *ue_context_p = NULL; FILE *fd=NULL;//fopen("nrRRCstats.log","w"); RB_FOREACH(ue_context_p, rrc_nr_ue_tree_s, &(RC.nrrrc[ctxt_pP->module_id]->rrc_ue_head)) { From dcfec657df0e7abc2ff958441574abb94040e4d8 Mon Sep 17 00:00:00 2001 From: luispereira87 Date: Thu, 1 Jul 2021 15:02:59 +0100 Subject: [PATCH 534/579] Fix BWPstart and BWPsize for bwp_Dedicated --- openair1/SCHED_NR_UE/pucch_uci_ue_nr.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c index 5db6935f98..2067a0c63b 100644 --- a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c +++ b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c @@ -619,9 +619,11 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_ mac->ULbwp[bwp_id-1] && mac->ULbwp[bwp_id-1]->bwp_Dedicated && mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config && - mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup) - pucch_Config = mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup; - else if (bwp_id==0 && + mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup) { + pucch_Config = mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup; + BWPsize = NRRIV2BW(mac->ULbwp[bwp_id-1]->bwp_Common->genericParameters.locationAndBandwidth,MAX_BWP_SIZE); + BWPstart = NRRIV2PRBOFFSET(mac->ULbwp[bwp_id-1]->bwp_Common->genericParameters.locationAndBandwidth,MAX_BWP_SIZE); + } else if (bwp_id==0 && mac->cg && mac->cg->spCellConfig && mac->cg->spCellConfig->spCellConfigDedicated && From 670352d5481785d48bbe43bcf7ac5ab0d6261762 Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Fri, 2 Jul 2021 12:15:59 +0200 Subject: [PATCH 535/579] add array size fix --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c | 2 +- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index 4603b91877..2c40ad2543 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -551,7 +551,7 @@ bool allocate_dl_retransmission(module_id_t module_id, } float thr_ue[MAX_MOBILES_PER_GNB]; -uint32_t pf_tbs[3][28]; // pre-computed, approximate TBS values for PF coefficient +uint32_t pf_tbs[3][29]; // pre-computed, approximate TBS values for PF coefficient void pf_dl(module_id_t module_id, frame_t frame, diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 3effe300ab..47fc28734a 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -952,7 +952,7 @@ void update_ul_ue_R_Qm(NR_sched_pusch_t *sched_pusch, const NR_pusch_semi_static } float ul_thr_ue[MAX_MOBILES_PER_GNB]; -uint32_t ul_pf_tbs[3][28]; // pre-computed, approximate TBS values for PF coefficient +uint32_t ul_pf_tbs[3][29]; // pre-computed, approximate TBS values for PF coefficient void pf_ul(module_id_t module_id, frame_t frame, sub_frame_t slot, From ee0e7c97a36a6cca6d3846092f01acb1d367c9c1 Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Fri, 2 Jul 2021 12:22:42 +0200 Subject: [PATCH 536/579] merge develop --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c | 2 +- openair2/X2AP/x2ap_eNB.c | 2 +- openair3/SCTP/sctp_eNB_task.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c index 6e1b99fa6b..b9c6f38a6e 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c @@ -146,7 +146,7 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP, int startSymbolAndLength=0; int StartSymbolIndex=-1,NrOfSymbols=14; int StartSymbolIndex_tmp,NrOfSymbols_tmp; - int mappingtype_tmp, mappingtype; + int mappingtype_tmp, mappingtype=0; for (int i=0; idownlinkConfigCommon->initialDownlinkBWP->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList->list.count; diff --git a/openair2/X2AP/x2ap_eNB.c b/openair2/X2AP/x2ap_eNB.c index 84900ca581..38e6149ccd 100644 --- a/openair2/X2AP/x2ap_eNB.c +++ b/openair2/X2AP/x2ap_eNB.c @@ -115,7 +115,7 @@ void x2ap_eNB_handle_sctp_association_resp(instance_t instance, sctp_new_associa if (x2ap_enb_data_p != NULL) { /* some sanity check - to be refined at some point */ if (sctp_new_association_resp->sctp_state != SCTP_STATE_ESTABLISHED) { - X2AP_ERROR("x2ap_enb_data_p not NULL and sctp state not SCTP_STATE_ESTABLISHED, what to do?\n"); + X2AP_ERROR("x2ap_enb_data_p not NULL and sctp state not SCTP_STATE_ESTABLISHED?\n"); if (sctp_new_association_resp->sctp_state == SCTP_STATE_SHUTDOWN){ RB_REMOVE(x2ap_enb_map, &instance_p->x2ap_enb_head, x2ap_enb_data_p); return; diff --git a/openair3/SCTP/sctp_eNB_task.c b/openair3/SCTP/sctp_eNB_task.c index 912675ad1c..a7142e05dd 100644 --- a/openair3/SCTP/sctp_eNB_task.c +++ b/openair3/SCTP/sctp_eNB_task.c @@ -985,7 +985,7 @@ sctp_eNB_read_from_socket( if (SCTP_SHUTDOWN_EVENT == snp->sn_header.sn_type) { itti_unsubscribe_event_fd(TASK_SCTP, sctp_cnx->sd); - SCTP_DEBUG("Received SCTP SHUTDOWN EVENT\n"); + SCTP_WARN("Received SCTP SHUTDOWN EVENT\n"); close(sctp_cnx->sd); sctp_itti_send_association_resp( From 081a2879290d6fa806a4746f7dcfc28cc5e9c255 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Fri, 2 Jul 2021 21:36:02 +0100 Subject: [PATCH 537/579] Fix gNB downlink MAC short/long header accordingly with RLC buffer size --- .../LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c | 45 +++++++++++++------ 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index f1ad5817e9..18cd8ebde4 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -1102,12 +1102,18 @@ void nr_schedule_ue_spec(module_id_t module_id, if (sched_ctrl->num_total_bytes > 0) { tbs_size_t len = 0; while (size > 3) { - // we do not know how much data we will get from RLC, i.e., whether it - // will be longer than 256B or not. Therefore, reserve space for long header, then - // fetch data, then fill real length - NR_MAC_SUBHEADER_LONG *header = (NR_MAC_SUBHEADER_LONG *) buf; - buf += 3; - size -= 3; + + // Reserve space for short or long header. + // Check if data from RLC is equal or longer than 256B or not. + // Data from RLC was checked before, in function nr_store_dlsch_buffer + uint8_t *header = buf; + if (sched_ctrl->num_total_bytes >= 256) { + buf += sizeof(NR_MAC_SUBHEADER_LONG); + size -= sizeof(NR_MAC_SUBHEADER_LONG); + } else { + buf += sizeof(NR_MAC_SUBHEADER_SHORT); + size -= sizeof(NR_MAC_SUBHEADER_SHORT); + } /* limit requested number of bytes to what preprocessor specified, or * such that TBS is full */ @@ -1137,19 +1143,32 @@ void nr_schedule_ue_spec(module_id_t module_id, if (len == 0) break; - header->R = 0; - header->F = 1; - header->LCID = lcid; - header->L1 = (len >> 8) & 0xff; - header->L2 = len & 0xff; + if (sched_ctrl->num_total_bytes >= 256) { + ((NR_MAC_SUBHEADER_LONG *) header)->R = 0; + ((NR_MAC_SUBHEADER_LONG *) header)->F = 1; + ((NR_MAC_SUBHEADER_LONG *) header)->LCID = lcid; + ((NR_MAC_SUBHEADER_LONG *) header)->L1 = (len >> 8) & 0xff; + ((NR_MAC_SUBHEADER_LONG *) header)->L2 = len & 0xff; + } else { + ((NR_MAC_SUBHEADER_SHORT *) header)->R = 0; + ((NR_MAC_SUBHEADER_SHORT *) header)->F = 0; + ((NR_MAC_SUBHEADER_SHORT *) header)->LCID = lcid; + ((NR_MAC_SUBHEADER_SHORT *) header)->L = len & 0xff; + } + size -= len; buf += len; dlsch_total_bytes += len; } if (len == 0) { /* RLC did not have data anymore, mark buffer as unused */ - buf -= 3; - size += 3; + if (sched_ctrl->num_total_bytes >= 256) { + buf -= sizeof(NR_MAC_SUBHEADER_LONG); + size += sizeof(NR_MAC_SUBHEADER_LONG); + } else { + buf -= sizeof(NR_MAC_SUBHEADER_SHORT); + size += sizeof(NR_MAC_SUBHEADER_SHORT); + } } } else if (get_softmodem_params()->phy_test || get_softmodem_params()->do_ra || get_softmodem_params()->sa) { From 88d7ad11a287721c8558482701077db80d2c27ae Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Sat, 3 Jul 2021 08:54:16 +0100 Subject: [PATCH 538/579] Improved fix gNB downlink MAC short/long header accordingly with RLC buffer size --- .../LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c | 33 +++++++++---------- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index 18cd8ebde4..fdfc603cfa 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -1101,19 +1101,21 @@ void nr_schedule_ue_spec(module_id_t module_id, int dlsch_total_bytes = 0; if (sched_ctrl->num_total_bytes > 0) { tbs_size_t len = 0; - while (size > 3) { + + // Check MAC header short/long format and size + // Check if data from RLC is equal or longer than 256B or not. + // Data from RLC was checked before, in function nr_store_dlsch_buffer + int header_size = sizeof(NR_MAC_SUBHEADER_SHORT); + if (sched_ctrl->num_total_bytes >= 256) { + header_size = sizeof(NR_MAC_SUBHEADER_LONG); + } + + while (size > header_size) { // Reserve space for short or long header. - // Check if data from RLC is equal or longer than 256B or not. - // Data from RLC was checked before, in function nr_store_dlsch_buffer uint8_t *header = buf; - if (sched_ctrl->num_total_bytes >= 256) { - buf += sizeof(NR_MAC_SUBHEADER_LONG); - size -= sizeof(NR_MAC_SUBHEADER_LONG); - } else { - buf += sizeof(NR_MAC_SUBHEADER_SHORT); - size -= sizeof(NR_MAC_SUBHEADER_SHORT); - } + buf += header_size; + size -= header_size; /* limit requested number of bytes to what preprocessor specified, or * such that TBS is full */ @@ -1143,7 +1145,7 @@ void nr_schedule_ue_spec(module_id_t module_id, if (len == 0) break; - if (sched_ctrl->num_total_bytes >= 256) { + if (header_size == sizeof(NR_MAC_SUBHEADER_LONG)) { ((NR_MAC_SUBHEADER_LONG *) header)->R = 0; ((NR_MAC_SUBHEADER_LONG *) header)->F = 1; ((NR_MAC_SUBHEADER_LONG *) header)->LCID = lcid; @@ -1162,13 +1164,8 @@ void nr_schedule_ue_spec(module_id_t module_id, } if (len == 0) { /* RLC did not have data anymore, mark buffer as unused */ - if (sched_ctrl->num_total_bytes >= 256) { - buf -= sizeof(NR_MAC_SUBHEADER_LONG); - size += sizeof(NR_MAC_SUBHEADER_LONG); - } else { - buf -= sizeof(NR_MAC_SUBHEADER_SHORT); - size += sizeof(NR_MAC_SUBHEADER_SHORT); - } + buf -= header_size; + size += header_size; } } else if (get_softmodem_params()->phy_test || get_softmodem_params()->do_ra || get_softmodem_params()->sa) { From ea72bde1602b883bf24bc16f42d397905f39c4c1 Mon Sep 17 00:00:00 2001 From: Thomas Schlichter Date: Mon, 5 Jul 2021 14:47:18 +0200 Subject: [PATCH 539/579] fix DL channel estimation around DC for DMRS type 1 and muliple antenna ports bug found and fix proposed by: Francesco Mani --- openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c b/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c index 176bd652df..8c4394e6e9 100644 --- a/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c +++ b/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c @@ -942,7 +942,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue, // check if PRB crosses DC and improve estimates around DC if ((bwp_start_subcarrier < ue->frame_parms.ofdm_symbol_size) && (bwp_start_subcarrier+nb_rb_pdsch*12 >= ue->frame_parms.ofdm_symbol_size)) { - dl_ch = (int16_t *)&dl_ch_estimates[aarx][ch_offset]; + dl_ch = (int16_t *)&dl_ch_estimates[p*ue->frame_parms.nb_antennas_rx+aarx][ch_offset]; uint16_t idxDC = 2*(ue->frame_parms.ofdm_symbol_size - bwp_start_subcarrier); uint16_t idxPil = idxDC/2; re_offset = k; From 5da8195d232d50b859e0005838dc3b7cc5854846 Mon Sep 17 00:00:00 2001 From: Luis Pereira Date: Tue, 6 Jul 2021 09:44:03 +0000 Subject: [PATCH 540/579] Revert "Improved fix gNB downlink MAC short/long header accordingly with RLC buffer size" This reverts commit 88d7ad11a287721c8558482701077db80d2c27ae --- .../LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c | 33 ++++++++++--------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index fdfc603cfa..18cd8ebde4 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -1101,21 +1101,19 @@ void nr_schedule_ue_spec(module_id_t module_id, int dlsch_total_bytes = 0; if (sched_ctrl->num_total_bytes > 0) { tbs_size_t len = 0; - - // Check MAC header short/long format and size - // Check if data from RLC is equal or longer than 256B or not. - // Data from RLC was checked before, in function nr_store_dlsch_buffer - int header_size = sizeof(NR_MAC_SUBHEADER_SHORT); - if (sched_ctrl->num_total_bytes >= 256) { - header_size = sizeof(NR_MAC_SUBHEADER_LONG); - } - - while (size > header_size) { + while (size > 3) { // Reserve space for short or long header. + // Check if data from RLC is equal or longer than 256B or not. + // Data from RLC was checked before, in function nr_store_dlsch_buffer uint8_t *header = buf; - buf += header_size; - size -= header_size; + if (sched_ctrl->num_total_bytes >= 256) { + buf += sizeof(NR_MAC_SUBHEADER_LONG); + size -= sizeof(NR_MAC_SUBHEADER_LONG); + } else { + buf += sizeof(NR_MAC_SUBHEADER_SHORT); + size -= sizeof(NR_MAC_SUBHEADER_SHORT); + } /* limit requested number of bytes to what preprocessor specified, or * such that TBS is full */ @@ -1145,7 +1143,7 @@ void nr_schedule_ue_spec(module_id_t module_id, if (len == 0) break; - if (header_size == sizeof(NR_MAC_SUBHEADER_LONG)) { + if (sched_ctrl->num_total_bytes >= 256) { ((NR_MAC_SUBHEADER_LONG *) header)->R = 0; ((NR_MAC_SUBHEADER_LONG *) header)->F = 1; ((NR_MAC_SUBHEADER_LONG *) header)->LCID = lcid; @@ -1164,8 +1162,13 @@ void nr_schedule_ue_spec(module_id_t module_id, } if (len == 0) { /* RLC did not have data anymore, mark buffer as unused */ - buf -= header_size; - size += header_size; + if (sched_ctrl->num_total_bytes >= 256) { + buf -= sizeof(NR_MAC_SUBHEADER_LONG); + size += sizeof(NR_MAC_SUBHEADER_LONG); + } else { + buf -= sizeof(NR_MAC_SUBHEADER_SHORT); + size += sizeof(NR_MAC_SUBHEADER_SHORT); + } } } else if (get_softmodem_params()->phy_test || get_softmodem_params()->do_ra || get_softmodem_params()->sa) { From 6cc98eba85121a27aadb9b233926f7ec5ce3c721 Mon Sep 17 00:00:00 2001 From: Luis Pereira Date: Tue, 6 Jul 2021 09:44:37 +0000 Subject: [PATCH 541/579] Revert "Fix gNB downlink MAC short/long header accordingly with RLC buffer size" This reverts commit 081a2879290d6fa806a4746f7dcfc28cc5e9c255 --- .../LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c | 45 ++++++------------- 1 file changed, 13 insertions(+), 32 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index 18cd8ebde4..f1ad5817e9 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -1102,18 +1102,12 @@ void nr_schedule_ue_spec(module_id_t module_id, if (sched_ctrl->num_total_bytes > 0) { tbs_size_t len = 0; while (size > 3) { - - // Reserve space for short or long header. - // Check if data from RLC is equal or longer than 256B or not. - // Data from RLC was checked before, in function nr_store_dlsch_buffer - uint8_t *header = buf; - if (sched_ctrl->num_total_bytes >= 256) { - buf += sizeof(NR_MAC_SUBHEADER_LONG); - size -= sizeof(NR_MAC_SUBHEADER_LONG); - } else { - buf += sizeof(NR_MAC_SUBHEADER_SHORT); - size -= sizeof(NR_MAC_SUBHEADER_SHORT); - } + // we do not know how much data we will get from RLC, i.e., whether it + // will be longer than 256B or not. Therefore, reserve space for long header, then + // fetch data, then fill real length + NR_MAC_SUBHEADER_LONG *header = (NR_MAC_SUBHEADER_LONG *) buf; + buf += 3; + size -= 3; /* limit requested number of bytes to what preprocessor specified, or * such that TBS is full */ @@ -1143,32 +1137,19 @@ void nr_schedule_ue_spec(module_id_t module_id, if (len == 0) break; - if (sched_ctrl->num_total_bytes >= 256) { - ((NR_MAC_SUBHEADER_LONG *) header)->R = 0; - ((NR_MAC_SUBHEADER_LONG *) header)->F = 1; - ((NR_MAC_SUBHEADER_LONG *) header)->LCID = lcid; - ((NR_MAC_SUBHEADER_LONG *) header)->L1 = (len >> 8) & 0xff; - ((NR_MAC_SUBHEADER_LONG *) header)->L2 = len & 0xff; - } else { - ((NR_MAC_SUBHEADER_SHORT *) header)->R = 0; - ((NR_MAC_SUBHEADER_SHORT *) header)->F = 0; - ((NR_MAC_SUBHEADER_SHORT *) header)->LCID = lcid; - ((NR_MAC_SUBHEADER_SHORT *) header)->L = len & 0xff; - } - + header->R = 0; + header->F = 1; + header->LCID = lcid; + header->L1 = (len >> 8) & 0xff; + header->L2 = len & 0xff; size -= len; buf += len; dlsch_total_bytes += len; } if (len == 0) { /* RLC did not have data anymore, mark buffer as unused */ - if (sched_ctrl->num_total_bytes >= 256) { - buf -= sizeof(NR_MAC_SUBHEADER_LONG); - size += sizeof(NR_MAC_SUBHEADER_LONG); - } else { - buf -= sizeof(NR_MAC_SUBHEADER_SHORT); - size += sizeof(NR_MAC_SUBHEADER_SHORT); - } + buf -= 3; + size += 3; } } else if (get_softmodem_params()->phy_test || get_softmodem_params()->do_ra || get_softmodem_params()->sa) { From 2cea4c4c87135cf58d5780863b1d3ab095a97367 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Tue, 6 Jul 2021 10:57:32 +0100 Subject: [PATCH 542/579] Compute TBS and rbSize considering always MAC long header --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index f1ad5817e9..08cd9df89c 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -691,8 +691,7 @@ void pf_dl(module_id_t module_id, sched_pdsch->pucch_allocation = alloc; uint32_t TBS = 0; uint16_t rbSize; - const int oh = 2 + (sched_ctrl->num_total_bytes >= 256) - + 2 * (frame == (sched_ctrl->ta_frame + 10) % 1024); + const int oh = 3 + 2 * (frame == (sched_ctrl->ta_frame + 10) % 1024); nr_find_nb_rb(sched_pdsch->Qm, sched_pdsch->R, ps->nrOfSymbols, From 06a8ec98934cd9f0420f054d7ed415aa51fc3fef Mon Sep 17 00:00:00 2001 From: luispereira87 Date: Tue, 6 Jul 2021 20:33:18 +0100 Subject: [PATCH 543/579] Temporary fix: avoid mixed slots in initialUplinkBWP --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 9ed57353ed..b0c5fe2f4a 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -1201,6 +1201,10 @@ bool nr_fr1_ulsch_preprocessor(module_id_t module_id, frame_t frame, sub_frame_t if (!is_xlsch_in_slot(nr_mac->ulsch_slot_bitmap[sched_slot / 64], sched_slot)) return false; + // FIXME: Uplink is failing - Avoid mixed slots in initialUplinkBWP + if ((sched_ctrl->active_ubwp == NULL) && (sched_slot == 7 || sched_slot == 17)) + return false; + sched_ctrl->sched_pusch.slot = sched_slot; sched_ctrl->sched_pusch.frame = sched_frame; for (UE_id = UE_info->list.next[UE_id]; UE_id >= 0; UE_id = UE_info->list.next[UE_id]) { From 8814c2c3dc4287702fb1554baa71b210ed0cdab4 Mon Sep 17 00:00:00 2001 From: dongzhanyi Date: Wed, 7 Jul 2021 21:16:59 +0800 Subject: [PATCH 544/579] replace the NR_DL_FRAME_PARMS structure into the NR_DL_FRAME_PARMS structure pointer --- openair1/PHY/NR_TRANSPORT/nr_dci.c | 34 +++++++++++++++--------------- openair1/PHY/NR_TRANSPORT/nr_dci.h | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/openair1/PHY/NR_TRANSPORT/nr_dci.c b/openair1/PHY/NR_TRANSPORT/nr_dci.c index ea96756184..ef30c84ddd 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dci.c +++ b/openair1/PHY/NR_TRANSPORT/nr_dci.c @@ -70,7 +70,7 @@ void nr_generate_dci(PHY_VARS_gNB *gNB, uint32_t **gold_pdcch_dmrs, int32_t *txdataF, int16_t amp, - NR_DL_FRAME_PARMS frame_parms) { + NR_DL_FRAME_PARMS *frame_parms) { int16_t mod_dmrs[NR_MAX_CSET_DURATION][NR_MAX_PDCCH_DMRS_LENGTH>>1] __attribute__((aligned(16))); // 3 for the max coreset duration uint16_t cset_start_sc; @@ -85,7 +85,7 @@ void nr_generate_dci(PHY_VARS_gNB *gNB, // compute rb_offset and n_prb based on frequency allocation nr_fill_cce_list(gNB,0,pdcch_pdu_rel15); get_coreset_rballoc(pdcch_pdu_rel15->FreqDomainResource,&n_rb,&rb_offset); - cset_start_sc = frame_parms.first_carrier_offset + (pdcch_pdu_rel15->BWPStart + rb_offset) * NR_NB_SC_PER_RB; + cset_start_sc = frame_parms->first_carrier_offset + (pdcch_pdu_rel15->BWPStart + rb_offset) * NR_NB_SC_PER_RB; for (int d=0;dnumDlDci;d++) { /*The coreset is initialised @@ -165,8 +165,8 @@ void nr_generate_dci(PHY_VARS_gNB *gNB, /// Resource mapping - if (cset_start_sc >= frame_parms.ofdm_symbol_size) - cset_start_sc -= frame_parms.ofdm_symbol_size; + if (cset_start_sc >= frame_parms->ofdm_symbol_size) + cset_start_sc -= frame_parms->ofdm_symbol_size; // Get cce_list indices by reg_idx in ascending order int reg_list_index = 0; @@ -191,8 +191,8 @@ void nr_generate_dci(PHY_VARS_gNB *gNB, k = cset_start_sc + gNB->cce_list[d][cce_idx].reg_list[reg_in_cce_idx].start_sc_idx; - if (k >= frame_parms.ofdm_symbol_size) - k -= frame_parms.ofdm_symbol_size; + if (k >= frame_parms->ofdm_symbol_size) + k -= frame_parms->ofdm_symbol_size; l = cset_start_symb + symbol_idx; @@ -206,26 +206,26 @@ void nr_generate_dci(PHY_VARS_gNB *gNB, for (int m = 0; m < NR_NB_SC_PER_RB; m++) { if (m == (k_prime << 2) + 1) { // DMRS if not already mapped - ((int16_t *) txdataF)[(l * frame_parms.ofdm_symbol_size + k) << 1] = + ((int16_t *) txdataF)[(l * frame_parms->ofdm_symbol_size + k) << 1] = (amp * mod_dmrs[l][dmrs_idx << 1]) >> 15; - ((int16_t *) txdataF)[((l * frame_parms.ofdm_symbol_size + k) << 1) + 1] = + ((int16_t *) txdataF)[((l * frame_parms->ofdm_symbol_size + k) << 1) + 1] = (amp * mod_dmrs[l][(dmrs_idx << 1) + 1]) >> 15; #ifdef DEBUG_PDCCH_DMRS - printf("PDCCH DMRS: l %d position %d => (%d,%d)\n",l,k,((int16_t *)txdataF)[(l*frame_parms.ofdm_symbol_size + k)<<1], - ((int16_t *)txdataF)[((l*frame_parms.ofdm_symbol_size + k)<<1)+1]); + printf("PDCCH DMRS: l %d position %d => (%d,%d)\n",l,k,((int16_t *)txdataF)[(l*frame_parms->ofdm_symbol_size + k)<<1], + ((int16_t *)txdataF)[((l*frame_parms->ofdm_symbol_size + k)<<1)+1]); #endif dmrs_idx++; k_prime++; } else { // DCI payload - ((int16_t *) txdataF)[(l * frame_parms.ofdm_symbol_size + k) << 1] = (amp * mod_dci[dci_idx << 1]) >> 15; - ((int16_t *) txdataF)[((l * frame_parms.ofdm_symbol_size + k) << 1) + 1] = + ((int16_t *) txdataF)[(l * frame_parms->ofdm_symbol_size + k) << 1] = (amp * mod_dci[dci_idx << 1]) >> 15; + ((int16_t *) txdataF)[((l * frame_parms->ofdm_symbol_size + k) << 1) + 1] = (amp * mod_dci[(dci_idx << 1) + 1]) >> 15; #ifdef DEBUG_DCI - printf("PDCCH: l %d position %d => (%d,%d)\n",l,k,((int16_t *)txdataF)[(l*frame_parms.ofdm_symbol_size + k)<<1], - ((int16_t *)txdataF)[((l*frame_parms.ofdm_symbol_size + k)<<1)+1]); + printf("PDCCH: l %d position %d => (%d,%d)\n",l,k,((int16_t *)txdataF)[(l*frame_parms->ofdm_symbol_size + k)<<1], + ((int16_t *)txdataF)[((l*frame_parms->ofdm_symbol_size + k)<<1)+1]); #endif dci_idx++; @@ -233,8 +233,8 @@ void nr_generate_dci(PHY_VARS_gNB *gNB, k++; - if (k >= frame_parms.ofdm_symbol_size) - k -= frame_parms.ofdm_symbol_size; + if (k >= frame_parms->ofdm_symbol_size) + k -= frame_parms->ofdm_symbol_size; } // m } // reg_in_cce_idx @@ -254,7 +254,7 @@ void nr_generate_dci_top(PHY_VARS_gNB *gNB, uint32_t **gold_pdcch_dmrs, int32_t *txdataF, int16_t amp, - NR_DL_FRAME_PARMS frame_parms) { + NR_DL_FRAME_PARMS *frame_parms) { AssertFatal(pdcch_pdu!=NULL || ul_dci_pdu!=NULL,"At least one pointer has to be !NULL\n"); diff --git a/openair1/PHY/NR_TRANSPORT/nr_dci.h b/openair1/PHY/NR_TRANSPORT/nr_dci.h index 1b57acc6f4..e3b53f9cf9 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dci.h +++ b/openair1/PHY/NR_TRANSPORT/nr_dci.h @@ -35,7 +35,7 @@ void nr_generate_dci_top(PHY_VARS_gNB *gNB, uint32_t **gold_pdcch_dmrs, int32_t *txdataF, int16_t amp, - NR_DL_FRAME_PARMS frame_parms); + NR_DL_FRAME_PARMS *frame_parms); void nr_pdcch_scrambling(uint32_t *in, uint32_t size, From 214b44885daf4548ad2c1cbded719564010d66f4 Mon Sep 17 00:00:00 2001 From: Luis Pereira Date: Wed, 7 Jul 2021 15:27:38 +0000 Subject: [PATCH 545/579] Revert "Temporary fix: avoid mixed slots in initialUplinkBWP" This reverts commit 06a8ec98934cd9f0420f054d7ed415aa51fc3fef --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index b0c5fe2f4a..9ed57353ed 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -1201,10 +1201,6 @@ bool nr_fr1_ulsch_preprocessor(module_id_t module_id, frame_t frame, sub_frame_t if (!is_xlsch_in_slot(nr_mac->ulsch_slot_bitmap[sched_slot / 64], sched_slot)) return false; - // FIXME: Uplink is failing - Avoid mixed slots in initialUplinkBWP - if ((sched_ctrl->active_ubwp == NULL) && (sched_slot == 7 || sched_slot == 17)) - return false; - sched_ctrl->sched_pusch.slot = sched_slot; sched_ctrl->sched_pusch.frame = sched_frame; for (UE_id = UE_info->list.next[UE_id]; UE_id >= 0; UE_id = UE_info->list.next[UE_id]) { From 65bf29eecc4c23ba5c4a5c5458c1b79ab3104ee0 Mon Sep 17 00:00:00 2001 From: luispereira87 Date: Wed, 7 Jul 2021 16:34:29 +0100 Subject: [PATCH 546/579] Fix uplink retransmission information --- .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 9ed57353ed..465994e532 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -847,16 +847,6 @@ bool allocate_ul_retransmission(module_id_t module_id, NR_UE_info_t *UE_info = &RC.nrmac[module_id]->UE_info; NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; NR_sched_pusch_t *retInfo = &sched_ctrl->ul_harq_processes[harq_pid].sched_pusch; - NR_sched_pusch_t *sched_pusch = &sched_ctrl->sched_pusch; - - // frame/slot in sched_pusch has been set previously. In the following, we - // overwrite the information in the retransmission information before storing - // as the new scheduling instruction - retInfo->frame = sched_ctrl->sched_pusch.frame; - retInfo->slot = sched_ctrl->sched_pusch.slot; - - // Get previous PUSCH filed info - sched_ctrl->sched_pusch = *retInfo; NR_BWP_t *genericParameters = sched_ctrl->active_ubwp ? &sched_ctrl->active_ubwp->bwp_Common->genericParameters : &scc->uplinkConfigCommon->initialUplinkBWP->genericParameters; int rbStart = sched_ctrl->active_ubwp ? NRRIV2PRBOFFSET(genericParameters->locationAndBandwidth, MAX_BWP_SIZE) : 0; @@ -924,6 +914,15 @@ bool allocate_ul_retransmission(module_id_t module_id, return false; } + /* frame/slot in sched_pusch has been set previously. In the following, we + * overwrite the information in the retransmission information before storing + * as the new scheduling instruction */ + retInfo->frame = sched_ctrl->sched_pusch.frame; + retInfo->slot = sched_ctrl->sched_pusch.slot; + /* Get previous PSUCH field info */ + sched_ctrl->sched_pusch = *retInfo; + NR_sched_pusch_t *sched_pusch = &sched_ctrl->sched_pusch; + LOG_D(MAC, "%4d.%2d Allocate UL retransmission UE %d/RNTI %04x sched %4d.%2d (%d RBs)\n", frame, From 8743f58d231df175206e260d9b1d78472829b7d6 Mon Sep 17 00:00:00 2001 From: luispereira87 Date: Wed, 7 Jul 2021 18:25:31 +0100 Subject: [PATCH 547/579] Improve schedule msg3 and fix tda for mixed slots --- .../gnb.band78.sa.fr1.106PRB.usrpb210.conf | 2 +- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 15 +++++++++------ openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 2 +- .../CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf | 6 +++--- .../CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf | 6 +++--- 5 files changed, 17 insertions(+), 14 deletions(-) diff --git a/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.usrpb210.conf b/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.usrpb210.conf index 494be845a6..f2da2e9fe3 100644 --- a/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.usrpb210.conf +++ b/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.usrpb210.conf @@ -142,7 +142,7 @@ gNBs = initialULBWPk2_1 = 6; # used for mixed slot initialULBWPmappingType_1 = 1; - initialULBWPstartSymbolAndLength_1 = 69; # this is SS=0 L=12 + initialULBWPstartSymbolAndLength_1 = 52; # this is SS=10 L=4 initialULBWPk2_2 = 7; # used for Msg.3 during RA initialULBWPmappingType_2 = 1; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 5b69bbbbb5..014ebdbdd5 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -704,21 +704,24 @@ void nr_get_Msg3alloc(module_id_t module_id, ubwp->bwp_Common->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList: scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList; + uint8_t k2 = 0; for (int i=0; ilist.count; i++) { startSymbolAndLength = pusch_TimeDomainAllocationList->list.array[i]->startSymbolAndLength; SLIV2SL(startSymbolAndLength, &StartSymbolIndex, &NrOfSymbols); // we want to transmit in the uplink symbols of mixed slot if (NrOfSymbols == scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSymbols) { - ra->Msg3_tda_id = i; - break; + k2 = *pusch_TimeDomainAllocationList->list.array[i]->k2; + temp_slot = current_slot + k2 + DELTA[mu]; // msg3 slot according to 8.3 in 38.213 + ra->Msg3_slot = temp_slot%nr_slots_per_frame[mu]; + if (is_xlsch_in_slot(RC.nrmac[module_id]->ulsch_slot_bitmap[ra->Msg3_slot / 64], ra->Msg3_slot)) { + ra->Msg3_tda_id = i; + break; + } } } + AssertFatal(ra->Msg3_tda_id<16,"Unable to find Msg3 time domain allocation in list\n"); - uint8_t k2 = *pusch_TimeDomainAllocationList->list.array[ra->Msg3_tda_id]->k2; - - temp_slot = current_slot + k2 + DELTA[mu]; // msg3 slot according to 8.3 in 38.213 - ra->Msg3_slot = temp_slot%nr_slots_per_frame[mu]; if (nr_slots_per_frame[mu]>temp_slot) ra->Msg3_frame = current_frame; else diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 465994e532..cfd032e3d8 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -969,7 +969,7 @@ void pf_ul(module_id_t module_id, gNB_MAC_INST *nrmac = RC.nrmac[module_id]; NR_ServingCellConfigCommon_t *scc = nrmac->common_channels[CC_id].ServingCellConfigCommon; NR_UE_info_t *UE_info = &nrmac->UE_info; - const int min_rb = 5; + const int min_rb = 16; float coeff_ue[MAX_MOBILES_PER_GNB]; // UEs that could be scheduled int ue_array[MAX_MOBILES_PER_GNB]; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf index 00c92d75a2..164830f97b 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf @@ -1,4 +1,4 @@ -Active_gNBs = ( "gNB-Eurecom-DU"); +Active_gNBs = ( "gNB-Eurecom-5GNRBox"); # Asn1_verbosity, choice in: none, info, annoying Asn1_verbosity = "none"; @@ -7,7 +7,7 @@ gNBs = { ////////// Identification parameters: gNB_ID = 0xe00; - gNB_name = "gNB-Eurecom-DU"; + gNB_name = "gNB-Eurecom-5GNRBox"; // Tracking area code, 0x0000 and 0xfffe are reserved values tracking_area_code = 1; @@ -142,7 +142,7 @@ gNBs = initialULBWPk2_1 = 6; # used for mixed slot initialULBWPmappingType_1 = 1; - initialULBWPstartSymbolAndLength_1 = 69; # this is SS=0 L=12 + initialULBWPstartSymbolAndLength_1 = 52; # this is SS=10 L=4 initialULBWPk2_2 = 7; # used for Msg.3 during RA initialULBWPmappingType_2 = 1; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf index bd0678e344..1ec5f74cfb 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf @@ -1,4 +1,4 @@ -Active_gNBs = ( "gNB-Eurecom-DU"); +Active_gNBs = ( "gNB-Eurecom-5GNRBox"); # Asn1_verbosity, choice in: none, info, annoying Asn1_verbosity = "none"; @@ -7,7 +7,7 @@ gNBs = { ////////// Identification parameters: gNB_ID = 0xe00; - gNB_name = "gNB-Eurecom-DU"; + gNB_name = "gNB-Eurecom-5GNRBox"; // Tracking area code, 0x0000 and 0xfffe are reserved values tracking_area_code = 1; @@ -142,7 +142,7 @@ gNBs = initialULBWPk2_1 = 6; # used for mixed slot initialULBWPmappingType_1 = 1; - initialULBWPstartSymbolAndLength_1 = 69; # this is SS=0 L=12 + initialULBWPstartSymbolAndLength_1 = 52; # this is SS=10 L=4 initialULBWPk2_2 = 7; # used for Msg.3 during RA initialULBWPmappingType_2 = 1; From 38e3517029bacd706fc75290c9e3c664d989ca2e Mon Sep 17 00:00:00 2001 From: luispereira87 Date: Wed, 7 Jul 2021 19:11:33 +0100 Subject: [PATCH 548/579] Fix build warning --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 5 ++++- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 014ebdbdd5..68d62e910a 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -697,7 +697,10 @@ void nr_get_Msg3alloc(module_id_t module_id, int mu = ubwp ? ubwp->bwp_Common->genericParameters.subcarrierSpacing : scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.subcarrierSpacing; - int StartSymbolIndex, NrOfSymbols, startSymbolAndLength, temp_slot; + int StartSymbolIndex = 0; + int NrOfSymbols = 0; + int startSymbolAndLength = 0; + int temp_slot = 0; ra->Msg3_tda_id = 16; // initialization to a value above limit NR_PUSCH_TimeDomainResourceAllocationList_t *pusch_TimeDomainAllocationList= ubwp ? diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index cfd032e3d8..4f007aec50 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -969,7 +969,7 @@ void pf_ul(module_id_t module_id, gNB_MAC_INST *nrmac = RC.nrmac[module_id]; NR_ServingCellConfigCommon_t *scc = nrmac->common_channels[CC_id].ServingCellConfigCommon; NR_UE_info_t *UE_info = &nrmac->UE_info; - const int min_rb = 16; + const int min_rb = 20; float coeff_ue[MAX_MOBILES_PER_GNB]; // UEs that could be scheduled int ue_array[MAX_MOBILES_PER_GNB]; From 9c571bd933e8764a7acd94d8c28c6cdaf5d5663e Mon Sep 17 00:00:00 2001 From: rmagueta Date: Thu, 8 Jul 2021 18:38:49 +0100 Subject: [PATCH 549/579] Fix segmentation fault in nr-ru --- executables/nr-ru.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/executables/nr-ru.c b/executables/nr-ru.c index 40c20fc8b1..088c636c7a 100644 --- a/executables/nr-ru.c +++ b/executables/nr-ru.c @@ -746,9 +746,9 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) { // currently we switch beams every 10 slots (should = 1 TDD period in FR2) and we take the beam index of the first symbol of the first slot of this period int beam=0; if (slot%10==0) { - if (ru->common.beam_id[0][slot*fp->symbols_per_slot] < 8) { - beam = ru->common.beam_id[0][slot*fp->symbols_per_slot] | 8; - } + if ( ru->common.beam_id && (ru->common.beam_id[0][slot*fp->symbols_per_slot] < 8)) { + beam = ru->common.beam_id[0][slot*fp->symbols_per_slot] | 8; + } } /* if (slot==0 || slot==40) beam=0|8; From 7821a12998df2cbb0c0d348a925f50d005bd87a6 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Thu, 8 Jul 2021 19:57:03 +0100 Subject: [PATCH 550/579] Fix is_xlsch_in_slot --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c index e32e01cc89..d9e9b9d8f3 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c @@ -341,7 +341,7 @@ void schedule_nr_SRS(module_id_t module_idP, frame_t frameP, sub_frame_t subfram bool is_xlsch_in_slot(uint64_t bitmap, sub_frame_t slot) { if (slot>64) return false; //quickfix for FR2 where there are more than 64 slots (bitmap to be removed) - return (bitmap >> slot) & 0x01; + return (bitmap & (1 << (slot % 64))) != 0; } void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, From b19d39682861d569d0574d86de520a39bf83ba46 Mon Sep 17 00:00:00 2001 From: Roberto Louro Magueta Date: Fri, 9 Jul 2021 11:34:01 +0000 Subject: [PATCH 551/579] Revert "Fix is_xlsch_in_slot" This reverts commit 7821a12998df2cbb0c0d348a925f50d005bd87a6 --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c index d9e9b9d8f3..e32e01cc89 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c @@ -341,7 +341,7 @@ void schedule_nr_SRS(module_id_t module_idP, frame_t frameP, sub_frame_t subfram bool is_xlsch_in_slot(uint64_t bitmap, sub_frame_t slot) { if (slot>64) return false; //quickfix for FR2 where there are more than 64 slots (bitmap to be removed) - return (bitmap & (1 << (slot % 64))) != 0; + return (bitmap >> slot) & 0x01; } void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, From 3c9ca36651e45df9635a41a0276d815e1a8eff1b Mon Sep 17 00:00:00 2001 From: rmagueta Date: Fri, 9 Jul 2021 13:22:30 +0100 Subject: [PATCH 552/579] Fix fill slot bitmap for FR2 --- openair2/LAYER2/NR_MAC_gNB/config.c | 8 ++++---- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/config.c b/openair2/LAYER2/NR_MAC_gNB/config.c index 87cc7851ff..9428853037 100644 --- a/openair2/LAYER2/NR_MAC_gNB/config.c +++ b/openair2/LAYER2/NR_MAC_gNB/config.c @@ -489,12 +489,12 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP, /* FIXME: it seems there is a problem with slot 0/10/slots right after UL: * we just get retransmissions. Thus, do not schedule such slots in DL */ if (slot % nr_slots_period != 0) - RC.nrmac[Mod_idP]->dlsch_slot_bitmap[slot / 64] |= ((slot % nr_slots_period) < nr_dlmix_slots) << (slot % 64); - RC.nrmac[Mod_idP]->ulsch_slot_bitmap[slot / 64] |= ((slot % nr_slots_period) >= nr_ulstart_slot) << (slot % 64); + RC.nrmac[Mod_idP]->dlsch_slot_bitmap[slot / 64] |= (uint64_t)((slot % nr_slots_period) < nr_dlmix_slots) << (slot % 64); + RC.nrmac[Mod_idP]->ulsch_slot_bitmap[slot / 64] |= (uint64_t)((slot % nr_slots_period) >= nr_ulstart_slot) << (slot % 64); LOG_D(NR_MAC, "slot %d DL %d UL %d\n", slot, - (RC.nrmac[Mod_idP]->dlsch_slot_bitmap[slot / 64] & (1 << (slot % 64))) != 0, - (RC.nrmac[Mod_idP]->ulsch_slot_bitmap[slot / 64] & (1 << (slot % 64))) != 0); + (RC.nrmac[Mod_idP]->dlsch_slot_bitmap[slot / 64] & ((uint64_t)1 << (slot % 64))) != 0, + (RC.nrmac[Mod_idP]->ulsch_slot_bitmap[slot / 64] & ((uint64_t)1 << (slot % 64))) != 0); } if (get_softmodem_params()->phy_test) { diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c index e32e01cc89..3a704c2093 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c @@ -340,7 +340,7 @@ void schedule_nr_SRS(module_id_t module_idP, frame_t frameP, sub_frame_t subfram bool is_xlsch_in_slot(uint64_t bitmap, sub_frame_t slot) { - if (slot>64) return false; //quickfix for FR2 where there are more than 64 slots (bitmap to be removed) + if (slot>=64) return false; //quickfix for FR2 where there are more than 64 slots (bitmap to be removed) return (bitmap >> slot) & 0x01; } From ba122c9cb429a7f10100c787de8abedd81729400 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Fri, 9 Jul 2021 15:59:19 +0100 Subject: [PATCH 553/579] Fix max_association_period for FDD --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 68d62e910a..fa4a8d9bdb 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -215,7 +215,7 @@ void find_SSB_and_RO_available(module_id_t module_idP) { } cc->total_prach_occasions_per_config_period = total_RA_occasions; - for(int i=1; (1 << (i-1)) < max_association_period; i++) { + for(int i=1; (1 << (i-1)) <= max_association_period; i++) { cc->max_association_period = (1 <<(i-1)); total_RA_occasions = total_RA_occasions * cc->max_association_period; if(total_RA_occasions >= (int) (num_active_ssb/num_ssb_per_RO)) { From 02e20e9021fa024cc335cc687490776941048ee8 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Fri, 9 Jul 2021 20:18:49 +0100 Subject: [PATCH 554/579] Fix frequencyDomainResources for coreset0 --- openair2/RRC/NR/rrc_gNB_reconfig.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/openair2/RRC/NR/rrc_gNB_reconfig.c b/openair2/RRC/NR/rrc_gNB_reconfig.c index f3241e3185..b7e9c7c467 100644 --- a/openair2/RRC/NR/rrc_gNB_reconfig.c +++ b/openair2/RRC/NR/rrc_gNB_reconfig.c @@ -61,8 +61,15 @@ void fill_default_coresetZero(NR_ControlResourceSet_t *coreset0, NR_ServingCellC // frequencyDomainResources '11111111 00000000 00000000 00000000 00000000 00000'B, if(coreset0->frequencyDomainResources.buf == NULL) coreset0->frequencyDomainResources.buf = calloc(1,6); - coreset0->frequencyDomainResources.buf[0] = 0xff; - coreset0->frequencyDomainResources.buf[1] = 0; + int curr_bwp = NRRIV2BW(servingcellconfigcommon->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, 275); + if (curr_bwp < 48) + coreset0->frequencyDomainResources.buf[0] = 0xf0; + else + coreset0->frequencyDomainResources.buf[0] = 0xff; + if (curr_bwp < 96) + coreset0->frequencyDomainResources.buf[1] = 0; + else + coreset0->frequencyDomainResources.buf[1] = 0xff; coreset0->frequencyDomainResources.buf[2] = 0; coreset0->frequencyDomainResources.buf[3] = 0; coreset0->frequencyDomainResources.buf[4] = 0; From af0d7dabbae7a7fa441ff8ebeac92e32955c8421 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Fri, 9 Jul 2021 20:32:54 +0100 Subject: [PATCH 555/579] Temporary fix for prach_thres --- openair2/GNB_APP/L1_nr_paramdef.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/GNB_APP/L1_nr_paramdef.h b/openair2/GNB_APP/L1_nr_paramdef.h index fd22e92730..8a41ac8a88 100644 --- a/openair2/GNB_APP/L1_nr_paramdef.h +++ b/openair2/GNB_APP/L1_nr_paramdef.h @@ -66,7 +66,7 @@ {CONFIG_STRING_L1_REMOTE_N_PORTD, NULL, 0, uptr:NULL, defintval:50031, TYPE_UINT, 0}, \ {CONFIG_STRING_L1_PUSCH_PROC_THREADS, NULL, 0, uptr:NULL, defintval:1, TYPE_UINT, 0}, \ {CONFIG_STRING_L1_PUCCH0_DTX_THRESHOLD, NULL, 0, uptr:NULL, defintval:100, TYPE_UINT, 0}, \ -{CONFIG_STRING_L1_PRACH_DTX_THRESHOLD, NULL, 0, uptr:NULL, defintval:200, TYPE_UINT, 0}, \ +{CONFIG_STRING_L1_PRACH_DTX_THRESHOLD, NULL, 0, uptr:NULL, defintval:250, TYPE_UINT, 0}, \ {CONFIG_STRING_L1_PUSCH_DTX_THRESHOLD, NULL, 0, uptr:NULL, defintval:50, TYPE_UINT, 0} \ } #define L1_CC_IDX 0 From 389a8e58be481a0861db2ba4c5c1e97cd8ef8476 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Sat, 10 Jul 2021 02:17:36 +0100 Subject: [PATCH 556/579] Revert security_mode for phy-test --- openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c index 8b46bc9c5f..2f16abfe80 100644 --- a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c +++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c @@ -1032,7 +1032,7 @@ void nr_DRB_preconfiguration(uint16_t crnti) (NR_SRB_ToAddModList_t *) NULL, rbconfig->drb_ToAddModList , rbconfig->drb_ToReleaseList, - 0xff, + 0, NULL, NULL, NULL, From bc528d0c73efde5df057181b297cff7ea8f30913 Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Mon, 12 Jul 2021 13:22:38 +0200 Subject: [PATCH 557/579] fix wireshark interface headers --- openair2/UTIL/OPT/opt.h | 7 +- openair2/UTIL/OPT/packet-mac-lte.h | 299 --------- openair2/UTIL/OPT/packet-mac-nr.h | 142 ---- openair2/UTIL/OPT/packet-pdcp-lte.h | 172 ----- openair2/UTIL/OPT/packet-pdcp-nr.h | 168 ----- openair2/UTIL/OPT/packet-rlc-lte.h | 151 ----- openair2/UTIL/OPT/packet-rlc-nr.h | 136 ---- openair2/UTIL/OPT/wireshark_headers.h | 895 ++++++++++++++++++++++++++ 8 files changed, 896 insertions(+), 1074 deletions(-) delete mode 100644 openair2/UTIL/OPT/packet-mac-lte.h delete mode 100644 openair2/UTIL/OPT/packet-mac-nr.h delete mode 100644 openair2/UTIL/OPT/packet-pdcp-lte.h delete mode 100644 openair2/UTIL/OPT/packet-pdcp-nr.h delete mode 100644 openair2/UTIL/OPT/packet-rlc-lte.h delete mode 100644 openair2/UTIL/OPT/packet-rlc-nr.h create mode 100644 openair2/UTIL/OPT/wireshark_headers.h diff --git a/openair2/UTIL/OPT/opt.h b/openair2/UTIL/OPT/opt.h index a3a790cf97..ae6a3eb2a6 100644 --- a/openair2/UTIL/OPT/opt.h +++ b/openair2/UTIL/OPT/opt.h @@ -59,12 +59,7 @@ typedef uint16_t guint16; typedef uint32_t guint32; typedef guint8 gboolean; -#include "packet-mac-lte.h" -#include "packet-rlc-lte.h" -#include "packet-pdcp-lte.h" -#include "packet-mac-nr.h" -#include "packet-rlc-nr.h" -#include "packet-pdcp-nr.h" +#include #include "mac_pcap.h" diff --git a/openair2/UTIL/OPT/packet-mac-lte.h b/openair2/UTIL/OPT/packet-mac-lte.h deleted file mode 100644 index 33e987c4ab..0000000000 --- a/openair2/UTIL/OPT/packet-mac-lte.h +++ /dev/null @@ -1,299 +0,0 @@ -/* packet-mac-lte.h - * - * Martin Mathieson - * - * Wireshark - Network traffic analyzer - * By Gerald Combs - * Copyright 1998 Gerald Combs - * - * SPDX-License-Identifier: GPL-2.0-or-later - * - * This header file may also be distributed under - * the terms of the BSD Licence as follows: - * - * Copyright (C) 2009 Martin Mathieson. All rights reserved. - * - * SPDX-License-Identifier: BSD-2-Clause - */ - - /* - this is wireshark, commit: commit eda834b6e29c36e05a63a6056afa98390ff79357 - Date: Wed Aug 22 14:36:20 2018 +0200 - modified to be used in OpenAir to create the LTE MAC/RLC encapsulated in UDP as per Wireshark feature - */ - -#ifndef __UTIL_OPT_PACKET_MAC_LTE__H__ -#define __UTIL_OPT_PACKET_MAC_LTE__H__ - -#include "ws_symbol_export.h" - -/** data structure to hold time values with nanosecond resolution*/ -typedef struct { - time_t secs; - int nsecs; -} nstime_t; - - -/* radioType */ -#define FDD_RADIO 1 -#define TDD_RADIO 2 - -/* Direction */ -#define DIRECTION_UPLINK 0 -#define DIRECTION_DOWNLINK 1 - -/* rntiType */ -#define WS_NO_RNTI 0 -#define WS_P_RNTI 1 -#define WS_RA_RNTI 2 -#define WS_C_RNTI 3 -#define WS_SI_RNTI 4 -#define WS_SPS_RNTI 5 -#define WS_M_RNTI 6 -#define WS_SL_BCH_RNTI 7 -#define WS_SL_RNTI 8 -#define WS_SC_RNTI 9 -#define WS_G_RNTI 10 - -typedef enum mac_lte_oob_event { - ltemac_send_preamble, - ltemac_send_sr, - ltemac_sr_failure -} mac_lte_oob_event; - -typedef enum mac_lte_dl_retx { - dl_retx_no, - dl_retx_yes, - dl_retx_unknown -} mac_lte_dl_retx; - -typedef enum mac_lte_crc_status { - crc_fail = 0, - crc_success = 1, - crc_high_code_rate = 2, - crc_pdsch_lost = 3, - crc_duplicate_nonzero_rv = 4, - crc_false_dci = 5 -} mac_lte_crc_status; - -/* N.B. for SCellIndex-r13 extends to 31 */ -typedef enum mac_lte_carrier_id { - carrier_id_primary, - carrier_id_secondary_1, - carrier_id_secondary_2, - carrier_id_secondary_3, - carrier_id_secondary_4, - carrier_id_secondary_5, - carrier_id_secondary_6, - carrier_id_secondary_7 -} mac_lte_carrier_id; - -typedef enum mac_lte_ce_mode { - no_ce_mode = 0, - ce_mode_a = 1, - ce_mode_b = 2 -} mac_lte_ce_mode; - -typedef enum mac_lte_nb_mode { - no_nb_mode = 0, - nb_mode = 1 -} mac_lte_nb_mode; - -/* Context info attached to each LTE MAC frame */ -typedef struct mac_lte_info -{ - /* Needed for decode */ - guint8 radioType; - guint8 direction; - guint8 rntiType; - - /* Extra info to display */ - guint16 rnti; - guint16 ueid; - - /* Timing info */ - guint16 sysframeNumber; - guint16 subframeNumber; - gboolean sfnSfInfoPresent; - - /* Optional field. More interesting for TDD (FDD is always -4 subframeNumber) */ - gboolean subframeNumberOfGrantPresent; - guint16 subframeNumberOfGrant; - - /* Flag set only if doing PHY-level data test - i.e. there may not be a - well-formed MAC PDU so just show as raw data */ - gboolean isPredefinedData; - - /* Length of DL PDU or UL grant size in bytes */ - guint16 length; - - /* 0=newTx, 1=first-retx, etc */ - guint8 reTxCount; - guint8 isPHICHNACK; /* FALSE=PDCCH retx grant, TRUE=PHICH NACK */ - - /* UL only. Indicates if the R10 extendedBSR-Sizes parameter is set */ - gboolean isExtendedBSRSizes; - - /* UL only. Indicates if the R10 simultaneousPUCCH-PUSCH parameter is set for PCell */ - gboolean isSimultPUCCHPUSCHPCell; - - /* UL only. Indicates if the R10 extendedBSR-Sizes parameter is set for PSCell */ - gboolean isSimultPUCCHPUSCHPSCell; - - /* Status of CRC check. For UE it is DL only. For eNodeB it is UL - only. For an analyzer, it is present for both DL and UL. */ - gboolean crcStatusValid; - mac_lte_crc_status crcStatus; - - /* Carrier ID */ - mac_lte_carrier_id carrierId; - - /* DL only. Is this known to be a retransmission? */ - mac_lte_dl_retx dl_retx; - - /* DL only. CE mode to be used for RAR decoding */ - mac_lte_ce_mode ceMode; - - /* DL and UL. NB-IoT mode of the UE */ - mac_lte_nb_mode nbMode; - - /* UL only, for now used for CE mode A RAR decoding */ - guint8 nUlRb; - - /* More Physical layer info (see direction above for which side of union to use) */ - union { - struct mac_lte_ul_phy_info - { - guint8 present; /* Remaining UL fields are present and should be displayed */ - guint8 modulation_type; - guint8 tbs_index; - guint8 resource_block_length; - guint8 resource_block_start; - guint8 harq_id; - gboolean ndi; - } ul_info; - struct mac_lte_dl_phy_info - { - guint8 present; /* Remaining DL fields are present and should be displayed */ - guint8 dci_format; - guint8 resource_allocation_type; - guint8 aggregation_level; - guint8 mcs_index; - guint8 redundancy_version_index; - guint8 resource_block_length; - guint8 harq_id; - gboolean ndi; - guint8 transport_block; /* 0..1 */ - } dl_info; - } detailed_phy_info; - - /* Relating to out-of-band events */ - /* N.B. dissector will only look to these fields if length is 0... */ - mac_lte_oob_event oob_event; - guint8 rapid; - guint8 rach_attempt_number; - #define MAX_SRs 20 - guint16 number_of_srs; - guint16 oob_ueid[MAX_SRs]; - guint16 oob_rnti[MAX_SRs]; -} mac_lte_info; - - /* 0 to 10 and 32 to 38 */ -#define MAC_LTE_DATA_LCID_COUNT_MAX 18 - - - - -/* Accessor function to check if a frame was considered to be ReTx */ - -/**********************************************************************/ -/* UDP framing format */ -/* ----------------------- */ -/* Several people have asked about dissecting MAC by framing */ -/* PDUs over IP. A suggested format over UDP has been created */ -/* and implemented by this dissector, using the definitions */ -/* below. A link to an example program showing you how to encode */ -/* these headers and send LTE MAC PDUs on a UDP socket is */ -/* provided at https://gitlab.com/wireshark/wireshark/-/wikis/MAC-LTE */ -/* */ -/* A heuristic dissector (enabled by a preference) will */ -/* recognise a signature at the beginning of these frames. */ -/**********************************************************************/ - - -/* Signature. Rather than try to define a port for this, or make the - port number a preference, frames will start with this string (with no - terminating NULL */ -#define MAC_LTE_START_STRING "mac-lte" - -/* Fixed fields. This is followed by the following 3 mandatory fields: - - radioType (1 byte) - - direction (1 byte) - - rntiType (1 byte) - (where the allowed values are defined above */ - -/* Optional fields. Attaching this info to frames will allow you - to show you display/filter/plot/add-custom-columns on these fields, so should - be added if available. - The format is to have the tag, followed by the value (there is no length field, - it's implicit from the tag) */ - -#define MAC_LTE_RNTI_TAG 0x02 -/* 2 bytes, network order */ - -#define MAC_LTE_UEID_TAG 0x03 -/* 2 bytes, network order */ - -#define MAC_LTE_FRAME_SUBFRAME_TAG 0x04 -/* 2 bytes, network order, SFN is stored in 12 MSB and SF in 4 LSB */ - -#define MAC_LTE_PREDEFINED_DATA_TAG 0x05 -/* 1 byte */ - -#define MAC_LTE_RETX_TAG 0x06 -/* 1 byte */ - -#define MAC_LTE_CRC_STATUS_TAG 0x07 -/* 1 byte */ - -#define MAC_LTE_EXT_BSR_SIZES_TAG 0x08 -/* 0 byte */ - -#define MAC_LTE_SEND_PREAMBLE_TAG 0x09 -/* 2 bytes, RAPID value (1 byte) followed by RACH attempt number (1 byte) */ - -#define MAC_LTE_CARRIER_ID_TAG 0x0A -/* 1 byte */ - -#define MAC_LTE_PHY_TAG 0x0B -/* variable length, length (1 byte) then depending on direction - in UL: modulation type (1 byte), TBS index (1 byte), RB length (1 byte), - RB start (1 byte), HARQ id (1 byte), NDI (1 byte) - in DL: DCI format (1 byte), resource allocation type (1 byte), aggregation level (1 byte), - MCS index (1 byte), redundancy version (1 byte), resource block length (1 byte), - HARQ id (1 byte), NDI (1 byte), TB (1 byte), DL reTx (1 byte) */ - -#define MAC_LTE_SIMULT_PUCCH_PUSCH_PCELL_TAG 0x0C -/* 0 byte */ - -#define MAC_LTE_SIMULT_PUCCH_PUSCH_PSCELL_TAG 0x0D -/* 0 byte */ - -#define MAC_LTE_CE_MODE_TAG 0x0E -/* 1 byte containing mac_lte_ce_mode enum value */ - -#define MAC_LTE_NB_MODE_TAG 0x0F -/* 1 byte containing mac_lte_nb_mode enum value */ - -#define MAC_LTE_N_UL_RB_TAG 0x10 -/* 1 byte containing the number of UL resource blocks: 6, 15, 25, 50, 75 or 100 */ - -#define MAC_LTE_SR_TAG 0x11 -/* 2 bytes for the number of items, followed by that number of ueid, rnti (2 bytes each) */ - - -/* MAC PDU. Following this tag comes the actual MAC PDU (there is no length, the PDU - continues until the end of the frame) */ -#define MAC_LTE_PAYLOAD_TAG 0x01 - -#endif diff --git a/openair2/UTIL/OPT/packet-mac-nr.h b/openair2/UTIL/OPT/packet-mac-nr.h deleted file mode 100644 index 8a1627a8ef..0000000000 --- a/openair2/UTIL/OPT/packet-mac-nr.h +++ /dev/null @@ -1,142 +0,0 @@ -/* packet-mac-nr.h - * - * Martin Mathieson - * - * Wireshark - Network traffic analyzer - * By Gerald Combs - * Copyright 1998 Gerald Combs - * - * SPDX-License-Identifier: GPL-2.0-or-later - */ - -/* radioType */ -#define FDD_RADIO 1 -#define TDD_RADIO 2 - -/* Direction */ -#define DIRECTION_UPLINK 0 -#define DIRECTION_DOWNLINK 1 - -/* rntiType */ -#define WS_NO_RNTI 0 -#define WS_P_RNTI 1 -#define WS_RA_RNTI 2 -#define WS_C_RNTI 3 -#define WS_SI_RNTI 4 -#define WS_CS_RNTI 5 - -/* Context info attached to each NR MAC frame */ -typedef struct mac_nr_info -{ - /* Needed for decode */ - guint8 radioType; - guint8 direction; - guint8 rntiType; - - /* Extra info to display */ - guint16 rnti; - guint16 ueid; - guint8 harqid; - - /* Will these be included in the ME PHR report? */ - guint8 phr_type2_othercell; - - /* Timing info */ - gboolean sfnSlotInfoPresent; - guint16 sysframeNumber; - guint16 slotNumber; - - /* Length of DL PDU or UL grant size in bytes */ - guint16 length; - -} mac_nr_info; - - -/*****************************************************************/ -/* UDP framing format */ -/* ----------------------- */ -/* Several people have asked about dissecting MAC by framing */ -/* PDUs over IP. A suggested format over UDP has been created */ -/* and implemented by this dissector, using the definitions */ -/* below. */ -/* */ -/* A heuristic dissector (enabled by a preference) will */ -/* recognise a signature at the beginning of these frames. */ -/*****************************************************************/ - - -/* Signature. Rather than try to define a port for this, or make the - port number a preference, frames will start with this string (with no - terminating NULL */ -#define MAC_NR_START_STRING "mac-nr" - -/* Fixed fields. This is followed by the following 3 mandatory fields: - - radioType (1 byte) - - direction (1 byte) - - rntiType (1 byte) - (where the allowed values are defined above */ - -/* Optional fields. Attaching this info to frames will allow you - to show you display/filter/plot/add-custom-columns on these fields, so should - be added if available. - The format is to have the tag, followed by the value (there is no length field, - it's implicit from the tag) */ - -#define MAC_NR_RNTI_TAG 0x02 -/* 2 bytes, network order */ - -#define MAC_NR_UEID_TAG 0x03 -/* 2 bytes, network order */ - -#define MAC_NR_FRAME_SUBFRAME_TAG 0x04 -/* 2 bytes, deprecated, do not use it */ - -#define MAC_NR_PHR_TYPE2_OTHERCELL_TAG 0x05 -/* 1 byte, TRUE/FALSE */ - -#define MAC_NR_HARQID 0x06 -/* 1 byte */ - -#define MAC_NR_FRAME_SLOT_TAG 0x07 -/* 4 bytes, network order, SFN is stored in the 2 first bytes and slot number in the 2 last bytes */ - -/* MAC PDU. Following this tag comes the actual MAC PDU (there is no length, the PDU - continues until the end of the frame) */ -#define MAC_NR_PAYLOAD_TAG 0x01 - - -/* Type to store parameters for configuring LCID->RLC channel settings for DRB */ -/* Some are optional, and may not be seen (e.g. on reestablishment) */ -typedef struct nr_drb_mac_rlc_mapping_t -{ - gboolean active; - guint16 ueid; /* Mandatory */ - guint8 drbid; /* Mandatory */ - - gboolean lcid_present; - guint8 lcid; /* Part of LogicalChannelConfig - optional */ - gboolean rlcMode_present; - guint8 rlcMode; /* Part of RLC config - optional */ - - guint8 tempDirection; /* So know direction of next SN length... */ - - gboolean rlcUlSnLength_present; - guint8 rlcUlSnLength; /* Part of RLC config - optional */ - gboolean rlcDlSnLength_present; - guint8 rlcDlSnLength; /* Part of RLC config - optional */ -} nr_drb_mac_rlc_mapping_t; - - - -/* - * Editor modelines - https://www.wireshark.org/tools/modelines.html - * - * Local variables: - * c-basic-offset: 4 - * tab-width: 8 - * indent-tabs-mode: nil - * End: - * - * vi: set shiftwidth=4 tabstop=8 expandtab: - * :indentSize=4:tabSize=8:noTabs=true: - */ diff --git a/openair2/UTIL/OPT/packet-pdcp-lte.h b/openair2/UTIL/OPT/packet-pdcp-lte.h deleted file mode 100644 index 19a371011b..0000000000 --- a/openair2/UTIL/OPT/packet-pdcp-lte.h +++ /dev/null @@ -1,172 +0,0 @@ -/* packet-pdcp-lte.h - * - * Martin Mathieson - * Wireshark - Network traffic analyzer - * By Gerald Combs - * Copyright 1998 Gerald Combs - * - * SPDX-License-Identifier: GPL-2.0-or-later - */ - - - -/* Direction */ -#define DIRECTION_UPLINK 0 -#define DIRECTION_DOWNLINK 1 - -enum pdcp_plane -{ - SIGNALING_PLANE = 1, - USER_PLANE = 2 -}; - -typedef enum LogicalChannelType -{ - Channel_DCCH=1, - Channel_BCCH=2, - Channel_CCCH=3, - Channel_PCCH=4, - Channel_DCCH_NB=5, - Channel_BCCH_NB=6, - Channel_CCCH_NB=7, - Channel_PCCH_NB=8 -} LogicalChannelType; - -typedef enum -{ - BCH_TRANSPORT=1, - DLSCH_TRANSPORT=2 -} BCCHTransportType; - -#define PDCP_SN_LENGTH_5_BITS 5 -#define PDCP_SN_LENGTH_7_BITS 7 -#define PDCP_SN_LENGTH_12_BITS 12 -#define PDCP_SN_LENGTH_15_BITS 15 -#define PDCP_SN_LENGTH_18_BITS 18 - -enum lte_security_integrity_algorithm_e { eia0, eia1, eia2, eia3 }; -enum lte_security_ciphering_algorithm_e { eea0, eea1, eea2, eea3 }; - -typedef struct pdcp_lte_security_info_t -{ - guint32 configuration_frame; - gboolean seen_next_ul_pdu; /* i.e. have we seen SecurityModeResponse */ - enum lte_security_integrity_algorithm_e integrity; - enum lte_security_ciphering_algorithm_e ciphering; - - /* Store previous settings so can revert if get SecurityModeFailure */ - guint32 previous_configuration_frame; - enum lte_security_integrity_algorithm_e previous_integrity; - enum lte_security_ciphering_algorithm_e previous_ciphering; -} pdcp_lte_security_info_t; - - -/***********************************************************************/ -/* UDP framing format */ -/* ----------------------- */ -/* Several people have asked about dissecting PDCP by framing */ -/* PDUs over IP. A suggested format over UDP has been defined */ -/* and implemented by this dissector, using the definitions */ -/* below. A link to an example program showing you how to encode */ -/* these headers and send LTE PDCP PDUs on a UDP socket is */ -/* provided at https://gitlab.com/wireshark/wireshark/-/wikis/PDCP-LTE */ -/* */ -/* A heuristic dissecter (enabled by a preference) will */ -/* recognise a signature at the beginning of these frames. */ -/* Until someone is using this format, suggestions for changes */ -/* are welcome. */ -/***********************************************************************/ - - -/* Signature. Rather than try to define a port for this, or make the - port number a preference, frames will start with this string (with no - terminating NULL */ -#define PDCP_LTE_START_STRING "pdcp-lte" - -/* Fixed fields. This is followed by the following 3 mandatory fields: - - no_header_pdu (1 byte) - - plane (1 byte) - - rohc_compression ( byte) - (where the allowed values are defined above) */ - -/* Conditional field. This field is mandatory in case of User Plane PDCP PDU. - The format is to have the tag, followed by the value (there is no length field, - it's implicit from the tag). The allowed values are defined above. */ - -#define PDCP_LTE_SEQNUM_LENGTH_TAG 0x02 -/* 1 byte */ - -/* Optional fields. Attaching this info to frames will allow you - to show you display/filter/plot/add-custom-columns on these fields, so should - be added if available. - The format is to have the tag, followed by the value (there is no length field, - it's implicit from the tag) */ - -#define PDCP_LTE_DIRECTION_TAG 0x03 -/* 1 byte */ - -#define PDCP_LTE_LOG_CHAN_TYPE_TAG 0x04 -/* 1 byte */ - -#define PDCP_LTE_BCCH_TRANSPORT_TYPE_TAG 0x05 -/* 1 byte */ - -#define PDCP_LTE_ROHC_IP_VERSION_TAG 0x06 -/* 2 bytes, network order */ - -#define PDCP_LTE_ROHC_CID_INC_INFO_TAG 0x07 -/* 1 byte */ - -#define PDCP_LTE_ROHC_LARGE_CID_PRES_TAG 0x08 -/* 1 byte */ - -#define PDCP_LTE_ROHC_MODE_TAG 0x09 -/* 1 byte */ - -#define PDCP_LTE_ROHC_RND_TAG 0x0A -/* 1 byte */ - -#define PDCP_LTE_ROHC_UDP_CHECKSUM_PRES_TAG 0x0B -/* 1 byte */ - -#define PDCP_LTE_ROHC_PROFILE_TAG 0x0C -/* 2 bytes, network order */ - -#define PDCP_LTE_CHANNEL_ID_TAG 0x0D -/* 2 bytes, network order */ - -#define PDCP_LTE_UEID_TAG 0x0E -/* 2 bytes, network order */ - -/* PDCP PDU. Following this tag comes the actual PDCP PDU (there is no length, the PDU - continues until the end of the frame) */ -#define PDCP_LTE_PAYLOAD_TAG 0x01 - - - -/* Called by RRC, or other configuration protocols */ - -/* Function to configure ciphering & integrity algorithms */ -void set_pdcp_lte_security_algorithms(guint16 ueid, pdcp_lte_security_info_t *security_info); - -/* Function to indicate securityModeCommand did not complete */ -void set_pdcp_lte_security_algorithms_failed(guint16 ueid); - - -/* Called by external dissectors */ -void set_pdcp_lte_rrc_ciphering_key(guint16 ueid, const char *key); -void set_pdcp_lte_rrc_integrity_key(guint16 ueid, const char *key); -void set_pdcp_lte_up_ciphering_key(guint16 ueid, const char *key); - -/* - * Editor modelines - https://www.wireshark.org/tools/modelines.html - * - * Local variables: - * c-basic-offset: 4 - * tab-width: 8 - * indent-tabs-mode: nil - * End: - * - * vi: set shiftwidth=4 tabstop=8 expandtab: - * :indentSize=4:tabSize=8:noTabs=true: - */ diff --git a/openair2/UTIL/OPT/packet-pdcp-nr.h b/openair2/UTIL/OPT/packet-pdcp-nr.h deleted file mode 100644 index 79f784c1c3..0000000000 --- a/openair2/UTIL/OPT/packet-pdcp-nr.h +++ /dev/null @@ -1,168 +0,0 @@ -/* packet-pdcp-nr.h - * - * Martin Mathieson - * Wireshark - Network traffic analyzer - * By Gerald Combs - * Copyright 1998 Gerald Combs - * - * SPDX-License-Identifier: GPL-2.0-or-later - */ - - -/* Direction */ -#define PDCP_NR_DIRECTION_UPLINK 0 -#define PDCP_NR_DIRECTION_DOWNLINK 1 - -enum pdcp_nr_plane -{ - NR_SIGNALING_PLANE = 1, - NR_USER_PLANE = 2 -}; - -typedef enum NRBearerType -{ - Bearer_DCCH=1, - Bearer_BCCH_BCH=2, - Bearer_BCCH_DL_SCH=3, - Bearer_CCCH=4, - Bearer_PCCH=5, -} NRBearerType; - - -#define PDCP_NR_SN_LENGTH_12_BITS 12 -#define PDCP_NR_SN_LENGTH_18_BITS 18 - -#define PDCP_NR_UL_SDAP_HEADER_PRESENT 0x01 -#define PDCP_NR_DL_SDAP_HEADER_PRESENT 0x02 - -enum nr_security_integrity_algorithm_e { nia0, nia1, nia2, nia3 }; -enum nr_security_ciphering_algorithm_e { nea0, nea1, nea2, nea3, nea_disabled=999}; - -typedef struct pdcp_nr_security_info_t -{ - guint32 configuration_frame; - gboolean seen_next_ul_pdu; /* i.e. have we seen SecurityModeResponse */ - enum nr_security_integrity_algorithm_e integrity; - enum nr_security_ciphering_algorithm_e ciphering; - - /* Store previous settings so can revert if get SecurityModeFailure */ - guint32 previous_configuration_frame; - enum nr_security_integrity_algorithm_e previous_integrity; - enum nr_security_ciphering_algorithm_e previous_ciphering; -} pdcp_nr_security_info_t; - - -/*****************************************************************/ -/* UDP framing format */ -/* ----------------------- */ -/* Several people have asked about dissecting PDCP by framing */ -/* PDUs over IP. A suggested format over UDP has been defined */ -/* and implemented by this dissector, using the definitions */ -/* below. */ -/* */ -/* A heuristic dissector (enabled by a preference) will */ -/* recognise a signature at the beginning of these frames. */ -/* Until someone is using this format, suggestions for changes */ -/* are welcome. */ -/*****************************************************************/ - - -/* Signature. Rather than try to define a port for this, or make the - port number a preference, frames will start with this string (with no - terminating NULL */ -#define PDCP_NR_START_STRING "pdcp-nr" - -/* Fixed fields: - - plane (1 byte) */ - -/* Conditional field. This field is mandatory in case of User Plane PDCP PDU. - The format is to have the tag, followed by the value (there is no length field, - it's implicit from the tag). The allowed values are defined above. */ - -#define PDCP_NR_SEQNUM_LENGTH_TAG 0x02 -/* 1 byte */ - -/* Optional fields. Attaching this info should be added if available. - The format is to have the tag, followed by the value (there is no length field, - it's implicit from the tag) */ - -#define PDCP_NR_DIRECTION_TAG 0x03 -/* 1 byte */ - -#define PDCP_NR_BEARER_TYPE_TAG 0x04 -/* 1 byte */ - -#define PDCP_NR_BEARER_ID_TAG 0x05 -/* 1 byte */ - -#define PDCP_NR_UEID_TAG 0x06 -/* 2 bytes, network order */ - -#define PDCP_NR_ROHC_COMPRESSION_TAG 0x07 -/* 0 byte */ - -/* N.B. The following ROHC values only have significance if rohc_compression - is in use for the current channel */ - -#define PDCP_NR_ROHC_IP_VERSION_TAG 0x08 -/* 1 byte */ - -#define PDCP_NR_ROHC_CID_INC_INFO_TAG 0x09 -/* 0 byte */ - -#define PDCP_NR_ROHC_LARGE_CID_PRES_TAG 0x0A -/* 0 byte */ - -#define PDCP_NR_ROHC_MODE_TAG 0x0B -/* 1 byte */ - -#define PDCP_NR_ROHC_RND_TAG 0x0C -/* 0 byte */ - -#define PDCP_NR_ROHC_UDP_CHECKSUM_PRES_TAG 0x0D -/* 0 byte */ - -#define PDCP_NR_ROHC_PROFILE_TAG 0x0E -/* 2 bytes, network order */ - -#define PDCP_NR_MACI_PRES_TAG 0x0F -/* 0 byte */ - -#define PDCP_NR_SDAP_HEADER_TAG 0x10 -/* 1 byte, bitmask with PDCP_NR_UL_SDAP_HEADER_PRESENT and/or PDCP_NR_DL_SDAP_HEADER_PRESENT */ - -#define PDCP_NR_CIPHER_DISABLED_TAG 0x11 -/* 0 byte */ - -/* PDCP PDU. Following this tag comes the actual PDCP PDU (there is no length, the PDU - continues until the end of the frame) */ -#define PDCP_NR_PAYLOAD_TAG 0x01 - - -/* Called by RRC, or other configuration protocols */ - -/* Function to configure ciphering & integrity algorithms */ -void set_pdcp_nr_security_algorithms(guint16 ueid, pdcp_nr_security_info_t *security_info); - -/* Function to indicate securityModeCommand did not complete */ -void set_pdcp_nr_security_algorithms_failed(guint16 ueid); - - -/* Called by external dissectors */ -void set_pdcp_nr_rrc_ciphering_key(guint16 ueid, const char *key); -void set_pdcp_nr_rrc_integrity_key(guint16 ueid, const char *key); -void set_pdcp_nr_up_ciphering_key(guint16 ueid, const char *key); -void set_pdcp_nr_up_integrity_key(guint16 ueid, const char *key); - -/* - * Editor modelines - https://www.wireshark.org/tools/modelines.html - * - * Local variables: - * c-basic-offset: 4 - * tab-width: 8 - * indent-tabs-mode: nil - * End: - * - * vi: set shiftwidth=4 tabstop=8 expandtab: - * :indentSize=4:tabSize=8:noTabs=true: - */ diff --git a/openair2/UTIL/OPT/packet-rlc-lte.h b/openair2/UTIL/OPT/packet-rlc-lte.h deleted file mode 100644 index e5b03d5f8e..0000000000 --- a/openair2/UTIL/OPT/packet-rlc-lte.h +++ /dev/null @@ -1,151 +0,0 @@ -/* packet-rlc-lte.h - * - * Martin Mathieson - * Wireshark - Network traffic analyzer - * By Gerald Combs - * Copyright 1998 Gerald Combs - * - * SPDX-License-Identifier: GPL-2.0-or-later - */ - -#ifndef PACKET_RLC_LTE_H -#define PACKET_RLC_LTE_H - -/* rlcMode */ -#define RLC_TM_MODE 1 -#define RLC_UM_MODE 2 -#define RLC_AM_MODE 4 -#define RLC_PREDEF 8 - -/* direction */ -#define DIRECTION_UPLINK 0 -#define DIRECTION_DOWNLINK 1 - -/* priority ? */ - -/* channelType */ -#define CHANNEL_TYPE_CCCH 1 -#define CHANNEL_TYPE_BCCH_BCH 2 -#define CHANNEL_TYPE_PCCH 3 -#define CHANNEL_TYPE_SRB 4 -#define CHANNEL_TYPE_DRB 5 -#define CHANNEL_TYPE_BCCH_DL_SCH 6 -#define CHANNEL_TYPE_MCCH 7 -#define CHANNEL_TYPE_MTCH 8 - -/* sequenceNumberLength */ -#define UM_SN_LENGTH_5_BITS 5 -#define UM_SN_LENGTH_10_BITS 10 -#define AM_SN_LENGTH_10_BITS 10 -#define AM_SN_LENGTH_16_BITS 16 - - -typedef enum rlc_lte_nb_mode { - rlc_no_nb_mode = 0, - rlc_nb_mode = 1 -} rlc_lte_nb_mode; - - -/* Info attached to each LTE RLC frame */ -typedef struct rlc_lte_info -{ - guint8 rlcMode; - guint8 direction; - guint8 priority; - guint8 sequenceNumberLength; - guint16 ueid; - guint16 channelType; - guint16 channelId; /* for SRB: 1=SRB1, 2=SRB2, 3=SRB1bis; for DRB: DRB ID */ - guint16 pduLength; - gboolean extendedLiField; - rlc_lte_nb_mode nbMode; -} rlc_lte_info; - - -typedef struct rlc_lte_tap_info { - /* Info from context */ - guint8 rlcMode; - guint8 direction; - guint8 priority; - guint16 ueid; - guint16 channelType; - guint16 channelId; - guint16 pduLength; - guint8 sequenceNumberLength; - - nstime_t rlc_lte_time; - guint8 loggedInMACFrame; - guint16 sequenceNumber; - guint8 isResegmented; - guint8 isControlPDU; - guint16 ACKNo; - #define MAX_NACKs 128 - guint16 noOfNACKs; - guint16 NACKs[MAX_NACKs]; - - guint16 missingSNs; -} rlc_lte_tap_info; - - -/* Signature. Rather than try to define a port for this, or make the - port number a preference, frames will start with this string (with no - terminating NULL */ -#define RLC_LTE_START_STRING "rlc-lte" - -/* Fixed field. This is followed by the following 1 mandatory field: - - rlcMode (1 byte) - (where the allowed values are defined above */ - -/* Conditional field. This field is mandatory in case of RLC Unacknowledged mode. - In case of RLC Acknowledged mode, the field is optional (assume 10 bits by default). - The format is to have the tag, followed by the value (there is no length field, - it's implicit from the tag). The allowed values are defined above. */ - -#define RLC_LTE_SN_LENGTH_TAG 0x02 -/* 1 byte */ - -/* Optional fields. Attaching this info to frames will allow you - to show you display/filter/plot/add-custom-columns on these fields, so should - be added if available. - The format is to have the tag, followed by the value (there is no length field, - it's implicit from the tag) */ - -#define RLC_LTE_DIRECTION_TAG 0x03 -/* 1 byte */ - -#define RLC_LTE_PRIORITY_TAG 0x04 -/* 1 byte */ - -#define RLC_LTE_UEID_TAG 0x05 -/* 2 bytes, network order */ - -#define RLC_LTE_CHANNEL_TYPE_TAG 0x06 -/* 2 bytes, network order */ - -#define RLC_LTE_CHANNEL_ID_TAG 0x07 -/* 2 bytes, network order */ - -#define RLC_LTE_EXT_LI_FIELD_TAG 0x08 -/* 0 byte, tag presence indicates that AM DRB PDU is using an extended LI field of 15 bits */ - -#define RLC_LTE_NB_MODE_TAG 0x09 -/* 1 byte containing rlc_lte_nb_mode enum value */ - -/* RLC PDU. Following this tag comes the actual RLC PDU (there is no length, the PDU - continues until the end of the frame) */ -#define RLC_LTE_PAYLOAD_TAG 0x01 - -#endif - -/* - * Editor modelines - https://www.wireshark.org/tools/modelines.html - * - * Local variables: - * c-basic-offset: 4 - * tab-width: 8 - * indent-tabs-mode: nil - * End: - * - * vi: set shiftwidth=4 tabstop=8 expandtab: - * :indentSize=4:tabSize=8:noTabs=true: - */ diff --git a/openair2/UTIL/OPT/packet-rlc-nr.h b/openair2/UTIL/OPT/packet-rlc-nr.h deleted file mode 100644 index 290eba1898..0000000000 --- a/openair2/UTIL/OPT/packet-rlc-nr.h +++ /dev/null @@ -1,136 +0,0 @@ -/* packet-rlc-nr.h - * - * Pascal Quantin - * Wireshark - Network traffic analyzer - * By Gerald Combs - * Copyright 1998 Gerald Combs - * - * SPDX-License-Identifier: GPL-2.0-or-later - */ - -#ifndef PACKET_RLC_NR_H -#define PACKET_RLC_NR_H - -/* rlcMode */ -#define RLC_TM_MODE 1 -#define RLC_UM_MODE 2 -#define RLC_AM_MODE 4 - -/* direction */ -#define DIRECTION_UPLINK 0 -#define DIRECTION_DOWNLINK 1 - -/* bearerType */ -#define BEARER_TYPE_CCCH 1 -#define BEARER_TYPE_BCCH_BCH 2 -#define BEARER_TYPE_PCCH 3 -#define BEARER_TYPE_SRB 4 -#define BEARER_TYPE_DRB 5 -#define BEARER_TYPE_BCCH_DL_SCH 6 - -/* sequenceNumberLength */ -#define TM_SN_LENGTH_0_BITS 0 -#define UM_SN_LENGTH_6_BITS 6 -#define UM_SN_LENGTH_12_BITS 12 -#define AM_SN_LENGTH_12_BITS 12 -#define AM_SN_LENGTH_18_BITS 18 - -/* Info attached to each NR RLC frame */ -typedef struct rlc_nr_info -{ - guint8 rlcMode; - guint8 direction; - guint8 sequenceNumberLength; - guint8 bearerType; - guint8 bearerId; - guint16 ueid; - guint16 pduLength; -} rlc_nr_info; - -typedef struct nr_drb_rlc_pdcp_mapping_t -{ - gboolean active; - guint16 ueid; /* Mandatory */ - guint8 drbid; /* Mandatory */ - - gboolean pdcpUlSnLength_present; - guint8 pdcpUlSnLength; /* Part of PDCP config - optional */ - gboolean pdcpDlSnLength_present; - guint8 pdcpDlSnLength; /* Part of PDCP config - optional */ - gboolean pdcpUlSdap; - gboolean pdcpDlSdap; - gboolean pdcpIntegrityProtection; - gboolean pdcpCipheringDisabled; - -} nr_drb_rlc_pdcp_mapping_t; - -/* TODO: could probably merge this struct with above */ -typedef struct pdcp_ue_parameters { - guint32 id; - guint8 pdcp_sn_bits_ul; - guint8 pdcp_sn_bits_dl; - gboolean pdcp_sdap_ul; - gboolean pdcp_sdap_dl; - gboolean pdcp_integrity; - gboolean pdcp_ciphering_disabled; -} pdcp_bearer_parameters; - -/*****************************************************************/ -/* UDP framing format */ -/* ----------------------- */ -/* Several people have asked about dissecting RLC by framing */ -/* PDUs over IP. A suggested format over UDP has been defined */ -/* and implemented by this dissector, using the definitions */ -/* below. */ -/* */ -/* A heuristic dissector (enabled by a preference) will */ -/* recognise a signature at the beginning of these frames. */ -/*****************************************************************/ - - -/* Signature. Rather than try to define a port for this, or make the - port number a preference, frames will start with this string (with no - terminating NULL */ -#define RLC_NR_START_STRING "rlc-nr" - -/* Fixed field. This is followed by the following 2 mandatory field: - - rlcMode (1 byte) - - sequenceNumberLength (1 byte) - (where the allowed values are defined above) */ - -/* Optional fields. Attaching this info to frames will allow you - to show you display/filter/plot/add-custom-columns on these fields, so should - be added if available. - The format is to have the tag, followed by the value (there is no length field, - it's implicit from the tag) */ - -#define RLC_NR_DIRECTION_TAG 0x02 -/* 1 byte */ - -#define RLC_NR_UEID_TAG 0x03 -/* 2 bytes, network order */ - -#define RLC_NR_BEARER_TYPE_TAG 0x04 -/* 1 byte */ - -#define RLC_NR_BEARER_ID_TAG 0x05 -/* 1 byte */ - -/* RLC PDU. Following this tag comes the actual RLC PDU (there is no length, the PDU - continues until the end of the frame) */ -#define RLC_NR_PAYLOAD_TAG 0x01 - -#endif - -/* - * Editor modelines - https://www.wireshark.org/tools/modelines.html - * - * Local variables: - * c-basic-offset: 4 - * tab-width: 8 - * indent-tabs-mode: nil - * End: - * - * vi: set shiftwidth=4 tabstop=8 expandtab: - * :indentSize=4:tabSize=8:noTabs=true: - */ diff --git a/openair2/UTIL/OPT/wireshark_headers.h b/openair2/UTIL/OPT/wireshark_headers.h new file mode 100644 index 0000000000..27d8753ffe --- /dev/null +++ b/openair2/UTIL/OPT/wireshark_headers.h @@ -0,0 +1,895 @@ +/* packet-mac-lte.h + * + * Martin Mathieson + * + * Wireshark - Network traffic analyzer + * By Gerald Combs + * Copyright 1998 Gerald Combs + * + * Copyright (C) 2009 Martin Mathieson. All rights reserved. + * + * SPDX-License-Identifier: BSD-2-Clause + */ + + /* + this is wireshark, commit: commit eda834b6e29c36e05a63a6056afa98390ff79357 + Date: Wed Aug 22 14:36:20 2018 +0200 + modified to be used in OpenAir to create the LTE MAC/RLC encapsulated in UDP as per Wireshark feature + */ + +#ifndef __UTIL_OPT_PACKET_MAC_LTE__H__ +#define __UTIL_OPT_PACKET_MAC_LTE__H__ + +/** data structure to hold time values with nanosecond resolution*/ +typedef struct { + time_t secs; + int nsecs; +} nstime_t; + + +/* radioType */ +#define FDD_RADIO 1 +#define TDD_RADIO 2 + +/* Direction */ +#define DIRECTION_UPLINK 0 +#define DIRECTION_DOWNLINK 1 + +/* rntiType */ +#define WS_NO_RNTI 0 +#define WS_P_RNTI 1 +#define WS_RA_RNTI 2 +#define WS_C_RNTI 3 +#define WS_SI_RNTI 4 +#define WS_SPS_RNTI 5 +#define WS_M_RNTI 6 +#define WS_SL_BCH_RNTI 7 +#define WS_SL_RNTI 8 +#define WS_SC_RNTI 9 +#define WS_G_RNTI 10 + +#define WS_CS_RNTI 5 + +typedef enum mac_lte_oob_event { + ltemac_send_preamble, + ltemac_send_sr, + ltemac_sr_failure +} mac_lte_oob_event; + +typedef enum mac_lte_dl_retx { + dl_retx_no, + dl_retx_yes, + dl_retx_unknown +} mac_lte_dl_retx; + +typedef enum mac_lte_crc_status { + crc_fail = 0, + crc_success = 1, + crc_high_code_rate = 2, + crc_pdsch_lost = 3, + crc_duplicate_nonzero_rv = 4, + crc_false_dci = 5 +} mac_lte_crc_status; + +/* N.B. for SCellIndex-r13 extends to 31 */ +typedef enum mac_lte_carrier_id { + carrier_id_primary, + carrier_id_secondary_1, + carrier_id_secondary_2, + carrier_id_secondary_3, + carrier_id_secondary_4, + carrier_id_secondary_5, + carrier_id_secondary_6, + carrier_id_secondary_7 +} mac_lte_carrier_id; + +typedef enum mac_lte_ce_mode { + no_ce_mode = 0, + ce_mode_a = 1, + ce_mode_b = 2 +} mac_lte_ce_mode; + +typedef enum mac_lte_nb_mode { + no_nb_mode = 0, + nb_mode = 1 +} mac_lte_nb_mode; + +/* Context info attached to each LTE MAC frame */ +typedef struct mac_lte_info +{ + /* Needed for decode */ + guint8 radioType; + guint8 direction; + guint8 rntiType; + + /* Extra info to display */ + guint16 rnti; + guint16 ueid; + + /* Timing info */ + guint16 sysframeNumber; + guint16 subframeNumber; + gboolean sfnSfInfoPresent; + + /* Optional field. More interesting for TDD (FDD is always -4 subframeNumber) */ + gboolean subframeNumberOfGrantPresent; + guint16 subframeNumberOfGrant; + + /* Flag set only if doing PHY-level data test - i.e. there may not be a + well-formed MAC PDU so just show as raw data */ + gboolean isPredefinedData; + + /* Length of DL PDU or UL grant size in bytes */ + guint16 length; + + /* 0=newTx, 1=first-retx, etc */ + guint8 reTxCount; + guint8 isPHICHNACK; /* FALSE=PDCCH retx grant, TRUE=PHICH NACK */ + + /* UL only. Indicates if the R10 extendedBSR-Sizes parameter is set */ + gboolean isExtendedBSRSizes; + + /* UL only. Indicates if the R10 simultaneousPUCCH-PUSCH parameter is set for PCell */ + gboolean isSimultPUCCHPUSCHPCell; + + /* UL only. Indicates if the R10 extendedBSR-Sizes parameter is set for PSCell */ + gboolean isSimultPUCCHPUSCHPSCell; + + /* Status of CRC check. For UE it is DL only. For eNodeB it is UL + only. For an analyzer, it is present for both DL and UL. */ + gboolean crcStatusValid; + mac_lte_crc_status crcStatus; + + /* Carrier ID */ + mac_lte_carrier_id carrierId; + + /* DL only. Is this known to be a retransmission? */ + mac_lte_dl_retx dl_retx; + + /* DL only. CE mode to be used for RAR decoding */ + mac_lte_ce_mode ceMode; + + /* DL and UL. NB-IoT mode of the UE */ + mac_lte_nb_mode nbMode; + + /* UL only, for now used for CE mode A RAR decoding */ + guint8 nUlRb; + + /* More Physical layer info (see direction above for which side of union to use) */ + union { + struct mac_lte_ul_phy_info + { + guint8 present; /* Remaining UL fields are present and should be displayed */ + guint8 modulation_type; + guint8 tbs_index; + guint8 resource_block_length; + guint8 resource_block_start; + guint8 harq_id; + gboolean ndi; + } ul_info; + struct mac_lte_dl_phy_info + { + guint8 present; /* Remaining DL fields are present and should be displayed */ + guint8 dci_format; + guint8 resource_allocation_type; + guint8 aggregation_level; + guint8 mcs_index; + guint8 redundancy_version_index; + guint8 resource_block_length; + guint8 harq_id; + gboolean ndi; + guint8 transport_block; /* 0..1 */ + } dl_info; + } detailed_phy_info; + + /* Relating to out-of-band events */ + /* N.B. dissector will only look to these fields if length is 0... */ + mac_lte_oob_event oob_event; + guint8 rapid; + guint8 rach_attempt_number; + #define MAX_SRs 20 + guint16 number_of_srs; + guint16 oob_ueid[MAX_SRs]; + guint16 oob_rnti[MAX_SRs]; +} mac_lte_info; + + /* 0 to 10 and 32 to 38 */ +#define MAC_LTE_DATA_LCID_COUNT_MAX 18 +#define MAC_LTE_START_STRING "mac-lte" + +/* Fixed fields. This is followed by the following 3 mandatory fields: + - radioType (1 byte) + - direction (1 byte) + - rntiType (1 byte) + (where the allowed values are defined above */ + +/* Optional fields. Attaching this info to frames will allow you + to show you display/filter/plot/add-custom-columns on these fields, so should + be added if available. + The format is to have the tag, followed by the value (there is no length field, + it's implicit from the tag) */ + +#define MAC_LTE_RNTI_TAG 0x02 +/* 2 bytes, network order */ + +#define MAC_LTE_UEID_TAG 0x03 +/* 2 bytes, network order */ + +#define MAC_LTE_FRAME_SUBFRAME_TAG 0x04 +/* 2 bytes, network order, SFN is stored in 12 MSB and SF in 4 LSB */ + +#define MAC_LTE_PREDEFINED_DATA_TAG 0x05 +/* 1 byte */ + +#define MAC_LTE_RETX_TAG 0x06 +/* 1 byte */ + +#define MAC_LTE_CRC_STATUS_TAG 0x07 +/* 1 byte */ + +#define MAC_LTE_EXT_BSR_SIZES_TAG 0x08 +/* 0 byte */ + +#define MAC_LTE_SEND_PREAMBLE_TAG 0x09 +/* 2 bytes, RAPID value (1 byte) followed by RACH attempt number (1 byte) */ + +#define MAC_LTE_CARRIER_ID_TAG 0x0A +/* 1 byte */ + +#define MAC_LTE_PHY_TAG 0x0B +/* variable length, length (1 byte) then depending on direction + in UL: modulation type (1 byte), TBS index (1 byte), RB length (1 byte), + RB start (1 byte), HARQ id (1 byte), NDI (1 byte) + in DL: DCI format (1 byte), resource allocation type (1 byte), aggregation level (1 byte), + MCS index (1 byte), redundancy version (1 byte), resource block length (1 byte), + HARQ id (1 byte), NDI (1 byte), TB (1 byte), DL reTx (1 byte) */ + +#define MAC_LTE_SIMULT_PUCCH_PUSCH_PCELL_TAG 0x0C +/* 0 byte */ + +#define MAC_LTE_SIMULT_PUCCH_PUSCH_PSCELL_TAG 0x0D +/* 0 byte */ + +#define MAC_LTE_CE_MODE_TAG 0x0E +/* 1 byte containing mac_lte_ce_mode enum value */ + +#define MAC_LTE_NB_MODE_TAG 0x0F +/* 1 byte containing mac_lte_nb_mode enum value */ + +#define MAC_LTE_N_UL_RB_TAG 0x10 +/* 1 byte containing the number of UL resource blocks: 6, 15, 25, 50, 75 or 100 */ + +#define MAC_LTE_SR_TAG 0x11 +/* 2 bytes for the number of items, followed by that number of ueid, rnti (2 bytes each) */ + + +/* MAC PDU. Following this tag comes the actual MAC PDU (there is no length, the PDU + continues until the end of the frame) */ +#define MAC_LTE_PAYLOAD_TAG 0x01 + +/* rlcMode */ +#define RLC_TM_MODE 1 +#define RLC_UM_MODE 2 +#define RLC_AM_MODE 4 +#define RLC_PREDEF 8 + +/* priority ? */ + +/* channelType */ +#define CHANNEL_TYPE_CCCH 1 +#define CHANNEL_TYPE_BCCH_BCH 2 +#define CHANNEL_TYPE_PCCH 3 +#define CHANNEL_TYPE_SRB 4 +#define CHANNEL_TYPE_DRB 5 +#define CHANNEL_TYPE_BCCH_DL_SCH 6 +#define CHANNEL_TYPE_MCCH 7 +#define CHANNEL_TYPE_MTCH 8 + +/* sequenceNumberLength */ +#define UM_SN_LENGTH_5_BITS 5 +#define UM_SN_LENGTH_10_BITS 10 +#define AM_SN_LENGTH_10_BITS 10 +#define AM_SN_LENGTH_16_BITS 16 + + +typedef enum rlc_lte_nb_mode { + rlc_no_nb_mode = 0, + rlc_nb_mode = 1 +} rlc_lte_nb_mode; + + +/* Info attached to each LTE RLC frame */ +typedef struct rlc_lte_info +{ + guint8 rlcMode; + guint8 direction; + guint8 priority; + guint8 sequenceNumberLength; + guint16 ueid; + guint16 channelType; + guint16 channelId; /* for SRB: 1=SRB1, 2=SRB2, 3=SRB1bis; for DRB: DRB ID */ + guint16 pduLength; + gboolean extendedLiField; + rlc_lte_nb_mode nbMode; +} rlc_lte_info; + + +typedef struct rlc_lte_tap_info { + /* Info from context */ + guint8 rlcMode; + guint8 direction; + guint8 priority; + guint16 ueid; + guint16 channelType; + guint16 channelId; + guint16 pduLength; + guint8 sequenceNumberLength; + + nstime_t rlc_lte_time; + guint8 loggedInMACFrame; + guint16 sequenceNumber; + guint8 isResegmented; + guint8 isControlPDU; + guint16 ACKNo; + #define MAX_NACKs 128 + guint16 noOfNACKs; + guint16 NACKs[MAX_NACKs]; + + guint16 missingSNs; +} rlc_lte_tap_info; + + +/* Signature. Rather than try to define a port for this, or make the + port number a preference, frames will start with this string (with no + terminating NULL */ +#define RLC_LTE_START_STRING "rlc-lte" + +/* Fixed field. This is followed by the following 1 mandatory field: + - rlcMode (1 byte) + (where the allowed values are defined above */ + +/* Conditional field. This field is mandatory in case of RLC Unacknowledged mode. + In case of RLC Acknowledged mode, the field is optional (assume 10 bits by default). + The format is to have the tag, followed by the value (there is no length field, + it's implicit from the tag). The allowed values are defined above. */ + +#define RLC_LTE_SN_LENGTH_TAG 0x02 +/* 1 byte */ + +/* Optional fields. Attaching this info to frames will allow you + to show you display/filter/plot/add-custom-columns on these fields, so should + be added if available. + The format is to have the tag, followed by the value (there is no length field, + it's implicit from the tag) */ + +#define RLC_LTE_DIRECTION_TAG 0x03 +/* 1 byte */ + +#define RLC_LTE_PRIORITY_TAG 0x04 +/* 1 byte */ + +#define RLC_LTE_UEID_TAG 0x05 +/* 2 bytes, network order */ + +#define RLC_LTE_CHANNEL_TYPE_TAG 0x06 +/* 2 bytes, network order */ + +#define RLC_LTE_CHANNEL_ID_TAG 0x07 +/* 2 bytes, network order */ + +#define RLC_LTE_EXT_LI_FIELD_TAG 0x08 +/* 0 byte, tag presence indicates that AM DRB PDU is using an extended LI field of 15 bits */ + +#define RLC_LTE_NB_MODE_TAG 0x09 +/* 1 byte containing rlc_lte_nb_mode enum value */ + +/* RLC PDU. Following this tag comes the actual RLC PDU (there is no length, the PDU + continues until the end of the frame) */ +#define RLC_LTE_PAYLOAD_TAG 0x01 + +enum pdcp_plane +{ + SIGNALING_PLANE = 1, + USER_PLANE = 2 +}; + +typedef enum LogicalChannelType +{ + Channel_DCCH=1, + Channel_BCCH=2, + Channel_CCCH=3, + Channel_PCCH=4, + Channel_DCCH_NB=5, + Channel_BCCH_NB=6, + Channel_CCCH_NB=7, + Channel_PCCH_NB=8 +} LogicalChannelType; + +typedef enum +{ + BCH_TRANSPORT=1, + DLSCH_TRANSPORT=2 +} BCCHTransportType; + +#define PDCP_SN_LENGTH_5_BITS 5 +#define PDCP_SN_LENGTH_7_BITS 7 +#define PDCP_SN_LENGTH_12_BITS 12 +#define PDCP_SN_LENGTH_15_BITS 15 +#define PDCP_SN_LENGTH_18_BITS 18 + +enum lte_security_integrity_algorithm_e { eia0, eia1, eia2, eia3 }; +enum lte_security_ciphering_algorithm_e { eea0, eea1, eea2, eea3 }; + +typedef struct pdcp_lte_security_info_t +{ + guint32 configuration_frame; + gboolean seen_next_ul_pdu; /* i.e. have we seen SecurityModeResponse */ + enum lte_security_integrity_algorithm_e integrity; + enum lte_security_ciphering_algorithm_e ciphering; + + /* Store previous settings so can revert if get SecurityModeFailure */ + guint32 previous_configuration_frame; + enum lte_security_integrity_algorithm_e previous_integrity; + enum lte_security_ciphering_algorithm_e previous_ciphering; +} pdcp_lte_security_info_t; + + +/***********************************************************************/ +/* UDP framing format */ +/* ----------------------- */ +/* Several people have asked about dissecting PDCP by framing */ +/* PDUs over IP. A suggested format over UDP has been defined */ +/* and implemented by this dissector, using the definitions */ +/* below. A link to an example program showing you how to encode */ +/* these headers and send LTE PDCP PDUs on a UDP socket is */ +/* provided at https://gitlab.com/wireshark/wireshark/-/wikis/PDCP-LTE */ +/* */ +/* A heuristic dissecter (enabled by a preference) will */ +/* recognise a signature at the beginning of these frames. */ +/* Until someone is using this format, suggestions for changes */ +/* are welcome. */ +/***********************************************************************/ + + +/* Signature. Rather than try to define a port for this, or make the + port number a preference, frames will start with this string (with no + terminating NULL */ +#define PDCP_LTE_START_STRING "pdcp-lte" + +/* Fixed fields. This is followed by the following 3 mandatory fields: + - no_header_pdu (1 byte) + - plane (1 byte) + - rohc_compression ( byte) + (where the allowed values are defined above) */ + +/* Conditional field. This field is mandatory in case of User Plane PDCP PDU. + The format is to have the tag, followed by the value (there is no length field, + it's implicit from the tag). The allowed values are defined above. */ + +#define PDCP_LTE_SEQNUM_LENGTH_TAG 0x02 +/* 1 byte */ + +/* Optional fields. Attaching this info to frames will allow you + to show you display/filter/plot/add-custom-columns on these fields, so should + be added if available. + The format is to have the tag, followed by the value (there is no length field, + it's implicit from the tag) */ + +#define PDCP_LTE_DIRECTION_TAG 0x03 +/* 1 byte */ + +#define PDCP_LTE_LOG_CHAN_TYPE_TAG 0x04 +/* 1 byte */ + +#define PDCP_LTE_BCCH_TRANSPORT_TYPE_TAG 0x05 +/* 1 byte */ + +#define PDCP_LTE_ROHC_IP_VERSION_TAG 0x06 +/* 2 bytes, network order */ + +#define PDCP_LTE_ROHC_CID_INC_INFO_TAG 0x07 +/* 1 byte */ + +#define PDCP_LTE_ROHC_LARGE_CID_PRES_TAG 0x08 +/* 1 byte */ + +#define PDCP_LTE_ROHC_MODE_TAG 0x09 +/* 1 byte */ + +#define PDCP_LTE_ROHC_RND_TAG 0x0A +/* 1 byte */ + +#define PDCP_LTE_ROHC_UDP_CHECKSUM_PRES_TAG 0x0B +/* 1 byte */ + +#define PDCP_LTE_ROHC_PROFILE_TAG 0x0C +/* 2 bytes, network order */ + +#define PDCP_LTE_CHANNEL_ID_TAG 0x0D +/* 2 bytes, network order */ + +#define PDCP_LTE_UEID_TAG 0x0E +/* 2 bytes, network order */ + +/* PDCP PDU. Following this tag comes the actual PDCP PDU (there is no length, the PDU + continues until the end of the frame) */ +#define PDCP_LTE_PAYLOAD_TAG 0x01 + + + +/* Called by RRC, or other configuration protocols */ + +/* Function to configure ciphering & integrity algorithms */ +void set_pdcp_lte_security_algorithms(guint16 ueid, pdcp_lte_security_info_t *security_info); + +/* Function to indicate securityModeCommand did not complete */ +void set_pdcp_lte_security_algorithms_failed(guint16 ueid); + + +/* Called by external dissectors */ +void set_pdcp_lte_rrc_ciphering_key(guint16 ueid, const char *key); +void set_pdcp_lte_rrc_integrity_key(guint16 ueid, const char *key); +void set_pdcp_lte_up_ciphering_key(guint16 ueid, const char *key); + + + +/* Context info attached to each NR MAC frame */ +typedef struct mac_nr_info +{ + /* Needed for decode */ + guint8 radioType; + guint8 direction; + guint8 rntiType; + + /* Extra info to display */ + guint16 rnti; + guint16 ueid; + guint8 harqid; + + /* Will these be included in the ME PHR report? */ + guint8 phr_type2_othercell; + + /* Timing info */ + gboolean sfnSlotInfoPresent; + guint16 sysframeNumber; + guint16 slotNumber; + + /* Length of DL PDU or UL grant size in bytes */ + guint16 length; + +} mac_nr_info; + + +/*****************************************************************/ +/* UDP framing format */ +/* ----------------------- */ +/* Several people have asked about dissecting MAC by framing */ +/* PDUs over IP. A suggested format over UDP has been created */ +/* and implemented by this dissector, using the definitions */ +/* below. */ +/* */ +/* A heuristic dissector (enabled by a preference) will */ +/* recognise a signature at the beginning of these frames. */ +/*****************************************************************/ + + +/* Signature. Rather than try to define a port for this, or make the + port number a preference, frames will start with this string (with no + terminating NULL */ +#define MAC_NR_START_STRING "mac-nr" + +/* Fixed fields. This is followed by the following 3 mandatory fields: + - radioType (1 byte) + - direction (1 byte) + - rntiType (1 byte) + (where the allowed values are defined above */ + +/* Optional fields. Attaching this info to frames will allow you + to show you display/filter/plot/add-custom-columns on these fields, so should + be added if available. + The format is to have the tag, followed by the value (there is no length field, + it's implicit from the tag) */ + +#define MAC_NR_RNTI_TAG 0x02 +/* 2 bytes, network order */ + +#define MAC_NR_UEID_TAG 0x03 +/* 2 bytes, network order */ + +#define MAC_NR_FRAME_SUBFRAME_TAG 0x04 +/* 2 bytes, deprecated, do not use it */ + +#define MAC_NR_PHR_TYPE2_OTHERCELL_TAG 0x05 +/* 1 byte, TRUE/FALSE */ + +#define MAC_NR_HARQID 0x06 +/* 1 byte */ + +#define MAC_NR_FRAME_SLOT_TAG 0x07 +/* 4 bytes, network order, SFN is stored in the 2 first bytes and slot number in the 2 last bytes */ + +/* MAC PDU. Following this tag comes the actual MAC PDU (there is no length, the PDU + continues until the end of the frame) */ +#define MAC_NR_PAYLOAD_TAG 0x01 + + +/* Type to store parameters for configuring LCID->RLC channel settings for DRB */ +/* Some are optional, and may not be seen (e.g. on reestablishment) */ +typedef struct nr_drb_mac_rlc_mapping_t +{ + gboolean active; + guint16 ueid; /* Mandatory */ + guint8 drbid; /* Mandatory */ + + gboolean lcid_present; + guint8 lcid; /* Part of LogicalChannelConfig - optional */ + gboolean rlcMode_present; + guint8 rlcMode; /* Part of RLC config - optional */ + + guint8 tempDirection; /* So know direction of next SN length... */ + + gboolean rlcUlSnLength_present; + guint8 rlcUlSnLength; /* Part of RLC config - optional */ + gboolean rlcDlSnLength_present; + guint8 rlcDlSnLength; /* Part of RLC config - optional */ +} nr_drb_mac_rlc_mapping_t; + +/* rlcMode */ +#define RLC_TM_MODE 1 +#define RLC_UM_MODE 2 +#define RLC_AM_MODE 4 + +/* bearerType */ +#define BEARER_TYPE_CCCH 1 +#define BEARER_TYPE_BCCH_BCH 2 +#define BEARER_TYPE_PCCH 3 +#define BEARER_TYPE_SRB 4 +#define BEARER_TYPE_DRB 5 +#define BEARER_TYPE_BCCH_DL_SCH 6 + +/* sequenceNumberLength */ +#define TM_SN_LENGTH_0_BITS 0 +#define UM_SN_LENGTH_6_BITS 6 +#define UM_SN_LENGTH_12_BITS 12 +#define AM_SN_LENGTH_12_BITS 12 +#define AM_SN_LENGTH_18_BITS 18 + +/* Info attached to each NR RLC frame */ +typedef struct rlc_nr_info +{ + guint8 rlcMode; + guint8 direction; + guint8 sequenceNumberLength; + guint8 bearerType; + guint8 bearerId; + guint16 ueid; + guint16 pduLength; +} rlc_nr_info; + +typedef struct nr_drb_rlc_pdcp_mapping_t +{ + gboolean active; + guint16 ueid; /* Mandatory */ + guint8 drbid; /* Mandatory */ + + gboolean pdcpUlSnLength_present; + guint8 pdcpUlSnLength; /* Part of PDCP config - optional */ + gboolean pdcpDlSnLength_present; + guint8 pdcpDlSnLength; /* Part of PDCP config - optional */ + gboolean pdcpUlSdap; + gboolean pdcpDlSdap; + gboolean pdcpIntegrityProtection; + gboolean pdcpCipheringDisabled; + +} nr_drb_rlc_pdcp_mapping_t; + +/* TODO: could probably merge this struct with above */ +typedef struct pdcp_ue_parameters { + guint32 id; + guint8 pdcp_sn_bits_ul; + guint8 pdcp_sn_bits_dl; + gboolean pdcp_sdap_ul; + gboolean pdcp_sdap_dl; + gboolean pdcp_integrity; + gboolean pdcp_ciphering_disabled; +} pdcp_bearer_parameters; + +/*****************************************************************/ +/* UDP framing format */ +/* ----------------------- */ +/* Several people have asked about dissecting RLC by framing */ +/* PDUs over IP. A suggested format over UDP has been defined */ +/* and implemented by this dissector, using the definitions */ +/* below. */ +/* */ +/* A heuristic dissector (enabled by a preference) will */ +/* recognise a signature at the beginning of these frames. */ +/*****************************************************************/ + + +/* Signature. Rather than try to define a port for this, or make the + port number a preference, frames will start with this string (with no + terminating NULL */ +#define RLC_NR_START_STRING "rlc-nr" + +/* Fixed field. This is followed by the following 2 mandatory field: + - rlcMode (1 byte) + - sequenceNumberLength (1 byte) + (where the allowed values are defined above) */ + +/* Optional fields. Attaching this info to frames will allow you + to show you display/filter/plot/add-custom-columns on these fields, so should + be added if available. + The format is to have the tag, followed by the value (there is no length field, + it's implicit from the tag) */ + +#define RLC_NR_DIRECTION_TAG 0x02 +/* 1 byte */ + +#define RLC_NR_UEID_TAG 0x03 +/* 2 bytes, network order */ + +#define RLC_NR_BEARER_TYPE_TAG 0x04 +/* 1 byte */ + +#define RLC_NR_BEARER_ID_TAG 0x05 +/* 1 byte */ + +/* RLC PDU. Following this tag comes the actual RLC PDU (there is no length, the PDU + continues until the end of the frame) */ +#define RLC_NR_PAYLOAD_TAG 0x01 + +enum pdcp_nr_plane +{ + NR_SIGNALING_PLANE = 1, + NR_USER_PLANE = 2 +}; + +typedef enum NRBearerType +{ + Bearer_DCCH=1, + Bearer_BCCH_BCH=2, + Bearer_BCCH_DL_SCH=3, + Bearer_CCCH=4, + Bearer_PCCH=5, +} NRBearerType; + + +#define PDCP_NR_SN_LENGTH_12_BITS 12 +#define PDCP_NR_SN_LENGTH_18_BITS 18 + +#define PDCP_NR_UL_SDAP_HEADER_PRESENT 0x01 +#define PDCP_NR_DL_SDAP_HEADER_PRESENT 0x02 + +enum nr_security_integrity_algorithm_e { nia0, nia1, nia2, nia3 }; +enum nr_security_ciphering_algorithm_e { nea0, nea1, nea2, nea3, nea_disabled=999}; + +typedef struct pdcp_nr_security_info_t +{ + guint32 configuration_frame; + gboolean seen_next_ul_pdu; /* i.e. have we seen SecurityModeResponse */ + enum nr_security_integrity_algorithm_e integrity; + enum nr_security_ciphering_algorithm_e ciphering; + + /* Store previous settings so can revert if get SecurityModeFailure */ + guint32 previous_configuration_frame; + enum nr_security_integrity_algorithm_e previous_integrity; + enum nr_security_ciphering_algorithm_e previous_ciphering; +} pdcp_nr_security_info_t; + + +/*****************************************************************/ +/* UDP framing format */ +/* ----------------------- */ +/* Several people have asked about dissecting PDCP by framing */ +/* PDUs over IP. A suggested format over UDP has been defined */ +/* and implemented by this dissector, using the definitions */ +/* below. */ +/* */ +/* A heuristic dissector (enabled by a preference) will */ +/* recognise a signature at the beginning of these frames. */ +/* Until someone is using this format, suggestions for changes */ +/* are welcome. */ +/*****************************************************************/ + + +/* Signature. Rather than try to define a port for this, or make the + port number a preference, frames will start with this string (with no + terminating NULL */ +#define PDCP_NR_START_STRING "pdcp-nr" + +/* Fixed fields: + - plane (1 byte) */ + +/* Conditional field. This field is mandatory in case of User Plane PDCP PDU. + The format is to have the tag, followed by the value (there is no length field, + it's implicit from the tag). The allowed values are defined above. */ + +#define PDCP_NR_SEQNUM_LENGTH_TAG 0x02 +/* 1 byte */ + +/* Optional fields. Attaching this info should be added if available. + The format is to have the tag, followed by the value (there is no length field, + it's implicit from the tag) */ + +#define PDCP_NR_DIRECTION_TAG 0x03 +/* 1 byte */ + +#define PDCP_NR_BEARER_TYPE_TAG 0x04 +/* 1 byte */ + +#define PDCP_NR_BEARER_ID_TAG 0x05 +/* 1 byte */ + +#define PDCP_NR_UEID_TAG 0x06 +/* 2 bytes, network order */ + +#define PDCP_NR_ROHC_COMPRESSION_TAG 0x07 +/* 0 byte */ + +/* N.B. The following ROHC values only have significance if rohc_compression + is in use for the current channel */ + +#define PDCP_NR_ROHC_IP_VERSION_TAG 0x08 +/* 1 byte */ + +#define PDCP_NR_ROHC_CID_INC_INFO_TAG 0x09 +/* 0 byte */ + +#define PDCP_NR_ROHC_LARGE_CID_PRES_TAG 0x0A +/* 0 byte */ + +#define PDCP_NR_ROHC_MODE_TAG 0x0B +/* 1 byte */ + +#define PDCP_NR_ROHC_RND_TAG 0x0C +/* 0 byte */ + +#define PDCP_NR_ROHC_UDP_CHECKSUM_PRES_TAG 0x0D +/* 0 byte */ + +#define PDCP_NR_ROHC_PROFILE_TAG 0x0E +/* 2 bytes, network order */ + +#define PDCP_NR_MACI_PRES_TAG 0x0F +/* 0 byte */ + +#define PDCP_NR_SDAP_HEADER_TAG 0x10 +/* 1 byte, bitmask with PDCP_NR_UL_SDAP_HEADER_PRESENT and/or PDCP_NR_DL_SDAP_HEADER_PRESENT */ + +#define PDCP_NR_CIPHER_DISABLED_TAG 0x11 +/* 0 byte */ + +/* PDCP PDU. Following this tag comes the actual PDCP PDU (there is no length, the PDU + continues until the end of the frame) */ +#define PDCP_NR_PAYLOAD_TAG 0x01 + + +/* Called by RRC, or other configuration protocols */ + +/* Function to configure ciphering & integrity algorithms */ +void set_pdcp_nr_security_algorithms(guint16 ueid, pdcp_nr_security_info_t *security_info); + +/* Function to indicate securityModeCommand did not complete */ +void set_pdcp_nr_security_algorithms_failed(guint16 ueid); + + +/* Called by external dissectors */ +void set_pdcp_nr_rrc_ciphering_key(guint16 ueid, const char *key); +void set_pdcp_nr_rrc_integrity_key(guint16 ueid, const char *key); +void set_pdcp_nr_up_ciphering_key(guint16 ueid, const char *key); +void set_pdcp_nr_up_integrity_key(guint16 ueid, const char *key); + +/* + * Editor modelines - https://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 4 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * vi: set shiftwidth=4 tabstop=8 expandtab: + * :indentSize=4:tabSize=8:noTabs=true: + */ +#endif From f3ea310429ebbe8e7553aed82e184054d38c0a1d Mon Sep 17 00:00:00 2001 From: hardy Date: Mon, 12 Jul 2021 14:56:48 +0200 Subject: [PATCH 558/579] quick fix for CI NR phy test --- ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf b/ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf index bc9dcb47cc..8d32e8b792 100644 --- a/ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf +++ b/ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf @@ -243,7 +243,7 @@ RUs = ( ## beamforming 4x4 matrix: #bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff]; - sdr_addrs = "addr=192.168.10.2,mgmt_addr=192.168.10.2,second_addr=192.168.20.2"; + sdr_addrs = "addr=192.168.30.2,mgmt_addr=192.168.30.2,second_addr=192.168.50.2"; clock_src = "external"; } ); From 4f873e9a268cc335ea0762f65ee9081992fcf370 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Mon, 12 Jul 2021 15:44:16 +0100 Subject: [PATCH 559/579] Fix IP packet received at gNB, to be sent to TUN interface --- openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c index 2f16abfe80..6078882601 100644 --- a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c +++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c @@ -445,8 +445,8 @@ static void deliver_sdu_drb(void *_ue, nr_pdcp_entity_t *entity, int rb_id; int i; - if(UE_NAS_USE_TUN){ - LOG_D(PDCP, "IP packet received, to be sent to UE TUN interface"); + if(IS_SOFTMODEM_NOS1 || UE_NAS_USE_TUN){ + LOG_D(PDCP, "IP packet received, to be sent to TUN interface"); len = write(nas_sock_fd[0], buf, size); if (len != size) { LOG_E(PDCP, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__); From b98836940ace7f33816bef032a2ef378c7943d61 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Tue, 13 Jul 2021 12:00:25 +0100 Subject: [PATCH 560/579] Change log levels --- openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h | 2 +- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c | 2 +- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 2 +- openair2/RRC/NR/L2_nr_interface.c | 7 +++---- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h index 5625cdebb4..d12e5b6f0a 100644 --- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h +++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h @@ -169,7 +169,7 @@ uint8_t get_transformPrecoding(const NR_BWP_UplinkCommon_t *initialUplinkBWP, int rnti_type, uint8_t configuredGrant); -void nr_mac_eNB_rrc_ul_failure(const module_id_t Mod_instP, +void nr_mac_gNB_rrc_ul_failure(const module_id_t Mod_instP, const int CC_idP, const frame_t frameP, const sub_frame_t subframeP, diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c index 4d05a75b37..51a01f9302 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c @@ -390,7 +390,7 @@ void nr_preprocessor_phytest(module_id_t module_id, for (int rb = 0; rb < sched_pdsch->rbSize; rb++) vrb_map[rb + sched_pdsch->rbStart] = 1; - if ((frame&127) == 0) LOG_I(MAC,"phytest: %d.%d DL mcs %d, DL rbStart %d, DL rbSize %d\n", frame, slot, sched_pdsch->mcs, rbStart,rbSize); + if ((frame&127) == 0) LOG_D(MAC,"phytest: %d.%d DL mcs %d, DL rbStart %d, DL rbSize %d\n", frame, slot, sched_pdsch->mcs, rbStart,rbSize); } uint32_t target_ul_mcs = 9; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index b002607088..678927acfd 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -668,7 +668,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, if (UE_info->UE_sched_ctrl[UE_id].pusch_consecutive_dtx_cnt >= pusch_failure_thres) { LOG_D(NR_MAC,"Detected UL Failure on PUSCH, stopping scheduling\n"); UE_info->UE_sched_ctrl[UE_id].ul_failure = 1; - nr_mac_eNB_rrc_ul_failure(gnb_mod_idP,CC_idP,frameP,slotP,rntiP); + nr_mac_gNB_rrc_ul_failure(gnb_mod_idP,CC_idP,frameP,slotP,rntiP); } } } else if(sduP) { diff --git a/openair2/RRC/NR/L2_nr_interface.c b/openair2/RRC/NR/L2_nr_interface.c index fe843d99ef..8a6e164999 100644 --- a/openair2/RRC/NR/L2_nr_interface.c +++ b/openair2/RRC/NR/L2_nr_interface.c @@ -365,7 +365,7 @@ int8_t nr_mac_rrc_data_ind(const module_id_t module_idP, return 0; } -void nr_mac_eNB_rrc_ul_failure(const module_id_t Mod_instP, +void nr_mac_gNB_rrc_ul_failure(const module_id_t Mod_instP, const int CC_idP, const frame_t frameP, const sub_frame_t subframeP, @@ -376,11 +376,10 @@ void nr_mac_eNB_rrc_ul_failure(const module_id_t Mod_instP, rntiP); if (ue_context_p != NULL) { - LOG_I(RRC,"Frame %d, Subframe %d: UE %x UL failure, activating timer\n",frameP,subframeP,rntiP); - + LOG_D(RRC,"Frame %d, Subframe %d: UE %x UL failure, activating timer\n",frameP,subframeP,rntiP); if(ue_context_p->ue_context.ul_failure_timer == 0) ue_context_p->ue_context.ul_failure_timer=1; } else { - LOG_W(RRC,"Frame %d, Subframe %d: UL failure: UE %x unknown \n",frameP,subframeP,rntiP); + LOG_D(RRC,"Frame %d, Subframe %d: UL failure: UE %x unknown \n",frameP,subframeP,rntiP); } } From a8a5146029ef8ab0c25f30dccf67757f1dc42651 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Tue, 13 Jul 2021 18:08:57 +0100 Subject: [PATCH 561/579] Add noS1 flag in gnb_phytest_usrp_run --- ci-scripts/xml_files/gnb_nr_ue_usrp_run.xml | 2 +- ci-scripts/xml_files/gnb_phytest_usrp_run.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci-scripts/xml_files/gnb_nr_ue_usrp_run.xml b/ci-scripts/xml_files/gnb_nr_ue_usrp_run.xml index b1e9697be2..56b246b148 100644 --- a/ci-scripts/xml_files/gnb_nr_ue_usrp_run.xml +++ b/ci-scripts/xml_files/gnb_nr_ue_usrp_run.xml @@ -33,7 +33,7 @@ Initialize_eNB Initialize gNB USRP - -O ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf --phy-test + -O ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf --phy-test --noS1 NR diff --git a/ci-scripts/xml_files/gnb_phytest_usrp_run.xml b/ci-scripts/xml_files/gnb_phytest_usrp_run.xml index 9e798afdc4..3df99bed42 100644 --- a/ci-scripts/xml_files/gnb_phytest_usrp_run.xml +++ b/ci-scripts/xml_files/gnb_phytest_usrp_run.xml @@ -33,7 +33,7 @@ Initialize_eNB Initialize gNB USRP - -O ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf --phy-test -q -U 787200 -T 106 -t 28 -D 130175 -m 28 -M 106 + -O ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf --phy-test --noS1 -q -U 787200 -T 106 -t 28 -D 130175 -m 28 -M 106 NR From 7758e8acfc10f8d52d6fa71ed928c8fe9db2c9fc Mon Sep 17 00:00:00 2001 From: rmagueta Date: Tue, 13 Jul 2021 18:48:38 +0100 Subject: [PATCH 562/579] Revert min_rb to 5 and avoid mixed slots for initialUplinkBWP --- .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 678927acfd..b7438fd927 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -853,7 +853,7 @@ bool allocate_ul_retransmission(module_id_t module_id, const uint16_t bwpSize = NRRIV2BW(genericParameters->locationAndBandwidth, MAX_BWP_SIZE); const uint8_t num_dmrs_cdm_grps_no_data = sched_ctrl->active_bwp ? 1 : 2; - const int tda = sched_ctrl->active_ubwp ? RC.nrmac[module_id]->preferred_ul_tda[sched_ctrl->active_ubwp->bwp_Id][slot] : 1; + const int tda = sched_ctrl->active_ubwp ? RC.nrmac[module_id]->preferred_ul_tda[sched_ctrl->active_ubwp->bwp_Id][slot] : 0; if (tda == retInfo->time_domain_allocation) { /* Check the resource is enough for retransmission */ while (rbStart < bwpSize && !rballoc_mask[rbStart]) @@ -969,7 +969,7 @@ void pf_ul(module_id_t module_id, gNB_MAC_INST *nrmac = RC.nrmac[module_id]; NR_ServingCellConfigCommon_t *scc = nrmac->common_channels[CC_id].ServingCellConfigCommon; NR_UE_info_t *UE_info = &nrmac->UE_info; - const int min_rb = 20; + const int min_rb = 5; float coeff_ue[MAX_MOBILES_PER_GNB]; // UEs that could be scheduled int ue_array[MAX_MOBILES_PER_GNB]; @@ -1045,7 +1045,7 @@ void pf_ul(module_id_t module_id, const uint8_t num_dmrs_cdm_grps_no_data = sched_ctrl->active_ubwp ? 1 : 2; const long f = sched_ctrl->search_space->searchSpaceType->choice.ue_Specific->dci_Formats; const int dci_format = sched_ctrl->active_ubwp ? (f ? NR_UL_DCI_FORMAT_0_1 : NR_UL_DCI_FORMAT_0_0) : NR_UL_DCI_FORMAT_0_0; - const int tda = sched_ctrl->active_ubwp ? nrmac->preferred_ul_tda[sched_ctrl->active_ubwp->bwp_Id][slot] : 1; + const int tda = sched_ctrl->active_ubwp ? nrmac->preferred_ul_tda[sched_ctrl->active_ubwp->bwp_Id][slot] : 0; if (ps->time_domain_allocation != tda || ps->dci_format != dci_format || ps->num_dmrs_cdm_grps_no_data != num_dmrs_cdm_grps_no_data) @@ -1141,7 +1141,7 @@ void pf_ul(module_id_t module_id, const uint8_t num_dmrs_cdm_grps_no_data = sched_ctrl->active_ubwp ? 1 : 2; const long f = sched_ctrl->search_space->searchSpaceType->choice.ue_Specific->dci_Formats; const int dci_format = sched_ctrl->active_ubwp ? (f ? NR_UL_DCI_FORMAT_0_1 : NR_UL_DCI_FORMAT_0_0) : NR_UL_DCI_FORMAT_0_0; - const int tda = sched_ctrl->active_ubwp ? nrmac->preferred_ul_tda[sched_ctrl->active_ubwp->bwp_Id][slot] : 1; + const int tda = sched_ctrl->active_ubwp ? nrmac->preferred_ul_tda[sched_ctrl->active_ubwp->bwp_Id][slot] : 0; if (ps->time_domain_allocation != tda || ps->dci_format != dci_format || ps->num_dmrs_cdm_grps_no_data != num_dmrs_cdm_grps_no_data) @@ -1191,15 +1191,23 @@ bool nr_fr1_ulsch_preprocessor(module_id_t module_id, frame_t frame, sub_frame_t * schedule now (slot + k2 is not UL slot) */ int UE_id = UE_info->list.head; NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id]; - const int tda = sched_ctrl->active_ubwp ? nr_mac->preferred_ul_tda[sched_ctrl->active_ubwp->bwp_Id][slot] : 1; + const int tda = sched_ctrl->active_ubwp ? nr_mac->preferred_ul_tda[sched_ctrl->active_ubwp->bwp_Id][slot] : 0; if (tda < 0) return false; int K2 = get_K2(scc, sched_ctrl->active_ubwp, tda, mu); const int sched_frame = frame + (slot + K2 >= nr_slots_per_frame[mu]); const int sched_slot = (slot + K2) % nr_slots_per_frame[mu]; + if (!is_xlsch_in_slot(nr_mac->ulsch_slot_bitmap[sched_slot / 64], sched_slot)) return false; + bool is_mixed_slot = is_xlsch_in_slot(nr_mac->dlsch_slot_bitmap[sched_slot / 64], sched_slot) && + is_xlsch_in_slot(nr_mac->ulsch_slot_bitmap[sched_slot / 64], sched_slot); + + // FIXME: Avoid mixed slots for initialUplinkBWP + if (sched_ctrl->active_ubwp==NULL && is_mixed_slot) + return false; + sched_ctrl->sched_pusch.slot = sched_slot; sched_ctrl->sched_pusch.frame = sched_frame; for (UE_id = UE_info->list.next[UE_id]; UE_id >= 0; UE_id = UE_info->list.next[UE_id]) { From 44d57829cc3658964bffdc936a2e272d859d0909 Mon Sep 17 00:00:00 2001 From: Thomas Schlichter Date: Tue, 13 Jul 2021 20:40:40 +0200 Subject: [PATCH 563/579] NR_UE: revert changes in nr_ue_procedures.c I have to revert this to be consistent with the OAI gNB. But I think it is wrong to take the BWPSize from scc or scc_SIB, and the BWPStart from DLbwp[0]. --- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index c48c9ee1df..bfffa5fd75 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -645,17 +645,13 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr if (mac->scc == NULL) { dlsch_config_pdu_1_0->BWPSize = NRRIV2BW(mac->scc_SIB->downlinkConfigCommon.initialDownlinkBWP.genericParameters.locationAndBandwidth, MAX_BWP_SIZE); dlsch_config_pdu_1_0->BWPStart = NRRIV2PRBOFFSET(mac->scc_SIB->downlinkConfigCommon.initialDownlinkBWP.genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - dlsch_config_pdu_1_0->SubcarrierSpacing = mac->scc_SIB->downlinkConfigCommon.initialDownlinkBWP.genericParameters.subcarrierSpacing; } else { dlsch_config_pdu_1_0->BWPSize = NRRIV2BW(mac->scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); dlsch_config_pdu_1_0->BWPStart = NRRIV2PRBOFFSET(mac->scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - dlsch_config_pdu_1_0->SubcarrierSpacing = mac->scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.subcarrierSpacing; } if (!get_softmodem_params()->sa) { // NSA mode is not using the Initial BWP - dlsch_config_pdu_1_0->BWPSize = NRRIV2BW(mac->DLbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); dlsch_config_pdu_1_0->BWPStart = NRRIV2PRBOFFSET(mac->DLbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - dlsch_config_pdu_1_0->SubcarrierSpacing = mac->DLbwp[0]->bwp_Common->genericParameters.subcarrierSpacing; pdsch_config = mac->DLbwp[0]->bwp_Dedicated->pdsch_Config->choice.setup; BWPSize = dlsch_config_pdu_1_0->BWPSize; } From bf50c61e8a3c903237e14a5d8e0408222fd62899 Mon Sep 17 00:00:00 2001 From: Thomas Schlichter Date: Tue, 13 Jul 2021 20:45:19 +0200 Subject: [PATCH 564/579] NR_UE: fix nr_ue_dlsch_procedures() for sa mode But that part should be moved to the MAC anyways --- openair1/SCHED_NR_UE/phy_procedures_nr_ue.c | 60 +++++++++++++-------- 1 file changed, 39 insertions(+), 21 deletions(-) diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c index 5cac529a41..18ef2f66f4 100644 --- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c +++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c @@ -1179,32 +1179,50 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue, NR_UE_MAC_INST_t *mac = get_mac_inst(0); - NR_BWP_Id_t ul_bwp_id = mac->UL_BWP_Id; NR_PUSCH_TimeDomainResourceAllocationList_t *pusch_TimeDomainAllocationList = NULL; - if (mac->ULbwp[ul_bwp_id-1]->bwp_Dedicated->pusch_Config->choice.setup->pusch_TimeDomainAllocationList) - pusch_TimeDomainAllocationList = mac->ULbwp[ul_bwp_id-1]->bwp_Dedicated->pusch_Config->choice.setup->pusch_TimeDomainAllocationList->choice.setup; - else if (mac->ULbwp[ul_bwp_id-1]->bwp_Common->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList) - pusch_TimeDomainAllocationList = mac->ULbwp[ul_bwp_id-1]->bwp_Common->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList; - long mapping_type_ul = pusch_TimeDomainAllocationList->list.array[0]->mappingType; - - NR_BWP_Id_t dl_bwp_id = mac->DL_BWP_Id; - NR_PDSCH_Config_t *pdsch_Config = mac->DLbwp[dl_bwp_id-1]->bwp_Dedicated->pdsch_Config->choice.setup; - NR_PDSCH_TimeDomainResourceAllocationList_t *pdsch_TimeDomainAllocationList = NULL; - if (pdsch_Config->pdsch_TimeDomainAllocationList) { - pdsch_TimeDomainAllocationList = pdsch_Config->pdsch_TimeDomainAllocationList->choice.setup; - } else if (mac->DLbwp[dl_bwp_id-1]->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList) { - pdsch_TimeDomainAllocationList = mac->DLbwp[dl_bwp_id-1]->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList; + if (mac->ULbwp[0] && + mac->ULbwp[0]->bwp_Dedicated && + mac->ULbwp[0]->bwp_Dedicated->pusch_Config && + mac->ULbwp[0]->bwp_Dedicated->pusch_Config->choice.setup && + mac->ULbwp[0]->bwp_Dedicated->pusch_Config->choice.setup->pusch_TimeDomainAllocationList) { + pusch_TimeDomainAllocationList = mac->ULbwp[0]->bwp_Dedicated->pusch_Config->choice.setup->pusch_TimeDomainAllocationList->choice.setup; } - long mapping_type_dl = pdsch_TimeDomainAllocationList->list.array[0]->mappingType; + else if (mac->ULbwp[0] && + mac->ULbwp[0]->bwp_Common && + mac->ULbwp[0]->bwp_Common->pusch_ConfigCommon && + mac->ULbwp[0]->bwp_Common->pusch_ConfigCommon->choice.setup && + mac->ULbwp[0]->bwp_Common->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList) { + pusch_TimeDomainAllocationList = mac->ULbwp[0]->bwp_Common->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList; + } + else if (mac->scc_SIB && + mac->scc_SIB->uplinkConfigCommon && + mac->scc_SIB->uplinkConfigCommon->initialUplinkBWP.pusch_ConfigCommon && + mac->scc_SIB->uplinkConfigCommon->initialUplinkBWP.pusch_ConfigCommon->choice.setup && + mac->scc_SIB->uplinkConfigCommon->initialUplinkBWP.pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList) { + pusch_TimeDomainAllocationList = mac->scc_SIB->uplinkConfigCommon->initialUplinkBWP.pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList; + } + long mapping_type_ul = pusch_TimeDomainAllocationList ? pusch_TimeDomainAllocationList->list.array[0]->mappingType : NR_PUSCH_TimeDomainResourceAllocation__mappingType_typeA; - NR_DMRS_DownlinkConfig_t *NR_DMRS_dlconfig; - if (mapping_type_dl == NR_PDSCH_TimeDomainResourceAllocation__mappingType_typeA) - NR_DMRS_dlconfig = (NR_DMRS_DownlinkConfig_t *)pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup; - else - NR_DMRS_dlconfig = (NR_DMRS_DownlinkConfig_t *)pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeB->choice.setup; + NR_PDSCH_Config_t *pdsch_Config = (mac->DLbwp[0] && mac->DLbwp[0]->bwp_Dedicated->pdsch_Config->choice.setup) ? mac->DLbwp[0]->bwp_Dedicated->pdsch_Config->choice.setup : NULL; + NR_PDSCH_TimeDomainResourceAllocationList_t *pdsch_TimeDomainAllocationList = NULL; + if (mac->DLbwp[0] && mac->DLbwp[0]->bwp_Dedicated->pdsch_Config->choice.setup->pdsch_TimeDomainAllocationList) + pdsch_TimeDomainAllocationList = pdsch_Config->pdsch_TimeDomainAllocationList->choice.setup; + else if (mac->DLbwp[0] && mac->DLbwp[0]->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList) + pdsch_TimeDomainAllocationList = mac->DLbwp[0]->bwp_Common->pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList; + else if (mac->scc_SIB && mac->scc_SIB->downlinkConfigCommon.initialDownlinkBWP.pdsch_ConfigCommon->choice.setup) + pdsch_TimeDomainAllocationList = mac->scc_SIB->downlinkConfigCommon.initialDownlinkBWP.pdsch_ConfigCommon->choice.setup->pdsch_TimeDomainAllocationList; + long mapping_type_dl = pdsch_TimeDomainAllocationList ? pdsch_TimeDomainAllocationList->list.array[0]->mappingType : NR_PDSCH_TimeDomainResourceAllocation__mappingType_typeA; + + NR_DMRS_DownlinkConfig_t *NR_DMRS_dlconfig = NULL; + if (pdsch_Config) { + if (mapping_type_dl == NR_PDSCH_TimeDomainResourceAllocation__mappingType_typeA) + NR_DMRS_dlconfig = (NR_DMRS_DownlinkConfig_t *)pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup; + else + NR_DMRS_dlconfig = (NR_DMRS_DownlinkConfig_t *)pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeB->choice.setup; + } pdsch_dmrs_AdditionalPosition_t add_pos_dl = pdsch_dmrs_pos2; - if (NR_DMRS_dlconfig->dmrs_AdditionalPosition) + if (NR_DMRS_dlconfig && NR_DMRS_dlconfig->dmrs_AdditionalPosition) add_pos_dl = *NR_DMRS_dlconfig->dmrs_AdditionalPosition; /* PDSCH decoding time N_1 for processing capability 1 */ From 9f070b74ae868b594dc7bc666652efcea6131f53 Mon Sep 17 00:00:00 2001 From: Thomas Schlichter Date: Tue, 13 Jul 2021 20:47:05 +0200 Subject: [PATCH 565/579] NR_UE: use correct HARQ PID when setting the HARQ status to ACTIVE in nr_ue_scheduled_response() --- openair1/SCHED_NR_UE/fapi_nr_ue_l1.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c index 5db38050fb..99edbf9a40 100644 --- a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c +++ b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c @@ -80,31 +80,30 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){ } else { + fapi_nr_dl_config_dlsch_pdu_rel15_t *dlsch_config_pdu = &dl_config->dl_config_list[i].dlsch_config_pdu.dlsch_config_rel15; + uint8_t current_harq_pid = dlsch_config_pdu->harq_process_nbr; + if (dl_config->dl_config_list[i].pdu_type == FAPI_NR_DL_CONFIG_TYPE_DLSCH){ dlsch0 = PHY_vars_UE_g[module_id][cc_id]->dlsch[thread_id][0][0]; } else if (dl_config->dl_config_list[i].pdu_type == FAPI_NR_DL_CONFIG_TYPE_RA_DLSCH){ dlsch0 = PHY_vars_UE_g[module_id][cc_id]->dlsch_ra[0]; dlsch0->rnti_type = _RA_RNTI_; - dlsch0->harq_processes[dlsch0->current_harq_pid]->status = ACTIVE; + dlsch0->harq_processes[current_harq_pid]->status = ACTIVE; } else if (dl_config->dl_config_list[i].pdu_type == FAPI_NR_DL_CONFIG_TYPE_SI_DLSCH){ dlsch0 = PHY_vars_UE_g[module_id][cc_id]->dlsch_SI[0]; dlsch0->rnti_type = _SI_RNTI_; - dlsch0->harq_processes[dlsch0->current_harq_pid]->status = ACTIVE; + dlsch0->harq_processes[current_harq_pid]->status = ACTIVE; } - fapi_nr_dl_config_dlsch_pdu_rel15_t *dlsch_config_pdu = &dl_config->dl_config_list[i].dlsch_config_pdu.dlsch_config_rel15; - uint8_t current_harq_pid = dlsch_config_pdu->harq_process_nbr; - NR_DL_UE_HARQ_t *dlsch0_harq; - dlsch0->current_harq_pid = current_harq_pid; dlsch0->active = 1; dlsch0->rnti = dl_config->dl_config_list[i].dlsch_config_pdu.rnti; - dlsch0_harq = dlsch0->harq_processes[current_harq_pid]; LOG_D(PHY,"current_harq_pid = %d\n", current_harq_pid); + NR_DL_UE_HARQ_t *dlsch0_harq = dlsch0->harq_processes[current_harq_pid]; if (dlsch0_harq){ dlsch0_harq->BWPStart = dlsch_config_pdu->BWPStart; From a2450bb4b7b4eb3169094101d8cf9979946b23c8 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Wed, 14 Jul 2021 15:30:07 +0100 Subject: [PATCH 566/579] Protect some xer_fprints by an if --- executables/nr-ru.c | 2 -- openair1/SCHED_NR/nr_ru_procedures.c | 12 ++++++------ openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 4 +++- openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c | 2 +- openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c | 1 + openair2/RRC/NR_UE/rrc_UE.c | 10 ++++++---- openair3/NGAP/ngap_gNB_nas_procedures.c | 9 +++++++-- 7 files changed, 24 insertions(+), 16 deletions(-) diff --git a/executables/nr-ru.c b/executables/nr-ru.c index 088c636c7a..be6d13daad 100644 --- a/executables/nr-ru.c +++ b/executables/nr-ru.c @@ -1386,7 +1386,6 @@ void *ru_thread( void *param ) { } } - // At this point, all information for subframe has been received on FH interface res = pullTpool(gNB->resp_L1, gNB->threadPool); syncMsg = (processingData_L1_t *)NotifiedFifoData(res); @@ -1399,7 +1398,6 @@ void *ru_thread( void *param ) { res->key = proc->tti_rx; pushTpool(gNB->threadPool, res); - } printf( "Exiting ru_thread \n"); diff --git a/openair1/SCHED_NR/nr_ru_procedures.c b/openair1/SCHED_NR/nr_ru_procedures.c index c8e047d849..827e986f1b 100644 --- a/openair1/SCHED_NR/nr_ru_procedures.c +++ b/openair1/SCHED_NR/nr_ru_procedures.c @@ -306,16 +306,16 @@ static void *nr_feptx_thread(void *param) { if (ru->do_precoding == 1) { for(i=0; inb_log_antennas; ++i) { - memcpy((void*) &ru->common.beam_id[i][slot*fp->symbols_per_slot+l], - (void*) &ru->gNB_list[0]->common_vars.beam_id[i][slot*fp->symbols_per_slot+l], - (fp->symbols_per_slot>>1)*sizeof(uint8_t)); + memcpy((void*) &ru->common.beam_id[i][slot*fp->symbols_per_slot+l], + (void*) &ru->gNB_list[0]->common_vars.beam_id[i][slot*fp->symbols_per_slot+l], + (fp->symbols_per_slot>>1)*sizeof(uint8_t)); } } if (ru->nb_tx == 1 && ru->nb_log_antennas == 1) { - memcpy((void*)&ru->common.txdataF_BF[0][l*fp->ofdm_symbol_size], - (void*)&ru->gNB_list[0]->common_vars.txdataF[0][txdataF_offset + l*fp->ofdm_symbol_size], - (fp->samples_per_slot_wCP>>1)*sizeof(int32_t)); + memcpy((void*)&ru->common.txdataF_BF[0][l*fp->ofdm_symbol_size], + (void*)&ru->gNB_list[0]->common_vars.txdataF[0][txdataF_offset + l*fp->ofdm_symbol_size], + (fp->samples_per_slot_wCP>>1)*sizeof(int32_t)); } else if (ru->do_precoding == 0) { int gNB_tx = ru->gNB_list[0]->frame_parms.nb_antennas_tx; diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 81d2d2c794..6a9734dd75 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -2188,7 +2188,7 @@ uint16_t nr_generate_ulsch_pdu(uint8_t *sdus_payload, ((NR_MAC_SUBHEADER_SHORT *) mac_pdu_ptr)->F = 0; ((NR_MAC_SUBHEADER_SHORT *) mac_pdu_ptr)->LCID = sdu_lcids[i]; ((NR_MAC_SUBHEADER_SHORT *) mac_pdu_ptr)->L = (unsigned char) sdu_lengths[i]; - mac_pdu_ptr += sizeof(NR_MAC_SUBHEADER_SHORT); + mac_pdu_ptr += sizeof(NR_MAC_SUBHEADER_SHORT); } else { ((NR_MAC_SUBHEADER_LONG *) mac_pdu_ptr)->R = 0; ((NR_MAC_SUBHEADER_LONG *) mac_pdu_ptr)->F = 1; @@ -2276,7 +2276,9 @@ uint16_t nr_generate_ulsch_pdu(uint8_t *sdus_payload, if(buflen > 0) // If the buflen is provided padding_bytes = buflen + pdu - (unsigned char *) mac_pdu_ptr; + AssertFatal(padding_bytes>=0,""); + // Compute final offset for padding if (post_padding || padding_bytes>0) { ((NR_MAC_SUBHEADER_FIXED *) mac_pdu_ptr)->R = 0; diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c b/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c index b1be1f65da..0b5d0ad486 100644 --- a/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c +++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c @@ -66,7 +66,7 @@ static void nr_pdcp_entity_recv_pdu(nr_pdcp_entity_t *entity, } /* SRBs always have MAC-I, even if integrity is not active */ - if ( entity->has_integrity || entity->type == NR_PDCP_SRB) { + if (entity->has_integrity || entity->type == NR_PDCP_SRB) { integrity_size = 4; } else { integrity_size = 0; diff --git a/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c b/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c index 97ae065904..fb657bf5a8 100644 --- a/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c +++ b/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c @@ -47,6 +47,7 @@ extern RAN_CONTEXT_t RC; #include #include + static nr_rlc_ue_manager_t *nr_rlc_ue_manager; /* TODO: handle time a bit more properly */ diff --git a/openair2/RRC/NR_UE/rrc_UE.c b/openair2/RRC/NR_UE/rrc_UE.c index feaf1a0a95..36087379fc 100644 --- a/openair2/RRC/NR_UE/rrc_UE.c +++ b/openair2/RRC/NR_UE/rrc_UE.c @@ -1257,7 +1257,10 @@ nr_rrc_ue_process_masterCellGroup( (void **)&cellGroupConfig, (uint8_t *)masterCellGroup->buf, masterCellGroup->size, 0, 0); - xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, (const void*)cellGroupConfig); + + if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { + xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, (const void *) cellGroupConfig); + } if( cellGroupConfig->spCellConfig != NULL && cellGroupConfig->spCellConfig->reconfigurationWithSync != NULL){ //TODO (perform Reconfiguration with sync according to 5.3.5.5.2) @@ -2200,7 +2203,6 @@ nr_rrc_ue_establish_srb2( ie->nonCriticalExtension->masterCellGroup); } - if (ie->radioBearerConfig != NULL) { LOG_I(NR_RRC, "radio Bearer Configuration is present\n"); nr_sa_rrc_ue_process_radioBearerConfig(ctxt_pP, gNB_index, ie->radioBearerConfig); @@ -2304,9 +2306,9 @@ nr_rrc_ue_establish_srb2( return -1; } - // if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { + if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { xer_fprint(stdout, &asn_DEF_NR_DL_DCCH_Message,(void *)dl_dcch_msg); - // } + } if (dl_dcch_msg->message.present == NR_DL_DCCH_MessageType_PR_c1) { switch (dl_dcch_msg->message.choice.c1->present) { diff --git a/openair3/NGAP/ngap_gNB_nas_procedures.c b/openair3/NGAP/ngap_gNB_nas_procedures.c index 4e149d9e27..8efab98dfa 100644 --- a/openair3/NGAP/ngap_gNB_nas_procedures.c +++ b/openair3/NGAP/ngap_gNB_nas_procedures.c @@ -771,7 +771,10 @@ int ngap_gNB_initial_ctxt_resp( //item->pDUSessionResourceSetupResponseTransfer.buf = res.buffer; //item->pDUSessionResourceSetupResponseTransfer.size = res.result.encoded; - xer_fprint(stdout, &asn_DEF_NGAP_PDUSessionResourceSetupResponseTransfer, pdusessionTransfer_p); + if (asn1_xer_print) { + xer_fprint(stdout, &asn_DEF_NGAP_PDUSessionResourceSetupResponseTransfer, pdusessionTransfer_p); + } + memset(pdusessionTransfer_buffer, 0, 1000); asn_enc_rval_t enc_rval = aper_encode_to_buffer(&asn_DEF_NGAP_PDUSessionResourceSetupResponseTransfer, NULL, @@ -858,7 +861,9 @@ int ngap_gNB_initial_ctxt_resp( ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); } - xer_fprint(stdout, &asn_DEF_NGAP_NGAP_PDU, &pdu); + if (asn1_xer_print) { + xer_fprint(stdout, &asn_DEF_NGAP_NGAP_PDU, &pdu); + } if (ngap_gNB_encode_pdu(&pdu, &buffer, &length) < 0) { NGAP_ERROR("Failed to encode InitialContextSetupResponse\n"); From 2bfc418e68a9f0d6d50a45c59d6a5f00305fee1f Mon Sep 17 00:00:00 2001 From: hardy Date: Sun, 11 Jul 2021 21:19:14 +0200 Subject: [PATCH 567/579] improve/fix iperf for module --- ci-scripts/cls_oaicitest.py | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index 377592781d..73141aa9b7 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -2222,6 +2222,24 @@ class OaiCiTest(): def Iperf_Module(self, lock, UE_IPAddress, device_id, idx, ue_num, statusQueue,EPC, Module_UE): SSH = sshconnection.SSHConnection() + #RH temporary quick n dirty for test + SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password) + cmd = 'echo ' + EPC.Password + ' | sudo -S ip link set dev tun5 mtu 1358' + SSH.command(cmd,'\$',5) + SSH.close() + + + #kill iperf processes before (in case there are still some remaining) + SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword) + cmd = 'killall --signal=SIGKILL iperf' + SSH.command(cmd,'\$',5) + SSH.close() + SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password) + cmd = 'killall --signal=SIGKILL iperf' + SSH.command(cmd,'\$',5) + SSH.close() + + iperf_time = self.Iperf_ComputeTime() if self.iperf_direction=="DL": logging.debug("Iperf for Module in DL mode detected") @@ -2231,12 +2249,14 @@ class OaiCiTest(): SSH.command(cmd,'\$',5) cmd = 'echo $USER; nohup /opt/iperf-2.0.10/iperf -s -B ' + UE_IPAddress + ' -u 2>&1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' SSH.command(cmd,'\$',5) + SSH.close() #client side EPC SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password) cmd = 'rm iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log' SSH.command(cmd,'\$',5) cmd = 'iperf -c ' + UE_IPAddress + ' ' + self.iperf_args + ' 2>&1 > iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log' SSH.command(cmd,'\$',int(iperf_time)*5.0) + SSH.close() #copy the 2 resulting files locally SSH.copyin(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword, 'iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log', '.') SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, 'iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log', '.') @@ -2252,29 +2272,32 @@ class OaiCiTest(): SSH.command(cmd,'\$',5) cmd = 'echo $USER; nohup iperf -s -u 2>&1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' SSH.command(cmd,'\$',5) + SSH.close() #client side UE SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword) cmd = 'rm iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log' SSH.command(cmd,'\$',5) SSH.command('/opt/iperf-2.0.10/iperf -c 192.172.0.1 ' + self.iperf_args + ' 2>&1 > iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log', '\$', int(iperf_time)*5.0) + SSH.close() #copy the 2 resulting files locally SSH.copyin(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword, 'iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log', '.') SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, 'iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log', '.') #send for analysis - filename='iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log' + filename='iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, self.iperf_args,filename,1) else : logging.debug("Incorrect or missing IPERF direction in XML") + #kill iperf processes after to be clean SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword) cmd = 'killall --signal=SIGKILL iperf' SSH.command(cmd,'\$',5) + SSH.close() SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password) cmd = 'killall --signal=SIGKILL iperf' SSH.command(cmd,'\$',5) - SSH.close() return From 78b3292c9c9eb77df5881f13d8f4730b29640108 Mon Sep 17 00:00:00 2001 From: Luis Pereira Date: Thu, 15 Jul 2021 09:02:18 +0000 Subject: [PATCH 568/579] Revert "Add noS1 flag in gnb_phytest_usrp_run" This reverts commit a8a5146029ef8ab0c25f30dccf67757f1dc42651 --- ci-scripts/xml_files/gnb_nr_ue_usrp_run.xml | 2 +- ci-scripts/xml_files/gnb_phytest_usrp_run.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci-scripts/xml_files/gnb_nr_ue_usrp_run.xml b/ci-scripts/xml_files/gnb_nr_ue_usrp_run.xml index 56b246b148..b1e9697be2 100644 --- a/ci-scripts/xml_files/gnb_nr_ue_usrp_run.xml +++ b/ci-scripts/xml_files/gnb_nr_ue_usrp_run.xml @@ -33,7 +33,7 @@ Initialize_eNB Initialize gNB USRP - -O ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf --phy-test --noS1 + -O ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf --phy-test NR diff --git a/ci-scripts/xml_files/gnb_phytest_usrp_run.xml b/ci-scripts/xml_files/gnb_phytest_usrp_run.xml index 3df99bed42..9e798afdc4 100644 --- a/ci-scripts/xml_files/gnb_phytest_usrp_run.xml +++ b/ci-scripts/xml_files/gnb_phytest_usrp_run.xml @@ -33,7 +33,7 @@ Initialize_eNB Initialize gNB USRP - -O ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf --phy-test --noS1 -q -U 787200 -T 106 -t 28 -D 130175 -m 28 -M 106 + -O ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf --phy-test -q -U 787200 -T 106 -t 28 -D 130175 -m 28 -M 106 NR From f2b52ba3da36d63fadc9c00a795ebf29543d96ae Mon Sep 17 00:00:00 2001 From: rmagueta Date: Thu, 15 Jul 2021 10:35:54 +0100 Subject: [PATCH 569/579] Revert some xer_fprints --- openair2/RRC/NR_UE/rrc_UE.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/openair2/RRC/NR_UE/rrc_UE.c b/openair2/RRC/NR_UE/rrc_UE.c index 36087379fc..c988ec9b80 100644 --- a/openair2/RRC/NR_UE/rrc_UE.c +++ b/openair2/RRC/NR_UE/rrc_UE.c @@ -1257,10 +1257,7 @@ nr_rrc_ue_process_masterCellGroup( (void **)&cellGroupConfig, (uint8_t *)masterCellGroup->buf, masterCellGroup->size, 0, 0); - - if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { - xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, (const void *) cellGroupConfig); - } + xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, (const void*)cellGroupConfig); if( cellGroupConfig->spCellConfig != NULL && cellGroupConfig->spCellConfig->reconfigurationWithSync != NULL){ //TODO (perform Reconfiguration with sync according to 5.3.5.5.2) @@ -2306,9 +2303,9 @@ nr_rrc_ue_establish_srb2( return -1; } - if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { + // if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { xer_fprint(stdout, &asn_DEF_NR_DL_DCCH_Message,(void *)dl_dcch_msg); - } + // } if (dl_dcch_msg->message.present == NR_DL_DCCH_MessageType_PR_c1) { switch (dl_dcch_msg->message.choice.c1->present) { From 88b8b4212b56c9d54dc5e9966e5bb9a9eae5ada7 Mon Sep 17 00:00:00 2001 From: francescomani Date: Thu, 15 Jul 2021 12:01:22 +0200 Subject: [PATCH 570/579] fix gnb compilation --- openair1/SCHED_NR/phy_procedures_nr_gNB.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair1/SCHED_NR/phy_procedures_nr_gNB.c b/openair1/SCHED_NR/phy_procedures_nr_gNB.c index 717487c101..76b35b6378 100644 --- a/openair1/SCHED_NR/phy_procedures_nr_gNB.c +++ b/openair1/SCHED_NR/phy_procedures_nr_gNB.c @@ -176,7 +176,7 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB, ul_pdcch_pdu_id>=0 ? &gNB->ul_pdcch_pdu[ul_pdcch_pdu_id].pdcch_pdu.pdcch_pdu : NULL, gNB->nr_gold_pdcch_dmrs[slot], &gNB->common_vars.txdataF[0][txdataF_offset], - AMP, *fp); + AMP, fp); // free up entry in pdcch tables if (pdcch_pdu_id>=0) gNB->pdcch_pdu[pdcch_pdu_id].frame = -1; From ff7cc7ec1b9ec22b769337481ffdeb83ddd83fd0 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Thu, 15 Jul 2021 12:59:15 +0100 Subject: [PATCH 571/579] Add ulsch_max_slots_inactivity to SA config files --- .../conf_files/gnb.band78.sa.fr1.106PRB.usrpb210.conf | 11 ++++++----- .../CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf | 11 ++++++----- .../CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf | 11 ++++++----- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.usrpb210.conf b/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.usrpb210.conf index f2da2e9fe3..0efc071c91 100644 --- a/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.usrpb210.conf +++ b/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.usrpb210.conf @@ -225,11 +225,12 @@ gNBs = ); MACRLCs = ( - { - num_cc = 1; - tr_s_preference = "local_L1"; - tr_n_preference = "local_RRC"; - } + { + num_cc = 1; + tr_s_preference = "local_L1"; + tr_n_preference = "local_RRC"; + ulsch_max_slots_inactivity = 100; + } ); L1s = ( diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf index 164830f97b..ac1f36c8b7 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf @@ -225,11 +225,12 @@ gNBs = ); MACRLCs = ( - { - num_cc = 1; - tr_s_preference = "local_L1"; - tr_n_preference = "local_RRC"; - } + { + num_cc = 1; + tr_s_preference = "local_L1"; + tr_n_preference = "local_RRC"; + ulsch_max_slots_inactivity = 100; + } ); L1s = ( diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf index 1ec5f74cfb..1bada161a1 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf @@ -225,11 +225,12 @@ gNBs = ); MACRLCs = ( - { - num_cc = 1; - tr_s_preference = "local_L1"; - tr_n_preference = "local_RRC"; - } + { + num_cc = 1; + tr_s_preference = "local_L1"; + tr_n_preference = "local_RRC"; + ulsch_max_slots_inactivity = 100; + } ); L1s = ( From a30b86cb45bdced2ee65fe6ba1723d53cfd763d4 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Thu, 15 Jul 2021 18:55:51 +0100 Subject: [PATCH 572/579] Update NSA config file --- ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf b/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf index 205922af0c..86293f2297 100644 --- a/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf +++ b/ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf @@ -126,7 +126,7 @@ gNBs = initialULBWPk2_1 = 6; # used for mixed slot initialULBWPmappingType_1 = 1; - initialULBWPstartSymbolAndLength_1 = 69; # this is SS=10 L=2 + initialULBWPstartSymbolAndLength_1 = 52; # this is SS=10 L=4 initialULBWPk2_2 = 7; # used for Msg.3 during RA initialULBWPmappingType_2 = 1; From abef7f0b081fb3f9ef52f4324b4e5b1e73334ba1 Mon Sep 17 00:00:00 2001 From: Roberto Louro Magueta Date: Fri, 16 Jul 2021 15:34:53 +0000 Subject: [PATCH 573/579] Revert "Temporary fix for prach_thres" This reverts commit af0d7dabbae7a7fa441ff8ebeac92e32955c8421 --- openair2/GNB_APP/L1_nr_paramdef.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/GNB_APP/L1_nr_paramdef.h b/openair2/GNB_APP/L1_nr_paramdef.h index 8a41ac8a88..fd22e92730 100644 --- a/openair2/GNB_APP/L1_nr_paramdef.h +++ b/openair2/GNB_APP/L1_nr_paramdef.h @@ -66,7 +66,7 @@ {CONFIG_STRING_L1_REMOTE_N_PORTD, NULL, 0, uptr:NULL, defintval:50031, TYPE_UINT, 0}, \ {CONFIG_STRING_L1_PUSCH_PROC_THREADS, NULL, 0, uptr:NULL, defintval:1, TYPE_UINT, 0}, \ {CONFIG_STRING_L1_PUCCH0_DTX_THRESHOLD, NULL, 0, uptr:NULL, defintval:100, TYPE_UINT, 0}, \ -{CONFIG_STRING_L1_PRACH_DTX_THRESHOLD, NULL, 0, uptr:NULL, defintval:250, TYPE_UINT, 0}, \ +{CONFIG_STRING_L1_PRACH_DTX_THRESHOLD, NULL, 0, uptr:NULL, defintval:200, TYPE_UINT, 0}, \ {CONFIG_STRING_L1_PUSCH_DTX_THRESHOLD, NULL, 0, uptr:NULL, defintval:50, TYPE_UINT, 0} \ } #define L1_CC_IDX 0 From 64c28bf9ac44900fc4247650aba97484644e085a Mon Sep 17 00:00:00 2001 From: rmagueta Date: Fri, 16 Jul 2021 16:50:51 +0100 Subject: [PATCH 574/579] Normalization of energy over ifft and receive antennas --- openair1/PHY/NR_TRANSPORT/nr_prach.c | 34 +++++++++++++++++++--------- openair2/GNB_APP/L1_nr_paramdef.h | 2 +- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/openair1/PHY/NR_TRANSPORT/nr_prach.c b/openair1/PHY/NR_TRANSPORT/nr_prach.c index bf944e27aa..000348ae87 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_prach.c +++ b/openair1/PHY/NR_TRANSPORT/nr_prach.c @@ -872,24 +872,36 @@ void rx_nr_prach(PHY_VARS_gNB *gNB, // Now do IFFT of size 1024 (N_ZC=839) or 256 (N_ZC=139) if (N_ZC == 839) { - log2_ifft_size = 10; idft(IDFT_1024,prachF,prach_ifft_tmp,1); // compute energy and accumulate over receive antennas - for (i=0;i<2048;i++) - prach_ifft[i] += ((int32_t)prach_ifft_tmp[i<<1]*(int32_t)prach_ifft_tmp[i<<1] + (int32_t)prach_ifft_tmp[1+(i<<1)]*(int32_t)prach_ifft_tmp[1+(i<<1)])/nb_rx; + for (i=0;i<1024;i++) + prach_ifft[i] += (int32_t)prach_ifft_tmp[i<<1]*(int32_t)prach_ifft_tmp[i<<1] + (int32_t)prach_ifft_tmp[1+(i<<1)]*(int32_t)prach_ifft_tmp[1+(i<<1)]; } else { idft(IDFT_256,prachF,prach_ifft_tmp,1); log2_ifft_size = 8; - // compute energy and accumulate over receive antennas and repetitions for BR - for (i=0;i<256;i++) - prach_ifft[i] += ((int32_t)prach_ifft_tmp[i<<1]*(int32_t)prach_ifft_tmp[(i<<1)] + (int32_t)prach_ifft_tmp[1+(i<<1)]*(int32_t)prach_ifft_tmp[1+(i<<1)])/nb_rx; - } + // compute energy and accumulate over receive antennas and repetitions for BR + for (i=0;i<256;i++) + prach_ifft[i] += (int32_t)prach_ifft_tmp[i<<1]*(int32_t)prach_ifft_tmp[(i<<1)] + (int32_t)prach_ifft_tmp[1+(i<<1)]*(int32_t)prach_ifft_tmp[1+(i<<1)]; + } + + if (LOG_DUMPFLAG(PRACH)) { + if (aa==0) LOG_M("prach_rxF_comp0.m","prach_rxF_comp0",prachF,1024,1,1); + if (aa==1) LOG_M("prach_rxF_comp1.m","prach_rxF_comp1",prachF,1024,1,1); + } - if (LOG_DUMPFLAG(PRACH)) { - if (aa==0) LOG_M("prach_rxF_comp0.m","prach_rxF_comp0",prachF,1024,1,1); - if (aa==1) LOG_M("prach_rxF_comp1.m","prach_rxF_comp1",prachF,1024,1,1); - } }// antennas_rx + + // Normalization of energy over ifft and receive antennas + if (N_ZC == 839) { + log2_ifft_size = 10; + for (i=0;i<1024;i++) + prach_ifft[i] = (prach_ifft[i]>>log2_ifft_size)/nb_rx; + } else { + log2_ifft_size = 8; + for (i=0;i<256;i++) + prach_ifft[i] = (prach_ifft[i]>>log2_ifft_size)/nb_rx; + } + } // new dft // check energy in nth time shift, for diff --git a/openair2/GNB_APP/L1_nr_paramdef.h b/openair2/GNB_APP/L1_nr_paramdef.h index fd22e92730..fc2bca19d5 100644 --- a/openair2/GNB_APP/L1_nr_paramdef.h +++ b/openair2/GNB_APP/L1_nr_paramdef.h @@ -66,7 +66,7 @@ {CONFIG_STRING_L1_REMOTE_N_PORTD, NULL, 0, uptr:NULL, defintval:50031, TYPE_UINT, 0}, \ {CONFIG_STRING_L1_PUSCH_PROC_THREADS, NULL, 0, uptr:NULL, defintval:1, TYPE_UINT, 0}, \ {CONFIG_STRING_L1_PUCCH0_DTX_THRESHOLD, NULL, 0, uptr:NULL, defintval:100, TYPE_UINT, 0}, \ -{CONFIG_STRING_L1_PRACH_DTX_THRESHOLD, NULL, 0, uptr:NULL, defintval:200, TYPE_UINT, 0}, \ +{CONFIG_STRING_L1_PRACH_DTX_THRESHOLD, NULL, 0, uptr:NULL, defintval:150, TYPE_UINT, 0}, \ {CONFIG_STRING_L1_PUSCH_DTX_THRESHOLD, NULL, 0, uptr:NULL, defintval:50, TYPE_UINT, 0} \ } #define L1_CC_IDX 0 From c97bb97235942ea333dbdc3e0c16e25d8cb4f2fc Mon Sep 17 00:00:00 2001 From: hardy Date: Sat, 17 Jul 2021 08:30:43 +0200 Subject: [PATCH 575/579] [CI] : comment out the nsa tests that are disabled, so that the remaining test runs all MR --- ci-scripts/Jenkinsfile-trig-nsa | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/ci-scripts/Jenkinsfile-trig-nsa b/ci-scripts/Jenkinsfile-trig-nsa index 44527a1a38..2dcaf1a04f 100644 --- a/ci-scripts/Jenkinsfile-trig-nsa +++ b/ci-scripts/Jenkinsfile-trig-nsa @@ -56,21 +56,21 @@ pipeline { booleanParam(name: 'eNB_AllowMergeRequestProcess', value: Boolean.valueOf(ALLOW_MERGE)) ] //calling NSA long sub job - build job: "RAN-NSA-Mini-Module-Long", wait : true, propagate : false, parameters: [ - string(name: 'eNB_MR', value: String.valueOf(MR)), - string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)), - string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)), - string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)), - booleanParam(name: 'eNB_AllowMergeRequestProcess', value: Boolean.valueOf(ALLOW_MERGE)) - ] +// build job: "RAN-NSA-Mini-Module-Long", wait : true, propagate : false, parameters: [ +// string(name: 'eNB_MR', value: String.valueOf(MR)), +// string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)), +// string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)), +// string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)), +// booleanParam(name: 'eNB_AllowMergeRequestProcess', value: Boolean.valueOf(ALLOW_MERGE)) +// ] //calling NSA attach/detach job - build job: "RAN-NSA-Mini-Module-Attach-Detach", wait : true, propagate : false, parameters: [ - string(name: 'eNB_MR', value: String.valueOf(MR)), - string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)), - string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)), - string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)), - booleanParam(name: 'eNB_AllowMergeRequestProcess', value: Boolean.valueOf(ALLOW_MERGE)) - ] +// build job: "RAN-NSA-Mini-Module-Attach-Detach", wait : true, propagate : false, parameters: [ +// string(name: 'eNB_MR', value: String.valueOf(MR)), +// string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)), +// string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)), +// string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)), +// booleanParam(name: 'eNB_AllowMergeRequestProcess', value: Boolean.valueOf(ALLOW_MERGE)) +// ] } } From 9c010e3056fb6b13625f91511a26fab0047258ab Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Sat, 17 Jul 2021 22:25:07 +0100 Subject: [PATCH 576/579] Apply patch for gNB ulsch retransmission scheduler --- .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index b7438fd927..a49b6f58a1 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -144,7 +144,7 @@ void calculate_preferred_ul_tda(module_id_t module_id, const NR_BWP_Uplink_t *ub if ((symb_pucch & symb_tda_mi) == 0 && (symb_ulMixed & symb_tda_mi) == symb_tda_mi) { tdaMi = 1; } else { - LOG_E(MAC, + LOG_E(NR_MAC, "TDA index 1 UL overlaps with PUCCH or is not entirely in mixed slot (symb_pucch %x symb_ulMixed %x symb_tda_mi %x), won't schedule UL mixed slot\n", symb_pucch, symb_ulMixed, @@ -168,7 +168,7 @@ void calculate_preferred_ul_tda(module_id_t module_id, const NR_BWP_Uplink_t *ub } if (k2 < tdd->nrofUplinkSlots) - LOG_W(MAC, + LOG_W(NR_MAC, "k2 %d < tdd->nrofUplinkSlots %ld: not all UL slots can be scheduled\n", k2, tdd->nrofUplinkSlots); @@ -331,7 +331,7 @@ void nr_process_mac_pdu(module_id_t module_idP, sched_ctrl->ph = PH - 32 + (PH - 54); /* 38.133 Table10.1.18.1-1 */ sched_ctrl->pcmax = PCMAX - 29; - LOG_D(MAC, "SINGLE ENTRY PHR R1 %d PH %d (%d dB) R2 %d PCMAX %d (%d dBm)\n", + LOG_D(NR_MAC, "SINGLE ENTRY PHR R1 %d PH %d (%d dB) R2 %d PCMAX %d (%d dBm)\n", phr->R1, PH, sched_ctrl->ph, phr->R2, PCMAX, sched_ctrl->pcmax); break; @@ -817,7 +817,7 @@ bool nr_UE_is_to_be_scheduled(module_id_t mod_id, int CC_id, int UE_id, frame_t * (3) or we did not schedule it in more than 10 frames */ const bool has_data = sched_ctrl->estimated_ul_buffer > sched_ctrl->sched_ul_bytes; const bool high_inactivity = diff >= nrmac->ulsch_max_slots_inactivity; - LOG_D(MAC, + LOG_D(NR_MAC, "%4d.%2d UL inactivity %d slots has_data %d SR %d\n", frame, slot, @@ -854,12 +854,13 @@ bool allocate_ul_retransmission(module_id_t module_id, const uint8_t num_dmrs_cdm_grps_no_data = sched_ctrl->active_bwp ? 1 : 2; const int tda = sched_ctrl->active_ubwp ? RC.nrmac[module_id]->preferred_ul_tda[sched_ctrl->active_ubwp->bwp_Id][slot] : 0; + LOG_D(NR_MAC,"retInfo->time_domain_allocation = %d, tda = %d\n", retInfo->time_domain_allocation, tda); if (tda == retInfo->time_domain_allocation) { /* Check the resource is enough for retransmission */ while (rbStart < bwpSize && !rballoc_mask[rbStart]) rbStart++; - if (rbStart + retInfo->rbSize >= bwpSize) { - LOG_D(MAC, "cannot allocate retransmission of UE %d/RNTI %04x: no resources\n", UE_id, UE_info->rnti[UE_id]); + if (rbStart + retInfo->rbSize > bwpSize) { + LOG_W(NR_MAC, "cannot allocate retransmission of UE %d/RNTI %04x: no resources (rbStart %d, retInfo->rbSize %d, bwpSize %d\n", UE_id, UE_info->rnti[UE_id], rbStart, retInfo->rbSize, bwpSize); return false; } /* check whether we need to switch the TDA allocation since tha last @@ -871,7 +872,7 @@ bool allocate_ul_retransmission(module_id_t module_id, || ps->dci_format != dci_format || ps->num_dmrs_cdm_grps_no_data != num_dmrs_cdm_grps_no_data) nr_set_pusch_semi_static(scc, sched_ctrl->active_ubwp, dci_format, tda, num_dmrs_cdm_grps_no_data, ps); - LOG_D(MAC, "%s(): retransmission keeping TDA %d and TBS %d\n", __func__, tda, retInfo->tb_size); + LOG_D(NR_MAC, "%s(): retransmission keeping TDA %d and TBS %d\n", __func__, tda, retInfo->tb_size); } else { /* the retransmission will use a different time domain allocation, check * that we have enough resources */ @@ -895,10 +896,10 @@ bool allocate_ul_retransmission(module_id_t module_id, &new_tbs, &new_rbSize); if (!success || new_tbs != retInfo->tb_size) { - LOG_D(MAC, "%s(): new TBsize %d of new TDA does not match old TBS %d\n", __func__, new_tbs, retInfo->tb_size); + LOG_D(NR_MAC, "%s(): new TBsize %d of new TDA does not match old TBS %d\n", __func__, new_tbs, retInfo->tb_size); return false; /* the maximum TBsize we might have is smaller than what we need */ } - LOG_D(MAC, "%s(): retransmission with TDA %d->%d and TBS %d -> %d\n", __func__, retInfo->time_domain_allocation, tda, retInfo->tb_size, new_tbs); + LOG_D(NR_MAC, "%s(): retransmission with TDA %d->%d and TBS %d -> %d\n", __func__, retInfo->time_domain_allocation, tda, retInfo->tb_size, new_tbs); /* we can allocate it. Overwrite the time_domain_allocation, the number * of RBs, and the new TB size. The rest is done below */ retInfo->tb_size = new_tbs; @@ -910,7 +911,7 @@ bool allocate_ul_retransmission(module_id_t module_id, /* Find free CCE */ bool freeCCE = find_free_CCE(module_id, slot, UE_id); if (!freeCCE) { - LOG_D(MAC, "%4d.%2d no free CCE for retransmission UL DCI UE %04x\n", frame, slot, UE_info->rnti[UE_id]); + LOG_D(NR_MAC, "%4d.%2d no free CCE for retransmission UL DCI UE %04x\n", frame, slot, UE_info->rnti[UE_id]); return false; } @@ -923,7 +924,7 @@ bool allocate_ul_retransmission(module_id_t module_id, sched_ctrl->sched_pusch = *retInfo; NR_sched_pusch_t *sched_pusch = &sched_ctrl->sched_pusch; - LOG_D(MAC, + LOG_D(NR_MAC, "%4d.%2d Allocate UL retransmission UE %d/RNTI %04x sched %4d.%2d (%d RBs)\n", frame, slot, @@ -999,7 +1000,7 @@ void pf_ul(module_id_t module_id, bool r = allocate_ul_retransmission( module_id, frame, slot, rballoc_mask, &n_rb_sched, UE_id, sched_pusch->ul_harq_pid); if (!r) { - LOG_D(MAC, "%4d.%2d UL retransmission UE RNTI %04x can NOT be allocated\n", frame, slot, UE_info->rnti[UE_id]); + LOG_D(NR_MAC, "%4d.%2d UL retransmission UE RNTI %04x can NOT be allocated\n", frame, slot, UE_info->rnti[UE_id]); continue; } /* reduce max_num_ue once we are sure UE can be allocated, i.e., has CCE */ @@ -1030,7 +1031,7 @@ void pf_ul(module_id_t module_id, if (max_num_ue < 0) return; - LOG_D(NR_MAC,"Looking for min_rb %d RBs, starting at %d\n", min_rb,rbStart); + LOG_D(NR_MAC,"Looking for min_rb %d RBs, starting at %d\n", min_rb, rbStart); while (rbStart < bwpSize && !rballoc_mask[rbStart]) rbStart++; if (rbStart + min_rb >= bwpSize) { LOG_W(NR_MAC, "cannot allocate continuous UL data for UE %d/RNTI %04x: no resources (rbStart %d, min_rb %d, bwpSize %d\n", @@ -1162,7 +1163,7 @@ void pf_ul(module_id_t module_id, &rbSize); sched_pusch->rbSize = rbSize; sched_pusch->tb_size = TBS; - LOG_D(MAC,"rbSize %d, TBS %d, est buf %d, sched_ul %d, B %d\n", + LOG_D(NR_MAC,"rbSize %d, TBS %d, est buf %d, sched_ul %d, B %d\n", rbSize, sched_pusch->tb_size, sched_ctrl->estimated_ul_buffer, sched_ctrl->sched_ul_bytes, B); /* Mark the corresponding RBs as used */ From f89d367ad4d22e9fd009d92d1c80cbfd5eda167a Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Fri, 16 Jul 2021 14:51:47 +0200 Subject: [PATCH 577/579] CI: adding bsd exception Signed-off-by: Raphael Defosseux --- ci-scripts/checkCodingFormattingRules.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ci-scripts/checkCodingFormattingRules.sh b/ci-scripts/checkCodingFormattingRules.sh index 3a2fcbb02c..45cf08aa9a 100755 --- a/ci-scripts/checkCodingFormattingRules.sh +++ b/ci-scripts/checkCodingFormattingRules.sh @@ -76,8 +76,8 @@ then do IS_NFAPI=`echo $FILE | egrep -c "nfapi/open-nFAPI|nfapi/oai_integration/vendor_ext" || true` IS_OAI_LICENCE_PRESENT=`egrep -c "OAI Public License" $FILE || true` - IS_BSD_LICENCE_PRESENT=`egrep -c "the terms of the BSD Licence" $FILE || true` - IS_EXCEPTION=`echo $FILE | egrep -c "common/utils/collection/tree.h|common/utils/collection/queue.h|common/utils/itti_analyzer/common/queue.h|openair3/UTILS/tree.h|openair3/UTILS/queue.h|openair3/GTPV1-U/nw-gtpv1u|openair2/UTIL/OPT/ws_|openair3/NAS/COMMON/milenage.h" || true` + IS_BSD_LICENCE_PRESENT=`egrep -c "the terms of the BSD Licence|License-Identifier: BSD-2-Clause" $FILE || true` + IS_EXCEPTION=`echo $FILE | egrep -c "common/utils/collection/tree.h|common/utils/collection/queue.h|common/utils/itti_analyzer/common/queue.h|openair3/UTILS/tree.h|openair3/UTILS/queue.h|openair3/GTPV1-U/nw-gtpv1u|openair2/UTIL/OPT/ws_|openair2/UTIL/OPT/packet-rohc.h|openair3/NAS/COMMON/milenage.h" || true` if [ $IS_OAI_LICENCE_PRESENT -eq 0 ] && [ $IS_BSD_LICENCE_PRESENT -eq 0 ] then if [ $IS_NFAPI -eq 0 ] && [ $IS_EXCEPTION -eq 0 ] @@ -197,8 +197,8 @@ do then IS_NFAPI=`echo $FULLFILE | egrep -c "nfapi/open-nFAPI|nfapi/oai_integration/vendor_ext" || true` IS_OAI_LICENCE_PRESENT=`egrep -c "OAI Public License" $FULLFILE || true` - IS_BSD_LICENCE_PRESENT=`egrep -c "the terms of the BSD Licence" $FULLFILE || true` - IS_EXCEPTION=`echo $FULLFILE | egrep -c "common/utils/collection/tree.h|common/utils/collection/queue.h|common/utils/itti_analyzer/common/queue.h|openair3/UTILS/tree.h|openair3/UTILS/queue.h|openair3/GTPV1-U/nw-gtpv1u|openair2/UTIL/OPT/ws_|openair3/NAS/COMMON/milenage.h" || true` + IS_BSD_LICENCE_PRESENT=`egrep -c "the terms of the BSD Licence|License-Identifier: BSD-2-Clause" $FULLFILE || true` + IS_EXCEPTION=`echo $FULLFILE | egrep -c "common/utils/collection/tree.h|common/utils/collection/queue.h|common/utils/itti_analyzer/common/queue.h|openair3/UTILS/tree.h|openair3/UTILS/queue.h|openair3/GTPV1-U/nw-gtpv1u|openair2/UTIL/OPT/ws_|openair2/UTIL/OPT/packet-rohc.h|openair3/NAS/COMMON/milenage.h" || true` if [ $IS_OAI_LICENCE_PRESENT -eq 0 ] && [ $IS_BSD_LICENCE_PRESENT -eq 0 ] then if [ $IS_NFAPI -eq 0 ] && [ $IS_EXCEPTION -eq 0 ] From 6b028522bdb27f365ff0327ec29190f8a63c9ed1 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Mon, 19 Jul 2021 14:22:00 +0100 Subject: [PATCH 578/579] Fix warning after merge --- openair1/PHY/INIT/nr_init_ru.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openair1/PHY/INIT/nr_init_ru.c b/openair1/PHY/INIT/nr_init_ru.c index e04197d48a..097c2b3ad2 100644 --- a/openair1/PHY/INIT/nr_init_ru.c +++ b/openair1/PHY/INIT/nr_init_ru.c @@ -142,8 +142,8 @@ int nr_phy_init_RU(RU_t *ru) { AssertFatal(ru->bw_list[i],"ru->bw_list[%d] is null\n",i); for (re=0; reofdm_symbol_size; re++) ru->beam_weights[i][p][j][re] = ru->bw_list[i][l_ind]; - //printf("Beam Weight %08x for beam %d and tx %d\n",ru->bw_list[i][l_ind],p,j); - l_ind++; + //printf("Beam Weight %08x for beam %d and tx %d\n",ru->bw_list[i][l_ind],p,j); + l_ind++; } // for j //} } // for p From 59f4cfd92acc833428870c6a6a8e1f6db19ef825 Mon Sep 17 00:00:00 2001 From: hardy Date: Wed, 21 Jul 2021 08:19:46 +0200 Subject: [PATCH 579/579] [CI] for gNB Phy test : update of the execution timings ref values, according to the latest developments --- ci-scripts/datalog_rt_stats.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci-scripts/datalog_rt_stats.yaml b/ci-scripts/datalog_rt_stats.yaml index 3680d2a19b..548caa0bdd 100644 --- a/ci-scripts/datalog_rt_stats.yaml +++ b/ci-scripts/datalog_rt_stats.yaml @@ -10,15 +10,15 @@ ColNames : Ref : feprx : 60.0 feptx_prec : 8.0 - feptx_ofdm : 85.0 + feptx_ofdm : 50.0 feptx_total : 75.0 L1 Tx processing : 300.0 DLSCH encoding : 230.0 L1 Rx processing : 175.0 PUSCH inner-receiver : 100.0 PUSCH decoding : 140.0 - DL & UL scheduling timing stats : 15.0 - UL Indication : 20.0 + DL & UL scheduling timing stats : 37.0 + UL Indication : 38.0 Threshold : feprx : 1.25 feptx_prec : 1.25