Commit 05e090db authored by Guy De Souza's avatar Guy De Souza

Merge conflicts with develop-nr

parents 15a775f9 24368484
cmake_targets/log/
cmake_targets/ran_build/
targets/bin/
...@@ -135,7 +135,7 @@ case $key in ...@@ -135,7 +135,7 @@ case $key in
ARCHIVES_LOC=cppcheck ARCHIVES_LOC=cppcheck
LOG_PATTERN=cppcheck.xml LOG_PATTERN=cppcheck.xml
NB_PATTERN_FILES=1 NB_PATTERN_FILES=1
BUILD_OPTIONS="--enable=warning --force --xml --xml-version=2" BUILD_OPTIONS="--enable=warning --force --xml --xml-version=2 -i openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c"
shift shift
;; ;;
-v5) -v5)
...@@ -200,7 +200,7 @@ case $key in ...@@ -200,7 +200,7 @@ case $key in
ARCHIVES_LOC=cppcheck ARCHIVES_LOC=cppcheck
LOG_PATTERN=cppcheck.xml LOG_PATTERN=cppcheck.xml
NB_PATTERN_FILES=1 NB_PATTERN_FILES=1
BUILD_OPTIONS="--enable=warning --force --xml --xml-version=2" BUILD_OPTIONS="--enable=warning --force --xml --xml-version=2 -i openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c"
;; ;;
gnb-usrp) gnb-usrp)
VM_NAME=ci-gnb-usrp VM_NAME=ci-gnb-usrp
......
...@@ -350,7 +350,7 @@ add_custom_command ( ...@@ -350,7 +350,7 @@ add_custom_command (
add_list2_option(NR_RRC_ASN1_VERSION "NR_Rel15" "ASN.1 version of NR_RRC interface") add_list2_option(NR_RRC_ASN1_VERSION "NR_Rel15" "ASN.1 version of NR_RRC interface")
if (${NR_RRC_ASN1_VERSION} STREQUAL "NR_Rel15") if (${NR_RRC_ASN1_VERSION} STREQUAL "NR_Rel15")
set (NR_RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/NR/MESSAGES/asn1c/ASN1_files/NR-RRC-Definitions.asn) set (NR_RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/NR/MESSAGES/asn1c/ASN1_files/NR-RRC-38331-f10.asn)
endif (${NR_RRC_ASN1_VERSION} STREQUAL "NR_Rel15") endif (${NR_RRC_ASN1_VERSION} STREQUAL "NR_Rel15")
set (NR_RRC_FULL_DIR ${asn1_generated_dir}/${NR_RRC_ASN1_VERSION}) set (NR_RRC_FULL_DIR ${asn1_generated_dir}/${NR_RRC_ASN1_VERSION})
...@@ -359,7 +359,7 @@ if(NOT EXISTS ${asn1c_call}) ...@@ -359,7 +359,7 @@ if(NOT EXISTS ${asn1c_call})
message( FATAL_ERROR "The script ${asn1c_call} must be present" ) message( FATAL_ERROR "The script ${asn1c_call} must be present" )
endif(NOT EXISTS ${asn1c_call}) endif(NOT EXISTS ${asn1c_call})
message("calling ASN1C_PREFIX=NR_ asn1c -fcompound-names -fno-include-deps -gen-PER -no-gen-OER -no-gen-example -D ${RRC_FULL_DIR} ${RRC_GRAMMAR}") message("calling ASN1C_PREFIX=NR_ asn1c -findirect-choice -fcompound-names -fno-include-deps -gen-PER -no-gen-OER -no-gen-example -D ${RRC_FULL_DIR} ${RRC_GRAMMAR}")
execute_process(COMMAND ${asn1c_call} execute_process(COMMAND ${asn1c_call}
${NR_RRC_FULL_DIR} ${NR_RRC_FULL_DIR}
${NR_RRC_GRAMMAR} ${NR_RRC_GRAMMAR}
...@@ -388,7 +388,9 @@ file(GLOB nr_rrc_source ${NR_RRC_FULL_DIR}/*.c) ...@@ -388,7 +388,9 @@ file(GLOB nr_rrc_source ${NR_RRC_FULL_DIR}/*.c)
file(GLOB nr_rrc_h ${NR_RRC_FULL_DIR}/*.h) file(GLOB nr_rrc_h ${NR_RRC_FULL_DIR}/*.h)
set(nr_rrc_h ${nr_rrc_h} ${NR_RRC_FULL_DIR}/asn1_constants.h) set(nr_rrc_h ${nr_rrc_h} ${NR_RRC_FULL_DIR}/asn1_constants.h)
set_source_files_properties(${nr_rrc_source} PROPERTIES COMPILE_FLAGS -w) # suppress warnings from generated code set_source_files_properties(${nr_rrc_source} PROPERTIES COMPILE_FLAGS -w) # suppress warnings from generated code
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) ${OPENAIR2_DIR}/RRC/NR/MESSAGES/asn1_msg.c)
include_directories ("${NR_RRC_FULL_DIR}") include_directories ("${NR_RRC_FULL_DIR}")
...@@ -433,6 +435,7 @@ execute_process(COMMAND mkdir -p ${S1AP_C_DIR} ...@@ -433,6 +435,7 @@ execute_process(COMMAND mkdir -p ${S1AP_C_DIR}
COMMAND env "ASN1C_PREFIX=S1AP_" asn1c -pdu=all -fcompound-names -fno-include-deps -gen-PER -no-gen-OER -no-gen-example -D ${S1AP_C_DIR} ${S1AP_ASN_DIR}/${S1AP_ASN_FILES} COMMAND env "ASN1C_PREFIX=S1AP_" asn1c -pdu=all -fcompound-names -fno-include-deps -gen-PER -no-gen-OER -no-gen-example -D ${S1AP_C_DIR} ${S1AP_ASN_DIR}/${S1AP_ASN_FILES}
RESULT_VARIABLE ret) RESULT_VARIABLE ret)
if (NOT ${ret} STREQUAL 0) if (NOT ${ret} STREQUAL 0)
message(FATAL_ERROR "${ret}: error") message(FATAL_ERROR "${ret}: error")
endif (NOT ${ret} STREQUAL 0) endif (NOT ${ret} STREQUAL 0)
...@@ -448,6 +451,7 @@ add_custom_command ( ...@@ -448,6 +451,7 @@ add_custom_command (
DEPENDS ${S1AP_ASN_DIR}/${S1AP_ASN_FILES} DEPENDS ${S1AP_ASN_DIR}/${S1AP_ASN_FILES}
) )
add_library(S1AP_LIB add_library(S1AP_LIB
${S1AP_source} ${S1AP_source}
${S1AP_DIR}/s1ap_common.c ${S1AP_DIR}/s1ap_common.c
...@@ -491,10 +495,19 @@ endif(${X2AP_VERSION} STREQUAL "R14") ...@@ -491,10 +495,19 @@ endif(${X2AP_VERSION} STREQUAL "R14")
set(X2AP_ASN_DIR ${X2AP_DIR}/MESSAGES/ASN1/${ASN1RELDIR}) set(X2AP_ASN_DIR ${X2AP_DIR}/MESSAGES/ASN1/${ASN1RELDIR})
set(X2AP_C_DIR ${asn1_generated_dir}/X2AP_${ASN1RELDIR}) set(X2AP_C_DIR ${asn1_generated_dir}/X2AP_${ASN1RELDIR})
message("calling asn1c -fcompound-names -fno-include-deps -gen-PER -no-gen-OER -no-gen-example -D ${X2AP_C_DIR} ${X2AP_ASN_DIR}/${X2AP_ASN_FILES}") message("calling asn1c -fcompound-names -fno-include-deps -gen-PER -no-gen-OER -no-gen-example -D ${X2AP_C_DIR} ${X2AP_ASN_DIR}/${X2AP_ASN_FILES}")
execute_process(COMMAND mkdir -p ${X2AP_C_DIR} execute_process(COMMAND mkdir -p ${X2AP_C_DIR}
COMMAND env "ASN1C_PREFIX=X2AP_" asn1c -pdu=all -fcompound-names -fno-include-deps -gen-PER -no-gen-OER -no-gen-example -D ${X2AP_C_DIR} ${X2AP_ASN_DIR}/${X2AP_ASN_FILES} COMMAND env "ASN1C_PREFIX=X2AP_" asn1c -pdu=all -fcompound-names -fno-include-deps -gen-PER -no-gen-OER -no-gen-example -D ${X2AP_C_DIR} ${X2AP_ASN_DIR}/${X2AP_ASN_FILES}
RESULT_VARIABLE ret) RESULT_VARIABLE ret)
#execute_process(COMMAND ${asn1c_call}
# ${X2AP_C_DIR}
# ${X2AP_ASN_DIR}/${X2AP_ASN_FILES}
# X2AP
# RESULT_VARIABLE ret)
if (NOT ${ret} STREQUAL 0) if (NOT ${ret} STREQUAL 0)
message(FATAL_ERROR "${asn1c_call}: error") message(FATAL_ERROR "${asn1c_call}: error")
endif (NOT ${ret} STREQUAL 0) endif (NOT ${ret} STREQUAL 0)
...@@ -510,6 +523,13 @@ add_custom_command ( ...@@ -510,6 +523,13 @@ add_custom_command (
DEPENDS ${X2AP_ASN_DIR}/${X2AP_ASN_FILES} DEPENDS ${X2AP_ASN_DIR}/${X2AP_ASN_FILES}
) )
#add_custom_command (
# OUTPUT ${X2AP_C_DIR}/X2AP_asn_constant.h
# COMMAND ${asn1c_call} ${X2AP_C_DIR} ${X2AP_ASN_DIR}/${X2AP_ASN_FILES} X2AP
# COMMAND ${fix_asn1c_call} ${X2AP_C_DIR} X2AP ${X2AP_VERSION}
# DEPENDS ${X2AP_ASN_DIR}/${X2AP_ASN_FILES}
# )
add_library(X2AP_LIB add_library(X2AP_LIB
${X2AP_source} ${X2AP_source}
${X2AP_DIR}/x2ap_common.c ${X2AP_DIR}/x2ap_common.c
...@@ -794,6 +814,7 @@ include_directories("${OPENAIR_DIR}/targets/ARCH/COMMON") ...@@ -794,6 +814,7 @@ include_directories("${OPENAIR_DIR}/targets/ARCH/COMMON")
include_directories("${OPENAIR_DIR}/targets/ARCH/EXMIMO/USERSPACE/LIB/") include_directories("${OPENAIR_DIR}/targets/ARCH/EXMIMO/USERSPACE/LIB/")
include_directories("${OPENAIR_DIR}/targets/ARCH/EXMIMO/DEFS") include_directories("${OPENAIR_DIR}/targets/ARCH/EXMIMO/DEFS")
include_directories("${OPENAIR2_DIR}/ENB_APP") include_directories("${OPENAIR2_DIR}/ENB_APP")
include_directories("${OPENAIR2_DIR}/GNB_APP")
include_directories("${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/MAC") include_directories("${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/MAC")
include_directories("${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/RRC") include_directories("${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/RRC")
include_directories("${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/PDCP") include_directories("${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/PDCP")
...@@ -1261,7 +1282,6 @@ set(PHY_SRC_UE ...@@ -1261,7 +1282,6 @@ set(PHY_SRC_UE
${OPENAIR1_DIR}/PHY/TOOLS/lut.c ${OPENAIR1_DIR}/PHY/TOOLS/lut.c
${PHY_POLARSRC} ${PHY_POLARSRC}
) )
set(PHY_NR_UE_SRC set(PHY_NR_UE_SRC
# depend on code generation from asn1c # depend on code generation from asn1c
${RRC_FULL_DIR}/asn1_constants.h ${RRC_FULL_DIR}/asn1_constants.h
...@@ -1297,10 +1317,10 @@ set(PHY_SRC_UE ...@@ -1297,10 +1317,10 @@ set(PHY_SRC_UE
${OPENAIR1_DIR}/PHY/INIT/nr_init_ue.c ${OPENAIR1_DIR}/PHY/INIT/nr_init_ue.c
${OPENAIR1_DIR}/SCHED_NR_UE/phy_procedures_nr_ue.c ${OPENAIR1_DIR}/SCHED_NR_UE/phy_procedures_nr_ue.c
#${OPENAIR1_DIR}/SCHED_NR_UE/phy_procedures_nr_common_ue.c #${OPENAIR1_DIR}/SCHED_NR_UE/phy_procedures_nr_common_ue.c
${OPENAIR1_DIR}/SCHED_NR_UE/fapi_nr_ue_l1.c
${PHY_POLARSRC} ${PHY_POLARSRC}
) )
if (${SMBV}) if (${SMBV})
set(PHY_SRC "${PHY_SRC} ${OPENAIR1_DIR}/PHY/TOOLS/smbv.c") set(PHY_SRC "${PHY_SRC} ${OPENAIR1_DIR}/PHY/TOOLS/smbv.c")
endif (${SMBV}) endif (${SMBV})
...@@ -1320,13 +1340,17 @@ add_library(PHY_RU ${PHY_SRC_RU}) ...@@ -1320,13 +1340,17 @@ add_library(PHY_RU ${PHY_SRC_RU})
#Layer 2 library #Layer 2 library
##################### #####################
set(MAC_DIR ${OPENAIR2_DIR}/LAYER2/MAC) set(MAC_DIR ${OPENAIR2_DIR}/LAYER2/MAC)
set(NR_MAC_DIR ${OPENAIR2_DIR}/LAYER2/NR_MAC_gNB)
set(NR_UE_MAC_DIR ${OPENAIR2_DIR}/LAYER2/NR_MAC_UE) set(NR_UE_MAC_DIR ${OPENAIR2_DIR}/LAYER2/NR_MAC_UE)
set(PHY_INTERFACE_DIR ${OPENAIR2_DIR}/PHY_INTERFACE) set(PHY_INTERFACE_DIR ${OPENAIR2_DIR}/PHY_INTERFACE)
set(NR_PHY_INTERFACE_DIR ${OPENAIR2_DIR}/NR_PHY_INTERFACE)
set(NR_UE_PHY_INTERFACE_DIR ${OPENAIR2_DIR}/NR_UE_PHY_INTERFACE)
set(RLC_DIR ${OPENAIR2_DIR}/LAYER2/RLC) set(RLC_DIR ${OPENAIR2_DIR}/LAYER2/RLC)
set(RLC_UM_DIR ${OPENAIR2_DIR}/LAYER2/RLC/UM_v9.3.0) set(RLC_UM_DIR ${OPENAIR2_DIR}/LAYER2/RLC/UM_v9.3.0)
set(RLC_AM_DIR ${OPENAIR2_DIR}/LAYER2/RLC/AM_v9.3.0) set(RLC_AM_DIR ${OPENAIR2_DIR}/LAYER2/RLC/AM_v9.3.0)
set(RLC_TM_DIR ${OPENAIR2_DIR}/LAYER2/RLC/TM_v9.3.0) set(RLC_TM_DIR ${OPENAIR2_DIR}/LAYER2/RLC/TM_v9.3.0)
set(RRC_DIR ${OPENAIR2_DIR}/RRC/LTE) set(RRC_DIR ${OPENAIR2_DIR}/RRC/LTE)
set(NR_RRC_DIR ${OPENAIR2_DIR}/RRC/NR)
set(NR_UE_RRC_DIR ${OPENAIR2_DIR}/RRC/NR_UE) set(NR_UE_RRC_DIR ${OPENAIR2_DIR}/RRC/NR_UE)
set(PDCP_DIR ${OPENAIR2_DIR}/LAYER2/PDCP_v10.1.0) set(PDCP_DIR ${OPENAIR2_DIR}/LAYER2/PDCP_v10.1.0)
set(L2_SRC set(L2_SRC
...@@ -1373,6 +1397,9 @@ set(L2_SRC ...@@ -1373,6 +1397,9 @@ set(L2_SRC
${RRC_DIR}/L2_interface.c ${RRC_DIR}/L2_interface.c
${RRC_DIR}/L2_interface_common.c ${RRC_DIR}/L2_interface_common.c
${RRC_DIR}/L2_interface_ue.c ${RRC_DIR}/L2_interface_ue.c
${NR_RRC_DIR}/rrc_gNB.c
${NR_RRC_DIR}/nr_rrc_common.c
${NR_RRC_DIR}/L2_nr_interface.c
) )
set(L2_SRC_UE set(L2_SRC_UE
...@@ -1439,8 +1466,14 @@ set (MAC_SRC ...@@ -1439,8 +1466,14 @@ set (MAC_SRC
${MAC_DIR}/pre_processor.c ${MAC_DIR}/pre_processor.c
${MAC_DIR}/config.c ${MAC_DIR}/config.c
${MAC_DIR}/config_ue.c ${MAC_DIR}/config_ue.c
${NR_PHY_INTERFACE_DIR}/NR_IF_Module.c
${NR_MAC_DIR}/main.c
${NR_MAC_DIR}/config.c
${NR_MAC_DIR}/gNB_scheduler.c
${NR_MAC_DIR}/gNB_scheduler_bch.c
) )
set (MAC_SRC_UE set (MAC_SRC_UE
${MAC_DIR}/main_ue.c ${MAC_DIR}/main_ue.c
${MAC_DIR}/ue_procedures.c ${MAC_DIR}/ue_procedures.c
...@@ -1448,11 +1481,16 @@ set (MAC_SRC_UE ...@@ -1448,11 +1481,16 @@ set (MAC_SRC_UE
${MAC_DIR}/l1_helpers.c ${MAC_DIR}/l1_helpers.c
${MAC_DIR}/rar_tools_ue.c ${MAC_DIR}/rar_tools_ue.c
${MAC_DIR}/config_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 ${NR_UE_MAC_DIR}/config_ue.c
${NR_UE_MAC_DIR}/mac_vars.c ${NR_UE_MAC_DIR}/mac_vars.c
${NR_UE_MAC_DIR}/main_ue_nr.c ${NR_UE_MAC_DIR}/main_ue_nr.c
${NR_UE_MAC_DIR}/nr_ue_procedures.c ${NR_UE_MAC_DIR}/nr_ue_procedures.c
) )
set (ENB_APP_SRC set (ENB_APP_SRC
${OPENAIR2_DIR}/ENB_APP/enb_app.c ${OPENAIR2_DIR}/ENB_APP/enb_app.c
...@@ -1460,17 +1498,25 @@ set (ENB_APP_SRC ...@@ -1460,17 +1498,25 @@ set (ENB_APP_SRC
${OPENAIR2_DIR}/ENB_APP/RRC_config_tools.c ${OPENAIR2_DIR}/ENB_APP/RRC_config_tools.c
) )
set (GNB_APP_SRC
${OPENAIR2_DIR}/GNB_APP/gnb_app.c
${OPENAIR2_DIR}/GNB_APP/gnb_config.c
)
add_library(L2 add_library(L2
${L2_SRC} ${L2_SRC}
${MAC_SRC} ${MAC_SRC}
${ENB_APP_SRC}) ${ENB_APP_SRC}
${GNB_APP_SRC})
# ${OPENAIR2_DIR}/RRC/L2_INTERFACE/openair_rrc_L2_interface.c) # ${OPENAIR2_DIR}/RRC/L2_INTERFACE/openair_rrc_L2_interface.c)
add_library(L2_UE add_library(L2_UE
${L2_SRC_UE} ${L2_SRC_UE}
${MAC_SRC_UE} ${MAC_SRC_UE}
${MAC_NR_SRC_UE}
) )
include_directories(${NR_UE_PHY_INTERFACE_DIR})
include_directories(${NFAPI_USER_DIR}) include_directories(${NFAPI_USER_DIR})
...@@ -2154,6 +2200,7 @@ add_executable(nr-softmodem ...@@ -2154,6 +2200,7 @@ add_executable(nr-softmodem
${OPENAIR_TARGETS}/RT/USER/nr-softmodem.c ${OPENAIR_TARGETS}/RT/USER/nr-softmodem.c
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c ${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
${OPENAIR_TARGETS}/COMMON/create_tasks.c ${OPENAIR_TARGETS}/COMMON/create_tasks.c
${OPENAIR_TARGETS}/COMMON/create_nr_tasks.c
${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c ${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c ${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
${OPENAIR_DIR}/common/utils/utils.c ${OPENAIR_DIR}/common/utils/utils.c
...@@ -2210,7 +2257,7 @@ target_link_libraries (nr-softmodem ...@@ -2210,7 +2257,7 @@ target_link_libraries (nr-softmodem
-Wl,--start-group -Wl,--start-group
UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_RU LFDS GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_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} ${MIH_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${MIH_LIB}
RRC_LIB S1AP_LIB S1AP_ENB L2 RRC_LIB NR_RRC_LIB S1AP_LIB S1AP_ENB L2
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
-Wl,--end-group z dl) -Wl,--end-group z dl)
......
...@@ -277,7 +277,7 @@ check_install_usrp_uhd_driver(){ ...@@ -277,7 +277,7 @@ check_install_usrp_uhd_driver(){
$SUDO apt-get -y --allow-unauthenticated install libuhd-dev libuhd003 uhd-host $SUDO apt-get -y --allow-unauthenticated install libuhd-dev libuhd003 uhd-host
elif [[ "$OS_BASEDISTRO" == "fedora" ]]; then elif [[ "$OS_BASEDISTRO" == "fedora" ]]; then
$SUDO $INSTALLER -y install python boost libusb-devel libusbx-devel boost-devel python-mako python-docutils cmake $SUDO $INSTALLER -y install python boost libusb-devel libusbx-devel boost-devel python-mako python-docutils cmake
$SUDO pip install requests $SUDO -H pip install requests
if [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "centos" ]]; then if [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "centos" ]]; then
# until EPEL repo hasn't bumped UHD driver to >=3.10 in EPEL, build driver from source # until EPEL repo hasn't bumped UHD driver to >=3.10 in EPEL, build driver from source
$SUDO $INSTALLER -y remove uhd uhd-devel uhd-firmware $SUDO $INSTALLER -y remove uhd uhd-devel uhd-firmware
...@@ -460,8 +460,8 @@ check_install_additional_tools (){ ...@@ -460,8 +460,8 @@ check_install_additional_tools (){
#The packages below are already installed for Redhat distros (RHEL, CentOS, Fedora) #The packages below are already installed for Redhat distros (RHEL, CentOS, Fedora)
if [[ "$OS_DISTRO" == "ubuntu" ]]; then if [[ "$OS_DISTRO" == "ubuntu" ]]; then
$SUDO pip install paramiko $SUDO -H pip install paramiko
$SUDO pip install pyroute2 colorama $SUDO -H pip install pyroute2 colorama
log_netiface=$OPENAIR_DIR/cmake_targets/log/netiface_install_log.txt log_netiface=$OPENAIR_DIR/cmake_targets/log/netiface_install_log.txt
echo_info "Installing Netinterfaces package. The logfile for installation is in $log_netiface" echo_info "Installing Netinterfaces package. The logfile for installation is in $log_netiface"
( (
...@@ -659,10 +659,9 @@ install_asn1c_from_source(){ ...@@ -659,10 +659,9 @@ install_asn1c_from_source(){
echo_info "\nInstalling ASN1. The log file for ASN1 installation is here: $asn1_install_log " echo_info "\nInstalling ASN1. The log file for ASN1 installation is here: $asn1_install_log "
( (
$SUDO rm -rf /tmp/asn1c $SUDO rm -rf /tmp/asn1c
# GIT_SSL_NO_VERIFY=true git clone https://gitlab.eurecom.fr/oai/asn1c.git /tmp/asn1c git clone https://github.com/brchiu/asn1c /tmp/asn1c
git clone https://github.com/velichkov/asn1c /tmp/asn1c
cd /tmp/asn1c cd /tmp/asn1c
git checkout s1ap git checkout velichkov_s1ap_plus_option_group
test -f configure || autoreconf -iv test -f configure || autoreconf -iv
./configure ./configure
make -j`nproc` make -j`nproc`
......
...@@ -107,12 +107,16 @@ case "$module" in ...@@ -107,12 +107,16 @@ case "$module" in
;; ;;
NR_RRC ) NR_RRC )
export ASN1C_PREFIX=NR_ export ASN1C_PREFIX=NR_
asn1c -gen-PER -fcompound-names -no-gen-example fixed_grammar.asn 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample asn1c -gen-PER -fcompound-names -findirect-choice -no-gen-example fixed_grammar.asn 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample
;; ;;
S1AP ) S1AP )
export ASN1C_PREFIX=S1AP_ export ASN1C_PREFIX=S1AP_
asn1c -gen-PER -fcompound-names -no-gen-example fixed_grammar.asn 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample asn1c -gen-PER -fcompound-names -no-gen-example fixed_grammar.asn 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample
;; ;;
X2AP )
export ASN1C_PREFIX=X2AP_
asn1c -gen-PER -fcompound-names -no-gen-example fixed_grammar.asn 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample
;;
esac esac
...@@ -129,12 +133,16 @@ case "$module" in ...@@ -129,12 +133,16 @@ case "$module" in
;; ;;
NR_RRC ) NR_RRC )
export ASN1C_PREFIX=NR_ export ASN1C_PREFIX=NR_
asn1c -fcompound-names -fno-include-deps -gen-PER -no-gen-OER -no-gen-example $* 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample asn1c -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example $* 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample
;; ;;
S1AP ) S1AP )
export ASN1C_PREFIX=S1AP_ export ASN1C_PREFIX=S1AP_
asn1c -fcompound-names -fno-include-deps -gen-PER -no-gen-OER -no-gen-example $* 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample asn1c -fcompound-names -fno-include-deps -gen-PER -no-gen-OER -no-gen-example $* 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample
;; ;;
X2AP )
export ASN1C_PREFIX=X2AP_
asn1c -fcompound-names -fno-include-deps -gen-PER -no-gen-OER -no-gen-example $* 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample
;;
esac esac
fi fi
......
...@@ -49,7 +49,8 @@ ...@@ -49,7 +49,8 @@
#include "PHY/defs_L1_NB_IoT.h" #include "PHY/defs_L1_NB_IoT.h"
#include "RRC/LTE/defs_NB_IoT.h" #include "RRC/LTE/defs_NB_IoT.h"
#include "RRC/NR/defs_NR.h" #include "RRC/NR/nr_rrc_defs.h"
typedef struct { typedef struct {
/// RAN context config file name /// RAN context config file name
...@@ -68,14 +69,22 @@ typedef struct { ...@@ -68,14 +69,22 @@ typedef struct {
int nb_macrlc_inst; int nb_macrlc_inst;
/// Number of NB_IoT MACRLC instances in this node /// Number of NB_IoT MACRLC instances in this node
int nb_nb_iot_macrlc_inst; int nb_nb_iot_macrlc_inst;
/// Number of NR MACRLC instances in this node
int nb_nr_macrlc_inst;
/// Number of component carriers per instance in this node /// Number of component carriers per instance in this node
int *nb_mac_CC; int *nb_mac_CC;
/// Number of component carriers per instance in this node
int *nb_nr_mac_CC;
/// Number of L1 instances in this node /// Number of L1 instances in this node
int nb_L1_inst; int nb_L1_inst;
/// Number of NB_IoT L1 instances in this node /// Number of NB_IoT L1 instances in this node
int nb_nb_iot_L1_inst; int nb_nb_iot_L1_inst;
/// Number of NR L1 instances in this node
int nb_nr_L1_inst;
/// Number of Component Carriers per instance in this node /// Number of Component Carriers per instance in this node
int *nb_L1_CC; int *nb_L1_CC;
/// Number of NR Component Carriers per instance in this node
int *nb_nr_L1_CC;
/// Number of RU instances in this node /// Number of RU instances in this node
int nb_RU; int nb_RU;
/// FlexRAN context variables /// FlexRAN context variables
...@@ -96,6 +105,8 @@ typedef struct { ...@@ -96,6 +105,8 @@ typedef struct {
struct eNB_MAC_INST_s **mac; struct eNB_MAC_INST_s **mac;
/// NB_IoT MAC context variables /// NB_IoT MAC context variables
struct eNB_MAC_INST_NB_IoT_s **nb_iot_mac; struct eNB_MAC_INST_NB_IoT_s **nb_iot_mac;
/// NR MAC context variables
struct gNB_MAC_INST_s **nrmac;
/// GTPu descriptor /// GTPu descriptor
gtpv1u_data_t *gtpv1u_data_g; gtpv1u_data_t *gtpv1u_data_g;
/// RU descriptors. These describe what each radio unit is supposed to do and contain the necessary functions for fronthaul interfaces /// RU descriptors. These describe what each radio unit is supposed to do and contain the necessary functions for fronthaul interfaces
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -34,6 +34,9 @@ ...@@ -34,6 +34,9 @@
#include "assertions.h" #include "assertions.h"
#include <math.h> #include <math.h>
#include "PHY/NR_REFSIG/defs.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
extern uint32_t from_earfcn(int eutra_bandP,uint32_t dl_earfcn); extern uint32_t from_earfcn(int eutra_bandP,uint32_t dl_earfcn);
extern int32_t get_uldl_offset(int eutra_bandP); extern int32_t get_uldl_offset(int eutra_bandP);
...@@ -41,36 +44,35 @@ int l1_north_init_gNB() { ...@@ -41,36 +44,35 @@ int l1_north_init_gNB() {
int i,j; int i,j;
if (RC.nb_L1_inst > 0 && RC.nb_L1_CC != NULL && RC.gNB != NULL) if (RC.nb_nr_L1_inst > 0 && RC.nb_nr_L1_CC != NULL && RC.gNB != NULL)
{ {
AssertFatal(RC.nb_L1_inst>0,"nb_L1_inst=%d\n",RC.nb_L1_inst); AssertFatal(RC.nb_nr_L1_inst>0,"nb_nr_L1_inst=%d\n",RC.nb_nr_L1_inst);
AssertFatal(RC.nb_L1_CC!=NULL,"nb_L1_CC is null\n"); AssertFatal(RC.nb_nr_L1_CC!=NULL,"nb_nr_L1_CC is null\n");
AssertFatal(RC.gNB!=NULL,"RC.gNB is null\n"); AssertFatal(RC.gNB!=NULL,"RC.gNB is null\n");
LOG_I(PHY,"%s() RC.nb_L1_inst:%d\n", __FUNCTION__, RC.nb_L1_inst); LOG_I(PHY,"%s() RC.nb_nr_L1_inst:%d\n", __FUNCTION__, RC.nb_nr_L1_inst);
for (i=0;i<RC.nb_L1_inst;i++) { for (i=0;i<RC.nb_nr_L1_inst;i++) {
AssertFatal(RC.gNB[i]!=NULL,"RC.gNB[%d] is null\n",i); AssertFatal(RC.gNB[i]!=NULL,"RC.gNB[%d] is null\n",i);
AssertFatal(RC.nb_L1_CC[i]>0,"RC.nb_L1_CC[%d]=%d\n",i,RC.nb_L1_CC[i]); AssertFatal(RC.nb_nr_L1_CC[i]>0,"RC.nb_nr_L1_CC[%d]=%d\n",i,RC.nb_nr_L1_CC[i]);
LOG_I(PHY,"%s() RC.nb_L1_CC[%d]:%d\n", __FUNCTION__, i, RC.nb_L1_CC[i]); LOG_I(PHY,"%s() RC.nb_nr_L1_CC[%d]:%d\n", __FUNCTION__, i, RC.nb_nr_L1_CC[i]);
for (j=0;j<RC.nb_L1_CC[i];j++) { for (j=0;j<RC.nb_nr_L1_CC[i];j++) {
AssertFatal(RC.gNB[i][j]!=NULL,"RC.gNB[%d][%d] is null\n",i,j); AssertFatal(RC.gNB[i][j]!=NULL,"RC.gNB[%d][%d] is null\n",i,j);
if ((RC.gNB[i][j]->if_inst = IF_Module_init(i))<0) return(-1); if ((RC.gNB[i][j]->if_inst = NR_IF_Module_init(i))<0) return(-1);
LOG_I(PHY,"%s() RC.gNB[%d][%d] installing callbacks\n", __FUNCTION__, i, j); LOG_I(PHY,"%s() RC.gNB[%d][%d] installing callbacks\n", __FUNCTION__, i, j);
RC.gNB[i][j]->if_inst->PHY_config_req = phy_config_request; RC.gNB[i][j]->if_inst->PHY_config_req = nr_phy_config_request;
nr_phy_config_request(RC.gNB[i][j]);
RC.gNB[i][j]->if_inst->schedule_response = schedule_response; RC.gNB[i][j]->if_inst->schedule_response = schedule_response;
} }
} }
} }
else else
{ {
LOG_I(PHY,"%s() Not installing PHY callbacks - RC.nb_L1_inst:%d RC.nb_L1_CC:%p RC.gNB:%p\n", __FUNCTION__, RC.nb_L1_inst, RC.nb_L1_CC, RC.gNB); LOG_I(PHY,"%s() Not installing PHY callbacks - RC.nb_nr_L1_inst:%d RC.nb_nr_L1_CC:%p RC.gNB:%p\n", __FUNCTION__, RC.nb_nr_L1_inst, RC.nb_nr_L1_CC, RC.gNB);
} }
return(0); return(0);
} }
...@@ -83,7 +85,7 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB, ...@@ -83,7 +85,7 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
// shortcuts // shortcuts
NR_DL_FRAME_PARMS* const fp = &gNB->frame_parms; NR_DL_FRAME_PARMS* const fp = &gNB->frame_parms;
nfapi_config_request_t* cfg = &gNB->gNB_config; nfapi_nr_config_request_t* cfg = &gNB->gNB_config;
NR_gNB_COMMON* const common_vars = &gNB->common_vars; NR_gNB_COMMON* const common_vars = &gNB->common_vars;
LTE_eNB_PUSCH** const pusch_vars = gNB->pusch_vars; LTE_eNB_PUSCH** const pusch_vars = gNB->pusch_vars;
LTE_eNB_SRS* const srs_vars = gNB->srs_vars; LTE_eNB_SRS* const srs_vars = gNB->srs_vars;
...@@ -238,7 +240,7 @@ void phy_config_request(PHY_Config_t *phy_config) { ...@@ -238,7 +240,7 @@ void phy_config_request(PHY_Config_t *phy_config) {
uint8_t Mod_id = phy_config->Mod_id; uint8_t Mod_id = phy_config->Mod_id;
int CC_id = phy_config->CC_id; int CC_id = phy_config->CC_id;
nfapi_config_request_t *cfg = phy_config->cfg; nfapi_nr_config_request_t *cfg = phy_config->cfg;
NR_DL_FRAME_PARMS *fp; NR_DL_FRAME_PARMS *fp;
PHICH_RESOURCE_t phich_resource_table[4]={oneSixth,half,one,two}; PHICH_RESOURCE_t phich_resource_table[4]={oneSixth,half,one,two};
...@@ -280,7 +282,7 @@ void phy_config_request(PHY_Config_t *phy_config) { ...@@ -280,7 +282,7 @@ void phy_config_request(PHY_Config_t *phy_config) {
void phy_free_nr_gNB(PHY_VARS_gNB *gNB) void phy_free_nr_gNB(PHY_VARS_gNB *gNB)
{ {
// NR_DL_FRAME_PARMS* const fp = &gNB->frame_parms; // NR_DL_FRAME_PARMS* const fp = &gNB->frame_parms;
nfapi_config_request_t *cfg = &gNB->gNB_config; nfapi_nr_config_request_t *cfg = &gNB->gNB_config;
NR_gNB_COMMON* const common_vars = &gNB->common_vars; NR_gNB_COMMON* const common_vars = &gNB->common_vars;
LTE_eNB_PUSCH** const pusch_vars = gNB->pusch_vars; LTE_eNB_PUSCH** const pusch_vars = gNB->pusch_vars;
LTE_eNB_SRS* const srs_vars = gNB->srs_vars; LTE_eNB_SRS* const srs_vars = gNB->srs_vars;
...@@ -353,10 +355,11 @@ void install_schedule_handlers(IF_Module_t *if_inst) ...@@ -353,10 +355,11 @@ void install_schedule_handlers(IF_Module_t *if_inst)
}*/ }*/
/// this function is a temporary addition for NR configuration /// this function is a temporary addition for NR configuration
void nr_phy_config_request(PHY_VARS_gNB *gNB)
/*void nr_phy_config_request(PHY_VARS_gNB *gNB)
{ {
NR_DL_FRAME_PARMS *fp = &gNB->frame_parms; NR_DL_FRAME_PARMS *fp = &gNB->frame_parms;
nfapi_config_request_t *gNB_config = &gNB->gNB_config; nfapi_nr_config_request_t *gNB_config = &gNB->gNB_config;
//overwrite for new NR parameters //overwrite for new NR parameters
gNB_config->nfapi_config.rf_bands.rf_band[0] = 22; gNB_config->nfapi_config.rf_bands.rf_band[0] = 22;
...@@ -382,4 +385,63 @@ void nr_phy_config_request(PHY_VARS_gNB *gNB) ...@@ -382,4 +385,63 @@ void nr_phy_config_request(PHY_VARS_gNB *gNB)
gNB->configured = 1; gNB->configured = 1;
LOG_I(PHY,"gNB configured\n"); LOG_I(PHY,"gNB configured\n");
}*/
void nr_phy_config_request(NR_PHY_Config_t *phy_config)
{
uint8_t Mod_id = phy_config->Mod_id;
int CC_id = phy_config->CC_id;
NR_DL_FRAME_PARMS *fp = &RC.gNB[Mod_id][CC_id]->frame_parms;
nfapi_nr_config_request_t *gNB_config = &RC.gNB[Mod_id][CC_id]->gNB_config;
gNB_config->nfapi_config.rf_bands.rf_band[0] = phy_config->cfg->nfapi_config.rf_bands.rf_band[0]; //22
gNB_config->nfapi_config.earfcn.value = phy_config->cfg->nfapi_config.earfcn.value; //6600
gNB_config->subframe_config.numerology_index_mu.value = phy_config->cfg->subframe_config.numerology_index_mu.value;//1
gNB_config->rf_config.tx_antenna_ports.value = phy_config->cfg->rf_config.tx_antenna_ports.value; //1
gNB_config->rf_config.dl_channel_bandwidth.value = phy_config->cfg->rf_config.dl_channel_bandwidth.value;//106;
gNB_config->rf_config.ul_channel_bandwidth.value = phy_config->cfg->rf_config.ul_channel_bandwidth.value;//106;
gNB_config->sch_config.half_frame_index.value = 0;
gNB_config->sch_config.ssb_subcarrier_offset.value = phy_config->cfg->sch_config.ssb_subcarrier_offset.value;//0;
gNB_config->sch_config.n_ssb_crb.value = 86;
gNB_config->sch_config.physical_cell_id.value = phy_config->cfg->sch_config.physical_cell_id.value;
if (phy_config->cfg->subframe_config.duplex_mode.value == 0) {
gNB_config->subframe_config.duplex_mode.value = TDD;
}
else {
gNB_config->subframe_config.duplex_mode.value = FDD;
}
RC.gNB[Mod_id][CC_id]->mac_enabled = 1;
fp->dl_CarrierFreq = from_earfcn(gNB_config->nfapi_config.rf_bands.rf_band[0],gNB_config->nfapi_config.earfcn.value);
fp->ul_CarrierFreq = fp->dl_CarrierFreq - (get_uldl_offset(gNB_config->nfapi_config.rf_bands.rf_band[0])*100000);
fp->threequarter_fs = 0;
LOG_I(PHY,"Configuring MIB for instance %d, CCid %d : (band %d,N_RB_DL %d, N_RB_UL %d, Nid_cell %d,gNB_tx_antenna_ports %d,DL freq %u)\n",
Mod_id,
CC_id,
gNB_config->nfapi_config.rf_bands.rf_band[0],
gNB_config->rf_config.dl_channel_bandwidth.value,
gNB_config->rf_config.ul_channel_bandwidth.value,
gNB_config->sch_config.physical_cell_id.value,
gNB_config->rf_config.tx_antenna_ports.value,
fp->dl_CarrierFreq );
nr_init_frame_parms(gNB_config, fp);
if (RC.gNB[Mod_id][CC_id]->configured == 1){
LOG_E(PHY,"Already gNB already configured, do nothing\n");
return;
}
RC.gNB[Mod_id][CC_id]->configured = 1;
LOG_I(PHY,"gNB %d/%d configured\n",Mod_id,CC_id);
} }
...@@ -100,12 +100,12 @@ int nr_phy_init_RU(RU_t *ru) { ...@@ -100,12 +100,12 @@ int nr_phy_init_RU(RU_t *ru) {
LOG_D(PHY,"[INIT] prach_vars->rxsigF[%d] = %p\n",i,ru->prach_rxsigF[i]); LOG_D(PHY,"[INIT] prach_vars->rxsigF[%d] = %p\n",i,ru->prach_rxsigF[i]);
} }
AssertFatal(RC.nb_L1_inst <= NUMBER_OF_eNB_MAX,"gNB instances %d > %d\n", AssertFatal(RC.nb_nr_L1_inst <= NUMBER_OF_eNB_MAX,"gNB instances %d > %d\n",
RC.nb_L1_inst,NUMBER_OF_eNB_MAX); RC.nb_nr_L1_inst,NUMBER_OF_gNB_MAX);
LOG_E(PHY,"[INIT] %s() RC.nb_L1_inst:%d \n", __FUNCTION__, RC.nb_L1_inst); LOG_E(PHY,"[INIT] %s() RC.nb_nr_L1_inst:%d \n", __FUNCTION__, RC.nb_nr_L1_inst);
for (i=0; i<RC.nb_L1_inst; i++) { for (i=0; i<RC.nb_nr_L1_inst; i++) {
for (p=0;p<15;p++) { for (p=0;p<15;p++) {
LOG_D(PHY,"[INIT] %s() nb_antenna_ports_eNB:%d \n", __FUNCTION__, ru->gNB_list[i]->gNB_config.rf_config.tx_antenna_ports.value); LOG_D(PHY,"[INIT] %s() nb_antenna_ports_eNB:%d \n", __FUNCTION__, ru->gNB_list[i]->gNB_config.rf_config.tx_antenna_ports.value);
if (p<ru->gNB_list[i]->gNB_config.rf_config.tx_antenna_ports.value || p==5) { if (p<ru->gNB_list[i]->gNB_config.rf_config.tx_antenna_ports.value || p==5) {
...@@ -178,7 +178,7 @@ void nr_phy_free_RU(RU_t *ru) ...@@ -178,7 +178,7 @@ void nr_phy_free_RU(RU_t *ru)
free_and_zero(ru->prach_rxsigF); free_and_zero(ru->prach_rxsigF);
/* ru->prach_rxsigF_br is not allocated -> don't free */ /* ru->prach_rxsigF_br is not allocated -> don't free */
for (i = 0; i < RC.nb_L1_inst; i++) { for (i = 0; i < RC.nb_nr_L1_inst; i++) {
for (p = 0; p < 15; p++) { for (p = 0; p < 15; p++) {
if (p < ru->gNB_list[i]->gNB_config.rf_config.tx_antenna_ports.value || p == 5) { if (p < ru->gNB_list[i]->gNB_config.rf_config.tx_antenna_ports.value || p == 5) {
for (j=0; j<ru->nb_tx; j++) free_and_zero(ru->beam_weights[i][p][j]); for (j=0; j<ru->nb_tx; j++) free_and_zero(ru->beam_weights[i][p][j]);
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
uint32_t nr_subcarrier_spacing[MAX_NUM_SUBCARRIER_SPACING] = {15e3, 30e3, 60e3, 120e3, 240e3}; uint32_t nr_subcarrier_spacing[MAX_NUM_SUBCARRIER_SPACING] = {15e3, 30e3, 60e3, 120e3, 240e3};
uint16_t nr_slots_per_subframe[MAX_NUM_SUBCARRIER_SPACING] = {1, 2, 4, 16, 32}; uint16_t nr_slots_per_subframe[MAX_NUM_SUBCARRIER_SPACING] = {1, 2, 4, 16, 32};
int nr_init_frame_parms(nfapi_config_request_t* config, int nr_init_frame_parms(nfapi_nr_config_request_t* config,
NR_DL_FRAME_PARMS *frame_parms) NR_DL_FRAME_PARMS *frame_parms)
{ {
...@@ -146,12 +146,12 @@ int nr_init_frame_parms(nfapi_config_request_t* config, ...@@ -146,12 +146,12 @@ int nr_init_frame_parms(nfapi_config_request_t* config,
frame_parms->samples_per_subframe = (frame_parms->samples_per_subframe_wCP + (frame_parms->nb_prefix_samples0 * frame_parms->slots_per_subframe) + frame_parms->samples_per_subframe = (frame_parms->samples_per_subframe_wCP + (frame_parms->nb_prefix_samples0 * frame_parms->slots_per_subframe) +
(frame_parms->nb_prefix_samples * frame_parms->slots_per_subframe * (frame_parms->symbols_per_slot - 1))); (frame_parms->nb_prefix_samples * frame_parms->slots_per_subframe * (frame_parms->symbols_per_slot - 1)));
frame_parms->samples_per_frame = 10 * frame_parms->samples_per_subframe; frame_parms->samples_per_frame = 10 * frame_parms->samples_per_subframe;
frame_parms->freq_range = (frame_parms->dl_CarrierFreq < 6e9)? nr_FR1 : nr_FR2;
return 0; return 0;
} }
int nr_init_frame_parms_ue(nfapi_config_request_t* config, int nr_init_frame_parms_ue(nfapi_nr_config_request_t* config,
NR_DL_FRAME_PARMS *frame_parms) NR_DL_FRAME_PARMS *frame_parms)
{ {
...@@ -284,7 +284,7 @@ int nr_init_frame_parms_ue(nfapi_config_request_t* config, ...@@ -284,7 +284,7 @@ int nr_init_frame_parms_ue(nfapi_config_request_t* config,
//frame_parms->samples_per_subframe = (frame_parms->samples_per_subframe_wCP + (frame_parms->nb_prefix_samples0 * frame_parms->slots_per_subframe) + //frame_parms->samples_per_subframe = (frame_parms->samples_per_subframe_wCP + (frame_parms->nb_prefix_samples0 * frame_parms->slots_per_subframe) +
// (frame_parms->nb_prefix_samples * frame_parms->slots_per_subframe * (frame_parms->symbols_per_slot - 1))); // (frame_parms->nb_prefix_samples * frame_parms->slots_per_subframe * (frame_parms->symbols_per_slot - 1)));
frame_parms->samples_per_frame = 10 * frame_parms->samples_per_subframe; frame_parms->samples_per_frame = 10 * frame_parms->samples_per_subframe;
frame_parms->freq_range = (frame_parms->dl_CarrierFreq < 6e9)? nr_FR1 : nr_FR2;
return 0; return 0;
} }
......
...@@ -374,12 +374,13 @@ void phy_config_request(PHY_Config_t *phy_config); ...@@ -374,12 +374,13 @@ void phy_config_request(PHY_Config_t *phy_config);
int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf); int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf);
void dump_frame_parms(LTE_DL_FRAME_PARMS *frame_parms); void dump_frame_parms(LTE_DL_FRAME_PARMS *frame_parms);
int nr_init_frame_parms(nfapi_config_request_t* config, NR_DL_FRAME_PARMS *frame_parms); int nr_init_frame_parms(nfapi_nr_config_request_t* config, NR_DL_FRAME_PARMS *frame_parms);
int nr_init_frame_parms_ue(nfapi_config_request_t* config, NR_DL_FRAME_PARMS *frame_parms); int nr_init_frame_parms_ue(nfapi_nr_config_request_t* config, NR_DL_FRAME_PARMS *frame_parms);
void nr_dump_frame_parms(NR_DL_FRAME_PARMS *frame_parms); 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 abstraction_flag);
void nr_phy_config_request(PHY_VARS_gNB *gNB); void nr_phy_config_request(NR_PHY_Config_t *gNB);
void phy_free_nr_gNB(PHY_VARS_gNB *gNB); void phy_free_nr_gNB(PHY_VARS_gNB *gNB);
int l1_north_init_gNB(void);
/** @} */ /** @} */
#endif #endif
......
...@@ -23,12 +23,10 @@ ...@@ -23,12 +23,10 @@
void nr_init_pbch_dmrs(PHY_VARS_gNB* gNB) void nr_init_pbch_dmrs(PHY_VARS_gNB* gNB)
{ {
unsigned int n, x1, x2;
uint32_t x1, x2; unsigned char Nid, i_ssb, i_ssb2;
uint8_t Nid, i_ssb, i_ssb2; unsigned char Lmax, l, n_hf, N_hf;
uint8_t Lmax, l, n_hf, N_hf; nfapi_nr_config_request_t *cfg = &gNB->gNB_config;
uint8_t reset = 1;
nfapi_config_request_t *cfg = &gNB->gNB_config;
NR_DL_FRAME_PARMS *fp = &gNB->frame_parms; NR_DL_FRAME_PARMS *fp = &gNB->frame_parms;
Nid = cfg->sch_config.physical_cell_id.value; Nid = cfg->sch_config.physical_cell_id.value;
......
...@@ -135,7 +135,7 @@ uint8_t nr_generate_dci_top(NR_gNB_DCI_ALLOC_t dci_alloc, ...@@ -135,7 +135,7 @@ uint8_t nr_generate_dci_top(NR_gNB_DCI_ALLOC_t dci_alloc,
int32_t** txdataF, int32_t** txdataF,
int16_t amp, int16_t amp,
NR_DL_FRAME_PARMS* frame_parms, NR_DL_FRAME_PARMS* frame_parms,
nfapi_config_request_t* config) nfapi_nr_config_request_t* config)
{ {
uint16_t mod_dmrs[NR_MAX_PDCCH_DMRS_LENGTH<<1]; uint16_t mod_dmrs[NR_MAX_PDCCH_DMRS_LENGTH<<1];
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
* For more information about the OpenAirInterface (OAI) Software Alliance: * For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org * contact@openairinterface.org
*/ */
#ifndef __PHY_NR_TRANSPORT_DCI__H #ifndef __PHY_NR_TRANSPORT_DCI__H
#define __PHY_NR_TRANSPORT_DCI__H #define __PHY_NR_TRANSPORT_DCI__H
...@@ -100,6 +101,7 @@ typedef struct { ...@@ -100,6 +101,7 @@ typedef struct {
uint8_t dci_pdu[8]; uint8_t dci_pdu[8];
} NR_gNB_DCI_ALLOC_t; } NR_gNB_DCI_ALLOC_t;
typedef unsigned __int128 uint128_t;
uint8_t nr_get_dci_size(nr_dci_format_e format, uint8_t nr_get_dci_size(nr_dci_format_e format,
nr_rnti_type_e rnti, nr_rnti_type_e rnti,
...@@ -111,6 +113,6 @@ uint8_t nr_generate_dci_top(NR_gNB_DCI_ALLOC_t dci_alloc, ...@@ -111,6 +113,6 @@ uint8_t nr_generate_dci_top(NR_gNB_DCI_ALLOC_t dci_alloc,
int32_t** txdataF, int32_t** txdataF,
int16_t amp, int16_t amp,
NR_DL_FRAME_PARMS* frame_parms, NR_DL_FRAME_PARMS* frame_parms,
nfapi_config_request_t* config); nfapi_nr_config_request_t* config)
#endif //__PHY_NR_TRANSPORT_DCI__H #endif //__PHY_NR_TRANSPORT_DCI__H
...@@ -45,19 +45,19 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs, ...@@ -45,19 +45,19 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs,
int32_t **txdataF, int32_t **txdataF,
int16_t amp, int16_t amp,
uint8_t ssb_start_symbol, uint8_t ssb_start_symbol,
uint8_t nushift, nfapi_nr_config_request_t* config,
nfapi_config_request_t* config,
NR_DL_FRAME_PARMS *frame_parms) NR_DL_FRAME_PARMS *frame_parms)
{ {
int k,l; int k,l;
int16_t a; int16_t a;
int16_t mod_dmrs[NR_PBCH_DMRS_LENGTH<<1]; int16_t mod_dmrs[NR_PBCH_DMRS_LENGTH<<1];
uint8_t idx=0; uint8_t idx=0;
uint8_t nushift = config->sch_config.physical_cell_id.value &3;
LOG_I(PHY, "PBCH DMRS mapping started at symbol %d shift %d\n", ssb_start_symbol+1, nushift); LOG_I(PHY, "PBCH DMRS mapping started at symbol %d shift %d\n", ssb_start_symbol+1, nushift);
/// QPSK modulation /// QPSK modulation
for (int m=0; m<NR_PBCH_DMRS_LENGTH>>1; m++) { for (int m=0; m<NR_PBCH_DMRS_LENGTH; m++) {
idx = ((((gold_pbch_dmrs[(m<<1)>>5])>>((m<<1)&0x1f))&1)<<1) ^ (((gold_pbch_dmrs[((m<<1)+1)>>5])>>(((m<<1)+1)&0x1f))&1); idx = ((((gold_pbch_dmrs[(m<<1)>>5])>>((m<<1)&0x1f))&1)<<1) ^ (((gold_pbch_dmrs[((m<<1)+1)>>5])>>(((m<<1)+1)&0x1f))&1);
mod_dmrs[m<<1] = nr_mod_table[(NR_MOD_TABLE_QPSK_OFFSET + idx)<<1]; mod_dmrs[m<<1] = nr_mod_table[(NR_MOD_TABLE_QPSK_OFFSET + idx)<<1];
mod_dmrs[(m<<1)+1] = nr_mod_table[((NR_MOD_TABLE_QPSK_OFFSET + idx)<<1) + 1]; mod_dmrs[(m<<1)+1] = nr_mod_table[((NR_MOD_TABLE_QPSK_OFFSET + idx)<<1) + 1];
...@@ -131,84 +131,161 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs, ...@@ -131,84 +131,161 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs,
return 0; return 0;
} }
void nr_pbch_scrambling(uint32_t Nid, void nr_pbch_scrambling(NR_gNB_PBCH *pbch,
uint32_t Nid,
uint8_t nushift, uint8_t nushift,
uint8_t *pbch_a, uint16_t M,
uint32_t length) uint16_t length,
uint8_t bitwise)
{ {
uint8_t reset, offset; uint8_t reset, offset;
uint32_t x1, x2, s=0; uint32_t x1, x2, s=0;
uint8_t M = length - 3; // case Lmax = 4--> 29 uint8_t *pbch_e = pbch->pbch_e;
uint32_t *pbch_a_prime = (uint32_t*)pbch->pbch_a_prime;
uint32_t *pbch_a_interleaved = (uint32_t*)pbch->pbch_a_interleaved;
uint32_t unscrambling_mask = 0x87002D;
reset = 1; reset = 1;
// x1 is set in lte_gold_generic // x1 is set in lte_gold_generic
x2 = Nid; x2 = Nid;
// The Gold sequence is shifted by nushift* M, so we skip (nushift*M /32) double words // The Gold sequence is shifted by nushift* M, so we skip (nushift*M /32) double words
for (int i=0; i<(uint16_t)ceil((nushift*M)/5); i++) { for (int i=0; i<(uint16_t)ceil((nushift*M)/32); i++) {
s = lte_gold_generic(&x1, &x2, reset); s = lte_gold_generic(&x1, &x2, reset);
reset = 0; reset = 0;
} }
// Scrambling is now done with offset (nushift*M)%32
offset = (nushift*M)&0x1f; offset = (nushift*M)&0x1f;
#ifdef DEBUG_PBCH_ENCODING
printf("Scrambling params: nushift %d M %d length %d bitwise %d offset %d\n", nushift, M, length, bitwise, offset);
#endif
for (int i=0; i<length; i++) { for (int i=0; i<length; i++) {
if (((i+offset)&0x1f)==0) { if (((i+offset)&0x1f)==0) {
s = lte_gold_generic(&x1, &x2, reset); s = lte_gold_generic(&x1, &x2, reset);
reset = 0; reset = 0;
} }
pbch_a[i] = (pbch_a[i]&1) ^ ((s>>((i+offset)&0x1f))&1); #ifdef DEBUG_PBCH_ENCODING
printf("s: %04x\t", s);
#endif
if (bitwise) {
(*pbch_a_prime) ^= ((unscrambling_mask>>i)&1)? (((*pbch_a_interleaved)>>i)&1)<<i : ((((*pbch_a_interleaved)>>i)&1) ^ ((s>>((i+offset)&0x1f))&1))<<i;
}
else
pbch_e[i] = (pbch_e[i]&1) ^ ((s>>((i+offset)&0x1f))&1);
} }
} }
uint8_t nr_pbch_payload_interleaving_pattern[32] = {16, 23, 18, 17, 8, 30, 10, 6, 24, 7, 0, 5, 3, 2, 1, 4,
9, 11, 12, 13, 14, 15, 19, 20, 21, 22, 25, 26, 27, 28, 29, 31};
uint8_t nr_pbch_payload_interleaver(uint8_t i) {
uint8_t j_sfn=0, j_hrf=10, j_ssb=11, j_other=14;
if (24<=i && i<=27) //Sfn bits
return nr_pbch_payload_interleaving_pattern[j_sfn + i -24];
else if (i==28) // Hrf bit
return nr_pbch_payload_interleaving_pattern[j_hrf];
else if (29<=i) // Ssb bits
return nr_pbch_payload_interleaving_pattern[j_ssb + (i-29)];
else
return nr_pbch_payload_interleaving_pattern[j_other + i];
}
int nr_generate_pbch(NR_gNB_PBCH *pbch, int nr_generate_pbch(NR_gNB_PBCH *pbch,
uint8_t *pbch_pdu, uint8_t *pbch_pdu,
int32_t **txdataF, int32_t **txdataF,
int16_t amp, int16_t amp,
uint8_t ssb_start_symbol, uint8_t ssb_start_symbol,
uint8_t nushift,
uint8_t n_hf, uint8_t n_hf,
uint8_t Lmax,
uint8_t ssb_index,
int sfn, int sfn,
int frame_mod8, nfapi_nr_config_request_t* config,
nfapi_config_request_t* config,
NR_DL_FRAME_PARMS *frame_parms) NR_DL_FRAME_PARMS *frame_parms)
{ {
int k,l,m; int k,l,m;
int16_t a; int16_t a;
int16_t mod_pbch_e[NR_POLAR_PBCH_E<<1]; int16_t mod_pbch_e[NR_POLAR_PBCH_E];
uint8_t sfn_4lsb, idx=0; uint8_t idx=0;
uint16_t M;
uint8_t nushift;
LOG_I(PHY, "PBCH generation started\n"); LOG_I(PHY, "PBCH generation started\n");
///Payload generation ///Payload generation
// Fix byte endian // Fix byte endian
if (!frame_mod8) if (!(sfn&7))
for (int i=0; i<NR_PBCH_PDU_BITS; i++) for (int i=0; i<(NR_PBCH_PDU_BITS>>3); i++)
pbch->pbch_a[NR_PBCH_PDU_BITS-i-1] = pbch_pdu[i]; pbch->pbch_a[(NR_POLAR_PBCH_PAYLOAD_BITS>>3)-i-1] = pbch_pdu[i];
#ifdef DEBUG_PBCH_ENCODING
printf("Byte endian fix:\n");
for (int i=0; i<4; i++)
printf("pbch_a[%d]: 0x%04x\n", i, pbch->pbch_a[i]);
#endif
// Extra bits generation // Extra byte generation
sfn_4lsb = sfn&3; uint8_t *xbyte = pbch->pbch_a;
//memset((void*) xbyte, 0, 1);
for (int i=0; i<4; i++) for (int i=0; i<4; i++)
pbch->pbch_a[NR_PBCH_PDU_BITS+i] = (sfn_4lsb>>i)&1; // 4 lsb of sfn (*xbyte) ^= ((sfn>>i)&1)<<i; // 4 lsb of sfn
pbch->pbch_a[NR_PBCH_PDU_BITS+4] = n_hf; // half frame index bit (*xbyte) ^= n_hf<<4; // half frame index bit
pbch->pbch_a[NR_PBCH_PDU_BITS+5] = (config->sch_config.ssb_subcarrier_offset.value>>5)&1; //MSB of k0 -- Note the case Lssb=64 is not supported (FR2) if (Lmax == 64)
for (int i=0; i<3; i++)
(*xbyte) ^= ((ssb_index>>(3+i))&1)<<(5+i); // resp. 4th, 5th and 6th bits of ssb_index
else
(*xbyte) ^= ((config->sch_config.ssb_subcarrier_offset.value>>5)&1)<<5; //MSB of k_SSB
#ifdef DEBUG_PBCH_ENCODING #ifdef DEBUG_PBCH_ENCODING
printf("Extra byte:\n");
for (int i=0; i<4; i++)
printf("pbch_a[%d]: 0x%04x\n", i, pbch->pbch_a[i]);
#endif
// Payload interleaving
uint32_t* input = (uint32_t*)pbch->pbch_a;
uint32_t* output = (uint32_t*)pbch->pbch_a_interleaved;
for (int i=0; i<32; i++)
(*output) |= (((*input)>>i)&1)<<(nr_pbch_payload_interleaver(i));
#ifdef DEBUG_PBCH_ENCODING
printf("Interleaving:\n");
for (int i=0; i<4; i++)
printf("pbch_a_interleaved[%d]: 0x%04x\n", i, pbch->pbch_a_interleaved[i]);
#endif #endif
// Scrambling // Scrambling
nr_pbch_scrambling((uint32_t)config->sch_config.physical_cell_id.value, nushift, pbch->pbch_a, NR_POLAR_PBCH_PAYLOAD_BITS); M = (Lmax == 64)? (NR_POLAR_PBCH_PAYLOAD_BITS - 6) : (NR_POLAR_PBCH_PAYLOAD_BITS - 3);
nushift = (((sfn>>2)&1)<<1) ^ ((sfn>>1)&1);
nr_pbch_scrambling(pbch, (uint32_t)config->sch_config.physical_cell_id.value, nushift, M, NR_POLAR_PBCH_PAYLOAD_BITS, 1);
#ifdef DEBUG_PBCH_ENCODING #ifdef DEBUG_PBCH_ENCODING
printf("Payload scrambling:\n");
for (int i=0; i<4; i++)
printf("pbch_a_prime[%d]: 0x%04x\n", i, pbch->pbch_a_prime[i]);
#endif #endif
/// CRC, coding and rate matching /// CRC, coding and rate matching
polar_encoder (pbch->pbch_a, pbch->pbch_e, &frame_parms->pbch_polar_params); polar_encoder (pbch->pbch_a_prime, pbch->pbch_e, &frame_parms->pbch_polar_params);
#ifdef DEBUG_PBCH_ENCODING #ifdef DEBUG_PBCH_ENCODING
printf("Channel coding:\n");
for (int i=0; i<NR_POLAR_PBCH_E>>3; i++)
printf("pbch_e[%d]: 0x%04x\t", i, pbch->pbch_e[i]);
printf("\n");
#endif
/// Scrambling
M = NR_POLAR_PBCH_E;
nushift = config->sch_config.physical_cell_id.value &3;;
nr_pbch_scrambling(pbch, (uint32_t)config->sch_config.physical_cell_id.value, nushift, M, NR_POLAR_PBCH_E, 0);
#ifdef DEBUG_PBCH_ENCODING
printf("Scrambling:\n");
for (int i=0; i<NR_POLAR_PBCH_E>>3; i++)
printf("pbch_e[%d]: 0x%04x\t", i, pbch->pbch_e[i]);
printf("\n");
#endif #endif
/// QPSK modulation /// QPSK modulation
......
...@@ -28,7 +28,7 @@ int nr_generate_pss( int16_t *d_pss, ...@@ -28,7 +28,7 @@ int nr_generate_pss( int16_t *d_pss,
int32_t **txdataF, int32_t **txdataF,
int16_t amp, int16_t amp,
uint8_t ssb_start_symbol, uint8_t ssb_start_symbol,
nfapi_config_request_t* config, nfapi_nr_config_request_t* config,
NR_DL_FRAME_PARMS *frame_parms) NR_DL_FRAME_PARMS *frame_parms)
{ {
int i,k,l,m; int i,k,l,m;
......
...@@ -27,7 +27,7 @@ int nr_generate_sss( int16_t *d_sss, ...@@ -27,7 +27,7 @@ int nr_generate_sss( int16_t *d_sss,
int32_t **txdataF, int32_t **txdataF,
int16_t amp, int16_t amp,
uint8_t ssb_start_symbol, uint8_t ssb_start_symbol,
nfapi_config_request_t* config, nfapi_nr_config_request_t* config,
NR_DL_FRAME_PARMS *frame_parms) NR_DL_FRAME_PARMS *frame_parms)
{ {
int i,k,l; int i,k,l;
......
...@@ -36,7 +36,7 @@ int nr_generate_pss( int16_t *d_pss, ...@@ -36,7 +36,7 @@ int nr_generate_pss( int16_t *d_pss,
int32_t **txdataF, int32_t **txdataF,
int16_t amp, int16_t amp,
uint8_t ssb_start_symbol, uint8_t ssb_start_symbol,
nfapi_config_request_t* config, nfapi_nr_config_request_t* config,
NR_DL_FRAME_PARMS *frame_parms); NR_DL_FRAME_PARMS *frame_parms);
/*! /*!
...@@ -49,7 +49,7 @@ int nr_generate_sss( int16_t *d_sss, ...@@ -49,7 +49,7 @@ int nr_generate_sss( int16_t *d_sss,
int32_t **txdataF, int32_t **txdataF,
int16_t amp, int16_t amp,
uint8_t ssb_start_symbol, uint8_t ssb_start_symbol,
nfapi_config_request_t* config, nfapi_nr_config_request_t* config,
NR_DL_FRAME_PARMS *frame_parms); NR_DL_FRAME_PARMS *frame_parms);
/*! /*!
...@@ -62,8 +62,7 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs, ...@@ -62,8 +62,7 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs,
int32_t **txdataF, int32_t **txdataF,
int16_t amp, int16_t amp,
uint8_t ssb_start_symbol, uint8_t ssb_start_symbol,
uint8_t nushift, nfapi_nr_config_request_t* config,
nfapi_config_request_t* config,
NR_DL_FRAME_PARMS *frame_parms); NR_DL_FRAME_PARMS *frame_parms);
/*! /*!
...@@ -71,10 +70,12 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs, ...@@ -71,10 +70,12 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs,
\brief PBCH scrambling function \brief PBCH scrambling function
@param @param
*/ */
void nr_pbch_scrambling(uint32_t Nid, void nr_pbch_scrambling(NR_gNB_PBCH *pbch,
uint32_t Nid,
uint8_t nushift, uint8_t nushift,
uint8_t *pbch_a, uint16_t M,
uint32_t length); uint16_t length,
uint8_t bitwise);
/*! /*!
\fn int nr_generate_pbch \fn int nr_generate_pbch
...@@ -87,11 +88,19 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch, ...@@ -87,11 +88,19 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch,
int32_t **txdataF, int32_t **txdataF,
int16_t amp, int16_t amp,
uint8_t ssb_start_symbol, uint8_t ssb_start_symbol,
uint8_t nushift,
uint8_t n_hf, uint8_t n_hf,
uint8_t Lmax,
uint8_t ssb_index,
int sfn, int sfn,
int frame_mod8, nfapi_nr_config_request_t* config,
nfapi_config_request_t* config,
NR_DL_FRAME_PARMS *frame_parms); NR_DL_FRAME_PARMS *frame_parms);
/*!
\fn int nr_generate_pbch
\brief PBCH interleaving function
@param bit index i of the input payload
@returns the bit index of the output
*/
uint8_t nr_pbch_payload_interleaver(uint8_t i);
#endif /*__NR_TRANSPORT__H__*/ #endif /*__NR_TRANSPORT__H__*/
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -45,10 +45,10 @@ ...@@ -45,10 +45,10 @@
#include "PHY/NR_REFSIG/refsig_defs_ue.h" #include "PHY/NR_REFSIG/refsig_defs_ue.h"
extern openair0_config_t openair0_cfg[]; extern openair0_config_t openair0_cfg[];
static nfapi_config_request_t config_t; static nfapi_nr_config_request_t config_t;
static nfapi_config_request_t* config =&config_t; static nfapi_nr_config_request_t* config =&config_t;
/* forward declarations */ /* forward declarations */
void set_default_frame_parms_single(nfapi_config_request_t *config, NR_DL_FRAME_PARMS *frame_parms); void set_default_frame_parms_single(nfapi_nr_config_request_t *config, NR_DL_FRAME_PARMS *frame_parms);
//#define DEBUG_INITIAL_SYNCH //#define DEBUG_INITIAL_SYNCH
...@@ -164,7 +164,7 @@ int nr_initial_sync(PHY_VARS_NR_UE *ue, runmode_t mode) ...@@ -164,7 +164,7 @@ int nr_initial_sync(PHY_VARS_NR_UE *ue, runmode_t mode)
NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms; NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
int ret=-1; int ret=-1;
int aarx,rx_power=0; int aarx,rx_power=0;
//nfapi_config_request_t* config; //nfapi_nr_config_request_t* config;
/*offset parameters to be updated from higher layer */ /*offset parameters to be updated from higher layer */
k_ssb =0; k_ssb =0;
......
This diff is collapsed.
...@@ -114,11 +114,11 @@ typedef struct PHY_VARS_gNB_s { ...@@ -114,11 +114,11 @@ typedef struct PHY_VARS_gNB_s {
int (*te)(struct PHY_VARS_gNB_s *,uint8_t *,uint8_t,LTE_eNB_DLSCH_t *,int,uint8_t,time_stats_t *,time_stats_t *,time_stats_t *); int (*te)(struct PHY_VARS_gNB_s *,uint8_t *,uint8_t,LTE_eNB_DLSCH_t *,int,uint8_t,time_stats_t *,time_stats_t *,time_stats_t *);
int (*start_if)(struct RU_t_s *ru,struct PHY_VARS_gNB_s *eNB); int (*start_if)(struct RU_t_s *ru,struct PHY_VARS_gNB_s *eNB);
uint8_t local_flag; uint8_t local_flag;
nfapi_config_request_t gNB_config; nfapi_nr_config_request_t gNB_config;
NR_DL_FRAME_PARMS frame_parms; NR_DL_FRAME_PARMS frame_parms;
PHY_MEASUREMENTS_gNB measurements; PHY_MEASUREMENTS_gNB measurements;
IF_Module_t *if_inst; NR_IF_Module_t *if_inst;
UL_IND_t UL_INFO; NR_UL_IND_t UL_INFO;
pthread_mutex_t UL_INFO_mutex; pthread_mutex_t UL_INFO_mutex;
/// NFAPI RX ULSCH information /// NFAPI RX ULSCH information
nfapi_rx_indication_pdu_t rx_pdu_list[NFAPI_RX_IND_MAX_PDU]; nfapi_rx_indication_pdu_t rx_pdu_list[NFAPI_RX_IND_MAX_PDU];
......
...@@ -35,10 +35,12 @@ ...@@ -35,10 +35,12 @@
#include "defs_eNB.h" #include "defs_eNB.h"
#include "defs_nr_common.h" #include "defs_nr_common.h"
#include "CODING/nrPolar_tools/nr_polar_pbch_defs.h" #include "CODING/nrPolar_tools/nr_polar_pbch_defs.h"
#include "openair2/NR_PHY_INTERFACE/NR_IF_Module.h"
typedef struct { typedef struct {
uint8_t pbch_a[NR_POLAR_PBCH_PAYLOAD_BITS]; uint8_t pbch_a[NR_POLAR_PBCH_PAYLOAD_BITS>>3];
uint8_t pbch_a_interleaved[NR_POLAR_PBCH_PAYLOAD_BITS>>3];
uint8_t pbch_a_prime[NR_POLAR_PBCH_PAYLOAD_BITS>>3];
uint8_t pbch_e[NR_POLAR_PBCH_E]; uint8_t pbch_e[NR_POLAR_PBCH_E];
} NR_gNB_PBCH; } NR_gNB_PBCH;
...@@ -240,11 +242,11 @@ typedef struct PHY_VARS_gNB_s { ...@@ -240,11 +242,11 @@ typedef struct PHY_VARS_gNB_s {
int rx_total_gain_dB; int rx_total_gain_dB;
int (*start_if)(struct RU_t_s *ru,struct PHY_VARS_gNB_s *gNB); int (*start_if)(struct RU_t_s *ru,struct PHY_VARS_gNB_s *gNB);
uint8_t local_flag; uint8_t local_flag;
nfapi_config_request_t gNB_config; nfapi_nr_config_request_t gNB_config;
NR_DL_FRAME_PARMS frame_parms; NR_DL_FRAME_PARMS frame_parms;
PHY_MEASUREMENTS_gNB measurements; PHY_MEASUREMENTS_gNB measurements;
IF_Module_t *if_inst; NR_IF_Module_t *if_inst;
UL_IND_t UL_INFO; NR_UL_IND_t UL_INFO;
pthread_mutex_t UL_INFO_mutex; pthread_mutex_t UL_INFO_mutex;
/// NFAPI RX ULSCH information /// NFAPI RX ULSCH information
nfapi_rx_indication_pdu_t rx_pdu_list[NFAPI_RX_IND_MAX_PDU]; nfapi_rx_indication_pdu_t rx_pdu_list[NFAPI_RX_IND_MAX_PDU];
......
...@@ -578,57 +578,109 @@ typedef struct { ...@@ -578,57 +578,109 @@ typedef struct {
#define NR_NBR_SEARCHSPACE_ACT_BWP 10 // The number of SearchSpaces per BWP is limited to 10 (including initial SEARCHSPACE: SearchSpaceId 0) #define NR_NBR_SEARCHSPACE_ACT_BWP 10 // The number of SearchSpaces per BWP is limited to 10 (including initial SEARCHSPACE: SearchSpaceId 0)
#ifdef NR_PDCCH_DEFS_NR_UE #ifdef NR_PDCCH_DEFS_NR_UE
#define MAX_NR_DCI_DECODED_SLOT 10
#define NBR_NR_FORMATS 8 #define NBR_NR_FORMATS 8
#define NBR_NR_DCI_FIELDS 48 #define NBR_NR_DCI_FIELDS 56
// The following parameters define 'position' of each DCI field described in TS 38.212
#define CARRIER_IND 0 #define IDENTIFIER_DCI_FORMATS 0
#define SUL_IND_0_1 1 #define CARRIER_IND 1
#define IDENTIFIER_DCI_FORMATS 2 #define SUL_IND_0_1 2
#define SLOT_FORMAT_IND 3 #define SLOT_FORMAT_IND 3
#define PRE_EMPTION_IND 4 #define PRE_EMPTION_IND 4
#define TPC_CMD_NUMBER 5 #define TPC_CMD_NUMBER 5
#define BLOCK_NUMBER 6 #define BLOCK_NUMBER 6
#define BANDWIDTH_PART_IND 7 #define BANDWIDTH_PART_IND 7
#define FREQ_DOM_RESOURCE_ASSIGNMENT_UL 8 #define SHORT_MESSAGE_IND 8
#define FREQ_DOM_RESOURCE_ASSIGNMENT_DL 9 #define SHORT_MESSAGES 9
#define TIME_DOM_RESOURCE_ASSIGNMENT 10 #define FREQ_DOM_RESOURCE_ASSIGNMENT_UL 10
#define VRB_TO_PRB_MAPPING 11 #define FREQ_DOM_RESOURCE_ASSIGNMENT_DL 11
#define PRB_BUNDLING_SIZE_IND 12 #define TIME_DOM_RESOURCE_ASSIGNMENT 12
#define RATE_MATCHING_IND 13 #define VRB_TO_PRB_MAPPING 13
#define ZP_CSI_RS_TRIGGER 14 #define PRB_BUNDLING_SIZE_IND 14
#define FREQ_HOPPING_FLAG 15 #define RATE_MATCHING_IND 15
#define TB1_MCS 16 #define ZP_CSI_RS_TRIGGER 16
#define TB1_NDI 17 #define FREQ_HOPPING_FLAG 17
#define TB1_RV 18 #define TB1_MCS 18
#define TB2_MCS 19 #define TB1_NDI 19
#define TB2_NDI 20 #define TB1_RV 20
#define TB2_RV 21 #define TB2_MCS 21
#define MCS 22 #define TB2_NDI 22
#define NDI 23 #define TB2_RV 23
#define RV 24 #define MCS 24
#define HARQ_PROCESS_NUMBER 25 #define NDI 25
#define DAI_ 26 #define RV 26
#define FIRST_DAI 27 #define HARQ_PROCESS_NUMBER 27
#define SECOND_DAI 28 #define DAI_ 28
#define TPC_PUSCH 29 #define FIRST_DAI 29
#define TPC_PUCCH 30 #define SECOND_DAI 30
#define PUCCH_RESOURCE_IND 31 #define TB_SCALING 31
#define PDSCH_TO_HARQ_FEEDBACK_TIME_IND 32 #define TPC_PUSCH 32
#define SHORT_MESSAGE_IND 33 #define TPC_PUCCH 33
#define SRS_RESOURCE_IND 34 #define PUCCH_RESOURCE_IND 34
#define PRECOD_NBR_LAYERS 35 #define PDSCH_TO_HARQ_FEEDBACK_TIME_IND 35
#define ANTENNA_PORTS 36 //#define SHORT_MESSAGE_IND 33
#define TCI 37 #define SRS_RESOURCE_IND 36
#define SRS_REQUEST 38 #define PRECOD_NBR_LAYERS 37
#define TPC_CMD_NUMBER_FORMAT2_3 39 #define ANTENNA_PORTS 38
#define CSI_REQUEST 40 #define TCI 39
#define CBGTI 41 #define SRS_REQUEST 40
#define CBGFI 42 #define TPC_CMD_NUMBER_FORMAT2_3 41
#define PTRS_DMRS 43 #define CSI_REQUEST 42
#define BETA_OFFSET_IND 44 #define CBGTI 43
#define DMRS_SEQ_INI 45 #define CBGFI 44
#define SUL_IND_0_0 46 #define PTRS_DMRS 45
#define PADDING 47 #define BETA_OFFSET_IND 46
#define DMRS_SEQ_INI 47
#define UL_SCH_IND 48
#define PADDING_NR_DCI 49
#define SUL_IND_0_0 50
#define RA_PREAMBLE_INDEX 51
#define SUL_IND_1_0 52
#define SS_PBCH_INDEX 53
#define PRACH_MASK_INDEX 54
#define RESERVED_NR_DCI 55
typedef enum {
_format_0_0_found=0,
_format_0_1_found=1,
_format_1_0_found=2,
_format_1_1_found=3,
_format_2_0_found=4,
_format_2_1_found=5,
_format_2_2_found=6,
_format_2_3_found=7} format_found_t;
#define TOTAL_NBR_SCRAMBLED_VALUES 13
#define _C_RNTI_ 0
#define _CS_RNTI_ 1
#define _NEW_RNTI_ 2
#define _TC_RNTI_ 3
#define _P_RNTI_ 4
#define _SI_RNTI_ 5
#define _RA_RNTI_ 6
#define _SP_CSI_RNTI_ 7
#define _SFI_RNTI_ 8
#define _INT_RNTI_ 9
#define _TPC_PUSCH_RNTI_ 10
#define _TPC_PUCCH_RNTI_ 11
#define _TPC_SRS_RNTI_ 12
typedef enum {
_c_rnti = _C_RNTI_,
_cs_rnti = _CS_RNTI_,
_new_rnti = _NEW_RNTI_,
_tc_rnti = _TC_RNTI_,
_p_rnti = _P_RNTI_,
_si_rnti = _SI_RNTI_,
_ra_rnti = _RA_RNTI_,
_sp_csi_rnti = _SP_CSI_RNTI_,
_sfi_rnti = _SFI_RNTI_,
_int_rnti = _INT_RNTI_,
_tpc_pusch_rnti = _TPC_PUSCH_RNTI_,
_tpc_pucch_rnti = _TPC_PUCCH_RNTI_,
_tpc_srs_rnti = _TPC_SRS_RNTI_} crc_scrambled_t;
typedef enum {bundle_n2=2,bundle_n3=3,bundle_n6=6} NR_UE_CORESET_REG_bundlesize_t; typedef enum {bundle_n2=2,bundle_n3=3,bundle_n6=6} NR_UE_CORESET_REG_bundlesize_t;
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#define __PHY_DEFS_NR_COMMON__H__ #define __PHY_DEFS_NR_COMMON__H__
#include "defs_common.h" #include "defs_common.h"
#include "nfapi_interface.h" #include "nfapi_nr_interface.h"
#include "impl_defs_nr.h" #include "impl_defs_nr.h"
#include "PHY/CODING/nrPolar_tools/nr_polar_defs.h" #include "PHY/CODING/nrPolar_tools/nr_polar_defs.h"
...@@ -54,8 +54,8 @@ ...@@ -54,8 +54,8 @@
#define NR_PSS_LENGTH 127 #define NR_PSS_LENGTH 127
#define NR_SSS_LENGTH 127 #define NR_SSS_LENGTH 127
#define NR_PBCH_DMRS_LENGTH 144 #define NR_PBCH_DMRS_LENGTH 144 // in mod symbols
#define NR_PBCH_DMRS_LENGTH_DWORD 5 // roundup(NR_PBCH_DMRS_LENGTH/32) #define NR_PBCH_DMRS_LENGTH_DWORD 10 // roundup(2(QPSK)*NR_PBCH_DMRS_LENGTH/32)
#define NR_MAX_PDCCH_DMRS_LENGTH 100 #define NR_MAX_PDCCH_DMRS_LENGTH 100
#define NR_MAX_PDCCH_DMRS_LENGTH_DWORD 5 #define NR_MAX_PDCCH_DMRS_LENGTH_DWORD 5
...@@ -79,6 +79,11 @@ typedef enum{ ...@@ -79,6 +79,11 @@ typedef enum{
nr_ssb_type_E nr_ssb_type_E
} nr_ssb_type_e; } nr_ssb_type_e;
typedef enum {
nr_FR1 = 0,
nr_FR2
} nr_frequency_range_e;
typedef struct NR_BWP_PARMS { typedef struct NR_BWP_PARMS {
/// Associated numerology index /// Associated numerology index
uint8_t numerology_index; uint8_t numerology_index;
...@@ -91,6 +96,8 @@ typedef struct NR_BWP_PARMS { ...@@ -91,6 +96,8 @@ typedef struct NR_BWP_PARMS {
} NR_BWP_PARMS; } NR_BWP_PARMS;
typedef struct NR_DL_FRAME_PARMS { typedef struct NR_DL_FRAME_PARMS {
/// frequency range
nr_frequency_range_e freq_range;
/// Number of resource blocks (RB) in DL /// Number of resource blocks (RB) in DL
uint8_t N_RB_DL; uint8_t N_RB_DL;
/// Number of resource blocks (RB) in UL /// Number of resource blocks (RB) in UL
......
This diff is collapsed.
...@@ -86,7 +86,7 @@ void nr_feptx0(RU_t *ru,int slot) { ...@@ -86,7 +86,7 @@ void nr_feptx0(RU_t *ru,int slot) {
void nr_feptx_ofdm_2thread(RU_t *ru) { void nr_feptx_ofdm_2thread(RU_t *ru) {
NR_DL_FRAME_PARMS *fp=ru->nr_frame_parms; NR_DL_FRAME_PARMS *fp=ru->nr_frame_parms;
nfapi_config_request_t *cfg = &ru->gNB_list[0]->gNB_config; nfapi_nr_config_request_t *cfg = &ru->gNB_list[0]->gNB_config;
RU_proc_t *proc = &ru->proc; RU_proc_t *proc = &ru->proc;
struct timespec wait; struct timespec wait;
int subframe = ru->proc.subframe_tx; int subframe = ru->proc.subframe_tx;
...@@ -185,7 +185,7 @@ void nr_init_feptx_thread(RU_t *ru,pthread_attr_t *attr_feptx) { ...@@ -185,7 +185,7 @@ void nr_init_feptx_thread(RU_t *ru,pthread_attr_t *attr_feptx) {
void nr_feptx_ofdm(RU_t *ru) { void nr_feptx_ofdm(RU_t *ru) {
NR_DL_FRAME_PARMS *fp=ru->nr_frame_parms; NR_DL_FRAME_PARMS *fp=ru->nr_frame_parms;
nfapi_config_request_t *cfg = &ru->gNB_list[0]->gNB_config; nfapi_nr_config_request_t *cfg = &ru->gNB_list[0]->gNB_config;
unsigned int aa,slot_offset, slot_offset_F; unsigned int aa,slot_offset, slot_offset_F;
int dummy_tx_b[7680*4] __attribute__((aligned(32))); int dummy_tx_b[7680*4] __attribute__((aligned(32)));
......
...@@ -76,7 +76,7 @@ int return_ssb_type(nfapi_config_request_t *cfg) ...@@ -76,7 +76,7 @@ int return_ssb_type(nfapi_config_request_t *cfg)
}*/ }*/
// First SSB starting symbol candidate is used and type B is chosen for 30kHz SCS // First SSB starting symbol candidate is used and type B is chosen for 30kHz SCS
int nr_get_ssb_start_symbol(nfapi_config_request_t *cfg, NR_DL_FRAME_PARMS *fp) int nr_get_ssb_start_symbol(nfapi_nr_config_request_t *cfg, NR_DL_FRAME_PARMS *fp)
{ {
int mu = cfg->subframe_config.numerology_index_mu.value; int mu = cfg->subframe_config.numerology_index_mu.value;
int symbol = 0; int symbol = 0;
...@@ -109,7 +109,7 @@ int nr_get_ssb_start_symbol(nfapi_config_request_t *cfg, NR_DL_FRAME_PARMS *fp) ...@@ -109,7 +109,7 @@ int nr_get_ssb_start_symbol(nfapi_config_request_t *cfg, NR_DL_FRAME_PARMS *fp)
return symbol; return symbol;
} }
void nr_set_ssb_first_subcarrier(nfapi_config_request_t *cfg, NR_DL_FRAME_PARMS *fp) void nr_set_ssb_first_subcarrier(nfapi_nr_config_request_t *cfg, NR_DL_FRAME_PARMS *fp)
{ {
int start_rb = cfg->sch_config.n_ssb_crb.value / pow(2,cfg->subframe_config.numerology_index_mu.value); int start_rb = cfg->sch_config.n_ssb_crb.value / pow(2,cfg->subframe_config.numerology_index_mu.value);
fp->ssb_start_subcarrier = 12 * start_rb + cfg->sch_config.ssb_subcarrier_offset.value; fp->ssb_start_subcarrier = 12 * start_rb + cfg->sch_config.ssb_subcarrier_offset.value;
...@@ -119,20 +119,17 @@ void nr_set_ssb_first_subcarrier(nfapi_config_request_t *cfg, NR_DL_FRAME_PARMS ...@@ -119,20 +119,17 @@ void nr_set_ssb_first_subcarrier(nfapi_config_request_t *cfg, NR_DL_FRAME_PARMS
void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame, int subframe) { void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame, int subframe) {
NR_DL_FRAME_PARMS *fp=&gNB->frame_parms; NR_DL_FRAME_PARMS *fp=&gNB->frame_parms;
nfapi_config_request_t *cfg = &gNB->gNB_config; nfapi_nr_config_request_t *cfg = &gNB->gNB_config;
int **txdataF = gNB->common_vars.txdataF; int **txdataF = gNB->common_vars.txdataF;
uint8_t *pbch_pdu=&gNB->pbch_pdu[0]; uint8_t *pbch_pdu=&gNB->pbch_pdu[0];
int ss_subframe = (cfg->sch_config.half_frame_index.value)? 5 : 0; int ss_subframe = (cfg->sch_config.half_frame_index.value)? 5 : 0;
int sfn = 10*frame + subframe; uint8_t Lmax, ssb_index=0, n_hf=0;
int frame_mod8 = frame&7;
uint8_t Lmax, nushift, ssb_index=0, n_hf=0;
LOG_D(PHY,"common_signal_procedures: frame %d, subframe %d\n",frame,subframe); LOG_D(PHY,"common_signal_procedures: frame %d, subframe %d\n",frame,subframe);
int ssb_start_symbol = nr_get_ssb_start_symbol(cfg, fp); int ssb_start_symbol = nr_get_ssb_start_symbol(cfg, fp);
nr_set_ssb_first_subcarrier(cfg, fp); nr_set_ssb_first_subcarrier(cfg, fp);
Lmax = (fp->dl_CarrierFreq < 3e9)? 4:8; Lmax = (fp->dl_CarrierFreq < 3e9)? 4:8;
nushift = (Lmax < 8)? ssb_index&3 : ssb_index&7;
if (subframe == ss_subframe) if (subframe == ss_subframe)
...@@ -147,8 +144,8 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame, int subframe) { ...@@ -147,8 +144,8 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame, int subframe) {
if (gNB->pbch_configured != 1)return; if (gNB->pbch_configured != 1)return;
gNB->pbch_configured = 0; gNB->pbch_configured = 0;
}*/ }*/
nr_generate_pbch_dmrs(gNB->nr_gold_pbch_dmrs[n_hf][ssb_index],txdataF, AMP_OVER_2, ssb_start_symbol, nushift, cfg, fp); nr_generate_pbch_dmrs(gNB->nr_gold_pbch_dmrs[n_hf][ssb_index],txdataF, AMP_OVER_2, ssb_start_symbol, cfg, fp);
nr_generate_pbch(&gNB->pbch, pbch_pdu, txdataF, AMP_OVER_2, ssb_start_symbol, nushift, sfn, n_hf, frame_mod8, cfg, fp); nr_generate_pbch(&gNB->pbch, pbch_pdu, txdataF, AMP_OVER_2, ssb_start_symbol, n_hf, Lmax, ssb_index, frame, cfg, fp);
} }
} }
...@@ -162,7 +159,7 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB, ...@@ -162,7 +159,7 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
int subframe=proc->subframe_tx; int subframe=proc->subframe_tx;
NR_DL_FRAME_PARMS *fp=&gNB->frame_parms; NR_DL_FRAME_PARMS *fp=&gNB->frame_parms;
nfapi_config_request_t *cfg = &gNB->gNB_config; nfapi_nr_config_request_t *cfg = &gNB->gNB_config;
int offset = gNB->CC_id; int offset = gNB->CC_id;
......
...@@ -33,8 +33,9 @@ ...@@ -33,8 +33,9 @@
#include "SCHED/sched_eNB.h" #include "SCHED/sched_eNB.h"
#include "PHY/NR_TRANSPORT/nr_dci.h" #include "PHY/NR_TRANSPORT/nr_dci.h"
lte_subframe_t nr_subframe_select (nfapi_config_request_t *cfg, unsigned char subframe);
void nr_set_ssb_first_subcarrier(nfapi_config_request_t *cfg, NR_DL_FRAME_PARMS *fp); lte_subframe_t nr_subframe_select (nfapi_nr_config_request_t *cfg, unsigned char subframe);
void nr_set_ssb_first_subcarrier(nfapi_nr_config_request_t *cfg, NR_DL_FRAME_PARMS *fp);
void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB, gNB_rxtx_proc_t *proc, int do_meas); void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB, gNB_rxtx_proc_t *proc, int do_meas);
void nr_init_feptx_thread(RU_t *ru,pthread_attr_t *attr_feptx); void nr_init_feptx_thread(RU_t *ru,pthread_attr_t *attr_feptx);
void nr_feptx_ofdm(RU_t *ru); void nr_feptx_ofdm(RU_t *ru);
......
This diff is collapsed.
/*
* 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 fapi_l1.h
* \brief function prototypes for FAPI L1 interface
* \author R. Knopp
* \date 2017
* \version 0.1
* \company Eurecom
* \email: knopp@eurecom.fr
* \note
* \warning
*/
#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"
#include "nfapi_interface.h"
void fill_uci_harq_indication(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);
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);
void fill_ulsch_cqi_indication(PHY_VARS_eNB *eNB,uint16_t frame,uint8_t subframe,LTE_UL_eNB_HARQ_t *ulsch_harq,uint16_t rnti);
void fill_sr_indication(PHY_VARS_eNB *eNB,uint16_t rnti,int frame,int subframe,uint32_t stat);
void fill_rx_indication(PHY_VARS_eNB *eNB,int UE_id,int frame,int subframe);
void fill_crc_indication(PHY_VARS_eNB *eNB,int UE_id,int frame,int subframe,uint8_t crc_flag);
void handle_nfapi_dci_dl_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_proc_t *proc,nfapi_dl_config_request_pdu_t *dl_config_pdu);
void handle_nfapi_mpdcch_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,nfapi_dl_config_request_pdu_t *dl_config_pdu);
void handle_nfapi_hi_dci0_dci_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_proc_t *proc,
nfapi_hi_dci0_request_pdu_t *hi_dci0_config_pdu);
void handle_nfapi_hi_dci0_hi_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_proc_t *proc,
nfapi_hi_dci0_request_pdu_t *hi_dci0_config_pdu);
void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_proc_t *proc,
nfapi_dl_config_request_pdu_t *dl_config_pdu,
uint8_t codeword_index,
uint8_t *sdu);
void handle_nfapi_ul_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
nfapi_ul_config_request_pdu_t *ul_config_pdu,
uint16_t frame,uint8_t subframe,uint8_t srs_present);
void handle_ulsch_harq_pdu(
PHY_VARS_eNB *eNB,
int UE_id,
nfapi_ul_config_request_pdu_t *ul_config_pdu,
nfapi_ul_config_ulsch_harq_information *harq_information,
uint16_t frame,
uint8_t subframe);
void handle_ulsch_cqi_ri_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request_pdu_t *ul_config_pdu,uint16_t frame,uint8_t subframe);
void handle_uci_harq_information(PHY_VARS_eNB *eNB, LTE_eNB_UCI *uci,nfapi_ul_config_harq_information *harq_information);
void handle_uci_sr_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request_pdu_t *ul_config_pdu,uint16_t frame,uint8_t subframe,uint8_t srs_active);
void handle_uci_sr_harq_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request_pdu_t *ul_config_pdu,uint16_t frame,uint8_t subframe,uint8_t srs_active);
void handle_uci_harq_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request_pdu_t *ul_config_pdu,uint16_t frame,uint8_t subframe,uint8_t srs_active);
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);
/*
* 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 fapi_nr_ue_l1.c
* \brief functions for NR UE FAPI-like interface
* \author R. Knopp
* \date 2018
* \version 0.1
* \company Eurecom
* \email: knopp@eurecom.fr
* \note
* \warning
*/
#include "fapi_nr_ue_interface.h"
#include "fapi_nr_ue_l1.h"
int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
return 0;
}
int8_t nr_ue_phy_config_request(nr_phy_config_t *phy_config){
return 0;
}
\ No newline at end of file
/*
* 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 fapi_nr_ue_l1.c
* \brief functions for FAPI L1 interface
* \author R. Knopp
* \date 2018
* \version 0.1
* \company Eurecom
* \email: knopp@eurecom.fr
* \note
* \warning
*/
#ifndef __FAPI_NR_UE_L1_H__
#define __FAPI_NR_UE_L1_H__
#include "NR_IF_Module.h"
/**\brief NR UE FAPI-like P7 messages, scheduled response from L2 indicating L1
\param scheduled_response including transmission config(dl_config, ul_config) and data transmission (tx_req)*/
int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response);
/**\brief NR UE FAPI-like P5 message, physical configuration from L2 to configure L1
\param scheduled_response including transmission config(dl_config, ul_config) and data transmission (tx_req)*/
int8_t nr_ue_phy_config_request(nr_phy_config_t *phy_config);
#endif
\ No newline at end of file
This diff is collapsed.
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include <pthread.h> #include <pthread.h>
extern unsigned char Emulation_status; extern unsigned char Emulation_status;
extern unsigned char emu_tx_status; extern unsigned char emu_tx_status;
extern unsigned char emu_rx_status; extern unsigned char emu_rx_status;
......
...@@ -70,14 +70,19 @@ ...@@ -70,14 +70,19 @@
#ifdef LARGE_SCALE #ifdef LARGE_SCALE
# define MAX_MOBILES_PER_ENB 128 # define MAX_MOBILES_PER_ENB 128
# define MAX_MOBILES_PER_ENB_NB_IoT 128 # define MAX_MOBILES_PER_ENB_NB_IoT 128
# define MAX_MOBILES_PER_GNB 128
# define MAX_eNB 2 # define MAX_eNB 2
# define MAX_gNB 2
#else #else
# define MAX_MOBILES_PER_ENB 16 # define MAX_MOBILES_PER_ENB 16
# define MAX_MOBILES_PER_ENB_NB_IoT 16 # define MAX_MOBILES_PER_ENB_NB_IoT 16
# define MAX_MOBILES_PER_GNB 16
# define MAX_eNB 2 # define MAX_eNB 2
# define MAX_gNB 2
#endif #endif
#define MAX_MANAGED_ENB_PER_MOBILE 2 #define MAX_MANAGED_ENB_PER_MOBILE 2
#define MAX_MANAGED_GNB_PER_MOBILE 2
///NB-IOT ///NB-IOT
#define NB_RB_MAX_NB_IOT (maxDRB_NB_r13 + 3) //MP: NB_IoT --> 2(DRB)+3(SRBs - 2 is not used) = 5 #define NB_RB_MAX_NB_IOT (maxDRB_NB_r13 + 3) //MP: NB_IoT --> 2(DRB)+3(SRBs - 2 is not used) = 5
......
...@@ -55,6 +55,7 @@ MESSAGE_DEF(RRC_STATE_IND, MESSAGE_PRIORITY_MED, RrcStateInd, ...@@ -55,6 +55,7 @@ MESSAGE_DEF(RRC_STATE_IND, MESSAGE_PRIORITY_MED, RrcStateInd,
// eNB: ENB_APP -> RRC messages // eNB: ENB_APP -> RRC messages
MESSAGE_DEF(RRC_CONFIGURATION_REQ, MESSAGE_PRIORITY_MED, RrcConfigurationReq, rrc_configuration_req) MESSAGE_DEF(RRC_CONFIGURATION_REQ, MESSAGE_PRIORITY_MED, RrcConfigurationReq, rrc_configuration_req)
MESSAGE_DEF(NBIOTRRC_CONFIGURATION_REQ, MESSAGE_PRIORITY_MED, NbIoTRrcConfigurationReq, nbiotrrc_configuration_req) MESSAGE_DEF(NBIOTRRC_CONFIGURATION_REQ, MESSAGE_PRIORITY_MED, NbIoTRrcConfigurationReq, nbiotrrc_configuration_req)
MESSAGE_DEF(NRRRC_CONFIGURATION_REQ, MESSAGE_PRIORITY_MED, gNB_RrcConfigurationReq, nrrrc_configuration_req)
// UE: NAS -> RRC messages // UE: NAS -> RRC messages
MESSAGE_DEF(NAS_KENB_REFRESH_REQ, MESSAGE_PRIORITY_MED, NasKenbRefreshReq, nas_kenb_refresh_req) MESSAGE_DEF(NAS_KENB_REFRESH_REQ, MESSAGE_PRIORITY_MED, NasKenbRefreshReq, nas_kenb_refresh_req)
......
...@@ -293,9 +293,9 @@ typedef struct NRRrcConfigurationReq_s { ...@@ -293,9 +293,9 @@ typedef struct NRRrcConfigurationReq_s {
//NR FrequencyInfoUL //NR FrequencyInfoUL
long UL_FreqBandIndicatorNR[MAX_NUM_CCs]; long UL_FreqBandIndicatorNR[MAX_NUM_CCs];
long UL_absoluteFrequencyPointA[MAX_NUM_CCs]; long UL_absoluteFrequencyPointA[MAX_NUM_CCs];
lte_prefix_type_t UL_additionalSpectrumEmission[MAX_NUM_CCs]; long UL_additionalSpectrumEmission[MAX_NUM_CCs];
long UL_p_Max[MAX_NUM_CCs]; long UL_p_Max[MAX_NUM_CCs];
long ULfrequencyShift7p5khz[MAX_NUM_CCs]; long UL_frequencyShift7p5khz[MAX_NUM_CCs];
//NR UL SCS-SpecificCarrier //NR UL SCS-SpecificCarrier
uint32_t UL_offsetToCarrier[MAX_NUM_CCs]; uint32_t UL_offsetToCarrier[MAX_NUM_CCs];
......
...@@ -44,6 +44,8 @@ TASK_DEF(TASK_RRC_ENB, TASK_PRIORITY_MED, 200) ...@@ -44,6 +44,8 @@ TASK_DEF(TASK_RRC_ENB, TASK_PRIORITY_MED, 200)
// Define here for now // Define here for now
TASK_DEF(TASK_RRC_ENB_NB_IoT, TASK_PRIORITY_MED, 200) TASK_DEF(TASK_RRC_ENB_NB_IoT, TASK_PRIORITY_MED, 200)
TASK_DEF(TASK_RRC_GNB, TASK_PRIORITY_MED, 200)
/// S1ap task /// S1ap task
/// RAL task for ENB /// RAL task for ENB
TASK_DEF(TASK_RAL_ENB, TASK_PRIORITY_MED, 200) TASK_DEF(TASK_RAL_ENB, TASK_PRIORITY_MED, 200)
...@@ -59,6 +61,8 @@ TASK_DEF(TASK_X2AP, TASK_PRIORITY_MED, 200) ...@@ -59,6 +61,8 @@ TASK_DEF(TASK_X2AP, TASK_PRIORITY_MED, 200)
TASK_DEF(TASK_SCTP, TASK_PRIORITY_MED, 200) TASK_DEF(TASK_SCTP, TASK_PRIORITY_MED, 200)
/// eNB APP task /// eNB APP task
TASK_DEF(TASK_ENB_APP, TASK_PRIORITY_MED, 200) TASK_DEF(TASK_ENB_APP, TASK_PRIORITY_MED, 200)
/// gNB APP task
TASK_DEF(TASK_GNB_APP, TASK_PRIORITY_MED, 200)
/// eNB Agent task /// eNB Agent task
TASK_DEF(TASK_FLEXRAN_AGENT, TASK_PRIORITY_MED, 200) TASK_DEF(TASK_FLEXRAN_AGENT, TASK_PRIORITY_MED, 200)
......
/*
* 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 openair2/ENB_APP/L1_paramdef.f
* \brief definition of configuration parameters for all eNodeB modules
* \author Francois TABURET
* \date 2017
* \version 0.1
* \company NOKIA BellLabs France
* \email: francois.taburet@nokia-bell-labs.com
* \note
* \warning
*/
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* L1 configuration parameters names */
#define CONFIG_STRING_L1_CC "num_cc"
#define CONFIG_STRING_L1_LOCAL_N_IF_NAME "local_n_if_name"
#define CONFIG_STRING_L1_LOCAL_N_ADDRESS "local_n_address"
#define CONFIG_STRING_L1_REMOTE_N_ADDRESS "remote_n_address"
#define CONFIG_STRING_L1_LOCAL_N_PORTC "local_n_portc"
#define CONFIG_STRING_L1_REMOTE_N_PORTC "remote_n_portc"
#define CONFIG_STRING_L1_LOCAL_N_PORTD "local_n_portd"
#define CONFIG_STRING_L1_REMOTE_N_PORTD "remote_n_portd"
#define CONFIG_STRING_L1_TRANSPORT_N_PREFERENCE "tr_n_preference"
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
/* L1 configuration parameters */
/* optname helpstr paramflags XXXptr defXXXval type numelt */
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
#define L1PARAMS_DESC { \
{CONFIG_STRING_L1_CC, NULL, 0, uptr:NULL, defintval:1, TYPE_UINT, 0}, \
{CONFIG_STRING_L1_TRANSPORT_N_PREFERENCE, NULL, 0, strptr:NULL, defstrval:"local_mac", TYPE_STRING, 0}, \
{CONFIG_STRING_L1_LOCAL_N_IF_NAME, NULL, 0, strptr:NULL, defstrval:"lo", TYPE_STRING, 0}, \
{CONFIG_STRING_L1_LOCAL_N_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
{CONFIG_STRING_L1_REMOTE_N_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.2", TYPE_STRING, 0}, \
{CONFIG_STRING_L1_LOCAL_N_PORTC, NULL, 0, uptr:NULL, defintval:50030, TYPE_UINT, 0}, \
{CONFIG_STRING_L1_REMOTE_N_PORTC, NULL, 0, uptr:NULL, defintval:50030, TYPE_UINT, 0}, \
{CONFIG_STRING_L1_LOCAL_N_PORTD, NULL, 0, uptr:NULL, defintval:50031, TYPE_UINT, 0}, \
{CONFIG_STRING_L1_REMOTE_N_PORTD, NULL, 0, uptr:NULL, defintval:50031, TYPE_UINT, 0}, \
}
#define L1_CC_IDX 0
#define L1_TRANSPORT_N_PREFERENCE_IDX 1
#define L1_LOCAL_N_IF_NAME_IDX 2
#define L1_LOCAL_N_ADDRESS_IDX 3
#define L1_REMOTE_N_ADDRESS_IDX 4
#define L1_LOCAL_N_PORTC_IDX 5
#define L1_REMOTE_N_PORTC_IDX 6
#define L1_LOCAL_N_PORTD_IDX 7
#define L1_REMOTE_N_PORTD_IDX 8
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
/*
* 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 openair2/ENB_APP/MACRLC_paramdef.f
* \brief definition of configuration parameters for all eNodeB modules
* \author Francois TABURET
* \date 2017
* \version 0.1
* \company NOKIA BellLabs France
* \email: francois.taburet@nokia-bell-labs.com
* \note
* \warning
*/
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
/* MACRLC configuration parameters names */
#define CONFIG_STRING_MACRLC_CC "num_cc"
#define CONFIG_STRING_MACRLC_TRANSPORT_N_PREFERENCE "tr_n_preference"
#define CONFIG_STRING_MACRLC_LOCAL_N_IF_NAME "local_n_if_name"
#define CONFIG_STRING_MACRLC_LOCAL_N_ADDRESS "local_n_address"
#define CONFIG_STRING_MACRLC_REMOTE_N_ADDRESS "remote_n_address"
#define CONFIG_STRING_MACRLC_LOCAL_N_PORTC "local_n_portc"
#define CONFIG_STRING_MACRLC_REMOTE_N_PORTC "remote_n_portc"
#define CONFIG_STRING_MACRLC_LOCAL_N_PORTD "local_n_portd"
#define CONFIG_STRING_MACRLC_REMOTE_N_PORTD "remote_n_portd"
#define CONFIG_STRING_MACRLC_TRANSPORT_S_PREFERENCE "tr_s_preference"
#define CONFIG_STRING_MACRLC_LOCAL_S_IF_NAME "local_s_if_name"
#define CONFIG_STRING_MACRLC_LOCAL_S_ADDRESS "local_s_address"
#define CONFIG_STRING_MACRLC_REMOTE_S_ADDRESS "remote_s_address"
#define CONFIG_STRING_MACRLC_LOCAL_S_PORTC "local_s_portc"
#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"
/*-------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* MacRLC configuration parameters */
/* optname helpstr paramflags XXXptr defXXXval type numelt */
/*-------------------------------------------------------------------------------------------------------------------------------------------------------*/
#define MACRLCPARAMS_DESC { \
{CONFIG_STRING_MACRLC_CC, NULL, 0, uptr:NULL, defintval:50011, TYPE_UINT, 0}, \
{CONFIG_STRING_MACRLC_TRANSPORT_N_PREFERENCE, NULL, 0, strptr:NULL, defstrval:"local_L1", TYPE_STRING, 0}, \
{CONFIG_STRING_MACRLC_LOCAL_N_IF_NAME, NULL, 0, strptr:NULL, defstrval:"lo", TYPE_STRING, 0}, \
{CONFIG_STRING_MACRLC_LOCAL_N_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
{CONFIG_STRING_MACRLC_REMOTE_N_ADDRESS, NULL, 0, uptr:NULL, defstrval:"127.0.0.2", TYPE_STRING, 0}, \
{CONFIG_STRING_MACRLC_LOCAL_N_PORTC, NULL, 0, uptr:NULL, defintval:50010, TYPE_UINT, 0}, \
{CONFIG_STRING_MACRLC_REMOTE_N_PORTC, NULL, 0, uptr:NULL, defintval:50010, TYPE_UINT, 0}, \
{CONFIG_STRING_MACRLC_LOCAL_N_PORTD, NULL, 0, uptr:NULL, defintval:50011, TYPE_UINT, 0}, \
{CONFIG_STRING_MACRLC_REMOTE_N_PORTD, NULL, 0, uptr:NULL, defintval:50011, TYPE_UINT, 0}, \
{CONFIG_STRING_MACRLC_TRANSPORT_S_PREFERENCE, NULL, 0, strptr:NULL, defstrval:"local_RRC", TYPE_STRING, 0}, \
{CONFIG_STRING_MACRLC_LOCAL_S_IF_NAME, NULL, 0, strptr:NULL, defstrval:"lo", TYPE_STRING, 0}, \
{CONFIG_STRING_MACRLC_LOCAL_S_ADDRESS, NULL, 0, uptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
{CONFIG_STRING_MACRLC_REMOTE_S_ADDRESS, NULL, 0, uptr:NULL, defstrval:"127.0.0.2", TYPE_STRING, 0}, \
{CONFIG_STRING_MACRLC_LOCAL_S_PORTC, NULL, 0, uptr:NULL, defintval:50020, TYPE_UINT, 0}, \
{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}, \
}
#define MACRLC_CC_IDX 0
#define MACRLC_TRANSPORT_N_PREFERENCE_IDX 1
#define MACRLC_LOCAL_N_IF_NAME_IDX 2
#define MACRLC_LOCAL_N_ADDRESS_IDX 3
#define MACRLC_REMOTE_N_ADDRESS_IDX 4
#define MACRLC_LOCAL_N_PORTC_IDX 5
#define MACRLC_REMOTE_N_PORTC_IDX 6
#define MACRLC_LOCAL_N_PORTD_IDX 7
#define MACRLC_REMOTE_N_PORTD_IDX 8
#define MACRLC_TRANSPORT_S_PREFERENCE_IDX 9
#define MACRLC_LOCAL_S_IF_NAME_IDX 10
#define MACRLC_LOCAL_S_ADDRESS_IDX 11
#define MACRLC_REMOTE_S_ADDRESS_IDX 12
#define MACRLC_LOCAL_S_PORTC_IDX 13
#define MACRLC_REMOTE_S_PORTC_IDX 14
#define MACRLC_LOCAL_S_PORTD_IDX 15
#define MACRLC_REMOTE_S_PORTD_IDX 16
/*---------------------------------------------------------------------------------------------------------------------------------------------------------*/
This diff is collapsed.
This diff is collapsed.
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include "LAYER2/MAC/mac.h" #include "LAYER2/MAC/mac.h"
#include "PHY/defs_common.h" // for PRACH_RESOURCES_t and lte_subframe_t #include "PHY/defs_common.h" // for PRACH_RESOURCES_t and lte_subframe_t
/** \addtogroup _mac /** \addtogroup _mac
* @{ * @{
*/ */
......
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