Commit 4301582f authored by rmagueta's avatar rmagueta

Merge remote-tracking branch 'origin/NR_SA_F1AP_5GRECORDS' into develop-NR_SA_F1AP_5GRECORDS

# Conflicts:
#	openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
#	openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
#	openair2/SIMULATION/NR_RRC/itti_sim.c
parents 2c907fb6 cfe82245
......@@ -794,12 +794,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
......@@ -997,7 +997,7 @@ add_boolean_option(PHY_TX_THREAD False "enable UE_EXPANSION w
add_boolean_option(PRE_SCD_THREAD False "enable UE_EXPANSION with max 256 UE")
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
##########################
......@@ -1999,6 +1999,7 @@ set(L2_SRC
${RRC_DIR}/rrc_eNB_S1AP.c
${RRC_DIR}/rrc_eNB_M2AP.c
${RRC_DIR}/rrc_eNB_UE_context.c
${NR_RRC_DIR}/rrc_gNB_UE_context.c
${RRC_DIR}/rrc_common.c
${RRC_DIR}/L2_interface.c
${RRC_DIR}/L2_interface_common.c
......@@ -2543,7 +2544,7 @@ if(NAS_UE)
endif()
if(ITTI_SIM)
#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
......@@ -2669,7 +2670,7 @@ if(ITTI_SIM)
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")
......@@ -3155,9 +3156,7 @@ target_link_libraries (nr-uesoftmodem
RRC_LIB NR_RRC_LIB NGAP_LIB NGAP_GNB SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_RU_LIB SCHED_UE_LIB SCHED_NR_UE_LIB
PHY_COMMON PHY_NR_COMMON PHY_UE PHY_NR_UE PHY_RU LFDS NR_L2_UE L2_UE_LTE_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB
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 LIB_NAS_SIMUE
-Wl,--end-group z dl)
target_link_libraries (nr-uesoftmodem ${LIBXML2_LIBRARIES})
......
......@@ -68,6 +68,7 @@ USRP_REC_PLAY="False"
BUILD_ECLIPSE=0
NR="False"
ITTI_SIM="False"
RFSIM_NAS="False"
SANITIZE_ADDRESS="False"
OPTIONAL_LIBRARIES="telnetsrv enbscope uescope nrscope msc"
trap handle_ctrl_c INT
......@@ -262,6 +263,8 @@ function main() {
--nrUE)
nrUE=1
NR="True"
rfsimNas=1
RFSIM_NAS="True"
echo_info "Will compile NR UE"
shift;;
--mu)
......@@ -591,7 +594,7 @@ function main() {
config_libconfig_shlib=params_libconfig
# first generate the CMakefile in the right directory
if [ "$eNB" = "1" -o "$eNBocp" = "1" -o "$UE" = "1" -o "$gNB" = "1" -o "$nrUE" = "1" -o "$HW" = "EXMIMO" -o "$ittiSIM" = "1" ] ; then
if [ "$eNB" = "1" -o "$eNBocp" = "1" -o "$UE" = "1" -o "$gNB" = "1" -o "$nrUE" = "1" -o "$HW" = "EXMIMO" -o "$ittiSIM" = "1" -o "$rfsimNas" = "1" ] ; then
# softmodem compilation
......@@ -616,6 +619,7 @@ function main() {
echo "set ( USRP_REC_PLAY $USRP_REC_PLAY )" >> $cmake_file
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 ( SANITIZE_ADDRESS $SANITIZE_ADDRESS )" >> $cmake_file
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file
cd $DIR/$build_dir/build
......
......@@ -111,8 +111,6 @@ const size_t nr_bandtable_size = sizeof(nr_bandtable) / sizeof(nr_bandentry_t);
int NRRIV2BW(int locationAndBandwidth,int N_RB) {
int tmp = locationAndBandwidth/N_RB;
int tmp2 = locationAndBandwidth%N_RB;
if (tmp <= ((N_RB>>1)+1) && (tmp+tmp2)<N_RB) return(tmp+1);
else return(N_RB+1-tmp);
......@@ -121,8 +119,6 @@ int NRRIV2BW(int locationAndBandwidth,int N_RB) {
int NRRIV2PRBOFFSET(int locationAndBandwidth,int N_RB) {
int tmp = locationAndBandwidth/N_RB;
int tmp2 = locationAndBandwidth%N_RB;
if (tmp <= ((N_RB>>1)+1) && (tmp+tmp2)<N_RB) return(tmp2);
else return(N_RB-1-tmp2);
}
......
......@@ -346,6 +346,7 @@ void *rrc_enb_process_msg(void *);
TASK_DEF(TASK_DU_F1, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RRC_UE_SIM, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RRC_GNB_SIM, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_NAS_NRUE, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_MAX, TASK_PRIORITY_MED, 200, NULL, NULL)
#define TASK_DEF(TaskID, pRIO, qUEUEsIZE, FuNc, ThreadFunc) { pRIO, qUEUEsIZE, #TaskID, FuNc, ThreadFunc },
......
......@@ -86,6 +86,7 @@ char * split73_config;
int split73;
AGENT_RRC_xface *agent_rrc_xface[NUM_MAX_ENB]= {0};
AGENT_MAC_xface *agent_mac_xface[NUM_MAX_ENB]= {0};
uint8_t proto_agent_flag = 0;
void flexran_agent_slice_update(mid_t module_idP) {
}
int proto_agent_start(mod_id_t mod_id, const cudu_params_t *p){
......
......@@ -1947,37 +1947,39 @@ void RCconfig_RU(void)
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;
LOG_D(PHY, "RU clock source set as internal\n");
LOG_I(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;
LOG_D(PHY, "RU clock source set as external\n");
LOG_I(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;
LOG_D(PHY, "RU clock source set as gpsdo\n");
LOG_I(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;
LOG_I(PHY,"Setting clock source to internal\n");
RC.ru[j]->openair0_cfg.clock_source = internal;
}
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;
LOG_D(PHY, "RU time source set as internal\n");
LOG_I(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;
LOG_D(PHY, "RU time source set as external\n");
LOG_I(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;
LOG_D(PHY, "RU time source set as gpsdo\n");
LOG_I(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;
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) {
......
......@@ -341,7 +341,7 @@ int create_gNB_tasks(uint32_t gnb_nb) {
}
if (AMF_MODE_ENABLED && (get_softmodem_params()->phy_test==0 && get_softmodem_params()->do_ra==0 && get_softmodem_params()->sa==0)) {
if (AMF_MODE_ENABLED) {
if (gnb_nb > 0) {
/*
if (itti_create_task (TASK_SCTP, sctp_eNB_task, NULL) < 0) {
......@@ -373,14 +373,38 @@ 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");
return -1;
}
LOG_I(NR_RRC,"Creating NR RRC gNB Task\n");
LOG_I(NR_RRC,"Creating NR RRC gNB Task\n");
if (itti_create_task (TASK_RRC_GNB, rrc_gnb_task, NULL) < 0) {
LOG_E(NR_RRC, "Create task for NR RRC gNB failed\n");
return -1;
......@@ -620,33 +644,37 @@ static void wait_nfapi_init(char *thread_name) {
}
void init_pdcp(void) {
//if (!NODE_IS_DU(RC.rrc[0]->node_type)) {
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) {
printf("IS_SOFTMODEM_NOS1 option enabled \n");
pdcp_initmask = pdcp_initmask | ENB_NAS_USE_TUN_BIT | SOFTMODEM_NOKRNMOD_BIT ;
}
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);
pdcp_module_init(pdcp_initmask);
/*if (NODE_IS_CU(RC.rrc[0]->node_type)) {
pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t)proto_agent_send_rlc_data_req);
} else {*/
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 {
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);
}*/
}
}
int main( int argc, char **argv )
{
int ru_id, CC_id = 0;
start_background_system();
///static configuration for NR at the moment
......@@ -672,8 +700,8 @@ int main( int argc, char **argv )
}
openair0_cfg[0].threequarter_fs = threequarter_fs;
AMF_MODE_ENABLED = !IS_SOFTMODEM_NOS1; //!get_softmodem_params()->phy_test;
NGAP_CONF_MODE = !IS_SOFTMODEM_NOS1; //!get_softmodem_params()->phy_test;
AMF_MODE_ENABLED = get_softmodem_params()->sa;
NGAP_CONF_MODE = get_softmodem_params()->sa;
if (get_softmodem_params()->do_ra)
AssertFatal(get_softmodem_params()->phy_test == 0,"RA and phy_test are mutually exclusive\n");
......@@ -714,15 +742,19 @@ 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();
if (RC.nb_nr_inst > 0) {
// 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 */
/*
......@@ -803,36 +835,45 @@ if(!IS_SOFTMODEM_NOS1)
wait_nfapi_init("main?");
}
printf("wait RUs\n");
wait_RUs();
printf("ALL RUs READY!\n");
printf("RC.nb_RU:%d\n", RC.nb_RU);
// once all RUs are ready initialize the rest of the gNBs ((dependence on final RU parameters after configuration)
printf("ALL RUs ready - init gNBs\n");
if(IS_SOFTMODEM_DOSCOPE) {
sleep(1);
scopeParms_t p;
p.argc=&argc;
p.argv=argv;
p.gNB=RC.gNB[0];
p.ru=RC.ru[0];
load_softscope("nr",&p);
}
if (RC.nb_nr_L1_inst > 0) {
printf("wait RUs\n");
wait_RUs();
printf("ALL RUs READY!\n");
printf("RC.nb_RU:%d\n", RC.nb_RU);
// once all RUs are ready initialize the rest of the gNBs ((dependence on final RU parameters after configuration)
printf("ALL RUs ready - init gNBs\n");
if(IS_SOFTMODEM_DOSCOPE) {
sleep(1);
scopeParms_t p;
p.argc=&argc;
p.argv=argv;
p.gNB=RC.gNB[0];
p.ru=RC.ru[0];
load_softscope("nr",&p);
}
if (NFAPI_MODE != NFAPI_MODE_PNF && NFAPI_MODE != NFAPI_MODE_VNF) {
printf("Not NFAPI mode - call init_eNB_afterRU()\n");
init_eNB_afterRU();
} else {
printf("NFAPI mode - DO NOT call init_gNB_afterRU()\n");
}
if (NFAPI_MODE != NFAPI_MODE_PNF && NFAPI_MODE != NFAPI_MODE_VNF) {
printf("Not NFAPI mode - call init_eNB_afterRU()\n");
init_eNB_afterRU();
} else {
printf("NFAPI mode - DO NOT call init_gNB_afterRU()\n");
}
printf("ALL RUs ready - ALL gNBs ready\n");
// connect the TX/RX buffers
printf("Sending sync to all threads\n");
pthread_mutex_lock(&sync_mutex);
sync_var=0;
pthread_cond_broadcast(&sync_cond);
pthread_mutex_unlock(&sync_mutex);
if (nfapi_mode != 1 && nfapi_mode != 2) {
printf("Not NFAPI mode - call init_eNB_afterRU()\n");
init_eNB_afterRU();
} else {
printf("NFAPI mode - DO NOT call init_gNB_afterRU()\n");
}
printf("ALL RUs ready - ALL gNBs ready\n");
// connect the TX/RX buffers
printf("Sending sync to all threads\n");
pthread_mutex_lock(&sync_mutex);
sync_var=0;
pthread_cond_broadcast(&sync_cond);
pthread_mutex_unlock(&sync_mutex);
}
printf("About to call end_configmodule() from %s() %s:%d\n", __FUNCTION__, __FILE__, __LINE__);
end_configmodule();
printf("Called end_configmodule() from %s() %s:%d\n", __FUNCTION__, __FILE__, __LINE__);
......@@ -870,7 +911,10 @@ if(!IS_SOFTMODEM_NOS1)
printf("stopping MODEM threads\n");
// cleanup
stop_gNB(NB_gNB_INST);
stop_RU(NB_RU);
if (RC.nb_nr_L1_inst > 0) {
stop_RU(NB_RU);
}
/* release memory used by the RU/gNB threads (incomplete), after all
* threads have been stopped (they partially use the same memory) */
......
......@@ -278,6 +278,7 @@ void processSlotTX( PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc) {
int tx_slot_type = nr_ue_slot_select(cfg, proc->frame_tx, proc->nr_slot_tx);
uint8_t gNB_id = 0;
LOG_D(PHY,"%d.%d => slot type %d\n",proc->frame_tx,proc->nr_slot_tx,tx_slot_type);
if (tx_slot_type == NR_UPLINK_SLOT || tx_slot_type == NR_MIXED_SLOT){
// trigger L2 to run ue_scheduler thru IF module
......@@ -327,7 +328,7 @@ void processSlotRX( PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc) {
LOG_D(PHY, "In %s: slot %d, time %lu\n", __FUNCTION__, proc->nr_slot_rx, (rdtsc()-a)/3500);
#endif
if(IS_SOFTMODEM_NOS1){
if(IS_SOFTMODEM_NOS1 || get_softmodem_params()->sa){
NR_UE_MAC_INST_t *mac = get_mac_inst(0);
protocol_ctxt_t ctxt;
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, UE->Mod_id, ENB_FLAG_NO, mac->crnti, proc->frame_rx, proc->nr_slot_rx, 0);
......@@ -674,7 +675,11 @@ 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 = mac->scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSlots;
int nrofUplinkSlots = 0;
if (mac->scc_SIB)
nrofUplinkSlots = mac->scc_SIB->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSlots;
else if (mac->scc)
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;
......
......@@ -87,6 +87,10 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "executables/softmodem-common.h"
#include "executables/thread-common.h"
#if defined(ITTI_SIM) || defined(RFSIM_NAS)
#include "nr_nas_msg_sim.h"
#endif
extern const char *duplex_mode[];
msc_interface_t msc_interface;
THREAD_STRUCT thread_struct;
......@@ -150,7 +154,7 @@ 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;
/* see file openair2/LAYER2/MAC/main.c for why abstraction_flag is needed
......@@ -180,7 +184,6 @@ 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);
......@@ -191,7 +194,12 @@ int create_tasks_nrue(uint32_t ue_nb) {
LOG_E(NR_RRC, "Create task for RRC UE failed\n");
return -1;
}
#if defined(ITTI_SIM) || defined(RFSIM_NAS)
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;
}
#endif
}
itti_wait_ready(0);
......@@ -321,8 +329,8 @@ 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", fp->N_RB_DL);
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 nb_rx_antenna %d, nb_tx_antenna %d, threequarter_fs %d\n", fp->nb_antennas_rx, fp->nb_antennas_tx, fp->threequarter_fs);
}
......@@ -384,10 +392,10 @@ void init_pdcp(void) {
}
pdcp_layer_init();
nr_DRB_preconfiguration();*/
pdcp_layer_init();
pdcp_module_init(pdcp_initmask);
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);
LOG_I(PDCP, "Before getting out from init_pdcp() \n");
}
// Stupid function addition because UE itti messages queues definition is common with eNB
......@@ -437,8 +445,12 @@ 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)
if(IS_SOFTMODEM_NOS1 || get_softmodem_params()->sa)
init_pdcp();
NB_UE_INST=1;
......@@ -466,8 +478,20 @@ int main( int argc, char **argv ) {
mac->if_module->phy_config_request(&mac->phy_config);
fapi_nr_config_request_t *nrUE_config = &UE[CC_id]->nrUE_config;
if (get_softmodem_params()->sa) { // set frame config to initial values from command line and assume that the SSB is centered on the grid
nrUE_config->ssb_config.scs_common = get_softmodem_params()->numerology;
nrUE_config->carrier_config.dl_grid_size[nrUE_config->ssb_config.scs_common] = UE[CC_id]->frame_parms.N_RB_DL;
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<<nrUE_config->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<<nrUE_config->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;
nr_init_frame_parms_ue(&UE[CC_id]->frame_parms, nrUE_config, *mac->scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0]);
}
nr_init_frame_parms_ue(&UE[CC_id]->frame_parms, nrUE_config,
mac->scc == NULL ? 78 : *mac->scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0]);
init_symbol_rotation(&UE[CC_id]->frame_parms);
init_nr_ue_vars(UE[CC_id], 0, abstraction_flag);
......@@ -489,7 +513,7 @@ int main( int argc, char **argv ) {
configure_linux();
mlockall(MCL_CURRENT | MCL_FUTURE);
if(IS_SOFTMODEM_DOSCOPE) {
if(IS_SOFTMODEM_DOSCOPE) {
load_softscope("nr",PHY_vars_UE_g[0][0]);
}
......@@ -500,6 +524,14 @@ int main( int argc, char **argv ) {
// wait for end of program
printf("TYPE <CTRL-C> 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
......
......@@ -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:&(fp->N_RB_DL), defintval:25, TYPE_UINT, 0}, \
{"r" , CONFIG_HLP_PRB, 0, iptr:&(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}, \
......
......@@ -84,6 +84,7 @@ extern "C"
#define CONFIG_HLP_TNOFORK "to ease debugging with gdb\n"
#define CONFIG_HLP_NUMEROLOGY "adding numerology for 5G\n"
#define CONFIG_HLP_BAND "band index\n"
#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"
......@@ -108,6 +109,7 @@ extern "C"
#define SINGLE_THREAD_FLAG softmodem_params.single_thread_flag
#define CHAIN_OFFSET softmodem_params.chain_offset
#define NUMEROLOGY softmodem_params.numerology
#define BAND softmodem_params.band
#define EMULATE_RF softmodem_params.emulate_rf
#define CLOCK_SOURCE softmodem_params.clock_source
#define TIMING_SOURCE softmodem_params.timing_source
......@@ -137,6 +139,7 @@ extern int usrp_tx_thread;
{"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}, \
{"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 **)&parallel_config, defstrval:NULL, TYPE_STRING, 0}, \
{"worker-config", CONFIG_HLP_WORKER_CMD, 0, strptr:(char **)&worker_config, defstrval:NULL, TYPE_STRING, 0}, \
......@@ -231,6 +234,7 @@ typedef struct {
int single_thread_flag; //eNodeB only
int chain_offset;
int numerology;
int band;
unsigned int start_msc;
uint32_t clock_source;
uint32_t timing_source;
......
......@@ -14,7 +14,7 @@
/// RX_IND
#define FAPI_NR_RX_PDU_TYPE_MIB 0x01
#define FAPI_NR_RX_PDU_TYPE_SSB 0x01
#define FAPI_NR_RX_PDU_TYPE_SIB 0x02
#define FAPI_NR_RX_PDU_TYPE_DLSCH 0x03
#define FAPI_NR_DCI_IND 0x04
......
......@@ -111,8 +111,8 @@ typedef struct {
uint8_t ssb_index;
uint8_t ssb_length;
uint16_t cell_id;
} fapi_nr_mib_pdu_t;
uint16_t ssb_start_subcarrier;
} fapi_nr_ssb_pdu_t;
typedef struct {
uint32_t pdu_length;
......@@ -124,7 +124,7 @@ typedef struct {
uint8_t pdu_type;
union {
fapi_nr_pdsch_pdu_t pdsch_pdu;
fapi_nr_mib_pdu_t mib_pdu;
fapi_nr_ssb_pdu_t ssb_pdu;
fapi_nr_sib_pdu_t sib_pdu;
};
} fapi_nr_rx_indication_body_t;
......
......@@ -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);
......
......@@ -261,8 +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<<config->ssb_config.scs_common);
LOG_I(PHY,"dl_bw_kHz %llu\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);
uint64_t ul_bw_khz = (12*config->carrier_config.ul_grid_size[config->ssb_config.scs_common])*(15<<config->ssb_config.scs_common);
fp->ul_CarrierFreq = ((ul_bw_khz>>1) + config->carrier_config.uplink_frequency)*1000 ;
......@@ -277,7 +280,7 @@ int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *fp,
LOG_I(PHY, "Initializing frame parms: DL frequency %lu Hz, UL frequency %lu Hz: band %d, uldl offset %d Hz\n", fp->dl_CarrierFreq, fp->ul_CarrierFreq, fp->nr_band, uplink_frequency_offset);
AssertFatal(fp->frame_type==config->cell_config.frame_duplex_type, "Invalid duplex type in config request file for band %d\n", fp->nr_band);
AssertFatal(fp->frame_type==config->cell_config.frame_duplex_type, "Invalid duplex type (frame_type %d,cell_config.frame_duplex_type %d) in config request file for band %d\n", fp->frame_type,config->cell_config.frame_duplex_type,fp->nr_band);
AssertFatal(fp->ul_CarrierFreq == (fp->dl_CarrierFreq + uplink_frequency_offset), "Disagreement in uplink frequency for band %d: ul_CarrierFreq = %lu Hz vs expected %lu Hz\n", fp->nr_band, fp->ul_CarrierFreq, fp->dl_CarrierFreq + uplink_frequency_offset);
......
......@@ -94,6 +94,7 @@ void nr_generate_dci(PHY_VARS_gNB *gNB,
* in time: by its first slot and its first symbol*/
const nfapi_nr_dl_dci_pdu_t *dci_pdu = &pdcch_pdu_rel15->dci_pdu[d];
LOG_D(PHY,"DCI pdu %d, rnti %x, aggregation %d CCE %d Scrambling_Id %x ScramblingRNTI %x PayloadSizeBits %d\n",d,dci_pdu->RNTI,dci_pdu->AggregationLevel,dci_pdu->CceIndex,dci_pdu->ScramblingId,dci_pdu->ScramblingRNTI,dci_pdu->PayloadSizeBits);
cset_start_symb = pdcch_pdu_rel15->StartSymbolIndex;
cset_nsymb = pdcch_pdu_rel15->DurationSymbols;
dci_idx = 0;
......
......@@ -256,10 +256,8 @@ void nr_fill_dci(PHY_VARS_gNB *gNB,
dlsch->rnti = pdcch_pdu_rel15->dci_pdu[i].RNTI;
// nr_fill_cce_list(gNB,0);
/*
LOG_D(PHY, "DCI PDU: [0]->0x%lx \t [1]->0x%lx \n",dci_pdu[0], dci_pdu[1]);
LOG_D(PHY, "DCI type %d payload (size %d) generated on candidate %d\n", dci_alloc->pdcch_params.dci_format, dci_alloc->size, cand_idx);
*/
}
......
......@@ -82,11 +82,12 @@ 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));
out[i]=(in32^s);
// printf("in[%d] %x => %x\n",i,in32,out[i]);
//printf("in[%d] %x => %x\n",i,in32,out[i]);
s=lte_gold_generic(&x1, &x2, 0);
}
#elif defined(__SSE4__)
......@@ -161,6 +162,7 @@ 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;
......
......@@ -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 mod_order %d\n", A,G, 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 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
......
This diff is collapsed.
......@@ -716,6 +716,8 @@ 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);
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");
......@@ -916,7 +918,7 @@ uint8_t nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue,
currentPtrDCI);
n_rnti = rel15->rnti;
LOG_D(PHY, "(%i.%i) dci indication (rnti %x,dci format %d,n_CCE %d,payloadSize %d)\n", proc->frame_rx, proc->nr_slot_rx,n_rnti,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",
proc->frame_rx, proc->nr_slot_rx,n_rnti,rel15->dci_format_options[k],CCEind,dci_length,*(unsigned long long*)dci_estimation);
......
......@@ -589,6 +589,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);
}
......@@ -691,8 +693,8 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
harq_process->F>>3,
(void *)(uint64_t)(harq_process->c[r]) );
if (frame%100 == 0){
LOG_D (PHY, "Printing 10 first payload bytes at frame: %d ", frame);
for (int i = 0; i <10 ; i++){ //Kr_bytes
LOG_D (PHY, "Printing 60 first payload bytes at frame: %d ", frame);
for (int i = 0; i <60 ; i++){ //Kr_bytes
LOG_D(PHY, "[%d] : %x ", i, harq_process->b[i]);
}
}
......@@ -702,6 +704,7 @@ 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);
}
......@@ -1122,7 +1125,6 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
ret = 2;
}
else {
LOG_D(PHY,"CRC NOK\n");
ret = 1+dlsch->max_ldpc_iterations;
}
......
......@@ -3367,10 +3367,8 @@ static int nr_dlsch_llr(NR_UE_PDSCH **pdsch_vars,
}
//==============================================================================================
#ifdef USER_MODE
void dump_dlsch2(PHY_VARS_UE *ue,uint8_t gNB_id,uint8_t nr_slot_rx,unsigned int *coded_bits_per_codeword,int round, unsigned char harq_pid)
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];
......@@ -3378,50 +3376,50 @@ void dump_dlsch2(PHY_VARS_UE *ue,uint8_t gNB_id,uint8_t nr_slot_rx,unsigned int
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[proc->thread_id][gNB_id]->rxdataF_ext[0],12*N_RB_DL*nsymb,1,1);
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[proc->thread_id][gNB_id]->rxdataF_ext[1],12*N_RB_DL*nsymb,1,1);
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[proc->thread_id][gNB_id]->dl_ch_estimates_ext[0],12*N_RB_DL*nsymb,1,1);
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[proc->thread_id][gNB_id]->dl_bf_ch_estimates[0],512*nsymb,1,1);
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[proc->thread_id][gNB_id]->dl_bf_ch_estimates_ext[0],12*N_RB_DL*nsymb,1,1);
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[proc->thread_id][gNB_id]->dl_ch_estimates_ext[1],12*N_RB_DL*nsymb,1,1);
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[proc->thread_id][gNB_id]->dl_ch_estimates_ext[2],12*N_RB_DL*nsymb,1,1);
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[proc->thread_id][gNB_id]->dl_ch_estimates_ext[3],12*N_RB_DL*nsymb,1,1);
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[proc->thread_id][gNB_id]->rxdataF_uespec_pilots[0],12*N_RB_DL,1,1);
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);
......@@ -3431,35 +3429,35 @@ void dump_dlsch2(PHY_VARS_UE *ue,uint8_t gNB_id,uint8_t nr_slot_rx,unsigned int
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[proc->thread_id][gNB_id]->dl_ch_rho_ext[harq_pid][round][0],12*N_RB_DL*nsymb,1,1);
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[proc->thread_id][gNB_id]->dl_ch_rho2_ext[0],12*N_RB_DL*nsymb,1,1);
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[proc->thread_id][gNB_id]->rxdataF_comp0[0],12*N_RB_DL*nsymb,1,1);
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[proc->thread_id][gNB_id]->rxdataF_comp1[harq_pid][round][0],12*N_RB_DL*nsymb,1,1);
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[proc->thread_id][gNB_id]->llr[0], coded_bits_per_codeword[0], 1, 0);
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[proc->thread_id][gNB_id]->dl_ch_mag0[0], 12*N_RB_DL*nsymb, 1, 1);
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[proc->thread_id][gNB_id]->dl_ch_magb0[0], 12*N_RB_DL*nsymb, 1, 1);
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);
}
#endif
#ifdef DEBUG_DLSCH_DEMOD
/*
......
......@@ -613,7 +613,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
uint16_t number_pdus = 1;
nr_fill_dl_indication(&dl_indication, NULL, &rx_ind, proc, ue, gNB_id);
nr_fill_rx_indication(&rx_ind, FAPI_NR_RX_PDU_TYPE_MIB, gNB_id, ue, NULL, number_pdus);
nr_fill_rx_indication(&rx_ind, FAPI_NR_RX_PDU_TYPE_SSB, gNB_id, ue, NULL, number_pdus);
if (ue->if_inst && ue->if_inst->dl_indication)
ue->if_inst->dl_indication(&dl_indication, NULL);
......
......@@ -83,7 +83,7 @@ int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint8_t slot){
mu = nrUE_config->prach_config.prach_sub_c_spacing;
restricted_set = prach_pdu->restricted_set;
rootSequenceIndex = prach_pdu->root_seq_id;
n_ra_prb = prach_pdu->freq_msg1;
n_ra_prb = nrUE_config->prach_config.num_prach_fd_occasions_list[fd_occasion].k1,//prach_pdu->freq_msg1;
NCS = prach_pdu->num_cs;
prach_fmt_id = prach_pdu->prach_format;
preamble_index = prach_resources->ra_PreambleIndex;
......@@ -217,12 +217,13 @@ int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint8_t slot){
k += kbar;
k *= 2;
LOG_I(PHY, "PRACH [UE %d] in slot %d, placing PRACH in position %d, msg1 frequency start %d, preamble_offset %d, first_nonzero_root_idx %d\n", Mod_id,
slot,
k,
n_ra_prb,
preamble_offset,
first_nonzero_root_idx);
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);
Xu = (int16_t*)ue->X_u[preamble_offset-first_nonzero_root_idx];
......
......@@ -146,6 +146,9 @@ 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);
// 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;
harq_process_ul_ue->num_of_mod_symbols = N_RE_prime*nb_rb*num_of_codewords;
......@@ -161,7 +164,8 @@ 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/////////////////////////
///////////
......@@ -361,6 +365,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);
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 {
......
......@@ -62,7 +62,8 @@ void nr_generate_pucch0(PHY_VARS_NR_UE *ue,
uint8_t mcs,
uint8_t nrofSymbols,
uint8_t startingSymbolIndex,
uint16_t startingPRB) {
uint16_t startingPRB,
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
......@@ -94,38 +95,35 @@ void nr_generate_pucch0(PHY_VARS_NR_UE *ue,
* x(l*12+n) = r_u_v_alpha_delta(n)
*/
// the value of u,v (delta always 0 for PUCCH) has to be calculated according to TS 38.211 Subclause 6.3.2.2.1
uint8_t u=0,v=0;//,delta=0;
// if frequency hopping is disabled by the higher-layer parameter PUCCH-frequency-hopping
// n_hop = 0
// if frequency hopping is enabled by the higher-layer parameter PUCCH-frequency-hopping
// n_hop = 0 for first hop
// n_hop = 1 for second hop
uint8_t n_hop = 0;
//uint8_t PUCCH_Frequency_Hopping; // from higher layers FIXME!!
uint8_t u[2]={0,0},v[2]={0,0};
#ifdef DEBUG_NR_PUCCH_TX
printf("\t [nr_generate_pucch0] sequence generation: variable initialization for test\n");
#endif
// x_n contains the sequence r_u_v_alpha_delta(n)
int16_t x_n_re[24],x_n_im[24];
int16_t x_n_re[2][24],x_n_im[2][24];
// we proceed to calculate alpha according to TS 38.211 Subclause 6.3.2.2.2
int prb_offset[2]={startingPRB,startingPRB};
nr_group_sequence_hopping(pucch_GroupHopping,hoppingId,0,nr_slot_tx,&u[0],&v[0]); // calculating u and v value
if (startingPRB!=secondHopPRB) {
nr_group_sequence_hopping(pucch_GroupHopping,hoppingId,1,nr_slot_tx,&u[1],&v[1]); // calculating u and v value
prb_offset[1] = secondHopPRB;
}
for (int l=0; l<nrofSymbols; l++) {
// if frequency hopping is enabled n_hop = 1 for second hop. Not sure frequency hopping concerns format 0. FIXME!!!
// if ((PUCCH_Frequency_Hopping == 1)&&(l == (nrofSymbols-1))) n_hop = 1;
nr_group_sequence_hopping(pucch_GroupHopping,hoppingId,n_hop,nr_slot_tx,&u,&v); // calculating u and v value
alpha = nr_cyclic_shift_hopping(hoppingId,m0,mcs,l,startingSymbolIndex,nr_slot_tx);
#ifdef DEBUG_NR_PUCCH_TX
printf("\t [nr_generate_pucch0] sequence generation \tu=%d \tv=%d \talpha=%lf \t(for symbol l=%d)\n",u,v,alpha,l);
printf("\t [nr_generate_pucch0] sequence generation \tu=%d \tv=%d \talpha=%lf \t(for symbol l=%d)\n",u[l],v[l],alpha,l);
#endif
for (int n=0; n<12; n++) {
x_n_re[(12*l)+n] = (int16_t)(((((int32_t)(round(32767*cos(alpha*n))) * table_5_2_2_2_2_Re[u][n])>>15)
- (((int32_t)(round(32767*sin(alpha*n))) * table_5_2_2_2_2_Im[u][n])>>15))); // Re part of base sequence shifted by alpha
x_n_im[(12*l)+n] = (int16_t)(((((int32_t)(round(32767*cos(alpha*n))) * table_5_2_2_2_2_Im[u][n])>>15)
+ (((int32_t)(round(32767*sin(alpha*n))) * table_5_2_2_2_2_Re[u][n])>>15))); // Im part of base sequence shifted by alpha
x_n_re[l][n] = (int16_t)(((((int32_t)(round(32767*cos(alpha*n))) * table_5_2_2_2_2_Re[u[l]][n])>>15)
- (((int32_t)(round(32767*sin(alpha*n))) * table_5_2_2_2_2_Im[u[l]][n])>>15))); // Re part of base sequence shifted by alpha
x_n_im[l][n] = (int16_t)(((((int32_t)(round(32767*cos(alpha*n))) * table_5_2_2_2_2_Im[u[l]][n])>>15)
+ (((int32_t)(round(32767*sin(alpha*n))) * table_5_2_2_2_2_Re[u[l]][n])>>15))); // Im part of base sequence shifted by alpha
#ifdef DEBUG_NR_PUCCH_TX
printf("\t [nr_generate_pucch0] sequence generation \tu=%d \tv=%d \talpha=%lf \tx_n(l=%d,n=%d)=(%d,%d)\n",
u,v,alpha,l,n,x_n_re[(12*l)+n],x_n_im[(12*l)+n]);
u[l],v[l],alpha,l,n,x_n_re[l][n],x_n_im[l][n]);
#endif
}
}
......@@ -139,15 +137,18 @@ void nr_generate_pucch0(PHY_VARS_NR_UE *ue,
for (int l=0; l<nrofSymbols; l++) {
l2=l+startingSymbolIndex;
re_offset = (12*startingPRB) + frame_parms->first_carrier_offset;
re_offset = (12*prb_offset[l]) + frame_parms->first_carrier_offset;
if (re_offset>= frame_parms->ofdm_symbol_size)
re_offset-=frame_parms->ofdm_symbol_size;
//txptr = &txdataF[0][re_offset];
#ifdef DEBUG_NR_PUCCH_TX
printf("\t [nr_generate_pucch0] symbol %d PRB %d (%d)\n",l,prb_offset[l],re_offset);
#endif
for (int n=0; n<12; n++) {
((int16_t *)&txdataF[0][(l2*frame_parms->ofdm_symbol_size) + re_offset])[0] = (int16_t)(((int32_t)(amp) * x_n_re[(12*l)+n])>>15);
((int16_t *)&txdataF[0][(l2*frame_parms->ofdm_symbol_size) + re_offset])[1] = (int16_t)(((int32_t)(amp) * x_n_im[(12*l)+n])>>15);
((int16_t *)&txdataF[0][(l2*frame_parms->ofdm_symbol_size) + re_offset])[0] = (int16_t)(((int32_t)(amp) * x_n_re[l][n])>>15);
((int16_t *)&txdataF[0][(l2*frame_parms->ofdm_symbol_size) + re_offset])[1] = (int16_t)(((int32_t)(amp) * x_n_im[l][n])>>15);
//((int16_t *)txptr[0][re_offset])[0] = (int16_t)((int32_t)amp * x_n_re[(12*l)+n])>>15;
//((int16_t *)txptr[0][re_offset])[1] = (int16_t)((int32_t)amp * x_n_im[(12*l)+n])>>15;
//txptr[re_offset] = (x_n_re[(12*l)+n]<<16) + x_n_im[(12*l)+n];
......
......@@ -57,7 +57,8 @@ void nr_generate_pucch0(PHY_VARS_NR_UE *ue,
uint8_t mcs,
uint8_t nrofSymbols,
uint8_t startingSymbolIndex,
uint16_t startingPRB);
uint16_t startingPRB,
uint16_t secondHopPRB);
void nr_generate_pucch1(PHY_VARS_NR_UE *ue,
int32_t **txdataF,
NR_DL_FRAME_PARMS *frame_parms,
......
......@@ -249,7 +249,7 @@ void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req) {
// if all segments are done
if (rdata->nbSegments == ulsch_harq->processedSegments) {
if (decodeSuccess) {
LOG_D(PHY,"[gNB %d] ULSCH: Setting ACK for slot %d TBS %d\n",
LOG_I(PHY,"[gNB %d] ULSCH: Setting ACK for slot %d TBS %d\n",
gNB->Mod_id,ulsch_harq->slot,ulsch_harq->TBS);
ulsch_harq->status = SCH_IDLE;
ulsch_harq->round = 0;
......@@ -257,8 +257,9 @@ 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);
} 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",
// log_dump(PHY, ulsch_harq->b, 16, LOG_DUMP_CHAR,"gnb pusch rx frame %d %d: ", ulsch_harq->frame, ulsch_harq->slot);
} else {
LOG_I(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,
rdata->harq_pid,ulsch_harq->status, ulsch_harq->round,ulsch_harq->TBS,r);
if (ulsch_harq->round >= ulsch->Mlimit) {
......
......@@ -267,9 +267,11 @@ int8_t nr_ue_phy_config_request(nr_phy_config_t *phy_config){
fapi_nr_config_request_t *nrUE_config = &PHY_vars_UE_g[phy_config->Mod_id][phy_config->CC_id]->nrUE_config;
if(phy_config != NULL)
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;
}
return 0;
}
......
......@@ -46,6 +46,8 @@ int nr_ue_slot_select(fapi_nr_config_request_t *cfg, int nr_frame, int nr_slot)
if (cfg->cell_config.frame_duplex_type == FDD) {
return (NR_UPLINK_SLOT | NR_DOWNLINK_SLOT);
}
if (cfg->tdd_table.max_tdd_periodicity_list == NULL) // this happens before receiving TDD configuration
return (NR_DOWNLINK_SLOT);
if (nr_frame%2 == 0) {
for(int symbol_count=0; symbol_count<NR_NUMBER_OF_SYMBOLS_PER_SLOT; symbol_count++) {
......
......@@ -139,12 +139,13 @@ void nr_fill_rx_indication(fapi_nr_rx_indication_t *rx_ind,
rx_ind->rx_indication_body[n_pdus - 1].pdsch_pdu.pdu = dlsch0->harq_processes[harq_pid]->b;
rx_ind->rx_indication_body[n_pdus - 1].pdsch_pdu.pdu_length = dlsch0->harq_processes[harq_pid]->TBS / 8;
break;
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_length = frame_parms->Lmax;
rx_ind->rx_indication_body[n_pdus - 1].mib_pdu.cell_id = frame_parms->Nid_cell;
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_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;
break;
default:
break;
......@@ -276,14 +277,12 @@ void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue,
}
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);
......@@ -293,7 +292,7 @@ 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);
LOG_D(PHY,"****** end TX-Chain (%s) for AbsSubframe %d.%d ******\n", nr_mode_string[ue->UE_mode[gNB_id]],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
......@@ -2065,9 +2064,9 @@ void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t
} else {
LOG_D(PHY, "In %s:[%d.%d] getting PRACH resources\n", __FUNCTION__, frame_tx, nr_slot_tx);
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);
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);
}
if (nr_prach == GENERATE_PREAMBLE) {
......@@ -2077,7 +2076,7 @@ void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t
int16_t ra_preamble_rx_power = (int16_t)(prach_resources->ra_PREAMBLE_RECEIVED_TARGET_POWER - pathloss + 30);
ue->tx_power_dBm[nr_slot_tx] = min(nr_get_Pcmax(mod_id), ra_preamble_rx_power);
LOG_I(PHY,"DEBUG [UE %d][RAPROC][%d.%d]: Generating PRACH Msg1 (preamble %d, PL %d dB, P0_PRACH %d, TARGET_RECEIVED_POWER %d dBm, RA-RNTI %x)\n",
LOG_D(PHY,"DEBUG [UE %d][RAPROC][%d.%d]: Generating PRACH Msg1 (preamble %d, PL %d dB, P0_PRACH %d, TARGET_RECEIVED_POWER %d dBm, RA-RNTI %x)\n",
mod_id,
frame_tx,
nr_slot_tx,
......
This diff is collapsed.
......@@ -24,10 +24,13 @@ MESSAGE_DEF(F1AP_CU_SCTP_REQ , MESSAGE_PRIORITY_MED, f1ap_cu_setup_req_t
/* eNB_DU application layer -> F1AP messages or CU F1AP -> RRC*/
MESSAGE_DEF(F1AP_SETUP_REQ , MESSAGE_PRIORITY_MED, f1ap_setup_req_t , f1ap_setup_req)
MESSAGE_DEF(F1AP_GNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE , MESSAGE_PRIORITY_MED, f1ap_gnb_cu_configuration_update_acknowledge_t , f1ap_gnb_cu_configuration_update_acknowledge)
MESSAGE_DEF(F1AP_GNB_CU_CONFIGURATION_UPDATE_FAILURE , MESSAGE_PRIORITY_MED, f1ap_gnb_cu_configuration_update_failure_t , f1ap_gnb_cu_configuration_update_failure)
/* F1AP -> eNB_DU or eNB_CU_RRC -> F1AP application layer messages */
MESSAGE_DEF(F1AP_SETUP_RESP , MESSAGE_PRIORITY_MED, f1ap_setup_resp_t , f1ap_setup_resp)
MESSAGE_DEF(F1AP_SETUP_FAILURE , MESSAGE_PRIORITY_MED, f1ap_setup_failure_t , f1ap_setup_failure)
MESSAGE_DEF(F1AP_GNB_CU_CONFIGURATION_UPDATE , MESSAGE_PRIORITY_MED, f1ap_gnb_cu_configuration_update_t , f1ap_gnb_cu_configuration_update)
/* MAC -> F1AP messages */
MESSAGE_DEF(F1AP_INITIAL_UL_RRC_MESSAGE , MESSAGE_PRIORITY_MED, f1ap_initial_ul_rrc_message_t , f1ap_initial_ul_rrc_message)
......
......@@ -31,6 +31,9 @@
#define F1AP_SETUP_REQ(mSGpTR) (mSGpTR)->ittiMsg.f1ap_setup_req
#define F1AP_SETUP_RESP(mSGpTR) (mSGpTR)->ittiMsg.f1ap_setup_resp
#define F1AP_GNB_CU_CONFIGURATION_UPDATE(mSGpTR) (mSGpTR)->ittiMsg.f1ap_gnb_cu_configuration_update
#define F1AP_GNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE(mSGpTR) (mSGpTR)->ittiMsg.f1ap_gnb_cu_configuration_update_acknowledge
#define F1AP_GNB_CU_CONFIGURATION_UPDATE_FAILURE(mSGpTR) (mSGpTR)->ittiMsg.f1ap_gnb_cu_configuration_update_failure
#define F1AP_SETUP_FAILURE(mSGpTR) (mSGpTR)->ittiMsg.f1ap_setup_failure
#define F1AP_INITIAL_UL_RRC_MESSAGE(mSGpTR) (mSGpTR)->ittiMsg.f1ap_initial_ul_rrc_message
......@@ -55,6 +58,8 @@
// Note this should be 512 from maxval in 38.473
#define F1AP_MAX_NB_CELLS 2
#define F1AP_MAX_NO_OF_TNL_ASSOCIATIONS 32
#define F1AP_MAX_NO_UE_ID 1024
typedef struct f1ap_net_ip_address_s {
unsigned ipv4:1;
unsigned ipv6:1;
......@@ -98,7 +103,7 @@ typedef struct f1ap_setup_req_s {
// Served Cell Information
/* Tracking area code */
uint16_t tac[F1AP_MAX_NB_CELLS];
uint32_t tac[F1AP_MAX_NB_CELLS];
/* Mobile Country Codes
* Mobile Network Codes
......@@ -174,6 +179,24 @@ typedef struct f1ap_setup_req_s {
} f1ap_setup_req_t;
typedef struct served_cells_to_activate_s {
/// mcc of DU cells
uint16_t mcc;
/// mnc of DU cells
uint16_t mnc;
/// mnc digit length of DU cells
uint8_t mnc_digit_length;
// NR Global Cell Id
uint64_t nr_cellid;
/// NRPCI
uint16_t nrpci;
/// num SI messages per DU cell
uint8_t num_SI;
/// SI message containers (up to 21 messages per cell)
uint8_t *SI_container[21];
int SI_container_length[21];
} served_cells_to_activate_t;
typedef struct f1ap_setup_resp_s {
/* Connexion id used between SCTP/F1AP */
uint16_t cnx_id;
......@@ -189,29 +212,62 @@ typedef struct f1ap_setup_resp_s {
char *gNB_CU_name;
/// number of DU cells to activate
uint16_t num_cells_to_activate; //0< num_cells_to_activate <= 512;
/// mcc of DU cells
uint16_t mcc[F1AP_MAX_NB_CELLS];
/// mnc of DU cells
uint16_t mnc[F1AP_MAX_NB_CELLS];
/// mnc digit length of DU cells
uint8_t mnc_digit_length[F1AP_MAX_NB_CELLS];
// NR Global Cell Id
uint64_t nr_cellid[F1AP_MAX_NB_CELLS];
/// NRPCI
uint16_t nrpci[F1AP_MAX_NB_CELLS];
/// num SI messages per DU cell
uint8_t num_SI[F1AP_MAX_NB_CELLS];
/// SI message containers (up to 21 messages per cell)
uint8_t *SI_container[F1AP_MAX_NB_CELLS][21];
int SI_container_length[F1AP_MAX_NB_CELLS][21];
served_cells_to_activate_t cells_to_activate[F1AP_MAX_NB_CELLS];
} f1ap_setup_resp_t;
typedef struct f1ap_gnb_cu_configuration_update_s {
/* Connexion id used between SCTP/F1AP */
uint16_t cnx_id;
/* SCTP association id */
int32_t assoc_id;
/* Number of SCTP streams used for a mme association */
uint16_t sctp_in_streams;
uint16_t sctp_out_streams;
/// string holding gNB_CU_name
char *gNB_CU_name;
/// number of DU cells to activate
uint16_t num_cells_to_activate; //0< num_cells_to_activate/mod <= 512;
served_cells_to_activate_t cells_to_activate[F1AP_MAX_NB_CELLS];
} f1ap_gnb_cu_configuration_update_t;
typedef struct f1ap_setup_failure_s {
uint16_t cause;
uint16_t time_to_wait;
uint16_t criticality_diagnostics;
} f1ap_setup_failure_t;
typedef struct f1ap_gnb_cu_configuration_update_acknowledge_s {
uint16_t num_cells_failed_to_be_activated;
uint16_t mcc[F1AP_MAX_NB_CELLS];
uint16_t mnc[F1AP_MAX_NB_CELLS];
uint8_t mnc_digit_length[F1AP_MAX_NB_CELLS];
uint64_t nr_cellid[F1AP_MAX_NB_CELLS];
uint16_t cause[F1AP_MAX_NB_CELLS];
int have_criticality;
uint16_t criticality_diagnostics;
uint16_t noofTNLAssociations_to_setup;
uint16_t have_port[F1AP_MAX_NO_OF_TNL_ASSOCIATIONS];
in_addr_t tl_address[F1AP_MAX_NO_OF_TNL_ASSOCIATIONS]; // currently only IPv4 supported
uint16_t noofTNLAssociations_failed;
in_addr_t tl_address_failed[F1AP_MAX_NO_OF_TNL_ASSOCIATIONS]; // currently only IPv4 supported
uint16_t cause_failed[F1AP_MAX_NO_OF_TNL_ASSOCIATIONS];
uint16_t noofDedicatedSIDeliveryNeededUEs;
uint32_t gNB_CU_ue_id[F1AP_MAX_NO_UE_ID];
uint16_t ue_mcc[F1AP_MAX_NO_UE_ID];
uint16_t ue_mnc[F1AP_MAX_NO_UE_ID];
uint8_t ue_mnc_digit_length[F1AP_MAX_NO_UE_ID];
uint64_t ue_nr_cellid[F1AP_MAX_NO_UE_ID];
} f1ap_gnb_cu_configuration_update_acknowledge_t;
typedef struct f1ap_gnb_cu_configuration_update_failure_s {
uint16_t cause;
uint16_t time_to_wait;
uint16_t criticality_diagnostics;
} f1ap_gnb_cu_configuration_update_failure_t;
typedef struct f1ap_dl_rrc_message_s {
uint32_t gNB_CU_ue_id;
......
......@@ -33,4 +33,5 @@ MESSAGE_DEF(GTPV1U_ENB_S1_REQ, MESSAGE_PRIORITY_MED, Gtpv1uS1Req, gtpv
MESSAGE_DEF(GTPV1U_GNB_DELETE_TUNNEL_REQ, MESSAGE_PRIORITY_MED, gtpv1u_gnb_delete_tunnel_req_t, NRGtpv1uDeleteTunnelReq)
MESSAGE_DEF(GTPV1U_GNB_DELETE_TUNNEL_RESP, MESSAGE_PRIORITY_MED, gtpv1u_gnb_delete_tunnel_resp_t, NRGtpv1uDeleteTunnelResp)
MESSAGE_DEF(GTPV1U_GNB_NG_REQ, MESSAGE_PRIORITY_MED, Gtpv1uNGReq, gtpv1uNGReq)
MESSAGE_DEF(GTPV1U_GNB_NG_REQ, MESSAGE_PRIORITY_MED, Gtpv1uNGReq, gtpv1uNGReq)
MESSAGE_DEF(GTPV1U_GNB_TUNNEL_DATA_REQ, MESSAGE_PRIORITY_MED, gtpv1u_gnb_tunnel_data_req_t, NRGtpv1uTunnelDataReq)
......@@ -44,6 +44,7 @@
#define GTPV1U_GNB_DELETE_TUNNEL_REQ(mSGpTR) (mSGpTR)->ittiMsg.NRGtpv1uDeleteTunnelReq
#define GTPV1U_GNB_DELETE_TUNNEL_RESP(mSGpTR) (mSGpTR)->ittiMsg.NRGtpv1uDeleteTunnelResp
#define GTPV1U_GNB_NG_REQ(mSGpTR) (mSGpTR)->ittiMsg.gtpv1uNGReq
#define GTPV1U_GNB_TUNNEL_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.NRGtpv1uTunnelDataReq
#define GTPV1U_ALL_TUNNELS_TEID (teid_t)0xFFFFFFFF
......@@ -212,4 +213,12 @@ typedef struct gtpv1u_gnb_delete_tunnel_resp_s {
teid_t gnb_NGu_teid; ///< local NGU Tunnel Endpoint Identifier to be deleted
} gtpv1u_gnb_delete_tunnel_resp_t;
typedef struct gtpv1u_gnb_tunnel_data_req_s {
uint8_t *buffer;
uint32_t length;
uint32_t offset; ///< start of message offset in buffer
rnti_t rnti;
pdusessionid_t pdusession_id;
} gtpv1u_gnb_tunnel_data_req_t;
#endif /* GTPV1_U_MESSAGES_TYPES_H_ */
......@@ -30,6 +30,7 @@
#define MAC_MESSAGES_TYPES_H_
#include <LTE_DRX-Config.h>
#include "OCTET_STRING.h"
//-------------------------------------------------------------------------------------------//
// Defines to access message fields.
......@@ -143,6 +144,7 @@ typedef struct NRRrcMacCcchDataInd_s {
uint16_t rnti;
uint32_t sdu_size;
uint8_t sdu[CCCH_SDU_SIZE];
OCTET_STRING_t *du_to_cu_rrc_container;
uint8_t gnb_index;
int CC_id;
} NRRrcMacCcchDataInd;
......
......@@ -33,4 +33,5 @@ MESSAGE_DEF(RRC_DCCH_DATA_IND, MESSAGE_PRIORITY_MED_PLUS, RrcDcchDataIn
MESSAGE_DEF(RRC_PCCH_DATA_REQ, MESSAGE_PRIORITY_MED_PLUS, RrcPcchDataReq, rrc_pcch_data_req)
// gNB
MESSAGE_DEF(NR_RRC_DCCH_DATA_REQ, MESSAGE_PRIORITY_MED_PLUS, NRRrcDcchDataReq, nr_rrc_dcch_data_req)
MESSAGE_DEF(NR_RRC_DCCH_DATA_IND, MESSAGE_PRIORITY_MED_PLUS, NRRrcDcchDataInd, nr_rrc_dcch_data_ind)
......@@ -36,6 +36,7 @@
#define RRC_PCCH_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.rrc_pcch_data_req
// gNB
#define NR_RRC_DCCH_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.nr_rrc_dcch_data_req
#define NR_RRC_DCCH_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.nr_rrc_dcch_data_ind
//-------------------------------------------------------------------------------------------//
......@@ -64,6 +65,20 @@ typedef struct RrcDcchDataInd_s {
uint8_t eNB_index; // LG: needed in UE
} RrcDcchDataInd;
typedef struct NRRrcDcchDataReq_s {
uint32_t frame;
uint8_t gnb_flag;
rb_id_t rb_id;
uint32_t muip;
uint32_t confirmp;
uint32_t sdu_size;
uint8_t *sdu_p;
uint8_t mode;
uint16_t rnti;
uint8_t module_id;
uint8_t gNB_index;
} NRRrcDcchDataReq;
typedef struct NRRrcDcchDataInd_s {
uint32_t frame;
uint8_t dcch_index;
......
......@@ -3145,21 +3145,21 @@ void handle_f1ap_setup_resp(f1ap_setup_resp_t *resp) {
rrc_eNB_carrier_data_t *carrier = &RC.rrc[i]->carrier[0];
// identify local index of cell j by nr_cellid, plmn identity and physical cell ID
LOG_I(ENB_APP, "Checking cell %d, rrc inst %d : rrc->nr_cellid %lx, resp->nr_cellid %lx\n",
j,i,RC.rrc[i]->nr_cellid,resp->nr_cellid[j]);
j,i,RC.rrc[i]->nr_cellid,resp->cells_to_activate[j].nr_cellid);
if (RC.rrc[i]->nr_cellid == resp->nr_cellid[j] &&
(check_plmn_identity(carrier, resp->mcc[j], resp->mnc[j], resp->mnc_digit_length[j])>0 &&
resp->nrpci[j] == carrier->physCellId)) {
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)) {
// copy system information and decode it
for (si_ind=0; si_ind<resp->num_SI[j]; si_ind++) {
for (si_ind=0; si_ind<resp->cells_to_activate[j].num_SI; si_ind++) {
//printf("SI %d size %d: ", si_ind, resp->SI_container_length[j][si_ind]);
//for (int n=0;n<resp->SI_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]);
resp->cells_to_activate[j].SI_container[si_ind],
resp->cells_to_activate[j].SI_container_length[si_ind]);
}
// perform MAC/L1 common configuration
......
This diff is collapsed.
-- **************************************************************
--
-- 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
This diff is collapsed.
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
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -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"
......
......@@ -85,8 +85,7 @@ int CU_send_gNB_DU_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance,
/*
* gNB-CU Configuration Update
*/
int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, module_id_t du_mod_idP);
int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configuration_update_t *f1ap_gnb_cu_configuration_update);
int CU_handle_gNB_CU_CONFIGURATION_UPDATE_FAILURE(instance_t instance,
uint32_t assoc_id,
uint32_t stream,
......
......@@ -109,35 +109,67 @@ 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,
F1AP_ProtocolIE_ID_id_RRCContainer, true);
AssertFatal(ie!=NULL,"RRCContainer is missing\n");
// create an ITTI message and copy SDU
message_p = itti_alloc_new_message (TASK_CU_F1, 0, RRC_MAC_CCCH_DATA_IND);
memset (RRC_MAC_CCCH_DATA_IND (message_p).sdu, 0, CCCH_SDU_SIZE);
ccch_sdu_len = ie->value.choice.RRCContainer.size;
memcpy(RRC_MAC_CCCH_DATA_IND (message_p).sdu, ie->value.choice.RRCContainer.buf,
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[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;
memcpy(NR_RRC_MAC_CCCH_DATA_IND (message_p).sdu, ie->value.choice.RRCContainer.buf,
ccch_sdu_len);
} else {
message_p = itti_alloc_new_message (TASK_CU_F1, 0, RRC_MAC_CCCH_DATA_IND);
memset (RRC_MAC_CCCH_DATA_IND (message_p).sdu, 0, CCCH_SDU_SIZE);
ccch_sdu_len = ie->value.choice.RRCContainer.size;
memcpy(RRC_MAC_CCCH_DATA_IND (message_p).sdu, ie->value.choice.RRCContainer.buf,
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");
/* 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;
for (int i=0;i<RC.nb_inst;i++) {
if (RC.nrrrc[GNB_INSTANCE_TO_MODULE_ID(instance)]->node_type == ngran_gNB_CU) {
for (int i=0;i<RC.nb_nr_inst;i++) {
// first get RRC instance (note, no the ITTI instance)
gNB_RRC_INST *rrc = RC.nrrrc[i];
if (rrc->nr_cellid == nr_cellid) {
rrc_inst = i;
break;
}
}
} else {
for (int i=0;i<RC.nb_inst;i++) {
// first get RRC instance (note, no the ITTI instance)
eNB_RRC_INST *rrc = RC.rrc[i];
if (rrc->nr_cellid == nr_cellid) {
rrc_inst = i;
break;
eNB_RRC_INST *rrc = RC.rrc[i];
if (rrc->nr_cellid == nr_cellid) {
rrc_inst = i;
break;
}
}
}
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);
......@@ -148,15 +180,23 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
}
f1ap_cu_inst[rrc_inst].f1ap_ue[f1ap_uid].du_ue_f1ap_id = du_ue_f1ap_id;
RRC_MAC_CCCH_DATA_IND (message_p).frame = 0;
RRC_MAC_CCCH_DATA_IND (message_p).sub_frame = 0;
RRC_MAC_CCCH_DATA_IND (message_p).sdu_size = ccch_sdu_len;
RRC_MAC_CCCH_DATA_IND (message_p).enb_index = rrc_inst; // CU instance
RRC_MAC_CCCH_DATA_IND (message_p).rnti = rnti;
RRC_MAC_CCCH_DATA_IND (message_p).CC_id = CC_id;
itti_send_msg_to_task (TASK_RRC_ENB, instance, message_p);
if (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;
NR_RRC_MAC_CCCH_DATA_IND (message_p).gnb_index = rrc_inst; // CU instance
NR_RRC_MAC_CCCH_DATA_IND (message_p).rnti = rnti;
NR_RRC_MAC_CCCH_DATA_IND (message_p).CC_id = CC_id;
itti_send_msg_to_task (TASK_RRC_GNB, instance, message_p);
} else {
RRC_MAC_CCCH_DATA_IND (message_p).frame = 0;
RRC_MAC_CCCH_DATA_IND (message_p).sub_frame = 0;
RRC_MAC_CCCH_DATA_IND (message_p).sdu_size = ccch_sdu_len;
RRC_MAC_CCCH_DATA_IND (message_p).enb_index = rrc_inst; // CU instance
RRC_MAC_CCCH_DATA_IND (message_p).rnti = rnti;
RRC_MAC_CCCH_DATA_IND (message_p).CC_id = CC_id;
itti_send_msg_to_task (TASK_RRC_ENB, instance, message_p);
}
return 0;
}
......@@ -171,6 +211,7 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
f1ap_dl_rrc_message_t *f1ap_dl_rrc)
{
LOG_D(F1AP, "CU send DL_RRC_MESSAGE_TRANSFER \n");
F1AP_F1AP_PDU_t pdu;
F1AP_DLRRCMessageTransfer_t *out;
F1AP_DLRRCMessageTransferIEs_t *ie;
......@@ -252,31 +293,36 @@ 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");
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 */
/* TODO */
if (0) {
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;
ie->value.choice.RAT_FrequencyPriorityInformation.present = F1AP_RAT_FrequencyPriorityInformation_PR_subscriberProfileIDforRFP;
ie->value.choice.RAT_FrequencyPriorityInformation.choice.subscriberProfileIDforRFP = 123L;
//ie->value.choice.RAT_FrequencyPriorityInformation.present = F1AP_RAT_FrequencyPriorityInformation_PR_rAT_FrequencySelectionPriority;
//ie->value.choice.RAT_FrequencyPriorityInformation.choice.rAT_FrequencySelectionPriority = 123L;
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);
}
/* encode */
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
LOG_E(F1AP, "Failed to encode F1 setup request\n");
LOG_E(F1AP, "Failed to encode F1 DL RRC MESSAGE TRANSFER \n");
return -1;
}
......@@ -298,7 +344,6 @@ 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;
......@@ -348,6 +393,7 @@ int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
// print message in debug mode
// create an ITTI message and copy SDU
/*
message_p = itti_alloc_new_message (TASK_CU_F1, 0, RRC_DCCH_DATA_IND);
......@@ -370,6 +416,8 @@ int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
ctxt.instance = instance;
ctxt.rnti = f1ap_get_rnti_by_cu_id(&f1ap_cu_inst[instance], cu_ue_f1ap_id);
ctxt.enb_flag = 1;
ctxt.eNB_index = 0;
ctxt.configured = 1;
mem_block_t *mb = get_free_mem_block(ie->value.choice.RRCContainer.size,__func__);
memcpy((void*)mb->data,(void*)ie->value.choice.RRCContainer.buf,ie->value.choice.RRCContainer.size);
LOG_I(F1AP, "Calling pdcp_data_ind for UE RNTI %x srb_id %lu with size %ld (DCCH) \n", ctxt.rnti, srb_id, ie->value.choice.RRCContainer.size);
......
......@@ -39,6 +39,7 @@
#include "proto_agent.h"
extern RAN_CONTEXT_t RC;
extern uint8_t proto_agent_flag;
f1ap_setup_req_t *f1ap_du_data_from_du;
f1ap_cudu_inst_t f1ap_cu_inst[MAX_eNB];
......@@ -72,13 +73,14 @@ void cu_task_handle_sctp_association_resp(instance_t instance, sctp_new_associat
/* setup parameters for F1U and start the server */
const cudu_params_t params = {
.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
.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
};
AssertFatal(proto_agent_start(instance, &params) == 0,
"could not start PROTO_AGENT for F1U on instance %ld!\n", instance);
proto_agent_flag = 1;
}
void cu_task_handle_sctp_data_ind(instance_t instance, sctp_data_ind_t *sctp_data_ind) {
......@@ -107,7 +109,11 @@ 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;
message_p->ittiMsg.sctp_init.ipv4_address[0] = inet_addr(RC.rrc[enb_id]->eth_params_s.my_addr);
if (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);
}
/*
* SR WARNING: ipv6 multi-homing fails sometimes for localhost.
* * * * Disable it for now.
......@@ -166,13 +172,27 @@ void *F1AP_CU_task(void *arg) {
&F1AP_SETUP_RESP(received_msg));
break;
case F1AP_DL_RRC_MESSAGE: // from rrc
case F1AP_GNB_CU_CONFIGURATION_UPDATE: // from rrc
LOG_I(F1AP, "CU Task Received F1AP_GNB_CU_CONFIGURAITON_UPDATE\n");
// CU_send_f1setup_resp(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
// &F1AP_SETUP_RESP(received_msg));
CU_send_gNB_CU_CONFIGURATION_UPDATE(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
&F1AP_GNB_CU_CONFIGURATION_UPDATE(received_msg));
break;
case F1AP_DL_RRC_MESSAGE: // from rrc
LOG_I(F1AP, "CU Task Received F1AP_DL_RRC_MESSAGE\n");
CU_send_DL_RRC_MESSAGE_TRANSFER(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
&F1AP_DL_RRC_MESSAGE(received_msg));
break;
case F1AP_UE_CONTEXT_RELEASE_CMD: // from rrc
case F1AP_UE_CONTEXT_SETUP_REQ: // from rrc
LOG_I(F1AP, "CU Task Received F1AP_UE_CONTEXT_SETUP_REQ\n");
CU_send_UE_CONTEXT_SETUP_REQUEST(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
&F1AP_UE_CONTEXT_SETUP_REQ(received_msg));
break;
case F1AP_UE_CONTEXT_RELEASE_CMD: // from rrc
LOG_I(F1AP, "CU Task Received F1AP_UE_CONTEXT_RELEASE_CMD\n");
CU_send_UE_CONTEXT_RELEASE_COMMAND(ITTI_MSG_DESTINATION_INSTANCE(received_msg),
&F1AP_UE_CONTEXT_RELEASE_CMD(received_msg));
......
This diff is collapsed.
......@@ -98,10 +98,10 @@ 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_GNBCUConfigurationUpdateFailure_t *GNBCUConfigurationUpdateFailure);
f1ap_gnb_cu_configuration_update_failure_t *GNBCUConfigurationUpdateFailure);
int DU_send_gNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE(instance_t instance,
F1AP_GNBCUConfigurationUpdateAcknowledge_t *GNBCUConfigurationUpdateAcknowledge);
f1ap_gnb_cu_configuration_update_acknowledge_t *GNBCUConfigurationUpdateAcknowledge);
/*
......
This diff is collapsed.
......@@ -33,7 +33,7 @@
#include "f1ap_common.h"
#include "f1ap_encoder.h"
int asn1_encoder_xer_print = 0;
int asn1_encoder_xer_print = 1;
/*
static inline int f1ap_encode_initiating(f1ap_message *message,
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment