Commit 0d118c98 authored by Maxime Elkael's avatar Maxime Elkael

Add nr_dlbench: standalone DL scheduler + PHY TX benchmark

Assisted-by: Claude-Code:Opus-4.8
Signed-off-by: default avatarMaxime Elkael <m.elkael@northeastern.edu>
parent f3589d97
...@@ -3,3 +3,4 @@ ...@@ -3,3 +3,4 @@
add_subdirectory(nr-cuup) add_subdirectory(nr-cuup)
add_subdirectory(nr-cu-nrppa) add_subdirectory(nr-cu-nrppa)
add_subdirectory(nr-ue-nas-simulator) add_subdirectory(nr-ue-nas-simulator)
add_subdirectory(nrdlbench)
# nr_dlbench: standalone gNB DL-scheduler + PHY-TX micro-benchmark.
# Lives under tests/ (not openair1/SIMULATION/NR_PHY) because it drives the full
# MAC scheduler path, not just the PHY.
add_executable(nr_dlbench
dlbench.c
${PHY_INTERFACE_DIR}/queue_t.c
)
target_link_libraries(nr_dlbench PRIVATE
-Wl,--start-group UTIL SIMU PHY_NR_COMMON PHY_NR SCHED_NR_LIB MAC_NR_COMMON CONFIG_LIB L2_NR -Wl,--end-group
m pthread ${T_LIB} ITTI dl physim_common
softmodem_common
)
target_link_libraries(nr_dlbench PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
if(ENABLE_TESTS)
add_dependencies(tests nr_dlbench)
# Functional smoke tests via a wrapper script (room to grow richer checks):
# run a short benchmark in UM and AM (-A) modes and verify it completes.
add_test(NAME nr_dlbench_um_functional_test
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/nr-dlbench-functional-test.sh $<TARGET_FILE:nr_dlbench> -A 0)
add_test(NAME nr_dlbench_am_functional_test
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/nr-dlbench-functional-test.sh $<TARGET_FILE:nr_dlbench> -A 50)
endif()
This diff is collapsed.
#!/bin/bash
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
# usage: nr-dlbench-functional-test.sh <nr_dlbench-binary> [extra nr_dlbench args]
if [ $# -lt 1 ]; then
echo "usage: $0 <nr_dlbench-binary> [extra nr_dlbench args]"
exit 1
fi
BIN=$1
shift
# Small, fast config: 1 UE, 24 RBs (10 MHz, the minimum that fits a CORESET),
# 200 slots. Caller-supplied args (e.g. -A <depth> for AM mode) are appended.
set -x
OUT=$("${BIN}" -u 1 -R 24 -n 200 -L 0 "$@" 2>&1)
RET=$?
set +x
echo "${OUT}"
if [ ${RET} -ne 0 ]; then
echo "FAIL: nr_dlbench exited with code ${RET}"
exit 1
fi
if ! echo "${OUT}" | grep -q "=== Results"; then
echo "FAIL: no results summary in nr_dlbench output"
exit 1
fi
echo "PASS"
exit 0
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment