mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-14 05:00:31 +00:00
Compare commits
229 Commits
ldpc_decod
...
multipleam
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
909f925541 | ||
|
|
a3b9db2022 | ||
|
|
99eb6c726c | ||
|
|
c22e7d22c4 | ||
|
|
8db35e468d | ||
|
|
472480f6fe | ||
|
|
673024f587 | ||
|
|
260135a35b | ||
|
|
a0974f7c73 | ||
|
|
69d1d5fb5f | ||
|
|
1750d4052f | ||
|
|
f5a07f17f1 | ||
|
|
54af637997 | ||
|
|
88f294bed1 | ||
|
|
299ce4a9bd | ||
|
|
5445b12c32 | ||
|
|
833edb3b25 | ||
|
|
a679a4fb7a | ||
|
|
8d340fca6e | ||
|
|
6cb9db1a9b | ||
|
|
b03619ea51 | ||
|
|
5580dd21cf | ||
|
|
122ff99b49 | ||
|
|
7d0640ebcb | ||
|
|
b5a717cc99 | ||
|
|
248cf7f155 | ||
|
|
e1fc1c38db | ||
|
|
389b40b121 | ||
|
|
0c408875a3 | ||
|
|
48a4c2b0ab | ||
|
|
5ff24cce71 | ||
|
|
a36de80e6f | ||
|
|
4ec498c996 | ||
|
|
b86ae96c66 | ||
|
|
32e5f972e9 | ||
|
|
93936ffd9b | ||
|
|
78feea10bb | ||
|
|
00b18f2990 | ||
|
|
786fada6e6 | ||
|
|
a8f8244b09 | ||
|
|
d35270bfd0 | ||
|
|
547b2eaf52 | ||
|
|
7fb44bdb86 | ||
|
|
02608313fb | ||
|
|
79448178cb | ||
|
|
97d0b6534a | ||
|
|
a18a4888ec | ||
|
|
6677277b6d | ||
|
|
7877e38890 | ||
|
|
6fc02164c5 | ||
|
|
aca48aa9f8 | ||
|
|
ba4608d46b | ||
|
|
625fd54ae2 | ||
|
|
923cfc9cd2 | ||
|
|
c9835a13e7 | ||
|
|
d3205ea09a | ||
|
|
018d456a2a | ||
|
|
8519c748d1 | ||
|
|
5016fc75c6 | ||
|
|
5a30abc29e | ||
|
|
6878550557 | ||
|
|
9146879207 | ||
|
|
d8c7123a8a | ||
|
|
499cdc62d9 | ||
|
|
bb9fa2c6a0 | ||
|
|
65f85d55db | ||
|
|
2902967740 | ||
|
|
2b4b3fcd00 | ||
|
|
3331a43b95 | ||
|
|
a41be56b2a | ||
|
|
38bac5376b | ||
|
|
cce685323a | ||
|
|
f2e06a8b12 | ||
|
|
cad681e626 | ||
|
|
8c0641c676 | ||
|
|
736ea530f7 | ||
|
|
5b9d770960 | ||
|
|
9513d481d5 | ||
|
|
dfadcab458 | ||
|
|
81dbaf0aad | ||
|
|
15370e7192 | ||
|
|
f3802d77cc | ||
|
|
690be9c1ff | ||
|
|
27ece7e7f5 | ||
|
|
5e45ecb123 | ||
|
|
a2a8e3ba6d | ||
|
|
6c8a3796ae | ||
|
|
896698dab5 | ||
|
|
6399d93be8 | ||
|
|
98c458fa2c | ||
|
|
4262203e2d | ||
|
|
dec4e3f217 | ||
|
|
a4b4fbe96b | ||
|
|
73a2ba3894 | ||
|
|
ded3187734 | ||
|
|
068983915e | ||
|
|
e36f3ee995 | ||
|
|
f0ca66adcd | ||
|
|
986b212fe9 | ||
|
|
0f78aade97 | ||
|
|
405d122937 | ||
|
|
1a690a5cff | ||
|
|
db663d124b | ||
|
|
9a34b31470 | ||
|
|
852fd7fd6c | ||
|
|
1153721b19 | ||
|
|
a1a4f24d0f | ||
|
|
e15631b23c | ||
|
|
3743719b88 | ||
|
|
f555bf2957 | ||
|
|
964c737b7d | ||
|
|
9f97191243 | ||
|
|
be8771189e | ||
|
|
bf6ddb70c4 | ||
|
|
93b08c5f20 | ||
|
|
038247f074 | ||
|
|
f5072833b6 | ||
|
|
675e1129b4 | ||
|
|
83df3c5e79 | ||
|
|
03b6e32fdb | ||
|
|
f5f61162ff | ||
|
|
90230078b4 | ||
|
|
a06457bab6 | ||
|
|
114f833a77 | ||
|
|
12d9e1f116 | ||
|
|
abcc00945e | ||
|
|
70239c086c | ||
|
|
dca7e6c95d | ||
|
|
7fba453329 | ||
|
|
60535aae99 | ||
|
|
d18830f359 | ||
|
|
a937eaec23 | ||
|
|
d413cf9696 | ||
|
|
75c7220345 | ||
|
|
63b4a784a8 | ||
|
|
eb4cd38577 | ||
|
|
9d951b109f | ||
|
|
de0730a4e8 | ||
|
|
6de5b1d3de | ||
|
|
70eb09dc09 | ||
|
|
bd1f266ab5 | ||
|
|
d06790fcf2 | ||
|
|
1d2fb5af9d | ||
|
|
e3e516e652 | ||
|
|
8a544b9fbb | ||
|
|
26b3b16aa5 | ||
|
|
842ab32c91 | ||
|
|
e6aeb47ea8 | ||
|
|
3020200288 | ||
|
|
b7f00aa240 | ||
|
|
c5f5ab2820 | ||
|
|
5cb1113674 | ||
|
|
c1c4c65a93 | ||
|
|
eb2facfa76 | ||
|
|
5e2d7638d1 | ||
|
|
615f5ef663 | ||
|
|
4b2cd156bb | ||
|
|
5b837f9250 | ||
|
|
7080810e49 | ||
|
|
d851e7799c | ||
|
|
127ba6f0d9 | ||
|
|
c1372a52c8 | ||
|
|
bd05075ac6 | ||
|
|
915f9d55d8 | ||
|
|
b9dffde03e | ||
|
|
178a5a66d4 | ||
|
|
e214ffc0f3 | ||
|
|
82a3911971 | ||
|
|
3f2eddd6ba | ||
|
|
9845891ec4 | ||
|
|
7852518bd3 | ||
|
|
f70d2f1312 | ||
|
|
c7ce407a4b | ||
|
|
1d0b8c1dc6 | ||
|
|
93d9abd9b8 | ||
|
|
627e60f5bd | ||
|
|
401ebe17b2 | ||
|
|
a0578a5205 | ||
|
|
3bf3b78cb6 | ||
|
|
8fbee94045 | ||
|
|
4104a1fbcf | ||
|
|
404e0b3ba8 | ||
|
|
a84a5328f2 | ||
|
|
498d2f8b37 | ||
|
|
735bc2fa05 | ||
|
|
bd97d11654 | ||
|
|
227f9e92f6 | ||
|
|
dfa1bd4efe | ||
|
|
2644594c32 | ||
|
|
72c29248a3 | ||
|
|
85f3e62caf | ||
|
|
c52e2681c2 | ||
|
|
456fe094bc | ||
|
|
114ac4d1bb | ||
|
|
b58870d47c | ||
|
|
4ebe910363 | ||
|
|
12d3ef48eb | ||
|
|
7efbdef2dc | ||
|
|
fc3e9f0efe | ||
|
|
e676d0d2cc | ||
|
|
debad23a7e | ||
|
|
2b4bbf7930 | ||
|
|
dda3b7e88d | ||
|
|
2b3e1772d6 | ||
|
|
3f930551ff | ||
|
|
f5a75caa4c | ||
|
|
4f7b44e862 | ||
|
|
4d755c9a1a | ||
|
|
c334ad7f7c | ||
|
|
8bf48f326a | ||
|
|
ac01fcc1b4 | ||
|
|
7a77ee2f43 | ||
|
|
2fa337d853 | ||
|
|
805d22aa3b | ||
|
|
8be33ed66f | ||
|
|
171f1fc015 | ||
|
|
4ad2a78706 | ||
|
|
cc57bcc3a0 | ||
|
|
539d17203f | ||
|
|
8a0baed430 | ||
|
|
afe73820d6 | ||
|
|
8fb8713023 | ||
|
|
139c0d548c | ||
|
|
bc1844b482 | ||
|
|
61d5dd0094 | ||
|
|
a7e2374e1d | ||
|
|
5dd9ead820 | ||
|
|
4c179270c2 | ||
|
|
002fa0050f |
@@ -300,14 +300,15 @@ add_definitions(-DHAVE_NETINET_IN_H)
|
||||
set(E2_AGENT "OFF" CACHE STRING "O-RAN-compliant E2 Agent")
|
||||
set_property(CACHE E2_AGENT PROPERTY STRINGS "ON" "OFF")
|
||||
|
||||
set(E2AP_VERSION "E2AP_V2" CACHE STRING "E2AP version")
|
||||
set_property(CACHE E2AP_VERSION PROPERTY STRINGS "E2AP_V1" "E2AP_V2" "E2AP_V3")
|
||||
message(STATUS "Selected E2AP_VERSION: ${E2AP_VERSION}")
|
||||
|
||||
set(KPM_VERSION "KPM_V2_03" CACHE STRING "The KPM SM version to use")
|
||||
set_property(CACHE KPM_VERSION PROPERTY STRINGS "KPM_V2_03" "KPM_V3_00")
|
||||
message(STATUS "Selected KPM Version: ${KPM_VERSION}")
|
||||
if (E2_AGENT)
|
||||
set(E2AP_VERSION "E2AP_V2" CACHE STRING "E2AP version")
|
||||
set_property(CACHE E2AP_VERSION PROPERTY STRINGS "E2AP_V1" "E2AP_V2" "E2AP_V3")
|
||||
message(STATUS "Selected E2AP version: ${E2AP_VERSION}")
|
||||
|
||||
set(KPM_VERSION "KPM_V2_03" CACHE STRING "The KPM SM version to use")
|
||||
set_property(CACHE KPM_VERSION PROPERTY STRINGS "KPM_V2_03" "KPM_V3_00")
|
||||
message(STATUS "Selected KPM version: ${KPM_VERSION}")
|
||||
endif()
|
||||
|
||||
add_boolean_option(ENABLE_IMSCOPE OFF "Enable phy scope based on imgui" OFF)
|
||||
add_boolean_option(ENABLE_IMSCOPE_RECORD OFF "Enable recording IQ data for imscope" OFF)
|
||||
@@ -1147,7 +1148,6 @@ set(L2_NR_SRC
|
||||
${NR_RRC_DIR}/rrc_gNB.c
|
||||
${NR_RRC_DIR}/mac_rrc_dl_direct.c
|
||||
${NR_RRC_DIR}/mac_rrc_dl_f1ap.c
|
||||
${NR_RRC_DIR}/nr_rrc_config.c
|
||||
${NR_RRC_DIR}/rrc_gNB_nsa.c
|
||||
${NR_RRC_DIR}/rrc_gNB_UE_context.c
|
||||
${NR_RRC_DIR}/rrc_gNB_NGAP.c
|
||||
@@ -1230,6 +1230,7 @@ set (MAC_NR_SRC
|
||||
${NR_GNB_MAC_DIR}/mac_rrc_dl_handler.c
|
||||
${NR_GNB_MAC_DIR}/mac_rrc_ul_direct.c
|
||||
${NR_GNB_MAC_DIR}/mac_rrc_ul_f1ap.c
|
||||
${NR_GNB_MAC_DIR}/nr_radio_config.c
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
#define DL_ARFCN 631296
|
||||
#define TDD 1
|
||||
|
||||
log_options: "all.level=warn,all.max_size=0,nas.level=debug,nas.max_size=1,rrc.level=debug,rrc.max_size=1",
|
||||
log_options: "all.level=debug,all.max_size=0,nas.level=debug,nas.max_size=1,rrc.level=debug,rrc.max_size=1",
|
||||
log_filename: "/tmp/ue.log",
|
||||
|
||||
/* Enable remote API and Web interface */
|
||||
com_addr: "0.0.0.0:9002",
|
||||
|
||||
include "rf_driver_20/1chan.cfg",
|
||||
include "rf_driver/config.cfg",
|
||||
|
||||
/* If true, allow the simulation of several UEs at the same time and
|
||||
allow dynamic UE creation from remote API */
|
||||
@@ -22,7 +22,6 @@ allow dynamic UE creation from remote API */
|
||||
cell_groups: [{
|
||||
group_type: "nr",
|
||||
multi_ue: true,
|
||||
ldpc_max_its:8,
|
||||
cells: [{
|
||||
rf_port: 0,
|
||||
bandwidth: 20,
|
||||
|
||||
47
ci-scripts/as_ue/config.cfg
Normal file
47
ci-scripts/as_ue/config.cfg
Normal file
@@ -0,0 +1,47 @@
|
||||
/* Parameters for SDR device version 2023-06-10
|
||||
* Copyright (C) 2015-2023 Amarisoft
|
||||
*/
|
||||
|
||||
#if !defined(N_CELL)
|
||||
#define N_CELL 1
|
||||
#endif
|
||||
|
||||
#if N_ANTENNA_DL <= 2
|
||||
#define N_CHAN N_CELL
|
||||
#else
|
||||
#define N_CHAN 2*N_CELL
|
||||
#endif
|
||||
|
||||
rf_driver: {
|
||||
name: "sdr",
|
||||
|
||||
/* list of devices. 'dev0' is always the master. */
|
||||
#if N_CHAN == 1
|
||||
args: "dev0=/dev/sdr0",
|
||||
#elif N_CHAN == 2
|
||||
args: "dev0=/dev/sdr0,dev1=/dev/sdr1",
|
||||
#elif N_CHAN == 3
|
||||
args: "dev0=/dev/sdr0,dev1=/dev/sdr1,dev2=/dev/sdr2",
|
||||
#elif N_CHAN == 4
|
||||
args: "dev0=/dev/sdr0,dev1=/dev/sdr1,dev2=/dev/sdr2,dev3=/dev/sdr3",
|
||||
#elif N_CHAN == 6
|
||||
args: "dev0=/dev/sdr0,dev1=/dev/sdr1,dev2=/dev/sdr2,dev3=/dev/sdr3,dev4=/dev/sdr4,dev5=/dev/sdr5",
|
||||
#else
|
||||
args: "",
|
||||
#endif
|
||||
|
||||
/* synchronisation source: internal, gps, external (default = internal) */
|
||||
// sync: "gps",
|
||||
//rx_antenna:"rx", // force to use the RX connector in TDD as RX antenna
|
||||
|
||||
/* PCIe jitter. decrease it to reduce latency */
|
||||
fifo_tx_time: 50,
|
||||
//rx_latency: 30,
|
||||
},
|
||||
|
||||
#if 0
|
||||
tx_pad_duration:300,
|
||||
#endif
|
||||
|
||||
tx_gain: 75.0, /* TX gain (in dB) */
|
||||
rx_gain: 55.0, /* RX gain (in dB) */
|
||||
@@ -147,125 +147,127 @@ ltebox-nepes:
|
||||
|
||||
amarisoft_ue:
|
||||
Host: amariue
|
||||
InitScript: /root/lteue-linux-2023-10-27/ue/lteue /root/oaicicd/ran_sa_aw2s_asue/aw2s-multi-00102-20.cfg &
|
||||
TermScript: /root/2023-10-27/libs/ws.js -t 10 127.0.0.1:9002 '{"message":"quit"}' || killall -KILL lteue-avx2
|
||||
InitScript: /root/lteue-linux-2025-03-15/lteue /root/oaicicd/ran_sa_aw2s_asue/aw2s-multi-00102-20.cfg &
|
||||
TermScript: /root/lteue-linux-2025-03-15/ws.js -t 10 127.0.0.1:9002 '{"message":"quit"}' || killall -KILL lteue-avx2
|
||||
NetworkScript: ip netns exec ue1 ip a show dev pdn0
|
||||
amarisoft_ue_2x2:
|
||||
Host: amariue
|
||||
InitScript: /root/lteue-linux-2023-10-27/ue/lteue /root/oaicicd/ran_sa_aw2s_asue_2x2/aw2s-multi-00102-2x2-v2.cfg &
|
||||
TermScript: /root/2023-10-27/libs/ws.js -t 10 127.0.0.1:9002 '{"message":"quit"}' || killall -KILL lteue-avx2
|
||||
InitScript: /root/lteue-linux-2025-03-15/lteue /root/oaicicd/ran_sa_aw2s_asue_2x2/aw2s-multi-00102-2x2-v2.cfg &
|
||||
TermScript: /root/lteue-linux-2025-03-15/ws.js -t 10 127.0.0.1:9002 '{"message":"quit"}' || killall -KILL lteue-avx2
|
||||
NetworkScript: ip netns exec ue1 ip a show dev pdn0
|
||||
amarisoft_ue_fhi72:
|
||||
Host: amariue
|
||||
InitScript: /root/lteue-linux-2023-10-27/ue/lteue /root/oaicicd/ran_sa_fhi72_asue_2x2_benetel550/fhi72-multi-20897-2x2.cfg &
|
||||
TermScript: /root/2023-10-27/libs/ws.js -t 10 127.0.0.1:9002 '{"message":"quit"}' || killall -KILL lteue-avx2
|
||||
InitScript: /root/lteue-linux-2025-03-15/lteue /root/oaicicd/ran_sa_fhi72_asue_2x2_benetel550/fhi72-multi-20897-2x2.cfg &
|
||||
TermScript: /root/lteue-linux-2025-03-15/ws.js -t 10 127.0.0.1:9002 '{"message":"quit"}' || killall -KILL lteue-avx2
|
||||
amarisoft_ue_1:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":1}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":1}'
|
||||
AttachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":1}'
|
||||
DetachScript: /root/lteue-linux-2025-03-15/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-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":2}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":2}'
|
||||
AttachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":2}'
|
||||
DetachScript: /root/lteue-linux-2025-03-15/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-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":3}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":3}'
|
||||
AttachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":3}'
|
||||
DetachScript: /root/lteue-linux-2025-03-15/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-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":4}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":4}'
|
||||
AttachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":4}'
|
||||
DetachScript: /root/lteue-linux-2025-03-15/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-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":5}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":5}'
|
||||
AttachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":5}'
|
||||
DetachScript: /root/lteue-linux-2025-03-15/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-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":6}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":6}'
|
||||
AttachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":6}'
|
||||
DetachScript: /root/lteue-linux-2025-03-15/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-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":7}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":7}'
|
||||
AttachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":7}'
|
||||
DetachScript: /root/lteue-linux-2025-03-15/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-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":8}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":8}'
|
||||
AttachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":8}'
|
||||
DetachScript: /root/lteue-linux-2025-03-15/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-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":9}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":9}'
|
||||
AttachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":9}'
|
||||
DetachScript: /root/lteue-linux-2025-03-15/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-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":10}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":10}'
|
||||
AttachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":10}'
|
||||
DetachScript: /root/lteue-linux-2025-03-15/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
|
||||
amarisoft_ue_11:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":11}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":11}'
|
||||
AttachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":11}'
|
||||
DetachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":11}'
|
||||
NetworkScript: ip netns exec ue11 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue11
|
||||
MTU: 1500
|
||||
amarisoft_ue_12:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":12}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":12}'
|
||||
AttachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":12}'
|
||||
DetachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":12}'
|
||||
NetworkScript: ip netns exec ue12 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue12
|
||||
MTU: 1500
|
||||
amarisoft_ue_13:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":13}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":13}'
|
||||
AttachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":13}'
|
||||
DetachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":13}'
|
||||
NetworkScript: ip netns exec ue13 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue13
|
||||
MTU: 1500
|
||||
amarisoft_ue_14:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":14}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":14}'
|
||||
AttachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":14}'
|
||||
DetachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":14}'
|
||||
NetworkScript: ip netns exec ue14 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue14
|
||||
MTU: 1500
|
||||
amarisoft_ue_15:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":15}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":15}'
|
||||
AttachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":15}'
|
||||
DetachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":15}'
|
||||
NetworkScript: ip netns exec ue15 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue15
|
||||
MTU: 1500
|
||||
amarisoft_ue_16:
|
||||
Host: amariue
|
||||
AttachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":16}'
|
||||
DetachScript: /root/2023-10-27/libs/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":16}'
|
||||
AttachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":16}'
|
||||
DetachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_off","ue_id":16}'
|
||||
NetworkScript: ip netns exec ue16 ip a show dev pdn0
|
||||
CmdPrefix: ip netns exec ue16
|
||||
MTU: 1500
|
||||
|
||||
@@ -498,10 +498,10 @@ class Containerize():
|
||||
elif image != 'ran-build':
|
||||
cmd.run(f'sed -i -e "s#ran-build:latest#ran-build:{imageTag}#" docker/Dockerfile.{pattern}{self.dockerfileprefix}')
|
||||
if image == 'oai-gnb-aerial':
|
||||
cmd.run('cp -f /opt/nvidia-ipc/nvipc_src.*.tar.gz .')
|
||||
cmd.run('cp -f /opt/nvidia-ipc/nvipc.src.2025.05.20.tar.gz .')
|
||||
ret = cmd.run(f'{self.cli} build {self.cliBuildOptions} --target {image} --tag {name}:{imageTag} --file docker/Dockerfile.{pattern}{self.dockerfileprefix} {option} . > cmake_targets/log/{name}.log 2>&1', timeout=1200)
|
||||
if image == 'oai-gnb-aerial':
|
||||
cmd.run('rm -f nvipc_src.*.tar.gz')
|
||||
cmd.run('rm -f nvipc.src.2025.05.20.tar.gz')
|
||||
if image == 'ran-build' and ret.returncode == 0:
|
||||
cmd.run(f"docker run --name test-log -d {name}:{imageTag} /bin/true")
|
||||
cmd.run(f"docker cp test-log:/oai-ran/cmake_targets/log/ cmake_targets/log/{name}/")
|
||||
|
||||
@@ -224,7 +224,6 @@ class HTMLManagement():
|
||||
self.htmlFile.write(' </table>\n')
|
||||
self.htmlFile.write(' </div>\n')
|
||||
self.htmlFile.close()
|
||||
time.sleep(1)
|
||||
if passStatus:
|
||||
cmd = "sed -i -e 's/__STATE_" + self.htmlTabNames[0] + "__//' test_results.html"
|
||||
subprocess.run(cmd, shell=True)
|
||||
|
||||
@@ -213,7 +213,7 @@ def Iperf_analyzeV2UDP(server_filename, iperf_bitrate_threshold, iperf_packetlos
|
||||
pal_msg += f' (too high! >{iperf_packetloss_threshold}%)'
|
||||
return (result, f'{req_msg}\n{bir_msg}\n{brl_msg}\n{jit_msg}\n{pal_msg}')
|
||||
|
||||
def Custom_Command(HTML, node, command, command_fail):
|
||||
def Custom_Command(HTML, node, command):
|
||||
logging.info(f"Executing custom command on {node}")
|
||||
cmd = cls_cmd.getConnection(node)
|
||||
ret = cmd.run(command)
|
||||
@@ -221,26 +221,20 @@ def Custom_Command(HTML, node, command, command_fail):
|
||||
logging.debug(f"Custom_Command: {command} on node: {node} - {'OK, command succeeded' if ret.returncode == 0 else f'Error, return code: {ret.returncode}'}")
|
||||
status = 'OK'
|
||||
message = []
|
||||
if ret.returncode != 0 and not command_fail:
|
||||
message = [ret.stdout]
|
||||
logging.warning(f'Custom_Command output: {message}')
|
||||
status = 'Warning'
|
||||
if ret.returncode != 0 and command_fail:
|
||||
if ret.returncode != 0:
|
||||
message = [ret.stdout]
|
||||
logging.error(f'Custom_Command failed: output: {message}')
|
||||
status = 'KO'
|
||||
HTML.CreateHtmlTestRowQueue(command, status, message)
|
||||
return status == 'OK' or status == 'Warning'
|
||||
|
||||
def Custom_Script(HTML, node, script, command_fail):
|
||||
def Custom_Script(HTML, node, script):
|
||||
logging.info(f"Executing custom script on {node}")
|
||||
ret = cls_cmd.runScript(node, script, 90)
|
||||
logging.debug(f"Custom_Script: {script} on node: {node} - return code {ret.returncode}, output:\n{ret.stdout}")
|
||||
status = 'OK'
|
||||
message = [ret.stdout]
|
||||
if ret.returncode != 0 and not command_fail:
|
||||
status = 'Warning'
|
||||
if ret.returncode != 0 and command_fail:
|
||||
if ret.returncode != 0:
|
||||
status = 'KO'
|
||||
HTML.CreateHtmlTestRowQueue(script, status, message)
|
||||
return status == 'OK' or status == 'Warning'
|
||||
|
||||
@@ -58,6 +58,14 @@ gNBs =
|
||||
}
|
||||
);
|
||||
|
||||
pdcp = {
|
||||
drb = {
|
||||
sn_size = "len18bits"
|
||||
t_reordering = "ms100"
|
||||
discard_timer = "infinity"
|
||||
}
|
||||
}
|
||||
|
||||
security = {
|
||||
# preferred ciphering algorithms
|
||||
# the first one of the list that an UE supports in chosen
|
||||
|
||||
@@ -163,6 +163,31 @@ gNBs =
|
||||
}
|
||||
);
|
||||
|
||||
rlc = {
|
||||
srb = {
|
||||
t_poll_retransmit = "ms45"
|
||||
t_reassembly = "ms25"
|
||||
t_status_prohibit = "ms0"
|
||||
poll_pdu = "infinity"
|
||||
poll_byte = "infinity"
|
||||
max_retx_threshold = "t8"
|
||||
sn_field_length = "size12"
|
||||
}
|
||||
drb_am = {
|
||||
t_poll_retransmit = "ms45"
|
||||
t_reassembly = "ms15"
|
||||
t_status_prohibit = "ms15"
|
||||
poll_pdu = "p64"
|
||||
poll_byte = "kB500"
|
||||
max_retx_threshold = "t32"
|
||||
sn_field_length = "size18"
|
||||
}
|
||||
drb_um = {
|
||||
t_reassembly = "ms15"
|
||||
sn_field_length = "size12"
|
||||
}
|
||||
}
|
||||
|
||||
MACRLCs = (
|
||||
{
|
||||
num_cc = 1;
|
||||
|
||||
@@ -169,10 +169,10 @@ gNBs =
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.68.194";
|
||||
GNB_IPV4_ADDRESS_FOR_S1U = "192.168.68.194";
|
||||
GNB_IPV4_ADDRESS_FOR_S1_MME = "172.21.16.109";
|
||||
GNB_IPV4_ADDRESS_FOR_S1U = "172.21.16.109";
|
||||
GNB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
GNB_IPV4_ADDRESS_FOR_X2C = "192.168.68.194";
|
||||
GNB_IPV4_ADDRESS_FOR_X2C = "172.21.16.109";
|
||||
GNB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
|
||||
|
||||
@@ -149,6 +149,8 @@ gNBs =
|
||||
|
||||
#ext2
|
||||
#ntn_Config_r17
|
||||
# This can be of values {s5, s10, s15, s20, s25, s30, s35, s40, s45, s50, s55, s60, s120, s180, s240, s900}
|
||||
ntn-UlSyncValidityDuration-r17 = 240;
|
||||
cellSpecificKoffset_r17 = 478;
|
||||
ta-Common-r17 = 58629666; # 238.74 ms
|
||||
positionX-r17 = 0;
|
||||
|
||||
@@ -21,7 +21,6 @@ gNBs =
|
||||
|
||||
sib1_tda = 15;
|
||||
min_rxtxtime = 6;
|
||||
beam_weights = [0]; // single SSB -> one analog beam
|
||||
|
||||
servingCellConfigCommon = (
|
||||
{
|
||||
@@ -179,6 +178,7 @@ MACRLCs = ({
|
||||
set_analog_beamforming = 1;
|
||||
beam_duration = 1;
|
||||
beams_per_period = 1;
|
||||
beam_weights = [0]; // single SSB -> one analog beam
|
||||
});
|
||||
|
||||
L1s = (
|
||||
|
||||
@@ -376,14 +376,12 @@ def ExecuteActionWithParam(action):
|
||||
# Change all execution targets to localhost
|
||||
node = 'localhost'
|
||||
command = test.findtext('command')
|
||||
command_fail = test.findtext('command_fail') in ['True', 'true', 'Yes', 'yes']
|
||||
success = cls_oaicitest.Custom_Command(HTML, node, command, command_fail)
|
||||
success = cls_oaicitest.Custom_Command(HTML, node, command)
|
||||
|
||||
elif action == 'Custom_Script':
|
||||
node = test.findtext('node')
|
||||
script = test.findtext('script')
|
||||
command_fail = test.findtext('command_fail') in ['True', 'true', 'Yes', 'yes']
|
||||
success = cls_oaicitest.Custom_Script(HTML, node, script, command_fail)
|
||||
success = cls_oaicitest.Custom_Script(HTML, node, script)
|
||||
|
||||
elif action == 'Pull_Cluster_Image':
|
||||
tag_prefix = test.findtext('tag_prefix') or ""
|
||||
@@ -626,6 +624,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
|
||||
HTML.testCase_id=CiTestObj.testCase_id
|
||||
CiTestObj.desc = test.findtext('desc')
|
||||
always_exec = test.findtext('always_exec') in ['True', 'true', 'Yes', 'yes']
|
||||
may_fail = test.findtext('may_fail') in ['True', 'true', 'Yes', 'yes']
|
||||
HTML.desc=CiTestObj.desc
|
||||
action = test.findtext('class')
|
||||
if (CheckClassValidity(xml_class_list, action, id) == False):
|
||||
@@ -639,7 +638,9 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
|
||||
break
|
||||
try:
|
||||
test_succeeded = ExecuteActionWithParam(action)
|
||||
if not test_succeeded:
|
||||
if not test_succeeded and may_fail:
|
||||
logging.warning(f"test ID {test_case_id} action {action} may or may not fail, proceeding despite error")
|
||||
elif not test_succeeded:
|
||||
logging.error(f"test ID {test_case_id} action {action} failed ({test_succeeded}), skipping next tests")
|
||||
task_set_succeeded = False
|
||||
except Exception as e:
|
||||
|
||||
@@ -95,7 +95,6 @@ class RANManagement():
|
||||
self.cmd_prefix = '' # prefix before {lte,nr}-softmodem
|
||||
self.node = ''
|
||||
self.command = ''
|
||||
self.command_fail = False
|
||||
|
||||
|
||||
#-----------------------------------------------------------
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
<htmlTabIcon>wrench</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
000001
|
||||
000011
|
||||
000012
|
||||
000002
|
||||
000003
|
||||
000004
|
||||
@@ -38,7 +40,21 @@
|
||||
<desc>This should succeed</desc>
|
||||
<node>localhost</node>
|
||||
<command>true</command>
|
||||
<command_fail>yes</command_fail>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000011">
|
||||
<class>Custom_Command</class>
|
||||
<desc>This may fail</desc>
|
||||
<may_fail>true</may_fail>
|
||||
<node>localhost</node>
|
||||
<command>false</command>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000012">
|
||||
<class>Custom_Command</class>
|
||||
<desc>This is still executed</desc>
|
||||
<node>localhost</node>
|
||||
<command>true</command>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000002">
|
||||
@@ -46,7 +62,6 @@
|
||||
<desc>This should fail</desc>
|
||||
<node>localhost</node>
|
||||
<command>false</command>
|
||||
<command_fail>yes</command_fail>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000003">
|
||||
@@ -54,7 +69,6 @@
|
||||
<desc>This should be skipped</desc>
|
||||
<node>localhost</node>
|
||||
<command>true</command>
|
||||
<command_fail>yes</command_fail>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000004">
|
||||
@@ -63,6 +77,5 @@
|
||||
<always_exec>true</always_exec>
|
||||
<node>localhost</node>
|
||||
<command>true</command>
|
||||
<command_fail>yes</command_fail>
|
||||
</testCase>
|
||||
</testCaseList>
|
||||
|
||||
@@ -134,7 +134,6 @@
|
||||
<desc>Simulate a DL radio channel with noise (3 dB)</desc>
|
||||
<node>cacofonix</node>
|
||||
<command>echo channelmod modify 0 noise_power_dB 3 | nc --send-only 192.168.71.181 8091</command>
|
||||
<command_fail>yes</command_fail>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030021">
|
||||
@@ -166,7 +165,6 @@
|
||||
<desc>Trigger Reestablishment</desc>
|
||||
<node>cacofonix</node>
|
||||
<command>echo ci force_reestab | nc 192.168.71.171 9090 | grep -E 'Reset RLC counters of UE RNTI [0-9a-f]{4} to trigger reestablishment'</command>
|
||||
<command_fail>yes</command_fail>
|
||||
</testCase>
|
||||
|
||||
<testCase id="020022">
|
||||
@@ -185,7 +183,6 @@
|
||||
<desc>Verify Reestablishment</desc>
|
||||
<node>cacofonix</node>
|
||||
<command>echo ci get_reestab_count | nc 192.168.71.150 9090 | grep -E 'UE RNTI [0-9a-f]{4} reestab 1'</command>
|
||||
<command_fail>yes</command_fail>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040021">
|
||||
@@ -193,7 +190,6 @@
|
||||
<desc>Simulate a disruption of DL radio channel (ploss 55)</desc>
|
||||
<node>cacofonix</node>
|
||||
<command>echo channelmod modify 0 ploss 55 | nc 192.168.71.181 8091</command>
|
||||
<command_fail>yes</command_fail>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040022">
|
||||
@@ -201,7 +197,6 @@
|
||||
<desc>Get UE sync state (UE ID 0)</desc>
|
||||
<node>cacofonix</node>
|
||||
<command>echo ciUE sync_state 0 | nc 192.168.71.181 8091 | grep -E UE_NOT_SYNC</command>
|
||||
<command_fail>yes</command_fail>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040023">
|
||||
@@ -209,7 +204,6 @@
|
||||
<desc>Restoration of the original DL channel conditions (ploss 20)</desc>
|
||||
<node>cacofonix</node>
|
||||
<command>echo channelmod modify 0 ploss 20 | nc 192.168.71.181 8091</command>
|
||||
<command_fail>yes</command_fail>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040024">
|
||||
@@ -217,7 +211,6 @@
|
||||
<desc>Get UE sync state (UE ID 0)</desc>
|
||||
<node>cacofonix</node>
|
||||
<command>echo ciUE sync_state 0 | nc 192.168.71.181 8091 | grep -E UE_CONNECTED</command>
|
||||
<command_fail>yes</command_fail>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040025">
|
||||
@@ -225,7 +218,6 @@
|
||||
<desc>Trigger Handover</desc>
|
||||
<node>cacofonix</node>
|
||||
<command>echo ci trigger_f1_ho | nc 192.168.71.150 9090</command>
|
||||
<command_fail>yes</command_fail>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040026">
|
||||
@@ -233,7 +225,6 @@
|
||||
<desc>UE (1) connected to DU-PCI 0?</desc>
|
||||
<node>cacofonix</node>
|
||||
<command>echo ci fetch_du_by_ue_id 1 | nc 192.168.71.150 9090 | grep "3584"</command>
|
||||
<command_fail>yes</command_fail>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040027">
|
||||
@@ -241,7 +232,6 @@
|
||||
<desc>UE (1) connected to DU-PCI 1?</desc>
|
||||
<node>cacofonix</node>
|
||||
<command>echo ci fetch_du_by_ue_id 1 | nc 192.168.71.150 9090 | grep "3585"</command>
|
||||
<command_fail>yes</command_fail>
|
||||
</testCase>
|
||||
|
||||
<testCase id="100021">
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
000001
|
||||
000002
|
||||
000003
|
||||
002001
|
||||
010000
|
||||
000004
|
||||
333333
|
||||
@@ -40,7 +39,6 @@
|
||||
010002
|
||||
010003
|
||||
020005
|
||||
010013
|
||||
002006
|
||||
444444
|
||||
100002
|
||||
@@ -50,12 +48,6 @@
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="002001">
|
||||
<class>IdleSleep</class>
|
||||
<desc>Sleep</desc>
|
||||
<idle_sleep_time_in_sec>10</idle_sleep_time_in_sec>
|
||||
</testCase>
|
||||
|
||||
<testCase id="111110">
|
||||
<class>Pull_Local_Registry</class>
|
||||
<desc>Pull Images from Local Registry</desc>
|
||||
@@ -173,43 +165,39 @@
|
||||
</testCase>
|
||||
|
||||
<testCase id="010000">
|
||||
<class>Custom_Command</class>
|
||||
<class>Deploy_Object</class>
|
||||
<desc>RC monitoring</desc>
|
||||
<node>localhost</node>
|
||||
<command_fail>yes</command_fail>
|
||||
<command>docker exec oai-flexric bash -c "stdbuf -o0 /usr/local/flexric/xApp/c/monitor/xapp_rc_moni" > ../cmake_targets/log/5g_rfsimulator_flexric/rc-moni-010000.log</command>
|
||||
<yaml_path>ci-scripts/yaml_files/5g_rfsimulator_flexric</yaml_path>
|
||||
<services>xapp-rc-moni</services>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
<eNB_serverId>0</eNB_serverId>
|
||||
</testCase>
|
||||
|
||||
<testCase id="010001">
|
||||
<class>Custom_Command</class>
|
||||
<class>Deploy_Object</class>
|
||||
<desc>KPM monitoring</desc>
|
||||
<node>localhost</node>
|
||||
<command_fail>yes</command_fail>
|
||||
<command>docker exec oai-flexric bash -c "stdbuf -o0 /usr/local/flexric/xApp/c/monitor/xapp_kpm_moni" > ../cmake_targets/log/5g_rfsimulator_flexric/kpm-moni-010001.log</command>
|
||||
<yaml_path>ci-scripts/yaml_files/5g_rfsimulator_flexric</yaml_path>
|
||||
<services>xapp-kpm-moni</services>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
<eNB_serverId>0</eNB_serverId>
|
||||
</testCase>
|
||||
|
||||
<testCase id="010002">
|
||||
<class>Custom_Command</class>
|
||||
<class>Deploy_Object</class>
|
||||
<desc>KPM monitoring and RC control</desc>
|
||||
<node>localhost</node>
|
||||
<command_fail>yes</command_fail>
|
||||
<command>docker exec oai-flexric bash -c "stdbuf -o0 /usr/local/flexric/xApp/c/kpm_rc/xapp_kpm_rc" > ../cmake_targets/log/5g_rfsimulator_flexric/kpm_rc-010002.log</command>
|
||||
<yaml_path>ci-scripts/yaml_files/5g_rfsimulator_flexric</yaml_path>
|
||||
<services>xapp-kpm-rc</services>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
<eNB_serverId>0</eNB_serverId>
|
||||
</testCase>
|
||||
|
||||
<testCase id="010003">
|
||||
<class>Custom_Command</class>
|
||||
<class>Deploy_Object</class>
|
||||
<desc>Custom SMs monitoring</desc>
|
||||
<node>localhost</node>
|
||||
<command_fail>yes</command_fail>
|
||||
<command>docker exec oai-flexric bash -c "stdbuf -o0 /usr/local/flexric/xApp/c/monitor/xapp_gtp_mac_rlc_pdcp_moni" > ../cmake_targets/log/5g_rfsimulator_flexric/sms-moni-010003.log</command>
|
||||
</testCase>
|
||||
|
||||
<testCase id="010013">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Custom SMs monitoring</desc>
|
||||
<node>localhost</node>
|
||||
<command_fail>yes</command_fail>
|
||||
<command>docker exec oai-flexric bash -c "stdbuf -o0 /usr/local/flexric/xApp/c/monitor/xapp_gtp_mac_rlc_pdcp_moni" > ../cmake_targets/log/5g_rfsimulator_flexric/sms-moni-010013.log</command>
|
||||
<yaml_path>ci-scripts/yaml_files/5g_rfsimulator_flexric</yaml_path>
|
||||
<services>xapp-gtp-mac-rlc-pdcp-moni</services>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
<eNB_serverId>0</eNB_serverId>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
|
||||
@@ -242,7 +242,7 @@
|
||||
|
||||
<testCase id="444445">
|
||||
<class>Detach_UE</class>
|
||||
<desc>Detach OAI UE 2 to 10</desc>
|
||||
<desc>Detach OAI UE 3 to 10</desc>
|
||||
<id>rfsim5g_ue3 rfsim5g_ue4 rfsim5g_ue5 rfsim5g_ue6 rfsim5g_ue7 rfsim5g_ue8 rfsim5g_ue9 rfsim5g_ue10</id>
|
||||
<nodes>cacofonix cacofonix cacofonix cacofonix cacofonix cacofonix cacofonix cacofonix</nodes>
|
||||
</testCase>
|
||||
|
||||
@@ -151,7 +151,6 @@
|
||||
<desc>Force Msg3 C-RNTI RA</desc>
|
||||
<node>cacofonix</node>
|
||||
<command>echo ciUE force_crnti_ra | nc 192.168.71.150 8091</command>
|
||||
<command_fail>yes</command_fail>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040002">
|
||||
@@ -159,7 +158,6 @@
|
||||
<desc>Force RRC_IDLE (UE ID 0)</desc>
|
||||
<node>cacofonix</node>
|
||||
<command>echo ciUE force_RRC_IDLE | nc 192.168.71.150 8091</command>
|
||||
<command_fail>yes</command_fail>
|
||||
</testCase>
|
||||
|
||||
<testCase id="100001">
|
||||
|
||||
@@ -79,7 +79,6 @@
|
||||
<desc>Check that UE synched</desc>
|
||||
<node>cacofonix</node>
|
||||
<command>docker logs rfsim5g-oai-nr-ue-2 | grep -m 1 "PSBCH RX:OK"</command>
|
||||
<command_fail>yes</command_fail>
|
||||
</testCase>
|
||||
|
||||
<testCase id="100001">
|
||||
|
||||
@@ -108,14 +108,6 @@
|
||||
<eNB_serverId>0</eNB_serverId>
|
||||
</testCase>
|
||||
|
||||
<testCase id="004000">
|
||||
<class>Custom_Command</class>
|
||||
<always_exec>true</always_exec>
|
||||
<desc>Clean-Up any residual volume</desc>
|
||||
<node>cacofonix</node>
|
||||
<command>docker volume rm 5g_rfsimulator_tdd_dora_rrc.config</command>
|
||||
</testCase>
|
||||
|
||||
<testCase id="222222">
|
||||
<class>Clean_Test_Server_Images</class>
|
||||
<always_exec>true</always_exec>
|
||||
|
||||
@@ -70,9 +70,9 @@
|
||||
|
||||
<testCase id = "100000">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Reset USRP</desc>
|
||||
<desc>Reset USRP on nepes</desc>
|
||||
<node>nepes</node>
|
||||
<command>sudo -S /usr/lib/uhd/utils/b2xx_fx3_utils --reset-device</command>
|
||||
<command>sudo -S /usr/local/lib/uhd/utils/b2xx_fx3_utils --reset-device</command>
|
||||
</testCase>
|
||||
|
||||
<testCase id="200000">
|
||||
|
||||
@@ -182,7 +182,7 @@
|
||||
|
||||
<testCase id="100010">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/3Mbps/UDP)(30 sec)(multi-ue profile)</desc>
|
||||
<desc>iperf (DL/3Mbps/UDP)(30 sec)</desc>
|
||||
<iperf_args>-u -b 45M -t 30 -R</iperf_args>
|
||||
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10 amarisoft_ue_11 amarisoft_ue_12 amarisoft_ue_13 amarisoft_ue_14 amarisoft_ue_15</id>
|
||||
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
|
||||
@@ -193,7 +193,7 @@
|
||||
|
||||
<testCase id="100030">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/TCP)(30 sec)(multi-ue profile)</desc>
|
||||
<desc>iperf (DL/TCP)(30 sec)</desc>
|
||||
<iperf_args>-t 30 -R</iperf_args>
|
||||
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10 amarisoft_ue_11 amarisoft_ue_12 amarisoft_ue_13 amarisoft_ue_14 amarisoft_ue_15</id>
|
||||
<iperf_tcp_rate_target>2</iperf_tcp_rate_target>
|
||||
@@ -202,7 +202,7 @@
|
||||
|
||||
<testCase id="100020">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (UL/1Mbps/UDP)(30 sec)(multi-ue profile)</desc>
|
||||
<desc>iperf (UL/1Mbps/UDP)(30 sec)</desc>
|
||||
<iperf_args>-u -b 15M -t 30</iperf_args>
|
||||
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10 amarisoft_ue_11 amarisoft_ue_12 amarisoft_ue_13 amarisoft_ue_14 amarisoft_ue_15</id>
|
||||
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
|
||||
@@ -213,7 +213,7 @@
|
||||
|
||||
<testCase id="100040">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (UL/TCP)(30 sec)(multi-ue profile)</desc>
|
||||
<desc>iperf (UL/TCP)(30 sec)</desc>
|
||||
<iperf_args>-t 30</iperf_args>
|
||||
<svr_id>oc-cn5g</svr_id>
|
||||
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10 amarisoft_ue_11 amarisoft_ue_12 amarisoft_ue_13 amarisoft_ue_14 amarisoft_ue_15</id>
|
||||
|
||||
@@ -179,7 +179,7 @@
|
||||
|
||||
<testCase id="000010">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/4Mbps/UDP)(30 sec)(multi-ue profile)</desc>
|
||||
<desc>iperf (DL/4Mbps/UDP)(30 sec)</desc>
|
||||
<iperf_args>-u -b 60M -t 30 -R</iperf_args>
|
||||
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10 amarisoft_ue_11 amarisoft_ue_12 amarisoft_ue_13 amarisoft_ue_14 amarisoft_ue_15</id>
|
||||
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
|
||||
@@ -190,7 +190,7 @@
|
||||
|
||||
<testCase id="000030">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/TCP)(30 sec)(multi-ue profile)</desc>
|
||||
<desc>iperf (DL/TCP)(30 sec)</desc>
|
||||
<iperf_args>-t 30 -R</iperf_args>
|
||||
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10 amarisoft_ue_11 amarisoft_ue_12 amarisoft_ue_13 amarisoft_ue_14 amarisoft_ue_15</id>
|
||||
<iperf_tcp_rate_target>3.9</iperf_tcp_rate_target>
|
||||
@@ -199,7 +199,7 @@
|
||||
|
||||
<testCase id="000020">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (UL/1.5Mbps/UDP)(30 sec)(multi-ue profile)</desc>
|
||||
<desc>iperf (UL/1.5Mbps/UDP)(30 sec)</desc>
|
||||
<iperf_args>-u -b 22.5M -t 30</iperf_args>
|
||||
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10 amarisoft_ue_11 amarisoft_ue_12 amarisoft_ue_13 amarisoft_ue_14 amarisoft_ue_15</id>
|
||||
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
|
||||
@@ -210,7 +210,7 @@
|
||||
|
||||
<testCase id="000040">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (UL/TCP)(30 sec)(multi-ue profile)</desc>
|
||||
<desc>iperf (UL/TCP)(30 sec)</desc>
|
||||
<iperf_args>-t 30</iperf_args>
|
||||
<svr_id>oc-cn5g</svr_id>
|
||||
<id>amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10 amarisoft_ue_11 amarisoft_ue_12 amarisoft_ue_13 amarisoft_ue_14 amarisoft_ue_15</id>
|
||||
|
||||
@@ -200,14 +200,12 @@
|
||||
<desc>Trigger Reestablishment</desc>
|
||||
<node>ofqot</node>
|
||||
<command>echo ci force_reestab | nc -N 127.0.0.1 9090 | grep -E 'Reset RLC counters of UE RNTI [0-9a-f]{4} to trigger reestablishment'</command>
|
||||
<command_fail>yes</command_fail>
|
||||
</testCase>
|
||||
<testCase id="060002">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Verify Reestablishment</desc>
|
||||
<node>ofqot</node>
|
||||
<command>echo ci get_reestab_count | nc -N 127.0.0.1 9090 | grep -E 'UE RNTI [0-9a-f]{4} reestab 1'</command>
|
||||
<command_fail>yes</command_fail>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030201">
|
||||
|
||||
@@ -188,14 +188,12 @@
|
||||
<desc>Trigger Reestablishment (on DU)</desc>
|
||||
<node>ofqot</node>
|
||||
<command>echo ci force_reestab | nc -N 127.0.0.1 9091 | grep -E 'Reset RLC counters of UE RNTI [0-9a-f]{4} to trigger reestablishment'</command>
|
||||
<command_fail>yes</command_fail>
|
||||
</testCase>
|
||||
<testCase id="360002">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Verify Reestablishment (on CU)</desc>
|
||||
<node>ofqot</node>
|
||||
<command>echo ci get_reestab_count | nc -N 127.0.0.1 9090 | grep -E 'UE RNTI [0-9a-f]{4} reestab 1'</command>
|
||||
<command_fail>yes</command_fail>
|
||||
</testCase>
|
||||
|
||||
<testCase id="100002">
|
||||
|
||||
@@ -233,14 +233,12 @@
|
||||
<desc>Trigger Reestablishment (on DU)</desc>
|
||||
<node>ofqot</node>
|
||||
<command>echo ci force_reestab | nc -N 127.0.0.1 9091 | grep -E 'Reset RLC counters of UE RNTI [0-9a-f]{4} to trigger reestablishment'</command>
|
||||
<command_fail>yes</command_fail>
|
||||
</testCase>
|
||||
<testCase id="160002">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Verify Reestablishment (on CU)</desc>
|
||||
<node>ofqot</node>
|
||||
<command>echo ci get_reestab_count | nc -N 127.0.0.1 9090 | grep -E 'UE RNTI [0-9a-f]{4} reestab 1'</command>
|
||||
<command_fail>yes</command_fail>
|
||||
</testCase>
|
||||
|
||||
<testCase id="130201">
|
||||
|
||||
@@ -49,7 +49,6 @@
|
||||
<desc>Setup sriov and network interfaces Metanoia</desc>
|
||||
<node>cacofonix</node>
|
||||
<script>yaml_files/sa_fhi_7.2_metanoia_2x2_gnb/setup_sriov_metanoia.sh</script>
|
||||
<command_fail>yes</command_fail>
|
||||
</testCase>
|
||||
|
||||
<testCase id="110000">
|
||||
@@ -92,7 +91,7 @@
|
||||
|
||||
<testCase id="100010">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/570Mbps/UDP)(30 sec)(multi-ue profile)</desc>
|
||||
<desc>iperf (DL/570Mbps/UDP)(30 sec)</desc>
|
||||
<iperf_args>-u -b 570M -t 30 -R</iperf_args>
|
||||
<id>up2-fhi72</id>
|
||||
<iperf_packetloss_threshold>20</iperf_packetloss_threshold>
|
||||
@@ -103,7 +102,7 @@
|
||||
|
||||
<testCase id="100030">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/TCP)(30 sec)(multi-ue profile)</desc>
|
||||
<desc>iperf (DL/TCP)(30 sec)</desc>
|
||||
<iperf_args>-t 30 -R</iperf_args>
|
||||
<id>up2-fhi72</id>
|
||||
<iperf_tcp_rate_target>80</iperf_tcp_rate_target>
|
||||
@@ -112,7 +111,7 @@
|
||||
|
||||
<testCase id="100020">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (UL/100Mbps/UDP)(30 sec)(multi-ue profile)</desc>
|
||||
<desc>iperf (UL/100Mbps/UDP)(30 sec)</desc>
|
||||
<iperf_args>-u -b 100M -t 30</iperf_args>
|
||||
<id>up2-fhi72</id>
|
||||
<iperf_packetloss_threshold>20</iperf_packetloss_threshold>
|
||||
@@ -123,7 +122,7 @@
|
||||
|
||||
<testCase id="100040">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (UL/TCP)(30 sec)(multi-ue profile)</desc>
|
||||
<desc>iperf (UL/TCP)(30 sec)</desc>
|
||||
<iperf_args>-t 30</iperf_args>
|
||||
<id>up2-fhi72</id>
|
||||
<iperf_tcp_rate_target>80</iperf_tcp_rate_target>
|
||||
@@ -166,7 +165,6 @@
|
||||
<desc>Set CPU to idle state, set kernel parameters to default values</desc>
|
||||
<node>cacofonix</node>
|
||||
<script>yaml_files/sa_fhi_7.2_metanoia_2x2_gnb/setup_cleanup.sh</script>
|
||||
<command_fail>yes</command_fail>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
100020
|
||||
100030
|
||||
100040
|
||||
100011
|
||||
103000
|
||||
100002
|
||||
130000
|
||||
@@ -49,7 +50,6 @@
|
||||
<desc>Setup sriov and network interfaces VVDN</desc>
|
||||
<node>cacofonix</node>
|
||||
<script>yaml_files/sa_fhi_7.2_vvdn_gnb/setup_sriov_vvdn.sh</script>
|
||||
<command_fail>yes</command_fail>
|
||||
</testCase>
|
||||
|
||||
<testCase id="110000">
|
||||
@@ -90,7 +90,7 @@
|
||||
|
||||
<testCase id="100010">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/600Mbps/UDP)(30 sec)(multi-ue profile)</desc>
|
||||
<desc>iperf (DL/600Mbps/UDP)(30 sec)</desc>
|
||||
<iperf_args>-u -b 600M -t 30 -R</iperf_args>
|
||||
<id>up2-fhi72</id>
|
||||
<iperf_packetloss_threshold>20</iperf_packetloss_threshold>
|
||||
@@ -99,9 +99,20 @@
|
||||
<svr_id>oc-cn5g-20897</svr_id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="100011">
|
||||
<class>Iperf</class>
|
||||
<desc>Optional iperf (DL/700Mbps/UDP)(30 sec)</desc>
|
||||
<may_fail>true</may_fail>
|
||||
<iperf_args>-u -b 700M -t 30 -R</iperf_args>
|
||||
<id>up2-fhi72</id>
|
||||
<iperf_packetloss_threshold>10</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>95</iperf_bitrate_threshold>
|
||||
<svr_id>oc-cn5g-20897</svr_id>
|
||||
</testCase>
|
||||
|
||||
<testCase id="100030">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (DL/TCP)(30 sec)(multi-ue profile)</desc>
|
||||
<desc>iperf (DL/TCP)(30 sec)</desc>
|
||||
<iperf_args>-t 30 -R</iperf_args>
|
||||
<id>up2-fhi72</id>
|
||||
<iperf_tcp_rate_target>40</iperf_tcp_rate_target>
|
||||
@@ -110,7 +121,7 @@
|
||||
|
||||
<testCase id="100020">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (UL/80Mbps/UDP)(30 sec)(multi-ue profile)</desc>
|
||||
<desc>iperf (UL/80Mbps/UDP)(30 sec)</desc>
|
||||
<iperf_args>-u -b 80M -t 30</iperf_args>
|
||||
<id>up2-fhi72</id>
|
||||
<iperf_packetloss_threshold>20</iperf_packetloss_threshold>
|
||||
@@ -121,7 +132,7 @@
|
||||
|
||||
<testCase id="100040">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (UL/TCP)(30 sec)(multi-ue profile)</desc>
|
||||
<desc>iperf (UL/TCP)(30 sec)</desc>
|
||||
<iperf_args>-t 30</iperf_args>
|
||||
<id>up2-fhi72</id>
|
||||
<iperf_tcp_rate_target>10</iperf_tcp_rate_target>
|
||||
@@ -164,7 +175,6 @@
|
||||
<desc>Set CPU to idle state, set kernel parameters to default values</desc>
|
||||
<node>cacofonix</node>
|
||||
<script>yaml_files/sa_fhi_7.2_vvdn_gnb/setup_cleanup.sh</script>
|
||||
<command_fail>yes</command_fail>
|
||||
</testCase>
|
||||
|
||||
|
||||
|
||||
@@ -194,14 +194,12 @@
|
||||
<desc>Trigger Reestablishment</desc>
|
||||
<node>ofqot</node>
|
||||
<command>echo ci force_reestab | nc -N 127.0.0.1 9090 | grep -E 'Reset RLC counters of UE RNTI [0-9a-f]{4} to trigger reestablishment'</command>
|
||||
<command_fail>yes</command_fail>
|
||||
</testCase>
|
||||
<testCase id="260002">
|
||||
<class>Custom_Command</class>
|
||||
<desc>Verify Reestablishment</desc>
|
||||
<node>ofqot</node>
|
||||
<command>echo ci get_reestab_count | nc -N 127.0.0.1 9090 | grep -E 'UE RNTI [0-9a-f]{4} reestab 1'</command>
|
||||
<command_fail>yes</command_fail>
|
||||
</testCase>
|
||||
|
||||
<testCase id="230201">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[NEAR-RIC]
|
||||
NEAR_RIC_IP = 192.168.70.150
|
||||
|
||||
[XAPP]
|
||||
DB_PATH = /flexric/db/
|
||||
DB_NAME = xapp_rnis_db
|
||||
DB_DIR = /tmp/
|
||||
|
||||
@@ -7,12 +7,79 @@ services:
|
||||
ipv4_address: 192.168.70.150
|
||||
volumes:
|
||||
- ./conf/flexric.conf:/usr/local/etc/flexric/flexric.conf
|
||||
- sharedXappLibs:/usr/local/lib/flexric/
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nearRT-RIC"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
|
||||
xapp-rc-moni:
|
||||
image: ${REGISTRY:-oaisoftwarealliance}/oai-flexric:${FLEXRIC_TAG:-develop}
|
||||
command: "stdbuf -o0 /usr/local/flexric/xApp/c/monitor/xapp_rc_moni"
|
||||
container_name: xapp-rc-moni
|
||||
depends_on:
|
||||
- oai-flexric
|
||||
- oai-gnb
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.154
|
||||
volumes:
|
||||
- ./conf/flexric.conf:/usr/local/etc/flexric/flexric.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep xapp_rc_moni"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
|
||||
xapp-kpm-moni:
|
||||
image: ${REGISTRY:-oaisoftwarealliance}/oai-flexric:${FLEXRIC_TAG:-develop}
|
||||
command: "stdbuf -o0 /usr/local/flexric/xApp/c/monitor/xapp_kpm_moni"
|
||||
container_name: xapp-kpm-moni
|
||||
depends_on:
|
||||
- oai-flexric
|
||||
- oai-gnb
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.155
|
||||
volumes:
|
||||
- ./conf/flexric.conf:/usr/local/etc/flexric/flexric.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep xapp_kpm_moni"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
|
||||
xapp-kpm-rc:
|
||||
image: ${REGISTRY:-oaisoftwarealliance}/oai-flexric:${FLEXRIC_TAG:-develop}
|
||||
command: "stdbuf -o0 /usr/local/flexric/xApp/c/kpm_rc/xapp_kpm_rc"
|
||||
container_name: xapp-kpm-rc
|
||||
depends_on:
|
||||
- oai-flexric
|
||||
- oai-gnb
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.156
|
||||
volumes:
|
||||
- ./conf/flexric.conf:/usr/local/etc/flexric/flexric.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep xapp_kpm_rc"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
|
||||
xapp-gtp-mac-rlc-pdcp-moni:
|
||||
image: ${REGISTRY:-oaisoftwarealliance}/oai-flexric:${FLEXRIC_TAG:-develop}
|
||||
command: "stdbuf -o0 /usr/local/flexric/xApp/c/monitor/xapp_gtp_mac_rlc_pdcp_moni"
|
||||
container_name: xapp-gtp-mac-rlc-pdcp-moni
|
||||
depends_on:
|
||||
- oai-flexric
|
||||
- oai-gnb
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.157
|
||||
volumes:
|
||||
- ./conf/flexric.conf:/usr/local/etc/flexric/flexric.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep -f xapp_gtp_mac_rlc_pdcp_moni"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
|
||||
oai-gnb:
|
||||
image: ${REGISTRY:-oaisoftwarealliance}/${GNB_IMG:-oai-gnb}:${TAG:-develop}
|
||||
privileged: true
|
||||
@@ -27,7 +94,6 @@ services:
|
||||
ipv4_address: 192.168.70.151
|
||||
volumes:
|
||||
- ../../conf_files/gnb.sa.band78.106prb.rfsim.flexric.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
- sharedXappLibs:/usr/local/lib/flexric/
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-softmodem"
|
||||
interval: 10s
|
||||
@@ -72,9 +138,6 @@ services:
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
volumes:
|
||||
sharedXappLibs:
|
||||
|
||||
networks:
|
||||
public_net:
|
||||
name: oai-cn5g-public-net
|
||||
|
||||
@@ -9,6 +9,7 @@ services:
|
||||
- IPC_LOCK
|
||||
ulimits:
|
||||
core: -1 # for core dumps
|
||||
network_mode: "host"
|
||||
environment:
|
||||
USE_B2XX: 'yes'
|
||||
USE_ADDITIONAL_OPTIONS: --nsa -E -q --RUs.[0].sdr_addrs serial=30C51D4 --continuous-tx --log_config.global_log_options level,nocolor,time,line_num,function
|
||||
@@ -16,9 +17,6 @@ services:
|
||||
- /dev/bus/usb/:/dev/bus/usb/
|
||||
volumes:
|
||||
- ../../conf_files/gnb.nsa.band78.106prb.usrpb200.conf:/opt/oai-gnb/etc/gnb.conf
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.68.194
|
||||
#entrypoint: /bin/bash -c "sleep infinity"
|
||||
healthcheck:
|
||||
# pgrep does NOT work
|
||||
@@ -26,12 +24,3 @@ services:
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
networks:
|
||||
public_net:
|
||||
name: nsa-b200-gnb-net
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.68.192/26
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "nsa-gnb-net"
|
||||
|
||||
@@ -23,7 +23,7 @@ services:
|
||||
- ../../../cmake_targets/share:/opt/cuBB/share
|
||||
userns_mode: host
|
||||
ipc: "shareable"
|
||||
image: cubb-build:24-3
|
||||
image: cubb-build:25-1
|
||||
environment:
|
||||
- cuBB_SDK=/opt/nvidia/cuBB
|
||||
command: bash -c "sudo rm -rf /tmp/phy.log && sudo chmod +x /opt/nvidia/cuBB/aerial_l1_entrypoint.sh && /opt/nvidia/cuBB/aerial_l1_entrypoint.sh"
|
||||
@@ -33,7 +33,7 @@ services:
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
oai-gnb-aerial:
|
||||
cpuset: "13-20"
|
||||
cpuset: "13-14"
|
||||
image: ${REGISTRY:-oaisoftwarealliance}/oai-gnb-aerial:${TAG:-develop}
|
||||
depends_on:
|
||||
nv-cubb:
|
||||
|
||||
@@ -35,6 +35,24 @@ typedef struct nssai_s {
|
||||
uint32_t sd;
|
||||
} nssai_t;
|
||||
|
||||
// Globally Unique AMF Identifier
|
||||
typedef struct nr_guami_s {
|
||||
uint16_t mcc;
|
||||
uint16_t mnc;
|
||||
uint8_t mnc_len;
|
||||
uint8_t amf_region_id;
|
||||
uint16_t amf_set_id;
|
||||
uint8_t amf_pointer;
|
||||
} nr_guami_t;
|
||||
|
||||
typedef enum {
|
||||
PDUSessionType_ipv4 = 0,
|
||||
PDUSessionType_ipv6 = 1,
|
||||
PDUSessionType_ipv4v6 = 2,
|
||||
PDUSessionType_ethernet = 3,
|
||||
PDUSessionType_unstructured = 4
|
||||
} pdu_session_type_t;
|
||||
|
||||
typedef enum { NON_DYNAMIC, DYNAMIC } fiveQI_t;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -308,3 +308,63 @@ void config_assign_int(configmodule_interface_t *cfg, paramdef_t *cfgoptions, ch
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Assigns the default value to a configuration parameter if available.
|
||||
*
|
||||
* This function checks the type of the parameter and assigns its default value
|
||||
* if it is defined. It handles various parameter types, including strings, integers,
|
||||
* arrays, doubles, IPv4 addresses, and lists. If the parameter is marked with
|
||||
* PARAMFLAG_DONOTREAD, it is ignored.
|
||||
*
|
||||
* @param[in] cfg Pointer to the configuration module interface.
|
||||
* @param[in] cfgoption Pointer to the parameter definition structure.
|
||||
* @param[in] prefix Optional prefix for the parameter name (can be NULL).
|
||||
* @return 1 if the default value was set, 0 if ignored, or -1 on error/unsupported type.
|
||||
*/
|
||||
int config_common_getdefault(configmodule_interface_t *cfg, paramdef_t *cfgoption, char *prefix)
|
||||
{
|
||||
if( (cfgoption->paramflags & PARAMFLAG_DONOTREAD) != 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
switch(cfgoption->type) {
|
||||
case TYPE_STRING:
|
||||
return config_setdefault_string(cfg, cfgoption, prefix);
|
||||
|
||||
case TYPE_STRINGLIST:
|
||||
return config_setdefault_stringlist(cfg, cfgoption, prefix);
|
||||
|
||||
case TYPE_UINT8:
|
||||
case TYPE_INT8:
|
||||
case TYPE_UINT16:
|
||||
case TYPE_INT16:
|
||||
case TYPE_UINT32:
|
||||
case TYPE_INT32:
|
||||
case TYPE_MASK:
|
||||
return config_setdefault_int(cfg, cfgoption, prefix);
|
||||
|
||||
case TYPE_UINT64:
|
||||
case TYPE_INT64:
|
||||
return config_setdefault_int64(cfg, cfgoption, prefix);
|
||||
|
||||
case TYPE_UINTARRAY:
|
||||
case TYPE_INTARRAY:
|
||||
return config_setdefault_intlist(cfg, cfgoption, prefix);
|
||||
|
||||
case TYPE_DOUBLE:
|
||||
return config_setdefault_double(cfg, cfgoption, prefix);
|
||||
|
||||
case TYPE_IPV4ADDR:
|
||||
return config_setdefault_ipv4addr(cfg, cfgoption, prefix);
|
||||
|
||||
case TYPE_LIST:
|
||||
// No default value for list type
|
||||
fprintf(stderr,"[CONFIG] %s.%s TYPE_LIST has no default value\n", prefix, cfgoption->optname);
|
||||
return -1;
|
||||
|
||||
default:
|
||||
fprintf(stderr,"[CONFIG] %s.%s type %i not supported\n", prefix, cfgoption->optname, cfgoption->type);
|
||||
return -1;
|
||||
} /* switch on param type */
|
||||
}
|
||||
|
||||
@@ -50,6 +50,7 @@ int config_setdefault_double(configmodule_interface_t *cfg, paramdef_t *cfgoptio
|
||||
int config_setdefault_ipv4addr(configmodule_interface_t *cfg, paramdef_t *cfgoptions, char *prefix);
|
||||
void *config_allocate_new(configmodule_interface_t *cfg, int sz, bool autoFree);
|
||||
void config_assign_int(configmodule_interface_t *cfg, paramdef_t *cfgoptions, char *fullname, int val);
|
||||
int config_common_getdefault(configmodule_interface_t *cfg, paramdef_t *cfgoption, char *prefix);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
#define PARAMFLAG_PARAMSETDEF (1 << 17) // parameter has been set to default value in get functions
|
||||
|
||||
/* checkedparam_t is possibly used in paramdef_t for specific parameter value validation */
|
||||
#define CONFIG_MAX_NUMCHECKVAL 20
|
||||
#define CONFIG_MAX_NUMCHECKVAL 64
|
||||
typedef struct paramdef paramdef_t;
|
||||
typedef struct configmodule_interface configmodule_interface_t;
|
||||
typedef union checkedparam {
|
||||
@@ -169,7 +169,6 @@ typedef struct paramlist_def {
|
||||
|
||||
/* Macros to get parameters with the config module API */
|
||||
#define GET_PARAMS(param_def, param_desc, prefix) \
|
||||
printf("Reading '%s' section from the config file\n", #param_def); \
|
||||
paramdef_t param_def[] = param_desc; \
|
||||
config_get(config_get_if(), param_def, sizeofArray(param_def), prefix);
|
||||
|
||||
|
||||
@@ -356,7 +356,7 @@ int config_libconfig_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
|
||||
snprintf( *cfgoptions[i].strptr , cfgoptions[i].numelt, "%s", str);
|
||||
printf_params(cfg, "[LIBCONFIG] %s: \"%s\"\n", cfgpath, *cfgoptions[i].strptr);
|
||||
} else {
|
||||
defval = config_setdefault_string(cfg, &cfgoptions[i], prefix);
|
||||
defval = config_common_getdefault(cfg, &cfgoptions[i], prefix);
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -367,7 +367,7 @@ int config_libconfig_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
|
||||
if ( setting != NULL) {
|
||||
read_strlist(cfg, &cfgoptions[i], setting, cfgpath);
|
||||
} else {
|
||||
defval = config_setdefault_stringlist(cfg, &(cfgoptions[i]), prefix);
|
||||
defval = config_common_getdefault(cfg, &(cfgoptions[i]), prefix);
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -383,7 +383,7 @@ int config_libconfig_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
|
||||
config_check_valptr(cfg, &(cfgoptions[i]), sizeof(*cfgoptions[i].iptr), 1);
|
||||
config_assign_int(cfg, &(cfgoptions[i]), cfgpath, u);
|
||||
} else {
|
||||
defval = config_setdefault_int(cfg, &(cfgoptions[i]), prefix);
|
||||
defval = config_common_getdefault(cfg, &(cfgoptions[i]), prefix);
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -401,7 +401,7 @@ int config_libconfig_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
|
||||
printf_params(cfg, "[LIBCONFIG] %s: %ld\n", cfgpath, *cfgoptions[i].i64ptr);
|
||||
}
|
||||
} else {
|
||||
defval = config_setdefault_int64(cfg, &(cfgoptions[i]), prefix);
|
||||
defval = config_common_getdefault(cfg, &(cfgoptions[i]), prefix);
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -413,7 +413,7 @@ int config_libconfig_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
|
||||
if ( setting != NULL) {
|
||||
read_intarray(cfg, &cfgoptions[i], setting, cfgpath);
|
||||
} else {
|
||||
defval = config_setdefault_intlist(cfg, &(cfgoptions[i]), prefix);
|
||||
defval = config_common_getdefault(cfg, &(cfgoptions[i]), prefix);
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -424,14 +424,14 @@ int config_libconfig_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
|
||||
*cfgoptions[i].dblptr = dbl;
|
||||
printf_params(cfg, "[LIBCONFIG] %s: %lf\n", cfgpath, *(cfgoptions[i].dblptr));
|
||||
} else {
|
||||
defval = config_setdefault_double(cfg, &(cfgoptions[i]), prefix);
|
||||
defval = config_common_getdefault(cfg, &(cfgoptions[i]), prefix);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case TYPE_IPV4ADDR:
|
||||
if ( !config_lookup_string(&(libconfig_privdata.cfg),cfgpath, (const char **)&str)) {
|
||||
defval = config_setdefault_ipv4addr(cfg, &(cfgoptions[i]), prefix);
|
||||
defval = config_common_getdefault(cfg, &(cfgoptions[i]), prefix);
|
||||
} else {
|
||||
int rst = config_assign_ipv4addr(cfg, cfgoptions, str);
|
||||
|
||||
|
||||
@@ -25,8 +25,7 @@ extern "C" {
|
||||
#include "common/config/config_userapi.h"
|
||||
void *config_allocate_new(configmodule_interface_t *cfg, int sz, bool autoFree);
|
||||
void config_check_valptr(configmodule_interface_t *cfg, paramdef_t *cfgoptions, int elt_sz, int nb_elt);
|
||||
#include "../config_userapi.h"
|
||||
#include "../config_common.h"
|
||||
int config_common_getdefault(configmodule_interface_t *cfg, paramdef_t *cfgoption, char *prefix);
|
||||
}
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
@@ -44,71 +43,6 @@ class YamlConfig {
|
||||
}
|
||||
};
|
||||
|
||||
void SetDefault(configmodule_interface_t *cfg, paramdef_t *param)
|
||||
{
|
||||
switch (param->type) {
|
||||
case TYPE_INT:
|
||||
*param->iptr = param->defintval;
|
||||
break;
|
||||
case TYPE_UINT:
|
||||
*param->uptr = param->defuintval;
|
||||
break;
|
||||
case TYPE_STRING:
|
||||
if (param->defstrval != nullptr) {
|
||||
if (param->numelt == 0) {
|
||||
config_check_valptr(cfg, param, 1, strlen(param->defstrval) + 1);
|
||||
}
|
||||
sprintf(*param->strptr, "%s", param->defstrval);
|
||||
}
|
||||
break;
|
||||
case TYPE_INT8:
|
||||
*param->i8ptr = param->defintval;
|
||||
break;
|
||||
case TYPE_UINT8:
|
||||
*param->u8ptr = param->defuintval;
|
||||
break;
|
||||
case TYPE_INT16:
|
||||
*param->i16ptr = param->defintval;
|
||||
break;
|
||||
case TYPE_UINT16:
|
||||
*param->u16ptr = param->defuintval;
|
||||
break;
|
||||
case TYPE_INT64:
|
||||
*param->i64ptr = param->defint64val;
|
||||
break;
|
||||
case TYPE_UINT64:
|
||||
*param->u64ptr = param->defint64val;
|
||||
break;
|
||||
case TYPE_DOUBLE:
|
||||
*param->dblptr = param->defdblval;
|
||||
break;
|
||||
case TYPE_MASK:
|
||||
*param->uptr = param->defuintval;
|
||||
break;
|
||||
case TYPE_STRINGLIST:
|
||||
if (param->defstrlistval != nullptr) {
|
||||
param->strlistptr = param->defstrlistval;
|
||||
}
|
||||
break;
|
||||
case TYPE_INTARRAY:
|
||||
if (param->defintarrayval) {
|
||||
param->iptr = param->defintarrayval;
|
||||
}
|
||||
break;
|
||||
case TYPE_UINTARRAY:
|
||||
if (param->defintarrayval) {
|
||||
param->uptr = (uint32_t *)param->defintarrayval;
|
||||
}
|
||||
break;
|
||||
case TYPE_IPV4ADDR:
|
||||
config_setdefault_ipv4addr(cfg, param, param->defstrval);
|
||||
break;
|
||||
default:
|
||||
AssertFatal(false, "Unhandled type %d", param->type);
|
||||
}
|
||||
param->paramflags |= PARAMFLAG_PARAMSETDEF;
|
||||
}
|
||||
|
||||
void SetNonDefault(configmodule_interface_t *cfg, const YAML::Node &node, paramdef_t *param)
|
||||
{
|
||||
auto optname = std::string(param->optname);
|
||||
@@ -207,14 +141,12 @@ void SetNonDefault(configmodule_interface_t *cfg, const YAML::Node &node, paramd
|
||||
param->paramflags |= PARAMFLAG_PARAMSET;
|
||||
}
|
||||
|
||||
void GetParams(configmodule_interface_t *cfg, const YAML::Node &node, paramdef_t *params, int num_params)
|
||||
void GetParam(configmodule_interface_t *cfg, const YAML::Node &node, paramdef_t *param)
|
||||
{
|
||||
for (auto i = 0; i < num_params; i++) {
|
||||
if (node && node[std::string(params[i].optname)]) {
|
||||
SetNonDefault(cfg, node, ¶ms[i]);
|
||||
} else {
|
||||
SetDefault(cfg, ¶ms[i]);
|
||||
}
|
||||
if (node && node[std::string(param->optname)]) {
|
||||
SetNonDefault(cfg, node, param);
|
||||
} else {
|
||||
config_common_getdefault(cfg, param, nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -229,7 +161,15 @@ extern "C" int config_yaml_init(configmodule_interface_t *cfg)
|
||||
pthread_mutex_init(&cfg->memBlocks_mutex, NULL);
|
||||
memset(cfg->oneBlock, 0, sizeof(cfg->oneBlock));
|
||||
|
||||
config_yaml::config = new config_yaml::YamlConfig(std::string(cfgP[0]));
|
||||
try {
|
||||
config_yaml::config = new config_yaml::YamlConfig(std::string(cfgP[0]));
|
||||
} catch (const YAML::BadFile &e) {
|
||||
fprintf(stderr, "[CONFIG] Error loading YAML file '%s': %s\n", cfgP[0], e.what());
|
||||
return -1;
|
||||
} catch (const YAML::Exception &e) {
|
||||
fprintf(stderr, "[CONFIG] Error parsing YAML file '%s': %s\n", cfgP[0], e.what());
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -249,14 +189,14 @@ YAML::Node find_node(const std::string &prefix, YAML::Node node)
|
||||
if (key.at(0) == '[' && key.back() == ']') {
|
||||
// The key is an index to a sequence
|
||||
if (!current.IsSequence()) {
|
||||
throw std::invalid_argument("Incorrect yaml file structure");
|
||||
throw std::invalid_argument("Expected a sequence at " + key);
|
||||
}
|
||||
int index = std::stoi(key.substr(1, key.size() - 2));
|
||||
current = current[index];
|
||||
continue;
|
||||
}
|
||||
if (!current.IsMap()) {
|
||||
throw std::invalid_argument("Incorrect yaml file structure");
|
||||
throw std::invalid_argument("Expected a map at " + key);
|
||||
}
|
||||
if (!current[key]) {
|
||||
return config_yaml::invalid_node;
|
||||
@@ -272,8 +212,14 @@ extern "C" int config_yaml_get(configmodule_interface_t *cfg, paramdef_t *cfgopt
|
||||
if (prefix != nullptr) {
|
||||
p = std::string(prefix);
|
||||
}
|
||||
auto node = find_node(p, YAML::Clone(config_yaml::config->config));
|
||||
if (node == config_yaml::invalid_node) {
|
||||
YAML::Node node;
|
||||
try {
|
||||
node = find_node(p, YAML::Clone(config_yaml::config->config));
|
||||
if (node == config_yaml::invalid_node) {
|
||||
return -1;
|
||||
}
|
||||
} catch (const std::invalid_argument &e) {
|
||||
fprintf(stderr, "[CONFIG] Error finding node '%s': %s\n", p.c_str(), e.what());
|
||||
return -1;
|
||||
}
|
||||
for (auto i = 0; i < numoptions; i++) {
|
||||
@@ -282,7 +228,14 @@ extern "C" int config_yaml_get(configmodule_interface_t *cfg, paramdef_t *cfgopt
|
||||
config_check_valptr(cfg, &cfgoptions[i], sizeof(void *), 1);
|
||||
}
|
||||
}
|
||||
config_yaml::GetParams(cfg, node, cfgoptions, numoptions);
|
||||
for (int i = 0; i < numoptions; i++) {
|
||||
try {
|
||||
config_yaml::GetParam(cfg, node, &cfgoptions[i]);
|
||||
} catch (const YAML::Exception &e) {
|
||||
fprintf(stderr, "[CONFIG] Config error: prefix: %s, setting: %s, error: %s\n", p.c_str(), cfgoptions[i].optname, e.what());
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
return numoptions;
|
||||
}
|
||||
|
||||
@@ -323,7 +276,14 @@ extern "C" int config_yaml_getlist(configmodule_interface_t *cfg,
|
||||
}
|
||||
}
|
||||
|
||||
config_yaml::GetParams(cfg, node[i], ParamList->paramarray[i], numparams);
|
||||
for (int j = 0; j < numparams; j++) {
|
||||
try {
|
||||
config_yaml::GetParam(cfg, node[i], &ParamList->paramarray[i][j]);
|
||||
} catch (const YAML::Exception &e) {
|
||||
fprintf(stderr, "[CONFIG] Config error: prefix: %s, setting: %s, error: %s\n", path, ParamList->paramarray[i][j].optname, e.what());
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,3 +11,5 @@ configure_file(test_list_of_mappings.yml test_list_of_mappings.yml COPYONLY)
|
||||
configure_file(test_int_array.yaml test_int_array.yaml COPYONLY)
|
||||
configure_file(test_read_mapping_as_list.yaml test_read_mapping_as_list.yaml COPYONLY)
|
||||
configure_file(test_ipv4.yaml test_ipv4.yaml COPYONLY)
|
||||
configure_file(test_read_str_as_int.yaml test_read_str_as_int.yaml COPYONLY)
|
||||
configure_file(malformed.yaml malformed.yaml COPYONLY)
|
||||
|
||||
13
common/config/yaml/tests/malformed.yaml
Normal file
13
common/config/yaml/tests/malformed.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
test:
|
||||
-
|
||||
bad_file:
|
||||
- "testvalue1"
|
||||
- "testvalue2"
|
||||
- "testvalue3"
|
||||
- "testvalue4"
|
||||
- "testvalue5"
|
||||
- "testvalue6"
|
||||
- "testvalue7"
|
||||
- "testvalue8"
|
||||
- "testvalue9"
|
||||
- "testvalue10" - yaml error
|
||||
2
common/config/yaml/tests/test_read_str_as_int.yaml
Normal file
2
common/config/yaml/tests/test_read_str_as_int.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
test:
|
||||
var: "test_var"
|
||||
@@ -78,8 +78,9 @@ TEST(yaml_config, yaml_get_existing_values) {
|
||||
uint16_t value;
|
||||
p.type = TYPE_UINT16;
|
||||
p.u16ptr = &value;
|
||||
p.paramflags = PARAMFLAG_MANDATORY;
|
||||
char prefix[] = "test";
|
||||
config_yaml_get(cfg, &p, 1, prefix);
|
||||
EXPECT_EQ(config_yaml_get(cfg, &p, 1, prefix), 1);
|
||||
EXPECT_EQ(value, i);
|
||||
}
|
||||
|
||||
@@ -94,7 +95,7 @@ TEST(yaml_config, yaml_get_non_existing_values) {
|
||||
cfg->cfgP[0] = strdup("test1.yaml");
|
||||
EXPECT_EQ(config_yaml_init(cfg), 0);
|
||||
|
||||
// Testing paremters present in the test node
|
||||
// Testing parameters not present in the test node
|
||||
paramdef_t p = {0};
|
||||
for (auto i = 4; i <= 5; i++) {
|
||||
sprintf(p.optname, "%s%d", "value", i);
|
||||
@@ -421,6 +422,43 @@ TEST(yaml_config, test_read_ipv4) {
|
||||
free(p.defstrval);
|
||||
}
|
||||
|
||||
TEST(yaml_config, yaml_read_str_as_int) {
|
||||
configmodule_interface_t *cfg = static_cast<configmodule_interface_t*>(calloc(1, sizeof(*cfg)));
|
||||
cfg->cfgP[0] = strdup("test_read_str_as_int.yaml");
|
||||
EXPECT_EQ(config_yaml_init(cfg), 0);
|
||||
|
||||
// Testing paremters present in the test node
|
||||
paramdef_t p = {0};
|
||||
uint16_t value;
|
||||
p.type = TYPE_UINT16;
|
||||
p.u16ptr = &value;
|
||||
p.paramflags = PARAMFLAG_MANDATORY;
|
||||
char prefix[] = "test";
|
||||
sprintf(p.optname, "%s", "var");
|
||||
EXPECT_EQ(config_yaml_get(cfg, &p, 1, prefix), -1);
|
||||
|
||||
|
||||
config_yaml_end(cfg);
|
||||
free(cfg->cfgP[0]);
|
||||
end_configmodule(cfg);
|
||||
}
|
||||
|
||||
TEST(yaml_config, yaml_open_non_existing_file) {
|
||||
configmodule_interface_t *cfg = static_cast<configmodule_interface_t*>(calloc(1, sizeof(*cfg)));
|
||||
cfg->cfgP[0] = strdup("non_existing_file.yaml");
|
||||
EXPECT_EQ(config_yaml_init(cfg), -1);
|
||||
free(cfg->cfgP[0]);
|
||||
end_configmodule(cfg);
|
||||
}
|
||||
|
||||
TEST(yaml_config, malformed_file) {
|
||||
configmodule_interface_t *cfg = static_cast<configmodule_interface_t*>(calloc(1, sizeof(*cfg)));
|
||||
cfg->cfgP[0] = strdup("malformed.yaml");
|
||||
EXPECT_EQ(config_yaml_init(cfg), -1);
|
||||
free(cfg->cfgP[0]);
|
||||
end_configmodule(cfg);
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
logInit();
|
||||
|
||||
@@ -207,26 +207,38 @@ typedef struct nsa_msg_t {
|
||||
uint8_t msg_buffer[MAX_MESSAGE_SIZE];
|
||||
} nsa_msg_t;
|
||||
|
||||
typedef enum nr_lcid_rb_type { NR_LCID_NONE = 0, NR_LCID_SRB = 1, NR_LCID_DRB = 2 } nr_lcid_rb_type;
|
||||
|
||||
typedef struct nr_lcid_rb_t {
|
||||
nr_lcid_rb_type type;
|
||||
union {
|
||||
int srb_id;
|
||||
int drb_id;
|
||||
} choice;
|
||||
} nr_lcid_rb_t;
|
||||
|
||||
typedef struct transport_layer_addr_s {
|
||||
/**
|
||||
* Transport Layer Address as a bitstring:
|
||||
* - 32 bits for IPv4 (RFC 791),
|
||||
* - 128 bits for IPv6 (RFC 2460),
|
||||
* - 160 bits for both IPv4 and IPv6, with IPv4 in the first 32 bits.
|
||||
* The S1AP/NGAP layer forwards this address (bitstring<1..160>)
|
||||
* to S1-U/NG-U without interpreting it.
|
||||
*/
|
||||
/** Transport Layer Address in bytes:
|
||||
* - 4 bytes for IPv4 (RFC 791), 16 bytes for IPv6 (RFC 2460),
|
||||
* - 20 bytes for both IPv4 and IPv6, with IPv4 in the first 4 bytes. */
|
||||
uint8_t length;
|
||||
/// Buffer: address in network byte order
|
||||
uint8_t buffer[20];
|
||||
} transport_layer_addr_t;
|
||||
|
||||
/** @brief GTP tunnel configuration */
|
||||
typedef struct {
|
||||
// Tunnel endpoint identifier
|
||||
uint32_t teid;
|
||||
// Transport layer address
|
||||
transport_layer_addr_t addr;
|
||||
} gtpu_tunnel_t;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// GTPV1U TYPES
|
||||
//-----------------------------------------------------------------------------
|
||||
typedef uint32_t teid_t; // tunnel endpoint identifier
|
||||
typedef uint8_t ebi_t; // eps bearer id
|
||||
typedef uint8_t pdusessionid_t;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
|
||||
@@ -24,9 +24,11 @@ event get_event(int socket, OBUF *event_buffer, void *database)
|
||||
again:
|
||||
if (fullread(socket, &length, 4) == -1) goto read_error;
|
||||
#ifdef T_SEND_TIME
|
||||
if (length < sizeof(struct timespec)) goto error;
|
||||
if (fullread(socket, &t, sizeof(struct timespec)) == -1) goto read_error;
|
||||
length -= sizeof(struct timespec);
|
||||
#endif
|
||||
if (length < sizeof(int)) goto error;
|
||||
if (fullread(socket, &type, sizeof(int)) == -1) goto read_error;
|
||||
length -= sizeof(int);
|
||||
if (event_buffer->omaxsize < length) {
|
||||
@@ -48,6 +50,9 @@ again:
|
||||
return new_event(type, length, event_buffer->obuf, database);
|
||||
#endif
|
||||
|
||||
error:
|
||||
printf("error: bad data in get_event()\n");
|
||||
|
||||
read_error:
|
||||
return (event){.type = -1};
|
||||
}
|
||||
@@ -64,6 +69,9 @@ event new_event(int type, int length, char *buffer, void *database)
|
||||
int i;
|
||||
int offset;
|
||||
|
||||
/* arbitrary limit to 1GiB (to simplify size checks) */
|
||||
if (length < 0 || length > 1024 * 1024 * 1024) goto fatal;
|
||||
|
||||
#ifdef T_SEND_TIME
|
||||
e.sending_time = sending_time;
|
||||
#endif
|
||||
@@ -87,26 +95,33 @@ event new_event(int type, int length, char *buffer, void *database)
|
||||
for (i = 0; i < f.count; i++) {
|
||||
//e.e[i].offset = offset;
|
||||
if (!strcmp(f.type[i], "int")) {
|
||||
if (offset + 4 > length) goto fatal;
|
||||
e.e[i].type = EVENT_INT;
|
||||
e.e[i].i = *(int *)(&buffer[offset]);
|
||||
offset += 4;
|
||||
} else if (!strcmp(f.type[i], "ulong")) {
|
||||
if (offset + sizeof(unsigned long) > length) goto fatal;
|
||||
e.e[i].type = EVENT_ULONG;
|
||||
e.e[i].ul = *(unsigned long *)(&buffer[offset]);
|
||||
offset += sizeof(unsigned long);
|
||||
} else if (!strcmp(f.type[i], "float")) {
|
||||
if (offset + sizeof(float) > length) goto fatal;
|
||||
e.e[i].type = EVENT_FLOAT;
|
||||
e.e[i].f = *(float *)(&buffer[offset]);
|
||||
offset += sizeof(float);
|
||||
} else if (!strcmp(f.type[i], "string")) {
|
||||
if (offset + 1 > length) goto fatal;
|
||||
e.e[i].type = EVENT_STRING;
|
||||
e.e[i].s = &buffer[offset];
|
||||
while (buffer[offset]) offset++;
|
||||
while (offset < length && buffer[offset]) offset++;
|
||||
if (offset == length) goto fatal;
|
||||
offset++;
|
||||
} else if (!strcmp(f.type[i], "buffer")) {
|
||||
if (offset + sizeof(int) > length) goto fatal;
|
||||
int len;
|
||||
e.e[i].type = EVENT_BUFFER;
|
||||
len = *(int *)(&buffer[offset]);
|
||||
if (len <= 0 || offset + len + sizeof(int) > length) goto fatal;
|
||||
e.e[i].bsize = len;
|
||||
e.e[i].b = &buffer[offset+sizeof(int)];
|
||||
offset += len+sizeof(int);
|
||||
@@ -119,4 +134,8 @@ event new_event(int type, int length, char *buffer, void *database)
|
||||
if (e.ecount==0) { printf("FORMAT not set in event %d\n", type); abort(); }
|
||||
|
||||
return e;
|
||||
|
||||
fatal:
|
||||
printf("fatal: bad buffer in new_event\n");
|
||||
abort();
|
||||
}
|
||||
|
||||
@@ -46,8 +46,8 @@ int main(int n, char **v)
|
||||
|
||||
/* read event from file */
|
||||
if (fread(&length, 4, 1, in) != 1) break;
|
||||
if (ebuf.omaxsize < length) {
|
||||
ebuf.omaxsize = (length + 65535) & ~65535;
|
||||
if (ebuf.omaxsize < length + 4) {
|
||||
ebuf.omaxsize = (length + 4 + 65535) & ~65535;
|
||||
ebuf.obuf = realloc(ebuf.obuf, ebuf.omaxsize);
|
||||
if (ebuf.obuf == NULL) { printf("out of memory\n"); exit(1); }
|
||||
}
|
||||
|
||||
@@ -157,8 +157,8 @@ int main(int n, char **v)
|
||||
|
||||
/* read event from file */
|
||||
if (fread(&length, 4, 1, in) != 1) break;
|
||||
if (ebuf.omaxsize < length) {
|
||||
ebuf.omaxsize = (length + 65535) & ~65535;
|
||||
if (ebuf.omaxsize < length + 4) {
|
||||
ebuf.omaxsize = (length + 4 + 65535) & ~65535;
|
||||
ebuf.obuf = realloc(ebuf.obuf, ebuf.omaxsize);
|
||||
if (ebuf.obuf == NULL) { printf("out of memory\n"); exit(1); }
|
||||
}
|
||||
|
||||
@@ -114,8 +114,8 @@ int read_tracee(int s, OBUF *ebuf, int *_type, int32_t *_length)
|
||||
int vpos = 0;
|
||||
|
||||
if (fullread(s, &length, 4) == -1) return -1;
|
||||
if (ebuf->omaxsize < length) {
|
||||
ebuf->omaxsize = (length + 65535) & ~65535;
|
||||
if (ebuf->omaxsize < length + 4) {
|
||||
ebuf->omaxsize = (length + 4 + 65535) & ~65535;
|
||||
ebuf->obuf = realloc(ebuf->obuf, ebuf->omaxsize);
|
||||
if (ebuf->obuf == NULL) { printf("out of memory\n"); exit(1); }
|
||||
}
|
||||
@@ -123,10 +123,12 @@ int read_tracee(int s, OBUF *ebuf, int *_type, int32_t *_length)
|
||||
memcpy(v+vpos, &length, 4);
|
||||
vpos += 4;
|
||||
#ifdef T_SEND_TIME
|
||||
if (length < sizeof(struct timespec)) return -1;
|
||||
if (fullread(s,v+vpos,sizeof(struct timespec))==-1) return -1;
|
||||
vpos += sizeof(struct timespec);
|
||||
length -= sizeof(struct timespec);
|
||||
#endif
|
||||
if (length < sizeof(int)) return -1;
|
||||
if (fullread(s, &type, sizeof(int)) == -1) return -1;
|
||||
memcpy(v+vpos, &type, sizeof(int));
|
||||
vpos += sizeof(int);
|
||||
|
||||
@@ -133,8 +133,8 @@ int main(int n, char **v)
|
||||
int vpos = 0;
|
||||
|
||||
if (fullread(socket, &length, 4) == -1) goto read_error;
|
||||
if (ebuf.omaxsize < length) {
|
||||
ebuf.omaxsize = (length + 65535) & ~65535;
|
||||
if (ebuf.omaxsize < length + 4) {
|
||||
ebuf.omaxsize = (length + 4 + 65535) & ~65535;
|
||||
ebuf.obuf = realloc(ebuf.obuf, ebuf.omaxsize);
|
||||
if (ebuf.obuf == NULL) { printf("out of memory\n"); exit(1); }
|
||||
}
|
||||
@@ -142,10 +142,12 @@ int main(int n, char **v)
|
||||
memcpy(v+vpos, &length, 4);
|
||||
vpos += 4;
|
||||
#ifdef T_SEND_TIME
|
||||
if (length < sizeof(struct timespec)) goto read_error;
|
||||
if (fullread(socket,v+vpos,sizeof(struct timespec))==-1) goto read_error;
|
||||
vpos += sizeof(struct timespec);
|
||||
length -= sizeof(struct timespec);
|
||||
#endif
|
||||
if (length < sizeof(int)) goto read_error;
|
||||
if (fullread(socket, &type, sizeof(int)) == -1) goto read_error;
|
||||
memcpy(v+vpos, &type, sizeof(int));
|
||||
vpos += sizeof(int);
|
||||
|
||||
@@ -146,8 +146,8 @@ int main(int n, char **v)
|
||||
|
||||
/* read event from file */
|
||||
if (fread(&length, 4, 1, in) != 1) break;
|
||||
if (ebuf.omaxsize < length) {
|
||||
ebuf.omaxsize = (length + 65535) & ~65535;
|
||||
if (ebuf.omaxsize < length + 4) {
|
||||
ebuf.omaxsize = (length + 4 + 65535) & ~65535;
|
||||
ebuf.obuf = realloc(ebuf.obuf, ebuf.omaxsize);
|
||||
if (ebuf.obuf == NULL) { printf("out of memory\n"); exit(1); }
|
||||
}
|
||||
|
||||
@@ -23,15 +23,21 @@
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include "common/utils/utils.h" // for malloc_or_fail
|
||||
|
||||
byte_array_t create_byte_array(const size_t len, const uint8_t* buffer)
|
||||
{
|
||||
byte_array_t result = {.len = len};
|
||||
if (len) {
|
||||
result.buf = malloc_or_fail(len);
|
||||
memcpy(result.buf, buffer, len);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
byte_array_t copy_byte_array(byte_array_t src)
|
||||
{
|
||||
byte_array_t dst = {0};
|
||||
dst.buf = malloc(src.len);
|
||||
assert(dst.buf != NULL && "Memory exhausted");
|
||||
memcpy(dst.buf, src.buf, src.len);
|
||||
dst.len = src.len;
|
||||
return dst;
|
||||
return create_byte_array(src.len, src.buf);
|
||||
}
|
||||
|
||||
void free_byte_array(byte_array_t ba)
|
||||
|
||||
@@ -28,6 +28,13 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define FREE_AND_ZERO_BYTE_ARRAY(BA) \
|
||||
do { \
|
||||
free_byte_array(BA); \
|
||||
BA.buf = NULL; \
|
||||
BA.len = 0; \
|
||||
} while (0)
|
||||
|
||||
typedef struct {
|
||||
size_t len;
|
||||
uint8_t* buf;
|
||||
@@ -43,5 +50,6 @@ bool eq_byte_array(const byte_array_t* m0, const byte_array_t* m1);
|
||||
|
||||
byte_array_t cp_str_to_ba(const char* str);
|
||||
char* cp_ba_to_str(const byte_array_t ba);
|
||||
byte_array_t create_byte_array(const size_t len, const uint8_t* buffer);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -123,11 +123,10 @@ void seq_arr_erase_it(seq_arr_t* arr, void* start_it, void* end_it, void (*free_
|
||||
return;
|
||||
|
||||
if (free_func != NULL) {
|
||||
void* start_it = seq_arr_front(arr);
|
||||
void* end_it = seq_arr_end(arr);
|
||||
while (start_it != end_it) {
|
||||
free_func(start_it);
|
||||
start_it = seq_arr_next(arr, start_it);
|
||||
void* it = start_it;
|
||||
while (it != end_it) {
|
||||
free_func(it);
|
||||
it = seq_arr_next(arr, it);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -34,6 +34,9 @@ SOFTWARE.
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#define FOR_EACH_SEQ_ARR(type, var, arr) \
|
||||
for (type var = seq_arr_front(arr); var != seq_arr_end(arr); var = seq_arr_next(arr, var))
|
||||
|
||||
typedef struct seq_arr_s {
|
||||
uint8_t* data;
|
||||
size_t size;
|
||||
|
||||
@@ -36,6 +36,13 @@ static int compar(const void* m0, const void* m1)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int free_func_call_count = 0;
|
||||
|
||||
static void dummy_free_func(void* it)
|
||||
{
|
||||
++free_func_call_count;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
seq_arr_t arr = {0};
|
||||
@@ -83,6 +90,19 @@ int main()
|
||||
void* it = bsearch(&key, base, nmemb, size, compar);
|
||||
assert(seq_arr_dist(&arr, seq_arr_front(&arr), it) == 4);
|
||||
|
||||
// Regression test: erase a partial range only
|
||||
// Erase 92, 93, 94 (i.e., indices 1 to 3)
|
||||
int* start = seq_arr_at(&arr, 1);
|
||||
int* end = seq_arr_at(&arr, 4);
|
||||
seq_arr_erase_it(&arr, start, end, dummy_free_func);
|
||||
|
||||
// Now values should be: [91, 95, 96, 97, 98, 99]
|
||||
assert(free_func_call_count == 3);
|
||||
assert(seq_arr_size(&arr) == 6);
|
||||
assert(*(int*)seq_arr_at(&arr, 0) == 91);
|
||||
assert(*(int*)seq_arr_at(&arr, 1) == 95);
|
||||
assert(*(int*)seq_arr_at(&arr, 5) == 99);
|
||||
|
||||
// Free data structure
|
||||
seq_arr_free(&arr, NULL);
|
||||
|
||||
|
||||
@@ -207,7 +207,7 @@ int get_smallest_supported_bandwidth_index(int scs, frequency_range_t frequency_
|
||||
return -1; // not found
|
||||
}
|
||||
|
||||
// Table 5.2-1 NR operating bands in FR1 & FR2 (3GPP TS 38.101)
|
||||
// Table 5.2-1 NR operating bands in FR1 & FR2 (3GPP TS 38.101) (Rel.17)
|
||||
// Table 5.4.2.3-1 Applicable NR-ARFCN per operating band in FR1 & FR2 (3GPP TS 38.101)
|
||||
// Notes:
|
||||
// - N_OFFs for bands from 80 to 89 and band 95 is referred to UL
|
||||
@@ -236,6 +236,7 @@ const nr_bandentry_t nr_bandtable[] = {{1, 1920000, 1980000, 2110000, 2170000, 2
|
||||
{40, 2300000, 2400000, 2300000, 2400000, 20, 460000, 100},
|
||||
{41, 2496000, 2690000, 2496000, 2690000, 3, 499200, 15},
|
||||
{41, 2496000, 2690000, 2496000, 2690000, 6, 499200, 30},
|
||||
{46, 5150000, 5925000, 5150000, 5925000, 1, 743334, 15},
|
||||
{47, 5855000, 5925000, 5855000, 5925000, 1, 790334, 15},
|
||||
{48, 3550000, 3700000, 3550000, 3700000, 1, 636667, 15},
|
||||
{48, 3550000, 3700000, 3550000, 3700000, 2, 636668, 30},
|
||||
@@ -273,6 +274,11 @@ const nr_bandentry_t nr_bandtable[] = {{1, 1920000, 1980000, 2110000, 2170000, 2
|
||||
{94, 880000, 915000, 1432000, 1517000, 20, 286400, 100},
|
||||
{95, 2010000, 2025000, 000, 000, 20, 402000, 100},
|
||||
{96, 5925000, 7125000, 5925000, 7125000, 1, 795000, 15},
|
||||
{100, 874400, 880000, 919400, 925000, 20, 174880, 100},
|
||||
{101, 1900000, 1910000, 1900000, 1910000, 20, 380000, 100},
|
||||
{102, 5925000, 6425000, 5925000, 6425000, 1, 795000, 15},
|
||||
{104, 6425000, 7125000, 6425000, 7125000, 1, 828334, 15},
|
||||
{104, 6425000, 7125000, 6425000, 7125000, 2, 828334, 30},
|
||||
{254, 1610000, 1626500, 2483500, 2500000, 20, 496700, 100},
|
||||
{254, 1610000, 1626500, 2483500, 2500000, 2, 496700, 10},
|
||||
{255, 1626500, 1660500, 1525000, 1559000, 20, 305000, 100},
|
||||
@@ -288,7 +294,7 @@ const nr_bandentry_t nr_bandtable[] = {{1, 1920000, 1980000, 2110000, 2170000, 2
|
||||
{261, 27500040, 28350000, 27500040, 28350000, 1, 2070833, 60},
|
||||
{261, 27500040, 28350000, 27500040, 28350000, 2, 2070833, 120}};
|
||||
|
||||
// synchronization raster per band tables (Rel.15)
|
||||
// synchronization raster per band tables (Rel.17)
|
||||
// (38.101-1 Table 5.4.3.3-1 and 38.101-2 Table 5.4.3.3-1)
|
||||
// band nb, sub-carrier spacing index, Range of gscn (First, Step size, Last)
|
||||
// clang-format off
|
||||
@@ -321,8 +327,9 @@ const sync_raster_t sync_raster[] = {
|
||||
{40, 1, 5762, 1, 5989},
|
||||
{41, 0, 6246, 3, 6717},
|
||||
{41, 1, 6252, 3, 6714},
|
||||
{46, 1, 8993, 1, 9530},
|
||||
{48, 1, 7884, 1, 7982},
|
||||
{50, 0, 3584, 1, 3787},
|
||||
{50, 1, 3590, 1, 3781},
|
||||
{51, 0, 3572, 1, 3574},
|
||||
{53, 0, 6215, 1, 6232},
|
||||
{53, 1, 6221, 1, 6226},
|
||||
@@ -343,7 +350,13 @@ const sync_raster_t sync_raster[] = {
|
||||
{91, 0, 3572, 1, 3574},
|
||||
{92, 0, 3584, 1, 3787},
|
||||
{93, 0, 3572, 1, 3574},
|
||||
{94, 0, 3584, 1, 3587},
|
||||
{94, 0, 3584, 1, 3787},
|
||||
{96, 1, 9531, 1, 10363},
|
||||
{100, 0, 2303, 1, 2307},
|
||||
{101, 0, 4754, 1, 4768},
|
||||
{101, 1, 4760, 1, 4764},
|
||||
{102, 1, 9531, 1, 9877},
|
||||
{104, 1, 9882, 7, 10358},
|
||||
{254, 0, 6215, 1, 6244},
|
||||
{254, 1, 6218, 1, 6241},
|
||||
{255, 0, 3818, 1, 3892},
|
||||
|
||||
@@ -475,41 +475,5 @@ typedef struct timer_elm_s {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void log_scheduler(const char* label)
|
||||
{
|
||||
int policy = sched_getscheduler(0);
|
||||
struct sched_param param;
|
||||
if (sched_getparam(0, ¶m) == -1)
|
||||
{
|
||||
LOG_E(HW, "sched_getparam: %s\n", strerror(errno));
|
||||
abort();
|
||||
}
|
||||
|
||||
cpu_set_t cpu_set;
|
||||
if (sched_getaffinity(0, sizeof(cpu_set), &cpu_set) == -1)
|
||||
{
|
||||
LOG_E(HW, "sched_getaffinity: %s\n", strerror(errno));
|
||||
abort();
|
||||
}
|
||||
int num_cpus = sysconf(_SC_NPROCESSORS_ONLN);
|
||||
if (num_cpus < 1)
|
||||
{
|
||||
LOG_E(HW, "sysconf(_SC_NPROCESSORS_ONLN): %s\n", strerror(errno));
|
||||
abort();
|
||||
}
|
||||
char buffer[num_cpus];
|
||||
for (int i = 0; i < num_cpus; i++)
|
||||
{
|
||||
buffer[i] = CPU_ISSET(i, &cpu_set) ? 'Y' : '-';
|
||||
}
|
||||
|
||||
LOG_A(HW, "Scheduler policy=%d priority=%d affinity=[%d]%.*s label=%s\n",
|
||||
policy,
|
||||
param.sched_priority,
|
||||
num_cpus,
|
||||
num_cpus,
|
||||
buffer,
|
||||
label);
|
||||
}
|
||||
} // extern "C"
|
||||
|
||||
|
||||
@@ -566,7 +566,6 @@ int timer_remove(long timer_id);
|
||||
int signal_handle(int *end);
|
||||
int signal_mask(void);
|
||||
|
||||
void log_scheduler(const char *label);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
#include "openair2/RRC/NR/nr_rrc_defs.h"
|
||||
#include "openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h"
|
||||
#include "openair2/RRC/NR/nr_rrc_config.h"
|
||||
#include "openair2/LAYER2/NR_MAC_gNB/nr_radio_config.h"
|
||||
#include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h"
|
||||
#include "openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c"
|
||||
#include "common/utils/nr/nr_common.h"
|
||||
|
||||
@@ -7,34 +7,6 @@
|
||||
#include <errno.h>
|
||||
#include "utils.h"
|
||||
|
||||
|
||||
|
||||
const char *hexdump(const void *data, size_t data_len, char *out, size_t out_len)
|
||||
{
|
||||
char *p = out;
|
||||
char *endp = out + out_len;
|
||||
const uint8_t *q = data;
|
||||
snprintf(p, endp - p, "[%zu]", data_len);
|
||||
p += strlen(p);
|
||||
for (size_t i = 0; i < data_len; ++i)
|
||||
{
|
||||
if (p >= endp)
|
||||
{
|
||||
static const char ellipses[] = "...";
|
||||
char *s = endp - sizeof(ellipses);
|
||||
if (s >= p)
|
||||
{
|
||||
strcpy(s, ellipses);
|
||||
}
|
||||
break;
|
||||
}
|
||||
snprintf(p, endp - p, " %02X", *q++);
|
||||
p += strlen(p);
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
** **
|
||||
** Name: hex_char_to_hex_value() **
|
||||
|
||||
@@ -109,8 +109,6 @@ static inline void *malloc_or_fail(size_t size)
|
||||
#define PAGE_MASK 0xfffff000
|
||||
#define virt_to_phys(x) (x)
|
||||
|
||||
const char *hexdump(const void *data, size_t data_len, char *out, size_t out_len);
|
||||
|
||||
// Converts an hexadecimal ASCII coded digit into its value. **
|
||||
int hex_char_to_hex_value (char c);
|
||||
// Converts an hexadecimal ASCII coded string into its value.**
|
||||
|
||||
@@ -1677,6 +1677,7 @@ INPUT = \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_gNB/mac_rrc_ul_direct.c \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_gNB/nr_radio_config.h \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.h \
|
||||
@@ -1687,6 +1688,7 @@ INPUT = \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/openair2_proc.c \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/RLC/rlc.h \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_UE/mac_tables.c \
|
||||
@@ -1847,7 +1849,6 @@ INPUT = \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/nr_rrc_defs.h \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/cucp_cuup_if.h \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/cucp_cuup_direct.c \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/nr_rrc_config.c \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/mac_rrc_dl_direct.c \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/rrc_gNB_radio_bearers.c \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/rrc_gNB_NGAP.h \
|
||||
@@ -1858,7 +1859,6 @@ INPUT = \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/rrc_gNB_UE_context.c \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/cucp_cuup_e1ap.c \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/rrc_gNB.c \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/nr_rrc_config.h \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/rrc_gNB_radio_bearers.h \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/rrc_gNB_NGAP.c \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/mac_rrc_dl_f1ap.c \
|
||||
|
||||
@@ -231,6 +231,9 @@ Or by providing this the the command line parameters:
|
||||
|
||||
The main parameters to cope with the large NTN propagation delay are cellSpecificKoffset, ta-Common, ta-CommonDrift and the ephemeris data (satellite position and velocity vectors).
|
||||
|
||||
The parameter `ntn-UlSyncValidityDuration-r17` indicates the maximum time duration from epochtime during which the UE can apply assistance information without having acquired new assistance information. i.e this enables UE to re-read SIB19 before timer with value ulSyncValidityDuration expires. The unit of the field is in seconds. Example values for GEO: 240s, MEO: 20s, LEO: 5s.
|
||||
As epochtime is not implemented yet, UE starts the timer from the TTI where SIB19 is received with ntn-UlSyncValidityDuration-r17 IE.
|
||||
|
||||
The parameter `cellSpecificKoffset_r17` is the scheduling offset used for the timing relationships that are modified for NTN (see TS 38.213).
|
||||
The unit of the field Koffset is number of slots for a given subcarrier spacing of 15 kHz.
|
||||
|
||||
|
||||
@@ -10,6 +10,8 @@ There are three main beamforming techinques: analog, digital and hybrid. The nam
|
||||
|
||||
The presence of a limited number of predefined beams at RU poses constraints to the scheduler at gNB. As a matter of fact, the scheduler can serve only a limited number of beams, depending on the RU characteristics (possibly only 1), in a given time scale, that also depends on the RU characteristics (e.g. 1 slot or 1 symbol). This limitation doesn't exist for digital beamforming.
|
||||
|
||||
Analog beamforming implementation also allows to enable distributed antenna systems (DAS), where each beam corrisponds to one antenna (or a set of antennas) of the system. In this scenario, the scheduler constaint is alleviated because normally the number of concurrent beams allowed equals the total number of beams.
|
||||
|
||||
# Configuration file fields for analog beamforming
|
||||
|
||||
A set of parameters in configuration files controls the implementation of analog beamforming and instructs the scheduler on how to behave in such scenarios. Since most notably this technique in 5G is employed in FR2, the configuration file example currently available is a RFsim one for band 261. [Config file example](../ci-scripts/conf_files/gnb.sa.band261.u3.32prb.rfsim.conf)
|
||||
@@ -18,8 +20,9 @@ In the `MACRLC` section of configuration files, there are three new parameters:
|
||||
- `set_analog_beamforming` can be set to 1 or 0 to activate or desactivate analog beamforming (default value is 0)
|
||||
- `beam_duration` is the number of slots (currently minimum duration of a beam) the scheduler is tied to a beam (default value is 1)
|
||||
- `beams_per_period` is the number of concurrent beams the RU can handle in the beam duration (default value is 1)
|
||||
- `beam_weights` is a vector field containing the set of beam indices to be provided by the OAI L1 to the RU is also required. In current implementation, the number of beam indices should be equal to the number of SSBs transmitted
|
||||
|
||||
In the `gNBs` section of the configuration file, under the phyisical parameters, a vector field containing the set of beam indices to be provided by the OAI L1 to the RU is also required. This field is called `beam_weights`. In current implementation, the number of beam indices should be equal to the number of SSBs transmitted.
|
||||
DAS is enabled by setting to 1 the parameter `enable_das` in the L1 section of the configuration file. In case of DAS enabled, the field `beam_weights` in `MACRLC` section can be omitted.
|
||||
|
||||
# Implementation in OAI scheduler
|
||||
|
||||
@@ -28,3 +31,28 @@ This matrix contains the beams already allocated in a given slot, to flag the sc
|
||||
To this goal, we extended the virtual resource block (VRB) map by one dimension to also contain information per allocated beam. As said, the scheduler can independently schedule users in a number of beams up to `beams_per_period` concurrently.
|
||||
|
||||
It is important to note that in current implementation, there are several periodical channels, e.g. PRACH or PUCCH for CSI et cetera, that have the precendence in being assigned a beam, that is because the scheduling is automatic, set in RRC configuration, and not up to the scheduler. For these instances, we assume the beam is available (if not there are assertions to stop the process). For data channels, the currently implemented PF scheduler is used. The only modification is that a UE can be served only if there is a free beam available or the one of the beams already in use correspond to that UE beam.
|
||||
|
||||
# FAPI implementation
|
||||
|
||||
To be noted that in our implementation analog beamforming is only supported in non-split/monolithic mode because we don't support yet SCF P19 interface that would be needed to manage these procedure in a split scenario with SCF FAPI.
|
||||
|
||||
In `config_request` structure, a vendor extension (`nfapi_nr_analog_beamforming_ve_t`) configures the lower layers at initialization with the following information:
|
||||
- `analog_bf_vendor_ext` which can assume values 1 or 0 for enabling or disabling analog beamforming
|
||||
- `num_beams_period_vendor_ext` which corresponds to the configuration parameter `beams_per_period`
|
||||
- `total_num_beams_vendor_ext` which corresponds to the number of beams configured in `beam_weights`
|
||||
- `analog_beam_list` which contains the RU beamforming indices configured in `beam_weights`
|
||||
|
||||
Additionally, L2 provides in each channel FAPI message information about the beam index. Small Cell Forum (SCF) FAPI provides in its PHY API specifications for the channels only a field for digital beamforming as part of the `precoding_and_beamforming` stucture. Therefore without a better option, we are currently using that one to store the internal analog beamforming index. This is the index used internally by the code to progressively identify the beam with a value from 0 to `total_num_beams_vendor_ext`.
|
||||
|
||||
# L1 implementation
|
||||
|
||||
To handle multiple concurrent beams, the buffers containing Tx and Rx data in frequency domain (`txdataF` and `rxdataF`) have been extended by one dimension to contain multiple concurrent beams to be transmitted/received.
|
||||
The function `beam_index_allocation`, called by every L1 channel, is responsible to match the FAPI analog beam index to the RU beam index and to store the latter `beam_id` structure, which allocates the beams per symbol, despite L2 only supporting beam change at slot level. At the same time, the function returns the concurrent beam index, to be used to store data in frequency domain buffers. While doing so, the function also checks if there is room for current beam in the list of concurrent beams, which should always be the case, if L2 properly allocated the channels.
|
||||
|
||||
In case of DAS, since each beam corresponds to a specific antenna port, the `beam_index_allocation` function is simplified in the sense that the beam index corresponds to the antenna port index of the frequency domain buffers.
|
||||
|
||||
# RU implementation
|
||||
|
||||
The implementation is still work in progress.
|
||||
|
||||
The first dimension of the Tx and Rx buffers that used to contain the number of Tx/Rx antennas, it is now extended to contain the number of parallel streams which is the number of antennas multiplied by the number of concurrent beams.
|
||||
|
||||
@@ -40,6 +40,7 @@ RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
|
||||
#gcc needed for build_oai
|
||||
build-essential \
|
||||
ccache \
|
||||
psmisc \
|
||||
git \
|
||||
#use gcc-12 to avoid problems of default gcc-11 in FlexRIC
|
||||
@@ -52,15 +53,15 @@ RUN apt-get update && \
|
||||
flex \
|
||||
m4 \
|
||||
# python3-pip for conf template generation
|
||||
python3-pip && \
|
||||
python3-pip \
|
||||
wget && \
|
||||
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100 --slave /usr/bin/g++ g++ /usr/bin/g++-12 && \
|
||||
pip3 install --ignore-installed pyyaml
|
||||
|
||||
# Add "Tini - A tiny but valid init for containers", https://github.com/krallin/tini
|
||||
# it will be copied into target containers, to print exit numbers and handle signals properly
|
||||
ENV TINI_VERSION=v0.19.0
|
||||
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${TARGETARCH} /tini
|
||||
RUN chmod +x /tini
|
||||
RUN wget https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${TARGETARCH} -O /tini && chmod +x /tini
|
||||
|
||||
# In some network environments, GIT proxy is required
|
||||
RUN /bin/bash -c "if [[ -v NEEDED_GIT_PROXY ]]; then git config --global http.proxy $NEEDED_GIT_PROXY; fi"
|
||||
|
||||
@@ -61,7 +61,7 @@ RUN /bin/sh oaienv && \
|
||||
--gNB \
|
||||
--build-lib 'telnetsrv enbscope uescope nrscope' \
|
||||
-t oran_fhlib_5g --cmake-opt -Dxran_LOCATION=/opt/phy/fhi_lib/lib \
|
||||
--build-e2 --cmake-opt -DXAPP_MULTILANGUAGE=OFF --cmake-opt -DKPM_VERSION=$KPM_VERSION --cmake-opt -DE2AP_VERSION=$E2AP_VERSION" &&\
|
||||
--build-e2 --cmake-opt -DKPM_VERSION=$KPM_VERSION --cmake-opt -DE2AP_VERSION=$E2AP_VERSION" &&\
|
||||
# Mainly to see if the sanitize option was perfectly executed
|
||||
ldd ran_build/build/nr-softmodem && \
|
||||
ldd ran_build/build/liboran_fhlib_5g.so && \
|
||||
@@ -72,7 +72,6 @@ RUN mkdir -p openair2/E2AP/flexric/build && \
|
||||
cd openair2/E2AP/flexric/build && \
|
||||
scl enable gcc-toolset-13 "\
|
||||
cmake -GNinja -DCMAKE_BUILD_TYPE=Release \
|
||||
-DXAPP_MULTILANGUAGE=OFF \
|
||||
-DKPM_VERSION=$KPM_VERSION \
|
||||
-DE2AP_VERSION=$E2AP_VERSION .. &&\
|
||||
ninja && \
|
||||
|
||||
@@ -71,7 +71,7 @@ RUN /bin/sh oaienv && \
|
||||
--gNB \
|
||||
--build-lib "telnetsrv enbscope uescope nrscope" \
|
||||
-t oran_fhlib_5g --cmake-opt -Dxran_LOCATION=/opt/phy/fhi_lib/lib \
|
||||
--build-e2 --cmake-opt -DXAPP_MULTILANGUAGE=OFF --cmake-opt -DKPM_VERSION=$KPM_VERSION --cmake-opt -DE2AP_VERSION=$E2AP_VERSION \
|
||||
--build-e2 --cmake-opt -DKPM_VERSION=$KPM_VERSION --cmake-opt -DE2AP_VERSION=$E2AP_VERSION \
|
||||
$BUILD_OPTION && \
|
||||
# Mainly to see if the sanitize option was perfectly executed
|
||||
ldd ran_build/build/nr-softmodem && \
|
||||
@@ -82,7 +82,6 @@ RUN /bin/sh oaienv && \
|
||||
RUN mkdir -p openair2/E2AP/flexric/build && \
|
||||
cd openair2/E2AP/flexric/build && \
|
||||
cmake -GNinja -DCMAKE_BUILD_TYPE=Release \
|
||||
-DXAPP_MULTILANGUAGE=OFF \
|
||||
-DKPM_VERSION=$KPM_VERSION \
|
||||
-DE2AP_VERSION=$E2AP_VERSION \
|
||||
-DCMAKE_C_COMPILER=gcc-12 \
|
||||
|
||||
@@ -41,8 +41,7 @@ RUN /bin/sh oaienv && \
|
||||
scl enable gcc-toolset-13 "\
|
||||
CXXFLAGS='-Werror -fstack-protector-strong' CFLAGS='-Werror -fstack-protector-strong' ./build_oai -c --ninja \
|
||||
--eNB --gNB --RU --UE --nrUE \
|
||||
--build-e2 --cmake-opt -DXAPP_MULTILANGUAGE=OFF --cmake-opt \
|
||||
-DKPM_VERSION=$KPM_VERSION --cmake-opt -DE2AP_VERSION=$E2AP_VERSION \
|
||||
--build-e2 --cmake-opt -DKPM_VERSION=$KPM_VERSION --cmake-opt -DE2AP_VERSION=$E2AP_VERSION \
|
||||
--build-lib 'telnetsrv enbscope uescope nrscope' \
|
||||
--build-tool-opt -k10 \
|
||||
-w USRP -t Ethernet \
|
||||
@@ -57,7 +56,6 @@ RUN mkdir -p openair2/E2AP/flexric/build && \
|
||||
cd openair2/E2AP/flexric/build && \
|
||||
scl enable gcc-toolset-13 "\
|
||||
cmake -GNinja -DCMAKE_BUILD_TYPE=Release \
|
||||
-DXAPP_MULTILANGUAGE=OFF \
|
||||
-DKPM_VERSION=$KPM_VERSION \
|
||||
-DE2AP_VERSION=$E2AP_VERSION .. &&\
|
||||
ninja && \
|
||||
|
||||
@@ -36,14 +36,19 @@ WORKDIR /oai-ran
|
||||
COPY . .
|
||||
|
||||
# build all targets so final targets can be created afterwards
|
||||
RUN /bin/sh oaienv && \
|
||||
RUN \
|
||||
# Mount CCache cache direrctory
|
||||
--mount=type=cache,target=/root/.cache/ccache/ \
|
||||
# Mount CPM package cache
|
||||
--mount=type=cache,target=/root/.cache/cpm/ \
|
||||
/bin/sh oaienv && \
|
||||
cd cmake_targets && \
|
||||
mkdir -p log && \
|
||||
./build_oai -c --ninja \
|
||||
--eNB --gNB --RU --UE --nrUE \
|
||||
--build-lib "telnetsrv enbscope uescope nrscope" \
|
||||
-w USRP -t Ethernet \
|
||||
--build-e2 --cmake-opt -DXAPP_MULTILANGUAGE=OFF --cmake-opt -DKPM_VERSION=$KPM_VERSION --cmake-opt -DE2AP_VERSION=$E2AP_VERSION \
|
||||
--build-e2 --cmake-opt -DKPM_VERSION=$KPM_VERSION --cmake-opt -DE2AP_VERSION=$E2AP_VERSION \
|
||||
--noavx512 \
|
||||
--build-tool-opt -k10 \
|
||||
--cmake-opt -DCMAKE_C_FLAGS="-Werror" --cmake-opt -DCMAKE_CXX_FLAGS="-Werror" $BUILD_OPTION && \
|
||||
@@ -54,10 +59,12 @@ RUN /bin/sh oaienv && \
|
||||
ldd ran_build/build/*.so
|
||||
|
||||
## Build FlexRIC for SM Models
|
||||
RUN mkdir -p openair2/E2AP/flexric/build && \
|
||||
RUN \
|
||||
# Mount CCache cache direrctory
|
||||
--mount=type=cache,target=/root/.cache/ccache/ \
|
||||
mkdir -p openair2/E2AP/flexric/build && \
|
||||
cd openair2/E2AP/flexric/build && \
|
||||
cmake -GNinja -DCMAKE_BUILD_TYPE=Release \
|
||||
-DXAPP_MULTILANGUAGE=OFF \
|
||||
-DKPM_VERSION=$KPM_VERSION \
|
||||
-DE2AP_VERSION=$E2AP_VERSION \
|
||||
-DCMAKE_C_COMPILER=gcc-12 \
|
||||
|
||||
@@ -45,7 +45,7 @@ WORKDIR /oai-ran
|
||||
COPY . .
|
||||
|
||||
RUN /bin/sh oaienv && \
|
||||
tar -xvzf nvipc_src.*.tar.gz && \
|
||||
tar -xvzf nvipc* && \
|
||||
cd nvipc_src.* && \
|
||||
rm -rf build && mkdir build && cd build && \
|
||||
cmake .. -DNVIPC_DPDK_ENABLE=OFF -DNVIPC_DOCA_ENABLE=OFF -DNVIPC_CUDA_ENABLE=OFF -DENABLE_SLT_RSP=ON && \
|
||||
|
||||
@@ -45,7 +45,7 @@ WORKDIR /oai-ran
|
||||
COPY . .
|
||||
|
||||
RUN /bin/sh oaienv && \
|
||||
tar -xvzf nvipc_src.*.tar.gz && \
|
||||
tar -xvzf nvipc* && \
|
||||
cd nvipc_src.* && \
|
||||
rm -rf build && mkdir build && cd build && \
|
||||
cmake .. -DNVIPC_DPDK_ENABLE=OFF -DNVIPC_DOCA_ENABLE=OFF -DNVIPC_CUDA_ENABLE=OFF -DENABLE_SLT_RSP=ON && \
|
||||
|
||||
@@ -1740,8 +1740,6 @@ void *UE_thread(void *arg) {
|
||||
oai_exit=1;
|
||||
}
|
||||
|
||||
log_scheduler(__func__);
|
||||
|
||||
while (!oai_exit) {
|
||||
AssertFatal ( 0== pthread_mutex_lock(&UE->proc.mutex_synch), "");
|
||||
int instance_cnt_synch = UE->proc.instance_cnt_synch;
|
||||
|
||||
@@ -360,32 +360,29 @@ void term_gNB_Tpool(int inst) {
|
||||
}
|
||||
|
||||
/// eNB kept in function name for nffapi calls, TO FIX
|
||||
void init_eNB_afterRU(void) {
|
||||
int inst,ru_id,i,aa;
|
||||
PHY_VARS_gNB *gNB;
|
||||
|
||||
for (inst=0; inst<RC.nb_nr_L1_inst; inst++) {
|
||||
gNB = RC.gNB[inst];
|
||||
|
||||
void init_eNB_afterRU(void)
|
||||
{
|
||||
for (int inst = 0; inst < RC.nb_nr_L1_inst; inst++) {
|
||||
PHY_VARS_gNB *gNB = RC.gNB[inst];
|
||||
phy_init_nr_gNB(gNB);
|
||||
|
||||
// map antennas and PRACH signals to gNB RX
|
||||
if (0) AssertFatal(gNB->num_RU>0,"Number of RU attached to gNB %d is zero\n",gNB->Mod_id);
|
||||
|
||||
LOG_D(NR_PHY, "Mapping RX ports from %d RUs to gNB %d\n", gNB->num_RU, gNB->Mod_id);
|
||||
|
||||
for (ru_id=0,aa=0; ru_id<gNB->num_RU; ru_id++) {
|
||||
int aa = 0;
|
||||
for (int ru_id = 0; ru_id < gNB->num_RU; ru_id++) {
|
||||
AssertFatal(gNB->RU_list[ru_id]->common.rxdataF != NULL, "RU %d : common.rxdataF is NULL\n", gNB->RU_list[ru_id]->idx);
|
||||
AssertFatal(gNB->RU_list[ru_id]->prach_rxsigF != NULL, "RU %d : prach_rxsigF is NULL\n", gNB->RU_list[ru_id]->idx);
|
||||
|
||||
for (i=0; i<gNB->RU_list[ru_id]->nb_rx; aa++,i++) {
|
||||
LOG_I(PHY,"Attaching RU %d antenna %d to gNB antenna %d\n",gNB->RU_list[ru_id]->idx,i,aa);
|
||||
for (int i = 0; i < gNB->RU_list[ru_id]->nb_rx; aa++, i++) {
|
||||
LOG_I(PHY,"Attaching RU %d antenna %d to gNB antenna %d\n", gNB->RU_list[ru_id]->idx, i, aa);
|
||||
gNB->prach_vars.rxsigF[aa] = gNB->RU_list[ru_id]->prach_rxsigF[0][i];
|
||||
// TODO hardcoded beam to 0, still need to understand how to handle this properly
|
||||
gNB->common_vars.rxdataF[0][aa] = (c16_t *)gNB->RU_list[ru_id]->common.rxdataF[i];
|
||||
for (int b = 0; b < gNB->RU_list[ru_id]->num_beams_period; b++) {
|
||||
int idx = i + b * gNB->RU_list[ru_id]->nb_rx;
|
||||
gNB->common_vars.rxdataF[b][aa] = (c16_t *)gNB->RU_list[ru_id]->common.rxdataF[idx];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* TODO: review this code, there is something wrong.
|
||||
* In monolithic mode, we come here with nb_antennas_rx == 0
|
||||
* (not tested in other modes).
|
||||
@@ -393,7 +390,6 @@ void init_eNB_afterRU(void) {
|
||||
//init_precoding_weights(RC.gNB[inst]);
|
||||
init_gNB_Tpool(inst);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -240,20 +240,20 @@ int connect_rau(RU_t *ru) {
|
||||
void fh_if5_south_out(RU_t *ru, int frame, int slot, uint64_t timestamp) {
|
||||
if (ru == RC.ru[0]) VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, ru->proc.timestamp_tx&0xffffffff );
|
||||
int offset = ru->nr_frame_parms->get_samples_slot_timestamp(slot,ru->nr_frame_parms,0);
|
||||
void *buffs[ru->nb_tx];
|
||||
for (int aid=0;aid<ru->nb_tx;aid++) buffs[aid] = (void*)&ru->common.txdata[aid][offset];
|
||||
void *buffs[ru->nb_tx];
|
||||
for (int aid = 0; aid < ru->nb_tx; aid++)
|
||||
buffs[aid] = (void*)&ru->common.txdata[aid][offset];
|
||||
struct timespec txmeas;
|
||||
clock_gettime(CLOCK_MONOTONIC, &txmeas);
|
||||
LOG_D(NR_PHY,"IF5 TX %d.%d, TS %llu, buffs[0] %p, buffs[1] %p ener0 %f dB, tx start %d\n",frame,slot,(unsigned long long)timestamp,buffs[0],buffs[1],
|
||||
10*log10((double)signal_energy(buffs[0],ru->nr_frame_parms->get_samples_per_slot(slot,ru->nr_frame_parms))),(int)txmeas.tv_nsec);
|
||||
ru->ifdevice.trx_write_func2(&ru->ifdevice,
|
||||
timestamp,
|
||||
timestamp,
|
||||
buffs,
|
||||
0,
|
||||
ru->nr_frame_parms->get_samples_per_slot(slot,ru->nr_frame_parms),
|
||||
0,
|
||||
ru->nb_tx);
|
||||
|
||||
0,
|
||||
ru->nr_frame_parms->get_samples_per_slot(slot,ru->nr_frame_parms),
|
||||
0,
|
||||
ru->nb_tx);
|
||||
}
|
||||
|
||||
// southbound IF4p5 fronthaul
|
||||
@@ -591,33 +591,28 @@ static void rx_rf(RU_t *ru, int *frame, int *slot)
|
||||
RU_proc_t *proc = &ru->proc;
|
||||
NR_DL_FRAME_PARMS *fp = ru->nr_frame_parms;
|
||||
openair0_config_t *cfg = &ru->openair0_cfg;
|
||||
void *rxp[ru->nb_rx];
|
||||
unsigned int rxs;
|
||||
int i;
|
||||
uint32_t samples_per_slot = fp->get_samples_per_slot(*slot,fp);
|
||||
uint32_t samples_per_slot_prev ;
|
||||
openair0_timestamp ts,old_ts;
|
||||
AssertFatal(*slot<fp->slots_per_frame && *slot>=0, "slot %d is illegal (%d)\n",*slot,fp->slots_per_frame);
|
||||
uint32_t samples_per_slot = fp->get_samples_per_slot(*slot, fp);
|
||||
AssertFatal(*slot < fp->slots_per_frame && *slot >= 0, "slot %d is illegal (%d)\n", *slot, fp->slots_per_frame);
|
||||
|
||||
start_meas(&ru->rx_fhaul);
|
||||
for (i=0; i<ru->nb_rx; i++)
|
||||
rxp[i] = (void *)&ru->common.rxdata[i][fp->get_samples_slot_timestamp(*slot,fp,0)];
|
||||
int nb = ru->nb_rx * ru->num_beams_period;
|
||||
void *rxp[nb];
|
||||
for (int i = 0; i < nb; i++)
|
||||
rxp[i] = (void *)&ru->common.rxdata[i][fp->get_samples_slot_timestamp(*slot, fp, 0)];
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ, 1 );
|
||||
old_ts = proc->timestamp_rx;
|
||||
LOG_D(PHY,"Reading %d samples for slot %d (%p)\n",samples_per_slot,*slot,rxp[0]);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ, 1);
|
||||
openair0_timestamp old_ts = proc->timestamp_rx;
|
||||
LOG_D(PHY,"Reading %d samples for slot %d (%p)\n", samples_per_slot, *slot, rxp[0]);
|
||||
|
||||
openair0_timestamp ts;
|
||||
unsigned int rxs;
|
||||
if(emulate_rf) {
|
||||
wait_on_condition(&proc->mutex_emulateRF,&proc->cond_emulateRF,&proc->instance_cnt_emulateRF,"emulatedRF_thread");
|
||||
release_thread(&proc->mutex_emulateRF,&proc->instance_cnt_emulateRF,"emulatedRF_thread");
|
||||
rxs = samples_per_slot;
|
||||
ts = old_ts + rxs;
|
||||
} else {
|
||||
rxs = ru->rfdevice.trx_read_func(&ru->rfdevice,
|
||||
&ts,
|
||||
rxp,
|
||||
samples_per_slot,
|
||||
ru->nb_rx);
|
||||
rxs = ru->rfdevice.trx_read_func(&ru->rfdevice, &ts, rxp, samples_per_slot, nb);
|
||||
}
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ, 0 );
|
||||
@@ -629,7 +624,7 @@ static void rx_rf(RU_t *ru, int *frame, int *slot)
|
||||
LOG_E(PHY, "rx_rf: Asked for %d samples, got %d from USRP\n", samples_per_slot, rxs);
|
||||
|
||||
if (proc->first_rx != 1) {
|
||||
samples_per_slot_prev = fp->get_samples_per_slot((*slot-1)%fp->slots_per_frame,fp);
|
||||
uint32_t samples_per_slot_prev = fp->get_samples_per_slot((*slot - 1) % fp->slots_per_frame, fp);
|
||||
|
||||
if (proc->timestamp_rx - old_ts != samples_per_slot_prev) {
|
||||
LOG_D(PHY,
|
||||
@@ -752,8 +747,6 @@ void tx_rf(RU_t *ru, int frame,int slot, uint64_t timestamp)
|
||||
RU_proc_t *proc = &ru->proc;
|
||||
NR_DL_FRAME_PARMS *fp = ru->nr_frame_parms;
|
||||
nfapi_nr_config_request_scf_t *cfg = &ru->config;
|
||||
void *txp[ru->nb_tx];
|
||||
int i;
|
||||
T(T_ENB_PHY_OUTPUT_SIGNAL,
|
||||
T_INT(0),
|
||||
T_INT(0),
|
||||
@@ -820,7 +813,9 @@ void tx_rf(RU_t *ru, int frame,int slot, uint64_t timestamp)
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_RU, frame);
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_TX0_RU, slot);
|
||||
|
||||
for (i = 0; i < ru->nb_tx; i++)
|
||||
int nt = ru->nb_tx * ru->num_beams_period;
|
||||
void *txp[nt];
|
||||
for (int i = 0; i < nt; i++)
|
||||
txp[i] = (void *)&ru->common.txdata[i][fp->get_samples_slot_timestamp(slot, fp, 0)] - sf_extension * sizeof(int32_t);
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, (timestamp + ru->ts_offset) & 0xffffffff);
|
||||
@@ -830,12 +825,12 @@ void tx_rf(RU_t *ru, int frame,int slot, uint64_t timestamp)
|
||||
timestamp + ru->ts_offset - sf_extension,
|
||||
txp,
|
||||
siglen + sf_extension,
|
||||
ru->nb_tx, flags);
|
||||
nt,
|
||||
flags);
|
||||
LOG_D(PHY,
|
||||
"[TXPATH] RU %d aa %d tx_rf, writing to TS %llu, %d.%d, unwrapped_frame %d, slot %d, flags %d, siglen+sf_extension %d, "
|
||||
"[TXPATH] RU %d tx_rf, writing to TS %llu, %d.%d, unwrapped_frame %d, slot %d, flags %d, siglen+sf_extension %d, "
|
||||
"returned %d, E %f\n",
|
||||
ru->idx,
|
||||
i,
|
||||
(long long unsigned int)(timestamp + ru->ts_offset - sf_extension),
|
||||
frame,
|
||||
slot,
|
||||
@@ -851,7 +846,6 @@ void tx_rf(RU_t *ru, int frame,int slot, uint64_t timestamp)
|
||||
|
||||
static void fill_rf_config(RU_t *ru, char *rf_config_file)
|
||||
{
|
||||
int i;
|
||||
NR_DL_FRAME_PARMS *fp = ru->nr_frame_parms;
|
||||
nfapi_nr_config_request_scf_t *config = &ru->config; //tmp index
|
||||
openair0_config_t *cfg = &ru->openair0_cfg;
|
||||
@@ -877,13 +871,14 @@ static void fill_rf_config(RU_t *ru, char *rf_config_file)
|
||||
AssertFatal(ru->nb_rx > 0 && ru->nb_rx <= 8, "openair0 does not support more than 8 antennas\n");
|
||||
|
||||
cfg->Mod_id = 0;
|
||||
cfg->num_rb_dl=N_RB;
|
||||
cfg->tx_num_channels=ru->nb_tx;
|
||||
cfg->rx_num_channels=ru->nb_rx;
|
||||
cfg->num_rb_dl = N_RB;
|
||||
cfg->tx_num_channels = ru->nb_tx * ru->num_beams_period;
|
||||
cfg->rx_num_channels = ru->nb_rx * ru->num_beams_period;
|
||||
cfg->num_distributed_ru = ru->num_beams_period;
|
||||
LOG_I(PHY,"Setting RF config for N_RB %d, NB_RX %d, NB_TX %d\n",cfg->num_rb_dl,cfg->rx_num_channels,cfg->tx_num_channels);
|
||||
LOG_I(PHY,"tune_offset %.0f Hz, sample_rate %.0f Hz\n",cfg->tune_offset,cfg->sample_rate);
|
||||
|
||||
for (i=0; i<ru->nb_tx; i++) {
|
||||
for (int i = 0; i < ru->nb_tx * ru->num_beams_period; i++) {
|
||||
if (ru->if_frequency == 0) {
|
||||
cfg->tx_freq[i] = (double)fp->dl_CarrierFreq;
|
||||
} else if (ru->if_freq_offset) {
|
||||
@@ -898,7 +893,7 @@ static void fill_rf_config(RU_t *ru, char *rf_config_file)
|
||||
i, cfg->tx_gain[i],cfg->tx_freq[i]);
|
||||
}
|
||||
|
||||
for (i=0; i<ru->nb_rx; i++) {
|
||||
for (int i = 0; i < ru->nb_rx * ru->num_beams_period; i++) {
|
||||
if (ru->if_frequency == 0) {
|
||||
cfg->rx_freq[i] = (double)fp->ul_CarrierFreq;
|
||||
} else if (ru->if_freq_offset) {
|
||||
@@ -944,8 +939,8 @@ static void fill_split7_2_config(split7_config_t *split7, const nfapi_nr_config_
|
||||
Each rf chain is is addressed by the card number and the chain on the card. The
|
||||
rf_map specifies for each antenna port, on which rf chain the mapping should start. Multiple
|
||||
antennas are mapped to successive RF chains on the same card. */
|
||||
int setup_RU_buffers(RU_t *ru) {
|
||||
int i,j;
|
||||
int setup_RU_buffers(RU_t *ru)
|
||||
{
|
||||
int card,ant;
|
||||
//uint16_t N_TA_offset = 0;
|
||||
NR_DL_FRAME_PARMS *fp;
|
||||
@@ -967,27 +962,27 @@ int setup_RU_buffers(RU_t *ru) {
|
||||
|
||||
if (ru->openair0_cfg.mmapped_dma == 1) {
|
||||
// replace RX signal buffers with mmaped HW versions
|
||||
for (i=0; i<ru->nb_rx; i++) {
|
||||
card = i/4;
|
||||
ant = i%4;
|
||||
for (int i = 0; i < ru->nb_rx * ru->num_beams_period; i++) {
|
||||
card = i / 4;
|
||||
ant = i % 4;
|
||||
LOG_D(PHY, "Mapping RU id %u, rx_ant %d, on card %d, chain %d\n", ru->idx, i, ru->rf_map.card + card, ru->rf_map.chain + ant);
|
||||
free(ru->common.rxdata[i]);
|
||||
ru->common.rxdata[i] = ru->openair0_cfg.rxbase[ru->rf_map.chain + ant];
|
||||
|
||||
for (j = 0; j < 16; j++) {
|
||||
ru->common.rxdata[i][j] = 16-j;
|
||||
for (int j = 0; j < 16; j++) {
|
||||
ru->common.rxdata[i][j] = 16 - j;
|
||||
}
|
||||
}
|
||||
|
||||
for (i=0; i<ru->nb_tx; i++) {
|
||||
card = i/4;
|
||||
ant = i%4;
|
||||
for (int i = 0; i < ru->nb_tx * ru->num_beams_period; i++) {
|
||||
card = i / 4;
|
||||
ant = i % 4;
|
||||
LOG_D(PHY, "Mapping RU id %u, tx_ant %d, on card %d, chain %d\n", ru->idx, i, ru->rf_map.card + card, ru->rf_map.chain + ant);
|
||||
free(ru->common.txdata[i]);
|
||||
ru->common.txdata[i] = ru->openair0_cfg.txbase[ru->rf_map.chain + ant];
|
||||
|
||||
for (j = 0; j < 16; j++) {
|
||||
ru->common.txdata[i][j] = 16-j;
|
||||
for (int j = 0; j < 16; j++) {
|
||||
ru->common.txdata[i][j] = 16 - j;
|
||||
}
|
||||
}
|
||||
} else { // not memory-mapped DMA
|
||||
@@ -1054,7 +1049,7 @@ void ru_tx_func(void *param)
|
||||
ru->fh_north_out(ru);
|
||||
} else {
|
||||
if(frame_tx == print_frame) {
|
||||
for (int i=0; i<ru->nb_tx; i++) {
|
||||
for (int i = 0; i < ru->nb_tx * ru->num_beams_period; i++) {
|
||||
if(slot_tx == 0) {
|
||||
sprintf(filename,"gNBdataF_frame%d_sl%d.m", print_frame, slot_tx);
|
||||
LOG_M(filename,"txdataF_frame",&ru->gNB_list[0]->common_vars.txdataF[i][0],fp->samples_per_frame_wCP, 1, 1);
|
||||
@@ -1324,10 +1319,12 @@ void *ru_thread(void *param)
|
||||
|
||||
for (int prach_oc = 0; prach_oc < p->num_prach_ocas; prach_oc++) {
|
||||
int prachStartSymbol = p->prachStartSymbol + prach_oc * N_dur;
|
||||
int beam_id = ru->prach_list[prach_id].beam ? ru->prach_list[prach_id].beam[prach_oc] : 0;
|
||||
//comment FK: the standard 38.211 section 5.3.2 has one extra term +14*N_RA_slot. This is because there prachStartSymbol is given wrt to start of the 15kHz slot or 60kHz slot. Here we work slot based, so this function is anyway only called in slots where there is PRACH. Its up to the MAC to schedule another PRACH PDU in the case there are there N_RA_slot \in {0,1}.
|
||||
rx_nr_prach_ru(ru,
|
||||
p->fmt, // could also use format
|
||||
p->numRA,
|
||||
beam_id,
|
||||
prachStartSymbol,
|
||||
p->slot,
|
||||
prach_oc,
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#define _GNU_SOURCE /* See feature_test_macros(7) */
|
||||
|
||||
#include "common/config/config_userapi.h"
|
||||
#include "common/utils/load_module_shlib.h"
|
||||
#include "RRC/LTE/rrc_vars.h"
|
||||
#ifdef SMBV
|
||||
#include "PHY/TOOLS/smbv.h"
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
#include "position_interface.h"
|
||||
#include "nr_phy_common.h"
|
||||
#include "common/utils/time_manager/time_manager.h"
|
||||
#include "log.h"
|
||||
|
||||
/*
|
||||
* NR SLOT PROCESSING SEQUENCE
|
||||
@@ -545,6 +546,28 @@ static void RU_write(nr_rxtx_thread_data_t *rxtxD, bool sl_tx_action, c16_t **tx
|
||||
}
|
||||
}
|
||||
|
||||
if (!IS_SOFTMODEM_RFSIM) {
|
||||
uint64_t deadline_us = rxtxD->absolute_deadline_us;
|
||||
struct timespec current_time;
|
||||
if (clock_gettime(CLOCK_REALTIME, ¤t_time)) {
|
||||
LOG_E(PHY, "clock_gettime failed\n");
|
||||
}
|
||||
uint64_t current_time_us = current_time.tv_sec * 1e6 + current_time.tv_nsec / 1e3;
|
||||
if (current_time_us > deadline_us) {
|
||||
static unsigned int deadline_warning_rate_limit = 0;
|
||||
if (deadline_warning_rate_limit % 1000 == 0) {
|
||||
LOG_W(PHY,
|
||||
"Deadline missed for tx slot %d.%d (current time %lu us, deadline %lu us, missed by %lu)\n",
|
||||
proc->frame_tx,
|
||||
proc->nr_slot_tx,
|
||||
current_time_us,
|
||||
deadline_us,
|
||||
current_time_us - deadline_us);
|
||||
}
|
||||
deadline_warning_rate_limit++;
|
||||
}
|
||||
}
|
||||
|
||||
openair0_timestamp writeTimestamp = proc->timestamp_tx;
|
||||
int writeBlockSize = rxtxD->writeBlockSize;
|
||||
// if writeBlockSize gets longer that slot size, fill with dummy
|
||||
@@ -728,7 +751,8 @@ static int UE_dl_preprocessing(PHY_VARS_NR_UE *UE,
|
||||
}
|
||||
|
||||
sampleShift = pbch_pdcch_processing(UE, proc, phy_data);
|
||||
if (phy_data->dlsch[0].active && phy_data->dlsch[0].rnti_type == TYPE_C_RNTI_) {
|
||||
if (phy_data->dlsch[0].active
|
||||
&& (phy_data->dlsch[0].rnti_type == TYPE_C_RNTI_ || phy_data->dlsch[0].rnti_type == TYPE_RA_RNTI_)) {
|
||||
// indicate to tx thread to wait for DLSCH decoding
|
||||
if (phy_data->dlsch[0].dlsch_config.k1_feedback) { // if feedback is 0 there is no HARQ associated with this DLSCH
|
||||
const int ack_nack_slot = (proc->nr_slot_rx + phy_data->dlsch[0].dlsch_config.k1_feedback) % fp->slots_per_frame;
|
||||
@@ -1138,8 +1162,13 @@ void *UE_thread(void *arg)
|
||||
const int readBlockSize = get_readBlockSize(slot_nr, fp) - iq_shift_to_apply;
|
||||
openair0_timestamp rx_timestamp;
|
||||
int tmp = UE->rfdevice.trx_read_func(&UE->rfdevice, &rx_timestamp, rxp, readBlockSize, fp->nb_antennas_rx);
|
||||
UEscopeCopy(UE, ueTimeDomainSamples, rxp[0], sizeof(c16_t), 1, readBlockSize, 0);
|
||||
metadata meta = {.slot = curMsg.proc.nr_slot_rx, .frame = curMsg.proc.frame_rx};
|
||||
UEscopeCopyWithMetadata(UE, ueTimeDomainSamples, rxp[0] - firstSymSamp * sizeof(c16_t), sizeof(c16_t), 1, readBlockSize, 0, &meta);
|
||||
AssertFatal(readBlockSize == tmp, "");
|
||||
struct timespec current_time;
|
||||
if (clock_gettime(CLOCK_REALTIME, ¤t_time)) {
|
||||
LOG_E(PHY, "clock_gettime failed\n");
|
||||
}
|
||||
|
||||
if(slot_nr == (nb_slot_frame - 1)) {
|
||||
// read in first symbol of next frame and adjust for timing drift
|
||||
@@ -1162,6 +1191,11 @@ void *UE_thread(void *arg)
|
||||
const openair0_timestamp writeTimestamp = rx_timestamp + fp->get_samples_slot_timestamp(slot_nr, fp, duration_rx_to_tx)
|
||||
- firstSymSamp - UE->N_TA_offset - timing_advance;
|
||||
|
||||
// Calculate TX deadline, approximately 1 symbol before the first sample should be written
|
||||
const uint64_t samples_diff = writeTimestamp - rx_timestamp - fp->ofdm_symbol_size;
|
||||
const float deadline_us = samples_diff / UE->rfdevice.openair0_cfg->sample_rate * 1e6;
|
||||
const uint64_t absolute_deadline_us = current_time.tv_sec * 1e6 + current_time.tv_nsec / 1e3 + deadline_us;
|
||||
|
||||
// but use current UE->timing_advance value to compute writeBlockSize
|
||||
int writeBlockSize = fp->get_samples_per_slot((slot_nr + duration_rx_to_tx) % nb_slot_frame, fp) - iq_shift_to_apply;
|
||||
int new_timing_advance = UE->timing_advance;
|
||||
@@ -1204,6 +1238,7 @@ void *UE_thread(void *arg)
|
||||
curMsgTx->writeBlockSize = writeBlockSize;
|
||||
curMsgTx->proc.timestamp_tx = writeTimestamp;
|
||||
curMsgTx->UE = UE;
|
||||
curMsgTx->absolute_deadline_us = absolute_deadline_us;
|
||||
|
||||
int slot = curMsgTx->proc.nr_slot_tx;
|
||||
int slot_and_frame = slot + curMsgTx->proc.frame_tx * UE->frame_parms.slots_per_frame;
|
||||
|
||||
@@ -368,9 +368,6 @@ void start_oai_nrue_threads()
|
||||
|
||||
int NB_UE_INST = 1;
|
||||
configmodule_interface_t *uniqCfg = NULL;
|
||||
|
||||
// A global var to reduce the changes size
|
||||
ldpc_interface_t ldpc_interface = {0}, ldpc_interface_offload = {0};
|
||||
nrLDPC_coding_interface_t nrLDPC_coding_interface = {0};
|
||||
|
||||
int main(int argc, char **argv)
|
||||
|
||||
@@ -35,6 +35,9 @@
|
||||
#include "debug.h"
|
||||
|
||||
#define INDENTED_PRINTF(format, ...) printf("%*s" format, depth * 2, "", ##__VA_ARGS__)
|
||||
#define INDENTED_GENERIC_PRINT(string, format, ...) INDENTED_PRINTF(string " = " format "\n", ##__VA_ARGS__)
|
||||
#define INDENTED_TLV_PRINT(tlv_name, tlv) INDENTED_GENERIC_PRINT("(0x%04x) " tlv_name, "0x%02x", tlv.tl.tag, tlv.value)
|
||||
#define INDENTED_TLV_FORMAT_PRINT(tlv_name, format, tlv) INDENTED_GENERIC_PRINT("(0x%04x) " tlv_name, format, tlv.tl.tag, tlv.value)
|
||||
|
||||
#define EQ_TLV(_tlv_a, _tlv_b) \
|
||||
do { \
|
||||
|
||||
@@ -724,6 +724,53 @@ uint8_t unpack_nr_param_response(uint8_t **ppReadPackedMsg, uint8_t *end, void *
|
||||
&pNfapiMsg->vendor_extension));
|
||||
}
|
||||
|
||||
static uint8_t pack_dbt_table_tlv_value(void *tlv, uint8_t **ppWritePackedMsg, uint8_t *end)
|
||||
{
|
||||
nfapi_nr_dbt_tlv_ve_t *dbt_ve = (nfapi_nr_dbt_tlv_ve_t *)tlv;
|
||||
nfapi_nr_dbt_pdu_t *dbt_config = &dbt_ve->value;
|
||||
if (!( push16(dbt_config->num_dig_beams, ppWritePackedMsg, end) && push16(dbt_config->num_txrus, ppWritePackedMsg, end) )) {
|
||||
return 0;
|
||||
}
|
||||
for (int i = 0; i< dbt_config->num_dig_beams; i++) {
|
||||
const nfapi_nr_dig_beam_t *dig_beam = &dbt_config->dig_beam_list[i];
|
||||
if (!(push16(dig_beam->beam_idx, ppWritePackedMsg, end))) {
|
||||
return 0;
|
||||
}
|
||||
for (int k = 0; k< dbt_config->num_txrus; k++) {
|
||||
const nfapi_nr_txru_t *tx_ru = &dig_beam->txru_list[k];
|
||||
if (!(push16(tx_ru->dig_beam_weight_Re, ppWritePackedMsg, end) && push16(tx_ru->dig_beam_weight_Im, ppWritePackedMsg, end))) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
static uint8_t pack_pm_table_tlv_value(void *tlv, uint8_t **ppWritePackedMsg, uint8_t *end)
|
||||
{
|
||||
nfapi_nr_pm_tlv_ve_t *pm_ve = (nfapi_nr_pm_tlv_ve_t *)tlv;
|
||||
nfapi_nr_pm_list_t *pmi_list = &pm_ve->value;
|
||||
if (!( push16(pmi_list->num_pm_idx, ppWritePackedMsg, end) )) {
|
||||
return 0;
|
||||
}
|
||||
for (int i = 0; i< pmi_list->num_pm_idx; i++) {
|
||||
const nfapi_nr_pm_pdu_t *pm_pdu = &pmi_list->pmi_pdu[i];
|
||||
if (!(push16(pm_pdu->pm_idx, ppWritePackedMsg, end) && push16(pm_pdu->numLayers, ppWritePackedMsg, end)
|
||||
&& push16(pm_pdu->num_ant_ports, ppWritePackedMsg, end))) {
|
||||
return 0;
|
||||
}
|
||||
for (int k = 0; k < pm_pdu->numLayers; k++) {
|
||||
for (int j = 0; j < pm_pdu->num_ant_ports; j++) {
|
||||
const nfapi_nr_pm_weights_t *pm_weight = &pm_pdu->weights[k][j];
|
||||
if (!(push16(pm_weight->precoder_weight_Re, ppWritePackedMsg, end) && push16(pm_weight->precoder_weight_Im, ppWritePackedMsg, end))) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
uint8_t pack_nr_config_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p4_p5_codec_config_t *config)
|
||||
{
|
||||
uint8_t *pNumTLVFields = (uint8_t *)*ppWritePackedMsg;
|
||||
@@ -1044,11 +1091,19 @@ uint8_t pack_nr_config_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *e
|
||||
// END Measurement Config
|
||||
|
||||
// START Digital Beam Table (DBT) PDU
|
||||
// Struct in nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h nfapi_nr_dbt_pdu_t, currently unused
|
||||
if (pNfapiMsg->dbt_config.num_dig_beams != 0) {
|
||||
nfapi_nr_dbt_tlv_ve_t dbt_tlv = {.tl.tag = NFAPI_NR_CONFIG_BEAMFORMING_TABLE_TAG, .value = pNfapiMsg->dbt_config};
|
||||
pack_nr_tlv(NFAPI_NR_CONFIG_BEAMFORMING_TABLE_TAG, &dbt_tlv, ppWritePackedMsg, end, &pack_dbt_table_tlv_value);
|
||||
numTLVs++;
|
||||
}
|
||||
// END Digital Beam Table (DBT) PDU
|
||||
|
||||
// START Precoding Matrix (PM) PDU
|
||||
// Struct in nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h nfapi_nr_pm_pdu_t, currently unused, tag to use for AERIAL
|
||||
if (pNfapiMsg->pmi_list.num_pm_idx != 0) {
|
||||
nfapi_nr_pm_tlv_ve_t pm_tlv = {.tl.tag = NFAPI_NR_CONFIG_PRECODING_TABLE_V6_TAG, .value = pNfapiMsg->pmi_list};
|
||||
pack_nr_tlv(NFAPI_NR_CONFIG_PRECODING_TABLE_V6_TAG, &pm_tlv, ppWritePackedMsg, end, &pack_pm_table_tlv_value);
|
||||
numTLVs++;
|
||||
}
|
||||
// is 0xA011 END Precoding Matrix (PM) PDU
|
||||
#ifndef ENABLE_AERIAL
|
||||
// START nFAPI TLVs included in CONFIG.request for IDLE and CONFIGURED states
|
||||
@@ -1124,11 +1179,94 @@ uint8_t pack_nr_config_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *e
|
||||
// only increase if it was set
|
||||
numTLVs += pNfapiMsg->analog_beamforming_ve.analog_bf_vendor_ext.tl.tag == NFAPI_NR_FAPI_ANALOG_BF_VENDOR_EXTENSION_TAG;
|
||||
|
||||
AssertFatal(pNfapiMsg->analog_beamforming_ve.total_num_beams_vendor_ext.tl.tag == 0,
|
||||
"Total num beams Vendor extension shouldn't be set!");
|
||||
// The call to pack the TLV would be the same as any other TLV, it is only packed if the tag is set,
|
||||
// so, it's safe to add the call to pack_nr_tlv even if it is not always set
|
||||
retval &= pack_nr_tlv(NFAPI_NR_FAPI_TOTAL_NUM_BEAMS_VENDOR_EXTENSION_TAG,
|
||||
&(pNfapiMsg->analog_beamforming_ve.total_num_beams_vendor_ext),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value);
|
||||
// only increase if it was set
|
||||
numTLVs +=
|
||||
pNfapiMsg->analog_beamforming_ve.total_num_beams_vendor_ext.tl.tag == NFAPI_NR_FAPI_TOTAL_NUM_BEAMS_VENDOR_EXTENSION_TAG;
|
||||
|
||||
for (int beam = 0; beam < pNfapiMsg->analog_beamforming_ve.total_num_beams_vendor_ext.value; beam++) {
|
||||
AssertFatal(pNfapiMsg->analog_beamforming_ve.analog_beam_list[beam].tl.tag == 0,
|
||||
"Analog beams list Vendor extension shouldn't be set!");
|
||||
// The call to pack the TLV would be the same as any other TLV, it is only packed if the tag is set,
|
||||
// so, it's safe to add the call to pack_nr_tlv even if it is not always set
|
||||
retval &= pack_nr_tlv(NFAPI_NR_FAPI_ANALOG_BEAM_VENDOR_EXTENSION_TAG,
|
||||
&(pNfapiMsg->analog_beamforming_ve.analog_beam_list[beam]),
|
||||
ppWritePackedMsg,
|
||||
end,
|
||||
&pack_uint8_tlv_value);
|
||||
// only increase if it was set
|
||||
numTLVs += pNfapiMsg->analog_beamforming_ve.analog_bf_vendor_ext.tl.tag == NFAPI_NR_FAPI_TOTAL_NUM_BEAMS_VENDOR_EXTENSION_TAG;
|
||||
}
|
||||
|
||||
pNfapiMsg->num_tlv = numTLVs;
|
||||
retval &= push8(pNfapiMsg->num_tlv, &pNumTLVFields, end);
|
||||
return retval;
|
||||
}
|
||||
|
||||
static uint8_t unpack_dbt_table_tlv_value(void *tlv, uint8_t **ppReadPackedMsg, uint8_t *end)
|
||||
{
|
||||
nfapi_nr_dbt_pdu_t *dbt_config = (nfapi_nr_dbt_pdu_t *)tlv;
|
||||
if (!(pull16(ppReadPackedMsg, &dbt_config->num_dig_beams, end) && pull16(ppReadPackedMsg, &dbt_config->num_txrus, end))) {
|
||||
return 0;
|
||||
}
|
||||
if (dbt_config->num_dig_beams > 0) {
|
||||
dbt_config->dig_beam_list = calloc(dbt_config->num_dig_beams, sizeof(*dbt_config->dig_beam_list));
|
||||
}
|
||||
for (int i = 0; i < dbt_config->num_dig_beams; i++) {
|
||||
nfapi_nr_dig_beam_t *dig_beam = &dbt_config->dig_beam_list[i];
|
||||
if (!(pull16(ppReadPackedMsg, &dig_beam->beam_idx, end))) {
|
||||
return 0;
|
||||
}
|
||||
if (dbt_config->num_txrus > 0) {
|
||||
dig_beam->txru_list = calloc(dbt_config->num_txrus, sizeof(*dig_beam->txru_list));
|
||||
}
|
||||
for (int k = 0; k < dbt_config->num_txrus; k++) {
|
||||
nfapi_nr_txru_t *tx_ru = &dig_beam->txru_list[k];
|
||||
if (!(pull16(ppReadPackedMsg, &tx_ru->dig_beam_weight_Re, end) && pull16(ppReadPackedMsg, &tx_ru->dig_beam_weight_Im, end))) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
static uint8_t unpack_pm_table_tlv_value(void *tlv, uint8_t **ppReadPackedMsg, uint8_t *end)
|
||||
{
|
||||
nfapi_nr_pm_list_t *pm_list = (nfapi_nr_pm_list_t *)tlv;
|
||||
if (!(pull16(ppReadPackedMsg, &pm_list->num_pm_idx, end))) {
|
||||
return 0;
|
||||
}
|
||||
if (pm_list->num_pm_idx > 0) {
|
||||
pm_list->pmi_pdu = calloc(pm_list->num_pm_idx, sizeof(*pm_list->pmi_pdu));
|
||||
}
|
||||
for (int i = 0; i < pm_list->num_pm_idx; i++) {
|
||||
nfapi_nr_pm_pdu_t *pm_pdu = &pm_list->pmi_pdu[i];
|
||||
if (!(pull16(ppReadPackedMsg, &pm_pdu->pm_idx, end) && pull16(ppReadPackedMsg, &pm_pdu->numLayers, end)
|
||||
&& pull16(ppReadPackedMsg, &pm_pdu->num_ant_ports, end))) {
|
||||
return 0;
|
||||
}
|
||||
AssertFatal(pm_pdu->numLayers <= 4 && pm_pdu->num_ant_ports <= 4, "Precoding matrix size limited to 4X4 for the time being\n");
|
||||
for (int k = 0; k < pm_pdu->numLayers; k++) {
|
||||
for (int j = 0; j < pm_pdu->num_ant_ports; j++) {
|
||||
nfapi_nr_pm_weights_t *pm_weight = &pm_pdu->weights[k][j];
|
||||
if (!(pulls16(ppReadPackedMsg, &pm_weight->precoder_weight_Re, end)
|
||||
&& pulls16(ppReadPackedMsg, &pm_weight->precoder_weight_Im, end))) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
uint8_t unpack_nr_config_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p4_p5_codec_config_t *config)
|
||||
{
|
||||
// Helper vars for indexed TLVs
|
||||
@@ -1138,6 +1276,7 @@ uint8_t unpack_nr_config_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *
|
||||
int config_beam_idx = 0;
|
||||
int tdd_periodicity_idx = 0;
|
||||
int symbol_per_slot_idx = 0;
|
||||
int beam_ve_idx = 0;
|
||||
nfapi_nr_config_request_scf_t *pNfapiMsg = (nfapi_nr_config_request_scf_t *)msg;
|
||||
// unpack TLVs
|
||||
|
||||
@@ -1188,7 +1327,13 @@ uint8_t unpack_nr_config_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *
|
||||
&unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_CONFIG_TDD_PERIOD_TAG, &(pNfapiMsg->tdd_table.tdd_period), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_CONFIG_SLOT_CONFIG_TAG, NULL, &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_FAPI_NUM_BEAMS_PERIOD_VENDOR_EXTENSION_TAG, &(pNfapiMsg->analog_beamforming_ve.num_beams_period_vendor_ext), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_FAPI_ANALOG_BF_VENDOR_EXTENSION_TAG, &(pNfapiMsg->analog_beamforming_ve.analog_bf_vendor_ext), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_FAPI_TOTAL_NUM_BEAMS_VENDOR_EXTENSION_TAG, &(pNfapiMsg->analog_beamforming_ve.total_num_beams_vendor_ext), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_FAPI_ANALOG_BEAM_VENDOR_EXTENSION_TAG, NULL, &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_CONFIG_RSSI_MEASUREMENT_TAG, &(pNfapiMsg->measurement_config.rssi_measurement), &unpack_uint8_tlv_value},
|
||||
{NFAPI_NR_CONFIG_BEAMFORMING_TABLE_TAG, NULL, &unpack_dbt_table_tlv_value},
|
||||
{NFAPI_NR_CONFIG_PRECODING_TABLE_V6_TAG, NULL, &unpack_pm_table_tlv_value},
|
||||
{NFAPI_NR_NFAPI_P7_VNF_ADDRESS_IPV4_TAG, &(pNfapiMsg->nfapi_config.p7_vnf_address_ipv4), &unpack_ipv4_address_value},
|
||||
{NFAPI_NR_NFAPI_P7_VNF_ADDRESS_IPV6_TAG, &(pNfapiMsg->nfapi_config.p7_vnf_address_ipv6), &unpack_ipv6_address_value},
|
||||
{NFAPI_NR_NFAPI_P7_VNF_PORT_TAG, &(pNfapiMsg->nfapi_config.p7_vnf_port), &unpack_uint16_tlv_value},
|
||||
@@ -1221,6 +1366,29 @@ uint8_t unpack_nr_config_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *
|
||||
}
|
||||
int result = 0;
|
||||
switch (generic_tl.tag) {
|
||||
case NFAPI_NR_FAPI_TOTAL_NUM_BEAMS_VENDOR_EXTENSION_TAG:
|
||||
pNfapiMsg->analog_beamforming_ve.total_num_beams_vendor_ext.tl.tag = generic_tl.tag;
|
||||
pNfapiMsg->analog_beamforming_ve.total_num_beams_vendor_ext.tl.length = generic_tl.length;
|
||||
result = (*unpack_fns[idx].unpack_func)(&pNfapiMsg->analog_beamforming_ve.total_num_beams_vendor_ext, ppReadPackedMsg, end);
|
||||
pNfapiMsg->analog_beamforming_ve.analog_beam_list = (nfapi_uint8_tlv_t *)malloc(
|
||||
pNfapiMsg->analog_beamforming_ve.total_num_beams_vendor_ext.value * sizeof(nfapi_uint8_tlv_t));
|
||||
beam_ve_idx = 0;
|
||||
break;
|
||||
case NFAPI_NR_FAPI_ANALOG_BEAM_VENDOR_EXTENSION_TAG:
|
||||
unpack_fns[idx].tlv = &pNfapiMsg->analog_beamforming_ve.analog_beam_list[beam_ve_idx];
|
||||
pNfapiMsg->analog_beamforming_ve.analog_beam_list[beam_ve_idx].tl.tag = generic_tl.tag;
|
||||
pNfapiMsg->analog_beamforming_ve.analog_beam_list[beam_ve_idx].tl.length = generic_tl.length;
|
||||
result = (*unpack_fns[idx].unpack_func)(&pNfapiMsg->analog_beamforming_ve.analog_beam_list[beam_ve_idx], ppReadPackedMsg, end);
|
||||
beam_ve_idx ++;
|
||||
break;
|
||||
case NFAPI_NR_CONFIG_BEAMFORMING_TABLE_TAG:
|
||||
unpack_fns[idx].tlv = &generic_tl;
|
||||
result = (*unpack_fns[idx].unpack_func)(&pNfapiMsg->dbt_config, ppReadPackedMsg, end);
|
||||
break;
|
||||
case NFAPI_NR_CONFIG_PRECODING_TABLE_V6_TAG:
|
||||
unpack_fns[idx].tlv = &generic_tl;
|
||||
result = (*unpack_fns[idx].unpack_func)(&pNfapiMsg->pmi_list, ppReadPackedMsg, end);
|
||||
break;
|
||||
case NFAPI_NR_CONFIG_NUM_PRACH_FD_OCCASIONS_TAG:
|
||||
pNfapiMsg->prach_config.num_prach_fd_occasions.tl.tag = generic_tl.tag;
|
||||
pNfapiMsg->prach_config.num_prach_fd_occasions.tl.length = generic_tl.length;
|
||||
|
||||
@@ -259,6 +259,40 @@ bool eq_config_request(const nfapi_nr_config_request_scf_t *unpacked_req, const
|
||||
|
||||
EQ_TLV(unpacked_req->measurement_config.rssi_measurement, req->measurement_config.rssi_measurement);
|
||||
|
||||
EQ(unpacked_req->dbt_config.num_dig_beams, req->dbt_config.num_dig_beams);
|
||||
|
||||
EQ(unpacked_req->dbt_config.num_txrus, req->dbt_config.num_txrus);
|
||||
|
||||
for (int i = 0; i < req->dbt_config.num_dig_beams; i++) {
|
||||
const nfapi_nr_dig_beam_t *unpacked_dig_beam = &unpacked_req->dbt_config.dig_beam_list[i];
|
||||
const nfapi_nr_dig_beam_t *req_dig_beam = &req->dbt_config.dig_beam_list[i];
|
||||
EQ(unpacked_dig_beam->beam_idx, req_dig_beam->beam_idx);
|
||||
for (int k = 0; k < req->dbt_config.num_txrus; ++k) {
|
||||
const nfapi_nr_txru_t *unpacked_tx_ru = &unpacked_dig_beam->txru_list[k];
|
||||
const nfapi_nr_txru_t *req_tx_ru = &req_dig_beam->txru_list[k];
|
||||
EQ(unpacked_tx_ru->dig_beam_weight_Re, req_tx_ru->dig_beam_weight_Re);
|
||||
EQ(unpacked_tx_ru->dig_beam_weight_Im, req_tx_ru->dig_beam_weight_Im);
|
||||
}
|
||||
}
|
||||
|
||||
EQ(unpacked_req->pmi_list.num_pm_idx, req->pmi_list.num_pm_idx);
|
||||
|
||||
for (int i = 0; i < req->pmi_list.num_pm_idx; i++) {
|
||||
const nfapi_nr_pm_pdu_t *req_pmi_pdu = &req->pmi_list.pmi_pdu[i];
|
||||
const nfapi_nr_pm_pdu_t *unpacked_pmi_pdu = &unpacked_req->pmi_list.pmi_pdu[i];
|
||||
EQ(unpacked_pmi_pdu->pm_idx, req_pmi_pdu->pm_idx);
|
||||
EQ(unpacked_pmi_pdu->numLayers, req_pmi_pdu->numLayers);
|
||||
EQ(unpacked_pmi_pdu->num_ant_ports, req_pmi_pdu->num_ant_ports);
|
||||
for (int j = 0; j < req_pmi_pdu->num_ant_ports; ++j) {
|
||||
for (int k = 0; k < req_pmi_pdu->num_ant_ports; ++k) {
|
||||
const nfapi_nr_pm_weights_t* req_pm_weight = &req_pmi_pdu->weights[j][k];
|
||||
const nfapi_nr_pm_weights_t* unpacked_pm_weight = &unpacked_pmi_pdu->weights[j][k];
|
||||
EQ(unpacked_pm_weight->precoder_weight_Re, req_pm_weight->precoder_weight_Re);
|
||||
EQ(unpacked_pm_weight->precoder_weight_Im, req_pm_weight->precoder_weight_Im);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EQ(unpacked_req->nfapi_config.p7_vnf_address_ipv4.tl.tag, req->nfapi_config.p7_vnf_address_ipv4.tl.tag);
|
||||
for (int i = 0; i < NFAPI_IPV4_ADDRESS_LENGTH; ++i) {
|
||||
EQ(unpacked_req->nfapi_config.p7_vnf_address_ipv4.address[i], req->nfapi_config.p7_vnf_address_ipv4.address[i]);
|
||||
@@ -276,6 +310,17 @@ bool eq_config_request(const nfapi_nr_config_request_scf_t *unpacked_req, const
|
||||
EQ_TLV(unpacked_req->nfapi_config.timing_info_mode, req->nfapi_config.timing_info_mode);
|
||||
|
||||
EQ_TLV(unpacked_req->nfapi_config.timing_info_period, req->nfapi_config.timing_info_period);
|
||||
|
||||
EQ_TLV(unpacked_req->analog_beamforming_ve.num_beams_period_vendor_ext, req->analog_beamforming_ve.num_beams_period_vendor_ext);
|
||||
|
||||
EQ_TLV(unpacked_req->analog_beamforming_ve.analog_bf_vendor_ext, req->analog_beamforming_ve.analog_bf_vendor_ext);
|
||||
|
||||
EQ_TLV(unpacked_req->analog_beamforming_ve.total_num_beams_vendor_ext, req->analog_beamforming_ve.total_num_beams_vendor_ext);
|
||||
|
||||
for (int i = 0; i < unpacked_req->analog_beamforming_ve.total_num_beams_vendor_ext.value; ++i) {
|
||||
EQ_TLV(unpacked_req->analog_beamforming_ve.analog_beam_list[i], req->analog_beamforming_ve.analog_beam_list[i]);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -380,27 +425,20 @@ bool eq_error_indication(const nfapi_nr_error_indication_scf_t *unpacked_req, co
|
||||
|
||||
void free_param_request(nfapi_nr_param_request_scf_t *msg)
|
||||
{
|
||||
if (msg->vendor_extension) {
|
||||
free(msg->vendor_extension);
|
||||
}
|
||||
free(msg->vendor_extension);
|
||||
}
|
||||
|
||||
void free_param_response(nfapi_nr_param_response_scf_t *msg)
|
||||
{
|
||||
if (msg->vendor_extension) {
|
||||
free(msg->vendor_extension);
|
||||
}
|
||||
free(msg->vendor_extension);
|
||||
|
||||
free(msg->cell_param.config_tlvs_to_report_list);
|
||||
|
||||
if (msg->cell_param.config_tlvs_to_report_list) {
|
||||
free(msg->cell_param.config_tlvs_to_report_list);
|
||||
}
|
||||
}
|
||||
|
||||
void free_config_request(nfapi_nr_config_request_scf_t *msg)
|
||||
{
|
||||
if (msg->vendor_extension) {
|
||||
free(msg->vendor_extension);
|
||||
}
|
||||
free(msg->vendor_extension);
|
||||
|
||||
if (msg->prach_config.num_prach_fd_occasions_list) {
|
||||
for (int i = 0; i < msg->prach_config.num_prach_fd_occasions.value; i++) {
|
||||
@@ -419,67 +457,55 @@ void free_config_request(nfapi_nr_config_request_scf_t *msg)
|
||||
free(msg->tdd_table.max_tdd_periodicity_list);
|
||||
}
|
||||
|
||||
if (msg->pmi_list.pmi_pdu) {
|
||||
free(msg->pmi_list.pmi_pdu);
|
||||
for (int i = 0; i < msg->dbt_config.num_dig_beams; i++) {
|
||||
free(msg->dbt_config.dig_beam_list[i].txru_list);
|
||||
}
|
||||
|
||||
free(msg->dbt_config.dig_beam_list);
|
||||
|
||||
free(msg->pmi_list.pmi_pdu);
|
||||
|
||||
if (msg->analog_beamforming_ve.analog_beam_list) {
|
||||
free(msg->analog_beamforming_ve.analog_beam_list);
|
||||
}
|
||||
}
|
||||
|
||||
void free_config_response(nfapi_nr_config_response_scf_t *msg)
|
||||
{
|
||||
if (msg->vendor_extension) {
|
||||
free(msg->vendor_extension);
|
||||
}
|
||||
free(msg->vendor_extension);
|
||||
|
||||
if (msg->invalid_tlvs_list) {
|
||||
free(msg->invalid_tlvs_list);
|
||||
}
|
||||
free(msg->invalid_tlvs_list);
|
||||
|
||||
if (msg->invalid_tlvs_configured_in_idle_list) {
|
||||
free(msg->invalid_tlvs_configured_in_idle_list);
|
||||
}
|
||||
free(msg->invalid_tlvs_configured_in_idle_list);
|
||||
|
||||
if (msg->invalid_tlvs_configured_in_running_list) {
|
||||
free(msg->invalid_tlvs_configured_in_running_list);
|
||||
}
|
||||
free(msg->invalid_tlvs_configured_in_running_list);
|
||||
|
||||
if (msg->missing_tlvs_list) {
|
||||
free(msg->missing_tlvs_list);
|
||||
}
|
||||
free(msg->missing_tlvs_list);
|
||||
}
|
||||
|
||||
void free_start_request(nfapi_nr_start_request_scf_t *msg)
|
||||
{
|
||||
if (msg->vendor_extension) {
|
||||
free(msg->vendor_extension);
|
||||
}
|
||||
free(msg->vendor_extension);
|
||||
}
|
||||
|
||||
void free_start_response(nfapi_nr_start_response_scf_t *msg)
|
||||
{
|
||||
if (msg->vendor_extension) {
|
||||
free(msg->vendor_extension);
|
||||
}
|
||||
free(msg->vendor_extension);
|
||||
}
|
||||
|
||||
void free_stop_request(nfapi_nr_stop_request_scf_t *msg)
|
||||
{
|
||||
if (msg->vendor_extension) {
|
||||
free(msg->vendor_extension);
|
||||
}
|
||||
free(msg->vendor_extension);
|
||||
}
|
||||
|
||||
void free_stop_indication(nfapi_nr_stop_indication_scf_t *msg)
|
||||
{
|
||||
if (msg->vendor_extension) {
|
||||
free(msg->vendor_extension);
|
||||
}
|
||||
free(msg->vendor_extension);
|
||||
}
|
||||
|
||||
void free_error_indication(nfapi_nr_error_indication_scf_t *msg)
|
||||
{
|
||||
if (msg->vendor_extension) {
|
||||
free(msg->vendor_extension);
|
||||
}
|
||||
free(msg->vendor_extension);
|
||||
}
|
||||
|
||||
void copy_param_request(const nfapi_nr_param_request_scf_t *src, nfapi_nr_param_request_scf_t *dst)
|
||||
@@ -795,6 +821,42 @@ void copy_config_request(const nfapi_nr_config_request_scf_t *src, nfapi_nr_conf
|
||||
|
||||
COPY_TLV(dst->measurement_config.rssi_measurement, src->measurement_config.rssi_measurement);
|
||||
|
||||
dst->dbt_config.num_dig_beams = src->dbt_config.num_dig_beams;
|
||||
dst->dbt_config.num_txrus = src->dbt_config.num_txrus;
|
||||
dst->dbt_config.dig_beam_list = calloc(dst->dbt_config.num_dig_beams, sizeof(*dst->dbt_config.dig_beam_list));
|
||||
for (int i = 0; i < dst->dbt_config.num_dig_beams; i++) {
|
||||
nfapi_nr_dig_beam_t *dst_dig_beam = &dst->dbt_config.dig_beam_list[i];
|
||||
const nfapi_nr_dig_beam_t *src_dig_beam = &src->dbt_config.dig_beam_list[i];
|
||||
dst_dig_beam->beam_idx = src_dig_beam->beam_idx;
|
||||
dst_dig_beam->txru_list = calloc(dst->dbt_config.num_txrus , sizeof(*dst_dig_beam->txru_list ));
|
||||
for (int k = 0; k < dst->dbt_config.num_txrus; ++k) {
|
||||
nfapi_nr_txru_t *dst_tx_ru = &dst_dig_beam->txru_list[k];
|
||||
const nfapi_nr_txru_t *src_tx_ru = &src_dig_beam->txru_list[k];
|
||||
dst_tx_ru->dig_beam_weight_Re = src_tx_ru->dig_beam_weight_Re;
|
||||
dst_tx_ru->dig_beam_weight_Im = src_tx_ru->dig_beam_weight_Im;
|
||||
}
|
||||
}
|
||||
|
||||
dst->pmi_list.num_pm_idx = src->pmi_list.num_pm_idx;
|
||||
if (dst->pmi_list.num_pm_idx > 0) {
|
||||
dst->pmi_list.pmi_pdu = calloc(dst->pmi_list.num_pm_idx , sizeof(*dst->pmi_list.pmi_pdu));
|
||||
for (int i = 0; i < dst->pmi_list.num_pm_idx; i++) {
|
||||
nfapi_nr_pm_pdu_t * dst_pmi_pdu = &dst->pmi_list.pmi_pdu[i];
|
||||
const nfapi_nr_pm_pdu_t * src_pmi_pdu = &src->pmi_list.pmi_pdu[i];
|
||||
dst_pmi_pdu->pm_idx = src_pmi_pdu->pm_idx;
|
||||
dst_pmi_pdu->numLayers = src_pmi_pdu->numLayers;
|
||||
dst_pmi_pdu->num_ant_ports = src_pmi_pdu->num_ant_ports;
|
||||
for (int j = 0; j < dst_pmi_pdu->numLayers; ++j) {
|
||||
for (int k = 0; k < dst_pmi_pdu->num_ant_ports; ++k) {
|
||||
nfapi_nr_pm_weights_t* dst_pm_weight = &dst_pmi_pdu->weights[j][k];
|
||||
const nfapi_nr_pm_weights_t* src_pm_weight = &src_pmi_pdu->weights[j][k];
|
||||
dst_pm_weight->precoder_weight_Re = src_pm_weight->precoder_weight_Re;
|
||||
dst_pm_weight->precoder_weight_Im = src_pm_weight->precoder_weight_Im;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
COPY_TL(dst->nfapi_config.p7_vnf_address_ipv4.tl, src->nfapi_config.p7_vnf_address_ipv4.tl);
|
||||
memcpy(dst->nfapi_config.p7_vnf_address_ipv4.address,
|
||||
src->nfapi_config.p7_vnf_address_ipv4.address,
|
||||
@@ -832,6 +894,21 @@ void copy_config_request(const nfapi_nr_config_request_scf_t *src, nfapi_nr_conf
|
||||
COPY_TLV(dst->nfapi_config.ul_dci_timing_offset, src->nfapi_config.ul_dci_timing_offset);
|
||||
|
||||
COPY_TLV(dst->nfapi_config.tx_data_timing_offset, src->nfapi_config.tx_data_timing_offset);
|
||||
|
||||
COPY_TLV(dst->analog_beamforming_ve.num_beams_period_vendor_ext, src->analog_beamforming_ve.num_beams_period_vendor_ext);
|
||||
|
||||
COPY_TLV(dst->analog_beamforming_ve.analog_bf_vendor_ext, src->analog_beamforming_ve.analog_bf_vendor_ext);
|
||||
|
||||
COPY_TLV(dst->analog_beamforming_ve.total_num_beams_vendor_ext, src->analog_beamforming_ve.total_num_beams_vendor_ext);
|
||||
|
||||
if (dst->analog_beamforming_ve.total_num_beams_vendor_ext.value > 0) {
|
||||
dst->analog_beamforming_ve.analog_beam_list = (nfapi_uint8_tlv_t *)malloc(
|
||||
dst->analog_beamforming_ve.total_num_beams_vendor_ext.value * sizeof(nfapi_uint8_tlv_t));
|
||||
for (int i = 0; i < src->analog_beamforming_ve.total_num_beams_vendor_ext.value; ++i) {
|
||||
COPY_TLV(dst->analog_beamforming_ve.analog_beam_list[i], src->analog_beamforming_ve.analog_beam_list[i]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void copy_config_response(const nfapi_nr_config_response_scf_t *src, nfapi_nr_config_response_scf_t *dst)
|
||||
@@ -956,22 +1033,382 @@ void dump_param_request(const nfapi_nr_param_request_scf_t *msg)
|
||||
void dump_param_response(const nfapi_nr_param_response_scf_t *msg)
|
||||
{
|
||||
int depth = 0;
|
||||
dump_p5_message_header(&msg->header,depth);
|
||||
dump_p5_message_header(&msg->header, depth);
|
||||
depth++;
|
||||
INDENTED_PRINTF("Error Code = 0x%02x\n", msg->error_code);
|
||||
INDENTED_PRINTF("Number of TLVs = 0x%02x\n", msg->num_tlv);
|
||||
/* dump all TLVs from each table */
|
||||
/* Cell Param */
|
||||
const nfapi_nr_cell_param_t *cell_param = &msg->cell_param;
|
||||
depth++;
|
||||
INDENTED_TLV_PRINT("Release Capability", cell_param->release_capability);
|
||||
INDENTED_TLV_PRINT("PHY State", cell_param->phy_state);
|
||||
INDENTED_TLV_PRINT("Skip Blank Dl Config", cell_param->skip_blank_dl_config);
|
||||
INDENTED_TLV_PRINT("Skip Blank UL Config", cell_param->skip_blank_ul_config);
|
||||
INDENTED_TLV_PRINT("NumConfigTLVsToReport", cell_param->num_config_tlvs_to_report);
|
||||
depth++;
|
||||
for (int i = 0; i < cell_param->num_config_tlvs_to_report.value; i++) {
|
||||
const nfapi_uint8_tlv_t *reportedTLV = &cell_param->config_tlvs_to_report_list[i];
|
||||
INDENTED_PRINTF("(0x%04x) Reported CONFIG TLV #%d = 0x%02x\n", reportedTLV->tl.tag, i + 1, reportedTLV->value);
|
||||
}
|
||||
depth--;
|
||||
/* Carrier Param */
|
||||
const nfapi_nr_carrier_param_t *carrier_param = &msg->carrier_param;
|
||||
INDENTED_TLV_PRINT("Cyclic Prefix", carrier_param->cyclic_prefix);
|
||||
INDENTED_TLV_PRINT("Supported SCS DL", carrier_param->supported_subcarrier_spacings_dl);
|
||||
INDENTED_TLV_PRINT("Supported BW DL", carrier_param->supported_bandwidth_dl);
|
||||
INDENTED_TLV_PRINT("Supported SCS UL", carrier_param->supported_subcarrier_spacings_ul);
|
||||
INDENTED_TLV_PRINT("Supported BW UL", carrier_param->supported_bandwidth_ul);
|
||||
/* PDCCH Param */
|
||||
const nfapi_nr_pdcch_param_t *pdcch_param = &msg->pdcch_param;
|
||||
INDENTED_TLV_PRINT("CCE Mapping Type", pdcch_param->cce_mapping_type);
|
||||
INDENTED_TLV_PRINT("CSet Outside First 3 OFDM Symbols of Slot", pdcch_param->coreset_outside_first_3_of_ofdm_syms_of_slot);
|
||||
INDENTED_TLV_PRINT("Precoder Granularity Coreset", pdcch_param->coreset_precoder_granularity_coreset);
|
||||
INDENTED_TLV_PRINT("PDCCH Mu MIMO", pdcch_param->pdcch_mu_mimo);
|
||||
INDENTED_TLV_PRINT("PDCCH Precoder Cycling", pdcch_param->pdcch_precoder_cycling);
|
||||
INDENTED_TLV_PRINT("Max PDCCH per Slot", pdcch_param->max_pdcch_per_slot);
|
||||
/* PUCHH Params */
|
||||
const nfapi_nr_pucch_param_t *pucch_param = &msg->pucch_param;
|
||||
INDENTED_TLV_PRINT("PUCCH Formats", pucch_param->pucch_formats);
|
||||
INDENTED_TLV_PRINT("Max PUCCH per Slot", pucch_param->max_pucchs_per_slot);
|
||||
/* PDSCH Params */
|
||||
const nfapi_nr_pdsch_param_t *pdsch_param = &msg->pdsch_param;
|
||||
INDENTED_TLV_PRINT("PDSCH Mapping Type", pdsch_param->pdsch_mapping_type);
|
||||
INDENTED_TLV_PRINT("PDSCH Allocation Types", pdsch_param->pdsch_allocation_types);
|
||||
INDENTED_TLV_PRINT("PDSCH VRB to PRB Mapping", pdsch_param->pdsch_vrb_to_prb_mapping);
|
||||
INDENTED_TLV_PRINT("PDSCH CBG", pdsch_param->pdsch_cbg);
|
||||
INDENTED_TLV_PRINT("PDSCH DMRS Config Types", pdsch_param->pdsch_dmrs_config_types);
|
||||
INDENTED_TLV_PRINT("PDSCH DMRS Max Length", pdsch_param->pdsch_dmrs_max_length);
|
||||
INDENTED_TLV_PRINT("PDSCH DMRS Additional Position", pdsch_param->pdsch_dmrs_additional_pos);
|
||||
INDENTED_TLV_PRINT("Max PDSCH TBs per Slot", pdsch_param->max_pdsch_tbs_per_slot);
|
||||
INDENTED_TLV_PRINT("Max number MIMO Layers PDSCH", pdsch_param->max_number_mimo_layers_pdsch);
|
||||
INDENTED_TLV_PRINT("Supported Max Modulation Order DL", pdsch_param->supported_max_modulation_order_dl);
|
||||
INDENTED_TLV_PRINT("Max Mu MIMO Users DL", pdsch_param->max_mu_mimo_users_dl);
|
||||
INDENTED_TLV_PRINT("PDSCH Data in DMRS Symbols", pdsch_param->pdsch_data_in_dmrs_symbols);
|
||||
INDENTED_TLV_PRINT("Preemption Support", pdsch_param->premption_support);
|
||||
INDENTED_TLV_PRINT("PDSCH Non Slot Support", pdsch_param->pdsch_non_slot_support);
|
||||
/* PUSCH Params */
|
||||
const nfapi_nr_pusch_param_t *pusch_param = &msg->pusch_param;
|
||||
INDENTED_TLV_PRINT("UCI Mux ULSCH in PUSCH", pusch_param->uci_mux_ulsch_in_pusch);
|
||||
INDENTED_TLV_PRINT("UCI Only PUSCH", pusch_param->uci_only_pusch);
|
||||
INDENTED_TLV_PRINT("PUSCH Frequency Hopping", pusch_param->pusch_frequency_hopping);
|
||||
INDENTED_TLV_PRINT("PUSCH DMRS Config Types", pusch_param->pusch_dmrs_config_types);
|
||||
INDENTED_TLV_PRINT("PUSCH DMRS Max Len", pusch_param->pusch_dmrs_max_len);
|
||||
INDENTED_TLV_PRINT("PUSCH DMRS Additional Pos", pusch_param->pusch_dmrs_additional_pos);
|
||||
INDENTED_TLV_PRINT("PUSCH CBG", pusch_param->pusch_cbg);
|
||||
INDENTED_TLV_PRINT("PUSCH Mapping Type", pusch_param->pusch_mapping_type);
|
||||
INDENTED_TLV_PRINT("PUSCH Allocation Types", pusch_param->pusch_allocation_types);
|
||||
INDENTED_TLV_PRINT("PUSCH VRB to PRB Mapping", pusch_param->pusch_vrb_to_prb_mapping);
|
||||
INDENTED_TLV_PRINT("PUSCH Max PTRS Ports", pusch_param->pusch_max_ptrs_ports);
|
||||
INDENTED_TLV_PRINT("Max PUSCH TBs per Slot", pusch_param->max_pduschs_tbs_per_slot);
|
||||
INDENTED_TLV_PRINT("Max Number MIMO Layers non CB PUSCH", pusch_param->max_number_mimo_layers_non_cb_pusch);
|
||||
INDENTED_TLV_PRINT("Supported Modulation Order UL", pusch_param->supported_modulation_order_ul);
|
||||
INDENTED_TLV_PRINT("Max MU MIMO Users UL", pusch_param->max_mu_mimo_users_ul);
|
||||
INDENTED_TLV_PRINT("DTFS OFDM Support", pusch_param->dfts_ofdm_support);
|
||||
INDENTED_TLV_PRINT("PUSCH Aggregation Factor", pusch_param->pusch_aggregation_factor);
|
||||
/* PRACH Params */
|
||||
const nfapi_nr_prach_param_t *prach_param = &msg->prach_param;
|
||||
INDENTED_TLV_PRINT("PRACH Long Formats", prach_param->prach_long_formats);
|
||||
INDENTED_TLV_PRINT("PRACH Short Formats", prach_param->prach_short_formats);
|
||||
INDENTED_TLV_PRINT("PRACH Restricted Sets", prach_param->prach_restricted_sets);
|
||||
INDENTED_TLV_PRINT("Max PRACH Occasions in a Slot", prach_param->max_prach_fd_occasions_in_a_slot);
|
||||
/* Measurement Params */
|
||||
const nfapi_nr_measurement_param_t *measurement_param = &msg->measurement_param;
|
||||
INDENTED_TLV_PRINT("RSSI Measurement Support", measurement_param->rssi_measurement_support);
|
||||
/* nFAPI Config */
|
||||
const nfapi_nr_nfapi_t *nfapi_config = &msg->nfapi_config;
|
||||
if (nfapi_config->p7_vnf_address_ipv4.tl.tag) {
|
||||
char ip_str[INET_ADDRSTRLEN];
|
||||
INDENTED_GENERIC_PRINT("(0x%04x) P7 VNF Address IPv4",
|
||||
"%s",
|
||||
nfapi_config->p7_vnf_address_ipv4.tl.tag,
|
||||
inet_ntop(AF_INET, nfapi_config->p7_vnf_address_ipv4.address, ip_str, sizeof(ip_str)));
|
||||
}
|
||||
if (nfapi_config->p7_vnf_address_ipv6.tl.tag) {
|
||||
char addr6[INET6_ADDRSTRLEN];
|
||||
INDENTED_GENERIC_PRINT("(0x%04x) P7 VNF Address IPv6",
|
||||
"%s",
|
||||
nfapi_config->p7_vnf_address_ipv6.tl.tag,
|
||||
inet_ntop(AF_INET6, nfapi_config->p7_vnf_address_ipv6.address, addr6, sizeof(addr6)));
|
||||
}
|
||||
INDENTED_TLV_FORMAT_PRINT("P7 VNF Port", "%d", nfapi_config->p7_vnf_port);
|
||||
|
||||
if (nfapi_config->p7_pnf_address_ipv4.tl.tag) {
|
||||
char ip_str[INET_ADDRSTRLEN];
|
||||
INDENTED_GENERIC_PRINT("(0x%04x) P7 PNF Address IPv4",
|
||||
"%s",
|
||||
nfapi_config->p7_pnf_address_ipv4.tl.tag,
|
||||
inet_ntop(AF_INET, nfapi_config->p7_pnf_address_ipv4.address, ip_str, sizeof(ip_str)));
|
||||
}
|
||||
if (nfapi_config->p7_pnf_address_ipv6.tl.tag) {
|
||||
char addr6[INET6_ADDRSTRLEN];
|
||||
INDENTED_GENERIC_PRINT("(0x%04x) P7 PNF Address IPv6",
|
||||
"%s",
|
||||
nfapi_config->p7_pnf_address_ipv6.tl.tag,
|
||||
inet_ntop(AF_INET6, nfapi_config->p7_pnf_address_ipv6.address, addr6, sizeof(addr6)));
|
||||
}
|
||||
INDENTED_TLV_FORMAT_PRINT("P7 PNF Port", "%d", nfapi_config->p7_pnf_port);
|
||||
INDENTED_TLV_FORMAT_PRINT("Timing Window", "%d", nfapi_config->timing_window);
|
||||
INDENTED_TLV_FORMAT_PRINT("Timing Info Mode", "%d", nfapi_config->timing_info_mode);
|
||||
INDENTED_TLV_FORMAT_PRINT("Timing Info Period", "%d", nfapi_config->timing_info_period);
|
||||
INDENTED_TLV_FORMAT_PRINT("DL_TTI Timing Offset", "%d", nfapi_config->dl_tti_timing_offset);
|
||||
INDENTED_TLV_FORMAT_PRINT("UL_TTI Timing Offset", "%d", nfapi_config->ul_tti_timing_offset);
|
||||
INDENTED_TLV_FORMAT_PRINT("UL_DCI Timing Offset", "%d", nfapi_config->ul_dci_timing_offset);
|
||||
INDENTED_TLV_FORMAT_PRINT("TX_DATA Timing Offset", "%d", nfapi_config->tx_data_timing_offset);
|
||||
depth--;
|
||||
}
|
||||
|
||||
void dump_config_request(const nfapi_nr_config_request_scf_t *msg)
|
||||
{
|
||||
int depth = 0;
|
||||
dump_p5_message_header(&msg->header,depth);
|
||||
dump_p5_message_header(&msg->header, depth);
|
||||
depth++;
|
||||
INDENTED_PRINTF("Number of TLVs = 0x%02x\n", msg->num_tlv);
|
||||
/* dump all TLVs from each table */
|
||||
/* Carrier Config */
|
||||
const nfapi_nr_carrier_config_t *carrier_config = &msg->carrier_config;
|
||||
INDENTED_TLV_PRINT("DL Bandwidth", carrier_config->dl_bandwidth);
|
||||
INDENTED_TLV_PRINT("DL Frequency", carrier_config->dl_frequency);
|
||||
INDENTED_PRINTF("(0x%04x) DL K0 = ", NFAPI_NR_CONFIG_DL_K0_TAG);
|
||||
for (int i = 0; i < 5; i++) {
|
||||
printf("%d ", carrier_config->dl_k0[i].value);
|
||||
}
|
||||
printf("\n");
|
||||
INDENTED_PRINTF("(0x%04x) DL Grid Size = ", NFAPI_NR_CONFIG_DL_GRID_SIZE_TAG);
|
||||
for (int i = 0; i < 5; i++) {
|
||||
printf("%d ", carrier_config->dl_grid_size[i].value);
|
||||
}
|
||||
printf("\n");
|
||||
INDENTED_TLV_PRINT("Num TX Antennas", carrier_config->num_tx_ant);
|
||||
INDENTED_TLV_PRINT("UL Bandwidth", carrier_config->uplink_bandwidth);
|
||||
INDENTED_TLV_PRINT("UL Frequency", carrier_config->uplink_frequency);
|
||||
INDENTED_PRINTF("(0x%04x) UL K0 = ", NFAPI_NR_CONFIG_UL_K0_TAG);
|
||||
for (int i = 0; i < 5; i++) {
|
||||
printf("%d ", carrier_config->ul_k0[i].value);
|
||||
}
|
||||
printf("\n");
|
||||
INDENTED_PRINTF("(0x%04x) UL Grid Size = ", NFAPI_NR_CONFIG_UL_GRID_SIZE_TAG);
|
||||
for (int i = 0; i < 5; i++) {
|
||||
printf("%d ", carrier_config->ul_grid_size[i].value);
|
||||
}
|
||||
printf("\n");
|
||||
INDENTED_TLV_PRINT("Num RX Antennas", carrier_config->num_rx_ant);
|
||||
INDENTED_TLV_PRINT("Frequency Shift 7p5KHz", carrier_config->frequency_shift_7p5khz);
|
||||
/* Cell Config */
|
||||
const nfapi_nr_cell_config_t *cell_config = &msg->cell_config;
|
||||
INDENTED_TLV_PRINT("Physical Cell ID", cell_config->phy_cell_id);
|
||||
INDENTED_TLV_PRINT("Frame Duplex Type", cell_config->frame_duplex_type);
|
||||
/* SSB Config */
|
||||
const nfapi_nr_ssb_config_t *ssb_config = &msg->ssb_config;
|
||||
INDENTED_TLV_PRINT("SSB Block Power", ssb_config->ss_pbch_power);
|
||||
INDENTED_TLV_PRINT("BCH Payload", ssb_config->bch_payload);
|
||||
INDENTED_TLV_PRINT("SCS Common", ssb_config->scs_common);
|
||||
/* PRACH Config */
|
||||
const nfapi_nr_prach_config_t *prach_config = &msg->prach_config;
|
||||
INDENTED_TLV_PRINT("PRACH Sequence Length", prach_config->prach_sequence_length);
|
||||
INDENTED_TLV_PRINT("PRACH Subcarrier Spacing", prach_config->prach_sub_c_spacing);
|
||||
INDENTED_TLV_PRINT("Restricted Set Config", prach_config->restricted_set_config);
|
||||
INDENTED_TLV_PRINT("Num PRACH FD Occasions", prach_config->num_prach_fd_occasions);
|
||||
INDENTED_TLV_PRINT("PRACH Config Index", prach_config->prach_ConfigurationIndex);
|
||||
depth++;
|
||||
for (int i = 0; i < prach_config->num_prach_fd_occasions.value; i++) {
|
||||
const nfapi_nr_num_prach_fd_occasions_t *prach_fd_occasion = &(prach_config->num_prach_fd_occasions_list[i]);
|
||||
INDENTED_TLV_PRINT("PRACH Root Sequence Index", prach_fd_occasion->prach_root_sequence_index);
|
||||
INDENTED_TLV_PRINT("Num Root Sequences", prach_fd_occasion->num_root_sequences);
|
||||
INDENTED_TLV_PRINT("K1", prach_fd_occasion->k1);
|
||||
INDENTED_TLV_PRINT("PRACH Zero CorrelationZone Config", prach_fd_occasion->prach_zero_corr_conf);
|
||||
INDENTED_TLV_PRINT("Num Unused Root Sequences", prach_fd_occasion->num_unused_root_sequences);
|
||||
depth++;
|
||||
for (int k = 0; k < prach_fd_occasion->num_unused_root_sequences.value; k++) {
|
||||
INDENTED_TLV_PRINT("Unused Root Sequence", prach_fd_occasion->unused_root_sequences_list[k]);
|
||||
}
|
||||
depth--;
|
||||
}
|
||||
depth--;
|
||||
INDENTED_TLV_PRINT("SSB Per RACH", prach_config->ssb_per_rach);
|
||||
INDENTED_TLV_PRINT("PRACH Multiple Carriers in a Band", prach_config->prach_multiple_carriers_in_a_band);
|
||||
/* SSB Table */
|
||||
const nfapi_nr_ssb_table_t *ssb_table = &msg->ssb_table;
|
||||
INDENTED_TLV_PRINT("SSB Offset PointA", ssb_table->ssb_offset_point_a);
|
||||
INDENTED_TLV_PRINT("Beta PSS", ssb_table->beta_pss);
|
||||
INDENTED_TLV_PRINT("SSB Period", ssb_table->ssb_period);
|
||||
INDENTED_TLV_PRINT("SSB Subcarrier Offset", ssb_table->ssb_subcarrier_offset);
|
||||
INDENTED_TLV_PRINT("MIB", ssb_table->MIB);
|
||||
|
||||
INDENTED_PRINTF("SSB Mask:\n");
|
||||
depth++;
|
||||
for (int i = 0; i < 2; i++) {
|
||||
INDENTED_TLV_PRINT("SSB Mask", ssb_table->ssb_mask_list[i].ssb_mask);
|
||||
}
|
||||
depth--;
|
||||
INDENTED_PRINTF("Beam ID:\n");
|
||||
depth++;
|
||||
for (int i = 0; i < 64; i++) {
|
||||
INDENTED_TLV_PRINT("Beam ID", ssb_table->ssb_beam_id_list[i].beam_id);
|
||||
}
|
||||
depth--;
|
||||
INDENTED_TLV_PRINT("ssPBCH Multiple Carriers in a Band", ssb_table->ss_pbch_multiple_carriers_in_a_band);
|
||||
INDENTED_TLV_PRINT("Multiple Cells ssPBCH in a Carrier", ssb_table->multiple_cells_ss_pbch_in_a_carrier);
|
||||
/* TDD Table */
|
||||
const nfapi_nr_tdd_table_t *tdd_table = &msg->tdd_table;
|
||||
if (cell_config->frame_duplex_type.value == 1 /* TDD */) {
|
||||
INDENTED_TLV_PRINT("TDD Period", tdd_table->tdd_period);
|
||||
const uint8_t slotsperframe[5] = {10, 20, 40, 80, 160};
|
||||
// Assuming always CP_Normal, because Cyclic prefix is not included in CONFIG.request 10.02, but is present in 10.04
|
||||
uint8_t cyclicprefix = 1;
|
||||
// 3GPP 38.211 Table 4.3.2.1 & Table 4.3.2.2
|
||||
uint8_t number_of_symbols_per_slot = cyclicprefix ? 14 : 12;
|
||||
INDENTED_PRINTF("Slot Config:\n");
|
||||
depth++;
|
||||
for (int i = 0; i < slotsperframe[ssb_config->scs_common.value]; i++) {
|
||||
for (int k = 0; k < number_of_symbols_per_slot; k++) {
|
||||
const uint8_t slot_type = tdd_table->max_tdd_periodicity_list[i].max_num_of_symbol_per_slot_list[k].slot_config.value;
|
||||
const char *slot_dir = slot_type == 0 ? "DL" : slot_type == 1 ? "UL" : "S";
|
||||
INDENTED_GENERIC_PRINT("(0x%04x) Slot Config",
|
||||
"%d (%s)",
|
||||
tdd_table->max_tdd_periodicity_list[i].max_num_of_symbol_per_slot_list[k].slot_config.tl.tag,
|
||||
slot_type,
|
||||
slot_dir);
|
||||
}
|
||||
}
|
||||
depth--;
|
||||
}
|
||||
/* Measurement Config */
|
||||
const nfapi_nr_measurement_config_t *measurement_config = &msg->measurement_config;
|
||||
INDENTED_TLV_PRINT("RSSI Measurement", measurement_config->rssi_measurement);
|
||||
/* Beamforming Table */
|
||||
const nfapi_nr_dbt_pdu_t *dbt_config = &msg->dbt_config;
|
||||
INDENTED_PRINTF("Digital Beam Table\n");
|
||||
depth++;
|
||||
INDENTED_GENERIC_PRINT("Num Digital Beams", "%d", dbt_config->num_dig_beams);
|
||||
INDENTED_GENERIC_PRINT("Num TX RUs", "%d", dbt_config->num_txrus);
|
||||
depth++;
|
||||
for (int i = 0; i < dbt_config->num_dig_beams; i++) {
|
||||
const nfapi_nr_dig_beam_t *dig_beam = &dbt_config->dig_beam_list[i];
|
||||
INDENTED_GENERIC_PRINT("Beam IDX", "%d", dig_beam->beam_idx);
|
||||
depth++;
|
||||
for (int k = 0; k < dbt_config->num_txrus; k++) {
|
||||
const nfapi_nr_txru_t *tx_ru = &dig_beam->txru_list[k];
|
||||
INDENTED_GENERIC_PRINT("Dig Beam Weight Real", "0x%02x", tx_ru->dig_beam_weight_Re);
|
||||
INDENTED_GENERIC_PRINT("Dig Beam Weight Imaginary", "0x%02x", tx_ru->dig_beam_weight_Im);
|
||||
}
|
||||
depth--;
|
||||
}
|
||||
depth--;
|
||||
depth--;
|
||||
|
||||
/* Precoding Table */
|
||||
const nfapi_nr_pm_list_t *pmi_list = &msg->pmi_list;
|
||||
INDENTED_PRINTF("Precoding Matrix Table\n");
|
||||
depth++;
|
||||
INDENTED_GENERIC_PRINT("Num Precoding Tables", "%d", pmi_list->num_pm_idx);
|
||||
depth++;
|
||||
for (int i = 0; i < pmi_list->num_pm_idx; i++) {
|
||||
const nfapi_nr_pm_pdu_t *pm_pdu = &pmi_list->pmi_pdu[i];
|
||||
|
||||
INDENTED_GENERIC_PRINT("Precoding Matrix IDX", "0x%02x", pm_pdu->pm_idx);
|
||||
INDENTED_GENERIC_PRINT("Number of Layers", "%d", pm_pdu->numLayers);
|
||||
INDENTED_GENERIC_PRINT("Number of Antenna Ports", "%d", pm_pdu->num_ant_ports);
|
||||
depth++;
|
||||
for (int k = 0; k < pm_pdu->numLayers; k++) {
|
||||
for (int l = 0; l < pm_pdu->num_ant_ports; l++) {
|
||||
const nfapi_nr_pm_weights_t *pm_weights = &pm_pdu->weights[k][l];
|
||||
INDENTED_GENERIC_PRINT("Dig Beam Weight Real", "0x%02x", pm_weights->precoder_weight_Re);
|
||||
INDENTED_GENERIC_PRINT("Dig Beam Weight Imaginary", "0x%02x", pm_weights->precoder_weight_Im);
|
||||
}
|
||||
}
|
||||
depth--;
|
||||
}
|
||||
depth--;
|
||||
depth--;
|
||||
/* nFAPI Config */
|
||||
const nfapi_nr_nfapi_t *nfapi_config = &msg->nfapi_config;
|
||||
if (nfapi_config->p7_vnf_address_ipv4.tl.tag) {
|
||||
char ip_str[INET_ADDRSTRLEN];
|
||||
INDENTED_GENERIC_PRINT("(0x%04x) P7 VNF Address IPv4",
|
||||
"%s",
|
||||
nfapi_config->p7_vnf_address_ipv4.tl.tag,
|
||||
inet_ntop(AF_INET, nfapi_config->p7_vnf_address_ipv4.address, ip_str, sizeof(ip_str)));
|
||||
}
|
||||
if (nfapi_config->p7_vnf_address_ipv6.tl.tag) {
|
||||
char addr6[INET6_ADDRSTRLEN];
|
||||
INDENTED_GENERIC_PRINT("(0x%04x) P7 VNF Address IPv6",
|
||||
"%s",
|
||||
nfapi_config->p7_vnf_address_ipv6.tl.tag,
|
||||
inet_ntop(AF_INET6, nfapi_config->p7_vnf_address_ipv6.address, addr6, sizeof(addr6)));
|
||||
}
|
||||
INDENTED_TLV_FORMAT_PRINT("P7 VNF Port", "%d", nfapi_config->p7_vnf_port);
|
||||
|
||||
if (nfapi_config->p7_pnf_address_ipv4.tl.tag) {
|
||||
char ip_str[INET_ADDRSTRLEN];
|
||||
INDENTED_GENERIC_PRINT("(0x%04x) P7 PNF Address IPv4",
|
||||
"%s",
|
||||
nfapi_config->p7_pnf_address_ipv4.tl.tag,
|
||||
inet_ntop(AF_INET, nfapi_config->p7_pnf_address_ipv4.address, ip_str, sizeof(ip_str)));
|
||||
}
|
||||
if (nfapi_config->p7_pnf_address_ipv6.tl.tag) {
|
||||
char addr6[INET6_ADDRSTRLEN];
|
||||
INDENTED_GENERIC_PRINT("(0x%04x) P7 PNF Address IPv6",
|
||||
"%s",
|
||||
nfapi_config->p7_pnf_address_ipv6.tl.tag,
|
||||
inet_ntop(AF_INET6, nfapi_config->p7_pnf_address_ipv6.address, addr6, sizeof(addr6)));
|
||||
}
|
||||
INDENTED_TLV_FORMAT_PRINT("P7 PNF Port", "%d", nfapi_config->p7_pnf_port);
|
||||
INDENTED_TLV_FORMAT_PRINT("Timing Window", "%d", nfapi_config->timing_window);
|
||||
INDENTED_TLV_FORMAT_PRINT("Timing Info Mode", "%d", nfapi_config->timing_info_mode);
|
||||
INDENTED_TLV_FORMAT_PRINT("Timing Info Period", "%d", nfapi_config->timing_info_period);
|
||||
INDENTED_TLV_FORMAT_PRINT("DL_TTI Timing Offset", "%d", nfapi_config->dl_tti_timing_offset);
|
||||
INDENTED_TLV_FORMAT_PRINT("UL_TTI Timing Offset", "%d", nfapi_config->ul_tti_timing_offset);
|
||||
INDENTED_TLV_FORMAT_PRINT("UL_DCI Timing Offset", "%d", nfapi_config->ul_dci_timing_offset);
|
||||
INDENTED_TLV_FORMAT_PRINT("TX_DATA Timing Offset", "%d", nfapi_config->tx_data_timing_offset);
|
||||
/* Beamforming VE */
|
||||
const nfapi_nr_analog_beamforming_ve_t *analog_beamforming_ve = &msg->analog_beamforming_ve;
|
||||
INDENTED_TLV_FORMAT_PRINT("Num Beams per Period", "%d", analog_beamforming_ve->num_beams_period_vendor_ext);
|
||||
INDENTED_TLV_PRINT("Analog Beamforming VE", analog_beamforming_ve->analog_bf_vendor_ext);
|
||||
/* Vendor Extension */
|
||||
if (msg->vendor_extension) {
|
||||
const nfapi_tl_t *vendor_extension = (nfapi_tl_t *)&msg->vendor_extension;
|
||||
switch (vendor_extension->tag) {
|
||||
case VENDOR_EXT_TLV_1_TAG: {
|
||||
vendor_ext_tlv_1 *ve = (vendor_ext_tlv_1 *)vendor_extension;
|
||||
INDENTED_PRINTF("(0x%04x) Vendor extension = %d 0x%02x\n", ve->tl.tag, ve->tl.length, ve->dummy);
|
||||
} break;
|
||||
case VENDOR_EXT_TLV_2_TAG: {
|
||||
vendor_ext_tlv_2 *ve = (vendor_ext_tlv_2 *)vendor_extension;
|
||||
INDENTED_PRINTF("(0x%04x) Vendor extension = %d 0x%02x\n", ve->tl.tag, ve->tl.length, ve->dummy);
|
||||
} break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
depth--;
|
||||
}
|
||||
|
||||
static void dump_generic_tlv(const nfapi_nr_generic_tlv_scf_t* tlv, int depth)
|
||||
{
|
||||
INDENTED_PRINTF("TLV tag 0x%02x , Length 0x%02x , Value ", tlv->tl.tag, tlv->tl.length);
|
||||
switch (tlv->tl.length) {
|
||||
case UINT_8:
|
||||
printf("0x%x\n", tlv->value.u8);
|
||||
break;
|
||||
case UINT_16:
|
||||
printf("0x%02x\n", tlv->value.u16);
|
||||
break;
|
||||
case UINT_32:
|
||||
printf("0x%04x\n", tlv->value.u32);
|
||||
break;
|
||||
case ARRAY_UINT_16:
|
||||
for (int i = 0; i< 5 ; i++) {
|
||||
printf("0x%04x ", tlv->value.array_u16[i]);
|
||||
}
|
||||
printf("\n");
|
||||
break;
|
||||
default:
|
||||
printf("unknown length %d\n", tlv->tl.length);
|
||||
DevAssert(1 == 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void dump_config_response(const nfapi_nr_config_response_scf_t *msg)
|
||||
@@ -986,6 +1423,25 @@ void dump_config_response(const nfapi_nr_config_response_scf_t *msg)
|
||||
msg->num_invalid_tlvs_configured_in_running);
|
||||
INDENTED_PRINTF("Number of Missing TLVs = 0x%02x\n", msg->num_missing_tlvs);
|
||||
/* dump all TLVs from each table */
|
||||
INDENTED_PRINTF("Invalid or Unsupported TLVs (%d) :\n",msg->num_invalid_tlvs);
|
||||
for (int i = 0; i < msg->num_invalid_tlvs; ++i) {
|
||||
dump_generic_tlv(&msg->invalid_tlvs_list[i], depth+1);
|
||||
}
|
||||
|
||||
INDENTED_PRINTF("TLVs that can only be configured in IDLE (%d):\n", msg->num_invalid_tlvs_configured_in_idle);
|
||||
for (int i = 0; i < msg->num_invalid_tlvs; ++i) {
|
||||
dump_generic_tlv(&msg->invalid_tlvs_list[i], depth+1);
|
||||
}
|
||||
|
||||
INDENTED_PRINTF("TLVs that can only be configured in RUNNING (%d):\n",msg->num_invalid_tlvs_configured_in_running);
|
||||
for (int i = 0; i < msg->num_invalid_tlvs; ++i) {
|
||||
dump_generic_tlv(&msg->invalid_tlvs_list[i], depth+1);
|
||||
}
|
||||
|
||||
INDENTED_PRINTF("Missing TLVs (%d):\n",msg->num_missing_tlvs);
|
||||
for (int i = 0; i < msg->num_invalid_tlvs; ++i) {
|
||||
dump_generic_tlv(&msg->invalid_tlvs_list[i], depth+1);
|
||||
}
|
||||
depth--;
|
||||
}
|
||||
|
||||
|
||||
@@ -859,9 +859,7 @@ bool eq_rach_indication(const nfapi_nr_rach_indication_t *a, const nfapi_nr_rach
|
||||
|
||||
void free_dl_tti_request(nfapi_nr_dl_tti_request_t *msg)
|
||||
{
|
||||
if (msg->vendor_extension) {
|
||||
free(msg->vendor_extension);
|
||||
}
|
||||
free(msg->vendor_extension);
|
||||
}
|
||||
|
||||
void free_ul_tti_request(nfapi_nr_ul_tti_request_t *msg)
|
||||
@@ -907,9 +905,7 @@ void free_rx_data_indication(nfapi_nr_rx_data_indication_t *msg)
|
||||
if (msg->number_of_pdus > 0) {
|
||||
for (int pdu_idx = 0; pdu_idx < msg->number_of_pdus; ++pdu_idx) {
|
||||
nfapi_nr_rx_data_pdu_t *rx_pdu = &msg->pdu_list[pdu_idx];
|
||||
if (rx_pdu->pdu) {
|
||||
free(rx_pdu->pdu);
|
||||
}
|
||||
free(rx_pdu->pdu);
|
||||
}
|
||||
free(msg->pdu_list);
|
||||
}
|
||||
@@ -917,99 +913,75 @@ void free_rx_data_indication(nfapi_nr_rx_data_indication_t *msg)
|
||||
|
||||
void free_crc_indication(nfapi_nr_crc_indication_t *msg)
|
||||
{
|
||||
if (msg->crc_list) {
|
||||
for (int crc_idx = 0; crc_idx < msg->number_crcs; ++crc_idx) {
|
||||
nfapi_nr_crc_t *crc = &msg->crc_list[crc_idx];
|
||||
if (crc->cb_crc_status) {
|
||||
free(crc->cb_crc_status);
|
||||
}
|
||||
}
|
||||
free(msg->crc_list);
|
||||
for (int crc_idx = 0; crc_idx < msg->number_crcs; ++crc_idx) {
|
||||
nfapi_nr_crc_t *crc = &msg->crc_list[crc_idx];
|
||||
free(crc->cb_crc_status);
|
||||
}
|
||||
free(msg->crc_list);
|
||||
}
|
||||
|
||||
void free_uci_indication(nfapi_nr_uci_indication_t *msg)
|
||||
{
|
||||
if (msg->uci_list) {
|
||||
for (int pdu_idx = 0; pdu_idx < msg->num_ucis; ++pdu_idx) {
|
||||
nfapi_nr_uci_t *uci_pdu = &msg->uci_list[pdu_idx];
|
||||
switch (uci_pdu->pdu_type) {
|
||||
case NFAPI_NR_UCI_PUSCH_PDU_TYPE: {
|
||||
nfapi_nr_uci_pusch_pdu_t *pdu = &uci_pdu->pusch_pdu;
|
||||
// Bit 0 not used in PUSCH PDU
|
||||
// HARQ
|
||||
if ((pdu->pduBitmap >> 1) & 0x01) {
|
||||
if (pdu->harq.harq_payload) {
|
||||
free(pdu->harq.harq_payload);
|
||||
}
|
||||
}
|
||||
// CSI Part 1
|
||||
if ((pdu->pduBitmap >> 2) & 0x01) {
|
||||
if (pdu->csi_part1.csi_part1_payload) {
|
||||
free(pdu->csi_part1.csi_part1_payload);
|
||||
}
|
||||
}
|
||||
// CSI Part 2
|
||||
if ((pdu->pduBitmap >> 3) & 0x01) {
|
||||
if (pdu->csi_part2.csi_part2_payload) {
|
||||
free(pdu->csi_part2.csi_part2_payload);
|
||||
}
|
||||
}
|
||||
break;
|
||||
for (int pdu_idx = 0; pdu_idx < msg->num_ucis; ++pdu_idx) {
|
||||
nfapi_nr_uci_t *uci_pdu = &msg->uci_list[pdu_idx];
|
||||
switch (uci_pdu->pdu_type) {
|
||||
case NFAPI_NR_UCI_PUSCH_PDU_TYPE: {
|
||||
nfapi_nr_uci_pusch_pdu_t *pdu = &uci_pdu->pusch_pdu;
|
||||
// Bit 0 not used in PUSCH PDU
|
||||
// HARQ
|
||||
if ((pdu->pduBitmap >> 1) & 0x01) {
|
||||
free(pdu->harq.harq_payload);
|
||||
}
|
||||
case NFAPI_NR_UCI_FORMAT_0_1_PDU_TYPE: {
|
||||
// Nothing to free
|
||||
break;
|
||||
// CSI Part 1
|
||||
if ((pdu->pduBitmap >> 2) & 0x01) {
|
||||
free(pdu->csi_part1.csi_part1_payload);
|
||||
}
|
||||
case NFAPI_NR_UCI_FORMAT_2_3_4_PDU_TYPE: {
|
||||
nfapi_nr_uci_pucch_pdu_format_2_3_4_t *pdu = &uci_pdu->pucch_pdu_format_2_3_4;
|
||||
// SR
|
||||
if (pdu->pduBitmap & 0x01) {
|
||||
if (pdu->sr.sr_payload) {
|
||||
free(pdu->sr.sr_payload);
|
||||
}
|
||||
}
|
||||
// HARQ
|
||||
if ((pdu->pduBitmap >> 1) & 0x01) {
|
||||
if (pdu->harq.harq_payload) {
|
||||
free(pdu->harq.harq_payload);
|
||||
}
|
||||
}
|
||||
// CSI Part 1
|
||||
if ((pdu->pduBitmap >> 2) & 0x01) {
|
||||
if (pdu->csi_part1.csi_part1_payload) {
|
||||
free(pdu->csi_part1.csi_part1_payload);
|
||||
}
|
||||
}
|
||||
// CSI Part 2
|
||||
if ((pdu->pduBitmap >> 3) & 0x01) {
|
||||
if (pdu->csi_part2.csi_part2_payload) {
|
||||
free(pdu->csi_part2.csi_part2_payload);
|
||||
}
|
||||
}
|
||||
break;
|
||||
// CSI Part 2
|
||||
if ((pdu->pduBitmap >> 3) & 0x01) {
|
||||
free(pdu->csi_part2.csi_part2_payload);
|
||||
}
|
||||
default:
|
||||
AssertFatal(1 == 0, "Unknown UCI.indication PDU Type %d\n", uci_pdu->pdu_type);
|
||||
break;
|
||||
break;
|
||||
}
|
||||
case NFAPI_NR_UCI_FORMAT_0_1_PDU_TYPE: {
|
||||
// Nothing to free
|
||||
break;
|
||||
}
|
||||
case NFAPI_NR_UCI_FORMAT_2_3_4_PDU_TYPE: {
|
||||
nfapi_nr_uci_pucch_pdu_format_2_3_4_t *pdu = &uci_pdu->pucch_pdu_format_2_3_4;
|
||||
// SR
|
||||
if (pdu->pduBitmap & 0x01) {
|
||||
free(pdu->sr.sr_payload);
|
||||
}
|
||||
// HARQ
|
||||
if ((pdu->pduBitmap >> 1) & 0x01) {
|
||||
free(pdu->harq.harq_payload);
|
||||
}
|
||||
// CSI Part 1
|
||||
if ((pdu->pduBitmap >> 2) & 0x01) {
|
||||
free(pdu->csi_part1.csi_part1_payload);
|
||||
}
|
||||
// CSI Part 2
|
||||
if ((pdu->pduBitmap >> 3) & 0x01) {
|
||||
free(pdu->csi_part2.csi_part2_payload);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
AssertFatal(1 == 0, "Unknown UCI.indication PDU Type %d\n", uci_pdu->pdu_type);
|
||||
break;
|
||||
}
|
||||
free(msg->uci_list);
|
||||
}
|
||||
free(msg->uci_list);
|
||||
}
|
||||
|
||||
void free_srs_indication(nfapi_nr_srs_indication_t *msg)
|
||||
{
|
||||
if (msg->pdu_list) {
|
||||
free(msg->pdu_list);
|
||||
}
|
||||
free(msg->pdu_list);
|
||||
}
|
||||
|
||||
void free_rach_indication(nfapi_nr_rach_indication_t *msg)
|
||||
{
|
||||
if (msg->pdu_list) {
|
||||
free(msg->pdu_list);
|
||||
}
|
||||
free(msg->pdu_list);
|
||||
}
|
||||
|
||||
static void copy_dl_tti_beamforming(const nfapi_nr_tx_precoding_and_beamforming_t *src,
|
||||
@@ -2586,6 +2558,27 @@ void dump_ul_dci_request(const nfapi_nr_ul_dci_request_t *msg)
|
||||
}
|
||||
}
|
||||
|
||||
static void dump_tx_data_request_tlv(const nfapi_nr_tx_data_request_tlv_t *tlv, int depth)
|
||||
{
|
||||
INDENTED_PRINTF("Tag = %d\n", tlv->tag);
|
||||
INDENTED_PRINTF("Length = %d\n", tlv->length);
|
||||
INDENTED_PRINTF("Value = ");
|
||||
switch (tlv->tag) {
|
||||
case 0:
|
||||
for (int i = 0; i < tlv->length; i++) {
|
||||
printf("0x%02x ", ((uint8_t*)tlv->value.direct)[i]);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
printf("%p", tlv->value.ptr);
|
||||
break;
|
||||
default:
|
||||
printf( " Unknown tag value %d",tlv->tag);
|
||||
break;
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
void dump_tx_data_request(const nfapi_nr_tx_data_request_t *msg)
|
||||
{
|
||||
int depth = 0;
|
||||
@@ -2594,15 +2587,18 @@ void dump_tx_data_request(const nfapi_nr_tx_data_request_t *msg)
|
||||
INDENTED_PRINTF("SFN = %d\n", msg->SFN);
|
||||
INDENTED_PRINTF("Slot = %d\n", msg->Slot);
|
||||
INDENTED_PRINTF("Number of PDUs = %d\n", msg->Number_of_PDUs);
|
||||
depth++;
|
||||
for (int i = 0; i < msg->Number_of_PDUs; i++) {
|
||||
depth++;
|
||||
INDENTED_PRINTF("PDU #%d\n", i);
|
||||
const nfapi_nr_pdu_t *pdu = &msg->pdu_list[i];
|
||||
INDENTED_PRINTF("PDU Length = 0x%02x\n", pdu->PDU_length);
|
||||
INDENTED_PRINTF("PDU Index = 0x%02x\n", pdu->PDU_index);
|
||||
INDENTED_PRINTF("numTLV = 0x%02x\n", pdu->num_TLV);
|
||||
for (int tlv_idx = 0; tlv_idx < pdu->num_TLV; tlv_idx++) {
|
||||
const nfapi_nr_tx_data_request_tlv_t *tlv = &pdu->TLVs[tlv_idx];
|
||||
/* call to dump_tx_data_request_tlv */
|
||||
depth--;
|
||||
dump_tx_data_request_tlv(tlv, depth + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2664,6 +2660,134 @@ void dump_crc_indication(const nfapi_nr_crc_indication_t *msg)
|
||||
}
|
||||
}
|
||||
|
||||
static void dump_harq_2_3_4(const nfapi_nr_harq_pdu_2_3_4_t *harq, int depth)
|
||||
{
|
||||
INDENTED_PRINTF("HARQ CRC = %01x\n", harq->harq_crc);
|
||||
INDENTED_PRINTF("HARQ Bit Length = %d\n", harq->harq_bit_len);
|
||||
INDENTED_PRINTF("HARQ Payload = ");
|
||||
for (int i = 0; i < harq->harq_bit_len / 8 + 1; i++) {
|
||||
printf("%x ", harq->harq_payload[i]);
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
static void dump_csi_part_1(const nfapi_nr_csi_part1_pdu_t *csi, int depth)
|
||||
{
|
||||
INDENTED_PRINTF("CSI Part 1 CRC = %01x\n", csi->csi_part1_crc);
|
||||
INDENTED_PRINTF("CSI Part 1 Bit Length = %d\n", csi->csi_part1_bit_len);
|
||||
INDENTED_PRINTF("CSI Part 1 Payload = ");
|
||||
for (int i = 0; i < csi->csi_part1_bit_len / 8 + 1; i++) {
|
||||
printf("%x ", csi->csi_part1_payload[i]);
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
static void dump_csi_part_2(const nfapi_nr_csi_part2_pdu_t *csi, int depth)
|
||||
{
|
||||
INDENTED_PRINTF("CSI Part 1 CRC = %01x\n", csi->csi_part2_crc);
|
||||
INDENTED_PRINTF("CSI Part 1 Bit Length = %d\n", csi->csi_part2_bit_len);
|
||||
INDENTED_PRINTF("CSI Part 1 Payload = ");
|
||||
for (int i = 0; i < csi->csi_part2_bit_len / 8 + 1; i++) {
|
||||
printf("%x ", csi->csi_part2_payload[i]);
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
static void dump_uci_PUSCH_PDU(const nfapi_nr_uci_pusch_pdu_t *pdu, int depth)
|
||||
{
|
||||
INDENTED_PRINTF("PDU Bitmap = 0x%01x\n", pdu->pduBitmap);
|
||||
INDENTED_PRINTF("Handle = 0x%04x\n", pdu->handle);
|
||||
INDENTED_PRINTF("RNTI = 0x%02x\n", pdu->rnti);
|
||||
INDENTED_PRINTF("UL_CQI = 0x%02x\n", pdu->ul_cqi);
|
||||
INDENTED_PRINTF("Timing Advance = 0x%02x\n", pdu->timing_advance);
|
||||
INDENTED_PRINTF("RSSI = 0x%02x\n", pdu->rssi);
|
||||
// HARQ payload, CSI Part 1 and 2 are conditionally allocated
|
||||
if ((pdu->pduBitmap >> 1) & 0x01) {
|
||||
INDENTED_PRINTF("HARQ Information\n");
|
||||
dump_harq_2_3_4(&pdu->harq, depth + 1);
|
||||
}
|
||||
if ((pdu->pduBitmap >> 2) & 0x01) {
|
||||
INDENTED_PRINTF("CSI Part 1\n");
|
||||
dump_csi_part_1(&pdu->csi_part1, depth + 1);
|
||||
}
|
||||
if ((pdu->pduBitmap >> 3) & 0x01) {
|
||||
INDENTED_PRINTF("CSI Part 1\n");
|
||||
dump_csi_part_2(&pdu->csi_part2, depth + 1);
|
||||
}
|
||||
}
|
||||
|
||||
static void dump_sr_0_1(const nfapi_nr_sr_pdu_0_1_t *sr, int depth)
|
||||
{
|
||||
INDENTED_PRINTF("SR Indication = 0x%02x\n", sr->sr_indication);
|
||||
INDENTED_PRINTF("SR Confidence Level = 0x%02x\n", sr->sr_confidence_level);
|
||||
}
|
||||
|
||||
static void dump_harq_0_1(const nfapi_nr_harq_pdu_0_1_t *harq, int depth)
|
||||
{
|
||||
INDENTED_PRINTF("Num HARQ = 0x%02x\n", harq->num_harq);
|
||||
INDENTED_PRINTF("HARQ Confidence Level = 0x%02x\n", harq->harq_confidence_level);
|
||||
depth++;
|
||||
for (int i = 0; i < harq->num_harq; i++) {
|
||||
INDENTED_PRINTF("HARQ Value[%d] : 0x%02x \n", i, harq->harq_list[i].harq_value);
|
||||
}
|
||||
}
|
||||
|
||||
static void dump_uci_PUCCH_0_1(const nfapi_nr_uci_pucch_pdu_format_0_1_t *pdu, int depth)
|
||||
{
|
||||
INDENTED_PRINTF("PDU Bitmap = 0x%01x\n", pdu->pduBitmap);
|
||||
INDENTED_PRINTF("Handle = 0x%04x\n", pdu->handle);
|
||||
INDENTED_PRINTF("RNTI = 0x%02x\n", pdu->rnti);
|
||||
INDENTED_PRINTF("PUCCH Format = 0x%02x\n", pdu->pucch_format);
|
||||
INDENTED_PRINTF("UL_CQI = 0x%02x\n", pdu->ul_cqi);
|
||||
INDENTED_PRINTF("Timing Advance = 0x%02x\n", pdu->timing_advance);
|
||||
INDENTED_PRINTF("RSSI = 0x%02x\n", pdu->rssi);
|
||||
if ((pdu->pduBitmap) & 0x01) {
|
||||
INDENTED_PRINTF("SR Information\n");
|
||||
dump_sr_0_1(&pdu->sr, depth + 1);
|
||||
}
|
||||
if ((pdu->pduBitmap >> 1) & 0x01) {
|
||||
INDENTED_PRINTF("HARQ Information\n");
|
||||
dump_harq_0_1(&pdu->harq, depth + 1);
|
||||
}
|
||||
}
|
||||
|
||||
static void dump_sr_2_3_4(const nfapi_nr_sr_pdu_2_3_4_t *sr, int depth)
|
||||
{
|
||||
INDENTED_PRINTF("SR Bit Length = %d\n", sr->sr_bit_len);
|
||||
INDENTED_PRINTF("SR Payload ");
|
||||
for (int i = 0; i < sr->sr_bit_len / 8 + 1; i++) {
|
||||
printf("%x ", sr->sr_payload[i]);
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
static void dump_uci_PUCCH_2_3_4(const nfapi_nr_uci_pucch_pdu_format_2_3_4_t *pdu, int depth)
|
||||
{
|
||||
INDENTED_PRINTF("PDU Bitmap = 0x%01x\n", pdu->pduBitmap);
|
||||
INDENTED_PRINTF("Handle = 0x%04x\n", pdu->handle);
|
||||
INDENTED_PRINTF("RNTI = 0x%02x\n", pdu->rnti);
|
||||
INDENTED_PRINTF("PUCCH Format = 0x%02x\n", pdu->pucch_format);
|
||||
INDENTED_PRINTF("UL_CQI = 0x%02x\n", pdu->ul_cqi);
|
||||
INDENTED_PRINTF("Timing Advance = 0x%02x\n", pdu->timing_advance);
|
||||
INDENTED_PRINTF("RSSI = 0x%02x\n", pdu->rssi);
|
||||
// SR
|
||||
if (pdu->pduBitmap & 0x01) {
|
||||
dump_sr_2_3_4(&pdu->sr, depth + 1);
|
||||
}
|
||||
// HARQ
|
||||
if ((pdu->pduBitmap >> 1) & 0x01) {
|
||||
dump_harq_2_3_4(&pdu->harq, depth + 1);
|
||||
}
|
||||
// CSI Part 1
|
||||
if ((pdu->pduBitmap >> 2) & 0x01) {
|
||||
dump_csi_part_1(&pdu->csi_part1, depth + 1);
|
||||
}
|
||||
// CSI Part 2
|
||||
if ((pdu->pduBitmap >> 3) & 0x01) {
|
||||
dump_csi_part_2(&pdu->csi_part2, depth + 1);
|
||||
}
|
||||
}
|
||||
|
||||
void dump_uci_indication(const nfapi_nr_uci_indication_t *msg)
|
||||
{
|
||||
int depth = 0;
|
||||
@@ -2680,6 +2804,20 @@ void dump_uci_indication(const nfapi_nr_uci_indication_t *msg)
|
||||
INDENTED_PRINTF("PDUType = 0x%02x\n", uci->pdu_type);
|
||||
INDENTED_PRINTF("PDUSize = 0x%02x\n", uci->pdu_size);
|
||||
/* call to dump_uci_indication_<PDU_Type>_pdu */
|
||||
switch (uci->pdu_type) {
|
||||
case NFAPI_NR_UCI_PUSCH_PDU_TYPE:
|
||||
dump_uci_PUSCH_PDU(&uci->pusch_pdu, depth + 1);
|
||||
break;
|
||||
case NFAPI_NR_UCI_FORMAT_0_1_PDU_TYPE:
|
||||
dump_uci_PUCCH_0_1(&uci->pucch_pdu_format_0_1, depth + 1);
|
||||
break;
|
||||
case NFAPI_NR_UCI_FORMAT_2_3_4_PDU_TYPE:
|
||||
dump_uci_PUCCH_2_3_4(&uci->pucch_pdu_format_2_3_4, depth + 1);
|
||||
break;
|
||||
default:
|
||||
INDENTED_PRINTF("Unknown PDU type 0x%02x\n", uci->pdu_type);
|
||||
break;
|
||||
}
|
||||
depth--;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,9 @@
|
||||
#define NFAPI_NR_NFAPI_TIMING_INFO_PERIOD_TAG 0x0120
|
||||
#define NFAPI_NR_FAPI_NUM_BEAMS_PERIOD_VENDOR_EXTENSION_TAG 0xA000
|
||||
#define NFAPI_NR_FAPI_ANALOG_BF_VENDOR_EXTENSION_TAG 0xA001
|
||||
#define NFAPI_NR_FAPI_TOTAL_NUM_BEAMS_VENDOR_EXTENSION_TAG 0xA002
|
||||
#define NFAPI_NR_FAPI_ANALOG_BEAM_VENDOR_EXTENSION_TAG 0xA003
|
||||
|
||||
|
||||
typedef struct {
|
||||
uint16_t phy_id;
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#define NFAPI_MAX_NUM_GROUPS 8
|
||||
#define NFAPI_MAX_NUM_CB 8
|
||||
#define NFAPI_MAX_NUM_PRGS 1
|
||||
#define NFAPI_MAX_NUM_BG_IF 1
|
||||
#define NFAPI_MAX_NUM_BG_IF 6
|
||||
#define NFAPI_MAX_NUM_PERIODS 8
|
||||
|
||||
// Extension to the generic structures for single tlv values
|
||||
@@ -328,6 +328,8 @@ typedef struct
|
||||
|
||||
#define NFAPI_NR_CONFIG_RSSI_MEASUREMENT_TAG 0x1028
|
||||
#define NFAPI_NR_CONFIG_TDD_TABLE 0x1035
|
||||
#define NFAPI_NR_CONFIG_BEAMFORMING_TABLE_TAG 0x1043 // This tag was added in version 5 of the SCF222 standard ( Table 3-50 of SCF222.10.05 )
|
||||
#define NFAPI_NR_CONFIG_PRECODING_TABLE_V6_TAG 0x104B // This tag was added in version 6 of the SCF222 standard ( Table 3-52 of SCF222.10.06 )
|
||||
|
||||
//table 3-21
|
||||
typedef struct
|
||||
@@ -473,6 +475,11 @@ typedef struct {
|
||||
nfapi_nr_dig_beam_t *dig_beam_list;
|
||||
} nfapi_nr_dbt_pdu_t;
|
||||
|
||||
typedef struct {
|
||||
nfapi_tl_t tl;
|
||||
nfapi_nr_dbt_pdu_t value;
|
||||
} nfapi_nr_dbt_tlv_ve_t;
|
||||
|
||||
// Table 3–62 Precoding matrix (PM) PDU (v.222.10.04)
|
||||
typedef struct {
|
||||
int16_t precoder_weight_Re;
|
||||
@@ -491,11 +498,18 @@ typedef struct {
|
||||
typedef struct {
|
||||
uint16_t num_pm_idx;
|
||||
nfapi_nr_pm_pdu_t *pmi_pdu;
|
||||
} nfapi_nr_pm_list_t;
|
||||
} nfapi_nr_pm_list_t; // This corresponds to Table 3-69 of SCF222.10.06, which introduces the num_pm_idx parameter
|
||||
|
||||
typedef struct {
|
||||
nfapi_tl_t tl;
|
||||
nfapi_nr_pm_list_t value;
|
||||
} nfapi_nr_pm_tlv_ve_t;
|
||||
|
||||
typedef struct {
|
||||
nfapi_uint8_tlv_t num_beams_period_vendor_ext;
|
||||
nfapi_uint8_tlv_t analog_bf_vendor_ext;
|
||||
nfapi_uint8_tlv_t total_num_beams_vendor_ext;
|
||||
nfapi_uint8_tlv_t *analog_beam_list;
|
||||
} nfapi_nr_analog_beamforming_ve_t;
|
||||
|
||||
// ERROR enums
|
||||
@@ -1829,7 +1843,7 @@ typedef struct {
|
||||
uint8_t num_symbols; // Number of symbols for SRS. Value: 1 -> 4. If a PHY does not report for individual symbols then this parameter should be set to 1.
|
||||
uint8_t wide_band_snr; // SNR value in dB measured within configured SRS bandwidth on each symbol. Value: 0 -> 255 representing -64 dB to 63 dB with a step size 0.5 dB. 0xff will be set if this field is invalid.
|
||||
uint8_t num_reported_symbols; // Number of symbols reported in this message. This allows PHY to report individual symbols or aggregated symbols where this field will be set to 1. Value: 1 -> 4.
|
||||
nfapi_nr_srs_reported_symbol_t* reported_symbol_list;
|
||||
nfapi_nr_srs_reported_symbol_t reported_symbol_list[4];
|
||||
} nfapi_nr_srs_beamforming_report_t;
|
||||
|
||||
// SRS indication
|
||||
|
||||
@@ -4455,8 +4455,7 @@ int unpack_nr_srs_beamforming_report(void *pMessageBuf, uint32_t messageBufLen,
|
||||
&& pull8(&pReadPackedMessage, &nr_srs_beamforming_report->num_reported_symbols, end))) {
|
||||
return -1;
|
||||
}
|
||||
nr_srs_beamforming_report->reported_symbol_list =
|
||||
calloc(nr_srs_beamforming_report->num_reported_symbols, sizeof(*nr_srs_beamforming_report->reported_symbol_list));
|
||||
|
||||
for (int reported_symbol = 0; reported_symbol < nr_srs_beamforming_report->num_reported_symbols; ++reported_symbol) {
|
||||
if (!unpack_nr_srs_reported_symbol(&nr_srs_beamforming_report->reported_symbol_list[reported_symbol],
|
||||
&pReadPackedMessage,
|
||||
|
||||
@@ -206,6 +206,47 @@ static void fill_config_request_tlv_tdd_rand(nfapi_nr_config_request_scf_t *nfap
|
||||
FILL_TLV(nfapi_resp->measurement_config.rssi_measurement, NFAPI_NR_CONFIG_RSSI_MEASUREMENT_TAG, rand8());
|
||||
nfapi_resp->num_tlv++;
|
||||
|
||||
uint16_t nb_beams = rand16_range(1, 15);
|
||||
uint16_t nb_tx = rand16_range(1, 15);
|
||||
nfapi_resp->dbt_config.num_dig_beams = nb_beams;
|
||||
if (nfapi_resp->dbt_config.num_dig_beams > 0) {
|
||||
nfapi_resp->dbt_config.num_txrus = nb_tx;
|
||||
nfapi_resp->dbt_config.dig_beam_list = calloc(nb_beams , sizeof(*nfapi_resp->dbt_config.dig_beam_list));
|
||||
for (int i = 0; i < nb_beams; i++) {
|
||||
nfapi_nr_dig_beam_t *beam = &nfapi_resp->dbt_config.dig_beam_list[i];
|
||||
beam->beam_idx = i;
|
||||
beam->txru_list = calloc(nb_tx , sizeof(*beam->txru_list));
|
||||
for (int j = 0; j < nb_tx; j++) {
|
||||
nfapi_nr_txru_t *txru = &beam->txru_list[j];
|
||||
txru->dig_beam_weight_Re = rand16_range(1, 0xffff);
|
||||
txru->dig_beam_weight_Im = rand16_range(1, 0xffff);
|
||||
}
|
||||
}
|
||||
nfapi_resp->num_tlv++;
|
||||
}
|
||||
|
||||
nfapi_nr_pm_list_t *pm_list = &nfapi_resp->pmi_list;
|
||||
const uint16_t num_layers = rand16_range(1, 4);
|
||||
const uint16_t num_ant_ports = rand16_range(1, 4);
|
||||
pm_list->num_pm_idx = rand16_range(1, 4);
|
||||
if (nfapi_resp->pmi_list.num_pm_idx > 0) {
|
||||
pm_list->pmi_pdu = calloc(pm_list->num_pm_idx, sizeof(*pm_list->pmi_pdu));
|
||||
for (int i = 0; i < pm_list->num_pm_idx; i++) {
|
||||
nfapi_nr_pm_pdu_t *pmi_pdu = &pm_list->pmi_pdu[i];
|
||||
pmi_pdu->pm_idx = i+1;
|
||||
pmi_pdu->numLayers = num_layers;
|
||||
pmi_pdu->num_ant_ports = num_ant_ports;
|
||||
for (int j = 0; j < num_layers; j++) {
|
||||
for (int k = 0; k < num_ant_ports; k++) {
|
||||
nfapi_nr_pm_weights_t* pm_weight = &pmi_pdu->weights[j][k];
|
||||
pm_weight->precoder_weight_Re = (int16_t)rand16_range(1, 0xffff);
|
||||
pm_weight->precoder_weight_Im = (int16_t)rand16_range(1, 0xffff);
|
||||
}
|
||||
}
|
||||
}
|
||||
nfapi_resp->num_tlv++;
|
||||
}
|
||||
|
||||
nfapi_resp->nfapi_config.p7_vnf_address_ipv4.tl.tag = NFAPI_NR_NFAPI_P7_VNF_ADDRESS_IPV4_TAG;
|
||||
for (int i = 0; i < NFAPI_IPV4_ADDRESS_LENGTH; ++i) {
|
||||
nfapi_resp->nfapi_config.p7_vnf_address_ipv4.address[i] = rand8();
|
||||
@@ -221,6 +262,21 @@ static void fill_config_request_tlv_tdd_rand(nfapi_nr_config_request_scf_t *nfap
|
||||
FILL_TLV(nfapi_resp->nfapi_config.p7_vnf_port, NFAPI_NR_NFAPI_P7_VNF_PORT_TAG, rand16());
|
||||
nfapi_resp->num_tlv++;
|
||||
|
||||
nfapi_resp->nfapi_config.p7_pnf_address_ipv4.tl.tag = NFAPI_NR_NFAPI_P7_PNF_ADDRESS_IPV4_TAG;
|
||||
for (int i = 0; i < NFAPI_IPV4_ADDRESS_LENGTH; ++i) {
|
||||
nfapi_resp->nfapi_config.p7_pnf_address_ipv4.address[i] = rand8();
|
||||
}
|
||||
nfapi_resp->num_tlv++;
|
||||
|
||||
nfapi_resp->nfapi_config.p7_pnf_address_ipv6.tl.tag = NFAPI_NR_NFAPI_P7_PNF_ADDRESS_IPV6_TAG;
|
||||
for (int i = 0; i < NFAPI_IPV6_ADDRESS_LENGTH; ++i) {
|
||||
nfapi_resp->nfapi_config.p7_pnf_address_ipv6.address[i] = rand8();
|
||||
}
|
||||
nfapi_resp->num_tlv++;
|
||||
|
||||
FILL_TLV(nfapi_resp->nfapi_config.p7_pnf_port, NFAPI_NR_NFAPI_P7_PNF_PORT_TAG, rand16());
|
||||
nfapi_resp->num_tlv++;
|
||||
|
||||
FILL_TLV(nfapi_resp->nfapi_config.timing_window, NFAPI_NR_NFAPI_TIMING_WINDOW_TAG, rand8());
|
||||
nfapi_resp->num_tlv++;
|
||||
|
||||
@@ -229,6 +285,33 @@ static void fill_config_request_tlv_tdd_rand(nfapi_nr_config_request_scf_t *nfap
|
||||
|
||||
FILL_TLV(nfapi_resp->nfapi_config.timing_info_period, NFAPI_NR_NFAPI_TIMING_INFO_PERIOD_TAG, rand8());
|
||||
nfapi_resp->num_tlv++;
|
||||
/*
|
||||
// TODO: Uncomment this block when ready to enable the pack of the following VE TLVs in nr_fapi_p5.c
|
||||
// NFAPI_NR_FAPI_NUM_BEAMS_PERIOD_VENDOR_EXTENSION_TAG
|
||||
// NFAPI_NR_FAPI_ANALOG_BF_VENDOR_EXTENSION_TAG
|
||||
// NFAPI_NR_FAPI_TOTAL_NUM_BEAMS_VENDOR_EXTENSION_TAG
|
||||
// NFAPI_NR_FAPI_ANALOG_BEAM_VENDOR_EXTENSION_TAG
|
||||
FILL_TLV(nfapi_resp->analog_beamforming_ve.num_beams_period_vendor_ext,
|
||||
NFAPI_NR_FAPI_NUM_BEAMS_PERIOD_VENDOR_EXTENSION_TAG,
|
||||
rand8());
|
||||
nfapi_resp->num_tlv++;
|
||||
|
||||
FILL_TLV(nfapi_resp->analog_beamforming_ve.analog_bf_vendor_ext, NFAPI_NR_FAPI_ANALOG_BF_VENDOR_EXTENSION_TAG, rand8());
|
||||
nfapi_resp->num_tlv++;
|
||||
|
||||
FILL_TLV(nfapi_resp->analog_beamforming_ve.total_num_beams_vendor_ext,
|
||||
NFAPI_NR_FAPI_TOTAL_NUM_BEAMS_VENDOR_EXTENSION_TAG,
|
||||
rand8());
|
||||
nfapi_resp->num_tlv++;
|
||||
|
||||
if (nfapi_resp->analog_beamforming_ve.total_num_beams_vendor_ext.value > 0) {
|
||||
nfapi_resp->analog_beamforming_ve.analog_beam_list =
|
||||
(nfapi_uint8_tlv_t *)malloc(nfapi_resp->analog_beamforming_ve.total_num_beams_vendor_ext.value * sizeof(nfapi_uint8_tlv_t));
|
||||
for (int i = 0; i < nfapi_resp->analog_beamforming_ve.total_num_beams_vendor_ext.value; ++i) {
|
||||
FILL_TLV(nfapi_resp->analog_beamforming_ve.analog_beam_list[i], NFAPI_NR_FAPI_ANALOG_BEAM_VENDOR_EXTENSION_TAG, rand8());
|
||||
nfapi_resp->num_tlv++;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
static void test_pack_unpack(nfapi_nr_config_request_scf_t *req)
|
||||
|
||||
@@ -31,15 +31,10 @@ typedef struct ldpc_interface_s {
|
||||
LDPC_encoderfunc_t *LDPCencoder;
|
||||
} ldpc_interface_t;
|
||||
|
||||
// Global var to limit the rework of the dirty legacy code
|
||||
extern ldpc_interface_t ldpc_interface, ldpc_interface_offload, ldpc_interface_segment;
|
||||
|
||||
/* functions to load the LDPC shared lib, implemented in openair1/PHY/CODING/nrLDPC_load.c */
|
||||
int load_LDPClib(char *version, ldpc_interface_t *);
|
||||
int free_LDPClib(ldpc_interface_t *ldpc_interface);
|
||||
|
||||
LDPC_initfunc_t LDPCinit;
|
||||
LDPC_shutdownfunc_t LDPCshutdown;
|
||||
LDPC_decoderfunc_t LDPCdecoder;
|
||||
LDPC_encoderfunc_t LDPCencoder;
|
||||
|
||||
|
||||
@@ -172,8 +172,7 @@ void phy_init_nr_gNB(PHY_VARS_gNB *gNB)
|
||||
for (int i = 0; i < common_vars->num_beams_period; i++)
|
||||
common_vars->rxdataF[i] = (c16_t **)malloc16(Prx * sizeof(c16_t*));
|
||||
|
||||
common_vars->num_beams = cfg->dbt_config.num_dig_beams;
|
||||
if (common_vars->num_beams > 0) {
|
||||
if (cfg->analog_beamforming_ve.analog_bf_vendor_ext.value) {
|
||||
common_vars->beam_id = (int **)malloc16(common_vars->num_beams_period * sizeof(int*));
|
||||
for (int i = 0; i < common_vars->num_beams_period; i++)
|
||||
common_vars->beam_id[i] = (int*)malloc16_clear(fp->symbols_per_slot * fp->slots_per_frame * sizeof(int));
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
void init_prach_ru_list(RU_t *ru);
|
||||
|
||||
int nr_phy_init_RU(RU_t *ru)
|
||||
void nr_phy_init_RU(RU_t *ru)
|
||||
{
|
||||
NR_DL_FRAME_PARMS *fp = ru->nr_frame_parms;
|
||||
|
||||
@@ -47,36 +47,40 @@ int nr_phy_init_RU(RU_t *ru)
|
||||
|
||||
AssertFatal(ru->nb_log_antennas > 0 && ru->nb_log_antennas < 13, "ru->nb_log_antennas %d ! \n",ru->nb_log_antennas);
|
||||
|
||||
ru->common.beam_id = malloc16_clear(MAX_NUM_BEAM_PERIODS * sizeof(int*));
|
||||
for(int i = 0; i < MAX_NUM_BEAM_PERIODS; i++)
|
||||
nfapi_nr_analog_beamforming_ve_t *analog_config = &cfg->analog_beamforming_ve;
|
||||
ru->num_beams_period = analog_config->analog_bf_vendor_ext.value ? analog_config->num_beams_period_vendor_ext.value : 1;
|
||||
int nb_tx_streams = ru->nb_tx * ru->num_beams_period;
|
||||
int nb_rx_streams = ru->nb_rx * ru->num_beams_period;
|
||||
LOG_I(NR_PHY, "nb_tx_streams %d, nb_rx_streams %d, num_Beams_period %d\n", nb_tx_streams, nb_rx_streams, ru->num_beams_period);
|
||||
ru->common.beam_id = malloc16_clear(ru->num_beams_period * sizeof(int*));
|
||||
for(int i = 0; i < ru->num_beams_period; i++)
|
||||
ru->common.beam_id[i] = malloc16_clear(fp->symbols_per_slot * fp->slots_per_frame * sizeof(int));
|
||||
|
||||
if (ru->if_south <= REMOTE_IF5) { // this means REMOTE_IF5 or LOCAL_RF, so allocate memory for time-domain signals
|
||||
// Time-domain signals
|
||||
ru->common.txdata = (int32_t**)malloc16(ru->nb_tx*sizeof(int32_t*));
|
||||
ru->common.rxdata = (int32_t**)malloc16(ru->nb_rx*sizeof(int32_t*) );
|
||||
ru->common.txdata = (int32_t**)malloc16(nb_tx_streams * sizeof(int32_t*));
|
||||
ru->common.rxdata = (int32_t**)malloc16(nb_rx_streams * sizeof(int32_t*));
|
||||
|
||||
|
||||
for (int i = 0; i < ru->nb_tx; i++) {
|
||||
for (int i = 0; i < nb_tx_streams; i++) {
|
||||
// Allocate 10 subframes of I/Q TX signal data (time) if not
|
||||
ru->common.txdata[i] = (int32_t*)malloc16_clear((ru->sf_extension + fp->samples_per_frame)*sizeof(int32_t));
|
||||
ru->common.txdata[i] = (int32_t*)malloc16_clear((ru->sf_extension + fp->samples_per_frame) * sizeof(int32_t));
|
||||
LOG_D(PHY,
|
||||
"[INIT] common.txdata[%d] = %p (%lu bytes,sf_extension %d)\n",
|
||||
i,
|
||||
ru->common.txdata[i],
|
||||
(ru->sf_extension + fp->samples_per_frame) * sizeof(int32_t),
|
||||
ru->sf_extension);
|
||||
ru->common.txdata[i] = &ru->common.txdata[i][ru->sf_extension];
|
||||
ru->common.txdata[i] = &ru->common.txdata[i][ru->sf_extension];
|
||||
|
||||
LOG_D(PHY, "[INIT] common.txdata[%d] = %p \n", i, ru->common.txdata[i]);
|
||||
}
|
||||
for (int i = 0; i < ru->nb_rx; i++) {
|
||||
ru->common.rxdata[i] = (int32_t*)malloc16_clear( fp->samples_per_frame*sizeof(int32_t) );
|
||||
for (int i = 0; i < nb_rx_streams; i++) {
|
||||
ru->common.rxdata[i] = (int32_t*)malloc16_clear(fp->samples_per_frame * sizeof(int32_t));
|
||||
}
|
||||
} // IF5 or local RF
|
||||
else {
|
||||
ru->common.txdata = (int32_t**)NULL;
|
||||
ru->common.rxdata = (int32_t**)NULL;
|
||||
ru->common.txdata = (int32_t**)NULL;
|
||||
ru->common.rxdata = (int32_t**)NULL;
|
||||
}
|
||||
if (ru->function != NGFI_RRU_IF5) { // we need to do RX/TX RU processing
|
||||
LOG_D(PHY, "nb_tx %d\n", ru->nb_tx);
|
||||
@@ -85,7 +89,6 @@ int nr_phy_init_RU(RU_t *ru)
|
||||
ru->common.rxdata_7_5kHz[i] = (int32_t*)malloc16_clear( 2*fp->samples_per_subframe*2*sizeof(int32_t) );
|
||||
LOG_D(PHY, "rxdata_7_5kHz[%d] %p for RU %d\n", i, ru->common.rxdata_7_5kHz[i], ru->idx);
|
||||
}
|
||||
|
||||
|
||||
// allocate precoding input buffers (TX)
|
||||
ru->common.txdataF = (int32_t **)malloc16(ru->nb_tx*sizeof(int32_t*));
|
||||
@@ -94,15 +97,15 @@ int nr_phy_init_RU(RU_t *ru)
|
||||
ru->common.txdataF[i] = (int32_t*)malloc16_clear(fp->samples_per_frame_wCP * sizeof(int32_t));
|
||||
|
||||
// allocate IFFT input buffers (TX)
|
||||
ru->common.txdataF_BF = (int32_t **)malloc16(ru->nb_tx*sizeof(int32_t*));
|
||||
LOG_D(PHY, "[INIT] common.txdata_BF= %p (%lu bytes)\n", ru->common.txdataF_BF, ru->nb_tx * sizeof(int32_t *));
|
||||
for (int i = 0; i < ru->nb_tx; i++) {
|
||||
ru->common.txdataF_BF[i] = (int32_t*)malloc16_clear(fp->samples_per_subframe_wCP*sizeof(int32_t) );
|
||||
ru->common.txdataF_BF = (int32_t **)malloc16(nb_tx_streams * sizeof(int32_t*));
|
||||
LOG_D(PHY, "[INIT] common.txdata_BF= %p (%lu bytes)\n", ru->common.txdataF_BF, nb_tx_streams * sizeof(int32_t *));
|
||||
for (int i = 0; i < nb_tx_streams; i++) {
|
||||
ru->common.txdataF_BF[i] = (int32_t*)malloc16_clear(fp->samples_per_subframe_wCP * sizeof(int32_t));
|
||||
LOG_D(PHY, "txdataF_BF[%d] %p for RU %d\n", i, ru->common.txdataF_BF[i], ru->idx);
|
||||
}
|
||||
// allocate FFT output buffers (RX)
|
||||
ru->common.rxdataF = (int32_t**)malloc16(ru->nb_rx*sizeof(int32_t*) );
|
||||
for (int i = 0; i < ru->nb_rx; i++) {
|
||||
ru->common.rxdataF = (int32_t**)malloc16(nb_rx_streams * sizeof(int32_t*));
|
||||
for (int i = 0; i < nb_rx_streams; i++) {
|
||||
// allocate 4 slots of I/Q signal data (frequency)
|
||||
int size = RU_RX_SLOT_DEPTH * fp->symbols_per_slot * fp->ofdm_symbol_size;
|
||||
ru->common.rxdataF[i] = (int32_t*)malloc16_clear(sizeof(**ru->common.rxdataF) * size);
|
||||
@@ -113,40 +116,38 @@ int nr_phy_init_RU(RU_t *ru)
|
||||
// AssertFatal(ru->nb_rx <= sizeof(ru->prach_rxsigF) / sizeof(ru->prach_rxsigF[0]),
|
||||
// "nb_antennas_rx too large");
|
||||
for (int j = 0; j < NUMBER_OF_NR_RU_PRACH_OCCASIONS_MAX; j++) {
|
||||
ru->prach_rxsigF[j] = (int16_t**)malloc(ru->nb_rx * sizeof(int16_t*));
|
||||
ru->prach_rxsigF[j] = (int16_t**)malloc(nb_rx_streams * sizeof(int16_t*));
|
||||
|
||||
for (int i = 0; i < ru->nb_rx; i++) {
|
||||
for (int i = 0; i < nb_rx_streams; i++) {
|
||||
// largest size for PRACH FFT is 4x98304 (16*24576)
|
||||
ru->prach_rxsigF[j][i] = (int16_t*)malloc16_clear( 4*98304*2*sizeof(int16_t) );
|
||||
LOG_D(PHY,"[INIT] prach_vars->rxsigF[%d] = %p\n",i,ru->prach_rxsigF[j][i]);
|
||||
ru->prach_rxsigF[j][i] = (int16_t*)malloc16_clear(4 * 98304 * 2 * sizeof(int16_t));
|
||||
LOG_D(PHY,"[INIT] prach_vars->rxsigF[%d] = %p\n", i, ru->prach_rxsigF[j][i]);
|
||||
}
|
||||
}
|
||||
|
||||
AssertFatal(ru->num_gNB <= NUMBER_OF_gNB_MAX,"gNB instances %d > %d\n",
|
||||
ru->num_gNB,NUMBER_OF_gNB_MAX);
|
||||
|
||||
AssertFatal(ru->num_gNB <= NUMBER_OF_gNB_MAX, "gNB instances %d > %d\n", ru->num_gNB,NUMBER_OF_gNB_MAX);
|
||||
|
||||
LOG_D(PHY, "[INIT] %s() ru->num_gNB:%d \n", __FUNCTION__, ru->num_gNB);
|
||||
|
||||
} // !=IF5
|
||||
|
||||
init_prach_ru_list(ru);
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
void nr_phy_free_RU(RU_t *ru)
|
||||
{
|
||||
LOG_D(PHY, "Freeing RU signal buffers (if_south %s) nb_tx %d\n", ru_if_types[ru->if_south], ru->nb_tx);
|
||||
int nb_tx_streams = ru->nb_tx * ru->num_beams_period;
|
||||
int nb_rx_streams = ru->nb_rx * ru->num_beams_period;
|
||||
|
||||
if (ru->if_south <= REMOTE_IF5) { // this means REMOTE_IF5 or LOCAL_RF, so free memory for time-domain signals
|
||||
// Hack: undo what is done at allocation
|
||||
for (int i = 0; i < ru->nb_tx; i++) {
|
||||
for (int i = 0; i < nb_tx_streams; i++) {
|
||||
int32_t *p = &ru->common.txdata[i][-ru->sf_extension];
|
||||
free_and_zero(p);
|
||||
}
|
||||
free_and_zero(ru->common.txdata);
|
||||
|
||||
for (int i = 0; i < ru->nb_rx; i++)
|
||||
for (int i = 0; i < nb_rx_streams; i++)
|
||||
free_and_zero(ru->common.rxdata[i]);
|
||||
free_and_zero(ru->common.rxdata);
|
||||
} // else: IF5 or local RF -> nothing to free()
|
||||
@@ -162,21 +163,21 @@ void nr_phy_free_RU(RU_t *ru)
|
||||
free_and_zero(ru->common.txdataF);
|
||||
|
||||
// free IFFT input buffers (TX)
|
||||
for (int i = 0; i < ru->nb_tx; i++)
|
||||
for (int i = 0; i < nb_tx_streams; i++)
|
||||
free_and_zero(ru->common.txdataF_BF[i]);
|
||||
free_and_zero(ru->common.txdataF_BF);
|
||||
|
||||
// free FFT output buffers (RX)
|
||||
for (int i = 0; i < ru->nb_rx; i++)
|
||||
for (int i = 0; i < nb_rx_streams; i++)
|
||||
free_and_zero(ru->common.rxdataF[i]);
|
||||
free_and_zero(ru->common.rxdataF);
|
||||
|
||||
for (int j = 0; j < NUMBER_OF_NR_RU_PRACH_OCCASIONS_MAX; j++) {
|
||||
for (int i = 0; i < ru->nb_rx; i++)
|
||||
for (int i = 0; i < nb_rx_streams; i++)
|
||||
free_and_zero(ru->prach_rxsigF[j][i]);
|
||||
free_and_zero(ru->prach_rxsigF[j]);
|
||||
}
|
||||
for(int i = 0; i < MAX_NUM_BEAM_PERIODS; ++i)
|
||||
for(int i = 0; i < ru->num_beams_period; ++i)
|
||||
free_and_zero(ru->common.beam_id[i]);
|
||||
free_and_zero(ru->common.beam_id);
|
||||
}
|
||||
|
||||
@@ -85,6 +85,11 @@ static const int nr_ssb_table[][3] = {
|
||||
{93, 15, nr_ssb_type_A},
|
||||
{94, 15, nr_ssb_type_A},
|
||||
{96, 30, nr_ssb_type_C},
|
||||
{100, 15, nr_ssb_type_A},
|
||||
{101, 15, nr_ssb_type_A},
|
||||
{101, 30, nr_ssb_type_C},
|
||||
{102, 30, nr_ssb_type_C},
|
||||
{104, 30, nr_ssb_type_C},
|
||||
{254, 15, nr_ssb_type_A},
|
||||
{254, 30, nr_ssb_type_C},
|
||||
{255, 15, nr_ssb_type_A},
|
||||
|
||||
@@ -81,7 +81,9 @@ static void nr_generate_dci(PHY_VARS_gNB *gNB,
|
||||
int dci_idx = 0;
|
||||
// multi-beam number (for concurrent beams)
|
||||
int bitmap = SL_to_bitmap(cset_start_symb, pdcch_pdu_rel15->DurationSymbols);
|
||||
int beam_nb = beam_index_allocation(dci_pdu->precodingAndBeamforming.prgs_list[0].dig_bf_interface_list[0].beam_idx,
|
||||
int beam_nb = beam_index_allocation(gNB->enable_analog_das,
|
||||
dci_pdu->precodingAndBeamforming.prgs_list[0].dig_bf_interface_list[0].beam_idx,
|
||||
&gNB->gNB_config.analog_beamforming_ve,
|
||||
&gNB->common_vars,
|
||||
slot,
|
||||
frame_parms->symbols_per_slot,
|
||||
|
||||
@@ -680,7 +680,9 @@ static int do_one_dlsch(unsigned char *input_ptr, PHY_VARS_gNB *gNB, NR_gNB_DLSC
|
||||
nfapi_nr_tx_precoding_and_beamforming_t *pb = &rel15->precodingAndBeamforming;
|
||||
// beam number in multi-beam scenario (concurrent beams)
|
||||
int bitmap = SL_to_bitmap(rel15->StartSymbolIndex, rel15->NrOfSymbols);
|
||||
int beam_nb = beam_index_allocation(pb->prgs_list[0].dig_bf_interface_list[0].beam_idx,
|
||||
int beam_nb = beam_index_allocation(gNB->enable_analog_das,
|
||||
pb->prgs_list[0].dig_bf_interface_list[0].beam_idx,
|
||||
&gNB->gNB_config.analog_beamforming_ve,
|
||||
&gNB->common_vars,
|
||||
slot,
|
||||
frame_parms->symbols_per_slot,
|
||||
|
||||
@@ -42,7 +42,6 @@ void init_prach_list(PHY_VARS_gNB *gNB)
|
||||
for (int i = 0; i < NUMBER_OF_NR_PRACH_MAX; i++){
|
||||
gNB->prach_vars.list[i].frame = -1;
|
||||
gNB->prach_vars.list[i].slot = -1;
|
||||
gNB->prach_vars.list[i].beam_nb = -1;
|
||||
gNB->prach_vars.list[i].num_slots = -1;
|
||||
}
|
||||
}
|
||||
@@ -51,8 +50,8 @@ void free_nr_prach_entry(PHY_VARS_gNB *gNB, int prach_id)
|
||||
{
|
||||
gNB->prach_vars.list[prach_id].frame = -1;
|
||||
gNB->prach_vars.list[prach_id].slot = -1;
|
||||
gNB->prach_vars.list[prach_id].beam_nb = -1;
|
||||
gNB->prach_vars.list[prach_id].num_slots = -1;
|
||||
free_and_zero(gNB->prach_vars.list[prach_id].beam_nb);
|
||||
}
|
||||
|
||||
int16_t find_nr_prach(PHY_VARS_gNB *gNB,int frame, int slot, find_type_t type) {
|
||||
@@ -70,7 +69,7 @@ int16_t find_nr_prach(PHY_VARS_gNB *gNB,int frame, int slot, find_type_t type) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
void nr_fill_prach(PHY_VARS_gNB *gNB, int SFN, int Slot, nfapi_nr_prach_pdu_t *prach_pdu)
|
||||
int nr_fill_prach(PHY_VARS_gNB *gNB, int SFN, int Slot, nfapi_nr_prach_pdu_t *prach_pdu)
|
||||
{
|
||||
int prach_id = find_nr_prach(gNB, SFN, Slot, SEARCH_EXIST_OR_FREE);
|
||||
AssertFatal(((prach_id >= 0) && (prach_id < NUMBER_OF_NR_PRACH_MAX)), "illegal or no prach_id found!!! prach_id %d\n", prach_id);
|
||||
@@ -79,16 +78,25 @@ void nr_fill_prach(PHY_VARS_gNB *gNB, int SFN, int Slot, nfapi_nr_prach_pdu_t *p
|
||||
prach->slot = Slot;
|
||||
const int format = prach_pdu->prach_format;
|
||||
prach->num_slots = (format < 4) ? get_long_prach_dur(format, gNB->frame_parms.numerology_index) : 1;
|
||||
prach->beam_nb = 0;
|
||||
if (gNB->common_vars.beam_id) {
|
||||
int fapi_beam_idx = prach_pdu->beamforming.prgs_list[0].dig_bf_interface_list[0].beam_idx;
|
||||
// TODO no idea how to compute final prach symbol here so for now we go til the end of the slot
|
||||
int temp_nb_symbols = NR_NUMBER_OF_SYMBOLS_PER_SLOT - prach_pdu->prach_start_symbol;
|
||||
int bitmap = SL_to_bitmap(prach_pdu->prach_start_symbol, temp_nb_symbols);
|
||||
prach->beam_nb = beam_index_allocation(fapi_beam_idx, &gNB->common_vars, Slot, NR_NUMBER_OF_SYMBOLS_PER_SLOT, bitmap);
|
||||
int n_symb = get_nr_prach_duration(prach_pdu->prach_format);
|
||||
prach->beam_nb = calloc(prach_pdu->beamforming.dig_bf_interface, sizeof(*prach->beam_nb));
|
||||
for (int i = 0; i < prach_pdu->beamforming.dig_bf_interface; i++) {
|
||||
int fapi_beam_idx = prach_pdu->beamforming.prgs_list[0].dig_bf_interface_list[i].beam_idx;
|
||||
int start_symb = prach_pdu->prach_start_symbol + i * n_symb;
|
||||
int bitmap = SL_to_bitmap(start_symb, n_symb);
|
||||
prach->beam_nb[i] = beam_index_allocation(gNB->enable_analog_das,
|
||||
fapi_beam_idx,
|
||||
&gNB->gNB_config.analog_beamforming_ve,
|
||||
&gNB->common_vars,
|
||||
Slot,
|
||||
NR_NUMBER_OF_SYMBOLS_PER_SLOT,
|
||||
bitmap);
|
||||
}
|
||||
}
|
||||
LOG_D(NR_PHY,"Copying prach pdu %d bytes to index %d\n", (int)sizeof(*prach_pdu), prach_id);
|
||||
memcpy(&prach->pdu, prach_pdu, sizeof(*prach_pdu));
|
||||
return prach_id;
|
||||
}
|
||||
|
||||
void init_prach_ru_list(RU_t *ru)
|
||||
@@ -121,10 +129,10 @@ int16_t find_nr_prach_ru(RU_t *ru,int frame,int slot, find_type_t type)
|
||||
return -1;
|
||||
}
|
||||
|
||||
void nr_fill_prach_ru(RU_t *ru, int SFN, int Slot, nfapi_nr_prach_pdu_t *prach_pdu)
|
||||
void nr_fill_prach_ru(RU_t *ru, int SFN, int Slot, nfapi_nr_prach_pdu_t *prach_pdu, int *beam_id)
|
||||
{
|
||||
int prach_id = find_nr_prach_ru(ru, SFN, Slot, SEARCH_EXIST_OR_FREE);
|
||||
AssertFatal(((prach_id >= 0) && (prach_id < NUMBER_OF_NR_PRACH_MAX)) || (prach_id < 0),
|
||||
AssertFatal((prach_id >= 0) && (prach_id < NUMBER_OF_NR_PRACH_MAX),
|
||||
"illegal or no prach_id found!!! prach_id %d\n",
|
||||
prach_id);
|
||||
|
||||
@@ -135,6 +143,7 @@ void nr_fill_prach_ru(RU_t *ru, int SFN, int Slot, nfapi_nr_prach_pdu_t *prach_p
|
||||
ru->prach_list[prach_id].num_slots = (fmt < 4) ? get_long_prach_dur(fmt, ru->nr_frame_parms->numerology_index) : 1;
|
||||
ru->prach_list[prach_id].fmt = fmt;
|
||||
ru->prach_list[prach_id].numRA = prach_pdu->num_ra;
|
||||
ru->prach_list[prach_id].beam = beam_id;
|
||||
ru->prach_list[prach_id].prachStartSymbol = prach_pdu->prach_start_symbol;
|
||||
ru->prach_list[prach_id].num_prach_ocas = prach_pdu->num_prach_ocas;
|
||||
pthread_mutex_unlock(&ru->prach_list_mutex);
|
||||
@@ -151,6 +160,7 @@ void free_nr_ru_prach_entry(RU_t *ru, int prach_id)
|
||||
void rx_nr_prach_ru(RU_t *ru,
|
||||
int prachFormat,
|
||||
int numRA,
|
||||
int beam,
|
||||
int prachStartSymbol,
|
||||
int prachStartSlot,
|
||||
int prachOccasion,
|
||||
@@ -159,7 +169,6 @@ void rx_nr_prach_ru(RU_t *ru,
|
||||
{
|
||||
AssertFatal(ru != NULL,"ru is null\n");
|
||||
|
||||
int16_t **rxsigF = NULL;
|
||||
NR_DL_FRAME_PARMS *fp = ru->nr_frame_parms;
|
||||
int slot2 = slot;
|
||||
int16_t *prach[ru->nb_rx];
|
||||
@@ -191,15 +200,16 @@ void rx_nr_prach_ru(RU_t *ru,
|
||||
prachStartSymbol,
|
||||
prachOccasion);
|
||||
|
||||
rxsigF = ru->prach_rxsigF[prachOccasion];
|
||||
int16_t **rxsigF = ru->prach_rxsigF[prachOccasion];
|
||||
|
||||
AssertFatal(ru->if_south == LOCAL_RF || ru->if_south == REMOTE_IF5,
|
||||
"we shouldn't call this if if_south != LOCAL_RF or REMOTE_IF5\n");
|
||||
|
||||
for (int aa=0; aa<ru->nb_rx; aa++){
|
||||
for (int aa = 0; aa < ru->nb_rx; aa++) {
|
||||
if (prach_sequence_length == 0)
|
||||
slot2 = prachStartSlot;
|
||||
prach[aa] = (int16_t*)&ru->common.rxdata[aa][fp->get_samples_slot_timestamp(slot2, fp, 0) + sample_offset_slot - ru->N_TA_offset];
|
||||
int idx = aa + beam * ru->nb_rx;
|
||||
prach[aa] = (int16_t*)&ru->common.rxdata[idx][fp->get_samples_slot_timestamp(slot2, fp, 0) + sample_offset_slot - ru->N_TA_offset];
|
||||
}
|
||||
|
||||
int reps;
|
||||
|
||||
@@ -257,14 +257,11 @@ void nr_fill_ulsch(PHY_VARS_gNB *gNB,
|
||||
int slot,
|
||||
nfapi_nr_pusch_pdu_t *ulsch_pdu);
|
||||
|
||||
void nr_fill_prach(PHY_VARS_gNB *gNB,
|
||||
int SFN,
|
||||
int Slot,
|
||||
nfapi_nr_prach_pdu_t *prach_pdu);
|
||||
int nr_fill_prach(PHY_VARS_gNB *gNB, int SFN, int Slot, nfapi_nr_prach_pdu_t *prach_pdu);
|
||||
|
||||
void rx_nr_prach(PHY_VARS_gNB *gNB,
|
||||
nfapi_nr_prach_pdu_t *prach_pdu,
|
||||
int prachOccasion,
|
||||
int prachOccasion,
|
||||
int frame,
|
||||
int subframe,
|
||||
uint16_t *max_preamble,
|
||||
@@ -274,16 +271,14 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
|
||||
void rx_nr_prach_ru(RU_t *ru,
|
||||
int prach_fmt,
|
||||
int numRA,
|
||||
int beam,
|
||||
int prachStartSymbol,
|
||||
int prachStartSlot,
|
||||
int prachOccasion,
|
||||
int frame,
|
||||
int subframe);
|
||||
|
||||
void nr_fill_prach_ru(RU_t *ru,
|
||||
int SFN,
|
||||
int Slot,
|
||||
nfapi_nr_prach_pdu_t *prach_pdu);
|
||||
void nr_fill_prach_ru(RU_t *ru,int SFN, int Slot, nfapi_nr_prach_pdu_t *prach_pdu, int *beam_nb);
|
||||
|
||||
int16_t find_nr_prach(PHY_VARS_gNB *gNB,int frame,int slot, find_type_t type);
|
||||
int16_t find_nr_prach_ru(RU_t *ru,int frame,int slot, find_type_t type);
|
||||
@@ -309,7 +304,7 @@ int nr_get_srs_signal(PHY_VARS_gNB *gNB,
|
||||
void init_prach_list(PHY_VARS_gNB *gNB);
|
||||
void init_prach_ru_list(RU_t *ru);
|
||||
void free_nr_ru_prach_entry(RU_t *ru, int prach_id);
|
||||
uint8_t get_nr_prach_duration(uint8_t prach_format);
|
||||
int get_nr_prach_duration(uint8_t prach_format);
|
||||
|
||||
void free_nr_prach_entry(PHY_VARS_gNB *gNB, int prach_id);
|
||||
|
||||
|
||||
@@ -76,7 +76,13 @@ void nr_fill_ulsch(PHY_VARS_gNB *gNB, int frame, int slot, nfapi_nr_pusch_pdu_t
|
||||
if (gNB->common_vars.beam_id) {
|
||||
int fapi_beam_idx = ulsch_pdu->beamforming.prgs_list[0].dig_bf_interface_list[0].beam_idx;
|
||||
int bitmap = SL_to_bitmap(ulsch_pdu->start_symbol_index, ulsch_pdu->nr_of_symbols);
|
||||
ulsch->beam_nb = beam_index_allocation(fapi_beam_idx, &gNB->common_vars, slot, NR_NUMBER_OF_SYMBOLS_PER_SLOT, bitmap);
|
||||
ulsch->beam_nb = beam_index_allocation(gNB->enable_analog_das,
|
||||
fapi_beam_idx,
|
||||
&gNB->gNB_config.analog_beamforming_ve,
|
||||
&gNB->common_vars,
|
||||
slot,
|
||||
NR_NUMBER_OF_SYMBOLS_PER_SLOT,
|
||||
bitmap);
|
||||
}
|
||||
ulsch->frame = frame;
|
||||
ulsch->slot = slot;
|
||||
|
||||
@@ -57,10 +57,7 @@
|
||||
|
||||
//#define DEBUG_NR_PUCCH_RX 1
|
||||
|
||||
void nr_fill_pucch(PHY_VARS_gNB *gNB,
|
||||
int frame,
|
||||
int slot,
|
||||
nfapi_nr_pucch_pdu_t *pucch_pdu)
|
||||
void nr_fill_pucch(PHY_VARS_gNB *gNB, int frame, int slot, nfapi_nr_pucch_pdu_t *pucch_pdu)
|
||||
{
|
||||
bool found = false;
|
||||
for (int i = 0; i < gNB->max_nb_pucch; i++) {
|
||||
@@ -73,7 +70,13 @@ void nr_fill_pucch(PHY_VARS_gNB *gNB,
|
||||
if (gNB->common_vars.beam_id) {
|
||||
int fapi_beam_idx = pucch_pdu->beamforming.prgs_list[0].dig_bf_interface_list[0].beam_idx;
|
||||
int bitmap = SL_to_bitmap(pucch_pdu->start_symbol_index, pucch_pdu->nr_of_symbols);
|
||||
pucch->beam_nb = beam_index_allocation(fapi_beam_idx, &gNB->common_vars, slot, NR_NUMBER_OF_SYMBOLS_PER_SLOT, bitmap);
|
||||
pucch->beam_nb = beam_index_allocation(gNB->enable_analog_das,
|
||||
fapi_beam_idx,
|
||||
&gNB->gNB_config.analog_beamforming_ve,
|
||||
&gNB->common_vars,
|
||||
slot,
|
||||
NR_NUMBER_OF_SYMBOLS_PER_SLOT,
|
||||
bitmap);
|
||||
}
|
||||
memcpy((void *)&pucch->pucch_pdu, (void *)pucch_pdu, sizeof(nfapi_nr_pucch_pdu_t));
|
||||
LOG_D(PHY,
|
||||
|
||||
@@ -59,7 +59,13 @@ void nr_fill_srs(PHY_VARS_gNB *gNB, frame_t frame, slot_t slot, nfapi_nr_srs_pdu
|
||||
if (gNB->common_vars.beam_id) {
|
||||
int bitmap = SL_to_bitmap(srs_pdu->time_start_position, 1 << srs_pdu->num_symbols);
|
||||
int fapi_beam_idx = srs_pdu->beamforming.prgs_list[0].dig_bf_interface_list[0].beam_idx;
|
||||
srs->beam_nb = beam_index_allocation(fapi_beam_idx, &gNB->common_vars, slot, NR_NUMBER_OF_SYMBOLS_PER_SLOT, bitmap);
|
||||
srs->beam_nb = beam_index_allocation(gNB->enable_analog_das,
|
||||
fapi_beam_idx,
|
||||
&gNB->gNB_config.analog_beamforming_ve,
|
||||
&gNB->common_vars,
|
||||
slot,
|
||||
NR_NUMBER_OF_SYMBOLS_PER_SLOT,
|
||||
bitmap);
|
||||
}
|
||||
memcpy((void *)&srs->srs_pdu, (void *)srs_pdu, sizeof(nfapi_nr_srs_pdu_t));
|
||||
break;
|
||||
|
||||
@@ -323,7 +323,8 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
|
||||
c16_t ptrs_phase_per_slot[][NR_SYMBOLS_PER_SLOT],
|
||||
int32_t ptrs_re_per_slot[][NR_SYMBOLS_PER_SLOT],
|
||||
int G,
|
||||
uint32_t nvar)
|
||||
uint32_t nvar,
|
||||
pdsch_scope_req_t *scope_req)
|
||||
{
|
||||
const int nl = dlsch[0].Nl;
|
||||
const int matrixSz = ue->frame_parms.nb_antennas_rx * nl;
|
||||
@@ -463,6 +464,12 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
|
||||
csi_res_bitmap,
|
||||
ue->chest_time);
|
||||
stop_meas_nr_ue_phy(ue, DLSCH_EXTRACT_RBS_STATS);
|
||||
if (scope_req->copy_chanest_to_scope) {
|
||||
size_t size = sizeof(c16_t) * dlsch_config->number_rbs * NR_NB_SC_PER_RB;
|
||||
int copy_index = symbol - dlsch_config->start_symbol;
|
||||
int offset = copy_index * size;
|
||||
UEscopeCopyUnsafe(ue, pdschChanEstimates, dl_ch_estimates_ext[0], size, offset, copy_index);
|
||||
}
|
||||
if (meas_enabled) {
|
||||
LOG_D(PHY,
|
||||
"[AbsSFN %u.%d] Slot%d Symbol %d: Pilot/Data extraction %5.2f \n",
|
||||
@@ -481,6 +488,12 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
|
||||
nb_re_pdsch = (pilots == 1) ? ((config_type == NFAPI_NR_DMRS_TYPE1) ? nb_rb_pdsch * (12 - 6 * dlsch_config->n_dmrs_cdm_groups)
|
||||
: nb_rb_pdsch * (12 - 4 * dlsch_config->n_dmrs_cdm_groups))
|
||||
: (nb_rb_pdsch * 12);
|
||||
if (scope_req->copy_rxdataF_to_scope) {
|
||||
size_t size = sizeof(c16_t) * nb_re_pdsch;
|
||||
int copy_index = symbol - dlsch_config->start_symbol;
|
||||
UEscopeCopyUnsafe(ue, pdschRxdataF, rxdataF_ext[0], size, scope_req->scope_rxdataF_offset, copy_index);
|
||||
scope_req->scope_rxdataF_offset += size;
|
||||
}
|
||||
//----------------------------------------------------------
|
||||
//--------------------- Channel Scaling --------------------
|
||||
//----------------------------------------------------------
|
||||
|
||||
@@ -41,6 +41,13 @@
|
||||
#define NR_PUSCH_x 2 // UCI placeholder bit TS 38.212 V15.4.0 subclause 5.3.3.1
|
||||
#define NR_PUSCH_y 3 // UCI placeholder bit
|
||||
|
||||
// Specifies the data that should be copied to the scope during PDSCH RX
|
||||
typedef struct pdsch_scope_req_s {
|
||||
bool copy_chanest_to_scope;
|
||||
bool copy_rxdataF_to_scope;
|
||||
size_t scope_rxdataF_offset;
|
||||
} pdsch_scope_req_t;
|
||||
|
||||
// Functions below implement 36-211 and 36-212
|
||||
|
||||
/** @addtogroup _PHY_TRANSPORT_
|
||||
@@ -314,7 +321,8 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
|
||||
c16_t ptrs_phase_per_slot[][NR_SYMBOLS_PER_SLOT],
|
||||
int32_t ptrs_re_per_slot[][NR_SYMBOLS_PER_SLOT],
|
||||
int G,
|
||||
uint32_t nvar);
|
||||
uint32_t nvar,
|
||||
pdsch_scope_req_t *scope_req);
|
||||
|
||||
int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, int frame, uint8_t slot, c16_t **txData);
|
||||
|
||||
|
||||
@@ -248,6 +248,29 @@ class IQHist {
|
||||
if (!ss.str().empty()) {
|
||||
ImGui::Text("Data for %s", ss.str().c_str());
|
||||
}
|
||||
if (ImGui::Button("Save IQ")) {
|
||||
std::stringstream ss;
|
||||
ss << "iq_";
|
||||
if (iq_data->meta.frame != -1) {
|
||||
ss << iq_data->meta.frame << "_";
|
||||
}
|
||||
if (iq_data->meta.slot != -1) {
|
||||
ss << iq_data->meta.slot << "_";
|
||||
}
|
||||
ss << scope_id_to_string(static_cast<enum scopeDataType>(iq_data->scope_id));
|
||||
ss << ".csv";
|
||||
std::ofstream file(ss.str());
|
||||
if (file.is_open()) {
|
||||
file << "real;imag\n";
|
||||
for (int i = 0; i < iq_data->len; i++) {
|
||||
file << iq_data->real[i] << ";" << iq_data->imag[i] << "\n";
|
||||
}
|
||||
file.close();
|
||||
std::cout << "Saved IQ to file: " << ss.str() << std::endl;
|
||||
} else {
|
||||
std::cerr << "Unable to open file";
|
||||
}
|
||||
}
|
||||
ImGui::EndGroup();
|
||||
}
|
||||
};
|
||||
@@ -432,6 +455,29 @@ void ShowUeScope(void *data_void_ptr, float t)
|
||||
}
|
||||
ImGui::End();
|
||||
|
||||
if (ImGui::Begin("UE PDSCH Chan est")) {
|
||||
static auto iq_data = new IQData();
|
||||
static auto iq_hist = new IQHist("PDSCH Chan est IQ");
|
||||
bool new_data = false;
|
||||
if (iq_hist->ShouldReadData()) {
|
||||
new_data = iq_data->TryCollect(&scope_array[pdschChanEstimates], t, iq_hist->GetEpsilon(), iq_procedure_timer);
|
||||
}
|
||||
iq_hist->Draw(iq_data, t, new_data);
|
||||
}
|
||||
ImGui::End();
|
||||
|
||||
if (ImGui::Begin("UE PDSCH IQ before compensation")) {
|
||||
static auto iq_data = new IQData();
|
||||
static auto iq_hist = new IQHist("PDSCH IQ before compensation");
|
||||
bool new_data = false;
|
||||
if (iq_hist->ShouldReadData()) {
|
||||
new_data = iq_data->TryCollect(&scope_array[pdschRxdataF], t, iq_hist->GetEpsilon(), iq_procedure_timer);
|
||||
}
|
||||
iq_hist->Draw(iq_data, t, new_data);
|
||||
}
|
||||
ImGui::End();
|
||||
|
||||
|
||||
if (ImGui::Begin("Time domain samples")) {
|
||||
static auto iq_data = new IQData();
|
||||
// Issue with imgui deferring draw calls until the end of the frame - cases segfault if scatterplot has too many points
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user