Merge remote-tracking branch 'origin/develop' into develop-SRS-feedback
# Conflicts: # openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
This commit is contained in:
+48
-48
@@ -55,17 +55,17 @@ if (${RF_BOARD} STREQUAL "OAI_USRP")
|
||||
find_package(Boost REQUIRED)
|
||||
|
||||
elseif (${RF_BOARD} STREQUAL "OAI_IRIS")
|
||||
include_directories("${OPENAIR_TARGETS}/ARCH/IRIS/USERSPACE/LIB/")
|
||||
include_directories("${OPENAIR_DIR}/sdr/IRIS/USERSPACE/LIB/")
|
||||
|
||||
set(HW_SOURCE ${HW_SOURCE}
|
||||
${OPENAIR_TARGETS}/ARCH/IRIS/USERSPACE/LIB/iris_lib.cpp)
|
||||
${OPENAIR_DIR}/sdr/IRIS/USERSPACE/LIB/iris_lib.cpp)
|
||||
LINK_DIRECTORIES("/usr/local/lib")
|
||||
set(option_HW_lib "-lSoapySDR -rdynamic -ldl")
|
||||
|
||||
elseif (${RF_BOARD} STREQUAL "OAI_AW2SORI")
|
||||
include_directories("${OPENAIR_TARGETS}/ARCH/AW2SORI")
|
||||
include_directories("${OPENAIR_DIR}/sdr/AW2SORI")
|
||||
set(HW_SOURCE ${HW_SOURCE}
|
||||
${OPENAIR_TARGETS}/ARCH/AW2SORI/ARCH/AW2SORI/oaiori.c)
|
||||
${OPENAIR_DIR}/sdr/AW2SORI/ARCH/AW2SORI/oaiori.c)
|
||||
LINK_DIRECTORIES("/usr/local/lib")
|
||||
set(openair_HW_lib "-shared -fPIC -msse4 -g -ggdb -lori")
|
||||
|
||||
@@ -735,53 +735,53 @@ set (SHLIB_LOADER_SOURCES
|
||||
######################################################################
|
||||
|
||||
set(HWLIB_USRP_SOURCE
|
||||
${OPENAIR_TARGETS}/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
|
||||
${OPENAIR_DIR}/sdr/USRP/USERSPACE/LIB/usrp_lib.cpp
|
||||
)
|
||||
add_library(oai_usrpdevif MODULE ${HWLIB_USRP_SOURCE} )
|
||||
target_include_directories(oai_usrpdevif PRIVATE
|
||||
"${OPENAIR_TARGETS}/ARCH/USRP/USERSPACE/LIB/"
|
||||
"${OPENAIR_DIR}/sdr/USRP/USERSPACE/LIB/"
|
||||
${Boost_INCLUDE_DIR}
|
||||
)
|
||||
target_link_libraries(oai_usrpdevif uhd)
|
||||
|
||||
include_directories("${OPENAIR_TARGETS}/ARCH/BLADERF/USERSPACE/LIB/")
|
||||
include_directories("${OPENAIR_DIR}/sdr/BLADERF/USERSPACE/LIB/")
|
||||
set(HWLIB_BLADERF_SOURCE
|
||||
${OPENAIR_TARGETS}/ARCH/BLADERF/USERSPACE/LIB/bladerf_lib.c
|
||||
${OPENAIR_DIR}/sdr/BLADERF/USERSPACE/LIB/bladerf_lib.c
|
||||
)
|
||||
add_library(oai_bladerfdevif MODULE ${HWLIB_BLADERF_SOURCE} )
|
||||
target_link_libraries(oai_bladerfdevif bladeRF)
|
||||
|
||||
include_directories("${OPENAIR_TARGETS}/ARCH/LMSSDR/USERSPACE/LIB/")
|
||||
include_directories("${OPENAIR_DIR}/sdr/LMSSDR/USERSPACE/LIB/")
|
||||
|
||||
set(HWLIB_LMSSDR_SOURCE
|
||||
${OPENAIR_TARGETS}/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp
|
||||
${OPENAIR_DIR}/sdr/LMSSDR/USERSPACE/LIB/lms_lib.cpp
|
||||
)
|
||||
add_library(oai_lmssdrdevif MODULE ${HWLIB_LMSSDR_SOURCE} )
|
||||
target_include_directories(oai_lmssdrdevif PRIVATE /usr/local/include/lime)
|
||||
target_link_libraries(oai_lmssdrdevif LimeSuite )
|
||||
|
||||
|
||||
include_directories("${OPENAIR_TARGETS}/ARCH/ETHERNET/USERSPACE/LIB/")
|
||||
include_directories("${OPENAIR_DIR}/sdr/ETHERNET/USERSPACE/LIB/")
|
||||
set(TPLIB_ETHERNET_SOURCE
|
||||
${OPENAIR_TARGETS}/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c
|
||||
${OPENAIR_TARGETS}/ARCH/ETHERNET/USERSPACE/LIB/eth_udp.c
|
||||
${OPENAIR_TARGETS}/ARCH/ETHERNET/USERSPACE/LIB/eth_raw.c
|
||||
${OPENAIR_DIR}/sdr/ETHERNET/USERSPACE/LIB/ethernet_lib.c
|
||||
${OPENAIR_DIR}/sdr/ETHERNET/USERSPACE/LIB/eth_udp.c
|
||||
${OPENAIR_DIR}/sdr/ETHERNET/USERSPACE/LIB/eth_raw.c
|
||||
)
|
||||
add_library(oai_eth_transpro MODULE ${TPLIB_ETHERNET_SOURCE} )
|
||||
|
||||
include_directories("${OPENAIR_TARGETS}/ARCH/AW2SORI/")
|
||||
include_directories("${OPENAIR_DIR}/sdr/AW2SORI/")
|
||||
link_directories("/usr/local/lib")
|
||||
set(HWLIB_AW2SORI_SOURCE
|
||||
${OPENAIR_TARGETS}/ARCH/AW2SORI/oaiori.c
|
||||
${OPENAIR_DIR}/sdr/AW2SORI/oaiori.c
|
||||
)
|
||||
add_library(aw2sori_transpro MODULE ${HWLIB_AW2SORI_SOURCE})
|
||||
target_compile_options(aw2sori_transpro PRIVATE -shared -fPIC -msse4 -g -ggdb -DLITE_COMPILATION)
|
||||
target_link_libraries(aw2sori_transpro libori.so)
|
||||
|
||||
include_directories("${OPENAIR_TARGETS}/ARCH/IRIS/USERSPACE/LIB/")
|
||||
include_directories("${OPENAIR_DIR}/sdr/IRIS/USERSPACE/LIB/")
|
||||
set(option_HWIRISLIB_lib "-l SoapySDR")
|
||||
set(HWLIB_IRIS_SOURCE
|
||||
${OPENAIR_TARGETS}/ARCH/IRIS/USERSPACE/LIB/iris_lib.cpp
|
||||
${OPENAIR_DIR}/sdr/IRIS/USERSPACE/LIB/iris_lib.cpp
|
||||
)
|
||||
add_library(oai_irisdevif MODULE ${HWLIB_IRIS_SOURCE})
|
||||
target_include_directories(oai_irisdevif PRIVATE /usr/local/lib/SoapySDR/modules0.7/)
|
||||
@@ -794,11 +794,11 @@ target_link_libraries(oai_irisdevif SoapySDR)
|
||||
include_directories ("/usr/include/dpdk")
|
||||
|
||||
set(HWLIB_BENETEL_4G_SOURCE
|
||||
${OPENAIR_TARGETS}/ARCH/ETHERNET/benetel/4g/benetel.c
|
||||
${OPENAIR_TARGETS}/ARCH/ETHERNET/benetel/4g/shared_buffers.c
|
||||
${OPENAIR_TARGETS}/ARCH/ETHERNET/benetel/4g/low.c
|
||||
${OPENAIR_TARGETS}/ARCH/ETHERNET/benetel/4g/low_dpdk.c
|
||||
${OPENAIR_TARGETS}/ARCH/ETHERNET/benetel/4g/dpdk_driver.c
|
||||
${OPENAIR_DIR}/sdr/ETHERNET/benetel/4g/benetel.c
|
||||
${OPENAIR_DIR}/sdr/ETHERNET/benetel/4g/shared_buffers.c
|
||||
${OPENAIR_DIR}/sdr/ETHERNET/benetel/4g/low.c
|
||||
${OPENAIR_DIR}/sdr/ETHERNET/benetel/4g/low_dpdk.c
|
||||
${OPENAIR_DIR}/sdr/ETHERNET/benetel/4g/dpdk_driver.c
|
||||
)
|
||||
add_library(benetel_4g MODULE ${HWLIB_BENETEL_4G_SOURCE} )
|
||||
|
||||
@@ -812,11 +812,11 @@ TARGET_LINK_LIBRARIES(benetel_4g pthread dl rt m numa)
|
||||
######################################################################
|
||||
|
||||
set(HWLIB_BENETEL_5G_SOURCE
|
||||
${OPENAIR_TARGETS}/ARCH/ETHERNET/benetel/5g/benetel.c
|
||||
${OPENAIR_TARGETS}/ARCH/ETHERNET/benetel/5g/shared_buffers.c
|
||||
${OPENAIR_TARGETS}/ARCH/ETHERNET/benetel/5g/low.c
|
||||
${OPENAIR_TARGETS}/ARCH/ETHERNET/benetel/5g/low_dpdk.c
|
||||
${OPENAIR_TARGETS}/ARCH/ETHERNET/benetel/5g/dpdk_driver.c
|
||||
${OPENAIR_DIR}/sdr/ETHERNET/benetel/5g/benetel.c
|
||||
${OPENAIR_DIR}/sdr/ETHERNET/benetel/5g/shared_buffers.c
|
||||
${OPENAIR_DIR}/sdr/ETHERNET/benetel/5g/low.c
|
||||
${OPENAIR_DIR}/sdr/ETHERNET/benetel/5g/low_dpdk.c
|
||||
${OPENAIR_DIR}/sdr/ETHERNET/benetel/5g/dpdk_driver.c
|
||||
)
|
||||
add_library(benetel_5g MODULE ${HWLIB_BENETEL_5G_SOURCE} )
|
||||
|
||||
@@ -853,7 +853,7 @@ endif ()
|
||||
|
||||
##########################################################
|
||||
|
||||
include_directories ("${OPENAIR_TARGETS}/ARCH/COMMON")
|
||||
include_directories ("${OPENAIR_DIR}/sdr/COMMON")
|
||||
|
||||
Message("DEADLINE_SCHEDULER flag is ${DEADLINE_SCHEDULER}")
|
||||
Message("CPU_Affinity flag is ${CPU_AFFINITY}")
|
||||
@@ -1025,7 +1025,7 @@ include_directories("${OPENAIR3_DIR}/ocp-gtpu")
|
||||
include_directories("${OPENAIR3_DIR}/M3AP")
|
||||
include_directories("${OPENAIR3_DIR}/MME_APP")
|
||||
include_directories("${OPENAIR_DIR}/targets/COMMON")
|
||||
include_directories("${OPENAIR_DIR}/targets/ARCH/COMMON")
|
||||
include_directories("${OPENAIR_DIR}/sdr/COMMON")
|
||||
include_directories("${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/PHY")
|
||||
include_directories("${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/MAC")
|
||||
include_directories("${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/RRC")
|
||||
@@ -2532,15 +2532,15 @@ target_link_libraries(nrscope ${XFORMS_LIBRARIES})
|
||||
|
||||
|
||||
add_library(rfsimulator MODULE
|
||||
${OPENAIR_TARGETS}/ARCH/rfsimulator/simulator.c
|
||||
${OPENAIR_TARGETS}/ARCH/rfsimulator/apply_channelmod.c
|
||||
${OPENAIR_TARGETS}/ARCH/rfsimulator/new_channel_sim.c
|
||||
${OPENAIR_DIR}/sdr/rfsimulator/simulator.c
|
||||
${OPENAIR_DIR}/sdr/rfsimulator/apply_channelmod.c
|
||||
${OPENAIR_DIR}/sdr/rfsimulator/new_channel_sim.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/signal_energy.c
|
||||
)
|
||||
target_link_libraries(rfsimulator SIMU_COMMON ${ATLAS_LIBRARIES})
|
||||
|
||||
add_library(oai_iqplayer MODULE
|
||||
${OPENAIR_TARGETS}/ARCH/iqplayer/iqplayer_lib.c
|
||||
${OPENAIR_DIR}/sdr/iqplayer/iqplayer_lib.c
|
||||
)
|
||||
set(CMAKE_MODULE_PATH "${OPENAIR_DIR}/cmake_targets/tools/MODULES" "${CMAKE_MODULE_PATH}")
|
||||
|
||||
@@ -2601,7 +2601,7 @@ add_executable(nfapi_test
|
||||
)
|
||||
|
||||
add_executable(replay_node
|
||||
${OPENAIR_TARGETS}/ARCH/rfsimulator/stored_node.c
|
||||
${OPENAIR_DIR}/sdr/rfsimulator/stored_node.c
|
||||
)
|
||||
target_link_libraries (replay_node minimal_lib)
|
||||
|
||||
@@ -2628,8 +2628,8 @@ add_executable(lte-softmodem
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
|
||||
${OPENAIR_TARGETS}/COMMON/create_tasks.c
|
||||
${OPENAIR_TARGETS}/COMMON/create_tasks_mbms.c
|
||||
${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c
|
||||
${OPENAIR_TARGETS}/ARCH/COMMON/record_player.c
|
||||
${OPENAIR_DIR}/sdr/COMMON/common_lib.c
|
||||
${OPENAIR_DIR}/sdr/COMMON/record_player.c
|
||||
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
|
||||
${OPENAIR2_DIR}/RRC/NAS/rb_config.c
|
||||
${OPENAIR2_DIR}/F1AP/dummy_enb.c
|
||||
@@ -2668,8 +2668,8 @@ add_executable(ocp-enb
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
|
||||
${OPENAIR_TARGETS}/COMMON/create_tasks.c
|
||||
${OPENAIR_TARGETS}/COMMON/create_tasks_mbms.c
|
||||
${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c
|
||||
${OPENAIR_TARGETS}/ARCH/COMMON/record_player.c
|
||||
${OPENAIR_DIR}/sdr/COMMON/common_lib.c
|
||||
${OPENAIR_DIR}/sdr/COMMON/record_player.c
|
||||
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
|
||||
${OPENAIR2_DIR}/RRC/NAS/rb_config.c
|
||||
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
|
||||
@@ -2697,8 +2697,8 @@ target_link_libraries (ocp-enb ${LIBXML2_LIBRARIES} pthread m CONFIG_LIB rt cryp
|
||||
add_executable(oairu
|
||||
${OPENAIR_TARGETS}/RT/USER/lte-ru.c
|
||||
${OPENAIR_TARGETS}/RT/USER/ru_control.c
|
||||
${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c
|
||||
${OPENAIR_TARGETS}/ARCH/COMMON/record_player.c
|
||||
${OPENAIR_DIR}/sdr/COMMON/common_lib.c
|
||||
${OPENAIR_DIR}/sdr/COMMON/record_player.c
|
||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||
${OPENAIR_DIR}/openair1/SCHED/phy_procedures_lte_common.c
|
||||
${OPENAIR_DIR}/executables/main_ru.c
|
||||
@@ -2723,8 +2723,8 @@ add_executable(lte-uesoftmodem
|
||||
${OPENAIR_TARGETS}/RT/USER/lte-uesoftmodem.c
|
||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||
${OPENAIR_TARGETS}/COMMON/create_tasks_ue.c
|
||||
${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c
|
||||
${OPENAIR_TARGETS}/ARCH/COMMON/record_player.c
|
||||
${OPENAIR_DIR}/sdr/COMMON/common_lib.c
|
||||
${OPENAIR_DIR}/sdr/COMMON/record_player.c
|
||||
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
|
||||
${OPENAIR2_DIR}/RRC/NAS/rb_config.c
|
||||
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
|
||||
@@ -2769,8 +2769,8 @@ add_executable(nr-softmodem
|
||||
${OPENAIR_DIR}/executables/nr-softmodem.c
|
||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
|
||||
${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c
|
||||
${OPENAIR_TARGETS}/ARCH/COMMON/record_player.c
|
||||
${OPENAIR_DIR}/sdr/COMMON/common_lib.c
|
||||
${OPENAIR_DIR}/sdr/COMMON/record_player.c
|
||||
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
|
||||
${OPENAIR2_DIR}/RRC/NAS/rb_config.c
|
||||
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
|
||||
@@ -2814,8 +2814,8 @@ add_executable(nr-uesoftmodem
|
||||
${OPENAIR_DIR}/executables/nr-ue.c
|
||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
|
||||
${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c
|
||||
${OPENAIR_TARGETS}/ARCH/COMMON/record_player.c
|
||||
${OPENAIR_DIR}/sdr/COMMON/common_lib.c
|
||||
${OPENAIR_DIR}/sdr/COMMON/record_player.c
|
||||
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
|
||||
${OPENAIR2_DIR}/LAYER2/NR_MAC_COMMON/nr_mac_common.c
|
||||
${OPENAIR2_DIR}/RRC/NAS/rb_config.c
|
||||
@@ -2870,7 +2870,7 @@ target_link_libraries (dlsim_tm4
|
||||
add_executable(rftest
|
||||
${OPENAIR_DIR}/openair1/PHY/TOOLS/calibration_test.c
|
||||
${OPENAIR_DIR}/openair1/PHY/TOOLS/calibration_scope.c
|
||||
${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c
|
||||
${OPENAIR_DIR}/sdr/COMMON/common_lib.c
|
||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
)
|
||||
|
||||
@@ -33,10 +33,10 @@ Now pull images.
|
||||
|
||||
```bash
|
||||
$ docker pull mysql:5.7
|
||||
$ docker pull oaisoftwarealliance/oai-amf:latest
|
||||
$ docker pull oaisoftwarealliance/oai-nrf:latest
|
||||
$ docker pull oaisoftwarealliance/oai-smf:latest
|
||||
$ docker pull oaisoftwarealliance/oai-spgwu-tiny:latest
|
||||
$ docker pull oaisoftwarealliance/oai-amf:develop
|
||||
$ docker pull oaisoftwarealliance/oai-nrf:develop
|
||||
$ docker pull oaisoftwarealliance/oai-smf:develop
|
||||
$ docker pull oaisoftwarealliance/oai-spgwu-tiny:develop
|
||||
|
||||
$ docker pull oaisoftwarealliance/oai-gnb:develop
|
||||
$ docker pull oaisoftwarealliance/oai-nr-ue:develop
|
||||
@@ -46,10 +46,10 @@ $ docker pull oaisoftwarealliance/proxy:latest
|
||||
And **re-tag** them for tutorials' docker-compose file to work.
|
||||
|
||||
```bash
|
||||
$ docker image tag oaisoftwarealliance/oai-amf:latest oai-amf:latest
|
||||
$ docker image tag oaisoftwarealliance/oai-nrf:latest oai-nrf:latest
|
||||
$ docker image tag oaisoftwarealliance/oai-smf:latest oai-smf:latest
|
||||
$ docker image tag oaisoftwarealliance/oai-spgwu-tiny:latest oai-spgwu-tiny:latest
|
||||
$ docker image tag oaisoftwarealliance/oai-amf:latest oai-amf:august-dev
|
||||
$ docker image tag oaisoftwarealliance/oai-nrf:latest oai-nrf:august-dev
|
||||
$ docker image tag oaisoftwarealliance/oai-smf:latest oai-smf:august-dev
|
||||
$ docker image tag oaisoftwarealliance/oai-spgwu-tiny:latest oai-spgwu-tiny:august-dev
|
||||
|
||||
$ docker image tag oaisoftwarealliance/oai-gnb:develop oai-gnb:develop
|
||||
$ docker image tag oaisoftwarealliance/oai-nr-ue:develop oai-nr-ue:develop
|
||||
|
||||
@@ -50,10 +50,10 @@ Now pull images.
|
||||
|
||||
```bash
|
||||
$ docker pull mysql:5.7
|
||||
$ docker pull oaisoftwarealliance/oai-amf:latest
|
||||
$ docker pull oaisoftwarealliance/oai-nrf:latest
|
||||
$ docker pull oaisoftwarealliance/oai-smf:latest
|
||||
$ docker pull oaisoftwarealliance/oai-spgwu-tiny:latest
|
||||
$ docker pull oaisoftwarealliance/oai-amf:develop
|
||||
$ docker pull oaisoftwarealliance/oai-nrf:develop
|
||||
$ docker pull oaisoftwarealliance/oai-smf:develop
|
||||
$ docker pull oaisoftwarealliance/oai-spgwu-tiny:develop
|
||||
|
||||
$ docker pull oaisoftwarealliance/oai-gnb:develop
|
||||
$ docker pull oaisoftwarealliance/oai-nr-ue:develop
|
||||
@@ -62,10 +62,10 @@ $ docker pull oaisoftwarealliance/oai-nr-ue:develop
|
||||
And **re-tag** them for tutorials' docker-compose file to work.
|
||||
|
||||
```bash
|
||||
$ docker image tag oaisoftwarealliance/oai-amf:latest oai-amf:latest
|
||||
$ docker image tag oaisoftwarealliance/oai-nrf:latest oai-nrf:latest
|
||||
$ docker image tag oaisoftwarealliance/oai-smf:latest oai-smf:latest
|
||||
$ docker image tag oaisoftwarealliance/oai-spgwu-tiny:latest oai-spgwu-tiny:latest
|
||||
$ docker image tag oaisoftwarealliance/oai-amf:latest oai-amf:august-dev
|
||||
$ docker image tag oaisoftwarealliance/oai-nrf:latest oai-nrf:august-dev
|
||||
$ docker image tag oaisoftwarealliance/oai-smf:latest oai-smf:august-dev
|
||||
$ docker image tag oaisoftwarealliance/oai-spgwu-tiny:latest oai-spgwu-tiny:august-dev
|
||||
|
||||
$ docker image tag oaisoftwarealliance/oai-gnb:develop oai-gnb:develop
|
||||
$ docker image tag oaisoftwarealliance/oai-nr-ue:develop oai-nr-ue:develop
|
||||
|
||||
@@ -7936,7 +7936,7 @@ c
|
||||
<eNB_pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</eNB_pre_exec>
|
||||
<eNB_pre_exec_args></eNB_pre_exec_args>
|
||||
<eNB_main_exec>sudo -E chrt -f 99 $OPENAIR_DIR/cmake_targets/ran_build/build/lte-softmodem</eNB_main_exec>
|
||||
<eNB_main_exec_args> -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.lmssdr.conf --rf-config-file $OPENAIR_DIR/targets/ARCH/LMSSDR/enb_sodera_highband_5MHz_rx19dB_txfull.ini </eNB_main_exec_args>
|
||||
<eNB_main_exec_args> -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.lmssdr.conf --rf-config-file $OPENAIR_DIR/sdr/LMSSDR/enb_sodera_highband_5MHz_rx19dB_txfull.ini </eNB_main_exec_args>
|
||||
<eNB_traffic_exec></eNB_traffic_exec>
|
||||
<eNB_traffic_exec_args></eNB_traffic_exec_args>
|
||||
<eNB_search_expr_true></eNB_search_expr_true>
|
||||
@@ -8012,7 +8012,7 @@ c
|
||||
<eNB_pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</eNB_pre_exec>
|
||||
<eNB_pre_exec_args></eNB_pre_exec_args>
|
||||
<eNB_main_exec>sudo -E chrt -f 99 $OPENAIR_DIR/cmake_targets/ran_build/build/lte-softmodem</eNB_main_exec>
|
||||
<eNB_main_exec_args> -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.lmssdr.conf --rf-config-file $OPENAIR_DIR/targets/ARCH/LMSSDR/enb_sodera_highband_10MHz_rx19dB_txfull.ini </eNB_main_exec_args>
|
||||
<eNB_main_exec_args> -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.lmssdr.conf --rf-config-file $OPENAIR_DIR/sdr/LMSSDR/enb_sodera_highband_10MHz_rx19dB_txfull.ini </eNB_main_exec_args>
|
||||
<eNB_traffic_exec></eNB_traffic_exec>
|
||||
<eNB_traffic_exec_args></eNB_traffic_exec_args>
|
||||
<eNB_search_expr_true></eNB_search_expr_true>
|
||||
@@ -8087,7 +8087,7 @@ c
|
||||
<eNB_pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</eNB_pre_exec>
|
||||
<eNB_pre_exec_args></eNB_pre_exec_args>
|
||||
<eNB_main_exec>sudo -E chrt -f 99 $OPENAIR_DIR/cmake_targets/ran_build/build/lte-softmodem</eNB_main_exec>
|
||||
<eNB_main_exec_args> -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.lmssdr.conf --rf-config-file $OPENAIR_DIR/targets/ARCH/LMSSDR/enb_sodera_highband_20MHz_rx19dB_txfull.ini </eNB_main_exec_args>
|
||||
<eNB_main_exec_args> -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.lmssdr.conf --rf-config-file $OPENAIR_DIR/sdr/LMSSDR/enb_sodera_highband_20MHz_rx19dB_txfull.ini </eNB_main_exec_args>
|
||||
<eNB_traffic_exec></eNB_traffic_exec>
|
||||
<eNB_traffic_exec_args></eNB_traffic_exec_args>
|
||||
<eNB_search_expr_true></eNB_search_expr_true>
|
||||
@@ -8162,7 +8162,7 @@ c
|
||||
<eNB_pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</eNB_pre_exec>
|
||||
<eNB_pre_exec_args></eNB_pre_exec_args>
|
||||
<eNB_main_exec>sudo -E chrt -f 99 $OPENAIR_DIR/cmake_targets/ran_build/build/lte-softmodem</eNB_main_exec>
|
||||
<eNB_main_exec_args> -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.lmssdr.conf --rf-config-file $OPENAIR_DIR/targets/ARCH/LMSSDR/enb_sodera_highband_5MHz_rx19dB_txfull.ini </eNB_main_exec_args>
|
||||
<eNB_main_exec_args> -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.lmssdr.conf --rf-config-file $OPENAIR_DIR/sdr/LMSSDR/enb_sodera_highband_5MHz_rx19dB_txfull.ini </eNB_main_exec_args>
|
||||
<eNB_traffic_exec></eNB_traffic_exec>
|
||||
<eNB_traffic_exec_args></eNB_traffic_exec_args>
|
||||
<eNB_search_expr_true></eNB_search_expr_true>
|
||||
@@ -8236,7 +8236,7 @@ c
|
||||
<eNB_pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</eNB_pre_exec>
|
||||
<eNB_pre_exec_args></eNB_pre_exec_args>
|
||||
<eNB_main_exec>sudo -E chrt -f 99 $OPENAIR_DIR/cmake_targets/ran_build/build/lte-softmodem</eNB_main_exec>
|
||||
<eNB_main_exec_args> -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.lmssdr.conf --rf-config-file $OPENAIR_DIR/targets/ARCH/LMSSDR/enb_sodera_highband_10MHz_rx19dB_txfull.ini</eNB_main_exec_args>
|
||||
<eNB_main_exec_args> -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.lmssdr.conf --rf-config-file $OPENAIR_DIR/sdr/LMSSDR/enb_sodera_highband_10MHz_rx19dB_txfull.ini</eNB_main_exec_args>
|
||||
<eNB_traffic_exec></eNB_traffic_exec>
|
||||
<eNB_traffic_exec_args></eNB_traffic_exec_args>
|
||||
<eNB_search_expr_true></eNB_search_expr_true>
|
||||
@@ -8310,7 +8310,7 @@ c
|
||||
<eNB_pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</eNB_pre_exec>
|
||||
<eNB_pre_exec_args></eNB_pre_exec_args>
|
||||
<eNB_main_exec>sudo -E chrt -f 99 $OPENAIR_DIR/cmake_targets/ran_build/build/lte-softmodem</eNB_main_exec>
|
||||
<eNB_main_exec_args> -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.lmssdr.conf --rf-config-file $OPENAIR_DIR/targets/ARCH/LMSSDR/enb_sodera_highband_20MHz_rx19dB_txfull.ini</eNB_main_exec_args>
|
||||
<eNB_main_exec_args> -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.lmssdr.conf --rf-config-file $OPENAIR_DIR/sdr/LMSSDR/enb_sodera_highband_20MHz_rx19dB_txfull.ini</eNB_main_exec_args>
|
||||
<eNB_traffic_exec></eNB_traffic_exec>
|
||||
<eNB_traffic_exec_args></eNB_traffic_exec_args>
|
||||
<eNB_search_expr_true></eNB_search_expr_true>
|
||||
|
||||
@@ -10,7 +10,7 @@ As a developer you may need to look at these sections:
|
||||
|
||||
Loader usage examples can be found in oai sources:
|
||||
|
||||
* device and transport initialization code: [function `load_lib` in *targets/ARCH/COMMON/__common_lib.c__* ](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/targets/ARCH/COMMON/common_lib.c#L91)
|
||||
* device and transport initialization code: [function `load_lib` in *sdr/COMMON/__common_lib.c__* ](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/sdr/COMMON/common_lib.c#L91)
|
||||
* turbo encoder and decoder initialization: [function `load_codinglib`in *openair1/PHY/CODING/__coding_load.c__*](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/openair1/PHY/CODING/coding_load.c#L113)
|
||||
|
||||
[loader home page](../loader.md)
|
||||
|
||||
+1
-1
@@ -78,7 +78,7 @@ cd cmake_targets/
|
||||
```
|
||||
|
||||
- The `-I` option is to install pre-requisites, you only need it the first time you build the softmodem or when some oai dependencies have changed.
|
||||
- The `-w` option is to select the radio head support you want to include in your build. Radio head support is provided via a shared library, which is called the "oai device" The build script creates a soft link from `liboai_device.so` to the true device which will be used at run-time (here the USRP one,`liboai_usrpdevif.so` . USRP is the only hardware tested today in the Continuous Integration process. The RF simulator[RF simulator](../targets/ARCH/rfsimulator/README.md) is implemented as a specific device replacing RF hardware, it can be specifically built using `-w SIMU` option, but is also built during any softmodem build.
|
||||
- The `-w` option is to select the radio head support you want to include in your build. Radio head support is provided via a shared library, which is called the "oai device" The build script creates a soft link from `liboai_device.so` to the true device which will be used at run-time (here the USRP one,`liboai_usrpdevif.so` . USRP is the only hardware tested today in the Continuous Integration process. The RF simulator[RF simulator](../sdr/rfsimulator/README.md) is implemented as a specific device replacing RF hardware, it can be specifically built using `-w SIMU` option, but is also built during any softmodem build.
|
||||
- `--eNB` is to build the `lte-softmodem` executable and all required shared libraries
|
||||
- `--gNB` is to build the `nr-softmodem` executable and all required shared libraries
|
||||
- `--UE` is to build the `lte-uesoftmodem` executable and all required shared libraries
|
||||
|
||||
+2
-2
@@ -23,7 +23,7 @@ It is planned to enhance this simulator with the following functionalities:
|
||||
- Support for multiple UE connections,each UE being a `lte-uesoftmodem` or `nr_uesoftmodem` instance.
|
||||
- Support for multiple eNodeB's or gNodeB's for hand-over tests
|
||||
|
||||
This is an easy use-case to setup and test, as no specific hardware is required. The [rfsimulator page](../targets/ARCH/rfsimulator/README.md ) contains the detailed documentation.
|
||||
This is an easy use-case to setup and test, as no specific hardware is required. The [rfsimulator page](../sdr/rfsimulator/README.md ) contains the detailed documentation.
|
||||
|
||||
# L2 nFAPI Simulator
|
||||
|
||||
@@ -102,7 +102,7 @@ Some other useful paramters of the UE are
|
||||
|
||||
Instead of randomly generated payload, in the phy-test mode we can also inject/receive user-plane traffic over a TUN interface. This is the so-called noS1 mode.
|
||||
|
||||
This setup is described in the [rfsimulator page](../targets/ARCH/rfsimulator/README.md#5g-case). In theory this should also work with the real hardware target although this has yet to be tested.
|
||||
This setup is described in the [rfsimulator page](../sdr/rfsimulator/README.md#5g-case). In theory this should also work with the real hardware target although this has yet to be tested.
|
||||
|
||||
## do-ra setup with OAI
|
||||
|
||||
|
||||
@@ -214,4 +214,21 @@ sudo RFSIMULATOR=127.0.0.1 ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3
|
||||
--rfsim --sa --nokrnmod -O <PATH_TO_UE_CONF_FILE>
|
||||
```
|
||||
|
||||
If you get the following error:
|
||||
|
||||
```bash
|
||||
Assertion (k2 >= ((5))) failed!
|
||||
In get_k2() /home/mir/workspace/openairinterface5g/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c:147
|
||||
Slot offset K2 (2) cannot be less than DURATION_RX_TO_TX (5). K2 set according to min_rxtxtime in config file.
|
||||
```
|
||||
|
||||
Add the following parameter (i.e., min_rxtxtime) in the gNB configuration file, just after nr_cellid.
|
||||
|
||||
```bash
|
||||
nr_cellid = 12345678L;
|
||||
min_rxtxtime=6;
|
||||
```
|
||||
or --gNBs.[0].min_rxtxtime 6 to the gNB command line
|
||||
|
||||
|
||||
The IP address at the execution command of the OAI UE corresponds to the target IP of the gNB host that the RFSIMULATOR at the UE will connect to. In the above example, we assume that the gNB and UE are running on the same host so the specified address (127.0.0.1) is the one of the loopback interface.
|
||||
|
||||
@@ -51,13 +51,6 @@ services:
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.136
|
||||
volumes:
|
||||
- ./healthscripts/udr-healthcheck.sh:/openair-udr/bin/udr-healthcheck.sh
|
||||
healthcheck:
|
||||
test: /bin/bash -c "/openair-udr/bin/udr-healthcheck.sh"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
oai-udm:
|
||||
container_name: "oai-udm"
|
||||
image: oai-udm:develop
|
||||
@@ -86,13 +79,6 @@ services:
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.137
|
||||
volumes:
|
||||
- ./healthscripts/udm-healthcheck.sh:/openair-udm/bin/udm-healthcheck.sh
|
||||
healthcheck:
|
||||
test: /bin/bash -c "/openair-udm/bin/udm-healthcheck.sh"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
oai-ausf:
|
||||
container_name: "oai-ausf"
|
||||
image: oai-ausf:develop
|
||||
@@ -120,13 +106,6 @@ services:
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.138
|
||||
volumes:
|
||||
- ./healthscripts/ausf-healthcheck.sh:/openair-ausf/bin/ausf-healthcheck.sh
|
||||
healthcheck:
|
||||
test: /bin/bash -c "/openair-ausf/bin/ausf-healthcheck.sh"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
oai-nrf:
|
||||
container_name: "oai-nrf"
|
||||
image: oai-nrf:develop
|
||||
@@ -141,13 +120,6 @@ services:
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.130
|
||||
volumes:
|
||||
- ./healthscripts/nrf-healthcheck.sh:/openair-nrf/bin/nrf-healthcheck.sh
|
||||
healthcheck:
|
||||
test: /bin/bash -c "/openair-nrf/bin/nrf-healthcheck.sh"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
oai-amf:
|
||||
container_name: "oai-amf"
|
||||
image: oai-amf:develop
|
||||
@@ -213,13 +185,6 @@ services:
|
||||
- mysql
|
||||
- oai-nrf
|
||||
- oai-ausf
|
||||
volumes:
|
||||
- ./healthscripts/amf-healthcheck.sh:/openair-amf/bin/amf-healthcheck.sh
|
||||
healthcheck:
|
||||
test: /bin/bash -c "/openair-amf/bin/amf-healthcheck.sh"
|
||||
interval: 10s
|
||||
timeout: 15s
|
||||
retries: 5
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.132
|
||||
@@ -270,13 +235,6 @@ services:
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- oai-amf
|
||||
volumes:
|
||||
- ./healthscripts/smf-healthcheck.sh:/openair-smf/bin/smf-healthcheck.sh
|
||||
healthcheck:
|
||||
test: /bin/bash -c "/openair-smf/bin/smf-healthcheck.sh"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.133
|
||||
@@ -325,13 +283,6 @@ services:
|
||||
cap_drop:
|
||||
- ALL
|
||||
privileged: true
|
||||
volumes:
|
||||
- ./healthscripts/spgwu-healthcheck.sh:/openair-spgwu-tiny/bin/spgwu-healthcheck.sh
|
||||
healthcheck:
|
||||
test: /bin/bash -c "/openair-spgwu-tiny/bin/spgwu-healthcheck.sh"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.134
|
||||
|
||||
@@ -45,8 +45,8 @@
|
||||
#include "common/utils/load_module_shlib.h"
|
||||
|
||||
|
||||
#include "../../ARCH/COMMON/common_lib.h"
|
||||
#include "../../ARCH/ETHERNET/USERSPACE/LIB/if_defs.h"
|
||||
#include "sdr/COMMON/common_lib.h"
|
||||
#include "sdr/ETHERNET/USERSPACE/LIB/if_defs.h"
|
||||
|
||||
|
||||
#include "PHY/phy_vars.h"
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
|
||||
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
|
||||
|
||||
#include "../../ARCH/COMMON/common_lib.h"
|
||||
#include "sdr/COMMON/common_lib.h"
|
||||
|
||||
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
|
||||
|
||||
|
||||
+2
-2
@@ -37,8 +37,8 @@
|
||||
#include "common/ran_context.h"
|
||||
#include "rt_profiling.h"
|
||||
|
||||
#include "../../ARCH/COMMON/common_lib.h"
|
||||
#include "../../ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.h"
|
||||
#include "sdr/COMMON/common_lib.h"
|
||||
#include "sdr/ETHERNET/USERSPACE/LIB/ethernet_lib.h"
|
||||
|
||||
#include "PHY/LTE_TRANSPORT/if4_tools.h"
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#include <sys/sysinfo.h>
|
||||
#include "targets/ARCH/COMMON/common_lib.h"
|
||||
#include "sdr/COMMON/common_lib.h"
|
||||
#undef MALLOC
|
||||
#include "assertions.h"
|
||||
#include "PHY/types.h"
|
||||
|
||||
+14
-22
@@ -39,8 +39,8 @@
|
||||
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
|
||||
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
|
||||
|
||||
#include "../../ARCH/COMMON/common_lib.h"
|
||||
#include "../../ARCH/ETHERNET/USERSPACE/LIB/if_defs.h"
|
||||
#include "sdr/COMMON/common_lib.h"
|
||||
#include "sdr/ETHERNET/USERSPACE/LIB/if_defs.h"
|
||||
|
||||
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
|
||||
|
||||
@@ -313,12 +313,12 @@ int create_gNB_tasks(uint32_t gnb_nb) {
|
||||
}
|
||||
}
|
||||
|
||||
if (AMF_MODE_ENABLED) {
|
||||
if (get_softmodem_params()->sa) {
|
||||
|
||||
char* gnb_ipv4_address_for_NGU = NULL;
|
||||
uint32_t gnb_port_for_NGU = 0;
|
||||
char* gnb_ipv4_address_for_S1U = NULL;
|
||||
uint32_t gnb_port_for_S1U = 0;
|
||||
char* gnb_ipv4_address_for_NGU = NULL;
|
||||
uint32_t gnb_port_for_NGU = 0;
|
||||
char* gnb_ipv4_address_for_S1U = NULL;
|
||||
uint32_t gnb_port_for_S1U = 0;
|
||||
paramdef_t NETParams[] = GNBNETPARAMS_DESC;
|
||||
char aprefix[MAX_OPTNAME_SIZE*2 + 8];
|
||||
sprintf(aprefix,"%s.[%i].%s",GNB_CONFIG_STRING_GNB_LIST,0,GNB_CONFIG_STRING_NETWORK_INTERFACES_CONFIG);
|
||||
@@ -326,23 +326,17 @@ int create_gNB_tasks(uint32_t gnb_nb) {
|
||||
|
||||
for(int i = GNB_INTERFACE_NAME_FOR_NG_AMF_IDX; i <= GNB_IPV4_ADDRESS_FOR_NG_AMF_IDX; i++) {
|
||||
if( NETParams[i].strptr == NULL) {
|
||||
LOG_E(NGAP, "No configuration in the file.\n");
|
||||
NGAP_CONF_MODE = 0;
|
||||
LOG_E(NGAP, "No AMF configuration in the file.\n");
|
||||
} else {
|
||||
LOG_D(NGAP, "Configuration in the file: %s.\n",*NETParams[i].strptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
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_I(NGAP, "Ngap task not created\n");
|
||||
if (itti_create_task (TASK_NGAP, ngap_gNB_task, NULL) < 0) {
|
||||
LOG_E(NGAP, "Create task for NGAP failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -359,8 +353,8 @@ int create_gNB_tasks(uint32_t gnb_nb) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
//Use check on x2ap to consider the NSA scenario and check on AMF_MODE_ENABLED for the SA scenario
|
||||
if(is_x2ap_enabled() || AMF_MODE_ENABLED) {
|
||||
//Use check on x2ap to consider the NSA scenario and check for SA scenario
|
||||
if(is_x2ap_enabled() || get_softmodem_params()->sa) {
|
||||
if (itti_create_task (TASK_GTPV1_U, >pv1uTask, NULL) < 0) {
|
||||
LOG_E(GTPU, "Create task for GTPV1U failed\n");
|
||||
return -1;
|
||||
@@ -630,8 +624,6 @@ int main( int argc, char **argv ) {
|
||||
}
|
||||
|
||||
openair0_cfg[0].threequarter_fs = threequarter_fs;
|
||||
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");
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
|
||||
#include "common/utils/nr/nr_common.h"
|
||||
|
||||
#include "../../ARCH/COMMON/common_lib.h"
|
||||
#include "../../ARCH/ETHERNET/USERSPACE/LIB/if_defs.h"
|
||||
#include "sdr/COMMON/common_lib.h"
|
||||
#include "sdr/ETHERNET/USERSPACE/LIB/if_defs.h"
|
||||
|
||||
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
|
||||
#include "openair1/PHY/MODULATION/nr_modulation.h"
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
|
||||
#include "PHY/defs.h"
|
||||
#include "PHY/vars.h"
|
||||
#include "ARCH/CBMIMO1/DEVICE_DRIVER/vars.h"
|
||||
#include "MAC_INTERFACE/vars.h"
|
||||
#include "PHY/CODING/defs.h"
|
||||
//#include "PHY/CODING/lte_interleaver_inline.h"
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -137,29 +137,33 @@ int nr_pdsch_dmrs_rx(PHY_VARS_NR_UE *ue,
|
||||
if (config_type > 1)
|
||||
LOG_E(PHY,"Bad PDSCH DMRS config type %d\n", config_type);
|
||||
|
||||
if ((p>=1000) && (p<((config_type==NFAPI_NR_DMRS_TYPE1) ? 1008 : 1012))) {
|
||||
if (ue->frame_parms.Ncp == NORMAL) {
|
||||
if ((p >= 1000) && (p < ((config_type == NFAPI_NR_DMRS_TYPE1) ? 1008 : 1012))) {
|
||||
if (ue->frame_parms.Ncp == NORMAL) {
|
||||
for (int i = 0; i < nb_pdsch_rb * ((config_type == NFAPI_NR_DMRS_TYPE1) ? 6 : 4); i++) {
|
||||
w = (wf[p - 1000][i & 1]) * (wt[p - 1000][lp]);
|
||||
mod_table = (w == 1) ? nr_rx_mod_table : nr_rx_nmod_table;
|
||||
|
||||
for (int i=0; i<nb_pdsch_rb*((config_type==NFAPI_NR_DMRS_TYPE1) ? 6:4); i++) {
|
||||
|
||||
w = (wf[p-1000][i&1])*(wt[p-1000][lp]);
|
||||
mod_table = (w==1) ? nr_rx_mod_table : nr_rx_nmod_table;
|
||||
|
||||
idx = ((((nr_gold_pdsch[(i<<1)>>5])>>((i<<1)&0x1f))&1)<<1) ^ (((nr_gold_pdsch[((i<<1)+1)>>5])>>(((i<<1)+1)&0x1f))&1);
|
||||
((int16_t*)output)[i<<1] = mod_table[(NR_MOD_TABLE_QPSK_OFFSET + idx)<<1];
|
||||
((int16_t*)output)[(i<<1)+1] = mod_table[((NR_MOD_TABLE_QPSK_OFFSET + idx)<<1) + 1];
|
||||
idx = ((((nr_gold_pdsch[(i << 1) >> 5]) >> ((i << 1) & 0x1f)) & 1) << 1) ^ (((nr_gold_pdsch[((i << 1) + 1) >> 5]) >> (((i << 1) + 1) & 0x1f)) & 1);
|
||||
((int16_t *)output)[i << 1] = mod_table[(NR_MOD_TABLE_QPSK_OFFSET + idx) << 1];
|
||||
((int16_t *)output)[(i << 1) + 1] = mod_table[((NR_MOD_TABLE_QPSK_OFFSET + idx) << 1) + 1];
|
||||
#ifdef DEBUG_PDSCH
|
||||
printf("nr_pdsch_dmrs_rx dmrs config type %d port %d nb_pdsch_rb %d\n", config_type, p, nb_pdsch_rb);
|
||||
printf("wf[%d] = %d wt[%d]= %d\n", i&1, wf[p-1000][i&1], lp, wt[p-1000][lp]);
|
||||
printf("i %d idx %d pdsch gold %u b0-b1 %d-%d mod_dmrs %d %d\n", i, idx, nr_gold_pdsch[(i<<1)>>5], (((nr_gold_pdsch[(i<<1)>>5])>>((i<<1)&0x1f))&1),
|
||||
(((nr_gold_pdsch[((i<<1)+1)>>5])>>(((i<<1)+1)&0x1f))&1), ((int16_t*)output)[i<<1], ((int16_t*)output)[(i<<1)+1]);
|
||||
printf("nr_pdsch_dmrs_rx dmrs config type %d port %d nb_pdsch_rb %d\n", config_type, p, nb_pdsch_rb);
|
||||
printf("wf[%d] = %d wt[%d]= %d\n", i & 1, wf[p - 1000][i & 1], lp, wt[p - 1000][lp]);
|
||||
printf("i %d idx %d pdsch gold %u b0-b1 %d-%d mod_dmrs %d %d\n",
|
||||
i,
|
||||
idx,
|
||||
nr_gold_pdsch[(i << 1) >> 5],
|
||||
(((nr_gold_pdsch[(i << 1) >> 5]) >> ((i << 1) & 0x1f)) & 1),
|
||||
(((nr_gold_pdsch[((i << 1) + 1) >> 5]) >> (((i << 1) + 1) & 0x1f)) & 1),
|
||||
((int16_t *)output)[i << 1],
|
||||
((int16_t *)output)[(i << 1) + 1]);
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
LOG_E(PHY,"extended cp not supported for PDSCH DMRS yet\n");
|
||||
}
|
||||
} else {
|
||||
LOG_E(PHY, "extended cp not supported for PDSCH DMRS yet\n");
|
||||
}
|
||||
} else {
|
||||
LOG_E(PHY,"Illegal p %d PDSCH DMRS port\n",p);
|
||||
LOG_E(PHY, "Illegal p %d PDSCH DMRS port\n", p);
|
||||
}
|
||||
|
||||
return(0);
|
||||
@@ -167,7 +171,6 @@ int nr_pdsch_dmrs_rx(PHY_VARS_NR_UE *ue,
|
||||
|
||||
|
||||
int nr_pdcch_dmrs_rx(PHY_VARS_NR_UE *ue,
|
||||
uint8_t eNB_offset,
|
||||
unsigned int Ns,
|
||||
unsigned int *nr_gold_pdcch,
|
||||
int32_t *output,
|
||||
|
||||
@@ -39,7 +39,6 @@ int nr_pbch_dmrs_rx(int dmrss,
|
||||
@param PHY_VARS_NR_UE* ue structure provides configuration, frame parameters and the pointers to the 32 bits sequence storage tables
|
||||
*/
|
||||
int nr_pdcch_dmrs_rx(PHY_VARS_NR_UE *ue,
|
||||
uint8_t eNB_offset,
|
||||
unsigned int Ns,
|
||||
unsigned int *nr_gold_pdcch,
|
||||
int32_t *output,
|
||||
|
||||
@@ -87,7 +87,7 @@ void nr_generate_dci(PHY_VARS_gNB *gNB,
|
||||
get_coreset_rballoc(pdcch_pdu_rel15->FreqDomainResource,&n_rb,&rb_offset);
|
||||
cset_start_sc = frame_parms->first_carrier_offset + (pdcch_pdu_rel15->BWPStart + rb_offset) * NR_NB_SC_PER_RB;
|
||||
|
||||
int16_t mod_dmrs[pdcch_pdu_rel15->StartSymbolIndex+pdcch_pdu_rel15->DurationSymbols][(n_rb+rb_offset)*6] __attribute__((aligned(16))); // 3 for the max coreset duration
|
||||
int16_t mod_dmrs[pdcch_pdu_rel15->StartSymbolIndex+pdcch_pdu_rel15->DurationSymbols][(((n_rb+rb_offset+pdcch_pdu_rel15->BWPStart)*6+15)>>4)<<4] __attribute__((aligned(16))); // 3 for the max coreset duration
|
||||
|
||||
for (int d=0;d<pdcch_pdu_rel15->numDlDci;d++) {
|
||||
/*The coreset is initialised
|
||||
@@ -109,7 +109,7 @@ void nr_generate_dci(PHY_VARS_gNB *gNB,
|
||||
LOG_D(PHY, "pdcch: Coreset rb_offset %d, nb_rb %d BWP Start %d\n",rb_offset,n_rb,pdcch_pdu_rel15->BWPStart);
|
||||
LOG_D(PHY, "pdcch: Coreset starting subcarrier %d on symbol %d (%d symbols)\n", cset_start_sc, cset_start_symb, cset_nsymb);
|
||||
// DMRS length is per OFDM symbol
|
||||
uint32_t dmrs_length = n_rb*6; //2(QPSK)*3(per RB)*6(REG per CCE)
|
||||
uint32_t dmrs_length = (n_rb+pdcch_pdu_rel15->BWPStart)*6; //2(QPSK)*3(per RB)*6(REG per CCE)
|
||||
uint32_t encoded_length = dci_pdu->AggregationLevel*108; //2(QPSK)*9(per RB)*6(REG per CCE)
|
||||
if (dci_pdu->RNTI != 0xFFFF)
|
||||
LOG_D(PHY, "DL_DCI : rb_offset %d, nb_rb %d, DMRS length per symbol %d\t DCI encoded length %d (precoder_granularity %d, reg_mapping %d), Scrambling_Id %d, ScramblingRNTI %x, PayloadSizeBits %d\n",
|
||||
@@ -210,7 +210,7 @@ void nr_generate_dci(PHY_VARS_gNB *gNB,
|
||||
// dmrs index depends on reference point for k according to 38.211 7.4.1.3.2
|
||||
int eff_reg_idx = cce_list[d][cce_idx].reg_list[reg_in_cce_idx].reg_idx/pdcch_pdu_rel15->DurationSymbols;
|
||||
if (pdcch_pdu_rel15->CoreSetType == NFAPI_NR_CSET_CONFIG_PDCCH_CONFIG)
|
||||
dmrs_idx = eff_reg_idx * 3;
|
||||
dmrs_idx = (eff_reg_idx + pdcch_pdu_rel15->BWPStart) * 3;
|
||||
else
|
||||
dmrs_idx = (eff_reg_idx + rb_offset) * 3;
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "PHY/NR_REFSIG/dmrs_nr.h"
|
||||
#include "PHY/NR_REFSIG/ptrs_nr.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_sch_dmrs.h"
|
||||
#include "common/utils/nr/nr_common.h"
|
||||
#include "filt16a_32.h"
|
||||
#include <openair1/PHY/TOOLS/phy_scope_interface.h>
|
||||
|
||||
@@ -463,16 +464,16 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
|
||||
return(0);
|
||||
}
|
||||
|
||||
int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
|
||||
UE_nr_rxtx_proc_t *proc,
|
||||
uint8_t gNB_id,
|
||||
unsigned char Ns,
|
||||
unsigned char symbol,
|
||||
unsigned short scrambling_id,
|
||||
unsigned short coreset_start_subcarrier,
|
||||
unsigned short nb_rb_coreset,
|
||||
int32_t pdcch_est_size,
|
||||
int32_t pdcch_dl_ch_estimates[][pdcch_est_size])
|
||||
void nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
|
||||
UE_nr_rxtx_proc_t *proc,
|
||||
uint8_t gNB_id,
|
||||
unsigned char Ns,
|
||||
unsigned char symbol,
|
||||
fapi_nr_coreset_t *coreset,
|
||||
uint16_t first_carrier_offset,
|
||||
uint16_t BWPStart,
|
||||
int32_t pdcch_est_size,
|
||||
int32_t pdcch_dl_ch_estimates[][pdcch_est_size])
|
||||
{
|
||||
|
||||
unsigned char aarx;
|
||||
@@ -487,6 +488,17 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
|
||||
|
||||
symbol_offset = ue->frame_parms.ofdm_symbol_size*symbol;
|
||||
|
||||
int nb_rb_coreset=0;
|
||||
int coreset_start_rb=0;
|
||||
get_coreset_rballoc(coreset->frequency_domain_resource,&nb_rb_coreset,&coreset_start_rb);
|
||||
if(nb_rb_coreset==0) return;
|
||||
|
||||
#ifdef DEBUG_PDCCH
|
||||
printf(PHY, "pdcch_channel_estimation: first_carrier_offset %d, BWPStart %d, coreset_start_rb %d, coreset_nb_rb %d\n",
|
||||
first_carrier_offset, BWPStart, coreset_start_rb, nb_rb_coreset);
|
||||
#endif
|
||||
|
||||
unsigned short coreset_start_subcarrier = first_carrier_offset+(BWPStart + coreset_start_rb)*12;
|
||||
|
||||
#ifdef DEBUG_PDCCH
|
||||
printf("PDCCH Channel Estimation : ThreadId %d, gNB_id %d ch_offset %d, OFDM size %d, Ncp=%d, Ns=%d, symbol %d\n",
|
||||
@@ -499,28 +511,32 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
|
||||
int16_t *fr = filt16a_r1;
|
||||
#endif
|
||||
|
||||
unsigned short scrambling_id = coreset->pdcch_dmrs_scrambling_id;
|
||||
// checking if re-initialization of scrambling IDs is needed (should be done here but scrambling ID for PDCCH is not taken from RRC)
|
||||
if (scrambling_id != ue->scramblingID_pdcch){
|
||||
ue->scramblingID_pdcch = scrambling_id;
|
||||
nr_gold_pdcch(ue,ue->scramblingID_pdcch);
|
||||
}
|
||||
|
||||
// generate pilot
|
||||
int pilot[nb_rb_coreset * 3] __attribute__((aligned(16)));
|
||||
nr_pdcch_dmrs_rx(ue,gNB_id,Ns,ue->nr_gold_pdcch[gNB_id][Ns][symbol], &pilot[0],2000,nb_rb_coreset);
|
||||
int dmrs_ref = 0;
|
||||
if (coreset->CoreSetType == NFAPI_NR_CSET_CONFIG_PDCCH_CONFIG)
|
||||
dmrs_ref = BWPStart;
|
||||
|
||||
// generate pilot
|
||||
int pilot[(nb_rb_coreset + dmrs_ref) * 3] __attribute__((aligned(16)));
|
||||
nr_pdcch_dmrs_rx(ue,Ns,ue->nr_gold_pdcch[gNB_id][Ns][symbol], &pilot[0],2000,(nb_rb_coreset+dmrs_ref));
|
||||
|
||||
for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++) {
|
||||
|
||||
k = coreset_start_subcarrier;
|
||||
pil = (int16_t *)&pilot[0];
|
||||
pil = (int16_t *)&pilot[dmrs_ref*3];
|
||||
rxF = (int16_t *)&rxdataF[aarx][(symbol_offset+k+1)];
|
||||
dl_ch = (int16_t *)&pdcch_dl_ch_estimates[aarx][ch_offset];
|
||||
|
||||
memset(dl_ch,0,4*(ue->frame_parms.ofdm_symbol_size));
|
||||
|
||||
#ifdef DEBUG_PDCCH
|
||||
printf("pdcch ch est pilot addr %p RB_DL %d\n",&pilot[0], ue->frame_parms.N_RB_DL);
|
||||
printf("pdcch ch est pilot addr %p RB_DL %d\n",&pilot[dmrs_ref*3], ue->frame_parms.N_RB_DL);
|
||||
printf("k %d, first_carrier %d\n",k,ue->frame_parms.first_carrier_offset);
|
||||
printf("rxF addr %p\n", rxF);
|
||||
|
||||
@@ -687,8 +703,6 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
|
||||
|
||||
@@ -39,16 +39,16 @@
|
||||
\param Ns slot number (0..19)
|
||||
\param symbol symbol within slot
|
||||
*/
|
||||
int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
|
||||
UE_nr_rxtx_proc_t *proc,
|
||||
uint8_t gNB_id,
|
||||
unsigned char Ns,
|
||||
unsigned char symbol,
|
||||
unsigned short scrambling_id,
|
||||
unsigned short coreset_start_subcarrier,
|
||||
unsigned short nb_rb_coreset,
|
||||
int32_t pdcch_est_size,
|
||||
int32_t pdcch_dl_ch_estimates[][pdcch_est_size]);
|
||||
void nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
|
||||
UE_nr_rxtx_proc_t *proc,
|
||||
uint8_t gNB_id,
|
||||
unsigned char Ns,
|
||||
unsigned char symbol,
|
||||
fapi_nr_coreset_t *coreset,
|
||||
uint16_t first_carrier_offset,
|
||||
uint16_t BWPStart,
|
||||
int32_t pdcch_est_size,
|
||||
int32_t pdcch_dl_ch_estimates[][pdcch_est_size]);
|
||||
|
||||
int nr_pbch_dmrs_correlation(PHY_VARS_NR_UE *ue,
|
||||
UE_nr_rxtx_proc_t *proc,
|
||||
|
||||
@@ -529,8 +529,6 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc,
|
||||
if (sa==1 && ret==0) {
|
||||
bool dec = false;
|
||||
int gnb_id = 0; //FIXME
|
||||
int coreset_nb_rb=0;
|
||||
int coreset_start_rb=0;
|
||||
|
||||
// Hold the channel estimates in frequency domain.
|
||||
int32_t pdcch_est_size = ((((fp->symbols_per_slot*(fp->ofdm_symbol_size+LTE_CE_FILTER_LENGTH))+15)/16)*16);
|
||||
@@ -540,7 +538,6 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc,
|
||||
for(int n_ss = 0; n_ss<phy_pdcch_config.nb_search_space; n_ss++) {
|
||||
uint8_t nb_symb_pdcch = phy_pdcch_config.pdcch_config[n_ss].coreset.duration;
|
||||
int start_symb = phy_pdcch_config.pdcch_config[n_ss].coreset.StartSymbolIndex;
|
||||
get_coreset_rballoc(phy_pdcch_config.pdcch_config[n_ss].coreset.frequency_domain_resource,&coreset_nb_rb,&coreset_start_rb);
|
||||
for (uint16_t l=start_symb; l<start_symb+nb_symb_pdcch; l++) {
|
||||
nr_slot_fep_init_sync(ue,
|
||||
proc,
|
||||
@@ -548,17 +545,16 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc,
|
||||
phy_pdcch_config.slot,
|
||||
is*fp->samples_per_frame+phy_pdcch_config.sfn*fp->samples_per_frame+ue->rx_offset);
|
||||
|
||||
if (coreset_nb_rb > 0)
|
||||
nr_pdcch_channel_estimation(ue,
|
||||
proc,
|
||||
0,
|
||||
phy_pdcch_config.slot,
|
||||
l,
|
||||
fp->Nid_cell,
|
||||
fp->first_carrier_offset+(phy_pdcch_config.pdcch_config[n_ss].BWPStart + coreset_start_rb)*12,
|
||||
coreset_nb_rb,
|
||||
pdcch_est_size,
|
||||
pdcch_dl_ch_estimates);
|
||||
nr_pdcch_channel_estimation(ue,
|
||||
proc,
|
||||
0,
|
||||
phy_pdcch_config.slot,
|
||||
l,
|
||||
&phy_pdcch_config.pdcch_config[n_ss].coreset,
|
||||
fp->first_carrier_offset,
|
||||
phy_pdcch_config.pdcch_config[n_ss].BWPStart,
|
||||
pdcch_est_size,
|
||||
pdcch_dl_ch_estimates);
|
||||
|
||||
}
|
||||
int dci_cnt = nr_ue_pdcch_procedures(gnb_id, ue, proc, pdcch_est_size, pdcch_dl_ch_estimates, &phy_pdcch_config, n_ss);
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
oai_dfts_sse4: oai_dfts.c
|
||||
gcc-7 -O3 -std=gnu99 -msse4.1 -o oai_dfts_sse4 oai_dfts.c time_meas.c ../../SIMULATION/TOOLS/taus.c -I$$OPENAIR_HOME -I$$OPENAIR1_DIR -I$$OPENAIR_TARGETS -I$$OPENAIR_TARGETS/COMMON -I$$OPENAIR_TARGETS/ARCH/COMMON -I$$OPENAIR2_DIR -I$$OPENAIR2_DIR/COMMON -I$$OPENAIR_HOME/common/utils -I$$OPENAIR_HOME/common/utils/T -I$$OPENAIR_HOME/common/utils/msc -I$$OPENAIR_HOME/nfapi/open-nFAPI/nfapi/public_inc -DMR_MAIN -DNB_ANTENNAS_RX=1 -lm -lpthread # -DD256STATS #-DD64STATS
|
||||
gcc-7 -O3 -std=gnu99 -msse4.1 -o oai_dfts_sse4 oai_dfts.c time_meas.c ../../SIMULATION/TOOLS/taus.c -I$$OPENAIR_HOME -I$$OPENAIR1_DIR -I$$OPENAIR_TARGETS -I$$OPENAIR_TARGETS/COMMON -I$$OPENAIR_HOME/sdr/COMMON -I$$OPENAIR2_DIR -I$$OPENAIR2_DIR/COMMON -I$$OPENAIR_HOME/common/utils -I$$OPENAIR_HOME/common/utils/T -I$$OPENAIR_HOME/common/utils/msc -I$$OPENAIR_HOME/nfapi/open-nFAPI/nfapi/public_inc -DMR_MAIN -DNB_ANTENNAS_RX=1 -lm -lpthread # -DD256STATS #-DD64STATS
|
||||
|
||||
oai_dfts_avx2: oai_dfts.c
|
||||
gcc -O2 -std=gnu99 -mavx2 -g -ggdb -o oai_dfts_avx2 oai_dfts.c time_meas.c ../../SIMULATION/TOOLS/taus.c $$OPENAIR_HOME/common/utils/backtrace.c -I$$OPENAIR_HOME -I$$OPENAIR1_DIR -I$$OPENAIR_TARGETS -I$$OPENAIR_TARGETS/COMMON -I$$OPENAIR_TARGETS/ARCH/COMMON -I$$OPENAIR2_DIR -I$$OPENAIR2_DIR/COMMON -I$$OPENAIR_HOME/common/utils -I$$OPENAIR_HOME/common/utils/T -I$$OPENAIR_HOME/common/utils/msc -I$$OPENAIR_HOME/nfapi/open-nFAPI/nfapi/public_inc -DMR_MAIN -DNB_ANTENNAS_RX=1 -lm -lpthread # -DD256STATS #-DD64STATS
|
||||
gcc -O2 -std=gnu99 -mavx2 -g -ggdb -o oai_dfts_avx2 oai_dfts.c time_meas.c ../../SIMULATION/TOOLS/taus.c $$OPENAIR_HOME/common/utils/backtrace.c -I$$OPENAIR_HOME -I$$OPENAIR1_DIR -I$$OPENAIR_TARGETS -I$$OPENAIR_TARGETS/COMMON -I$$OPENAIR_HOME/sdr/COMMON -I$$OPENAIR2_DIR -I$$OPENAIR2_DIR/COMMON -I$$OPENAIR_HOME/common/utils -I$$OPENAIR_HOME/common/utils/T -I$$OPENAIR_HOME/common/utils/msc -I$$OPENAIR_HOME/nfapi/open-nFAPI/nfapi/public_inc -DMR_MAIN -DNB_ANTENNAS_RX=1 -lm -lpthread # -DD256STATS #-DD64STATS
|
||||
|
||||
oai_dfts_avx2.s: oai_dfts.c
|
||||
gcc -O2 -std=gnu99 -mavx2 -S oai_dfts.c time_meas.c ../../SIMULATION/TOOLS/taus.c $$OPENAIR_HOME/common/utils/backtrace.c -I$$OPENAIR_HOME -I$$OPENAIR1_DIR -I$$OPENAIR_TARGETS -I$$OPENAIR_TARGETS/COMMON -I$$OPENAIR_TARGETS/ARCH/COMMON -I$$OPENAIR2_DIR -I$$OPENAIR2_DIR/COMMON -I$$OPENAIR_HOME/common/utils -I$$OPENAIR_HOME/common/utils/T -I$$OPENAIR_HOME/common/utils/msc -I$$OPENAIR_HOME/nfapi/open-nFAPI/nfapi/public_inc -DMR_MAIN -DNB_ANTENNAS_RX=1 -lm -lpthread # -DD256STATS #-DD64STATS
|
||||
gcc -O2 -std=gnu99 -mavx2 -S oai_dfts.c time_meas.c ../../SIMULATION/TOOLS/taus.c $$OPENAIR_HOME/common/utils/backtrace.c -I$$OPENAIR_HOME -I$$OPENAIR1_DIR -I$$OPENAIR_TARGETS -I$$OPENAIR_TARGETS/COMMON -I$$OPENAIR_HOME/sdr/COMMON -I$$OPENAIR2_DIR -I$$OPENAIR2_DIR/COMMON -I$$OPENAIR_HOME/common/utils -I$$OPENAIR_HOME/common/utils/T -I$$OPENAIR_HOME/common/utils/msc -I$$OPENAIR_HOME/nfapi/open-nFAPI/nfapi/public_inc -DMR_MAIN -DNB_ANTENNAS_RX=1 -lm -lpthread # -DD256STATS #-DD64STATS
|
||||
|
||||
|
||||
oai_dfts_sse4.s: oai_dfts.c
|
||||
gcc -O2 -std=gnu99 -msse4.1 -S oai_dfts.c time_meas.c ../../SIMULATION/TOOLS/taus.c $$OPENAIR_HOME/common/utils/backtrace.c -I$$OPENAIR_HOME -I$$OPENAIR1_DIR -I$$OPENAIR_TARGETS -I$$OPENAIR_TARGETS/COMMON -I$$OPENAIR_TARGETS/ARCH/COMMON -I$$OPENAIR2_DIR -I$$OPENAIR2_DIR/COMMON -I$$OPENAIR_HOME/common/utils -I$$OPENAIR_HOME/common/utils/T -I$$OPENAIR_HOME/common/utils/msc -I$$OPENAIR_HOME/nfapi/open-nFAPI/nfapi/public_inc -DMR_MAIN -DNB_ANTENNAS_RX=1 -lm -lpthread # -DD256STATS #-DD64STATS
|
||||
gcc -O2 -std=gnu99 -msse4.1 -S oai_dfts.c time_meas.c ../../SIMULATION/TOOLS/taus.c $$OPENAIR_HOME/common/utils/backtrace.c -I$$OPENAIR_HOME -I$$OPENAIR1_DIR -I$$OPENAIR_TARGETS -I$$OPENAIR_TARGETS/COMMON -I$$OPENAIR_HOME/sdr/COMMON -I$$OPENAIR2_DIR -I$$OPENAIR2_DIR/COMMON -I$$OPENAIR_HOME/common/utils -I$$OPENAIR_HOME/common/utils/T -I$$OPENAIR_HOME/common/utils/msc -I$$OPENAIR_HOME/nfapi/open-nFAPI/nfapi/public_inc -DMR_MAIN -DNB_ANTENNAS_RX=1 -lm -lpthread # -DD256STATS #-DD64STATS
|
||||
|
||||
|
||||
dft_cycles_avx2: oai_dfts_avx2
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <stdint.h>
|
||||
#include <openair1/PHY/impl_defs_top.h>
|
||||
#include <targets/ARCH/COMMON/common_lib.h>
|
||||
#include <sdr/COMMON/common_lib.h>
|
||||
#include <executables/softmodem-common.h>
|
||||
#include <openair1/PHY/TOOLS/calibration_scope.h>
|
||||
|
||||
|
||||
@@ -136,7 +136,7 @@ static inline void* malloc16_clear( size_t size )
|
||||
#include "PHY/LTE_TRANSPORT/defs_NB_IoT.h"
|
||||
#include <pthread.h>
|
||||
|
||||
#include "targets/ARCH/COMMON/common_lib.h"
|
||||
#include "sdr/COMMON/common_lib.h"
|
||||
#include "openairinterface5g_limits.h"
|
||||
|
||||
#define NUM_DCI_MAX_NB_IoT 32
|
||||
|
||||
@@ -108,7 +108,8 @@
|
||||
|
||||
#include "PHY/NR_UE_TRANSPORT/dci_nr.h"
|
||||
#include <pthread.h>
|
||||
#include "targets/ARCH/COMMON/common_lib.h"
|
||||
#include "sdr/COMMON/common_lib.h"
|
||||
#include "NR_IF_Module.h"
|
||||
|
||||
/// Context data structure for gNB subframe processing
|
||||
typedef struct {
|
||||
@@ -644,8 +645,6 @@ typedef struct NR_UL_TIME_ALIGNMENT {
|
||||
uint8_t tag_id;
|
||||
} NR_UL_TIME_ALIGNMENT_t;
|
||||
|
||||
#include "NR_IF_Module.h"
|
||||
|
||||
/// Top-level PHY Data Structure for UE
|
||||
typedef struct {
|
||||
/// \brief Module ID indicator for this instance
|
||||
|
||||
@@ -344,11 +344,6 @@ typedef struct {
|
||||
#define MAX_NR_OF_DL_ALLOCATIONS 16
|
||||
#define MAX_NR_OF_UL_ALLOCATIONS (16)
|
||||
|
||||
typedef enum {
|
||||
typeA = 0,
|
||||
typeB = 1
|
||||
} mappingType_t;
|
||||
|
||||
typedef enum {
|
||||
pdsch_dmrs_pos0 = 0,
|
||||
pdsch_dmrs_pos1 = 1,
|
||||
@@ -368,12 +363,7 @@ typedef enum {
|
||||
pusch_dmrs_type1 = 0,
|
||||
pusch_dmrs_type2 = 1
|
||||
} pusch_dmrs_type_t;
|
||||
typedef enum {
|
||||
pusch_dmrs_pos0 = 0,
|
||||
pusch_dmrs_pos1 = 1,
|
||||
pusch_dmrs_pos2 = 2,
|
||||
pusch_dmrs_pos3 = 3,
|
||||
} pusch_dmrs_AdditionalPosition_t;
|
||||
|
||||
typedef enum {
|
||||
pusch_len1 = 1,
|
||||
pusch_len2 = 2
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef __thread_NR_UE__
|
||||
#define __thread_NR_UE__
|
||||
#include <pthread.h>
|
||||
#include <targets/ARCH/COMMON/common_lib.h>
|
||||
#include <sdr/COMMON/common_lib.h>
|
||||
/// Context data structure for RX/TX portion of subframe processing
|
||||
typedef struct {
|
||||
/// index of the current UE RX/TX thread
|
||||
|
||||
@@ -1445,31 +1445,22 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
|
||||
int32_t pdcch_est_size = ((((fp->symbols_per_slot*(fp->ofdm_symbol_size+LTE_CE_FILTER_LENGTH))+15)/16)*16);
|
||||
__attribute__ ((aligned(16))) int32_t pdcch_dl_ch_estimates[4*fp->nb_antennas_rx][pdcch_est_size];
|
||||
|
||||
int coreset_nb_rb=0;
|
||||
int coreset_start_rb=0;
|
||||
|
||||
if (phy_pdcch_config->nb_search_space > 0)
|
||||
get_coreset_rballoc(phy_pdcch_config->pdcch_config[0].coreset.frequency_domain_resource,&coreset_nb_rb,&coreset_start_rb);
|
||||
|
||||
uint8_t dci_cnt = 0;
|
||||
for(int n_ss = 0; n_ss<phy_pdcch_config->nb_search_space; n_ss++) {
|
||||
for (uint16_t l=0; l<nb_symb_pdcch; l++) {
|
||||
|
||||
// note: this only works if RBs for PDCCH are contigous!
|
||||
LOG_D(PHY, "pdcch_channel_estimation: first_carrier_offset %d, BWPStart %d, coreset_start_rb %d, coreset_nb_rb %d\n",
|
||||
fp->first_carrier_offset, phy_pdcch_config->pdcch_config[n_ss].BWPStart, coreset_start_rb, coreset_nb_rb);
|
||||
|
||||
if (coreset_nb_rb > 0)
|
||||
nr_pdcch_channel_estimation(ue,
|
||||
proc,
|
||||
gNB_id,
|
||||
nr_slot_rx,
|
||||
l,
|
||||
phy_pdcch_config->pdcch_config[n_ss].coreset.pdcch_dmrs_scrambling_id,
|
||||
fp->first_carrier_offset+(phy_pdcch_config->pdcch_config[n_ss].BWPStart + coreset_start_rb)*12,
|
||||
coreset_nb_rb,
|
||||
pdcch_est_size,
|
||||
pdcch_dl_ch_estimates);
|
||||
nr_pdcch_channel_estimation(ue,
|
||||
proc,
|
||||
gNB_id,
|
||||
nr_slot_rx,
|
||||
l,
|
||||
&phy_pdcch_config->pdcch_config[n_ss].coreset,
|
||||
fp->first_carrier_offset,
|
||||
phy_pdcch_config->pdcch_config[n_ss].BWPStart,
|
||||
pdcch_est_size,
|
||||
pdcch_dl_ch_estimates);
|
||||
|
||||
stop_meas(&ue->ofdm_demod_stats);
|
||||
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
|
||||
#include "SCHED/defs.h"
|
||||
#include "SCHED/vars.h"
|
||||
#include "ARCH/CBMIMO1/DEVICE_DRIVER/vars.h"
|
||||
|
||||
#include "LAYER2/MAC/defs.h"
|
||||
#include "PHY_INTERFACE/defs.h"
|
||||
|
||||
@@ -41,9 +41,7 @@
|
||||
#endif
|
||||
#include "SCHED/defs.h"
|
||||
#include "SCHED/vars.h"
|
||||
#include "ARCH/CBMIMO1/DEVICE_DRIVER/vars.h"
|
||||
#include "ARCH/CBMIMO1/DEVICE_DRIVER/cbmimo1_device.h"
|
||||
#include "ARCH/COMMON/defs.h"
|
||||
#include "sdr/COMMON/defs.h"
|
||||
#include "LAYER2/MAC/vars.h"
|
||||
|
||||
#ifdef XFORMS
|
||||
|
||||
@@ -85,31 +85,22 @@ nrUE_params_t *get_nrUE_params(void) {
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
char c;
|
||||
int i; //,j,l,aa;
|
||||
int i;
|
||||
double SNR, SNR_lin, snr0 = -2.0, snr1 = 2.0;
|
||||
double snr_step = 0.1;
|
||||
uint8_t snr1set = 0;
|
||||
int **txdata;
|
||||
double **s_re, **s_im, **r_re, **r_im;
|
||||
// int sync_pos, sync_pos_slot;
|
||||
// FILE *rx_frame_file;
|
||||
FILE *output_fd = NULL;
|
||||
//uint8_t write_output_file = 0;
|
||||
// int subframe_offset;
|
||||
// char fname[40], vname[40];
|
||||
int trial, n_trials = 1, n_errors = 0, n_false_positive = 0;
|
||||
uint8_t n_tx = 1, n_rx = 1;
|
||||
//uint8_t transmission_mode = 1;
|
||||
uint16_t Nid_cell = 0;
|
||||
channel_desc_t *gNB2UE;
|
||||
uint8_t extended_prefix_flag = 0;
|
||||
//int8_t interf1 = -21, interf2 = -21;
|
||||
FILE *input_fd = NULL, *pbch_file_fd = NULL;
|
||||
//char input_val_str[50],input_val_str2[50];
|
||||
//uint16_t NB_RB=25;
|
||||
SCM_t channel_model = AWGN; //Rayleigh1_anticorr;
|
||||
uint16_t N_RB_DL = 106, mu = 1;
|
||||
//unsigned char frame_type = 0;
|
||||
unsigned char pbch_phase = 0;
|
||||
int frame = 0, slot = 0;
|
||||
int frame_length_complex_samples;
|
||||
@@ -120,7 +111,6 @@ int main(int argc, char **argv)
|
||||
double sigma;
|
||||
unsigned char qbits = 8;
|
||||
int ret;
|
||||
//int run_initial_sync=0;
|
||||
int loglvl = OAILOG_WARNING;
|
||||
uint8_t dlsch_threads = 0;
|
||||
float target_error_rate = 0.01;
|
||||
@@ -195,14 +185,6 @@ int main(int argc, char **argv)
|
||||
|
||||
break;
|
||||
|
||||
/*case 'i':
|
||||
interf1 = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'j':
|
||||
interf2 = atoi(optarg);
|
||||
break;*/
|
||||
|
||||
case 'n':
|
||||
n_trials = atoi(optarg);
|
||||
break;
|
||||
@@ -312,13 +294,10 @@ int main(int argc, char **argv)
|
||||
gNBthreads[sizeof(gNBthreads)-1]=0;
|
||||
break;
|
||||
|
||||
/*case 'x':
|
||||
transmission_mode = atoi(optarg);
|
||||
break;*/
|
||||
|
||||
default:
|
||||
case 'h':
|
||||
printf("%s -h(elp) -p(extended_prefix) -N cell_id -f output_filename -F input_filename -g channel_model -n n_frames -t Delayspread -s snr0 -S snr1 -x transmission_mode -y TXant -z RXant -i Intefrence0 -j Interference1 -A interpolation_file -C(alibration offset dB) -N CellId\n", argv[0]);
|
||||
printf("%s -h(elp) -p(extended_prefix) -N cell_id -f output_filename -F input_filename -g channel_model -n n_frames -t Delayspread -s snr0 -S snr1 -y TXant -z RXant -i Intefrence0 -j Interference1 -A interpolation_file -C(alibration offset dB) -N CellId\n", argv[0]);
|
||||
printf("-h This message\n");
|
||||
printf("-p Use extended prefix mode\n");
|
||||
printf("-V Enable VCD dumb functions\n");
|
||||
@@ -333,7 +312,7 @@ int main(int argc, char **argv)
|
||||
printf("-z Number of RX antennas used in UE\n");
|
||||
//printf("-i Relative strength of first intefering eNB (in dB) - cell_id mod 3 = 1\n");
|
||||
//printf("-j Relative strength of second intefering eNB (in dB) - cell_id mod 3 = 2\n");
|
||||
printf("-M Multiple SSB positions in burst\n");
|
||||
printf("-M Multiple SSB positions in burst\n");
|
||||
printf("-N Nid_cell\n");
|
||||
printf("-R N_RB_DL\n");
|
||||
printf("-O oversampling factor (1,2,4,8,16)\n");
|
||||
|
||||
@@ -314,15 +314,6 @@ void nr_dlsim_preprocessor(module_id_t module_id,
|
||||
AssertFatal(CCEIndex>=0, "%4d.%2d could not find CCE for DL DCI UE %d/RNTI %04x\n", frame, slot, 0, UE_info->rnti);
|
||||
sched_ctrl->cce_index = CCEIndex;
|
||||
|
||||
NR_pdsch_semi_static_t *ps = &sched_ctrl->pdsch_semi_static;
|
||||
|
||||
nr_set_pdsch_semi_static(current_BWP,
|
||||
scc,
|
||||
/* tda = */ 0,
|
||||
g_nrOfLayers,
|
||||
sched_ctrl,
|
||||
ps);
|
||||
|
||||
NR_sched_pdsch_t *sched_pdsch = &sched_ctrl->sched_pdsch;
|
||||
sched_pdsch->rbStart = g_rbStart;
|
||||
sched_pdsch->rbSize = g_rbSize;
|
||||
@@ -331,17 +322,26 @@ void nr_dlsim_preprocessor(module_id_t module_id,
|
||||
/* the following might override the table that is mandated by RRC
|
||||
* configuration */
|
||||
current_BWP->mcsTableIdx = g_mcsTableIdx;
|
||||
sched_pdsch->time_domain_allocation = get_dl_tda(RC.nrmac[module_id], scc, slot);
|
||||
AssertFatal(sched_pdsch->time_domain_allocation>=0,"Unable to find PDSCH time domain allocation in list\n");
|
||||
|
||||
sched_pdsch->tda_info = nr_get_pdsch_tda_info(current_BWP, sched_pdsch->time_domain_allocation);
|
||||
|
||||
sched_pdsch->dmrs_parms = get_dl_dmrs_params(scc,
|
||||
current_BWP,
|
||||
&sched_pdsch->tda_info,
|
||||
sched_pdsch->nrOfLayers);
|
||||
|
||||
sched_pdsch->Qm = nr_get_Qm_dl(sched_pdsch->mcs, current_BWP->mcsTableIdx);
|
||||
sched_pdsch->R = nr_get_code_rate_dl(sched_pdsch->mcs, current_BWP->mcsTableIdx);
|
||||
sched_pdsch->tb_size = nr_compute_tbs(sched_pdsch->Qm,
|
||||
sched_pdsch->R,
|
||||
sched_pdsch->rbSize,
|
||||
ps->nrOfSymbols,
|
||||
ps->N_PRB_DMRS * ps->N_DMRS_SLOT,
|
||||
sched_pdsch->tda_info.nrOfSymbols,
|
||||
sched_pdsch->dmrs_parms.N_PRB_DMRS * sched_pdsch->dmrs_parms.N_DMRS_SLOT,
|
||||
0 /* N_PRB_oh, 0 for initialBWP */,
|
||||
0 /* tb_scaling */,
|
||||
ps->nrOfLayers) >> 3;
|
||||
sched_pdsch->nrOfLayers) >> 3;
|
||||
|
||||
/* the simulator assumes the HARQ PID is equal to the slot number */
|
||||
sched_pdsch->dl_harq_pid = slot;
|
||||
|
||||
@@ -63,7 +63,6 @@ void fill_scc_sim(NR_ServingCellConfigCommon_t *scc,uint64_t *ssb_bitmap,int N_R
|
||||
void fix_scc(NR_ServingCellConfigCommon_t *scc,uint64_t ssbmap);
|
||||
void prepare_scc(NR_ServingCellConfigCommon_t *scc);
|
||||
void prepare_scd(NR_ServingCellConfig_t *scd);
|
||||
ngap_gNB_config_t ngap_config;
|
||||
uint32_t ngap_generate_gNB_id(void) {return 0;}
|
||||
void configure_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_addr, int pnf_p7_port, int vnf_p7_port) { return;}
|
||||
void configure_nfapi_vnf(char *vnf_addr, int vnf_p5_port) { return;}
|
||||
|
||||
@@ -63,7 +63,7 @@ softmodem_enb>
|
||||
|
||||
|
||||
|
||||
The [rfsimulator documentation](../../../../targets/ARCH/rfsimulator/README.md ) has also some specific information when using the channel simulation via this tool.
|
||||
The [rfsimulator documentation](../../../../sdr/rfsimulator/README.md ) has also some specific information when using the channel simulation via this tool.
|
||||
|
||||
[channel simulation main page](channel_simulation.md)
|
||||
[oai Wikis home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home)
|
||||
[oai Wikis home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home)
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#include "SystemInformationBlockType2.h"
|
||||
|
||||
#include "PHY/phy_extern.h"
|
||||
#include "targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.h"
|
||||
#include "sdr/ETHERNET/USERSPACE/LIB/ethernet_lib.h"
|
||||
#include "common/config/config_userapi.h"
|
||||
#include "RRC_config_tools.h"
|
||||
#include "RRC_paramsvalues.h"
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
#include "LAYER2/MAC/mac_proto.h"
|
||||
#include "PHY/phy_extern.h"
|
||||
#include "PHY/INIT/phy_init.h"
|
||||
#include "targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.h"
|
||||
#include "sdr/ETHERNET/USERSPACE/LIB/ethernet_lib.h"
|
||||
#include "nfapi_vnf.h"
|
||||
#include "nfapi_pnf.h"
|
||||
#include "targets/RT/USER/lte-softmodem.h"
|
||||
|
||||
@@ -88,7 +88,7 @@ static uint32_t gNB_app_register(uint32_t gnb_id_start, uint32_t gnb_id_end)//,
|
||||
|
||||
for (gnb_id = gnb_id_start; (gnb_id < gnb_id_end) ; gnb_id++) {
|
||||
{
|
||||
if(NGAP_CONF_MODE){
|
||||
if(get_softmodem_params()->sa){
|
||||
ngap_register_gnb_req_t *ngap_register_gNB; //Type Temporarily reuse
|
||||
|
||||
// note: there is an implicit relationship between the data structure and the message name
|
||||
@@ -187,7 +187,7 @@ void *gNB_app_task(void *args_p)
|
||||
|
||||
/* For the CU case the gNB registration with the AMF might have to take place after the F1 setup, as the PLMN info
|
||||
* can originate from the DU. Add check on whether x2ap is enabled to account for ENDC NSA scenario.*/
|
||||
if ((AMF_MODE_ENABLED || is_x2ap_enabled()) && !NODE_IS_DU(RC.nrrrc[0]->node_type) ) { //&& !NODE_IS_CU(RC.nrrrc[0]->node_type)) {
|
||||
if ((get_softmodem_params()->sa || is_x2ap_enabled()) && !NODE_IS_DU(RC.nrrrc[0]->node_type) ) { //&& !NODE_IS_CU(RC.nrrrc[0]->node_type)) {
|
||||
/* Try to register each gNB */
|
||||
//registered_gnb = 0;
|
||||
__attribute__((unused)) uint32_t register_gnb_pending = gNB_app_register (gnb_id_start, gnb_id_end);
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "common/utils/nr/nr_common.h"
|
||||
#include "common/utils/LOG/log_extern.h"
|
||||
#include "assertions.h"
|
||||
#include "executables/softmodem-common.h"
|
||||
#include "gnb_config.h"
|
||||
#include "gnb_paramdef.h"
|
||||
#include "enb_paramdef.h"
|
||||
@@ -49,7 +50,7 @@
|
||||
// #include "LAYER2/MAC/extern.h"
|
||||
// #include "LAYER2/MAC/proto.h"
|
||||
#include "PHY/INIT/phy_init.h"
|
||||
#include "targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.h"
|
||||
#include "sdr/ETHERNET/USERSPACE/LIB/ethernet_lib.h"
|
||||
#include "nfapi_vnf.h"
|
||||
#include "nfapi_pnf.h"
|
||||
|
||||
@@ -639,7 +640,7 @@ void RCconfig_nr_flexran()
|
||||
/* gNB ID from configuration, as read in by RCconfig_RRC() */
|
||||
if (!GNBParamList.paramarray[i][GNB_GNB_ID_IDX].uptr) {
|
||||
// Calculate a default gNB ID
|
||||
if (AMF_MODE_ENABLED)
|
||||
if (get_softmodem_params()->sa)
|
||||
gnb_id = i + (ngap_generate_gNB_id () & 0xFFFFFF8);
|
||||
else
|
||||
gnb_id = i;
|
||||
@@ -1065,24 +1066,6 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
num_gnbs = GNBSParams[GNB_ACTIVE_GNBS_IDX].numelt;
|
||||
AssertFatal (i<num_gnbs,"Failed to parse config file no %ith element in %s \n",i, GNB_CONFIG_STRING_ACTIVE_GNBS);
|
||||
|
||||
/*
|
||||
if (AMF_MODE_ENABLED) {
|
||||
if (strcasecmp( *(GNBSParams[GNB_ASN1_VERBOSITY_IDX].strptr), GNB_CONFIG_STRING_ASN1_VERBOSITY_NONE) == 0) {
|
||||
asn_debug = 0;
|
||||
asn1_xer_print = 0;
|
||||
} else if (strcasecmp( *(GNBSParams[GNB_ASN1_VERBOSITY_IDX].strptr), GNB_CONFIG_STRING_ASN1_VERBOSITY_INFO) == 0) {
|
||||
asn_debug = 1;
|
||||
asn1_xer_print = 1;
|
||||
} else if (strcasecmp(*(GNBSParams[GNB_ASN1_VERBOSITY_IDX].strptr) , GNB_CONFIG_STRING_ASN1_VERBOSITY_ANNOYING) == 0) {
|
||||
asn_debug = 1;
|
||||
asn1_xer_print = 2;
|
||||
} else {
|
||||
asn_debug = 0;
|
||||
asn1_xer_print = 0;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
if (num_gnbs>0) {
|
||||
|
||||
// Output a list of all gNBs. ////////// Identification parameters
|
||||
@@ -1090,7 +1073,7 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
|
||||
if (GNBParamList.paramarray[i][GNB_GNB_ID_IDX].uptr == NULL) {
|
||||
// Calculate a default gNB ID
|
||||
if (AMF_MODE_ENABLED) {
|
||||
if (get_softmodem_params()->sa) {
|
||||
uint32_t hash;
|
||||
hash = ngap_generate_gNB_id ();
|
||||
gnb_id = i + (hash & 0xFFFFFF8);
|
||||
@@ -1350,26 +1333,8 @@ int RCconfig_NR_NG(MessageDef *msg_p, uint32_t i) {
|
||||
|
||||
/* get global parameters, defined outside any section in the config file */
|
||||
config_get( GNBSParams,sizeof(GNBSParams)/sizeof(paramdef_t),NULL);
|
||||
|
||||
/*
|
||||
if (AMF_MODE_ENABLED) {
|
||||
if (strcasecmp( *(GNBSParams[GNB_ASN1_VERBOSITY_IDX].strptr), GNB_CONFIG_STRING_ASN1_VERBOSITY_NONE) == 0) {
|
||||
asn_debug = 0;
|
||||
asn1_xer_print = 0;
|
||||
} else if (strcasecmp( *(GNBSParams[GNB_ASN1_VERBOSITY_IDX].strptr), GNB_CONFIG_STRING_ASN1_VERBOSITY_INFO) == 0) {
|
||||
asn_debug = 1;
|
||||
asn1_xer_print = 1;
|
||||
} else if (strcasecmp(*(GNBSParams[GNB_ASN1_VERBOSITY_IDX].strptr) , GNB_CONFIG_STRING_ASN1_VERBOSITY_ANNOYING) == 0) {
|
||||
asn_debug = 1;
|
||||
asn1_xer_print = 2;
|
||||
} else {
|
||||
asn_debug = 0;
|
||||
asn1_xer_print = 0;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
AssertFatal (i<GNBSParams[GNB_ACTIVE_GNBS_IDX].numelt,
|
||||
AssertFatal (i<GNBSParams[GNB_ACTIVE_GNBS_IDX].numelt,
|
||||
"Failed to parse config file %s, %uth attribute %s \n",
|
||||
RC.config_file_name, i, GNB_CONFIG_STRING_ACTIVE_GNBS);
|
||||
|
||||
@@ -1381,7 +1346,7 @@ int RCconfig_NR_NG(MessageDef *msg_p, uint32_t i) {
|
||||
for (k = 0; k < GNBParamList.numelt; k++) {
|
||||
if (GNBParamList.paramarray[k][GNB_GNB_ID_IDX].uptr == NULL) {
|
||||
// Calculate a default gNB ID
|
||||
if (AMF_MODE_ENABLED) {
|
||||
if (get_softmodem_params()->sa) {
|
||||
uint32_t hash;
|
||||
|
||||
hash = ngap_generate_gNB_id ();
|
||||
@@ -1537,7 +1502,7 @@ int RCconfig_NR_NG(MessageDef *msg_p, uint32_t i) {
|
||||
// SCTP SETTING
|
||||
NGAP_REGISTER_GNB_REQ (msg_p).sctp_out_streams = SCTP_OUT_STREAMS;
|
||||
NGAP_REGISTER_GNB_REQ (msg_p).sctp_in_streams = SCTP_IN_STREAMS;
|
||||
if (AMF_MODE_ENABLED) {
|
||||
if (get_softmodem_params()->sa) {
|
||||
sprintf(aprefix,"%s.[%i].%s",GNB_CONFIG_STRING_GNB_LIST,k,GNB_CONFIG_STRING_SCTP_CONFIG);
|
||||
config_get( SCTPParams,sizeof(SCTPParams)/sizeof(paramdef_t),aprefix);
|
||||
NGAP_REGISTER_GNB_REQ (msg_p).sctp_in_streams = (uint16_t)*(SCTPParams[GNB_SCTP_INSTREAMS_IDX].uptr);
|
||||
@@ -1661,7 +1626,7 @@ int RCconfig_NR_X2(MessageDef *msg_p, uint32_t i) {
|
||||
for (k = 0; k < GNBParamList.numelt; k++) {
|
||||
if (GNBParamList.paramarray[k][GNB_GNB_ID_IDX].uptr == NULL) {
|
||||
// Calculate a default eNB ID
|
||||
if (AMF_MODE_ENABLED) {
|
||||
if (get_softmodem_params()->sa) {
|
||||
uint32_t hash;
|
||||
hash = ngap_generate_gNB_id ();
|
||||
gnb_id = k + (hash & 0xFFFFFF8);
|
||||
@@ -1804,7 +1769,7 @@ int RCconfig_NR_X2(MessageDef *msg_p, uint32_t i) {
|
||||
X2AP_REGISTER_ENB_REQ (msg_p).sctp_out_streams = SCTP_OUT_STREAMS;
|
||||
X2AP_REGISTER_ENB_REQ (msg_p).sctp_in_streams = SCTP_IN_STREAMS;
|
||||
|
||||
if (AMF_MODE_ENABLED) {
|
||||
if (get_softmodem_params()->sa) {
|
||||
sprintf(aprefix,"%s.[%i].%s",GNB_CONFIG_STRING_GNB_LIST,k,GNB_CONFIG_STRING_SCTP_CONFIG);
|
||||
config_get( SCTPParams,sizeof(SCTPParams)/sizeof(paramdef_t),aprefix);
|
||||
X2AP_REGISTER_ENB_REQ (msg_p).sctp_in_streams = (uint16_t)*(SCTPParams[GNB_SCTP_INSTREAMS_IDX].uptr);
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
#include "PHY/defs_common.h" // for PRACH_RESOURCES_t
|
||||
#include "PHY/LTE_TRANSPORT/transport_common.h"
|
||||
|
||||
#include "targets/ARCH/COMMON/common_lib.h"
|
||||
#include "sdr/COMMON/common_lib.h"
|
||||
|
||||
/** @defgroup _mac MAC
|
||||
* @ingroup _oai2
|
||||
|
||||
@@ -3577,26 +3577,28 @@ int is_nr_UL_slot(NR_TDD_UL_DL_ConfigCommon_t *tdd_UL_DL_ConfigurationCommon, sl
|
||||
else return(slot_in_period >= slots1+tdd_UL_DL_ConfigurationCommon->pattern2->nrofDownlinkSlots ? 1 : 0);
|
||||
}
|
||||
|
||||
int16_t fill_dmrs_mask(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,int NrOfSymbols, int startSymbol, int mappingtype_fromDCI, int length) {
|
||||
int16_t fill_dmrs_mask(const NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,int NrOfSymbols, int startSymbol, mappingType_t mappingtype, int length) {
|
||||
|
||||
int l0;int dmrs_AdditionalPosition = 0;
|
||||
int dmrs_AdditionalPosition = 0;
|
||||
NR_DMRS_DownlinkConfig_t *dmrs_config = NULL;
|
||||
|
||||
LOG_D(MAC, "NrofSymbols:%d, startSymbol:%d, mappingtype:%d, dmrs_TypeA_Position:%d\n", NrOfSymbols, startSymbol, mappingtype_fromDCI, dmrs_TypeA_Position);
|
||||
|
||||
if (dmrs_TypeA_Position == NR_ServingCellConfigCommon__dmrs_TypeA_Position_pos2) l0=2;
|
||||
else if (dmrs_TypeA_Position == NR_ServingCellConfigCommon__dmrs_TypeA_Position_pos3) l0=3;
|
||||
else AssertFatal(1==0,"Illegal dmrs_TypeA_Position %d\n",(int)dmrs_TypeA_Position);
|
||||
LOG_D(MAC, "NrofSymbols:%d, startSymbol:%d, mappingtype:%d, dmrs_TypeA_Position:%d\n", NrOfSymbols, startSymbol, mappingtype, dmrs_TypeA_Position);
|
||||
|
||||
int l0 = 0; // type B
|
||||
if (mappingtype == typeA) {
|
||||
if (dmrs_TypeA_Position == NR_ServingCellConfigCommon__dmrs_TypeA_Position_pos2) l0=2;
|
||||
else if (dmrs_TypeA_Position == NR_ServingCellConfigCommon__dmrs_TypeA_Position_pos3) l0=3;
|
||||
else AssertFatal(1==0,"Illegal dmrs_TypeA_Position %d\n",(int)dmrs_TypeA_Position);
|
||||
}
|
||||
// in case of DCI FORMAT 1_0 or dedicated pdsch config not received additionposition = pos2, len1 should be used
|
||||
// referred to section 5.1.6.2 in 38.214
|
||||
dmrs_AdditionalPosition = 2;
|
||||
|
||||
if (pdsch_Config != NULL) {
|
||||
if (mappingtype_fromDCI == typeA) { // Type A
|
||||
if (mappingtype == typeA) { // Type A
|
||||
if (pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA && pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA->present == NR_SetupRelease_DMRS_DownlinkConfig_PR_setup)
|
||||
dmrs_config = (NR_DMRS_DownlinkConfig_t *)pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup;
|
||||
} else if (mappingtype_fromDCI == typeB) {
|
||||
} else if (mappingtype == typeB) {
|
||||
if (pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeB && pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeB->present == NR_SetupRelease_DMRS_DownlinkConfig_PR_setup)
|
||||
dmrs_config = (NR_DMRS_DownlinkConfig_t *)pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeB->choice.setup;
|
||||
} else {
|
||||
@@ -3613,17 +3615,17 @@ int16_t fill_dmrs_mask(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,i
|
||||
int32_t l_prime = -1;
|
||||
|
||||
// columns 0-3 for TypeA, 4-7 for TypeB
|
||||
column = (mappingtype_fromDCI == typeA) ? dmrs_AdditionalPosition : (dmrs_AdditionalPosition + 4);
|
||||
column = (mappingtype == typeA) ? dmrs_AdditionalPosition : (dmrs_AdditionalPosition + 4);
|
||||
|
||||
// Section 7.4.1.1.2 in Spec 38.211
|
||||
// For PDSCH Mapping TypeA, ld is duration between first OFDM of the slot and last OFDM symbol of the scheduled PDSCH resources
|
||||
// For TypeB, ld is the duration of the scheduled PDSCH resources
|
||||
ld = (mappingtype_fromDCI == typeA) ? (NrOfSymbols + startSymbol) : NrOfSymbols;
|
||||
ld = (mappingtype == typeA) ? (NrOfSymbols + startSymbol) : NrOfSymbols;
|
||||
|
||||
AssertFatal(ld > 2 && ld < 15,"Illegal NrOfSymbols according to Table 5.1.2.1-1 Spec 38.214 %d\n",ld);
|
||||
AssertFatal((NrOfSymbols + startSymbol) < 15,"Illegal S+L according to Table 5.1.2.1-1 Spec 38.214 S:%d L:%d\n",startSymbol, NrOfSymbols);
|
||||
|
||||
if (mappingtype_fromDCI == typeA) {
|
||||
if (mappingtype == typeA) {
|
||||
|
||||
// Section 7.4.1.1.2 in Spec 38.211
|
||||
AssertFatal((l0 == 2) || (l0 == 3 && dmrs_AdditionalPosition != 3),"Wrong config, If dmrs_TypeA_Position POS3, ADD POS cannot be POS3 \n");
|
||||
@@ -3651,7 +3653,7 @@ int16_t fill_dmrs_mask(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,i
|
||||
LOG_D(MAC, "l0:%d, ld:%d,row:%d, column:%d, addpos:%d, maxlen:%d\n", l0, ld, row, column, dmrs_AdditionalPosition, length);
|
||||
AssertFatal(l_prime>=0,"ERROR in configuration.Check Time Domain allocation of this Grant. l_prime < 1. row:%d, column:%d\n", row, column);
|
||||
|
||||
l_prime = (mappingtype_fromDCI == typeA) ? (l_prime | l0) : (l_prime << startSymbol);
|
||||
l_prime = (mappingtype == typeA) ? (l_prime | l0) : (l_prime << startSymbol);
|
||||
LOG_D(MAC, " PDSCH DMRS MASK in HEX:%x\n", l_prime);
|
||||
|
||||
return l_prime;
|
||||
|
||||
@@ -38,6 +38,18 @@
|
||||
#include "openair1/PHY/impl_defs_nr.h"
|
||||
#include "common/utils/nr/nr_common.h"
|
||||
|
||||
typedef enum {
|
||||
pusch_dmrs_pos0 = 0,
|
||||
pusch_dmrs_pos1 = 1,
|
||||
pusch_dmrs_pos2 = 2,
|
||||
pusch_dmrs_pos3 = 3,
|
||||
} pusch_dmrs_AdditionalPosition_t;
|
||||
|
||||
typedef enum {
|
||||
typeA = 0,
|
||||
typeB = 1
|
||||
} mappingType_t;
|
||||
|
||||
uint32_t get_Y(NR_SearchSpace_t *ss, int slot, rnti_t rnti);
|
||||
|
||||
uint8_t get_BG(uint32_t A, uint16_t R);
|
||||
@@ -46,7 +58,7 @@ uint64_t from_nrarfcn(int nr_bandP, uint8_t scs_index, uint32_t dl_nrarfcn);
|
||||
|
||||
uint32_t to_nrarfcn(int nr_bandP, uint64_t dl_CarrierFreq, uint8_t scs_index, uint32_t bw);
|
||||
|
||||
int16_t fill_dmrs_mask(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,int NrOfSymbols,int startSymbol,int mappingtype_fromDCI,int length);
|
||||
int16_t fill_dmrs_mask(const NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,int NrOfSymbols,int startSymbol,mappingType_t mappingtype,int length);
|
||||
|
||||
int is_nr_DL_slot(NR_TDD_UL_DL_ConfigCommon_t *tdd_UL_DL_ConfigurationCommon,slot_t slotP);
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
//#include "defs.h"
|
||||
#include "mac_proto.h"
|
||||
#include "../../ARCH/COMMON/common_lib.h"
|
||||
#include "sdr/COMMON/common_lib.h"
|
||||
//#undef MALLOC
|
||||
#include "assertions.h"
|
||||
#include "PHY/types.h"
|
||||
|
||||
@@ -1146,8 +1146,6 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
|
||||
NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon;
|
||||
NR_SearchSpace_t *ss = ra->ra_ss;
|
||||
|
||||
NR_PDSCH_TimeDomainResourceAllocationList_t *pdsch_TimeDomainAllocationList = dl_bwp->tdaList;
|
||||
|
||||
long BWPStart = 0;
|
||||
long BWPSize = 0;
|
||||
NR_Type0_PDCCH_CSS_config_t *type0_PDCCH_CSS_config = NULL;
|
||||
@@ -1162,10 +1160,8 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
|
||||
|
||||
// Calculate number of symbols
|
||||
int time_domain_assignment = get_dl_tda(nr_mac, scc, slotP);
|
||||
int startSymbolIndex, nrOfSymbols;
|
||||
const int startSymbolAndLength = pdsch_TimeDomainAllocationList->list.array[time_domain_assignment]->startSymbolAndLength;
|
||||
SLIV2SL(startSymbolAndLength, &startSymbolIndex, &nrOfSymbols);
|
||||
AssertFatal(startSymbolIndex >= 0, "StartSymbolIndex is negative\n");
|
||||
NR_tda_info_t tda_info = nr_get_pdsch_tda_info(dl_bwp,
|
||||
time_domain_assignment);
|
||||
|
||||
NR_ControlResourceSet_t *coreset = ra->coreset;
|
||||
|
||||
@@ -1173,7 +1169,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
|
||||
|
||||
uint16_t *vrb_map = cc[CC_id].vrb_map;
|
||||
for (int i = 0; (i < rbSize) && (rbStart <= (BWPSize - rbSize)); i++) {
|
||||
if (vrb_map[BWPStart + rbStart + i]&SL_to_bitmap(startSymbolIndex, nrOfSymbols)) {
|
||||
if (vrb_map[BWPStart + rbStart + i]&SL_to_bitmap(tda_info.startSymbolIndex, tda_info.nrOfSymbols)) {
|
||||
rbStart += i;
|
||||
i = 0;
|
||||
}
|
||||
@@ -1213,9 +1209,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
|
||||
return;
|
||||
}
|
||||
|
||||
LOG_D(NR_MAC,"Msg2 startSymbolIndex.nrOfSymbols %d.%d\n",startSymbolIndex,nrOfSymbols);
|
||||
|
||||
int mappingtype = pdsch_TimeDomainAllocationList->list.array[time_domain_assignment]->mappingType;
|
||||
LOG_D(NR_MAC,"Msg2 startSymbolIndex.nrOfSymbols %d.%d\n",tda_info.startSymbolIndex,tda_info.nrOfSymbols);
|
||||
|
||||
// look up the PDCCH PDU for this CC, BWP, and CORESET. If it does not exist, create it. This is especially
|
||||
// important if we have multiple RAs, and the DLSCH has to reuse them, so we need to mark them
|
||||
@@ -1245,16 +1239,12 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
|
||||
// SCF222: PDU index incremented for each PDSCH PDU sent in TX control message. This is used to associate control
|
||||
// information to data and is reset every slot.
|
||||
const int pduindex = nr_mac->pdu_index[CC_id]++;
|
||||
|
||||
NR_PDSCH_Config_t *pdsch_Config = dl_bwp->pdsch_Config;
|
||||
uint8_t mcsTableIdx = dl_bwp->mcsTableIdx;
|
||||
|
||||
int dmrsConfigType=0;
|
||||
if (pdsch_Config &&
|
||||
pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA &&
|
||||
pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup &&
|
||||
pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type)
|
||||
dmrsConfigType = 1;
|
||||
NR_pdsch_dmrs_t dmrs_parms = get_dl_dmrs_params(scc,
|
||||
dl_bwp,
|
||||
&tda_info,
|
||||
1);
|
||||
|
||||
pdsch_pdu_rel15->pduBitmap = 0;
|
||||
pdsch_pdu_rel15->rnti = ra->RA_rnti;
|
||||
@@ -1270,37 +1260,22 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
|
||||
pdsch_pdu_rel15->nrOfLayers = 1;
|
||||
pdsch_pdu_rel15->transmissionScheme = 0;
|
||||
pdsch_pdu_rel15->refPoint = 0;
|
||||
pdsch_pdu_rel15->dmrsConfigType = dmrsConfigType;
|
||||
pdsch_pdu_rel15->dmrsConfigType = dmrs_parms.dmrsConfigType;
|
||||
pdsch_pdu_rel15->dlDmrsScramblingId = *scc->physCellId;
|
||||
pdsch_pdu_rel15->SCID = 0;
|
||||
pdsch_pdu_rel15->numDmrsCdmGrpsNoData = nrOfSymbols <= 2 ? 1 : 2;
|
||||
pdsch_pdu_rel15->numDmrsCdmGrpsNoData = dmrs_parms.numDmrsCdmGrpsNoData;
|
||||
pdsch_pdu_rel15->dmrsPorts = 1;
|
||||
pdsch_pdu_rel15->resourceAlloc = 1;
|
||||
pdsch_pdu_rel15->rbStart = rbStart;
|
||||
pdsch_pdu_rel15->rbSize = rbSize;
|
||||
pdsch_pdu_rel15->VRBtoPRBMapping = 0;
|
||||
pdsch_pdu_rel15->StartSymbolIndex = startSymbolIndex;
|
||||
pdsch_pdu_rel15->NrOfSymbols = nrOfSymbols;
|
||||
pdsch_pdu_rel15->dlDmrsSymbPos = fill_dmrs_mask(pdsch_Config,
|
||||
nr_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position,
|
||||
nrOfSymbols,
|
||||
startSymbolIndex,
|
||||
mappingtype,
|
||||
1);
|
||||
pdsch_pdu_rel15->StartSymbolIndex = tda_info.startSymbolIndex;
|
||||
pdsch_pdu_rel15->NrOfSymbols = tda_info.nrOfSymbols;
|
||||
pdsch_pdu_rel15->dlDmrsSymbPos = dmrs_parms.dl_dmrs_symb_pos;
|
||||
|
||||
uint8_t tb_scaling = 0;
|
||||
int R, Qm;
|
||||
uint8_t N_PRB_DMRS;
|
||||
uint32_t TBS=0;
|
||||
if (dmrsConfigType == NFAPI_NR_DMRS_TYPE1) {
|
||||
// if no data in dmrs cdm group is 1 only even REs have no data
|
||||
// if no data in dmrs cdm group is 2 both odd and even REs have no data
|
||||
N_PRB_DMRS = pdsch_pdu_rel15->numDmrsCdmGrpsNoData*6;
|
||||
}
|
||||
else {
|
||||
N_PRB_DMRS = pdsch_pdu_rel15->numDmrsCdmGrpsNoData*4;
|
||||
}
|
||||
uint16_t dmrs_length = get_num_dmrs(pdsch_pdu_rel15->dlDmrsSymbPos);
|
||||
|
||||
while(TBS<9) { // min TBS for RAR is 9 bytes
|
||||
mcsIndex++;
|
||||
@@ -1309,8 +1284,8 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
|
||||
TBS = nr_compute_tbs(Qm,
|
||||
R,
|
||||
rbSize,
|
||||
nrOfSymbols,
|
||||
N_PRB_DMRS*dmrs_length,
|
||||
tda_info.nrOfSymbols,
|
||||
dmrs_parms.N_PRB_DMRS*dmrs_parms.N_DMRS_SLOT,
|
||||
0, // overhead
|
||||
tb_scaling, // tb scaling
|
||||
1)>>3; // layers
|
||||
@@ -1415,7 +1390,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
|
||||
CCEIndex,
|
||||
aggregation_level);
|
||||
for (int rb = 0; rb < rbSize; rb++) {
|
||||
vrb_map[BWPStart + rb + rbStart] |= SL_to_bitmap(startSymbolIndex, nrOfSymbols);
|
||||
vrb_map[BWPStart + rb + rbStart] |= SL_to_bitmap(tda_info.startSymbolIndex, tda_info.nrOfSymbols);
|
||||
}
|
||||
|
||||
ra->state = WAIT_Msg3;
|
||||
@@ -1438,8 +1413,6 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
|
||||
NR_SearchSpace_t *ss = ra->ra_ss;
|
||||
|
||||
NR_ControlResourceSet_t *coreset = ra->coreset;
|
||||
NR_PDSCH_TimeDomainResourceAllocationList_t *pdsch_TimeDomainAllocationList = dl_bwp->tdaList;
|
||||
|
||||
AssertFatal(coreset!=NULL,"Coreset cannot be null for RA-Msg4\n");
|
||||
|
||||
rnti_t tc_rnti = ra->rnti;
|
||||
@@ -1555,48 +1528,12 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
|
||||
}
|
||||
}
|
||||
|
||||
// Calculate number of symbols
|
||||
int startSymbolIndex, nrOfSymbols;
|
||||
const int startSymbolAndLength = pdsch_TimeDomainAllocationList->list.array[time_domain_assignment]->startSymbolAndLength;
|
||||
SLIV2SL(startSymbolAndLength, &startSymbolIndex, &nrOfSymbols);
|
||||
AssertFatal(startSymbolIndex >= 0, "StartSymbolIndex is negative\n");
|
||||
NR_tda_info_t msg4_tda = nr_get_pdsch_tda_info(dl_bwp, time_domain_assignment);
|
||||
|
||||
int mappingtype = pdsch_TimeDomainAllocationList->list.array[time_domain_assignment]->mappingType;
|
||||
|
||||
uint16_t dlDmrsSymbPos = fill_dmrs_mask(NULL,
|
||||
scc->dmrs_TypeA_Position,
|
||||
nrOfSymbols,
|
||||
startSymbolIndex,
|
||||
mappingtype,
|
||||
1);
|
||||
|
||||
uint16_t N_DMRS_SLOT = get_num_dmrs(dlDmrsSymbPos);
|
||||
|
||||
NR_PDSCH_Config_t *pdsch_Config = dl_bwp->pdsch_Config;
|
||||
int dmrsConfigType=0;
|
||||
if (pdsch_Config &&
|
||||
pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA &&
|
||||
pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup &&
|
||||
pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type)
|
||||
dmrsConfigType = 1;
|
||||
|
||||
nr_mac->sched_ctrlCommon->pdsch_semi_static.numDmrsCdmGrpsNoData = 2;
|
||||
if (nrOfSymbols == 2) {
|
||||
nr_mac->sched_ctrlCommon->pdsch_semi_static.numDmrsCdmGrpsNoData = 1;
|
||||
}
|
||||
|
||||
AssertFatal(nr_mac->sched_ctrlCommon->pdsch_semi_static.numDmrsCdmGrpsNoData == 1
|
||||
|| nr_mac->sched_ctrlCommon->pdsch_semi_static.numDmrsCdmGrpsNoData == 2,
|
||||
"nr_mac->schedCtrlCommon->pdsch_semi_static.numDmrsCdmGrpsNoData %d is not possible",
|
||||
nr_mac->sched_ctrlCommon->pdsch_semi_static.numDmrsCdmGrpsNoData);
|
||||
|
||||
uint8_t N_PRB_DMRS = 0;
|
||||
if (dmrsConfigType==NFAPI_NR_DMRS_TYPE1) {
|
||||
N_PRB_DMRS = nr_mac->sched_ctrlCommon->pdsch_semi_static.numDmrsCdmGrpsNoData * 6;
|
||||
}
|
||||
else {
|
||||
N_PRB_DMRS = nr_mac->sched_ctrlCommon->pdsch_semi_static.numDmrsCdmGrpsNoData * 4;
|
||||
}
|
||||
NR_pdsch_dmrs_t dmrs_info = get_dl_dmrs_params(scc,
|
||||
dl_bwp,
|
||||
&msg4_tda,
|
||||
1);
|
||||
|
||||
uint8_t mcsTableIdx = dl_bwp->mcsTableIdx;
|
||||
|
||||
@@ -1610,17 +1547,17 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
|
||||
rbSize++;
|
||||
else
|
||||
mcsIndex++;
|
||||
LOG_D(NR_MAC,"Calling nr_compute_tbs with N_PRB_DMRS %d, N_DMRS_SLOT %d\n",N_PRB_DMRS,N_DMRS_SLOT);
|
||||
LOG_D(NR_MAC,"Calling nr_compute_tbs with N_PRB_DMRS %d, N_DMRS_SLOT %d\n",dmrs_info.N_PRB_DMRS,dmrs_info.N_DMRS_SLOT);
|
||||
harq->tb_size = nr_compute_tbs(nr_get_Qm_dl(mcsIndex, mcsTableIdx),
|
||||
nr_get_code_rate_dl(mcsIndex, mcsTableIdx),
|
||||
rbSize, nrOfSymbols, N_PRB_DMRS * N_DMRS_SLOT, 0, tb_scaling,1) >> 3;
|
||||
rbSize, msg4_tda.nrOfSymbols, dmrs_info.N_PRB_DMRS * dmrs_info.N_DMRS_SLOT, 0, tb_scaling,1) >> 3;
|
||||
} while (harq->tb_size < ra->mac_pdu_length && mcsIndex<=28);
|
||||
|
||||
AssertFatal(harq->tb_size >= ra->mac_pdu_length,"Cannot allocate Msg4\n");
|
||||
|
||||
int i = 0;
|
||||
while ((i < rbSize) && (rbStart + rbSize <= BWPSize)) {
|
||||
if (vrb_map[BWPStart + rbStart + i]&SL_to_bitmap(startSymbolIndex, nrOfSymbols)) {
|
||||
if (vrb_map[BWPStart + rbStart + i]&SL_to_bitmap(msg4_tda.startSymbolIndex, msg4_tda.nrOfSymbols)) {
|
||||
rbStart += i+1;
|
||||
i = 0;
|
||||
} else {
|
||||
@@ -1688,18 +1625,18 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
|
||||
pdsch_pdu_rel15->nrOfLayers = 1;
|
||||
pdsch_pdu_rel15->transmissionScheme = 0;
|
||||
pdsch_pdu_rel15->refPoint = 0;
|
||||
pdsch_pdu_rel15->dmrsConfigType = dmrsConfigType;
|
||||
pdsch_pdu_rel15->dmrsConfigType = dmrs_info.dmrsConfigType;
|
||||
pdsch_pdu_rel15->dlDmrsScramblingId = *scc->physCellId;
|
||||
pdsch_pdu_rel15->SCID = 0;
|
||||
pdsch_pdu_rel15->numDmrsCdmGrpsNoData = nrOfSymbols <= 2 ? 1 : 2;
|
||||
pdsch_pdu_rel15->numDmrsCdmGrpsNoData = dmrs_info.numDmrsCdmGrpsNoData;
|
||||
pdsch_pdu_rel15->dmrsPorts = 1;
|
||||
pdsch_pdu_rel15->resourceAlloc = 1;
|
||||
pdsch_pdu_rel15->rbStart = rbStart;
|
||||
pdsch_pdu_rel15->rbSize = rbSize;
|
||||
pdsch_pdu_rel15->VRBtoPRBMapping = 0;
|
||||
pdsch_pdu_rel15->StartSymbolIndex = startSymbolIndex;
|
||||
pdsch_pdu_rel15->NrOfSymbols = nrOfSymbols;
|
||||
pdsch_pdu_rel15->dlDmrsSymbPos = dlDmrsSymbPos;
|
||||
pdsch_pdu_rel15->StartSymbolIndex = msg4_tda.startSymbolIndex;
|
||||
pdsch_pdu_rel15->NrOfSymbols = msg4_tda.nrOfSymbols;
|
||||
pdsch_pdu_rel15->dlDmrsSymbPos = dmrs_info.dl_dmrs_symb_pos;
|
||||
|
||||
int x_Overhead = 0;
|
||||
nr_get_tbs_dl(&dl_tti_pdsch_pdu->pdsch_pdu, x_Overhead, pdsch_pdu_rel15->numDmrsCdmGrpsNoData, tb_scaling);
|
||||
@@ -1812,7 +1749,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
|
||||
CCEIndex,
|
||||
aggregation_level);
|
||||
for (int rb = 0; rb < pdsch_pdu_rel15->rbSize; rb++) {
|
||||
vrb_map[BWPStart + rb + pdsch_pdu_rel15->rbStart] |= SL_to_bitmap(startSymbolIndex, nrOfSymbols);
|
||||
vrb_map[BWPStart + rb + pdsch_pdu_rel15->rbStart] |= SL_to_bitmap(msg4_tda.startSymbolIndex, msg4_tda.nrOfSymbols);
|
||||
}
|
||||
|
||||
LOG_D(NR_MAC,"BWPSize: %i\n", pdcch_pdu_rel15->BWPSize);
|
||||
|
||||
@@ -281,9 +281,8 @@ uint32_t schedule_control_sib1(module_id_t module_id,
|
||||
int CC_id,
|
||||
NR_Type0_PDCCH_CSS_config_t *type0_PDCCH_CSS_config,
|
||||
int time_domain_allocation,
|
||||
int startSymbolIndex,
|
||||
int nrOfSymbols,
|
||||
uint16_t dlDmrsSymbPos,
|
||||
NR_pdsch_dmrs_t *dmrs_parms,
|
||||
NR_tda_info_t *tda_info,
|
||||
uint8_t candidate_idx,
|
||||
uint16_t num_total_bytes) {
|
||||
|
||||
@@ -309,8 +308,11 @@ uint32_t schedule_control_sib1(module_id_t module_id,
|
||||
type0_PDCCH_CSS_config);
|
||||
}
|
||||
|
||||
gNB_mac->sched_ctrlCommon->pdsch_semi_static.time_domain_allocation = time_domain_allocation;
|
||||
gNB_mac->sched_ctrlCommon->sched_pdsch.mcs = 0; // starting from mcs 0
|
||||
NR_sched_pdsch_t *pdsch = &gNB_mac->sched_ctrlCommon->sched_pdsch;
|
||||
pdsch->time_domain_allocation = time_domain_allocation;
|
||||
pdsch->dmrs_parms = *dmrs_parms;
|
||||
pdsch->tda_info = *tda_info;
|
||||
pdsch->mcs = 0; // starting from mcs 0
|
||||
gNB_mac->sched_ctrlCommon->num_total_bytes = num_total_bytes;
|
||||
|
||||
uint8_t nr_of_candidates;
|
||||
@@ -333,58 +335,49 @@ uint32_t schedule_control_sib1(module_id_t module_id,
|
||||
const uint16_t bwpSize = type0_PDCCH_CSS_config->num_rbs;
|
||||
int rbStart = type0_PDCCH_CSS_config->cset_start_rb;
|
||||
|
||||
// TODO: There are exceptions to this in table 5.1.2.1.1-4,5 (Default time domain allocation tables B, C)
|
||||
int mappingtype = (startSymbolIndex <= 3)? typeA: typeB;
|
||||
|
||||
if (nrOfSymbols == 2) {
|
||||
gNB_mac->sched_ctrlCommon->pdsch_semi_static.numDmrsCdmGrpsNoData = 1;
|
||||
} else {
|
||||
gNB_mac->sched_ctrlCommon->pdsch_semi_static.numDmrsCdmGrpsNoData = 2;
|
||||
}
|
||||
|
||||
// Calculate number of PRB_DMRS
|
||||
uint8_t N_PRB_DMRS = gNB_mac->sched_ctrlCommon->pdsch_semi_static.numDmrsCdmGrpsNoData * 6;
|
||||
uint16_t dmrs_length = get_num_dmrs(dlDmrsSymbPos);
|
||||
LOG_D(MAC,"dlDmrsSymbPos %x\n",dlDmrsSymbPos);
|
||||
uint8_t N_PRB_DMRS = pdsch->dmrs_parms.N_PRB_DMRS;
|
||||
uint16_t dmrs_length = pdsch->dmrs_parms.N_DMRS_SLOT;
|
||||
LOG_D(MAC,"dlDmrsSymbPos %x\n",pdsch->dmrs_parms.dl_dmrs_symb_pos);
|
||||
int mcsTableIdx = 0;
|
||||
int rbSize = 0;
|
||||
uint32_t TBS = 0;
|
||||
do {
|
||||
if(rbSize < bwpSize && !(vrb_map[rbStart + rbSize]&SL_to_bitmap(startSymbolIndex, nrOfSymbols)))
|
||||
if(rbSize < bwpSize && !(vrb_map[rbStart + rbSize]&SL_to_bitmap(tda_info->startSymbolIndex, tda_info->nrOfSymbols)))
|
||||
rbSize++;
|
||||
else{
|
||||
if (gNB_mac->sched_ctrlCommon->sched_pdsch.mcs<10)
|
||||
gNB_mac->sched_ctrlCommon->sched_pdsch.mcs++;
|
||||
if (pdsch->mcs<10)
|
||||
pdsch->mcs++;
|
||||
else
|
||||
break;
|
||||
}
|
||||
TBS = nr_compute_tbs(nr_get_Qm_dl(gNB_mac->sched_ctrlCommon->sched_pdsch.mcs, mcsTableIdx),
|
||||
nr_get_code_rate_dl(gNB_mac->sched_ctrlCommon->sched_pdsch.mcs, mcsTableIdx),
|
||||
rbSize, nrOfSymbols, N_PRB_DMRS * dmrs_length,0, 0,1) >> 3;
|
||||
TBS = nr_compute_tbs(nr_get_Qm_dl(pdsch->mcs, mcsTableIdx),
|
||||
nr_get_code_rate_dl(pdsch->mcs, mcsTableIdx),
|
||||
rbSize, tda_info->nrOfSymbols, N_PRB_DMRS * dmrs_length,0, 0,1) >> 3;
|
||||
} while (TBS < gNB_mac->sched_ctrlCommon->num_total_bytes);
|
||||
|
||||
AssertFatal(TBS>=gNB_mac->sched_ctrlCommon->num_total_bytes,"Couldn't allocate enough resources for %d bytes in SIB1 PDSCH\n",
|
||||
gNB_mac->sched_ctrlCommon->num_total_bytes);
|
||||
|
||||
gNB_mac->sched_ctrlCommon->sched_pdsch.rbSize = rbSize;
|
||||
gNB_mac->sched_ctrlCommon->sched_pdsch.rbStart = 0;
|
||||
pdsch->rbSize = rbSize;
|
||||
pdsch->rbStart = 0;
|
||||
|
||||
LOG_D(NR_MAC,"mcs = %i\n", gNB_mac->sched_ctrlCommon->sched_pdsch.mcs);
|
||||
LOG_D(NR_MAC,"startSymbolIndex = %i\n", startSymbolIndex);
|
||||
LOG_D(NR_MAC,"nrOfSymbols = %i\n", nrOfSymbols);
|
||||
LOG_D(NR_MAC, "rbSize = %i\n", gNB_mac->sched_ctrlCommon->sched_pdsch.rbSize);
|
||||
LOG_D(NR_MAC,"mcs = %i\n", pdsch->mcs);
|
||||
LOG_D(NR_MAC,"startSymbolIndex = %i\n", tda_info->startSymbolIndex);
|
||||
LOG_D(NR_MAC,"nrOfSymbols = %i\n", tda_info->nrOfSymbols);
|
||||
LOG_D(NR_MAC, "rbSize = %i\n", pdsch->rbSize);
|
||||
LOG_D(NR_MAC,"TBS = %i\n", TBS);
|
||||
LOG_D(NR_MAC,"dmrs_length %d\n",dmrs_length);
|
||||
LOG_D(NR_MAC,"N_PRB_DMRS = %d\n",N_PRB_DMRS);
|
||||
LOG_D(NR_MAC,"mappingtype = %d\n", mappingtype);
|
||||
LOG_D(NR_MAC,"mappingtype = %d\n", tda_info->mapping_type);
|
||||
// Mark the corresponding RBs as used
|
||||
fill_pdcch_vrb_map(gNB_mac,
|
||||
CC_id,
|
||||
&gNB_mac->sched_ctrlCommon->sched_pdcch,
|
||||
gNB_mac->sched_ctrlCommon->cce_index,
|
||||
gNB_mac->sched_ctrlCommon->aggregation_level);
|
||||
for (int rb = 0; rb < gNB_mac->sched_ctrlCommon->sched_pdsch.rbSize; rb++) {
|
||||
vrb_map[rb + rbStart] |= SL_to_bitmap(startSymbolIndex, nrOfSymbols);
|
||||
for (int rb = 0; rb < pdsch->rbSize; rb++) {
|
||||
vrb_map[rb + rbStart] |= SL_to_bitmap(tda_info->startSymbolIndex, tda_info->nrOfSymbols);
|
||||
}
|
||||
return TBS;
|
||||
}
|
||||
@@ -395,13 +388,13 @@ void nr_fill_nfapi_dl_sib1_pdu(int Mod_idP,
|
||||
NR_Type0_PDCCH_CSS_config_t *type0_PDCCH_CSS_config,
|
||||
uint32_t TBS,
|
||||
int StartSymbolIndex,
|
||||
int NrOfSymbols,
|
||||
uint16_t dlDmrsSymbPos) {
|
||||
int NrOfSymbols) {
|
||||
|
||||
gNB_MAC_INST *gNB_mac = RC.nrmac[Mod_idP];
|
||||
NR_COMMON_channels_t *cc = gNB_mac->common_channels;
|
||||
NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon;
|
||||
int mcsTableIdx = 0;
|
||||
NR_sched_pdsch_t *pdsch = &gNB_mac->sched_ctrlCommon->sched_pdsch;
|
||||
nfapi_nr_dl_tti_request_pdu_t *dl_tti_pdcch_pdu = &dl_req->dl_tti_pdu_list[dl_req->nPDUs];
|
||||
memset((void*)dl_tti_pdcch_pdu,0,sizeof(nfapi_nr_dl_tti_request_pdu_t));
|
||||
dl_tti_pdcch_pdu->PDUType = NFAPI_NR_DL_TTI_PDCCH_PDU_TYPE;
|
||||
@@ -433,11 +426,11 @@ void nr_fill_nfapi_dl_sib1_pdu(int Mod_idP,
|
||||
pdsch_pdu_rel15->CyclicPrefix = 0;
|
||||
|
||||
pdsch_pdu_rel15->NrOfCodewords = 1;
|
||||
pdsch_pdu_rel15->targetCodeRate[0] = nr_get_code_rate_dl(gNB_mac->sched_ctrlCommon->sched_pdsch.mcs, mcsTableIdx);
|
||||
pdsch_pdu_rel15->qamModOrder[0] = nr_get_Qm_dl(gNB_mac->sched_ctrlCommon->sched_pdsch.mcs, mcsTableIdx);
|
||||
pdsch_pdu_rel15->mcsIndex[0] = gNB_mac->sched_ctrlCommon->sched_pdsch.mcs;
|
||||
pdsch_pdu_rel15->targetCodeRate[0] = nr_get_code_rate_dl(pdsch->mcs, mcsTableIdx);
|
||||
pdsch_pdu_rel15->qamModOrder[0] = nr_get_Qm_dl(pdsch->mcs, mcsTableIdx);
|
||||
pdsch_pdu_rel15->mcsIndex[0] = pdsch->mcs;
|
||||
pdsch_pdu_rel15->mcsTable[0] = mcsTableIdx;
|
||||
pdsch_pdu_rel15->rvIndex[0] = 0;
|
||||
pdsch_pdu_rel15->rvIndex[0] = nr_rv_round_map[0];
|
||||
pdsch_pdu_rel15->dataScramblingId = *scc->physCellId;
|
||||
pdsch_pdu_rel15->nrOfLayers = 1;
|
||||
pdsch_pdu_rel15->transmissionScheme = 0;
|
||||
@@ -445,16 +438,16 @@ void nr_fill_nfapi_dl_sib1_pdu(int Mod_idP,
|
||||
pdsch_pdu_rel15->dmrsConfigType = 0;
|
||||
pdsch_pdu_rel15->dlDmrsScramblingId = *scc->physCellId;
|
||||
pdsch_pdu_rel15->SCID = 0;
|
||||
pdsch_pdu_rel15->numDmrsCdmGrpsNoData = gNB_mac->sched_ctrlCommon->pdsch_semi_static.numDmrsCdmGrpsNoData;
|
||||
pdsch_pdu_rel15->numDmrsCdmGrpsNoData = pdsch->dmrs_parms.numDmrsCdmGrpsNoData;
|
||||
pdsch_pdu_rel15->dmrsPorts = 1;
|
||||
pdsch_pdu_rel15->resourceAlloc = 1;
|
||||
pdsch_pdu_rel15->rbStart = gNB_mac->sched_ctrlCommon->sched_pdsch.rbStart;
|
||||
pdsch_pdu_rel15->rbSize = gNB_mac->sched_ctrlCommon->sched_pdsch.rbSize;
|
||||
pdsch_pdu_rel15->rbStart = pdsch->rbStart;
|
||||
pdsch_pdu_rel15->rbSize = pdsch->rbSize;
|
||||
pdsch_pdu_rel15->VRBtoPRBMapping = 0;
|
||||
pdsch_pdu_rel15->TBSize[0] = TBS;
|
||||
pdsch_pdu_rel15->StartSymbolIndex = StartSymbolIndex;
|
||||
pdsch_pdu_rel15->NrOfSymbols = NrOfSymbols;
|
||||
pdsch_pdu_rel15->dlDmrsSymbPos = dlDmrsSymbPos;
|
||||
pdsch_pdu_rel15->dlDmrsSymbPos = pdsch->dmrs_parms.dl_dmrs_symb_pos;
|
||||
LOG_D(NR_MAC,"sib1:bwpStart %d, bwpSize %d\n",pdsch_pdu_rel15->BWPStart,pdsch_pdu_rel15->BWPSize);
|
||||
LOG_D(NR_MAC,"sib1:rbStart %d, rbSize %d\n",pdsch_pdu_rel15->rbStart,pdsch_pdu_rel15->rbSize);
|
||||
LOG_D(NR_MAC,"sib1:dlDmrsSymbPos = 0x%x\n", pdsch_pdu_rel15->dlDmrsSymbPos);
|
||||
@@ -485,8 +478,8 @@ void nr_fill_nfapi_dl_sib1_pdu(int Mod_idP,
|
||||
dci_payload.frequency_domain_assignment.val = PRBalloc_to_locationandbandwidth0(
|
||||
pdsch_pdu_rel15->rbSize, pdsch_pdu_rel15->rbStart, type0_PDCCH_CSS_config->num_rbs);
|
||||
|
||||
dci_payload.time_domain_assignment.val = gNB_mac->sched_ctrlCommon->pdsch_semi_static.time_domain_allocation;
|
||||
dci_payload.mcs = gNB_mac->sched_ctrlCommon->sched_pdsch.mcs;
|
||||
dci_payload.time_domain_assignment.val = gNB_mac->sched_ctrlCommon->sched_pdsch.time_domain_allocation;
|
||||
dci_payload.mcs = pdsch->mcs;
|
||||
dci_payload.rv = pdsch_pdu_rel15->rvIndex[0];
|
||||
dci_payload.harq_pid = 0;
|
||||
dci_payload.ndi = 0;
|
||||
@@ -587,22 +580,29 @@ void schedule_nr_sib1(module_id_t module_idP, frame_t frameP, sub_frame_t slotP)
|
||||
|
||||
AssertFatal((startSymbolIndex+nrOfSymbols)<14,"SIB1 TDA %d would cause overlap with CSI-RS. Please select a different SIB1 TDA.\n",time_domain_allocation);
|
||||
|
||||
int mappingtype = is_typeA? typeA: typeB;
|
||||
uint16_t dlDmrsSymbPos = fill_dmrs_mask(NULL, gNB_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position, nrOfSymbols, startSymbolIndex, mappingtype, 1);
|
||||
NR_tda_info_t tda_info = {
|
||||
.mapping_type = is_typeA ? typeA : typeB,
|
||||
.startSymbolIndex = startSymbolIndex,
|
||||
.nrOfSymbols = nrOfSymbols
|
||||
};
|
||||
|
||||
NR_pdsch_dmrs_t dmrs_parms = get_dl_dmrs_params(scc,
|
||||
NULL,
|
||||
&tda_info,
|
||||
1);
|
||||
|
||||
// Configure sched_ctrlCommon for SIB1
|
||||
uint32_t TBS = schedule_control_sib1(module_idP, CC_id,
|
||||
type0_PDCCH_CSS_config,
|
||||
time_domain_allocation,
|
||||
startSymbolIndex,
|
||||
nrOfSymbols,
|
||||
dlDmrsSymbPos,
|
||||
&dmrs_parms,
|
||||
&tda_info,
|
||||
candidate_idx,
|
||||
sib1_sdu_length);
|
||||
|
||||
nfapi_nr_dl_tti_request_body_t *dl_req = &gNB_mac->DL_req[CC_id].dl_tti_request_body;
|
||||
int pdu_index = gNB_mac->pdu_index[0]++;
|
||||
nr_fill_nfapi_dl_sib1_pdu(module_idP, dl_req, pdu_index, type0_PDCCH_CSS_config, TBS, startSymbolIndex, nrOfSymbols, dlDmrsSymbPos);
|
||||
nr_fill_nfapi_dl_sib1_pdu(module_idP, dl_req, pdu_index, type0_PDCCH_CSS_config, TBS, startSymbolIndex, nrOfSymbols);
|
||||
|
||||
const int ntx_req = gNB_mac->TX_req[CC_id].Number_of_PDUs;
|
||||
nfapi_nr_pdu_t *tx_req = &gNB_mac->TX_req[CC_id].pdu_list[ntx_req];
|
||||
|
||||
@@ -391,17 +391,13 @@ bool allocate_dl_retransmission(module_id_t module_id,
|
||||
NR_UE_DL_BWP_t *dl_bwp = &UE->current_DL_BWP;
|
||||
NR_UE_UL_BWP_t *ul_bwp = &UE->current_UL_BWP;
|
||||
NR_sched_pdsch_t *retInfo = &sched_ctrl->harq_processes[current_harq_pid].sched_pdsch;
|
||||
NR_pdsch_semi_static_t *ps = &sched_ctrl->pdsch_semi_static;
|
||||
NR_sched_pdsch_t *curInfo = &sched_ctrl->sched_pdsch;
|
||||
|
||||
//TODO remove this and handle retransmission with old nrOfLayers
|
||||
// once ps structure is removed
|
||||
if(ps->nrOfLayers < retInfo->nrOfLayers) {
|
||||
LOG_W(NR_MAC,"Cannot schedule retransmission. RI changed from %d to %d\n",
|
||||
retInfo->nrOfLayers, ps->nrOfLayers);
|
||||
abort_nr_dl_harq(UE, current_harq_pid);
|
||||
remove_front_nr_list(&sched_ctrl->retrans_dl_harq);
|
||||
return false;
|
||||
}
|
||||
// If the RI changed between current rtx and a previous transmission
|
||||
// we need to verify if it is not decreased
|
||||
// othwise it wouldn't be possible to transmit the same TBS
|
||||
int layers = (curInfo->nrOfLayers < retInfo->nrOfLayers) ? curInfo->nrOfLayers : retInfo->nrOfLayers;
|
||||
int pm_index = (curInfo->nrOfLayers < retInfo->nrOfLayers) ? curInfo->pm_index : retInfo->pm_index;
|
||||
|
||||
const int coresetid = sched_ctrl->coreset->controlResourceSetId;
|
||||
const uint16_t bwpSize = coresetid == 0 ? RC.nrmac[module_id]->cset0_bwp_size : dl_bwp->BWPSize;
|
||||
@@ -411,13 +407,16 @@ bool allocate_dl_retransmission(module_id_t module_id,
|
||||
const int tda = get_dl_tda(RC.nrmac[module_id], scc, slot);
|
||||
AssertFatal(tda>=0,"Unable to find PDSCH time domain allocation in list\n");
|
||||
|
||||
if (tda == retInfo->time_domain_allocation) {
|
||||
if (tda == retInfo->time_domain_allocation &&
|
||||
layers == retInfo->nrOfLayers) {
|
||||
|
||||
NR_tda_info_t *tda_info = &retInfo->tda_info;
|
||||
/* Check that there are enough resources for retransmission */
|
||||
while (rbSize < retInfo->rbSize) {
|
||||
rbStart += rbSize; /* last iteration rbSize was not enough, skip it */
|
||||
rbSize = 0;
|
||||
|
||||
const int slbitmap = SL_to_bitmap(ps->startSymbolIndex, ps->nrOfSymbols);
|
||||
const int slbitmap = SL_to_bitmap(tda_info->startSymbolIndex, tda_info->nrOfSymbols);
|
||||
while (rbStart < bwpSize && (rballoc_mask[rbStart] & slbitmap) != slbitmap)
|
||||
rbStart++;
|
||||
|
||||
@@ -431,30 +430,16 @@ bool allocate_dl_retransmission(module_id_t module_id,
|
||||
rbSize < retInfo->rbSize)
|
||||
rbSize++;
|
||||
}
|
||||
|
||||
/* check whether we need to switch the TDA allocation since the last
|
||||
* (re-)transmission */
|
||||
if (ps->time_domain_allocation != tda) {
|
||||
nr_set_pdsch_semi_static(dl_bwp,
|
||||
scc,
|
||||
tda,
|
||||
ps->nrOfLayers,
|
||||
sched_ctrl,
|
||||
ps);
|
||||
}
|
||||
} else {
|
||||
/* the retransmission will use a different time domain allocation, check
|
||||
* that we have enough resources */
|
||||
NR_pdsch_semi_static_t temp_ps = *ps;
|
||||
NR_tda_info_t temp_tda = nr_get_pdsch_tda_info(dl_bwp, tda);
|
||||
NR_pdsch_dmrs_t temp_dmrs = get_dl_dmrs_params(scc,
|
||||
dl_bwp,
|
||||
&temp_tda,
|
||||
layers);
|
||||
|
||||
nr_set_pdsch_semi_static(dl_bwp,
|
||||
scc,
|
||||
tda,
|
||||
ps->nrOfLayers,
|
||||
sched_ctrl,
|
||||
&temp_ps);
|
||||
|
||||
const uint16_t slbitmap = SL_to_bitmap(temp_ps.startSymbolIndex, temp_ps.nrOfSymbols);
|
||||
const uint16_t slbitmap = SL_to_bitmap(temp_tda.startSymbolIndex, temp_tda.nrOfSymbols);
|
||||
while (rbStart < bwpSize && (rballoc_mask[rbStart] & slbitmap) != slbitmap)
|
||||
rbStart++;
|
||||
|
||||
@@ -465,9 +450,9 @@ bool allocate_dl_retransmission(module_id_t module_id,
|
||||
uint16_t new_rbSize;
|
||||
bool success = nr_find_nb_rb(retInfo->Qm,
|
||||
retInfo->R,
|
||||
temp_ps.nrOfLayers,
|
||||
temp_ps.nrOfSymbols,
|
||||
temp_ps.N_PRB_DMRS * temp_ps.N_DMRS_SLOT,
|
||||
layers,
|
||||
temp_tda.nrOfSymbols,
|
||||
temp_dmrs.N_PRB_DMRS * temp_dmrs.N_DMRS_SLOT,
|
||||
retInfo->tb_size,
|
||||
1, /* minimum of 1RB: need to find exact TBS, don't preclude any number */
|
||||
rbSize,
|
||||
@@ -484,7 +469,10 @@ bool allocate_dl_retransmission(module_id_t module_id,
|
||||
retInfo->tb_size = new_tbs;
|
||||
retInfo->rbSize = new_rbSize;
|
||||
retInfo->time_domain_allocation = tda;
|
||||
sched_ctrl->pdsch_semi_static = temp_ps;
|
||||
retInfo->nrOfLayers = layers;
|
||||
retInfo->pm_index = pm_index;
|
||||
retInfo->dmrs_parms = temp_dmrs;
|
||||
retInfo->tda_info = temp_tda;
|
||||
}
|
||||
|
||||
/* Find a free CCE */
|
||||
@@ -544,7 +532,7 @@ bool allocate_dl_retransmission(module_id_t module_id,
|
||||
*n_rb_sched -= sched_ctrl->sched_pdsch.rbSize;
|
||||
|
||||
for (int rb = 0; rb < sched_ctrl->sched_pdsch.rbSize; rb++)
|
||||
rballoc_mask[rb + sched_ctrl->sched_pdsch.rbStart] ^= SL_to_bitmap(ps->startSymbolIndex, ps->nrOfSymbols);
|
||||
rballoc_mask[rb + sched_ctrl->sched_pdsch.rbStart] ^= SL_to_bitmap(retInfo->tda_info.startSymbolIndex, retInfo->tda_info.nrOfSymbols);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -585,10 +573,8 @@ void pf_dl(module_id_t module_id,
|
||||
|
||||
const NR_mac_dir_stats_t *stats = &UE->mac_stats.dl;
|
||||
NR_sched_pdsch_t *sched_pdsch = &sched_ctrl->sched_pdsch;
|
||||
NR_pdsch_semi_static_t *ps = &sched_ctrl->pdsch_semi_static;
|
||||
/* get the PID of a HARQ process awaiting retrnasmission, or -1 otherwise */
|
||||
sched_pdsch->dl_harq_pid = sched_ctrl->retrans_dl_harq.head;
|
||||
UE->layers = ps->nrOfLayers; // initialization of layers to the previous value in the structure
|
||||
/* Calculate Throughput */
|
||||
const float a = 0.0005f; // corresponds to 200ms window
|
||||
const uint32_t b = UE->mac_stats.dl.current_bytes;
|
||||
@@ -633,7 +619,10 @@ void pf_dl(module_id_t module_id,
|
||||
sched_pdsch->mcs = max_mcs;
|
||||
else
|
||||
sched_pdsch->mcs = get_mcs_from_bler(bo, stats, &sched_ctrl->dl_bler_stats, max_mcs, frame);
|
||||
UE->layers = set_dl_nrOfLayers(sched_ctrl);
|
||||
sched_pdsch->nrOfLayers = get_dl_nrOfLayers(sched_ctrl, current_BWP->dci_format);
|
||||
sched_pdsch->pm_index = get_pm_index(UE,
|
||||
sched_pdsch->nrOfLayers,
|
||||
mac->xp_pdsch_antenna_ports);
|
||||
const uint8_t Qm = nr_get_Qm_dl(sched_pdsch->mcs, current_BWP->mcsTableIdx);
|
||||
const uint16_t R = nr_get_code_rate_dl(sched_pdsch->mcs, current_BWP->mcsTableIdx);
|
||||
uint32_t tbs = nr_compute_tbs(Qm,
|
||||
@@ -643,7 +632,7 @@ void pf_dl(module_id_t module_id,
|
||||
0, /* N_PRB_DMRS * N_DMRS_SLOT */
|
||||
0 /* N_PRB_oh, 0 for initialBWP */,
|
||||
0 /* tb_scaling */,
|
||||
UE->layers) >> 3;
|
||||
sched_pdsch->nrOfLayers) >> 3;
|
||||
float coeff_ue = (float) tbs / UE->dl_thr_ue;
|
||||
LOG_D(NR_MAC,"UE %04x b %d, thr_ue %f, tbs %d, coeff_ue %f\n",
|
||||
UE->rnti, b, UE->dl_thr_ue, tbs, coeff_ue);
|
||||
@@ -732,21 +721,14 @@ void pf_dl(module_id_t module_id,
|
||||
sched_ctrl->aggregation_level);
|
||||
|
||||
/* MCS has been set above */
|
||||
const int tda = get_dl_tda(RC.nrmac[module_id], scc, slot);
|
||||
AssertFatal(tda>=0,"Unable to find PDSCH time domain allocation in list\n");
|
||||
NR_sched_pdsch_t *sched_pdsch = &sched_ctrl->sched_pdsch;
|
||||
NR_pdsch_semi_static_t *ps = &sched_ctrl->pdsch_semi_static;
|
||||
sched_pdsch->time_domain_allocation = get_dl_tda(RC.nrmac[module_id], scc, slot);
|
||||
AssertFatal(sched_pdsch->time_domain_allocation>=0,"Unable to find PDSCH time domain allocation in list\n");
|
||||
|
||||
if (ps->nrOfLayers != iterator->UE->layers || ps->time_domain_allocation != tda ) {
|
||||
nr_set_pdsch_semi_static(dl_bwp,
|
||||
scc,
|
||||
tda,
|
||||
iterator->UE->layers,
|
||||
sched_ctrl,
|
||||
ps);
|
||||
}
|
||||
sched_pdsch->tda_info = nr_get_pdsch_tda_info(dl_bwp, sched_pdsch->time_domain_allocation);
|
||||
NR_tda_info_t *tda_info = &sched_pdsch->tda_info;
|
||||
|
||||
const uint16_t slbitmap = SL_to_bitmap(ps->startSymbolIndex, ps->nrOfSymbols);
|
||||
const uint16_t slbitmap = SL_to_bitmap(tda_info->startSymbolIndex, tda_info->nrOfSymbols);
|
||||
|
||||
// Freq-demain allocation
|
||||
while (rbStart < bwpSize && (rballoc_mask[rbStart] & slbitmap) != slbitmap)
|
||||
@@ -757,6 +739,10 @@ void pf_dl(module_id_t module_id,
|
||||
while (rbStart + max_rbSize < bwpSize && (rballoc_mask[rbStart + max_rbSize] & slbitmap) == slbitmap)
|
||||
max_rbSize++;
|
||||
|
||||
sched_pdsch->dmrs_parms = get_dl_dmrs_params(scc,
|
||||
dl_bwp,
|
||||
tda_info,
|
||||
sched_pdsch->nrOfLayers);
|
||||
sched_pdsch->Qm = nr_get_Qm_dl(sched_pdsch->mcs, dl_bwp->mcsTableIdx);
|
||||
sched_pdsch->R = nr_get_code_rate_dl(sched_pdsch->mcs, dl_bwp->mcsTableIdx);
|
||||
sched_pdsch->pucch_allocation = alloc;
|
||||
@@ -770,9 +756,9 @@ void pf_dl(module_id_t module_id,
|
||||
//const int oh = 3 * sched_ctrl->dl_pdus_total + 2 * (frame == (sched_ctrl->ta_frame + 10) % 1024);
|
||||
nr_find_nb_rb(sched_pdsch->Qm,
|
||||
sched_pdsch->R,
|
||||
ps->nrOfLayers,
|
||||
ps->nrOfSymbols,
|
||||
ps->N_PRB_DMRS * ps->N_DMRS_SLOT,
|
||||
sched_pdsch->nrOfLayers,
|
||||
tda_info->nrOfSymbols,
|
||||
sched_pdsch->dmrs_parms.N_PRB_DMRS * sched_pdsch->dmrs_parms.N_DMRS_SLOT,
|
||||
sched_ctrl->num_total_bytes + oh,
|
||||
min_rbSize,
|
||||
max_rbSize,
|
||||
@@ -912,12 +898,9 @@ void nr_schedule_ue_spec(module_id_t module_id,
|
||||
continue;
|
||||
|
||||
const rnti_t rnti = UE->rnti;
|
||||
/* pre-computed PDSCH values that only change if time domain
|
||||
* allocation/DMRS parameters change. Updated in the preprocessor through
|
||||
* nr_set_pdsch_semi_static() */
|
||||
NR_pdsch_semi_static_t *ps = &sched_ctrl->pdsch_semi_static;
|
||||
|
||||
/* POST processing */
|
||||
const uint8_t nrOfLayers = ps->nrOfLayers;
|
||||
const uint8_t nrOfLayers = sched_pdsch->nrOfLayers;
|
||||
const uint16_t R = sched_pdsch->R;
|
||||
const uint8_t Qm = sched_pdsch->Qm;
|
||||
const uint32_t TBS = sched_pdsch->tb_size;
|
||||
@@ -941,6 +924,8 @@ void nr_schedule_ue_spec(module_id_t module_id,
|
||||
remove_nr_list(&sched_ctrl->retrans_dl_harq, current_harq_pid);
|
||||
}
|
||||
|
||||
NR_tda_info_t *tda_info = &sched_pdsch->tda_info;
|
||||
NR_pdsch_dmrs_t *dmrs_parms = &sched_pdsch->dmrs_parms;
|
||||
NR_UE_harq_t *harq = &sched_ctrl->harq_processes[current_harq_pid];
|
||||
DevAssert(!harq->is_waiting);
|
||||
add_tail_nr_list(&sched_ctrl->feedback_dl_harq, current_harq_pid);
|
||||
@@ -957,9 +942,9 @@ void nr_schedule_ue_spec(module_id_t module_id,
|
||||
sched_ctrl->aggregation_level,
|
||||
sched_pdsch->rbStart,
|
||||
sched_pdsch->rbSize,
|
||||
ps->startSymbolIndex,
|
||||
ps->nrOfSymbols,
|
||||
ps->dl_dmrs_symb_pos,
|
||||
tda_info->startSymbolIndex,
|
||||
tda_info->nrOfSymbols,
|
||||
dmrs_parms->dl_dmrs_symb_pos,
|
||||
sched_pdsch->mcs,
|
||||
nrOfLayers,
|
||||
TBS,
|
||||
@@ -1033,11 +1018,11 @@ void nr_schedule_ue_spec(module_id_t module_id,
|
||||
pdsch_pdu->transmissionScheme = 0;
|
||||
pdsch_pdu->refPoint = 0; // Point A
|
||||
// DMRS
|
||||
pdsch_pdu->dlDmrsSymbPos = ps->dl_dmrs_symb_pos;
|
||||
pdsch_pdu->dmrsConfigType = ps->dmrsConfigType;
|
||||
pdsch_pdu->dlDmrsSymbPos = dmrs_parms->dl_dmrs_symb_pos;
|
||||
pdsch_pdu->dmrsConfigType = dmrs_parms->dmrsConfigType;
|
||||
pdsch_pdu->dlDmrsScramblingId = *scc->physCellId;
|
||||
pdsch_pdu->SCID = 0;
|
||||
pdsch_pdu->numDmrsCdmGrpsNoData = ps->numDmrsCdmGrpsNoData;
|
||||
pdsch_pdu->numDmrsCdmGrpsNoData = dmrs_parms->numDmrsCdmGrpsNoData;
|
||||
pdsch_pdu->dmrsPorts = (1<<nrOfLayers)-1; // FIXME with a better implementation
|
||||
// Pdsch Allocation in frequency domain
|
||||
pdsch_pdu->resourceAlloc = 1;
|
||||
@@ -1045,20 +1030,11 @@ void nr_schedule_ue_spec(module_id_t module_id,
|
||||
pdsch_pdu->rbSize = sched_pdsch->rbSize;
|
||||
pdsch_pdu->VRBtoPRBMapping = 1; // non-interleaved, check if this is ok for initialBWP
|
||||
// Resource Allocation in time domain
|
||||
pdsch_pdu->StartSymbolIndex = ps->startSymbolIndex;
|
||||
pdsch_pdu->NrOfSymbols = ps->nrOfSymbols;
|
||||
pdsch_pdu->StartSymbolIndex = tda_info->startSymbolIndex;
|
||||
pdsch_pdu->NrOfSymbols = tda_info->nrOfSymbols;
|
||||
// Precoding
|
||||
if (sched_ctrl->set_pmi) {
|
||||
const int report_id = sched_ctrl->CSI_report.cri_ri_li_pmi_cqi_report.csi_report_id;
|
||||
nr_csi_report_t *csi_report = &UE->csi_report_template[report_id];
|
||||
pdsch_pdu->precodingAndBeamforming.prg_size = pdsch_pdu->rbSize;
|
||||
pdsch_pdu->precodingAndBeamforming.prgs_list[0].pm_idx = set_pm_index(sched_ctrl,
|
||||
nrOfLayers,
|
||||
csi_report->N1,
|
||||
csi_report->N2,
|
||||
gNB_mac->xp_pdsch_antenna_ports,
|
||||
csi_report->codebook_mode);
|
||||
}
|
||||
pdsch_pdu->precodingAndBeamforming.prg_size = pdsch_pdu->rbSize;
|
||||
pdsch_pdu->precodingAndBeamforming.prgs_list[0].pm_idx = sched_pdsch->pm_index;
|
||||
// TBS_LBRM according to section 5.4.2.1 of 38.212
|
||||
// TODO: verify the case where pdsch_servingcellconfig is NULL, in which case
|
||||
// in principle maxMIMO_layers should be given by the maximum number of layers
|
||||
@@ -1130,7 +1106,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
|
||||
pdsch_pdu->rbStart,
|
||||
pdsch_pdu->BWPSize);
|
||||
dci_payload.format_indicator = 1;
|
||||
dci_payload.time_domain_assignment.val = ps->time_domain_allocation;
|
||||
dci_payload.time_domain_assignment.val = sched_pdsch->time_domain_allocation;
|
||||
dci_payload.mcs = sched_pdsch->mcs;
|
||||
dci_payload.rv = pdsch_pdu->rvIndex[0];
|
||||
dci_payload.harq_pid = current_harq_pid;
|
||||
@@ -1139,7 +1115,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
|
||||
dci_payload.tpc = sched_ctrl->tpc1; // TPC for PUCCH: table 7.2.1-1 in 38.213
|
||||
dci_payload.pucch_resource_indicator = pucch->resource_indicator;
|
||||
dci_payload.pdsch_to_harq_feedback_timing_indicator.val = pucch->timing_indicator; // PDSCH to HARQ TI
|
||||
dci_payload.antenna_ports.val = ps->dmrs_ports_id;
|
||||
dci_payload.antenna_ports.val = dmrs_parms->dmrs_ports_id;
|
||||
dci_payload.dmrs_sequence_initialization.val = pdsch_pdu->SCID;
|
||||
LOG_D(NR_MAC,
|
||||
"%4d.%2d DCI type 1 payload: freq_alloc %d (%d,%d,%d), "
|
||||
@@ -1319,9 +1295,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
|
||||
harq->sched_pdsch = *sched_pdsch;
|
||||
/* save which time allocation has been used, to be used on
|
||||
* retransmissions */
|
||||
harq->sched_pdsch.time_domain_allocation = ps->time_domain_allocation;
|
||||
/* save nr of layers for retransmissions */
|
||||
harq->sched_pdsch.nrOfLayers = ps->nrOfLayers;
|
||||
harq->sched_pdsch.time_domain_allocation = sched_pdsch->time_domain_allocation;
|
||||
|
||||
// ta command is sent, values are reset
|
||||
if (sched_ctrl->ta_apply) {
|
||||
|
||||
@@ -179,8 +179,6 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP,
|
||||
}
|
||||
}
|
||||
|
||||
extern int getNrOfSymbols(NR_BWP_Downlink_t *bwp, int tda);
|
||||
extern uint8_t getN_PRB_DMRS(NR_BWP_Downlink_t *bwp, int numDmrsCdmGrpsNoData);
|
||||
uint32_t target_dl_mcs = 9;
|
||||
uint32_t target_dl_Nl = 1;
|
||||
uint32_t target_dl_bw = 50;
|
||||
@@ -199,10 +197,9 @@ void nr_preprocessor_phytest(module_id_t module_id,
|
||||
const int CC_id = 0;
|
||||
|
||||
const int tda = get_dl_tda(RC.nrmac[module_id], scc, slot);
|
||||
NR_pdsch_semi_static_t *ps = &sched_ctrl->pdsch_semi_static;
|
||||
ps->nrOfLayers = target_dl_Nl;
|
||||
if (ps->time_domain_allocation != tda || ps->nrOfLayers != target_dl_Nl)
|
||||
nr_set_pdsch_semi_static(dl_bwp, scc, tda, target_dl_Nl,sched_ctrl , ps);
|
||||
NR_tda_info_t tda_info = nr_get_pdsch_tda_info(dl_bwp, tda);
|
||||
sched_ctrl->sched_pdsch.tda_info = tda_info;
|
||||
sched_ctrl->sched_pdsch.time_domain_allocation = tda;
|
||||
|
||||
/* find largest unallocated chunk */
|
||||
const int bwpSize = dl_bwp->BWPSize;
|
||||
@@ -217,12 +214,12 @@ void nr_preprocessor_phytest(module_id_t module_id,
|
||||
while (true) {
|
||||
/* advance to first free RB */
|
||||
while (rbStart < bwpSize &&
|
||||
(vrb_map[rbStart + BWPStart]&SL_to_bitmap(ps->startSymbolIndex, ps->nrOfSymbols)))
|
||||
(vrb_map[rbStart + BWPStart]&SL_to_bitmap(tda_info.startSymbolIndex, tda_info.nrOfSymbols)))
|
||||
rbStart++;
|
||||
rbSize = 1;
|
||||
/* iterate until we are at target_dl_bw or no available RBs */
|
||||
while (rbStart + rbSize < bwpSize &&
|
||||
!(vrb_map[rbStart + rbSize + BWPStart]&SL_to_bitmap(ps->startSymbolIndex, ps->nrOfSymbols)) &&
|
||||
!(vrb_map[rbStart + rbSize + BWPStart]&SL_to_bitmap(tda_info.startSymbolIndex, tda_info.nrOfSymbols)) &&
|
||||
rbSize < target_dl_bw)
|
||||
rbSize++;
|
||||
/* found target_dl_bw? */
|
||||
@@ -308,18 +305,24 @@ void nr_preprocessor_phytest(module_id_t module_id,
|
||||
sched_pdsch->rbStart = rbStart;
|
||||
sched_pdsch->rbSize = rbSize;
|
||||
|
||||
sched_pdsch->dmrs_parms = get_dl_dmrs_params(scc,
|
||||
dl_bwp,
|
||||
&tda_info,
|
||||
target_dl_Nl);
|
||||
|
||||
sched_pdsch->mcs = target_dl_mcs;
|
||||
sched_pdsch->nrOfLayers = target_dl_Nl;
|
||||
sched_pdsch->Qm = nr_get_Qm_dl(sched_pdsch->mcs, dl_bwp->mcsTableIdx);
|
||||
sched_pdsch->R = nr_get_code_rate_dl(sched_pdsch->mcs, dl_bwp->mcsTableIdx);
|
||||
sched_ctrl->dl_bler_stats.mcs = target_dl_mcs; /* for logging output */
|
||||
sched_pdsch->tb_size = nr_compute_tbs(sched_pdsch->Qm,
|
||||
sched_pdsch->R,
|
||||
sched_pdsch->rbSize,
|
||||
ps->nrOfSymbols,
|
||||
ps->N_PRB_DMRS * ps->N_DMRS_SLOT,
|
||||
tda_info.nrOfSymbols,
|
||||
sched_pdsch->dmrs_parms.N_PRB_DMRS * sched_pdsch->dmrs_parms.N_DMRS_SLOT,
|
||||
0 /* N_PRB_oh, 0 for initialBWP */,
|
||||
0 /* tb_scaling */,
|
||||
ps->nrOfLayers)
|
||||
sched_pdsch->nrOfLayers)
|
||||
>> 3;
|
||||
|
||||
/* get the PID of a HARQ process awaiting retransmission, or -1 otherwise */
|
||||
@@ -327,7 +330,7 @@ void nr_preprocessor_phytest(module_id_t module_id,
|
||||
|
||||
/* mark the corresponding RBs as used */
|
||||
for (int rb = 0; rb < sched_pdsch->rbSize; rb++)
|
||||
vrb_map[rb + sched_pdsch->rbStart + BWPStart] = SL_to_bitmap(ps->startSymbolIndex, ps->nrOfSymbols);
|
||||
vrb_map[rb + sched_pdsch->rbStart + BWPStart] = SL_to_bitmap(tda_info.startSymbolIndex, tda_info.nrOfSymbols);
|
||||
|
||||
if ((frame&127) == 0) LOG_D(MAC,"phytest: %d.%d DL mcs %d, DL rbStart %d, DL rbSize %d\n", frame, slot, sched_pdsch->mcs, rbStart,rbSize);
|
||||
}
|
||||
@@ -378,14 +381,6 @@ bool nr_ul_preprocessor_phytest(module_id_t module_id, frame_t frame, sub_frame_
|
||||
if (!is_xlsch_in_slot(ulsch_slot_bitmap, sched_slot))
|
||||
return false;
|
||||
|
||||
/* we want to avoid a lengthy deduction of DMRS and other parameters in
|
||||
* every TTI if we can save it, so check whether TDA, or
|
||||
* num_dmrs_cdm_grps_no_data has changed and only then recompute */
|
||||
NR_pusch_semi_static_t *ps = &sched_ctrl->pusch_semi_static;
|
||||
if (ps->time_domain_allocation != tda
|
||||
|| ps->nrOfLayers != target_ul_Nl)
|
||||
nr_set_pusch_semi_static(ul_bwp, scc, tda, target_ul_Nl,ps);
|
||||
|
||||
uint16_t rbStart = 0;
|
||||
uint16_t rbSize;
|
||||
|
||||
@@ -397,10 +392,13 @@ bool nr_ul_preprocessor_phytest(module_id_t module_id, frame_t frame, sub_frame_
|
||||
else
|
||||
rbSize = target_ul_bw;
|
||||
|
||||
NR_tda_info_t tda_info = nr_get_pusch_tda_info(ul_bwp, tda);
|
||||
sched_ctrl->sched_pusch.tda_info = tda_info;
|
||||
|
||||
uint16_t *vrb_map_UL =
|
||||
&RC.nrmac[module_id]->common_channels[CC_id].vrb_map_UL[sched_slot * MAX_BWP_SIZE];
|
||||
for (int i = rbStart; i < rbStart + rbSize; ++i) {
|
||||
if ((vrb_map_UL[i+BWPStart] & SL_to_bitmap(ps->startSymbolIndex, ps->nrOfSymbols)) != 0) {
|
||||
if ((vrb_map_UL[i+BWPStart] & SL_to_bitmap(tda_info.startSymbolIndex, tda_info.nrOfSymbols)) != 0) {
|
||||
LOG_E(MAC,
|
||||
"%s(): %4d.%2d RB %d is already reserved, cannot schedule UE\n",
|
||||
__func__,
|
||||
@@ -452,7 +450,7 @@ bool nr_ul_preprocessor_phytest(module_id_t module_id, frame_t frame, sub_frame_
|
||||
sched_pusch->ul_harq_pid = sched_ctrl->retrans_ul_harq.head;
|
||||
|
||||
/* Calculate TBS from MCS */
|
||||
ps->nrOfLayers = target_ul_Nl;
|
||||
sched_pusch->nrOfLayers = target_ul_Nl;
|
||||
sched_pusch->R = nr_get_code_rate_ul(mcs, ul_bwp->mcs_table);
|
||||
sched_pusch->Qm = nr_get_Qm_ul(mcs, ul_bwp->mcs_table);
|
||||
if (ul_bwp->pusch_Config->tp_pi2BPSK
|
||||
@@ -460,14 +458,21 @@ bool nr_ul_preprocessor_phytest(module_id_t module_id, frame_t frame, sub_frame_
|
||||
sched_pusch->R >>= 1;
|
||||
sched_pusch->Qm <<= 1;
|
||||
}
|
||||
|
||||
NR_pusch_dmrs_t dmrs = get_ul_dmrs_params(scc,
|
||||
ul_bwp,
|
||||
&tda_info,
|
||||
sched_pusch->nrOfLayers);
|
||||
sched_ctrl->sched_pusch.dmrs_info = dmrs;
|
||||
|
||||
sched_pusch->tb_size = nr_compute_tbs(sched_pusch->Qm,
|
||||
sched_pusch->R,
|
||||
sched_pusch->rbSize,
|
||||
ps->nrOfSymbols,
|
||||
ps->N_PRB_DMRS * ps->num_dmrs_symb,
|
||||
tda_info.nrOfSymbols,
|
||||
dmrs.N_PRB_DMRS * dmrs.num_dmrs_symb,
|
||||
0, // nb_rb_oh
|
||||
0,
|
||||
ps->nrOfLayers /* NrOfLayers */)
|
||||
sched_pusch->nrOfLayers /* NrOfLayers */)
|
||||
>> 3;
|
||||
|
||||
/* mark the corresponding RBs as used */
|
||||
@@ -478,6 +483,6 @@ bool nr_ul_preprocessor_phytest(module_id_t module_id, frame_t frame, sub_frame_
|
||||
sched_ctrl->aggregation_level);
|
||||
|
||||
for (int rb = rbStart; rb < rbStart + rbSize; rb++)
|
||||
vrb_map_UL[rb+BWPStart] |= SL_to_bitmap(ps->startSymbolIndex, ps->nrOfSymbols);
|
||||
vrb_map_UL[rb+BWPStart] |= SL_to_bitmap(tda_info.startSymbolIndex, tda_info.nrOfSymbols);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -142,31 +142,39 @@ static inline uint8_t get_max_cces(uint8_t scs) {
|
||||
return (nr_max_number_of_cces_per_slot[scs]);
|
||||
}
|
||||
|
||||
uint8_t set_dl_nrOfLayers(NR_UE_sched_ctrl_t *sched_ctrl) {
|
||||
uint8_t get_dl_nrOfLayers(const NR_UE_sched_ctrl_t *sched_ctrl,
|
||||
const nr_dci_format_t dci_format) {
|
||||
|
||||
// TODO check this but it should be enough for now
|
||||
// if there is not csi report RI is 0 from initialization
|
||||
return (sched_ctrl->CSI_report.cri_ri_li_pmi_cqi_report.ri + 1);
|
||||
// if there is not csi report activated RI is 0 from initialization
|
||||
if(dci_format == NR_DL_DCI_FORMAT_1_0)
|
||||
return 1;
|
||||
else
|
||||
return (sched_ctrl->CSI_report.cri_ri_li_pmi_cqi_report.ri + 1);
|
||||
|
||||
}
|
||||
|
||||
uint16_t set_pm_index(NR_UE_sched_ctrl_t *sched_ctrl,
|
||||
uint16_t get_pm_index(const NR_UE_info_t *UE,
|
||||
int layers,
|
||||
int N1, int N2,
|
||||
int xp_pdsch_antenna_ports,
|
||||
int codebook_mode) {
|
||||
int xp_pdsch_antenna_ports) {
|
||||
|
||||
if (layers == 1) return 0;
|
||||
|
||||
const NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl;
|
||||
const int report_id = sched_ctrl->CSI_report.cri_ri_li_pmi_cqi_report.csi_report_id;
|
||||
const nr_csi_report_t *csi_report = &UE->csi_report_template[report_id];
|
||||
const int N1 = csi_report->N1;
|
||||
const int N2 = csi_report->N2;
|
||||
const int antenna_ports = (N1*N2)<<1;
|
||||
|
||||
int antenna_ports = (N1*N2)<<1;
|
||||
if (xp_pdsch_antenna_ports == 1 &&
|
||||
antenna_ports>1)
|
||||
return 0; //identity matrix (basic 5G configuration handled by PMI report is with XP antennas)
|
||||
|
||||
int x1 = sched_ctrl->CSI_report.cri_ri_li_pmi_cqi_report.pmi_x1;
|
||||
int x2 = sched_ctrl->CSI_report.cri_ri_li_pmi_cqi_report.pmi_x2;
|
||||
const int x1 = sched_ctrl->CSI_report.cri_ri_li_pmi_cqi_report.pmi_x1;
|
||||
const int x2 = sched_ctrl->CSI_report.cri_ri_li_pmi_cqi_report.pmi_x2;
|
||||
LOG_D(NR_MAC,"PMI report: x1 %d x2 %d\n",x1,x2);
|
||||
|
||||
sched_ctrl->set_pmi = false;
|
||||
|
||||
if (antenna_ports == 2)
|
||||
return x2;
|
||||
else
|
||||
@@ -214,41 +222,68 @@ uint8_t get_mcs_from_cqi(int mcs_table, int cqi_table, int cqi_idx)
|
||||
return 9;
|
||||
}
|
||||
|
||||
NR_pdsch_dmrs_t get_dl_dmrs_params(const NR_ServingCellConfigCommon_t *scc,
|
||||
const NR_UE_DL_BWP_t *dl_bwp,
|
||||
const NR_tda_info_t *tda_info,
|
||||
const int Layers) {
|
||||
|
||||
void set_dl_dmrs_ports(NR_pdsch_semi_static_t *ps) {
|
||||
|
||||
//TODO first basic implementation of dmrs port selection
|
||||
// only vaild for a single codeword
|
||||
// for now it assumes a selection of Nl consecutive dmrs ports
|
||||
// and a single front loaded symbol
|
||||
// dmrs_ports_id is the index of Tables 7.3.1.2.2-1/2/3/4
|
||||
// number of front loaded symbols need to be consistent with maxLength
|
||||
// when a more complete implementation is done
|
||||
|
||||
switch (ps->nrOfLayers) {
|
||||
case 1:
|
||||
ps->dmrs_ports_id = 0;
|
||||
ps->numDmrsCdmGrpsNoData = 1;
|
||||
ps->frontloaded_symb = 1;
|
||||
break;
|
||||
case 2:
|
||||
ps->dmrs_ports_id = 2;
|
||||
ps->numDmrsCdmGrpsNoData = 1;
|
||||
ps->frontloaded_symb = 1;
|
||||
break;
|
||||
case 3:
|
||||
ps->dmrs_ports_id = 9;
|
||||
ps->numDmrsCdmGrpsNoData = 2;
|
||||
ps->frontloaded_symb = 1;
|
||||
break;
|
||||
case 4:
|
||||
ps->dmrs_ports_id = 10;
|
||||
ps->numDmrsCdmGrpsNoData = 2;
|
||||
ps->frontloaded_symb = 1;
|
||||
break;
|
||||
default:
|
||||
AssertFatal(1==0,"Number of layers %d\n not supported or not valid\n",ps->nrOfLayers);
|
||||
NR_pdsch_dmrs_t dmrs = {0};
|
||||
int frontloaded_symb = 1; // default value
|
||||
nr_dci_format_t dci_format = dl_bwp ? dl_bwp->dci_format : NR_DL_DCI_FORMAT_1_0;
|
||||
if (dci_format == NR_DL_DCI_FORMAT_1_0) {
|
||||
dmrs.numDmrsCdmGrpsNoData = tda_info->nrOfSymbols == 2 ? 1 : 2;
|
||||
dmrs.dmrs_ports_id = 0;
|
||||
}
|
||||
else {
|
||||
//TODO first basic implementation of dmrs port selection
|
||||
// only vaild for a single codeword
|
||||
// for now it assumes a selection of Nl consecutive dmrs ports
|
||||
// and a single front loaded symbol
|
||||
// dmrs_ports_id is the index of Tables 7.3.1.2.2-1/2/3/4
|
||||
// number of front loaded symbols need to be consistent with maxLength
|
||||
// when a more complete implementation is done
|
||||
|
||||
switch (Layers) {
|
||||
case 1:
|
||||
dmrs.dmrs_ports_id = 0;
|
||||
dmrs.numDmrsCdmGrpsNoData = 1;
|
||||
frontloaded_symb = 1;
|
||||
break;
|
||||
case 2:
|
||||
dmrs.dmrs_ports_id = 2;
|
||||
dmrs.numDmrsCdmGrpsNoData = 1;
|
||||
frontloaded_symb = 1;
|
||||
break;
|
||||
case 3:
|
||||
dmrs.dmrs_ports_id = 9;
|
||||
dmrs.numDmrsCdmGrpsNoData = 2;
|
||||
frontloaded_symb = 1;
|
||||
break;
|
||||
case 4:
|
||||
dmrs.dmrs_ports_id = 10;
|
||||
dmrs.numDmrsCdmGrpsNoData = 2;
|
||||
frontloaded_symb = 1;
|
||||
break;
|
||||
default:
|
||||
AssertFatal(1==0,"Number of layers %d\n not supported or not valid\n",Layers);
|
||||
}
|
||||
}
|
||||
|
||||
NR_PDSCH_Config_t *pdsch_Config = dl_bwp ? dl_bwp->pdsch_Config : NULL;
|
||||
if (pdsch_Config) {
|
||||
if (tda_info->mapping_type == typeB)
|
||||
dmrs.dmrsConfigType = pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeB->choice.setup->dmrs_Type != NULL;
|
||||
else
|
||||
dmrs.dmrsConfigType = pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type != NULL;
|
||||
}
|
||||
else
|
||||
dmrs.dmrsConfigType = NFAPI_NR_DMRS_TYPE1;
|
||||
|
||||
dmrs.N_PRB_DMRS = dmrs.numDmrsCdmGrpsNoData * (dmrs.dmrsConfigType == NFAPI_NR_DMRS_TYPE1 ? 6 : 4);
|
||||
dmrs.dl_dmrs_symb_pos = fill_dmrs_mask(pdsch_Config, scc->dmrs_TypeA_Position, tda_info->nrOfSymbols, tda_info->startSymbolIndex, tda_info->mapping_type, frontloaded_symb);
|
||||
dmrs.N_DMRS_SLOT = get_num_dmrs(dmrs.dl_dmrs_symb_pos);
|
||||
LOG_D(NR_MAC,"Filling dmrs info, ps->N_PRB_DMRS %d, ps->dl_dmrs_symb_pos %x, ps->N_DMRS_SLOT %d\n",dmrs.N_PRB_DMRS,dmrs.dl_dmrs_symb_pos,dmrs.N_DMRS_SLOT);
|
||||
return dmrs;
|
||||
}
|
||||
|
||||
NR_ControlResourceSet_t *get_coreset(gNB_MAC_INST *nrmac,
|
||||
@@ -514,109 +549,70 @@ bool nr_find_nb_rb(uint16_t Qm,
|
||||
return *tbs >= bytes && *nb_rb <= nb_rb_max;
|
||||
}
|
||||
|
||||
void nr_set_pdsch_semi_static(const NR_UE_DL_BWP_t *dl_bwp,
|
||||
const NR_ServingCellConfigCommon_t *scc,
|
||||
int tda,
|
||||
uint8_t layers,
|
||||
NR_UE_sched_ctrl_t *sched_ctrl,
|
||||
NR_pdsch_semi_static_t *ps)
|
||||
{
|
||||
bool reset_dmrs = false;
|
||||
NR_tda_info_t nr_get_pdsch_tda_info(const NR_UE_DL_BWP_t *dl_bwp,
|
||||
const int tda) {
|
||||
|
||||
NR_PDSCH_Config_t *pdsch_Config = dl_bwp->pdsch_Config;
|
||||
LOG_D(NR_MAC,"tda %d, ps->time_domain_allocation %d,layers %d, ps->nrOfLayers %d, pdsch_config %p\n",tda,ps->time_domain_allocation,layers,ps->nrOfLayers,pdsch_Config);
|
||||
reset_dmrs = true;
|
||||
ps->time_domain_allocation = tda;
|
||||
NR_tda_info_t tda_info = {0};
|
||||
NR_PDSCH_TimeDomainResourceAllocationList_t *tdaList = dl_bwp->tdaList;
|
||||
AssertFatal(tda < tdaList->list.count, "time_domain_allocation %d>=%d\n", tda, tdaList->list.count);
|
||||
ps->mapping_type = tdaList->list.array[tda]->mappingType;
|
||||
if (pdsch_Config) {
|
||||
if (ps->mapping_type == NR_PDSCH_TimeDomainResourceAllocation__mappingType_typeB)
|
||||
ps->dmrsConfigType = pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeB->choice.setup->dmrs_Type != NULL;
|
||||
else
|
||||
ps->dmrsConfigType = pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type != NULL;
|
||||
}
|
||||
else
|
||||
ps->dmrsConfigType = NFAPI_NR_DMRS_TYPE1;
|
||||
tda_info.mapping_type = tdaList->list.array[tda]->mappingType;
|
||||
const int startSymbolAndLength = tdaList->list.array[tda]->startSymbolAndLength;
|
||||
SLIV2SL(startSymbolAndLength, &ps->startSymbolIndex, &ps->nrOfSymbols);
|
||||
|
||||
if (dl_bwp->dci_format == NR_DL_DCI_FORMAT_1_0) {
|
||||
if (ps->nrOfSymbols == 2)
|
||||
ps->numDmrsCdmGrpsNoData = 1;
|
||||
else
|
||||
ps->numDmrsCdmGrpsNoData = 2;
|
||||
ps->dmrs_ports_id = 0;
|
||||
ps->frontloaded_symb = 1;
|
||||
ps->nrOfLayers = 1;
|
||||
}
|
||||
else {
|
||||
LOG_D(NR_MAC,"checking layers\n");
|
||||
if (ps->nrOfLayers != layers || ps->numDmrsCdmGrpsNoData == 0) {
|
||||
reset_dmrs = true;
|
||||
ps->nrOfLayers = layers;
|
||||
set_dl_dmrs_ports(ps);
|
||||
}
|
||||
}
|
||||
|
||||
ps->N_PRB_DMRS = ps->numDmrsCdmGrpsNoData * (ps->dmrsConfigType == NFAPI_NR_DMRS_TYPE1 ? 6 : 4);
|
||||
|
||||
if (reset_dmrs) {
|
||||
ps->dl_dmrs_symb_pos = fill_dmrs_mask(pdsch_Config, scc ? scc->dmrs_TypeA_Position : 0, ps->nrOfSymbols, ps->startSymbolIndex, ps->mapping_type, ps->frontloaded_symb);
|
||||
ps->N_DMRS_SLOT = get_num_dmrs(ps->dl_dmrs_symb_pos);
|
||||
}
|
||||
LOG_D(NR_MAC,"Filling dmrs info, ps->N_PRB_DMRS %d, ps->dl_dmrs_symb_pos %x, ps->N_DMRS_SLOT %d\n",ps->N_PRB_DMRS,ps->dl_dmrs_symb_pos,ps->N_DMRS_SLOT);
|
||||
SLIV2SL(startSymbolAndLength, &tda_info.startSymbolIndex, &tda_info.nrOfSymbols);
|
||||
return tda_info;
|
||||
}
|
||||
|
||||
void nr_set_pusch_semi_static(const NR_UE_UL_BWP_t *ul_bwp,
|
||||
const NR_ServingCellConfigCommon_t *scc,
|
||||
int tda,
|
||||
uint8_t nrOfLayers,
|
||||
NR_pusch_semi_static_t *ps) {
|
||||
NR_tda_info_t nr_get_pusch_tda_info(const NR_UE_UL_BWP_t *ul_bwp,
|
||||
const int tda) {
|
||||
|
||||
ps->time_domain_allocation = tda;
|
||||
NR_tda_info_t tda_info = {0};
|
||||
NR_PUSCH_TimeDomainResourceAllocationList_t *tdaList = ul_bwp->tdaList;
|
||||
AssertFatal(tda < tdaList->list.count, "time_domain_allocation %d>=%d\n", tda, tdaList->list.count);
|
||||
tda_info.mapping_type = tdaList->list.array[tda]->mappingType;
|
||||
const int startSymbolAndLength = tdaList->list.array[tda]->startSymbolAndLength;
|
||||
SLIV2SL(startSymbolAndLength, &tda_info.startSymbolIndex, &tda_info.nrOfSymbols);
|
||||
return tda_info;
|
||||
}
|
||||
|
||||
const int startSymbolAndLength = ul_bwp->tdaList->list.array[tda]->startSymbolAndLength;
|
||||
SLIV2SL(startSymbolAndLength,
|
||||
&ps->startSymbolIndex,
|
||||
&ps->nrOfSymbols);
|
||||
NR_pusch_dmrs_t get_ul_dmrs_params(const NR_ServingCellConfigCommon_t *scc,
|
||||
const NR_UE_UL_BWP_t *ul_bwp,
|
||||
const NR_tda_info_t *tda_info,
|
||||
const int Layers) {
|
||||
|
||||
ps->nrOfLayers = nrOfLayers;
|
||||
NR_pusch_dmrs_t dmrs = {0};
|
||||
// TODO setting of cdm groups with no data to be redone for MIMO
|
||||
if (ul_bwp->transform_precoding || nrOfLayers<3)
|
||||
ps->num_dmrs_cdm_grps_no_data = (ul_bwp->dci_format == NR_UL_DCI_FORMAT_0_1) ? 1 : (ps->nrOfSymbols == 2 ? 1 : 2);
|
||||
if (ul_bwp->transform_precoding || Layers<3)
|
||||
dmrs.num_dmrs_cdm_grps_no_data = ul_bwp->dci_format == NR_UL_DCI_FORMAT_0_1 || tda_info->nrOfSymbols == 2 ? 1 : 2;
|
||||
else
|
||||
ps->num_dmrs_cdm_grps_no_data = 2;
|
||||
dmrs.num_dmrs_cdm_grps_no_data = 2;
|
||||
|
||||
NR_DMRS_UplinkConfig_t *NR_DMRS_UplinkConfig = ul_bwp->pusch_Config ?
|
||||
(tda_info->mapping_type == typeA ?
|
||||
ul_bwp->pusch_Config->dmrs_UplinkForPUSCH_MappingTypeA->choice.setup :
|
||||
ul_bwp->pusch_Config->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup) : NULL;
|
||||
|
||||
dmrs.dmrs_config_type = NR_DMRS_UplinkConfig && NR_DMRS_UplinkConfig->dmrs_Type ? 1 : 0;
|
||||
|
||||
const pusch_dmrs_AdditionalPosition_t additional_pos = (NR_DMRS_UplinkConfig && NR_DMRS_UplinkConfig->dmrs_AdditionalPosition) ?
|
||||
(*NR_DMRS_UplinkConfig->dmrs_AdditionalPosition ==
|
||||
NR_DMRS_UplinkConfig__dmrs_AdditionalPosition_pos3 ?
|
||||
3 : *NR_DMRS_UplinkConfig->dmrs_AdditionalPosition) : 2;
|
||||
|
||||
const pusch_maxLength_t pusch_maxLength = NR_DMRS_UplinkConfig ? (NR_DMRS_UplinkConfig->maxLength == NULL ? 1 : 2) : 1;
|
||||
dmrs.ul_dmrs_symb_pos = get_l_prime(tda_info->nrOfSymbols,
|
||||
tda_info->mapping_type,
|
||||
additional_pos,
|
||||
pusch_maxLength,
|
||||
tda_info->startSymbolIndex,
|
||||
scc->dmrs_TypeA_Position);
|
||||
|
||||
/* DMRS calculations */
|
||||
ps->mapping_type = ul_bwp->tdaList->list.array[tda]->mappingType;
|
||||
ps->NR_DMRS_UplinkConfig = ul_bwp->pusch_Config ?
|
||||
(ps->mapping_type == NR_PUSCH_TimeDomainResourceAllocation__mappingType_typeA ?
|
||||
ul_bwp->pusch_Config->dmrs_UplinkForPUSCH_MappingTypeA->choice.setup :
|
||||
ul_bwp->pusch_Config->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup) : NULL;
|
||||
ps->dmrs_config_type = ps->NR_DMRS_UplinkConfig ? ((ps->NR_DMRS_UplinkConfig->dmrs_Type == NULL ? 0 : 1)) : 0;
|
||||
const pusch_dmrs_AdditionalPosition_t additional_pos =
|
||||
ps->NR_DMRS_UplinkConfig ? (ps->NR_DMRS_UplinkConfig->dmrs_AdditionalPosition == NULL
|
||||
? 2
|
||||
: (*ps->NR_DMRS_UplinkConfig->dmrs_AdditionalPosition ==
|
||||
NR_DMRS_UplinkConfig__dmrs_AdditionalPosition_pos3
|
||||
? 3
|
||||
: *ps->NR_DMRS_UplinkConfig->dmrs_AdditionalPosition)):2;
|
||||
const pusch_maxLength_t pusch_maxLength =
|
||||
ps->NR_DMRS_UplinkConfig ? (ps->NR_DMRS_UplinkConfig->maxLength == NULL ? 1 : 2) : 1;
|
||||
ps->ul_dmrs_symb_pos = get_l_prime(ps->nrOfSymbols,
|
||||
ps->mapping_type,
|
||||
additional_pos,
|
||||
pusch_maxLength,
|
||||
ps->startSymbolIndex,
|
||||
scc->dmrs_TypeA_Position);
|
||||
uint8_t num_dmrs_symb = 0;
|
||||
for(int i = ps->startSymbolIndex; i < ps->startSymbolIndex + ps->nrOfSymbols; i++)
|
||||
num_dmrs_symb += (ps->ul_dmrs_symb_pos >> i) & 1;
|
||||
ps->num_dmrs_symb = num_dmrs_symb;
|
||||
ps->N_PRB_DMRS = ps->dmrs_config_type == 0
|
||||
? ps->num_dmrs_cdm_grps_no_data * 6
|
||||
: ps->num_dmrs_cdm_grps_no_data * 4;
|
||||
for(int i = tda_info->startSymbolIndex; i < tda_info->startSymbolIndex + tda_info->nrOfSymbols; i++)
|
||||
num_dmrs_symb += (dmrs.ul_dmrs_symb_pos >> i) & 1;
|
||||
dmrs.num_dmrs_symb = num_dmrs_symb;
|
||||
dmrs.N_PRB_DMRS = dmrs.num_dmrs_cdm_grps_no_data * (dmrs.dmrs_config_type == 0 ? 6 : 4);
|
||||
|
||||
dmrs.NR_DMRS_UplinkConfig = NR_DMRS_UplinkConfig;
|
||||
return dmrs;
|
||||
}
|
||||
|
||||
#define BLER_UPDATE_FRAME 10
|
||||
@@ -2509,8 +2505,8 @@ NR_UE_info_t *add_new_nr_ue(gNB_MAC_INST *nr_mac, rnti_t rntiP, NR_CellGroupConf
|
||||
configure_UE_BWP(nr_mac, scc, sched_ctrl, NULL, UE);
|
||||
|
||||
/* set illegal time domain allocation to force recomputation of all fields */
|
||||
sched_ctrl->pdsch_semi_static.time_domain_allocation = -1;
|
||||
sched_ctrl->pusch_semi_static.time_domain_allocation = -1;
|
||||
sched_ctrl->sched_pdsch.time_domain_allocation = -1;
|
||||
sched_ctrl->sched_pusch.time_domain_allocation = -1;
|
||||
|
||||
/* Set default BWPs */
|
||||
sched_ctrl->next_dl_bwp_id = -1;
|
||||
@@ -2969,28 +2965,6 @@ void nr_mac_update_timers(module_id_t module_id,
|
||||
// add all available DL HARQ processes for this UE in SA
|
||||
create_dl_harq_list(sched_ctrl, UE->current_DL_BWP.pdsch_servingcellconfig);
|
||||
}
|
||||
|
||||
NR_pdsch_semi_static_t *ps = &sched_ctrl->pdsch_semi_static;
|
||||
const uint8_t layers = set_dl_nrOfLayers(sched_ctrl);
|
||||
const int tda = get_dl_tda(RC.nrmac[module_id], scc, slot);
|
||||
|
||||
nr_set_pdsch_semi_static(&UE->current_DL_BWP,
|
||||
scc,
|
||||
tda,
|
||||
layers,
|
||||
sched_ctrl,
|
||||
ps);
|
||||
|
||||
|
||||
NR_pusch_semi_static_t *ups = &sched_ctrl->pusch_semi_static;
|
||||
const uint8_t nrOfLayers = 1;
|
||||
const int utda = get_ul_tda(RC.nrmac[module_id], scc, slot);
|
||||
|
||||
nr_set_pusch_semi_static(&UE->current_UL_BWP,
|
||||
scc,
|
||||
utda,
|
||||
nrOfLayers,
|
||||
ups);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -707,7 +707,6 @@ uint8_t evaluate_pmi_report(uint8_t *payload,
|
||||
sched_ctrl->CSI_report.cri_ri_li_pmi_cqi_report.pmi_x1,
|
||||
sched_ctrl->CSI_report.cri_ri_li_pmi_cqi_report.pmi_x2);
|
||||
|
||||
sched_ctrl->set_pmi = true;
|
||||
return tot_bitlen;
|
||||
|
||||
}
|
||||
|
||||
@@ -53,30 +53,28 @@ const int get_ul_tda(const gNB_MAC_INST *nrmac, const NR_ServingCellConfigCommon
|
||||
return 0; // if FDD or not mixed slot in TDD, for now use default TDA (TODO handle CSI-RS slots)
|
||||
}
|
||||
|
||||
int compute_bw_factor(int mu, int rb) {
|
||||
// 38.213 7.1.1
|
||||
return (10 * log10(rb << mu));
|
||||
}
|
||||
|
||||
int compute_delta_tf(int tbs_bits,
|
||||
int rb,
|
||||
int n_layers,
|
||||
int n_symbols,
|
||||
int n_dmrs,
|
||||
long *deltaMCS) {
|
||||
int compute_ph_factor(int mu,
|
||||
int tbs_bits,
|
||||
int rb,
|
||||
int n_layers,
|
||||
int n_symbols,
|
||||
int n_dmrs,
|
||||
long *deltaMCS) {
|
||||
|
||||
// 38.213 7.1.1
|
||||
// if the PUSCH transmission is over more than one layer delta_tf = 0
|
||||
if(deltaMCS == NULL || n_layers>1)
|
||||
return 0;
|
||||
else
|
||||
AssertFatal(1==0,"Compute DeltaTF not yet fully supported\n");
|
||||
int delta_tf = 0;
|
||||
if(deltaMCS != NULL && n_layers == 1) {
|
||||
const int n_re = (NR_NB_SC_PER_RB * n_symbols - n_dmrs) * rb;
|
||||
const int BPRE = tbs_bits/n_re; //TODO change for PUSCH with CSI
|
||||
const float f = pow(2, (float) BPRE * 1.25);
|
||||
const float beta = 1.0f; //TODO change for PUSCH with CSI
|
||||
delta_tf = (10 * log10((f - 1) * beta));
|
||||
}
|
||||
|
||||
const int n_re = (NR_NB_SC_PER_RB * n_symbols - n_dmrs) * rb;
|
||||
const int BPRE = tbs_bits/n_re; //TODO change for PUSCH with CSI
|
||||
const float f = pow(2, (float) BPRE * 1.25);
|
||||
const float beta = 1.0f; //TODO change for PUSCH with CSI
|
||||
return(10 * log10((f - 1) * beta));
|
||||
const int bw_factor = 10 * log10(rb << mu);
|
||||
|
||||
return (delta_tf + bw_factor);
|
||||
}
|
||||
|
||||
// For both UL-SCH except:
|
||||
@@ -114,7 +112,6 @@ int nr_process_mac_pdu(instance_t module_idP,
|
||||
{
|
||||
|
||||
uint8_t done = 0;
|
||||
|
||||
int sdus = 0;
|
||||
NR_UE_UL_BWP_t *ul_bwp = &UE->current_UL_BWP;
|
||||
NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl;
|
||||
@@ -247,13 +244,13 @@ int nr_process_mac_pdu(instance_t module_idP,
|
||||
// in sched_ctrl we set normalized PH wrt MCS and PRBs
|
||||
long *deltaMCS = ul_bwp->pusch_Config ? ul_bwp->pusch_Config->pusch_PowerControl->deltaMCS : NULL;
|
||||
sched_ctrl->ph = PH +
|
||||
compute_bw_factor(sched_pusch->mu, sched_pusch->rbSize) +
|
||||
compute_delta_tf(sched_pusch->tb_size<<3,
|
||||
sched_pusch->rbSize,
|
||||
0, //n_layers
|
||||
0, //n_symbols
|
||||
0, //n_dmrs
|
||||
deltaMCS);
|
||||
compute_ph_factor(sched_pusch->mu,
|
||||
sched_pusch->tb_size<<3,
|
||||
sched_pusch->rbSize,
|
||||
sched_pusch->nrOfLayers,
|
||||
sched_pusch->tda_info.nrOfSymbols, //n_symbols
|
||||
sched_pusch->dmrs_info.num_dmrs_symb*sched_pusch->dmrs_info.N_PRB_DMRS, //n_dmrs
|
||||
deltaMCS);
|
||||
/* 38.133 Table10.1.18.1-1 */
|
||||
sched_ctrl->pcmax = PCMAX - 29;
|
||||
LOG_D(NR_MAC, "SINGLE ENTRY PHR R1 %d PH %d (%d dB) R2 %d PCMAX %d (%d dBm)\n",
|
||||
@@ -263,6 +260,7 @@ int nr_process_mac_pdu(instance_t module_idP,
|
||||
case UL_SCH_LCID_MULTI_ENTRY_PHR_1_OCT:
|
||||
//38.321 section 6.1.3.9
|
||||
// varialbe length
|
||||
AssertFatal(1==0,"Multi entry PHR not supported\n");
|
||||
if (!get_mac_len(pduP, pdu_len, &mac_len, &mac_subheader_len))
|
||||
return 0;
|
||||
/* Extract MULTI ENTRY PHR elements from single octet bitmap for PHR calculation */
|
||||
@@ -271,6 +269,7 @@ int nr_process_mac_pdu(instance_t module_idP,
|
||||
case UL_SCH_LCID_MULTI_ENTRY_PHR_4_OCT:
|
||||
//38.321 section 6.1.3.9
|
||||
// varialbe length
|
||||
AssertFatal(1==0,"Multi entry PHR not supported\n");
|
||||
if (!get_mac_len(pduP, pdu_len, &mac_len, &mac_subheader_len))
|
||||
return 0;
|
||||
/* Extract MULTI ENTRY PHR elements from four octets bitmap for PHR calculation */
|
||||
@@ -1310,8 +1309,7 @@ void update_ul_ue_R_Qm(int mcs, int mcs_table, const NR_PUSCH_Config_t *pusch_Co
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void nr_ue_max_mcs_min_rb(int mu, int ph_limit, NR_pusch_semi_static_t *ps, NR_UE_UL_BWP_t *ul_bwp, uint16_t minRb, uint32_t tbs, uint16_t *Rb, uint8_t *mcs)
|
||||
void nr_ue_max_mcs_min_rb(int mu, int ph_limit, NR_sched_pusch_t *sched_pusch, NR_UE_UL_BWP_t *ul_bwp, uint16_t minRb, uint32_t tbs, uint16_t *Rb, uint8_t *mcs)
|
||||
{
|
||||
AssertFatal(*Rb >= minRb, "illegal Rb %d < minRb %d\n", *Rb, minRb);
|
||||
AssertFatal(*mcs >= 0 && *mcs <= 28, "illegal MCS %d\n", *mcs);
|
||||
@@ -1322,35 +1320,35 @@ void nr_ue_max_mcs_min_rb(int mu, int ph_limit, NR_pusch_semi_static_t *ps, NR_U
|
||||
update_ul_ue_R_Qm(*mcs, ul_bwp->mcs_table, ul_bwp->pusch_Config, &R, &Qm);
|
||||
|
||||
long *deltaMCS = ul_bwp->pusch_Config ? ul_bwp->pusch_Config->pusch_PowerControl->deltaMCS : NULL;
|
||||
int tx_power = compute_bw_factor(mu, *Rb) +
|
||||
compute_delta_tf(tbs_bits,
|
||||
*Rb,
|
||||
ps->nrOfLayers,
|
||||
ps->nrOfSymbols,
|
||||
ps->N_PRB_DMRS*ps->num_dmrs_symb,
|
||||
deltaMCS);
|
||||
int tx_power = compute_ph_factor(mu,
|
||||
tbs_bits,
|
||||
*Rb,
|
||||
sched_pusch->nrOfLayers,
|
||||
sched_pusch->tda_info.nrOfSymbols,
|
||||
sched_pusch->dmrs_info.N_PRB_DMRS*sched_pusch->dmrs_info.num_dmrs_symb,
|
||||
deltaMCS);
|
||||
|
||||
while (ph_limit < tx_power && *Rb >= minRb) {
|
||||
(*Rb)--;
|
||||
tx_power = compute_bw_factor(mu, *Rb) +
|
||||
compute_delta_tf(tbs_bits,
|
||||
*Rb,
|
||||
ps->nrOfLayers,
|
||||
ps->nrOfSymbols,
|
||||
ps->N_PRB_DMRS*ps->num_dmrs_symb,
|
||||
deltaMCS);
|
||||
tx_power = compute_ph_factor(mu,
|
||||
tbs_bits,
|
||||
*Rb,
|
||||
sched_pusch->nrOfLayers,
|
||||
sched_pusch->tda_info.nrOfSymbols,
|
||||
sched_pusch->dmrs_info.N_PRB_DMRS*sched_pusch->dmrs_info.num_dmrs_symb,
|
||||
deltaMCS);
|
||||
}
|
||||
|
||||
while (ph_limit < tx_power && *mcs > 6) {
|
||||
(*mcs)--;
|
||||
update_ul_ue_R_Qm(*mcs, ul_bwp->mcs_table, ul_bwp->pusch_Config, &R, &Qm);
|
||||
tx_power = compute_bw_factor(mu, *Rb) +
|
||||
compute_delta_tf(tbs_bits,
|
||||
*Rb,
|
||||
ps->nrOfLayers,
|
||||
ps->nrOfSymbols,
|
||||
ps->N_PRB_DMRS*ps->num_dmrs_symb,
|
||||
deltaMCS);
|
||||
tx_power = compute_ph_factor(mu,
|
||||
tbs_bits,
|
||||
*Rb,
|
||||
sched_pusch->nrOfLayers,
|
||||
sched_pusch->tda_info.nrOfSymbols,
|
||||
sched_pusch->dmrs_info.N_PRB_DMRS*sched_pusch->dmrs_info.num_dmrs_symb,
|
||||
deltaMCS);
|
||||
}
|
||||
|
||||
if (ph_limit < tx_power)
|
||||
@@ -1378,22 +1376,11 @@ static bool allocate_ul_retransmission(gNB_MAC_INST *nrmac,
|
||||
const uint8_t nrOfLayers = 1;
|
||||
LOG_D(NR_MAC,"retInfo->time_domain_allocation = %d, tda = %d\n", retInfo->time_domain_allocation, tda);
|
||||
LOG_D(NR_MAC,"tbs %d\n",retInfo->tb_size);
|
||||
if (tda == retInfo->time_domain_allocation) {
|
||||
/* check whether we need to switch the TDA allocation since tha last
|
||||
* (re-)transmission */
|
||||
NR_pusch_semi_static_t *ps = &sched_ctrl->pusch_semi_static;
|
||||
|
||||
if (ps->time_domain_allocation != tda
|
||||
|| ps->nrOfLayers != nrOfLayers) {
|
||||
nr_set_pusch_semi_static(&UE->current_UL_BWP,
|
||||
scc,
|
||||
tda,
|
||||
nrOfLayers,
|
||||
ps);
|
||||
}
|
||||
if (tda == retInfo->time_domain_allocation &&
|
||||
nrOfLayers == retInfo->nrOfLayers) {
|
||||
|
||||
/* Check the resource is enough for retransmission */
|
||||
const uint16_t slbitmap = SL_to_bitmap(ps->startSymbolIndex, ps->nrOfSymbols);
|
||||
const uint16_t slbitmap = SL_to_bitmap(retInfo->tda_info.startSymbolIndex, retInfo->tda_info.nrOfSymbols);
|
||||
while (rbStart < bwpSize && (rballoc_mask[rbStart] & slbitmap) != slbitmap)
|
||||
rbStart++;
|
||||
if (rbStart + retInfo->rbSize > bwpSize) {
|
||||
@@ -1402,15 +1389,15 @@ static bool allocate_ul_retransmission(gNB_MAC_INST *nrmac,
|
||||
}
|
||||
LOG_D(NR_MAC, "%s(): retransmission keeping TDA %d and TBS %d\n", __func__, tda, retInfo->tb_size);
|
||||
} else {
|
||||
NR_pusch_semi_static_t temp_ps;
|
||||
nr_set_pusch_semi_static(&UE->current_UL_BWP,
|
||||
scc,
|
||||
tda,
|
||||
nrOfLayers,
|
||||
&temp_ps);
|
||||
|
||||
NR_tda_info_t tda_info = nr_get_pusch_tda_info(&UE->current_UL_BWP, tda);
|
||||
NR_pusch_dmrs_t dmrs_info = get_ul_dmrs_params(scc,
|
||||
&UE->current_UL_BWP,
|
||||
&tda_info,
|
||||
nrOfLayers);
|
||||
/* the retransmission will use a different time domain allocation, check
|
||||
* that we have enough resources */
|
||||
const uint16_t slbitmap = SL_to_bitmap(temp_ps.startSymbolIndex, temp_ps.nrOfSymbols);
|
||||
const uint16_t slbitmap = SL_to_bitmap(tda_info.startSymbolIndex, tda_info.nrOfSymbols);
|
||||
while (rbStart < bwpSize && (rballoc_mask[rbStart] & slbitmap) != slbitmap)
|
||||
rbStart++;
|
||||
int rbSize = 0;
|
||||
@@ -1421,8 +1408,8 @@ static bool allocate_ul_retransmission(gNB_MAC_INST *nrmac,
|
||||
bool success = nr_find_nb_rb(retInfo->Qm,
|
||||
retInfo->R,
|
||||
1, // layers
|
||||
temp_ps.nrOfSymbols,
|
||||
temp_ps.N_PRB_DMRS * temp_ps.num_dmrs_symb,
|
||||
tda_info.nrOfSymbols,
|
||||
dmrs_info.N_PRB_DMRS * dmrs_info.num_dmrs_symb,
|
||||
retInfo->tb_size,
|
||||
1, /* minimum of 1RB: need to find exact TBS, don't preclude any number */
|
||||
rbSize,
|
||||
@@ -1438,7 +1425,8 @@ static bool allocate_ul_retransmission(gNB_MAC_INST *nrmac,
|
||||
retInfo->tb_size = new_tbs;
|
||||
retInfo->rbSize = new_rbSize;
|
||||
retInfo->time_domain_allocation = tda;
|
||||
sched_ctrl->pusch_semi_static = temp_ps;
|
||||
retInfo->dmrs_info = dmrs_info;
|
||||
retInfo->tda_info = tda_info;
|
||||
}
|
||||
|
||||
/* Find a free CCE */
|
||||
@@ -1496,7 +1484,7 @@ static bool allocate_ul_retransmission(gNB_MAC_INST *nrmac,
|
||||
/* Mark the corresponding RBs as used */
|
||||
n_rb_sched -= sched_pusch->rbSize;
|
||||
for (int rb = 0; rb < sched_ctrl->sched_pusch.rbSize; rb++)
|
||||
rballoc_mask[rb + sched_ctrl->sched_pusch.rbStart] ^= SL_to_bitmap(sched_ctrl->pusch_semi_static.startSymbolIndex, sched_ctrl->pusch_semi_static.nrOfSymbols);
|
||||
rballoc_mask[rb + sched_ctrl->sched_pusch.rbStart] ^= SL_to_bitmap(sched_pusch->tda_info.startSymbolIndex, sched_pusch->tda_info.nrOfSymbols);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1543,7 +1531,6 @@ void pf_ul(module_id_t module_id,
|
||||
|
||||
const uint16_t bwpSize = current_BWP->BWPSize;
|
||||
NR_sched_pusch_t *sched_pusch = &sched_ctrl->sched_pusch;
|
||||
NR_pusch_semi_static_t *ps = &sched_ctrl->pusch_semi_static;
|
||||
const NR_mac_dir_stats_t *stats = &UE->mac_stats.ul;
|
||||
|
||||
/* Calculate throughput */
|
||||
@@ -1635,24 +1622,17 @@ void pf_ul(module_id_t module_id,
|
||||
if (remainUEs == 0)
|
||||
return;
|
||||
|
||||
/* Save PUSCH field */
|
||||
/* we want to avoid a lengthy deduction of DMRS and other parameters in
|
||||
* every TTI if we can save it, so check whether TDA, or
|
||||
* num_dmrs_cdm_grps_no_data has changed and only then recompute */
|
||||
const uint8_t nrOfLayers = 1;
|
||||
const int tda = get_ul_tda(nrmac, scc, sched_pusch->slot);
|
||||
if (ps->time_domain_allocation != tda
|
||||
|| ps->nrOfLayers != nrOfLayers) {
|
||||
nr_set_pusch_semi_static(current_BWP,
|
||||
scc,
|
||||
tda,
|
||||
nrOfLayers,
|
||||
ps);
|
||||
}
|
||||
sched_pusch->nrOfLayers = 1;
|
||||
sched_pusch->time_domain_allocation = get_ul_tda(nrmac, scc, sched_pusch->slot);
|
||||
sched_pusch->tda_info = nr_get_pusch_tda_info(current_BWP, sched_pusch->time_domain_allocation);
|
||||
sched_pusch->dmrs_info = get_ul_dmrs_params(scc,
|
||||
current_BWP,
|
||||
&sched_pusch->tda_info,
|
||||
sched_pusch->nrOfLayers);
|
||||
|
||||
LOG_D(NR_MAC,"Looking for min_rb %d RBs, starting at %d num_dmrs_cdm_grps_no_data %d\n",
|
||||
min_rb, rbStart, ps->num_dmrs_cdm_grps_no_data);
|
||||
const uint16_t slbitmap = SL_to_bitmap(ps->startSymbolIndex, ps->nrOfSymbols);
|
||||
min_rb, rbStart, sched_pusch->dmrs_info.num_dmrs_cdm_grps_no_data);
|
||||
const uint16_t slbitmap = SL_to_bitmap(sched_pusch->tda_info.startSymbolIndex, sched_pusch->tda_info.nrOfSymbols);
|
||||
while (rbStart < bwpSize && (rballoc_mask[rbStart] & slbitmap) != slbitmap)
|
||||
rbStart++;
|
||||
if (rbStart + min_rb >= bwpSize) {
|
||||
@@ -1676,11 +1656,11 @@ void pf_ul(module_id_t module_id,
|
||||
sched_pusch->tb_size = nr_compute_tbs(sched_pusch->Qm,
|
||||
sched_pusch->R,
|
||||
sched_pusch->rbSize,
|
||||
ps->nrOfSymbols,
|
||||
ps->N_PRB_DMRS * ps->num_dmrs_symb,
|
||||
sched_pusch->tda_info.nrOfSymbols,
|
||||
sched_pusch->dmrs_info.N_PRB_DMRS * sched_pusch->dmrs_info.num_dmrs_symb,
|
||||
0, // nb_rb_oh
|
||||
0,
|
||||
ps->nrOfLayers)
|
||||
sched_pusch->nrOfLayers)
|
||||
>> 3;
|
||||
|
||||
/* Mark the corresponding RBs as used */
|
||||
@@ -1740,26 +1720,19 @@ void pf_ul(module_id_t module_id,
|
||||
|
||||
const uint16_t bwpSize = current_BWP->BWPSize;
|
||||
NR_sched_pusch_t *sched_pusch = &sched_ctrl->sched_pusch;
|
||||
NR_pusch_semi_static_t *ps = &sched_ctrl->pusch_semi_static;
|
||||
|
||||
/* Save PUSCH field */
|
||||
/* we want to avoid a lengthy deduction of DMRS and other parameters in
|
||||
* every TTI if we can save it, so check whether TDA, or
|
||||
* num_dmrs_cdm_grps_no_data has changed and only then recompute */
|
||||
const uint8_t nrOfLayers = 1;
|
||||
const int tda = get_ul_tda(nrmac, scc, sched_pusch->slot);
|
||||
if (ps->time_domain_allocation != tda
|
||||
|| ps->nrOfLayers != nrOfLayers) {
|
||||
nr_set_pusch_semi_static(current_BWP,
|
||||
scc,
|
||||
tda,
|
||||
nrOfLayers,
|
||||
ps);
|
||||
}
|
||||
sched_pusch->nrOfLayers = 1;
|
||||
sched_pusch->time_domain_allocation = get_ul_tda(nrmac, scc, sched_pusch->slot);
|
||||
sched_pusch->tda_info = nr_get_pusch_tda_info(current_BWP, sched_pusch->time_domain_allocation);
|
||||
sched_pusch->dmrs_info = get_ul_dmrs_params(scc,
|
||||
current_BWP,
|
||||
&sched_pusch->tda_info,
|
||||
sched_pusch->nrOfLayers);
|
||||
|
||||
update_ul_ue_R_Qm(sched_pusch->mcs, current_BWP->mcs_table, current_BWP->pusch_Config, &sched_pusch->R, &sched_pusch->Qm);
|
||||
|
||||
int rbStart = 0;
|
||||
const uint16_t slbitmap = SL_to_bitmap(ps->startSymbolIndex, ps->nrOfSymbols);
|
||||
const uint16_t slbitmap = SL_to_bitmap(sched_pusch->tda_info.startSymbolIndex, sched_pusch->tda_info.nrOfSymbols);
|
||||
while (rbStart < bwpSize && (rballoc_mask[rbStart] & slbitmap) != slbitmap)
|
||||
rbStart++;
|
||||
sched_pusch->rbStart = rbStart;
|
||||
@@ -1781,7 +1754,7 @@ void pf_ul(module_id_t module_id,
|
||||
sched_pusch->mu = scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.subcarrierSpacing;
|
||||
if(sched_ctrl->pcmax!=0 ||
|
||||
sched_ctrl->ph!=0) // verify if the PHR related parameter have been initialized
|
||||
nr_ue_max_mcs_min_rb(sched_pusch->mu, sched_ctrl->ph, ps, current_BWP, min_rbSize, B, &max_rbSize, &sched_pusch->mcs);
|
||||
nr_ue_max_mcs_min_rb(current_BWP->scs, sched_ctrl->ph, sched_pusch, current_BWP, min_rbSize, B, &max_rbSize, &sched_pusch->mcs);
|
||||
|
||||
if (sched_pusch->mcs < sched_ctrl->ul_bler_stats.mcs)
|
||||
sched_ctrl->ul_bler_stats.mcs = sched_pusch->mcs; /* force estimated MCS down */
|
||||
@@ -1792,8 +1765,8 @@ void pf_ul(module_id_t module_id,
|
||||
nr_find_nb_rb(sched_pusch->Qm,
|
||||
sched_pusch->R,
|
||||
1, // layers
|
||||
ps->nrOfSymbols,
|
||||
ps->N_PRB_DMRS * ps->num_dmrs_symb,
|
||||
sched_pusch->tda_info.nrOfSymbols,
|
||||
sched_pusch->dmrs_info.N_PRB_DMRS * sched_pusch->dmrs_info.num_dmrs_symb,
|
||||
B,
|
||||
min_rbSize,
|
||||
max_rbSize,
|
||||
@@ -1803,7 +1776,8 @@ void pf_ul(module_id_t module_id,
|
||||
sched_pusch->rbSize = rbSize;
|
||||
sched_pusch->tb_size = TBS;
|
||||
LOG_D(NR_MAC,"rbSize %d (max_rbSize %d), TBS %d, est buf %d, sched_ul %d, B %d, CCE %d, num_dmrs_symb %d, N_PRB_DMRS %d\n",
|
||||
rbSize, max_rbSize,sched_pusch->tb_size, sched_ctrl->estimated_ul_buffer, sched_ctrl->sched_ul_bytes, B,sched_ctrl->cce_index,ps->num_dmrs_symb,ps->N_PRB_DMRS);
|
||||
rbSize, max_rbSize,sched_pusch->tb_size, sched_ctrl->estimated_ul_buffer, sched_ctrl->sched_ul_bytes, B,
|
||||
sched_ctrl->cce_index,sched_pusch->dmrs_info.num_dmrs_symb,sched_pusch->dmrs_info.N_PRB_DMRS);
|
||||
|
||||
/* Mark the corresponding RBs as used */
|
||||
|
||||
@@ -2028,11 +2002,6 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot)
|
||||
|
||||
int rnti_types[2] = { NR_RNTI_C, 0 };
|
||||
|
||||
/* pre-computed PUSCH values that only change if time domain allocation,
|
||||
* DCI format, or DMRS parameters change. Updated in the preprocessor
|
||||
* through nr_set_pusch_semi_static() */
|
||||
NR_pusch_semi_static_t *ps = &sched_ctrl->pusch_semi_static;
|
||||
|
||||
/* Statistics */
|
||||
AssertFatal(cur_harq->round < nr_mac->ul_bler.harq_round_max, "Indexing ulsch_rounds[%d] is out of bounds\n", cur_harq->round);
|
||||
UE->mac_stats.ul.rounds[cur_harq->round]++;
|
||||
@@ -2043,7 +2012,7 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot)
|
||||
cur_harq->sched_pusch = *sched_pusch;
|
||||
/* save which time allocation has been used, to be used on
|
||||
* retransmissions */
|
||||
cur_harq->sched_pusch.time_domain_allocation = ps->time_domain_allocation;
|
||||
cur_harq->sched_pusch.time_domain_allocation = sched_pusch->time_domain_allocation;
|
||||
sched_ctrl->sched_ul_bytes += sched_pusch->tb_size;
|
||||
UE->mac_stats.ul.total_rbs += sched_pusch->rbSize;
|
||||
|
||||
@@ -2075,12 +2044,12 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot)
|
||||
sched_ctrl->aggregation_level,
|
||||
sched_pusch->rbStart,
|
||||
sched_pusch->rbSize,
|
||||
ps->startSymbolIndex,
|
||||
ps->nrOfSymbols,
|
||||
ps->ul_dmrs_symb_pos,
|
||||
sched_pusch->tda_info.startSymbolIndex,
|
||||
sched_pusch->tda_info.nrOfSymbols,
|
||||
sched_pusch->dmrs_info.ul_dmrs_symb_pos,
|
||||
sched_pusch->mcs,
|
||||
ps->nrOfLayers,
|
||||
ps->num_dmrs_cdm_grps_no_data,
|
||||
sched_pusch->nrOfLayers,
|
||||
sched_pusch->dmrs_info.num_dmrs_cdm_grps_no_data,
|
||||
sched_pusch->tb_size,
|
||||
harq_id,
|
||||
cur_harq->round,
|
||||
@@ -2134,18 +2103,19 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot)
|
||||
pusch_pdu->data_scrambling_id = *current_BWP->pusch_Config->dataScramblingIdentityPUSCH;
|
||||
else
|
||||
pusch_pdu->data_scrambling_id = *scc->physCellId;
|
||||
pusch_pdu->nrOfLayers = ps->nrOfLayers;
|
||||
pusch_pdu->num_dmrs_cdm_grps_no_data = ps->num_dmrs_cdm_grps_no_data;
|
||||
pusch_pdu->nrOfLayers = sched_pusch->nrOfLayers;
|
||||
pusch_pdu->num_dmrs_cdm_grps_no_data = sched_pusch->dmrs_info.num_dmrs_cdm_grps_no_data;
|
||||
|
||||
/* FAPI: DMRS */
|
||||
pusch_pdu->ul_dmrs_symb_pos = ps->ul_dmrs_symb_pos;
|
||||
pusch_pdu->dmrs_config_type = ps->dmrs_config_type;
|
||||
pusch_pdu->ul_dmrs_symb_pos = sched_pusch->dmrs_info.ul_dmrs_symb_pos;
|
||||
pusch_pdu->dmrs_config_type = sched_pusch->dmrs_info.dmrs_config_type;
|
||||
const NR_DMRS_UplinkConfig_t *NR_DMRS_UplinkConfig = sched_pusch->dmrs_info.NR_DMRS_UplinkConfig;
|
||||
if (pusch_pdu->transform_precoding) { // transform precoding disabled
|
||||
long *scramblingid=NULL;
|
||||
if (ps->NR_DMRS_UplinkConfig && pusch_pdu->scid == 0)
|
||||
scramblingid = ps->NR_DMRS_UplinkConfig->transformPrecodingDisabled->scramblingID0;
|
||||
else if (ps->NR_DMRS_UplinkConfig)
|
||||
scramblingid = ps->NR_DMRS_UplinkConfig->transformPrecodingDisabled->scramblingID1;
|
||||
if (NR_DMRS_UplinkConfig && pusch_pdu->scid == 0)
|
||||
scramblingid = NR_DMRS_UplinkConfig->transformPrecodingDisabled->scramblingID0;
|
||||
else if (NR_DMRS_UplinkConfig)
|
||||
scramblingid = NR_DMRS_UplinkConfig->transformPrecodingDisabled->scramblingID1;
|
||||
if (scramblingid == NULL)
|
||||
pusch_pdu->ul_dmrs_scrambling_id = *scc->physCellId;
|
||||
else
|
||||
@@ -2153,14 +2123,14 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot)
|
||||
}
|
||||
else {
|
||||
pusch_pdu->ul_dmrs_scrambling_id = *scc->physCellId;
|
||||
if (ps->NR_DMRS_UplinkConfig && ps->NR_DMRS_UplinkConfig->transformPrecodingEnabled->nPUSCH_Identity != NULL)
|
||||
pusch_pdu->pusch_identity = *ps->NR_DMRS_UplinkConfig->transformPrecodingEnabled->nPUSCH_Identity;
|
||||
else if (ps->NR_DMRS_UplinkConfig)
|
||||
if (NR_DMRS_UplinkConfig && NR_DMRS_UplinkConfig->transformPrecodingEnabled->nPUSCH_Identity != NULL)
|
||||
pusch_pdu->pusch_identity = *NR_DMRS_UplinkConfig->transformPrecodingEnabled->nPUSCH_Identity;
|
||||
else if (NR_DMRS_UplinkConfig)
|
||||
pusch_pdu->pusch_identity = *scc->physCellId;
|
||||
}
|
||||
pusch_pdu->scid = 0; // DMRS sequence initialization [TS38.211, sec 6.4.1.1.1]
|
||||
pusch_pdu->num_dmrs_cdm_grps_no_data = ps->num_dmrs_cdm_grps_no_data;
|
||||
pusch_pdu->dmrs_ports = ((1<<ps->nrOfLayers) - 1);
|
||||
pusch_pdu->num_dmrs_cdm_grps_no_data = sched_pusch->dmrs_info.num_dmrs_cdm_grps_no_data;
|
||||
pusch_pdu->dmrs_ports = ((1<<sched_pusch->nrOfLayers) - 1);
|
||||
|
||||
/* FAPI: Pusch Allocation in frequency domain */
|
||||
pusch_pdu->resource_alloc = 1; //type 1
|
||||
@@ -2173,8 +2143,8 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot)
|
||||
pusch_pdu->frequency_hopping = 1;
|
||||
|
||||
/* FAPI: Resource Allocation in time domain */
|
||||
pusch_pdu->start_symbol_index = ps->startSymbolIndex;
|
||||
pusch_pdu->nr_of_symbols = ps->nrOfSymbols;
|
||||
pusch_pdu->start_symbol_index = sched_pusch->tda_info.startSymbolIndex;
|
||||
pusch_pdu->nr_of_symbols = sched_pusch->tda_info.nrOfSymbols;
|
||||
|
||||
/* PUSCH PDU */
|
||||
AssertFatal(cur_harq->round < nr_mac->ul_bler.harq_round_max, "Indexing nr_rv_round_map[%d] is out of bounds\n", cur_harq->round%4);
|
||||
@@ -2210,8 +2180,8 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot)
|
||||
pusch_pdu->dfts_ofdm.low_papr_group_number = pusch_pdu->pusch_identity % 30;
|
||||
|
||||
// V as specified in section 6.4.1.1.1.2 in 38.211 V = 0 if sequence hopping and group hopping are disabled
|
||||
if ((ps->NR_DMRS_UplinkConfig==NULL) || ((ps->NR_DMRS_UplinkConfig->transformPrecodingEnabled->sequenceGroupHopping == NULL) &&
|
||||
(ps->NR_DMRS_UplinkConfig->transformPrecodingEnabled->sequenceHopping == NULL)))
|
||||
if ((NR_DMRS_UplinkConfig==NULL) || ((NR_DMRS_UplinkConfig->transformPrecodingEnabled->sequenceGroupHopping == NULL) &&
|
||||
(NR_DMRS_UplinkConfig->transformPrecodingEnabled->sequenceHopping == NULL)))
|
||||
pusch_pdu->dfts_ofdm.low_papr_sequence_number = 0;
|
||||
else
|
||||
AssertFatal(1==0,"SequenceGroupHopping or sequenceHopping are NOT Supported\n");
|
||||
@@ -2222,10 +2192,10 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot)
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
|
||||
/* PUSCH PTRS */
|
||||
if (ps->NR_DMRS_UplinkConfig && ps->NR_DMRS_UplinkConfig->phaseTrackingRS != NULL) {
|
||||
if (NR_DMRS_UplinkConfig && NR_DMRS_UplinkConfig->phaseTrackingRS != NULL) {
|
||||
bool valid_ptrs_setup = false;
|
||||
pusch_pdu->pusch_ptrs.ptrs_ports_list = (nfapi_nr_ptrs_ports_t *) malloc(2*sizeof(nfapi_nr_ptrs_ports_t));
|
||||
valid_ptrs_setup = set_ul_ptrs_values(ps->NR_DMRS_UplinkConfig->phaseTrackingRS->choice.setup,
|
||||
valid_ptrs_setup = set_ul_ptrs_values(NR_DMRS_UplinkConfig->phaseTrackingRS->choice.setup,
|
||||
pusch_pdu->rb_size, pusch_pdu->mcs_index, pusch_pdu->mcs_table,
|
||||
&pusch_pdu->pusch_ptrs.ptrs_freq_density,&pusch_pdu->pusch_ptrs.ptrs_time_density,
|
||||
&pusch_pdu->pusch_ptrs.ptrs_ports_list->ptrs_re_offset,&pusch_pdu->pusch_ptrs.num_ptrs_ports,
|
||||
@@ -2282,7 +2252,7 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot)
|
||||
pusch_pdu,
|
||||
&uldci_payload,
|
||||
&sched_ctrl->srs_feedback,
|
||||
ps->time_domain_allocation,
|
||||
sched_pusch->time_domain_allocation,
|
||||
UE->UE_sched_ctrl.tpc0,
|
||||
current_BWP);
|
||||
|
||||
|
||||
@@ -87,9 +87,8 @@ uint32_t schedule_control_sib1(module_id_t module_id,
|
||||
int CC_id,
|
||||
NR_Type0_PDCCH_CSS_config_t *type0_PDCCH_CSS_config,
|
||||
int time_domain_allocation,
|
||||
int startSymbolIndex,
|
||||
int nrOfSymbols,
|
||||
uint16_t dlDmrsSymbPos,
|
||||
NR_pdsch_dmrs_t *dmrs_parms,
|
||||
NR_tda_info_t *tda_info,
|
||||
uint8_t candidate_idx,
|
||||
uint16_t num_total_bytes);
|
||||
|
||||
@@ -326,18 +325,16 @@ long get_K2(NR_PUSCH_TimeDomainResourceAllocationList_t *tdaList,
|
||||
int time_domain_assignment,
|
||||
int mu);
|
||||
|
||||
void nr_set_pdsch_semi_static(const NR_UE_DL_BWP_t *dl_bwp,
|
||||
const NR_ServingCellConfigCommon_t *scc,
|
||||
int tda,
|
||||
uint8_t layers,
|
||||
NR_UE_sched_ctrl_t *sched_ctrl,
|
||||
NR_pdsch_semi_static_t *ps);
|
||||
NR_tda_info_t nr_get_pdsch_tda_info(const NR_UE_DL_BWP_t *dl_bwp,
|
||||
const int tda);
|
||||
|
||||
void nr_set_pusch_semi_static(const NR_UE_UL_BWP_t *ul_bwp,
|
||||
const NR_ServingCellConfigCommon_t *scc,
|
||||
int tda,
|
||||
uint8_t nrOfLayers,
|
||||
NR_pusch_semi_static_t *ps);
|
||||
NR_tda_info_t nr_get_pusch_tda_info(const NR_UE_UL_BWP_t *ul_bwp,
|
||||
const int tda);
|
||||
|
||||
NR_pusch_dmrs_t get_ul_dmrs_params(const NR_ServingCellConfigCommon_t *scc,
|
||||
const NR_UE_UL_BWP_t *ul_bwp,
|
||||
const NR_tda_info_t *tda_info,
|
||||
const int Layers);
|
||||
|
||||
uint8_t nr_get_tpc(int target, uint8_t cqi, int incr);
|
||||
|
||||
@@ -456,16 +453,18 @@ int16_t ssb_index_from_prach(module_id_t module_idP,
|
||||
|
||||
void find_SSB_and_RO_available(module_id_t module_idP);
|
||||
|
||||
void set_dl_dmrs_ports(NR_pdsch_semi_static_t *ps);
|
||||
NR_pdsch_dmrs_t get_dl_dmrs_params(const NR_ServingCellConfigCommon_t *scc,
|
||||
const NR_UE_DL_BWP_t *BWP,
|
||||
const NR_tda_info_t *tda_info,
|
||||
const int Layers);
|
||||
|
||||
uint16_t set_pm_index(NR_UE_sched_ctrl_t *sched_ctrl,
|
||||
uint16_t get_pm_index(const NR_UE_info_t *UE,
|
||||
int layers,
|
||||
int N1, int N2,
|
||||
int xp_pdsch_antenna_ports,
|
||||
int codebook_mode);
|
||||
int xp_pdsch_antenna_ports);
|
||||
|
||||
uint8_t get_mcs_from_cqi(int mcs_table, int cqi_table, int cqi_idx);
|
||||
uint8_t set_dl_nrOfLayers(NR_UE_sched_ctrl_t *sched_ctrl);
|
||||
|
||||
uint8_t get_dl_nrOfLayers(const NR_UE_sched_ctrl_t *sched_ctrl, const nr_dci_format_t dci_format);
|
||||
|
||||
const int get_dl_tda(const gNB_MAC_INST *nrmac, const NR_ServingCellConfigCommon_t *scc, int slot);
|
||||
const int get_ul_tda(const gNB_MAC_INST *nrmac, const NR_ServingCellConfigCommon_t *scc, int slot);
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
#include <string.h>
|
||||
|
||||
/* Commmon */
|
||||
#include "targets/ARCH/COMMON/common_lib.h"
|
||||
#include "sdr/COMMON/common_lib.h"
|
||||
#include "COMMON/platform_constants.h"
|
||||
#include "common/ran_context.h"
|
||||
#include "collection/linear_alloc.h"
|
||||
@@ -373,23 +373,20 @@ typedef struct NR_sched_pucch {
|
||||
int start_symb;
|
||||
} NR_sched_pucch_t;
|
||||
|
||||
/* PUSCH semi-static configuration: as long as the TDA and DCI format remain
|
||||
* the same over the same uBWP and search space, there is no need to
|
||||
* recalculate all S/L, MCS table, or DMRS-related parameters over and over
|
||||
* again. Hence, we store them in this struct for easy reference. */
|
||||
typedef struct NR_pusch_semi_static_t {
|
||||
int time_domain_allocation;
|
||||
uint8_t nrOfLayers;
|
||||
uint8_t num_dmrs_cdm_grps_no_data;
|
||||
typedef struct NR_tda_info {
|
||||
mappingType_t mapping_type;
|
||||
int startSymbolIndex;
|
||||
int nrOfSymbols;
|
||||
long mapping_type;
|
||||
NR_DMRS_UplinkConfig_t *NR_DMRS_UplinkConfig;
|
||||
uint16_t dmrs_config_type;
|
||||
uint16_t ul_dmrs_symb_pos;
|
||||
uint8_t num_dmrs_symb;
|
||||
} NR_tda_info_t;
|
||||
|
||||
typedef struct NR_pusch_dmrs {
|
||||
uint8_t N_PRB_DMRS;
|
||||
} NR_pusch_semi_static_t;
|
||||
uint8_t num_dmrs_symb;
|
||||
uint16_t ul_dmrs_symb_pos;
|
||||
uint8_t num_dmrs_cdm_grps_no_data;
|
||||
nfapi_nr_dmrs_type_e dmrs_config_type;
|
||||
NR_DMRS_UplinkConfig_t *NR_DMRS_UplinkConfig;
|
||||
} NR_pusch_dmrs_t;
|
||||
|
||||
typedef struct NR_sched_pusch {
|
||||
int frame;
|
||||
@@ -411,10 +408,11 @@ typedef struct NR_sched_pusch {
|
||||
/// UL HARQ PID to use for this UE, or -1 for "any new"
|
||||
int8_t ul_harq_pid;
|
||||
|
||||
/// the Time Domain Allocation used for this transmission. Note that this is
|
||||
/// only important for retransmissions; otherwise, the TDA in
|
||||
/// NR_pusch_semi_static_t has precedence
|
||||
uint8_t nrOfLayers;
|
||||
// time_domain_allocation is the index of a list of tda
|
||||
int time_domain_allocation;
|
||||
NR_tda_info_t tda_info;
|
||||
NR_pusch_dmrs_t dmrs_info;
|
||||
} NR_sched_pusch_t;
|
||||
|
||||
typedef struct NR_sched_srs {
|
||||
@@ -423,24 +421,14 @@ typedef struct NR_sched_srs {
|
||||
bool srs_scheduled;
|
||||
} NR_sched_srs_t;
|
||||
|
||||
/* PDSCH semi-static configuratio: as long as the TDA/DMRS/mcsTable remains the
|
||||
* same, there is no need to recalculate all S/L or DMRS-related parameters
|
||||
* over and over again. Hence, we store them in this struct for easy
|
||||
* reference. */
|
||||
typedef struct NR_pdsch_semi_static {
|
||||
int time_domain_allocation;
|
||||
uint8_t numDmrsCdmGrpsNoData;
|
||||
uint8_t frontloaded_symb;
|
||||
int mapping_type;
|
||||
int startSymbolIndex;
|
||||
int nrOfSymbols;
|
||||
uint8_t nrOfLayers;
|
||||
typedef struct NR_pdsch_dmrs {
|
||||
uint8_t dmrs_ports_id;
|
||||
uint8_t N_PRB_DMRS;
|
||||
uint8_t N_DMRS_SLOT;
|
||||
uint16_t dl_dmrs_symb_pos;
|
||||
uint8_t numDmrsCdmGrpsNoData;
|
||||
nfapi_nr_dmrs_type_e dmrsConfigType;
|
||||
} NR_pdsch_semi_static_t;
|
||||
} NR_pdsch_dmrs_t;
|
||||
|
||||
typedef struct NR_sched_pdsch {
|
||||
/// RB allocation within active BWP
|
||||
@@ -461,11 +449,13 @@ typedef struct NR_sched_pdsch {
|
||||
// pucch format allocation
|
||||
uint8_t pucch_allocation;
|
||||
|
||||
/// the Time Domain Allocation used for this transmission. Note that this is
|
||||
/// only important for retransmissions; otherwise, the TDA in
|
||||
/// NR_pdsch_semi_static_t has precedence
|
||||
int time_domain_allocation;
|
||||
uint16_t pm_index;
|
||||
uint8_t nrOfLayers;
|
||||
|
||||
NR_pdsch_dmrs_t dmrs_parms;
|
||||
// time_domain_allocation is the index of a list of tda
|
||||
int time_domain_allocation;
|
||||
NR_tda_info_t tda_info;
|
||||
} NR_sched_pdsch_t;
|
||||
|
||||
typedef struct NR_UE_harq {
|
||||
@@ -578,8 +568,6 @@ typedef struct {
|
||||
/// CSI in second. This order is important for nr_acknack_scheduling()!
|
||||
NR_sched_pucch_t sched_pucch[2];
|
||||
|
||||
/// PUSCH semi-static configuration: is not cleared across TTIs
|
||||
NR_pusch_semi_static_t pusch_semi_static;
|
||||
/// Sched PUSCH: scheduling decisions, copied into HARQ and cleared every TTI
|
||||
NR_sched_pusch_t sched_pusch;
|
||||
|
||||
@@ -596,8 +584,6 @@ typedef struct {
|
||||
/// PHR info: nominal UE transmit power levels (dBm)
|
||||
int pcmax;
|
||||
|
||||
/// PDSCH semi-static configuration: is not cleared across TTIs
|
||||
NR_pdsch_semi_static_t pdsch_semi_static;
|
||||
/// Sched PDSCH: scheduling decisions, copied into HARQ and cleared every TTI
|
||||
NR_sched_pdsch_t sched_pdsch;
|
||||
/// UE-estimated maximum MCS (from CSI-RS)
|
||||
@@ -632,7 +618,6 @@ typedef struct {
|
||||
int ul_failure;
|
||||
struct CSI_Report CSI_report;
|
||||
bool SR;
|
||||
bool set_pmi;
|
||||
/// information about every HARQ process
|
||||
NR_UE_harq_t harq_processes[NR_MAX_NB_HARQ_PROCESSES];
|
||||
/// HARQ processes that are free
|
||||
@@ -723,7 +708,6 @@ typedef struct {
|
||||
NR_gNB_UCI_STATS_t uci_statS;
|
||||
float ul_thr_ue;
|
||||
float dl_thr_ue;
|
||||
int layers;
|
||||
} NR_UE_info_t;
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -590,7 +590,7 @@ void rlc_data_ind (
|
||||
T(T_ENB_RLC_UL, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->rnti), T_INT(rb_idP), T_INT(sdu_sizeP));
|
||||
#endif
|
||||
const ngran_node_t type = RC.rrc[ctxt_pP->module_id]->node_type;
|
||||
AssertFatal(type != ngran_eNB_CU && type != ngran_ng_eNB_CU && type != ngran_gNB_CU,
|
||||
AssertFatal(!NODE_IS_CU(type),
|
||||
"Can't be CU, bad node type %d\n", type);
|
||||
|
||||
if (NODE_IS_DU(type) && srb_flagP == 1) {
|
||||
|
||||
@@ -514,7 +514,7 @@ rb_found:
|
||||
T_INT(ue->rnti), T_INT(rb_id), T_INT(size));
|
||||
|
||||
const ngran_node_t type = RC.nrrrc[0 /*ctxt_pP->module_id*/]->node_type;
|
||||
AssertFatal(type != ngran_eNB_CU && type != ngran_ng_eNB_CU && type != ngran_gNB_CU,
|
||||
AssertFatal(!NODE_IS_CU(type),
|
||||
"Can't be CU, bad node type %d\n", type);
|
||||
|
||||
// if (NODE_IS_DU(type) && is_srb == 0) {
|
||||
|
||||
@@ -415,7 +415,7 @@ rb_found:
|
||||
T_INT(ue->rnti), T_INT(rb_id), T_INT(size));
|
||||
|
||||
const ngran_node_t type = RC.rrc[0 /*ctxt_pP->module_id*/]->node_type;
|
||||
AssertFatal(type != ngran_eNB_CU && type != ngran_ng_eNB_CU && type != ngran_gNB_CU,
|
||||
AssertFatal(!NODE_IS_CU(type),
|
||||
"Can't be CU, bad node type %d\n", type);
|
||||
|
||||
if (NODE_IS_DU(type)) {
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#include "LAYER2/MAC/mac_proto.h"
|
||||
#include "PHY/phy_extern.h"
|
||||
#include "PHY/INIT/phy_init.h"
|
||||
#include "targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.h"
|
||||
#include "sdr/ETHERNET/USERSPACE/LIB/ethernet_lib.h"
|
||||
#include "nfapi_vnf.h"
|
||||
#include "nfapi_pnf.h"
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#include "openair2/RRC/NR_UE/rrc_vars.h"
|
||||
#include "openair2/GNB_APP/L1_nr_paramdef.h"
|
||||
#include "openair2/GNB_APP/gnb_paramdef.h"
|
||||
#include "targets/ARCH/ETHERNET/USERSPACE/LIB/if_defs.h"
|
||||
#include "sdr/ETHERNET/USERSPACE/LIB/if_defs.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#define MAX_IF_MODULES 100
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
/* 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
|
||||
@@ -39,6 +38,8 @@
|
||||
#include "nfapi_interface.h"
|
||||
#include "platform_types.h"
|
||||
#include <common/utils/threadPool/thread-pool.h>
|
||||
#include <sdr/COMMON/common_lib.h>
|
||||
|
||||
|
||||
#define MAX_NUM_DL_PDU 100
|
||||
#define MAX_NUM_UL_PDU 100
|
||||
@@ -135,7 +136,6 @@ typedef struct {
|
||||
int CC_id;
|
||||
nfapi_config_request_t *cfg;
|
||||
} PHY_Config_t;
|
||||
#include <targets/ARCH/COMMON/common_lib.h>
|
||||
|
||||
typedef struct IF_Module_s{
|
||||
//define the function pointer
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "openair2/PHY_INTERFACE/phy_stub_UE.h"
|
||||
#include "openair2/ENB_APP/L1_paramdef.h"
|
||||
#include "openair2/ENB_APP/enb_paramdef.h"
|
||||
#include "targets/ARCH/ETHERNET/USERSPACE/LIB/if_defs.h"
|
||||
#include "sdr/ETHERNET/USERSPACE/LIB/if_defs.h"
|
||||
#include "common/config/config_load_configmodule.h"
|
||||
#include "common/config/config_userapi.h"
|
||||
#include <arpa/inet.h>
|
||||
|
||||
@@ -1004,9 +1004,7 @@ int rrc_eNB_process_S1AP_INITIAL_CONTEXT_SETUP_REQ(MessageDef *msg_p, const char
|
||||
}
|
||||
|
||||
|
||||
if ((RC.rrc[ctxt.module_id]->node_type == ngran_eNB_CU) ||
|
||||
(RC.rrc[ctxt.module_id]->node_type == ngran_ng_eNB_CU) ||
|
||||
(RC.rrc[ctxt.module_id]->node_type == ngran_gNB_CU) ){
|
||||
if (NODE_IS_CU(RC.rrc[ctxt.module_id]->node_type)) {
|
||||
struct eNB_RRC_INST_s *rrc= RC.rrc[0];
|
||||
MessageDef *message_p = itti_alloc_new_message (TASK_RRC_ENB, 0, F1AP_UE_CONTEXT_SETUP_REQ);
|
||||
f1ap_ue_context_setup_t *req=&F1AP_UE_CONTEXT_SETUP_REQ (message_p);
|
||||
|
||||
@@ -983,7 +983,6 @@ uint8_t do_RRCReject(uint8_t Mod_id,
|
||||
return((enc_rval.encoded+7)/8);
|
||||
}
|
||||
|
||||
|
||||
void fill_initial_SpCellConfig(int uid,
|
||||
NR_SpCellConfig_t *SpCellConfig,
|
||||
const NR_ServingCellConfigCommon_t *scc,
|
||||
@@ -1062,7 +1061,8 @@ void fill_initial_SpCellConfig(int uid,
|
||||
ASN_SEQUENCE_ADD(&pusch_Config->pusch_PowerControl->pathlossReferenceRSToAddModList->list,plrefRS);
|
||||
pusch_Config->pusch_PowerControl->pathlossReferenceRSToReleaseList = NULL;
|
||||
pusch_Config->pusch_PowerControl->twoPUSCH_PC_AdjustmentStates = NULL;
|
||||
pusch_Config->pusch_PowerControl->deltaMCS = NULL;
|
||||
pusch_Config->pusch_PowerControl->deltaMCS = calloc(1, sizeof(*pusch_Config->pusch_PowerControl->deltaMCS));
|
||||
*pusch_Config->pusch_PowerControl->deltaMCS = NR_PUSCH_PowerControl__deltaMCS_enabled;
|
||||
pusch_Config->pusch_PowerControl->sri_PUSCH_MappingToAddModList = calloc(1,sizeof(*pusch_Config->pusch_PowerControl->sri_PUSCH_MappingToAddModList));
|
||||
NR_SRI_PUSCH_PowerControl_t *sriPUSCHPC=calloc(1,sizeof(*sriPUSCHPC));
|
||||
sriPUSCHPC->sri_PUSCH_PowerControlId=0;
|
||||
|
||||
@@ -1132,7 +1132,8 @@ void config_uplinkBWP(NR_BWP_Uplink_t *ubwp,
|
||||
pusch_Config->pusch_PowerControl->pathlossReferenceRSToAddModList = NULL;
|
||||
pusch_Config->pusch_PowerControl->pathlossReferenceRSToReleaseList = NULL;
|
||||
pusch_Config->pusch_PowerControl->twoPUSCH_PC_AdjustmentStates = NULL;
|
||||
pusch_Config->pusch_PowerControl->deltaMCS = NULL;
|
||||
pusch_Config->pusch_PowerControl->deltaMCS = calloc(1, sizeof(*pusch_Config->pusch_PowerControl->deltaMCS));
|
||||
*pusch_Config->pusch_PowerControl->deltaMCS = NR_PUSCH_PowerControl__deltaMCS_enabled;
|
||||
pusch_Config->pusch_PowerControl->sri_PUSCH_MappingToAddModList = NULL;
|
||||
pusch_Config->pusch_PowerControl->sri_PUSCH_MappingToReleaseList = NULL;
|
||||
pusch_Config->frequencyHopping=NULL;
|
||||
|
||||
@@ -524,7 +524,7 @@ rrc_gNB_process_RRCSetupComplete(
|
||||
ue_context_pP->ue_context.Srb1.Srb_info.Srb_id = 1;
|
||||
ue_context_pP->ue_context.StatusRrc = NR_RRC_CONNECTED;
|
||||
|
||||
if (AMF_MODE_ENABLED) {
|
||||
if (get_softmodem_params()->sa) {
|
||||
rrc_gNB_send_NGAP_NAS_FIRST_REQ(ctxt_pP, ue_context_pP, rrcSetupComplete);
|
||||
} else {
|
||||
rrc_gNB_generate_SecurityModeCommand(ctxt_pP, ue_context_pP);
|
||||
@@ -1617,7 +1617,7 @@ rrc_gNB_process_RRCConnectionReestablishmentComplete(
|
||||
ue_context_pP->ue_context.Srb1.Active = 1;
|
||||
//ue_context_pP->ue_context.Srb2.Srb_info.Srb_id = 2;
|
||||
|
||||
if (AMF_MODE_ENABLED) {
|
||||
if (get_softmodem_params()->sa) {
|
||||
hashtable_rc_t h_rc;
|
||||
int j;
|
||||
rrc_ue_ngap_ids_t *rrc_ue_ngap_ids_p = NULL;
|
||||
@@ -1694,13 +1694,13 @@ rrc_gNB_process_RRCConnectionReestablishmentComplete(
|
||||
ue_context_pP->ue_context.ul_failure_timer = 0;
|
||||
return;
|
||||
}
|
||||
} /* AMF_MODE_ENABLED */
|
||||
}
|
||||
|
||||
/* Update RNTI in ue_context */
|
||||
ue_context_pP->ue_id_rnti = ctxt_pP->rnti; // here ue_id_rnti is just a key, may be something else
|
||||
ue_context_pP->ue_context.rnti = ctxt_pP->rnti;
|
||||
|
||||
if (AMF_MODE_ENABLED) {
|
||||
if (get_softmodem_params()->sa) {
|
||||
uint8_t send_security_mode_command = false;
|
||||
nr_rrc_pdcp_config_security(
|
||||
ctxt_pP,
|
||||
@@ -2343,7 +2343,7 @@ rrc_gNB_decode_dcch(
|
||||
ul_dcch_msg->message.choice.c1->choice.rrcReconfigurationComplete->rrc_TransactionIdentifier);
|
||||
}
|
||||
|
||||
if (AMF_MODE_ENABLED) {
|
||||
if (get_softmodem_params()->sa) {
|
||||
if(ue_context_p->ue_context.pdu_session_release_command_flag == 1) {
|
||||
xid = ul_dcch_msg->message.choice.c1->choice.rrcReconfigurationComplete->rrc_TransactionIdentifier;
|
||||
ue_context_p->ue_context.pdu_session_release_command_flag = 0;
|
||||
@@ -2476,7 +2476,7 @@ rrc_gNB_decode_dcch(
|
||||
LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)Rx_sdu,sdu_sizeP,
|
||||
"[MSG] RRC UL Information Transfer \n");
|
||||
|
||||
if (AMF_MODE_ENABLED == 1) {
|
||||
if (get_softmodem_params()->sa) {
|
||||
rrc_gNB_send_NGAP_UPLINK_NAS(ctxt_pP,
|
||||
ue_context_p,
|
||||
ul_dcch_msg);
|
||||
@@ -2624,7 +2624,7 @@ rrc_gNB_decode_dcch(
|
||||
if(eutra_index == -1)
|
||||
break;
|
||||
}
|
||||
if (AMF_MODE_ENABLED == 1) {
|
||||
if (get_softmodem_params()->sa) {
|
||||
rrc_gNB_send_NGAP_UE_CAPABILITIES_IND(ctxt_pP,
|
||||
ue_context_p,
|
||||
ul_dcch_msg);
|
||||
|
||||
@@ -424,7 +424,8 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
|
||||
pusch_Config->pusch_PowerControl->pathlossReferenceRSToAddModList = NULL;
|
||||
pusch_Config->pusch_PowerControl->pathlossReferenceRSToReleaseList = NULL;
|
||||
pusch_Config->pusch_PowerControl->twoPUSCH_PC_AdjustmentStates = NULL;
|
||||
pusch_Config->pusch_PowerControl->deltaMCS = NULL;
|
||||
pusch_Config->pusch_PowerControl->deltaMCS = calloc(1, sizeof(*pusch_Config->pusch_PowerControl->deltaMCS));
|
||||
*pusch_Config->pusch_PowerControl->deltaMCS = NR_PUSCH_PowerControl__deltaMCS_enabled;
|
||||
pusch_Config->pusch_PowerControl->sri_PUSCH_MappingToAddModList = NULL;
|
||||
pusch_Config->pusch_PowerControl->sri_PUSCH_MappingToReleaseList = NULL;
|
||||
pusch_Config->frequencyHopping=NULL;
|
||||
|
||||
@@ -152,7 +152,7 @@ static int nr_rrc_set_state (module_id_t ue_mod_idP, Rrc_State_NR_t state) {
|
||||
}
|
||||
|
||||
static int nr_rrc_set_sub_state( module_id_t ue_mod_idP, Rrc_Sub_State_NR_t subState ) {
|
||||
if (AMF_MODE_ENABLED) {
|
||||
if (get_softmodem_params()->sa) {
|
||||
switch (NR_UE_rrc_inst[ue_mod_idP].nrRrcState) {
|
||||
case RRC_STATE_INACTIVE_NR:
|
||||
AssertFatal ((RRC_SUB_STATE_INACTIVE_FIRST_NR <= subState) && (subState <= RRC_SUB_STATE_INACTIVE_LAST_NR),
|
||||
@@ -835,7 +835,7 @@ int nr_decode_SI( const protocol_ctxt_t *const ctxt_pP, const uint8_t gNB_index
|
||||
|
||||
// After SI is received, prepare RRCConnectionRequest
|
||||
if (NR_UE_rrc_inst[ctxt_pP->module_id].MBMS_flag < 3) // see -Q option
|
||||
if (AMF_MODE_ENABLED) {
|
||||
if (get_softmodem_params()->sa) {
|
||||
nr_rrc_ue_generate_RRCSetupRequest( ctxt_pP->module_id, gNB_index );
|
||||
}
|
||||
|
||||
@@ -1341,20 +1341,16 @@ static void rrc_ue_generate_RRCSetupComplete(
|
||||
const char *nas_msg;
|
||||
int nas_msg_length;
|
||||
|
||||
if (AMF_MODE_ENABLED) {
|
||||
if (get_softmodem_params()->sa) {
|
||||
as_nas_info_t initialNasMsg;
|
||||
generateRegistrationRequest(&initialNasMsg, ctxt_pP->module_id);
|
||||
nas_msg = (char*)initialNasMsg.data;
|
||||
nas_msg_length = initialNasMsg.length;
|
||||
} else {
|
||||
nas_msg = (char *) NR_UE_rrc_inst[ctxt_pP->module_id].initialNasMsg.data;
|
||||
nas_msg_length = NR_UE_rrc_inst[ctxt_pP->module_id].initialNasMsg.length;
|
||||
}
|
||||
if (get_softmodem_params()->sa) {
|
||||
as_nas_info_t initialNasMsg;
|
||||
generateRegistrationRequest(&initialNasMsg, ctxt_pP->module_id);
|
||||
nas_msg = (char*)initialNasMsg.data;
|
||||
nas_msg_length = initialNasMsg.length;
|
||||
} else {
|
||||
nas_msg = nr_nas_attach_req_imsi;
|
||||
nas_msg_length = sizeof(nr_nas_attach_req_imsi);
|
||||
}
|
||||
|
||||
size = do_RRCSetupComplete(ctxt_pP->module_id, buffer, sizeof(buffer),
|
||||
Transaction_id, sel_plmn_id, nas_msg_length, nas_msg);
|
||||
LOG_I(NR_RRC,"[UE %d][RAPROC] Frame %d : Logical Channel UL-DCCH (SRB1), Generating RRCSetupComplete (bytes%d, gNB %d)\n",
|
||||
@@ -1708,9 +1704,6 @@ int8_t nr_rrc_ue_decode_ccch( const protocol_ctxt_t *const ctxt_pP, const NR_SRB
|
||||
void nr_rrc_ue_generate_RRCSetupRequest(module_id_t module_id, const uint8_t gNB_index) {
|
||||
uint8_t i=0,rv[6];
|
||||
|
||||
if(get_softmodem_params()->sa) {
|
||||
AMF_MODE_ENABLED = 1;
|
||||
}
|
||||
if(NR_UE_rrc_inst[module_id].Srb0[gNB_index].Tx_buffer.payload_size ==0) {
|
||||
// Get RRCConnectionRequest, fill random for now
|
||||
// Generate random byte stream for contention resolution
|
||||
@@ -1802,7 +1795,7 @@ nr_rrc_ue_establish_srb2(
|
||||
LOG_I(NR_RRC,"[UE %d] Frame %d: processing RRCReconfiguration: reconfiguring DRB %ld\n",
|
||||
ue_mod_idP, frameP, DRB_config->drb_Identity);
|
||||
|
||||
if(!AMF_MODE_ENABLED) {
|
||||
if(!get_softmodem_params()->sa) {
|
||||
ip_addr_offset3 = 0;
|
||||
ip_addr_offset4 = 1;
|
||||
LOG_I(OIP, "[UE %d] trying to bring up the OAI interface %d, IP X.Y.%d.%d\n", ue_mod_idP, ip_addr_offset3+ue_mod_idP,
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#include "LAYER2/MAC/mac_proto.h"
|
||||
#include "PHY/phy_extern.h"
|
||||
#include "PHY/INIT/phy_init.h"
|
||||
#include "targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.h"
|
||||
#include "sdr/ETHERNET/USERSPACE/LIB/ethernet_lib.h"
|
||||
#include "nfapi_vnf.h"
|
||||
#include "nfapi_pnf.h"
|
||||
|
||||
|
||||
@@ -64,8 +64,6 @@
|
||||
#include "oaisim_amf_test_s1c.h"
|
||||
#endif
|
||||
|
||||
ngap_gNB_config_t ngap_config;
|
||||
|
||||
static int ngap_gNB_generate_ng_setup_request(
|
||||
ngap_gNB_instance_t *instance_p, ngap_gNB_amf_data_t *ngap_amf_data_p);
|
||||
|
||||
|
||||
@@ -39,18 +39,6 @@
|
||||
#ifndef NGAP_GNB_H_
|
||||
#define NGAP_GNB_H_
|
||||
|
||||
typedef struct ngap_gNB_config_s {
|
||||
// MME related params
|
||||
unsigned char amf_enabled; ///< AMF enabled ?
|
||||
unsigned char ngap_enabled; ///< NGAP enabled ?
|
||||
} ngap_gNB_config_t;
|
||||
|
||||
extern ngap_gNB_config_t ngap_config;
|
||||
|
||||
#define AMF_MODE_ENABLED ngap_config.amf_enabled
|
||||
#define NGAP_CONF_MODE ngap_config.ngap_enabled
|
||||
|
||||
|
||||
void *ngap_gNB_process_itti_msg(void*);
|
||||
void ngap_gNB_init(void);
|
||||
void *ngap_gNB_task(void *arg);
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ git checkout 375-syrtem-sdr-platform
|
||||
or
|
||||
git checkout develop-nr (after merge request accepted)
|
||||
|
||||
./targets/ARCH/ADRV9371_ZC706/SYRTEM_IQ_uninstall_previous_SW.sh
|
||||
./sdr/ADRV9371_ZC706/SYRTEM_IQ_uninstall_previous_SW.sh
|
||||
-> Reading package lists... Done
|
||||
-> Building dependency tree
|
||||
-> Reading state information... Done
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "common/utils/system.h"
|
||||
#include "ori.h"
|
||||
|
||||
#include "targets/ARCH/COMMON/common_lib.h"
|
||||
#include "sdr/COMMON/common_lib.h"
|
||||
|
||||
typedef struct eutra_bandentry_s {
|
||||
int16_t band;
|
||||
@@ -21,7 +21,7 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/** targets/ARCH/COMMON/record-player.h
|
||||
/** sdr/COMMON/record-player.h
|
||||
*
|
||||
* \author: bruno.mongazon-cazavet@nokia-bell-labs.com
|
||||
*/
|
||||
+1
-1
@@ -27,7 +27,7 @@ The files implement the OAI IF device interface which provides the transmit/rece
|
||||
|
||||
It is contained in the eth_udp.c and eth_raw.c files. The two basic routines are
|
||||
|
||||
* trx_eth_read_udp_IF4p5() : implements a blocking read for three particular IF4p5 packets, IF4p5_PULFFT (for OAI RCC/DU), IF4p5_PRACH and IF4p5_PDLFFT (for OAI RU). The packets are parsed and mapped to the appropriate physical channels by the OAI physical layer
|
||||
* trx_eth_read_udp_IF4p5() : implements a blocking read for three particular IF4p5 packets, IF4p5_PULFFT (for OAI RCC/DU), IF4p5_PRACH and IF4p5_PDLFFT (for OAI RU). The packets are parsed and mapped to the appropriate physical channels by the OAI physical layer
|
||||
* trx_eth_write_udp_IF4p5 : implements a write for the three IF4p5 packets.
|
||||
|
||||
* trx_eth_ctlsend_udp : implements the sending component for the control socket
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*! \file targets/ARCH/ETHERNET/USERSPACE/LIB/if_defs.h
|
||||
/*! \file sdr/ETHERNET/USERSPACE/LIB/if_defs.h
|
||||
* \brief
|
||||
* \author S. Sandeep Kumar, Raymond Knopp
|
||||
* \date 2016
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user