Commit a936c88f authored by francescomani's avatar francescomani

remove unused srs ue phy unit test

parent ee220973
...@@ -218,8 +218,6 @@ struct NR_DL_FRAME_PARMS { ...@@ -218,8 +218,6 @@ struct NR_DL_FRAME_PARMS {
c16_t delay_table[2 * MAX_DELAY_COMP + 1][NR_MAX_OFDM_SYMBOL_SIZE]; c16_t delay_table[2 * MAX_DELAY_COMP + 1][NR_MAX_OFDM_SYMBOL_SIZE];
/// Table used to apply the delay compensation in PUCCH2 /// Table used to apply the delay compensation in PUCCH2
c16_t delay_table128[2 * MAX_DELAY_COMP + 1][128]; c16_t delay_table128[2 * MAX_DELAY_COMP + 1][128];
/// SRS configuration from TS 38.331 RRC
SRS_NR srs_nr;
/// Power used by SSB in order to estimate signal strength and path loss /// Power used by SSB in order to estimate signal strength and path loss
int ss_PBCH_BlockPower; int ss_PBCH_BlockPower;
/// for NR TDD management /// for NR TDD management
......
...@@ -60,7 +60,7 @@ target_link_libraries(pss_test ...@@ -60,7 +60,7 @@ target_link_libraries(pss_test
-Wl,--start-group UTIL SCHED_NR_UE_LIB PHY PHY_COMMON PHY_UE PHY_NR_UE -Wl,--end-group -Wl,--start-group UTIL SCHED_NR_UE_LIB PHY PHY_COMMON PHY_UE PHY_NR_UE -Wl,--end-group
pthread m ${ATLAS_LIBRARIES} pthread m ${ATLAS_LIBRARIES}
) )
add_executable(sss_test ${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/sss_test.c ${SRC_UNIT_TESTS} ) add_executable(sss_test ${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/sss_test.c ${SRC_UNIT_TESTS} )
target_link_libraries(sss_test target_link_libraries(sss_test
-Wl,--start-group UTIL SCHED_NR_UE_LIB PHY PHY_COMMON PHY_UE PHY_NR_UE -Wl,--end-group -Wl,--start-group UTIL SCHED_NR_UE_LIB PHY PHY_COMMON PHY_UE PHY_NR_UE -Wl,--end-group
...@@ -72,13 +72,7 @@ target_link_libraries(frame_config_test ...@@ -72,13 +72,7 @@ target_link_libraries(frame_config_test
-Wl,--start-group UTIL SCHED_NR_UE_LIB PHY PHY_COMMON PHY_UE PHY_NR_UE -Wl,--end-group -Wl,--start-group UTIL SCHED_NR_UE_LIB PHY PHY_COMMON PHY_UE PHY_NR_UE -Wl,--end-group
pthread m ${ATLAS_LIBRARIES} pthread m ${ATLAS_LIBRARIES}
) )
add_executable(srs_test ${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/srs_test.c ${SRC_UNIT_TESTS} )
target_link_libraries(srs_test
-Wl,--start-group UTIL SCHED_NR_UE_LIB PHY PHY_COMMON PHY_UE PHY_NR_UE -Wl,--end-group
pthread m ${ATLAS_LIBRARIES}
)
add_executable(pbch_test ${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/pbch_test.c ${SRC_UNIT_TESTS} ) add_executable(pbch_test ${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/pbch_test.c ${SRC_UNIT_TESTS} )
target_link_libraries(pbch_test target_link_libraries(pbch_test
-Wl,--start-group UTIL SCHED_NR_UE_LIB PHY PHY_COMMON PHY_UE PHY_NR_UE -Wl,--end-group -Wl,--start-group UTIL SCHED_NR_UE_LIB PHY PHY_COMMON PHY_UE PHY_NR_UE -Wl,--end-group
......
SRS TEST
----------
log init done
Start lte_param_init, frame_type 0, extended_prefix 0
[PHY][I][nr_init_frame_parms_ue] Initializing frame parms for mu 1, N_RB 106, Ncp 0
Initializing UE vars (abstraction 0) for eNB TXant 1, UE RXant 1
Ok: No detected differences for uplink reference sequences
Number of srs generations 491520
srs period 1 offset 0
test_srs_periodicity srs at frame 0 slot 0
test_srs_periodicity srs at frame 0 slot 1
test_srs_periodicity srs at frame 0 slot 2
test_srs_periodicity srs at frame 0 slot 3
test_srs_periodicity srs at frame 0 slot 4
test_srs_periodicity srs at frame 0 slot 5
test_srs_periodicity srs at frame 0 slot 6
test_srs_periodicity srs at frame 0 slot 7
test_srs_periodicity srs at frame 0 slot 8
test_srs_periodicity srs at frame 0 slot 9
srs period 1 offset 0
test_srs_periodicity srs at frame 0 slot 0
test_srs_periodicity srs at frame 0 slot 1
test_srs_periodicity srs at frame 0 slot 2
test_srs_periodicity srs at frame 0 slot 3
test_srs_periodicity srs at frame 0 slot 4
test_srs_periodicity srs at frame 0 slot 5
test_srs_periodicity srs at frame 0 slot 6
test_srs_periodicity srs at frame 0 slot 7
test_srs_periodicity srs at frame 0 slot 8
test_srs_periodicity srs at frame 0 slot 9
srs period 2 offset 0
test_srs_periodicity srs at frame 0 slot 0
test_srs_periodicity srs at frame 0 slot 2
test_srs_periodicity srs at frame 0 slot 4
test_srs_periodicity srs at frame 0 slot 6
test_srs_periodicity srs at frame 0 slot 8
test_srs_periodicity srs at frame 1 slot 0
test_srs_periodicity srs at frame 1 slot 2
test_srs_periodicity srs at frame 1 slot 4
test_srs_periodicity srs at frame 1 slot 6
test_srs_periodicity srs at frame 1 slot 8
srs period 2 offset 1
test_srs_periodicity srs at frame 0 slot 1
test_srs_periodicity srs at frame 0 slot 3
test_srs_periodicity srs at frame 0 slot 5
test_srs_periodicity srs at frame 0 slot 7
test_srs_periodicity srs at frame 0 slot 9
test_srs_periodicity srs at frame 1 slot 1
test_srs_periodicity srs at frame 1 slot 3
test_srs_periodicity srs at frame 1 slot 5
test_srs_periodicity srs at frame 1 slot 7
test_srs_periodicity srs at frame 1 slot 9
srs period 4 offset 0
test_srs_periodicity srs at frame 0 slot 0
test_srs_periodicity srs at frame 0 slot 4
test_srs_periodicity srs at frame 0 slot 8
test_srs_periodicity srs at frame 1 slot 2
test_srs_periodicity srs at frame 1 slot 6
test_srs_periodicity srs at frame 2 slot 0
test_srs_periodicity srs at frame 2 slot 4
test_srs_periodicity srs at frame 2 slot 8
test_srs_periodicity srs at frame 3 slot 2
test_srs_periodicity srs at frame 3 slot 6
srs period 4 offset 3
test_srs_periodicity srs at frame 0 slot 3
test_srs_periodicity srs at frame 0 slot 7
test_srs_periodicity srs at frame 1 slot 1
test_srs_periodicity srs at frame 1 slot 5
test_srs_periodicity srs at frame 1 slot 9
test_srs_periodicity srs at frame 2 slot 3
test_srs_periodicity srs at frame 2 slot 7
test_srs_periodicity srs at frame 3 slot 1
test_srs_periodicity srs at frame 3 slot 5
test_srs_periodicity srs at frame 3 slot 9
srs period 5 offset 0
test_srs_periodicity srs at frame 0 slot 0
test_srs_periodicity srs at frame 0 slot 5
test_srs_periodicity srs at frame 1 slot 0
test_srs_periodicity srs at frame 1 slot 5
test_srs_periodicity srs at frame 2 slot 0
test_srs_periodicity srs at frame 2 slot 5
test_srs_periodicity srs at frame 3 slot 0
test_srs_periodicity srs at frame 3 slot 5
test_srs_periodicity srs at frame 4 slot 0
test_srs_periodicity srs at frame 4 slot 5
srs period 5 offset 4
test_srs_periodicity srs at frame 0 slot 4
test_srs_periodicity srs at frame 0 slot 9
test_srs_periodicity srs at frame 1 slot 4
test_srs_periodicity srs at frame 1 slot 9
test_srs_periodicity srs at frame 2 slot 4
test_srs_periodicity srs at frame 2 slot 9
test_srs_periodicity srs at frame 3 slot 4
test_srs_periodicity srs at frame 3 slot 9
test_srs_periodicity srs at frame 4 slot 4
test_srs_periodicity srs at frame 4 slot 9
srs period 8 offset 0
test_srs_periodicity srs at frame 0 slot 0
test_srs_periodicity srs at frame 0 slot 8
test_srs_periodicity srs at frame 1 slot 6
test_srs_periodicity srs at frame 2 slot 4
test_srs_periodicity srs at frame 3 slot 2
test_srs_periodicity srs at frame 4 slot 0
test_srs_periodicity srs at frame 4 slot 8
test_srs_periodicity srs at frame 5 slot 6
test_srs_periodicity srs at frame 6 slot 4
test_srs_periodicity srs at frame 7 slot 2
srs period 8 offset 7
test_srs_periodicity srs at frame 0 slot 7
test_srs_periodicity srs at frame 1 slot 5
test_srs_periodicity srs at frame 2 slot 3
test_srs_periodicity srs at frame 3 slot 1
test_srs_periodicity srs at frame 3 slot 9
test_srs_periodicity srs at frame 4 slot 7
test_srs_periodicity srs at frame 5 slot 5
test_srs_periodicity srs at frame 6 slot 3
test_srs_periodicity srs at frame 7 slot 1
test_srs_periodicity srs at frame 7 slot 9
srs period 10 offset 0
test_srs_periodicity srs at frame 0 slot 0
test_srs_periodicity srs at frame 1 slot 0
test_srs_periodicity srs at frame 2 slot 0
test_srs_periodicity srs at frame 3 slot 0
test_srs_periodicity srs at frame 4 slot 0
test_srs_periodicity srs at frame 5 slot 0
test_srs_periodicity srs at frame 6 slot 0
test_srs_periodicity srs at frame 7 slot 0
test_srs_periodicity srs at frame 8 slot 0
test_srs_periodicity srs at frame 9 slot 0
srs period 10 offset 9
test_srs_periodicity srs at frame 0 slot 9
test_srs_periodicity srs at frame 1 slot 9
test_srs_periodicity srs at frame 2 slot 9
test_srs_periodicity srs at frame 3 slot 9
test_srs_periodicity srs at frame 4 slot 9
test_srs_periodicity srs at frame 5 slot 9
test_srs_periodicity srs at frame 6 slot 9
test_srs_periodicity srs at frame 7 slot 9
test_srs_periodicity srs at frame 8 slot 9
test_srs_periodicity srs at frame 9 slot 9
srs period 16 offset 0
test_srs_periodicity srs at frame 0 slot 0
test_srs_periodicity srs at frame 1 slot 6
test_srs_periodicity srs at frame 3 slot 2
test_srs_periodicity srs at frame 4 slot 8
test_srs_periodicity srs at frame 6 slot 4
test_srs_periodicity srs at frame 8 slot 0
test_srs_periodicity srs at frame 9 slot 6
test_srs_periodicity srs at frame 11 slot 2
test_srs_periodicity srs at frame 12 slot 8
test_srs_periodicity srs at frame 14 slot 4
srs period 16 offset 15
test_srs_periodicity srs at frame 1 slot 5
test_srs_periodicity srs at frame 3 slot 1
test_srs_periodicity srs at frame 4 slot 7
test_srs_periodicity srs at frame 6 slot 3
test_srs_periodicity srs at frame 7 slot 9
test_srs_periodicity srs at frame 9 slot 5
test_srs_periodicity srs at frame 11 slot 1
test_srs_periodicity srs at frame 12 slot 7
test_srs_periodicity srs at frame 14 slot 3
test_srs_periodicity srs at frame 15 slot 9
srs period 20 offset 0
test_srs_periodicity srs at frame 0 slot 0
test_srs_periodicity srs at frame 2 slot 0
test_srs_periodicity srs at frame 4 slot 0
test_srs_periodicity srs at frame 6 slot 0
test_srs_periodicity srs at frame 8 slot 0
test_srs_periodicity srs at frame 10 slot 0
test_srs_periodicity srs at frame 12 slot 0
test_srs_periodicity srs at frame 14 slot 0
test_srs_periodicity srs at frame 16 slot 0
test_srs_periodicity srs at frame 18 slot 0
srs period 20 offset 19
test_srs_periodicity srs at frame 1 slot 9
test_srs_periodicity srs at frame 3 slot 9
test_srs_periodicity srs at frame 5 slot 9
test_srs_periodicity srs at frame 7 slot 9
test_srs_periodicity srs at frame 9 slot 9
test_srs_periodicity srs at frame 11 slot 9
test_srs_periodicity srs at frame 13 slot 9
test_srs_periodicity srs at frame 15 slot 9
test_srs_periodicity srs at frame 17 slot 9
test_srs_periodicity srs at frame 19 slot 9
srs period 32 offset 0
test_srs_periodicity srs at frame 0 slot 0
test_srs_periodicity srs at frame 3 slot 2
test_srs_periodicity srs at frame 6 slot 4
test_srs_periodicity srs at frame 9 slot 6
test_srs_periodicity srs at frame 12 slot 8
test_srs_periodicity srs at frame 16 slot 0
test_srs_periodicity srs at frame 19 slot 2
test_srs_periodicity srs at frame 22 slot 4
test_srs_periodicity srs at frame 25 slot 6
test_srs_periodicity srs at frame 28 slot 8
srs period 32 offset 31
test_srs_periodicity srs at frame 3 slot 1
test_srs_periodicity srs at frame 6 slot 3
test_srs_periodicity srs at frame 9 slot 5
test_srs_periodicity srs at frame 12 slot 7
test_srs_periodicity srs at frame 15 slot 9
test_srs_periodicity srs at frame 19 slot 1
test_srs_periodicity srs at frame 22 slot 3
test_srs_periodicity srs at frame 25 slot 5
test_srs_periodicity srs at frame 28 slot 7
test_srs_periodicity srs at frame 31 slot 9
srs period 40 offset 0
test_srs_periodicity srs at frame 0 slot 0
test_srs_periodicity srs at frame 4 slot 0
test_srs_periodicity srs at frame 8 slot 0
test_srs_periodicity srs at frame 12 slot 0
test_srs_periodicity srs at frame 16 slot 0
test_srs_periodicity srs at frame 20 slot 0
test_srs_periodicity srs at frame 24 slot 0
test_srs_periodicity srs at frame 28 slot 0
test_srs_periodicity srs at frame 32 slot 0
test_srs_periodicity srs at frame 36 slot 0
srs period 40 offset 39
test_srs_periodicity srs at frame 3 slot 9
test_srs_periodicity srs at frame 7 slot 9
test_srs_periodicity srs at frame 11 slot 9
test_srs_periodicity srs at frame 15 slot 9
test_srs_periodicity srs at frame 19 slot 9
test_srs_periodicity srs at frame 23 slot 9
test_srs_periodicity srs at frame 27 slot 9
test_srs_periodicity srs at frame 31 slot 9
test_srs_periodicity srs at frame 35 slot 9
test_srs_periodicity srs at frame 39 slot 9
srs period 64 offset 0
test_srs_periodicity srs at frame 0 slot 0
test_srs_periodicity srs at frame 6 slot 4
test_srs_periodicity srs at frame 12 slot 8
test_srs_periodicity srs at frame 19 slot 2
test_srs_periodicity srs at frame 25 slot 6
test_srs_periodicity srs at frame 32 slot 0
test_srs_periodicity srs at frame 38 slot 4
test_srs_periodicity srs at frame 44 slot 8
test_srs_periodicity srs at frame 51 slot 2
test_srs_periodicity srs at frame 57 slot 6
srs period 64 offset 63
test_srs_periodicity srs at frame 6 slot 3
test_srs_periodicity srs at frame 12 slot 7
test_srs_periodicity srs at frame 19 slot 1
test_srs_periodicity srs at frame 25 slot 5
test_srs_periodicity srs at frame 31 slot 9
test_srs_periodicity srs at frame 38 slot 3
test_srs_periodicity srs at frame 44 slot 7
test_srs_periodicity srs at frame 51 slot 1
test_srs_periodicity srs at frame 57 slot 5
test_srs_periodicity srs at frame 63 slot 9
srs period 80 offset 0
test_srs_periodicity srs at frame 0 slot 0
test_srs_periodicity srs at frame 8 slot 0
test_srs_periodicity srs at frame 16 slot 0
test_srs_periodicity srs at frame 24 slot 0
test_srs_periodicity srs at frame 32 slot 0
test_srs_periodicity srs at frame 40 slot 0
test_srs_periodicity srs at frame 48 slot 0
test_srs_periodicity srs at frame 56 slot 0
test_srs_periodicity srs at frame 64 slot 0
test_srs_periodicity srs at frame 72 slot 0
srs period 80 offset 79
test_srs_periodicity srs at frame 7 slot 9
test_srs_periodicity srs at frame 15 slot 9
test_srs_periodicity srs at frame 23 slot 9
test_srs_periodicity srs at frame 31 slot 9
test_srs_periodicity srs at frame 39 slot 9
test_srs_periodicity srs at frame 47 slot 9
test_srs_periodicity srs at frame 55 slot 9
test_srs_periodicity srs at frame 63 slot 9
test_srs_periodicity srs at frame 71 slot 9
test_srs_periodicity srs at frame 79 slot 9
srs period 160 offset 0
test_srs_periodicity srs at frame 0 slot 0
test_srs_periodicity srs at frame 16 slot 0
test_srs_periodicity srs at frame 32 slot 0
test_srs_periodicity srs at frame 48 slot 0
test_srs_periodicity srs at frame 64 slot 0
test_srs_periodicity srs at frame 80 slot 0
test_srs_periodicity srs at frame 96 slot 0
test_srs_periodicity srs at frame 112 slot 0
test_srs_periodicity srs at frame 128 slot 0
test_srs_periodicity srs at frame 144 slot 0
srs period 160 offset 159
test_srs_periodicity srs at frame 15 slot 9
test_srs_periodicity srs at frame 31 slot 9
test_srs_periodicity srs at frame 47 slot 9
test_srs_periodicity srs at frame 63 slot 9
test_srs_periodicity srs at frame 79 slot 9
test_srs_periodicity srs at frame 95 slot 9
test_srs_periodicity srs at frame 111 slot 9
test_srs_periodicity srs at frame 127 slot 9
test_srs_periodicity srs at frame 143 slot 9
test_srs_periodicity srs at frame 159 slot 9
srs period 320 offset 0
test_srs_periodicity srs at frame 0 slot 0
test_srs_periodicity srs at frame 32 slot 0
test_srs_periodicity srs at frame 64 slot 0
test_srs_periodicity srs at frame 96 slot 0
test_srs_periodicity srs at frame 128 slot 0
test_srs_periodicity srs at frame 160 slot 0
test_srs_periodicity srs at frame 192 slot 0
test_srs_periodicity srs at frame 224 slot 0
test_srs_periodicity srs at frame 256 slot 0
test_srs_periodicity srs at frame 288 slot 0
srs period 320 offset 319
test_srs_periodicity srs at frame 31 slot 9
test_srs_periodicity srs at frame 63 slot 9
test_srs_periodicity srs at frame 95 slot 9
test_srs_periodicity srs at frame 127 slot 9
test_srs_periodicity srs at frame 159 slot 9
test_srs_periodicity srs at frame 191 slot 9
test_srs_periodicity srs at frame 223 slot 9
test_srs_periodicity srs at frame 255 slot 9
test_srs_periodicity srs at frame 287 slot 9
test_srs_periodicity srs at frame 319 slot 9
srs period 640 offset 0
test_srs_periodicity srs at frame 0 slot 0
test_srs_periodicity srs at frame 64 slot 0
test_srs_periodicity srs at frame 128 slot 0
test_srs_periodicity srs at frame 192 slot 0
test_srs_periodicity srs at frame 256 slot 0
test_srs_periodicity srs at frame 320 slot 0
test_srs_periodicity srs at frame 384 slot 0
test_srs_periodicity srs at frame 448 slot 0
test_srs_periodicity srs at frame 512 slot 0
test_srs_periodicity srs at frame 576 slot 0
srs period 640 offset 639
test_srs_periodicity srs at frame 63 slot 9
test_srs_periodicity srs at frame 127 slot 9
test_srs_periodicity srs at frame 191 slot 9
test_srs_periodicity srs at frame 255 slot 9
test_srs_periodicity srs at frame 319 slot 9
test_srs_periodicity srs at frame 383 slot 9
test_srs_periodicity srs at frame 447 slot 9
test_srs_periodicity srs at frame 511 slot 9
test_srs_periodicity srs at frame 575 slot 9
test_srs_periodicity srs at frame 639 slot 9
srs period 1280 offset 0
test_srs_periodicity srs at frame 0 slot 0
test_srs_periodicity srs at frame 128 slot 0
test_srs_periodicity srs at frame 256 slot 0
test_srs_periodicity srs at frame 384 slot 0
test_srs_periodicity srs at frame 512 slot 0
test_srs_periodicity srs at frame 640 slot 0
test_srs_periodicity srs at frame 768 slot 0
test_srs_periodicity srs at frame 896 slot 0
test_srs_periodicity srs at frame 1024 slot 0
test_srs_periodicity srs at frame 1152 slot 0
srs period 1280 offset 1279
test_srs_periodicity srs at frame 127 slot 9
test_srs_periodicity srs at frame 255 slot 9
test_srs_periodicity srs at frame 383 slot 9
test_srs_periodicity srs at frame 511 slot 9
test_srs_periodicity srs at frame 639 slot 9
test_srs_periodicity srs at frame 767 slot 9
test_srs_periodicity srs at frame 895 slot 9
test_srs_periodicity srs at frame 1023 slot 9
test_srs_periodicity srs at frame 1151 slot 9
test_srs_periodicity srs at frame 1279 slot 9
srs period 2560 offset 0
test_srs_periodicity srs at frame 0 slot 0
test_srs_periodicity srs at frame 256 slot 0
test_srs_periodicity srs at frame 512 slot 0
test_srs_periodicity srs at frame 768 slot 0
test_srs_periodicity srs at frame 1024 slot 0
test_srs_periodicity srs at frame 1280 slot 0
test_srs_periodicity srs at frame 1536 slot 0
test_srs_periodicity srs at frame 1792 slot 0
test_srs_periodicity srs at frame 2048 slot 0
test_srs_periodicity srs at frame 2304 slot 0
srs period 2560 offset 2559
test_srs_periodicity srs at frame 255 slot 9
test_srs_periodicity srs at frame 511 slot 9
test_srs_periodicity srs at frame 767 slot 9
test_srs_periodicity srs at frame 1023 slot 9
test_srs_periodicity srs at frame 1279 slot 9
test_srs_periodicity srs at frame 1535 slot 9
test_srs_periodicity srs at frame 1791 slot 9
test_srs_periodicity srs at frame 2047 slot 9
test_srs_periodicity srs at frame 2303 slot 9
test_srs_periodicity srs at frame 2559 slot 9
Test NR SRS is pass
...@@ -66,7 +66,6 @@ tst_files=" ...@@ -66,7 +66,6 @@ tst_files="
pss_test pss_test
sss_test sss_test
pbch_test pbch_test
srs_test
frame_config_test" frame_config_test"
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
......
...@@ -38,7 +38,6 @@ Specific test files ...@@ -38,7 +38,6 @@ Specific test files
pss_test.c: test for detection of primary synchronisation signal. pss_test.c: test for detection of primary synchronisation signal.
sss_test.c: test for detection of secundary synchronisation signal. sss_test.c: test for detection of secundary synchronisation signal.
pbch_test.c: test for decoding of packet braodcast channel. pbch_test.c: test for decoding of packet braodcast channel.
srs_test.c: test of sounding reference signal.
frame_config_test.c : test of frame configurations (FDD/TDD). frame_config_test.c : test of frame configurations (FDD/TDD).
pss_util_test.c: common functions for running synchronisation tests. pss_util_test.c: common functions for running synchronisation tests.
pss_util_test.h: common headers for synchronisation tests. pss_util_test.h: common headers for synchronisation tests.
...@@ -71,14 +70,12 @@ make pss_test -> build pss_test: detection of NR (Primary Synchronisat ...@@ -71,14 +70,12 @@ make pss_test -> build pss_test: detection of NR (Primary Synchronisat
make sss_test -> build sss_test: detection of NR SSS (Secundary Synchronisation Channel - second step for UE synchronisation). make sss_test -> build sss_test: detection of NR SSS (Secundary Synchronisation Channel - second step for UE synchronisation).
make pbch_test -> build pbch_test: decoding of NR PBCH (Packet Broadcast Channel -> UE read MIB Master Information Block which gives network parameters). make pbch_test -> build pbch_test: decoding of NR PBCH (Packet Broadcast Channel -> UE read MIB Master Information Block which gives network parameters).
make frame_config_test -> build frame_config_test: NR FDD/TDD configuration. make frame_config_test -> build frame_config_test: NR FDD/TDD configuration.
make srs_test -> build srs_test: Sounding Reference Signals are transmitted by UE to the network which can use them for channel estimations.
make clean -> clean all projects. make clean -> clean all projects.
And execution of tests: And execution of tests:
./pss_test -> run NR PSS tests. ./pss_test -> run NR PSS tests.
./sss_test -> run NR SSS tests. ./sss_test -> run NR SSS tests.
./pbch_test -> run NR PBCH tests. ./pbch_test -> run NR PBCH tests.
./srs_test -> run NR srs tests.
./frame_config_test -> run NR frame configuration tests. ./frame_config_test -> run NR frame configuration tests.
There is a script in build/run_test.sh which allows: There is a script in build/run_test.sh which allows:
......
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/**********************************************************************
*
* FILENAME : pbch_test.c
*
* MODULE : UE test bench for sss tests
*
* DESCRIPTION : it allows unitary tests for SSS on host machine
*
************************************************************************/
#include <stdlib.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <limits.h>
#include "../../unit_tests/src/pss_util_test.h"
#include "PHY/defs_nr_UE.h"
#include "PHY/INIT/init_extern.h"
#include "PHY/phy_extern_nr_ue.h"
#include "PHY/NR_REFSIG/ul_ref_seq_nr.h"
#include "PHY/NR_UE_TRANSPORT/srs_modulation_nr.h"
/*******************************************************************
*
* NAME : generate_reference_signals
*
* PARAMETERS : none
*
* RETURN : none
*
* DESCRIPTION : generate sequence of reference signals
*
*********************************************************************/
void generate_reference_signals(void)
{
int number_differencies = 0;;
int u, v, Msc_RS;
generate_ul_reference_signal_sequences(SHRT_MAX);
generate_ul_ref_sigs();
for (Msc_RS = 2; Msc_RS < 33; Msc_RS++) {
for (u=0; u < U_GROUP_NUMBER; u++) {
for (v=0; v < V_BASE_SEQUENCE_NUMBER; v++) {
int number_differencies = 0;
/* find index of table which is for this srs length */
unsigned int Msc_RS_index_nr = 0;
while((ul_allocated_re[Msc_RS_index_nr] != dftsizes[Msc_RS]) && (Msc_RS_index_nr < SRS_SB_CONF)){
Msc_RS_index_nr++;
}
if (Msc_RS_index_nr == SRS_SB_CONF) {
printf("No nr index found for length %d \n", dftsizes[Msc_RS]);
assert(0);
}
for (int n=0; n<ul_allocated_re[Msc_RS]; n++) {
if ((ul_ref_sigs[u][v][Msc_RS][n].r != rv_ul_ref_sig[u][v][Msc_RS_index_nr][n].r)
|| (ul_ref_sigs[u][v][Msc_RS][n].i != rv_ul_ref_sig[u][v][Msc_RS_index_nr][n].i)) {
number_differencies++;
}
}
}
if (number_differencies != 0) {
printf("Differencies for u %d v %d Msc_RS %d differencies %d \n", u, v, Msc_RS, number_differencies);
assert(0);
}
else {
//printf("no differencies for u %d v %d Msc_RS %d of size %d differencies %d \n", u, v, Msc_RS, dftsizes[Msc_RS], number_differencies);
}
}
}
printf("Ok: No detected differences for uplink reference sequences \n");
}
/*******************************************************************
*
* NAME : default_srs_configuration
*
* PARAMETERS : none
*
* RETURN : none
*
* DESCRIPTION : set srs default configuration
*
*********************************************************************/
void default_srs_configuration(NR_DL_FRAME_PARMS *frame_parms)
{
SRS_ResourceSet_t *p_srs_resource_set;
SRS_Resource_t *p_srs_resource;
p_srs_resource_set = calloc( 1, sizeof(SRS_ResourceSet_t));
if (p_srs_resource_set == NULL) {
printf("Error default_srs_configuration: memory allocation problem \n");
assert(0);
}
else {
frame_parms->srs_nr.active_srs_Resource_Set = 0;
frame_parms->srs_nr.number_srs_Resource_Set++;
frame_parms->srs_nr.p_SRS_ResourceSetList[0] = p_srs_resource_set;
}
p_srs_resource = calloc( 1, sizeof(SRS_Resource_t));
if (p_srs_resource == NULL) {
free(p_srs_resource_set);
printf("Error default_srs_configuration: memory allocation problem \n");
assert(0);
}
/* init resource */
p_srs_resource->nrof_SrsPorts = port1;
p_srs_resource->transmissionComb = 2; /* K_TC */
p_srs_resource->resourceMapping_nrofSymbols = 1;
p_srs_resource->resourceMapping_repetitionFactor = 1;
p_srs_resource->SRS_Periodicity = sr_sl4;
p_srs_resource->SRS_Offset = 3;
/* init resource set with only 1 resource */
p_srs_resource_set->resourceType = periodic;
p_srs_resource_set->number_srs_Resource++;
frame_parms->srs_nr.p_SRS_ResourceSetList[0]->p_srs_ResourceList[0] = p_srs_resource;
}
/*******************************************************************
*
* NAME : test_srs_single
*
* PARAMETERS : none
*
* RETURN : none
*
* DESCRIPTION : test of SRS feature
* for various combinations of parameters
*
*********************************************************************/
int test_srs_single(NR_DL_FRAME_PARMS *frame_parms, c16_t *txptr, UE_nr_rxtx_proc_t *proc)
{
SRS_Resource_t *p_SRS_Resource = frame_parms->srs_nr.p_SRS_ResourceSetList[0]->p_srs_ResourceList[0];
if (generate_srs_nr(frame_parms->srs_nr.p_SRS_ResourceSetList[0],
frame_parms,
txptr,
AMP,
proc) != 0) {
printf("Ok: test_srs_single for K_TC %d comboffset %d cyclicShift %d u %d B_SRS %d C_SRS %d n_shift %d n_RRC %d b_hop %d groupOrSequenceHopping %d "
" sequenceId %d l_offset %d \n",
p_SRS_Resource->transmissionComb, p_SRS_Resource->combOffset, p_SRS_Resource->cyclicShift, p_SRS_Resource->sequenceId,
p_SRS_Resource->freqHopping_b_SRS, p_SRS_Resource->freqHopping_c_SRS, p_SRS_Resource->freqDomainPosition,
p_SRS_Resource->freqDomainShift, p_SRS_Resource->freqHopping_b_hop, p_SRS_Resource->groupOrSequenceHopping,
p_SRS_Resource->sequenceId, p_SRS_Resource->resourceMapping_startPosition);
printf("Error: generate_srs_nr was not successfully executed ! \n");
return (-1);
}
else {
#if 1
printf("Ok: test_srs_single for K_TC %d comboffset %d cyclicShift %d u %d B_SRS %d C_SRS %d n_shift %d n_RRC %d b_hop %d groupOrSequenceHopping %d "
" sequenceId %d l_offset %d \n",
p_SRS_Resource->transmissionComb, p_SRS_Resource->combOffset, p_SRS_Resource->cyclicShift, p_SRS_Resource->sequenceId,
p_SRS_Resource->freqHopping_b_SRS, p_SRS_Resource->freqHopping_c_SRS, p_SRS_Resource->freqDomainPosition,
p_SRS_Resource->freqDomainShift, p_SRS_Resource->freqHopping_b_hop, p_SRS_Resource->groupOrSequenceHopping,
p_SRS_Resource->sequenceId, p_SRS_Resource->resourceMapping_startPosition);
#endif
return (0);
}
}
/*******************************************************************
*
* NAME : test_srs_periodicity
*
* PARAMETERS : none
*
* RETURN : none
*
* DESCRIPTION : test of SRS feature
* for various combinations of parameters
*
*********************************************************************/
int test_srs_periodicity(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc)
{
NR_DL_FRAME_PARMS *frame_parms = &(ue->frame_parms);
SRS_Resource_t *p_srs_resource = frame_parms->srs_nr.p_SRS_ResourceSetList[0]->p_srs_ResourceList[0];
for (int test_index = 0; test_index < NB_SRS_PERIOD; test_index++) {
p_srs_resource->SRS_Periodicity = test_index;
int srs_current_period = srs_period[p_srs_resource->SRS_Periodicity];
for (int offset = 0 ; offset < 2; offset++) {
if (offset == 0) {
p_srs_resource->SRS_Offset = 0;
}
else {
p_srs_resource->SRS_Offset = srs_current_period - 1;
}
printf("srs period %d offset %d \n", srs_current_period, p_srs_resource->SRS_Offset);
int duration = (10 * srs_current_period) / frame_parms->slots_per_frame;
for (int frame_tx = 0; frame_tx < duration; frame_tx++) {
for (int slot_tx = 0; slot_tx < frame_parms->slots_per_frame; slot_tx++) {
proc->frame_tx = frame_tx;
proc->nr_slot_tx = slot_tx;
if (ue_srs_procedures_nr( ue, proc, 0) == 0) {
printf("test_srs_periodicity srs at frame %d slot %d \n", frame_tx, slot_tx);
}
}
}
}
}
return(0);
}
/*******************************************************************
*
* NAME : test_srs_single
*
* PARAMETERS : none
*
* RETURN : none
*
* DESCRIPTION : test of SRS feature
* for various combinations of parameters
*
*********************************************************************/
int test_srs_specific(NR_DL_FRAME_PARMS *frame_parms,
int32_t *txptr,
UE_nr_rxtx_proc_t *proc)
{
#define NUMBER_TEST_PARAMETERS (12)
//#define SRS_TEST_HOPPING
#ifdef SRS_TEST_HOPPING
#define NUMBER_SRS_TEST (5)
#else
#define NUMBER_SRS_TEST (3)
#endif
SRS_Resource_t *p_SRS_Resource = frame_parms->srs_nr.p_SRS_ResourceSetList[0]->p_srs_ResourceList[0];
uint8_t test_parameters[NUMBER_SRS_TEST][NUMBER_TEST_PARAMETERS] = {
/* K_TC comboffset cyclicShift u B_SRS C_SRS n_shift b_hop n_RRC groupOrSequenceHopping sequenceId l_offset*/
{ 2, 0, 0, 0, 1, 3, 0, 3, 0, neitherHopping, 0, 0 },
{ 2, 0, 0, 0, 1, 3, 0, 3, 2, neitherHopping, 0, 1 },
{ 2, 0, 0, 0, 3, 3, 0, 1, 0, neitherHopping, 0, 0 },
#ifdef SRS_TEST_HOPPING
{ 2, 0, 0, 0, 1, 3, 0, 0, 0, groupHopping, 30, 0 },
{ 2, 0, 0, 0, 0, 14, 0, 0, 0, sequenceHopping, 55, 1 },
#endif
};
for (int test_index = 0; test_index < NUMBER_SRS_TEST; test_index++) {
p_SRS_Resource->transmissionComb = test_parameters[test_index][0]; /* K_TC */
p_SRS_Resource->combOffset = test_parameters[test_index][1];
p_SRS_Resource->cyclicShift = test_parameters[test_index][2];
p_SRS_Resource->sequenceId = test_parameters[test_index][3];
p_SRS_Resource->freqHopping_b_SRS = test_parameters[test_index][4];
p_SRS_Resource->freqHopping_c_SRS = test_parameters[test_index][5];
p_SRS_Resource->freqDomainPosition = test_parameters[test_index][6];
p_SRS_Resource->freqHopping_b_hop = test_parameters[test_index][7];
p_SRS_Resource->freqDomainShift = (uint16_t)test_parameters[test_index][8];
p_SRS_Resource->groupOrSequenceHopping = test_parameters[test_index][9];
p_SRS_Resource->sequenceId = test_parameters[test_index][10];
p_SRS_Resource->resourceMapping_startPosition = test_parameters[test_index][11];
if (test_srs_single(frame_parms,
txptr,
proc) != 0) {
return (-1);
}
}
return (0);
}
/*******************************************************************
*
* NAME : test_srs_group
*
* PARAMETERS : none
*
* RETURN : none
*
* DESCRIPTION : test of SRS feature
* for various combinations of parameters
*
*********************************************************************/
int test_srs_group(NR_DL_FRAME_PARMS *frame_parms,
int32_t *txptr,
UE_nr_rxtx_proc_t *proc)
{
SRS_Resource_t *p_SRS_Resource = frame_parms->srs_nr.p_SRS_ResourceSetList[0]->p_srs_ResourceList[0];
uint8_t n_SRS_cs_max[5] = { 0, 0, 8, 0, 12};
int number_of_test = 0;
for (int K_TC = 2; K_TC < 5; K_TC = K_TC + 2) {
for (int comboffset = 0; comboffset < K_TC; comboffset++) {
for (int cyclicShift = 0; cyclicShift < n_SRS_cs_max[K_TC]; cyclicShift++) {
for (int u = 0; u < U_GROUP_NUMBER; u++) {
for (uint8_t B_SRS = 0; B_SRS < B_SRS_NUMBER; B_SRS++) {
for (uint8_t C_SRS = 0; C_SRS < C_SRS_NUMBER; C_SRS++) {
p_SRS_Resource->transmissionComb = K_TC;
p_SRS_Resource->combOffset = comboffset;
p_SRS_Resource->cyclicShift = cyclicShift;
p_SRS_Resource->sequenceId = u;
p_SRS_Resource->freqHopping_b_SRS = B_SRS;
p_SRS_Resource->freqHopping_c_SRS = C_SRS;
number_of_test++;
if (test_srs_single(frame_parms, txptr, proc) != 0) {
return (-1);
}
}
}
}
}
}
}
printf("Number of srs generations %d\n", number_of_test);
return (0);
}
/*******************************************************************
*
* NAME : test_srs
*
* PARAMETERS : none
*
* RETURN : none
*
* DESCRIPTION : test of SRS feature
*
*********************************************************************/
int test_srs(PHY_VARS_NR_UE *PHY_vars_UE)
{
int32_t *txptr;
NR_DL_FRAME_PARMS *frame_parms = &(PHY_vars_UE->frame_parms);
UE_nr_rxtx_proc_t *p_rxtx_proc;
int v_return = 0;
generate_reference_signals();
/* start test of sounding reference signals */
default_srs_configuration(frame_parms);
txptr = calloc(frame_parms->samples_per_slot , sizeof(int32_t));
if (txptr == NULL) {
printf("Error test_srs: memory allocation problem txptr \n");
assert(0);
}
p_rxtx_proc = calloc( 1, sizeof(UE_nr_rxtx_proc_t));
if (p_rxtx_proc == NULL) {
printf("Error test_srs: memory allocation problem p_rxtx_proc \n");
assert(0);
}
if (test_srs_group(frame_parms,
txptr,
p_rxtx_proc) != 0) {
v_return = -1;
}
if (test_srs_specific(frame_parms,
txptr,
p_rxtx_proc) != 0) {
v_return = -1;
}
if (test_srs_periodicity(PHY_vars_UE, p_rxtx_proc) != 0) {
v_return = -1;
}
for (int i = 0; i < frame_parms->srs_nr.number_srs_Resource_Set; i++) {
if (frame_parms->srs_nr.p_SRS_ResourceSetList[i] != NULL) {
for (int j = 0; j < frame_parms->srs_nr.p_SRS_ResourceSetList[i]->number_srs_Resource; j++) {
if (frame_parms->srs_nr.p_SRS_ResourceSetList[0]->p_srs_ResourceList[0] != NULL) {
free(frame_parms->srs_nr.p_SRS_ResourceSetList[0]->p_srs_ResourceList[0]);
}
else {
printf("Error test_srs: memory allocation problem p_srs_ResourceList \n");
assert(0);
}
}
free(frame_parms->srs_nr.p_SRS_ResourceSetList[i]);
}
else {
printf("Error test_srs: memory allocation problem \n");
assert(0);
}
}
free(txptr);
free(p_rxtx_proc);
free_ul_reference_signal_sequences();
free_ul_ref_sigs();
return (v_return);
}
/*******************************************************************
*
* NAME : main
*
* DESCRIPTION : test of uplink sounding reference signal aka SRS feature
*
*********************************************************************/
int main(int argc, char *argv[])
{
uint8_t transmission_mode = 1;
uint8_t nb_antennas_tx = 1;
uint8_t nb_antennas_rx = 1;
uint8_t frame_type = FDD;
int N_RB_DL=100;
lte_prefix_type_t extended_prefix_flag = NORMAL;
int Nid_cell[] = {(3*0+0)};
VOID_PARAMETER argc;
VOID_PARAMETER argv;
printf(" SRS TEST \n");
printf("----------\n");
if (init_test(nb_antennas_tx, nb_antennas_rx, transmission_mode, extended_prefix_flag, frame_type, Nid_cell[0], N_RB_DL) != 0) {
printf("Initialisation problem for synchronisation test \n");
exit(-1);;
}
if (test_srs(PHY_vars_UE) != 0) {
printf("Test NR SRS is fail \n");
}
else {
printf("Test NR SRS is pass \n");
}
free_context_synchro_nr();
return(0);
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment