From ff3245ea90a04ad071180f68de74f675ae19313c Mon Sep 17 00:00:00 2001 From: Jaroslava Fiedlerova Date: Wed, 17 Sep 2025 12:47:12 +0200 Subject: [PATCH 01/22] Enable ULSCH performance logging in nr_ulsim --- openair1/SIMULATION/tests/CMakeLists.txt | 106 +++++++++++------------ 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/openair1/SIMULATION/tests/CMakeLists.txt b/openair1/SIMULATION/tests/CMakeLists.txt index 9602d6d1f4..1d41b1fba9 100644 --- a/openair1/SIMULATION/tests/CMakeLists.txt +++ b/openair1/SIMULATION/tests/CMakeLists.txt @@ -274,59 +274,59 @@ add_physim_test(physim.5g.nr_pucchsim.test29 "Format 2 64-bit 16/273 PRB Delay 2 ###### nr_ulsim unit test ###### #################################################################################### -add_physim_test(physim.5g.nr_ulsim.misc.test1 "MCS 9 106 PRBs" nr_ulsim -n300 -m9 -r106 -s5) -add_physim_test(physim.5g.nr_ulsim.misc.test2 "MCS 16 50 PRBs" nr_ulsim -n300 -m16 -s10) -add_physim_test(physim.5g.nr_ulsim.misc.test3 "MCS 28 50 PRBs" nr_ulsim -n300 -m28 -s20) -add_physim_test(physim.5g.nr_ulsim.misc.test4 "MCS 27 50 PRBs 256QAM" nr_ulsim -n300 -m27 -s25 -q1) -add_physim_test(physim.5g.nr_ulsim.misc.test5 "MCS 9 217 PRBs" nr_ulsim -n300 -m9 -R217 -r217 -s5) -add_physim_test(physim.5g.nr_ulsim.misc.test6 "MCS 9 273 PRBs" nr_ulsim -n300 -m9 -R273 -r273 -s5) -add_physim_test(physim.5g.nr_ulsim.misc.test7 "PUSCH Type A, 2 DMRS Symbols" nr_ulsim -n300 -s5 -U 0,1,1,1) -add_physim_test(physim.5g.nr_ulsim.misc.test8 "PUSCH Type A, 3 DMRS, 4 PTRS, 5 Interpolated Symbols" nr_ulsim -n300 -s5 -T 1,2 -U 0,2,1,1) -add_physim_test(physim.5g.nr_ulsim.misc.test9 "PUSCH Type B, 3 DMRS, 2 PTRS, 7 Interpolated Symbols" nr_ulsim -n300 -s5 -T 2,2 -U 1,2,1,1) -add_physim_test(physim.5g.nr_ulsim.misc.test10 "PUSCH Type B, 3 DMRS, 2 PTRS, 3 Interpolated Symbols" nr_ulsim -n300 -s5 -a4 -b8 -T 1,2 -U 1,3,1,1) -add_physim_test(physim.5g.nr_ulsim.misc.test11 "25 PRBs, 15 kHz SCS" nr_ulsim -n300 -u0 -m0 -R25 -r25 -i 1,0) -add_physim_test(physim.5g.nr_ulsim.misc.test12 "32 PRBs, 120 kHz SCS" nr_ulsim -n300 -s5 -r32 -R32 -u3) -add_physim_test(physim.5g.nr_ulsim.misc.test13 "MCS 0, low SNR performance" nr_ulsim -n300 -m0 -S -0.6 -i 1,0) -add_physim_test(physim.5g.nr_ulsim.misc.test14 "MCS 28, 106 PRBs, Time shift 8" nr_ulsim -n300 -m28 -R106 -r106 -t90 -s24 -S24 -d 8) -add_physim_test(physim.5g.nr_ulsim.misc.test15 "SRS, SNR 40 dB" nr_ulsim -n300 -s40 -E 1) -add_physim_test(physim.5g.nr_ulsim.sc-fdma.test1 "SC-FDMA, 50 PRBs" nr_ulsim -n300 -s5 -Z) -add_physim_test(physim.5g.nr_ulsim.sc-fdma.test2 "SC-FDMA, 75 PRBs" nr_ulsim -n300 -s5 -Z -r75) -add_physim_test(physim.5g.nr_ulsim.sc-fdma.test3 "SC-FDMA, 216 PRBs" nr_ulsim -n150 -s5 -Z -r216 -R217) -add_physim_test(physim.5g.nr_ulsim.sc-fdma.test4 "SC-FDMA, 273 PRBs" nr_ulsim -n150 -s5 -Z -r270 -R273) -add_physim_test(physim.5g.nr_ulsim.sc-fdma.test5 "SC-FDMA, 3 DMRS" nr_ulsim -n300 -s5 -Z -U 0,2,1,2) -add_physim_test(physim.5g.nr_ulsim.mimo.test1 "MCS 19 50 PRBs 2 RX_Antenna" nr_ulsim -n300 -m19 -s10 -S15 -z2) -add_physim_test(physim.5g.nr_ulsim.mimo.test2 "MCS 9 106 PRBs MIMO 2 layers" nr_ulsim -n300 -m9 -r106 -s8 -W2 -y2 -z2) -add_physim_test(physim.5g.nr_ulsim.mimo.test3 "MCS 10 106 PRBs MIMO 2 layers" nr_ulsim -n300 -m10 -r106 -s12 -W2 -y2 -z2) -add_physim_test(physim.5g.nr_ulsim.mimo.test4 "MCS 19 106 PRBs MIMO 2 layers" nr_ulsim -n300 -m19 -r106 -s22 -W2 -y2 -z2) -add_physim_test(physim.5g.nr_ulsim.mimo.test5 "MCS 9 106 PRBs MIMO 4 layers" nr_ulsim -n300 -m9 -r106 -s10 -W4 -y4 -z4) -add_physim_test(physim.5g.nr_ulsim.3gpp.test1 "3GPP G-FR1-A5-13, PUSCH Type A, 40 MHz BW, 30 kHz SCS, 2 RX Antennas Requirements Test" nr_ulsim -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R106 -r106 -U 0,1,1,2 -z2 -s12.4 -S12.4) -add_physim_test(physim.5g.nr_ulsim.3gpp.test2 "3GPP G-FR1-A5-13, PUSCH Type A, 40 MHz BW, 30 kHz SCS, 4 RX Antennas Requirements Test" nr_ulsim -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R106 -r106 -U 0,1,1,2 -z4 -s8.5 -S8.5) -add_physim_test(physim.5g.nr_ulsim.3gpp.test3 "3GPP G-FR1-A5-13, PUSCH Type A, 40 MHz BW, 30 kHz SCS, 8 RX Antennas Requirements Test" nr_ulsim -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R106 -r106 -U 0,1,1,2 -z8 -s5.4 -S5.4) -add_physim_test(physim.5g.nr_ulsim.3gpp.test4 "3GPP G-FR1-A5-8, PUSCH Type B, 5 MHz BW, 15 kHz SCS, 2 RX Antennas Requirements Test" nr_ulsim -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 0 -m20 -R25 -r25 -U 1,1,1,2 -z2 -s12.5 -S12.5) -add_physim_test(physim.5g.nr_ulsim.3gpp.test5 "3GPP G-FR1-A5-8, PUSCH Type B, 5 MHz BW, 15 kHz SCS, 4 RX Antennas Requirements Test" nr_ulsim -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 0 -m20 -R25 -r25 -U 1,1,1,2 -z4 -s8.9 -S8.9) -add_physim_test(physim.5g.nr_ulsim.3gpp.test6 "3GPP G-FR1-A5-8, PUSCH Type B, 5 MHz BW, 15 kHz SCS, 8 RX Antennas Requirements Test" nr_ulsim -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 0 -m20 -R25 -r25 -U 1,1,1,2 -z8 -s5.7 -S5.7) -add_physim_test(physim.5g.nr_ulsim.3gpp.test7 "3GPP G-FR1-A5-9, PUSCH Type B, 10 MHz BW, 15 kHz SCS, 2 RX Antennas Requirements Test" nr_ulsim -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 0 -m20 -R52 -r52 -U 1,1,1,2 -z2 -s12.6 -S12.6) -add_physim_test(physim.5g.nr_ulsim.3gpp.test8 "3GPP G-FR1-A5-9, PUSCH Type B, 10 MHz BW, 15 kHz SCS, 4 RX Antennas Requirements Test" nr_ulsim -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 0 -m20 -R52 -r52 -U 1,1,1,2 -z4 -s8.9 -S8.9) -add_physim_test(physim.5g.nr_ulsim.3gpp.test9 "3GPP G-FR1-A5-9, PUSCH Type B, 10 MHz BW, 15 kHz SCS, 8 RX Antennas Requirements Test" nr_ulsim -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 0 -m20 -R52 -r52 -U 1,1,1,2 -z8 -s5.8 -S5.8) -add_physim_test(physim.5g.nr_ulsim.3gpp.test10 "3GPP G-FR1-A5-10, PUSCH Type B, 20 MHz BW, 15 kHz SCS, 2 RX Antennas Requirements Test" nr_ulsim -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 0 -m20 -R106 -r106 -U 1,1,1,2 -z2 -s12.3 -S12.3) -add_physim_test(physim.5g.nr_ulsim.3gpp.test11 "3GPP G-FR1-A5-10, PUSCH Type B, 20 MHz BW, 15 kHz SCS, 4 RX Antennas Requirements Test" nr_ulsim -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 0 -m20 -R106 -r106 -U 1,1,1,2 -z4 -s8.8 -S8.8) -add_physim_test(physim.5g.nr_ulsim.3gpp.test12 "3GPP G-FR1-A5-10, PUSCH Type B, 20 MHz BW, 15 kHz SCS, 8 RX Antennas Requirements Test" nr_ulsim -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 0 -m20 -R106 -r106 -U 1,1,1,2 -z8 -s5.7 -S5.7) -add_physim_test(physim.5g.nr_ulsim.3gpp.test13 "3GPP G-FR1-A5-11, PUSCH Type B, 10 MHz BW, 30 kHz SCS, 2 RX Antennas Requirements Test" nr_ulsim -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R24 -r24 -U 1,1,1,2 -z2 -s12.5 -S12.5) -add_physim_test(physim.5g.nr_ulsim.3gpp.test14 "3GPP G-FR1-A5-11, PUSCH Type B, 10 MHz BW, 30 kHz SCS, 4 RX Antennas Requirements Test" nr_ulsim -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R24 -r24 -U 1,1,1,2 -z4 -s8.6 -S8.6) -add_physim_test(physim.5g.nr_ulsim.3gpp.test15 "3GPP G-FR1-A5-11, PUSCH Type B, 10 MHz BW, 30 kHz SCS, 8 RX Antennas Requirements Test" nr_ulsim -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R24 -r24 -U 1,1,1,2 -z8 -s5.6 -S5.6) -add_physim_test(physim.5g.nr_ulsim.3gpp.test16 "3GPP G-FR1-A5-12, PUSCH Type B, 20 MHz BW, 30 kHz SCS, 2 RX Antennas Requirements Test" nr_ulsim -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R51 -r51 -U 1,1,1,2 -z2 -s12.5 -S12.5) -add_physim_test(physim.5g.nr_ulsim.3gpp.test17 "3GPP G-FR1-A5-12, PUSCH Type B, 20 MHz BW, 30 kHz SCS, 4 RX Antennas Requirements Test" nr_ulsim -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R51 -r51 -U 1,1,1,2 -z4 -s8.6 -S8.6) -add_physim_test(physim.5g.nr_ulsim.3gpp.test18 "3GPP G-FR1-A5-12, PUSCH Type B, 20 MHz BW, 30 kHz SCS, 8 RX Antennas Requirements Test" nr_ulsim -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R51 -r51 -U 1,1,1,2 -z8 -s5.6 -S5.6) -add_physim_test(physim.5g.nr_ulsim.3gpp.test19 "3GPP G-FR1-A5-13, PUSCH Type B, 40 MHz BW, 30 kHz SCS, 2 RX Antennas Requirements Test" nr_ulsim -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R106 -r106 -U 1,1,1,2 -z2 -s12.5 -S12.5) -add_physim_test(physim.5g.nr_ulsim.3gpp.test20 "3GPP G-FR1-A5-13, PUSCH Type B, 40 MHz BW, 30 kHz SCS, 4 RX Antennas Requirements Test" nr_ulsim -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R106 -r106 -U 1,1,1,2 -z4 -s8.7 -S8.7) -add_physim_test(physim.5g.nr_ulsim.3gpp.test21 "3GPP G-FR1-A5-13, PUSCH Type B, 40 MHz BW, 30 kHz SCS, 8 RX Antennas Requirements Test" nr_ulsim -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R106 -r106 -U 1,1,1,2 -z8 -s5.5 -S5.5) -add_physim_test(physim.5g.nr_ulsim.3gpp.test22 "3GPP G-FR1-A5-14, PUSCH Type B, 100 MHz BW, 30 kHz SCS, 2 RX Antennas Requirements Test" nr_ulsim -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R273 -r273 -U 1,1,1,2 -z2 -s13.1 -S13.1) -add_physim_test(physim.5g.nr_ulsim.3gpp.test23 "3GPP G-FR1-A5-14, PUSCH Type B, 100 MHz BW, 30 kHz SCS, 4 RX Antennas Requirements Test" nr_ulsim -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R273 -r273 -U 1,1,1,2 -z4 -s9.2 -S9.2) -add_physim_test(physim.5g.nr_ulsim.3gpp.test24 "3GPP G-FR1-A5-14, PUSCH Type B, 100 MHz BW, 30 kHz SCS, 8 RX Antennas Requirements Test" nr_ulsim -n300 -b14 -I8 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R273 -r273 -U 1,1,1,2 -z8 -s5.9 -S5.9) -add_physim_test(physim.5g.nr_ulsim.3gpp.test25 "3GPP G-FR1-A3-27, PUSCH Type B, 40 MHz BW, 30 kHz SCS, 2 RX Antennas Requirements Test, 2 layers" nr_ulsim -n300 -b14 -I15 -i 0,1 -g B,l -t70 -u 1 -m2 -R106 -r106 -U 1,1,1,2 -W2 -y2 -z2 -s1.7 -S1.7) -add_physim_test(physim.5g.nr_ulsim.3gpp.test26 "3GPP G-FR1-A3-27, PUSCH Type B, 40 MHz BW, 30 kHz SCS, 4 RX Antennas Requirements Test, 2 layers" nr_ulsim -n300 -b14 -I15 -i 0,1 -g B,l -t70 -u 1 -m2 -R106 -r106 -U 1,1,1,2 -W2 -y2 -z4 -s-2.1 -S-2.1) -add_physim_test(physim.5g.nr_ulsim.3gpp.test27 "3GPP G-FR1-A4-27, PUSCH Type B, 40 MHz BW, 30 kHz SCS, 2 RX Antennas Requirements Test, 2 layers" nr_ulsim -n300 -b14 -I15 -i 0,1 -g C,l -t70 -u 1 -m16 -R106 -r106 -U 1,1,1,2 -W2 -y2 -z2 -s18.7 -S18.7) -add_physim_test(physim.5g.nr_ulsim.3gpp.test28 "3GPP G-FR1-A4-27, PUSCH Type B, 40 MHz BW, 30 kHz SCS, 4 RX Antennas Requirements Test, 2 layers" nr_ulsim -n300 -b14 -I15 -i 0,1 -g C,l -t70 -u 1 -m16 -R106 -r106 -U 1,1,1,2 -W2 -y2 -z4 -s11.2 -S11.2) +add_physim_test(physim.5g.nr_ulsim.misc.test1 "MCS 9 106 PRBs" nr_ulsim -P -n300 -m9 -r106 -s5) +add_physim_test(physim.5g.nr_ulsim.misc.test2 "MCS 16 50 PRBs" nr_ulsim -P -n300 -m16 -s10) +add_physim_test(physim.5g.nr_ulsim.misc.test3 "MCS 28 50 PRBs" nr_ulsim -P -n300 -m28 -s20) +add_physim_test(physim.5g.nr_ulsim.misc.test4 "MCS 27 50 PRBs 256QAM" nr_ulsim -P -n300 -m27 -s25 -q1) +add_physim_test(physim.5g.nr_ulsim.misc.test5 "MCS 9 217 PRBs" nr_ulsim -P -n300 -m9 -R217 -r217 -s5) +add_physim_test(physim.5g.nr_ulsim.misc.test6 "MCS 9 273 PRBs" nr_ulsim -P -n300 -m9 -R273 -r273 -s5) +add_physim_test(physim.5g.nr_ulsim.misc.test7 "PUSCH Type A, 2 DMRS Symbols" nr_ulsim -P -n300 -s5 -U 0,1,1,1) +add_physim_test(physim.5g.nr_ulsim.misc.test8 "PUSCH Type A, 3 DMRS, 4 PTRS, 5 Interpolated Symbols" nr_ulsim -P -n300 -s5 -T 1,2 -U 0,2,1,1) +add_physim_test(physim.5g.nr_ulsim.misc.test9 "PUSCH Type B, 3 DMRS, 2 PTRS, 7 Interpolated Symbols" nr_ulsim -P -n300 -s5 -T 2,2 -U 1,2,1,1) +add_physim_test(physim.5g.nr_ulsim.misc.test10 "PUSCH Type B, 3 DMRS, 2 PTRS, 3 Interpolated Symbols" nr_ulsim -P -n300 -s5 -a4 -b8 -T 1,2 -U 1,3,1,1) +add_physim_test(physim.5g.nr_ulsim.misc.test11 "25 PRBs, 15 kHz SCS" nr_ulsim -P -n300 -u0 -m0 -R25 -r25 -i 1,0) +add_physim_test(physim.5g.nr_ulsim.misc.test12 "32 PRBs, 120 kHz SCS" nr_ulsim -P -n300 -s5 -r32 -R32 -u3) +add_physim_test(physim.5g.nr_ulsim.misc.test13 "MCS 0, low SNR performance" nr_ulsim -P -n300 -m0 -S -0.6 -i 1,0) +add_physim_test(physim.5g.nr_ulsim.misc.test14 "MCS 28, 106 PRBs, Time shift 8" nr_ulsim -P -n300 -m28 -R106 -r106 -t90 -s24 -S24 -d 8) +add_physim_test(physim.5g.nr_ulsim.misc.test15 "SRS, SNR 40 dB" nr_ulsim -P -n300 -s40 -E 1) +add_physim_test(physim.5g.nr_ulsim.sc-fdma.test1 "SC-FDMA, 50 PRBs" nr_ulsim -P -n300 -s5 -Z) +add_physim_test(physim.5g.nr_ulsim.sc-fdma.test2 "SC-FDMA, 75 PRBs" nr_ulsim -P -n300 -s5 -Z -r75) +add_physim_test(physim.5g.nr_ulsim.sc-fdma.test3 "SC-FDMA, 216 PRBs" nr_ulsim -P -n150 -s5 -Z -r216 -R217) +add_physim_test(physim.5g.nr_ulsim.sc-fdma.test4 "SC-FDMA, 273 PRBs" nr_ulsim -P -n150 -s5 -Z -r270 -R273) +add_physim_test(physim.5g.nr_ulsim.sc-fdma.test5 "SC-FDMA, 3 DMRS" nr_ulsim -P -n300 -s5 -Z -U 0,2,1,2) +add_physim_test(physim.5g.nr_ulsim.mimo.test1 "MCS 19 50 PRBs 2 RX_Antenna" nr_ulsim -P -n300 -m19 -s10 -S15 -z2) +add_physim_test(physim.5g.nr_ulsim.mimo.test2 "MCS 9 106 PRBs MIMO 2 layers" nr_ulsim -P -n300 -m9 -r106 -s8 -W2 -y2 -z2) +add_physim_test(physim.5g.nr_ulsim.mimo.test3 "MCS 10 106 PRBs MIMO 2 layers" nr_ulsim -P -n300 -m10 -r106 -s12 -W2 -y2 -z2) +add_physim_test(physim.5g.nr_ulsim.mimo.test4 "MCS 19 106 PRBs MIMO 2 layers" nr_ulsim -P -n300 -m19 -r106 -s22 -W2 -y2 -z2) +add_physim_test(physim.5g.nr_ulsim.mimo.test5 "MCS 9 106 PRBs MIMO 4 layers" nr_ulsim -P -n300 -m9 -r106 -s10 -W4 -y4 -z4) +add_physim_test(physim.5g.nr_ulsim.3gpp.test1 "3GPP G-FR1-A5-13, PUSCH Type A, 40 MHz BW, 30 kHz SCS, 2 RX Antennas Requirements Test" nr_ulsim -P -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R106 -r106 -U 0,1,1,2 -z2 -s12.4 -S12.4) +add_physim_test(physim.5g.nr_ulsim.3gpp.test2 "3GPP G-FR1-A5-13, PUSCH Type A, 40 MHz BW, 30 kHz SCS, 4 RX Antennas Requirements Test" nr_ulsim -P -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R106 -r106 -U 0,1,1,2 -z4 -s8.5 -S8.5) +add_physim_test(physim.5g.nr_ulsim.3gpp.test3 "3GPP G-FR1-A5-13, PUSCH Type A, 40 MHz BW, 30 kHz SCS, 8 RX Antennas Requirements Test" nr_ulsim -P -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R106 -r106 -U 0,1,1,2 -z8 -s5.4 -S5.4) +add_physim_test(physim.5g.nr_ulsim.3gpp.test4 "3GPP G-FR1-A5-8, PUSCH Type B, 5 MHz BW, 15 kHz SCS, 2 RX Antennas Requirements Test" nr_ulsim -P -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 0 -m20 -R25 -r25 -U 1,1,1,2 -z2 -s12.5 -S12.5) +add_physim_test(physim.5g.nr_ulsim.3gpp.test5 "3GPP G-FR1-A5-8, PUSCH Type B, 5 MHz BW, 15 kHz SCS, 4 RX Antennas Requirements Test" nr_ulsim -P -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 0 -m20 -R25 -r25 -U 1,1,1,2 -z4 -s8.9 -S8.9) +add_physim_test(physim.5g.nr_ulsim.3gpp.test6 "3GPP G-FR1-A5-8, PUSCH Type B, 5 MHz BW, 15 kHz SCS, 8 RX Antennas Requirements Test" nr_ulsim -P -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 0 -m20 -R25 -r25 -U 1,1,1,2 -z8 -s5.7 -S5.7) +add_physim_test(physim.5g.nr_ulsim.3gpp.test7 "3GPP G-FR1-A5-9, PUSCH Type B, 10 MHz BW, 15 kHz SCS, 2 RX Antennas Requirements Test" nr_ulsim -P -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 0 -m20 -R52 -r52 -U 1,1,1,2 -z2 -s12.6 -S12.6) +add_physim_test(physim.5g.nr_ulsim.3gpp.test8 "3GPP G-FR1-A5-9, PUSCH Type B, 10 MHz BW, 15 kHz SCS, 4 RX Antennas Requirements Test" nr_ulsim -P -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 0 -m20 -R52 -r52 -U 1,1,1,2 -z4 -s8.9 -S8.9) +add_physim_test(physim.5g.nr_ulsim.3gpp.test9 "3GPP G-FR1-A5-9, PUSCH Type B, 10 MHz BW, 15 kHz SCS, 8 RX Antennas Requirements Test" nr_ulsim -P -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 0 -m20 -R52 -r52 -U 1,1,1,2 -z8 -s5.8 -S5.8) +add_physim_test(physim.5g.nr_ulsim.3gpp.test10 "3GPP G-FR1-A5-10, PUSCH Type B, 20 MHz BW, 15 kHz SCS, 2 RX Antennas Requirements Test" nr_ulsim -P -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 0 -m20 -R106 -r106 -U 1,1,1,2 -z2 -s12.3 -S12.3) +add_physim_test(physim.5g.nr_ulsim.3gpp.test11 "3GPP G-FR1-A5-10, PUSCH Type B, 20 MHz BW, 15 kHz SCS, 4 RX Antennas Requirements Test" nr_ulsim -P -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 0 -m20 -R106 -r106 -U 1,1,1,2 -z4 -s8.8 -S8.8) +add_physim_test(physim.5g.nr_ulsim.3gpp.test12 "3GPP G-FR1-A5-10, PUSCH Type B, 20 MHz BW, 15 kHz SCS, 8 RX Antennas Requirements Test" nr_ulsim -P -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 0 -m20 -R106 -r106 -U 1,1,1,2 -z8 -s5.7 -S5.7) +add_physim_test(physim.5g.nr_ulsim.3gpp.test13 "3GPP G-FR1-A5-11, PUSCH Type B, 10 MHz BW, 30 kHz SCS, 2 RX Antennas Requirements Test" nr_ulsim -P -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R24 -r24 -U 1,1,1,2 -z2 -s12.5 -S12.5) +add_physim_test(physim.5g.nr_ulsim.3gpp.test14 "3GPP G-FR1-A5-11, PUSCH Type B, 10 MHz BW, 30 kHz SCS, 4 RX Antennas Requirements Test" nr_ulsim -P -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R24 -r24 -U 1,1,1,2 -z4 -s8.6 -S8.6) +add_physim_test(physim.5g.nr_ulsim.3gpp.test15 "3GPP G-FR1-A5-11, PUSCH Type B, 10 MHz BW, 30 kHz SCS, 8 RX Antennas Requirements Test" nr_ulsim -P -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R24 -r24 -U 1,1,1,2 -z8 -s5.6 -S5.6) +add_physim_test(physim.5g.nr_ulsim.3gpp.test16 "3GPP G-FR1-A5-12, PUSCH Type B, 20 MHz BW, 30 kHz SCS, 2 RX Antennas Requirements Test" nr_ulsim -P -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R51 -r51 -U 1,1,1,2 -z2 -s12.5 -S12.5) +add_physim_test(physim.5g.nr_ulsim.3gpp.test17 "3GPP G-FR1-A5-12, PUSCH Type B, 20 MHz BW, 30 kHz SCS, 4 RX Antennas Requirements Test" nr_ulsim -P -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R51 -r51 -U 1,1,1,2 -z4 -s8.6 -S8.6) +add_physim_test(physim.5g.nr_ulsim.3gpp.test18 "3GPP G-FR1-A5-12, PUSCH Type B, 20 MHz BW, 30 kHz SCS, 8 RX Antennas Requirements Test" nr_ulsim -P -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R51 -r51 -U 1,1,1,2 -z8 -s5.6 -S5.6) +add_physim_test(physim.5g.nr_ulsim.3gpp.test19 "3GPP G-FR1-A5-13, PUSCH Type B, 40 MHz BW, 30 kHz SCS, 2 RX Antennas Requirements Test" nr_ulsim -P -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R106 -r106 -U 1,1,1,2 -z2 -s12.5 -S12.5) +add_physim_test(physim.5g.nr_ulsim.3gpp.test20 "3GPP G-FR1-A5-13, PUSCH Type B, 40 MHz BW, 30 kHz SCS, 4 RX Antennas Requirements Test" nr_ulsim -P -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R106 -r106 -U 1,1,1,2 -z4 -s8.7 -S8.7) +add_physim_test(physim.5g.nr_ulsim.3gpp.test21 "3GPP G-FR1-A5-13, PUSCH Type B, 40 MHz BW, 30 kHz SCS, 8 RX Antennas Requirements Test" nr_ulsim -P -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R106 -r106 -U 1,1,1,2 -z8 -s5.5 -S5.5) +add_physim_test(physim.5g.nr_ulsim.3gpp.test22 "3GPP G-FR1-A5-14, PUSCH Type B, 100 MHz BW, 30 kHz SCS, 2 RX Antennas Requirements Test" nr_ulsim -P -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R273 -r273 -U 1,1,1,2 -z2 -s13.1 -S13.1) +add_physim_test(physim.5g.nr_ulsim.3gpp.test23 "3GPP G-FR1-A5-14, PUSCH Type B, 100 MHz BW, 30 kHz SCS, 4 RX Antennas Requirements Test" nr_ulsim -P -n300 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R273 -r273 -U 1,1,1,2 -z4 -s9.2 -S9.2) +add_physim_test(physim.5g.nr_ulsim.3gpp.test24 "3GPP G-FR1-A5-14, PUSCH Type B, 100 MHz BW, 30 kHz SCS, 8 RX Antennas Requirements Test" nr_ulsim -P -n300 -b14 -I8 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R273 -r273 -U 1,1,1,2 -z8 -s5.9 -S5.9) +add_physim_test(physim.5g.nr_ulsim.3gpp.test25 "3GPP G-FR1-A3-27, PUSCH Type B, 40 MHz BW, 30 kHz SCS, 2 RX Antennas Requirements Test, 2 layers" nr_ulsim -P -n300 -b14 -I15 -i 0,1 -g B,l -t70 -u 1 -m2 -R106 -r106 -U 1,1,1,2 -W2 -y2 -z2 -s1.7 -S1.7) +add_physim_test(physim.5g.nr_ulsim.3gpp.test26 "3GPP G-FR1-A3-27, PUSCH Type B, 40 MHz BW, 30 kHz SCS, 4 RX Antennas Requirements Test, 2 layers" nr_ulsim -P -n300 -b14 -I15 -i 0,1 -g B,l -t70 -u 1 -m2 -R106 -r106 -U 1,1,1,2 -W2 -y2 -z4 -s-2.1 -S-2.1) +add_physim_test(physim.5g.nr_ulsim.3gpp.test27 "3GPP G-FR1-A4-27, PUSCH Type B, 40 MHz BW, 30 kHz SCS, 2 RX Antennas Requirements Test, 2 layers" nr_ulsim -P -n300 -b14 -I15 -i 0,1 -g C,l -t70 -u 1 -m16 -R106 -r106 -U 1,1,1,2 -W2 -y2 -z2 -s18.7 -S18.7) +add_physim_test(physim.5g.nr_ulsim.3gpp.test28 "3GPP G-FR1-A4-27, PUSCH Type B, 40 MHz BW, 30 kHz SCS, 4 RX Antennas Requirements Test, 2 layers" nr_ulsim -P -n300 -b14 -I15 -i 0,1 -g C,l -t70 -u 1 -m16 -R106 -r106 -U 1,1,1,2 -W2 -y2 -z4 -s11.2 -S11.2) #################################################################################### ###### nr_prachsim unit test ###### From 3e7977438673e26f8443ae3fef8aca5f034ef22f Mon Sep 17 00:00:00 2001 From: Jaroslava Fiedlerova Date: Mon, 22 Sep 2025 10:37:05 +0200 Subject: [PATCH 02/22] Enable DLSCH performance logging in nr_dlsim --- openair1/SIMULATION/tests/CMakeLists.txt | 56 ++++++++++++------------ 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/openair1/SIMULATION/tests/CMakeLists.txt b/openair1/SIMULATION/tests/CMakeLists.txt index 1d41b1fba9..443db31c95 100644 --- a/openair1/SIMULATION/tests/CMakeLists.txt +++ b/openair1/SIMULATION/tests/CMakeLists.txt @@ -181,34 +181,34 @@ add_physim_test(physim.5g.nr_pbchsim.otherSCS.test2 "PBCH-only, 120Khz, 50Mhz" n ###### nr_dlsim unit test ###### #################################################################################### -add_physim_test(physim.5g.nr_dlsim.basic.test1 "106 PRB" nr_dlsim -n300 -R106 -b106 -s5) -add_physim_test(physim.5g.nr_dlsim.basic.test2 "217 PRB" nr_dlsim -n300 -R217 -b217 -s5) -add_physim_test(physim.5g.nr_dlsim.basic.test3 "273 PRB" nr_dlsim -n300 -R273 -b273 -s5) -add_physim_test(physim.5g.nr_dlsim.basic.test4 "HARQ test 25% TP 4 rounds" nr_dlsim -n300 -s1 -S2 -t25) -add_physim_test(physim.5g.nr_dlsim.basic.test5 "HARQ test 33% TP 3 rounds" nr_dlsim -n300 -s1 -S2 -t33) -add_physim_test(physim.5g.nr_dlsim.basic.test6 "HARQ test 50% TP 2 rounds" nr_dlsim -n300 -s5 -S7 -t50) -add_physim_test(physim.5g.nr_dlsim.basic.test7 "25 PRBs, 15 kHz SCS" nr_dlsim -n300 -m0 -e0 -R25 -b25 -i 2 1 0) -add_physim_test(physim.5g.nr_dlsim.basic.test8 "32 PRBs, 120 kHz SCS" nr_dlsim -n300 -s5 -m3 -R32 -b32) -add_physim_test(physim.5g.nr_dlsim.offset.test1 "106 PRB 25 PDSCH-Offset" nr_dlsim -n300 -R106 -a25 -s5) -add_physim_test(physim.5g.nr_dlsim.offset.test2 "106 PRB 51 PDSCH-Offset" nr_dlsim -n300 -R106 -a51 -s5) -add_physim_test(physim.5g.nr_dlsim.offset.test3 "217 PRB 100 PDSCH-PRBs" nr_dlsim -n300 -R217 -b100 -s5) -add_physim_test(physim.5g.nr_dlsim.offset.test4 "217 PRB 80 PDSCH-Offset" nr_dlsim -n300 -R217 -a80 -s5) -add_physim_test(physim.5g.nr_dlsim.offset.test5 "217 PRB 100 PDSCH-PRBs 110 PDSCH-Offset" nr_dlsim -n300 -R217 -a110 -s5 -b100) -add_physim_test(physim.5g.nr_dlsim.mcs.mimo.test1 "106 PRBs 50 PDSCH-PRBs MCS Index 27" nr_dlsim -n300 -e27 -s30) -add_physim_test(physim.5g.nr_dlsim.mcs.mimo.test2 "106 PRBs 50 PDSCH-PRBs MCS Index 16" nr_dlsim -n300 -e16 -s11 -S13) -add_physim_test(physim.5g.nr_dlsim.mcs.mimo.test3 "106 MCS-TABLE 256 QAM MCS Index 26" nr_dlsim -n300 -q1 -e26 -s30) -add_physim_test(physim.5g.nr_dlsim.mcs.mimo.test4 "106 MCS-TABLE 256 QAM Fading Channel" nr_dlsim -n300 -q1 -e24 -s30 -gA) -add_physim_test(physim.5g.nr_dlsim.mcs.mimo.test5 "MCS 0, low SNR performance" nr_dlsim -n300 -e0 -t95 -S-1.0 -i 2 1 0) -add_physim_test(physim.5g.nr_dlsim.mcs.mimo.test6 "4x4 MIMO, 1 Layer" nr_dlsim -n30 -s20 -U 3 0 0 2 -gA -x1 -y4 -z4) -add_physim_test(physim.5g.nr_dlsim.mcs.mimo.test7 "4x4 MIMO, 2 Layers" nr_dlsim -n30 -s20 -U 3 0 0 2 -gA -x2 -y4 -z4) -add_physim_test(physim.5g.nr_dlsim.mcs.mimo.test8 "4x4 MIMO, 2 Layers 256 QAM" nr_dlsim -n30 -s25 -e22 -q1 -U 3 0 0 2 -gA -x2 -y4 -z4) -add_physim_test(physim.5g.nr_dlsim.mcs.mimo.test9 "4x4 MIMO, 4 Layers" nr_dlsim -n30 -s20 -U 3 0 0 2 -x4 -y4 -z4) -add_physim_test(physim.5g.nr_dlsim.dmrs.ptrs.test1 "3 PTRS, 8 Interpolated Symbols" nr_dlsim -n300 -s5 -T 2 2 2) -add_physim_test(physim.5g.nr_dlsim.dmrs.ptrs.test2 "6 PTRS, 5 Interpolated Symbols" nr_dlsim -n300 -s5 -T 2 1 2) -add_physim_test(physim.5g.nr_dlsim.dmrs.ptrs.test3 "11 PTRS, 0 Interpolated Symbols" nr_dlsim -n300 -s5 -T 2 0 4) -add_physim_test(physim.5g.nr_dlsim.dmrs.ptrs.test4 "Mapping type A, 2 DMRS Symbols" nr_dlsim -n300 -s5 -S7 -U 2 0 1) -add_physim_test(physim.5g.nr_dlsim.dmrs.ptrs.test5 "Mapping type A, 3 DMRS Symbols" nr_dlsim -n300 -s5 -S7 -U 2 0 2) -add_physim_test(physim.5g.nr_dlsim.dmrs.ptrs.test6 "Mapping type B, 4 DMRS Symbols" nr_dlsim -n300 -s5 -S7 -U 2 1 3) +add_physim_test(physim.5g.nr_dlsim.basic.test1 "106 PRB" nr_dlsim -P -n300 -R106 -b106 -s5) +add_physim_test(physim.5g.nr_dlsim.basic.test2 "217 PRB" nr_dlsim -P -n300 -R217 -b217 -s5) +add_physim_test(physim.5g.nr_dlsim.basic.test3 "273 PRB" nr_dlsim -P -n300 -R273 -b273 -s5) +add_physim_test(physim.5g.nr_dlsim.basic.test4 "HARQ test 25% TP 4 rounds" nr_dlsim -P -n300 -s1 -S2 -t25) +add_physim_test(physim.5g.nr_dlsim.basic.test5 "HARQ test 33% TP 3 rounds" nr_dlsim -P -n300 -s1 -S2 -t33) +add_physim_test(physim.5g.nr_dlsim.basic.test6 "HARQ test 50% TP 2 rounds" nr_dlsim -P -n300 -s5 -S7 -t50) +add_physim_test(physim.5g.nr_dlsim.basic.test7 "25 PRBs, 15 kHz SCS" nr_dlsim -P -n300 -m0 -e0 -R25 -b25 -i 2 1 0) +add_physim_test(physim.5g.nr_dlsim.basic.test8 "32 PRBs, 120 kHz SCS" nr_dlsim -P -n300 -s5 -m3 -R32 -b32) +add_physim_test(physim.5g.nr_dlsim.offset.test1 "106 PRB 25 PDSCH-Offset" nr_dlsim -P -n300 -R106 -a25 -s5) +add_physim_test(physim.5g.nr_dlsim.offset.test2 "106 PRB 51 PDSCH-Offset" nr_dlsim -P -n300 -R106 -a51 -s5) +add_physim_test(physim.5g.nr_dlsim.offset.test3 "217 PRB 100 PDSCH-PRBs" nr_dlsim -P -n300 -R217 -b100 -s5) +add_physim_test(physim.5g.nr_dlsim.offset.test4 "217 PRB 80 PDSCH-Offset" nr_dlsim -P -n300 -R217 -a80 -s5) +add_physim_test(physim.5g.nr_dlsim.offset.test5 "217 PRB 100 PDSCH-PRBs 110 PDSCH-Offset" nr_dlsim -P -n300 -R217 -a110 -s5 -b100) +add_physim_test(physim.5g.nr_dlsim.mcs.mimo.test1 "106 PRBs 50 PDSCH-PRBs MCS Index 27" nr_dlsim -P -n300 -e27 -s30) +add_physim_test(physim.5g.nr_dlsim.mcs.mimo.test2 "106 PRBs 50 PDSCH-PRBs MCS Index 16" nr_dlsim -P -n300 -e16 -s11 -S13) +add_physim_test(physim.5g.nr_dlsim.mcs.mimo.test3 "106 MCS-TABLE 256 QAM MCS Index 26" nr_dlsim -P -n300 -q1 -e26 -s30) +add_physim_test(physim.5g.nr_dlsim.mcs.mimo.test4 "106 MCS-TABLE 256 QAM Fading Channel" nr_dlsim -P -n300 -q1 -e24 -s30 -gA) +add_physim_test(physim.5g.nr_dlsim.mcs.mimo.test5 "MCS 0, low SNR performance" nr_dlsim -P -n300 -e0 -t95 -S-1.0 -i 2 1 0) +add_physim_test(physim.5g.nr_dlsim.mcs.mimo.test6 "4x4 MIMO, 1 Layer" nr_dlsim -P -n30 -s20 -U 3 0 0 2 -gA -x1 -y4 -z4) +add_physim_test(physim.5g.nr_dlsim.mcs.mimo.test7 "4x4 MIMO, 2 Layers" nr_dlsim -P -n30 -s20 -U 3 0 0 2 -gA -x2 -y4 -z4) +add_physim_test(physim.5g.nr_dlsim.mcs.mimo.test8 "4x4 MIMO, 2 Layers 256 QAM" nr_dlsim -P -n30 -s25 -e22 -q1 -U 3 0 0 2 -gA -x2 -y4 -z4) +add_physim_test(physim.5g.nr_dlsim.mcs.mimo.test9 "4x4 MIMO, 4 Layers" nr_dlsim -P -n30 -s20 -U 3 0 0 2 -x4 -y4 -z4) +add_physim_test(physim.5g.nr_dlsim.dmrs.ptrs.test1 "3 PTRS, 8 Interpolated Symbols" nr_dlsim -P -n300 -s5 -T 2 2 2) +add_physim_test(physim.5g.nr_dlsim.dmrs.ptrs.test2 "6 PTRS, 5 Interpolated Symbols" nr_dlsim -P -n300 -s5 -T 2 1 2) +add_physim_test(physim.5g.nr_dlsim.dmrs.ptrs.test3 "11 PTRS, 0 Interpolated Symbols" nr_dlsim -P -n300 -s5 -T 2 0 4) +add_physim_test(physim.5g.nr_dlsim.dmrs.ptrs.test4 "Mapping type A, 2 DMRS Symbols" nr_dlsim -P -n300 -s5 -S7 -U 2 0 1) +add_physim_test(physim.5g.nr_dlsim.dmrs.ptrs.test5 "Mapping type A, 3 DMRS Symbols" nr_dlsim -P -n300 -s5 -S7 -U 2 0 2) +add_physim_test(physim.5g.nr_dlsim.dmrs.ptrs.test6 "Mapping type B, 4 DMRS Symbols" nr_dlsim -P -n300 -s5 -S7 -U 2 1 3) #################################################################################### ###### nr_dlschsim unit test ###### From 799934024e5fd406ac44d4d1d324fe3715b6ecb9 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Wed, 4 Jun 2025 14:36:53 +0100 Subject: [PATCH 03/22] SRS-based noise calculation using holes --- .../NR_ESTIMATION/nr_ul_channel_estimation.c | 162 ++++++++---------- openair1/PHY/NR_ESTIMATION/nr_ul_estimation.h | 1 + .../PHY/NR_TRANSPORT/nr_transport_proto.h | 3 +- openair1/PHY/NR_TRANSPORT/srs_rx.c | 48 +++--- openair1/PHY/TOOLS/tools_defs.h | 9 + .../PHY/nr_phy_common/src/nr_phy_common_srs.c | 7 +- openair1/SCHED_NR/phy_procedures_nr_gNB.c | 8 +- openair1/SIMULATION/NR_PHY/ulsim.c | 12 +- 8 files changed, 124 insertions(+), 126 deletions(-) diff --git a/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c b/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c index 7ec67ffbc5..77c6429b5c 100644 --- a/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c +++ b/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c @@ -777,6 +777,7 @@ int nr_srs_channel_estimation( const nr_srs_info_t *nr_srs_info, const c16_t **srs_generated_signal, c16_t srs_received_signal[][gNB->frame_parms.ofdm_symbol_size * (1 << srs_pdu->num_symbols)], + c16_t srs_received_noise[][gNB->frame_parms.ofdm_symbol_size * (1 << srs_pdu->num_symbols)], c16_t srs_estimated_channel_freq[][1 << srs_pdu->num_ant_ports] [gNB->frame_parms.ofdm_symbol_size * (1 << srs_pdu->num_symbols)], c16_t srs_estimated_channel_time[][1 << srs_pdu->num_ant_ports][gNB->frame_parms.ofdm_symbol_size], @@ -801,16 +802,6 @@ int nr_srs_channel_estimation( } c16_t srs_ls_estimated_channel[frame_parms->ofdm_symbol_size * (1 << srs_pdu->num_symbols)]; - uint32_t noise_power_per_rb[srs_pdu->bwp_size]; - - const uint32_t arr_len = frame_parms->nb_antennas_rx * N_ap * M_sc_b_SRS; - - c16_t ch[arr_len]; - memset(ch, 0, arr_len * sizeof(c16_t)); - - c16_t noise[arr_len]; - memset(noise, 0, arr_len * sizeof(c16_t)); - uint8_t mem_offset = ((16 - ((intptr_t)&srs_estimated_channel_freq[0][0][subcarrier_offset + nr_srs_info->k_0_p[0][0]])) & 0xF) >> 2; // >> 2 <=> /sizeof(int32_t) @@ -831,7 +822,7 @@ int nr_srs_channel_estimation( #endif uint16_t subcarrier = subcarrier_offset + nr_srs_info->k_0_p[p_index][0]; - if (subcarrier > frame_parms->ofdm_symbol_size) { + if (subcarrier >= frame_parms->ofdm_symbol_size) { subcarrier -= frame_parms->ofdm_symbol_size; } @@ -843,19 +834,12 @@ int nr_srs_channel_estimation( uint16_t subcarrier_cdm = subcarrier; for (int cdm_idx = 0; cdm_idx < fd_cdm; cdm_idx++) { - int16_t generated_real = srs_generated_signal[p_index][subcarrier_cdm].r; - int16_t generated_imag = srs_generated_signal[p_index][subcarrier_cdm].i; - - int16_t received_real = srs_received_signal[ant][subcarrier_cdm].r; - int16_t received_imag = srs_received_signal[ant][subcarrier_cdm].i; - - // We know that nr_srs_info->srs_generated_signal_bits bits are enough to represent the generated_real and - // generated_imag. So we only need a nr_srs_info->srs_generated_signal_bits shift to ensure that the result fits into 16 + c16_t generated_srs = srs_generated_signal[p_index][subcarrier_cdm]; + c16_t received_srs = srs_received_signal[ant][subcarrier_cdm]; + // We know that nr_srs_info->srs_generated_signal_bits bits are enough to represent the real and imaginary parts of + // generated_srs. So we only need a nr_srs_info->srs_generated_signal_bits shift to ensure that the result fits into 16 // bits. - ls_estimated.r += (int16_t)(((int32_t)generated_real * received_real + (int32_t)generated_imag * received_imag) - >> nr_srs_info->srs_generated_signal_bits); - ls_estimated.i += (int16_t)(((int32_t)generated_real * received_imag - (int32_t)generated_imag * received_real) - >> nr_srs_info->srs_generated_signal_bits); + ls_estimated = c16maddConjShift(generated_srs, received_srs, ls_estimated, nr_srs_info->srs_generated_signal_bits); // Subcarrier increment subcarrier_cdm += K_TC; @@ -934,7 +918,7 @@ int nr_srs_channel_estimation( // Subcarrier increment subcarrier += K_TC; if (subcarrier >= frame_parms->ofdm_symbol_size) { - subcarrier = subcarrier - frame_parms->ofdm_symbol_size; + subcarrier -= frame_parms->ofdm_symbol_size; } } // for (int k = 0; k < M_sc_b_SRS; k++) @@ -943,25 +927,9 @@ int nr_srs_channel_estimation( &srs_est[mem_offset], (frame_parms->ofdm_symbol_size * (1 << srs_pdu->num_symbols)) * sizeof(c16_t)); - // Compute noise - subcarrier = subcarrier_offset + nr_srs_info->k_0_p[p_index][0]; - if (subcarrier > frame_parms->ofdm_symbol_size) { - subcarrier -= frame_parms->ofdm_symbol_size; - } - uint16_t base_idx = ant * N_ap * M_sc_b_SRS + p_index * M_sc_b_SRS; - for (int k = 0; k < M_sc_b_SRS; k++) { - ch[base_idx + k] = srs_estimated_channel_freq[ant][p_index][subcarrier]; - noise[base_idx + k].r = abs(srs_ls_estimated_channel[subcarrier].r - ch[base_idx + k].r); - noise[base_idx + k].i = abs(srs_ls_estimated_channel[subcarrier].i - ch[base_idx + k].i); - subcarrier += K_TC; - if (subcarrier >= frame_parms->ofdm_symbol_size) { - subcarrier = subcarrier - frame_parms->ofdm_symbol_size; - } - } - #ifdef SRS_DEBUG subcarrier = subcarrier_offset + nr_srs_info->k_0_p[p_index][0]; - if (subcarrier > frame_parms->ofdm_symbol_size) { + if (subcarrier >= frame_parms->ofdm_symbol_size) { subcarrier -= frame_parms->ofdm_symbol_size; } @@ -983,13 +951,13 @@ int nr_srs_channel_estimation( srs_ls_estimated_channel[subcarrier].i, srs_estimated_channel_freq[ant][p_index][subcarrier].r, srs_estimated_channel_freq[ant][p_index][subcarrier].i, - noise[base_idx + (k / K_TC)].r, - noise[base_idx + (k / K_TC)].i); + srs_received_noise[ant][subcarrier].r, + srs_received_noise[ant][subcarrier].i); // Subcarrier increment subcarrier++; if (subcarrier >= frame_parms->ofdm_symbol_size) { - subcarrier = subcarrier - frame_parms->ofdm_symbol_size; + subcarrier -= frame_parms->ofdm_symbol_size; } } #endif @@ -1010,61 +978,71 @@ int nr_srs_channel_estimation( } // for (int p_index = 0; p_index < N_ap; p_index++) } // for (int ant = 0; ant < frame_parms->nb_antennas_rx; ant++) - // Compute signal power - uint32_t signal_power = max(signal_energy_nodc(ch, arr_len), 1); - -#ifdef SRS_DEBUG - LOG_I(NR_PHY, "signal_power = %u\n", signal_power); -#endif - + // Compute wideband SNR + int tot_subcarriers = m_SRS_b * NR_NB_SC_PER_RB; + uint32_t signal_power = 0; + uint32_t noise_power = 0; + for (int ant = 0; ant < frame_parms->nb_antennas_rx; ant++) { + for (int p_index = 0; p_index < N_ap; p_index++) { + uint16_t subcarrier0 = subcarrier_offset + nr_srs_info->k_0_p[p_index][0]; + if (subcarrier0 >= frame_parms->ofdm_symbol_size) { + subcarrier0 -= frame_parms->ofdm_symbol_size; + } + if (subcarrier0 + tot_subcarriers < frame_parms->ofdm_symbol_size) { + signal_power += signal_energy_nodc(&srs_estimated_channel_freq[ant][p_index][subcarrier0], tot_subcarriers); + if (p_index == 0) + noise_power += signal_energy_nodc(&srs_received_noise[ant][subcarrier0], tot_subcarriers); + } else { + int size1 = frame_parms->ofdm_symbol_size - subcarrier0; + int size2 = tot_subcarriers - size1; + uint64_t signal_power_p1 = signal_energy_nodc(&srs_estimated_channel_freq[ant][p_index][subcarrier0], size1) * size1; + uint64_t signal_power_p2 = signal_energy_nodc(&srs_estimated_channel_freq[ant][p_index][0], size2) * size2; + signal_power += (signal_power_p1 + signal_power_p2) / tot_subcarriers; + if (p_index == 0) { + uint64_t noise_power_p1 = signal_energy_nodc(&srs_received_noise[ant][subcarrier0], size1) * size1; + uint64_t noise_power_p2 = signal_energy_nodc(&srs_received_noise[ant][0], size2) * size2; + noise_power += (noise_power_p1 + noise_power_p2) / tot_subcarriers; + } + } + } + } + signal_power = max(signal_power / (frame_parms->nb_antennas_rx * N_ap), 1); + noise_power = max(noise_power / (frame_parms->nb_antennas_rx), 1); if (signal_power == 0) { LOG_W(NR_PHY, "Received SRS signal power is 0\n"); return -1; } - - // Compute noise power - const uint8_t srs_symbols_per_rb = srs_pdu->comb_size == 0 ? 6 : 3; - const uint8_t n_noise_est = frame_parms->nb_antennas_rx * N_ap * srs_symbols_per_rb; - uint64_t sum_re = 0; - uint64_t sum_re2 = 0; - uint64_t sum_im = 0; - uint64_t sum_im2 = 0; - - for (int rb = 0; rb < m_SRS_b; rb++) { - sum_re = 0; - sum_re2 = 0; - sum_im = 0; - sum_im2 = 0; - - for (int ant = 0; ant < frame_parms->nb_antennas_rx; ant++) { - for (int p_index = 0; p_index < N_ap; p_index++) { - uint16_t base_idx = ant * N_ap * M_sc_b_SRS + p_index * M_sc_b_SRS + rb * srs_symbols_per_rb; - for (int srs_symb = 0; srs_symb < srs_symbols_per_rb; srs_symb++) { - sum_re = sum_re + noise[base_idx + srs_symb].r; - sum_re2 = sum_re2 + noise[base_idx + srs_symb].r * noise[base_idx + srs_symb].r; - sum_im = sum_im + noise[base_idx + srs_symb].i; - sum_im2 = sum_im2 + noise[base_idx + srs_symb].i * noise[base_idx + srs_symb].i; - } // for (int srs_symb = 0; srs_symb < srs_symbols_per_rb; srs_symb++) - } // for (int p_index = 0; p_index < N_ap; p_index++) - } // for (int ant = 0; ant < frame_parms->nb_antennas_rx; ant++) - - noise_power_per_rb[rb] = max(sum_re2 / n_noise_est - (sum_re / n_noise_est) * (sum_re / n_noise_est) + sum_im2 / n_noise_est - - (sum_im / n_noise_est) * (sum_im / n_noise_est), - 1); - snr_per_rb[rb] = dB_fixed(signal_power) - dB_fixed(noise_power_per_rb[rb]); - -#ifdef SRS_DEBUG - LOG_I(NR_PHY, "noise_power_per_rb[%i] = %i, snr_per_rb[%i] = %i dB\n", rb, noise_power_per_rb[rb], rb, snr_per_rb[rb]); -#endif - - } // for (int rb = 0; rb < m_SRS_b; rb++) - - const uint32_t noise_power = max(signal_energy_nodc(noise, arr_len), 1); - *snr = dB_fixed(signal_power) - dB_fixed(noise_power); + // Compute SNR per RB + uint16_t subcarrier = subcarrier_offset + nr_srs_info->k_0_p[0][0]; + for (int rb = 0; rb < m_SRS_b; rb++) { + if (subcarrier >= frame_parms->ofdm_symbol_size) { + subcarrier -= frame_parms->ofdm_symbol_size; + } + uint32_t noise_power_per_rb = 0; + for (int ant = 0; ant < frame_parms->nb_antennas_rx; ant++) { + if (subcarrier + NR_NB_SC_PER_RB < frame_parms->ofdm_symbol_size) { + noise_power_per_rb += signal_energy_nodc(&srs_received_noise[ant][subcarrier], NR_NB_SC_PER_RB); + } else { + int size1 = frame_parms->ofdm_symbol_size - subcarrier; + int size2 = NR_NB_SC_PER_RB - size1; + uint32_t noise_power_per_rb1 = signal_energy_nodc(&srs_received_noise[ant][subcarrier], size1) * size1; + uint32_t noise_power_per_rb2 = signal_energy_nodc(&srs_received_noise[ant][0], size2) * size2; + noise_power_per_rb += (noise_power_per_rb1 + noise_power_per_rb2) / NR_NB_SC_PER_RB; + } + } + noise_power_per_rb = max(noise_power_per_rb / (frame_parms->nb_antennas_rx), 1); + snr_per_rb[rb] = dB_fixed(signal_power) - dB_fixed(noise_power_per_rb); + subcarrier += NR_NB_SC_PER_RB; + #ifdef SRS_DEBUG - LOG_I(NR_PHY, "noise_power = %u, SNR = %i dB\n", noise_power, *snr); + LOG_I(NR_PHY, "[RB %3i] noise_power_per_rb = %i, snr_per_rb = %i dB\n", rb, noise_power_per_rb, snr_per_rb[rb]); +#endif + } + +#ifdef SRS_DEBUG + LOG_I(NR_PHY, "signal_power = %i dB, noise_power = %i dB, SNR = %i dB\n", dB_fixed(signal_power), dB_fixed(noise_power), *snr); #endif return 0; diff --git a/openair1/PHY/NR_ESTIMATION/nr_ul_estimation.h b/openair1/PHY/NR_ESTIMATION/nr_ul_estimation.h index 203021101c..6451de12dd 100644 --- a/openair1/PHY/NR_ESTIMATION/nr_ul_estimation.h +++ b/openair1/PHY/NR_ESTIMATION/nr_ul_estimation.h @@ -84,6 +84,7 @@ int nr_srs_channel_estimation( const nr_srs_info_t *nr_srs_info, const c16_t **srs_generated_signal, c16_t srs_received_signal[][gNB->frame_parms.ofdm_symbol_size * (1 << srs_pdu->num_symbols)], + c16_t srs_received_noise[][gNB->frame_parms.ofdm_symbol_size * (1 << srs_pdu->num_symbols)], c16_t srs_estimated_channel_freq[][1 << srs_pdu->num_ant_ports] [gNB->frame_parms.ofdm_symbol_size * (1 << srs_pdu->num_symbols)], c16_t srs_estimated_channel_time[][1 << srs_pdu->num_ant_ports][gNB->frame_parms.ofdm_symbol_size], diff --git a/openair1/PHY/NR_TRANSPORT/nr_transport_proto.h b/openair1/PHY/NR_TRANSPORT/nr_transport_proto.h index 1aabf118ef..a7769dc84d 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_transport_proto.h +++ b/openair1/PHY/NR_TRANSPORT/nr_transport_proto.h @@ -242,7 +242,8 @@ int nr_get_srs_signal(PHY_VARS_gNB *gNB, slot_t slot, nfapi_nr_srs_pdu_t *srs_pdu, nr_srs_info_t *nr_srs_info, - c16_t srs_received_signal[][gNB->frame_parms.ofdm_symbol_size * (1 << srs_pdu->num_symbols)]); + c16_t srs_received_signal[][gNB->frame_parms.ofdm_symbol_size * (1 << srs_pdu->num_symbols)], + c16_t srs_received_noise[][gNB->frame_parms.ofdm_symbol_size * (1 << srs_pdu->num_symbols)]); void init_prach_list(PHY_VARS_gNB *gNB); void init_prach_ru_list(RU_t *ru); diff --git a/openair1/PHY/NR_TRANSPORT/srs_rx.c b/openair1/PHY/NR_TRANSPORT/srs_rx.c index bab88344de..3da018bf84 100644 --- a/openair1/PHY/NR_TRANSPORT/srs_rx.c +++ b/openair1/PHY/NR_TRANSPORT/srs_rx.c @@ -79,59 +79,67 @@ int nr_get_srs_signal(PHY_VARS_gNB *gNB, slot_t slot, nfapi_nr_srs_pdu_t *srs_pdu, nr_srs_info_t *nr_srs_info, - c16_t srs_received_signal[][gNB->frame_parms.ofdm_symbol_size * (1 << srs_pdu->num_symbols)]) + c16_t srs_received_signal[][gNB->frame_parms.ofdm_symbol_size * (1 << srs_pdu->num_symbols)], + c16_t srs_received_noise[][gNB->frame_parms.ofdm_symbol_size * (1 << srs_pdu->num_symbols)]) { const NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms; const uint16_t n_symbols = (slot % RU_RX_SLOT_DEPTH) * frame_parms->symbols_per_slot; // number of symbols until this slot - const uint8_t l0 = srs_pdu->time_start_position; // starting symbol in this slot + const uint8_t l0 = srs_pdu->time_start_position; // starting symbol in this slot const uint64_t symbol_offset = (n_symbols + l0) * frame_parms->ofdm_symbol_size; - const uint64_t subcarrier_offset = frame_parms->first_carrier_offset + srs_pdu->bwp_start*NR_NB_SC_PER_RB; + const uint64_t subcarrier_offset = frame_parms->first_carrier_offset + srs_pdu->bwp_start * NR_NB_SC_PER_RB; - const uint8_t N_ap = 1<num_ant_ports; + const uint8_t N_ap = 1 << srs_pdu->num_ant_ports; const uint8_t N_symb_SRS = 1 << srs_pdu->num_symbols; const uint8_t K_TC = 2 << srs_pdu->comb_size; const uint16_t M_sc_b_SRS = get_m_srs(srs_pdu->config_index, srs_pdu->bandwidth_index) * NR_NB_SC_PER_RB / K_TC; - c16_t *rx_signal; bool no_srs_signal = true; for (int ant = 0; ant < frame_parms->nb_antennas_rx; ant++) { memset(srs_received_signal[ant], 0, frame_parms->ofdm_symbol_size * sizeof(c16_t)); - rx_signal = &rxdataF[ant][symbol_offset]; + memset(srs_received_noise[ant], 0, frame_parms->ofdm_symbol_size * sizeof(c16_t)); + c16_t *rx_signal = &rxdataF[ant][symbol_offset]; for (int p_index = 0; p_index < N_ap; p_index++) { - #ifdef SRS_DEBUG - LOG_I(NR_PHY,"===== UE port %d --> gNB Rx antenna %i =====\n", p_index, ant); + LOG_I(NR_PHY, "===== UE port %d --> gNB Rx antenna %i =====\n", p_index, ant); #endif for (int l_line = 0; l_line < N_symb_SRS; l_line++) { - #ifdef SRS_DEBUG - LOG_I(NR_PHY,":::::::: OFDM symbol %d ::::::::\n", l0+l_line); + LOG_I(NR_PHY, ":::::::: OFDM symbol %d ::::::::\n", l0 + l_line); #endif uint16_t subcarrier = subcarrier_offset + nr_srs_info->k_0_p[p_index][l_line]; - if (subcarrier>frame_parms->ofdm_symbol_size) { + if (subcarrier >= frame_parms->ofdm_symbol_size) { subcarrier -= frame_parms->ofdm_symbol_size; } - uint16_t l_line_offset = l_line*frame_parms->ofdm_symbol_size; + uint16_t l_line_offset = l_line * frame_parms->ofdm_symbol_size; for (int k = 0; k < M_sc_b_SRS; k++) { - - srs_received_signal[ant][l_line_offset+subcarrier] = rx_signal[l_line_offset+subcarrier]; - + // Subcarriers with SRS symbols + srs_received_signal[ant][l_line_offset + subcarrier] = rx_signal[l_line_offset + subcarrier]; if (rx_signal[l_line_offset + subcarrier].r || rx_signal[l_line_offset + subcarrier].i) { no_srs_signal = false; } + // Subcarriers without SRS symbols and only noise + srs_received_noise[ant][l_line_offset + subcarrier] = rx_signal[l_line_offset + subcarrier + 1]; + for (int n = 1; n < K_TC; n++) { + uint16_t subcarrier_n = subcarrier + n; + if (subcarrier_n >= frame_parms->ofdm_symbol_size) { + subcarrier_n -= frame_parms->ofdm_symbol_size; + } + srs_received_noise[ant][l_line_offset + subcarrier_n] = rx_signal[l_line_offset + subcarrier_n]; + } + #ifdef SRS_DEBUG - int subcarrier_log = subcarrier-subcarrier_offset; - if(subcarrier_log < 0) { + int subcarrier_log = subcarrier - subcarrier_offset; + if (subcarrier_log < 0) { subcarrier_log = subcarrier_log + frame_parms->ofdm_symbol_size; } - if(subcarrier_log%12 == 0) { - LOG_I(NR_PHY,"------------ %d ------------\n", subcarrier_log/12); + if (subcarrier_log % 12 == 0) { + LOG_I(NR_PHY, "------------ %d ------------\n", subcarrier_log / 12); } LOG_I(NR_PHY, "(%i) \t%i\t%i\n", @@ -143,7 +151,7 @@ int nr_get_srs_signal(PHY_VARS_gNB *gNB, // Subcarrier increment subcarrier += K_TC; if (subcarrier >= frame_parms->ofdm_symbol_size) { - subcarrier=subcarrier-frame_parms->ofdm_symbol_size; + subcarrier -= frame_parms->ofdm_symbol_size; } } // for (int k = 0; k < M_sc_b_SRS; k++) diff --git a/openair1/PHY/TOOLS/tools_defs.h b/openair1/PHY/TOOLS/tools_defs.h index 9ee558c72b..281d7860e8 100644 --- a/openair1/PHY/TOOLS/tools_defs.h +++ b/openair1/PHY/TOOLS/tools_defs.h @@ -219,6 +219,7 @@ extern "C" { { return (c16_t){.r = (int16_t)((a.r * b) >> Shift), .i = (int16_t)((a.i * b) >> Shift)}; } + __attribute__((always_inline)) inline c16_t c16MulConjShift(const c16_t a, const c16_t b, const int Shift) { return (c16_t) { @@ -234,6 +235,14 @@ extern "C" { }; } + __attribute__((always_inline)) inline c16_t c16maddConjShift(const c16_t a, const c16_t b, c16_t c, const int Shift) + { + return (c16_t) { + .r = (int16_t)(((a.r * b.r + a.i * b.i ) >> Shift) + c.r), + .i = (int16_t)(((a.r * b.i - a.i * b.r ) >> Shift) + c.i) + }; + } + __attribute__((always_inline)) inline c32_t c32x16mulShift(const c16_t a, const c16_t b, const int Shift) { return (c32_t) { .r = (a.r * b.r - a.i * b.i) >> Shift, diff --git a/openair1/PHY/nr_phy_common/src/nr_phy_common_srs.c b/openair1/PHY/nr_phy_common/src/nr_phy_common_srs.c index dce62add0b..ba5d792428 100644 --- a/openair1/PHY/nr_phy_common/src/nr_phy_common_srs.c +++ b/openair1/PHY/nr_phy_common/src/nr_phy_common_srs.c @@ -304,7 +304,7 @@ bool generate_srs_nr(NR_DL_FRAME_PARMS *frame_parms, #endif uint16_t subcarrier = subcarrier_offset + k_0_p; - if (subcarrier>frame_parms->ofdm_symbol_size) + if (subcarrier >= frame_parms->ofdm_symbol_size) subcarrier -= frame_parms->ofdm_symbol_size; uint16_t l_line_offset = l_line * frame_parms->ofdm_symbol_size; // For each port, and for each OFDM symbol, here it is computed and mapped an SRS sequence with M_sc_b_SRS symbols @@ -333,9 +333,8 @@ bool generate_srs_nr(NR_DL_FRAME_PARMS *frame_parms, // Subcarrier increment subcarrier += K_TC; - if (subcarrier >= frame_parms->ofdm_symbol_size) { - subcarrier=subcarrier-frame_parms->ofdm_symbol_size; - } + if (subcarrier >= frame_parms->ofdm_symbol_size) + subcarrier -= frame_parms->ofdm_symbol_size; } // for (int k = 0; k < M_sc_b_SRS; k++) } // for (int l_line = 0; l_line < N_symb_SRS; l_line++) diff --git a/openair1/SCHED_NR/phy_procedures_nr_gNB.c b/openair1/SCHED_NR/phy_procedures_nr_gNB.c index 406fcc8038..0cb9d8d4fd 100644 --- a/openair1/SCHED_NR/phy_procedures_nr_gNB.c +++ b/openair1/SCHED_NR/phy_procedures_nr_gNB.c @@ -750,7 +750,7 @@ int fill_srs_channel_matrix(uint8_t *channel_matrix, for(int gI = 0; gI < num_gnb_antenna_elements; gI++) { uint16_t subcarrier = subcarrier_offset + nr_srs_info->k_0_p[uI][0]; - if (subcarrier>frame_parms->ofdm_symbol_size) { + if (subcarrier >= frame_parms->ofdm_symbol_size) { subcarrier -= frame_parms->ofdm_symbol_size; } @@ -769,7 +769,7 @@ int fill_srs_channel_matrix(uint8_t *channel_matrix, // Subcarrier increment subcarrier += step; if (subcarrier >= frame_parms->ofdm_symbol_size) { - subcarrier=subcarrier-frame_parms->ofdm_symbol_size; + subcarrier -= frame_parms->ofdm_symbol_size; } } } @@ -1045,6 +1045,7 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, N nfapi_nr_srs_pdu_t *srs_pdu = &srs->srs_pdu; uint8_t N_symb_SRS = 1 << srs_pdu->num_symbols; c16_t srs_received_signal[frame_parms->nb_antennas_rx][frame_parms->ofdm_symbol_size * N_symb_SRS]; + c16_t srs_received_noise[frame_parms->nb_antennas_rx][frame_parms->ofdm_symbol_size * N_symb_SRS]; c16_t srs_estimated_channel_freq[frame_parms->nb_antennas_rx][1 << srs_pdu->num_ant_ports] [frame_parms->ofdm_symbol_size * N_symb_SRS] __attribute__((aligned(32))); c16_t srs_estimated_channel_time[frame_parms->nb_antennas_rx][1 << srs_pdu->num_ant_ports][frame_parms->ofdm_symbol_size] @@ -1068,7 +1069,7 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, N stop_meas(&gNB->generate_srs_stats); c16_t **rxdataF = gNB->common_vars.rxdataF[srs->beam_nb]; start_meas(&gNB->get_srs_signal_stats); - int srs_est = nr_get_srs_signal(gNB, rxdataF, frame_rx, slot_rx, srs_pdu, gNB->nr_srs_info[i], srs_received_signal); + int srs_est = nr_get_srs_signal(gNB, rxdataF, frame_rx, slot_rx, srs_pdu, gNB->nr_srs_info[i], srs_received_signal, srs_received_noise); stop_meas(&gNB->get_srs_signal_stats); if (srs_est >= 0) { @@ -1080,6 +1081,7 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, N gNB->nr_srs_info[i], (const c16_t**)gNB->nr_srs_info[i]->srs_generated_signal, srs_received_signal, + srs_received_noise, srs_estimated_channel_freq, srs_estimated_channel_time, srs_estimated_channel_time_shifted, diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c index edab935e15..93789ba737 100644 --- a/openair1/SIMULATION/NR_PHY/ulsim.c +++ b/openair1/SIMULATION/NR_PHY/ulsim.c @@ -1733,7 +1733,12 @@ int main(int argc, char *argv[]) if (print_perf==1) { - printf("gNB RX\n"); + printf("UE TX\n"); + for (int i = PHY_PROC_TX; i <= OFDM_MOD_STATS; i++) { + printStatIndent(&UE->phy_cpu_stats.cpu_time_stats[i], UE->phy_cpu_stats.cpu_time_stats[i].meas_name); + } + + printf("\ngNB RX\n"); printDistribution(&gNB->phy_proc_rx,table_rx, "Total PHY proc rx"); printStatIndent(&gNB->rx_pusch_stats, "RX PUSCH time"); printStatIndent2(&gNB->ulsch_channel_estimation_stats, "ULSCH channel estimation time"); @@ -1744,11 +1749,6 @@ int main(int argc, char *argv[]) printStatIndent2(&gNB->ts_deinterleave, "ULSCH segment deinterleaving time"); printStatIndent2(&gNB->ts_rate_unmatch, "ULSCH segment rate recovery time"); printStatIndent2(&gNB->ts_ldpc_decode, "ULSCH segments decoding time"); - - printf("\nUE TX\n"); - for (int i = PHY_PROC_TX; i <= OFDM_MOD_STATS; i++) { - printStatIndent(&UE->phy_cpu_stats.cpu_time_stats[i], UE->phy_cpu_stats.cpu_time_stats[i].meas_name); - } printStatIndent(&gNB->rx_srs_stats,"RX SRS time"); printStatIndent2(&gNB->generate_srs_stats,"Generate SRS sequence time"); printStatIndent2(&gNB->get_srs_signal_stats,"Get SRS signal time"); From 8ca05e51ac94d6aadfdf7186e5e9b7194c75bf51 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Tue, 10 Jun 2025 14:44:20 +0100 Subject: [PATCH 04/22] Added graph in T_Tracer to observe UL-SNR calculated using SRS --- common/utils/T/T_messages.txt | 4 +++ common/utils/T/tracer/gnb.c | 24 +++++++++++++- common/utils/T/tracer/logger/framelog.c | 32 ++++++++++++++++--- common/utils/T/tracer/logger/logger.h | 1 + .../NR_ESTIMATION/nr_ul_channel_estimation.c | 2 +- openair1/PHY/NR_ESTIMATION/nr_ul_estimation.h | 2 +- openair1/SCHED_NR/phy_procedures_nr_gNB.c | 12 +++++-- 7 files changed, 67 insertions(+), 10 deletions(-) diff --git a/common/utils/T/T_messages.txt b/common/utils/T/T_messages.txt index 8dd5052714..2f17b62ea5 100644 --- a/common/utils/T/T_messages.txt +++ b/common/utils/T/T_messages.txt @@ -143,6 +143,10 @@ ID = GNB_PHY_UL_TIME_CHANNEL_ESTIMATE DESC = gNodeB channel estimation in the time domain GROUP = ALL:PHY:GRAPHIC:HEAVY:GNB FORMAT = int,gNB_ID : int,rnti : int,frame : int,subframe : int,antenna : buffer,chest_t +ID = GNB_PHY_UL_SNR_ESTIMATE + DESC = gNodeB SNR estimation based on SRS + GROUP = ALL:PHY:GRAPHIC:HEAVY:GNB + FORMAT = int,gNB_ID : int,rnti : int,frame : int,subframe : int,antenna : buffer,snr ID = GNB_PHY_PRACH_INPUT_SIGNAL DESC = gNodeB input data in the time domain for slots with PRACH detection GROUP = ALL:PHY:GRAPHIC:HEAVY:GNB diff --git a/common/utils/T/tracer/gnb.c b/common/utils/T/tracer/gnb.c index 22567492f8..d47f627341 100644 --- a/common/utils/T/tracer/gnb.c +++ b/common/utils/T/tracer/gnb.c @@ -19,6 +19,7 @@ typedef struct { widget *pucch_pusch_iq_plot; widget *ul_freq_estimate_ue_xy_plot; widget *ul_time_estimate_ue_xy_plot; + widget *ul_snr_estimate_ue_xy_plot; widget *current_ue_label; widget *current_ue_button; widget *prev_ue_button; @@ -26,6 +27,7 @@ typedef struct { logger *pucch_pusch_iq_logger; logger *ul_freq_estimate_ue_logger; logger *ul_time_estimate_ue_logger; + logger *ul_snr_ue_logger; } gnb_gui; typedef struct { @@ -98,6 +100,9 @@ static void set_current_ue(gui *g, gnb_data *e, int ue) sprintf(s, "UL channel estimation in time domain [UE %d]", ue); xy_plot_set_title(g, e->e->ul_time_estimate_ue_xy_plot, s); + + sprintf(s, "UL SNR per RB based on SRS [UE %d]", ue); + xy_plot_set_title(g, e->e->ul_snr_estimate_ue_xy_plot, s); } void reset_ue_ids(void) @@ -146,12 +151,13 @@ static void gnb_main_gui(gnb_gui *e, gui *g, event_handler *h, void *database, g logger *l; view *v; - main_window = new_toplevel_window(g, 1500, 230, "gNB tracer"); + main_window = new_toplevel_window(g, 1500, 460, "gNB tracer"); top_container = new_container(g, VERTICAL); widget_add_child(g, main_window, top_container, -1); line = new_container(g, HORIZONTAL); widget_add_child(g, top_container, line, -1); + logo = new_image(g, openair_logo_png, openair_logo_png_len); /* logo + prev/next UE buttons */ @@ -206,6 +212,21 @@ static void gnb_main_gui(gnb_gui *e, gui *g, event_handler *h, void *database, g logger_add_view(l, v); e->ul_time_estimate_ue_logger = l; + line = new_container(g, HORIZONTAL); + widget_add_child(g, top_container, line, -1); + + /* UL SNR based on SRS */ + w = new_xy_plot(g, 1280, 200, "", 190); + e->ul_snr_estimate_ue_xy_plot = w; + widget_add_child(g, line, w, -1); + xy_plot_set_range(g, w, 0, 273, -10, 65); + l = new_framelog(h, database, "GNB_PHY_UL_SNR_ESTIMATE", "subframe", "snr"); + framelog_set_update_only_at_sf9(l, 0); + framelog_set_type_buffer_db(l); + v = new_view_xy(273, 10, g, w, new_color(g, "#0c0c72"), XY_LOOP_MODE); + logger_add_view(l, v); + e->ul_snr_ue_logger = l; + set_current_ue(g, ed, ed->ue); register_notifier(g, "click", e->current_ue_button, click, ed); register_notifier(g, "click", e->prev_ue_button, click, ed); @@ -251,6 +272,7 @@ int main(int n, char **v) on_off(database, "GNB_PHY_PUCCH_PUSCH_IQ", is_on, 1); on_off(database, "GNB_PHY_UL_FREQ_CHANNEL_ESTIMATE", is_on, 1); on_off(database, "GNB_PHY_UL_TIME_CHANNEL_ESTIMATE", is_on, 1); + on_off(database, "GNB_PHY_UL_SNR_ESTIMATE", is_on, 1); gnb_data.ue = 0; gnb_data.e = ⪚ diff --git a/common/utils/T/tracer/logger/framelog.c b/common/utils/T/tracer/logger/framelog.c index 45ae3e399f..040482278f 100644 --- a/common/utils/T/tracer/logger/framelog.c +++ b/common/utils/T/tracer/logger/framelog.c @@ -8,6 +8,11 @@ #include #include +typedef enum { + FRAMELOG_BUFFER, + FRAMELOG_BUFFER_dB, +} framelog_buffer_type_t; + struct framelog { struct logger common; void *database; @@ -22,6 +27,7 @@ struct framelog { int skip_current; /* internal data for the skip mechanism */ int skip_on; /* internal data for the skip mechanism */ int update_only_at_sf9; + framelog_buffer_type_t type; }; static void _event(void *p, event e) @@ -52,7 +58,10 @@ static void _event(void *p, event e) } if (l->skip_on) return; - nsamples = bsize / (2*sizeof(int16_t)); + if (l->type == FRAMELOG_BUFFER) + nsamples = bsize / (2 * sizeof(int16_t)); + else + nsamples = bsize / sizeof(int16_t); if (l->blength != nsamples * 10) { l->blength = nsamples * 10; @@ -71,10 +80,15 @@ static void _event(void *p, event e) } /* TODO: compute the LOGs in the plotter (too much useless computations) */ - for (i = 0; i < nsamples; i++) { - int I = ((int16_t *)buffer)[i*2]; - int Q = ((int16_t *)buffer)[i*2+1]; - l->buffer[subframe * nsamples + i] = 10*log10(1.0+(float)(I*I+Q*Q)); + if (l->type == FRAMELOG_BUFFER_dB) { + for (i = 0; i < nsamples; i++) + l->buffer[subframe * nsamples + i] = ((int16_t *)buffer)[i]; + } else { + for (i = 0; i < nsamples; i++) { + int I = ((int16_t *)buffer)[i * 2]; + int Q = ((int16_t *)buffer)[i * 2 + 1]; + l->buffer[subframe * nsamples + i] = 10 * log10(1.0 + (float)(I * I + Q * Q)); + } } if (l->update_only_at_sf9 == 0 || subframe == 9) @@ -132,6 +146,8 @@ logger *new_framelog(event_handler *h, void *database, abort(); } + ret->type = FRAMELOG_BUFFER; + return ret; } @@ -153,3 +169,9 @@ void framelog_set_update_only_at_sf9(logger *_this, int update_only_at_sf9) struct framelog *l = _this; l->update_only_at_sf9 = update_only_at_sf9; } + +void framelog_set_type_buffer_db(logger *_this) +{ + struct framelog *l = _this; + l->type = FRAMELOG_BUFFER_dB; +} diff --git a/common/utils/T/tracer/logger/logger.h b/common/utils/T/tracer/logger/logger.h index b78fa1b359..d8458ef104 100644 --- a/common/utils/T/tracer/logger/logger.h +++ b/common/utils/T/tracer/logger/logger.h @@ -30,6 +30,7 @@ logger *new_iqdotlog(void *event_handler, void *database, void framelog_set_skip(logger *_this, int skip_delay); void framelog_set_update_only_at_sf9(logger *_this, int update_only_at_sf9); +void framelog_set_type_buffer_db(logger *_this); void textlog_dump_buffer(logger *_this, int dump_buffer); void textlog_raw_time(logger *_this, int raw_time); diff --git a/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c b/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c index 77c6429b5c..93d7feebe0 100644 --- a/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c +++ b/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c @@ -782,7 +782,7 @@ int nr_srs_channel_estimation( [gNB->frame_parms.ofdm_symbol_size * (1 << srs_pdu->num_symbols)], c16_t srs_estimated_channel_time[][1 << srs_pdu->num_ant_ports][gNB->frame_parms.ofdm_symbol_size], c16_t srs_estimated_channel_time_shifted[][1 << srs_pdu->num_ant_ports][gNB->frame_parms.ofdm_symbol_size], - int8_t *snr_per_rb, + int16_t *snr_per_rb, int8_t *snr) { #ifdef SRS_DEBUG diff --git a/openair1/PHY/NR_ESTIMATION/nr_ul_estimation.h b/openair1/PHY/NR_ESTIMATION/nr_ul_estimation.h index 6451de12dd..04377db1b8 100644 --- a/openair1/PHY/NR_ESTIMATION/nr_ul_estimation.h +++ b/openair1/PHY/NR_ESTIMATION/nr_ul_estimation.h @@ -89,7 +89,7 @@ int nr_srs_channel_estimation( [gNB->frame_parms.ofdm_symbol_size * (1 << srs_pdu->num_symbols)], c16_t srs_estimated_channel_time[][1 << srs_pdu->num_ant_ports][gNB->frame_parms.ofdm_symbol_size], c16_t srs_estimated_channel_time_shifted[][1 << srs_pdu->num_ant_ports][gNB->frame_parms.ofdm_symbol_size], - int8_t *snr_per_rb, + int16_t *snr_per_rb, int8_t *snr); void nr_freq_equalization(NR_DL_FRAME_PARMS *frame_parms, diff --git a/openair1/SCHED_NR/phy_procedures_nr_gNB.c b/openair1/SCHED_NR/phy_procedures_nr_gNB.c index 0cb9d8d4fd..51e8c771e5 100644 --- a/openair1/SCHED_NR/phy_procedures_nr_gNB.c +++ b/openair1/SCHED_NR/phy_procedures_nr_gNB.c @@ -710,7 +710,7 @@ static void fill_ul_rb_mask(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, uint32 int fill_srs_reported_symbol(nfapi_nr_srs_reported_symbol_t *reported_symbol, const nfapi_nr_srs_pdu_t *srs_pdu, const int N_RB_UL, - const int8_t *snr_per_rb, + const int16_t *snr_per_rb, const int srs_est) { reported_symbol->num_prgs = srs_pdu->beamforming.num_prgs; for (int prg_idx = 0; prg_idx < reported_symbol->num_prgs; prg_idx++) { @@ -1052,7 +1052,7 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, N __attribute__((aligned(32))); c16_t srs_estimated_channel_time_shifted[frame_parms->nb_antennas_rx][1 << srs_pdu->num_ant_ports] [frame_parms->ofdm_symbol_size]; - int8_t snr_per_rb[srs_pdu->bwp_size]; + int16_t snr_per_rb[srs_pdu->bwp_size]; start_meas(&gNB->generate_srs_stats); @@ -1110,6 +1110,14 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, N T_INT(0), T_BUFFER(srs_estimated_channel_time_shifted[0][0], frame_parms->ofdm_symbol_size * sizeof(int32_t))); + T(T_GNB_PHY_UL_SNR_ESTIMATE, + T_INT(0), + T_INT(srs_pdu->rnti), + T_INT(frame_rx), + T_INT(0), + T_INT(0), + T_BUFFER(snr_per_rb, srs_pdu->bwp_size * sizeof(int16_t))); + UL_INFO->srs_ind.sfn = frame_rx; UL_INFO->srs_ind.slot = slot_rx; From 42b6576d81fdaa2d5b9eb7e0a9d0a6df98402d53 Mon Sep 17 00:00:00 2001 From: francescomani Date: Sat, 27 Sep 2025 09:56:03 +0200 Subject: [PATCH 05/22] fix RSRP computation at UE (let the higher layers compute the index) --- common/utils/nr/nr_common.h | 2 -- .../PHY/NR_UE_ESTIMATION/nr_ue_measurements.c | 3 +- openair1/PHY/NR_UE_TRANSPORT/csi_rx.c | 2 +- .../SIMULATION/NR_PHY/nr_unitary_common.c | 2 +- openair2/COMMON/mac_messages_types.h | 2 +- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 32 ++++++++----------- openair2/RRC/NR_UE/L2_interface_ue.c | 2 +- openair2/RRC/NR_UE/L2_interface_ue.h | 2 +- openair2/RRC/NR_UE/rrc_UE.c | 4 +-- 9 files changed, 22 insertions(+), 29 deletions(-) diff --git a/common/utils/nr/nr_common.h b/common/utils/nr/nr_common.h index 67f0913dc4..08c0110721 100644 --- a/common/utils/nr/nr_common.h +++ b/common/utils/nr/nr_common.h @@ -88,8 +88,6 @@ static inline const char *rnti_types(nr_rnti_type_t rr) #define NR_NUMBER_OF_SYMBOLS_PER_SLOT_EXTENDED_CP 12 #define NR_MAX_NB_LAYERS 4 // 8 -#define BOUNDED_EVAL(a, b, c) (min(c, max(a, b))) - // Since the IQ samples are represented by SQ15 R+I (see https://en.wikipedia.org/wiki/Q_(number_format)) we need to compensate when // calcualting signal energy. Instead of shifting each sample right by 15, we can normalize the result in dB scale once its // calcualted. Signal energy is calculated using RMS^2, where each sample is squared before taking the average of the sum, therefore diff --git a/openair1/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c b/openair1/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c index ff706af688..73776ebf26 100644 --- a/openair1/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c +++ b/openair1/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c @@ -236,11 +236,10 @@ void nr_ue_ssb_rsrp_measurements(PHY_VARS_NR_UE *ue, .gNB_index = proc->gNB_id, .meas_type = NFAPI_NR_SS_MEAS, .Nid_cell = ue->frame_parms.Nid_cell, + .rsrp_dBm = ue->measurements.ssb_rsrp_dBm[ssb_index], .ssb_index = ssb_index, .is_neighboring_cell = false, }; - int ssb_rsrp_dBm = ue->measurements.ssb_rsrp_dBm[ssb_index]; - l1_measurements.rsrp_dBm = BOUNDED_EVAL(16, ssb_rsrp_dBm + 157, 113); // TS 38.133 - Table 10.1.6.1-1 nr_downlink_indication_t dl_indication = {0}; fapi_nr_rx_indication_t rx_ind = {0}; nr_fill_dl_indication(&dl_indication, NULL, &rx_ind, proc, ue, NULL); diff --git a/openair1/PHY/NR_UE_TRANSPORT/csi_rx.c b/openair1/PHY/NR_UE_TRANSPORT/csi_rx.c index 4ab72a13f0..c28830e4d7 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/csi_rx.c +++ b/openair1/PHY/NR_UE_TRANSPORT/csi_rx.c @@ -987,7 +987,7 @@ void nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, .meas_type = NFAPI_NR_CSI_MEAS, .Nid_cell = frame_parms->Nid_cell, .is_neighboring_cell = false, - .rsrp_dBm = BOUNDED_EVAL(16, rsrp_dBm + 157, 113), // TS 38.133 - Table 10.1.6.1-1 + .rsrp_dBm = rsrp_dBm, .rank_indicator = rank_indicator, .i1 = *i1, .i2 = *i2, diff --git a/openair1/SIMULATION/NR_PHY/nr_unitary_common.c b/openair1/SIMULATION/NR_PHY/nr_unitary_common.c index 585c5388e4..604e7a8c2a 100644 --- a/openair1/SIMULATION/NR_PHY/nr_unitary_common.c +++ b/openair1/SIMULATION/NR_PHY/nr_unitary_common.c @@ -184,6 +184,6 @@ void nr_mac_rrc_meas_ind_ue(module_id_t module_id, uint16_t Nid_cell, bool csi_meas, bool is_neighboring_cell, - uint8_t rsrp_dBm) + int rsrp_dBm) { } diff --git a/openair2/COMMON/mac_messages_types.h b/openair2/COMMON/mac_messages_types.h index 677e1e90b1..c5c18a12f2 100644 --- a/openair2/COMMON/mac_messages_types.h +++ b/openair2/COMMON/mac_messages_types.h @@ -146,7 +146,7 @@ typedef struct NRRrcMacSBcchDataInd_s { typedef struct NRRrcMacMeasDataInd_s { uint8_t gnb_index; - uint8_t rsrp_dBm; + int rsrp_dBm; uint16_t Nid_cell; bool is_csi_meas; bool is_neighboring_cell; diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index f2f783869c..3d9d5fba43 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -139,7 +139,6 @@ static csi_payload_t get_csirs_RSRP_payload(NR_UE_MAC_INST_t *mac, struct NR_CSI_ReportConfig *csi_reportconfig, NR_CSI_ResourceConfigId_t csi_ResourceConfigId, const NR_CSI_MeasConfig_t *csi_MeasConfig); -static uint8_t get_rsrp_index(int rsrp); static uint8_t get_rsrp_diff_index(int best_rsrp, int current_rsrp); @@ -2917,6 +2916,18 @@ static int compare_ssb_rsrp(const void *a, const void *b) return mb->ssb_rsrp_dBm - ma->ssb_rsrp_dBm; } +// returns index from RSRP +// according to Table 10.1.6.1-1 in 38.133 +static uint8_t get_rsrp_index(int rsrp) +{ + int index = rsrp + 157; + if (rsrp > -44) + index = 113; + if (rsrp < -140) + index = 16; + return index; +} + static csi_payload_t get_ssb_rsrp_payload(NR_UE_MAC_INST_t *mac, struct NR_CSI_ReportConfig *csi_reportconfig, NR_CSI_ResourceConfigId_t csi_ResourceConfigId, @@ -3126,15 +3137,14 @@ static csi_payload_t get_csirs_RSRP_payload(NR_UE_MAC_INST_t *mac, } // TODO: Improvements will be needed to cri_ssbri_bitlen>0 - temp_payload = reverse_bits(mac->l1_measurements.rsrp_dBm, n_bits); // rsrp_dBm as in TS 38.133 - Table 10.1.6.1-1 + temp_payload = get_rsrp_index(mac->l1_measurements.rsrp_dBm); + temp_payload = reverse_bits(temp_payload, n_bits); LOG_D(NR_MAC, "cri_ssbri_bitlen = %d\n", cri_ssbri_bitlen); LOG_D(NR_MAC, "rsrp_bitlen = %d\n", rsrp_bitlen); LOG_D(NR_MAC, "diff_rsrp_bitlen = %d\n", diff_rsrp_bitlen); - LOG_D(NR_MAC, "n_bits = %d\n", n_bits); LOG_D(NR_MAC, "csi_part1_payload = 0x%lx\n", temp_payload); - break; } } @@ -3145,20 +3155,6 @@ static csi_payload_t get_csirs_RSRP_payload(NR_UE_MAC_INST_t *mac, return csi; } -// returns index from RSRP -// according to Table 10.1.6.1-1 in 38.133 - -static uint8_t get_rsrp_index(int rsrp) -{ - int index = rsrp + 157; - if (rsrp>-44) - index = 113; - if (rsrp<-140) - index = 16; - - return index; -} - // returns index from differential RSRP // according to Table 10.1.6.1-2 in 38.133 static uint8_t get_rsrp_diff_index(int best_rsrp, int current_rsrp) diff --git a/openair2/RRC/NR_UE/L2_interface_ue.c b/openair2/RRC/NR_UE/L2_interface_ue.c index d6bee2ab10..d1e06753b1 100644 --- a/openair2/RRC/NR_UE/L2_interface_ue.c +++ b/openair2/RRC/NR_UE/L2_interface_ue.c @@ -37,7 +37,7 @@ typedef uint32_t channel_t; -void nr_mac_rrc_meas_ind_ue(module_id_t module_id, uint32_t gNB_index, uint16_t Nid_cell, bool csi_meas, bool is_neighboring_cell, uint8_t rsrp_dBm) +void nr_mac_rrc_meas_ind_ue(module_id_t module_id, uint32_t gNB_index, uint16_t Nid_cell, bool csi_meas, bool is_neighboring_cell, int rsrp_dBm) { MessageDef *message_p = itti_alloc_new_message(TASK_MAC_UE, 0, NR_RRC_MAC_MEAS_DATA_IND); NR_RRC_MAC_MEAS_DATA_IND(message_p).gnb_index = gNB_index; diff --git a/openair2/RRC/NR_UE/L2_interface_ue.h b/openair2/RRC/NR_UE/L2_interface_ue.h index 857c110d9e..a94c96b9c7 100644 --- a/openair2/RRC/NR_UE/L2_interface_ue.h +++ b/openair2/RRC/NR_UE/L2_interface_ue.h @@ -42,7 +42,7 @@ void nr_mac_rrc_meas_ind_ue(module_id_t module_id, uint16_t Nid_cell, bool csi_meas, bool is_neighboring_cell, - uint8_t rsrp_dBm); + int rsrp_dBm); void nr_mac_rrc_inactivity_timer_ind(const module_id_t mod_id); void nr_mac_rrc_msg3_ind(const module_id_t mod_id, const int rnti, bool prepare_payload); void nr_ue_rrc_timer_trigger(int instance, int frame, int gnb_id); diff --git a/openair2/RRC/NR_UE/rrc_UE.c b/openair2/RRC/NR_UE/rrc_UE.c index c167982859..1e01d471d8 100644 --- a/openair2/RRC/NR_UE/rrc_UE.c +++ b/openair2/RRC/NR_UE/rrc_UE.c @@ -2589,14 +2589,14 @@ void *rrc_nrue(void *notUsed) NR_RRC_MAC_MEAS_DATA_IND(msg_p).is_neighboring_cell? "Neighboring cell" : "Active cell", NR_RRC_MAC_MEAS_DATA_IND(msg_p).Nid_cell, NR_RRC_MAC_MEAS_DATA_IND(msg_p).is_csi_meas ? "CSI meas" : "SSB meas", - NR_RRC_MAC_MEAS_DATA_IND(msg_p).rsrp_dBm - 157); + NR_RRC_MAC_MEAS_DATA_IND(msg_p).rsrp_dBm); rrcPerNB_t *rrcNB = rrc->perNB + NR_RRC_MAC_MEAS_DATA_IND(msg_p).gnb_index; nr_ue_meas_filtering(rrcNB, NR_RRC_MAC_MEAS_DATA_IND(msg_p).is_neighboring_cell, NR_RRC_MAC_MEAS_DATA_IND(msg_p).Nid_cell, NR_RRC_MAC_MEAS_DATA_IND(msg_p).is_csi_meas, - NR_RRC_MAC_MEAS_DATA_IND(msg_p).rsrp_dBm - 157); + NR_RRC_MAC_MEAS_DATA_IND(msg_p).rsrp_dBm); nr_ue_check_meas_report(rrc, NR_RRC_MAC_MEAS_DATA_IND(msg_p).gnb_index); break; From 7355b55ad1cb8b3bc1830fcffd4ef6392bbadd7e Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Thu, 5 Jun 2025 16:15:17 +0200 Subject: [PATCH 06/22] this MR replaces constants INT16_MIN by -INT16_MAX (so -32767) in places where it used for mathematical operations --- openair1/PHY/CODING/3gpplte_turbo_decoder.c | 3 --- .../LTE_ESTIMATION/lte_ul_channel_estimation.c | 6 +----- openair1/PHY/LTE_TRANSPORT/pucch.c | 2 +- openair1/PHY/LTE_TRANSPORT/pucch_common.c | 6 +++--- .../PHY/LTE_UE_TRANSPORT/dlsch_demodulation.c | 16 ++++++++-------- openair1/PHY/LTE_UE_TRANSPORT/drs_modulation.c | 4 ++-- openair1/PHY/TOOLS/signal_energy.c | 2 -- openair1/SCHED/sched_common_extern.h | 11 ++++++----- 8 files changed, 21 insertions(+), 29 deletions(-) diff --git a/openair1/PHY/CODING/3gpplte_turbo_decoder.c b/openair1/PHY/CODING/3gpplte_turbo_decoder.c index 52860e096f..3cc54ab0d4 100644 --- a/openair1/PHY/CODING/3gpplte_turbo_decoder.c +++ b/openair1/PHY/CODING/3gpplte_turbo_decoder.c @@ -123,9 +123,6 @@ typedef char Binary; typedef short llr_t; // internal decoder data is 16-bit fixed typedef short channel_t; -#define LLR_MAX 32767 -#define LLR_MIN -32768 -#define LLRTOT 16 #define MAX 32767//16383 #define FRAME_LENGTH_MAX 6144 #define STATES 8 diff --git a/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c b/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c index 591c589b49..b7ad400ff1 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c @@ -526,11 +526,7 @@ int32_t lte_srs_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms, //if ((1<<(sub_frame_number%T_SFC))&transmission_offset_tdd[Ssrs]) { - if (generate_srs(frame_parms, - soundingrs_ul_config_dedicated, - &srs_vars->srs[eNB_id], - 0x7FFF, - subframe)==-1) { + if (generate_srs(frame_parms, soundingrs_ul_config_dedicated, &srs_vars->srs[eNB_id], INT16_MAX, subframe) == -1) { LOG_E(PHY,"lte_srs_channel_estimation: Error in generate_srs\n"); return(-1); } diff --git a/openair1/PHY/LTE_TRANSPORT/pucch.c b/openair1/PHY/LTE_TRANSPORT/pucch.c index c8adb38f7c..c777313df0 100644 --- a/openair1/PHY/LTE_TRANSPORT/pucch.c +++ b/openair1/PHY/LTE_TRANSPORT/pucch.c @@ -764,7 +764,7 @@ uint32_t calc_pucch_1x_interference(PHY_VARS_eNB *eNB, uint8_t m,l; uint8_t n_cs,alpha_ind; int16_t tmp_re,tmp_im,W_re=0,W_im=0; - int16_t W4_nouse[4]={32767,32767,-32768,-32768}; + int16_t W4_nouse[4] = {32767, 32767, -32767, -32767}; int32_t n0_IQ[2]; double interference_power; int16_t *rxptr; diff --git a/openair1/PHY/LTE_TRANSPORT/pucch_common.c b/openair1/PHY/LTE_TRANSPORT/pucch_common.c index 932d30ed70..1722f9a22d 100644 --- a/openair1/PHY/LTE_TRANSPORT/pucch_common.c +++ b/openair1/PHY/LTE_TRANSPORT/pucch_common.c @@ -72,7 +72,7 @@ void init_ncs_cell(LTE_DL_FRAME_PARMS *frame_parms,uint8_t ncs_cell[20][7]) } } -const int16_t W4[3][4] = {{32767, 32767, 32767, 32767}, {32767, -32768, 32767, -32768}, {32767, -32768, -32768, 32767}}; +const int16_t W4[3][4] = {{32767, 32767, 32767, 32767}, {32767, -32767, 32767, -32767}, {32767, -32767, -32767, 32767}}; const int16_t W3_re[3][6] = {{32767, 32767, 32767}, {32767, -16384, -16384}, {32767, -16384, -16384}}; const int16_t W3_im[3][6] = {{0, 0, 0}, {0, 28377, -28378}, {0, -28378, 28377}}; @@ -334,8 +334,8 @@ const uint8_t chcod_tbl[128][48] = {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 {0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1}}; -const int16_t alpha_re[12] = {32767, 28377, 16383, 0, -16384, -28378, -32768, -28378, -16384, -1, 16383, 28377}; -const int16_t alpha_im[12] = {0, 16383, 28377, 32767, 28377, 16383, 0, -16384, -28378, -32768, -28378, -16384}; +const int16_t alpha_re[12] = {32767, 28377, 16383, 0, -16384, -28378, -32767, -28378, -16384, -1, 16383, 28377}; +const int16_t alpha_im[12] = {0, 16383, 28377, 32767, 28377, 16383, 0, -16384, -28378, -32767, -28378, -16384}; // W5_TBL const int16_t W5_fmt3_re[5][5] = {{32767, 32767, 32767, 32767, 32767}, diff --git a/openair1/PHY/LTE_UE_TRANSPORT/dlsch_demodulation.c b/openair1/PHY/LTE_UE_TRANSPORT/dlsch_demodulation.c index ac045480da..9aa520c585 100644 --- a/openair1/PHY/LTE_UE_TRANSPORT/dlsch_demodulation.c +++ b/openair1/PHY/LTE_UE_TRANSPORT/dlsch_demodulation.c @@ -2867,16 +2867,16 @@ void float_to_chan_est(int32_t **dl_ch_estimates_ext, for (aarx=0; aarx=1) - imag = 0x7FFF; + imag = INT16_MAX; else imag = cimag(dl_ch_estimates_ext_f[aatx*n_rx + aarx][re])*32768; if (creal(dl_ch_estimates_ext_f[aatx*n_rx + aarx][re])<-1) - real = 0x8000; + real = -INT16_MAX; else if (creal(dl_ch_estimates_ext_f[aatx*n_rx + aarx][re])>=1) - real = 0x7FFF; + real = INT16_MAX; else real = creal(dl_ch_estimates_ext_f[aatx*n_rx + aarx][re])*32768; @@ -2910,16 +2910,16 @@ void float_to_rxdataF(int32_t **rxdataF_ext, for (aarx=0; aarx=1) - imag = 0x7FFF; + imag = INT16_MAX; else imag = cimag(rxdataF_f[aarx][re])*32768; if (creal(rxdataF_f[aarx][re])<-1) - real = 0x8000; + real = -INT16_MAX; else if (creal(rxdataF_f[aarx][re])>=1) - real = 0x7FFF; + real = INT16_MAX; else real = creal(rxdataF_f[aarx][re])*32768; diff --git a/openair1/PHY/LTE_UE_TRANSPORT/drs_modulation.c b/openair1/PHY/LTE_UE_TRANSPORT/drs_modulation.c index eb029aa429..929c3ba7c0 100644 --- a/openair1/PHY/LTE_UE_TRANSPORT/drs_modulation.c +++ b/openair1/PHY/LTE_UE_TRANSPORT/drs_modulation.c @@ -56,8 +56,8 @@ int generate_drs_pusch(PHY_VARS_UE *ue, //uint32_t phase_shift; // phase shift for cyclic delay in DM RS //uint8_t alpha_ind; - int16_t alpha_re[12] = {32767, 28377, 16383, 0,-16384, -28378,-32768,-28378,-16384, -1, 16383, 28377}; - int16_t alpha_im[12] = {0, 16383, 28377, 32767, 28377, 16383, 0,-16384,-28378,-32768,-28378,-16384}; + int16_t alpha_re[12] = {32767, 28377, 16383, 0, -16384, -28378, -32767, -28378, -16384, -1, 16383, 28377}; + int16_t alpha_im[12] = {0, 16383, 28377, 32767, 28377, 16383, 0, -16384, -28378, -32767, -28378, -16384}; uint8_t cyclic_shift,cyclic_shift0=0,cyclic_shift1=0; LTE_DL_FRAME_PARMS *fp = (ue==NULL) ? frame_parms : &ue->frame_parms; diff --git a/openair1/PHY/TOOLS/signal_energy.c b/openair1/PHY/TOOLS/signal_energy.c index 93544da758..a7c314dd44 100644 --- a/openair1/PHY/TOOLS/signal_energy.c +++ b/openair1/PHY/TOOLS/signal_energy.c @@ -27,8 +27,6 @@ // length : length of vector in complex samples #define shift 4 -//#define shift_DC 0 -//#define SHRT_MIN -32768 //----------------------------------------------------------------- // Average Power calculation with DC removing diff --git a/openair1/SCHED/sched_common_extern.h b/openair1/SCHED/sched_common_extern.h index 57d70f7d1e..f413ba683c 100644 --- a/openair1/SCHED/sched_common_extern.h +++ b/openair1/SCHED/sched_common_extern.h @@ -27,11 +27,12 @@ #include "sched_eNB.h" // This is the formula from Section 5.1.1.1 in 36.213 100*10*log10((2^(MPR*Ks)-1)), where MPR is in the range [0,6] and Ks=1.25 -static const int16_t hundred_times_delta_TF[100] = {-32768, -1268, -956, -768, -631, -523, -431, -352, -282, -219, -161, -107, -57, -9, 36, 79, 120, 159, 197, 234, - 269, 304, 337, 370, 402, 434, 465, 495, 525, 555, 583, 612, 640, 668, 696, 723, 750, 777, 803, 829, - 856, 881, 907, 933, 958, 983, 1008, 1033, 1058, 1083, 1108, 1132, 1157, 1181, 1205, 1229, 1254, 1278, 1302, 1325, - 1349, 1373, 1397, 1421, 1444, 1468, 1491, 1515, 1538, 1562, 1585, 1609, 1632, 1655, 1679, 1702, 1725, 1748, 1772, 1795, - 1818, 1841, 1864, 1887, 1910, 1933, 1956, 1980, 2003, 2026, 2049, 2072, 2095, 2118, 2141, 2164, 2186, 2209, 2232, 2255}; +static const int16_t hundred_times_delta_TF[100] = { + -32767, -1268, -956, -768, -631, -523, -431, -352, -282, -219, -161, -107, -57, -9, 36, 79, 120, 159, 197, 234, + 269, 304, 337, 370, 402, 434, 465, 495, 525, 555, 583, 612, 640, 668, 696, 723, 750, 777, 803, 829, + 856, 881, 907, 933, 958, 983, 1008, 1033, 1058, 1083, 1108, 1132, 1157, 1181, 1205, 1229, 1254, 1278, 1302, 1325, + 1349, 1373, 1397, 1421, 1444, 1468, 1491, 1515, 1538, 1562, 1585, 1609, 1632, 1655, 1679, 1702, 1725, 1748, 1772, 1795, + 1818, 1841, 1864, 1887, 1910, 1933, 1956, 1980, 2003, 2026, 2049, 2072, 2095, 2118, 2141, 2164, 2186, 2209, 2232, 2255}; static const uint16_t hundred_times_log10_NPRB[100] = {0, 301, 477, 602, 698, 778, 845, 903, 954, 1000, 1041, 1079, 1113, 1146, 1176, 1204, 1230, 1255, 1278, 1301, 1322, 1342, 1361, 1380, 1397, 1414, 1431, 1447, 1462, 1477, 1491, 1505, 1518, 1531, 1544, 1556, 1568, 1579, 1591, 1602, 1612, 1623, 1633, 1643, 1653, 1662, 1672, 1681, 1690, 1698, 1707, 1716, 1724, 1732, 1740, 1748, 1755, 1763, 1770, 1778, From 9086fb63de1e3c0fa8ae79ccab6652f2a5ee8cfd Mon Sep 17 00:00:00 2001 From: Guido Casati Date: Fri, 3 Oct 2025 10:38:38 +0200 Subject: [PATCH 07/22] Fix memory leak in nr_rrc_ue_process_masterCellGroup - Replace asn1cFreeStruc with ASN_STRUCT_FREE in MAC layer cleanup - Fixes improper memory management of NR_CellGroupConfig structures Root cause: asn1cFreeStruc only calls ASN_STRUCT_RESET + free(), which doesn't properly free nested ASN.1 allocations. ASN_STRUCT_FREE frees all nested structures completely. AddressSanitizer leak trace: Direct leak of 288 byte(s) in 1 object(s) allocated from: /#0 0x7fb72bab4a57 in __interceptor_calloc /#1 0x593752b28d0d in SEQUENCE_decode_uper /#2 0x593752b9a546 in SET_OF_decode_uper /#3 0x593752b2863c in SEQUENCE_decode_uper /#4 0x593752b47363 in CHOICE_decode_uper /#5 0x593752b2863c in SEQUENCE_decode_uper /#6 0x593752b2863c in SEQUENCE_decode_uper /#7 0x593752b2863c in SEQUENCE_decode_uper /#8 0x593752b2863c in SEQUENCE_decode_uper /#9 0x593752b2863c in SEQUENCE_decode_uper /#10 0x593752b38551 in uper_decode /#11 0x5937527d859f in nr_rrc_ue_process_masterCellGroup /#12 0x5937527d9408 in nr_rrc_process_reconfiguration_v1530 /#13 0x5937527dd5bb in nr_rrc_ue_process_rrcReconfiguration /#14 0x5937527f5e6b in nr_rrc_ue_decode_dcch /#15 0x5937527ff003 in rrc_nrue /#16 0x59375280c6de in rrc_nrue_task --- openair2/RRC/NR_UE/L2_interface_ue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/RRC/NR_UE/L2_interface_ue.c b/openair2/RRC/NR_UE/L2_interface_ue.c index d6bee2ab10..501510f7d2 100644 --- a/openair2/RRC/NR_UE/L2_interface_ue.c +++ b/openair2/RRC/NR_UE/L2_interface_ue.c @@ -140,7 +140,7 @@ void process_msg_rcc_to_mac(nr_mac_rrc_message_t *msg, int instance_id) break; case NR_MAC_RRC_CONFIG_CG: nr_rrc_mac_config_req_cg(instance_id, 0, msg->payload.config_cg.cellGroupConfig, msg->payload.config_cg.UE_NR_Capability); - asn1cFreeStruc(asn_DEF_NR_CellGroupConfig, msg->payload.config_cg.cellGroupConfig); + ASN_STRUCT_FREE(asn_DEF_NR_CellGroupConfig, msg->payload.config_cg.cellGroupConfig); break; case NR_MAC_RRC_CONFIG_MIB: nr_rrc_mac_config_req_mib(instance_id, From 9639cbb436cbc8364917a87472eead4dde35969c Mon Sep 17 00:00:00 2001 From: Guido Casati Date: Fri, 3 Oct 2025 12:33:03 +0200 Subject: [PATCH 08/22] Fix memory leak in nr_rrc_process_dedicatedNAS_MessageList The leak was caused by improper memory ownership handling in the dedicatedNAS_MessageList processing. The function was transferring buffer ownership to NAS messages and then preventing ASN.1 cleanup from freeing the original allocations by setting list.count = 0, causing a memory leak. Leak trace: Direct leak of 40 byte(s) in 1 object(s) allocated from: /#0 0x7f2ce3ab4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154 /#1 0x567907083f0f in OCTET_STRING_decode_uper /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/OCTET_STRING_uper.c:89 /#2 0x5679070ed5e6 in SET_OF_decode_uper /cmake_targets/ran_build/build/openair2/RRC/NR/MESSAGES/constr_SET_OF_uper.c:70 /#3 0x56790707b6dc in SEQUENCE_decode_uper /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE_uper.c:118 /#4 0x56790707b6dc in SEQUENCE_decode_uper /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE_uper.c:118 /#5 0x56790709a403 in CHOICE_decode_uper /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/constr_CHOICE_uper.c:84 /#6 0x56790707b6dc in SEQUENCE_decode_uper /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE_uper.c:118 /#7 0x56790709a403 in CHOICE_decode_uper /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/constr_CHOICE_uper.c:84 /#8 0x56790709a403 in CHOICE_decode_uper /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/constr_CHOICE_uper.c:84 /#9 0x56790707b6dc in SEQUENCE_decode_uper /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE_uper.c:118 /#10 0x56790708b5f1 in uper_decode /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/uper_decoder.c:83 /#11 0x567906d44b4b in nr_rrc_ue_decode_dcch /openair2/RRC/NR_UE/rrc_UE.c:2212 /#12 0x567906d520a3 in rrc_nrue /openair2/RRC/NR_UE/rrc_UE.c:2615 /#13 0x567906d5f77e in rrc_nrue_task /openair2/RRC/NR_UE/rrc_UE.c:2501 /#14 0x7f2ce2494ac2 in start_thread nptl/pthread_create.c:442 Fix: - Copy OCTET_STRING data instead of transferring ownership - Allow ASN.1 cleanup to properly free original allocations This fixes the leak that occurred during rrcReconfiguration message processing when dedicatedNAS_MessageList was present. Closes #828 --- openair2/RRC/NR_UE/rrc_UE.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openair2/RRC/NR_UE/rrc_UE.c b/openair2/RRC/NR_UE/rrc_UE.c index c167982859..217ca85be7 100644 --- a/openair2/RRC/NR_UE/rrc_UE.c +++ b/openair2/RRC/NR_UE/rrc_UE.c @@ -607,10 +607,10 @@ static void nr_rrc_process_dedicatedNAS_MessageList(NR_UE_RRC_INST_t *rrc, NR_RR nas_establish_cnf_t *msg = &NAS_CONN_ESTABLI_CNF(ittiMsg); msg->errCode = AS_SUCCESS; msg->nasMsg.length = tmp->list.array[i]->size; - msg->nasMsg.nas_data = tmp->list.array[i]->buf; + msg->nasMsg.nas_data = malloc_or_fail(msg->nasMsg.length); + memcpy(msg->nasMsg.nas_data, tmp->list.array[i]->buf, msg->nasMsg.length); itti_send_msg_to_task(TASK_NAS_NRUE, rrc->ue_id, ittiMsg); } - tmp->list.count = 0; // to prevent the automatic free by ASN1_FREE } } From d6047cd83dbe26997dc0a307467617b7d3bccdfc Mon Sep 17 00:00:00 2001 From: Guido Casati Date: Fri, 3 Oct 2025 10:54:43 +0200 Subject: [PATCH 09/22] Fix memory leak in dlInformationTransfer case - Remove unnecessary NULL assignment for dedicatedNAS_Message->buf - The original buffer is copied and transfered to NAS, so it can be properly freed by ASN.1 structure cleanup Root cause: Code was nullifying dedicatedNAS_Message->buf pointer before ASN.1 cleanup could free the original allocation, causing the leak from OCTET_STRING_decode_uper. AddressSanitizer leak trace (FIXED): Direct leak of 119 byte(s) in 3 object(s) allocated from: /#0 0x7ec2a42b4c38 in __interceptor_realloc /#1 0x555fade852e0 in OCTET_STRING_decode_uper /#9 0x555fadb48b11 in nr_rrc_ue_decode_dcch. --- openair2/RRC/NR_UE/rrc_UE.c | 1 - 1 file changed, 1 deletion(-) diff --git a/openair2/RRC/NR_UE/rrc_UE.c b/openair2/RRC/NR_UE/rrc_UE.c index 217ca85be7..2801aacce7 100644 --- a/openair2/RRC/NR_UE/rrc_UE.c +++ b/openair2/RRC/NR_UE/rrc_UE.c @@ -2299,7 +2299,6 @@ static int nr_rrc_ue_decode_dcch(NR_UE_RRC_INST_t *rrc, msg->nasMsg.nas_data = malloc(msg->nasMsg.length); memcpy(msg->nasMsg.nas_data, dedicatedNAS_Message->buf, msg->nasMsg.length); itti_send_msg_to_task(TASK_NAS_NRUE, rrc->ue_id, ittiMsg); - dedicatedNAS_Message->buf = NULL; // to keep the buffer, up to NAS to free it } } } break; From 8411a428db04995a4bce45cae9eb79218858dc5d Mon Sep 17 00:00:00 2001 From: francescomani Date: Fri, 3 Oct 2025 09:20:22 +0200 Subject: [PATCH 10/22] prevent faulty behavior of nr_compute_tbs when null input is not producing TBS = 0 --- openair2/LAYER2/NR_MAC_COMMON/nr_compute_tbs_common.c | 5 +++++ openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_compute_tbs_common.c b/openair2/LAYER2/NR_MAC_COMMON/nr_compute_tbs_common.c index 96819378f0..1643d4e732 100644 --- a/openair2/LAYER2/NR_MAC_COMMON/nr_compute_tbs_common.c +++ b/openair2/LAYER2/NR_MAC_COMMON/nr_compute_tbs_common.c @@ -59,6 +59,11 @@ uint32_t nr_compute_tbs(uint16_t Qm, tb_scaling, Nl); + if (Qm == 0 || R == 0 || nb_rb == 0 || Nl == 0) { + LOG_E(NR_MAC, "Error in compute TBS with a NULL input, returning NULL TBS\n"); + return 0; + } + const int nb_subcarrier_per_rb = 12; const uint32_t nbp_re = nb_subcarrier_per_rb * nb_symb_sch - nb_dmrs_prb - nb_rb_oh; const uint32_t nb_re = min(156, nbp_re) * nb_rb; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index 21a032fde6..63be110ab7 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -673,8 +673,7 @@ bool nr_find_nb_rb(uint16_t Qm, uint16_t *nb_rb) { // for transform precoding only RB = 2^a_2 * 3^a_3 * 5^a_5 is allowed with a non-negative - while(transform_precoding == NR_PUSCH_Config__transformPrecoder_enabled && - !multiple_2_3_5(nb_rb_max)) + while (transform_precoding == NR_PUSCH_Config__transformPrecoder_enabled && !multiple_2_3_5(nb_rb_max)) nb_rb_max--; /* is the maximum (not even) enough? */ From 958fe1ed75fb96cc6a874a829ceb478774d71538 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 1 Oct 2025 09:54:16 +0200 Subject: [PATCH 11/22] OC PhySim deployment: always undeploy safely This fixes basically two problems. First, remove "set -e", which leads to the script exiting on error. For instance, there was the sleep which should account for the time of the pod being in "ContainerCreating", but might not be enough. In that case, the script would exit, leaving the pod deployed. Second, a fixed time is not good, as it can be too short and unduly prolong waiting time. Replace with a loop. --- ci-scripts/scripts/oc-deploy-physims.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ci-scripts/scripts/oc-deploy-physims.sh b/ci-scripts/scripts/oc-deploy-physims.sh index 19c1940ba1..c0b4e388c1 100755 --- a/ci-scripts/scripts/oc-deploy-physims.sh +++ b/ci-scripts/scripts/oc-deploy-physims.sh @@ -1,7 +1,5 @@ #!/bin/bash -set -e - function die() { echo $@; exit 1; } [ $# -eq 4 ] || die "usage: $0 " @@ -15,7 +13,11 @@ oc project ${OC_NS} > /dev/null oc tag oaicicd-ran/oai-physim:${IMG_TAG} ${OC_NS}/oai-physim:${IMG_TAG} helm install ${OC_RELEASE} ${OAI_DIR}/charts/${OC_RELEASE} --set global.image.version=${IMG_TAG} --wait --timeout 120s POD_ID=$(oc get pods | grep oai-${OC_RELEASE} | awk '{print $1}') -sleep 30 +wait_creating=30 +while [[ $(oc describe pod "$POD_ID" | grep "ContainerCreating") && ${wait_creating} > 0 ]]; do + sleep 1; + let wait_creating=$wait_creating-1 +done echo "Monitoring logs for 'FINISHED' in pod '$POD_ID'" oc logs -f -n ${OC_NS} "$POD_ID" | while read -r line; do if [[ "$line" == *"FINISHED"* ]]; then From bd1dadaa79943096361b2829dfb7e482dfaa165a Mon Sep 17 00:00:00 2001 From: Jaroslava Fiedlerova Date: Wed, 1 Oct 2025 10:07:25 +0200 Subject: [PATCH 12/22] OC PhySim deployment: log bash script commands Also, don't use "set -x" debugging for oc login command: ci-scripts/cls_cmd.py:242 sets BASH_XTRACEFD=1, which makes that all "set -x" output is in stdout, leading to a redirect to the file into which we redirect. This would lead to the following error with unsuccessfull oc login: error: You are not a member of project "****-core-for-ci-ran". Error from server (Forbidden): imagestreams.image.openshift.io "oai-physim" is forbidden: User "system:anonymous" cannot get resource "imagestreams" in API group "image.openshift.io" in the namespace "****-ran" --- ci-scripts/scripts/oc-deploy-physims.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ci-scripts/scripts/oc-deploy-physims.sh b/ci-scripts/scripts/oc-deploy-physims.sh index c0b4e388c1..29812a8980 100755 --- a/ci-scripts/scripts/oc-deploy-physims.sh +++ b/ci-scripts/scripts/oc-deploy-physims.sh @@ -9,9 +9,11 @@ IMG_TAG=${3} OAI_DIR=${4} cat /opt/oc-password | oc login -u oaicicd --server https://api.oai.cs.eurecom.fr:6443 > /dev/null +set -x oc project ${OC_NS} > /dev/null oc tag oaicicd-ran/oai-physim:${IMG_TAG} ${OC_NS}/oai-physim:${IMG_TAG} helm install ${OC_RELEASE} ${OAI_DIR}/charts/${OC_RELEASE} --set global.image.version=${IMG_TAG} --wait --timeout 120s +set +x POD_ID=$(oc get pods | grep oai-${OC_RELEASE} | awk '{print $1}') wait_creating=30 while [[ $(oc describe pod "$POD_ID" | grep "ContainerCreating") && ${wait_creating} > 0 ]]; do @@ -29,6 +31,7 @@ oc logs -f -n ${OC_NS} "$POD_ID" | while read -r line; do break fi done +set -x oc logs -n ${OC_NS} "$POD_ID" >> ${OAI_DIR}/physim_log.txt oc describe pod $POD_ID >> ${OAI_DIR}/physim_log.txt helm uninstall ${OC_RELEASE} --wait From b012700fe4e62dd5e97c10d5d763c6ed849094b5 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 24 Sep 2025 09:11:13 +0200 Subject: [PATCH 13/22] Fix analyze-timing.sh for mawk compatibility The awk script in analyze-timing.sh used syntax that works with gawk but fails on systems where mawk is the default implementation, producing errors such as: awk: /dev/fd/3: line 6: syntax error at or near , -- test command finished with SIGPIPE Concretely, the match(text, pattern, variable) function does not exist in mawk, as it cannot capture matches in variables. Work around by substituing strings, and force a numeric comparison. --- openair1/SIMULATION/tests/analyze-timing.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/openair1/SIMULATION/tests/analyze-timing.sh b/openair1/SIMULATION/tests/analyze-timing.sh index 2ca45f346f..27f113ec2e 100755 --- a/openair1/SIMULATION/tests/analyze-timing.sh +++ b/openair1/SIMULATION/tests/analyze-timing.sh @@ -28,6 +28,13 @@ while [ $# -gt 0 ]; do # RC to signal error). In both cases, the result is logged in an array to # output at the end of the script. # + # To search for the number, first substr() returns what has been matched + # (PATTERN + number), and sub() deletes PATTERN and whitespace, resulting in + # the number (measurement). To force number into a numeric context, we add 0, + # as awk would otherwise compare a string to a number (example: + # gawk 'BEGIN { meas = "117"; if (meas > 96) { } else { print "fail";}}' + # printfs "fail"). + # # Example: pattern "PHY proc tx", condition "< 200" # The awk script tries to match every line for "PHY proc tx _NUMBER_" (where # number is a decimal), and compares _NUMBER_ against condition "< 200", @@ -35,14 +42,16 @@ while [ $# -gt 0 ]; do # If the condition holds, will set "CHECK PHY proc tx _NUMBER_ < 200 SUCCESS". # If the condition fails, will set "CHECK PHY proc tx _NUMBER_ < 200 FAIL". SCRIPT+=' - match($0, /'${PATTERN}' +([0-9]+(\.[0-9]+)?)/, n) { - if (n[1] '${COND}') { + match($0, /'${PATTERN}' +([0-9]+(\.[0-9]+)?)/) { + meas = substr($0, RSTART, RLENGTH); + sub(/'${PATTERN}' +/, "", meas); + if ((meas+0) '${COND}') { r = "SUCCESS"; } else { r = "FAIL"; RC = 1; } - RESULTS['${NUM}']=sprintf("CHECK %-35s %7.2f %-8s %s", "'${PATTERN}'", n[1], " '${COND}'", r); + RESULTS['${NUM}']=sprintf("CHECK %-35s %7.2f %-8s %s", "'${PATTERN}'", meas, " '${COND}'", r); } ' From a3ac1dbdfe1ba243b6c02bb73d05887a9bb1092c Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 30 Sep 2025 17:50:09 +0200 Subject: [PATCH 14/22] analyze-timing.sh: check only last measurement occurrence For some physical simulators, we have multiple SNR iterations. The previous version of the script correctly retained only the last measurement, but if a previous measurement condition set RC=1, the script would fail although the final "good" run might fulfil the measurement condition (IOW, it would show SUCCESS, but still fail on the check). Instead, check if all measurement lines finish on SUCCESS, which handles the above case. --- openair1/SIMULATION/tests/analyze-timing.sh | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/openair1/SIMULATION/tests/analyze-timing.sh b/openair1/SIMULATION/tests/analyze-timing.sh index 27f113ec2e..f88b595a97 100755 --- a/openair1/SIMULATION/tests/analyze-timing.sh +++ b/openair1/SIMULATION/tests/analyze-timing.sh @@ -6,12 +6,9 @@ function die() { echo $@ 1>&2; exit 1; } -# RC will be the return code. If any rule fails, it will set RC=1, which will -# make the script fail. Print also every line, because the logs are piped into -# this script, but a user is typically also interested into the raw logs. +# Print every line, because the logs are piped into this script, but a user is +# typically also interested into the raw logs. SCRIPT=' - BEGIN { RC = 0; } - { print $0 } ' @@ -24,9 +21,9 @@ while [ $# -gt 0 ]; do shift 2 # Add a rule that searches for a PATTERN + number, and checks against - # CONDition. If the condition does not hold, it is counted as a failure (sets - # RC to signal error). In both cases, the result is logged in an array to - # output at the end of the script. + # CONDition. If the condition does not hold, it is counted as a failure. In + # both cases, the result is logged in an array to output at the end of the + # script. # # To search for the number, first substr() returns what has been matched # (PATTERN + number), and sub() deletes PATTERN and whitespace, resulting in @@ -49,7 +46,6 @@ while [ $# -gt 0 ]; do r = "SUCCESS"; } else { r = "FAIL"; - RC = 1; } RESULTS['${NUM}']=sprintf("CHECK %-35s %7.2f %-8s %s", "'${PATTERN}'", meas, " '${COND}'", r); } @@ -63,7 +59,6 @@ while [ $# -gt 0 ]; do END { if (!RESULTS['${NUM}']) { RESULTS['${NUM}']=sprintf("CHECK %-35s %-7s NOTFOUND", "'${PATTERN}'", "'${COND}'"); - RC = 1; } } ' @@ -75,8 +70,11 @@ done # (0 on success, i.e..all conditions checked, otherwise 1 on failure). SCRIPT+=' END { + RC = 0; for (i = 0; i < '${NUM}'; ++i) { print RESULTS[i] + if (!(RESULTS[i] ~ /SUCCESS$/)) + RC = 1; } exit RC } From 78d91db964b7d80acab2b56f80ffa9e634156e93 Mon Sep 17 00:00:00 2001 From: Jaroslava Fiedlerova Date: Mon, 6 Oct 2025 11:09:04 +0200 Subject: [PATCH 15/22] Include timing analysis file in physim.rhel9 image Add missing timinig analysis scripts to RHEL9 physim docker image. These files are now copied from the build stage to /oai-ran/openair1/SIMULATION/tests/, where they are expected by ctest. Resolves following issue when running ctest in docker container: CMake Error: Error processing file: /oai-ran/openair1/SIMULATION/tests/RunTimedTest.cmake --- docker/Dockerfile.phySim.rhel9 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docker/Dockerfile.phySim.rhel9 b/docker/Dockerfile.phySim.rhel9 index c5faab2ec7..6a4ca5c226 100644 --- a/docker/Dockerfile.phySim.rhel9 +++ b/docker/Dockerfile.phySim.rhel9 @@ -101,4 +101,11 @@ COPY --from=phy-sim-build \ /oai-ran/cmake_targets/ran_build/build/openair1/SIMULATION/tests/CTestTestfile.cmake \ /opt/oai-physim/ +RUN mkdir -p /oai-ran/openair1/SIMULATION/tests + +COPY --from=phy-sim-build \ + /oai-ran/openair1/SIMULATION/tests/RunTimedTest.cmake \ + /oai-ran/openair1/SIMULATION/tests/analyze-timing.sh \ + /oai-ran/openair1/SIMULATION/tests/ + #CMD ["sleep", "infinity"] From 8910406a9ea0cf2567686d83c3e2495b3e84193d Mon Sep 17 00:00:00 2001 From: Jaroslava Fiedlerova Date: Wed, 8 Oct 2025 19:44:35 +0200 Subject: [PATCH 16/22] Add support for including custom timing threshold files in physim tests Introduce a new CMake variable PHYSIM_CHECK_FILES to specify CMake files (semicolon-separated) containing timing thresholds for timed physim tests. --- ci-scripts/xml_files/gnb_usrp_build.xml | 2 +- openair1/SIMULATION/tests/CMakeLists.txt | 21 ++++++++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/ci-scripts/xml_files/gnb_usrp_build.xml b/ci-scripts/xml_files/gnb_usrp_build.xml index 42d567cd15..32043985f5 100644 --- a/ci-scripts/xml_files/gnb_usrp_build.xml +++ b/ci-scripts/xml_files/gnb_usrp_build.xml @@ -42,7 +42,7 @@ Build_eNB Build gNB (USRP) caracal - --gNB -w USRP --ninja -c -P --build-lib ldpc_cuda --build-lib ldpc_aal --cmake-opt -DASN1C_EXEC=/opt/asn1c/bin/asn1c + --gNB -w USRP --ninja -c -P --build-lib ldpc_cuda --build-lib ldpc_aal --cmake-opt -DASN1C_EXEC=/opt/asn1c/bin/asn1c --cmake-opt -DPHYSIM_CHECK_FILES="ThresholdsOffload.cmake" diff --git a/openair1/SIMULATION/tests/CMakeLists.txt b/openair1/SIMULATION/tests/CMakeLists.txt index 443db31c95..1a090c566a 100644 --- a/openair1/SIMULATION/tests/CMakeLists.txt +++ b/openair1/SIMULATION/tests/CMakeLists.txt @@ -1,3 +1,18 @@ +# This defines a cmake file with timing thresholds to include (empty by default) +set(PHYSIM_CHECK_FILES "" CACHE STRING "CMake files ('\;' separated) with timing thresholds to include for timed physim tests") + +if(PHYSIM_CHECK_FILES) + foreach(PHYSIM_CHECK_FILE IN LISTS PHYSIM_CHECK_FILES) + # Construct full path relative to current source dir + set(CHECK_FILE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${PHYSIM_CHECK_FILE}") + if(EXISTS "${CHECK_FILE_PATH}") + message(STATUS "Including file for physim timing threshold check: ${PHYSIM_CHECK_FILE}") + else() + message(FATAL_ERROR "Threshold file '${PHYSIM_CHECK_FILE}' not found at ${CHECK_FILE_PATH}") + endif() + endforeach() +endif() + define_property(TEST PROPERTY TEST_DESCRIPTION BRIEF_DOCS "A human-readable description of this test" FULL_DOCS "A human-readable description of this test") @@ -398,6 +413,10 @@ add_timed_physim_test(physim.5g-offload.nr_ulsim.testT2.8 "T2 LDPC offload: SNR add_timed_physim_test(physim.5g-offload.nr_ulsim.testCPU.9 "CPU: SNR = 30, MCS = 25, 273 PRBs, 2 layers" nr_ulsim -n1000 -s30 -S30.2 -m25 -r273 -R273 -C10 -W2 -z2 -y2 -P) add_timed_physim_test(physim.5g-offload.nr_ulsim.testT2.9 "T2 LDPC offload: SNR = 30, MCS = 25, 273 PRBs, 2 layers" nr_ulsim -n1000 -s30 -S30.2 -m25 -r273 -R273 -C10 -W2 -z2 -y2 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1) -include(ThresholdsOffload.cmake) +endif() +if(PHYSIM_CHECK_FILES) + foreach(PHYSIM_CHECK_FILE IN LISTS PHYSIM_CHECK_FILES) + include("${CMAKE_CURRENT_SOURCE_DIR}/${PHYSIM_CHECK_FILE}") + endforeach() endif() From ec8efe1b7efe67b328d34874b9806d9d03260a08 Mon Sep 17 00:00:00 2001 From: Jaroslava Fiedlerova Date: Wed, 8 Oct 2025 11:22:17 +0200 Subject: [PATCH 17/22] Unify physim test definition Replace the previous add_timed_physim_test() macro with add_physim_test() to use a single, unified function for defining physim tests. This simplifies the test configuration and removes redundant macro definitions while keeping all existing functionality. This change follows up on the earlier addition of support for including custom timing threshold files (PHYSIM_CHECK_FILES). Update existing tests accordingly. --- openair1/SIMULATION/tests/CMakeLists.txt | 110 +++++++++-------------- 1 file changed, 44 insertions(+), 66 deletions(-) diff --git a/openair1/SIMULATION/tests/CMakeLists.txt b/openair1/SIMULATION/tests/CMakeLists.txt index 1a090c566a..566028234d 100644 --- a/openair1/SIMULATION/tests/CMakeLists.txt +++ b/openair1/SIMULATION/tests/CMakeLists.txt @@ -17,33 +17,11 @@ define_property(TEST PROPERTY TEST_DESCRIPTION BRIEF_DOCS "A human-readable description of this test" FULL_DOCS "A human-readable description of this test") -# Define a macro to add tests for different physical simulators -macro(add_physim_test test_name test_description test_exec) - # catch all the arguments past the last expected arqument and store them in the options_list - if (NOT TARGET ${test_exec}) - message(FATAL_ERROR "test executable ${test_exec} is not an executable") - endif() - set(options_list ${ARGN}) - add_test( - NAME ${test_name} - COMMAND ${test_exec} ${options_list} - COMMAND_EXPAND_LISTS - ) - set_tests_properties(${test_name} PROPERTIES - LABELS "${test_exec}" - TEST_DESCRIPTION "${test_description}" - # pass test description also through environment variable: for cmake < 3.30, - # in JSON export, we cannot recover the description otherwise - # see also https://gitlab.kitware.com/cmake/cmake/-/issues/21490 - ENVIRONMENT "LD_LIBRARY_PATH=.;TEST_DESCRIPTION=${test_description}" - ) - add_dependencies(tests ${test_exec}) -endmacro() - define_property(TEST PROPERTY CHECK_COUNT BRIEF_DOCS "helper property to enumerate checks in environment" FULL_DOCS "the property counts the number of threshold checks, used to enumerate environment variables given to analyze-timing.sh") -function(add_timed_physim_test test_name test_description test_exec) + +function(add_physim_test test_name test_description test_exec) # catch all the arguments past the last expected arqument and store them in the options_list if (NOT TARGET ${test_exec}) message(FATAL_ERROR "test executable ${test_exec} is not an executable") @@ -369,49 +347,49 @@ add_physim_test(physim.5g.nr_psbchsim.test2 "PSBCH TxRx" nr_psbchsim -n 30) if (ENABLE_LDPC_AAL) -add_timed_physim_test(physim.5g-offload.nr_dlsim.testCPU.1 "CPU: SNR = 30, MCS = 5, 106 PRBs, 1 layer" nr_dlsim -n1000 -s30 -S30.2 -e5 -b106 -R106 -X 8,9,10,11,12 -P) -add_timed_physim_test(physim.5g-offload.nr_dlsim.testT2.1 "T2 LDPC offload: SNR = 30, MCS = 5, 106 PRBs, 1 layer" nr_dlsim -n1000 -s30 -S30.2 -e5 -b106 -R106 -X4,5,6,7,8,9 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1) -add_timed_physim_test(physim.5g-offload.nr_dlsim.testCPU.2 "CPU: SNR = 30, MCS = 15, 106 PRBs, 1 layer" nr_dlsim -n1000 -s30 -S30.2 -e15 -b106 -R106 -X 8,9,10,11,12 -P) -add_timed_physim_test(physim.5g-offload.nr_dlsim.testT2.2 "T2 LDPC offload: SNR = 30, MCS = 15, 106 PRBs, 1 layer" nr_dlsim -n1000 -s30 -S30.2 -e15 -b106 -R106 -X4,5,6,7,8,9 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1) -add_timed_physim_test(physim.5g-offload.nr_dlsim.testCPU.3 "CPU: SNR = 30, MCS = 25, 106 PRBs, 1 layer" nr_dlsim -n1000 -s30 -S30.2 -e25 -b106 -R106 -X 8,9,10,11,12 -P) -add_timed_physim_test(physim.5g-offload.nr_dlsim.testT2.3 "T2 LDPC offload: SNR = 30, MCS = 25, 106 PRBs, 1 layer" nr_dlsim -n1000 -s30 -S30.2 -e25 -b106 -R106 -X4,5,6,7,8,9 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1) -add_timed_physim_test(physim.5g-offload.nr_dlsim.testCPU.4 "CPU: SNR = 30, MCS = 5, 273 PRBs, 1 layer" nr_dlsim -n1000 -s30 -S30.2 -e5 -b273 -R273 -X 8,9,10,11,12 -P) -add_timed_physim_test(physim.5g-offload.nr_dlsim.testT2.4 "T2 LDPC offload: SNR = 30, MCS = 5, 273 PRBs, 1 layer" nr_dlsim -n1000 -s30 -S30.2 -e5 -b273 -R273 -X4,5,6,7,8,9 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1) -add_timed_physim_test(physim.5g-offload.nr_dlsim.testCPU.5 "CPU: SNR = 30, MCS = 15, 273 PRBs, 1 layer" nr_dlsim -n1000 -s30 -S30.2 -e15 -b273 -R273 -X 8,9,10,11,12 -P) -add_timed_physim_test(physim.5g-offload.nr_dlsim.testT2.5 "T2 LDPC offload: SNR = 30, MCS = 15, 273 PRBs, 1 layer" nr_dlsim -n1000 -s30 -S30.2 -e15 -b273 -R273 -X4,5,6,7,8,9 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1) -add_timed_physim_test(physim.5g-offload.nr_dlsim.testCPU.6 "CPU: SNR = 30, MCS = 25, 273 PRBs, 1 layer" nr_dlsim -n1000 -s30 -S30.2 -e25 -b273 -R273 -X 8,9,10,11,12 -P) -add_timed_physim_test(physim.5g-offload.nr_dlsim.testT2.6 "T2 LDPC offload: SNR = 30, MCS = 25, 273 PRBs, 1 layer" nr_dlsim -n1000 -s30 -S30.2 -e25 -b273 -R273 -X4,5,6,7,8,9 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1) -add_timed_physim_test(physim.5g-offload.nr_dlsim.testCPU.7 "CPU: SNR = 30, MCS = 5, 273 PRBs, 2 layers" nr_dlsim -n1000 -s30 -S30.2 -e5 -b273 -R273 -X 8,9,10,11,12 -x2 -z2 -y2 -P) -add_timed_physim_test(physim.5g-offload.nr_dlsim.testT2.7 "T2 LDPC offload: SNR = 30, MCS = 5, 273 PRBs, 2 layers" nr_dlsim -n1000 -s30 -S30.2 -e5 -b273 -R273 -X4,5,6,7,8,9 -x2 -z2 -y2 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1) -add_timed_physim_test(physim.5g-offload.nr_dlsim.testCPU.8 "CPU: SNR = 30, MCS = 15, 273 PRBs, 2 layers" nr_dlsim -n1000 -s30 -S30.2 -e15 -b273 -R273 -X 8,9,10,11,12 -x2 -z2 -y2 -P) -add_timed_physim_test(physim.5g-offload.nr_dlsim.testT2.8 "T2 LDPC offload: SNR = 30, MCS = 15, 273 PRBs, 2 layers" nr_dlsim -n1000 -s30 -S30.2 -e15 -b273 -R273 -X4,5,6,7,8,9 -x2 -z2 -y2 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1) -add_timed_physim_test(physim.5g-offload.nr_dlsim.testCPU.9 "CPU: SNR = 30, MCS = 25, 273 PRBs, 2 layers" nr_dlsim -n1000 -s30 -S30.2 -e25 -b273 -R273 -X 8,9,10,11,12 -x2 -z2 -y2 -P) -add_timed_physim_test(physim.5g-offload.nr_dlsim.testT2.9 "T2 LDPC offload: SNR = 30, MCS = 25, 273 PRBs, 2 layers" nr_dlsim -n1000 -s30 -S30.2 -e25 -b273 -R273 -X4,5,6,7,8,9 -x2 -z2 -y2 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1) -add_timed_physim_test(physim.5g-offload.nr_dlsim.testCPU.10 "CPU: SNR = 30, MCS = 5, 273 PRBs, 2 layers, 4 antennas" nr_dlsim -n1000 -s30 -S30.2 -e5 -b273 -R273 -X8,9,10,11,12 -x2 -z4 -y4 -P) -add_timed_physim_test(physim.5g-offload.nr_dlsim.testT2.10 "T2 LDPC offload: SNR = 30, MCS = 5, 273 PRBs, 2 layers, 4 antennas" nr_dlsim -n1000 -s30 -S30.2 -e5 -b273 -R273 -X4,5,6,7,8,9 -x2 -z4 -y4 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1) -add_timed_physim_test(physim.5g-offload.nr_dlsim.testCPU.11 "CPU: SNR = 30, MCS = 20, 273 PRBs, 2 layers, 4 antennas" nr_dlsim -n1000 -s30 -S30.2 -e15 -b273 -R273 -X8,9,10,11,12 -x2 -z4 -y4 -P) -add_timed_physim_test(physim.5g-offload.nr_dlsim.testT2.11 "T2 LDPC offload: SNR = 30, MCS = 20, 273 PRBs, 2 layers, 4 antennas" nr_dlsim -n1000 -s30 -S30.2 -e15 -b273 -R273 -X4,5,6,7,8,9 -x2 -z4 -y4 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1) -add_timed_physim_test(physim.5g-offload.nr_dlsim.testCPU.12 "CPU: SNR = 30, MCS = 27, 273 PRBs, 2 layers, 4 antennas" nr_dlsim -n1000 -s30 -S30.2 -e25 -b273 -R273 -X8,9,10,11,12 -x2 -z4 -y4 -P) -add_timed_physim_test(physim.5g-offload.nr_dlsim.testT2.12 "T2 LDPC offload: SNR = 30, MCS = 27, 273 PRBs, 2 layers, 4 antennas" nr_dlsim -n1000 -s30 -S30.2 -e25 -b273 -R273 -X4,5,6,7,8,9 -x2 -z4 -y4 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1) +add_physim_test(physim.5g-offload.nr_dlsim.testCPU.1 "CPU: SNR = 30, MCS = 5, 106 PRBs, 1 layer" nr_dlsim -n1000 -s30 -S30.2 -e5 -b106 -R106 -X 8,9,10,11,12 -P) +add_physim_test(physim.5g-offload.nr_dlsim.testT2.1 "T2 LDPC offload: SNR = 30, MCS = 5, 106 PRBs, 1 layer" nr_dlsim -n1000 -s30 -S30.2 -e5 -b106 -R106 -X4,5,6,7,8,9 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1) +add_physim_test(physim.5g-offload.nr_dlsim.testCPU.2 "CPU: SNR = 30, MCS = 15, 106 PRBs, 1 layer" nr_dlsim -n1000 -s30 -S30.2 -e15 -b106 -R106 -X 8,9,10,11,12 -P) +add_physim_test(physim.5g-offload.nr_dlsim.testT2.2 "T2 LDPC offload: SNR = 30, MCS = 15, 106 PRBs, 1 layer" nr_dlsim -n1000 -s30 -S30.2 -e15 -b106 -R106 -X4,5,6,7,8,9 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1) +add_physim_test(physim.5g-offload.nr_dlsim.testCPU.3 "CPU: SNR = 30, MCS = 25, 106 PRBs, 1 layer" nr_dlsim -n1000 -s30 -S30.2 -e25 -b106 -R106 -X 8,9,10,11,12 -P) +add_physim_test(physim.5g-offload.nr_dlsim.testT2.3 "T2 LDPC offload: SNR = 30, MCS = 25, 106 PRBs, 1 layer" nr_dlsim -n1000 -s30 -S30.2 -e25 -b106 -R106 -X4,5,6,7,8,9 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1) +add_physim_test(physim.5g-offload.nr_dlsim.testCPU.4 "CPU: SNR = 30, MCS = 5, 273 PRBs, 1 layer" nr_dlsim -n1000 -s30 -S30.2 -e5 -b273 -R273 -X 8,9,10,11,12 -P) +add_physim_test(physim.5g-offload.nr_dlsim.testT2.4 "T2 LDPC offload: SNR = 30, MCS = 5, 273 PRBs, 1 layer" nr_dlsim -n1000 -s30 -S30.2 -e5 -b273 -R273 -X4,5,6,7,8,9 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1) +add_physim_test(physim.5g-offload.nr_dlsim.testCPU.5 "CPU: SNR = 30, MCS = 15, 273 PRBs, 1 layer" nr_dlsim -n1000 -s30 -S30.2 -e15 -b273 -R273 -X 8,9,10,11,12 -P) +add_physim_test(physim.5g-offload.nr_dlsim.testT2.5 "T2 LDPC offload: SNR = 30, MCS = 15, 273 PRBs, 1 layer" nr_dlsim -n1000 -s30 -S30.2 -e15 -b273 -R273 -X4,5,6,7,8,9 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1) +add_physim_test(physim.5g-offload.nr_dlsim.testCPU.6 "CPU: SNR = 30, MCS = 25, 273 PRBs, 1 layer" nr_dlsim -n1000 -s30 -S30.2 -e25 -b273 -R273 -X 8,9,10,11,12 -P) +add_physim_test(physim.5g-offload.nr_dlsim.testT2.6 "T2 LDPC offload: SNR = 30, MCS = 25, 273 PRBs, 1 layer" nr_dlsim -n1000 -s30 -S30.2 -e25 -b273 -R273 -X4,5,6,7,8,9 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1) +add_physim_test(physim.5g-offload.nr_dlsim.testCPU.7 "CPU: SNR = 30, MCS = 5, 273 PRBs, 2 layers" nr_dlsim -n1000 -s30 -S30.2 -e5 -b273 -R273 -X 8,9,10,11,12 -x2 -z2 -y2 -P) +add_physim_test(physim.5g-offload.nr_dlsim.testT2.7 "T2 LDPC offload: SNR = 30, MCS = 5, 273 PRBs, 2 layers" nr_dlsim -n1000 -s30 -S30.2 -e5 -b273 -R273 -X4,5,6,7,8,9 -x2 -z2 -y2 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1) +add_physim_test(physim.5g-offload.nr_dlsim.testCPU.8 "CPU: SNR = 30, MCS = 15, 273 PRBs, 2 layers" nr_dlsim -n1000 -s30 -S30.2 -e15 -b273 -R273 -X 8,9,10,11,12 -x2 -z2 -y2 -P) +add_physim_test(physim.5g-offload.nr_dlsim.testT2.8 "T2 LDPC offload: SNR = 30, MCS = 15, 273 PRBs, 2 layers" nr_dlsim -n1000 -s30 -S30.2 -e15 -b273 -R273 -X4,5,6,7,8,9 -x2 -z2 -y2 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1) +add_physim_test(physim.5g-offload.nr_dlsim.testCPU.9 "CPU: SNR = 30, MCS = 25, 273 PRBs, 2 layers" nr_dlsim -n1000 -s30 -S30.2 -e25 -b273 -R273 -X 8,9,10,11,12 -x2 -z2 -y2 -P) +add_physim_test(physim.5g-offload.nr_dlsim.testT2.9 "T2 LDPC offload: SNR = 30, MCS = 25, 273 PRBs, 2 layers" nr_dlsim -n1000 -s30 -S30.2 -e25 -b273 -R273 -X4,5,6,7,8,9 -x2 -z2 -y2 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1) +add_physim_test(physim.5g-offload.nr_dlsim.testCPU.10 "CPU: SNR = 30, MCS = 5, 273 PRBs, 2 layers, 4 antennas" nr_dlsim -n1000 -s30 -S30.2 -e5 -b273 -R273 -X8,9,10,11,12 -x2 -z4 -y4 -P) +add_physim_test(physim.5g-offload.nr_dlsim.testT2.10 "T2 LDPC offload: SNR = 30, MCS = 5, 273 PRBs, 2 layers, 4 antennas" nr_dlsim -n1000 -s30 -S30.2 -e5 -b273 -R273 -X4,5,6,7,8,9 -x2 -z4 -y4 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1) +add_physim_test(physim.5g-offload.nr_dlsim.testCPU.11 "CPU: SNR = 30, MCS = 20, 273 PRBs, 2 layers, 4 antennas" nr_dlsim -n1000 -s30 -S30.2 -e15 -b273 -R273 -X8,9,10,11,12 -x2 -z4 -y4 -P) +add_physim_test(physim.5g-offload.nr_dlsim.testT2.11 "T2 LDPC offload: SNR = 30, MCS = 20, 273 PRBs, 2 layers, 4 antennas" nr_dlsim -n1000 -s30 -S30.2 -e15 -b273 -R273 -X4,5,6,7,8,9 -x2 -z4 -y4 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1) +add_physim_test(physim.5g-offload.nr_dlsim.testCPU.12 "CPU: SNR = 30, MCS = 27, 273 PRBs, 2 layers, 4 antennas" nr_dlsim -n1000 -s30 -S30.2 -e25 -b273 -R273 -X8,9,10,11,12 -x2 -z4 -y4 -P) +add_physim_test(physim.5g-offload.nr_dlsim.testT2.12 "T2 LDPC offload: SNR = 30, MCS = 27, 273 PRBs, 2 layers, 4 antennas" nr_dlsim -n1000 -s30 -S30.2 -e25 -b273 -R273 -X4,5,6,7,8,9 -x2 -z4 -y4 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1) -add_timed_physim_test(physim.5g-offload.nr_ulsim.testCPU.1 "CPU: SNR = 30, MCS = 5, 106 PRBs, 1 layer" nr_ulsim -n1000 -s30 -S30.2 -m5 -r106 -R106 -C10 -P) -add_timed_physim_test(physim.5g-offload.nr_ulsim.testT2.1 "T2 LDPC offload: SNR = 30, MCS = 5, 106 PRBs, 1 layer" nr_ulsim -n1000 -s30 -S30.2 -m5 -r106 -R106 -C10 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1) -add_timed_physim_test(physim.5g-offload.nr_ulsim.testCPU.2 "CPU: SNR = 30, MCS = 15, 106 PRBs, 1 layer" nr_ulsim -n1000 -s30 -S30.2 -m15 -r106 -R106 -C10 -P) -add_timed_physim_test(physim.5g-offload.nr_ulsim.testT2.2 "T2 LDPC offload: SNR = 30, MCS = 15, 106 PRBs, 1 layer" nr_ulsim -n1000 -s30 -S30.2 -m15 -r106 -R106 -C10 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1) -add_timed_physim_test(physim.5g-offload.nr_ulsim.testCPU.3 "CPU: SNR = 30, MCS = 25, 106 PRBs, 1 layer" nr_ulsim -n1000 -s30 -S30.2 -m25 -r106 -R106 -C10 -P) -add_timed_physim_test(physim.5g-offload.nr_ulsim.testT2.3 "T2 LDPC offload: SNR = 30, MCS = 25, 106 PRBs, 1 layer" nr_ulsim -n1000 -s30 -S30.2 -m25 -r106 -R106 -C10 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1) -add_timed_physim_test(physim.5g-offload.nr_ulsim.testCPU.4 "CPU: SNR = 30, MCS = 5, 273 PRBs, 1 layer" nr_ulsim -n1000 -s30 -S30.2 -m5 -r273 -R273 -C10 -P) -add_timed_physim_test(physim.5g-offload.nr_ulsim.testT2.4 "T2 LDPC offload: SNR = 30, MCS = 5, 273 PRBs, 1 layer" nr_ulsim -n1000 -s30 -S30.2 -m5 -r273 -R273 -C10 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1) -add_timed_physim_test(physim.5g-offload.nr_ulsim.testCPU.5 "CPU: SNR = 30, MCS = 15, 273 PRBs, 1 layer" nr_ulsim -n1000 -s30 -S30.2 -m15 -r273 -R273 -C10 -P) -add_timed_physim_test(physim.5g-offload.nr_ulsim.testT2.5 "T2 LDPC offload: SNR = 30, MCS = 15, 273 PRBs, 1 layer" nr_ulsim -n1000 -s30 -S30.2 -m15 -r273 -R273 -C10 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1) -add_timed_physim_test(physim.5g-offload.nr_ulsim.testCPU.6 "CPU: SNR = 30, MCS = 25, 273 PRBs, 1 layer" nr_ulsim -n1000 -s30 -S30.2 -m25 -r273 -R273 -C10 -P) -add_timed_physim_test(physim.5g-offload.nr_ulsim.testT2.6 "T2 LDPC offload: SNR = 30, MCS = 25, 273 PRBs, 1 layer" nr_ulsim -n1000 -s30 -S30.2 -m25 -r273 -R273 -C10 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1) -add_timed_physim_test(physim.5g-offload.nr_ulsim.testCPU.7 "CPU: SNR = 30, MCS = 5, 273 PRBs, 2 layers" nr_ulsim -n1000 -s30 -S30.2 -m5 -r273 -R273 -C10 -W2 -z2 -y2 -P) -add_timed_physim_test(physim.5g-offload.nr_ulsim.testT2.7 "T2 LDPC offload: SNR = 30, MCS = 5, 273 PRBs, 2 layers" nr_ulsim -n1000 -s30 -S30.2 -m5 -r273 -R273 -C10 -W2 -z2 -y2 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1) -add_timed_physim_test(physim.5g-offload.nr_ulsim.testCPU.8 "CPU: SNR = 30, MCS = 15, 273 PRBs, 2 layers" nr_ulsim -n1000 -s30 -S30.2 -m15 -r273 -R273 -C10 -W2 -z2 -y2 -P) -add_timed_physim_test(physim.5g-offload.nr_ulsim.testT2.8 "T2 LDPC offload: SNR = 30, MCS = 15, 273 PRBs, 2 layers" nr_ulsim -n1000 -s30 -S30.2 -m15 -r273 -R273 -C10 -W2 -z2 -y2 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1) -add_timed_physim_test(physim.5g-offload.nr_ulsim.testCPU.9 "CPU: SNR = 30, MCS = 25, 273 PRBs, 2 layers" nr_ulsim -n1000 -s30 -S30.2 -m25 -r273 -R273 -C10 -W2 -z2 -y2 -P) -add_timed_physim_test(physim.5g-offload.nr_ulsim.testT2.9 "T2 LDPC offload: SNR = 30, MCS = 25, 273 PRBs, 2 layers" nr_ulsim -n1000 -s30 -S30.2 -m25 -r273 -R273 -C10 -W2 -z2 -y2 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1) +add_physim_test(physim.5g-offload.nr_ulsim.testCPU.1 "CPU: SNR = 30, MCS = 5, 106 PRBs, 1 layer" nr_ulsim -n1000 -s30 -S30.2 -m5 -r106 -R106 -C10 -P) +add_physim_test(physim.5g-offload.nr_ulsim.testT2.1 "T2 LDPC offload: SNR = 30, MCS = 5, 106 PRBs, 1 layer" nr_ulsim -n1000 -s30 -S30.2 -m5 -r106 -R106 -C10 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1) +add_physim_test(physim.5g-offload.nr_ulsim.testCPU.2 "CPU: SNR = 30, MCS = 15, 106 PRBs, 1 layer" nr_ulsim -n1000 -s30 -S30.2 -m15 -r106 -R106 -C10 -P) +add_physim_test(physim.5g-offload.nr_ulsim.testT2.2 "T2 LDPC offload: SNR = 30, MCS = 15, 106 PRBs, 1 layer" nr_ulsim -n1000 -s30 -S30.2 -m15 -r106 -R106 -C10 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1) +add_physim_test(physim.5g-offload.nr_ulsim.testCPU.3 "CPU: SNR = 30, MCS = 25, 106 PRBs, 1 layer" nr_ulsim -n1000 -s30 -S30.2 -m25 -r106 -R106 -C10 -P) +add_physim_test(physim.5g-offload.nr_ulsim.testT2.3 "T2 LDPC offload: SNR = 30, MCS = 25, 106 PRBs, 1 layer" nr_ulsim -n1000 -s30 -S30.2 -m25 -r106 -R106 -C10 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1) +add_physim_test(physim.5g-offload.nr_ulsim.testCPU.4 "CPU: SNR = 30, MCS = 5, 273 PRBs, 1 layer" nr_ulsim -n1000 -s30 -S30.2 -m5 -r273 -R273 -C10 -P) +add_physim_test(physim.5g-offload.nr_ulsim.testT2.4 "T2 LDPC offload: SNR = 30, MCS = 5, 273 PRBs, 1 layer" nr_ulsim -n1000 -s30 -S30.2 -m5 -r273 -R273 -C10 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1) +add_physim_test(physim.5g-offload.nr_ulsim.testCPU.5 "CPU: SNR = 30, MCS = 15, 273 PRBs, 1 layer" nr_ulsim -n1000 -s30 -S30.2 -m15 -r273 -R273 -C10 -P) +add_physim_test(physim.5g-offload.nr_ulsim.testT2.5 "T2 LDPC offload: SNR = 30, MCS = 15, 273 PRBs, 1 layer" nr_ulsim -n1000 -s30 -S30.2 -m15 -r273 -R273 -C10 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1) +add_physim_test(physim.5g-offload.nr_ulsim.testCPU.6 "CPU: SNR = 30, MCS = 25, 273 PRBs, 1 layer" nr_ulsim -n1000 -s30 -S30.2 -m25 -r273 -R273 -C10 -P) +add_physim_test(physim.5g-offload.nr_ulsim.testT2.6 "T2 LDPC offload: SNR = 30, MCS = 25, 273 PRBs, 1 layer" nr_ulsim -n1000 -s30 -S30.2 -m25 -r273 -R273 -C10 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1) +add_physim_test(physim.5g-offload.nr_ulsim.testCPU.7 "CPU: SNR = 30, MCS = 5, 273 PRBs, 2 layers" nr_ulsim -n1000 -s30 -S30.2 -m5 -r273 -R273 -C10 -W2 -z2 -y2 -P) +add_physim_test(physim.5g-offload.nr_ulsim.testT2.7 "T2 LDPC offload: SNR = 30, MCS = 5, 273 PRBs, 2 layers" nr_ulsim -n1000 -s30 -S30.2 -m5 -r273 -R273 -C10 -W2 -z2 -y2 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1) +add_physim_test(physim.5g-offload.nr_ulsim.testCPU.8 "CPU: SNR = 30, MCS = 15, 273 PRBs, 2 layers" nr_ulsim -n1000 -s30 -S30.2 -m15 -r273 -R273 -C10 -W2 -z2 -y2 -P) +add_physim_test(physim.5g-offload.nr_ulsim.testT2.8 "T2 LDPC offload: SNR = 30, MCS = 15, 273 PRBs, 2 layers" nr_ulsim -n1000 -s30 -S30.2 -m15 -r273 -R273 -C10 -W2 -z2 -y2 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1) +add_physim_test(physim.5g-offload.nr_ulsim.testCPU.9 "CPU: SNR = 30, MCS = 25, 273 PRBs, 2 layers" nr_ulsim -n1000 -s30 -S30.2 -m25 -r273 -R273 -C10 -W2 -z2 -y2 -P) +add_physim_test(physim.5g-offload.nr_ulsim.testT2.9 "T2 LDPC offload: SNR = 30, MCS = 25, 273 PRBs, 2 layers" nr_ulsim -n1000 -s30 -S30.2 -m25 -r273 -R273 -C10 -W2 -z2 -y2 -P --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev af:00.0 --nrLDPC_coding_aal.dpdk_core_list 11-12 --nrLDPC_coding_aal.is_t2 1) endif() From 31af716ccb4ee9ef8257f4fbc657881fea7090c9 Mon Sep 17 00:00:00 2001 From: Jaroslava Fiedlerova Date: Wed, 8 Oct 2025 11:31:48 +0200 Subject: [PATCH 18/22] Update timing thershold for offload tests on Caracal --- .../SIMULATION/tests/ThresholdsOffload.cmake | 84 +++++++++---------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/openair1/SIMULATION/tests/ThresholdsOffload.cmake b/openair1/SIMULATION/tests/ThresholdsOffload.cmake index 72b2ee2569..9f787f993a 100644 --- a/openair1/SIMULATION/tests/ThresholdsOffload.cmake +++ b/openair1/SIMULATION/tests/ThresholdsOffload.cmake @@ -1,43 +1,43 @@ -check_threshold(physim.5g-offload.nr_dlsim.testCPU.1 "DLSCH encoding time" "< 230") -check_threshold(physim.5g-offload.nr_dlsim.testT2.1 "DLSCH encoding time" "< 100") -check_threshold(physim.5g-offload.nr_dlsim.testCPU.2 "DLSCH encoding time" "< 300") -check_threshold(physim.5g-offload.nr_dlsim.testT2.2 "DLSCH encoding time" "< 100") -check_threshold(physim.5g-offload.nr_dlsim.testCPU.3 "DLSCH encoding time" "< 350") -check_threshold(physim.5g-offload.nr_dlsim.testT2.3 "DLSCH encoding time" "< 200") -check_threshold(physim.5g-offload.nr_dlsim.testCPU.4 "DLSCH encoding time" "< 300") -check_threshold(physim.5g-offload.nr_dlsim.testT2.4 "DLSCH encoding time" "< 150") -check_threshold(physim.5g-offload.nr_dlsim.testCPU.5 "DLSCH encoding time" "< 350") -check_threshold(physim.5g-offload.nr_dlsim.testT2.5 "DLSCH encoding time" "< 250") -check_threshold(physim.5g-offload.nr_dlsim.testCPU.6 "DLSCH encoding time" "< 400") -check_threshold(physim.5g-offload.nr_dlsim.testT2.6 "DLSCH encoding time" "< 400") -check_threshold(physim.5g-offload.nr_dlsim.testCPU.7 "DLSCH encoding time" "< 400") -check_threshold(physim.5g-offload.nr_dlsim.testT2.7 "DLSCH encoding time" "< 200") -check_threshold(physim.5g-offload.nr_dlsim.testCPU.8 "DLSCH encoding time" "< 450") -check_threshold(physim.5g-offload.nr_dlsim.testT2.8 "DLSCH encoding time" "< 500") -check_threshold(physim.5g-offload.nr_dlsim.testCPU.9 "DLSCH encoding time" "< 500") -check_threshold(physim.5g-offload.nr_dlsim.testT2.9 "DLSCH encoding time" "< 500") -check_threshold(physim.5g-offload.nr_dlsim.testCPU.10 "DLSCH encoding time" "< 400") -check_threshold(physim.5g-offload.nr_dlsim.testT2.10 "DLSCH encoding time" "< 200") -check_threshold(physim.5g-offload.nr_dlsim.testCPU.11 "DLSCH encoding time" "< 400") -check_threshold(physim.5g-offload.nr_dlsim.testT2.11 "DLSCH encoding time" "< 300") -check_threshold(physim.5g-offload.nr_dlsim.testCPU.12 "DLSCH encoding time" "< 450") -check_threshold(physim.5g-offload.nr_dlsim.testT2.12 "DLSCH encoding time" "< 450") +check_threshold_variance(physim.5g-offload.nr_dlsim.testCPU.1 "DLSCH encoding time" AVG 50 ABS_VAR 10) +check_threshold_variance(physim.5g-offload.nr_dlsim.testT2.1 "DLSCH encoding time" AVG 19 ABS_VAR 4) +check_threshold_variance(physim.5g-offload.nr_dlsim.testCPU.2 "DLSCH encoding time" AVG 65 ABS_VAR 13) +check_threshold_variance(physim.5g-offload.nr_dlsim.testT2.2 "DLSCH encoding time" AVG 27 ABS_VAR 6) +check_threshold_variance(physim.5g-offload.nr_dlsim.testCPU.3 "DLSCH encoding time" AVG 97 ABS_VAR 20) +check_threshold_variance(physim.5g-offload.nr_dlsim.testT2.3 "DLSCH encoding time" AVG 33 ABS_VAR 7) +check_threshold_variance(physim.5g-offload.nr_dlsim.testCPU.4 "DLSCH encoding time" AVG 68 ABS_VAR 14) +check_threshold_variance(physim.5g-offload.nr_dlsim.testT2.4 "DLSCH encoding time" AVG 26 ABS_VAR 6) +check_threshold_variance(physim.5g-offload.nr_dlsim.testCPU.5 "DLSCH encoding time" AVG 108 ABS_VAR 22) +check_threshold_variance(physim.5g-offload.nr_dlsim.testT2.5 "DLSCH encoding time" AVG 46 ABS_VAR 10) +check_threshold_variance(physim.5g-offload.nr_dlsim.testCPU.6 "DLSCH encoding time" AVG 131 ABS_VAR 27) +check_threshold_variance(physim.5g-offload.nr_dlsim.testT2.6 "DLSCH encoding time" AVG 80 ABS_VAR 16) +check_threshold_variance(physim.5g-offload.nr_dlsim.testCPU.7 "DLSCH encoding time" AVG 120 ABS_VAR 24) +check_threshold_variance(physim.5g-offload.nr_dlsim.testT2.7 "DLSCH encoding time" AVG 44 ABS_VAR 9) +check_threshold_variance(physim.5g-offload.nr_dlsim.testCPU.8 "DLSCH encoding time" AVG 146 ABS_VAR 30) +check_threshold_variance(physim.5g-offload.nr_dlsim.testT2.8 "DLSCH encoding time" AVG 87 ABS_VAR 18) +check_threshold_variance(physim.5g-offload.nr_dlsim.testCPU.9 "DLSCH encoding time" AVG 204 ABS_VAR 41) +check_threshold_variance(physim.5g-offload.nr_dlsim.testT2.9 "DLSCH encoding time" AVG 138 ABS_VAR 28) +check_threshold_variance(physim.5g-offload.nr_dlsim.testCPU.10 "DLSCH encoding time" AVG 149 ABS_VAR 30) +check_threshold_variance(physim.5g-offload.nr_dlsim.testT2.10 "DLSCH encoding time" AVG 49 ABS_VAR 10) +check_threshold_variance(physim.5g-offload.nr_dlsim.testCPU.11 "DLSCH encoding time" AVG 164 ABS_VAR 33) +check_threshold_variance(physim.5g-offload.nr_dlsim.testT2.11 "DLSCH encoding time" AVG 90 ABS_VAR 18) +check_threshold_variance(physim.5g-offload.nr_dlsim.testCPU.12 "DLSCH encoding time" AVG 223 ABS_VAR 45) +check_threshold_variance(physim.5g-offload.nr_dlsim.testT2.12 "DLSCH encoding time" AVG 146 ABS_VAR 30) -check_threshold(physim.5g-offload.nr_ulsim.testCPU.1 "ULSCH total decoding time" "< 300") -check_threshold(physim.5g-offload.nr_ulsim.testT2.1 "ULSCH total decoding time" "< 100") -check_threshold(physim.5g-offload.nr_ulsim.testCPU.2 "ULSCH total decoding time" "< 300") -check_threshold(physim.5g-offload.nr_ulsim.testT2.2 "ULSCH total decoding time" "< 150") -check_threshold(physim.5g-offload.nr_ulsim.testCPU.3 "ULSCH total decoding time" "< 250") -check_threshold(physim.5g-offload.nr_ulsim.testT2.3 "ULSCH total decoding time" "< 250") -check_threshold(physim.5g-offload.nr_ulsim.testCPU.4 "ULSCH total decoding time" "< 300") -check_threshold(physim.5g-offload.nr_ulsim.testT2.4 "ULSCH total decoding time" "< 150") -check_threshold(physim.5g-offload.nr_ulsim.testCPU.5 "ULSCH total decoding time" "< 400") -check_threshold(physim.5g-offload.nr_ulsim.testT2.5 "ULSCH total decoding time" "< 350") -check_threshold(physim.5g-offload.nr_ulsim.testCPU.6 "ULSCH total decoding time" "< 400") -check_threshold(physim.5g-offload.nr_ulsim.testT2.6 "ULSCH total decoding time" "< 550") -check_threshold(physim.5g-offload.nr_ulsim.testCPU.7 "ULSCH total decoding time" "< 300") -check_threshold(physim.5g-offload.nr_ulsim.testT2.7 "ULSCH total decoding time" "< 250") -check_threshold(physim.5g-offload.nr_ulsim.testCPU.8 "ULSCH total decoding time" "< 600") -check_threshold(physim.5g-offload.nr_ulsim.testT2.8 "ULSCH total decoding time" "< 650") -check_threshold(physim.5g-offload.nr_ulsim.testCPU.9 "ULSCH total decoding time" "< 650") -check_threshold(physim.5g-offload.nr_ulsim.testT2.9 "ULSCH total decoding time" "< 1100") +check_threshold_variance(physim.5g-offload.nr_ulsim.testCPU.1 "ULSCH total decoding time" AVG 141 ABS_VAR 29) +check_threshold_variance(physim.5g-offload.nr_ulsim.testT2.1 "ULSCH total decoding time" AVG 40 ABS_VAR 8) +check_threshold_variance(physim.5g-offload.nr_ulsim.testCPU.2 "ULSCH total decoding time" AVG 165 ABS_VAR 33) +check_threshold_variance(physim.5g-offload.nr_ulsim.testT2.2 "ULSCH total decoding time" AVG 63 ABS_VAR 13) +check_threshold_variance(physim.5g-offload.nr_ulsim.testCPU.3 "ULSCH total decoding time" AVG 156 ABS_VAR 32) +check_threshold_variance(physim.5g-offload.nr_ulsim.testT2.3 "ULSCH total decoding time" AVG 87 ABS_VAR 18) +check_threshold_variance(physim.5g-offload.nr_ulsim.testCPU.4 "ULSCH total decoding time" AVG 170 ABS_VAR 34) +check_threshold_variance(physim.5g-offload.nr_ulsim.testT2.4 "ULSCH total decoding time" AVG 74 ABS_VAR 15) +check_threshold_variance(physim.5g-offload.nr_ulsim.testCPU.5 "ULSCH total decoding time" AVG 299 ABS_VAR 60) +check_threshold_variance(physim.5g-offload.nr_ulsim.testT2.5 "ULSCH total decoding time" AVG 120 ABS_VAR 24) +check_threshold_variance(physim.5g-offload.nr_ulsim.testCPU.6 "ULSCH total decoding time" AVG 324 ABS_VAR 65) +check_threshold_variance(physim.5g-offload.nr_ulsim.testT2.6 "ULSCH total decoding time" AVG 180 ABS_VAR 36) +check_threshold_variance(physim.5g-offload.nr_ulsim.testCPU.7 "ULSCH total decoding time" AVG 200 ABS_VAR 40) +check_threshold_variance(physim.5g-offload.nr_ulsim.testT2.7 "ULSCH total decoding time" AVG 120 ABS_VAR 24) +check_threshold_variance(physim.5g-offload.nr_ulsim.testCPU.8 "ULSCH total decoding time" AVG 436 ABS_VAR 88) +check_threshold_variance(physim.5g-offload.nr_ulsim.testT2.8 "ULSCH total decoding time" AVG 229 ABS_VAR 46) +check_threshold_variance(physim.5g-offload.nr_ulsim.testCPU.9 "ULSCH total decoding time" AVG 530 ABS_VAR 106) +check_threshold_variance(physim.5g-offload.nr_ulsim.testT2.9 "ULSCH total decoding time" AVG 334 ABS_VAR 67) From bcc616e654bb3baedc0add57a4aa6e527d811190 Mon Sep 17 00:00:00 2001 From: Jaroslava Fiedlerova Date: Mon, 29 Sep 2025 15:35:05 +0200 Subject: [PATCH 19/22] Increase timeout for physim deployments Extend the timeout for physim deployments on OC to allow tests to complete reliably. --- ci-scripts/cls_oaicitest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index 8dc4ae3a6f..2b31f41064 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -255,7 +255,7 @@ def Deploy_Physim(ctx, HTML, node, workdir, script, options): logging.debug(f'Running physims on server {node} workdir {workdir}') with cls_cmd.getConnection(node) as c: sys_info = c.exec_script("scripts/sys-info.sh", 5) - ret = c.exec_script(script, 600, options) + ret = c.exec_script(script, 1000, options) logging.debug(f'"{script}" finished with code {ret.returncode}, output:\n{ret.stdout}') HTML.CreateHtmlTestRowQueue('Query system info', 'OK', [sys_info.stdout]) with cls_cmd.getConnection(node) as ssh: From 5ec7bcdcd28d526df7a0cf653cad81db910d1230 Mon Sep 17 00:00:00 2001 From: Jaroslava Fiedlerova Date: Mon, 22 Sep 2025 13:49:59 +0200 Subject: [PATCH 20/22] Add timing check for physim tests on GraceHopper Update Dockerfile to pass -DPHYSIM_CHECK_FILES="ThresholdsGracehopper.cmake". --- ci-scripts/docker/Dockerfile.physim.ubuntu | 1 + .../tests/ThresholdsGracehopper.cmake | 123 ++++++++++++++++++ 2 files changed, 124 insertions(+) create mode 100644 openair1/SIMULATION/tests/ThresholdsGracehopper.cmake diff --git a/ci-scripts/docker/Dockerfile.physim.ubuntu b/ci-scripts/docker/Dockerfile.physim.ubuntu index c3adfba966..8fe6d91c4a 100644 --- a/ci-scripts/docker/Dockerfile.physim.ubuntu +++ b/ci-scripts/docker/Dockerfile.physim.ubuntu @@ -42,5 +42,6 @@ WORKDIR /oai-ran/build RUN cmake -GNinja -DENABLE_PHYSIM_TESTS=ON \ -DSANITIZE_UNDEFINED=OFF -DSANITIZE_ADDRESS=OFF \ -DCMAKE_C_FLAGS=-Werror -DCMAKE_CXX_FLAGS=-Werror \ + -DPHYSIM_CHECK_FILES="ThresholdsGracehopper.cmake" \ .. && \ ninja ldpctest polartest smallblocktest nr_pbchsim nr_dlschsim nr_ulschsim nr_dlsim nr_ulsim nr_pucchsim nr_prachsim nr_psbchsim diff --git a/openair1/SIMULATION/tests/ThresholdsGracehopper.cmake b/openair1/SIMULATION/tests/ThresholdsGracehopper.cmake new file mode 100644 index 0000000000..7041a4f91b --- /dev/null +++ b/openair1/SIMULATION/tests/ThresholdsGracehopper.cmake @@ -0,0 +1,123 @@ +check_threshold_variance(physim.5g.nr_dlsim.basic.test1 "DLSCH encoding time" AVG 31 ABS_VAR 7) +check_threshold_variance(physim.5g.nr_dlsim.basic.test2 "DLSCH encoding time" AVG 36 ABS_VAR 8) +check_threshold_variance(physim.5g.nr_dlsim.basic.test3 "DLSCH encoding time" AVG 49 ABS_VAR 10) +check_threshold_variance(physim.5g.nr_dlsim.basic.test4 "DLSCH encoding time" AVG 33 ABS_VAR 7) +check_threshold_variance(physim.5g.nr_dlsim.basic.test5 "DLSCH encoding time" AVG 33 ABS_VAR 7) +check_threshold_variance(physim.5g.nr_dlsim.basic.test6 "DLSCH encoding time" AVG 31 ABS_VAR 7) +check_threshold_variance(physim.5g.nr_dlsim.basic.test7 "DLSCH encoding time" AVG 8 ABS_VAR 2) +check_threshold_variance(physim.5g.nr_dlsim.basic.test8 "DLSCH encoding time" AVG 20 ABS_VAR 4) +check_threshold_variance(physim.5g.nr_dlsim.offset.test1 "DLSCH encoding time" AVG 32 ABS_VAR 7) +check_threshold_variance(physim.5g.nr_dlsim.offset.test2 "DLSCH encoding time" AVG 25 ABS_VAR 5) +check_threshold_variance(physim.5g.nr_dlsim.offset.test3 "DLSCH encoding time" AVG 30 ABS_VAR 6) +check_threshold_variance(physim.5g.nr_dlsim.offset.test4 "DLSCH encoding time" AVG 34 ABS_VAR 7) +check_threshold_variance(physim.5g.nr_dlsim.offset.test5 "DLSCH encoding time" AVG 30 ABS_VAR 6) +check_threshold_variance(physim.5g.nr_dlsim.mcs.mimo.test1 "DLSCH encoding time" AVG 72 ABS_VAR 15) +check_threshold_variance(physim.5g.nr_dlsim.mcs.mimo.test2 "DLSCH encoding time" AVG 36 ABS_VAR 8) +check_threshold_variance(physim.5g.nr_dlsim.mcs.mimo.test3 "DLSCH encoding time" AVG 83 ABS_VAR 17) +check_threshold_variance(physim.5g.nr_dlsim.mcs.mimo.test4 "DLSCH encoding time" AVG 79 ABS_VAR 16) +check_threshold_variance(physim.5g.nr_dlsim.mcs.mimo.test5 "DLSCH encoding time" AVG 30 ABS_VAR 6) +check_threshold_variance(physim.5g.nr_dlsim.mcs.mimo.test6 "DLSCH encoding time" AVG 39 ABS_VAR 8) +check_threshold_variance(physim.5g.nr_dlsim.mcs.mimo.test7 "DLSCH encoding time" AVG 48 ABS_VAR 10) +check_threshold_variance(physim.5g.nr_dlsim.mcs.mimo.test8 "DLSCH encoding time" AVG 141 ABS_VAR 29) +check_threshold_variance(physim.5g.nr_dlsim.mcs.mimo.test9 "DLSCH encoding time" AVG 32 ABS_VAR 7) +check_threshold_variance(physim.5g.nr_dlsim.dmrs.ptrs.test1 "DLSCH encoding time" AVG 31 ABS_VAR 7) +check_threshold_variance(physim.5g.nr_dlsim.dmrs.ptrs.test2 "DLSCH encoding time" AVG 31 ABS_VAR 7) +check_threshold_variance(physim.5g.nr_dlsim.dmrs.ptrs.test3 "DLSCH encoding time" AVG 31 ABS_VAR 7) +check_threshold_variance(physim.5g.nr_dlsim.dmrs.ptrs.test4 "DLSCH encoding time" AVG 31 ABS_VAR 7) +check_threshold_variance(physim.5g.nr_dlsim.dmrs.ptrs.test5 "DLSCH encoding time" AVG 31 ABS_VAR 7) +check_threshold_variance(physim.5g.nr_dlsim.dmrs.ptrs.test6 "DLSCH encoding time" AVG 31 ABS_VAR 7) + +check_threshold_variance(physim.5g.nr_ulsim.misc.test1 "ULSCH total decoding time" AVG 326 ABS_VAR 66) +check_threshold_variance(physim.5g.nr_ulsim.misc.test2 "ULSCH total decoding time" AVG 466 ABS_VAR 94) +check_threshold_variance(physim.5g.nr_ulsim.misc.test3 "ULSCH total decoding time" AVG 558 ABS_VAR 112) +check_threshold_variance(physim.5g.nr_ulsim.misc.test4 "ULSCH total decoding time" AVG 578 ABS_VAR 116) +check_threshold_variance(physim.5g.nr_ulsim.misc.test5 "ULSCH total decoding time" AVG 1019 ABS_VAR 204) +check_threshold_variance(physim.5g.nr_ulsim.misc.test6 "ULSCH total decoding time" AVG 1234 ABS_VAR 247) +check_threshold_variance(physim.5g.nr_ulsim.misc.test7 "ULSCH total decoding time" AVG 244 ABS_VAR 49) +check_threshold_variance(physim.5g.nr_ulsim.misc.test8 "ULSCH total decoding time" AVG 150 ABS_VAR 30) +check_threshold_variance(physim.5g.nr_ulsim.misc.test9 "ULSCH total decoding time" AVG 148 ABS_VAR 30) +check_threshold_variance(physim.5g.nr_ulsim.misc.test10 "ULSCH total decoding time" AVG 151 ABS_VAR 31) +check_threshold_variance(physim.5g.nr_ulsim.misc.test11 "ULSCH total decoding time" AVG 46 ABS_VAR 10) +check_threshold_variance(physim.5g.nr_ulsim.misc.test12 "ULSCH total decoding time" AVG 109 ABS_VAR 22) +check_threshold_variance(physim.5g.nr_ulsim.misc.test13 "ULSCH total decoding time" AVG 85 ABS_VAR 17) +check_threshold_variance(physim.5g.nr_ulsim.misc.test14 "ULSCH total decoding time" AVG 1185 ABS_VAR 237) +check_threshold_variance(physim.5g.nr_ulsim.misc.test15 "ULSCH total decoding time" AVG 114 ABS_VAR 23) +check_threshold_variance(physim.5g.nr_ulsim.sc-fdma.test1 "ULSCH total decoding time" AVG 239 ABS_VAR 48) +check_threshold_variance(physim.5g.nr_ulsim.sc-fdma.test2 "ULSCH total decoding time" AVG 229 ABS_VAR 46) +check_threshold_variance(physim.5g.nr_ulsim.sc-fdma.test3 "ULSCH total decoding time" AVG 989 ABS_VAR 198) +check_threshold_variance(physim.5g.nr_ulsim.sc-fdma.test4 "ULSCH total decoding time" AVG 797 ABS_VAR 160) +check_threshold_variance(physim.5g.nr_ulsim.sc-fdma.test5 "ULSCH total decoding time" AVG 132 ABS_VAR 27) +check_threshold_variance(physim.5g.nr_ulsim.mimo.test1 "ULSCH total decoding time" AVG 513 ABS_VAR 103) +check_threshold_variance(physim.5g.nr_ulsim.mimo.test2 "ULSCH total decoding time" AVG 435 ABS_VAR 87) +check_threshold_variance(physim.5g.nr_ulsim.mimo.test3 "ULSCH total decoding time" AVG 1082 ABS_VAR 217) +check_threshold_variance(physim.5g.nr_ulsim.mimo.test4 "ULSCH total decoding time" AVG 1561 ABS_VAR 313) +check_threshold_variance(physim.5g.nr_ulsim.mimo.test5 "ULSCH total decoding time" AVG 1162 ABS_VAR 233) +check_threshold_variance(physim.5g.nr_ulsim.3gpp.test1 "ULSCH total decoding time" AVG 993 ABS_VAR 199) +check_threshold_variance(physim.5g.nr_ulsim.3gpp.test2 "ULSCH total decoding time" AVG 1038 ABS_VAR 208) +check_threshold_variance(physim.5g.nr_ulsim.3gpp.test3 "ULSCH total decoding time" AVG 1168 ABS_VAR 234) +check_threshold_variance(physim.5g.nr_ulsim.3gpp.test4 "ULSCH total decoding time" AVG 304 ABS_VAR 61) +check_threshold_variance(physim.5g.nr_ulsim.3gpp.test5 "ULSCH total decoding time" AVG 311 ABS_VAR 63) +check_threshold_variance(physim.5g.nr_ulsim.3gpp.test6 "ULSCH total decoding time" AVG 333 ABS_VAR 67) +check_threshold_variance(physim.5g.nr_ulsim.3gpp.test7 "ULSCH total decoding time" AVG 527 ABS_VAR 106) +check_threshold_variance(physim.5g.nr_ulsim.3gpp.test8 "ULSCH total decoding time" AVG 559 ABS_VAR 112) +check_threshold_variance(physim.5g.nr_ulsim.3gpp.test9 "ULSCH total decoding time" AVG 591 ABS_VAR 119) +check_threshold_variance(physim.5g.nr_ulsim.3gpp.test10 "ULSCH total decoding time" AVG 969 ABS_VAR 194) +check_threshold_variance(physim.5g.nr_ulsim.3gpp.test11 "ULSCH total decoding time" AVG 1056 ABS_VAR 212) +check_threshold_variance(physim.5g.nr_ulsim.3gpp.test12 "ULSCH total decoding time" AVG 1202 ABS_VAR 241) +check_threshold_variance(physim.5g.nr_ulsim.3gpp.test13 "ULSCH total decoding time" AVG 303 ABS_VAR 61) +check_threshold_variance(physim.5g.nr_ulsim.3gpp.test14 "ULSCH total decoding time" AVG 320 ABS_VAR 64) +check_threshold_variance(physim.5g.nr_ulsim.3gpp.test15 "ULSCH total decoding time" AVG 332 ABS_VAR 67) +check_threshold_variance(physim.5g.nr_ulsim.3gpp.test16 "ULSCH total decoding time" AVG 536 ABS_VAR 108) +check_threshold_variance(physim.5g.nr_ulsim.3gpp.test17 "ULSCH total decoding time" AVG 560 ABS_VAR 112) +check_threshold_variance(physim.5g.nr_ulsim.3gpp.test18 "ULSCH total decoding time" AVG 606 ABS_VAR 122) +check_threshold_variance(physim.5g.nr_ulsim.3gpp.test19 "ULSCH total decoding time" AVG 1019 ABS_VAR 204) +check_threshold_variance(physim.5g.nr_ulsim.3gpp.test20 "ULSCH total decoding time" AVG 1060 ABS_VAR 212) +check_threshold_variance(physim.5g.nr_ulsim.3gpp.test21 "ULSCH total decoding time" AVG 1158 ABS_VAR 232) +check_threshold_variance(physim.5g.nr_ulsim.3gpp.test22 "ULSCH total decoding time" AVG 2466 ABS_VAR 494) +check_threshold_variance(physim.5g.nr_ulsim.3gpp.test23 "ULSCH total decoding time" AVG 2557 ABS_VAR 512) +check_threshold_variance(physim.5g.nr_ulsim.3gpp.test24 "ULSCH total decoding time" AVG 3149 ABS_VAR 630) +check_threshold_variance(physim.5g.nr_ulsim.3gpp.test25 "ULSCH total decoding time" AVG 469 ABS_VAR 94) +check_threshold_variance(physim.5g.nr_ulsim.3gpp.test26 "ULSCH total decoding time" AVG 416 ABS_VAR 84) +check_threshold_variance(physim.5g.nr_ulsim.3gpp.test27 "ULSCH total decoding time" AVG 1587 ABS_VAR 318) +check_threshold_variance(physim.5g.nr_ulsim.3gpp.test28 "ULSCH total decoding time" AVG 1792 ABS_VAR 359) + +check_threshold_variance(physim.5g.ldpctest.test1 "Encoding time mean:" AVG 6 ABS_VAR 2) +check_threshold_variance(physim.5g.ldpctest.test1 "Decoding time mean:" AVG 103 ABS_VAR 21) +check_threshold_variance(physim.5g.ldpctest.test2 "Encoding time mean:" AVG 9 ABS_VAR 2) +check_threshold_variance(physim.5g.ldpctest.test2 "Decoding time mean:" AVG 113 ABS_VAR 23) +check_threshold_variance(physim.5g.ldpctest.test3 "Encoding time mean:" AVG 8 ABS_VAR 2) +check_threshold_variance(physim.5g.ldpctest.test3 "Decoding time mean:" AVG 123 ABS_VAR 25) +check_threshold_variance(physim.5g.ldpctest.test4 "Encoding time mean:" AVG 11 ABS_VAR 3) +check_threshold_variance(physim.5g.ldpctest.test4 "Decoding time mean:" AVG 137 ABS_VAR 28) +check_threshold_variance(physim.5g.ldpctest.test5 "Encoding time mean:" AVG 10 ABS_VAR 2) +check_threshold_variance(physim.5g.ldpctest.test5 "Decoding time mean:" AVG 143 ABS_VAR 29) +check_threshold_variance(physim.5g.ldpctest.test6 "Encoding time mean:" AVG 16 ABS_VAR 4) +check_threshold_variance(physim.5g.ldpctest.test6 "Decoding time mean:" AVG 148 ABS_VAR 30) +check_threshold_variance(physim.5g.ldpctest.test7 "Encoding time mean:" AVG 14 ABS_VAR 3) +check_threshold_variance(physim.5g.ldpctest.test7 "Decoding time mean:" AVG 171 ABS_VAR 35) +check_threshold_variance(physim.5g.ldpctest.test8 "Encoding time mean:" AVG 17 ABS_VAR 4) +check_threshold_variance(physim.5g.ldpctest.test8 "Decoding time mean:" AVG 185 ABS_VAR 37) +check_threshold_variance(physim.5g.ldpctest.test9 "Encoding time mean:" AVG 19 ABS_VAR 4) +check_threshold_variance(physim.5g.ldpctest.test9 "Decoding time mean:" AVG 206 ABS_VAR 42) +check_threshold_variance(physim.5g.ldpctest.test10 "Encoding time mean:" AVG 14 ABS_VAR 3) +check_threshold_variance(physim.5g.ldpctest.test10 "Decoding time mean:" AVG 222 ABS_VAR 45) +check_threshold_variance(physim.5g.ldpctest.test11 "Encoding time mean:" AVG 2 ABS_VAR 1) +check_threshold_variance(physim.5g.ldpctest.test11 "Decoding time mean:" AVG 8 ABS_VAR 2) +check_threshold_variance(physim.5g.ldpctest.test12 "Encoding time mean:" AVG 10 ABS_VAR 2) +check_threshold_variance(physim.5g.ldpctest.test12 "Decoding time mean:" AVG 10 ABS_VAR 2) +check_threshold_variance(physim.5g.ldpctest.test13 "Encoding time mean:" AVG 18 ABS_VAR 4) +check_threshold_variance(physim.5g.ldpctest.test13 "Decoding time mean:" AVG 10 ABS_VAR 2) +check_threshold_variance(physim.5g.ldpctest.test14 "Encoding time mean:" AVG 44 ABS_VAR 9) +check_threshold_variance(physim.5g.ldpctest.test14 "Decoding time mean:" AVG 15 ABS_VAR 3) +check_threshold_variance(physim.5g.ldpctest.test15 "Encoding time mean:" AVG 49 ABS_VAR 10) +check_threshold_variance(physim.5g.ldpctest.test15 "Decoding time mean:" AVG 14 ABS_VAR 3) +check_threshold_variance(physim.5g.ldpctest.test16 "Encoding time mean:" AVG 3 ABS_VAR 1) +check_threshold_variance(physim.5g.ldpctest.test16 "Decoding time mean:" AVG 15 ABS_VAR 3) +check_threshold_variance(physim.5g.ldpctest.test17 "Encoding time mean:" AVG 3 ABS_VAR 1) +check_threshold_variance(physim.5g.ldpctest.test17 "Decoding time mean:" AVG 14 ABS_VAR 3) +check_threshold_variance(physim.5g.ldpctest.test18 "Encoding time mean:" AVG 5 ABS_VAR 1) +check_threshold_variance(physim.5g.ldpctest.test18 "Decoding time mean:" AVG 32 ABS_VAR 7) +check_threshold_variance(physim.5g.ldpctest.test19 "Encoding time mean:" AVG 8 ABS_VAR 2) +check_threshold_variance(physim.5g.ldpctest.test19 "Decoding time mean:" AVG 48 ABS_VAR 10) +check_threshold_variance(physim.5g.ldpctest.test20 "Encoding time mean:" AVG 10 ABS_VAR 2) +check_threshold_variance(physim.5g.ldpctest.test20 "Decoding time mean:" AVG 57 ABS_VAR 12) From 6843625615e605f62713767d8049754c4d9c84c0 Mon Sep 17 00:00:00 2001 From: Jaroslava Fiedlerova Date: Mon, 29 Sep 2025 15:15:44 +0200 Subject: [PATCH 21/22] Add separate XML file for PhySim with timing check on GH --- ci-scripts/xml_files/physim_gracehopper.xml | 8 ++-- .../xml_files/physim_timed_gracehopper.xml | 46 +++++++++++++++++++ 2 files changed, 50 insertions(+), 4 deletions(-) create mode 100644 ci-scripts/xml_files/physim_timed_gracehopper.xml diff --git a/ci-scripts/xml_files/physim_gracehopper.xml b/ci-scripts/xml_files/physim_gracehopper.xml index a2abc628d0..f04ae2541f 100644 --- a/ci-scripts/xml_files/physim_gracehopper.xml +++ b/ci-scripts/xml_files/physim_gracehopper.xml @@ -21,7 +21,7 @@ --> - build-tab + physim-tab PhySim wrench @@ -38,9 +38,9 @@ Build_Deploy_Docker_PhySim - Deploy and Deploy PhySim + Build and Deploy PhySim localhost - -R 5g -E physim.5g.nr_dlsim.mcs.mimo.test9 -j16 - + -R 5g -E "nr_dlsim|nr_ulsim|ldpctest" -j32 + diff --git a/ci-scripts/xml_files/physim_timed_gracehopper.xml b/ci-scripts/xml_files/physim_timed_gracehopper.xml new file mode 100644 index 0000000000..7658279088 --- /dev/null +++ b/ci-scripts/xml_files/physim_timed_gracehopper.xml @@ -0,0 +1,46 @@ + + + physim-timed-tab + PhySim with timing check + wrench + + 800813 + 010202 + + + + + Create_Workspace + Create new Workspace + localhost + + + + Build_Deploy_Docker_PhySim + Build and Deploy PhySim with timing check + localhost + -R 5g -R "nr_dlsim|nr_ulsim|ldpctest" -E physim.5g.nr_dlsim.mcs.mimo.test9 -j1 + + + From ba8b23772e8855a1a834581e4f1d597613af2f1e Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 9 Oct 2025 08:48:24 +0200 Subject: [PATCH 22/22] CI RFsim 5G F1: reduce DL iperf throughput Reduce throughput requirement, as this fails once two DUs are connected to a UE, which creates more load on the machine and frequently fails with low throughput. --- ci-scripts/xml_files/container_5g_f1_rfsim.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci-scripts/xml_files/container_5g_f1_rfsim.xml b/ci-scripts/xml_files/container_5g_f1_rfsim.xml index efe8fce8e2..9987aeaae0 100644 --- a/ci-scripts/xml_files/container_5g_f1_rfsim.xml +++ b/ci-scripts/xml_files/container_5g_f1_rfsim.xml @@ -134,8 +134,8 @@ Iperf - Iperf (DL/5Mbps/UDP)(30 sec) - -u -b 5M -t 20 -R + Iperf (DL/3Mbps/UDP)(30 sec) + -u -b 3M -t 20 -R rfsim5g_ue acamas rfsim5g_ext_dn