mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-14 21:20:30 +00:00
Compare commits
318 Commits
master
...
sl-eurecom
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
88dfcc8722 | ||
|
|
3cc086821f | ||
|
|
a8b4080383 | ||
|
|
a32aba4ec5 | ||
|
|
41552c0ea8 | ||
|
|
762e68c327 | ||
|
|
737155131b | ||
|
|
75cf67dcf2 | ||
|
|
ad2c7372e0 | ||
|
|
65f3dd803f | ||
|
|
f1ee81c22e | ||
|
|
56898c81d3 | ||
|
|
9b37a05a71 | ||
|
|
b960ede044 | ||
|
|
a60aa4250a | ||
|
|
6bdcac9e0b | ||
|
|
50892fa07f | ||
|
|
6cb94c69bd | ||
|
|
f44aa9b86e | ||
|
|
336db01213 | ||
|
|
a6a6fe043e | ||
|
|
41fc98eda5 | ||
|
|
230ebaea70 | ||
|
|
87348885b4 | ||
|
|
9b60e7f4ec | ||
|
|
ea14ae4a15 | ||
|
|
8c8408ba8f | ||
|
|
c8ec792c3e | ||
|
|
c9486cb4f8 | ||
|
|
30cb74b96c | ||
|
|
c608abe8a1 | ||
|
|
5831ceada3 | ||
|
|
174e39b417 | ||
|
|
6ee1ed99a0 | ||
|
|
e766185363 | ||
|
|
7dbe690dcf | ||
|
|
b7e443a2ed | ||
|
|
95c143657f | ||
|
|
98ea7cf8a8 | ||
|
|
817aeb6e1b | ||
|
|
aaccfe4beb | ||
|
|
3cdd8e2221 | ||
|
|
2b6e7e105e | ||
|
|
39fb255189 | ||
|
|
e9dd1d9bf0 | ||
|
|
3bf811e903 | ||
|
|
3782926ae5 | ||
|
|
6ced256931 | ||
|
|
e5f6ec76ec | ||
|
|
c3b314ab67 | ||
|
|
16bd6d4421 | ||
|
|
6e00505f98 | ||
|
|
bb792807ab | ||
|
|
852d0dc2b9 | ||
|
|
1f47719f95 | ||
|
|
383a573665 | ||
|
|
a376968ba4 | ||
|
|
7f7c343856 | ||
|
|
98ae1a296a | ||
|
|
9bab4005fe | ||
|
|
e2746c9e62 | ||
|
|
20ae13fa41 | ||
|
|
3b520e933b | ||
|
|
e214756682 | ||
|
|
fb5e590d44 | ||
|
|
bde50f2e63 | ||
|
|
55042e7b9f | ||
|
|
2fd7150702 | ||
|
|
74adc9eeb5 | ||
|
|
419eb6c81f | ||
|
|
6873c38471 | ||
|
|
70d1e6e52c | ||
|
|
8216cbf79a | ||
|
|
bd210f9961 | ||
|
|
c23170f895 | ||
|
|
ecc78c1bea | ||
|
|
aa57104123 | ||
|
|
d09522d616 | ||
|
|
a522b2dcb5 | ||
|
|
c53d66f140 | ||
|
|
c8b84b8e50 | ||
|
|
47a94020cd | ||
|
|
95b9990ef5 | ||
|
|
16f75be9fd | ||
|
|
aed1eb1841 | ||
|
|
f5511fec98 | ||
|
|
5db24ade57 | ||
|
|
171ba6f765 | ||
|
|
d6dc49bc4a | ||
|
|
302b64cc07 | ||
|
|
19d1eb25ba | ||
|
|
0bcbc7401c | ||
|
|
d56d68332e | ||
|
|
4600b1bba6 | ||
|
|
c282e8700a | ||
|
|
5314c750e8 | ||
|
|
6e708111d9 | ||
|
|
fd2ac5a881 | ||
|
|
8fdc275c98 | ||
|
|
ae692d25ac | ||
|
|
1d3b40a602 | ||
|
|
e4508b1d01 | ||
|
|
a2184d2430 | ||
|
|
3645c75ba8 | ||
|
|
88032eaa6f | ||
|
|
eb7214ed1e | ||
|
|
9ebfc7df80 | ||
|
|
c5dd477299 | ||
|
|
de8bde2eb1 | ||
|
|
041a74ad55 | ||
|
|
dd4c1851f3 | ||
|
|
665143e3f6 | ||
|
|
1a904623e1 | ||
|
|
c9e48b8ce9 | ||
|
|
2abf30ad6e | ||
|
|
d37bf06d39 | ||
|
|
eca4d6a572 | ||
|
|
b4b73f2dea | ||
|
|
bc316b1cec | ||
|
|
0ff70cc496 | ||
|
|
816bfec661 | ||
|
|
e8afaa8cca | ||
|
|
f94fe2ac80 | ||
|
|
b1d76e157c | ||
|
|
eea92750b0 | ||
|
|
3743e20f87 | ||
|
|
497858ef37 | ||
|
|
c56f246dd1 | ||
|
|
0fae27e94c | ||
|
|
e12bf1500d | ||
|
|
ba90296301 | ||
|
|
9530eefa24 | ||
|
|
ea4ed2abd8 | ||
|
|
aab3fd92f2 | ||
|
|
31985289a2 | ||
|
|
2c686dd805 | ||
|
|
368a599dc7 | ||
|
|
8ab77553ad | ||
|
|
0788a62aaf | ||
|
|
865df9eea6 | ||
|
|
4aa058efd8 | ||
|
|
0aa31e7af2 | ||
|
|
4c065efd22 | ||
|
|
2e5c6f7d8d | ||
|
|
bb3fb6cbd0 | ||
|
|
b6f04e3ccf | ||
|
|
92340ebd77 | ||
|
|
8c9588739f | ||
|
|
42112e849d | ||
|
|
c40d0d1cb1 | ||
|
|
a1ec6c9ba2 | ||
|
|
bcc632dbdd | ||
|
|
a7f3cd98ec | ||
|
|
16f63c749d | ||
|
|
7e8d791010 | ||
|
|
7ed097874a | ||
|
|
06bccb4087 | ||
|
|
f41b149a58 | ||
|
|
5f829ddb35 | ||
|
|
59a69b5020 | ||
|
|
0845154ef8 | ||
|
|
34d2c4d917 | ||
|
|
9c6c8366af | ||
|
|
d9ede841a1 | ||
|
|
47dc503ca6 | ||
|
|
2516b5b3f1 | ||
|
|
e6e925f9ab | ||
|
|
105f2b57ef | ||
|
|
848e380cd0 | ||
|
|
1cacd66352 | ||
|
|
286ef21839 | ||
|
|
e88f0f5539 | ||
|
|
b1d830adc2 | ||
|
|
36a29714ff | ||
|
|
9fd148dedd | ||
|
|
378e6f5643 | ||
|
|
15f8f5aeea | ||
|
|
f776b88d7f | ||
|
|
ea9289b2de | ||
|
|
30ce40cf03 | ||
|
|
23300df806 | ||
|
|
d9acb85bfa | ||
|
|
ec7b44e6dd | ||
|
|
076c83b6f2 | ||
|
|
616f759661 | ||
|
|
61e62abb7f | ||
|
|
281dc32c26 | ||
|
|
bb35caebed | ||
|
|
1ff86924ff | ||
|
|
e13e26759e | ||
|
|
9588e10de0 | ||
|
|
885d5cd426 | ||
|
|
6536425c4b | ||
|
|
c7e08dffbe | ||
|
|
d2475e0dd6 | ||
|
|
c584baf9e1 | ||
|
|
6fcda3dcc0 | ||
|
|
3e81184deb | ||
|
|
4e2b8ddb92 | ||
|
|
e8ca12049a | ||
|
|
e9ff59611d | ||
|
|
fb6baf3f76 | ||
|
|
18e9694f31 | ||
|
|
183e029c8c | ||
|
|
da97a8f016 | ||
|
|
1a470d5af6 | ||
|
|
c4250dcd2b | ||
|
|
4c4a667fd6 | ||
|
|
da6f3251f3 | ||
|
|
c534570eec | ||
|
|
9642a70e6d | ||
|
|
1c84699e00 | ||
|
|
9d8db83ebd | ||
|
|
9ceb3ddf93 | ||
|
|
289991b0fe | ||
|
|
38a43f3be6 | ||
|
|
6fc72eae0f | ||
|
|
14420f24cb | ||
|
|
53aa746075 | ||
|
|
4e10e4fa2c | ||
|
|
9879c13cd4 | ||
|
|
63454cebf8 | ||
|
|
813b600305 | ||
|
|
9f9dadf621 | ||
|
|
bb13bfa195 | ||
|
|
ee7244ca05 | ||
|
|
05604174e0 | ||
|
|
cbcd09cbca | ||
|
|
4af8be50bd | ||
|
|
ef9f804da7 | ||
|
|
a465e39bb9 | ||
|
|
3370570ecd | ||
|
|
29b74e7410 | ||
|
|
3fa03965a1 | ||
|
|
d7b1a78e71 | ||
|
|
a2e75e10d3 | ||
|
|
714629c26f | ||
|
|
9e686e448d | ||
|
|
5a88bb670a | ||
|
|
b4a314b64e | ||
|
|
6be609a59f | ||
|
|
69c357655e | ||
|
|
45dd2a7fb0 | ||
|
|
b5dd8de98f | ||
|
|
a42a4d1a06 | ||
|
|
3c485239ba | ||
|
|
14b972e878 | ||
|
|
aff9391806 | ||
|
|
c734cfab93 | ||
|
|
3dd8395c8f | ||
|
|
99a750d672 | ||
|
|
82dfb5c4ec | ||
|
|
7fd180f30b | ||
|
|
f52f258eec | ||
|
|
fdad2f7d17 | ||
|
|
1245c05385 | ||
|
|
e534761719 | ||
|
|
2976628409 | ||
|
|
34aede6ee5 | ||
|
|
d2bbbb16ad | ||
|
|
7e83f75d21 | ||
|
|
c4706eda69 | ||
|
|
28f2129d3e | ||
|
|
238a7837cf | ||
|
|
e474090459 | ||
|
|
6f5205ec1c | ||
|
|
f5250c1ec4 | ||
|
|
156b806abb | ||
|
|
d4e030cc3b | ||
|
|
cb17a2530c | ||
|
|
907130d999 | ||
|
|
d201d89c94 | ||
|
|
5cc6d9e5c3 | ||
|
|
1a815f7e15 | ||
|
|
05cb48d29c | ||
|
|
911bd2be5d | ||
|
|
5ea68eb132 | ||
|
|
94188666ce | ||
|
|
a6d86ea8c9 | ||
|
|
d3702751ec | ||
|
|
63b3d8a92f | ||
|
|
597c897977 | ||
|
|
d1bbbb5dd3 | ||
|
|
18853ab6cc | ||
|
|
9cc948635c | ||
|
|
93d4a07932 | ||
|
|
6bfe76b086 | ||
|
|
e568b2c85a | ||
|
|
435b636d89 | ||
|
|
84504a38a0 | ||
|
|
4bd3007565 | ||
|
|
dad4240016 | ||
|
|
2cda03b016 | ||
|
|
198c319788 | ||
|
|
18d720f377 | ||
|
|
ba6a8554a3 | ||
|
|
ffda9c758a | ||
|
|
60a7eb326c | ||
|
|
6a5a9f18bf | ||
|
|
4bf5166aed | ||
|
|
d4e30b972b | ||
|
|
858a13119b | ||
|
|
5b16b58496 | ||
|
|
0588003034 | ||
|
|
b8d9da2e81 | ||
|
|
8199a1e093 | ||
|
|
7efe5880a1 | ||
|
|
b9caf3ecc4 | ||
|
|
4ca508228f | ||
|
|
9ecd473a41 | ||
|
|
f32c759ecf | ||
|
|
88b6cdd209 | ||
|
|
8bb2f3991b | ||
|
|
4d369a6993 | ||
|
|
70f586cb3c | ||
|
|
745cc733ea | ||
|
|
ee7aacf2ca | ||
|
|
fef6303cc9 |
29
CHANGELOG.md
Normal file → Executable file
29
CHANGELOG.md
Normal file → Executable file
@@ -1,34 +1,5 @@
|
||||
# RELEASE NOTES: #
|
||||
|
||||
## [v2.0.0](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tags/v2.0.0) -> August 2023. ##
|
||||
|
||||
This release adds support for 5G and maintains previous features:
|
||||
* 5G SA in gNB
|
||||
- PHY, MAC, RLC, PDCP, SDAP, RRC layers
|
||||
- 2x2 MIMO and 256-QAM for UL/DL
|
||||
- 15 and 30 kHz subcarrier spacings; 10-100 MHz bandwidths
|
||||
- Up to 800Mbps throughput or 5ms latency
|
||||
- F1, basic E1, 5G FAPI (SCF 222.10.02), split 8 split options
|
||||
- Handling of up to 16 UEs
|
||||
- RRC procedures for connection setup, multiple PDU sessions, reestablishment
|
||||
* 5G SA in UE
|
||||
- PHY, MAC, RLC, PDCP, SDAP, RRC layers
|
||||
- 2x2 MIMO and 256-QAM for UL/DL
|
||||
- 15 and 30 kHz subcarrier spacings; 10-100 MHz bandwidths
|
||||
- Custom FAPI-like MAC/PHY interface
|
||||
- RRC procedures for connection setup and cell measurement
|
||||
* Basic 5G NSA in gNB
|
||||
- X2 sgNB Addition Request between OAI eNB and gNB
|
||||
* 4G eNB and UE
|
||||
- Bugfixes in fairRR scheduler (eNB)
|
||||
- Non-standard F1 midhaul removed (eNB)
|
||||
- FlexRAN removed (eNB)
|
||||
- Sync fixes (UE)
|
||||
* LTE-M supported
|
||||
* Support for AW2S devices, RFsimulator channel emulation support
|
||||
|
||||
For more information on supported features, please refer to the [feature set](doc/FEATURE_SET.md).
|
||||
|
||||
## [v1.2.1](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tags/v1.2.1) -> February 2020. ##
|
||||
|
||||
* Bug fix for mutex lock for wake-up signal
|
||||
|
||||
@@ -163,8 +163,8 @@ set(CMAKE_CXX_FLAGS
|
||||
|
||||
add_boolean_option(SANITIZE_ADDRESS False "enable the address sanitizer (ASan)" ON)
|
||||
if (SANITIZE_ADDRESS)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -fno-omit-frame-pointer -fno-common")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer -fno-common")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -fstack-check -fno-omit-frame-pointer -fno-common")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fstack-check -fno-omit-frame-pointer -fno-common")
|
||||
# There seems to be some incompatibility with pthread_create and the RT scheduler, which
|
||||
# results in pthread_create hanging.
|
||||
#
|
||||
@@ -256,11 +256,8 @@ add_definitions("-DPACKAGE_BUGREPORT=\"openair4g-devel@lists.eurecom.fr\"")
|
||||
|
||||
# Debug related options
|
||||
#########################################
|
||||
add_boolean_option(DEBUG_ASN1 False "Enable ASN1 debug logs" OFF)
|
||||
# asn1c skeletons have hardcoded this flag to make customized debug logs
|
||||
# OAI uses this feature to re-use OAI LOG_I(ASN1, ...)
|
||||
# see common/utils/config.h
|
||||
add_boolean_option(TRACE_ASN1C_ENC_DEC OFF "Enable ASN1 encoder/decoder debug traces via OAI logging system" ON)
|
||||
add_boolean_option(DEBUG_ASN1 False "ASN1 coder/decoder Debug" OFF)
|
||||
#add_boolean_option(DEBUG_MAC_INTERFACE False "print MAC-RLC PDU exchange to stdout") # if true, make sure that global and PDCP log levels are trace, not found in code, commented out, to be removed
|
||||
add_boolean_option(T_TRACER True "Activate the T tracer, a debugging/monitoring framework" ON)
|
||||
add_boolean_option(UE_AUTOTEST_TRACE False "Activate UE autotest specific logs" ON)
|
||||
add_boolean_option(UE_DEBUG_TRACE False "Activate UE debug trace" ON)
|
||||
@@ -270,6 +267,12 @@ set (OCP_ITTI ${OPENAIR_DIR}/common/utils/ocp_itti)
|
||||
add_library(ITTI ${OCP_ITTI}/intertask_interface.cpp)
|
||||
target_link_libraries(ITTI PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
|
||||
|
||||
# asn1c skeletons have hardcoded this flag to make customized debug logs
|
||||
# OAI uses this feature to re-use OAI LOG_I(ASN1, ...)
|
||||
if (DEBUG_ASN1C)
|
||||
add_definitions(-DHAVE_CONFIG_H)
|
||||
endif()
|
||||
|
||||
# asn1c skeletons need this
|
||||
add_definitions(-DHAVE_NETINET_IN_H)
|
||||
|
||||
@@ -623,7 +626,7 @@ add_library(UTIL
|
||||
${OPENAIR_DIR}/common/utils/time_meas.c
|
||||
${OPENAIR_DIR}/common/utils/time_stat.c
|
||||
)
|
||||
target_link_libraries(UTIL PUBLIC ${T_LIB} pthread)
|
||||
target_link_libraries(UTIL PUBLIC ${T_LIB})
|
||||
|
||||
set(SECURITY_SRC
|
||||
${OPENAIR3_DIR}/SECU/secu_defs.c
|
||||
@@ -686,6 +689,7 @@ target_link_libraries(SCHED_UE_LIB PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
|
||||
|
||||
set(SCHED_SRC_NR_UE
|
||||
${OPENAIR1_DIR}/SCHED_NR_UE/phy_procedures_nr_ue.c
|
||||
${OPENAIR1_DIR}/SCHED_NR_UE/phy_procedures_nr_ue_sl.c
|
||||
${OPENAIR1_DIR}/SCHED_NR_UE/fapi_nr_ue_l1.c
|
||||
${OPENAIR1_DIR}/SCHED_NR_UE/phy_frame_config_nr_ue.c
|
||||
${OPENAIR1_DIR}/SCHED_NR_UE/harq_nr.c
|
||||
@@ -1057,8 +1061,20 @@ set(PHY_SRC_UE
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/sss_nr.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/cic_filter_nr.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_initial_sync_sl.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_ue_rf_helpers.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_pbch.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_psbch_rx.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_psbch_tx.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_psfch_tx.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_pscch_tx.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_ue_pucch_rx.c
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_dci.c
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_dci_tools.c
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_ulsch.c
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_ulsch_llr_computation.c
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
|
||||
@@ -1078,11 +1094,14 @@ set(PHY_SRC_UE
|
||||
${OPENAIR1_DIR}/PHY/NR_REFSIG/dmrs_nr.c
|
||||
${OPENAIR1_DIR}/PHY/NR_REFSIG/ptrs_nr.c
|
||||
${OPENAIR1_DIR}/PHY/NR_REFSIG/nr_gold_ue.c
|
||||
${OPENAIR1_DIR}/PHY/NR_REFSIG/nr_gold.c
|
||||
${OPENAIR1_DIR}/PHY/NR_REFSIG/nr_gen_mod_table.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_ESTIMATION/nr_adjust_synch_ue.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_ESTIMATION/nr_adjust_gain.c
|
||||
${OPENAIR1_DIR}/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
|
||||
${OPENAIR1_DIR}/PHY/NR_ESTIMATION/nr_measurements_gNB.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/file_output.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/cadd_vv.c
|
||||
# ${OPENAIR1_DIR}/PHY/TOOLS/lte_dfts.c
|
||||
@@ -1117,8 +1136,8 @@ target_link_libraries(PHY_COMMON PRIVATE asn1_lte_rrc_hdrs)
|
||||
add_library(PHY ${PHY_SRC})
|
||||
target_link_libraries(PHY PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
|
||||
|
||||
pkg_check_modules(blas REQUIRED blas)
|
||||
pkg_check_modules(lapacke REQUIRED lapacke)
|
||||
#pkg_check_modules(blas REQUIRED blas)
|
||||
#pkg_check_modules(lapacke REQUIRED lapacke)
|
||||
|
||||
add_library(PHY_UE ${PHY_SRC_UE})
|
||||
target_link_libraries(PHY_UE PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
|
||||
@@ -1184,6 +1203,18 @@ set(RLC_V2
|
||||
${OPENAIR2_DIR}/LAYER2/rlc_v2/rlc_sdu.c
|
||||
)
|
||||
|
||||
set(NR_RLC_SRC
|
||||
${OPENAIR2_DIR}/LAYER2/nr_rlc/asn1_utils.c
|
||||
${OPENAIR2_DIR}/LAYER2/nr_rlc/nr_rlc_entity.c
|
||||
${OPENAIR2_DIR}/LAYER2/nr_rlc/nr_rlc_entity_am.c
|
||||
${OPENAIR2_DIR}/LAYER2/nr_rlc/nr_rlc_entity_tm.c
|
||||
${OPENAIR2_DIR}/LAYER2/nr_rlc/nr_rlc_entity_um.c
|
||||
${OPENAIR2_DIR}/LAYER2/nr_rlc/nr_rlc_oai_api.c
|
||||
${OPENAIR2_DIR}/LAYER2/nr_rlc/nr_rlc_pdu.c
|
||||
${OPENAIR2_DIR}/LAYER2/nr_rlc/nr_rlc_sdu.c
|
||||
${OPENAIR2_DIR}/LAYER2/nr_rlc/nr_rlc_ue_manager.c
|
||||
)
|
||||
|
||||
set(NR_PDCP_SRC
|
||||
${OPENAIR2_DIR}/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
|
||||
${OPENAIR2_DIR}/LAYER2/nr_pdcp/nr_pdcp_ue_manager.c
|
||||
@@ -1241,6 +1272,7 @@ set(L2_LTE_SRC
|
||||
)
|
||||
|
||||
set(L2_NR_SRC
|
||||
${NR_RLC_SRC}
|
||||
${NR_PDCP_SRC}
|
||||
${NR_SDAP_SRC}
|
||||
${NR_RRC_DIR}/rrc_gNB.c
|
||||
@@ -1278,6 +1310,7 @@ set(L2_RRC_SRC_UE
|
||||
)
|
||||
|
||||
set(NR_L2_SRC_UE
|
||||
${NR_RLC_SRC}
|
||||
${NR_PDCP_SRC}
|
||||
${NR_SDAP_SRC}
|
||||
${NR_UE_RRC_DIR}/L2_interface_ue.c
|
||||
@@ -1335,7 +1368,7 @@ set (MAC_NR_SRC
|
||||
|
||||
|
||||
set (MAC_SRC_UE
|
||||
${PHY_INTERFACE_DIR}/phy_stub_UE.c
|
||||
# ${PHY_INTERFACE_DIR}/phy_stub_UE.c
|
||||
${PHY_INTERFACE_DIR}/queue_t.c
|
||||
${MAC_DIR}/main_ue.c
|
||||
${MAC_DIR}/ue_procedures.c
|
||||
@@ -1349,13 +1382,17 @@ set (MAC_NR_SRC_UE
|
||||
${NR_UE_PHY_INTERFACE_DIR}/NR_IF_Module.c
|
||||
${NR_UE_PHY_INTERFACE_DIR}/NR_Packet_Drop.c
|
||||
${NR_UE_MAC_DIR}/config_ue.c
|
||||
${NR_UE_MAC_DIR}/config_ue_sl.c
|
||||
${NR_UE_MAC_DIR}/mac_vars.c
|
||||
${NR_UE_MAC_DIR}/main_ue_nr.c
|
||||
${NR_UE_MAC_DIR}/nr_ue_procedures.c
|
||||
${NR_UE_MAC_DIR}/nr_ue_procedures_sl.c
|
||||
${NR_UE_MAC_DIR}/nr_ue_scheduler.c
|
||||
${NR_UE_MAC_DIR}/nr_ue_dci_configuration.c
|
||||
${NR_UE_MAC_DIR}/nr_ra_procedures.c
|
||||
${NR_UE_MAC_DIR}/nr_ue_power_procedures.c
|
||||
${NR_UE_MAC_DIR}/nr_ue_sci_slsch.c
|
||||
${NR_UE_MAC_DIR}/nr_slsch_scheduler.c
|
||||
)
|
||||
|
||||
set (ENB_APP_SRC
|
||||
@@ -1430,12 +1467,13 @@ add_library(e1_pdcp_if
|
||||
|
||||
target_link_libraries(e1_pdcp_if PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
|
||||
target_link_libraries(L2_NR PRIVATE f1ap x2ap s1ap ngap nr_rrc e1ap nr_rlc)
|
||||
target_link_libraries(L2_NR PRIVATE f1ap x2ap s1ap ngap nr_rrc e1ap)
|
||||
if(E2_AGENT)
|
||||
target_link_libraries(L2_NR PUBLIC e2_agent e2_ran_func)
|
||||
target_compile_definitions(L2_NR PRIVATE E2_AGENT)
|
||||
endif()
|
||||
|
||||
|
||||
add_library(L2_LTE_NR
|
||||
${L2_RRC_SRC}
|
||||
${MAC_SRC}
|
||||
@@ -1464,7 +1502,7 @@ endif()
|
||||
target_link_libraries(L2_UE PRIVATE asn1_lte_rrc_hdrs)
|
||||
|
||||
add_library( NR_L2_UE ${NR_L2_SRC_UE} ${MAC_NR_SRC_UE} )
|
||||
target_link_libraries(NR_L2_UE PRIVATE f1ap nr_rlc)
|
||||
target_link_libraries(NR_L2_UE PRIVATE f1ap)
|
||||
target_link_libraries(NR_L2_UE PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
|
||||
add_library(MAC_NR_COMMON
|
||||
@@ -1858,8 +1896,6 @@ set (SIMUSRC
|
||||
)
|
||||
add_library(SIMU STATIC ${SIMUSRC} )
|
||||
target_include_directories(SIMU PUBLIC ${OPENAIR1_DIR}/SIMULATION/TOOLS ${OPENAIR1_DIR}/SIMULATION/RF)
|
||||
target_link_libraries(SIMU PRIVATE ${blas_LIBRARIES} ${cblas_LIBRARIES} ${lapacke_LIBRARIES})
|
||||
target_include_directories(SIMU PRIVATE ${blas_INCLUDE_DIRS} ${lapacke_INCLUDE_DIRS})
|
||||
|
||||
# Qt-based scope
|
||||
add_boolean_option(ENABLE_NRQTSCOPE OFF "Build the Qt-Scope" OFF)
|
||||
@@ -2207,6 +2243,24 @@ target_link_libraries(nr_pbchsim PRIVATE
|
||||
)
|
||||
target_link_libraries(nr_pbchsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
|
||||
add_executable(nr_psbchsim
|
||||
${OPENAIR1_DIR}/SIMULATION/NR_PHY/psbchsim.c
|
||||
${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c
|
||||
${OPENAIR_DIR}/common/utils/nr/nr_common.c
|
||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
|
||||
${NR_UE_RRC_DIR}/rrc_nsa.c
|
||||
${NFAPI_USER_DIR}/nfapi.c
|
||||
${NFAPI_USER_DIR}/gnb_ind_vars.c
|
||||
${PHY_INTERFACE_DIR}/queue_t.c
|
||||
${T_SOURCE}
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
)
|
||||
target_link_libraries(nr_psbchsim PRIVATE
|
||||
-Wl,--start-group UTIL SIMU SIMU_ETH PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON nr_rrc CONFIG_LIB L2_NR HASHTABLE x2ap SECURITY ngap -lz -Wl,--end-group
|
||||
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI ${OPENSSL_LIBRARIES} dl shlib_loader
|
||||
)
|
||||
target_link_libraries(nr_psbchsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
|
||||
#PUCCH ---> Prashanth
|
||||
add_executable(nr_pucchsim
|
||||
@@ -2432,16 +2486,6 @@ make_driver(ue_ip ${OPENAIR2_DIR}/NETWORK_DRIVER/UE_IP ${ue_ip_src})
|
||||
|
||||
include(${OPENAIR1_DIR}/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/CMakeLists.txt)
|
||||
|
||||
set(ENABLE_TESTS OFF CACHE STRING "Activate build of tests")
|
||||
set_property(CACHE ENABLE_TESTS PROPERTY TYPE BOOL)
|
||||
if(ENABLE_TESTS)
|
||||
# activates globally adding tests such that they can be run using ctest
|
||||
enable_testing()
|
||||
# meta-target: each test is supposed to add_dependencies(tests ${NEWTEST})
|
||||
# then, it is possible to build and execute all tests using "ninja tests && ctest"
|
||||
add_custom_target(tests)
|
||||
endif()
|
||||
|
||||
add_subdirectory(common)
|
||||
add_subdirectory(doc)
|
||||
add_subdirectory(openair1)
|
||||
|
||||
@@ -12,10 +12,6 @@
|
||||
<a href="https://getfedora.org/en/workstation/"><img src="https://img.shields.io/badge/OS-Fedore37-Green" alt="Supported OS Fedora 37"></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://gitlab.eurecom.fr/oai/openairinterface5g/-/releases"><img alt="GitLab Release (custom instance)" src="https://img.shields.io/gitlab/v/release/oai/openairinterface5g?gitlab_url=https%3A%2F%2Fgitlab.eurecom.fr&include_prereleases&sort=semver"></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://jenkins-oai.eurecom.fr/job/RAN-Container-Parent/"><img src="https://img.shields.io/jenkins/build?jobUrl=https%3A%2F%2Fjenkins-oai.eurecom.fr%2Fjob%2FRAN-Container-Parent%2F&label=build%20Images"></a>
|
||||
</p>
|
||||
|
||||
@@ -103,6 +103,7 @@ pipeline {
|
||||
gitCommitAuthorEmailAddr = sh returnStdout: true, script: 'git log -n1 --pretty=format:%ae ${GIT_COMMIT}'
|
||||
gitCommitAuthorEmailAddr = gitCommitAuthorEmailAddr.trim()
|
||||
echo "GitLab Usermail is ${gitCommitAuthorEmailAddr}"
|
||||
sh "git log -n1 --pretty=format:\"%s\" > .git/CI_COMMIT_MSG"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -287,7 +288,7 @@ pipeline {
|
||||
when { expression {do4Gtest} }
|
||||
steps {
|
||||
script {
|
||||
triggerSlaveJob ('RAN-LTE-FDD-LTEBOX-Container', 'LTE-FDD-LTEBOX-Container')
|
||||
triggerSlaveJob ('RAN-LTE-FDD-LTEBOX-Container', 'RAN-LTE-FDD-LTEBOX-Container')
|
||||
}
|
||||
}
|
||||
post {
|
||||
@@ -303,32 +304,11 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
// Pipeline to test OAI LTE-UE
|
||||
stage ("LTE-B200-FDD-OAIUE-OAICN4G-Container") {
|
||||
when { expression {do4Gtest} }
|
||||
steps {
|
||||
script {
|
||||
triggerSlaveJob ('RAN-LTE-FDD-OAIUE-OAICN4G-Container', 'LTE-FDD-OAIUE-OAICN4G-Container')
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
finalizeSlaveJob('RAN-LTE-FDD-OAIUE-OAICN4G-Container')
|
||||
}
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
currentBuild.result = 'FAILURE'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("LTE-B200-TDD-LTEBOX-Container") {
|
||||
when { expression {do4Gtest} }
|
||||
steps {
|
||||
script {
|
||||
triggerSlaveJob ('RAN-LTE-TDD-LTEBOX-Container', 'LTE-TDD-LTEBOX-Container')
|
||||
triggerSlaveJob ('RAN-LTE-TDD-LTEBOX-Container', 'RAN-LTE-TDD-LTEBOX-Container')
|
||||
}
|
||||
}
|
||||
post {
|
||||
@@ -488,7 +468,7 @@ pipeline {
|
||||
when { expression {do5Gtest} }
|
||||
steps {
|
||||
script {
|
||||
triggerSlaveJob ('RAN-SA-OAIUE-CN5G', 'SA-OAIUE-CN5G')
|
||||
triggerSlaveJob ('RAN-SA-OAIUE-CN5G', 'RAN-SA-OAIUE-CN5G')
|
||||
}
|
||||
}
|
||||
post {
|
||||
@@ -524,6 +504,24 @@ pipeline {
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
def eSubject = JOB_NAME + ' - Build # ' + BUILD_ID + ' - ' + currentBuild.result + '!'
|
||||
def eBody = "Hi,\n\n"
|
||||
eBody += "Here are attached HTML report files for " + JOB_NAME + " - Build # " + BUILD_ID + " - " + currentBuild.result + "!\n\n"
|
||||
eBody += "Regards,\n"
|
||||
eBody += "OAI CI Team"
|
||||
emailext attachmentsPattern: '*results*.html',
|
||||
body: eBody,
|
||||
replyTo: 'no-reply@openairinterface.org',
|
||||
subject: eSubject,
|
||||
to: gitCommitAuthorEmailAddr
|
||||
|
||||
if (fileExists('.git/CI_COMMIT_MSG')) {
|
||||
sh "rm -f .git/CI_COMMIT_MSG"
|
||||
}
|
||||
}
|
||||
}
|
||||
success {
|
||||
script {
|
||||
def message = "OAI " + JOB_NAME + " build (" + BUILD_ID + "): passed (" + BUILD_URL + ")"
|
||||
|
||||
@@ -49,75 +49,75 @@ adb_ue_2:
|
||||
|
||||
amarisoft_ue:
|
||||
Host: amariue
|
||||
InitScript: /root/2023-06-10/lteue-linux-2023-06-10/lteue /root/oaicicd/ran_sa_aw2s_asue/aw2s-multi-20897-2x2.cfg &
|
||||
TermScript: /root/2023-06-10/libs/ws.js -t 10 127.0.0.1:9002 '{"message":"quit"}' || killall -KILL lteue-avx2
|
||||
InitScript: /root/NV18-06-2022/lteue-linux-2023-03-17/lteue /root/oaicicd/ran_sa_aw2s_asue/aw2s-multi-20897-2x2.cfg &
|
||||
TermScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js -t 10 127.0.0.1:9002 '{"message":"quit"}' || killall -KILL lteue-avx2
|
||||
amarisoft_ue_1:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-06-10/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":1}'
|
||||
DetachScript: /root/2023-06-10/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":1}'
|
||||
AttachScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":1}'
|
||||
DetachScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":1}'
|
||||
NetworkScript: ip netns exec ue1 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue1
|
||||
MTU: 1500
|
||||
amarisoft_ue_2:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-06-10/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":2}'
|
||||
DetachScript: /root/2023-06-10/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":2}'
|
||||
AttachScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":2}'
|
||||
DetachScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":2}'
|
||||
NetworkScript: ip netns exec ue2 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue2
|
||||
MTU: 1500
|
||||
amarisoft_ue_3:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-06-10/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":3}'
|
||||
DetachScript: /root/2023-06-10/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":3}'
|
||||
AttachScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":3}'
|
||||
DetachScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":3}'
|
||||
NetworkScript: ip netns exec ue3 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue3
|
||||
MTU: 1500
|
||||
amarisoft_ue_4:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-06-10/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":4}'
|
||||
DetachScript: /root/2023-06-10/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":4}'
|
||||
AttachScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":4}'
|
||||
DetachScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":4}'
|
||||
NetworkScript: ip netns exec ue4 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue4
|
||||
MTU: 1500
|
||||
amarisoft_ue_5:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-06-10/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":5}'
|
||||
DetachScript: /root/2023-06-10/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":5}'
|
||||
AttachScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":5}'
|
||||
DetachScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":5}'
|
||||
NetworkScript: ip netns exec ue5 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue5
|
||||
MTU: 1500
|
||||
amarisoft_ue_6:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-06-10/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":6}'
|
||||
DetachScript: /root/2023-06-10/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":6}'
|
||||
AttachScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":6}'
|
||||
DetachScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":6}'
|
||||
NetworkScript: ip netns exec ue6 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue6
|
||||
MTU: 1500
|
||||
amarisoft_ue_7:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-06-10/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":7}'
|
||||
DetachScript: /root/2023-06-10/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":7}'
|
||||
AttachScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":7}'
|
||||
DetachScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":7}'
|
||||
NetworkScript: ip netns exec ue7 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue7
|
||||
MTU: 1500
|
||||
amarisoft_ue_8:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-06-10/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":8}'
|
||||
DetachScript: /root/2023-06-10/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":8}'
|
||||
AttachScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":8}'
|
||||
DetachScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":8}'
|
||||
NetworkScript: ip netns exec ue8 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue8
|
||||
MTU: 1500
|
||||
amarisoft_ue_9:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-06-10/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":9}'
|
||||
DetachScript: /root/2023-06-10/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":9}'
|
||||
AttachScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":9}'
|
||||
DetachScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":9}'
|
||||
NetworkScript: ip netns exec ue9 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue9
|
||||
MTU: 1500
|
||||
amarisoft_ue_10:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-06-10/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":10}'
|
||||
DetachScript: /root/2023-06-10/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":10}'
|
||||
AttachScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":10}'
|
||||
DetachScript: /root/NV18-06-2022/lteue-linux-2023-03-17/doc/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":10}'
|
||||
NetworkScript: ip netns exec ue10 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue10
|
||||
MTU: 1500
|
||||
@@ -130,13 +130,6 @@ oai_ue_caracal:
|
||||
IF: oaitun_ue1
|
||||
MTU: 1500
|
||||
|
||||
lte_oai_ue_carabe:
|
||||
Host: carabe
|
||||
NetworkScript: docker exec lte-b200-ue-fdd-10Mhz-tm1 ip a show dev oaitun_ue1
|
||||
CmdPrefix: docker exec lte-b200-ue-fdd-10Mhz-tm1
|
||||
IF: oaitun_ue1
|
||||
MTU: 1500
|
||||
|
||||
rfsim5g_gnb_nos1:
|
||||
Host: localhost
|
||||
NetworkScript: docker exec rfsim5g-oai-gnb ip a show dev oaitun_enb1
|
||||
|
||||
@@ -742,7 +742,6 @@ class Containerize():
|
||||
if lIpAddr == '' or lUserName == '' or lPassWord == '' or lSourcePath == '':
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
sys.exit('Insufficient Parameter')
|
||||
logging.debug('\u001B[1m Pulling image(s) on server: ' + lIpAddr + '\u001B[0m')
|
||||
myCmd = cls_cmd.getConnection(lIpAddr)
|
||||
imagePrefix = 'porcepix.sboai.cs.eurecom.fr'
|
||||
response = myCmd.run(f'docker login -u oaicicd -p oaicicd {imagePrefix}')
|
||||
@@ -904,7 +903,7 @@ class Containerize():
|
||||
cnt = 0
|
||||
while (cnt < 20):
|
||||
mySSH.command('docker logs ' + containerName + ' | egrep --text --color=never -i "wait|sync|Starting"', '\$', 30)
|
||||
result = re.search('got sync|Starting E1AP at CU UP|Starting F1AP at CU|Got sync|Waiting for RUs to be configured', mySSH.getBefore())
|
||||
result = re.search('got sync|Starting F1AP at CU|Got sync|Waiting for RUs to be configured', mySSH.getBefore())
|
||||
if result is None:
|
||||
time.sleep(6)
|
||||
cnt += 1
|
||||
@@ -1006,7 +1005,7 @@ class Containerize():
|
||||
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ENB_PROCESS_NOLOGFILE_TO_ANALYZE)
|
||||
self.exitStatus = 1
|
||||
# use function for UE log analysis, when oai-nr-ue container is used
|
||||
elif 'oai-nr-ue' in services or 'lte_ue0' in services:
|
||||
elif 'oai-nr-ue' in services:
|
||||
self.exitStatus == 0
|
||||
logging.debug('\u001B[1m Analyzing UE logfile ' + filename + ' \u001B[0m')
|
||||
logStatus = cls_oaicitest.OaiCiTest().AnalyzeLogFile_UE(f'{filename}', HTML, RAN)
|
||||
|
||||
@@ -469,8 +469,8 @@ class HTMLManagement():
|
||||
self.htmlFile.write(' <td bgcolor = "orange" >')
|
||||
else:
|
||||
self.htmlFile.write(' <td>')
|
||||
for i in infoList: # add custom style to have elements side-by-side to reduce need for vertical space
|
||||
self.htmlFile.write(f' <pre style="display: inline flow-root list-item; margin: 0 3px 0 3px; min-width: 24em;">{i}</pre>')
|
||||
for i in infoList:
|
||||
self.htmlFile.write(f' <pre>{i}</pre>')
|
||||
|
||||
self.htmlFile.write(' </td>')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
|
||||
@@ -43,7 +43,7 @@ import logging
|
||||
import datetime
|
||||
import signal
|
||||
import statistics as stat
|
||||
from multiprocessing import SimpleQueue
|
||||
from multiprocessing import Process, Lock, SimpleQueue
|
||||
import concurrent.futures
|
||||
|
||||
#import our libs
|
||||
@@ -494,6 +494,15 @@ class OaiCiTest():
|
||||
messages = [f.result() for f in futures]
|
||||
HTML.CreateHtmlTestRowQueue('NA', 'OK', messages)
|
||||
|
||||
def ping_iperf_wrong_exit(self, lock, UE_IPAddress, device_id, statusQueue, message):
|
||||
logging.error(f"ue {device_id} {UE_IPAddress}: {message}")
|
||||
lock.acquire()
|
||||
statusQueue.put(-1)
|
||||
statusQueue.put(device_id)
|
||||
statusQueue.put(UE_IPAddress)
|
||||
statusQueue.put(message)
|
||||
lock.release()
|
||||
|
||||
def Ping_common(self, EPC, ue, RAN):
|
||||
# Launch ping on the EPC side (true for ltebox and old open-air-cn)
|
||||
ping_status = 0
|
||||
@@ -608,7 +617,7 @@ class OaiCiTest():
|
||||
def Iperf_ComputeModifiedBW(self, idx, ue_num):
|
||||
result = re.search('-b (?P<iperf_bandwidth>[0-9\.]+)[KMG]', str(self.iperf_args))
|
||||
if result is None:
|
||||
logging.error('\u001B[1;37;41m Iperf bandwidth Not Found! \u001B[0m')
|
||||
logging.debug('\u001B[1;37;41m Iperf bandwidth Not Found! \u001B[0m')
|
||||
sys.exit(1)
|
||||
iperf_bandwidth = result.group('iperf_bandwidth')
|
||||
if self.iperf_profile == 'balanced':
|
||||
@@ -626,11 +635,11 @@ class OaiCiTest():
|
||||
iperf_bandwidth_str_new = f"-b {'%.2f' % iperf_bandwidth_new}"
|
||||
result = re.sub(iperf_bandwidth_str, iperf_bandwidth_str_new, str(self.iperf_args))
|
||||
if result is None:
|
||||
logging.error('\u001B[1;37;41m Calculate Iperf bandwidth Failed! \u001B[0m')
|
||||
logging.debug('\u001B[1;37;41m Calculate Iperf bandwidth Failed! \u001B[0m')
|
||||
sys.exit(1)
|
||||
return result
|
||||
|
||||
def Iperf_analyzeV2TCPOutput(self, SSH, filename):
|
||||
def Iperf_analyzeV2TCPOutput(self, lock, UE_IPAddress, device_id, statusQueue, iperf_real_options,EPC,SSH, filename):
|
||||
|
||||
SSH.command(f'awk -f /tmp/tcp_iperf_stats.awk {filename}', '\$', 5)
|
||||
result = re.search('Avg Bitrate : (?P<average>[0-9\.]+ Mbits\/sec) Max Bitrate : (?P<maximum>[0-9\.]+ Mbits\/sec) Min Bitrate : (?P<minimum>[0-9\.]+ Mbits\/sec)', SSH.getBefore())
|
||||
@@ -638,34 +647,44 @@ class OaiCiTest():
|
||||
avgbitrate = result.group('average')
|
||||
maxbitrate = result.group('maximum')
|
||||
minbitrate = result.group('minimum')
|
||||
lock.acquire()
|
||||
logging.debug(f'\u001B[1;37;44m TCP iperf result ({UE_IPAddress}) \u001B[0m')
|
||||
msg = 'TCP Stats :\n'
|
||||
if avgbitrate is not None:
|
||||
logging.debug(f'\u001B[1;34m Avg Bitrate : {avgbitrate} \u001B[0m')
|
||||
msg += f'Avg Bitrate : {avgbitrate} \n'
|
||||
if maxbitrate is not None:
|
||||
logging.debug(f'\u001B[1;34m Max Bitrate : {maxbitrate} \u001B[0m')
|
||||
msg += f'Max Bitrate : {maxbitrate} \n'
|
||||
if minbitrate is not None:
|
||||
logging.debug(f'\u001B[1;34m Min Bitrate : {minbitrate} \u001B[0m')
|
||||
msg += f'Min Bitrate : {minbitrate} \n'
|
||||
return (True, msg)
|
||||
statusQueue.put(0)
|
||||
statusQueue.put(device_id)
|
||||
statusQueue.put(UE_IPAddress)
|
||||
statusQueue.put(msg)
|
||||
lock.release()
|
||||
|
||||
return (False, "could not analyze log file")
|
||||
return 0
|
||||
|
||||
def Iperf_analyzeV2Output(self, iperf_real_options, EPC, SSH):
|
||||
def Iperf_analyzeV2Output(self, lock, UE_IPAddress, device_id, statusQueue, iperf_real_options,EPC,SSH):
|
||||
|
||||
result = re.search('-u', str(iperf_real_options))
|
||||
if result is None:
|
||||
logging.debug('Into Iperf_analyzeV2TCPOutput client')
|
||||
filename = f'{EPC.SourceCodePath}/scripts/iperf_{self.testCase_id}_{device_id}.log'
|
||||
response = self.Iperf_analyzeV2TCPOutput(SSH, filename)
|
||||
response = self.Iperf_analyzeV2TCPOutput(lock, UE_IPAddress, device_id, statusQueue, iperf_real_options, EPC, SSH, filename)
|
||||
logging.debug(f'Iperf_analyzeV2TCPOutput response returned value = {response}')
|
||||
return response
|
||||
|
||||
result = re.search('Server Report:', SSH.getBefore())
|
||||
if result is None:
|
||||
result = re.search('read failed: Connection refused', SSH.getBefore())
|
||||
if result is not None:
|
||||
msg = 'Could not connect to iperf server!'
|
||||
return (False, msg)
|
||||
logging.debug('\u001B[1;37;41m Could not connect to iperf server! \u001B[0m')
|
||||
else:
|
||||
msg = 'Server Report and Connection refused Not Found!'
|
||||
return (False, msg)
|
||||
logging.debug('\u001B[1;37;41m Server Report and Connection refused Not Found! \u001B[0m')
|
||||
return -1
|
||||
# Computing the requested bandwidth in float
|
||||
result = re.search('-b (?P<iperf_bandwidth>[0-9\.]+)[KMG]', str(iperf_real_options))
|
||||
if result is not None:
|
||||
@@ -689,11 +708,14 @@ class OaiCiTest():
|
||||
bitrate = result.group('bitrate')
|
||||
packetloss = result.group('packetloss')
|
||||
jitter = result.group('jitter')
|
||||
|
||||
lock.acquire()
|
||||
logging.debug(f'\u001B[1;37;44m iperf result {UE_IPAddress} \u001B[0m')
|
||||
iperfStatus = True
|
||||
msg = f'Req Bitrate : {req_bandwidth} \n'
|
||||
logging.debug(f'\u001B[1;34m Req Bitrate : {req_bandwidth} \u001B[0m')
|
||||
if bitrate is not None:
|
||||
msg += f'Bitrate : {bitrate} \n'
|
||||
logging.debug(f'\u001B[1;34m Bitrate : {bitrate} \u001B[0m')
|
||||
result = re.search('(?P<real_bw>[0-9\.]+) [KMG]bits/sec', str(bitrate))
|
||||
if result is not None:
|
||||
actual_bw = float(str(result.group('real_bw')))
|
||||
@@ -709,37 +731,50 @@ class OaiCiTest():
|
||||
br_loss = 100 * actual_bw / req_bw
|
||||
bitperf = '%.2f ' % br_loss
|
||||
msg += f'Bitrate Perf: {bitperf} %\n'
|
||||
logging.debug(f'\u001B[1;34m Bitrate Perf: {bitperf} %\u001B[0m')
|
||||
if packetloss is not None:
|
||||
msg += f'Packet Loss : {packetloss} %\n'
|
||||
logging.debug(f'\u001B[1;34m Packet Loss : {packetloss} %\u001B[0m')
|
||||
if float(packetloss) > float(self.iperf_packetloss_threshold):
|
||||
msg += 'Packet Loss too high!\n'
|
||||
logging.debug('\u001B[1;37;41m Packet Loss too high \u001B[0m')
|
||||
iperfStatus = False
|
||||
if jitter is not None:
|
||||
msg += f'Jitter : {jitter} \n'
|
||||
|
||||
return (iperfStatus, msg)
|
||||
logging.debug(f'\u001B[1;34m Jitter : {jitter} \u001B[0m')
|
||||
if (iperfStatus):
|
||||
statusQueue.put(0)
|
||||
else:
|
||||
statusQueue.put(-1)
|
||||
statusQueue.put(device_id)
|
||||
statusQueue.put(UE_IPAddress)
|
||||
statusQueue.put(msg)
|
||||
lock.release()
|
||||
return 0
|
||||
else:
|
||||
return (False, "could not analyze server log")
|
||||
return -2
|
||||
|
||||
|
||||
def Iperf_analyzeV2BIDIR(self, server_filename, client_filename):
|
||||
def Iperf_analyzeV2BIDIR(self, lock, UE_IPAddress, device_id, statusQueue,server_filename,client_filename):
|
||||
|
||||
#check the 2 files are here
|
||||
if (not os.path.isfile(client_filename)) or (not os.path.isfile(server_filename)):
|
||||
return (False, 'Bidir TCP: Client or Server Log File not present')
|
||||
self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, 'Bidir TCP : Client or Server Log File not present')
|
||||
return
|
||||
#check the 2 files size
|
||||
if (os.path.getsize(client_filename)==0) and (os.path.getsize(server_filename)==0):
|
||||
return (False, 'Bidir TCP: Client and Server Log File are empty')
|
||||
self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, 'Bidir TCP : Client and Server Log File are empty')
|
||||
return
|
||||
|
||||
report_msg = ''
|
||||
report_msg='TCP BIDIR Report:\n'
|
||||
#if client is not empty, all the info is in, otherwise we ll use the server file to get some partial info
|
||||
client_filesize = os.path.getsize(client_filename)
|
||||
if client_filesize == 0:
|
||||
report_msg+="Client file (UE) present but !!! EMPTY !!!\n"
|
||||
report_msg+="Partial report from server file"
|
||||
report_msg+="Partial report from server file\n"
|
||||
filename = server_filename
|
||||
else :
|
||||
report_msg+="Report from client file (UE)"
|
||||
report_msg+="Report from client file (UE)\n"
|
||||
filename = client_filename
|
||||
|
||||
report=[] #used to check if relevant lines were found
|
||||
@@ -749,19 +784,32 @@ class OaiCiTest():
|
||||
result = re.search(rf'^\[\s+\d+\](?P<direction>\[.+\]).*\s+(?P<bitrate>[0-9\.]+ [KMG]bits\/sec).*\s+(?P<role>\bsender|receiver\b)', str(line))
|
||||
if result is not None:
|
||||
report.append(str(line))
|
||||
report_msg += f"\n{result.group('role')} {result.group('direction')}\t: {result.group('bitrate')}"
|
||||
if len(report) == 0:
|
||||
return (False, 'Bidir TCP: Could not analyze from Log file')
|
||||
report_msg+=result.group('role') + ' ' + result.group('direction')+ '\t = ' +result.group('bitrate')+'\n'
|
||||
if len(report)>0:
|
||||
lock.acquire()
|
||||
statusQueue.put(0)
|
||||
statusQueue.put(device_id)
|
||||
statusQueue.put(UE_IPAddress)
|
||||
statusQueue.put(report_msg)
|
||||
logging.debug(f'\u001B[1;37;45m TCP Bidir Iperf Result ({UE_IPAddress}) \u001B[0m')
|
||||
for rLine in report_msg.split('\n'):
|
||||
logging.debug(f'\u001B[1;35m {rLine} \u001B[0m')
|
||||
lock.release()
|
||||
else:
|
||||
self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, 'Bidir TCP : Could not analyze from Log file')
|
||||
|
||||
return (True, report_msg)
|
||||
|
||||
def Iperf_analyzeV2Server(self, iperf_real_options, filename, type):
|
||||
|
||||
def Iperf_analyzeV2Server(self, lock, UE_IPAddress, device_id, statusQueue, iperf_real_options, filename,type):
|
||||
if (not os.path.isfile(filename)):
|
||||
return (False, 'Could not analyze from server log')
|
||||
self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, 'Could not analyze from server log')
|
||||
return
|
||||
# Computing the requested bandwidth in float
|
||||
result = re.search('-b (?P<iperf_bandwidth>[0-9\.]+)[KMG]', str(iperf_real_options))
|
||||
if result is None:
|
||||
return (False, 'Could not compute Iperf bandwidth!')
|
||||
logging.debug('Iperf bandwidth Not Found!')
|
||||
self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, 'Could not compute Iperf bandwidth!')
|
||||
return
|
||||
else:
|
||||
req_bandwidth = result.group('iperf_bandwidth')
|
||||
req_bw = float(req_bandwidth)
|
||||
@@ -808,8 +856,6 @@ class OaiCiTest():
|
||||
br_sum = curr_br + br_sum
|
||||
ji_sum = float(ji[0]) + ji_sum
|
||||
|
||||
server_file.close()
|
||||
|
||||
if (row_idx > 0):
|
||||
br_sum = br_sum / row_idx
|
||||
ji_sum = ji_sum / row_idx
|
||||
@@ -830,25 +876,87 @@ class OaiCiTest():
|
||||
pl = float(100 * pl_sum / ps_sum)
|
||||
packetloss = '%2.1f ' % (pl)
|
||||
packetloss += '%'
|
||||
|
||||
result = float(br_loss) >= float(self.iperf_bitrate_threshold) and float(pl) <= float(self.iperf_packetloss_threshold)
|
||||
#checking packet loss compliance
|
||||
if float(pl) > float(self.iperf_packetloss_threshold):
|
||||
pal_too_high_msg = 'Packet Loss too high : tested = '+packetloss+', target = '+self.iperf_packetloss_threshold+'%'
|
||||
else:
|
||||
pal_too_high_msg='Packet Loss value is within acceptance range'
|
||||
#checking bitrate perf compliance
|
||||
if float(br_loss) < float(self.iperf_bitrate_threshold):
|
||||
bit_too_low_msg = 'Bitrate too low : tested = '+bitperf+', target = '+self.iperf_bitrate_threshold+'%'
|
||||
else:
|
||||
bit_too_low_msg='Bitrate perf value is within acceptance range'
|
||||
lock.acquire()
|
||||
if (float(br_loss) < float(self.iperf_bitrate_threshold)) and (float(pl) > float(self.iperf_packetloss_threshold)):
|
||||
statusQueue.put(-1)
|
||||
elif (float(br_loss) < float(self.iperf_bitrate_threshold)) or (float(pl) > float(self.iperf_packetloss_threshold)):
|
||||
statusQueue.put(1)
|
||||
else:
|
||||
statusQueue.put(0)
|
||||
statusQueue.put(device_id)
|
||||
statusQueue.put(UE_IPAddress)
|
||||
req_msg = f'Req Bitrate : {req_bandwidth}'
|
||||
bir_msg = f'Bitrate : {bitrate}'
|
||||
brl_msg = f'Bitrate Perf: {bitperf}'
|
||||
if float(br_loss) < float(self.iperf_bitrate_threshold):
|
||||
brl_msg += f' (too low! <{self.iperf_bitrate_threshold}%)'
|
||||
jit_msg = f'Jitter : {jitter}'
|
||||
pal_msg = f'Packet Loss : {packetloss}'
|
||||
if float(pl) > float(self.iperf_packetloss_threshold):
|
||||
pal_msg += f' (too high! >{self.iperf_packetloss_threshold}%)'
|
||||
return (result, f'{req_msg}\n{bir_msg}\n{brl_msg}\n{jit_msg}\n{pal_msg}')
|
||||
statusQueue.put(f'{req_msg}\n{bir_msg}\n{brl_msg}\n{jit_msg}\n{pal_msg}\n{pal_too_high_msg}\n{bit_too_low_msg}\n')
|
||||
logging.debug(f'\u001B[1;37;45m iperf result ({UE_IPAddress}) \u001B[0m')
|
||||
logging.debug(f'\u001B[1;35m {req_msg} \u001B[0m')
|
||||
logging.debug(f'\u001B[1;35m {bir_msg} \u001B[0m')
|
||||
logging.debug(f'\u001B[1;35m {brl_msg} \u001B[0m')
|
||||
logging.debug(f'\u001B[1;35m {jit_msg} \u001B[0m')
|
||||
logging.debug(f'\u001B[1;35m {pal_msg} \u001B[0m')
|
||||
logging.debug(f'\u001B[1;35m {pal_too_high_msg} \u001B[0m')
|
||||
logging.debug(f'\u001B[1;35m {bit_too_low_msg} \u001B[0m')
|
||||
lock.release()
|
||||
else:
|
||||
return (False, 'Could not analyze from server log')
|
||||
self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, 'Could not analyze from server log')
|
||||
|
||||
def Iperf_Module(self, EPC, ue, RAN, idx, ue_num):
|
||||
ueIP = ue.getIP()
|
||||
if not ueIP:
|
||||
return (False, f"UE {ue.getName()} has no IP address")
|
||||
server_file.close()
|
||||
|
||||
|
||||
def Iperf_analyzeV3Output(self, lock, UE_IPAddress, device_id, statusQueue,SSH):
|
||||
|
||||
result = re.search('(?P<bitrate>[0-9\.]+ [KMG]bits\/sec) +(?:|[0-9\.]+ ms +\d+\/\d+ \((?P<packetloss>[0-9\.]+)%\)) +(?:|receiver)\r\n(?:|\[ *\d+\] Sent \d+ datagrams)\r\niperf Done\.', SSH.getBefore())
|
||||
if result is None:
|
||||
result = re.search('(?P<error>iperf: error - [a-zA-Z0-9 :]+)', SSH.getBefore())
|
||||
lock.acquire()
|
||||
statusQueue.put(-1)
|
||||
statusQueue.put(device_id)
|
||||
statusQueue.put(UE_IPAddress)
|
||||
if result is not None:
|
||||
logging.debug(f"\u001B[1;37;41m {result.group('error')} \u001B[0m")
|
||||
statusQueue.put(result.group('error'))
|
||||
else:
|
||||
logging.debug('\u001B[1;37;41m Bitrate and/or Packet Loss Not Found! \u001B[0m')
|
||||
statusQueue.put('Bitrate and/or Packet Loss Not Found!')
|
||||
lock.release()
|
||||
|
||||
bitrate = result.group('bitrate')
|
||||
packetloss = result.group('packetloss')
|
||||
lock.acquire()
|
||||
logging.debug(f'\u001B[1;37;44m iperf result ({UE_IPAddress}) \u001B[0m')
|
||||
logging.debug(f'\u001B[1;34m Bitrate : {bitrate} \u001B[0m')
|
||||
msg = f'Bitrate : {bitrate} \n'
|
||||
iperfStatus = True
|
||||
if packetloss is not None:
|
||||
logging.debug(f'\u001B[1;34m Packet Loss : {packetloss} %\u001B[0m')
|
||||
msg += f'Packet Loss : {packetloss} %\n'
|
||||
if float(packetloss) > float(self.iperf_packetloss_threshold):
|
||||
logging.debug('\u001B[1;37;41m Packet Loss too high \u001B[0m')
|
||||
msg += 'Packet Loss too high!\n'
|
||||
iperfStatus = False
|
||||
if (iperfStatus):
|
||||
statusQueue.put(0)
|
||||
else:
|
||||
statusQueue.put(-1)
|
||||
statusQueue.put(device_id)
|
||||
statusQueue.put(UE_IPAddress)
|
||||
statusQueue.put(msg)
|
||||
lock.release()
|
||||
|
||||
def Iperf_Module(self, lock, statusQueue, EPC, ue, RAN, idx, ue_num):
|
||||
SSH = sshconnection.SSHConnection()
|
||||
server_filename = f'iperf_server_{self.testCase_id}_{ue.getName()}.log'
|
||||
client_filename = f'iperf_client_{self.testCase_id}_{ue.getName()}.log'
|
||||
@@ -879,18 +987,16 @@ class OaiCiTest():
|
||||
# hack: the ADB UEs don't have iperf in $PATH, so we need to hardcode for the moment
|
||||
iperf_ue = '/data/local/tmp/iperf' if re.search('adb', ue.getName()) else 'iperf'
|
||||
|
||||
ue_header = f'UE {ue.getName()} ({ueIP})'
|
||||
|
||||
if self.iperf_direction == "DL":
|
||||
logging.debug("Iperf in DL requested")
|
||||
cmd = cls_cmd.getConnection(ue.getHost())
|
||||
cmd.run(f'rm {server_filename}')
|
||||
cmd.run(f'{ue.getCmdPrefix()} {iperf_ue} -s -B {ueIP} {udpSwitch} -i 1 -t {iperf_time * 1.5} {port} &> /tmp/{server_filename} &')
|
||||
cmd.run(f'{ue.getCmdPrefix()} {iperf_ue} -s -B {ue.getIP()} {udpSwitch} -i 1 -t {iperf_time * 1.5} {port} &> /tmp/{server_filename} &')
|
||||
cmd.close()
|
||||
|
||||
cmd = cls_cmd.getConnection(EPC.IPAddress)
|
||||
cmd.run(f'rm {EPC.SourceCodePath}/{client_filename}')
|
||||
cmd.run(f'{cn_iperf_prefix} iperf -c {ueIP} {iperf_opt} {port} &> {EPC.SourceCodePath}/{client_filename}', timeout=iperf_time * 1.5)
|
||||
cmd.run(f'{cn_iperf_prefix} iperf -c {ue.getIP()} {iperf_opt} {port} &> {EPC.SourceCodePath}/{client_filename}', timeout=iperf_time * 1.5)
|
||||
cmd.copyin(f'{EPC.SourceCodePath}/{client_filename}', client_filename)
|
||||
cmd.close()
|
||||
|
||||
@@ -899,10 +1005,10 @@ class OaiCiTest():
|
||||
cmd.close()
|
||||
|
||||
if udpIperf:
|
||||
status, msg = self.Iperf_analyzeV2Server(iperf_opt, server_filename, 1)
|
||||
self.Iperf_analyzeV2Server(lock, ue.getIP(), ue.getName(), statusQueue, iperf_opt, server_filename, 1)
|
||||
else:
|
||||
cmd = cls_cmd.getConnection(EPC.IPAddress)
|
||||
status, msg = self.Iperf_analyzeV2TCPOutput(cmd, f"{EPC.SourceCodePath}/{client_filename}")
|
||||
self.Iperf_analyzeV2TCPOutput(lock, ue.getIP(), ue.getName(), statusQueue, iperf_opt, EPC, cmd, f"{EPC.SourceCodePath}/{client_filename}")
|
||||
cmd.close()
|
||||
|
||||
elif self.iperf_direction == "UL":
|
||||
@@ -914,7 +1020,7 @@ class OaiCiTest():
|
||||
|
||||
cmd = cls_cmd.getConnection(ue.getHost())
|
||||
cmd.run(f'rm /tmp/{client_filename}')
|
||||
cmd.run(f'{ue.getCmdPrefix()} {iperf_ue} -B {ueIP} -c {cn_target_ip} {iperf_opt} {port} &> /tmp/{client_filename}', timeout=iperf_time*1.5)
|
||||
cmd.run(f'{ue.getCmdPrefix()} {iperf_ue} -B {ue.getIP()} -c {cn_target_ip} {iperf_opt} {port} &> /tmp/{client_filename}', timeout=iperf_time*1.5)
|
||||
cmd.copyin(f'/tmp/{client_filename}', client_filename)
|
||||
cmd.close()
|
||||
|
||||
@@ -923,10 +1029,10 @@ class OaiCiTest():
|
||||
cmd.close()
|
||||
|
||||
if udpIperf:
|
||||
status, msg = self.Iperf_analyzeV2Server(iperf_opt, server_filename, 1)
|
||||
self.Iperf_analyzeV2Server(lock, ue.getIP(), ue.getName(), statusQueue, iperf_opt, server_filename, 1)
|
||||
else:
|
||||
cmd = cls_cmd.getConnection(ue.getHost())
|
||||
status, msg = self.Iperf_analyzeV2TCPOutput(cmd, f"/tmp/{client_filename}")
|
||||
self.Iperf_analyzeV2TCPOutput(lock, ue.getIP(), ue.getName(), statusQueue, iperf_opt, EPC, cmd, f"/tmp/{client_filename}")
|
||||
cmd.close()
|
||||
|
||||
elif self.iperf_direction=="BIDIR":
|
||||
@@ -938,7 +1044,7 @@ class OaiCiTest():
|
||||
|
||||
cmd = cls_cmd.getConnection(ue.getHost())
|
||||
cmd.run(f'rm /tmp/{client_filename}')
|
||||
cmd.run(f'iperf3 -B {ueIP} -c {cn_target_ip} {iperf_opt} {port} &> /tmp/{client_filename}', timeout=iperf_time*1.5)
|
||||
cmd.run(f'iperf3 -B {ue.getIP()} -c {cn_target_ip} {iperf_opt} {port} &> /tmp/{client_filename}', timeout=iperf_time*1.5)
|
||||
cmd.copyin(f'/tmp/{client_filename}', client_filename)
|
||||
cmd.close()
|
||||
|
||||
@@ -946,32 +1052,129 @@ class OaiCiTest():
|
||||
cmd.copyin(f'{EPC.SourceCodePath}/{server_filename}', server_filename)
|
||||
cmd.close()
|
||||
|
||||
status, msg = self.Iperf_analyzeV2BIDIR(server_filename, client_filename)
|
||||
self.Iperf_analyzeV2BIDIR(lock, ue.getHost(), ue.getName(), statusQueue, server_filename, client_filename)
|
||||
|
||||
elif self.iperf_direction == "IPERF3":
|
||||
cmd = cls_cmd.getConnection(ue.getHost())
|
||||
cmd.run(f'rm /tmp/{server_filename}', reportNonZero=False)
|
||||
port = f'{5002+idx}'
|
||||
cmd.run(f'{ue.getCmdPrefix()} iperf3 -B {ueIP} -c {cn_target_ip} -p {port} {iperf_opt} --get-server-output &> /tmp/{server_filename}', timeout=iperf_time*1.5)
|
||||
cmd.run(f'{ue.getCmdPrefix()} iperf3 -B {ue.getIP()} -c {cn_target_ip} -p {port} {iperf_opt} --get-server-output &> /tmp/{server_filename}', timeout=iperf_time*1.5)
|
||||
cmd.copyin(f'/tmp/{server_filename}', server_filename)
|
||||
cmd.close()
|
||||
if udpIperf:
|
||||
status, msg = self.Iperf_analyzeV2Server(iperf_opt, server_filename, 1)
|
||||
self.Iperf_analyzeV2Server(lock, ue.getIP(), ue.getName(), statusQueue, iperf_opt, server_filename, 1)
|
||||
else:
|
||||
cmd = cls_cmd.getConnection(EPC.IPAddress)
|
||||
status, msg = self.Iperf_analyzeV2TCPOutput(cmd, f'/tmp/{server_filename}')
|
||||
self.Iperf_analyzeV2TCPOutput(lock, ue.getIP(), ue.getName(), statusQueue, iperf_opt, EPC, cmd, f'/tmp/{server_filename}')
|
||||
cmd.close()
|
||||
|
||||
else :
|
||||
raise Exception("Incorrect or missing IPERF direction in XML")
|
||||
|
||||
logging.info(f'\u001B[1;37;45m iperf result for {ue_header}\u001B[0m')
|
||||
for l in msg.split('\n'):
|
||||
logging.info(f'\u001B[1;35m {l} \u001B[0m')
|
||||
return (status, f'{ue_header}\n{msg}')
|
||||
|
||||
def IperfNoS1(self,HTML,RAN,EPC,CONTAINERS):
|
||||
raise 'IperfNoS1 not implemented'
|
||||
SSH = sshconnection.SSHConnection()
|
||||
if RAN.eNBIPAddress == '' or RAN.eNBUserName == '' or RAN.eNBPassword == '' or self.UEIPAddress == '' or self.UEUserName == '' or self.UEPassword == '':
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
sys.exit('Insufficient Parameter')
|
||||
check_eNB = True
|
||||
check_OAI_UE = True
|
||||
server_on_enb = re.search('-R', str(self.iperf_args))
|
||||
if server_on_enb is not None:
|
||||
iServerIPAddr = RAN.eNBIPAddress
|
||||
iServerUser = RAN.eNBUserName
|
||||
iServerPasswd = RAN.eNBPassword
|
||||
iClientIPAddr = self.UEIPAddress
|
||||
iClientUser = self.UEUserName
|
||||
iClientPasswd = self.UEPassword
|
||||
else:
|
||||
iServerIPAddr = self.UEIPAddress
|
||||
iServerUser = self.UEUserName
|
||||
iServerPasswd = self.UEPassword
|
||||
iClientIPAddr = RAN.eNBIPAddress
|
||||
iClientUser = RAN.eNBUserName
|
||||
iClientPasswd = RAN.eNBPassword
|
||||
if self.iperf_options != 'sink':
|
||||
# Starting the iperf server
|
||||
SSH.open(iServerIPAddr, iServerUser, iServerPasswd)
|
||||
# args SHALL be "-c client -u any"
|
||||
# -c 10.0.1.2 -u -b 1M -t 30 -i 1 -fm -B 10.0.1.1
|
||||
# -B 10.0.1.1 -u -s -i 1 -fm
|
||||
server_options = re.sub('-u.*$', '-u -s -i 1 -fm', str(self.iperf_args))
|
||||
server_options = server_options.replace('-c','-B')
|
||||
SSH.command(f'rm -f /tmp/tmp_iperf_server_{self.testCase_id}.log', '\$', 5)
|
||||
SSH.command(f'echo $USER; nohup iperf {server_options} > /tmp/tmp_iperf_server_{self.testCase_id}.log 2>&1 &', iServerUser, 5)
|
||||
time.sleep(0.5)
|
||||
SSH.close()
|
||||
|
||||
# Starting the iperf client
|
||||
modified_options = self.Iperf_ComputeModifiedBW(0, 1)
|
||||
modified_options = modified_options.replace('-R','')
|
||||
iperf_time = self.Iperf_ComputeTime()
|
||||
SSH.open(iClientIPAddr, iClientUser, iClientPasswd)
|
||||
SSH.command(f'rm -f /tmp/tmp_iperf_{self.testCase_id}.log', '\$', 5)
|
||||
iperf_status = SSH.command(f'stdbuf -o0 iperf {modified_options} 2>&1 | stdbuf -o0 tee /tmp/tmp_iperf_{self.testCase_id}.log', '\$', int(iperf_time)*5.0)
|
||||
status_queue = SimpleQueue()
|
||||
lock = Lock()
|
||||
if iperf_status < 0:
|
||||
message = 'iperf on OAI UE crashed due to TIMEOUT !'
|
||||
logging.debug(f'\u001B[1;37;41m {message} \u001B[0m')
|
||||
clientStatus = -2
|
||||
else:
|
||||
if self.iperf_options == 'sink':
|
||||
clientStatus = 0
|
||||
status_queue.put(0)
|
||||
status_queue.put('OAI-UE')
|
||||
status_queue.put('10.0.1.2')
|
||||
status_queue.put('Sink Test : no check')
|
||||
else:
|
||||
clientStatus = self.Iperf_analyzeV2Output(lock, '10.0.1.2', 'OAI-UE', status_queue, modified_options, EPC,SSH)
|
||||
SSH.close()
|
||||
|
||||
# Stopping the iperf server
|
||||
if self.iperf_options != 'sink':
|
||||
SSH.open(iServerIPAddr, iServerUser, iServerPasswd)
|
||||
SSH.command('killall --signal SIGKILL iperf', '\$', 5)
|
||||
time.sleep(0.5)
|
||||
SSH.close()
|
||||
|
||||
if (clientStatus == -1):
|
||||
if (os.path.isfile(f'iperf_server_{self.testCase_id}.log')):
|
||||
os.remove(f'iperf_server_{self.testCase_id}.log')
|
||||
SSH.copyin(iServerIPAddr, iServerUser, iServerPasswd, f'/tmp/tmp_iperf_server_{self.testCase_id}.log', f'iperf_server_{self.testCase_id}_OAI-UE.log')
|
||||
filename=f'iperf_server_{self.testCase_id}_OAI-UE.log'
|
||||
self.Iperf_analyzeV2Server(lock, '10.0.1.2', 'OAI-UE', status_queue, modified_options,filename,0)
|
||||
|
||||
# copying on the EPC server for logCollection
|
||||
if (clientStatus == -1):
|
||||
copyin_res = SSH.copyin(iServerIPAddr, iServerUser, iServerPasswd, f'/tmp/tmp_iperf_server_{self.testCase_id}.log', f'iperf_server_{self.testCase_id}_OAI-UE.log')
|
||||
if (copyin_res == 0):
|
||||
SSH.copyout(EPC.IPAddress, EPC.UserName, EPC.Password, f'iperf_server_{self.testCase_id}_OAI-UE.log', f'{EPC.SourceCodePath}/scripts')
|
||||
copyin_res = SSH.copyin(iClientIPAddr, iClientUser, iClientPasswd, f'/tmp/tmp_iperf_{self.testCase_id}.log', f'iperf_{self.testCase_id}_OAI-UE.log')
|
||||
if (copyin_res == 0):
|
||||
SSH.copyout(EPC.IPAddress, EPC.UserName, EPC.Password, f'iperf_{self.testCase_id}_OAI-UE.log', f'{EPC.SourceCodePath}/scripts')
|
||||
iperf_noperf = False
|
||||
if status_queue.empty():
|
||||
iperf_status = False
|
||||
else:
|
||||
iperf_status = True
|
||||
messages = []
|
||||
while (not status_queue.empty()):
|
||||
count = status_queue.get()
|
||||
if (count < 0):
|
||||
iperf_status = False
|
||||
if (count > 0):
|
||||
iperf_noperf = True
|
||||
device_id = status_queue.get()
|
||||
ip_addr = status_queue.get()
|
||||
message = status_queue.get()
|
||||
messages.append(f'UE ({device_id})\nIP Address : {ip_addr}\n{message}')
|
||||
if (iperf_noperf and iperf_status):
|
||||
HTML.CreateHtmlTestRowQueue(self.iperf_args, 'PERF NOT MET', messages)
|
||||
elif (iperf_status):
|
||||
HTML.CreateHtmlTestRowQueue(self.iperf_args, 'OK', messages)
|
||||
else:
|
||||
HTML.CreateHtmlTestRowQueue(self.iperf_args, 'KO', messages)
|
||||
self.AutoTerminateUEandeNB(HTML,RAN,EPC,CONTAINERS)
|
||||
|
||||
def Iperf(self,HTML,RAN,EPC,CONTAINERS):
|
||||
result = re.search('noS1', str(RAN.Initialize_eNB_args))
|
||||
@@ -984,18 +1187,64 @@ class OaiCiTest():
|
||||
|
||||
logging.debug(f'Iperf: iperf_args "{self.iperf_args}" iperf_direction "{self.iperf_direction}" iperf_packetloss_threshold "{self.iperf_packetloss_threshold}" iperf_bitrate_threshold "{self.iperf_bitrate_threshold}" iperf_profile "{self.iperf_profile}" iperf_options "{self.iperf_options}"')
|
||||
|
||||
ues = [cls_module_ue.Module_UE(n.strip()) for n in self.ue_ids]
|
||||
ues = []
|
||||
for ue_name in self.ue_ids:
|
||||
ue = cls_module_ue.Module_UE(ue_name)
|
||||
if not ue.getIP():
|
||||
logging.error("no IP addresses returned")
|
||||
HTML.CreateHtmlTestRow(self.ping_args, 'KO', CONST.UE_IP_ADDRESS_ISSUE)
|
||||
self.AutoTerminateUEandeNB(HTML,RAN,EPC,CONTAINERS)
|
||||
ues.append(ue)
|
||||
logging.debug(ues)
|
||||
with concurrent.futures.ThreadPoolExecutor() as executor:
|
||||
futures = [executor.submit(self.Iperf_Module, EPC, ue, RAN, i, len(ues)) for i, ue in enumerate(ues)]
|
||||
results = [f.result() for f in futures]
|
||||
# each result in results is a tuple, first member goes to successes, second to messages
|
||||
successes, messages = map(list, zip(*results))
|
||||
if len(successes) == len(ues) and all(successes):
|
||||
HTML.CreateHtmlTestRowQueue(self.iperf_args, 'OK', messages)
|
||||
else:
|
||||
HTML.CreateHtmlTestRowQueue(self.iperf_args, 'KO', messages)
|
||||
|
||||
self.dummyIperfVersion = '2.0.10'
|
||||
#cmd = 'iperf --version'
|
||||
#logging.debug(cmd + '\n')
|
||||
#iperfStdout = subprocess.check_output(cmd, shell=True, universal_newlines=True)
|
||||
#result = re.search('iperf version 2.0.5', str(iperfStdout.strip()))
|
||||
#if result is not None:
|
||||
# dummyIperfVersion = '2.0.5'
|
||||
#result = re.search('iperf version 2.0.10', str(iperfStdout.strip()))
|
||||
#if result is not None:
|
||||
# dummyIperfVersion = '2.0.10'
|
||||
multi_jobs = []
|
||||
ue_num = len(ues)
|
||||
i = 0
|
||||
lock = Lock()
|
||||
status_queue = SimpleQueue()
|
||||
for ue in ues:
|
||||
p = Process(target = self.Iperf_Module ,args = (lock, status_queue, EPC, ue, RAN, i, ue_num))
|
||||
p.daemon = True
|
||||
p.start()
|
||||
multi_jobs.append(p)
|
||||
i = i + 1
|
||||
for job in multi_jobs:
|
||||
job.join()
|
||||
|
||||
if (status_queue.empty()):
|
||||
HTML.CreateHtmlTestRow(self.iperf_args, 'KO', CONST.ALL_PROCESSES_OK)
|
||||
self.AutoTerminateUEandeNB(HTML,RAN,EPC,CONTAINERS)
|
||||
else:
|
||||
iperf_status = True
|
||||
iperf_noperf = False
|
||||
messages = []
|
||||
while (not status_queue.empty()):
|
||||
count = status_queue.get()
|
||||
if (count < 0):
|
||||
iperf_status = False
|
||||
if (count > 0):
|
||||
iperf_noperf = True
|
||||
device_id = status_queue.get()
|
||||
ip_addr = status_queue.get()
|
||||
msg = status_queue.get()
|
||||
messages.append(f'UE ({device_id})\nIP Address : {ip_addr}\n{msg}')
|
||||
if (iperf_noperf and iperf_status):
|
||||
HTML.CreateHtmlTestRowQueue(self.iperf_args, 'PERF NOT MET', messages)
|
||||
elif (iperf_status):
|
||||
HTML.CreateHtmlTestRowQueue(self.iperf_args, 'OK', messages)
|
||||
else:
|
||||
HTML.CreateHtmlTestRowQueue(self.iperf_args, 'KO', messages)
|
||||
self.AutoTerminateUEandeNB(HTML,RAN,EPC,CONTAINERS)
|
||||
|
||||
def AnalyzeLogFile_UE(self, UElogFile,HTML,RAN):
|
||||
if (not os.path.isfile(f'./{UElogFile}')):
|
||||
|
||||
@@ -237,7 +237,7 @@ RUs = (
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
max_rxgain = 75;
|
||||
eNB_instances = [0];
|
||||
sdr_addrs = "mgmt_addr=172.21.19.13,addr=192.168.80.250";
|
||||
sdr_addrs = "mgmt_addr=172.21.19.13,addr=192.168.10.2";
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
@@ -237,7 +237,7 @@ RUs = (
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
max_rxgain = 75;
|
||||
eNB_instances = [0];
|
||||
sdr_addrs = "mgmt_addr=172.21.19.13,addr=192.168.80.250";
|
||||
sdr_addrs = "mgmt_addr=172.21.19.13,addr=192.168.10.2";
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
@@ -237,7 +237,7 @@ RUs = (
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
max_rxgain = 75;
|
||||
eNB_instances = [0];
|
||||
sdr_addrs = "mgmt_addr=172.21.19.13,addr=192.168.80.250";
|
||||
sdr_addrs = "mgmt_addr=172.21.19.13,addr=192.168.10.2";
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
@@ -1,219 +0,0 @@
|
||||
Active_gNBs = ( "gNB-OAI");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
Num_Threads_PUSCH = 8;
|
||||
sa = 1;
|
||||
|
||||
gNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
gNB_CU_ID = 0xe00;
|
||||
|
||||
# cell_type = "CELL_MACRO_GNB";
|
||||
|
||||
gNB_name = "gNB-OAI";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = 1;
|
||||
plmn_list = ({ mcc = 222; mnc = 01; mnc_length = 2; snssaiList = ({ sst = 1, sd = 0xffffff }) });
|
||||
|
||||
|
||||
nr_cellid = 12345678L;
|
||||
force_256qam_off = 1;
|
||||
|
||||
tr_s_preference = "f1";
|
||||
|
||||
local_s_if_name = "eth0";
|
||||
local_s_address = "192.168.68.194";
|
||||
remote_s_address = "192.168.68.195";
|
||||
local_s_portc = 501;
|
||||
local_s_portd = 2153;
|
||||
remote_s_portc = 500;
|
||||
remote_s_portd = 2153;
|
||||
ssb_SubcarrierOffset = 0;
|
||||
min_rxtxtime = 6;
|
||||
|
||||
servingCellConfigCommon = (
|
||||
{
|
||||
#spCellConfigCommon
|
||||
|
||||
physCellId = 0;
|
||||
|
||||
# downlinkConfigCommon
|
||||
#frequencyInfoDL
|
||||
# this is 3600 MHz + 43 PRBs@30kHz SCS (same as initial BWP)
|
||||
absoluteFrequencySSB = 641280;
|
||||
dl_frequencyBand = 78;
|
||||
# this is 3600 MHz
|
||||
dl_absoluteFrequencyPointA = 640008;
|
||||
#scs-SpecificCarrierList
|
||||
dl_offstToCarrier = 0;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
dl_subcarrierSpacing = 1;
|
||||
dl_carrierBandwidth = 106;
|
||||
#initialDownlinkBWP
|
||||
#genericParameters
|
||||
# this is RBstart=27,L=48 (275*(L-1))+RBstart
|
||||
initialDLBWPlocationAndBandwidth = 28875; # 6366 12925 12956 28875 12952
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
initialDLBWPsubcarrierSpacing = 1;
|
||||
#pdcch-ConfigCommon
|
||||
initialDLBWPcontrolResourceSetZero = 11;
|
||||
initialDLBWPsearchSpaceZero = 0;
|
||||
|
||||
#uplinkConfigCommon
|
||||
#frequencyInfoUL
|
||||
ul_frequencyBand = 78;
|
||||
#scs-SpecificCarrierList
|
||||
ul_offstToCarrier = 0;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
ul_subcarrierSpacing = 1;
|
||||
ul_carrierBandwidth = 106;
|
||||
pMax = 20;
|
||||
#initialUplinkBWP
|
||||
#genericParameters
|
||||
initialULBWPlocationAndBandwidth = 28875;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
initialULBWPsubcarrierSpacing = 1;
|
||||
#rach-ConfigCommon
|
||||
#rach-ConfigGeneric
|
||||
prach_ConfigurationIndex = 98;
|
||||
#prach_msg1_FDM
|
||||
#0 = one, 1=two, 2=four, 3=eight
|
||||
prach_msg1_FDM = 0;
|
||||
prach_msg1_FrequencyStart = 0;
|
||||
zeroCorrelationZoneConfig = 13;
|
||||
preambleReceivedTargetPower = -96;
|
||||
#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
|
||||
preambleTransMax = 6;
|
||||
#powerRampingStep
|
||||
# 0=dB0,1=dB2,2=dB4,3=dB6
|
||||
powerRampingStep = 1;
|
||||
#ra_ReponseWindow
|
||||
#1,2,4,8,10,20,40,80
|
||||
ra_ResponseWindow = 4;
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
|
||||
#oneHalf (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
ra_ContentionResolutionTimer = 7;
|
||||
rsrp_ThresholdSSB = 19;
|
||||
#prach-RootSequenceIndex_PR
|
||||
#1 = 839, 2 = 139
|
||||
prach_RootSequenceIndex_PR = 2;
|
||||
prach_RootSequenceIndex = 1;
|
||||
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
|
||||
#
|
||||
msg1_SubcarrierSpacing = 1,
|
||||
# restrictedSetConfig
|
||||
# 0=unrestricted, 1=restricted type A, 2=restricted type B
|
||||
restrictedSetConfig = 0,
|
||||
|
||||
msg3_DeltaPreamble = 1;
|
||||
p0_NominalWithGrant =-90;
|
||||
|
||||
# pucch-ConfigCommon setup :
|
||||
# pucchGroupHopping
|
||||
# 0 = neither, 1= group hopping, 2=sequence hopping
|
||||
pucchGroupHopping = 0;
|
||||
hoppingId = 40;
|
||||
p0_nominal = -90;
|
||||
# ssb_PositionsInBurs_BitmapPR
|
||||
# 1=short, 2=medium, 3=long
|
||||
ssb_PositionsInBurst_PR = 2;
|
||||
ssb_PositionsInBurst_Bitmap = 1;
|
||||
|
||||
# ssb_periodicityServingCell
|
||||
# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1
|
||||
ssb_periodicityServingCell = 2;
|
||||
|
||||
# dmrs_TypeA_position
|
||||
# 0 = pos2, 1 = pos3
|
||||
dmrs_TypeA_Position = 0;
|
||||
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
subcarrierSpacing = 1;
|
||||
|
||||
|
||||
#tdd-UL-DL-ConfigurationCommon
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
referenceSubcarrierSpacing = 1;
|
||||
# pattern1
|
||||
# dl_UL_TransmissionPeriodicity
|
||||
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
|
||||
dl_UL_TransmissionPeriodicity = 6;
|
||||
nrofDownlinkSlots = 7;
|
||||
nrofDownlinkSymbols = 6;
|
||||
nrofUplinkSlots = 2;
|
||||
nrofUplinkSymbols = 4;
|
||||
|
||||
ssPBCH_BlockPower = -25;
|
||||
}
|
||||
|
||||
);
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
{
|
||||
# Number of streams to use in input/output
|
||||
SCTP_INSTREAMS = 2;
|
||||
SCTP_OUTSTREAMS = 2;
|
||||
};
|
||||
|
||||
|
||||
////////// AMF parameters:
|
||||
amf_ip_address = ( { ipv4 = "172.21.16.137";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
E1_INTERFACE =
|
||||
(
|
||||
{
|
||||
type = "cp";
|
||||
ipv4_cucp = "192.168.68.194";
|
||||
port_cucp = 38462;
|
||||
ipv4_cuup = "192.168.68.196";
|
||||
port_cuup = 38462;
|
||||
}
|
||||
)
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
GNB_INTERFACE_NAME_FOR_NG_AMF = "eth0";
|
||||
GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.68.194";
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
security = {
|
||||
# preferred ciphering algorithms
|
||||
# the first one of the list that an UE supports in chosen
|
||||
# valid values: nea0, nea1, nea2, nea3
|
||||
ciphering_algorithms = ( "nea0" );
|
||||
|
||||
# preferred integrity algorithms
|
||||
# the first one of the list that an UE supports in chosen
|
||||
# valid values: nia0, nia1, nia2, nia3
|
||||
integrity_algorithms = ( "nia2", "nia0" );
|
||||
|
||||
# setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter
|
||||
# what 'ciphering_algorithms' configures; same thing for 'drb_integrity'
|
||||
drb_ciphering = "yes";
|
||||
drb_integrity = "no";
|
||||
};
|
||||
|
||||
log_config : {
|
||||
global_log_level = "info";
|
||||
};
|
||||
@@ -1,78 +0,0 @@
|
||||
Active_gNBs = ( "gNB-OAI");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
sa = 1;
|
||||
|
||||
gNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
gNB_CU_ID = 0xe00;
|
||||
|
||||
# cell_type = "CELL_MACRO_GNB";
|
||||
|
||||
gNB_name = "gNB-OAI";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = 1;
|
||||
plmn_list = ({ mcc = 222; mnc = 01; mnc_length = 2; snssaiList = ({ sst = 1, sd = 0xffffff }) });
|
||||
|
||||
|
||||
tr_s_preference = "f1";
|
||||
|
||||
local_s_if_name = "lo";
|
||||
local_s_address = "192.168.68.196";
|
||||
remote_s_address = "192.168.68.195";
|
||||
local_s_portc = 501;
|
||||
local_s_portd = 2153;
|
||||
remote_s_portc = 500;
|
||||
remote_s_portd = 2153;
|
||||
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
{
|
||||
# Number of streams to use in input/output
|
||||
SCTP_INSTREAMS = 2;
|
||||
SCTP_OUTSTREAMS = 2;
|
||||
};
|
||||
|
||||
E1_INTERFACE =
|
||||
(
|
||||
{
|
||||
type = "up";
|
||||
ipv4_cucp = "192.168.68.194";
|
||||
ipv4_cuup = "192.168.68.196";
|
||||
}
|
||||
)
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai";
|
||||
GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.68.196";
|
||||
GNB_INTERFACE_NAME_FOR_NGU = "demo-oai";
|
||||
GNB_IPV4_ADDRESS_FOR_NGU = "192.168.68.196";
|
||||
GNB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
security = {
|
||||
# preferred ciphering algorithms
|
||||
# the first one of the list that an UE supports in chosen
|
||||
# valid values: nea0, nea1, nea2, nea3
|
||||
ciphering_algorithms = ( "nea0" );
|
||||
|
||||
# preferred integrity algorithms
|
||||
# the first one of the list that an UE supports in chosen
|
||||
# valid values: nia0, nia1, nia2, nia3
|
||||
integrity_algorithms = ( "nia2", "nia0" );
|
||||
|
||||
# setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter
|
||||
# what 'ciphering_algorithms' configures; same thing for 'drb_integrity'
|
||||
drb_ciphering = "yes";
|
||||
drb_integrity = "no";
|
||||
};
|
||||
|
||||
log_config: {
|
||||
global_log_level = "info";
|
||||
};
|
||||
@@ -218,6 +218,15 @@ THREAD_STRUCT = (
|
||||
}
|
||||
);
|
||||
|
||||
log_config : {
|
||||
global_log_level = "info";
|
||||
};
|
||||
log_config :
|
||||
{
|
||||
global_log_level ="info";
|
||||
hw_log_level ="info";
|
||||
phy_log_level ="info";
|
||||
mac_log_level ="info";
|
||||
rlc_log_level ="info";
|
||||
pdcp_log_level ="info";
|
||||
rrc_log_level ="info";
|
||||
f1ap_log_level ="debug";
|
||||
ngap_log_level ="debug";
|
||||
};
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
# List of known PLMNS
|
||||
PLMN: {
|
||||
PLMN0: {
|
||||
FULLNAME="OpenAirInterface";
|
||||
SHORTNAME="OAICN";
|
||||
MNC="92";
|
||||
MCC="208";
|
||||
};
|
||||
};
|
||||
|
||||
UE0:
|
||||
{
|
||||
USER: {
|
||||
IMEI="356113022094149";
|
||||
MANUFACTURER="OAI";
|
||||
MODEL="LTE SoftModem";
|
||||
PIN="0000";
|
||||
};
|
||||
|
||||
SIM: {
|
||||
MSIN="1000000003";
|
||||
USIM_API_K="fec86ba6eb707ed08905757b1bb44b8f";
|
||||
OPC="c42449363bbad02b66d16bc975d77cc1";
|
||||
MSISDN="001011234561010";
|
||||
};
|
||||
|
||||
# Home PLMN Selector with Access Technology
|
||||
HPLMN= "20892";
|
||||
|
||||
# User controlled PLMN Selector with Access Technology
|
||||
UCPLMN_LIST = ();
|
||||
|
||||
# Operator PLMN List
|
||||
OPLMN_LIST = ("20892");
|
||||
|
||||
# Operator controlled PLMN Selector with Access Technology
|
||||
OCPLMN_LIST = ();
|
||||
|
||||
# Forbidden plmns
|
||||
FPLMN_LIST = ();
|
||||
|
||||
# Equivalent home plmns
|
||||
EHPLMN_LIST = ();
|
||||
|
||||
};
|
||||
@@ -135,6 +135,8 @@ then
|
||||
exit $STATUS
|
||||
fi
|
||||
|
||||
git log -n1 --pretty=format:\"%s\" > .git/CI_COMMIT_MSG
|
||||
|
||||
git merge --ff $TARGET_COMMIT_ID -m "Temporary merge for CI"
|
||||
|
||||
STATUS=`git status | egrep -c "You have unmerged paths.|fix conflicts"`
|
||||
|
||||
@@ -643,7 +643,7 @@ class EPCManagement():
|
||||
mySSH = SSH.SSHConnection()
|
||||
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
||||
mySSH.command('docker-compose --version', '\$', 5)
|
||||
result = re.search('docker-compose version 1|Docker Compose version v2', mySSH.getBefore())
|
||||
result = re.search('docker-compose version 1', mySSH.getBefore())
|
||||
if result is None:
|
||||
mySSH.close()
|
||||
HTML.CreateHtmlTestRow(self.Type, 'KO', CONST.INVALID_PARAMETER)
|
||||
@@ -659,7 +659,6 @@ class EPCManagement():
|
||||
mySSH.command('if [ -d ' + self.SourceCodePath + '/scripts ]; then echo ' + self.Password + ' | sudo -S rm -Rf ' + self.SourceCodePath + '/scripts ; fi', '\$', 5)
|
||||
mySSH.command('if [ -d ' + self.SourceCodePath + '/logs ]; then echo ' + self.Password + ' | sudo -S rm -Rf ' + self.SourceCodePath + '/logs ; fi', '\$', 5)
|
||||
mySSH.command('mkdir -p ' + self.SourceCodePath + '/scripts ' + self.SourceCodePath + '/logs', '\$', 5)
|
||||
mySSH.command('rm -f ' + self.SourceCodePath + '/*.log', '\$', 5)
|
||||
|
||||
# deploying and configuring the cassandra database
|
||||
# container names and services are currently hard-coded.
|
||||
|
||||
@@ -120,7 +120,6 @@ Replaces xml_files/enb_usrp210_band7_test_05mhz_tm1.xml
|
||||
<desc>iperf (5MHz - DL/15Mbps/UDP)(30 sec)(balanced profile)</desc>
|
||||
<iperf_args>-u -b 15M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>50</iperf_bitrate_threshold>
|
||||
<direction>DL</direction>
|
||||
<id>adb_ue_1 adb_ue_2</id>
|
||||
</testCase>
|
||||
@@ -179,7 +178,6 @@ Replaces xml_files/enb_usrp210_band7_test_05mhz_tm1.xml
|
||||
<desc>iperf (5MHz - UL/9Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 9M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>50</iperf_bitrate_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
<direction>UL</direction>
|
||||
<id>adb_ue_1</id>
|
||||
|
||||
@@ -128,7 +128,6 @@
|
||||
<desc>iperf (5MHz - DL/15Mbps/UDP)(30 sec)(balanced profile)</desc>
|
||||
<iperf_args>-u -b 15M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>50</iperf_bitrate_threshold>
|
||||
<direction>DL</direction>
|
||||
<id>adb_ue_1 adb_ue_2</id>
|
||||
</testCase>
|
||||
@@ -157,7 +156,6 @@
|
||||
<desc>iperf (5MHz - UL/9Mbps/UDP)(30 sec)(balanced profile)</desc>
|
||||
<iperf_args>-u -b 9M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>50</iperf_bitrate_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
<direction>UL</direction>
|
||||
<id>adb_ue_1 adb_ue_2</id>
|
||||
@@ -168,7 +166,6 @@
|
||||
<desc>iperf (5MHz - UL/9Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 9M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>50</iperf_bitrate_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
<direction>UL</direction>
|
||||
<id>adb_ue_1</id>
|
||||
|
||||
@@ -114,7 +114,6 @@ Replaces xml_files/enb_usrp210_band7_test_10mhz_tm1.xml
|
||||
<desc>iperf (10MHz - DL/30Mbps/UDP)(30 sec)(balanced profile)</desc>
|
||||
<iperf_args>-u -b 30M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>50</iperf_bitrate_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
<direction>DL</direction>
|
||||
<id>adb_ue_1 adb_ue_2</id>
|
||||
|
||||
@@ -107,7 +107,6 @@ Replaces xml_files/enb_usrp210_band7_test_10mhz_tm1.xml
|
||||
<desc>iperf (10MHz - DL/30Mbps/UDP)(30 sec)(balanced profile)</desc>
|
||||
<iperf_args>-u -b 30M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>50</iperf_bitrate_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
<direction>DL</direction>
|
||||
<id>adb_ue_1 adb_ue_2</id>
|
||||
|
||||
@@ -1,174 +0,0 @@
|
||||
<!--
|
||||
|
||||
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
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>test-fdd-10-tm1</htmlTabRef>
|
||||
<htmlTabName>Test-FDD-10MHz-TM1</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
100000
|
||||
100001
|
||||
111110
|
||||
111111
|
||||
030111
|
||||
000001
|
||||
030311
|
||||
000002
|
||||
040511 040613 040616 040651
|
||||
030411
|
||||
000001
|
||||
030211
|
||||
200000
|
||||
200001
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="111110">
|
||||
<class>Pull_Local_Registry</class>
|
||||
<desc>Pull Images from Local Registry</desc>
|
||||
<test_svr_id>0</test_svr_id>
|
||||
<images_to_pull>oai-enb</images_to_pull>
|
||||
</testCase>
|
||||
<testCase id="111111">
|
||||
<class>Pull_Local_Registry</class>
|
||||
<desc>Pull Images from Local Registry</desc>
|
||||
<test_svr_id>1</test_svr_id>
|
||||
<images_to_pull>oai-lte-ue</images_to_pull>
|
||||
</testCase>
|
||||
<testCase id="100000">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Disable Sleep States (hutch)</desc>
|
||||
<node>hutch</node>
|
||||
<command>sudo cpupower idle-set -D 0</command>
|
||||
</testCase>
|
||||
<testCase id="100001">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Disable Sleep States (carabe)</desc>
|
||||
<node>carabe</node>
|
||||
<command>sudo cpupower idle-set -D 0</command>
|
||||
</testCase>
|
||||
<testCase id="200000">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Enable Sleep States (hutch)</desc>
|
||||
<node>hutch</node>
|
||||
<command>sudo cpupower idle-set -E</command>
|
||||
</testCase>
|
||||
<testCase id="200001">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Enable Sleep States (carabe)</desc>
|
||||
<node>carabe</node>
|
||||
<command>sudo cpupower idle-set -E</command>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030111">
|
||||
<class>Deploy_Object</class>
|
||||
<desc>Deploy eNB (FDD/Band7/10MHz/B200) in a container</desc>
|
||||
<yaml_path>ci-scripts/yaml_files/lte_b200_fdd_10Mhz_tm1_magma</yaml_path>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
<eNB_serverId>0</eNB_serverId>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030311">
|
||||
<class>Deploy_Object</class>
|
||||
<desc>Deploy LTE-UE (FDD/Band7/10MHz/B200) in a container</desc>
|
||||
<yaml_path>ci-scripts/yaml_files/lte_b200_fdd_10Mhz_oai_ue_magma</yaml_path>
|
||||
<eNB_instance>1</eNB_instance>
|
||||
<eNB_serverId>1</eNB_serverId>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000001">
|
||||
<class>IdleSleep</class>
|
||||
<desc>Sleep</desc>
|
||||
<idle_sleep_time_in_sec>5</idle_sleep_time_in_sec>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000002">
|
||||
<class>IdleSleep</class>
|
||||
<desc>Sleep</desc>
|
||||
<idle_sleep_time_in_sec>10</idle_sleep_time_in_sec>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030211">
|
||||
<class>Undeploy_Object</class>
|
||||
<desc>Undeploy eNB</desc>
|
||||
<yaml_path>ci-scripts/yaml_files/lte_b200_fdd_10Mhz_tm1_magma</yaml_path>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
<eNB_serverId>0</eNB_serverId>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030411">
|
||||
<class>Undeploy_Object</class>
|
||||
<desc>Undeploy LTE-UE</desc>
|
||||
<yaml_path>ci-scripts/yaml_files/lte_b200_fdd_10Mhz_oai_ue_magma</yaml_path>
|
||||
<eNB_instance>1</eNB_instance>
|
||||
<eNB_serverId>1</eNB_serverId>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040511">
|
||||
<class>Ping</class>
|
||||
<desc>ping (10MHz - 20 sec)</desc>
|
||||
<ping_args>-c 20 192.168.61.200</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
<id>lte_oai_ue_carabe</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040613">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (10MHz - DL/10Mbps/UDP)(30 sec)(balanced profile)</desc>
|
||||
<iperf_args>-u -b 10M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
<direction>DL</direction>
|
||||
<id>lte_oai_ue_carabe</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040616">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (10MHz - DL/TCP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-t 30 -i 1 -fm</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
<direction>DL</direction>
|
||||
<id>lte_oai_ue_carabe</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040651">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (10MHz - UL/10Mbps/UDP)(30 sec)(balanced profile)</desc>
|
||||
<iperf_args>-u -b 10M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
<direction>UL</direction>
|
||||
<id>lte_oai_ue_carabe</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040654">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (10MHz - UL/TCP)(30 sec)(balanced profile)</desc>
|
||||
<iperf_args>-t 30 -i 1 -fm</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
<direction>UL</direction>
|
||||
<id>lte_oai_ue_carabe</id>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
@@ -1,45 +0,0 @@
|
||||
<!--
|
||||
|
||||
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
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>images-clean-up</htmlTabRef>
|
||||
<htmlTabName>Images Clean-Up</htmlTabName>
|
||||
<htmlTabIcon>trash</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
222222
|
||||
333333
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="222222">
|
||||
<class>Clean_Test_Server_Images</class>
|
||||
<desc>Clean Test Images on eNB Test Server</desc>
|
||||
<test_svr_id>0</test_svr_id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="333333">
|
||||
<class>Clean_Test_Server_Images</class>
|
||||
<desc>Clean Test Images on LTE-UE Test Server</desc>
|
||||
<test_svr_id>1</test_svr_id>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
@@ -113,7 +113,6 @@ Replaces xml_files/enb_usrp210_band7_test_10mhz_tm1.xml
|
||||
<desc>iperf (20MHz - DL/70Mbps/UDP)(30 sec)(balanced profile)</desc>
|
||||
<iperf_args>-u -b 70M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>50</iperf_bitrate_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
<direction>DL</direction>
|
||||
<id>adb_ue_1 adb_ue_2</id>
|
||||
|
||||
@@ -121,7 +121,6 @@ Replaces xml_files/enb_usrp210_band40_test_05mhz_tm1.xml
|
||||
<desc>iperf (5MHz - DL/6.5Mbps/UDP)(30 sec)(balanced)</desc>
|
||||
<iperf_args>-u -b 6.5M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>50</iperf_bitrate_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
<direction>DL</direction>
|
||||
<id>adb_ue_1 adb_ue_2</id>
|
||||
|
||||
@@ -129,7 +129,6 @@
|
||||
<desc>iperf (5MHz - DL/6.5Mbps/UDP)(30 sec)(balanced)</desc>
|
||||
<iperf_args>-u -b 6.5M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>50</iperf_bitrate_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
<direction>DL</direction>
|
||||
<id>adb_ue_1 adb_ue_2</id>
|
||||
|
||||
@@ -111,7 +111,6 @@ Replaces xml_files/enb_usrp210_band40_test_10mhz_tm1.xml
|
||||
<desc>iperf (10MHz - DL/13.5Mbps/UDP)(30 sec)(balanced)</desc>
|
||||
<iperf_args>-u -b 13.5M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>50</iperf_bitrate_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
<direction>DL</direction>
|
||||
<id>adb_ue_1 adb_ue_2</id>
|
||||
|
||||
@@ -113,7 +113,6 @@ Replaces xml_files/enb_usrp210_band40_test_20mhz_tm1_default_scheduler.xml
|
||||
<desc>iperf (20MHz - DL/27.5Mbps/UDP)(30 sec)(balanced)</desc>
|
||||
<iperf_args>-u -b 27.5M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>50</iperf_bitrate_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
<direction>DL</direction>
|
||||
<id>adb_ue_1 adb_ue_2</id>
|
||||
@@ -124,7 +123,6 @@ Replaces xml_files/enb_usrp210_band40_test_20mhz_tm1_default_scheduler.xml
|
||||
<desc>iperf (20MHz - DL/27.5Mbps/UDP)(30 sec)(single-ue)</desc>
|
||||
<iperf_args>-u -b 27.5M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>50</iperf_bitrate_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
<direction>DL</direction>
|
||||
<id>adb_ue_1</id>
|
||||
@@ -135,7 +133,6 @@ Replaces xml_files/enb_usrp210_band40_test_20mhz_tm1_default_scheduler.xml
|
||||
<desc>iperf (20MHz - DL/27.5Mbps/UDP)(30 sec)(unbalanced)</desc>
|
||||
<iperf_args>-u -b 27.5M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>50</iperf_bitrate_threshold>
|
||||
<iperf_profile>unbalanced</iperf_profile>
|
||||
<direction>DL</direction>
|
||||
<id>adb_ue_1 adb_ue_2</id>
|
||||
|
||||
@@ -1,166 +0,0 @@
|
||||
<!--
|
||||
|
||||
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
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>TEST-SA-FR1-F1-E1-B200</htmlTabRef>
|
||||
<htmlTabName>40 MHz TDD F1+E1 SA</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>1</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
333333
|
||||
300000
|
||||
310000
|
||||
330101
|
||||
330102
|
||||
330103
|
||||
310001
|
||||
350000
|
||||
370001
|
||||
370000
|
||||
370002
|
||||
310011
|
||||
310002
|
||||
330201
|
||||
200000
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="333333">
|
||||
<class>Pull_Local_Registry</class>
|
||||
<desc>Pull Images from Local Registry</desc>
|
||||
<test_svr_id>0</test_svr_id>
|
||||
<images_to_pull>oai-gnb oai-nr-cuup</images_to_pull>
|
||||
</testCase>
|
||||
|
||||
<testCase id="310000">
|
||||
<class>Initialize_UE</class>
|
||||
<desc>Initialize Quectel</desc>
|
||||
<id>idefix</id>
|
||||
</testCase>
|
||||
<testCase id="310002">
|
||||
<class>Terminate_UE</class>
|
||||
<desc>Terminate Quectel</desc>
|
||||
<id>idefix</id>
|
||||
</testCase>
|
||||
<testCase id="310001">
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach Quectel</desc>
|
||||
<id>idefix</id>
|
||||
</testCase>
|
||||
<testCase id="310011">
|
||||
<class>Detach_UE</class>
|
||||
<desc>Detach Quectel</desc>
|
||||
<id>idefix</id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="330101">
|
||||
<class>Deploy_Object</class>
|
||||
<desc>Deploy gNB-CU-CP in a container</desc>
|
||||
<yaml_path>ci-scripts/yaml_files/sa_e1_b200_gnb</yaml_path>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
<eNB_serverId>0</eNB_serverId>
|
||||
<services>gnb_cucp</services>
|
||||
</testCase>
|
||||
|
||||
<testCase id="330102">
|
||||
<class>Deploy_Object</class>
|
||||
<desc>Deploy gNB-CU-UP in a container</desc>
|
||||
<yaml_path>ci-scripts/yaml_files/sa_e1_b200_gnb</yaml_path>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
<eNB_serverId>0</eNB_serverId>
|
||||
<services>gnb_cuup</services>
|
||||
</testCase>
|
||||
|
||||
<testCase id="330103">
|
||||
<class>Deploy_Object</class>
|
||||
<desc>Deploy gNB-DU (TDD/Band78/40MHz/B200) in a container</desc>
|
||||
<yaml_path>ci-scripts/yaml_files/sa_e1_b200_gnb</yaml_path>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
<eNB_serverId>0</eNB_serverId>
|
||||
<services>gnb_du_tdd</services>
|
||||
</testCase>
|
||||
|
||||
<testCase id="300000">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Disable Sleep States</desc>
|
||||
<node>ofqot</node>
|
||||
<command>sudo cpupower idle-set -D 0</command>
|
||||
</testCase>
|
||||
<testCase id="200000">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Enable Sleep States</desc>
|
||||
<node>ofqot</node>
|
||||
<command>sudo cpupower idle-set -E</command>
|
||||
</testCase>
|
||||
|
||||
<testCase id="350000">
|
||||
<class>Ping</class>
|
||||
<desc>Ping: 20pings in 20sec</desc>
|
||||
<id>idefix</id>
|
||||
<ping_args>-c 20 %cn_ip%</ping_args>
|
||||
<ping_packetloss_threshold>1</ping_packetloss_threshold>
|
||||
<ping_rttavg_threshold>25</ping_rttavg_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="370000">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/80Mbps/UDP)(30 sec)</desc>
|
||||
<iperf_args>-u -b 80M -t 30 -i 1 -fm</iperf_args>
|
||||
<direction>DL</direction>
|
||||
<id>idefix</id>
|
||||
<iperf_packetloss_threshold>10</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>95</iperf_bitrate_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="370001">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (UL/8Mbps/UDP)(30 sec)</desc>
|
||||
<iperf_args>-u -b 8M -t 30 -i 1 -fm</iperf_args>
|
||||
<direction>UL</direction>
|
||||
<id>idefix</id>
|
||||
<iperf_packetloss_threshold>1</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>95</iperf_bitrate_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="370002">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (BIDIR TCP)(10 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-t 20 --bidir</iperf_args>
|
||||
<direction>BIDIR</direction>
|
||||
<id>idefix</id>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="330201">
|
||||
<class>Undeploy_Object</class>
|
||||
<desc>Undeploy CU-DU</desc>
|
||||
<yaml_path>ci-scripts/yaml_files/sa_e1_b200_gnb</yaml_path>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
<eNB_serverId>0</eNB_serverId>
|
||||
<d_retx_th>10,100,100,100</d_retx_th>
|
||||
<u_retx_th>10,100,100,100</u_retx_th>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
<!--
|
||||
|
||||
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
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>TEST-SA-FR1-F1-E1-B200-terminate</htmlTabRef>
|
||||
<htmlTabName>Tear-down</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>1</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
330201
|
||||
222222
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="330201">
|
||||
<class>Undeploy_Object</class>
|
||||
<desc>Undeploy CU-CP/CU-UP/DU</desc>
|
||||
<yaml_path>ci-scripts/yaml_files/sa_e1_b200_gnb</yaml_path>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
<eNB_serverId>0</eNB_serverId>
|
||||
</testCase>
|
||||
|
||||
<testCase id="222222">
|
||||
<class>Clean_Test_Server_Images</class>
|
||||
<desc>Clean Test Images on Test Server</desc>
|
||||
<test_svr_id>0</test_svr_id>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
@@ -42,15 +42,19 @@
|
||||
110011
|
||||
110001
|
||||
150000
|
||||
170001
|
||||
170000
|
||||
170002
|
||||
110011
|
||||
110002
|
||||
100001
|
||||
130201
|
||||
200000
|
||||
</TestCaseRequestedList>
|
||||
<!--
|
||||
070001
|
||||
070000
|
||||
070002
|
||||
050002
|
||||
050003
|
||||
-->
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="110000">
|
||||
@@ -155,19 +159,19 @@
|
||||
|
||||
<testCase id="170000">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/80Mbps/UDP)(30 sec)</desc>
|
||||
<iperf_args>-u -b 80M -t 30 -i 1 -fm</iperf_args>
|
||||
<desc>iperf (DL/125Mbps/UDP)(60 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 125M -t 60 -i 1 -fm</iperf_args>
|
||||
<direction>DL</direction>
|
||||
<id>idefix</id>
|
||||
<iperf_packetloss_threshold>10</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>95</iperf_bitrate_threshold>
|
||||
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>80</iperf_bitrate_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="170001">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (UL/8Mbps/UDP)(30 sec)</desc>
|
||||
<iperf_args>-u -b 8M -t 30 -i 1 -fm</iperf_args>
|
||||
<desc>iperf (UL/8Mbps/UDP)(60 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 8M -t 60 -i 1 -fm</iperf_args>
|
||||
<direction>UL</direction>
|
||||
<id>idefix</id>
|
||||
<iperf_packetloss_threshold>1</iperf_packetloss_threshold>
|
||||
@@ -177,8 +181,8 @@
|
||||
|
||||
<testCase id="170002">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (BIDIR TCP)(20 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-t 20 --bidir</iperf_args>
|
||||
<desc>iperf (BIDIR TCP)(10 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-t 10 --bidir</iperf_args>
|
||||
<direction>BIDIR</direction>
|
||||
<id>idefix</id>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
@@ -190,8 +194,8 @@
|
||||
<yaml_path>ci-scripts/yaml_files/sa_f1_b200_gnb</yaml_path>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
<eNB_serverId>0</eNB_serverId>
|
||||
<d_retx_th>10,100,100,100</d_retx_th>
|
||||
<u_retx_th>10,100,100,100</u_retx_th>
|
||||
<d_retx_th>1,100,100,100</d_retx_th>
|
||||
<u_retx_th>1,100,100,100</u_retx_th>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
<repeatCount>1</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
230201
|
||||
222222
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
@@ -38,4 +39,10 @@
|
||||
<eNB_serverId>0</eNB_serverId>
|
||||
</testCase>
|
||||
|
||||
<testCase id="222222">
|
||||
<class>Clean_Test_Server_Images</class>
|
||||
<desc>Clean Test Images on Test Server</desc>
|
||||
<test_svr_id>0</test_svr_id>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
<!--
|
||||
|
||||
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
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>epc-deploy-tab</htmlTabRef>
|
||||
<htmlTabName>EPC-Deploy</htmlTabName>
|
||||
<htmlTabIcon>log-in</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
000100
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList>
|
||||
</TestCaseExclusionList>
|
||||
|
||||
<testCase id="000100">
|
||||
<class>Deploy_EPC</class>
|
||||
<desc>Deploy all EPC containers</desc>
|
||||
<parameters>yaml_files/magma_lte_20892</parameters>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
@@ -1,38 +0,0 @@
|
||||
<!--
|
||||
|
||||
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
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>epc-undeploy-tab</htmlTabRef>
|
||||
<htmlTabName>EPC-Undeploy</htmlTabName>
|
||||
<htmlTabIcon>log-out</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
000200
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList>
|
||||
</TestCaseExclusionList>
|
||||
|
||||
<testCase id="000200">
|
||||
<class>Undeploy_EPC</class>
|
||||
<desc>Undeploy all EPC containers</desc>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
@@ -1,21 +0,0 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
lte_ue0:
|
||||
image: oai-lte-ue:latest
|
||||
privileged: true
|
||||
container_name: lte-b200-ue-fdd-10Mhz-tm1
|
||||
environment:
|
||||
USE_B2XX: 'yes'
|
||||
USE_ADDITIONAL_OPTIONS: -C 2680000000 -r 50 --ue-rxgain 120 --ue-txgain 0 --ue-max-power 0 --ue-scan-carrier --log_config.global_log_options level,nocolor,time
|
||||
volumes:
|
||||
- ../../conf_files/lteue.usim-ci-magma.conf:/opt/oai-lte-ue/etc/ue_usim.conf
|
||||
- /dev:/dev
|
||||
network_mode: "host"
|
||||
healthcheck:
|
||||
# pgrep does NOT work
|
||||
test: /bin/bash -c "ps aux | grep -v grep | grep -c softmodem"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
enb_mono_fdd:
|
||||
image: oai-enb:latest
|
||||
privileged: true
|
||||
container_name: lte-b200-enb-fdd-10Mhz-tm1
|
||||
environment:
|
||||
USE_B2XX: 'yes'
|
||||
USE_ADDITIONAL_OPTIONS: --RUs.[0].max_rxgain 120 --eNBs.[0].mme_ip_address.[0].ipv4 192.168.61.195 --log_config.global_log_options level,nocolor,time,line_num,function
|
||||
volumes:
|
||||
- ../../conf_files/enb.band7.50prb.usrpb200.tm1.conf:/opt/oai-enb/etc/enb.conf
|
||||
- /dev:/dev
|
||||
network_mode: "host"
|
||||
healthcheck:
|
||||
# pgrep does NOT work
|
||||
test: /bin/bash -c "ps aux | grep -v grep | grep -c softmodem"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -1,198 +0,0 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
cassandra:
|
||||
image: cassandra:2.1
|
||||
container_name: prod-cassandra
|
||||
networks:
|
||||
private_net:
|
||||
ipv4_address: 192.168.68.2
|
||||
environment:
|
||||
CASSANDRA_CLUSTER_NAME: "OAI HSS Cluster"
|
||||
CASSANDRA_ENDPOINT_SNITCH: GossipingPropertyFileSnitch
|
||||
healthcheck:
|
||||
test: /bin/bash -c "nodetool status"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
db_init:
|
||||
image: cassandra:2.1
|
||||
container_name: prod-db-init
|
||||
depends_on: [cassandra]
|
||||
deploy:
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
max_attempts: 10
|
||||
networks:
|
||||
private_net:
|
||||
ipv4_address: 192.168.68.4
|
||||
volumes:
|
||||
- ./oai_db.cql:/home/oai_db.cql
|
||||
entrypoint: /bin/bash -c "cqlsh --file /home/oai_db.cql 192.168.68.2 && echo 'OK'"
|
||||
|
||||
oai_hss:
|
||||
image: oaisoftwarealliance/oai-hss:develop
|
||||
container_name: prod-oai-hss
|
||||
privileged: true
|
||||
depends_on: [cassandra]
|
||||
networks:
|
||||
private_net:
|
||||
ipv4_address: 192.168.68.3
|
||||
public_net:
|
||||
ipv4_address: 192.168.61.194
|
||||
environment:
|
||||
TZ: Europe/Paris
|
||||
REALM: openairinterface.org
|
||||
HSS_FQDN: hss.openairinterface.org
|
||||
PREFIX: /openair-hss/etc
|
||||
cassandra_Server_IP: 192.168.68.2
|
||||
OP_KEY: 1006020f0a478bf6b699f15c062e42b3
|
||||
LTE_K: FEC86BA6EB707ED08905757B1BB44B8F
|
||||
APN1: oai.ipv4
|
||||
APN2: oai2.ipv4
|
||||
FIRST_IMSI: 208921000000001
|
||||
NB_USERS: 10
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep oai_hss"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
redis:
|
||||
image: redis:6.0.5
|
||||
container_name: prod-redis
|
||||
privileged: true
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.61.198
|
||||
volumes:
|
||||
- ./redis_extern.conf:/usr/local/etc/redis/redis.conf
|
||||
entrypoint: /bin/bash -c "redis-server /usr/local/etc/redis/redis.conf"
|
||||
healthcheck:
|
||||
test: /bin/bash -c "redis-cli -h 192.168.61.198 -p 6380 ping"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
magma_mme:
|
||||
image: magma-mme:production
|
||||
container_name: prod-magma-mme
|
||||
hostname: mme
|
||||
privileged: true
|
||||
depends_on: [oai_hss, redis]
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.61.195
|
||||
environment:
|
||||
TZ: Europe/Paris
|
||||
REALM: openairinterface.org
|
||||
PREFIX: /openair-mme/etc
|
||||
HSS_HOSTNAME: hss
|
||||
HSS_FQDN: hss.openairinterface.org
|
||||
HSS_REALM: openairinterface.org
|
||||
MME_FQDN: mme.openairinterface.org
|
||||
FEATURES: mme_oai
|
||||
volumes:
|
||||
- ./mme_fd.sprint.conf:/magma-mme/etc/mme_fd.conf.tmplt
|
||||
- ./mme.conf:/magma-mme/etc/mme.conf
|
||||
- ./entrypoint.sh:/magma-mme/bin/entrypoint.sh
|
||||
entrypoint: /bin/bash -c "/magma-mme/bin/entrypoint.sh"
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep oai_mme"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
oai_spgwc:
|
||||
image: oaisoftwarealliance/oai-spgwc:develop
|
||||
privileged: true
|
||||
depends_on: [magma_mme]
|
||||
container_name: prod-oai-spgwc
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.61.196
|
||||
environment:
|
||||
TZ: Europe/Paris
|
||||
SGW_INTERFACE_NAME_FOR_S11: eth0
|
||||
PGW_INTERFACE_NAME_FOR_SX: eth0
|
||||
DEFAULT_DNS_IPV4_ADDRESS: 172.21.3.100
|
||||
DEFAULT_DNS_SEC_IPV4_ADDRESS: 8.8.4.4
|
||||
PUSH_PROTOCOL_OPTION: 'true'
|
||||
APN_NI_1: oai.ipv4
|
||||
APN_NI_2: oai2.ipv4
|
||||
DEFAULT_APN_NI_1: oai.ipv4
|
||||
UE_IP_ADDRESS_POOL_1: '12.1.1.2 - 12.1.1.254'
|
||||
UE_IP_ADDRESS_POOL_2: '12.0.0.2 - 12.0.0.254'
|
||||
MCC: '208'
|
||||
MNC: '92'
|
||||
MNC03: '092'
|
||||
TAC: 1
|
||||
GW_ID: 1
|
||||
REALM: openairinterface.org
|
||||
UE_MTU_IPV4: 1500
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep oai_spgwc"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
oai_spgwu:
|
||||
image: oaisoftwarealliance/oai-spgwu-tiny:develop
|
||||
privileged: true
|
||||
container_name: prod-oai-spgwu-tiny
|
||||
depends_on: [oai_spgwc]
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.61.197
|
||||
environment:
|
||||
TZ: Europe/Paris
|
||||
PID_DIRECTORY: /var/run
|
||||
INSTANCE: 1
|
||||
SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP: eth0
|
||||
PGW_INTERFACE_NAME_FOR_SGI: eth0
|
||||
SGW_INTERFACE_NAME_FOR_SX: eth0
|
||||
SPGWC0_IP_ADDRESS: 192.168.61.196
|
||||
NETWORK_UE_IP: '12.1.1.0/24'
|
||||
NETWORK_UE_NAT_OPTION: 'yes'
|
||||
MCC: '208'
|
||||
MNC: '92'
|
||||
MNC03: '092'
|
||||
TAC: 1
|
||||
GW_ID: 1
|
||||
REALM: openairinterface.org
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep oai_spgwu"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
trf_gen:
|
||||
image: oaisoftwarealliance/trf-gen-cn5g:focal
|
||||
privileged: true
|
||||
container_name: prod-trf-gen
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.61.200
|
||||
entrypoint: /bin/bash -c "ip route add 12.1.1.0/24 via 192.168.61.197 dev eth0; sleep infinity"
|
||||
healthcheck:
|
||||
test: /bin/bash -c "ip route | grep '12.1.1.0'"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
networks:
|
||||
private_net:
|
||||
name: prod-oai-private-net
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.68.0/26
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "oai-priv-net"
|
||||
public_net:
|
||||
name: prod-oai-public-net
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.61.192/26
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "oai-pub-net"
|
||||
@@ -1,36 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
INSTANCE=1
|
||||
PREFIX='/magma-mme/etc'
|
||||
MY_REALM='openairinterface.org'
|
||||
|
||||
declare -A MME_CONF
|
||||
|
||||
pushd $PREFIX
|
||||
MME_CONF[@MME_S6A_IP_ADDR@]="192.168.61.195"
|
||||
MME_CONF[@INSTANCE@]=$INSTANCE
|
||||
MME_CONF[@PREFIX@]=$PREFIX
|
||||
MME_CONF[@REALM@]=$MY_REALM
|
||||
MME_CONF[@MME_FQDN@]="mme.${MME_CONF[@REALM@]}"
|
||||
MME_CONF[@HSS_HOSTNAME@]='hss'
|
||||
MME_CONF[@HSS_FQDN@]="${MME_CONF[@HSS_HOSTNAME@]}.${MME_CONF[@REALM@]}"
|
||||
MME_CONF[@HSS_IP_ADDR@]="192.168.61.194"
|
||||
|
||||
cp mme_fd.conf.tmplt $PREFIX/mme_fd.conf
|
||||
|
||||
for K in "${!MME_CONF[@]}"; do
|
||||
egrep -lRZ "$K" $PREFIX/mme_fd.conf | xargs -0 -l sed -i -e "s|$K|${MME_CONF[$K]}|g"
|
||||
ret=$?;[[ ret -ne 0 ]] && echo "Tried to replace $K with ${MME_CONF[$K]}"
|
||||
done
|
||||
|
||||
sed -i -e "s@etc/freeDiameter@etc@" /magma-mme/etc/mme_fd.conf
|
||||
sed -i -e "s@bind: 127.0.0.1@bind: 192.168.61.198@" /etc/magma/redis.yml
|
||||
# Generate freeDiameter certificate
|
||||
popd
|
||||
cd /magma-mme/scripts
|
||||
./check_mme_s6a_certificate $PREFIX mme.${MME_CONF[@REALM@]}
|
||||
|
||||
cd /magma-mme
|
||||
nohup /magma-mme/bin/sctpd > /var/log/sctpd.log 2>&1 &
|
||||
sleep 5
|
||||
/magma-mme/bin/oai_mme -c /magma-mme/etc/mme.conf
|
||||
@@ -1,133 +0,0 @@
|
||||
# generated by generate_mme_config_script.py
|
||||
MME :
|
||||
{
|
||||
REALM = "openairinterface.org"
|
||||
PID_DIRECTORY = "/var/run";
|
||||
MAXENB = 8; # power of 2
|
||||
MAXUE = 16; # power of 2
|
||||
RELATIVE_CAPACITY = 10;
|
||||
|
||||
EMERGENCY_ATTACH_SUPPORTED = "no";
|
||||
UNAUTHENTICATED_IMSI_SUPPORTED = "no";
|
||||
|
||||
# EPS network feature support
|
||||
EPS_NETWORK_FEATURE_SUPPORT_IMS_VOICE_OVER_PS_SESSION_IN_S1 = "no"; # DO NOT CHANGE
|
||||
EPS_NETWORK_FEATURE_SUPPORT_EMERGENCY_BEARER_SERVICES_IN_S1_MODE = "no"; # DO NOT CHANGE
|
||||
EPS_NETWORK_FEATURE_SUPPORT_LOCATION_SERVICES_VIA_EPC = "no"; # DO NOT CHANGE
|
||||
EPS_NETWORK_FEATURE_SUPPORT_EXTENDED_SERVICE_REQUEST = "no"; # DO NOT CHANGE
|
||||
|
||||
# Display statistics about whole system (expressed in seconds)
|
||||
MME_STATISTIC_TIMER = 10;
|
||||
IP_CAPABILITY = "IPV4"; # UE PDN_TYPE
|
||||
USE_STATELESS = "";
|
||||
|
||||
INTERTASK_INTERFACE :
|
||||
{
|
||||
# max queue size per task
|
||||
ITTI_QUEUE_SIZE = 2000000;
|
||||
};
|
||||
|
||||
S6A :
|
||||
{
|
||||
S6A_CONF = "/magma-mme/etc/mme_fd.conf"; # YOUR MME freeDiameter config file path
|
||||
HSS_HOSTNAME = "hss.openairinterface.org";
|
||||
HSS_REALM = "openairinterface.org";
|
||||
};
|
||||
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
{
|
||||
# Number of streams to use in input/output
|
||||
SCTP_INSTREAMS = 8;
|
||||
SCTP_OUTSTREAMS = 8;
|
||||
};
|
||||
|
||||
# ------- S1AP definitions
|
||||
S1AP :
|
||||
{
|
||||
# outcome drop timer value (seconds)
|
||||
S1AP_OUTCOME_TIMER = 10;
|
||||
};
|
||||
|
||||
# ------- MME served GUMMEIs
|
||||
GUMMEI_LIST = (
|
||||
{ MCC="208" ; MNC="92"; MME_GID="32768" ; MME_CODE="3"; }
|
||||
);
|
||||
|
||||
# ------- MME served TAIs
|
||||
TAI_LIST = (
|
||||
{MCC="208" ; MNC="92"; TAC = "1"; }
|
||||
);
|
||||
|
||||
TAC_LIST = (
|
||||
{MCC="208" ; MNC="92"; TAC = "1"; }
|
||||
);
|
||||
|
||||
CSFB :
|
||||
{
|
||||
NON_EPS_SERVICE_CONTROL = "OFF";
|
||||
CSFB_MCC = "208";
|
||||
CSFB_MNC = "92";
|
||||
LAC = "1";
|
||||
};
|
||||
NAS :
|
||||
{
|
||||
ORDERED_SUPPORTED_INTEGRITY_ALGORITHM_LIST = [ "EIA2" , "EIA1" , "EIA0" ];
|
||||
ORDERED_SUPPORTED_CIPHERING_ALGORITHM_LIST = [ "EEA0" , "EEA1" , "EEA2" ];
|
||||
T3402 = 1 # in minutes (default is 12 minutes)
|
||||
T3412 = 54 # in minutes (default is 54 minutes, network dependent)
|
||||
T3422 = 6 # in seconds (default is 6s)
|
||||
T3450 = 6 # in seconds (default is 6s)
|
||||
T3460 = 6 # in seconds (default is 6s)
|
||||
T3470 = 6 # in seconds (default is 6s)
|
||||
T3485 = 8 # UNUSED in seconds (default is 8s)
|
||||
T3486 = 8 # UNUSED in seconds (default is 8s)
|
||||
T3489 = 4 # UNUSED in seconds (default is 4s)
|
||||
T3495 = 8 # UNUSED in seconds (default is 8s)
|
||||
};
|
||||
|
||||
SGS :
|
||||
{
|
||||
TS6_1 = 10 # in seconds (default is 10s)
|
||||
TS8 = 4 # in seconds (default is 4s)
|
||||
TS9 = 2 # in seconds (default is 4s)
|
||||
TS10 = 4 # in seconds (default is 4s)
|
||||
TS13 = 4 # in seconds (default is 4s)
|
||||
};
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
MME_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
MME_IPV4_ADDRESS_FOR_S1_MME = "192.168.61.195/24";
|
||||
MME_INTERFACE_NAME_FOR_S11_MME = "eth0";
|
||||
MME_IPV4_ADDRESS_FOR_S11_MME = "192.168.61.195/24";
|
||||
MME_PORT_FOR_S11_MME = 2123;
|
||||
};
|
||||
|
||||
LOGGING :
|
||||
{
|
||||
OUTPUT = "CONSOLE";
|
||||
THREAD_SAFE = "no";
|
||||
COLOR = "no";
|
||||
|
||||
SCTP_LOG_LEVEL = "ERROR";
|
||||
GTPV1U_LOG_LEVEL = "INFO";
|
||||
SPGW_APP_LOG_LEVEL = "INFO";
|
||||
UDP_LOG_LEVEL = "INFO";
|
||||
S1AP_LOG_LEVEL = "DEBUG";
|
||||
NAS_LOG_LEVEL = "INFO";
|
||||
MME_APP_LOG_LEVEL = "DEBUG";
|
||||
GTPV2C_LOG_LEVEL = "INFO";
|
||||
S11_LOG_LEVEL = "DEBUG";
|
||||
S6A_LOG_LEVEL = "DEBUG";
|
||||
UTIL_LOG_LEVEL = "INFO";
|
||||
ITTI_LOG_LEVEL = "ERROR";
|
||||
MME_SCENARIO_PLAYER_LOG_LEVEL = "ERROR";
|
||||
ASN1_VERBOSITY = "INFO";
|
||||
};
|
||||
|
||||
S-GW :
|
||||
{
|
||||
SGW_IPV4_ADDRESS_FOR_S11 = "192.168.61.196";
|
||||
};
|
||||
};
|
||||
@@ -1,169 +0,0 @@
|
||||
# -------- Local ---------
|
||||
|
||||
# Uncomment if the framework cannot resolv it.
|
||||
Identity = "@MME_FQDN@";
|
||||
Realm = "@REALM@";
|
||||
|
||||
# TLS configuration (see previous section)
|
||||
TLS_Cred = "@PREFIX@/freeDiameter/mme.cert.pem",
|
||||
"@PREFIX@/freeDiameter/mme.key.pem";
|
||||
TLS_CA = "@PREFIX@/freeDiameter/mme.cacert.pem";
|
||||
|
||||
# Disable use of TCP protocol (only listen and connect in SCTP)
|
||||
# Default : TCP enabled
|
||||
No_SCTP;
|
||||
|
||||
# This option is ignored if freeDiameter is compiled with DISABLE_SCTP option.
|
||||
# Prefer TCP instead of SCTP for establishing new connections.
|
||||
# This setting may be overwritten per peer in peer configuration blocs.
|
||||
# Default : SCTP is attempted first.
|
||||
Prefer_TCP;
|
||||
|
||||
|
||||
No_IPv6;
|
||||
|
||||
# Overwrite the number of SCTP streams. This value should be kept low,
|
||||
# especially if you are using TLS over SCTP, because it consumes a lot of
|
||||
# resources in that case. See tickets 19 and 27 for some additional details on
|
||||
# this.
|
||||
# Limit the number of SCTP streams
|
||||
SCTP_streams = 3;
|
||||
|
||||
|
||||
# By default, freeDiameter acts as a Diameter Relay Agent by forwarding all
|
||||
# messages it cannot handle locally. This parameter disables this behavior.
|
||||
NoRelay;
|
||||
|
||||
# Use RFC3588 method for TLS protection, where TLS is negociated after CER/CEA exchange is completed
|
||||
# on the unsecure connection. The alternative is RFC6733 mechanism, where TLS protects also the
|
||||
# CER/CEA exchange on a dedicated secure port.
|
||||
# This parameter only affects outgoing connections.
|
||||
# The setting can be also defined per-peer (see Peers configuration section).
|
||||
# Default: use RFC6733 method with separate port for TLS.
|
||||
|
||||
#TLS_old_method;
|
||||
|
||||
AppServThreads = 4;
|
||||
|
||||
# Specify the addresses on which to bind the listening server. This must be
|
||||
# specified if the framework is unable to auto-detect these addresses, or if the
|
||||
# auto-detected values are incorrect. Note that the list of addresses is sent
|
||||
# in CER or CEA message, so one should pay attention to this parameter if some
|
||||
# adresses should be kept hidden.
|
||||
ListenOn = "@MME_S6A_IP_ADDR@";
|
||||
|
||||
Port = 3870;
|
||||
SecPort = 5870;
|
||||
|
||||
# -------- Extensions ---------
|
||||
|
||||
# Uncomment (and create rtd.conf) to specify routing table for this peer.
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/rt_default.fdx" : "rtd.conf";
|
||||
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/_sample.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/app_acct.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/app_diameap.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/app_radgw.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/app_redirect.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/app_sip.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/dbg_interactive.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/dbg_monitor.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/dbg_msg_dumps.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/dbg_msg_timings.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/dbg_rt.fdx";
|
||||
LoadExtension = "/usr/local/lib/freeDiameter/dict_3gpp2_avps.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/dict_CreditControl.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/dict_CxDx.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/dict_Gx.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/dict_NAS.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/dict_Ro.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/dict_Rx.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/dict_S6mS6n.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/dict_SGd.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/dict_SLh.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/dict_Sd.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/dict_Sh.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/dict_T4.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/dict_T6aT6bT7.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/dict_Tsp.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/dict_dcca.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/dict_dcca_3gpp.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/dict_dcca_starent.fdx";
|
||||
LoadExtension = "/usr/local/lib/freeDiameter/dict_draftload_avps.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/dict_eap.fdx";
|
||||
LoadExtension = "/usr/local/lib/freeDiameter/dict_etsi283034_avps.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/dict_legacy_xml.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/dict_mip6a.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/dict_mip6i.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/dict_nas_mipv6.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/dict_nasreq.fdx";
|
||||
LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc4004_avps.fdx";
|
||||
LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc4006bis_avps.fdx";
|
||||
LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc4072_avps.fdx";
|
||||
LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc4590_avps.fdx";
|
||||
LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc5447_avps.fdx";
|
||||
LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc5580_avps.fdx";
|
||||
LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc5777_avps.fdx";
|
||||
LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc5778_avps.fdx";
|
||||
LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc6734_avps.fdx";
|
||||
LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc6942_avps.fdx";
|
||||
LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc7155_avps.fdx";
|
||||
LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc7683_avps.fdx";
|
||||
LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc7944_avps.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/dict_sip.fdx";
|
||||
LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29061_avps.fdx";
|
||||
LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29128_avps.fdx";
|
||||
LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29154_avps.fdx";
|
||||
LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29173_avps.fdx";
|
||||
LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29212_avps.fdx";
|
||||
LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29214_avps.fdx";
|
||||
LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29215_avps.fdx";
|
||||
LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29217_avps.fdx";
|
||||
LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29229_avps.fdx";
|
||||
LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29272_avps.fdx";
|
||||
LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29273_avps.fdx";
|
||||
LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29329_avps.fdx";
|
||||
LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29336_avps.fdx";
|
||||
LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29337_avps.fdx";
|
||||
LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29338_avps.fdx";
|
||||
LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29343_avps.fdx";
|
||||
LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29344_avps.fdx";
|
||||
LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29345_avps.fdx";
|
||||
LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29368_avps.fdx";
|
||||
LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29468_avps.fdx";
|
||||
LoadExtension = "/usr/local/lib/freeDiameter/dict_ts32299_avps.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/rt_busypeers.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/rt_default.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/rt_ereg.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/rt_ignore_dh.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/rt_load_balance.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/rt_randomize.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/rt_redirect.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/test_acct.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/test_app.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/test_hss.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/test_netemul.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/test_rt_any.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/test_sip.fdx";
|
||||
#LoadExtension = "/usr/local/lib/freeDiameter/dict_Rf.fdx";
|
||||
LoadExtension = "/usr/local/lib/freeDiameter/dict_S6as6d.fdx";
|
||||
LoadExtension = "/usr/local/lib/freeDiameter/dict_S6t.fdx";
|
||||
LoadExtension = "/usr/local/lib/freeDiameter/dict_S6c.fdx";
|
||||
|
||||
|
||||
# -------- Peers ---------
|
||||
|
||||
# The framework will actively attempt to establish and maintain a connection
|
||||
# with the peers listed here.
|
||||
# For only accepting incoming connections, see the acl_wl.fx extension.
|
||||
|
||||
# ConnectPeer
|
||||
# Declare a remote peer to which this peer must maintain a connection.
|
||||
# In addition, this allows specifying non-default parameters for this peer only
|
||||
# (for example disable SCTP with this peer, or use RFC3588-flavour TLS).
|
||||
# Note that by default, if a peer is not listed as a ConnectPeer entry, an
|
||||
# incoming connection from this peer will be rejected. If you want to accept
|
||||
# incoming connections from other peers, see the acl_wl.fdx? extension which
|
||||
# allows exactly this.
|
||||
|
||||
ConnectPeer= "@HSS_FQDN@" { ConnectTo = "@HSS_IP_ADDR@"; No_SCTP ; No_IPv6; Prefer_TCP; No_TLS; port = 3868;};
|
||||
@@ -1,33 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2016-present, Facebook, Inc.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This source code is licensed under the BSD-style license found in the
|
||||
# LICENSE file in the root directory of this source tree. An additional grant
|
||||
# of patent rights can be found in the PATENTS file in the same directory.
|
||||
|
||||
# Jinja template for Redis configuration
|
||||
# See the default config file for options and explanations:
|
||||
# https://github.com/antirez/redis/blob/unstable/redis.conf
|
||||
|
||||
# TODO: make sensible, production-aware config decisions
|
||||
|
||||
bind 192.168.61.198
|
||||
port 6380
|
||||
|
||||
daemonize no
|
||||
loglevel notice
|
||||
|
||||
timeout 0
|
||||
databases 1
|
||||
|
||||
dbfilename redis_dump.rdb
|
||||
dir /data
|
||||
|
||||
# Save the DB on disk
|
||||
|
||||
save 900 1
|
||||
|
||||
save 300 10
|
||||
|
||||
save 60 1000
|
||||
@@ -1,68 +0,0 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
gnb_cucp:
|
||||
image: oai-gnb:latest
|
||||
privileged: true
|
||||
container_name: sa-cucp-gnb
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --sa --log_config.global_log_options level,nocolor,time,line_num,function
|
||||
volumes:
|
||||
- ../../conf_files/gnb-cucp.sa.f1.quectel.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.68.194
|
||||
healthcheck:
|
||||
# pgrep does NOT work
|
||||
test: /bin/bash -c "ps aux | grep -v grep | grep -c softmodem"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
gnb_cuup:
|
||||
image: oai-nr-cuup:latest
|
||||
privileged: true
|
||||
container_name: sa-cuup-gnb
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: --sa --log_config.global_log_options level,nocolor,time,line_num,function
|
||||
volumes:
|
||||
- ../../conf_files/gnb-cuup.sa.f1.quectel.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.68.196
|
||||
healthcheck:
|
||||
# pgrep does NOT work
|
||||
test: /bin/bash -c "ps aux | grep -v grep | grep -c nr-cuup"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
gnb_du_tdd:
|
||||
image: oai-gnb:latest
|
||||
privileged: true
|
||||
container_name: sa-du-b200-gnb
|
||||
environment:
|
||||
USE_B2XX: 'yes'
|
||||
USE_ADDITIONAL_OPTIONS: --sa --RUs.[0].sdr_addrs serial=30C51D4 --continuous-tx -E --log_config.global_log_options level,nocolor,time,line_num,function --gNBs.[0].min_rxtxtime 2 --gNBs.[0].do_CSIRS 1 --gNBs.[0].do_SRS 1 --RUs.[0].att_rx 14 --RUs.[0].att_tx 14
|
||||
volumes:
|
||||
- ../../conf_files/gnb-du.sa.band78.106prb.usrpb200.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
- /dev:/dev
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.68.195
|
||||
#entrypoint: /bin/bash -c "sleep infinity"
|
||||
healthcheck:
|
||||
# pgrep does NOT work
|
||||
test: /bin/bash -c "ps aux | grep -v grep | grep -c softmodem"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
networks:
|
||||
public_net:
|
||||
name: sa-b200-gnb-net
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.68.192/26
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "sa-gnb-net"
|
||||
@@ -6,9 +6,11 @@ services:
|
||||
privileged: true
|
||||
container_name: sa-cu-gnb
|
||||
environment:
|
||||
USE_B2XX: 'yes'
|
||||
USE_ADDITIONAL_OPTIONS: --sa --log_config.global_log_options level,nocolor,time,line_num,function
|
||||
volumes:
|
||||
- ../../conf_files/gnb-cu.sa.band78.106prb.usrpb200.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
- /dev:/dev
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.68.194
|
||||
|
||||
@@ -120,8 +120,6 @@ Options:
|
||||
Builds Coverity-Scan objects for upload
|
||||
--disable-deadline
|
||||
Disables deadline scheduler of Linux kernel (>=3.14.x).
|
||||
--trace-asn1c-enc-dec
|
||||
Output asn1c logging traces via OAI logging system.
|
||||
--enable-deadline
|
||||
Enable deadline scheduler of Linux kernel (>=3.14.x).
|
||||
--disable-cpu-affinity
|
||||
@@ -317,7 +315,7 @@ function main() {
|
||||
-P | --phy_simulators)
|
||||
SIMUS_PHY=1
|
||||
# TODO: fix: dlsim_tm4 pucchsim prachsim pdcchsim pbchsim mbmssim
|
||||
TARGET_LIST="$TARGET_LIST dlsim ulsim ldpctest polartest smallblocktest nr_pbchsim nr_dlschsim nr_ulschsim nr_dlsim nr_ulsim nr_pucchsim nr_prachsim"
|
||||
TARGET_LIST="$TARGET_LIST dlsim ulsim ldpctest polartest smallblocktest nr_pbchsim nr_dlschsim nr_ulschsim nr_dlsim nr_ulsim nr_pucchsim nr_prachsim nr_psbchsim"
|
||||
echo_info "Will compile dlsim, ulsim, ..."
|
||||
shift;;
|
||||
-s | --check)
|
||||
@@ -418,10 +416,6 @@ function main() {
|
||||
sleep 2
|
||||
CMAKE_CMD="$CMAKE_CMD -DSANITIZE_MEMORY=ON -DSANITIZE_ADDRESS=OFF -DSANITIZE_UNDEFINED=OFF"
|
||||
shift;;
|
||||
--trace-asn1c-enc-dec)
|
||||
CMAKE_CMD="$CMAKE_CMD -DTRACE_ASN1C_ENC_DEC=ON"
|
||||
echo_info "Enabling asn1c internal traces via OAI logging system"
|
||||
shift 1;;
|
||||
-h | --help)
|
||||
print_help
|
||||
exit 1;;
|
||||
@@ -529,7 +523,7 @@ function main() {
|
||||
echo_info "Doxygen generation log is located here: $doxygen_log"
|
||||
echo_info "Generating Doxygen files....please wait"
|
||||
(
|
||||
cmake --build . --target doc
|
||||
cmake3 --build . --target doc
|
||||
) >& $doxygen_log
|
||||
fi
|
||||
|
||||
|
||||
@@ -45,7 +45,6 @@
|
||||
#include "common/config/config_userapi.h"
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#include <stdatomic.h>
|
||||
#include "common/utils/LOG/log_extern.h"
|
||||
|
||||
// main log variables
|
||||
@@ -283,7 +282,7 @@ void log_getconfig(log_t *g_log)
|
||||
int ret = config_get( logparams_defaults,sizeof(logparams_defaults)/sizeof(paramdef_t),CONFIG_STRING_LOG_PREFIX);
|
||||
|
||||
if (ret <0) {
|
||||
fprintf(stderr,"[LOG] init aborted, configuration couldn't be performed\n");
|
||||
fprintf(stderr,"[LOG] init aborted, configuration couldn't be performed");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -811,7 +810,7 @@ void logClean (void)
|
||||
}
|
||||
}
|
||||
|
||||
static atomic_bool stop_flush_mem_to_file = false;
|
||||
extern int oai_exit;
|
||||
void flush_mem_to_file(void)
|
||||
{
|
||||
int fp;
|
||||
@@ -822,7 +821,7 @@ void flush_mem_to_file(void)
|
||||
|
||||
pthread_setname_np( pthread_self(), "flush_mem_to_file");
|
||||
|
||||
while (!atomic_load(&stop_flush_mem_to_file)) {
|
||||
while (!oai_exit) {
|
||||
pthread_mutex_lock(&log_mem_lock);
|
||||
log_mem_write_flag=0;
|
||||
pthread_cond_wait(&log_mem_notify, &log_mem_lock);
|
||||
@@ -982,7 +981,6 @@ void close_log_mem(void){
|
||||
char f_name[1024];
|
||||
|
||||
if(log_mem_flag==1){
|
||||
atomic_store(&stop_flush_mem_to_file, false);
|
||||
log_mem_d[0].enable_flag=0;
|
||||
log_mem_d[1].enable_flag=0;
|
||||
usleep(10); // wait for log writing
|
||||
|
||||
@@ -969,25 +969,25 @@ ID = LEGACY_OSA_TRACE
|
||||
GROUP = ALL:LEGACY_OSA:LEGACY_GROUP_TRACE:LEGACY
|
||||
FORMAT = string,log
|
||||
|
||||
ID = LEGACY_ASN1_INFO
|
||||
DESC = ASN1 legacy logs - info level
|
||||
GROUP = ALL:LEGACY_ASN1:LEGACY_GROUP_INFO:LEGACY
|
||||
ID = LEGACY_ASN_INFO
|
||||
DESC = ASN legacy logs - info level
|
||||
GROUP = ALL:LEGACY_ASN:LEGACY_GROUP_INFO:LEGACY
|
||||
FORMAT = string,log
|
||||
ID = LEGACY_ASN1_ERROR
|
||||
DESC = ASN1 legacy logs - error level
|
||||
GROUP = ALL:LEGACY_ASN1:LEGACY_GROUP_ERROR:LEGACY
|
||||
ID = LEGACY_ASN_ERROR
|
||||
DESC = ASN legacy logs - error level
|
||||
GROUP = ALL:LEGACY_ASN:LEGACY_GROUP_ERROR:LEGACY
|
||||
FORMAT = string,log
|
||||
ID = LEGACY_ASN1_WARNING
|
||||
DESC = ASN1 legacy logs - warning level
|
||||
GROUP = ALL:LEGACY_ASN1:LEGACY_GROUP_WARNING:LEGACY
|
||||
ID = LEGACY_ASN_WARNING
|
||||
DESC = ASN legacy logs - warning level
|
||||
GROUP = ALL:LEGACY_ASN:LEGACY_GROUP_WARNING:LEGACY
|
||||
FORMAT = string,log
|
||||
ID = LEGACY_ASN1_DEBUG
|
||||
DESC = ASN1 legacy logs - debug level
|
||||
GROUP = ALL:LEGACY_ASN1:LEGACY_GROUP_DEBUG:LEGACY
|
||||
ID = LEGACY_ASN_DEBUG
|
||||
DESC = ASN legacy logs - debug level
|
||||
GROUP = ALL:LEGACY_ASN:LEGACY_GROUP_DEBUG:LEGACY
|
||||
FORMAT = string,log
|
||||
ID = LEGACY_ASN1_TRACE
|
||||
DESC = ASN1 legacy logs - trace level
|
||||
GROUP = ALL:LEGACY_ASN1:LEGACY_GROUP_TRACE:LEGACY
|
||||
ID = LEGACY_ASN_TRACE
|
||||
DESC = ASN legacy logs - trace level
|
||||
GROUP = ALL:LEGACY_ASN:LEGACY_GROUP_TRACE:LEGACY
|
||||
FORMAT = string,log
|
||||
|
||||
ID = LEGACY_SIM_INFO
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
add_library(tracer_utils OBJECT configuration.c database.c event.c handler.c utils.c)
|
||||
add_library(tracer_utils OBJECT config.c database.c event.c handler.c utils.c)
|
||||
target_link_libraries(tracer_utils PUBLIC m pthread)
|
||||
|
||||
add_library(tracer_events OBJECT event_selector.c)
|
||||
|
||||
@@ -10,7 +10,7 @@ all: record replay extract_config textlog enb ue vcd macpdu2wireshark \
|
||||
extract_input_subframe extract_output_subframe to_vcd extract multi \
|
||||
gnb
|
||||
|
||||
record: utils.o record.o database.o configuration.o
|
||||
record: utils.o record.o database.o config.o
|
||||
$(CC) $(CFLAGS) -o record $^ $(LIBS)
|
||||
|
||||
replay: utils.o replay.o
|
||||
@@ -20,48 +20,48 @@ extract_config: extract_config.o
|
||||
$(CC) $(CFLAGS) -o extract_config $^ $(LIBS)
|
||||
|
||||
extract_input_subframe: extract_input_subframe.o database.o event.o utils.o \
|
||||
configuration.o
|
||||
config.o
|
||||
$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
|
||||
|
||||
extract_output_subframe: extract_output_subframe.o database.o event.o utils.o \
|
||||
configuration.o
|
||||
config.o
|
||||
$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
|
||||
|
||||
extract: extract.o database.o event.o utils.o configuration.o
|
||||
extract: extract.o database.o event.o utils.o config.o
|
||||
$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
|
||||
|
||||
textlog: utils.o textlog.o database.o event.o handler.o configuration.o \
|
||||
textlog: utils.o textlog.o database.o event.o handler.o config.o \
|
||||
event_selector.o view/view.a gui/gui.a logger/logger.a \
|
||||
filter/filter.a
|
||||
$(CC) $(CFLAGS) -o textlog $^ $(LIBS) $(XLIBS)
|
||||
|
||||
enb: utils.o enb.o database.o event.o handler.o configuration.o \
|
||||
enb: utils.o enb.o database.o event.o handler.o config.o \
|
||||
event_selector.o view/view.a gui/gui.a logger/logger.a \
|
||||
filter/filter.a
|
||||
$(CC) $(CFLAGS) -o enb $^ $(LIBS) $(XLIBS)
|
||||
|
||||
ue: utils.o ue.o database.o event.o handler.o configuration.o \
|
||||
ue: utils.o ue.o database.o event.o handler.o config.o \
|
||||
event_selector.o view/view.a gui/gui.a logger/logger.a \
|
||||
filter/filter.a
|
||||
$(CC) $(CFLAGS) -o ue $^ $(LIBS) $(XLIBS)
|
||||
|
||||
vcd: utils.o vcd.o database.o event.o handler.o configuration.o \
|
||||
vcd: utils.o vcd.o database.o event.o handler.o config.o \
|
||||
event_selector.o view/view.a gui/gui.a logger/logger.a \
|
||||
filter/filter.a
|
||||
$(CC) $(CFLAGS) -o vcd $^ $(LIBS) $(XLIBS)
|
||||
|
||||
to_vcd: to_vcd.o database.o event.o handler.o utils.o configuration.o \
|
||||
to_vcd: to_vcd.o database.o event.o handler.o utils.o config.o \
|
||||
logger/logger.a filter/filter.a
|
||||
$(CC) $(CFLAGS) -o to_vcd $^ $(LIBS)
|
||||
|
||||
macpdu2wireshark: macpdu2wireshark.o database.o utils.o handler.o event.o \
|
||||
configuration.o
|
||||
config.o
|
||||
$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
|
||||
|
||||
multi: multi.o utils.o database.o configuration.o
|
||||
multi: multi.o utils.o database.o config.o
|
||||
$(CC) $(CFLAGS) -o multi $^ $(LIBS)
|
||||
|
||||
gnb: utils.o gnb.o database.o event.o handler.o configuration.o \
|
||||
gnb: utils.o gnb.o database.o event.o handler.o config.o \
|
||||
view/view.a gui/gui.a logger/logger.a \
|
||||
filter/filter.a
|
||||
$(CC) $(CFLAGS) -o gnb $^ $(LIBS) $(XLIBS)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "configuration.h"
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -14,7 +14,7 @@
|
||||
#include "utils.h"
|
||||
#include "event_selector.h"
|
||||
#include "openair_logo.h"
|
||||
#include "configuration.h"
|
||||
#include "config.h"
|
||||
|
||||
/****************************************************************************/
|
||||
/* conversion from rnti to "ue_id" (which does not really exists) */
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "event.h"
|
||||
#include "database.h"
|
||||
#include "utils.h"
|
||||
#include "configuration.h"
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <fcntl.h>
|
||||
#include "database.h"
|
||||
#include "event.h"
|
||||
#include "configuration.h"
|
||||
#include "config.h"
|
||||
|
||||
void usage(void)
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <fcntl.h>
|
||||
#include "database.h"
|
||||
#include "event.h"
|
||||
#include "configuration.h"
|
||||
#include "config.h"
|
||||
|
||||
void usage(void)
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <fcntl.h>
|
||||
#include "database.h"
|
||||
#include "event.h"
|
||||
#include "configuration.h"
|
||||
#include "config.h"
|
||||
|
||||
void usage(void)
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "database.h"
|
||||
#include "event.h"
|
||||
#include "handler.h"
|
||||
#include "configuration.h"
|
||||
#include "config.h"
|
||||
#include "logger/logger.h"
|
||||
#include "gui/gui.h"
|
||||
#include "utils.h"
|
||||
|
||||
@@ -5,18 +5,18 @@ LIBS=-lX11 -lm -lpng -lXft
|
||||
|
||||
all: dump_nack_signal time_meas timeplot multi-rru-clean
|
||||
|
||||
dump_nack_signal: ../utils.o ../database.o ../configuration.o ../event.o \
|
||||
dump_nack_signal: ../utils.o ../database.o ../config.o ../event.o \
|
||||
dump_nack_signal.o
|
||||
$(CC) $(CFLAGS) -o dump_nack_signal $^ $(LIBS)
|
||||
|
||||
time_meas: ../utils.o ../database.o ../configuration.o ../event.o \
|
||||
time_meas: ../utils.o ../database.o ../config.o ../event.o \
|
||||
time_meas.o
|
||||
$(CC) $(CFLAGS) -o time_meas $^ $(LIBS)
|
||||
|
||||
timplot: timeplot.o
|
||||
$(CC) $(CFLAGS) -o timeplot $^ $(LIBS)
|
||||
|
||||
multi-rru-clean: ../utils.o ../database.o ../event.o ../configuration.o multi-rru-clean.o
|
||||
multi-rru-clean: ../utils.o ../database.o ../event.o ../config.o multi-rru-clean.o
|
||||
$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
|
||||
|
||||
.PHONY: all
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "database.h"
|
||||
#include "event.h"
|
||||
#include "handler.h"
|
||||
#include "configuration.h"
|
||||
#include "config.h"
|
||||
#include "utils.h"
|
||||
#include "packet-mac-lte.h"
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "database.h"
|
||||
#include "utils.h"
|
||||
#include "../T.h"
|
||||
#include "configuration.h"
|
||||
#include "config.h"
|
||||
|
||||
#define DEFAULT_LOCAL_PORT 2022
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "database.h"
|
||||
#include "utils.h"
|
||||
#include "../T_defs.h"
|
||||
#include "configuration.h"
|
||||
#include "config.h"
|
||||
|
||||
void usage(void)
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "gui/gui.h"
|
||||
#include "utils.h"
|
||||
#include "event_selector.h"
|
||||
#include "configuration.h"
|
||||
#include "config.h"
|
||||
|
||||
typedef struct {
|
||||
int socket;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "database.h"
|
||||
#include "utils.h"
|
||||
#include "handler.h"
|
||||
#include "configuration.h"
|
||||
#include "config.h"
|
||||
#include "logger/logger.h"
|
||||
#include "view/view.h"
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include "utils.h"
|
||||
#include "event_selector.h"
|
||||
#include "openair_logo.h"
|
||||
#include "configuration.h"
|
||||
#include "config.h"
|
||||
|
||||
typedef struct {
|
||||
view *phyview;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "gui/gui.h"
|
||||
#include "utils.h"
|
||||
#include "event_selector.h"
|
||||
#include "configuration.h"
|
||||
#include "config.h"
|
||||
|
||||
typedef struct {
|
||||
int socket;
|
||||
|
||||
8
common/utils/colors.h
Normal file
8
common/utils/colors.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#define KNRM "\x1B[0m"
|
||||
#define KRED "\x1B[31m"
|
||||
#define KGRN "\x1B[32m"
|
||||
#define KYEL "\x1B[33m"
|
||||
#define KBLU "\x1B[34m"
|
||||
#define KMAG "\x1B[35m"
|
||||
#define KCYN "\x1B[36m"
|
||||
#define KWHT "\x1B[37m"
|
||||
@@ -22,15 +22,12 @@
|
||||
#ifndef UTILS_CONFIG_H_ASN1
|
||||
#define UTILS_CONFIG_H_ASN1
|
||||
|
||||
// This is hard coded file name "config.h" in asn1c skeletons
|
||||
// This is hard coded file name "config.h" and HAVE_CONFIG_H_ in asn1c skeletons
|
||||
|
||||
/*
|
||||
* This file "config.h" will be used by asn1c if HAVE_CONFIG_H_ is defined and
|
||||
* included (this is the case for OAI).
|
||||
* This allows to trace the asn1c encoder and decoder at execution time using
|
||||
* the regular OAI logging system, i.e., LOG_I(ASN1, ...);
|
||||
*
|
||||
* to enable it, at compilation time, see ./build_oai --enable-asn1c-debug
|
||||
* included. This logs asn1c encoder and decoder traces at execution time using
|
||||
* the regular OAI logging system, i.e., LOG_I(ASN1...);
|
||||
*
|
||||
* As it is very verbose, note that you can change the log level per module in
|
||||
* source or in gdb, e.g., to only activate it for a short time.
|
||||
@@ -50,7 +47,7 @@
|
||||
*/
|
||||
|
||||
#include "common/utils/LOG/log.h"
|
||||
#if TRACE_ASN1C_ENC_DEC
|
||||
#if DEBUG_ASN1C
|
||||
#define ASN_DEBUG(x...) do{ LOG_I(ASN1,x);LOG_I(ASN1,"\n"); } while(false)
|
||||
#else
|
||||
#define ASN_DEBUG(x...)
|
||||
|
||||
@@ -33,6 +33,8 @@
|
||||
#include <stdint.h>
|
||||
#include "assertions.h"
|
||||
#include "nr_common.h"
|
||||
#include "executables/nr-uesoftmodem.h"
|
||||
#include "openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h"
|
||||
|
||||
const char *duplex_mode[]={"FDD","TDD"};
|
||||
|
||||
@@ -232,6 +234,45 @@ int NRRIV2BW(int locationAndBandwidth,int N_RB) {
|
||||
|
||||
}
|
||||
|
||||
/* This function converts the FRIV to a start sub-channel and length in subchannels */
|
||||
/* for sl_MaxNumPerReserve = 2, the sequence from 38.214 for Lsc = 1,2,3, ...
|
||||
* goes like startsc + (0,N_subch,N_subch +(N_subch-1), N_subch + (N_subch-1) + (N_subch-2), ...)
|
||||
*
|
||||
* This is only done for sl_MaxNumPerReserve = 2
|
||||
* */
|
||||
void convNRFRIV(int FRIV,
|
||||
int N_subch,
|
||||
long sl_MaxNumPerReserve,
|
||||
uint16_t *Lsc,
|
||||
uint16_t *startsc,
|
||||
uint16_t *startsc2) {
|
||||
if (sl_MaxNumPerReserve == NR_SL_UE_SelectedConfigRP_r16__sl_MaxNumPerReserve_r16_n2) {
|
||||
*Lsc=1;
|
||||
int prevN=0;
|
||||
int N=N_subch;
|
||||
while (FRIV>N) {
|
||||
*Lsc = *Lsc+1;
|
||||
prevN = N;
|
||||
N += (N_subch - *Lsc + 1);
|
||||
}
|
||||
if (startsc) *startsc = FRIV-prevN;
|
||||
} else if (sl_MaxNumPerReserve == NR_SL_UE_SelectedConfigRP_r16__sl_MaxNumPerReserve_r16_n3) {
|
||||
*Lsc=1;
|
||||
int prevN=0;
|
||||
int N=N_subch;
|
||||
while (FRIV>N) {
|
||||
*Lsc = *Lsc + 1;
|
||||
prevN = N;
|
||||
N += ((N_subch - *Lsc + 1)*(N_subch - *Lsc + 1));
|
||||
}
|
||||
int tmp1 = FRIV - prevN; // This holds startsc1 + startsc2*(N_subch - *Lsc + 1)
|
||||
if (startsc2) *startsc2 = tmp1 / (N_subch - *Lsc + 1);
|
||||
if (startsc) *startsc = tmp1 % (N_subch - *Lsc + 1);
|
||||
} else {
|
||||
AssertFatal(1 == 0, "sl_MaxNumPerReserve is configured with incorrect value");
|
||||
}
|
||||
}
|
||||
|
||||
int NRRIV2PRBOFFSET(int locationAndBandwidth,int N_RB) {
|
||||
int tmp = locationAndBandwidth/N_RB;
|
||||
int tmp2 = locationAndBandwidth%N_RB;
|
||||
@@ -240,16 +281,11 @@ int NRRIV2PRBOFFSET(int locationAndBandwidth,int N_RB) {
|
||||
}
|
||||
|
||||
/* TS 38.214 ch. 6.1.2.2.2 - Resource allocation type 1 for DL and UL */
|
||||
int PRBalloc_to_locationandbandwidth0(int NPRB, int RBstart, int BWPsize)
|
||||
{
|
||||
AssertFatal(NPRB>0 && (NPRB + RBstart <= BWPsize),
|
||||
"Illegal NPRB/RBstart Configuration (%d,%d) for BWPsize %d\n",
|
||||
NPRB, RBstart, BWPsize);
|
||||
int PRBalloc_to_locationandbandwidth0(int NPRB,int RBstart,int BWPsize) {
|
||||
AssertFatal(NPRB>0 && (NPRB + RBstart <= BWPsize),"Illegal NPRB/RBstart Configuration (%d,%d) for BWPsize %d\n",NPRB,RBstart,BWPsize);
|
||||
|
||||
if (NPRB <= 1 + (BWPsize >> 1))
|
||||
return (BWPsize * (NPRB - 1) + RBstart);
|
||||
else
|
||||
return (BWPsize * (BWPsize + 1 - NPRB) + (BWPsize - 1 - RBstart));
|
||||
if (NPRB <= 1+(BWPsize>>1)) return(BWPsize*(NPRB-1)+RBstart);
|
||||
else return(BWPsize*(BWPsize+1-NPRB) + (BWPsize-1-RBstart));
|
||||
}
|
||||
|
||||
int PRBalloc_to_locationandbandwidth(int NPRB,int RBstart) {
|
||||
@@ -356,7 +392,7 @@ int get_dmrs_port(int nl, uint16_t dmrs_ports)
|
||||
}
|
||||
}
|
||||
}
|
||||
AssertFatal(p>-1,"No dmrs port corresponding to layer %d found\n",nl);
|
||||
if (p==-1) LOG_E(NR_PHY,"No dmrs port corresponding to layer %d found\n",nl);
|
||||
return p;
|
||||
}
|
||||
|
||||
@@ -738,3 +774,61 @@ uint32_t get_ssb_offset_to_pointA(uint32_t absoluteFrequencySSB,
|
||||
AssertFatal(sco % scs_scaling == 0, "ssb offset %d can create frequency offset\n", sco);
|
||||
return ssb_offset_point_a;
|
||||
}
|
||||
|
||||
#define MAX_EL_213_9_3_2 19
|
||||
const float tab38_213_9_3_2[MAX_EL_213_9_3_2] = {1.125,1.250,1.375,1.625,1.750,2.000,2.250,2.500,2.875,3.125,3.500,4.000,5.000,6.250,8.000,10.000,12.625,15.875,20.000};
|
||||
|
||||
int get_NREsci2(const int sci2_alpha,
|
||||
const int sci2_payload_len,
|
||||
const int sci2_beta_offset,
|
||||
const int pssch_numsym,
|
||||
const int pscch_numsym,
|
||||
const int pscch_numrbs,
|
||||
const int l_subch,
|
||||
const int subchannel_size,
|
||||
const int mcs,
|
||||
const int mcs_tb_ind) {
|
||||
|
||||
float Osci2 = (float)sci2_payload_len;
|
||||
AssertFatal(sci2_beta_offset < MAX_EL_213_9_3_2, "illegal sci2_beta_offset %d\n",sci2_beta_offset);
|
||||
float beta_offset_sci2 = tab38_213_9_3_2[sci2_beta_offset];
|
||||
|
||||
|
||||
uint32_t R10240 = nr_get_code_rate_ul(mcs,mcs_tb_ind);
|
||||
uint32_t tmp = (uint32_t)ceil((Osci2 + 24)*beta_offset_sci2/((float)R10240/5120));
|
||||
float tmp2 = 12.0*pssch_numsym;
|
||||
int N_REsci1 = 12*pscch_numrbs*pscch_numsym;
|
||||
tmp2 *= l_subch*subchannel_size;
|
||||
tmp2 -= N_REsci1;
|
||||
tmp2 *= ((float)sci2_alpha/100.0);
|
||||
int min_val = min(tmp,(int)ceil(tmp2));
|
||||
uint8_t gamma = 12 - (min_val % 12);
|
||||
return min_val + (gamma % 12);
|
||||
|
||||
}
|
||||
int get_NREsci2_2(const int sci2_alpha,
|
||||
const int sci2_payload_len,
|
||||
const int sci2_beta_offset,
|
||||
const int pssch_numsym,
|
||||
const int pscch_numsym,
|
||||
const int pscch_numrbs,
|
||||
const int l_subch,
|
||||
const int subchannel_size,
|
||||
const int target_coderate,
|
||||
const int mcs_table_index) {
|
||||
|
||||
float Osci2 = (float)sci2_payload_len;
|
||||
AssertFatal(sci2_beta_offset < MAX_EL_213_9_3_2, "illegal sci2_beta_offset %d\n",sci2_beta_offset);
|
||||
float beta_offset_sci2 = tab38_213_9_3_2[sci2_beta_offset];
|
||||
|
||||
uint32_t R10240 = get_softmodem_params()->sl_mode ? nr_get_code_rate_ul(1, mcs_table_index) : target_coderate;
|
||||
uint32_t tmp = (uint32_t)ceil((Osci2 + 24)*beta_offset_sci2/((float)R10240/5120));
|
||||
float tmp2 = 12.0*pssch_numsym;
|
||||
int N_REsci1 = 12*pscch_numrbs*pscch_numsym;
|
||||
tmp2 *= l_subch*subchannel_size;
|
||||
tmp2 -= N_REsci1;
|
||||
tmp2 *= ((float)sci2_alpha/100.0);
|
||||
int min_val = min(tmp,(int)ceil(tmp2));
|
||||
uint8_t gamma = 12 - (min_val % 12);
|
||||
return min_val + (gamma % 12);
|
||||
}
|
||||
|
||||
@@ -90,6 +90,7 @@ frame_type_t get_frame_type(uint16_t nr_bandP, uint8_t scs_index);
|
||||
uint16_t get_band(uint64_t downlink_frequency, int32_t delta_duplex);
|
||||
int NRRIV2BW(int locationAndBandwidth,int N_RB);
|
||||
int NRRIV2PRBOFFSET(int locationAndBandwidth,int N_RB);
|
||||
void convNRFRIV(int FRIV, int N_subch, long sl_MaxNumPerReserve, uint16_t *Lsc, uint16_t *startsc, uint16_t *startsc2);
|
||||
int PRBalloc_to_locationandbandwidth0(int NPRB,int RBstart,int BWPsize);
|
||||
int PRBalloc_to_locationandbandwidth(int NPRB,int RBstart);
|
||||
int get_subband_size(int NPRB,int size);
|
||||
@@ -113,7 +114,21 @@ uint32_t get_ssb_offset_to_pointA(uint32_t absoluteFrequencySSB,
|
||||
uint32_t absoluteFrequencyPointA,
|
||||
int ssbSubcarrierSpacing,
|
||||
int frequency_range);
|
||||
|
||||
int get_NREsci2(const int sci2_alpha,
|
||||
const int sci2_payload_len,
|
||||
const int sci2_beta_offset,
|
||||
const int pssch_numsym,
|
||||
const int pscch_numsym,
|
||||
const int pscch_numrbs,
|
||||
const int l_subch,
|
||||
const int subchannel_size,
|
||||
const int mcs,
|
||||
const int mcs_tb_ind);
|
||||
|
||||
int get_ssb_subcarrier_offset(uint32_t absoluteFrequencySSB, uint32_t absoluteFrequencyPointA);
|
||||
|
||||
|
||||
#define CEILIDIV(a,b) ((a+b-1)/b)
|
||||
#define ROUNDIDIV(a,b) (((a<<1)+b)/(b<<1))
|
||||
|
||||
|
||||
@@ -231,8 +231,9 @@ void threadCreate(pthread_t* t, void * (*func)(void*), void * param, char* name,
|
||||
int settingPriority = 1;
|
||||
ret=pthread_attr_init(&attr);
|
||||
AssertFatal(ret==0,"ret: %d, errno: %d\n",ret, errno);
|
||||
|
||||
LOG_I(UTIL,"Creating thread %s with affinity %d and priority %d\n",name,affinity,priority);
|
||||
size_t stacksize;
|
||||
pthread_attr_getstacksize(&attr,&stacksize);
|
||||
LOG_I(UTIL,"Creating thread %s with affinity %d and priority %d, stacksize %d\n",name,affinity,priority,(int) stacksize);
|
||||
|
||||
if (checkIfFedoraDistribution())
|
||||
if (checkIfGenericKernelOnFedora())
|
||||
|
||||
@@ -18,351 +18,6 @@
|
||||
|
||||

|
||||
|
||||
# OpenAirInterface 5G-NR Feature Set #
|
||||
|
||||
## General Parameters
|
||||
|
||||
The following features are valid for the gNB and the 5G-NR UE.
|
||||
|
||||
* Static TDD, FDD
|
||||
* Normal CP
|
||||
* Subcarrier spacings: 15 and 30kHz (FR1), 120kHz (FR2)
|
||||
* Bandwidths: 10, 20, 40, 60, 80, 100MHz
|
||||
* Intermediate downlink and uplink frequencies to interface with IF equipment
|
||||
* Procedures for 2-layer DL and UL MIMO
|
||||
* Slot format: 14 OFDM symbols in UL or DL
|
||||
* Highly efficient 3GPP compliant LDPC encoder and decoder (BG1 and BG2 supported)
|
||||
* Highly efficient 3GPP compliant polar encoder and decoder
|
||||
* Encoder and decoder for short blocks
|
||||
* Support for UL transform precoding (SC-FDMA)
|
||||
|
||||
Furthermore, the gNB and UE support
|
||||
|
||||
* "noS1" mode (DL and UL):
|
||||
- Creates TUN interface to PDCP to inject and receive user-place traffic
|
||||
- No connection to the core network
|
||||
* Standalone (SA) mode:
|
||||
- UE can register with the 5G Core Network through the gNB, establish a PDU Session and exchange user-plane traffic
|
||||
|
||||
|
||||
## gNB PHY
|
||||
|
||||
* 15kHz and 30kHz SCS for FR1 and 120kHz SCS for FR2
|
||||
* Generation of NR-PSS/NR-SSS
|
||||
* NR-PBCH supports multiple SSBs and flexible periodicity
|
||||
* Generation of NR-PDCCH (including generation of DCI, polar encoding, scrambling, modulation, RB mapping, etc)
|
||||
- common search space
|
||||
- user-specific search space
|
||||
- DCI formats: 00, 10, 01 and 11
|
||||
* Generation of NR-PDSCH (including Segmentation, LDPC encoding, rate matching, scrambling, modulation, RB mapping, etc).
|
||||
- PDSCH mapping type A and B
|
||||
- DMRS configuration type 1 and 2
|
||||
- Single and multiple DMRS symbols
|
||||
- PTRS support
|
||||
- Support for 1, 2 and 4 TX antennas
|
||||
- Support for up to 2 layers (currently limited to DMRS configuration type 2)
|
||||
- Support for 256 QAM
|
||||
* NR-CSIRS Generation of sequence at PHY
|
||||
* NR-PUSCH (including Segmentation, LDPC encoding, rate matching, scrambling, modulation, RB mapping, etc).
|
||||
- PUSCH mapping type A and B
|
||||
- DMRS configuration type 1 and 2
|
||||
- Single and multiple DMRS symbols
|
||||
- PTRS support
|
||||
- Support for up to 2 RX antenna
|
||||
- Support for up to 2 layers
|
||||
- Support for 256 QAM
|
||||
* NR-PUCCH
|
||||
- Format 0 (2 bits, for ACK/NACK and SR)
|
||||
- Format 2 (mainly for CSI feedback)
|
||||
* NR-SRS
|
||||
- SRS signal reception
|
||||
- Channel estimation (with T tracer real time monitoring)
|
||||
- Power noise estimation
|
||||
* NR-PRS
|
||||
- Rel16 Positioning reference signal(PRS) generation and modulation
|
||||
- Multiple PRS resources, one per beam is supported in FR2 TDD mode
|
||||
- FR1 and FR2 support with config file
|
||||
* NR-PRACH
|
||||
- Formats 0,1,2,3, A1-A3, B1-B3
|
||||
* Highly efficient 3GPP compliant LDPC encoder and decoder (BG1 and BG2 are supported)
|
||||
* Highly efficient 3GPP compliant polar encoder and decoder
|
||||
* Encoder and decoder for short block
|
||||
|
||||
## gNB MAC
|
||||
|
||||
- MAC -> PHY configuration using NR FAPI P5 interface
|
||||
- MAC <-> PHY data interface using FAPI P7 interface for BCH PDU, DCI PDU, PDSCH PDU
|
||||
- Scheduler procedures for SIB1
|
||||
- Scheduler procedures for RA
|
||||
- Contention Free RA procedure
|
||||
- Contention Based RA procedure
|
||||
- Msg3 can transfer uplink CCCH, DTCH or DCCH messages
|
||||
- CBRA can be performed using MAC CE or C-RNTI
|
||||
- Scheduler procedures for CSI-RS
|
||||
- MAC downlink scheduler
|
||||
- phy-test scheduler (fixed allocation and usable also without UE)
|
||||
- regular scheduler with dynamic proportionally-fair allocation
|
||||
- MCS adaptation from HARQ BLER
|
||||
- MAC header generation (including timing advance)
|
||||
- ACK / NACK handling and HARQ procedures for downlink
|
||||
- MAC uplink scheduler
|
||||
- phy-test scheduler (fixed allocation)
|
||||
- regular scheduler with dynamic proportionally-fair allocation
|
||||
- HARQ procedures for uplink
|
||||
- Scheduler procedures for SRS reception
|
||||
- Periodic SRS reception
|
||||
- Channel rank computation up to 2x2 scenario
|
||||
- TPMI computation based on SRS up 4 antenna ports and 2 layers
|
||||
- MAC procedures to handle CSI measurement report
|
||||
- evalution of RSRP report
|
||||
- evaluation of CQI report
|
||||
- MAC scheduling of SR reception
|
||||
- Bandwidth part (BWP) operation
|
||||
- Handle multiple dedicated BWPs, supports one UE
|
||||
- BWP switching through RRCReconfiguration method
|
||||
|
||||
## gNB RLC
|
||||
|
||||
- Send/Receive operations according to 38.322 Rel.16
|
||||
- Segmentation and reassembly procedures
|
||||
- RLC Acknowledged mode supporting PDU retransmissions
|
||||
- RLC Unacknowledged mode
|
||||
- DRBs and SRBs establishment/handling and association with RLC entities
|
||||
- Timers implementation
|
||||
- Interfaces with PDCP, MAC
|
||||
- Interfaces with gtp-u (data Tx/Rx over F1-U at the DU)
|
||||
|
||||
## gNB PDCP
|
||||
|
||||
- Send/Receive operations according to 38.323 Rel.16
|
||||
- Integrity protection and ciphering procedures
|
||||
- Sequence number management, SDU dicard and in-order delivery
|
||||
- Radio bearer establishment/handling and association with PDCP entities
|
||||
- Interfaces with RRC, RLC
|
||||
- Interfaces with gtp-u (data Tx/Rx over N3 and F1-U interfaces)
|
||||
|
||||
## gNB SDAP
|
||||
|
||||
- Send/Receive operations according to 37.324 Rel.15
|
||||
- Establishment/Handling of SDAP entities.
|
||||
- Transfer of User Plane Data
|
||||
- Mapping between a QoS flow and a DRB for both DL and UL
|
||||
- Marking QoS flow ID in both DL and UL packets
|
||||
- Reflective QoS flow to DRB mapping for UL SDAP data PDUs
|
||||
|
||||
## gNB RRC
|
||||
|
||||
- NR RRC (38.331) Rel 17 messages using new [asn1c](https://github.com/mouse07410/asn1c)
|
||||
- LTE RRC (36.331) also updated to Rel 15
|
||||
- Generation of CellGroupConfig (for eNB) and MIB
|
||||
- Generation of system information block 1 (SIB1)
|
||||
- Generation of system information block 2 (SIB2)
|
||||
- Application to read configuration file and program gNB RRC
|
||||
- RRC can configure PDCP, RLC, MAC
|
||||
- Interface with GTP-U (tunnel creation/handling for S1-U (NSA), N3 (SA) interfaces)
|
||||
- Integration of RRC messages and procedures supporting UE 5G SA connection
|
||||
- RRCSetupRequest/RRCSetup/RRCSetupComplete
|
||||
- RRC Uplink/Downlink Information transfer carrying NAS messages transparently
|
||||
- RRC Reconfiguration/Reconfiguration complete
|
||||
- RRC Reestablishment/Reestablishment complete
|
||||
- Support for master cell group configuration
|
||||
- Interface with NGAP for the interactions with the AMF
|
||||
- Interface with F1AP for CU/DU split deployment option
|
||||
- Periodic RRC measurements of serving cell (no A/B events)
|
||||
|
||||
## gNB X2AP
|
||||
|
||||
- Integration of X2AP messages and procedures for the exchanges with the eNB over X2 interface supporting the NSA setup according to 36.423 Rel. 15
|
||||
- X2 setup with eNB
|
||||
- Handling of SgNB Addition Request/Addition Request Acknowledge/Reconfiguration Complete
|
||||
|
||||
## gNB NGAP
|
||||
|
||||
- Integration of NGAP messages and procedures for the exchanges with the AMF over N2 interface according to 38.413 Rel. 15
|
||||
- NGAP Setup request/response
|
||||
- NGAP Initial UE message
|
||||
- NGAP Initial context setup request/response
|
||||
- NGAP Downlink/Uplink NAS transfer
|
||||
- NGAP UE context release request/complete
|
||||
- NGAP UE radio capability info indication
|
||||
- NGAP PDU session resource setup request/response
|
||||
- Interface with RRC
|
||||
|
||||
## gNB F1AP
|
||||
|
||||
- Integration of F1AP messages and procedures for the control plane exchanges between the CU and DU entities according to 38.473 Rel. 16
|
||||
- F1 Setup request/response
|
||||
- F1 DL/UL RRC message transfer
|
||||
- F1 Initial UL RRC message transfer
|
||||
- F1 UE Context setup request/response
|
||||
- F1 UE Context modification request/response
|
||||
- F1 UE Context release
|
||||
- F1 gNB CU configuration update
|
||||
- Interface with RRC
|
||||
- Interface with gtp-u (tunnel creation/handling for F1-U interface)
|
||||
|
||||
## gNB E1AP
|
||||
|
||||
- Integration of E1AP messages and procedures for exchange between CU-CP and CU-UP according to 38.463 Rel. 16
|
||||
- gNB-CU-UP E1 Setup Setup request/response
|
||||
- E1 Bearer Context Setup
|
||||
- Bearer Context Modification (gNB-CU-CP initiated)
|
||||
- Interface with RRC and PDCP
|
||||
|
||||
## gNB GTP-U
|
||||
|
||||
- New GTP-U implementation supporting both N3 and F1-U interfaces according to 29.281 Rel.15
|
||||
- Interfaces with RRC, F1AP for tunnel creation
|
||||
- Interfaces with PDCP and RLC for data send/receive at the CU and DU respectively (F1-U interface)
|
||||
- Interface with SDAP for data send/receive, capture of GTP-U Optional Header, GTP-U Extension Header and PDU Session Container.
|
||||
|
||||
# OpenAirInterface 5G-NR UE Feature Set #
|
||||
|
||||
## NR UE PHY Layer ##
|
||||
|
||||
* Initial synchronization
|
||||
- the UE needs to know the position in frequency of the SSBs (via command line parameter in SA)
|
||||
* Time tracking based on PBCH DMRS
|
||||
* Frequency offset estimation based on PSS and SSS
|
||||
* 15kHz and 30kHz SCS for FR1 and 120 kHz SCS for FR2
|
||||
* Reception of NR-PSS/NR-SSS
|
||||
* NR-PBCH supports multiple SSBs and flexible periodicity
|
||||
- RSRP measurement for the strongest SSB
|
||||
* Reception of NR-PDCCH (including reception of DCI, polar decoding, de-scrambling, de-modulation, RB de-mapping, etc)
|
||||
- common search space configured by MIB
|
||||
- user-specific search space configured by RRC
|
||||
- DCI formats: 00, 10, 01 and 11
|
||||
* Reception of NR-PDSCH (including Segmentation, LDPC decoding, rate de-matching, de-scrambling, de-modulation, RB de-mapping, etc).
|
||||
- PDSCH mapping type A and B
|
||||
- DMRS configuration type 1 and 2
|
||||
- Single and multiple DMRS symbols
|
||||
- PTRS support
|
||||
- Support for 256 QAM
|
||||
- Support for 1, 2 and 4 RX antennas
|
||||
- Support for up to 2 layers (currently limited to DMRS configuration type 2)
|
||||
* Measurements based on NR-CSIRS
|
||||
- RSRP measurements
|
||||
- RI, PMI and CQI computation
|
||||
- Support for up to 4 RX antennas
|
||||
- Support for up to 2 layers
|
||||
* NR-PUSCH (including Segmentation, LDPC encoding, rate matching, scrambling, modulation, RB mapping, etc).
|
||||
- PUSCH mapping type A and B
|
||||
- DMRS configuration type 1 and 2
|
||||
- Single and multiple DMRS symbols
|
||||
- PTRS support
|
||||
- Support for 256 QAM
|
||||
- Support for up to 2 TX antenna
|
||||
- Support for up to 2 layers
|
||||
* NR-PUCCH
|
||||
- Format 0 (2 bits for ACK/NACK and SR)
|
||||
- Format 2 (mainly for CSI feedback)
|
||||
- Format 1 (limited testing)
|
||||
- Format 3 and 4 present but old code never tested (need restructuring before verification)
|
||||
* NR-SRS
|
||||
- Generation of sequence at PHY
|
||||
- SRS signal transmission
|
||||
* NR-PRS
|
||||
- PRS based Channel estimation with T tracer dumps
|
||||
- Time of arrival(ToA) estimation based on channel impulse response(CIR)
|
||||
- Finer ToA estimation by 16x oversampled IDFT for CIR
|
||||
- Support for multiple gNB reception with gNBs synced via GPSDO
|
||||
* NR-PRACH
|
||||
- Formats 0,1,2,3, A1-A3, B1-B3
|
||||
* Highly efficient 3GPP compliant LDPC encoder and decoder (BG1 and BG2 are supported)
|
||||
* Highly efficient 3GPP compliant polar encoder and decoder
|
||||
* Encoder and decoder for short block
|
||||
|
||||
## NR UE FAPI ##
|
||||
|
||||
* MAC -> PHY configuration via UE FAPI P5 interface
|
||||
* Basic MAC to control PHY via UE FAPI P7 interface
|
||||
* PHY -> MAC indication (needs some improvement)
|
||||
|
||||
## NR UE Higher Layers ##
|
||||
|
||||
## UE MAC
|
||||
|
||||
* Minimum system information (MSI)
|
||||
- MIB processing
|
||||
- Scheduling of system information block 1 (SIB1) reception
|
||||
* Random access procedure (needs improvement, there is still not a clear separation between MAC and PHY)
|
||||
- Mapping SSBs to multiple ROs
|
||||
- Scheduling of PRACH
|
||||
- Processing of RAR
|
||||
- Transmission and re-transmission of Msg3
|
||||
- Msg4 and contention resolution
|
||||
* DCI processing
|
||||
- format 10 (RA-RNTI, C-RNTI, SI-RNTI, TC-RNTI)
|
||||
- format 00 (C-RNTI, TC-RNTI)
|
||||
- format 11 (C-RNTI)
|
||||
- format 01 (C-RNTI)
|
||||
* UCI processing
|
||||
- ACK/NACK processing
|
||||
- Triggering periodic SR
|
||||
- CSI measurement reporting
|
||||
* DLSCH scheduler
|
||||
- Configuration of fapi PDU according to DCI
|
||||
- HARQ procedures
|
||||
* ULSCH scheduler
|
||||
- Configuration of fapi PDU according to DCI
|
||||
* NR-CSIRS scheduler
|
||||
- Scheduling of NR-CSIRS reception
|
||||
- Fill UCI for CSI measurement reporting
|
||||
* Scheduler procedures for SRS transmission
|
||||
- Periodic SRS transmission
|
||||
* Bandwidth part (BWP) operation
|
||||
- Operation in configured dedicated BWP through RRCSetup or RRCReconfiguration
|
||||
|
||||
|
||||
## UE RLC
|
||||
|
||||
* Tx/Rx operations according to 38.322 Rel.16
|
||||
- Segmentation and reassembly procedures
|
||||
- RLC Acknowledged mode supporting PDU retransmissions
|
||||
- RLC Unacknowledged mode
|
||||
- DRBs and SRBs establishment and handling
|
||||
- Timers implementation
|
||||
- Interfaces with PDCP, MAC
|
||||
|
||||
## UE PDCP
|
||||
|
||||
* Tx/Rx operations according to 38.323 Rel.16
|
||||
- Integrity protection and ciphering procedures
|
||||
- Sequence number management, SDU dicard and in-order delivery
|
||||
- Radio bearer establishment/handling and association with PDCP entities
|
||||
- Interfaces with RRC, RLC
|
||||
|
||||
## UE SDAP
|
||||
|
||||
* Tx/Rx operations operations according to 37.324 Rel.15
|
||||
- Establishment/Handling of SDAP entities.
|
||||
- Transfer of User Plane Data
|
||||
- Reflective Mapping
|
||||
- RRC Signaling Mapping
|
||||
|
||||
## UE RRC
|
||||
|
||||
* Integration of RRC messages and procedures supporting UE 5G SA connection according to 38.331 Rel.16
|
||||
- RRCSetupRequest/RRCSetup/RRCSetupComplete
|
||||
- RRC Uplink/Downlink Information transfer carrying NAS messages transparently
|
||||
- RRC Reconfiguration/Reconfiguration complete
|
||||
- Support for master cell group configuration
|
||||
- Reception of UECapabilityEnquiry, encoding and transmission of UECapability
|
||||
* Interface with PDCP: configuration, DCCH and CCCH message handling
|
||||
* Interface with RLC and MAC for configuration
|
||||
|
||||
## UE NAS
|
||||
|
||||
* Transfer of NAS messages between the AMF and the UE supporting the UE registration with the core network and the PDU session establishment according to 24.501 Rel.16
|
||||
- Identity Request/Response
|
||||
- Authentication Request/Response
|
||||
- Security Mode Command/Complete
|
||||
- Registration Request/Accept/Complete
|
||||
- PDU Session Establishment Request/Accept
|
||||
- NAS configuration and basic interfacing with RRC
|
||||
|
||||
|
||||
|
||||
# OpenAirInterface 4G LTE eNB Feature Set #
|
||||
|
||||
## eNB PHY Layer ##
|
||||
@@ -390,15 +45,15 @@ The Physical layer implements **3GPP 36.211**, **36.212**, **36.213** and provid
|
||||
FDD DL: 5 MHz, 25 PRBS/ MCS 28 | 16 - 17 Mbit/s | TM1: 17.0 Mbits/s | COTS-UE Cat 4 (150/50 Mbps)
|
||||
FDD DL: 10 MHz, 50 PRBS/ MCS 28 | 34 - 35 Mbit/s | TM1: 34.0 Mbits/s | COTS-UE Cat 4 (150/50 Mbps)
|
||||
FDD DL: 20 MHz, 100 PRBS/ MCS 28 | 70 Mbit/s | TM1: 69.9 Mbits/s | COTS-UE Cat 4 (150/50 Mbps)
|
||||
| | |
|
||||
| | |
|
||||
FDD UL: 5 MHz, 25 PRBS/ MCS 20 | 9 Mbit/s | TM1: 8.28 Mbits/s | COTS-UE Cat 4 (150/50 Mbps)
|
||||
FDD UL: 10 MHz, 50 PRBS/ MCS 20 | 17 Mbit/s | TM1: 18.3 Mbits/s | COTS-UE Cat 4 (150/50 Mbps)
|
||||
FDD UL: 20 MHz, 100 PRBS/ MCS 20 | 35 Mbit/s | TM1: 18.6 Mbits/s | COTS-UE Cat 4 (150/50 Mbps)
|
||||
| |
|
||||
| |
|
||||
TDD DL: 5 MHz, 25 PRBS/ MCS **XX** | 6.5 Mbit/s | TM1: 6.71 Mbits/s | COTS-UE Cat 4 (150/50 Mbps)
|
||||
TDD DL: 10 MHz, 50 PRBS/ MCS **XX** | 13.5 Mbit/s | TM1: 13.6 Mbits/s | COTS-UE Cat 4 (150/50 Mbps)
|
||||
TDD DL: 20 MHz, 100 PRBS/ MCS **XX** | 28.0 Mbit/s | TM1: 27.2 Mbits/s | COTS-UE Cat 4 (150/50 Mbps)
|
||||
| | |
|
||||
| | |
|
||||
TDD UL: 5 MHz, 25 PRBS/ MCS **XX** | 2.0 Mbit/s | TM1: 3.31 Mbits/s | COTS-UE Cat 4 (150/50 Mbps)
|
||||
TDD UL: 10 MHz, 50 PRBS/ MCS **XX** | 2.0 Mbit/s | TM1: 7.25 Mbits/s | COTS-UE Cat 4 (150/50 Mbps)
|
||||
TDD UL: 20 MHz, 100 PRBS/ MCS **XX** | 3.0 Mbit/s | TM1: 4.21 Mbits/s | COTS-UE Cat 4 (150/50 Mbps)
|
||||
@@ -411,7 +66,7 @@ TDD UL: 20 MHz, 100 PRBS/ MCS **XX** | 3.0 Mbit/s | TM1: 4.21 Mbits/s
|
||||
|
||||
## eNB MAC Layer ##
|
||||
|
||||
The MAC layer implements a subset of the **3GPP 36.321** release v8.6 in support of BCH, DLSCH, RACH, and ULSCH channels.
|
||||
The MAC layer implements a subset of the **3GPP 36.321** release v8.6 in support of BCH, DLSCH, RACH, and ULSCH channels.
|
||||
|
||||
- RRC interface for CCCH, DCCH, and DTCH
|
||||
- Proportional fair scheduler (round robin scheduler soon), with the following improvements:
|
||||
@@ -431,16 +86,16 @@ The MAC layer implements a subset of the **3GPP 36.321** release v8.6 in support
|
||||
|
||||
The RLC layer implements a full specification of the 3GPP 36.322 release v9.3.
|
||||
|
||||
- RLC TM (mainly used for BCCH and CCCH)
|
||||
- RLC TM (mainly used for BCCH and CCCH)
|
||||
* Neither segment nor concatenate RLC SDUs
|
||||
* Do not include a RLC header in the RLC PDU
|
||||
* Delivery of received RLC PDUs to upper layers
|
||||
- RLC UM (mainly used for DTCH)
|
||||
- RLC UM (mainly used for DTCH)
|
||||
* Segment or concatenate RLC SDUs according to the TB size selected by MAC
|
||||
* Include a RLC header in the RLC PDU
|
||||
* Duplication detection
|
||||
* PDU reordering and reassembly
|
||||
- RLC AM, compatible with 9.3
|
||||
- RLC AM, compatible with 9.3
|
||||
* Segmentation, re-segmentation, concatenation, and reassembly
|
||||
* Padding
|
||||
* Data transfer to the user
|
||||
@@ -478,9 +133,9 @@ The RRC layer is based on **3GPP 36.331** v15.6 and implements the following fun
|
||||
The X2AP layer is based on **3GPP 36.423** v14.6.0 and implements the following functions:
|
||||
|
||||
- X2 Setup Request
|
||||
- X2 Setup Response
|
||||
- X2 Setup Response
|
||||
- X2 Setup Failure
|
||||
- Handover Request
|
||||
- Handover Request
|
||||
- Handover Request Acknowledge
|
||||
- UE Context Release
|
||||
- X2 timers (t_reloc_prep, tx2_reloc_overall)
|
||||
@@ -489,16 +144,16 @@ The X2AP layer is based on **3GPP 36.423** v14.6.0 and implements the following
|
||||
- EN-DC is implemented
|
||||
- X2AP : Handling of SgNB Addition Request / Addition Request Acknowledge / Reconfiguration Complete
|
||||
- RRC : Handling of RRC Connection Reconfiguration with 5G cell info, configuration of 5G-NR measurements
|
||||
- S1AP : Handling of E-RAB Modification Indication / Confirmation
|
||||
- S1AP : Handling of E-RAB Modification Indication / Confirmation
|
||||
|
||||
## eNB/MCE M2AP ##
|
||||
|
||||
The M2AP layer is based on **3GPP 36.443** v14.0.1:
|
||||
- M2 Setup Request
|
||||
- M2 Setup Response
|
||||
- M2 Setup Response
|
||||
- M2 Setup Failure
|
||||
- M2 Scheduling Information
|
||||
- M2 Scheduling Information Response
|
||||
- M2 Scheduling Information Response
|
||||
- M2 Session Start Request
|
||||
- M2 Session Start Response
|
||||
|
||||
@@ -506,7 +161,7 @@ The M2AP layer is based on **3GPP 36.443** v14.0.1:
|
||||
|
||||
The M3AP layer is based on **3GPP 36.444** v14.0.1:
|
||||
- M3 Setup Request
|
||||
- M3 Setup Response
|
||||
- M3 Setup Response
|
||||
- M3 Setup Failure
|
||||
- M3 Session Start Request
|
||||
- M3 Session Start Response
|
||||
@@ -529,11 +184,11 @@ The Physical layer implements **3GPP 36.211**, **36.212**, **36.213** and provid
|
||||
- All uplink (UL) channels are supported: PRACH, PUSCH, PUCCH (format 1/1a/1b), SRS, DRS
|
||||
- LTE MBMS-dedicated cell (feMBMS) procedures subset for LTE release 14 (experimental)
|
||||
- LTE non-MBSFN subframe (feMBMS) Carrier Adquistion Subframe-CAS procedures (PSS/SSS/PBCH/PDSH) (experimental)
|
||||
- LTE MBSFN MBSFN subframe channel (feMBMS): PMCH (CS@1.25KHz) (channel estimation for 25MHz bandwidth) (experimental)
|
||||
- LTE MBSFN MBSFN subframe channel (feMBMS): PMCH (CS@1.25KHz) (channel estimation for 25MHz bandwidth) (experimental)
|
||||
|
||||
## LTE UE MAC Layer ##
|
||||
|
||||
The MAC layer implements a subset of the **3GPP 36.321** release v8.6 in support of BCH, DLSCH, RACH, and ULSCH channels.
|
||||
The MAC layer implements a subset of the **3GPP 36.321** release v8.6 in support of BCH, DLSCH, RACH, and ULSCH channels.
|
||||
|
||||
- RRC interface for CCCH, DCCH, and DTCH
|
||||
- HARQ Support
|
||||
@@ -541,7 +196,7 @@ The MAC layer implements a subset of the **3GPP 36.321** release v8.6 in support
|
||||
- RLC interface (AM, UM)
|
||||
- UL power control
|
||||
- Link adaptation
|
||||
- MBMS-dedicated cell (feMBMS) RRC interface for BCCH
|
||||
- MBMS-dedicated cell (feMBMS) RRC interface for BCCH
|
||||
- eMBMS and MBMS-dedicated cell (feMBMS) RRC interface for MCCH, MTCH
|
||||
|
||||
## LTE UE RLC Layer ##
|
||||
@@ -568,6 +223,328 @@ The NAS layer is based on **3GPP 24.301** and implements the following functions
|
||||
- ESM default/dedicated bearer, PDN connectivity, and more
|
||||
|
||||
|
||||
# OpenAirInterface 5G-NR Feature Set #
|
||||
|
||||
## General Parameters ##
|
||||
|
||||
The following features are valid for the gNB and the 5G-NR UE.
|
||||
|
||||
* Static TDD,
|
||||
* FDD
|
||||
* Normal CP
|
||||
* Subcarrier spacings: 15 and 30kHz (FR1), 120kHz (FR2)
|
||||
* Bandwidths: 10, 20, 40, 80, 100MHz (273 Physical Resource Blocks)
|
||||
* Intermediate downlink and uplink frequencies to interface with IF equipment
|
||||
* Procedures for 2-layer DL MIMO
|
||||
* Slot format: 14 OFDM symbols in UL or DL
|
||||
* Highly efficient 3GPP compliant LDPC encoder and decoder (BG1 and BG2 supported)
|
||||
* Highly efficient 3GPP compliant polar encoder and decoder
|
||||
* Encoder and decoder for short blocks
|
||||
* Support for UL transform precoding (SC-FDMA)
|
||||
|
||||
|
||||
## gNB PHY Layer ##
|
||||
|
||||
* 15kHz and 30kHz SCS for FR1 and 120kHz SCS for FR2
|
||||
* Generation of NR-PSS/NR-SSS
|
||||
* NR-PBCH supports multiple SSBs and flexible periodicity
|
||||
* Generation of NR-PDCCH (including generation of DCI, polar encoding, scrambling, modulation, RB mapping, etc)
|
||||
- common search space
|
||||
- user-specific search space
|
||||
- DCI formats: 00, 10, 01 and 11
|
||||
* Generation of NR-PDSCH (including Segmentation, LDPC encoding, rate matching, scrambling, modulation, RB mapping, etc).
|
||||
- PDSCH mapping type A and B
|
||||
- DMRS configuration type 1 and 2
|
||||
- Single and multiple DMRS symbols
|
||||
- PTRS support
|
||||
- Support for 1, 2 and 4 TX antennas
|
||||
- Support for up to 2 layers (currently limited to DMRS configuration type 2)
|
||||
- Support for 256 QAM
|
||||
* NR-CSIRS Generation of sequence at PHY
|
||||
* NR-PUSCH (including Segmentation, LDPC encoding, rate matching, scrambling, modulation, RB mapping, etc).
|
||||
- PUSCH mapping type A and B
|
||||
- DMRS configuration type 1 and 2
|
||||
- Single and multiple DMRS symbols
|
||||
- PTRS support
|
||||
- Support for up to 2 RX antenna
|
||||
- Support for up to 2 layers
|
||||
- Support for 256 QAM
|
||||
* NR-PUCCH
|
||||
- Format 0 (2 bits, for ACK/NACK and SR)
|
||||
- Format 2 (mainly for CSI feedback)
|
||||
* NR-SRS
|
||||
- SRS signal reception
|
||||
- Channel estimation (with T tracer real time monitoring)
|
||||
- Power noise estimation
|
||||
* NR-PRS
|
||||
- Rel16 Positioning reference signal(PRS) generation and modulation
|
||||
- Multiple PRS resources, one per beam is supported in FR2 TDD mode
|
||||
- FR1 and FR2 support with config file
|
||||
* NR-PRACH
|
||||
- Formats 0,1,2,3, A1-A3, B1-B3
|
||||
* Highly efficient 3GPP compliant LDPC encoder and decoder (BG1 and BG2 are supported)
|
||||
* Highly efficient 3GPP compliant polar encoder and decoder
|
||||
* Encoder and decoder for short block
|
||||
|
||||
## gNB Higher Layers ##
|
||||
|
||||
**gNB MAC**
|
||||
- MAC -> PHY configuration using NR FAPI P5 interface
|
||||
- MAC <-> PHY data interface using FAPI P7 interface for BCH PDU, DCI PDU, PDSCH PDU
|
||||
- Scheduler procedures for SIB1
|
||||
- Scheduler procedures for RA
|
||||
- Contention Free RA procedure
|
||||
- Contention Based RA procedure
|
||||
- Msg3 can transfer uplink CCCH, DTCH or DCCH messages
|
||||
- CBRA can be performed using MAC CE or C-RNTI
|
||||
- Scheduler procedures for CSI-RS
|
||||
- MAC downlink scheduler
|
||||
- phy-test scheduler (fixed allocation and usable also without UE)
|
||||
- regular scheduler with dynamic allocation
|
||||
- MCS adaptation from HARQ BLER
|
||||
- MAC header generation (including timing advance)
|
||||
- ACK / NACK handling and HARQ procedures for downlink
|
||||
- MAC uplink scheduler
|
||||
- phy-test scheduler (fixed allocation)
|
||||
- regular scheduler with dynamic allocation
|
||||
- HARQ procedures for uplink
|
||||
- Scheduler procedures for SRS reception
|
||||
- Periodic SRS reception
|
||||
- Channel rank computation up to 2x2 scenario
|
||||
- TPMI computation based on SRS up 4 antenna ports and 2 layers
|
||||
- MAC procedures to handle CSI measurement report
|
||||
- evalution of RSRP report
|
||||
- evaluation of CQI report
|
||||
- MAC scheduling of SR reception
|
||||
- Bandwidth part (BWP) operation
|
||||
- Handle multiple dedicated BWPs
|
||||
- BWP switching through RRCReconfiguration method
|
||||
|
||||
**gNB RLC**
|
||||
- Send/Receive operations according to 38.322 Rel.16
|
||||
- Segmentation and reassembly procedures
|
||||
- RLC Acknowledged mode supporting PDU retransmissions
|
||||
- RLC Unacknowledged mode
|
||||
- DRBs and SRBs establishment/handling and association with RLC entities
|
||||
- Timers implementation
|
||||
- Interfaces with PDCP, MAC
|
||||
- Interfaces with gtp-u (data Tx/Rx over F1-U at the DU)
|
||||
|
||||
**gNB PDCP**
|
||||
- Send/Receive operations according to 38.323 Rel.16
|
||||
- Integrity protection and ciphering procedures
|
||||
- Sequence number management, SDU dicard and in-order delivery
|
||||
- Radio bearer establishment/handling and association with PDCP entities
|
||||
- Interfaces with RRC, RLC
|
||||
- Interfaces with gtp-u (data Tx/Rx over N3 and F1-U interfaces)
|
||||
|
||||
**gNB SDAP**
|
||||
- Send/Receive operations according to 37.324 Rel.15
|
||||
- Establishment/Handling of SDAP entities.
|
||||
- Transfer of User Plane Data
|
||||
- Mapping between a QoS flow and a DRB for both DL and UL
|
||||
- Marking QoS flow ID in both DL and UL packets
|
||||
- Reflective QoS flow to DRB mapping for UL SDAP data PDUs
|
||||
|
||||
**gNB RRC**
|
||||
- NR RRC (38.331) Rel 16 messages using new asn1c
|
||||
- LTE RRC (36.331) also updated to Rel 15
|
||||
- Generation of CellGroupConfig (for eNB) and MIB
|
||||
- Generation of system information block 1 (SIB1)
|
||||
- Generation of system information block 2 (SIB2)
|
||||
- Application to read configuration file and program gNB RRC
|
||||
- RRC can configure PDCP, RLC, MAC
|
||||
- Interface with gtp-u (tunnel creation/handling for S1-U (NSA), N3 (SA) interfaces)
|
||||
- Integration of RRC messages and procedures supporting UE 5G SA connection
|
||||
- RRCSetupRequest/RRCSetup/RRCSetupComplete
|
||||
- RRC Uplink/Downlink Information transfer carrying NAS messages transparently
|
||||
- RRC Reconfiguration/Reconfiguration complete
|
||||
- RRC Reestablishment/Reestablishment complete
|
||||
- Paging
|
||||
- Support for master cell group configuration
|
||||
- Interface with NGAP for the interactions with the AMF
|
||||
- Interface with F1AP for CU/DU split deployment option
|
||||
- Periodic RRC measurements of serving cell (no A/B events)
|
||||
|
||||
**gNB X2AP**
|
||||
- Integration of X2AP messages and procedures for the exchanges with the eNB over X2 interface supporting the NSA setup according to 36.423 Rel. 15
|
||||
- X2 setup with eNB
|
||||
- Handling of SgNB Addition Request / Addition Request Acknowledge / Reconfiguration Complete
|
||||
|
||||
**gNB NGAP**
|
||||
|
||||
- Integration of NGAP messages and procedures for the exchanges with the AMF over N2 interface according to 38.413 Rel. 15
|
||||
- NGAP Setup request/response
|
||||
- NGAP Initial UE message
|
||||
- NGAP Initial context setup request/response
|
||||
- NGAP Downlink/Uplink NAS transfer
|
||||
- NGAP UE context release request/complete
|
||||
- NGAP UE radio capability info indication
|
||||
- NGAP PDU session resource setup request/response
|
||||
- Interface with RRC
|
||||
|
||||
**gNB F1AP**
|
||||
|
||||
- Integration of F1AP messages and procedures for the control plane exchanges between the CU and DU entities according to 38.473 Rel. 16
|
||||
- F1 Setup request/response
|
||||
- F1 DL/UL RRC message transfer
|
||||
- F1 Initial UL RRC message transfer
|
||||
- F1 UE Context setup request/response
|
||||
- F1 gNB CU configuration update
|
||||
- Interface with RRC
|
||||
- Interface with gtp-u (tunnel creation/handling for F1-U interface)
|
||||
|
||||
**gNB GTP-U**
|
||||
- New gtp-u implementation supporting both N3 and F1-U interfaces according to 29.281 Rel.15
|
||||
- Interfaces with RRC, F1AP for tunnel creation
|
||||
- Interfaces with PDCP and RLC for data send/receive at the CU and DU respectively (F1-U interface)
|
||||
- Interface with SDAP for data send/receive, capture of GTP-U Optional Header, GTP-U Extension Header and PDU Session Container.
|
||||
|
||||
# OpenAirInterface 5G-NR UE Feature Set #
|
||||
|
||||
* Supporting "noS1" mode (DL and UL):
|
||||
- Creates TUN interface to PDCP to inject and receive user-place traffic
|
||||
- No connection to the core network
|
||||
* Supporting Standalone (SA) mode:
|
||||
- UE can register with the 5G Core Network, establish a PDU Session and exchange user-plane traffic
|
||||
|
||||
## NR UE PHY Layer ##
|
||||
|
||||
* Initial synchronization
|
||||
- the UE needs to know the position in frequency of the SSBs (via command line parameter in SA)
|
||||
* Time tracking based on PBCH DMRS
|
||||
* Frequency offset estimation based on PSS and SSS
|
||||
* 15kHz and 30kHz SCS for FR1 and 120 kHz SCS for FR2
|
||||
* Reception of NR-PSS/NR-SSS
|
||||
* NR-PBCH supports multiple SSBs and flexible periodicity
|
||||
- RSRP measurement for the strongest SSB
|
||||
* Reception of NR-PDCCH (including reception of DCI, polar decoding, de-scrambling, de-modulation, RB de-mapping, etc)
|
||||
- common search space configured by MIB
|
||||
- user-specific search space configured by RRC
|
||||
- DCI formats: 00, 10, 01 and 11
|
||||
* Reception of NR-PDSCH (including Segmentation, LDPC decoding, rate de-matching, de-scrambling, de-modulation, RB de-mapping, etc).
|
||||
- PDSCH mapping type A and B
|
||||
- DMRS configuration type 1 and 2
|
||||
- Single and multiple DMRS symbols
|
||||
- PTRS support
|
||||
- Support for 1, 2 and 4 RX antennas
|
||||
- Support for up to 2 layers (currently limited to DMRS configuration type 2)
|
||||
* Measurements based on NR-CSIRS
|
||||
- RSRP measurements
|
||||
- RI, PMI and CQI computation
|
||||
- Support for up to 4 RX antennas
|
||||
- Support for up to 2 layers
|
||||
* NR-PUSCH (including Segmentation, LDPC encoding, rate matching, scrambling, modulation, RB mapping, etc).
|
||||
- PUSCH mapping type A and B
|
||||
- DMRS configuration type 1 and 2
|
||||
- Single and multiple DMRS symbols
|
||||
- PTRS support
|
||||
- Support for up to 2 TX antenna
|
||||
- Support for up to 2 layers
|
||||
* NR-PUCCH
|
||||
- Format 0 (2 bits for ACK/NACK and SR)
|
||||
- Format 2 (mainly for CSI feedback)
|
||||
- Format 1 (limited testing)
|
||||
- Format 3 and 4 present but old code never tested (need restructuring before verification)
|
||||
* NR-SRS
|
||||
- Generation of sequence at PHY
|
||||
- SRS signal transmission
|
||||
* NR-PRS
|
||||
- PRS based Channel estimation with T tracer dumps
|
||||
- Time of arrival(ToA) estimation based on channel impulse response(CIR)
|
||||
- Finer ToA estimation by 16x oversampled IDFT for CIR
|
||||
- Support for multiple gNB reception with gNBs synced via GPSDO
|
||||
* NR-PRACH
|
||||
- Formats 0,1,2,3, A1-A3, B1-B3
|
||||
* Highly efficient 3GPP compliant LDPC encoder and decoder (BG1 and BG2 are supported)
|
||||
* Highly efficient 3GPP compliant polar encoder and decoder
|
||||
* Encoder and decoder for short block
|
||||
|
||||
## NR UE FAPI ##
|
||||
|
||||
* MAC -> PHY configuration via UE FAPI P5 interface
|
||||
* Basic MAC to control PHY via UE FAPI P7 interface
|
||||
* PHY -> MAC indication (needs some improvement)
|
||||
|
||||
## NR UE Higher Layers ##
|
||||
|
||||
**UE MAC**
|
||||
* Minimum system information (MSI)
|
||||
- MIB processing
|
||||
- Scheduling of system information block 1 (SIB1) reception
|
||||
* Random access procedure (needs improvement, there is still not a clear separation between MAC and PHY)
|
||||
- Mapping SSBs to multiple ROs
|
||||
- Scheduling of PRACH
|
||||
- Processing of RAR
|
||||
- Transmission and re-transmission of Msg3
|
||||
- Msg4 and contention resolution
|
||||
* DCI processing
|
||||
- format 10 (RA-RNTI, C-RNTI, SI-RNTI, TC-RNTI)
|
||||
- format 00 (C-RNTI, TC-RNTI)
|
||||
- format 11 (C-RNTI)
|
||||
- format 01 (C-RNTI)
|
||||
* UCI processing
|
||||
- ACK/NACK processing
|
||||
- Triggering periodic SR
|
||||
- CSI measurement reporting
|
||||
* DLSCH scheduler
|
||||
- Configuration of fapi PDU according to DCI
|
||||
- HARQ procedures
|
||||
* ULSCH scheduler
|
||||
- Configuration of fapi PDU according to DCI
|
||||
* NR-CSIRS scheduler
|
||||
- Scheduling of NR-CSIRS reception
|
||||
- Fill UCI for CSI measurement reporting
|
||||
* Scheduler procedures for SRS transmission
|
||||
- Periodic SRS transmission
|
||||
* Bandwidth part (BWP) operation
|
||||
- Operation in configured dedicated BWP through RRCSetup or RRCReconfiguration
|
||||
|
||||
|
||||
**UE RLC**
|
||||
* Tx/Rx operations according to 38.322 Rel.16
|
||||
- Segmentation and reassembly procedures
|
||||
- RLC Acknowledged mode supporting PDU retransmissions
|
||||
- RLC Unacknowledged mode
|
||||
- DRBs and SRBs establishment and handling
|
||||
- Timers implementation
|
||||
- Interfaces with PDCP, MAC
|
||||
|
||||
**UE PDCP**
|
||||
* Tx/Rx operations according to 38.323 Rel.16
|
||||
- Integrity protection and ciphering procedures
|
||||
- Sequence number management, SDU dicard and in-order delivery
|
||||
- Radio bearer establishment/handling and association with PDCP entities
|
||||
- Interfaces with RRC, RLC
|
||||
|
||||
**UE SDAP**
|
||||
* Tx/Rx operations operations according to 37.324 Rel.15
|
||||
- Establishment/Handling of SDAP entities.
|
||||
- Transfer of User Plane Data
|
||||
- Reflective Mapping
|
||||
- RRC Signaling Mapping
|
||||
|
||||
**UE RRC**
|
||||
* Integration of RRC messages and procedures supporting UE 5G SA connection according to 38.331 Rel.16
|
||||
- RRCSetupRequest/RRCSetup/RRCSetupComplete
|
||||
- RRC Uplink/Downlink Information transfer carrying NAS messages transparently
|
||||
- RRC Reconfiguration/Reconfiguration complete
|
||||
- Support for master cell group configuration
|
||||
- Reception of UECapabilityEnquiry, encoding and transmission of UECapability
|
||||
* Interface with PDCP: configuration, DCCH and CCCH message handling
|
||||
* Interface with RLC and MAC for configuration
|
||||
|
||||
**UE NAS**
|
||||
* Transfer of NAS messages between the AMF and the UE supporting the UE registration with the core network and the PDU session establishment according to 24.501 Rel.16
|
||||
- Identity Request/Response
|
||||
- Authentication Request/Response
|
||||
- Security Mode Command/Complete
|
||||
- Registration Request/Accept/Complete
|
||||
- PDU Session Establishment Request/Accept
|
||||
- NAS configuration and basic interfacing with RRC
|
||||
|
||||
|
||||
|
||||
[OAI wiki home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home)
|
||||
|
||||
[OAI softmodem build procedure](BUILD.md)
|
||||
|
||||
@@ -99,7 +99,6 @@ The other SDRs (AW2S, LimeSDR, ...) have no READMEs.
|
||||
- OAI comes with an integrated [telnet server](../common/utils/telnetsrv/DOC/telnethelp.md) to monitor and control
|
||||
- OAI comes with an integrated [web server](../common/utils/websrv/DOC/websrv.md)
|
||||
|
||||
# Testing
|
||||
# CI
|
||||
|
||||
- [UnitTests.md](./UnitTests.md) explains the unit testing setup
|
||||
- [TESTBenches.md](./TESTBenches.md) lists the CI setup and links to pipelines
|
||||
|
||||
@@ -101,13 +101,10 @@ Webhook
|
||||
- L2simulator: skips physical layer and uses proxy between gNB and UE, currently only ping
|
||||
- [RAN-LTE-FDD-LTEBOX-Container](https://jenkins-oai.eurecom.fr/job/RAN-LTE-FDD-LTEBOX-Container/)
|
||||
- hutch + B210, nano w/ ltebox + 2x UE
|
||||
- tests RRC inactivity timers, different bandwidths, IF4p5 fronthaul
|
||||
- [RAN-LTE-FDD-OAIUE-OAICN4G-Container](https://jenkins-oai.eurecom.fr/job/RAN-LTE-FDD-OAIUE-OAICN4G-Container/)
|
||||
- hutch + B210 (eNB), carabe + B210 (4G UE), nano w/ OAI 4GC
|
||||
- tests OAI 4G for 10 MHz/TM1; known to be unstable
|
||||
- tests RRC inactivity timers, different bandwidths
|
||||
- [RAN-LTE-TDD-2x2-Container](https://jenkins-oai.eurecom.fr/view/RAN/job/RAN-LTE-TDD-2x2-Container/)
|
||||
- obelix + N310, porcepix, nrmodule2 + Quectel
|
||||
- TM1 and TM2 test, IF4p5 fronthaul
|
||||
- TM1 and TM2 test
|
||||
- [RAN-LTE-TDD-LTEBOX-Container](https://jenkins-oai.eurecom.fr/job/RAN-LTE-TDD-LTEBOX-Container/)
|
||||
- starsky + B210, nano w/ ltebox + 2x UE
|
||||
- TM1 over bandwidths 5, 10, 20 MHz in Band 40, default scheduler for 20 MHz
|
||||
@@ -151,3 +148,23 @@ Webhook
|
||||
- [RAN-SA-AmariS-CN5G](https://jenkins-oai.eurecom.fr/view/RAN/job/RAN-SA-AmariS-CN5G/)
|
||||
- asterix + N310, amariue (1x UE), porcepix w/ OAI 5GC
|
||||
- Amarisoft UE simulator: expected to be increased to more UEs
|
||||
|
||||
### RAN-CI-develop
|
||||
|
||||
***DEFUNCT***: automatically triggered tests, mostly 4G, to be phased out and
|
||||
integrated into RAN-Container-Parent
|
||||
|
||||
The following defunct pipelines remain to be integrated into RAN-Container-Parent:
|
||||
- eNB-CI-IF4p5-FDD-Band7-B210
|
||||
- hutch + B210, nano w/ ltebox + 2x UE
|
||||
- tests IF4.5 split over bandwidths 5, 10, 20 MHz in Band 7
|
||||
- eNB-CI-IF4p5-TDD-Band40-B210
|
||||
- starsky + B210, nano w/ ltebox + 2x UE
|
||||
- tests IF4.5 split over bandwidths 5, 10, 20 MHz in Band 40
|
||||
- eNB-UE-CI-MONO-FDD-Band7-B200
|
||||
- hutch + B210 (eNB), carabe + B210 (4G UE), nano w/ ltebox
|
||||
- tests OAI 4G for 5 MHz/TM1 with both CN and in noS1 model, MBMS; known to
|
||||
be unstable
|
||||
- UE-CI-FDD-Band20-B200
|
||||
- starsky + B210 (sniffer)
|
||||
- Sniff MIB + SIB1 of Orange, SFR
|
||||
|
||||
108
doc/UnitTests.md
108
doc/UnitTests.md
@@ -1,108 +0,0 @@
|
||||
# Unit Testing in OAI
|
||||
|
||||
OpenAirInterface uses
|
||||
[ctest](https://cmake.org/cmake/help/latest/manual/ctest.1.html) for unit
|
||||
testing. The cmake documentation has a
|
||||
[tutorial](https://cmake.org/cmake/help/book/mastering-cmake/chapter/Testing%20With%20CMake%20and%20CTest.html)
|
||||
explaining how to test with cmake and ctest; it is a suggested read, and the
|
||||
following just lists the main points of how to compile the tests and how to add
|
||||
new ones.
|
||||
|
||||
At the time of writing, only the NR RLC tests have been integrated. The author
|
||||
hopes that more tests follow suit.
|
||||
|
||||
# How to compile tests
|
||||
|
||||
To compile only the tests, a special target `tests` is available. It has to be
|
||||
enabled with the special cmake variable `ENABLE_TESTS`:
|
||||
|
||||
```bash
|
||||
cd openairinterface5g
|
||||
mkdir build && cd build # you can also do that in cmake_targets/ran_build/build
|
||||
cmake .. -GNinja -DENABLE_TESTS=ON
|
||||
ninja tests
|
||||
```
|
||||
|
||||
Then, you can run `ctest` to run all tests:
|
||||
```
|
||||
$ ctest
|
||||
Test project /home/richie/w/ctest/build
|
||||
Start 1: nr_rlc_tests
|
||||
1/1 Test #1: nr_rlc_tests ..................... Passed 0.06 sec
|
||||
|
||||
100% tests passed, 0 tests failed out of 1
|
||||
|
||||
Total Test time (real) = 0.06 sec
|
||||
```
|
||||
|
||||
A couple of interesting variables are `--verbose`, `--output-on-failure`.
|
||||
|
||||
# How to add a new test
|
||||
|
||||
As of now, there is no dedicated testing directory. Rather, tests are together
|
||||
with the sources of the corresponding (sub)system. The generic four-step
|
||||
process is
|
||||
|
||||
1. Guard all the following steps with `if(ENABLE_TESTS)`. In a world where OAI
|
||||
is tested completely, there would be many executables that would be of
|
||||
tangential interest to the average user only. A "normal" build without tests
|
||||
would result in less executables, due to this guard.
|
||||
2. Add an executable that you want to execute. In a `CMakeLists.txt`, do for
|
||||
instance `add_executable(my_test mytest.c)` where `mytest.c` contains
|
||||
`main()`. You can then build this executable with `ninja/make my_test`,
|
||||
given you ran `cmake -DENABLE_TESTS=ON ...` before.
|
||||
3. Create a dependency to `tests` so that triggering the `tests` (`ninja/make
|
||||
tests`) target will build your test: `add_dependencies(tests my_test)`.
|
||||
4. Use `add_test(NAME my_new_test COMMAND my_test <options>)` to declare a new
|
||||
test that will be run by `ctest` under name `my_new_test`.
|
||||
|
||||
In the simplest case, in an existing `CMakeLists.txt`, you might add the
|
||||
following:
|
||||
```
|
||||
if(ENABLE_TESTS)
|
||||
add_executable(my_test mytest.c)
|
||||
add_dependencies(tests my_test)
|
||||
add_test(NAME my_new_test COMMAND my_test) # no options required
|
||||
endif()
|
||||
```
|
||||
|
||||
Note that this might get more complicated, e.g., typically you will have to
|
||||
link some library into the executable with `target_link_libraries()`, or pass
|
||||
some option to the test program.
|
||||
|
||||
`ctest` decides if a test passed via the return code of the program. So a test
|
||||
executable that always passes is `int main() { return 0; }` and one that always
|
||||
fails `int main() { return 1; }`. It is left as an exercise to the reader to
|
||||
include these examples into `ctest`. Other programming languages other than C
|
||||
or shell scripts are possible but discouraged. Obviously, though, a test in
|
||||
a mainstream non-C programming language/shell script (C++, Rust, Python, Perl)
|
||||
is preferable over no test.
|
||||
|
||||
Let's look at a more concrete, elaborate example, the NR RLC tests.
|
||||
They are located in `openair2/LAYER2/nr_rlc/tests/`. Note that due to
|
||||
historical reasons, a test script `run_tests.sh` allows to run all tests from
|
||||
that directory directly, which you might also use to compare to the
|
||||
`cmake`/`ctest` implementation.
|
||||
|
||||
1. Since the tests are in a sub-directory `tests/`, the inclusion of the entire
|
||||
directory is guarded in `openair2/LAYER2/nr_rlc/CMakeLists.txt` (in fact, it
|
||||
might in general be a good idea to create a separate sub-directory
|
||||
`tests/`!).
|
||||
2. The NR RLC tests in fact consist of one "test driver program" (`test.c`)
|
||||
which is compiled with different "test stimuli" into the program. In total,
|
||||
there are 17 stimuli (`test1.h` to `test17.h`) with corresponding known
|
||||
"good" outputs after running (in `test1.txt.gz` to `test17.txt.gz`). To
|
||||
implement this, the `tests/CMakeLists.txt` creates multiple executables
|
||||
`nr_rlc_test_X` via the loop over `TESTNUM`, links necessary libraries into
|
||||
the test driver and a compile definition for the test stimuli.
|
||||
3. For each executable, create a dependency to `tests`.
|
||||
4. Finally, there is a single(!) `ctest` test that runs all the 17 test
|
||||
executables at once(!). If you look at the shell script
|
||||
`exec_nr_rlc_test.sh`, you see that it runs the program, filters for `TEST`,
|
||||
and compares with a predefined output from each test in `testX.txt.gz`,
|
||||
which is `gunzip`ed on the fly... Anyway, the actual `add_test()` definition
|
||||
just tells `ctest` to run this script (in the source directory), and passes
|
||||
an option where to find the executables (in the build directory). This
|
||||
slight complication is due to using shell scripts. An easier way is to
|
||||
directly declare the executable in `add_test()`, and `ctest` will locate and
|
||||
run the executable properly.
|
||||
@@ -51,7 +51,6 @@ RUN apt-get update && \
|
||||
python3 \
|
||||
python3-six \
|
||||
python3-requests \
|
||||
libpython3.8 \
|
||||
libusb-1.0-0 \
|
||||
iputils-ping \
|
||||
iproute2 \
|
||||
|
||||
@@ -99,7 +99,8 @@
|
||||
typedef enum {
|
||||
pss = 0,
|
||||
pbch = 1,
|
||||
si = 2
|
||||
si = 2,
|
||||
psbch = 3
|
||||
} sync_mode_t;
|
||||
|
||||
static void *NRUE_phy_stub_standalone_pnf_task(void *arg);
|
||||
@@ -161,6 +162,9 @@ void init_nr_ue_vars(PHY_VARS_NR_UE *ue,
|
||||
// initialize all signal buffers
|
||||
init_nr_ue_signal(ue, nb_connected_gNB);
|
||||
|
||||
if (ue->sl_mode)
|
||||
sl_ue_phy_init(ue);
|
||||
|
||||
// intialize transport
|
||||
init_nr_ue_transport(ue);
|
||||
|
||||
@@ -306,11 +310,15 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
|
||||
process_queued_nr_nfapi_msgs(mac, sfn_slot);
|
||||
}
|
||||
|
||||
bool only_dl = false;
|
||||
if (mac->scc == NULL && mac->scc_SIB == NULL)
|
||||
only_dl = true;
|
||||
|
||||
int CC_id = 0;
|
||||
uint8_t gNB_id = 0;
|
||||
nr_uplink_indication_t ul_info;
|
||||
int slots_per_frame = 20; //30 kHZ subcarrier spacing
|
||||
int slot_ahead = 2; // TODO: Make this dynamic
|
||||
int slot_ahead = 3; // TODO: Make this dynamic
|
||||
ul_info.cc_id = CC_id;
|
||||
ul_info.gNB_index = gNB_id;
|
||||
ul_info.module_id = mod_id;
|
||||
@@ -328,7 +336,10 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
|
||||
free_and_zero(ch_info);
|
||||
}
|
||||
|
||||
if (is_nr_DL_slot(mac->tdd_UL_DL_ConfigurationCommon,
|
||||
if (only_dl ||
|
||||
is_nr_DL_slot(get_softmodem_params()->nsa ?
|
||||
mac->scc->tdd_UL_DL_ConfigurationCommon :
|
||||
mac->scc_SIB->tdd_UL_DL_ConfigurationCommon,
|
||||
ul_info.slot_rx)) {
|
||||
memset(&mac->dl_info, 0, sizeof(mac->dl_info));
|
||||
mac->dl_info.cc_id = CC_id;
|
||||
@@ -343,7 +354,10 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
|
||||
|
||||
if (pthread_mutex_unlock(&mac->mutex_dl_info)) abort();
|
||||
|
||||
if (is_nr_UL_slot(mac->tdd_UL_DL_ConfigurationCommon,
|
||||
if (!only_dl &&
|
||||
is_nr_UL_slot(get_softmodem_params()->nsa ?
|
||||
mac->scc->tdd_UL_DL_ConfigurationCommon :
|
||||
mac->scc_SIB->tdd_UL_DL_ConfigurationCommon,
|
||||
ul_info.slot_tx, mac->frame_type)) {
|
||||
LOG_D(NR_MAC, "Slot %d. calling nr_ue_ul_ind()\n", ul_info.slot_tx);
|
||||
nr_ue_ul_scheduler(&ul_info);
|
||||
@@ -366,11 +380,12 @@ static void UE_synch(void *arg) {
|
||||
int i, hw_slot_offset;
|
||||
PHY_VARS_NR_UE *UE = syncD->UE;
|
||||
sync_mode_t sync_mode = pbch;
|
||||
if (UE->sl_mode == 2 && !get_nrUE_params()->sync_ref) sync_mode = psbch;
|
||||
//int CC_id = UE->CC_id;
|
||||
static int freq_offset=0;
|
||||
UE->is_synchronized = 0;
|
||||
|
||||
if (UE->UE_scan == 0) {
|
||||
if (UE->UE_scan == 0 && !UE->sl_mode) {
|
||||
|
||||
for (i=0; i<openair0_cfg[UE->rf_map.card].rx_num_channels; i++) {
|
||||
|
||||
@@ -483,6 +498,52 @@ static void UE_synch(void *arg) {
|
||||
}
|
||||
break;
|
||||
|
||||
case psbch:
|
||||
LOG_I(PHY, "[UE thread Synch] Running Sidelink Initial Synch \n");
|
||||
NR_DL_FRAME_PARMS *fp = &UE->SL_UE_PHY_PARAMS.sl_frame_params;
|
||||
dl_carrier = fp->sl_CarrierFreq;
|
||||
ul_carrier = fp->sl_CarrierFreq;
|
||||
|
||||
if (sl_nr_slss_search(UE, &syncD->proc, 16) == 0) {
|
||||
freq_offset = UE->common_vars.freq_offset; // frequency offset computed with pss in initial sync
|
||||
hw_slot_offset = ((UE->rx_offset<<1) / fp->samples_per_subframe * fp->slots_per_subframe) +
|
||||
round((float)((UE->rx_offset<<1) % fp->samples_per_subframe)/fp->samples_per_slot0);
|
||||
|
||||
// rerun with new cell parameters and frequency-offset
|
||||
// todo: the freq_offset computed on DL shall be scaled before being applied to UL
|
||||
nr_rf_card_config_freq(&openair0_cfg[UE->rf_map.card], ul_carrier, dl_carrier, freq_offset);
|
||||
|
||||
LOG_I(PHY,"Got synch: hw_slot_offset %d, carrier off %d Hz, rxgain %f (DL %f Hz, UL %f Hz)\n",
|
||||
hw_slot_offset,
|
||||
freq_offset,
|
||||
openair0_cfg[UE->rf_map.card].rx_gain[0],
|
||||
openair0_cfg[UE->rf_map.card].rx_freq[0],
|
||||
openair0_cfg[UE->rf_map.card].tx_freq[0]);
|
||||
|
||||
UE->rfdevice.trx_set_freq_func(&UE->rfdevice,&openair0_cfg[0]);
|
||||
if (UE->UE_scan_carrier == 1) {
|
||||
UE->UE_scan_carrier = 0;
|
||||
} else {
|
||||
UE->is_synchronized = 1;
|
||||
}
|
||||
} else {
|
||||
|
||||
if (UE->UE_scan_carrier == 1) {
|
||||
|
||||
if (freq_offset >= 0)
|
||||
freq_offset += 100;
|
||||
|
||||
freq_offset *= -1;
|
||||
|
||||
nr_rf_card_config_freq(&openair0_cfg[UE->rf_map.card], ul_carrier, dl_carrier, freq_offset);
|
||||
|
||||
LOG_I(PHY, "Sidelink Initial sync failed: trying carrier off %d Hz\n", freq_offset);
|
||||
|
||||
UE->rfdevice.trx_set_freq_func(&UE->rfdevice,&openair0_cfg[0]);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case si:
|
||||
default:
|
||||
break;
|
||||
@@ -490,14 +551,18 @@ static void UE_synch(void *arg) {
|
||||
}
|
||||
}
|
||||
|
||||
static void RU_write(nr_rxtx_thread_data_t *rxtxD) {
|
||||
static void RU_write(nr_rxtx_thread_data_t *rxtxD, int sl_tx_action) {
|
||||
|
||||
PHY_VARS_NR_UE *UE = rxtxD->UE;
|
||||
UE_nr_rxtx_proc_t *proc = &rxtxD->proc;
|
||||
|
||||
NR_DL_FRAME_PARMS *fp = &UE->frame_parms;
|
||||
if (UE->sl_mode == 2)
|
||||
fp = &UE->SL_UE_PHY_PARAMS.sl_frame_params;
|
||||
|
||||
void *txp[NB_ANTENNAS_TX];
|
||||
for (int i=0; i<UE->frame_parms.nb_antennas_tx; i++)
|
||||
txp[i] = (void *)&UE->common_vars.txData[i][UE->frame_parms.get_samples_slot_timestamp(proc->nr_slot_tx, &UE->frame_parms, 0)];
|
||||
for (int i=0; i<fp->nb_antennas_tx; i++)
|
||||
txp[i] = (void *)&UE->common_vars.txData[i][fp->get_samples_slot_timestamp(proc->nr_slot_tx, fp, 0)];
|
||||
|
||||
radio_tx_burst_flag_t flags = TX_BURST_INVALID;
|
||||
|
||||
@@ -506,19 +571,34 @@ static void RU_write(nr_rxtx_thread_data_t *rxtxD) {
|
||||
openair0_cfg[0].duplex_mode == duplex_mode_TDD &&
|
||||
!get_softmodem_params()->continuous_tx) {
|
||||
|
||||
uint8_t tdd_period = mac->phy_config.config_req.tdd_table.tdd_period_in_slots;
|
||||
int nrofUplinkSlots = mac->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSlots;
|
||||
int nrofUplinkSymbols = mac->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSymbols;
|
||||
int slot_tx_usrp = proc->nr_slot_tx;
|
||||
uint8_t num_UL_slots = nrofUplinkSlots + (nrofUplinkSymbols != 0);
|
||||
uint8_t first_tx_slot = tdd_period - num_UL_slots;
|
||||
//Perform USRP write only in case SL Txn needs to be done.
|
||||
if (UE->sl_mode == 2) {
|
||||
flags = sl_tx_action ? TX_BURST_START_AND_END
|
||||
: TX_BURST_INVALID;
|
||||
} else {
|
||||
|
||||
if (slot_tx_usrp % tdd_period == first_tx_slot)
|
||||
flags = TX_BURST_START;
|
||||
else if (slot_tx_usrp % tdd_period == first_tx_slot + num_UL_slots - 1)
|
||||
flags = TX_BURST_END;
|
||||
else if (slot_tx_usrp % tdd_period > first_tx_slot)
|
||||
flags = TX_BURST_MIDDLE;
|
||||
uint8_t tdd_period = mac->phy_config.config_req.tdd_table.tdd_period_in_slots;
|
||||
int nrofUplinkSlots, nrofUplinkSymbols;
|
||||
if (mac->scc) {
|
||||
nrofUplinkSlots = mac->scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSlots;
|
||||
nrofUplinkSymbols = mac->scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSymbols;
|
||||
}
|
||||
else {
|
||||
nrofUplinkSlots = mac->scc_SIB->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSlots;
|
||||
nrofUplinkSymbols = mac->scc_SIB->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSymbols;
|
||||
}
|
||||
|
||||
int slot_tx_usrp = proc->nr_slot_tx;
|
||||
uint8_t num_UL_slots = nrofUplinkSlots + (nrofUplinkSymbols != 0);
|
||||
uint8_t first_tx_slot = tdd_period - num_UL_slots;
|
||||
|
||||
if (slot_tx_usrp % tdd_period == first_tx_slot)
|
||||
flags = TX_BURST_START;
|
||||
else if (slot_tx_usrp % tdd_period == first_tx_slot + num_UL_slots - 1)
|
||||
flags = TX_BURST_END;
|
||||
else if (slot_tx_usrp % tdd_period > first_tx_slot)
|
||||
flags = TX_BURST_MIDDLE;
|
||||
}
|
||||
} else {
|
||||
flags = TX_BURST_MIDDLE;
|
||||
}
|
||||
@@ -529,10 +609,10 @@ static void RU_write(nr_rxtx_thread_data_t *rxtxD) {
|
||||
proc->timestamp_tx,
|
||||
txp,
|
||||
rxtxD->writeBlockSize,
|
||||
UE->frame_parms.nb_antennas_tx,
|
||||
fp->nb_antennas_tx,
|
||||
flags),"");
|
||||
|
||||
for (int i=0; i<UE->frame_parms.nb_antennas_tx; i++)
|
||||
for (int i=0; i<fp->nb_antennas_tx; i++)
|
||||
memset(txp[i], 0, rxtxD->writeBlockSize);
|
||||
|
||||
}
|
||||
@@ -543,45 +623,77 @@ void processSlotTX(void *arg) {
|
||||
UE_nr_rxtx_proc_t *proc = &rxtxD->proc;
|
||||
PHY_VARS_NR_UE *UE = rxtxD->UE;
|
||||
nr_phy_data_tx_t phy_data = {0};
|
||||
int sl_tx_action = 0;
|
||||
|
||||
LOG_D(PHY,"%d.%d => slot type %d\n", proc->frame_tx, proc->nr_slot_tx, proc->tx_slot_type);
|
||||
if (proc->tx_slot_type == NR_UPLINK_SLOT || proc->tx_slot_type == NR_MIXED_SLOT){
|
||||
|
||||
// wait for rx slots to send indication (if any) that DLSCH decoding is finished
|
||||
for(int i=0; i < rxtxD->tx_wait_for_dlsch; i++) {
|
||||
notifiedFIFO_elt_t *res = pullNotifiedFIFO(UE->tx_resume_ind_fifo[proc->nr_slot_tx]);
|
||||
delNotifiedFIFO_elt(res);
|
||||
}
|
||||
if (proc->tx_slot_type == NR_SIDELINK_SLOT && UE->sl_mode == 2) {
|
||||
|
||||
// trigger L2 to run ue_scheduler thru IF module
|
||||
// [TODO] mapping right after NR initial sync
|
||||
if(UE->if_inst != NULL && UE->if_inst->ul_indication != NULL) {
|
||||
// trigger L2 to run ue_scheduler thru IF module
|
||||
if(UE->if_inst != NULL && UE->if_inst->sl_indication != NULL) {
|
||||
start_meas(&UE->ue_ul_indication_stats);
|
||||
nr_uplink_indication_t ul_indication;
|
||||
memset((void*)&ul_indication, 0, sizeof(ul_indication));
|
||||
nr_sidelink_indication_t sl_indication;
|
||||
memset((void*)&sl_indication, 0, sizeof(sl_indication));
|
||||
|
||||
ul_indication.module_id = UE->Mod_id;
|
||||
ul_indication.gNB_index = proc->gNB_id;
|
||||
ul_indication.cc_id = UE->CC_id;
|
||||
ul_indication.frame_rx = proc->frame_rx;
|
||||
ul_indication.slot_rx = proc->nr_slot_rx;
|
||||
ul_indication.frame_tx = proc->frame_tx;
|
||||
ul_indication.slot_tx = proc->nr_slot_tx;
|
||||
ul_indication.phy_data = &phy_data;
|
||||
sl_indication.module_id = UE->Mod_id;
|
||||
sl_indication.gNB_index = proc->gNB_id;
|
||||
sl_indication.cc_id = UE->CC_id;
|
||||
sl_indication.frame_rx = proc->frame_rx;
|
||||
sl_indication.slot_rx = proc->nr_slot_rx;
|
||||
sl_indication.frame_tx = proc->frame_tx;
|
||||
sl_indication.slot_tx = proc->nr_slot_tx;
|
||||
sl_indication.phy_data = &phy_data;
|
||||
sl_indication.slot_type = SIDELINK_SLOT_TYPE_TX;
|
||||
|
||||
LOG_D(NR_PHY,"Sending SL indication RX %d.%d TX %d.%d\n",proc->frame_rx,proc->nr_slot_rx,proc->frame_tx,proc->nr_slot_tx);
|
||||
UE->if_inst->sl_indication(&sl_indication);
|
||||
|
||||
UE->if_inst->ul_indication(&ul_indication);
|
||||
stop_meas(&UE->ue_ul_indication_stats);
|
||||
}
|
||||
|
||||
phy_procedures_nrUE_TX(UE, proc, &phy_data);
|
||||
sl_tx_action = phy_procedures_nrUE_SL_TX(UE, proc, &phy_data);
|
||||
|
||||
} else {
|
||||
if (proc->tx_slot_type == NR_UPLINK_SLOT || proc->tx_slot_type == NR_MIXED_SLOT){
|
||||
|
||||
// wait for rx slots to send indication (if any) that DLSCH decoding is finished
|
||||
for(int i=0; i < rxtxD->tx_wait_for_dlsch; i++) {
|
||||
notifiedFIFO_elt_t *res = pullNotifiedFIFO(UE->tx_resume_ind_fifo[proc->nr_slot_tx]);
|
||||
delNotifiedFIFO_elt(res);
|
||||
}
|
||||
|
||||
// trigger L2 to run ue_scheduler thru IF module
|
||||
// [TODO] mapping right after NR initial sync
|
||||
if(UE->if_inst != NULL && UE->if_inst->ul_indication != NULL) {
|
||||
start_meas(&UE->ue_ul_indication_stats);
|
||||
nr_uplink_indication_t ul_indication;
|
||||
memset((void*)&ul_indication, 0, sizeof(ul_indication));
|
||||
|
||||
ul_indication.module_id = UE->Mod_id;
|
||||
ul_indication.gNB_index = proc->gNB_id;
|
||||
ul_indication.cc_id = UE->CC_id;
|
||||
ul_indication.frame_rx = proc->frame_rx;
|
||||
ul_indication.slot_rx = proc->nr_slot_rx;
|
||||
ul_indication.frame_tx = proc->frame_tx;
|
||||
ul_indication.slot_tx = proc->nr_slot_tx;
|
||||
ul_indication.phy_data = &phy_data;
|
||||
|
||||
UE->if_inst->ul_indication(&ul_indication);
|
||||
stop_meas(&UE->ue_ul_indication_stats);
|
||||
}
|
||||
|
||||
phy_procedures_nrUE_TX(UE, proc, &phy_data);
|
||||
}
|
||||
}
|
||||
|
||||
RU_write(rxtxD);
|
||||
RU_write(rxtxD, sl_tx_action);
|
||||
}
|
||||
|
||||
nr_phy_data_t UE_dl_preprocessing(PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc)
|
||||
{
|
||||
nr_phy_data_t phy_data = {0};
|
||||
NR_DL_FRAME_PARMS *fp = &UE->frame_parms;
|
||||
if (UE->sl_mode == 2)
|
||||
fp = &UE->SL_UE_PHY_PARAMS.sl_frame_params;
|
||||
|
||||
if (IS_SOFTMODEM_NOS1 || get_softmodem_params()->sa) {
|
||||
|
||||
@@ -596,34 +708,48 @@ nr_phy_data_t UE_dl_preprocessing(PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc)
|
||||
}
|
||||
|
||||
/* send tick to RLC and PDCP every ms */
|
||||
if (proc->nr_slot_rx % UE->frame_parms.slots_per_subframe == 0) {
|
||||
if (proc->nr_slot_rx % fp->slots_per_subframe == 0) {
|
||||
void nr_rlc_tick(int frame, int subframe);
|
||||
void nr_pdcp_tick(int frame, int subframe);
|
||||
nr_rlc_tick(proc->frame_rx, proc->nr_slot_rx / UE->frame_parms.slots_per_subframe);
|
||||
nr_pdcp_tick(proc->frame_rx, proc->nr_slot_rx / UE->frame_parms.slots_per_subframe);
|
||||
nr_rlc_tick(proc->frame_rx, proc->nr_slot_rx / fp->slots_per_subframe);
|
||||
nr_pdcp_tick(proc->frame_rx, proc->nr_slot_rx / fp->slots_per_subframe);
|
||||
}
|
||||
}
|
||||
|
||||
if (proc->rx_slot_type == NR_DOWNLINK_SLOT || proc->rx_slot_type == NR_MIXED_SLOT) {
|
||||
if (UE->sl_mode == 2) {
|
||||
if (proc->rx_slot_type == NR_SIDELINK_SLOT) {
|
||||
|
||||
if(UE->if_inst != NULL && UE->if_inst->dl_indication != NULL) {
|
||||
nr_downlink_indication_t dl_indication;
|
||||
nr_fill_dl_indication(&dl_indication, NULL, NULL, proc, UE, &phy_data);
|
||||
UE->if_inst->dl_indication(&dl_indication);
|
||||
if(UE->if_inst != NULL && UE->if_inst->sl_indication != NULL) {
|
||||
nr_sidelink_indication_t sl_indication;
|
||||
nr_fill_sl_indication(&sl_indication, NULL, NULL, proc, UE, &phy_data);
|
||||
UE->if_inst->sl_indication(&sl_indication);
|
||||
}
|
||||
uint64_t a=rdtsc_oai();
|
||||
psbch_pscch_pssch_processing(UE, proc, &phy_data);
|
||||
LOG_D(PHY, "In %s: slot %d:%d, time %llu\n", __FUNCTION__, proc->frame_rx, proc->nr_slot_rx, (rdtsc_oai()-a)/3500);
|
||||
}
|
||||
} else {
|
||||
if (proc->rx_slot_type == NR_DOWNLINK_SLOT || proc->rx_slot_type == NR_MIXED_SLOT){
|
||||
|
||||
if(UE->if_inst != NULL && UE->if_inst->dl_indication != NULL) {
|
||||
nr_downlink_indication_t dl_indication;
|
||||
nr_fill_dl_indication(&dl_indication, NULL, NULL, proc, UE, &phy_data);
|
||||
UE->if_inst->dl_indication(&dl_indication);
|
||||
}
|
||||
|
||||
uint64_t a=rdtsc_oai();
|
||||
pbch_pdcch_processing(UE, proc, &phy_data);
|
||||
if (phy_data.dlsch[0].active) {
|
||||
// indicate to tx thread to wait for DLSCH decoding
|
||||
const int ack_nack_slot = (proc->nr_slot_rx + phy_data.dlsch[0].dlsch_config.k1_feedback) % UE->frame_parms.slots_per_frame;
|
||||
UE->tx_wait_for_dlsch[ack_nack_slot]++;
|
||||
}
|
||||
|
||||
LOG_D(PHY, "In %s: slot %d, time %llu\n", __FUNCTION__, proc->nr_slot_rx, (rdtsc_oai()-a)/3500);
|
||||
}
|
||||
|
||||
uint64_t a=rdtsc_oai();
|
||||
pbch_pdcch_processing(UE, proc, &phy_data);
|
||||
if (phy_data.dlsch[0].active) {
|
||||
// indicate to tx thread to wait for DLSCH decoding
|
||||
const int ack_nack_slot = (proc->nr_slot_rx + phy_data.dlsch[0].dlsch_config.k1_feedback) % UE->frame_parms.slots_per_frame;
|
||||
UE->tx_wait_for_dlsch[ack_nack_slot]++;
|
||||
}
|
||||
|
||||
LOG_D(PHY, "In %s: slot %d, time %llu\n", __FUNCTION__, proc->nr_slot_rx, (rdtsc_oai()-a)/3500);
|
||||
ue_ta_procedures(UE, proc->nr_slot_tx, proc->frame_tx);
|
||||
}
|
||||
|
||||
ue_ta_procedures(UE, proc->nr_slot_tx, proc->frame_tx);
|
||||
return phy_data;
|
||||
}
|
||||
|
||||
@@ -633,14 +759,20 @@ void UE_dl_processing(void *arg) {
|
||||
PHY_VARS_NR_UE *UE = rxtxD->UE;
|
||||
nr_phy_data_t *phy_data = &rxtxD->phy_data;
|
||||
|
||||
pdsch_processing(UE, proc, phy_data);
|
||||
if (UE->sl_mode == 0)
|
||||
pdsch_processing(UE, proc, phy_data);
|
||||
}
|
||||
|
||||
void dummyWrite(PHY_VARS_NR_UE *UE,openair0_timestamp timestamp, int writeBlockSize) {
|
||||
void *dummy_tx[UE->frame_parms.nb_antennas_tx];
|
||||
int16_t dummy_tx_data[UE->frame_parms.nb_antennas_tx][2*writeBlockSize]; // 2 because the function we call use pairs of int16_t implicitly as complex numbers
|
||||
|
||||
NR_DL_FRAME_PARMS *fp = &UE->frame_parms;
|
||||
if (UE->sl_mode == 2)
|
||||
fp = &UE->SL_UE_PHY_PARAMS.sl_frame_params;
|
||||
|
||||
void *dummy_tx[fp->nb_antennas_tx];
|
||||
int16_t dummy_tx_data[fp->nb_antennas_tx][2*writeBlockSize]; // 2 because the function we call use pairs of int16_t implicitly as complex numbers
|
||||
memset(dummy_tx_data, 0, sizeof(dummy_tx_data));
|
||||
for (int i=0; i<UE->frame_parms.nb_antennas_tx; i++)
|
||||
for (int i=0; i<fp->nb_antennas_tx; i++)
|
||||
dummy_tx[i]=dummy_tx_data[i];
|
||||
|
||||
AssertFatal( writeBlockSize ==
|
||||
@@ -648,37 +780,45 @@ void dummyWrite(PHY_VARS_NR_UE *UE,openair0_timestamp timestamp, int writeBlockS
|
||||
timestamp,
|
||||
dummy_tx,
|
||||
writeBlockSize,
|
||||
UE->frame_parms.nb_antennas_tx,
|
||||
fp->nb_antennas_tx,
|
||||
4),"");
|
||||
|
||||
}
|
||||
|
||||
void readFrame(PHY_VARS_NR_UE *UE, openair0_timestamp *timestamp, bool toTrash) {
|
||||
|
||||
NR_DL_FRAME_PARMS *fp = &UE->frame_parms;
|
||||
int num_frames = 2;
|
||||
//In Sidelink worst case SL-SSB can be sent once in 16 frames
|
||||
if (UE->sl_mode == 2) {
|
||||
fp = &UE->SL_UE_PHY_PARAMS.sl_frame_params;
|
||||
num_frames = SL_NR_PSBCH_REPETITION_IN_FRAMES;
|
||||
}
|
||||
|
||||
void *rxp[NB_ANTENNAS_RX];
|
||||
|
||||
for(int x=0; x<20; x++) { // two frames for initial sync
|
||||
for (int slot=0; slot<UE->frame_parms.slots_per_subframe; slot ++ ) {
|
||||
for (int i=0; i<UE->frame_parms.nb_antennas_rx; i++) {
|
||||
for(int x=0; x< num_frames*NR_NUMBER_OF_SUBFRAMES_PER_FRAME; x++) { // two frames for initial sync
|
||||
for (int slot=0; slot<fp->slots_per_subframe; slot ++ ) {
|
||||
for (int i=0; i<fp->nb_antennas_rx; i++) {
|
||||
if (toTrash)
|
||||
rxp[i]=malloc16(UE->frame_parms.get_samples_per_slot(slot,&UE->frame_parms)*4);
|
||||
rxp[i]=malloc16(fp->get_samples_per_slot(slot,fp)*4);
|
||||
else
|
||||
rxp[i] = ((void *)&UE->common_vars.rxdata[i][0]) +
|
||||
4*((x*UE->frame_parms.samples_per_subframe)+
|
||||
UE->frame_parms.get_samples_slot_timestamp(slot,&UE->frame_parms,0));
|
||||
4*((x*fp->samples_per_subframe)+
|
||||
fp->get_samples_slot_timestamp(slot,fp,0));
|
||||
}
|
||||
|
||||
AssertFatal( UE->frame_parms.get_samples_per_slot(slot,&UE->frame_parms) ==
|
||||
|
||||
AssertFatal( fp->get_samples_per_slot(slot,fp) ==
|
||||
UE->rfdevice.trx_read_func(&UE->rfdevice,
|
||||
timestamp,
|
||||
rxp,
|
||||
UE->frame_parms.get_samples_per_slot(slot,&UE->frame_parms),
|
||||
UE->frame_parms.nb_antennas_rx), "");
|
||||
fp->get_samples_per_slot(slot,fp),
|
||||
fp->nb_antennas_rx), "");
|
||||
|
||||
if (IS_SOFTMODEM_RFSIM)
|
||||
dummyWrite(UE,*timestamp, UE->frame_parms.get_samples_per_slot(slot,&UE->frame_parms));
|
||||
dummyWrite(UE,*timestamp, fp->get_samples_per_slot(slot,fp));
|
||||
if (toTrash)
|
||||
for (int i=0; i<UE->frame_parms.nb_antennas_rx; i++)
|
||||
for (int i=0; i<fp->nb_antennas_rx; i++)
|
||||
free(rxp[i]);
|
||||
}
|
||||
}
|
||||
@@ -689,21 +829,25 @@ void syncInFrame(PHY_VARS_NR_UE *UE, openair0_timestamp *timestamp) {
|
||||
|
||||
LOG_I(PHY,"Resynchronizing RX by %d samples\n",UE->rx_offset);
|
||||
|
||||
NR_DL_FRAME_PARMS *fp = &UE->frame_parms;
|
||||
if (UE->sl_mode == 2)
|
||||
fp = &UE->SL_UE_PHY_PARAMS.sl_frame_params;
|
||||
|
||||
if (IS_SOFTMODEM_IQPLAYER || IS_SOFTMODEM_IQRECORDER) {
|
||||
// Resynchonize by slot (will work with numerology 1 only)
|
||||
for ( int size=UE->rx_offset ; size > 0 ; size -= UE->frame_parms.samples_per_subframe/2 ) {
|
||||
int unitTransfer=size>UE->frame_parms.samples_per_subframe/2 ? UE->frame_parms.samples_per_subframe/2 : size ;
|
||||
for ( int size=UE->rx_offset ; size > 0 ; size -= fp->samples_per_subframe/2 ) {
|
||||
int unitTransfer=size>fp->samples_per_subframe/2 ? fp->samples_per_subframe/2 : size ;
|
||||
AssertFatal(unitTransfer ==
|
||||
UE->rfdevice.trx_read_func(&UE->rfdevice,
|
||||
timestamp,
|
||||
(void **)UE->common_vars.rxdata,
|
||||
unitTransfer,
|
||||
UE->frame_parms.nb_antennas_rx),"");
|
||||
fp->nb_antennas_rx),"");
|
||||
}
|
||||
} else {
|
||||
*timestamp += UE->frame_parms.get_samples_per_slot(1,&UE->frame_parms);
|
||||
for ( int size=UE->rx_offset ; size > 0 ; size -= UE->frame_parms.samples_per_subframe ) {
|
||||
int unitTransfer=size>UE->frame_parms.samples_per_subframe ? UE->frame_parms.samples_per_subframe : size ;
|
||||
*timestamp += fp->get_samples_per_slot(1,fp);
|
||||
for ( int size=UE->rx_offset ; size > 0 ; size -= fp->samples_per_subframe ) {
|
||||
int unitTransfer=size>fp->samples_per_subframe ? fp->samples_per_subframe : size ;
|
||||
// we write before read because gNB waits for UE to write and both executions halt
|
||||
// this happens here as the read size is samples_per_subframe which is very much larger than samp_per_slot
|
||||
if (IS_SOFTMODEM_RFSIM) dummyWrite(UE,*timestamp, unitTransfer);
|
||||
@@ -712,7 +856,7 @@ void syncInFrame(PHY_VARS_NR_UE *UE, openair0_timestamp *timestamp) {
|
||||
timestamp,
|
||||
(void **)UE->common_vars.rxdata,
|
||||
unitTransfer,
|
||||
UE->frame_parms.nb_antennas_rx),"");
|
||||
fp->nb_antennas_rx),"");
|
||||
*timestamp += unitTransfer; // this does not affect the read but needed for RFSIM write
|
||||
}
|
||||
}
|
||||
@@ -743,6 +887,12 @@ void *UE_thread(void *arg)
|
||||
void *rxp[NB_ANTENNAS_RX];
|
||||
int start_rx_stream = 0;
|
||||
fapi_nr_config_request_t *cfg = &UE->nrUE_config;
|
||||
NR_DL_FRAME_PARMS *fp = &UE->frame_parms;
|
||||
int is_sidelink = (UE->sl_mode == 2) ? 1 : 0;
|
||||
if (is_sidelink) {
|
||||
fp = &UE->SL_UE_PHY_PARAMS.sl_frame_params;
|
||||
openair0_cfg[0].gpio_controller = RU_GPIO_CONTROL_GENERIC;
|
||||
}
|
||||
AssertFatal(0== openair0_device_load(&(UE->rfdevice), &openair0_cfg[0]), "");
|
||||
UE->rfdevice.host_type = RAU_HOST;
|
||||
UE->is_synchronized = 0;
|
||||
@@ -761,7 +911,7 @@ void *UE_thread(void *arg)
|
||||
NR_UE_MAC_INST_t *mac = get_mac_inst(0);
|
||||
|
||||
bool syncRunning=false;
|
||||
const int nb_slot_frame = UE->frame_parms.slots_per_frame;
|
||||
const int nb_slot_frame = fp->slots_per_frame;
|
||||
int absolute_slot=0, decoded_frame_rx=INT_MAX, trashed_frames=0;
|
||||
initNotifiedFIFO(&UE->phy_config_ind);
|
||||
|
||||
@@ -772,6 +922,12 @@ void *UE_thread(void *arg)
|
||||
initNotifiedFIFO(UE->tx_resume_ind_fifo[i]);
|
||||
}
|
||||
|
||||
if (get_nrUE_params()->sync_ref &&
|
||||
UE->sl_mode == 2) {
|
||||
UE->is_synchronized = 1;
|
||||
start_rx_stream = -1;
|
||||
}
|
||||
|
||||
while (!oai_exit) {
|
||||
|
||||
if (syncRunning) {
|
||||
@@ -780,7 +936,8 @@ void *UE_thread(void *arg)
|
||||
if (res) {
|
||||
syncRunning=false;
|
||||
if (UE->is_synchronized) {
|
||||
decoded_frame_rx = mac->mib_frame;
|
||||
if (UE->sl_mode == 2) decoded_frame_rx = UE->SL_UE_PHY_PARAMS.sync_params.DFN;
|
||||
else decoded_frame_rx = mac->mib_frame;
|
||||
LOG_I(PHY,"UE synchronized decoded_frame_rx=%d UE->init_sync_frame=%d trashed_frames=%d\n",
|
||||
decoded_frame_rx,
|
||||
UE->init_sync_frame,
|
||||
@@ -799,7 +956,7 @@ void *UE_thread(void *arg)
|
||||
}
|
||||
} else {
|
||||
readFrame(UE, ×tamp, true);
|
||||
trashed_frames+=2;
|
||||
trashed_frames+=((UE->sl_mode)?SL_NR_PSBCH_REPETITION_IN_FRAMES:2);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
@@ -825,21 +982,25 @@ void *UE_thread(void *arg)
|
||||
UE->rx_offset=0;
|
||||
UE->time_sync_cell=0;
|
||||
// read in first symbol
|
||||
AssertFatal (UE->frame_parms.ofdm_symbol_size+UE->frame_parms.nb_prefix_samples0 ==
|
||||
AssertFatal (fp->ofdm_symbol_size+fp->nb_prefix_samples0 ==
|
||||
UE->rfdevice.trx_read_func(&UE->rfdevice,
|
||||
×tamp,
|
||||
(void **)UE->common_vars.rxdata,
|
||||
UE->frame_parms.ofdm_symbol_size+UE->frame_parms.nb_prefix_samples0,
|
||||
UE->frame_parms.nb_antennas_rx),"");
|
||||
fp->ofdm_symbol_size+fp->nb_prefix_samples0,
|
||||
fp->nb_antennas_rx),"");
|
||||
|
||||
// we have the decoded frame index in the return of the synch process
|
||||
// and we shifted above to the first slot of next frame
|
||||
decoded_frame_rx++;
|
||||
// we do ++ first in the regular processing, so it will be begin of frame;
|
||||
absolute_slot = decoded_frame_rx * nb_slot_frame - 1;
|
||||
if (UE->sl_mode == 2) {
|
||||
//Set to the slot where the SL-SSB was decoded
|
||||
absolute_slot += UE->SL_UE_PHY_PARAMS.sync_params.slot_offset;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
absolute_slot++;
|
||||
|
||||
int slot_nr = absolute_slot % nb_slot_frame;
|
||||
@@ -850,24 +1011,58 @@ void *UE_thread(void *arg)
|
||||
curMsg.proc.nr_slot_tx = (absolute_slot + DURATION_RX_TO_TX) % nb_slot_frame;
|
||||
curMsg.proc.frame_rx = (absolute_slot / nb_slot_frame) % MAX_FRAME_NUMBER;
|
||||
curMsg.proc.frame_tx = ((absolute_slot + DURATION_RX_TO_TX) / nb_slot_frame) % MAX_FRAME_NUMBER;
|
||||
if (mac->phy_config_request_sent) {
|
||||
curMsg.proc.rx_slot_type = nr_ue_slot_select(cfg, curMsg.proc.frame_rx, curMsg.proc.nr_slot_rx);
|
||||
curMsg.proc.tx_slot_type = nr_ue_slot_select(cfg, curMsg.proc.frame_tx, curMsg.proc.nr_slot_tx);
|
||||
if (UE->phy_config_request_sent) {
|
||||
if (is_sidelink) {
|
||||
NR_UE_MAC_INST_t *mac = get_mac_inst(UE->Mod_id);
|
||||
uint8_t pool_id = 0;
|
||||
// Temporarily setting this to this initial NON_NR_SIDELINK_SLOT slot type.
|
||||
// Later we should properly determine if the current slot is an NR_DOWNLINK_SLOT, NR_UPLINK_SLOT, or NR_MIXED_SLOT
|
||||
curMsg.proc.tx_slot_type = NON_NR_SIDELINK_SLOT;
|
||||
curMsg.proc.rx_slot_type = NON_NR_SIDELINK_SLOT;
|
||||
|
||||
SL_ResourcePool_params_t *sl_tx_rsrc_pool = mac->SL_MAC_PARAMS->sl_TxPool[pool_id];
|
||||
uint16_t phy_map_sz_tx = ((sl_tx_rsrc_pool->phy_sl_bitmap.size << 3) - sl_tx_rsrc_pool->phy_sl_bitmap.bits_unused);
|
||||
bool sl_tx_slot = is_sl_slot(mac, &sl_tx_rsrc_pool->phy_sl_bitmap, phy_map_sz_tx, absolute_slot + DURATION_RX_TO_TX);
|
||||
if (sl_tx_slot) {
|
||||
frameslot_t frame_slot_tx;
|
||||
frame_slot_tx.frame = curMsg.proc.frame_tx;
|
||||
frame_slot_tx.slot = curMsg.proc.nr_slot_tx;
|
||||
validate_selected_sl_slot(true , false, mac->SL_MAC_PARAMS->sl_TDD_config, frame_slot_tx);
|
||||
curMsg.proc.tx_slot_type = NR_SIDELINK_SLOT;
|
||||
}
|
||||
|
||||
SL_ResourcePool_params_t *sl_rx_rsrc_pool = mac->SL_MAC_PARAMS->sl_RxPool[pool_id];
|
||||
uint16_t phy_map_sz_rx = ((sl_rx_rsrc_pool->phy_sl_bitmap.size << 3) - sl_rx_rsrc_pool->phy_sl_bitmap.bits_unused);
|
||||
bool sl_rx_slot = is_sl_slot(mac, &sl_rx_rsrc_pool->phy_sl_bitmap, phy_map_sz_rx, absolute_slot);
|
||||
if (sl_rx_slot) {
|
||||
frameslot_t frame_slot_rx;
|
||||
frame_slot_rx.frame = curMsg.proc.frame_rx;
|
||||
frame_slot_rx.slot = curMsg.proc.nr_slot_rx;
|
||||
validate_selected_sl_slot(false , true, mac->SL_MAC_PARAMS->sl_TDD_config, frame_slot_rx);
|
||||
curMsg.proc.rx_slot_type = NR_SIDELINK_SLOT;
|
||||
}
|
||||
|
||||
LOG_D(NR_PHY,"Setting SL slot type to TX %d.%d %d, RX %d.%d %d\n",
|
||||
curMsg.proc.frame_tx, curMsg.proc.nr_slot_tx, curMsg.proc.tx_slot_type, curMsg.proc.frame_rx, curMsg.proc.nr_slot_rx, curMsg.proc.rx_slot_type);
|
||||
} else {
|
||||
curMsg.proc.rx_slot_type = nr_ue_slot_select(cfg, curMsg.proc.frame_rx, curMsg.proc.nr_slot_rx);
|
||||
curMsg.proc.tx_slot_type = nr_ue_slot_select(cfg, curMsg.proc.frame_tx, curMsg.proc.nr_slot_tx);
|
||||
}
|
||||
}
|
||||
else {
|
||||
curMsg.proc.rx_slot_type = NR_DOWNLINK_SLOT;
|
||||
curMsg.proc.tx_slot_type = NR_DOWNLINK_SLOT;
|
||||
}
|
||||
|
||||
int firstSymSamp = get_firstSymSamp(slot_nr, &UE->frame_parms);
|
||||
for (int i=0; i<UE->frame_parms.nb_antennas_rx; i++)
|
||||
int firstSymSamp = get_firstSymSamp(slot_nr, fp);
|
||||
for (int i=0; i<fp->nb_antennas_rx; i++)
|
||||
rxp[i] = (void *)&UE->common_vars.rxdata[i][firstSymSamp+
|
||||
UE->frame_parms.get_samples_slot_timestamp(slot_nr,&UE->frame_parms,0)];
|
||||
fp->get_samples_slot_timestamp(slot_nr,fp,0)];
|
||||
|
||||
int readBlockSize, writeBlockSize;
|
||||
|
||||
readBlockSize = get_readBlockSize(slot_nr, &UE->frame_parms);
|
||||
writeBlockSize = UE->frame_parms.get_samples_per_slot((slot_nr + DURATION_RX_TO_TX) % nb_slot_frame, &UE->frame_parms);
|
||||
readBlockSize = get_readBlockSize(slot_nr, fp);
|
||||
writeBlockSize = fp->get_samples_per_slot((slot_nr + DURATION_RX_TO_TX) % nb_slot_frame, fp);
|
||||
if (UE->apply_timing_offset && (slot_nr == nb_slot_frame - 1)) {
|
||||
const int sampShift = -(UE->rx_offset>>1);
|
||||
readBlockSize -= sampShift;
|
||||
@@ -880,11 +1075,11 @@ void *UE_thread(void *arg)
|
||||
×tamp,
|
||||
rxp,
|
||||
readBlockSize,
|
||||
UE->frame_parms.nb_antennas_rx),"");
|
||||
fp->nb_antennas_rx),"");
|
||||
|
||||
if(slot_nr == (nb_slot_frame - 1)) {
|
||||
// read in first symbol of next frame and adjust for timing drift
|
||||
int first_symbols = UE->frame_parms.ofdm_symbol_size + UE->frame_parms.nb_prefix_samples0; // first symbol of every frames
|
||||
int first_symbols = fp->ofdm_symbol_size + fp->nb_prefix_samples0; // first symbol of every frames
|
||||
|
||||
if (first_symbols > 0) {
|
||||
openair0_timestamp ignore_timestamp;
|
||||
@@ -893,14 +1088,14 @@ void *UE_thread(void *arg)
|
||||
&ignore_timestamp,
|
||||
(void **)UE->common_vars.rxdata,
|
||||
first_symbols,
|
||||
UE->frame_parms.nb_antennas_rx),"");
|
||||
fp->nb_antennas_rx),"");
|
||||
} else
|
||||
LOG_E(PHY,"can't compensate: diff =%d\n", first_symbols);
|
||||
}
|
||||
|
||||
// use previous timing_advance value to compute writeTimestamp
|
||||
writeTimestamp = timestamp +
|
||||
UE->frame_parms.get_samples_slot_timestamp(slot_nr,&UE->frame_parms,DURATION_RX_TO_TX)
|
||||
fp->get_samples_slot_timestamp(slot_nr,fp,DURATION_RX_TO_TX)
|
||||
- firstSymSamp - openair0_cfg[0].tx_sample_advance -
|
||||
UE->N_TA_offset - timing_advance;
|
||||
|
||||
@@ -910,8 +1105,7 @@ void *UE_thread(void *arg)
|
||||
timing_advance = UE->timing_advance;
|
||||
}
|
||||
|
||||
if (curMsg.proc.nr_slot_tx == 0)
|
||||
nr_ue_rrc_timer_trigger(UE->Mod_id, curMsg.proc.frame_tx, curMsg.proc.gNB_id);
|
||||
nr_ue_rrc_timer_trigger(UE->Mod_id, curMsg.proc.frame_tx, curMsg.proc.nr_slot_tx, curMsg.proc.gNB_id);
|
||||
|
||||
// Start TX slot processing here. It runs in parallel with RX slot processing
|
||||
notifiedFIFO_elt_t *newElt = newNotifiedFIFO_elt(sizeof(nr_rxtx_thread_data_t), curMsg.proc.nr_slot_tx, &txFifo, processSlotTX);
|
||||
@@ -946,16 +1140,20 @@ void *UE_thread(void *arg)
|
||||
|
||||
void init_NR_UE(int nb_inst,
|
||||
char* uecap_file,
|
||||
char* rrc_config_path) {
|
||||
char* rrc_config_path,
|
||||
ueinfo_t* ueinfo) {
|
||||
int inst;
|
||||
NR_UE_MAC_INST_t *mac_inst;
|
||||
NR_UE_RRC_INST_t* rrc_inst;
|
||||
|
||||
|
||||
for (inst=0; inst < nb_inst; inst++) {
|
||||
AssertFatal((rrc_inst = nr_l3_init_ue(uecap_file,rrc_config_path)) != NULL, "can not initialize RRC module\n");
|
||||
AssertFatal((mac_inst = nr_l2_init_ue(rrc_inst)) != NULL, "can not initialize L2 module\n");
|
||||
AssertFatal((mac_inst = nr_l2_init_ue(rrc_inst, ueinfo)) != NULL, "can not initialize L2 module\n");
|
||||
AssertFatal((mac_inst->if_module = nr_ue_if_module_init(inst)) != NULL, "can not initialize IF module\n");
|
||||
}
|
||||
if (get_softmodem_params()->sl_mode) {
|
||||
configure_NR_SL_Preconfig(0, get_nrUE_params()->sync_ref);
|
||||
}
|
||||
}
|
||||
|
||||
void init_NR_UE_threads(int nb_inst) {
|
||||
|
||||
@@ -86,6 +86,7 @@ unsigned short config_frames[4] = {2,9,11,13};
|
||||
#include "nr_nas_msg_sim.h"
|
||||
#include <openair1/PHY/MODULATION/nr_modulation.h>
|
||||
#include "openair2/GNB_APP/gnb_paramdef.h"
|
||||
#include "openair2/RRC/NR_UE/sl_preconfig_paramvalues.h"
|
||||
|
||||
extern const char *duplex_mode[];
|
||||
THREAD_STRUCT thread_struct;
|
||||
@@ -312,16 +313,18 @@ void set_options(int CC_id, PHY_VARS_NR_UE *UE){
|
||||
|
||||
}
|
||||
|
||||
void init_openair0(void) {
|
||||
void init_openair0(bool is_sidelink) {
|
||||
int card;
|
||||
int freq_off = 0;
|
||||
NR_DL_FRAME_PARMS *frame_parms = &PHY_vars_UE_g[0][0]->frame_parms;
|
||||
if (is_sidelink)
|
||||
frame_parms = &PHY_vars_UE_g[0][0]->SL_UE_PHY_PARAMS.sl_frame_params;
|
||||
|
||||
for (card=0; card<MAX_CARDS; card++) {
|
||||
uint64_t dl_carrier, ul_carrier, sl_carrier;
|
||||
uint64_t dl_carrier, ul_carrier;
|
||||
openair0_cfg[card].configFilename = NULL;
|
||||
openair0_cfg[card].threequarter_fs = frame_parms->threequarter_fs;
|
||||
openair0_cfg[card].sample_rate = frame_parms->samples_per_subframe * 1e3;
|
||||
openair0_cfg[card].sample_rate = IS_SOFTMODEM_RFSIM ? frame_parms->samples_per_subframe * 1e3 : 46080000;
|
||||
openair0_cfg[card].samples_per_frame = frame_parms->samples_per_frame;
|
||||
|
||||
if (frame_parms->frame_type==TDD)
|
||||
@@ -344,15 +347,14 @@ void init_openair0(void) {
|
||||
openair0_cfg[card].rx_num_channels,
|
||||
duplex_mode[openair0_cfg[card].duplex_mode]);
|
||||
|
||||
nr_get_carrier_frequencies(PHY_vars_UE_g[0][0], &dl_carrier, &ul_carrier);
|
||||
if (is_sidelink) {
|
||||
dl_carrier = frame_parms->dl_CarrierFreq;
|
||||
ul_carrier = frame_parms->ul_CarrierFreq;
|
||||
} else
|
||||
nr_get_carrier_frequencies(PHY_vars_UE_g[0][0], &dl_carrier, &ul_carrier);
|
||||
|
||||
nr_rf_card_config_freq(&openair0_cfg[card], ul_carrier, dl_carrier, freq_off);
|
||||
|
||||
if (get_softmodem_params()->sl_mode == 2) {
|
||||
nr_get_carrier_frequencies_sl(PHY_vars_UE_g[0][0], &sl_carrier);
|
||||
nr_rf_card_config_freq(&openair0_cfg[card], sl_carrier, sl_carrier, freq_off);
|
||||
}
|
||||
|
||||
nr_rf_card_config_gain(&openair0_cfg[card], rx_gain_off);
|
||||
|
||||
openair0_cfg[card].configFilename = get_softmodem_params()->rf_config_file;
|
||||
@@ -472,17 +474,28 @@ int main( int argc, char **argv ) {
|
||||
#endif
|
||||
LOG_I(HW, "Version: %s\n", PACKAGE_VERSION);
|
||||
|
||||
init_NR_UE(1,uecap_file,rrc_config_path);
|
||||
ueinfo_t ueinfo;
|
||||
char aprefix[MAX_OPTNAME_SIZE*2 + 8];
|
||||
paramdef_t SL_UEINFO[] = SL_UEINFO_DESC(ueinfo);
|
||||
paramlist_def_t SL_UEINFOList = {SL_CONFIG_STRING_UEINFO, NULL, 0};
|
||||
sprintf(aprefix, "%s.[%d]", SL_CONFIG_STRING_SL_PRECONFIGURATION, 0);
|
||||
config_getlist(&SL_UEINFOList, NULL, 0, aprefix);
|
||||
sprintf(aprefix, "%s.[%i].%s.[%i]", SL_CONFIG_STRING_SL_PRECONFIGURATION, 0, SL_CONFIG_STRING_UEINFO, 0);
|
||||
config_get(SL_UEINFO, sizeof(SL_UEINFO)/sizeof(paramdef_t), aprefix);
|
||||
|
||||
init_NR_UE(1, uecap_file, rrc_config_path, &ueinfo);
|
||||
|
||||
int mode_offset = get_softmodem_params()->nsa ? NUMBER_OF_UE_MAX : 1;
|
||||
uint16_t node_number = get_softmodem_params()->node_number;
|
||||
ue_id_g = (node_number == 0) ? 0 : node_number - 2;
|
||||
AssertFatal(ue_id_g >= 0, "UE id is expected to be nonnegative.\n");
|
||||
|
||||
if(IS_SOFTMODEM_NOS1 || get_softmodem_params()->sa || get_softmodem_params()->nsa) {
|
||||
if(node_number == 0) {
|
||||
if(node_number == 0 && get_softmodem_params()->sl_mode == 0) {
|
||||
init_pdcp(0);
|
||||
}
|
||||
else {
|
||||
} else if (get_softmodem_params()->sl_mode == 2) {
|
||||
init_pdcp(1+ueinfo.srcid);
|
||||
} else {
|
||||
init_pdcp(mode_offset + ue_id_g);
|
||||
}
|
||||
}
|
||||
@@ -522,19 +535,34 @@ int main( int argc, char **argv ) {
|
||||
get_softmodem_params()->numerology,
|
||||
nr_band);
|
||||
}
|
||||
else{
|
||||
else if (get_softmodem_params()->sl_mode != 2){
|
||||
DevAssert(mac->if_module != NULL && mac->if_module->phy_config_request != NULL);
|
||||
mac->if_module->phy_config_request(&mac->phy_config);
|
||||
mac->phy_config_request_sent = true;
|
||||
fapi_nr_config_request_t *nrUE_config = &UE[CC_id]->nrUE_config;
|
||||
|
||||
nr_init_frame_parms_ue(&UE[CC_id]->frame_parms, nrUE_config, mac->nr_band);
|
||||
nr_init_frame_parms_ue(&UE[CC_id]->frame_parms, nrUE_config,
|
||||
*mac->scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0]);
|
||||
}
|
||||
|
||||
UE[CC_id]->sl_mode = get_softmodem_params()->sl_mode;
|
||||
|
||||
if (UE[CC_id]->sl_mode) {
|
||||
AssertFatal(UE[CC_id]->sl_mode == 2, "Only Sidelink mode 2 supported. Mode 1 not yet supported\n");
|
||||
nr_UE_configure_Sidelink(0, get_nrUE_params()->sync_ref, &ueinfo);
|
||||
DevAssert(mac->if_module != NULL && mac->if_module->sl_phy_config_request != NULL);
|
||||
sl_nr_ue_phy_params_t *sl_phy = &UE[CC_id]->SL_UE_PHY_PARAMS;
|
||||
mac->if_module->sl_phy_config_request(&mac->SL_MAC_PARAMS->sl_phy_config);
|
||||
nr_init_frame_parms_ue_sl(&sl_phy->sl_frame_params,&sl_phy->sl_config,
|
||||
get_nrUE_params()->threequarter_fs,
|
||||
get_nrUE_params()->ofdm_offset_divisor);
|
||||
}
|
||||
init_nr_ue_vars(UE[CC_id], 0, abstraction_flag);
|
||||
}
|
||||
|
||||
init_openair0();
|
||||
bool is_sl = (get_softmodem_params()->sl_mode) ? 1 : 0;
|
||||
|
||||
init_openair0(is_sl);
|
||||
// init UE_PF_PO and mutex lock
|
||||
pthread_mutex_init(&ue_pf_po_mutex, NULL);
|
||||
memset (&UE_PF_PO[0][0], 0, sizeof(UE_PF_PO_t)*NUMBER_OF_UE_MAX*MAX_NUM_CCs);
|
||||
|
||||
@@ -5,13 +5,20 @@
|
||||
#include "PHY/defs_nr_UE.h"
|
||||
#include "SIMULATION/ETH_TRANSPORT/proto.h"
|
||||
|
||||
|
||||
typedef struct ueinfo {
|
||||
int srcid;
|
||||
int thirdOctet;
|
||||
int fourthOctet;
|
||||
} ueinfo_t;
|
||||
|
||||
#define CONFIG_HLP_IF_FREQ "IF frequency for RF, if needed\n"
|
||||
#define CONFIG_HLP_IF_FREQ_OFF "UL IF frequency offset for RF, if needed\n"
|
||||
#define CONFIG_HLP_DLSCH_PARA "number of threads for dlsch processing 0 for no parallelization\n"
|
||||
#define CONFIG_HLP_OFFSET_DIV "Divisor for computing OFDM symbol offset in Rx chain (num samples in CP/<the value>). Default value is 8. To set the sample offset to 0, set this value ~ 10e6\n"
|
||||
#define CONFIG_HLP_MAX_LDPC_ITERATIONS "Maximum LDPC decoder iterations\n"
|
||||
#define CONFIG_HLP_SL_SYNCSOURCEUE "Sidelink UE acts as SYNC REF UE"
|
||||
#define CONFIG_HLP_SL_MAX_MCS "Sidelink initial max mcs value"
|
||||
#define CONFIG_HLP_SL_SNR "Sets sidelink SNR value"
|
||||
/***************************************************************************************************************************************/
|
||||
/* command line options definitions, CMDLINE_XXXX_DESC macros are used to initialize paramdef_t arrays which are then used as argument
|
||||
when calling config_get or config_getlist functions */
|
||||
@@ -24,6 +31,7 @@
|
||||
#define CALIBPRACH_OPT "calib-prach-tx"
|
||||
#define DUMPFRAME_OPT "ue-dump-frame"
|
||||
|
||||
#define SL_UE_iterator(BaSe, VaR) NR_SL_UE_info_t ** VaR##pptr=BaSe, *VaR; while ((VaR=*(VaR##pptr++)))
|
||||
/*------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* command line parameters defining UE running mode */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
@@ -61,6 +69,9 @@
|
||||
{"chest-time", CONFIG_HLP_CHESTTIME, 0, .iptr=&(nrUE_params.chest_time), .defintval=0, TYPE_INT, 0}, \
|
||||
{"ue-timing-correction-disable", CONFIG_HLP_DISABLETIMECORR, PARAMFLAG_BOOL, .iptr=&(nrUE_params.no_timing_correction), .defintval=0, TYPE_INT, 0}, \
|
||||
{"SLC", CONFIG_HLP_SLF, 0, .u64ptr=&(sidelink_frequency[0][0]), .defuintval=2600000000,TYPE_UINT64,0}, \
|
||||
{"sync-ref", CONFIG_HLP_SL_SYNCSOURCEUE, PARAMFLAG_BOOL, .uptr=&(nrUE_params.sync_ref), .defuintval=0, TYPE_UINT32, 0}, \
|
||||
{"mcs", CONFIG_HLP_SL_MAX_MCS, 0, .u8ptr=&(nrUE_params.mcs), .defintval=9, TYPE_UINT8, 0}, \
|
||||
{"snr", CONFIG_HLP_SL_SNR, 0, .dblptr=&(nrUE_params.snr), .defdblval=0.0, TYPE_DOUBLE, 0}, \
|
||||
}
|
||||
// clang-format on
|
||||
|
||||
@@ -82,6 +93,9 @@ typedef struct {
|
||||
int threequarter_fs;
|
||||
int N_RB_DL;
|
||||
int ssb_start_subcarrier;
|
||||
uint32_t sync_ref;
|
||||
uint8_t mcs;
|
||||
double snr;
|
||||
} nrUE_params_t;
|
||||
extern uint64_t get_nrUE_optmask(void);
|
||||
extern uint64_t set_nrUE_optmask(uint64_t bitmask);
|
||||
@@ -91,7 +105,7 @@ extern nrUE_params_t *get_nrUE_params(void);
|
||||
// In nr-ue.c
|
||||
extern int setup_nr_ue_buffers(PHY_VARS_NR_UE **phy_vars_ue, openair0_config_t *openair0_cfg);
|
||||
extern void fill_ue_band_info(void);
|
||||
extern void init_NR_UE(int, char*, char*);
|
||||
extern void init_NR_UE(int, char*, char*, ueinfo_t*);
|
||||
extern void init_NR_UE_threads(int);
|
||||
extern void reset_opp_meas(void);
|
||||
extern void print_opp_meas(void);
|
||||
|
||||
@@ -119,6 +119,8 @@ typedef struct {
|
||||
typedef struct {
|
||||
uint8_t harq_pid;
|
||||
uint8_t ack_nack;
|
||||
uint8_t *ack_nack_rcvd;
|
||||
uint8_t num_acks_rcvd;
|
||||
uint32_t pdu_length;
|
||||
uint8_t* pdu;
|
||||
} fapi_nr_pdsch_pdu_t;
|
||||
|
||||
@@ -942,6 +942,7 @@ typedef struct
|
||||
uint16_t scramb_id; // ScramblingID of the CSI-RS [3GPP TS 38.214, sec 5.2.2.3.1], Value: 0->1023
|
||||
uint8_t power_control_offset; // Ratio of PDSCH EPRE to NZP CSI-RSEPRE [3GPP TS 38.214, sec 5.2.2.3.1], Value: 0->23 representing -8 to 15 dB in 1dB steps; 255: L1 is configured with ProfileSSS
|
||||
uint8_t power_control_offset_ss; // Ratio of NZP CSI-RS EPRE to SSB/PBCH block EPRE [3GPP TS 38.214, sec 5.2.2.3.1], Values: 0: -3dB; 1: 0dB; 2: 3dB; 3: 6dB; 255: L1 is configured with ProfileSSS
|
||||
uint8_t measurement_bitmap;
|
||||
} nfapi_nr_dl_tti_csi_rs_pdu_rel15_t;
|
||||
|
||||
|
||||
|
||||
@@ -5,11 +5,30 @@
|
||||
|
||||
#define SL_NR_RX_CONFIG_LIST_NUM 1
|
||||
#define SL_NR_TX_CONFIG_LIST_NUM 1
|
||||
#define SL_NR_RX_IND_MAX_PDU 1
|
||||
#define SL_NR_RX_IND_MAX_PDU 2
|
||||
#define SL_NR_SCI_IND_MAX_PDU 2
|
||||
#define SL_NR_MAX_PSCCH_SCI_LENGTH_IN_BYTES 8
|
||||
#define SL_NR_MAX_PSSCH_SCI_LENGTH_IN_BYTES 8
|
||||
#define SL_NR_MAX_SCI_LENGTH_IN_BYTES 8
|
||||
|
||||
typedef struct sl_nr_tti_csi_rs_pdu {
|
||||
uint8_t subcarrier_spacing; // subcarrierSpacing [3GPP TS 38.211, sec 4.2], Value:0->4
|
||||
uint8_t cyclic_prefix; // Cyclic prefix type [3GPP TS 38.211, sec 4.2], 0: Normal; 1: Extended
|
||||
uint16_t start_rb; // PRB where this CSI resource starts related to common resource block #0 (CRB#0). Only multiples of 4 are allowed. [3GPP TS 38.331, sec 6.3.2 parameter CSIFrequencyOccupation], Value: 0 ->274
|
||||
uint16_t nr_of_rbs; // Number of PRBs across which this CSI resource spans. Only multiples of 4 are allowed. [3GPP TS 38.331, sec 6.3.2 parameter CSI-FrequencyOccupation], Value: 24 -> 276
|
||||
uint8_t csi_type; // CSI Type [3GPP TS 38.211, sec 7.4.1.5], Value: 0:TRS; 1:CSI-RS NZP; 2:CSI-RS ZP
|
||||
uint8_t row; // Row entry into the CSI Resource location table. [3GPP TS 38.211, sec 7.4.1.5.3 and table 7.4.1.5.3-1], Value: 1-18
|
||||
uint16_t freq_domain; // Bitmap defining the frequencyDomainAllocation [3GPP TS 38.211, sec 7.4.1.5.3] [3GPP TS 38.331 CSIResourceMapping], Value: Up to the 12 LSBs, actual size is determined by the Row parameter
|
||||
uint8_t symb_l0; // The time domain location l0 and firstOFDMSymbolInTimeDomain [3GPP TS 38.211, sec 7.4.1.5.3], Value: 0->13
|
||||
uint8_t symb_l1; // The time domain location l1 and firstOFDMSymbolInTimeDomain2 [3GPP TS 38.211, sec 7.4.1.5.3], Value: 2->12
|
||||
uint8_t cdm_type; // The cdm-Type field [3GPP TS 38.211, sec 7.4.1.5.3 and table 7.4.1.5.3-1], Value: 0: noCDM; 1: fd-CDM2; 2: cdm4-FD2-TD2; 3: cdm8-FD2-TD4
|
||||
uint8_t freq_density; // The density field, p and comb offset (for dot5). [3GPP TS 38.211, sec 7.4.1.5.3 and table 7.4.1.5.3-1], Value: 0: dot5 (even RB); 1: dot5 (odd RB); 2: one; 3: three
|
||||
uint16_t scramb_id; // ScramblingID of the CSI-RS [3GPP TS 38.214, sec 5.2.2.3.1], Value: 0->1023
|
||||
uint8_t power_control_offset; // Ratio of PDSCH EPRE to NZP CSI-RSEPRE [3GPP TS 38.214, sec 5.2.2.3.1], Value: 0->23 representing -8 to 15 dB in 1dB steps; 255: L1 is configured with ProfileSSS
|
||||
uint8_t power_control_offset_ss; // Ratio of NZP CSI-RS EPRE to SSB/PBCH block EPRE [3GPP TS 38.214, sec 5.2.2.3.1], Values: 0: -3dB; 1: 0dB; 2: 3dB; 3: 6dB; 255: L1 is configured with ProfileSSS
|
||||
uint8_t measurement_bitmap; // bit 0 RSRP, bit 1 RI, bit 2 LI, bit 3 PMI, bit 4 CQI, bit 5 i1
|
||||
} sl_nr_tti_csi_rs_pdu_t;
|
||||
|
||||
typedef enum sl_sci_format_type_enum {
|
||||
SL_SCI_INVALID_FORMAT,
|
||||
SL_SCI_FORMAT_1A_ON_PSCCH,
|
||||
@@ -20,7 +39,8 @@ typedef enum sl_sci_format_type_enum {
|
||||
typedef enum sl_rx_pdu_type_enum {
|
||||
SL_NR_RX_PDU_TYPE_NONE,
|
||||
SL_NR_RX_PDU_TYPE_SSB,
|
||||
SL_NR_RX_PDU_TYPE_SLSCH
|
||||
SL_NR_RX_PDU_TYPE_SLSCH,
|
||||
SL_NR_RX_PDU_TYPE_SLSCH_PSFCH,
|
||||
} sl_rx_pdu_type_enum_t;
|
||||
|
||||
//Type of SL-RX CONFIG requests from MAC to PHY
|
||||
@@ -29,6 +49,8 @@ typedef enum sl_nr_rx_config_type_enum {
|
||||
SL_NR_CONFIG_TYPE_RX_PSCCH,
|
||||
SL_NR_CONFIG_TYPE_RX_PSSCH_SCI,
|
||||
SL_NR_CONFIG_TYPE_RX_PSSCH_SLSCH,
|
||||
SL_NR_CONFIG_TYPE_RX_PSSCH_SLSCH_PSFCH,
|
||||
SL_NR_CONFIG_TYPE_RX_PSSCH_SLSCH_CSI_RS,
|
||||
SL_NR_CONFIG_TYPE_RX_MAXIMUM
|
||||
} sl_nr_rx_config_type_enum_t;
|
||||
|
||||
@@ -36,7 +58,8 @@ typedef enum sl_nr_rx_config_type_enum {
|
||||
typedef enum sl_nr_tx_config_type_enum {
|
||||
SL_NR_CONFIG_TYPE_TX_PSBCH = SL_NR_CONFIG_TYPE_RX_MAXIMUM + 1,
|
||||
SL_NR_CONFIG_TYPE_TX_PSCCH_PSSCH,
|
||||
SL_NR_CONFIG_TYPE_TX_PSFCH,
|
||||
SL_NR_CONFIG_TYPE_TX_PSCCH_PSSCH_PSFCH,
|
||||
SL_NR_CONFIG_TYPE_TX_PSCCH_PSSCH_CSI_RS,
|
||||
SL_NR_CONFIG_TYPE_TX_MAXIMUM
|
||||
} sl_nr_tx_config_type_enum_t;
|
||||
|
||||
@@ -68,7 +91,7 @@ typedef struct {
|
||||
uint8_t sensing_result;
|
||||
//in case pssch sensing is requested.
|
||||
int16_t pssch_rsrp;
|
||||
sl_nr_sci_indication_pdu_t sci_pdu;
|
||||
sl_nr_sci_indication_pdu_t sci_pdu[SL_NR_SCI_IND_MAX_PDU];
|
||||
} sl_nr_sci_indication_t;
|
||||
|
||||
// IF UE Rx PSBCH, PHY indicates MAC with received MIB and PSBCH RSRP
|
||||
@@ -190,6 +213,22 @@ typedef struct sl_nr_rx_config_pssch_pdu {
|
||||
uint8_t ndi;
|
||||
} sl_nr_rx_config_pssch_pdu_t;
|
||||
|
||||
typedef struct sl_nr_tx_rx_config_psfch_pdu {
|
||||
// These fields can be mapped directly to the same fields in nfapi_nr_ul_config_pucch_pdu
|
||||
uint8_t freq_hop_flag;
|
||||
uint8_t group_hop_flag;
|
||||
uint8_t sequence_hop_flag;
|
||||
uint16_t second_hop_prb;
|
||||
uint8_t nr_of_symbols;
|
||||
uint8_t start_symbol_index;
|
||||
uint8_t hopping_id;
|
||||
uint16_t prb;
|
||||
uint16_t sl_bwp_start;
|
||||
uint16_t initial_cyclic_shift;
|
||||
uint8_t mcs;
|
||||
uint8_t bit_len_harq;
|
||||
} sl_nr_tx_rx_config_psfch_pdu_t;
|
||||
|
||||
typedef struct {
|
||||
sl_nr_rx_config_type_enum_t pdu_type; // indicates the type of RX config request
|
||||
union {
|
||||
@@ -197,6 +236,9 @@ typedef struct {
|
||||
sl_nr_rx_config_pssch_sci_pdu_t rx_sci2_config_pdu;
|
||||
sl_nr_rx_config_pssch_pdu_t rx_pssch_config_pdu;
|
||||
};
|
||||
sl_nr_tti_csi_rs_pdu_t rx_csi_rs_config_pdu;
|
||||
sl_nr_tx_rx_config_psfch_pdu_t *rx_psfch_pdu_list;
|
||||
uint16_t num_psfch_pdus;
|
||||
} sl_nr_rx_config_request_pdu_t;
|
||||
|
||||
// MAC commands PHY to perform an action on RX RESOURCE POOL or RX PSBCH using this RX CONFIG
|
||||
@@ -243,6 +285,9 @@ typedef struct sl_nr_tx_config_pscch_pssch_pdu {
|
||||
//Indicates the number of symbols for PSCCH+PSSCH txn
|
||||
uint8_t pssch_numsym;
|
||||
|
||||
// start symbol of PSCCH/PSSCH (excluding AGC)
|
||||
uint8_t pssch_startsym;
|
||||
|
||||
//.... Other Parameters for SCI-2 and PSSCH
|
||||
|
||||
// Used to determine number of SCI2 modulated symbols
|
||||
@@ -265,14 +310,21 @@ typedef struct sl_nr_tx_config_pscch_pssch_pdu {
|
||||
// Table from SPEC 38.211, Table 8.4.1.1.2-1
|
||||
uint16_t dmrs_symbol_position;
|
||||
|
||||
|
||||
// PSFCH related parameters
|
||||
sl_nr_tx_rx_config_psfch_pdu_t *psfch_pdu_list;
|
||||
uint16_t num_psfch_pdus;
|
||||
//....TBD.. any additional parameters
|
||||
|
||||
// CSI-RS related parameters
|
||||
sl_nr_tti_csi_rs_pdu_t nr_sl_csi_rs_pdu;
|
||||
|
||||
//TX Power for PSSCH in symbol without PSCCH.
|
||||
// Power for PSCCH and power for PSSCH in symbol with PSCCH is calculated
|
||||
// from this value according to 38.213 section 16
|
||||
int16_t pssch_tx_power;
|
||||
|
||||
uint16_t slsch_payload_length;
|
||||
uint8_t *slsch_payload;
|
||||
} sl_nr_tx_config_pscch_pssch_pdu_t;
|
||||
|
||||
// MAC indicates PHY to send PSBCH.
|
||||
@@ -351,7 +403,7 @@ typedef struct
|
||||
uint16_t sl_bandwidth;
|
||||
//Absolute frequency of SL point A in KHz
|
||||
//n38 (2570-2620 Mhz), n47 (5855-5925 Mhz) are defined.
|
||||
uint32_t sl_frequency;
|
||||
uint64_t sl_frequency;
|
||||
|
||||
//Only 1 SCS-SpecificCarrier allowed for NR-SL communication
|
||||
uint16_t sl_grid_size;// bandwidth for each numerology
|
||||
@@ -363,7 +415,7 @@ typedef struct
|
||||
uint8_t sl_frequency_shift_7p5khz;
|
||||
//Indicates presence of +/-5Khz shift wrt FREF for V2X reference frequencies.
|
||||
//Possible values: {-1,0,1}
|
||||
uint8_t sl_value_N;
|
||||
int8_t sl_value_N;
|
||||
|
||||
} sl_nr_carrier_config_t;
|
||||
|
||||
@@ -382,7 +434,26 @@ typedef struct {
|
||||
//only 1 SL-BWP can be configured in REL16, REL17
|
||||
sl_nr_bwp_config_t sl_bwp_config;
|
||||
|
||||
uint32_t sl_DMRS_ScrambleId;
|
||||
|
||||
} sl_nr_phy_config_request_t;
|
||||
|
||||
/* Dependencies */
|
||||
typedef enum NR_UE_SL_CSI_ResourcePeriodicityAndOffset_PR {
|
||||
NR_UE_SL_CSI_ResourcePeriodicityAndOffset_PR_NOTHING, /* No components present */
|
||||
NR_UE_SL_CSI_ResourcePeriodicityAndOffset_PR_slots4,
|
||||
NR_UE_SL_CSI_ResourcePeriodicityAndOffset_PR_slots5,
|
||||
NR_UE_SL_CSI_ResourcePeriodicityAndOffset_PR_slots8,
|
||||
NR_UE_SL_CSI_ResourcePeriodicityAndOffset_PR_slots10,
|
||||
NR_UE_SL_CSI_ResourcePeriodicityAndOffset_PR_slots16,
|
||||
NR_UE_SL_CSI_ResourcePeriodicityAndOffset_PR_slots20,
|
||||
NR_UE_SL_CSI_ResourcePeriodicityAndOffset_PR_slots32,
|
||||
NR_UE_SL_CSI_ResourcePeriodicityAndOffset_PR_slots40,
|
||||
NR_UE_SL_CSI_ResourcePeriodicityAndOffset_PR_slots64,
|
||||
NR_UE_SL_CSI_ResourcePeriodicityAndOffset_PR_slots80,
|
||||
NR_UE_SL_CSI_ResourcePeriodicityAndOffset_PR_slots160,
|
||||
NR_UE_SL_CSI_ResourcePeriodicityAndOffset_PR_slots320,
|
||||
NR_UE_SL_CSI_ResourcePeriodicityAndOffset_PR_slots640
|
||||
} NR_UE_SL_CSI_ResourcePeriodicityAndOffset_PR;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -339,6 +339,10 @@ int check_crc(uint8_t* decoded_bytes, uint32_t n, uint8_t crc_type)
|
||||
for (int i=0; i<crc_len; i++)
|
||||
oldcrc |= (decoded_bytes[(n>>3)-crc_len+i])<<((crc_len-1-i)<<3);
|
||||
|
||||
if (oldcrc == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
switch (crc_type) {
|
||||
|
||||
case CRC24_A:
|
||||
|
||||
@@ -451,11 +451,15 @@ static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr,
|
||||
// Parity Check not necessary here since it will fail
|
||||
// because first 2 cols/BNs in BG are punctured and cannot be
|
||||
// estimated after only one iteration
|
||||
// Added 2 to numMaxIter to execute ldpc process five times (max. iterations);
|
||||
// it is skipping first two iterations so, previously, it was iterating only three times
|
||||
// In case of check_crc() pass, we subtracted 2 to consider upto 7 iterations (worst case) only; in case of iteration 8,
|
||||
// it will still consider the ldpc decoding as abort
|
||||
|
||||
// First iteration finished
|
||||
uint32_t numIter = 1;
|
||||
int32_t pcRes = 1; // pcRes is 0 if the ldpc decoder is succesful
|
||||
while ((numIter <= numMaxIter) && (pcRes != 0)) {
|
||||
while ((numIter <= numMaxIter + 2) && (pcRes != 0)) {
|
||||
// Increase iteration counter
|
||||
numIter++;
|
||||
if (check_abort(ab)) {
|
||||
@@ -713,6 +717,7 @@ static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr,
|
||||
nrLDPC_llr2bit(p_out, p_llrOut, numLLR);
|
||||
if (check_crc((uint8_t*)p_out, p_decParams->block_length, p_decParams->crc_type)) {
|
||||
LOG_D(PHY, "Segment CRC OK, exiting LDPC decoder\n");
|
||||
numIter -= 2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
#define __NR_POLAR_DCI_DEFS__H__
|
||||
|
||||
#define NR_POLAR_DCI_MESSAGE_TYPE 1 //int8_t
|
||||
#define NR_POLAR_SCI_MESSAGE_TYPE (NR_POLAR_PSBCH_MESSAGE_TYPE + 1) //int8_t
|
||||
#define NR_POLAR_SCI2_MESSAGE_TYPE (NR_POLAR_SCI_MESSAGE_TYPE + 1) //int8_t
|
||||
#define NR_POLAR_DCI_CRC_PARITY_BITS 24
|
||||
#define NR_POLAR_DCI_CRC_ERROR_CORRECTION_BITS 3
|
||||
|
||||
|
||||
@@ -607,6 +607,7 @@ void init_polar_deinterleaver_table(t_nrPolar_params *polarParams) {
|
||||
|
||||
uint32_t polar_decoder_int16(int16_t *input,
|
||||
uint64_t *out,
|
||||
uint16_t *nid,
|
||||
uint8_t ones_flag,
|
||||
int8_t messageType,
|
||||
uint16_t messageLength,
|
||||
@@ -615,7 +616,7 @@ uint32_t polar_decoder_int16(int16_t *input,
|
||||
t_nrPolar_params *polarParams=nr_polar_params(messageType, messageLength, aggregation_level, true);
|
||||
|
||||
#ifdef POLAR_CODING_DEBUG
|
||||
printf("\nRX\n");
|
||||
printf("\nRX N %d (messageType %d messageLength %d aggregation_level %d)\n",polarParams->N,messageType,messageLength,aggregation_level);
|
||||
printf("rm:");
|
||||
for (int i = 0; i < polarParams->N; i++) {
|
||||
if (i % 4 == 0) {
|
||||
@@ -794,5 +795,6 @@ uint32_t polar_decoder_int16(int16_t *input,
|
||||
#endif
|
||||
out[0]=Ar;
|
||||
|
||||
if (nid) *nid=crc&65535;
|
||||
polarReturn crc^rxcrc;
|
||||
}
|
||||
|
||||
@@ -153,6 +153,7 @@ void polar_encoder_dci(uint32_t *in,
|
||||
|
||||
void polar_encoder_fast(uint64_t *A,
|
||||
void *out,
|
||||
uint32_t *crc,
|
||||
int32_t crcmask,
|
||||
uint8_t ones_flag,
|
||||
int8_t messageType,
|
||||
@@ -168,6 +169,7 @@ int8_t polar_decoder(double *input,
|
||||
|
||||
uint32_t polar_decoder_int16(int16_t *input,
|
||||
uint64_t *out,
|
||||
uint16_t *nid,
|
||||
uint8_t ones_flag,
|
||||
int8_t messageType,
|
||||
uint16_t messageLength,
|
||||
|
||||
@@ -304,6 +304,7 @@ void nr_polar_rm_interleaving_cb(void *in, void *out, uint16_t E)
|
||||
static inline void polar_rate_matching(const t_nrPolar_params *polarParams,void *in,void *out) __attribute__((always_inline));
|
||||
|
||||
static inline void polar_rate_matching(const t_nrPolar_params *polarParams,void *in,void *out) {
|
||||
int i = 0;
|
||||
|
||||
// handle rate matching with a single 128 bit word using bit shuffling
|
||||
// can be done with SIMD intrisics if needed
|
||||
@@ -343,15 +344,20 @@ static inline void polar_rate_matching(const t_nrPolar_params *polarParams,void
|
||||
}
|
||||
// These are based on LUTs for byte and short word groups
|
||||
else if (polarParams->groupsize == 8)
|
||||
for (int i=0; i<polarParams->encoderLength>>3; i++) ((uint8_t *)out)[i] = ((uint8_t *)in)[polarParams->rm_tab[i]];
|
||||
for (i=0; i<polarParams->encoderLength>>3; i++) ((uint8_t *)out)[i] = ((uint8_t *)in)[polarParams->rm_tab[i]];
|
||||
else // groupsize==16
|
||||
for (int i=0; i<polarParams->encoderLength>>4; i++) {
|
||||
for (i=0; i<polarParams->encoderLength>>4; i++) {
|
||||
((uint16_t *)out)[i] = ((uint16_t *)in)[polarParams->rm_tab[i]];
|
||||
}
|
||||
|
||||
if (polarParams->i_bil == 1) {
|
||||
nr_polar_rm_interleaving_cb(out, out, polarParams->encoderLength);
|
||||
}
|
||||
// handle remaining bits which do not fill a full group
|
||||
for(i=i*polarParams->groupsize; i<polarParams->encoderLength; i++) {
|
||||
uint8_t pi = polarParams->rate_matching_pattern[i];
|
||||
((uint8_t *)out)[i>>3] |= ( ((((uint8_t *)in)[pi >> 3] >> (pi & 7)) & 1) << (i&7));
|
||||
}
|
||||
}
|
||||
|
||||
void build_polar_tables(t_nrPolar_params *polarParams) {
|
||||
@@ -448,8 +454,8 @@ void build_polar_tables(t_nrPolar_params *polarParams) {
|
||||
}
|
||||
#ifdef DEBUG_POLAR_ENCODER
|
||||
groupcnt++;
|
||||
#endif
|
||||
if ((ccnt+1)<mingroupsize) mingroupsize=ccnt+1;
|
||||
#endif
|
||||
//if ((ccnt+1)<mingroupsize) mingroupsize=ccnt+1;
|
||||
#ifdef DEBUG_POLAR_ENCODER
|
||||
printf("group %d (size %d): (%d:%d) => (%d:%d)\n",groupcnt,ccnt+1,
|
||||
firstingroup_in,firstingroup_in+ccnt,
|
||||
@@ -477,8 +483,7 @@ void build_polar_tables(t_nrPolar_params *polarParams) {
|
||||
break;
|
||||
}
|
||||
|
||||
polarParams->rm_tab = (int *)malloc(sizeof(int) * (polarParams->encoderLength >> shift));
|
||||
|
||||
polarParams->rm_tab=(int *)malloc(sizeof(int)*((polarParams->encoderLength+mingroupsize-1)/mingroupsize));
|
||||
// rerun again to create groups
|
||||
int tcnt = 0;
|
||||
for (int outpos = 0; outpos < polarParams->encoderLength; outpos += mingroupsize, tcnt++)
|
||||
@@ -487,6 +492,7 @@ void build_polar_tables(t_nrPolar_params *polarParams) {
|
||||
|
||||
void polar_encoder_fast(uint64_t *A,
|
||||
void *out,
|
||||
uint32_t *crc,
|
||||
int32_t crcmask,
|
||||
uint8_t ones_flag,
|
||||
int8_t messageType,
|
||||
@@ -599,7 +605,7 @@ void polar_encoder_fast(uint64_t *A,
|
||||
else if (polarParams->crcParityBits == 11)
|
||||
tcrc = (uint64_t)((crcmask^(crc11(A128_flip,bitlen)>>21)))&0x7ff;
|
||||
}
|
||||
|
||||
if (crc) *crc = (uint32_t)tcrc;
|
||||
// this is number of quadwords in the bit string
|
||||
int quadwlen = (polarParams->K+63)/64;
|
||||
|
||||
@@ -707,11 +713,12 @@ void polar_encoder_fast(uint64_t *A,
|
||||
printf("\n");
|
||||
#endif
|
||||
|
||||
memset((void*)out,0,polarParams->encoderLength>>3);
|
||||
memset((void*)out,0,(polarParams->encoderLength + 7)>>3);
|
||||
polar_rate_matching(polarParams,(void *)D, out);
|
||||
|
||||
#ifdef POLAR_CODING_DEBUG
|
||||
uint64_t *out64 = (uint64_t *)out;
|
||||
printf("N %d, encoderLength %d\n",polarParams->N,polarParams->encoderLength);
|
||||
printf("rm:");
|
||||
for (int n = 0; n < polarParams->encoderLength; n++) {
|
||||
if (n % 4 == 0) {
|
||||
|
||||
57
openair1/PHY/CODING/nrPolar_tools/nr_polar_psbch_defs.h
Normal file
57
openair1/PHY/CODING/nrPolar_tools/nr_polar_psbch_defs.h
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*! \file /PHY/CODING/nrPolar_tools/nr_polar_psbch_defs.h
|
||||
\brief Polar definitions required for Sidelink PSBCH
|
||||
\author
|
||||
\date
|
||||
\version
|
||||
\company: Fraunhofer
|
||||
\email:
|
||||
\note
|
||||
\warning
|
||||
*/
|
||||
|
||||
#ifndef __NR_POLAR_PSBCH_DEFS__H__
|
||||
#define __NR_POLAR_PSBCH_DEFS__H__
|
||||
|
||||
//PSBCH related polar parameters.
|
||||
|
||||
//PSBCH symbols sent in 11RBS, 9 symbols. 11*9*(12-3(for DMRS))*2bits = 1782 bits
|
||||
#define SL_NR_POLAR_PSBCH_E_NORMAL_CP 1782
|
||||
//PSBCH symbols sent in 11RBS, 7 symbols. 11*7*(12-3(for DMRS))*2bits = 1386 bits
|
||||
#define SL_NR_POLAR_PSBCH_E_EXT_CP 1386
|
||||
// SL_NR_POLAR_PSBCH_E_NORMAL_CP/32
|
||||
#define SL_NR_POLAR_PSBCH_E_DWORD 56
|
||||
|
||||
#define SL_NR_POLAR_PSBCH_MESSAGE_TYPE (NR_POLAR_UCI_PUCCH_MESSAGE_TYPE + 1)
|
||||
#define SL_NR_POLAR_PSBCH_PAYLOAD_BITS 32
|
||||
#define SL_NR_POLAR_PSBCH_AGGREGATION_LEVEL 0
|
||||
#define SL_NR_POLAR_PSBCH_N_MAX 9
|
||||
#define SL_NR_POLAR_PSBCH_I_IL 1
|
||||
#define SL_NR_POLAR_PSBCH_I_SEG 0
|
||||
#define SL_NR_POLAR_PSBCH_N_PC 0
|
||||
#define SL_NR_POLAR_PSBCH_N_PC_WM 0
|
||||
#define SL_NR_POLAR_PSBCH_I_BIL 0
|
||||
#define SL_NR_POLAR_PSBCH_CRC_PARITY_BITS 24
|
||||
#define SL_NR_POLAR_PSBCH_CRC_ERROR_CORRECTION_BITS 3
|
||||
|
||||
#endif
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
#include "PHY/CODING/nrPolar_tools/nr_polar_defs.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_dci.h"
|
||||
#include "nrPolar_tools/nr_polar_psbch_defs.h"
|
||||
|
||||
#define PolarKey ((messageType<<24)|(messageLength<<8)|aggregation_level)
|
||||
static t_nrPolar_params * PolarList=NULL;
|
||||
@@ -98,7 +99,7 @@ t_nrPolar_params *nr_polar_params(int8_t messageType, uint16_t messageLength, ui
|
||||
//Parse the list. If the node is already created, return without initialization.
|
||||
while (currentPtr != NULL) {
|
||||
//printf("currentPtr->idx %d, (%d,%d)\n",currentPtr->idx,currentPtr->payloadBits,currentPtr->encoderLength);
|
||||
//LOG_D(PHY,"Looking for index %d\n",(messageType * messageLength * aggregation_prime));
|
||||
LOG_D(NR_PHY,"Looking for index %d\n",(messageType * messageLength * aggregation_level));
|
||||
if (currentPtr->busy == false && currentPtr->idx == PolarKey ) {
|
||||
currentPtr->busy=true;
|
||||
pthread_mutex_unlock(&PolarListMutex);
|
||||
@@ -194,7 +195,39 @@ t_nrPolar_params *nr_polar_params(int8_t messageType, uint16_t messageLength, ui
|
||||
newPolarInitNode->payloadBits = messageLength;
|
||||
newPolarInitNode->crcCorrectionBits = NR_POLAR_PUCCH_CRC_ERROR_CORRECTION_BITS;
|
||||
//LOG_D(PHY,"New polar node, encoderLength %d, aggregation_level %d\n",newPolarInitNode->encoderLength,aggregation_level);
|
||||
} else if (messageType == SL_NR_POLAR_PSBCH_MESSAGE_TYPE) { //PSBCH
|
||||
newPolarInitNode->n_max = SL_NR_POLAR_PSBCH_N_MAX;
|
||||
newPolarInitNode->i_il = SL_NR_POLAR_PSBCH_I_IL;
|
||||
newPolarInitNode->i_seg = SL_NR_POLAR_PSBCH_I_SEG;
|
||||
newPolarInitNode->n_pc = SL_NR_POLAR_PSBCH_N_PC;
|
||||
newPolarInitNode->n_pc_wm = SL_NR_POLAR_PSBCH_N_PC_WM;
|
||||
newPolarInitNode->i_bil = SL_NR_POLAR_PSBCH_I_BIL;
|
||||
newPolarInitNode->crcParityBits = SL_NR_POLAR_PSBCH_CRC_PARITY_BITS;
|
||||
newPolarInitNode->payloadBits = SL_NR_POLAR_PSBCH_PAYLOAD_BITS;
|
||||
newPolarInitNode->encoderLength = SL_NR_POLAR_PSBCH_E_NORMAL_CP;
|
||||
newPolarInitNode->crcCorrectionBits = SL_NR_POLAR_PSBCH_CRC_ERROR_CORRECTION_BITS;
|
||||
newPolarInitNode->crc_generator_matrix = crc24c_generator_matrix(newPolarInitNode->payloadBits);//G_P
|
||||
LOG_D(PHY,"SIDELINK: Initializing polar parameters for PSBCH (K %d, E %d)\n",newPolarInitNode->payloadBits,newPolarInitNode->encoderLength);
|
||||
} else if (messageType == NR_POLAR_DCI_MESSAGE_TYPE || messageType == NR_POLAR_SCI_MESSAGE_TYPE || messageType == NR_POLAR_SCI2_MESSAGE_TYPE) {
|
||||
newPolarInitNode->n_max = NR_POLAR_DCI_N_MAX;
|
||||
newPolarInitNode->i_il = NR_POLAR_DCI_I_IL;
|
||||
newPolarInitNode->i_seg = NR_POLAR_DCI_I_SEG;
|
||||
newPolarInitNode->n_pc = NR_POLAR_DCI_N_PC;
|
||||
newPolarInitNode->n_pc_wm = NR_POLAR_DCI_N_PC_WM;
|
||||
newPolarInitNode->i_bil = NR_POLAR_DCI_I_BIL;
|
||||
newPolarInitNode->crcParityBits = NR_POLAR_DCI_CRC_PARITY_BITS;
|
||||
newPolarInitNode->payloadBits = messageLength;
|
||||
if (messageType == NR_POLAR_DCI_MESSAGE_TYPE)
|
||||
newPolarInitNode->encoderLength = aggregation_level * 108;
|
||||
else if (messageType == NR_POLAR_SCI_MESSAGE_TYPE)
|
||||
newPolarInitNode->encoderLength = aggregation_level * 18; // for SCI1A aggregartion_level helds the number of PRBs, so multiply by 9*2 bits per PRB (9 REs with PSCCH payload)
|
||||
else if (messageType == NR_POLAR_SCI2_MESSAGE_TYPE)
|
||||
newPolarInitNode->encoderLength = aggregation_level * 2; // for SCI2 aggregartion_level helds the number of REs so multiple by 2, QPSK )
|
||||
newPolarInitNode->crcCorrectionBits = NR_POLAR_DCI_CRC_ERROR_CORRECTION_BITS;
|
||||
newPolarInitNode->crc_generator_matrix = crc24c_generator_matrix(newPolarInitNode->payloadBits + newPolarInitNode->crcParityBits); // G_P
|
||||
//printf("Initializing polar parameters for DCI (K %d, E %d, L %d)\n",newPolarInitNode->payloadBits,newPolarInitNode->encoderLength,aggregation_level);
|
||||
|
||||
} else if (messageType == NR_POLAR_UCI_PUCCH_MESSAGE_TYPE) {
|
||||
} else {
|
||||
AssertFatal(1 == 0, "[nr_polar_init] Incorrect Message Type(%d)", messageType);
|
||||
}
|
||||
|
||||
@@ -572,7 +572,7 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB)
|
||||
|
||||
nr_generate_modulation_table();
|
||||
gNB->pdcch_gold_init = cfg->cell_config.phy_cell_id.value;
|
||||
nr_init_pdcch_dmrs(gNB, cfg->cell_config.phy_cell_id.value);
|
||||
nr_init_pdcch_dmrs(&gNB->frame_parms,gNB->nr_gold_pdcch_dmrs, cfg->cell_config.phy_cell_id.value);
|
||||
nr_init_pbch_interleaver(gNB->nr_pbch_interleaver);
|
||||
|
||||
//PDSCH DMRS init
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "PHY/MODULATION/nr_modulation.h"
|
||||
#include "PHY/NR_UE_TRANSPORT/nr_transport_ue.h"
|
||||
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_ulsch.h"
|
||||
#include "PHY/NR_REFSIG/pss_nr.h"
|
||||
#include "PHY/NR_REFSIG/ul_ref_seq_nr.h"
|
||||
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
|
||||
@@ -35,6 +36,9 @@
|
||||
#include "PHY/MODULATION/nr_modulation.h"
|
||||
#include "openair2/COMMON/prs_nr_paramdef.h"
|
||||
#include "SCHED_NR_UE/harq_nr.h"
|
||||
#include "PHY/NR_REFSIG/nr_mod_table.h"
|
||||
#include <math.h>
|
||||
#include <complex.h>
|
||||
|
||||
void RCconfig_nrUE_prs(void *cfg)
|
||||
{
|
||||
@@ -296,8 +300,12 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB)
|
||||
// init RX buffers
|
||||
common_vars->rxdata = malloc16(fp->nb_antennas_rx * sizeof(c16_t *));
|
||||
|
||||
int num_samples = 2 * fp->samples_per_frame + fp->ofdm_symbol_size;
|
||||
if (ue->sl_mode == 2)
|
||||
num_samples = (SL_NR_PSBCH_REPETITION_IN_FRAMES * fp->samples_per_frame) + fp->ofdm_symbol_size;
|
||||
|
||||
for (i=0; i<fp->nb_antennas_rx; i++) {
|
||||
common_vars->rxdata[i] = malloc16_clear((2 * (fp->samples_per_frame) + fp->ofdm_symbol_size) * sizeof(c16_t));
|
||||
common_vars->rxdata[i] = malloc16_clear(num_samples * sizeof(c16_t));
|
||||
}
|
||||
|
||||
// ceil(((NB_RB<<1)*3)/32) // 3 RE *2(QPSK)
|
||||
@@ -384,6 +392,15 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void sl_ue_free(PHY_VARS_NR_UE *UE) {
|
||||
|
||||
if (UE->SL_UE_PHY_PARAMS.init_params.sl_pss_for_correlation) {
|
||||
free_and_zero(UE->SL_UE_PHY_PARAMS.init_params.sl_pss_for_correlation[0]);
|
||||
free_and_zero(UE->SL_UE_PHY_PARAMS.init_params.sl_pss_for_correlation[1]);
|
||||
free_and_zero(UE->SL_UE_PHY_PARAMS.init_params.sl_pss_for_correlation);
|
||||
}
|
||||
}
|
||||
|
||||
void term_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB)
|
||||
{
|
||||
const NR_DL_FRAME_PARMS* fp = &ue->frame_parms;
|
||||
@@ -489,6 +506,8 @@ void term_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB)
|
||||
|
||||
free_and_zero(ue->prs_vars[idx]);
|
||||
}
|
||||
|
||||
sl_ue_free(ue);
|
||||
}
|
||||
|
||||
void free_nr_ue_dl_harq(NR_DL_UE_HARQ_t harq_list[2][NR_MAX_DLSCH_HARQ_PROCESSES], int number_of_processes, int num_rb) {
|
||||
@@ -540,8 +559,10 @@ void term_nr_ue_transport(PHY_VARS_NR_UE *ue)
|
||||
{
|
||||
const int N_RB_DL = ue->frame_parms.N_RB_DL;
|
||||
const int N_RB_UL = ue->frame_parms.N_RB_UL;
|
||||
const int N_RB_SL = ue->SL_UE_PHY_PARAMS.sl_frame_params.N_RB_SL;
|
||||
free_nr_ue_dl_harq(ue->dl_harq_processes, NR_MAX_DLSCH_HARQ_PROCESSES, N_RB_DL);
|
||||
free_nr_ue_ul_harq(ue->ul_harq_processes, NR_MAX_ULSCH_HARQ_PROCESSES, N_RB_UL, ue->frame_parms.nb_antennas_tx);
|
||||
free_nr_ue_ul_harq(ue->sl_harq_processes, NR_MAX_SLSCH_HARQ_PROCESSES, N_RB_SL, ue->SL_UE_PHY_PARAMS.sl_frame_params.nb_antennas_tx);
|
||||
}
|
||||
|
||||
void nr_init_dl_harq_processes(NR_DL_UE_HARQ_t harq_list[2][NR_MAX_DLSCH_HARQ_PROCESSES], int number_of_processes, int num_rb) {
|
||||
@@ -624,6 +645,7 @@ void init_nr_ue_transport(PHY_VARS_NR_UE *ue) {
|
||||
|
||||
nr_init_dl_harq_processes(ue->dl_harq_processes, NR_MAX_DLSCH_HARQ_PROCESSES, ue->frame_parms.N_RB_DL);
|
||||
nr_init_ul_harq_processes(ue->ul_harq_processes, NR_MAX_ULSCH_HARQ_PROCESSES, ue->frame_parms.N_RB_UL, ue->frame_parms.nb_antennas_tx);
|
||||
nr_init_ul_harq_processes(ue->sl_harq_processes, NR_MAX_SLSCH_HARQ_PROCESSES, ue->SL_UE_PHY_PARAMS.sl_frame_params.N_RB_SL, ue->frame_parms.nb_antennas_tx);
|
||||
|
||||
for(int i=0; i<5; i++)
|
||||
ue->dl_stats[i] = 0;
|
||||
@@ -634,7 +656,8 @@ void init_N_TA_offset(PHY_VARS_NR_UE *ue){
|
||||
|
||||
NR_DL_FRAME_PARMS *fp = &ue->frame_parms;
|
||||
|
||||
if (fp->frame_type == FDD) {
|
||||
// No timing offset for Sidelink, refer to 3GPP 38.211 Section 8.5
|
||||
if (fp->frame_type == FDD || ue->sl_mode == 2) {
|
||||
ue->N_TA_offset = 0;
|
||||
} else {
|
||||
int N_TA_offset = fp->ul_CarrierFreq < 6e9 ? 400 : 431; // reference samples for 25600Tc @ 30.72 Ms/s for FR1, same @ 61.44 Ms/s for FR2
|
||||
@@ -686,3 +709,364 @@ void phy_term_nr_top(void)
|
||||
free_ul_reference_signal_sequences();
|
||||
free_context_synchro_nr();
|
||||
}
|
||||
|
||||
static void sl_init_psbch_dmrs_gold_sequences(PHY_VARS_NR_UE *UE)
|
||||
{
|
||||
unsigned int x1, x2;
|
||||
uint16_t slss_id;
|
||||
uint8_t reset;
|
||||
|
||||
for (slss_id = 0; slss_id < SL_NR_NUM_SLSS_IDs; slss_id++) {
|
||||
|
||||
reset = 1;
|
||||
x2 = slss_id;
|
||||
|
||||
#ifdef SL_DEBUG_INIT
|
||||
printf("\nPSBCH DMRS GOLD SEQ for SLSSID :%d :\n", slss_id);
|
||||
#endif
|
||||
|
||||
for (uint8_t n=0; n<SL_NR_NUM_PSBCH_DMRS_RE_DWORD; n++) {
|
||||
UE->SL_UE_PHY_PARAMS.init_params.psbch_dmrs_gold_sequences[slss_id][n] = lte_gold_generic(&x1, &x2, reset);
|
||||
reset = 0;
|
||||
|
||||
#ifdef SL_DEBUG_INIT_DATA
|
||||
printf("%x\n",SL_UE_INIT_PARAMS.sl_psbch_dmrs_gold_sequences[slss_id][n]);
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void sl_generate_psbch_dmrs_qpsk_sequences(PHY_VARS_NR_UE *UE,
|
||||
struct complex16 *modulated_dmrs_sym,
|
||||
uint16_t slss_id) {
|
||||
|
||||
uint8_t idx = 0;
|
||||
uint32_t *sl_dmrs_sequence = UE->SL_UE_PHY_PARAMS.init_params.psbch_dmrs_gold_sequences[slss_id];
|
||||
|
||||
#ifdef SL_DEBUG_INIT
|
||||
printf("SIDELINK INIT: PSBCH DMRS Generation with slss_id:%d\n", slss_id);
|
||||
#endif
|
||||
|
||||
/// QPSK modulation
|
||||
for (int m=0; m<SL_NR_NUM_PSBCH_DMRS_RE; m++) {
|
||||
|
||||
idx = (((sl_dmrs_sequence[(m<<1)>>5])>>((m<<1)&0x1f))&3);
|
||||
modulated_dmrs_sym[m].r = nr_qpsk_mod_table[2*idx];
|
||||
modulated_dmrs_sym[m].i = nr_qpsk_mod_table[(2*idx) + 1];
|
||||
|
||||
#ifdef SL_DEBUG_INIT_DATA
|
||||
printf("m:%d gold seq: %d b0-b1: %d-%d DMRS Symbols: %d %d\n", m, sl_dmrs_sequence[(m<<1)>>5], (((sl_dmrs_sequence[(m<<1)>>5])>>((m<<1)&0x1f))&1),
|
||||
(((sl_dmrs_sequence[((m<<1)+1)>>5])>>(((m<<1)+1)&0x1f))&1), modulated_dmrs_sym[m].r, modulated_dmrs_sym[m].i);
|
||||
printf("idx:%d, qpsk_table.r:%d, qpsk_table.i:%d\n", idx, nr_qpsk_mod_table[2*idx], nr_qpsk_mod_table[(2*idx) + 1]);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef SL_DUMP_INIT_SAMPLES
|
||||
char filename[40], varname[25];
|
||||
sprintf(filename,"sl_psbch_dmrs_slssid_%d.m", slss_id);
|
||||
sprintf(varname,"sl_dmrs_id_%d.m", slss_id);
|
||||
LOG_M(filename, varname, (void*)modulated_dmrs_sym, SL_NR_NUM_PSBCH_DMRS_RE, 1, 1);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
static void sl_generate_pss(SL_NR_UE_INIT_PARAMS_t *sl_init_params, uint8_t n_sl_id2, uint16_t scaling) {
|
||||
|
||||
int i = 0, m = 0;
|
||||
int16_t x[SL_NR_PSS_SEQUENCE_LENGTH];
|
||||
const int x_initial[7] = {0, 1, 1 , 0, 1, 1, 1};
|
||||
int16_t *sl_pss = sl_init_params->sl_pss[n_sl_id2];
|
||||
int16_t *sl_pss_for_sync = sl_init_params->sl_pss_for_sync[n_sl_id2];
|
||||
|
||||
LOG_D(PHY, "SIDELINK PSBCH INIT: PSS Generation with N_SL_id2:%d\n", n_sl_id2);
|
||||
|
||||
#ifdef SL_DEBUG_INIT
|
||||
printf("SIDELINK: PSS Generation with N_SL_id2:%d\n", n_sl_id2);
|
||||
#endif
|
||||
|
||||
/// Sequence generation
|
||||
for (i=0; i < 7; i++)
|
||||
x[i] = x_initial[i];
|
||||
|
||||
for (i=0; i < (SL_NR_PSS_SEQUENCE_LENGTH - 7); i++) {
|
||||
x[i+7] = (x[i + 4] + x[i]) %2;
|
||||
}
|
||||
|
||||
for (i=0; i < SL_NR_PSS_SEQUENCE_LENGTH; i++) {
|
||||
m = (i + 22 + 43*n_sl_id2) % SL_NR_PSS_SEQUENCE_LENGTH;
|
||||
sl_pss_for_sync[i] = (1 - 2*x[m]);
|
||||
sl_pss[i] = sl_pss_for_sync[i] * scaling;
|
||||
|
||||
#ifdef SL_DEBUG_INIT_DATA
|
||||
printf("m:%d, sl_pss[%d]:%d\n", m, i, sl_pss[i]);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#ifdef SL_DUMP_INIT_SAMPLES
|
||||
LOG_M("sl_pss_seq.m", "sl_pss", (void*)sl_pss, SL_NR_PSS_SEQUENCE_LENGTH, 1, 0);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
static void sl_generate_sss(SL_NR_UE_INIT_PARAMS_t *sl_init_params, uint16_t slss_id, uint16_t scaling) {
|
||||
|
||||
int i = 0;
|
||||
int m0, m1;
|
||||
int n_sl_id1, n_sl_id2;
|
||||
int16_t *sl_sss = sl_init_params->sl_sss[slss_id];
|
||||
int16_t *sl_sss_for_sync = sl_init_params->sl_sss_for_sync[slss_id];
|
||||
|
||||
int16_t x0[SL_NR_SSS_SEQUENCE_LENGTH], x1[SL_NR_SSS_SEQUENCE_LENGTH];
|
||||
const int x_initial[7] = { 1, 0, 0, 0, 0, 0, 0 };
|
||||
|
||||
n_sl_id1 = slss_id % 336;
|
||||
n_sl_id2 = slss_id / 336;
|
||||
|
||||
LOG_D(PHY, "SIDELINK INIT: SSS Generation with N_SL_id1:%d N_SL_id2:%d\n", n_sl_id1, n_sl_id2);
|
||||
|
||||
#ifdef SL_DEBUG_INIT
|
||||
printf("SIDELINK: SSS Generation with slss_id:%d, N_SL_id1:%d, N_SL_id2:%d\n", slss_id, n_sl_id1, n_sl_id2);
|
||||
#endif
|
||||
|
||||
for ( i=0 ; i < 7 ; i++) {
|
||||
x0[i] = x_initial[i];
|
||||
x1[i] = x_initial[i];
|
||||
}
|
||||
|
||||
for ( i=0 ; i < SL_NR_SSS_SEQUENCE_LENGTH - 7 ; i++) {
|
||||
x0[i+7] = (x0[i + 4] + x0[i]) % 2;
|
||||
x1[i+7] = (x1[i + 1] + x1[i]) % 2;
|
||||
}
|
||||
|
||||
m0 = 15*(n_sl_id1/112) + (5*n_sl_id2);
|
||||
m1 = n_sl_id1 % 112;
|
||||
|
||||
for (i = 0; i < SL_NR_SSS_SEQUENCE_LENGTH ; i++) {
|
||||
sl_sss_for_sync[i] = (1 - 2*x0[(i + m0) % SL_NR_SSS_SEQUENCE_LENGTH] ) * (1 - 2*x1[(i + m1) % SL_NR_SSS_SEQUENCE_LENGTH] );
|
||||
sl_sss[i] = sl_sss_for_sync[i] * scaling;
|
||||
|
||||
#ifdef SL_DEBUG_INIT_DATA
|
||||
printf("m0:%d, m1:%d, sl_sss_for_sync[%d]:%d, sl_sss[%d]:%d\n", m0, m1, i, sl_sss_for_sync[i], i, sl_sss[i]);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#ifdef SL_DUMP_PSBCH_TX_SAMPLES
|
||||
LOG_M("sl_sss_seq.m", "sl_sss", (void*)sl_sss, SL_NR_SSS_SEQUENCE_LENGTH, 1, 0);
|
||||
LOG_M("sl_sss_forsync_seq.m", "sl_sss_for_sync", (void*)sl_sss_for_sync, SL_NR_SSS_SEQUENCE_LENGTH, 1, 0);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
// This cannot be done at init time as ofdm symbol size, ssb start subcarrier depends on configuration
|
||||
// done at SLSS read time.
|
||||
static void sl_generate_pss_ifft_samples(sl_nr_ue_phy_params_t *sl_ue_params, SL_NR_UE_INIT_PARAMS_t *sl_init_params) {
|
||||
|
||||
uint8_t id2 = 0;
|
||||
int16_t *sl_pss = NULL;
|
||||
NR_DL_FRAME_PARMS *sl_fp = &sl_ue_params->sl_frame_params;
|
||||
int16_t scaling_factor = AMP;
|
||||
|
||||
int16_t *pss_F = NULL; // IQ samples in freq domain
|
||||
int32_t *pss_T = NULL;
|
||||
|
||||
uint16_t k = 0;
|
||||
|
||||
pss_F = malloc16_clear(2*sizeof(int16_t) * sl_fp->ofdm_symbol_size);
|
||||
|
||||
LOG_I(PHY, "SIDELINK INIT: Generation of PSS time domain samples. scaling_factor:%d\n", scaling_factor);
|
||||
|
||||
for (id2 = 0; id2 < SL_NR_NUM_IDs_IN_PSS; id2++) {
|
||||
|
||||
k = sl_fp->first_carrier_offset + sl_fp->ssb_start_subcarrier + 2; // PSS in from REs 2-129
|
||||
if (k >= sl_fp->ofdm_symbol_size) k -= sl_fp->ofdm_symbol_size;
|
||||
|
||||
pss_T = &sl_init_params->sl_pss_for_correlation[id2][0];
|
||||
sl_pss = sl_init_params->sl_pss[id2];
|
||||
|
||||
memset(pss_T, 0, sl_fp->ofdm_symbol_size * sizeof(pss_T[0]));
|
||||
memset(pss_F, 0, sl_fp->ofdm_symbol_size * 2 * sizeof(pss_F[0]));
|
||||
|
||||
for (int i=0; i < SL_NR_PSS_SEQUENCE_LENGTH; i++) {
|
||||
|
||||
pss_F[2*k] = (sl_pss[i] * scaling_factor) >> 15;
|
||||
//pss_F[2*k] = (sl_pss[i]/23170) * 4192;
|
||||
//pss_F[2*k+1] = 0;
|
||||
|
||||
#ifdef SL_DEBUG_INIT_DATA
|
||||
printf("id:%d, k:%d, pss_F[%d]:%d, sl_pss[%d]:%d\n", id2, k, 2*k, pss_F[2*k], i, sl_pss[i]);
|
||||
#endif
|
||||
|
||||
k++;
|
||||
if (k == sl_fp->ofdm_symbol_size) k=0;
|
||||
|
||||
}
|
||||
|
||||
idft((int16_t)get_idft(sl_fp->ofdm_symbol_size),
|
||||
pss_F, /* complex input */
|
||||
(int16_t *)&pss_T[0], /* complex output */
|
||||
1); /* scaling factor */
|
||||
|
||||
}
|
||||
|
||||
#ifdef SL_DUMP_PSBCH_TX_SAMPLES
|
||||
LOG_M("sl_pss_TD_id0.m", "pss_TD_0", (void*)sl_init_params->sl_pss_for_correlation[0], sl_fp->ofdm_symbol_size, 1, 1);
|
||||
LOG_M("sl_pss_TD_id1.m", "pss_TD_1", (void*)sl_init_params->sl_pss_for_correlation[1], sl_fp->ofdm_symbol_size, 1, 1);
|
||||
#endif
|
||||
|
||||
free(pss_F);
|
||||
|
||||
}
|
||||
|
||||
void init_ul_delay_table(NR_DL_FRAME_PARMS *fp)
|
||||
{
|
||||
for (int delay = -MAX_UL_DELAY_COMP; delay <= MAX_UL_DELAY_COMP; delay++) {
|
||||
for (int k = 0; k < fp->ofdm_symbol_size; k++) {
|
||||
double complex delay_cexp = cexp(I * (2.0 * M_PI * k * delay / fp->ofdm_symbol_size));
|
||||
fp->ul_delay_table[MAX_UL_DELAY_COMP + delay][k].r = (int16_t)round(256 * creal(delay_cexp));
|
||||
fp->ul_delay_table[MAX_UL_DELAY_COMP + delay][k].i = (int16_t)round(256 * cimag(delay_cexp));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void sl_ue_phy_init(PHY_VARS_NR_UE *UE) {
|
||||
|
||||
uint16_t scaling_value = ONE_OVER_SQRT2_Q15;
|
||||
|
||||
NR_DL_FRAME_PARMS *sl_fp = &UE->SL_UE_PHY_PARAMS.sl_frame_params;
|
||||
|
||||
if (!UE->SL_UE_PHY_PARAMS.init_params.sl_pss_for_correlation) {
|
||||
UE->SL_UE_PHY_PARAMS.init_params.sl_pss_for_correlation = (int32_t **)malloc16_clear(SL_NR_NUM_IDs_IN_PSS *sizeof(int32_t *) );
|
||||
UE->SL_UE_PHY_PARAMS.init_params.sl_pss_for_correlation[0] = (int32_t *)malloc16_clear( sizeof(int32_t)*sl_fp->ofdm_symbol_size);
|
||||
UE->SL_UE_PHY_PARAMS.init_params.sl_pss_for_correlation[1] = (int32_t *)malloc16_clear( sizeof(int32_t)*sl_fp->ofdm_symbol_size);
|
||||
}
|
||||
LOG_I(PHY, "SIDELINK INIT: GENERATE PSS, SSS, GOLD SEQUENCES AND PSBCH DMRS SEQUENCES FOR ALL possible SLSS IDs 0- 671\n");
|
||||
|
||||
// Generate PSS sequences for IDs 0,1 used in PSS
|
||||
sl_generate_pss(&UE->SL_UE_PHY_PARAMS.init_params,0, scaling_value);
|
||||
sl_generate_pss(&UE->SL_UE_PHY_PARAMS.init_params,1, scaling_value);
|
||||
|
||||
// Generate psbch dmrs Gold Sequences and modulated dmrs symbols
|
||||
sl_init_psbch_dmrs_gold_sequences(UE);
|
||||
// Generate pscch dmrs Gold Sequences
|
||||
UE->nr_gold_pscch_dmrs = (uint32_t ***)malloc16(sl_fp->slots_per_frame*sizeof(uint32_t **));
|
||||
uint32_t ***pscch_dmrs = UE->nr_gold_pscch_dmrs;
|
||||
AssertFatal(pscch_dmrs!=NULL, "NR init: pscch_dmrs malloc failed\n");
|
||||
int pscch_dmrs_init_length = (((sl_fp->N_RB_UL<<1)*3)>>5)+1;
|
||||
|
||||
for (int slot=0; slot<sl_fp->slots_per_frame; slot++) {
|
||||
pscch_dmrs[slot] = (uint32_t **)malloc16(sl_fp->symbols_per_slot*sizeof(uint32_t *));
|
||||
AssertFatal(pscch_dmrs[slot]!=NULL, "NR SL UE init: pscch_dmrs for slot %d - malloc failed\n", slot);
|
||||
|
||||
for (int symb=0; symb<sl_fp->symbols_per_slot; symb++) {
|
||||
pscch_dmrs[slot][symb] = (uint32_t *)malloc16(pscch_dmrs_init_length*sizeof(uint32_t));
|
||||
LOG_D(PHY,"pscch_dmrs[%d][%d] %p\n",slot,symb,pscch_dmrs[slot][symb]);
|
||||
AssertFatal(pscch_dmrs[slot][symb]!=NULL, "NR SL UE init: pscch_dmrs for slot %d symbol %d - malloc failed\n", slot, symb);
|
||||
}
|
||||
}
|
||||
|
||||
nr_init_pdcch_dmrs(sl_fp,UE->nr_gold_pscch_dmrs, UE->SL_UE_PHY_PARAMS.sl_config.sl_DMRS_ScrambleId);
|
||||
|
||||
// PSCCH DMRS RX
|
||||
UE->nr_gold_pscch = malloc16(sl_fp->slots_per_frame * sizeof(uint32_t **));
|
||||
uint32_t ***pscch_dmrs_rx = UE->nr_gold_pscch;
|
||||
AssertFatal(pscch_dmrs_rx!=NULL, "NR init: pscch_dmrs malloc failed\n");
|
||||
|
||||
for (int slot=0; slot<sl_fp->slots_per_frame; slot++) {
|
||||
pscch_dmrs_rx[slot] = malloc16(sl_fp->symbols_per_slot * sizeof(uint32_t *));
|
||||
AssertFatal(pscch_dmrs_rx[slot]!=NULL, "NR init: pscch_dmrs for slot %d - malloc failed\n", slot);
|
||||
|
||||
for (int symb=0; symb<sl_fp->symbols_per_slot; symb++) {
|
||||
pscch_dmrs_rx[slot][symb] = malloc16(pscch_dmrs_init_length * sizeof(uint32_t));
|
||||
AssertFatal(pscch_dmrs[slot][symb]!=NULL, "NR init: pscch_dmrs for slot %d symbol %d - malloc failed\n", slot, symb);
|
||||
}
|
||||
}
|
||||
|
||||
nr_gold_pdcch(sl_fp, pscch_dmrs_rx,UE->SL_UE_PHY_PARAMS.sl_config.sl_DMRS_ScrambleId);
|
||||
|
||||
// SSS
|
||||
for (int slss_id = 0; slss_id < SL_NR_NUM_SLSS_IDs; slss_id++) {
|
||||
sl_generate_psbch_dmrs_qpsk_sequences(UE, UE->SL_UE_PHY_PARAMS.init_params.psbch_dmrs_modsym[slss_id], slss_id);
|
||||
sl_generate_sss(&UE->SL_UE_PHY_PARAMS.init_params, slss_id, scaling_value);
|
||||
}
|
||||
|
||||
// Generate PSS time domain samples used for correlation during SLSS reception.
|
||||
sl_generate_pss_ifft_samples(&UE->SL_UE_PHY_PARAMS, &UE->SL_UE_PHY_PARAMS.init_params);
|
||||
|
||||
|
||||
UE->max_nb_slsch = NR_SLSCH_RX_MAX;
|
||||
UE->slsch = (NR_gNB_ULSCH_t *)malloc16(UE->max_nb_slsch * sizeof(NR_gNB_ULSCH_t));
|
||||
for (int i = 0; i < UE->max_nb_slsch; i++) {
|
||||
LOG_I(PHY, "Allocating Transport Channel Buffers for SLSCH %d/%d\n", i, UE->max_nb_slsch);
|
||||
UE->slsch[i] = new_gNB_ulsch(UE->max_ldpc_iterations, sl_fp->N_RB_UL);
|
||||
}
|
||||
|
||||
int Prx=sl_fp->nb_antennas_rx;
|
||||
int N_RB_UL = sl_fp->N_RB_UL;
|
||||
int n_buf = 2*Prx;
|
||||
|
||||
int nb_re_pusch = N_RB_UL * NR_NB_SC_PER_RB;
|
||||
int nb_re_pusch2 = nb_re_pusch + (nb_re_pusch&7);
|
||||
UE->pssch_thres = 10;
|
||||
UE->pssch_vars = (NR_gNB_PUSCH *)malloc16_clear(UE->max_nb_slsch * sizeof(NR_gNB_PUSCH));
|
||||
for (int SLSCH_id = 0; SLSCH_id < NR_SLSCH_RX_MAX; SLSCH_id++) {
|
||||
NR_gNB_PUSCH *pssch = &UE->pssch_vars[SLSCH_id];
|
||||
pssch->rxdataF_ext = (int32_t **)malloc16(Prx * sizeof(int32_t *));
|
||||
pssch->ul_ch_estimates = (int32_t **)malloc16(n_buf * sizeof(int32_t *));
|
||||
pssch->ul_ch_estimates_ext = (int32_t **)malloc16(n_buf * sizeof(int32_t *));
|
||||
pssch->ptrs_phase_per_slot = (int32_t **)malloc16(n_buf * sizeof(int32_t *));
|
||||
pssch->ul_ch_estimates_time = (int32_t **)malloc16(n_buf * sizeof(int32_t *));
|
||||
pssch->rxdataF_comp = (int32_t **)malloc16(n_buf * sizeof(int32_t *));
|
||||
pssch->ul_ch_mag0 = (int32_t **)malloc16(n_buf * sizeof(int32_t *));
|
||||
pssch->ul_ch_magb0 = (int32_t **)malloc16(n_buf * sizeof(int32_t *));
|
||||
pssch->ul_ch_magc0 = (int32_t **)malloc16(n_buf * sizeof(int32_t *));
|
||||
pssch->ul_ch_mag = (int32_t **)malloc16(n_buf * sizeof(int32_t *));
|
||||
pssch->ul_ch_magb = (int32_t **)malloc16(n_buf * sizeof(int32_t *));
|
||||
pssch->ul_ch_magc = (int32_t **)malloc16(n_buf * sizeof(int32_t *));
|
||||
pssch->rho = (int32_t ***)malloc16(Prx * sizeof(int32_t **));
|
||||
pssch->llr_layers = (int16_t **)malloc16(2 * sizeof(int32_t *));
|
||||
for (int i = 0; i < Prx; i++) {
|
||||
pssch->rxdataF_ext[i] = (int32_t *)malloc16_clear(sizeof(int32_t) * nb_re_pusch2 * sl_fp->symbols_per_slot);
|
||||
pssch->rho[i] = (int32_t **)malloc16_clear(2 * 2 * sizeof(int32_t *));
|
||||
|
||||
for (int j = 0; j < 2; j++) {
|
||||
for (int k = 0; k < 2; k++) {
|
||||
pssch->rho[i][j * 2 + k] =
|
||||
(int32_t *)malloc16_clear(sizeof(int32_t) * nb_re_pusch2 * sl_fp->symbols_per_slot);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < n_buf; i++) {
|
||||
pssch->ul_ch_estimates[i] = (int32_t *)malloc16_clear(sizeof(int32_t) * sl_fp->ofdm_symbol_size * sl_fp->symbols_per_slot);
|
||||
pssch->ul_ch_estimates_ext[i] = (int32_t *)malloc16_clear(sizeof(int32_t) * nb_re_pusch2 * sl_fp->symbols_per_slot);
|
||||
pssch->ul_ch_estimates_time[i] = (int32_t *)malloc16_clear(sizeof(int32_t) * sl_fp->ofdm_symbol_size);
|
||||
pssch->ptrs_phase_per_slot[i] = (int32_t *)malloc16_clear(sizeof(int32_t) * sl_fp->symbols_per_slot); // symbols per slot
|
||||
pssch->rxdataF_comp[i] = (int32_t *)malloc16_clear(sizeof(int32_t) * nb_re_pusch2 * sl_fp->symbols_per_slot);
|
||||
pssch->ul_ch_mag0[i] = (int32_t *)malloc16_clear(sizeof(int32_t) * nb_re_pusch2 * sl_fp->symbols_per_slot);
|
||||
pssch->ul_ch_magb0[i] = (int32_t *)malloc16_clear(sizeof(int32_t) * nb_re_pusch2 * sl_fp->symbols_per_slot);
|
||||
pssch->ul_ch_magc0[i] = (int32_t *)malloc16_clear(sizeof(int32_t) * nb_re_pusch2 * sl_fp->symbols_per_slot);
|
||||
pssch->ul_ch_mag[i] = (int32_t *)malloc16_clear(sizeof(int32_t) * nb_re_pusch2 * sl_fp->symbols_per_slot);
|
||||
pssch->ul_ch_magb[i] = (int32_t *)malloc16_clear(sizeof(int32_t) * nb_re_pusch2 * sl_fp->symbols_per_slot);
|
||||
pssch->ul_ch_magc[i] = (int32_t *)malloc16_clear(sizeof(int32_t) * nb_re_pusch2 * sl_fp->symbols_per_slot);
|
||||
}
|
||||
|
||||
for (int i=0; i< 2; i++) {
|
||||
pssch->llr_layers[i] = (int16_t *)malloc16_clear((8 * ((3 * 8 * 6144) + 12))
|
||||
* sizeof(int16_t)); // [hna] 6144 is LTE and (8*((3*8*6144)+12)) is not clear
|
||||
}
|
||||
pssch->llr = (int16_t *)malloc16_clear((8 * ((3 * 8 * 6144) + 12))
|
||||
* sizeof(int16_t)); // [hna] 6144 is LTE and (8*((3*8*6144)+12)) is not clear
|
||||
pssch->ul_valid_re_per_slot = (int16_t *)malloc16_clear(sizeof(int16_t) * sl_fp->symbols_per_slot);
|
||||
} // ulsch_id
|
||||
UE->sl_measurements = calloc(1,sizeof(struct PHY_MEASUREMENTS_gNB_s));
|
||||
|
||||
|
||||
init_ul_delay_table(sl_fp);
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "common/utils/nr/nr_common.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "executables/softmodem-common.h"
|
||||
#include "PHY/MODULATION/nr_modulation.h"
|
||||
|
||||
/// Subcarrier spacings in Hz indexed by numerology index
|
||||
static const uint32_t nr_subcarrier_spacing[MAX_NUM_SUBCARRIER_SPACING] = {15e3, 30e3, 60e3, 120e3, 240e3};
|
||||
@@ -42,18 +43,6 @@ static const int nr_ssb_table[48][3] = {
|
||||
{93, 15, nr_ssb_type_A}, {94, 15, nr_ssb_type_A}, {96, 30, nr_ssb_type_C}};
|
||||
|
||||
void set_Lmax(NR_DL_FRAME_PARMS *fp) {
|
||||
if (get_softmodem_params()->sl_mode == 2) {
|
||||
int sl_NumSSB_WithinPeriod = 1; //TODO: Needs to be updated from RRC parameters
|
||||
int sl_TimeOffsetSSB = 1; //TODO: Needs to be updated from RRC parameters
|
||||
int sl_TimeInterval = 1; //TODO: Needs to be updated from RRC parameters
|
||||
if ((sl_NumSSB_WithinPeriod == 4) && ((sl_TimeOffsetSSB % fp->slots_per_frame) + 3 * sl_TimeInterval < NR_NUMBER_OF_SUBFRAMES_PER_FRAME * 2))
|
||||
fp->Lmax = 4;
|
||||
else if ((sl_NumSSB_WithinPeriod == 2) && ((sl_TimeOffsetSSB % fp->slots_per_frame) + sl_TimeInterval < NR_NUMBER_OF_SUBFRAMES_PER_FRAME))
|
||||
fp->Lmax = 2;
|
||||
else
|
||||
fp->Lmax = 1;
|
||||
return;
|
||||
}
|
||||
// definition of Lmax according to ts 38.213 section 4.1
|
||||
if (fp->dl_CarrierFreq < 6e9) {
|
||||
if(fp->frame_type && (fp->ssb_type==2))
|
||||
@@ -115,23 +104,27 @@ void set_scs_parameters (NR_DL_FRAME_PARMS *fp, int mu, int N_RB_DL)
|
||||
case NR_MU_0: //15kHz scs
|
||||
fp->subcarrier_spacing = nr_subcarrier_spacing[NR_MU_0];
|
||||
fp->slots_per_subframe = nr_slots_per_subframe[NR_MU_0];
|
||||
fp->ssb_type = nr_ssb_type_A;
|
||||
while(nr_ssb_table[idx][0]!=fp->nr_band)
|
||||
idx++;
|
||||
AssertFatal(nr_ssb_table[idx][1]==15,"SCS %d not applicable to band %d\n",
|
||||
fp->subcarrier_spacing,fp->nr_band);
|
||||
if (fp->nr_band != 47) {
|
||||
fp->ssb_type = nr_ssb_type_A;
|
||||
while(nr_ssb_table[idx][0]!=fp->nr_band)
|
||||
idx++;
|
||||
AssertFatal(nr_ssb_table[idx][1]==15,"SCS %d not applicable to band %d\n",
|
||||
fp->subcarrier_spacing,fp->nr_band);
|
||||
}
|
||||
break;
|
||||
|
||||
case NR_MU_1: //30kHz scs
|
||||
fp->subcarrier_spacing = nr_subcarrier_spacing[NR_MU_1];
|
||||
fp->slots_per_subframe = nr_slots_per_subframe[NR_MU_1];
|
||||
while(nr_ssb_table[idx][0]!=fp->nr_band ||
|
||||
nr_ssb_table[idx][1]!=30) {
|
||||
AssertFatal(nr_ssb_table[idx][0]<=fp->nr_band,"SCS %d not applicable to band %d\n",
|
||||
fp->subcarrier_spacing,fp->nr_band);
|
||||
idx++;
|
||||
if (fp->nr_band != 47) {
|
||||
while(nr_ssb_table[idx][0]!=fp->nr_band ||
|
||||
nr_ssb_table[idx][1]!=30) {
|
||||
AssertFatal(nr_ssb_table[idx][0]<=fp->nr_band,"SCS %d not applicable to band %d\n",
|
||||
fp->subcarrier_spacing,fp->nr_band);
|
||||
idx++;
|
||||
}
|
||||
fp->ssb_type = nr_ssb_table[idx][2];
|
||||
}
|
||||
fp->ssb_type = nr_ssb_table[idx][2];
|
||||
break;
|
||||
|
||||
case NR_MU_2: //60kHz scs
|
||||
@@ -164,9 +157,6 @@ void set_scs_parameters (NR_DL_FRAME_PARMS *fp, int mu, int N_RB_DL)
|
||||
fp->ofdm_symbol_size <<= 1;
|
||||
|
||||
fp->first_carrier_offset = fp->ofdm_symbol_size - (N_RB_DL * 12 / 2);
|
||||
// TODO: Temporarily setting fp->first_carrier_offset = 0 for SL until MAC is developed
|
||||
if (get_softmodem_params()->sl_mode == 2)
|
||||
fp->first_carrier_offset = 0;
|
||||
fp->nb_prefix_samples = fp->ofdm_symbol_size / 128 * 9;
|
||||
fp->nb_prefix_samples0 = fp->ofdm_symbol_size / 128 * (9 + (1 << mu));
|
||||
LOG_W(PHY,"Init: N_RB_DL %d, first_carrier_offset %d, nb_prefix_samples %d,nb_prefix_samples0 %d, ofdm_symbol_size %d\n",
|
||||
@@ -299,11 +289,6 @@ int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *fp,
|
||||
LOG_D(PHY,"dl_bw_kHz %lu\n",dl_bw_khz);
|
||||
LOG_D(PHY,"dl_CarrierFreq %lu\n",fp->dl_CarrierFreq);
|
||||
|
||||
if (get_softmodem_params()->sl_mode == 2) {
|
||||
uint64_t sl_bw_khz = (12 * config->carrier_config.sl_grid_size[config->ssb_config.scs_common]) * (15 << config->ssb_config.scs_common);
|
||||
fp->sl_CarrierFreq = ((sl_bw_khz >> 1) + config->carrier_config.sl_frequency) * 1000;
|
||||
}
|
||||
|
||||
uint64_t ul_bw_khz = (12*config->carrier_config.ul_grid_size[config->ssb_config.scs_common])*(15<<config->ssb_config.scs_common);
|
||||
fp->ul_CarrierFreq = ((ul_bw_khz>>1) + config->carrier_config.uplink_frequency)*1000 ;
|
||||
|
||||
@@ -329,7 +314,7 @@ int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *fp,
|
||||
AssertFatal(fp->numerology_index == NR_MU_2,"Invalid cyclic prefix %d for numerology index %d\n", Ncp, fp->numerology_index);
|
||||
|
||||
fp->Ncp = Ncp;
|
||||
int N_RB = (get_softmodem_params()->sl_mode == 2) ? fp->N_RB_SL : fp->N_RB_DL;
|
||||
int N_RB = fp->N_RB_DL;
|
||||
set_scs_parameters(fp, fp->numerology_index, N_RB);
|
||||
|
||||
fp->slots_per_frame = 10* fp->slots_per_subframe;
|
||||
@@ -354,10 +339,6 @@ int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *fp,
|
||||
}
|
||||
|
||||
fp->ssb_start_subcarrier = (12 * config->ssb_table.ssb_offset_point_a + sco);
|
||||
// TODO: Temporarily setting fp->ssb_start_subcarrier = 0 for SL until MAC is developed
|
||||
if (get_softmodem_params()->sl_mode == 2) {
|
||||
fp->ssb_start_subcarrier = 0;
|
||||
}
|
||||
set_Lmax(fp);
|
||||
|
||||
fp->L_ssb = (((uint64_t) config->ssb_table.ssb_mask_list[0].ssb_mask)<<32) | config->ssb_table.ssb_mask_list[1].ssb_mask;
|
||||
@@ -407,12 +388,6 @@ void nr_init_frame_parms_ue_sa(NR_DL_FRAME_PARMS *frame_parms, uint64_t downlink
|
||||
|
||||
}
|
||||
|
||||
void nr_init_frame_parms_ue_sl(NR_DL_FRAME_PARMS *frame_parms, uint64_t sidelink_frequency, uint16_t nr_band) {
|
||||
LOG_D(NR_PHY, "SL init parameters. SL freq %lu\n", sidelink_frequency);
|
||||
frame_parms->sl_CarrierFreq = sidelink_frequency;
|
||||
frame_parms->nr_band = nr_band;
|
||||
}
|
||||
|
||||
void nr_dump_frame_parms(NR_DL_FRAME_PARMS *fp)
|
||||
{
|
||||
LOG_I(PHY,"fp->scs=%d\n",fp->subcarrier_spacing);
|
||||
@@ -426,7 +401,109 @@ void nr_dump_frame_parms(NR_DL_FRAME_PARMS *fp)
|
||||
LOG_I(PHY,"fp->samples_per_frame=%d\n",fp->samples_per_frame);
|
||||
LOG_I(PHY,"fp->dl_CarrierFreq=%lu\n",fp->dl_CarrierFreq);
|
||||
LOG_I(PHY,"fp->ul_CarrierFreq=%lu\n",fp->ul_CarrierFreq);
|
||||
LOG_I(PHY,"fp->Nid_cell=%d\n",fp->Nid_cell);
|
||||
LOG_I(PHY,"fp->first_carrier_offset=%d\n",fp->first_carrier_offset);
|
||||
LOG_I(PHY,"fp->ssb_start_subcarrier=%d\n",fp->ssb_start_subcarrier);
|
||||
LOG_I(PHY,"fp->Ncp=%d\n",fp->Ncp);
|
||||
LOG_I(PHY,"fp->N_RB_DL=%d\n",fp->N_RB_DL);
|
||||
LOG_I(PHY,"fp->numerology_index=%d\n",fp->numerology_index);
|
||||
LOG_I(PHY,"fp->nr_band=%d\n",fp->nr_band);
|
||||
LOG_I(PHY,"fp->ofdm_offset_divisor=%d\n",fp->ofdm_offset_divisor);
|
||||
LOG_I(PHY,"fp->threequarter_fs=%d\n",fp->threequarter_fs);
|
||||
LOG_I(PHY,"fp->sl_CarrierFreq=%lu\n",fp->sl_CarrierFreq);
|
||||
LOG_I(PHY,"fp->N_RB_SL=%d\n",fp->N_RB_SL);
|
||||
}
|
||||
|
||||
int nr_init_frame_parms_ue_sl(NR_DL_FRAME_PARMS *fp,
|
||||
sl_nr_phy_config_request_t* config,
|
||||
int threequarter_fs,
|
||||
uint32_t ofdm_offset_divisor)
|
||||
{
|
||||
|
||||
//Set also these parameters here instead of some where else.
|
||||
fp->ofdm_offset_divisor = ofdm_offset_divisor;
|
||||
fp->threequarter_fs = threequarter_fs;
|
||||
|
||||
fp->nr_band = get_band(config->sl_carrier_config.sl_frequency*1000, 0);
|
||||
|
||||
fp->att_rx = config->sl_carrier_config.sl_num_rx_ant;
|
||||
fp->att_tx = config->sl_carrier_config.sl_num_tx_ant;
|
||||
fp->nb_antennas_rx = fp->att_rx;
|
||||
fp->nb_antennas_tx = fp->att_tx;
|
||||
|
||||
fp->numerology_index = config->sl_bwp_config.sl_scs;
|
||||
fp->N_RB_SL = config->sl_carrier_config.sl_grid_size;
|
||||
fp->N_RB_DL = fp->N_RB_SL;
|
||||
fp->N_RB_UL = fp->N_RB_SL;
|
||||
fp->Ncp = config->sl_bwp_config.sl_cyclic_prefix;
|
||||
|
||||
fp->frame_type = get_frame_type(fp->nr_band, fp->numerology_index);
|
||||
int32_t uplink_frequency_offset = get_delta_duplex(fp->nr_band, fp->numerology_index);
|
||||
uplink_frequency_offset *= 1000;
|
||||
|
||||
uint64_t bw_khz = (12*config->sl_carrier_config.sl_grid_size)*(15<<config->sl_bwp_config.sl_scs);
|
||||
//REfer to section 3GPP spec 38.101 5.4E.2.1
|
||||
//FrefV2x = Fref + deltashift + valueN*5Khz
|
||||
uint32_t deltashift = (config->sl_carrier_config.sl_frequency_shift_7p5khz) ? 7500 : 0; //In Hz
|
||||
deltashift += config->sl_carrier_config.sl_value_N * 5000; //In Hz
|
||||
fp->sl_CarrierFreq = ((bw_khz >> 1) + config->sl_carrier_config.sl_frequency)*1000 ;
|
||||
fp->sl_CarrierFreq += (deltashift >> 1);
|
||||
fp->dl_CarrierFreq = fp->sl_CarrierFreq;
|
||||
fp->ul_CarrierFreq = fp->dl_CarrierFreq + uplink_frequency_offset;
|
||||
|
||||
LOG_D(PHY,"bw_kHz %lu, deltashift:%d Hz\n",bw_khz,deltashift);
|
||||
LOG_D(PHY,"CarrierFreq %lu Hz\n",fp->sl_CarrierFreq);
|
||||
|
||||
LOG_I(PHY, "Initializing frame parms: DL frequency %lu Hz, UL frequency %lu Hz: band %d, uldl offset %d Hz\n",
|
||||
fp->dl_CarrierFreq, fp->ul_CarrierFreq, fp->nr_band, uplink_frequency_offset);
|
||||
|
||||
AssertFatal(fp->frame_type==TDD, "Sidelink bands only support TDD");
|
||||
|
||||
AssertFatal(fp->ul_CarrierFreq == (fp->dl_CarrierFreq + uplink_frequency_offset),
|
||||
"Disagreement in uplink frequency for band %d: ul_CarrierFreq = %lu Hz vs expected %lu Hz\n",
|
||||
fp->nr_band, fp->ul_CarrierFreq, fp->dl_CarrierFreq + uplink_frequency_offset);
|
||||
|
||||
LOG_I(PHY,"Initializing frame parms for mu %d, N_RB %d, Ncp %d\n",fp->numerology_index, fp->N_RB_DL, fp->Ncp);
|
||||
|
||||
if (fp->Ncp == EXTENDED)
|
||||
AssertFatal(fp->numerology_index == NR_MU_2,"Invalid cyclic prefix %d for numerology index %d\n",
|
||||
fp->Ncp, fp->numerology_index);
|
||||
|
||||
set_scs_parameters(fp, fp->numerology_index, fp->N_RB_SL);
|
||||
|
||||
fp->slots_per_frame = 10* fp->slots_per_subframe;
|
||||
fp->symbols_per_slot = ((fp->Ncp == NORMAL)? 14 : 12); // to redefine for different slot formats
|
||||
fp->samples_per_subframe_wCP = fp->ofdm_symbol_size * fp->symbols_per_slot * fp->slots_per_subframe;
|
||||
fp->samples_per_frame_wCP = 10 * fp->samples_per_subframe_wCP;
|
||||
fp->samples_per_slot_wCP = fp->symbols_per_slot*fp->ofdm_symbol_size;
|
||||
fp->samples_per_slotN0 = (fp->nb_prefix_samples + fp->ofdm_symbol_size) * fp->symbols_per_slot;
|
||||
fp->samples_per_slot0 = fp->nb_prefix_samples0 + ((fp->symbols_per_slot-1)*fp->nb_prefix_samples) + (fp->symbols_per_slot*fp->ofdm_symbol_size);
|
||||
fp->samples_per_subframe = (fp->nb_prefix_samples0 + fp->ofdm_symbol_size) * 2 +
|
||||
(fp->nb_prefix_samples + fp->ofdm_symbol_size) * (fp->symbols_per_slot * fp->slots_per_subframe - 2);
|
||||
fp->get_samples_per_slot = &get_samples_per_slot;
|
||||
fp->get_samples_slot_timestamp = &get_samples_slot_timestamp;
|
||||
fp->samples_per_frame = 10 * fp->samples_per_subframe;
|
||||
fp->freq_range = (fp->dl_CarrierFreq < 6e9)? nr_FR1 : nr_FR2;
|
||||
|
||||
//ssb_offset_pointa points to the first RE where Sidelink-PSBCH starts
|
||||
fp->ssb_start_subcarrier = config->sl_bwp_config.sl_ssb_offset_point_a;
|
||||
|
||||
|
||||
init_symbol_rotation(fp);
|
||||
init_timeshift_rotation(fp);
|
||||
|
||||
//Not used for Sidelink
|
||||
fp->Lmax = 0;
|
||||
fp->L_ssb = 0;
|
||||
fp->N_ssb = 0;
|
||||
fp->half_frame_bit = 0;
|
||||
fp->ssb_index = 0;
|
||||
fp->ssb_type = 0;
|
||||
|
||||
//#ifdef SL_DEBUG
|
||||
LOG_I(PHY, "Dumping Sidelink Frame Parameters\n");
|
||||
nr_dump_frame_parms(fp);
|
||||
//#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,10 @@ int nr_get_ssb_start_symbol(NR_DL_FRAME_PARMS *fp,uint8_t i_ssb);
|
||||
int nr_init_frame_parms(nfapi_nr_config_request_scf_t *config, NR_DL_FRAME_PARMS *frame_parms);
|
||||
int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *frame_parms, fapi_nr_config_request_t *config, uint16_t nr_band);
|
||||
void nr_init_frame_parms_ue_sa(NR_DL_FRAME_PARMS *frame_parms, uint64_t downlink_frequency, int32_t uplink_frequency_offset, uint8_t mu, uint16_t nr_band);
|
||||
void nr_init_frame_parms_ue_sl(NR_DL_FRAME_PARMS *frame_parms, uint64_t sidelink_frequency, uint16_t nr_band);
|
||||
int nr_init_frame_parms_ue_sl(NR_DL_FRAME_PARMS *fp,
|
||||
sl_nr_phy_config_request_t* config,
|
||||
int threequarter_fs,
|
||||
uint32_t ofdm_offset_divisor);
|
||||
int init_nr_ue_signal(PHY_VARS_NR_UE *ue,int nb_connected_eNB);
|
||||
void term_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB);
|
||||
void init_nr_ue_transport(PHY_VARS_NR_UE *ue);
|
||||
@@ -56,5 +59,6 @@ void free_nr_ue_ul_harq(NR_UL_UE_HARQ_t harq_list[NR_MAX_ULSCH_HARQ_PROCESSES],
|
||||
|
||||
void phy_init_nr_top(PHY_VARS_NR_UE *ue);
|
||||
void phy_term_nr_top(void);
|
||||
void sl_ue_phy_init(PHY_VARS_NR_UE *UE);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -49,9 +49,17 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue,
|
||||
int reset_freq_est);
|
||||
|
||||
int nr_slot_fep(PHY_VARS_NR_UE *ue,
|
||||
NR_DL_FRAME_PARMS *frame_parms,
|
||||
UE_nr_rxtx_proc_t *proc,
|
||||
unsigned char symbol,
|
||||
c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]);
|
||||
c16_t rxdataF[][frame_parms->samples_per_slot_wCP],
|
||||
uint32_t linktype);
|
||||
int sl_nr_slot_fep(PHY_VARS_NR_UE *ue,
|
||||
UE_nr_rxtx_proc_t *proc,
|
||||
unsigned char symbol,
|
||||
unsigned char Ns,
|
||||
uint32_t sample_offset,
|
||||
c16_t rxdataF[][ue->SL_UE_PHY_PARAMS.sl_frame_params.samples_per_slot_wCP]);
|
||||
|
||||
int nr_slot_fep_init_sync(PHY_VARS_NR_UE *ue,
|
||||
UE_nr_rxtx_proc_t *proc,
|
||||
|
||||
@@ -601,7 +601,7 @@ void init_symbol_rotation(NR_DL_FRAME_PARMS *fp) {
|
||||
uint64_t dl_CarrierFreq = fp->dl_CarrierFreq;
|
||||
uint64_t ul_CarrierFreq = fp->ul_CarrierFreq;
|
||||
uint64_t sl_CarrierFreq = fp->sl_CarrierFreq;
|
||||
double f[2] = {(double)dl_CarrierFreq, (double)ul_CarrierFreq};
|
||||
double f[3] = {(double)dl_CarrierFreq, (double)ul_CarrierFreq, (double)sl_CarrierFreq};
|
||||
|
||||
const int nsymb = fp->symbols_per_slot * fp->slots_per_frame/10;
|
||||
const double Tc=(1/480e3/4096);
|
||||
@@ -609,15 +609,12 @@ void init_symbol_rotation(NR_DL_FRAME_PARMS *fp) {
|
||||
const double Ncp0=16*64 + (144*64*(1/(float)(1<<fp->numerology_index)));
|
||||
const double Ncp1=(144*64*(1/(float)(1<<fp->numerology_index)));
|
||||
|
||||
for (uint8_t ll = 0; ll < 2; ll++){
|
||||
for (uint8_t ll = 0; ll < 3; ll++){
|
||||
|
||||
double f0 = f[ll];
|
||||
LOG_D(PHY, "Doing symbol rotation calculation for gNB TX/RX, f0 %f Hz, Nsymb %d\n", f0, nsymb);
|
||||
if (f0 == 0) continue;
|
||||
LOG_I(NR_PHY, "Doing symbol rotation calculation for gNB TX/RX, f0 %f Hz, Nsymb %d\n", f0, nsymb);
|
||||
c16_t *symbol_rotation = fp->symbol_rotation[ll];
|
||||
if (get_softmodem_params()->sl_mode == 2) {
|
||||
f0 = (double)sl_CarrierFreq;
|
||||
symbol_rotation = fp->symbol_rotation[link_type_sl];
|
||||
}
|
||||
|
||||
double tl = 0.0;
|
||||
double poff = 0.0;
|
||||
@@ -634,12 +631,12 @@ void init_symbol_rotation(NR_DL_FRAME_PARMS *fp) {
|
||||
}
|
||||
|
||||
poff = 2 * M_PI * (tl + (Ncp * Tc)) * f0;
|
||||
exp_re = cos(poff);
|
||||
exp_im = sin(-poff);
|
||||
exp_re = 1.0;//cos(poff);
|
||||
exp_im = 0.0;//sin(-poff);
|
||||
symbol_rotation[l].r = (int16_t)floor(exp_re * 32767);
|
||||
symbol_rotation[l].i = (int16_t)floor(exp_im * 32767);
|
||||
|
||||
LOG_D(PHY, "Symbol rotation %d/%d => tl %f (%d,%d) (%f)\n",
|
||||
LOG_I(PHY, "Symbol rotation %d/%d => tl %f (%d,%d) (%f)\n",
|
||||
l,
|
||||
nsymb,
|
||||
tl,
|
||||
|
||||
@@ -45,7 +45,6 @@ void normal_prefix_mod(int32_t *txdataF,int32_t *txdata,uint8_t nsymb,LTE_DL_FRA
|
||||
{
|
||||
|
||||
|
||||
|
||||
PHY_ofdm_mod((int *)txdataF, // input
|
||||
(int *)txdata, // output
|
||||
frame_parms->ofdm_symbol_size,
|
||||
@@ -67,6 +66,7 @@ void normal_prefix_mod(int32_t *txdataF,int32_t *txdata,uint8_t nsymb,LTE_DL_FRA
|
||||
void nr_normal_prefix_mod(c16_t *txdataF, c16_t *txdata, uint8_t nsymb, const NR_DL_FRAME_PARMS *frame_parms, uint32_t slot)
|
||||
{
|
||||
// This function works only slot wise. For more generic symbol generation refer nr_feptx0()
|
||||
LOG_D(NR_PHY,"normal_prefix_mod: prefix0 %d, prefix %d, nsymb %d\n",frame_parms->nb_prefix_samples0,frame_parms->nb_prefix_samples,nsymb);
|
||||
if (frame_parms->numerology_index != 0) { // case where numerology != 0
|
||||
if (!(slot%(frame_parms->slots_per_subframe/2))) {
|
||||
PHY_ofdm_mod((int *)txdataF,
|
||||
|
||||
@@ -131,7 +131,7 @@ int slot_fep(PHY_VARS_UE *ue,
|
||||
// (frame_parms->ofdm_symbol_size+nb_prefix_samples)*(l-1);
|
||||
#ifdef DEBUG_FEP
|
||||
// if (ue->frame <100)
|
||||
LOG_I(PHY,"slot_fep: frame %d: slot %d, symbol %d, nb_prefix_samples %d, nb_prefix_samples0 %d, slot_offset %d, subframe_offset %d, sample_offset %d,rx_offset %d, frame_length_samples %d\n",
|
||||
LOG_D(PHY,"slot_fep: frame %d: slot %d, symbol %d, nb_prefix_samples %d, nb_prefix_samples0 %d, slot_offset %d, subframe_offset %d, sample_offset %d,rx_offset %d, frame_length_samples %d\n",
|
||||
ue->proc.proc_rxtx[(Ns>>1)&1].frame_rx,Ns, symbol,
|
||||
nb_prefix_samples,nb_prefix_samples0,slot_offset,subframe_offset,sample_offset,rx_offset,frame_length_samples);
|
||||
#endif
|
||||
@@ -206,7 +206,7 @@ int slot_fep(PHY_VARS_UE *ue,
|
||||
}
|
||||
|
||||
#ifdef DEBUG_FEP
|
||||
printf("slot_fep: done\n");
|
||||
printf("slot_fep: Ns %d l %d, done\n",Ns,l);
|
||||
#endif
|
||||
return(0);
|
||||
}
|
||||
@@ -316,7 +316,7 @@ int front_end_fft(PHY_VARS_UE *ue,
|
||||
// (frame_parms->ofdm_symbol_size+nb_prefix_samples)*(l-1);
|
||||
#ifdef DEBUG_FEP
|
||||
// if (ue->frame <100)
|
||||
LOG_I(PHY,
|
||||
LOG_D(PHY,
|
||||
"slot_fep: frame %d: slot %d, threadId %d, symbol %d, nb_prefix_samples %d, nb_prefix_samples0 %d, slot_offset %d, subframe_offset %d, sample_offset %d,rx_offset %d, frame_length_samples %d\n",
|
||||
ue->proc.proc_rxtx[threadId].frame_rx,Ns, threadId,symbol,
|
||||
nb_prefix_samples,nb_prefix_samples0,slot_offset,subframe_offset,sample_offset,rx_offset,frame_length_samples);
|
||||
|
||||
@@ -34,12 +34,107 @@
|
||||
#define LOG_I(A,B...) printf(A)
|
||||
#endif*/
|
||||
|
||||
int nr_slot_fep(PHY_VARS_NR_UE *ue,
|
||||
int sl_nr_slot_fep(PHY_VARS_NR_UE *ue,
|
||||
UE_nr_rxtx_proc_t *proc,
|
||||
unsigned char symbol,
|
||||
c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP])
|
||||
unsigned char Ns,
|
||||
uint32_t sample_offset,
|
||||
c16_t rxdataF[][ue->SL_UE_PHY_PARAMS.sl_frame_params.samples_per_slot_wCP])
|
||||
{
|
||||
NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
|
||||
NR_DL_FRAME_PARMS *frame_params = &ue->SL_UE_PHY_PARAMS.sl_frame_params;
|
||||
NR_UE_COMMON *common_vars = &ue->common_vars;
|
||||
|
||||
AssertFatal(symbol < frame_params->symbols_per_slot, "slot_fep: symbol must be between 0 and %d\n", frame_params->symbols_per_slot-1);
|
||||
AssertFatal(Ns < frame_params->slots_per_frame, "slot_fep: Ns must be between 0 and %d\n", frame_params->slots_per_frame-1);
|
||||
|
||||
unsigned int nb_prefix_samples = frame_params->nb_prefix_samples;
|
||||
unsigned int nb_prefix_samples0 = frame_params->nb_prefix_samples0;
|
||||
|
||||
|
||||
dft_size_idx_t dftsize = get_dft(frame_params->ofdm_symbol_size);
|
||||
// This is for misalignment issues
|
||||
int32_t tmp_dft_in[8192] __attribute__ ((aligned (32)));
|
||||
|
||||
unsigned int rx_offset = frame_params->get_samples_slot_timestamp(Ns,frame_params,0);
|
||||
unsigned int abs_symbol = Ns * frame_params->symbols_per_slot + symbol;
|
||||
|
||||
rx_offset += sample_offset;
|
||||
rx_offset += ue->rx_offset;
|
||||
|
||||
for (int idx_symb = Ns*frame_params->symbols_per_slot; idx_symb <= abs_symbol; idx_symb++)
|
||||
rx_offset += (idx_symb%(0x7<<frame_params->numerology_index)) ? nb_prefix_samples : nb_prefix_samples0;
|
||||
rx_offset += frame_params->ofdm_symbol_size * symbol;
|
||||
|
||||
// use OFDM symbol from within 1/8th of the CP to avoid ISI
|
||||
rx_offset -= (nb_prefix_samples / frame_params->ofdm_offset_divisor);
|
||||
|
||||
#ifdef SL_DEBUG_SLOT_FEP
|
||||
// if (ue->frame <100)
|
||||
LOG_I(PHY, "slot_fep: slot %d, symbol %d, nb_prefix_samples %u, nb_prefix_samples0 %u, rx_offset %u\n",
|
||||
Ns, symbol, nb_prefix_samples, nb_prefix_samples0, rx_offset);
|
||||
#endif
|
||||
|
||||
for (unsigned char aa=0; aa<frame_params->nb_antennas_rx; aa++) {
|
||||
memset(&rxdataF[aa][frame_params->ofdm_symbol_size*symbol],0,frame_params->ofdm_symbol_size*sizeof(int32_t));
|
||||
|
||||
int16_t *rxdata_ptr = (int16_t *)&common_vars->rxdata[aa][rx_offset];
|
||||
|
||||
// if input to dft is not 256-bit aligned
|
||||
if ((rx_offset & 7) != 0) {
|
||||
memcpy((void *)&tmp_dft_in[0],
|
||||
(void *)&common_vars->rxdata[aa][rx_offset],
|
||||
frame_params->ofdm_symbol_size * sizeof(int32_t));
|
||||
|
||||
rxdata_ptr = (int16_t *)tmp_dft_in;
|
||||
}
|
||||
|
||||
dft(dftsize,
|
||||
rxdata_ptr,
|
||||
(int16_t *)&rxdataF[aa][frame_params->ofdm_symbol_size*symbol],
|
||||
1);
|
||||
|
||||
|
||||
int symb_offset = (Ns%frame_params->slots_per_subframe)*frame_params->symbols_per_slot;
|
||||
int32_t rot2 = ((uint32_t*)frame_params->symbol_rotation[1])[symbol+symb_offset];
|
||||
((int16_t*)&rot2)[1]=-((int16_t*)&rot2)[1];
|
||||
|
||||
#ifdef SL_DEBUG_SLOT_FEP
|
||||
// if (ue->frame <100)
|
||||
LOG_I(PHY, "slot_fep: slot %d, symbol %d rx_offset %u, rotation symbol %d %d.%d\n", Ns,symbol, rx_offset,
|
||||
symbol+symb_offset,((int16_t*)&rot2)[0],((int16_t*)&rot2)[1]);
|
||||
#endif
|
||||
|
||||
rotate_cpx_vector((c16_t *)&rxdataF[aa][frame_params->ofdm_symbol_size*symbol],
|
||||
(c16_t *)&rot2,
|
||||
(c16_t *)&rxdataF[aa][frame_params->ofdm_symbol_size*symbol],
|
||||
frame_params->ofdm_symbol_size,
|
||||
15);
|
||||
|
||||
int16_t *shift_rot = (int16_t *)frame_params->timeshift_symbol_rotation;
|
||||
|
||||
multadd_cpx_vector((int16_t *)&rxdataF[aa][frame_params->ofdm_symbol_size*symbol],
|
||||
shift_rot,
|
||||
(int16_t *)&rxdataF[aa][frame_params->ofdm_symbol_size*symbol],
|
||||
1,
|
||||
frame_params->ofdm_symbol_size,
|
||||
15);
|
||||
}
|
||||
|
||||
|
||||
|
||||
LOG_D(PHY, "SIDELINK RX: Slot FEP: done for symbol:%d\n", symbol);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int nr_slot_fep(PHY_VARS_NR_UE *ue,
|
||||
NR_DL_FRAME_PARMS *frame_parms,
|
||||
UE_nr_rxtx_proc_t *proc,
|
||||
unsigned char symbol,
|
||||
c16_t rxdataF[][frame_parms->samples_per_slot_wCP],
|
||||
uint32_t linktype)
|
||||
{
|
||||
|
||||
NR_UE_COMMON *common_vars = &ue->common_vars;
|
||||
int Ns = proc->nr_slot_rx;
|
||||
|
||||
@@ -67,13 +162,14 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
|
||||
rx_offset += frame_parms->ofdm_symbol_size * symbol;
|
||||
|
||||
// use OFDM symbol from within 1/8th of the CP to avoid ISI
|
||||
rx_offset -= (nb_prefix_samples / frame_parms->ofdm_offset_divisor);
|
||||
// rx_offset -= (nb_prefix_samples / frame_parms->ofdm_offset_divisor);
|
||||
rx_offset += 1;
|
||||
|
||||
//#ifdef DEBUG_FEP
|
||||
#ifdef DEBUG_FEP
|
||||
// if (ue->frame <100)
|
||||
LOG_D(PHY,"slot_fep: slot %d, symbol %d, nb_prefix_samples %u, nb_prefix_samples0 %u, rx_offset %u energy %d\n",
|
||||
LOG_I(PHY,"slot_fep: slot %d, symbol %d, nb_prefix_samples %u, nb_prefix_samples0 %u, rx_offset %u energy %d\n",
|
||||
Ns, symbol, nb_prefix_samples, nb_prefix_samples0, rx_offset, dB_fixed(signal_energy((int32_t *)&common_vars->rxdata[0][rx_offset],frame_parms->ofdm_symbol_size)));
|
||||
//#endif
|
||||
#endif
|
||||
|
||||
for (unsigned char aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
|
||||
int16_t *rxdata_ptr = (int16_t *)&common_vars->rxdata[aa][rx_offset];
|
||||
@@ -96,18 +192,22 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
|
||||
|
||||
stop_meas(&ue->rx_dft_stats);
|
||||
|
||||
/*
|
||||
LOG_I(NR_PHY,"%d.%d Applying rotation for symbol %d, linktype %d\n",
|
||||
proc->frame_rx,proc->nr_slot_rx,symbol,linktype);
|
||||
apply_nr_rotation_RX(frame_parms,
|
||||
rxdataF[aa],
|
||||
frame_parms->symbol_rotation[0],
|
||||
frame_parms->symbol_rotation[linktype],
|
||||
Ns,
|
||||
frame_parms->N_RB_DL,
|
||||
0,
|
||||
symbol,
|
||||
1);
|
||||
linktype);
|
||||
*/
|
||||
}
|
||||
|
||||
#ifdef DEBUG_FEP
|
||||
printf("slot_fep: done\n");
|
||||
LOG_I(NR_PHY,"slot_fep: done for Ns %d symbol %d\n",Ns,symbol);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
@@ -297,7 +397,6 @@ void apply_nr_rotation_RX(NR_DL_FRAME_PARMS *frame_parms,
|
||||
|
||||
c16_t rot2 = rot[symbol + symb_offset];
|
||||
rot2.i = -rot2.i;
|
||||
LOG_D(PHY,"slot %d, symb_offset %d rotating by %d.%d\n", slot, symb_offset, rot2.r, rot2.i);
|
||||
c16_t *shift_rot = frame_parms->timeshift_symbol_rotation;
|
||||
c16_t *this_symbol = &rxdataF[soffset + (frame_parms->ofdm_symbol_size * symbol)];
|
||||
|
||||
|
||||
@@ -220,7 +220,8 @@ void gNB_I0_measurements(PHY_VARS_gNB *gNB,int slot, int first_symb,int num_symb
|
||||
//
|
||||
// Todo:
|
||||
// - averaging IIR filter for RX power and noise
|
||||
void nr_gnb_measurements(PHY_VARS_gNB *gNB,
|
||||
void nr_gnb_measurements(PHY_MEASUREMENTS_gNB *meas,
|
||||
NR_DL_FRAME_PARMS *fp,
|
||||
NR_gNB_ULSCH_t *ulsch,
|
||||
NR_gNB_PUSCH *pusch_vars,
|
||||
unsigned char symbol,
|
||||
@@ -232,8 +233,6 @@ void nr_gnb_measurements(PHY_VARS_gNB *gNB,
|
||||
|
||||
double rx_gain = openair0_cfg[0].rx_gain[0];
|
||||
double rx_gain_offset = openair0_cfg[0].rx_gain_offset[0];
|
||||
PHY_MEASUREMENTS_gNB *meas = &gNB->measurements;
|
||||
NR_DL_FRAME_PARMS *fp = &gNB->frame_parms;
|
||||
int ch_offset = fp->ofdm_symbol_size * symbol;
|
||||
int N_RB_UL = ulsch->harq_process->ulsch_pdu.rb_size;
|
||||
ulsch_measurements_gNB *ulsch_measurements = &ulsch->ulsch_measurements;
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "nr_ul_estimation.h"
|
||||
#include "PHY/sse_intrin.h"
|
||||
#include "PHY/NR_REFSIG/nr_refsig.h"
|
||||
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
|
||||
#include "PHY/NR_REFSIG/dmrs_nr.h"
|
||||
#include "PHY/NR_REFSIG/ptrs_nr.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
|
||||
@@ -117,34 +118,39 @@ int get_delay_idx(int delay) {
|
||||
}
|
||||
|
||||
int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
PHY_VARS_NR_UE *ue,
|
||||
int rxFSz,
|
||||
c16_t rxdataF[][rxFSz],
|
||||
unsigned char Ns,
|
||||
unsigned short p,
|
||||
unsigned char symbol,
|
||||
int ul_id,
|
||||
unsigned short bwp_start_subcarrier,
|
||||
nfapi_nr_pusch_pdu_t *pusch_pdu,
|
||||
sl_nr_rx_config_pssch_sci_pdu_t *pssch_pdu,
|
||||
int *max_ch,
|
||||
uint32_t *nvar) {
|
||||
|
||||
c16_t pilot[3280] __attribute__((aligned(32)));
|
||||
const int chest_freq = gNB->chest_freq;
|
||||
const int chest_freq = gNB ? gNB->chest_freq : ue->chest_freq;
|
||||
|
||||
#ifdef DEBUG_CH
|
||||
FILE *debug_ch_est;
|
||||
debug_ch_est = fopen("debug_ch_est.txt","w");
|
||||
#endif
|
||||
//uint16_t Nid_cell = (eNB_offset == 0) ? gNB->frame_parms.Nid_cell : gNB->measurements.adj_cell_id[eNB_offset-1];
|
||||
NR_gNB_PUSCH *pusch_vars = &gNB->pusch_vars[ul_id];
|
||||
NR_gNB_PUSCH *pusch_vars = gNB ? &gNB->pusch_vars[ul_id] : &ue->pssch_vars[ul_id];
|
||||
c16_t **ul_ch_estimates = (c16_t **)pusch_vars->ul_ch_estimates;
|
||||
const int symbolSize = gNB->frame_parms.ofdm_symbol_size;
|
||||
const int soffset = (Ns&3)*gNB->frame_parms.symbols_per_slot*symbolSize;
|
||||
const int symbolSize = gNB ? gNB->frame_parms.ofdm_symbol_size : ue->SL_UE_PHY_PARAMS.sl_frame_params.ofdm_symbol_size;
|
||||
const int soffset = 0;//(Ns&3)*(gNB?gNB->frame_parms.symbols_per_slot:(ue->SL_UE_PHY_PARAMS.sl_frame_params.symbols_per_slot)*symbolSize);
|
||||
const int nushift = (p>>1)&1;
|
||||
gNB->frame_parms.nushift = nushift;
|
||||
if (gNB) gNB->frame_parms.nushift = nushift;
|
||||
else ue->SL_UE_PHY_PARAMS.sl_frame_params.nushift = nushift;
|
||||
int ch_offset = symbolSize*symbol;
|
||||
const int symbol_offset = symbolSize*symbol;
|
||||
|
||||
const int k0 = bwp_start_subcarrier;
|
||||
const int nb_rb_pusch = pusch_pdu->rb_size;
|
||||
const int nb_rb_pusch = gNB ? pusch_pdu->rb_size : pssch_pdu->subchannel_size*pssch_pdu->l_subch;
|
||||
|
||||
LOG_D(PHY, "In %s: ch_offset %d, soffset %d, symbol_offset %d, OFDM size %d, Ns = %d, k0 = %d, symbol %d\n",
|
||||
__FUNCTION__,
|
||||
@@ -157,14 +163,23 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
|
||||
//------------------generate DMRS------------------//
|
||||
|
||||
if(pusch_pdu->ul_dmrs_scrambling_id != gNB->pusch_gold_init[pusch_pdu->scid]) {
|
||||
if(gNB && pusch_pdu->ul_dmrs_scrambling_id != gNB->pusch_gold_init[pusch_pdu->scid]) {
|
||||
gNB->pusch_gold_init[pusch_pdu->scid] = pusch_pdu->ul_dmrs_scrambling_id;
|
||||
nr_gold_pusch(gNB, pusch_pdu->scid, pusch_pdu->ul_dmrs_scrambling_id);
|
||||
}
|
||||
|
||||
if (pusch_pdu->transform_precoding == transformPrecoder_disabled) {
|
||||
nr_pusch_dmrs_rx(gNB, Ns, gNB->nr_gold_pusch_dmrs[pusch_pdu->scid][Ns][symbol], (int32_t *)pilot, (1000+p), 0, nb_rb_pusch,
|
||||
(pusch_pdu->bwp_start + pusch_pdu->rb_start)*NR_NB_SC_PER_RB, pusch_pdu->dmrs_config_type);
|
||||
if (ue || pusch_pdu->transform_precoding == transformPrecoder_disabled) {
|
||||
if (gNB) nr_pusch_dmrs_rx(NORMAL, Ns, gNB->nr_gold_pusch_dmrs[pusch_pdu->scid][Ns][symbol], (int32_t *)pilot, (1000+p), 0, nb_rb_pusch,
|
||||
(pusch_pdu->bwp_start + pusch_pdu->rb_start)*NR_NB_SC_PER_RB, pusch_pdu->dmrs_config_type);
|
||||
else {
|
||||
// compute gold sequence based on Nid from SCI1A
|
||||
int nb_re = ue->SL_UE_PHY_PARAMS.sl_frame_params.N_RB_UL*12;
|
||||
uint32_t pssch_dmrs[(nb_re>>5)+1];
|
||||
nr_init_pssch_dmrs_oneshot(&ue->SL_UE_PHY_PARAMS.sl_frame_params,pssch_pdu->Nid,pssch_dmrs,Ns,symbol);
|
||||
// call nr_pusch_dmrs_rx`
|
||||
nr_pusch_dmrs_rx(NORMAL, Ns, pssch_dmrs, (int32_t *)pilot, (1000+p), 0, nb_rb_pusch,
|
||||
(pssch_pdu->startrb)*NR_NB_SC_PER_RB, 0);
|
||||
}
|
||||
} else { // if transform precoding or SC-FDMA is enabled in Uplink
|
||||
// NR_SC_FDMA supports type1 DMRS so only 6 DMRS REs per RB possible
|
||||
const uint16_t index = get_index_for_dmrs_lowpapr_seq(nb_rb_pusch * (NR_NB_SC_PER_RB/2));
|
||||
@@ -176,7 +191,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
AssertFatal(dmrs_seq != NULL, "DMRS low PAPR seq not found, check if DMRS sequences are generated");
|
||||
nr_pusch_lowpaprtype1_dmrs_rx(gNB, Ns, dmrs_seq, (int32_t *)pilot, 1000, 0, nb_rb_pusch, 0, pusch_pdu->dmrs_config_type);
|
||||
#ifdef DEBUG_PUSCH
|
||||
printf ("NR_UL_CHANNEL_EST: index %d, u %d,v %d\n", index, u, v);
|
||||
LOG_I(NR_PHY,"NR_UL_CHANNEL_EST: index %d, u %d,v %d\n", index, u, v);
|
||||
LOG_M("gNb_DMRS_SEQ.m","gNb_DMRS_SEQ", dmrs_seq,6*nb_rb_pusch,1,1);
|
||||
#endif
|
||||
}
|
||||
@@ -194,22 +209,23 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
uint64_t noise_amp2 = 0;
|
||||
c16_t ul_ls_est[symbolSize] __attribute__((aligned(32)));
|
||||
memset(ul_ls_est, 0, sizeof(c16_t) * symbolSize);
|
||||
NR_ULSCH_delay_t *delay = &gNB->ulsch[ul_id].delay;
|
||||
NR_ULSCH_delay_t *delay = gNB ? &gNB->ulsch[ul_id].delay : &ue->slsch[ul_id].delay;
|
||||
memset(delay, 0, sizeof(*delay));
|
||||
|
||||
for (int aarx=0; aarx<gNB->frame_parms.nb_antennas_rx; aarx++) {
|
||||
c16_t *rxdataF = (c16_t *)&gNB->common_vars.rxdataF[aarx][symbol_offset];
|
||||
c16_t *ul_ch = &ul_ch_estimates[p*gNB->frame_parms.nb_antennas_rx+aarx][ch_offset];
|
||||
NR_DL_FRAME_PARMS *fp = gNB ? &gNB->frame_parms : &ue->SL_UE_PHY_PARAMS.sl_frame_params;
|
||||
int nrx = fp->nb_antennas_rx;
|
||||
for (int aarx=0; aarx<nrx; aarx++) {
|
||||
c16_t *rxdataF2 = (c16_t *)&rxdataF[aarx][symbol_offset];
|
||||
c16_t *ul_ch = &ul_ch_estimates[p*nrx+aarx][ch_offset];
|
||||
|
||||
memset(ul_ch,0,sizeof(*ul_ch)*symbolSize);
|
||||
#ifdef DEBUG_PUSCH
|
||||
LOG_I(PHY, "In %s symbol_offset %d, nushift %d\n", __FUNCTION__, symbol_offset, nushift);
|
||||
LOG_I(PHY, "In %s ch est pilot, N_RB_UL %d\n", __FUNCTION__, gNB->frame_parms.N_RB_UL);
|
||||
LOG_I(PHY, "In %s bwp_start_subcarrier %d, k0 %d, first_carrier %d, nb_rb_pusch %d\n", __FUNCTION__, bwp_start_subcarrier, k0, gNB->frame_parms.first_carrier_offset, nb_rb_pusch);
|
||||
LOG_I(PHY, "In %s ch est pilot, N_RB_UL %d\n", __FUNCTION__, fp->N_RB_UL);
|
||||
LOG_I(PHY, "In %s bwp_start_subcarrier %d, k0 %d, first_carrier %d, nb_rb_pusch %d\n", __FUNCTION__, bwp_start_subcarrier, k0, fp->first_carrier_offset, nb_rb_pusch);
|
||||
LOG_I(PHY, "In %s ul_ch addr %p nushift %d\n", __FUNCTION__, ul_ch, nushift);
|
||||
#endif
|
||||
|
||||
if (pusch_pdu->dmrs_config_type == pusch_dmrs_type1 && chest_freq == 0) {
|
||||
if ((ue || pusch_pdu->dmrs_config_type == pusch_dmrs_type1) && chest_freq == 0) {
|
||||
c16_t *pil = pilot;
|
||||
int re_offset = k0;
|
||||
LOG_D(PHY,"PUSCH estimation DMRS type 1, Freq-domain interpolation");
|
||||
@@ -224,7 +240,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
|
||||
for (int k_line = 0; k_line <= 1; k_line++) {
|
||||
re_offset = (k0 + (n << 2) + (k_line << 1) + delta) % symbolSize;
|
||||
ch = c32x16maddShift(*pil, rxdataF[soffset + re_offset], ch, 16);
|
||||
ch = c32x16maddShift(*pil, rxdataF2[soffset + re_offset], ch, 16);
|
||||
pil++;
|
||||
}
|
||||
|
||||
@@ -238,13 +254,13 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
|
||||
freq2time(symbolSize, (int16_t *)ul_ls_est, (int16_t *)pusch_vars->ul_ch_estimates_time[aarx]);
|
||||
|
||||
nr_est_timing_advance_pusch(&gNB->frame_parms, pusch_vars->ul_ch_estimates_time[aarx], delay);
|
||||
nr_est_timing_advance_pusch(fp, pusch_vars->ul_ch_estimates_time[aarx], delay);
|
||||
int pusch_delay = delay->pusch_est_delay;
|
||||
int delay_idx = get_delay_idx(pusch_delay);
|
||||
c16_t *ul_delay_table = gNB->frame_parms.ul_delay_table[delay_idx];
|
||||
c16_t *ul_delay_table = fp->ul_delay_table[delay_idx];
|
||||
|
||||
#ifdef DEBUG_PUSCH
|
||||
printf("Estimated delay = %i\n", pusch_delay >> 1);
|
||||
LOG_I(NR_PHY,"Estimated delay = %i\n", pusch_delay >> 1);
|
||||
#endif
|
||||
|
||||
pilot_cnt = 0;
|
||||
@@ -259,9 +275,9 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
|
||||
#ifdef DEBUG_PUSCH
|
||||
re_offset = (k0 + (n << 2) + (k_line << 1)) % symbolSize;
|
||||
c16_t *rxF = &rxdataF[soffset + re_offset];
|
||||
printf("pilot %4d: pil -> (%6d,%6d), rxF -> (%4d,%4d), ch -> (%4d,%4d)\n",
|
||||
pilot_cnt, pil->r, pil->i, rxF->r, rxF->i, ch.r, ch.i);
|
||||
c16_t *rxF = &rxdataF2[soffset + re_offset];
|
||||
LOG_I(NR_PHY,"pilot %4d: ul_delay` -> (%6d,%6d), rxF -> (%4d,%4d), ch -> (%4d,%4d)\n",
|
||||
pilot_cnt, ul_delay_table[k].r, ul_delay_table[k].i, rxF->r, rxF->i, ch16.r, ch16.i);
|
||||
#endif
|
||||
|
||||
if (pilot_cnt == 0) {
|
||||
@@ -283,9 +299,9 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
|
||||
// Revert delay
|
||||
pilot_cnt = 0;
|
||||
ul_ch = &ul_ch_estimates[p * gNB->frame_parms.nb_antennas_rx + aarx][ch_offset];
|
||||
ul_ch = &ul_ch_estimates[p * nrx + aarx][ch_offset];
|
||||
int inv_delay_idx = get_delay_idx(-pusch_delay);
|
||||
c16_t *ul_inv_delay_table = gNB->frame_parms.ul_delay_table[inv_delay_idx];
|
||||
c16_t *ul_inv_delay_table = fp->ul_delay_table[inv_delay_idx];
|
||||
for (int n = 0; n < 3 * nb_rb_pusch; n++) {
|
||||
for (int k_line = 0; k_line <= 1; k_line++) {
|
||||
int k = pilot_cnt << 1;
|
||||
@@ -296,18 +312,18 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
|
||||
#ifdef DEBUG_PUSCH
|
||||
re_offset = (k0 + (n << 2) + (k_line << 1)) % symbolSize;
|
||||
c16_t *rxF = &rxdataF[soffset + re_offset];
|
||||
printf("ch -> (%4d,%4d), ch_inter -> (%4d,%4d)\n", ul_ls_est[k].r, ul_ls_est[k].i, ul_ch[k].r, ul_ch[k].i);
|
||||
c16_t *rxF = &rxdataF2[soffset + re_offset];
|
||||
LOG_I(NR_PHY,"ch -> (%4d,%4d), ch_inter -> (%4d,%4d)\n", ul_ls_est[k].r, ul_ls_est[k].i, ul_ch[k].r, ul_ch[k].i);
|
||||
#endif
|
||||
pilot_cnt++;
|
||||
nest_count += 2;
|
||||
}
|
||||
}
|
||||
|
||||
} else if (pusch_pdu->dmrs_config_type == pusch_dmrs_type2 && chest_freq == 0) { // pusch_dmrs_type2 |p_r,p_l,d,d,d,d,p_r,p_l,d,d,d,d|
|
||||
} else if (gNB && pusch_pdu->dmrs_config_type == pusch_dmrs_type2 && chest_freq == 0) { // pusch_dmrs_type2 |p_r,p_l,d,d,d,d,p_r,p_l,d,d,d,d|
|
||||
LOG_D(PHY, "PUSCH estimation DMRS type 2, Freq-domain interpolation\n");
|
||||
c16_t *pil = pilot;
|
||||
c16_t *rx = &rxdataF[soffset + nushift];
|
||||
c16_t *rx = &rxdataF2[soffset + nushift];
|
||||
for (int n = 0; n < nb_rb_pusch * NR_NB_SC_PER_RB; n += 6) {
|
||||
c16_t ch0 = c16mulShift(*pil, rx[(k0 + n) % symbolSize], 15);
|
||||
pil++;
|
||||
@@ -334,9 +350,9 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
|
||||
}
|
||||
|
||||
else if (pusch_pdu->dmrs_config_type == pusch_dmrs_type1) { // this is case without frequency-domain linear interpolation, just take average of LS channel estimates of 6 DMRS REs and use a common value for the whole PRB
|
||||
else if (ue || pusch_pdu->dmrs_config_type == pusch_dmrs_type1) { // this is case without frequency-domain linear interpolation, just take average of LS channel estimates of 6 DMRS REs and use a common value for the whole PRB
|
||||
LOG_D(PHY,"PUSCH estimation DMRS type 1, no Freq-domain interpolation\n");
|
||||
c16_t *rxF = &rxdataF[soffset + nushift];
|
||||
c16_t *rxF = &rxdataF2[soffset + nushift];
|
||||
int pil_offset = 0;
|
||||
int re_offset = k0;
|
||||
c16_t ch;
|
||||
@@ -398,23 +414,23 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
c32_t ch0={0};
|
||||
//First PRB
|
||||
ch0=c32x16mulShift(*pil,
|
||||
rxdataF[soffset + nushift + re_offset],
|
||||
rxdataF2[soffset + nushift + re_offset],
|
||||
15);
|
||||
pil++;
|
||||
re_offset = (re_offset+1) % symbolSize;
|
||||
ch0=c32x16maddShift(*pil,
|
||||
rxdataF[nushift+re_offset],
|
||||
rxdataF2[nushift+re_offset],
|
||||
ch0,
|
||||
15);
|
||||
pil++;
|
||||
re_offset = (re_offset+5) % symbolSize;
|
||||
ch0=c32x16maddShift(*pil,
|
||||
rxdataF[nushift+re_offset],
|
||||
rxdataF2[nushift+re_offset],
|
||||
ch0,
|
||||
15);
|
||||
re_offset = (re_offset+1) % symbolSize;
|
||||
ch0=c32x16maddShift(*pil,
|
||||
rxdataF[nushift+re_offset],
|
||||
rxdataF2[nushift+re_offset],
|
||||
ch0,
|
||||
15);
|
||||
pil++;
|
||||
@@ -435,19 +451,19 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
|
||||
for (int pilot_cnt=4; pilot_cnt<4*(nb_rb_pusch-1); pilot_cnt += 4) {
|
||||
c32_t ch0;
|
||||
ch0=c32x16mulShift(*pil, rxdataF[nushift+re_offset], 15);
|
||||
ch0=c32x16mulShift(*pil, rxdataF2[nushift+re_offset], 15);
|
||||
pil++;
|
||||
re_offset = (re_offset+1) % symbolSize;
|
||||
|
||||
ch0=c32x16maddShift(*pil, rxdataF[nushift+re_offset], ch0, 15);
|
||||
ch0=c32x16maddShift(*pil, rxdataF2[nushift+re_offset], ch0, 15);
|
||||
pil++;
|
||||
re_offset = (re_offset+5) % symbolSize;
|
||||
|
||||
ch0=c32x16maddShift(*pil, rxdataF[nushift+re_offset], ch0, 15);
|
||||
ch0=c32x16maddShift(*pil, rxdataF2[nushift+re_offset], ch0, 15);
|
||||
pil++;
|
||||
re_offset = (re_offset+1) % symbolSize;
|
||||
|
||||
ch0=c32x16maddShift(*pil, rxdataF[nushift+re_offset], ch0, 15);
|
||||
ch0=c32x16maddShift(*pil, rxdataF2[nushift+re_offset], ch0, 15);
|
||||
pil++;
|
||||
re_offset = (re_offset+5) % symbolSize;
|
||||
|
||||
@@ -470,19 +486,19 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
}
|
||||
|
||||
// Last PRB
|
||||
ch0=c32x16mulShift(*pil, rxdataF[nushift+re_offset], 15);
|
||||
ch0=c32x16mulShift(*pil, rxdataF2[nushift+re_offset], 15);
|
||||
pil++;
|
||||
re_offset = (re_offset+1) % symbolSize;
|
||||
|
||||
ch0=c32x16maddShift(*pil, rxdataF[nushift+re_offset], ch0, 15);
|
||||
ch0=c32x16maddShift(*pil, rxdataF2[nushift+re_offset], ch0, 15);
|
||||
pil++;
|
||||
re_offset = (re_offset+5) % symbolSize;
|
||||
|
||||
ch0=c32x16maddShift(*pil, rxdataF[nushift+re_offset], ch0, 15);
|
||||
ch0=c32x16maddShift(*pil, rxdataF2[nushift+re_offset], ch0, 15);
|
||||
pil++;
|
||||
re_offset = (re_offset+1) % symbolSize;
|
||||
|
||||
ch0=c32x16maddShift(*pil, rxdataF[nushift+re_offset], ch0, 15);
|
||||
ch0=c32x16maddShift(*pil, rxdataF2[nushift+re_offset], ch0, 15);
|
||||
pil++;
|
||||
re_offset = (re_offset+5) % symbolSize;
|
||||
|
||||
@@ -500,12 +516,12 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
}
|
||||
|
||||
#ifdef DEBUG_PUSCH
|
||||
ul_ch = &ul_ch_estimates[p * gNB->frame_parms.nb_antennas_rx + aarx][ch_offset];
|
||||
ul_ch = &ul_ch_estimates[p * (gNB?gNB->frame_parms.nb_antennas_rx:ue->SL_UE_PHY_PARAMS.sl_frame_params.nb_antennas_rx) + aarx][ch_offset];
|
||||
for (int idxP = 0; idxP < ceil((float)nb_rb_pusch * 12 / 8); idxP++) {
|
||||
for (int idxI = 0; idxI < 8; idxI++) {
|
||||
printf("%d\t%d\t", ul_ch[idxP * 8 + idxI].r, ul_ch[idxP * 8 + idxI].i);
|
||||
LOG_I(NR_PHY,"%d\t%d\t", ul_ch[idxP * 8 + idxI].r, ul_ch[idxP * 8 + idxI].i);
|
||||
}
|
||||
printf("%d\n", idxP);
|
||||
LOG_I(NR_PHY,"%d\n", idxP);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -545,28 +561,33 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
* 3) Compensated DMRS based estimated signal with PTRS estimation for slot
|
||||
*********************************************************************/
|
||||
void nr_pusch_ptrs_processing(PHY_VARS_gNB *gNB,
|
||||
struct PHY_VARS_NR_UE_s *ue,
|
||||
NR_DL_FRAME_PARMS *frame_parms,
|
||||
nfapi_nr_pusch_pdu_t *rel15_ul,
|
||||
sl_nr_rx_config_pssch_sci_pdu_t *pssch_pdu,
|
||||
uint8_t ulsch_id,
|
||||
uint8_t nr_tti_rx,
|
||||
unsigned char symbol,
|
||||
uint32_t nb_re_pusch)
|
||||
{
|
||||
NR_gNB_PUSCH *pusch_vars = &gNB->pusch_vars[ulsch_id];
|
||||
NR_gNB_PUSCH *pusch_vars = gNB ? &gNB->pusch_vars[ulsch_id] : &ue->pssch_vars[ulsch_id];
|
||||
//#define DEBUG_UL_PTRS 1
|
||||
int32_t *ptrs_re_symbol = NULL;
|
||||
int8_t ret = 0;
|
||||
uint8_t symbInSlot = rel15_ul->start_symbol_index + rel15_ul->nr_of_symbols;
|
||||
uint8_t *startSymbIndex = &rel15_ul->start_symbol_index;
|
||||
uint8_t *nbSymb = &rel15_ul->nr_of_symbols;
|
||||
uint8_t *L_ptrs = &rel15_ul->pusch_ptrs.ptrs_time_density;
|
||||
uint8_t *K_ptrs = &rel15_ul->pusch_ptrs.ptrs_freq_density;
|
||||
uint16_t *dmrsSymbPos = &rel15_ul->ul_dmrs_symb_pos;
|
||||
uint8_t symbInSlot = gNB ? (rel15_ul->start_symbol_index + rel15_ul->nr_of_symbols) : (1 + pssch_pdu->pssch_numsym);
|
||||
uint8_t sl_startSymbIndex = 1;
|
||||
uint8_t *startSymbIndex = gNB ? &rel15_ul->start_symbol_index : &sl_startSymbIndex;
|
||||
uint8_t *nbSymb = gNB ? &rel15_ul->nr_of_symbols : &pssch_pdu->pssch_numsym;
|
||||
uint8_t *L_ptrs = gNB ? &rel15_ul->pusch_ptrs.ptrs_time_density : NULL;
|
||||
uint8_t *K_ptrs = gNB ? &rel15_ul->pusch_ptrs.ptrs_freq_density:NULL;
|
||||
uint16_t *dmrsSymbPos = gNB ? &rel15_ul->ul_dmrs_symb_pos : &pssch_pdu->dmrs_symbol_position;
|
||||
uint16_t *ptrsSymbPos = &pusch_vars->ptrs_symbols;
|
||||
uint8_t *ptrsSymbIdx = &pusch_vars->ptrs_symbol_index;
|
||||
uint8_t *dmrsConfigType = &rel15_ul->dmrs_config_type;
|
||||
uint16_t *nb_rb = &rel15_ul->rb_size;
|
||||
uint8_t *ptrsReOffset = &rel15_ul->pusch_ptrs.ptrs_ports_list[0].ptrs_re_offset;
|
||||
uint8_t sl_dmrsConfigType = 0;
|
||||
uint8_t *dmrsConfigType = gNB ? &rel15_ul->dmrs_config_type : &sl_dmrsConfigType;
|
||||
uint16_t sl_nb_rb = pssch_pdu->num_subch * pssch_pdu->subchannel_size;
|
||||
uint16_t *nb_rb = gNB ? &rel15_ul->rb_size : &sl_nb_rb;
|
||||
uint8_t *ptrsReOffset = gNB ? &rel15_ul->pusch_ptrs.ptrs_ports_list[0].ptrs_re_offset : NULL;
|
||||
|
||||
/* loop over antennas */
|
||||
for (int aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
|
||||
#include "PHY/defs_gNB.h"
|
||||
#include "PHY/defs_nr_UE.h"
|
||||
/** @addtogroup _PHY_PARAMETER_ESTIMATION_BLOCKS_
|
||||
* @{
|
||||
*/
|
||||
@@ -41,12 +42,16 @@
|
||||
*/
|
||||
|
||||
int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
PHY_VARS_NR_UE *ue,
|
||||
int rxFSz,
|
||||
c16_t rxdataF[][rxFSz],
|
||||
unsigned char Ns,
|
||||
unsigned short p,
|
||||
unsigned char symbol,
|
||||
int ul_id,
|
||||
unsigned short bwp_start_subcarrier,
|
||||
nfapi_nr_pusch_pdu_t *pusch_pdu,
|
||||
sl_nr_rx_config_pssch_sci_pdu_t *pssch_pdu,
|
||||
int *max_ch,
|
||||
uint32_t *nvar);
|
||||
|
||||
@@ -54,7 +59,8 @@ void dump_nr_I0_stats(FILE *fd,PHY_VARS_gNB *gNB);
|
||||
|
||||
void gNB_I0_measurements(PHY_VARS_gNB *gNB,int slot,int first_symb,int num_symb);
|
||||
|
||||
void nr_gnb_measurements(PHY_VARS_gNB *gNB,
|
||||
void nr_gnb_measurements(PHY_MEASUREMENTS_gNB *meas,
|
||||
NR_DL_FRAME_PARMS *fp,
|
||||
NR_gNB_ULSCH_t *ulsch,
|
||||
NR_gNB_PUSCH *pusch_vars,
|
||||
unsigned char symbol,
|
||||
@@ -68,8 +74,10 @@ int nr_est_timing_advance_srs(const NR_DL_FRAME_PARMS *frame_parms,
|
||||
const int32_t srs_estimated_channel_time[][frame_parms->ofdm_symbol_size]);
|
||||
|
||||
void nr_pusch_ptrs_processing(PHY_VARS_gNB *gNB,
|
||||
struct PHY_VARS_NR_UE_s *ue,
|
||||
NR_DL_FRAME_PARMS *frame_parms,
|
||||
nfapi_nr_pusch_pdu_t *rel15_ul,
|
||||
sl_nr_rx_config_pssch_sci_pdu_t *pssch_pdu,
|
||||
uint8_t ulsch_id,
|
||||
uint8_t nr_tti_rx,
|
||||
unsigned char symbol,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user