Compare commits

..

685 Commits

Author SHA1 Message Date
Jaroslava Fiedlerova
fca1971a2d Merge branch 'integration_2025_w13' into 'develop'
Integration: `2025.w13`

Closes #923, #924, #928, and #925

See merge request oai/openairinterface5g!3345

* !3300 Allow RSRP report handling in phy-test mode
* !3318 Improve handling of some pointers causing potential segfault
* !3321 DLSCH scheduler LOGs assertion prevention in case of HARQ disabled
* !3335 Other compilation improvements
* !3338 prevent access to NULL pointer in RELEASE_IE_FROMLIST
* !3337 Fix for wrong NSA init at UE
* !3339 fix NTN regression by correctly setting cellBarredNTN_r17 for NTN band again
* !3340 NR UE: fix nr_pbch_channel_estimation()
* !3260 Shared memory realtime radio simulation
* !3341 rfsimulator: apply deadlock detection only if more than one client is connected
* !3343 K-offset updated with configured sub carrier spacing
* !3331 Add documentation for Foxconn RU
* !3216 FHI72: Management plane support
* !3295 Fix SRS report TLV unpack
2025-04-01 09:36:38 +00:00
Jaroslava Fiedlerova
90bdcaafb5 Merge remote-tracking branch 'origin/Aerial_srs_unpack_fix' into integration_2025_w13 (!3295)
Fix SRS report TLV unpack

Changes the SRS unpacking to not expect padding to be present in the buffer when
working with Aerial, with which the report TLVs are not padded to the nearest
32-bit boundary. This issue was found when using a UE with 1 SRS port, which
causes the TLV to not have a length divisible by 4. Also adds a function to pull
X amount of bytes into a uint32_t, which is used to process the last 4 byte
block of the TLV, only pulling the bytes which are not padding. Completed the
SRS.indication dumping procedure to print out the report TLV. Changed the
SRS.indication unitary test to fill the last 4 byte block of the report TLV
appropriately according to the length ( which ensures the padding bytes are set
to 0 )
2025-03-31 20:06:08 +02:00
Jaroslava Fiedlerova
c2179d87bf Merge remote-tracking branch 'origin/fhi72-mplane' into integration_2025_w13 (!3216)
FHI72: Management plane support

At the moment, tested with Benetel 550 and 650 RUs FW v1.2.2
- support for multiple RUs
- RPCs implemented: <connect>, <subscribe>, <get>, <supervision-watchdog-reset>,
  <edit-config>, <validate>, <commit>, <disconnect>
- read PTP sync status from operational datastore xml
- get vendor name, and for xran store RU MAC, MTU and IQ bitwidth and PRACH
  offset, and transfer this info
- store interface name, low-level-tx/rx-endpoint names, tx/rx-carrier names,...,
  from operational datastore xml
- add reference gNB/DU config files with M-plane support
- update FHI readme
2025-03-31 15:29:58 +02:00
Jaroslava Fiedlerova
7a278e746f Merge remote-tracking branch 'origin/foxconn-doc' into integration_2025_w13 (!3331)
Add documentation for Foxconn RU

This MR adds documentation for using the Foxconn RU with OAI, as it piques the
interest of some in the community. Note that this RU is not continuously tested
with OAI L1. Additionally, we have observed throughput degradation in OAI
versions beyond tag 2024.w30, and the issue is under investigation. For now, we
are providing documentation based on what we have tested in our lab.
2025-03-31 15:28:12 +02:00
Jaroslava Fiedlerova
0c5e7b439c Merge remote-tracking branch 'origin/NTN_Koffset_updated' into integration_2025_w13 (!3343)
K-offset updated with configured sub carrier spacing

According to 38.331 , cell specific K-OFFSET provided in SIB19 is provided in
number of slots as per 15Khz SCS Koffset before being applied, needs to be
updated to the slots according to the configured subcarrier spacing.
2025-03-31 15:25:41 +02:00
Robert Schmidt
321b1c4ce1 Increase maximum logging line length for in-memory log
- Increase the maximum logging line for print done through
  log_output_memory().
  The reason is that we hit this line length when printing some machine
  generated configuration (XML) through the M-plane.  Increase to make
  more of it visible.
- To limit the impact, only increase this locally in function
  log_output_memory(), and statically assert that it will never be
  larger than 64 kB.
  In other places, we use the old limit.
- Move the definition MAX_LOG_TOTAL to log.c, because it's only used
  there.
2025-03-31 12:16:18 +02:00
Teodora
7beb88425f Use [HW] logging instead of [PHY] or [NR_PHY] 2025-03-31 12:16:18 +02:00
Teodora
a4479a2e65 Add M-plane tutorial 2025-03-31 12:16:18 +02:00
Teodora
bf0a0aa06b Clarification on delay profile 2025-03-31 12:16:18 +02:00
Teodora
75d5b31f4a Add Benetel650 8x8 reference DU config file for M-plane 2025-03-31 12:16:18 +02:00
Teodora
c7dffd416a Add Benetel550 4x4 reference gNB config file for M-plane 2025-03-31 12:16:18 +02:00
Teodora
d5fceb8e1f Parsing RU M-plane info to xran 2025-03-31 12:16:18 +02:00
Teodora
430026f1ec Wait until RUs are ready and add <disconnect> RPC for M-plane
- if RU(s) are not well configured, disconnect immediately and stop the DU
  - if all RUs are well configured, proceed with waiting until ready. The RU is
    ready when the carriers are activated. Either the RU already has preconfigured
    carriers (previous M-plane client configured), or the DU has to wait until receives
    the notifications.
2025-03-31 12:16:16 +02:00
Teodora
f22bc5acc7 Add <commit> RPC for M-plane 2025-03-31 12:15:20 +02:00
Teodora
b478930a04 Add <validate> RPC for M-plane 2025-03-31 12:15:20 +02:00
Teodora
e79c79b82e Add <edit-config> RPC for M-plane
- generate CU-planes RU configuration based on the loaded yang models
    and DU config file
  - not yet implemented for libyang and libnetconf2 v1
2025-03-31 12:15:18 +02:00
Teodora
dd8a6eaaf5 Load yang models
Ideally, we should load the yang models from the RU operational datastore, but the issues are following:
  1) the yang models order is not good - dependancy models have to be loaded first
  2) earlier O-RAN yang versions (e.g. v4) is not properly defined (i.e. optional parameters should not be included by default)

Added support in both cases, loading from RU with <get-schema> RPC, and loading statically from "radio/fhi_72/mplane/yang/models" folder.
2025-03-31 12:14:33 +02:00
Teodora
e0ffba49ae Store U-plane related info from xml
- interface name,
  - TX/RX carrier names, and
  - TX/RX endpoint names
2025-03-31 12:14:30 +02:00
Teodora
45d0eaf3c4 Get and store M-plane related params for xran 2025-03-31 12:13:44 +02:00
Teodora
2cd5c1faf7 Add <supervision-watchdog-reset> RPC for M-plane 2025-03-31 12:12:38 +02:00
Teodora
6266239c34 Add <subscribe> RPC for M-plane 2025-03-31 12:11:58 +02:00
Teodora
07bab2a707 Get the current sync status from operational datastore 2025-03-31 12:11:11 +02:00
Teodora
fb670db91e Get info from xml operational datastore
- obtain one or multiple node values
2025-03-31 12:10:10 +02:00
Teodora
064866459c Add <get> RPC for M-plane 2025-03-31 12:10:03 +02:00
Rúben Soares Silva
d9e3725a21 Unpack SRS report TLV not expecting padding to be present
Add a function pullx32 to pull x amount of bytes into uint32_t
Change the unpacking to pull only the needed bytes, and skip over the padding, when not Aerial
Change SRS.indication dumping function to also print the report TLV contents
Change SRS.indication unitary test to fill the last 4 byte block of the report TLV according to the length, with padding
2025-03-31 10:15:08 +01:00
Jaroslava Fiedlerova
b822dcda22 Merge remote-tracking branch 'origin/rfsim_small_improve_deadlock_detection' into integration_2025_w13 (!3341)
rfsimulator: apply deadlock detection only if more than one client is connected
2025-03-31 10:32:23 +02:00
Jaroslava Fiedlerova
11960896b7 Merge remote-tracking branch 'origin/shm-radio' into integration_2025_w13 (!3260)
Shared memory realtime radio simulation

Realtime and near-realtime RFSimulator alternative without channel modelling.
The purpose of this library is to allow realtime simulation of gNB and nrUE.

The library is loaded using --device.name vrtsim. The server side (gNB) should
also configure --vrtsim.role server and --vrtsim.timescale according to
requirements.

Limitations:
- Only 1UE-to-1gNB connection supported

Future work:
- Telnet API
2025-03-31 10:22:12 +02:00
Teodora
93aaaef50e Add RPC send and receive functionalities 2025-03-29 12:51:07 +01:00
Teodora
3f98ec50ef Add ssh connect function for M-plane 2025-03-29 12:51:07 +01:00
Teodora
da63bf9f9f M-plane integration - initial commit 2025-03-29 12:51:07 +01:00
Teodora
0be72c1917 Install dependencies for M-plane support 2025-03-29 12:51:07 +01:00
Teodora
efcc9fc9d4 Properly include xran_common.h in ${xran_INCLUDE_DIRS}
- ${xran_LOCATION}/src/xran_common.h
  - delete unnecessary target_include_directories() from FHI72
2025-03-29 12:51:07 +01:00
Teodora
978fa2ed05 These commands are unnecessary
- the FHI72 CMakeLists.txt exists and POST_BUILD properly links oran_fhlib_5g library
2025-03-29 12:51:07 +01:00
Teodora
3219d0a5a1 Delete duplicated FindLibXml2.cmake file
- cmake version 3.12 defines libxml2 module; the default path is
    /usr/share/cmake-3.<sub-version>/Modules/FindLibXml2.cmake
  - OAI requires minimum cmake version 3.16
2025-03-29 12:51:07 +01:00
Teodora
3a095ac57e M-plane support - explanation on needed parameters
- RU IP address - to connect to RUs via netconf
  - DU MAC address - for setting up the CU-planes on RU; not used in xran
  - VLAN tag (*) - for setting up the CU-planes on RU; not used in xran
  - DU keypair - for authentication when connecting to RU(s)

The parameters that RU-controller shall retreive from RU list of
capabilities:
  - MTU
  - compression
  - RU MAC address
  - PRACH offset (**)

(*) VLAN tag is not used in xran but an option is given in fh_config struct.
In my opinion, it is not a very suitable place, as it is needed for VFs.
Therefore, I moved it in the initialization part for M-plane purposes.

(**) PRACH offset shall be >= max(Ntx,Nrx), as per O-RAN CUS specification:
"The O-DU may decide to use same eAxC ID value to address endpoints on different O-RUs,
but eAxC ID values assigned to one O-RU must be unique within the O-RU’s endpoints of same direction."
=> however, LITEON supports flexible assignment of PRACH eAxC IDs, so
we made a workaround in the xran library to support PRACH eAxC IDs same
as PUSCH eAxC IDs.
2025-03-29 12:51:07 +01:00
Raghavendra Dinavahi
b141faaf30 K-offset updated with configured sub carrier spacing
According to 38.331 , cell specific K-OFFSET provided in SIB19 is provided in number of slots as per 15Khz SCS
Koffset before being applied, needs to be updated to the slots according to the configured subcarrier spacing.
2025-03-28 16:44:51 +01:00
Bartosz Podrygajlo
cea02a16b1 Modify 5g_fdd_rfsimulator testcase to use shm_radio
Use timescale 0.5 to make sure the iperf UL test passes. Also, disable
asan as this adds computational complexity that makes the test fail.
2025-03-28 14:58:46 +01:00
Jaroslava Fiedlerova
0bf40318ff Merge remote-tracking branch 'origin/fix_nr_ue_pbch_chan_est' into integration_2025_w13 (!3340)
NR UE: fix nr_pbch_channel_estimation()
2025-03-28 14:08:14 +01:00
Jaroslava Fiedlerova
98fe1390ac Merge remote-tracking branch 'origin/fix_ntn_regression' into integration_2025_w13 (!3339)
fix NTN regression by correctly setting cellBarredNTN_r17 for NTN band again

fixes e73e0454
2025-03-28 14:07:36 +01:00
Jaroslava Fiedlerova
ea541e90ba Merge remote-tracking branch 'origin/fix_wrong_nsa_init' into integration_2025_w13 (!3337)
Fix for wrong NSA init at UE

This error is shown in the UE logs as following

[RLC]   Activated srb0 for UE 0
[RLC]   SRB0 already exists for UE 0, do nothing
2025-03-28 14:06:19 +01:00
Jaroslava Fiedlerova
f82af5421b Merge remote-tracking branch 'origin/issue_923' into integration_2025_w13 (!3338)
prevent access to NULL pointer in RELEASE_IE_FROMLIST

Closes #923
2025-03-28 10:01:22 +01:00
Jaroslava Fiedlerova
2670185eb1 Merge remote-tracking branch 'origin/more_compilation_improvements' into integration_2025_w13 (!3335)
Other compilation improvements

The goal of this MR was to avoid compiling gNB MAC when compiling uesoftmodem
2025-03-28 10:00:20 +01:00
Jaroslava Fiedlerova
e8901dd358 Merge remote-tracking branch 'origin/disable_harq_improv' into integration_2025_w13 (!3321)
DLSCH scheduler LOGs assertion prevention in case of HARQ disabled

NR_sched_pucch_t structure is NULL if HARQ is disabled
2025-03-28 09:58:15 +01:00
Jaroslava Fiedlerova
9687bde8fd Merge remote-tracking branch 'origin/issue924' into integration_2025_w13 (!3318)
Improve handling of some pointers causing potential segfault

This intends to close #924 #928 and #925
2025-03-28 09:56:05 +01:00
Jaroslava Fiedlerova
2929554859 Merge remote-tracking branch 'origin/allow_RSRP_in_phytest' into integration_2025_w13 (!3300)
Allow RSRP report handling in phy-test mode

All CSI measurement report handling is currently disabled in phytest mode gNB
2025-03-28 09:53:56 +01:00
Reem Bahsoun
1b8a6d001b Add documentation for Foxconn RU in ORAN_FHI7.2_Tutorial.md
- This addition is based on past tests, iperf3 UDP throughput was 520Mbps DL and 40Mbps UL.
- Throughput degrades when using OAI L1 with tags beyond `2024.w30`.
- This RU is being CI tested only in the Aerial pipeline, not with OAI L1.
- The document will be updated once the issue is identified and fixed.
2025-03-27 13:20:42 +01:00
Reem Bahsoun
01877f0c9d Add gNB configuration for Foxconn RU in targets.
- Tested with OAI tag `2024.w30`.
2025-03-27 13:20:33 +01:00
francescomani
a164623fa3 prevent access to NULL pointer in RELEASE_IE_FROMLIST 2025-03-27 10:55:03 +01:00
Thomas Schlichter
cfde90dc85 rfsimulator: apply deadlock detection only if more than one client is connected 2025-03-27 09:54:20 +00:00
Thomas Schlichter
981ecb5dde NR UE: fix nr_pbch_channel_estimation() 2025-03-27 09:50:17 +00:00
Thomas Schlichter
66485aeb1d correctly set cellBarredNTN_r17 for NTN band again
fixes e73e04543a
2025-03-27 09:46:29 +00:00
francescomani
c826a20583 prevent NSA init in SA for a wrong condition 2025-03-27 09:24:50 +01:00
francescomani
3919986677 replace L2_NR dependency in f1ap with GTPV1U
The above is necessary to not compile as many gNB dependencies into the
UE. RLC only uses GTP, which was satisfied by L2_NR, but that's not
necessary. However, only that change results in

    /usr/bin/ld: openair2/E2AP/RAN_FUNCTION/libe2_ran_func_cuup.a(ran_func_rc.c.o): in function `get_list_for_report_style':
    openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.c:596:(.text+0xbe7): undefined reference to `cp_e2sm_rc_event_trigger'
    /usr/bin/ld: openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.c:596:(.text+0xc5b): undefined reference to `cp_e2sm_rc_event_trigger'
    /usr/bin/ld: openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.c:596:(.text+0xd3b): undefined reference to `cp_e2sm_rc_event_trigger'
    /usr/bin/ld: openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.c:596:(.text+0xd9d): undefined reference to `cp_e2sm_rc_event_trigger'
    /usr/bin/ld: openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.c:596:(.text+0xded): undefined reference to `cp_e2sm_rc_event_trigger'
    /usr/bin/ld: openair2/E2AP/RAN_FUNCTION/libe2_ran_func_cuup.a(ran_func_rc.c.o):openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.c:596: more undefined references to `cp_e2sm_rc_event_trigger' follow
    /usr/bin/ld: openair2/E2AP/RAN_FUNCTION/libe2_ran_func_cuup.a(ran_func_rc_subs.c.o): in function `remove_rc_subs_data':
    openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc_subs.c:60:(.text+0xbe): undefined reference to `find_if'
    /usr/bin/ld: openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc_subs.c:62:(.text+0xca): undefined reference to `free_e2sm_rc_event_trigger'

nr-cuup previously satisfied these dependencies by depending on L2_NR
which links in e2_ran_func_du_cucp_cuup. However, the nr-cuup E2 RAN
functions are in e2_ran_func_cuup. In the latter, the file rc_data_ie.c
was missing (for cp_e2sm_rc_event_trigger), which in turn needs
e2sm_rc_ir_obj. Finally, find_if comes through alg.

Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2025-03-26 17:51:35 +01:00
Bartosz Podrygajlo
347eb5a50d Add vrtsim to build_oai and some oai images 2025-03-26 16:54:25 +01:00
Bartosz Podrygajlo
c5c2e87810 Rename shm_radio to vrtsim 2025-03-26 16:54:22 +01:00
Bartosz Podrygajlo
5d3708ac3e Realtime channel emulation for shm_radio 2025-03-26 16:53:35 +01:00
francescomani
c1d02c13b7 remove f1ap from NR_L2_UE 2025-03-26 16:10:41 +01:00
Bartosz Podrygajlo
4b61f14064 shm_radio: Exchange information between peers
This allows to exchange the number of antennas between client
and server. This is necessary for channel modelling later.
2025-03-26 14:36:58 +01:00
Bartosz Podrygajlo
5512791190 Add histogram for time budget printed at the exit of shm_radio 2025-03-26 14:31:09 +01:00
Bartosz Podrygajlo
1a69a4efe1 Shared memory realtime radio simulation
Realtime and near-realtime RFSimulator alternative without channel modelling.
The purpose of this library is to allow realtime simulation of gNB and nrUE.

The library is loaded using --device.name shm_radio. The server side (gNB) should also
configure --shm_radio.role server and --shm_radio.timescale <timescale> according to requirements.

Limitations:
 - Only 1UE-to-1gNB connection supported

Future work:
 - Channel modelling
 - Telnet API
 - Histogram of the TX time budget
2025-03-26 14:29:08 +01:00
Bartosz Podrygajlo
1d1814f8b3 Shared memory time domain bidirectional IQ channel
This implements a server-client bidirectional time domain IQ channel via
shared memory.

The server creates the channel and should be aware of the client
receiver configuration (num rx/tx antennas).

Server shall be the time source and should call shm_iq_channel_produce_samples
at regular intervals
2025-03-26 14:24:47 +01:00
francescomani
7af5e9f59e prevent possible segfault in is_ss_monitor_occasion function 2025-03-26 13:27:11 +01:00
francescomani
ec4232814a prevent possible segfault in functions to compute csi report type bitlen
also improving formatting of the same functions
2025-03-26 13:27:07 +01:00
francescomani
c4ef8931d8 prevent possible segfault in compute_csi_bitlen 2025-03-26 13:00:43 +01:00
francescomani
45fffcff71 remove include mac_proto in f1ap file 2025-03-26 11:49:03 +01:00
francescomani
38fe30baab improvements for NFAPI compilation for the UE 2025-03-26 11:30:53 +01:00
francescomani
2269f1e493 remove unnecessary gNB include in nr_mac_common 2025-03-26 10:45:15 +01:00
francescomani
159f06cbf5 remove unnecessary gNB include in config_ue 2025-03-26 10:39:32 +01:00
Robert Schmidt
1d479b2aa9 Merge branch 'integration_2025_w12' into 'develop'
Integration: `2025.w12`

Closes #920 and #915

See merge request oai/openairinterface5g!3325

* !3301 Remove unused NR UE PHY unit tests
* !3319 Disable EPS NAS security algorithms in 5GMM UE capabilities
* !3315 SCTP: avoid assert on partial SCTP message
* !3323 Fix long RACH regression
* !3311 Harmonize and update Frequency Range computation to the current values specified by the standard
* !3320 Miscelaneous improvements in PHY simulators
* !3286 Add support for ARM build pipeline
* !3308 remove ul_ch_estimates_time to save memory
* !3310 remove globale llr_layers to save memory, improve CPU, simplify code
* !3274 Add initial support for RedCap
* !3328 Fix ULSCH ID type to handle large max_nb_pusch values (ULSCH procedures)
* !3329 NR build improvements
* !3285 Update FHI 7.2 documentation, minor code cleanup
2025-03-26 08:42:03 +00:00
Robert Schmidt
9bbd252298 Merge remote-tracking branch 'origin/fhi-72-cleanup-doc' into integration_2025_w12 (!3285)
Update FHI 7.2 documentation, minor code cleanup

- remove some unused functions
- make one function static
- add callback function documentation
- provide some developer function
2025-03-25 12:49:20 +01:00
Robert Schmidt
a73989b722 Provide clarification on multi-RU operation in O-RAN 7.2 tutorial 2025-03-25 12:05:56 +01:00
Robert Schmidt
078c0845f8 Add developer documentation for fhi_72 driver 2025-03-25 12:05:56 +01:00
Robert Schmidt
6b4954f2b6 Provide some documentation for xran callbacks 2025-03-25 12:05:56 +01:00
Robert Schmidt
77cdb05754 Merge remote-tracking branch 'origin/CMakeLists_improv' into integration_2025_w12 (!3329)
NR build improvements

This MR is an attempt to improve compilation of NR softmodems by
removing some of NR-LTE cross-compilation (at the cost of a small dummy
file for nr-softmodem) and one small gNB-NRUE cross-compilation.
2025-03-25 10:32:16 +01:00
Robert Schmidt
88872f18c7 Merge remote-tracking branch 'origin/fix-int-type-ulsch-id' into integration_2025_w12 (!3328)
Fix ULSCH ID type to handle large max_nb_pusch values (ULSCH procedures)

The ULSCH_id variable is currently defined as uint8_t, which limits its
range to 0-255. However, gNB->max_nb_pusch can exceed this range
depending on the configuration (buffer_ul_slots and
MAX_MOBILES_PER_GNB).  This can lead to incorrect behavior or undefined
results when max_nb_pusch is larger than 255. This commit changes the
type of ULSCH_id from uint8_t to int to accommodate larger values of
max_nb_pusch.

The issue was observed when running the OAI gNB with MAX_MOBILES_PER_GNB
set to 64 UEs. The root cause was traced back to the changes to UL
processing introduced in !2952.
2025-03-25 10:31:24 +01:00
francescomani
0c34562db7 remove unnecessary L2_UE_LTE_NR 2025-03-25 08:27:16 +01:00
francescomani
6c6fa11fd8 do not compile full LTE L2 eNB in nr-softmodem (at the cost of a small dummy file) 2025-03-25 08:27:12 +01:00
Robert Schmidt
e23a4271c8 Make first_call_set bool, write log with logging system
Change to bool for clarity. The log message would sometimes only show up
at the end, which is misleading; use the logging module, which
harmonizes log statements and should make this appear immediately.
2025-03-24 16:02:13 +01:00
Robert Schmidt
64a346b4b8 Update warning that E release support will be removed
We still do not handle RUs with MTUs of 1500 properly in F release;
therefore, for the close future, we cannot remove support for E release.
Also, it "promises" this for January, which is in the past already.
Update to keep the warning logical.
2025-03-24 16:02:13 +01:00
Robert Schmidt
af2c6b76c7 Remove unused callbacks, function declaration, make function static 2025-03-24 16:01:41 +01:00
francescomani
d62e202a5b remove unnecessary MCE_APP_SRC from L2_LTE_NR 2025-03-24 15:43:43 +01:00
francescomani
7843003a1e remove unnecessary nr_rrc_config.c from NR_L2_SRC_UE 2025-03-24 15:41:14 +01:00
Robert Schmidt
492247054f Merge remote-tracking branch 'origin/SIB1_RedCap' into integration_2025_w12 (!3274)
Add initial support for RedCap

- RedCap SIB1-v17-IEs parameters implemented in SIB1
- Create an configuration file for RedCap devices
2025-03-24 15:03:41 +01:00
Robert Schmidt
1be24d48cd Merge remote-tracking branch 'origin/remove-globale-ul_ch_estimates' into integration_2025_w12 (!3310)
remove globale llr_layers to save memory, improve CPU, simplify code
2025-03-24 15:03:20 +01:00
Robert Schmidt
e4cb39d4af Merge remote-tracking branch 'origin/remove-global-ul_ch_estimates_time' into integration_2025_w12 (!3308)
remove ul_ch_estimates_time to save memory

remove ul_ch_estimates_time that saves 50MB memory to access in RAM, and
make better quality scope data passing (no race)
2025-03-24 15:02:29 +01:00
Robert Schmidt
bbae3b24ad Merge remote-tracking branch 'origin/arm-build-pipeline' into integration_2025_w12 (!3286)
Add support for ARM build pipeline

Modify the existing python code to be able to build images where the
image tag can be prepended with a prefix, here arm_. This is preparatory
work to create the ARM build image pipeline, and reuse the existing
internal registry on porcepix to have x86 and ARM images coexist.

Fix various bugs in the build system to allow to build on a system with
as many cores as gracehopper.

Also, fix two programs (usim, nvram) to work correctly under ARM.
2025-03-24 14:45:12 +01:00
Robert Schmidt
99ecbad530 Merge remote-tracking branch 'origin/add_sigint_handler_nr_physimulators' into integration_2025_w12 (!3320)
Miscelaneous improvements in PHY simulators

1: Add a SIGINT handler to NR PHY simulators

When using T2 virtual functions, it is important to properly stop DPDK
and free the device.  Otherwise the virtual functions may be blocked and
a restart of the admin application is necessary.

If not carefully done, such kind of operation can lead to losing cores
to DPDK processes that cannot be stopped.  This can lead to situations
where the machine is locked and can only be unlocked by a power cycle.
Always properly stopping DPDK and freeing the device reduces the risk of
such situation to happen.

Up to now, SIGINT was shutting down the PHY simulators without freeing
the device.  This commit adds a signal handler to handle SIGINT in a way
that allow to properly free the device.

This feature is added to all the NR PHY simulators whether they use T2
or not in case it is now or later of any use.

2: Make nr_ulschsim functional

There were two issues that were making nr_ulschsim non functional:

1. The channel output was not copied to decoder input (llr array)
2. The test on decoding successful outcome was wrong

The result was that nr_ulschsim was succesfull whatever were its
arguments.  This changeset fixes the two issues so that nr_ulschsim is
now functional.
2025-03-24 14:43:57 +01:00
Robert Schmidt
cd6e83e1fc Merge remote-tracking branch 'origin/Harmonize_frequency_range' into integration_2025_w12 (!3311)
Harmonize and update Frequency Range computation to the current values
specified by the standard

3GPP TS 38.101-1 Version 19.0.0 Table 5.1-1: Definition of frequency
ranges

- FR1 from 410 MHz to 7125 MHz
- FR2 from 24.25 GHz to 71 GHz
2025-03-24 14:43:15 +01:00
Robert Schmidt
3a30954e56 Merge remote-tracking branch 'origin/fix-longrach-reg' into integration_2025_w12 (!3323)
Fix long RACH regression

Add some missing functionality that was not merged in !3088.
2025-03-24 14:42:18 +01:00
Robert Schmidt
5b07283003 Add ARM build pipeline to RAN-Container-Parent and documentation 2025-03-24 11:43:44 +01:00
Romain Beurdouche
60b04f0c82 feat(nr_unitary_defs): Apply clang-format to openair1/SIMULATION/NR_PHY/nr_unitary_defs.h 2025-03-24 09:39:36 +00:00
Romain Beurdouche
a2d13f755c feat(nr_unitary_common): Add banner and apply clang-format to openair1/SIMULATION/NR_PHY/nr_unitary_common.c 2025-03-24 09:39:36 +00:00
Romain Beurdouche
e68123e06d fix(NR PHY simulators): Naming coherence & NR PHY simulators common functions object
1. Change the name of `openair1/SIMULATION/NR_PHY/nr_dummy_functions.c` into `openair1/SIMULATION/NR_PHY/nr_unitary_common.c` for naming coherence after adding the SIGINT handler which is not a dummy function.
2. Instead of being built once for every NR PHY simulators, the common functions source file is built once as an object and linked to each simulator.
2025-03-24 09:36:56 +00:00
Guido Casati
5a59793b2f Fix ULSCH ID type to handle large max_nb_pusch values (ULSCH procedures)
The ULSCH_id variable is currently defined as uint8_t, which limits its
range to 0-255. However, gNB->max_nb_pusch can exceed this range
depending on the configuration (buffer_ul_slots and MAX_MOBILES_PER_GNB).
This can lead to incorrect behavior or undefined results when max_nb_pusch
is larger than 255. This commit changes the type of ULSCH_id from uint8_t
to int to accommodate larger values of max_nb_pusch.

The issue was observed when running the OAI gNB with MAX_MOBILES_PER_GNB set
to 64 UEs. The root cause was traced back to the changes to UL processing
introduced in !3166 (!2952).
2025-03-24 09:30:30 +01:00
Robert Schmidt
4ff8cf6c80 Push ARM build images to registry for arm_ prefix 2025-03-24 09:19:43 +01:00
Robert Schmidt
01d48c1d82 Add pull image with tag prefix and XML
After the parent commit, the registry might contain prefixed images.
This commit adds the functionality to pull such prefixed image. Since we
rename the pulled image (to have a consistent name, from whichever
registry we might pull), remove the prefix as well so that it can be
used with other CI functionality (remove image, use in test, ...)

Examples for renaming:
- pull from internal_registry for x86
  internal_registry/oai-gnb:branchA => oai-ci/oai-gnb:branchA
- pull from internal registry for ARM with "arm_" prefix
  internal_registry/oai-gnb:arm_branchA => oai-ci/oai-gnb:branchA
- pull from x86 other registry (e.g., openshift)
  openshift/namespace/oai-gnb:branchA => oai-ci/oai-gnb:branchA
2025-03-24 09:19:30 +01:00
Robert Schmidt
d67d5793ce Add push image with tag prefix
The only currently viable way to push ARM images to our registry is to
use a custom tag prefix. Modify the python test code to specify such a
tag, and default to "" (no prefix).
2025-03-24 09:19:30 +01:00
Robert Schmidt
3e823b25c1 Add ARM-specific image-build and XML
After the preceding commits, it's now possible to build images on ARM.
Add a specific "native_arm" build kind to only build what we need as of
now (do not only call it "arm", as that would match the kind
"build_cross_arm64").

Add the corresponding XML. Pushing of images is disabled, as this does
not work as of now.
2025-03-24 09:19:30 +01:00
Robert Schmidt
3f5181d50d Match nvipc.zip through glob
The (existing) Aerial pipeline on devkit uses an older version of nvipc,
which is upgraded on gracehopper. Use a glob to match them equally,
which also aligns this code with the corresponding Dockerfile, which
already uses that glob.
2025-03-24 09:19:30 +01:00
Robert Schmidt
9d796fb31f getopt_long() returns int
Use the right type for variable, as getopt_long() returns an int. Using
char is not a problem on x86, but prevents the return of -1 in case of
parameter reading end. This led to infinite loops on ARM, which is fixed
through the variable type change. An additional counter measure (showing
the problem) would be to print and error out when reading an undefined
parameter, which is added here as well.

This has been forgotten when making the same change for getopt() in
cf9854601c ("getopt() returns int").
2025-03-24 09:19:30 +01:00
Robert Schmidt
677a904b6c Avoid x86-specific Dockerfiles/enable ARM
Dockerfiles hardcoded one copy operation to x86; generalize to capture
ARM as well. Since the target directory cannot have any globs, we need
to manually check the right directory, then move the file.

Note that this is only necessary since we are forced to switch the
compiler, as Ubuntu's default gcc-11 does not work with FlexRIC. When
upgrading to Ubuntu 24, these lines should disappear and asan be
installed as normal. See commit 94497435e7 ("Upgrade CI images to
Ubuntu 22").
2025-03-24 09:18:44 +01:00
Raghavendra Dinavahi
2a2ebfe80f Initialising dl,ul freq in psbchsim 2025-03-21 16:05:30 +01:00
Robert Schmidt
f6e3ea48d0 Merge remote-tracking branch 'origin/issue-920-fix-crash-sctp' into integration_2025_w12 (!3315)
SCTP: avoid assert on partial SCTP message

The receive buffer for SCTP, before this branch, is 8192. If a message
is larger, we receive only a partial message, which makes the gNB abort.
Remove the abort to not be susceptible to a message intended to crash
the gNB.

also, increase the receive buffer to be more forgiving for large messages

Closes: #920
2025-03-21 12:27:25 +01:00
Robert Schmidt
9c0eaefb93 Merge remote-tracking branch 'origin/issue-915' into integration_2025_w12 (!3319)
Disable EPS NAS security algorithms in 5GMM UE capabilities

OAI nrUE is not supporting multiple RATs, therefore the EPS NAS security
algorithms bit in 5GMM UE capabilities is not relevant.

This bit is only relevant if N26 interface is supported by the AMF and
the UE is supporting S1 mode, meaning that the UE is connected to a 4G
LTE network,  via the S1 interface (eNB - MME/SGW). When the UE performs
an inter-system change from N1 mode to S1 mode, it transitions from 5GC
to the EPC: at network level this happens over the N26 interface (which
connects the 5G AMF to the 4G MME).

In this transition is where the EPS security context becomes relevant:
the UE does not know about the N26 interface, however is the AMF that
can tell the UE, e.g. during the registration procedure, if the UE sets
the S1 mode bit to "S1 mode supported" in the 5GMM capability IE, and
the AMF supports the N26 interface, the AMF will include the Selected
EPS NAS security algorithms IE in the SECURITY MODE COMMAND message,
which is what happened in #915.

Closes: #915
2025-03-21 12:26:14 +01:00
Romain Beurdouche
4971b1e62c feat(NR PHY simulators): Add a SIGINT handler to other NR PHY simulators
Even though the remaining NR PHY simulators do not use the T2, we may still feature them with a SIGINT handler for proper termination on SIGINT and for a matter of completeness.
The remaining NR PHY simulators are:
* nr_pbchsim
* nr_prachsim
* nr_psbchsim
* nr_pucchsim
2025-03-21 10:04:45 +00:00
Romain Beurdouche
0033da5611 fix(nr_ulschsim): make nr_ulschsim functional
There was two issues that were making nr_ulschsim non functional:
1. The channel output was not copied to decoder input (llr array)
2. The test on decoding successful outcome was wrong

The result was that nr_ulschsim was succesfull whatever were its arguments.
This commit fixes the two issues so that nr_ulschsim is now functional.
2025-03-21 10:04:45 +00:00
Romain Beurdouche
1fdbf2906f feat(NR PHY simulators): add a SIGINT handler to some PHY simulators
When using T2 virtual functions, it is important to properly stop DPDK and free the device.
Otherwise the virtual functions may be blocked and a restart of the admin application is necessary.

Up to now, SIGINT was shutting down the PHY simulators without freeing the device.
This commit adds a signal handler to handle SIGINT in a way that allow to properly free the device.
This feature is first added to the PHY simulators that use the T2 which are `nr_ulsim`, `nr_dlsim`, `nr_ulschsim` and `nr_dlschsim`.
2025-03-21 10:04:45 +00:00
luis_pereira87
c152177327 Harmonize and update Frequency Range computation to the current values specified by the standard
3GPP TS 38.101-1 Version 19.0.0 Table 5.1-1: Definition of frequency ranges
- FR1 from 410 MHz to 7125 MHz
- FR2 from 24.25 GHz to 71 GHz
2025-03-20 20:41:21 +00:00
Robert Schmidt
39d1e3ff4b Merge remote-tracking branch 'origin/clear_ue_unit_tests' into integration_2025_w12 (!3301)
Remove unused NR UE PHY unit tests

Old dead code that won't even compile and that is not testing anything
relevant to current state of code
2025-03-20 18:19:23 +01:00
ndomingues
432e741365 Update FEATURE_SET.md file with initial RedCap support 2025-03-20 18:13:12 +01:00
ndomingues
7235e484a0 Add support for RedCap Msg3 LCID 2025-03-20 18:13:12 +01:00
ndomingues
e73e04543a Add initial support for RedCap
RedCap SIB1-v17-IEs parameters implemented in SIB1
Create an configuration file for RedCap devices
2025-03-20 18:13:12 +01:00
ndomingues
b92af6b6be Implementation of TYPE_INT8 in config_yaml.cpp file 2025-03-20 18:13:12 +01:00
Robert Schmidt
b138b143e4 Increase SCTP receive buffer to capture large messages 2025-03-20 17:20:54 +01:00
Sakthivel Velumani
e775b9ce9a Fix RA-RNTI for long prach formats 2025-03-20 11:12:00 -04:00
Sakthivel Velumani
bab16b7e15 Fix long PRACH slot selection 2025-03-20 10:52:21 -04:00
Laurent THOMAS
78b44a8e17 remove globale llr_layers, that seems to save 700MB, improve CPU and make the code simpler 2025-03-20 14:28:46 +01:00
Guido Casati
ba22130116 Disable EPS NAS security algorithms in 5GMM UE capabilities
* this is only relevant if N26 interface is supported by the AMF
  and the UE is supporting S1

closes #915
2025-03-19 13:23:16 +01:00
francescomani
9502e7537c avoiding segfault in LOGs in case of harq disabled 2025-03-19 10:00:38 +01:00
Robert Schmidt
ec60cc9548 SCTP: avoid assert on partial SCTP message
The receive buffer for SCTP, as of this commit, is 8192. If a message is
larger, we receive only a partial message, which makes the gNB abort.
Remove the abort to not be susceptible to a message intended to crash
the gNB.

Closes: #920
2025-03-18 17:29:53 +01:00
Jaroslava Fiedlerova
82fb9fcc7c Merge branch 'integration_2025_w11' into 'develop'
Integration: `2025.w11`

Closes #848

See merge request oai/openairinterface5g!3309

* !3306 Add a new CI label: nrUE
* !3303 remove wrong assertion for B4 PRACH format
* !3296 fix(nrLDPC_decoder): fix numIter increment
* !3150 Rework of NR UE RA procedures
* !3305 CI: Fix timeout for OC Deployments
* !3307 Add CI UE test for RA with C-RNTI
* !3271 Handle changing N_TA_offset correctly
* !3313 Small fix for jenkins message formatting
2025-03-18 15:21:56 +00:00
Jaroslava Fiedlerova
c4551fecba Merge remote-tracking branch 'origin/fix-jenkins-message-formatting' into integration_2025_w11 (!3313)
Small fix for jenkins message formatting
2025-03-18 11:03:28 +01:00
Bartosz Podrygajlo
f0c926306b Small fix for jenkins message formatting 2025-03-18 10:32:55 +01:00
Robert Schmidt
11d83dd461 Merge branch 'nr-ue-ci' into 'develop'
Add a new CI label: nrUE

Added handling of the nrUE label which limits the amount of CI tests to run. Only tests that use nr-uesoftmodem or phy simulators are triggered.

See merge request oai/openairinterface5g!3306
2025-03-18 09:05:32 +00:00
Robert Schmidt
8cbfa7b797 Use absolute path for copy
Local_Cmd forces use to use absolute paths for copy operations (because
that makes more clear where files are being copied). Use the absolute
path to avoid the corresponding exception.
2025-03-18 09:21:25 +01:00
Robert Schmidt
252c9db246 Correctly express dependency on LOG headers
Various libraries in this commit use the log headers (that is the
direct dependency). The log headers in turn include the T headers
(transitive dependency). Building on gracehopper with its many cores
triggers the build of these libraries before T headers have been
generated.

To resolve this and force the generation of T headers before building
the libraries, correctly express their dependency on the log headers,
which in turn ensures that T headers have been generated.

Depending on log_headers is preferrable because it is really the headers
that we depend on. Using instead e.g., utils, would trigger build of
source files, that we don't need for these libraries.  This commit is
part of a larger cleanup that I have that is not merged yet. Follow-up
work will generalize this in the repo, and ensure that every(!) library
builds.

We have to add CONFIG_LIB, as the log module has a direct dependency
onto the configuration module (it uses it). I am not sure why this was
not relevant before.
2025-03-18 09:21:24 +01:00
Robert Schmidt
4ed801dce3 Add correct T_headers dependencies
T_headers needs to ensure that T headers have actually been created.
This can be forced by depending on generate_T.
2025-03-18 09:21:24 +01:00
Robert Schmidt
f70149933c Use getConnection() to allow build on localhost
Depending on the passed IP addr/host name, getConnection() will select
the right LocalCmd/RemoteCmd, which is better than hardcoded.
2025-03-18 09:21:24 +01:00
Bartosz Podrygajlo
2f09727811 Add a new CI label: nrUE
Added handling of the nrUE label which limits the amount of CI tests to run.
Only tests that use nr-uesoftmodem or phy simulators are triggered.
2025-03-17 17:09:05 +01:00
francescomani
10da6aa418 Merge remote-tracking branch 'origin/add-ci-test-msg3-c-rnti-ra' into integration_2025_w11 2025-03-17 16:55:07 +01:00
Guido Casati
7ba0613ae8 Add test for C-RNTI RA trigger to 24 PRB RFSIM CI pipeline 2025-03-17 16:54:18 +01:00
Guido Casati
c456d6951e Add telnet trigger to force C-RNTI RA on the UE 2025-03-17 16:54:14 +01:00
francescomani
dcf7e4ddcd Merge remote-tracking branch 'origin/issue_907' into integration_2025_w11 2025-03-17 16:50:56 +01:00
Jaroslava Fiedlerova
da8d00d6fa Merge remote-tracking branch 'origin/increase-build-timeouts' into integration_2025_w11 (!3305)
This merge request is for two issues:

1. Core Network Deployment/Undeployment

If the Helm release oai5gcn does not exist (e.g., it was already deleted,
failed during installation), helm uninstall will fail with a "release not
found" error. The --timeout 60s makes Helm wait up to 60 seconds for all
resources to be deleted. If cleanup takes longer (e.g., due to resources
or dependencies), the command fails with a timeout error, potentially
leaving resources in an incomplete state.

2. Increase the timeout value for OpenShift RHEL Builds

The timeout parameter is set as the maximum wait time for the jobs to complete.
If the jobs do not complete within that time, the function logs an error. The
jobs may take longer to complete, the function exits early with an error, even
if the jobs are still progressing.

So, to address both the issues:

We first list all installed Helm releases in the given namespace, returning only
their names. We then pass the release names to helm uninstall, uninstalling all
releases in the namespace. The default value for timeout is 5 minutes.

Increased the timeout value for the RHEL Builds.
2025-03-17 14:08:52 +01:00
Jaroslava Fiedlerova
fe52ef2858 Merge remote-tracking branch 'origin/NR_UE_rework_RA' into integration_2025_w11 (!3150)
Rework of NR UE RA procedures

Closes #848
2025-03-14 18:22:18 +01:00
Jaroslava Fiedlerova
830ceac0ab Merge remote-tracking branch 'origin/fix_numIter' into integration_2025_w11 (!3296)
fix(nrLDPC_decoder): fix numIter increment

The logs of ./nr_ulsim -n100 -m19 -s12 -S12 -z2 -L4 were showing that sometimes
the decoding of one segment was failing while the CRC check succeeded. This was
happening because the iteration counter numIter was not properly managed so that
when the last iteration was successful to decode the segment still numIter at
the exit was equal to numMaxIter plus 1 so that decoding was considered to have
failed. In other words the last iteration if it occured was always wasted.

This commit offers to solve this problem by simply moving the iteration counter
increment at the end of the iteration loop while remaining careful at fixing the
tests relying on this counter.

Post-Scriptum:
After a first review, we decided to make the counter more standard from a C code
perspective. The counter now counts from 0 to numMaxIter minus 1. If it reaches
numMaxIter, it means that decoding was unsuccessful.
2025-03-14 15:50:12 +01:00
Jaroslava Fiedlerova
950ee0a47f Merge remote-tracking branch 'origin/remove_b4_assertion' into integration_2025_w11 !3303
remove wrong assertion for B4 PRACH format

Introduced in !3088 (merged)
2025-03-14 15:47:46 +01:00
Laurent THOMAS
a0721cac16 remove ul_ch_estimates_time that saves 50MB memory to access in RAM, and make better quality scope data passing (no race) 2025-03-14 11:27:01 +01:00
francescomani
44692187b8 use sleep to delay UE to allow the convergence of the IIR filter on PRACH noise measurements at gNB side instead of counting frames 2025-03-13 11:53:58 +01:00
francescomani
7ecedfced0 UE fix when completing RA with C-RNTI in MSG3 2025-03-13 11:53:58 +01:00
francescomani
39920eb337 L2 indication to prepare MSG3 payload in advance
This is required to comply with the standard to flush MSG3 buffer in some occasions and to keep preparing MSG3 payload in advance
2025-03-13 11:53:55 +01:00
Jaroslava Fiedlerova
b9a4ebd11f CI: increase timeout for OC RHEL builds 2025-03-13 10:01:32 +01:00
Jaroslava Fiedlerova
4f9a152f6b CI: remove timeout for OC CN deployments/undeployments
Default value of timeout is 5 minutes.
2025-03-13 10:01:25 +01:00
francescomani
4b191b7d07 error for ra-responsewindow exceeding 10ms instead of assertion (CI test with FAPI would fail otherwise) 2025-03-12 10:30:18 +01:00
francescomani
fc0d762407 move MSG3-C-RNTI flag from RA to MAC structure otherwise it would be reset by RA initialization 2025-03-12 10:30:18 +01:00
francescomani
96f1a2d474 implementation of RAR response window timer suspension
(this is needed because it might expire while MSG2 is being decoded despite being received inside the window)
2025-03-12 10:30:17 +01:00
francescomani
3f35d462e9 separate DL and UL timers at UE 2025-03-12 10:30:17 +01:00
francescomani
65bc749ee6 start the rar reception window in PRACH slots but take into account the additional slots difference wrt when we actually would need to start it (in first DCI occasion) 2025-03-12 10:30:17 +01:00
francescomani
5df6153024 remove unnecessary nr_ue_manage_ra_procedure function 2025-03-12 10:30:17 +01:00
francescomani
dcc17a9d70 signaling RRC RA problems (leading to possible radio link failure) 2025-03-12 10:30:17 +01:00
francescomani
e958822a73 Procedures for Contention Resolution 2025-03-12 10:21:27 +01:00
francescomani
cc154da549 Procedures for Random Access Response reception 2025-03-12 10:21:27 +01:00
francescomani
108fdae159 removing unnecessary nr_Msg1_transmitted function 2025-03-12 10:15:49 +01:00
francescomani
878bbc65ad assertion for handling of RO mask 2025-03-12 10:15:49 +01:00
francescomani
9f3f7b041c clearing old structures and functions for rach occasions 2025-03-12 10:15:49 +01:00
francescomani
24fed617b5 reworking prach scheduler to use new rach occasion information 2025-03-12 10:15:49 +01:00
francescomani
8f1661c66c PRACH occasion configuration 2025-03-12 10:11:38 +01:00
francescomani
220af3f669 move function to build ssb list after common configuration (reception of SSB information)
also removed unnecessary BWP dependence
2025-03-12 10:11:38 +01:00
francescomani
a7e3e8a312 harmonization of functions to get info from PRACH config tables 2025-03-12 10:11:38 +01:00
francescomani
95971514a0 Random Access Resource selection for 4- and 2-step RA 2025-03-12 09:49:54 +01:00
francescomani
60920ed161 avoid unnecessary call to nr_write_ce_msg3_pdu
this is for do-ra mostly and it was just called to compute MSG3 size which is fixed and known
2025-03-12 09:49:54 +01:00
francescomani
c17881e8d5 implmenent RA trigger for PDCCH order (DCI initiated RA) 2025-03-12 09:49:54 +01:00
francescomani
796c2a61a3 improvements in RA init procedures according to 5.1.1 in 38.321 2025-03-12 09:49:54 +01:00
francescomani
939ce850a5 improved management of RA functions at UE 2025-03-12 09:49:54 +01:00
Jaroslava Fiedlerova
60b0c1827d Merge branch 'integration_2025_w10' into 'develop'
Integration: `2025.w10`

See merge request oai/openairinterface5g!3299

* !3265 Remove some unnecessary extern files
* !3288 FeedbackDisabled removed from RA
* !3294 Fix OAI UE uplink_frequency in FDD mode
* !3282 Use common function to prepare DL PDUs in gNB RA
* !3290 Fix get_nr_prach_info_from_index() for FDD and long format
* !3244 Add F1 handover CI test
* !3292 Ensure clean exit of NR UE
* !3298 Preventing segmentation fault in print_rrc_meas (if reviewed and CI is OK)
* !3297 Reset timing_advance on sync/re-sync
* !3289 use slot type for slots in NR
2025-03-12 07:41:54 +00:00
francescomani
c7b561ef82 remove wrong assertion for B4 PRACH format 2025-03-11 12:09:45 +01:00
francescomani
20accaaceb Merge remote-tracking branch 'origin/use_slot_type' into integration_2025_w10 2025-03-10 18:02:28 +01:00
francescomani
f27ab2d85a Merge remote-tracking branch 'origin/Reset_timing_advance' into integration_2025_w10 2025-03-10 18:01:54 +01:00
francescomani
e9338e566b Merge remote-tracking branch 'origin/issue921' into integration_2025_w10 2025-03-10 17:46:20 +01:00
francescomani
73e96220fb remove unused frame config ue phy unit test and all nr ue phy test folder 2025-03-10 17:31:04 +01:00
francescomani
272344df48 remove unused SSB ue phy unit tests 2025-03-10 17:01:41 +01:00
francescomani
a936c88fb5 remove unused srs ue phy unit test 2025-03-10 16:26:33 +01:00
Romain Beurdouche
6b660e4091 fix(nrLDPC_decoder): Cleaning LDPC iteration accounting in NR
The idea is to make LDPC iteration accounting more standard from a C coding perspective by making two changes:
1. Now the iteration counter starts at 0 for the first iteration and goes up to max_ldpc_iterations - 1 for the last iteration.
   If it is equal to max_ldpc_iterations, it means that decoding failed.
2. A chain of useless returns in the UE DLSCH decoding call chain was removed.
2025-03-10 15:11:19 +00:00
Bartosz Podrygajlo
75f04874d1 Handle changing N_TA_offset on the UE correctly in higher layers
Send new N_TA_offset in config_request to PHY. Remove N_TA_offset update
from ta_command.
2025-03-10 16:00:54 +01:00
francescomani
ee22097354 remove unused harq ue phy unit test 2025-03-10 15:51:00 +01:00
francescomani
003a2ad669 remove unused pucch ue phy unit test 2025-03-10 15:50:18 +01:00
Bartosz Podrygajlo
5acb37c3e2 Handle changing N_TA_offset correctly
Handle N_TA_offset update the same way timing advance changes are handled:
modify writeBlockSize to ensure continuous transmission. Also address possible
data races by making sure the new timing_advance/N_TA_offset is only read
once from global memory.
2025-03-10 15:18:31 +01:00
francescomani
f184293ec0 all CSI measurement report handling is disabled in phytest mode gNB, this commit allows RSRP measurements handling 2025-03-10 09:53:48 +01:00
francescomani
e387747af0 Merge remote-tracking branch 'origin/clean-ue-exit' into integration_2025_w10 2025-03-10 09:30:39 +01:00
francescomani
7506d6343e Merge remote-tracking branch 'origin/f1-handover-minor-fixes' into integration_2025_w10 2025-03-10 09:17:05 +01:00
Guido Casati
501ac2c7d2 Add handover to rfsim F1 CI test
Added 3 way F1 handover test with data exchange in the F1 pipeline.
The major change is that the UE is acting as a server in the handover
scenarion, so it needs to comply with the changes in !3280.
2025-03-07 15:46:54 +01:00
francescomani
46031d5f1e Merge remote-tracking branch 'origin/RA_common_dl_pdus' into integration_2025_w10 2025-03-07 15:12:24 +01:00
francescomani
14ab06c641 Merge remote-tracking branch 'origin/long_prach_fdd_fix' into integration_2025_w10 2025-03-07 15:06:48 +01:00
francescomani
0a8ffacda3 prevent segfault in print_rrc_meas 2025-03-07 14:19:14 +01:00
francescomani
aaa9bcd11e Merge remote-tracking branch 'origin/Fix_FDD_uplink_frequency' into integration_2025_w10 2025-03-07 08:38:04 +01:00
francescomani
fecea84ced Merge remote-tracking branch 'origin/feedback_disabled_ra' into integration_2025_w10 2025-03-07 08:36:41 +01:00
francescomani
e92f3484b6 Merge remote-tracking branch 'origin/remove_some_mac_extern' into integration_2025_w10 2025-03-07 08:35:47 +01:00
Bartosz Podrygajlo
99e67dc599 Ensure clean exit of NR UE
- Shutdown DL/UL actors
 - Join the main/stat UE threads
2025-03-07 06:19:15 +01:00
luis_pereira87
f765352be7 Reset timing_advance on sync/re-sync
This prevents the UE to use an outdated timing_advance after a re-sync. It prevents the UE to send a PRACH with a wrong TA, thus preventing a RAPID mismatch in Msg2 (example: '[UE 0][RAPROC][0.0] Received RAR preamble (29) doesn't match the intended RAPID (30)')
2025-03-06 16:25:42 +00:00
luis_pereira87
1d84b6d07d Fix OAI UE uplink_frequency in FDD mode 2025-03-06 13:30:58 +00:00
Romain Beurdouche
b6bedf1216 fix(nrLDPC_decoder): fix numIter increment
The logs of `./nr_ulsim -n100 -m19 -s12 -S12 -z2 -L4` were showing that sometimes the decoding of one segment was failing while the CRC check succeeded.
This was happening because the iteration counter `numIter` was not properly managed so that when the last iteration was successful to decode the segment
still `numIter` at the exit was equal to `numMaxIter` plus 1 so that decoding was considered to have failed.
In other words the last iteration if it occured was always wasted.

This commit offers to solve this problem by simply moving the iteration counter increment at the end of the iteration loop
while remaining careful at fixing the tests relying on this counter.
2025-03-06 13:03:14 +00:00
Sakthivel Velumani
520c8aed38 Fix get_nr_prach_info_from_index() for FDD and long format 2025-03-05 12:02:43 -05:00
francescomani
d8911ff19d use slot type for slots in NR 2025-03-04 18:04:12 +01:00
francescomani
026b42aa1a FeedbackDisabled is sent in RRCSetup, the UE doesn't have it during MSG4 reception, it can't be used
the standard in 213 8.4 says: "In response to the PDSCH reception with the UE contention resolution identity, the UE transmits HARQ-ACK information in a PUCCH."
2025-03-04 15:33:18 +01:00
Jaroslava Fiedlerova
0515cf98b3 Merge branch 'integration_2025_w09' into 'develop'
Integration: `2025.w09`

See merge request !3284

* !3088 Support for long PRACH formats
* !3266 Add optional UTC time stamp to the logging module
* !3280 Changes required for UE to work as a rfsim server with channel modelling
* !3279 Fix UL-MCS when UL inactivity and no data
* !3283 Limit amp_dmrs to 16 bit signed max
2025-03-04 13:05:20 +00:00
francescomani
263ed618cb adding static to tables and renaming the file 2025-03-03 17:20:36 +01:00
francescomani
3852320af5 improvements in ul_port_config function 2025-03-03 17:00:26 +01:00
francescomani
a04e7af63e formatting 2025-03-03 17:00:26 +01:00
francescomani
06e66330ab remove unnecessary extern bandtable declaration 2025-03-03 17:00:26 +01:00
francescomani
c898a9f269 function to get RV replacing extern vector 2025-03-03 17:00:26 +01:00
francescomani
59d2809450 remove nr_rrc_extern.h 2025-03-03 17:00:26 +01:00
francescomani
67cf66c65c remove mac_extern at UE 2025-03-03 17:00:26 +01:00
francescomani
f265729e68 functions for 7-3-1-1-2 tables 2025-03-03 17:00:26 +01:00
francescomani
9aafec3e57 include header for mac_rlc_data_ind 2025-03-03 17:00:26 +01:00
francescomani
ab11e1a58c function for precoding information parameters 2025-03-03 17:00:26 +01:00
francescomani
0565b99900 function for backoff indicator table 2025-03-03 17:00:26 +01:00
francescomani
9c16a323fe function to handle antenna port tables 2025-03-03 17:00:26 +01:00
francescomani
cf9b19a855 remove unused tables from UE mac_extern.h 2025-03-03 17:00:26 +01:00
francescomani
38734ee31c remove nr_mac_extern file 2025-03-03 17:00:26 +01:00
francescomani
00ac4f0b46 functions to read BSR tables 2025-03-03 17:00:26 +01:00
francescomani
26c94a34c4 make precoding tables local and remove them from common files 2025-03-03 17:00:26 +01:00
francescomani
2f6b80b444 remove unnecessary Type0-PDCCH externs 2025-03-03 17:00:26 +01:00
francescomani
302c39fa71 Merge remote-tracking branch 'origin/limit-amp-param' into integration_2025_w09 2025-03-02 15:31:18 +01:00
francescomani
ce4dfe0f1b Merge remote-tracking branch 'origin/fix-ul-mcs' into integration_2025_w09 2025-03-01 17:01:19 +01:00
francescomani
837237a3e6 Merge remote-tracking branch 'origin/rfsim-multichannel' into integration_2025_w09 2025-03-01 16:54:18 +01:00
francescomani
33bfeb500d Merge remote-tracking branch 'origin/add-utc-timestamp' into integration_2025_w09 2025-03-01 16:47:01 +01:00
francescomani
10060982c0 Merge remote-tracking branch 'origin/ue-long-prach' into integration_2025_w09 2025-03-01 16:34:48 +01:00
Guido Casati
d16de2aae4 Remove magic numbers and use MAX_DRBS_PER_UE in nr_initiate_handover 2025-02-28 14:29:00 +01:00
Guido Casati
e2369656a7 Remove unused param in gnb-cu.sa.f1.conf 2025-02-28 14:29:00 +01:00
Guido Casati
89547f8a0c Handle null pointers and improve logs in process_Event_Based_Measurement_Report 2025-02-28 14:28:59 +01:00
Guido Casati
f5d8debdcb Cleanup outdated comments 2025-02-28 14:28:59 +01:00
Guido Casati
6370ad25fa Use calloc_or_fail whenever possible 2025-02-28 14:28:59 +01:00
Bartosz Podrygajlo
8672513517 Allow >1 channel models on rfsim server
Use `rfsimu_channel_ue1`, `rfsimu_channel_ue2`, etc. if you want to
use different channel models for each client. The client connection
order determines its channel model name.
2025-02-28 13:53:10 +01:00
Bartosz Podrygajlo
953e4a448b Command line option for rfsim server hanging workaround
Enable/disable workaround based on a new option "hanging-workaround".
This addresses an issue where the workaround will trigger even if there
is no risk of a permanent lockup of the system.
2025-02-28 13:53:06 +01:00
Bartosz Podrygajlo
e4b012555f Fix possible deadlock in NR UE
Remove pthread_mutex_init call from nr_ue_init_mac. The function is
reentrant causing mutex overwrite and possible hanging of the NR UE.
2025-02-28 12:35:39 +01:00
Jaroslava Fiedlerova
95e661de6f Add log option for UTC time stamp
If "utc_time" is selected, log lines are prepended with the UTC time,
formatted as YYYY-MM-DD hh:mm:ss.ssssss UTC.

The documentation has been updated. For other time methods, additional
description of what they show has been added.
2025-02-28 12:15:57 +01:00
Robert Schmidt
8c224f681c Limit TX_AMP to 16bit max
As parent.
2025-02-28 11:41:42 +01:00
Robert Schmidt
4901467e6f Limit amp_dmrs to 16 bit signed max
amp_dmrs is used to scale individual 16bit samples. hence, limit it to
the signed maximum of 16 bits.
2025-02-28 11:39:30 +01:00
francescomani
f50f3a34cd use common prepare_dl_pdus function also for MSG2 2025-02-27 16:56:27 +01:00
francescomani
d31f6ef09b just moving prepare_dl_pdus before MSG2 function 2025-02-27 16:34:25 +01:00
francescomani
bd3e2e7b62 making prepare_dl_pdus function more general 2025-02-27 16:33:17 +01:00
francescomani
40788580ea remove unnecessary tbs function 2025-02-27 16:02:37 +01:00
rmagueta
cbf0ca9ad7 Fix UL-MCS when UL inactivity and no data 2025-02-26 16:06:50 +00:00
Robert Schmidt
f0fce7c167 Merge branch 'integration_2025_w08' into 'develop'
Integration: `2025.w08`

Closes #772

See merge request oai/openairinterface5g!3273

* !3263 Free ITTI message after receiving it at MAC from RRC
* !3268 Upgrade SIMDe commit
* !3269 chore(ci): change image rentention from 4weeks to 3weeks
* !3227 fix(nrLDPC_coding): timers in DL encoding, fix(ldpctest): Confusion in sizes
* !3270 Update of gNB-N300-Timing-Phytest threshold
* !3272 Fix: write NSSAI info of F1AP Cell Info struct
* !3259 UE DCI no candidates
* !3264 Fix "Received Nack" log for Msg4/MsgB and minor improvement in RA logs
* !3228 Add option to use global noise power for all RX channels in RFSimulator
* !2725 Use 5G-S-TMSI as UE identity in RRCSetupRequest
2025-02-25 22:58:21 +00:00
Sakthivel Velumani
591e009326 Fix prach K,kbar for mu 0 2025-02-25 11:58:41 -05:00
Sakthivel Velumani
94abbf247f Modified CI config file of NTN test
NTN test uses long PRACH format (format 0).
2025-02-25 11:58:41 -05:00
Sakthivel Velumani
a3ba41b234 Don't do OFDM mod on PRACH slots
set number of prach slots in prach_vars in first slot and set as
inactive in last slot so we can skip OFDM modulation in slots that
already has prach.
2025-02-25 11:58:41 -05:00
Sakthivel Velumani
a635b4b441 UE PRACH signal generation optimization
Use memcpy in nr_prach.c to fill txdata buffer.

Remove global tables related to PRACH generation.

Add new function to compute modulo multiplicative inverse and use it
directly to get inverse instead of LUT.

Removed nr_ru table and compute the values in-place.

In UE, added new flag root_seq_computed in nrUE_config to only compute
the sequence once after new nrUE_config is received.
2025-02-25 11:58:41 -05:00
Sakthivel Velumani
424b4f4daa Add processing time stats for PRACH 2025-02-25 11:58:41 -05:00
Sakthivel Velumani
4814443ba4 Fix RA-RNTI computation according to 3GPP
t_id for long prach formats is computed with mu = 0.
2025-02-25 11:58:41 -05:00
Sakthivel Velumani
ecbb0bab5e update PRACH tracer 2025-02-25 11:58:41 -05:00
Sakthivel Velumani
611bbb5265 Use tx power from prach PDU instead of constant 2025-02-25 11:58:41 -05:00
Sakthivel Velumani
cf0206e7c6 Fix scheduler for long prach
Long PRACH extends beyond a slot. Changes necessary to mark future slots
that may contain prach in ru, phy and mac functions.

In RU, the PRACH IDFT is done only after receiving last slot and marks
for L1 to start processing. The L1 processes at the last prach slot and
reports to MAC with the first slot index.

In MAC scheduler, the VRB for future slots are also marked as used.
PRACH scheduler is called in advance one frame minus num prach slots.
2025-02-25 11:58:41 -05:00
Sakthivel Velumani
94c74f4a1d fix long prach slot selection 2025-02-25 11:58:38 -05:00
Jaroslava Fiedlerova
e03c15e85b Merge remote-tracking branch 'origin/nr-ue-nas-5g-s-tmsi' into integration_2025_w08 (!2725)
Use 5G-S-TMSI as UE identity in RRCSetupRequest

This MR includes the following implementation:

- Handle 5G-S-TMSI in RRCSetup:
  - Set the ue-Identity to ng-5G-S-TMSI-Part1 in RRCSetupRequest and
  - If RRCSetup is received in response to an RRCSetupRequest: set the
    ng-5G-S-TMSI-Value to ng-5G-S-TMSI-Part2 in do_RRCSetupComplete

TS 38.331 5.3.3.3 Actions related to transmission of RRCSetupRequest message:

The UE shall set the contents of RRCSetupRequest message as follows:
1> set the ue-Identity as follows:
2> if upper layers provide a 5G-S-TMSI:
3> set the ue-Identity to ng-5G-S-TMSI-Part1;

- Pass 5G-S-TMSI to RRC when NAS receives GUTI in Registration Accept
  - NAS extracts GUTI from Registration Accept
  - send ITTI indication from NAS to RRC when GUTI is available and store
    5G-S-TMSI in RRC instance
- Rework of Initial UE message handling in RRCSetupComplete: simplify code and memory management
- Fix for integrity failure after UE comes back from RRC IDLE
- Other NAS fixes

Note:
- Initial implementation of Initial NAS Message: Service Request -> moved to !3065 (merged)
- Rework of Registration Request added to !3176 (merged)

Closes #772
2025-02-25 11:35:13 +01:00
Jaroslava Fiedlerova
b35c58daae Merge remote-tracking branch 'origin/rfsim-global-noise' into integration_2025_w08 (!3228)
Add option to use global noise power for all RX channels in RFSimulator

Added new command line option to rfsimulator: noise_power_dBFS. This options
allows the user to configure noise power in dBFS added instead of the
per-channel value.

This makes it so noise is not accumulated per channel reaching higher than
expected values.

The dBFS unit allows easy configuration. The gNB by default uses -36 dBFS
setting. e.g. to reach 3dB SNR one should set the noise_power_dBFS value to -39.
2025-02-25 10:23:46 +01:00
Sakthivel Velumani
b144ca7049 fix delta_preamble for long format 2025-02-23 16:18:01 -05:00
Sakthivel Velumani
4bfc0147ce ue mac changes for long prach
Fix bug in talbe 38.211 6.3.3.2-1 for FR2.
2025-02-23 16:18:01 -05:00
Sakthivel Velumani
8f5aa740bd Fix function nr_get_prach_mu for L839
function returns mu of UL BWP if msg1-SubcarrierSpacing absent instead
of asserting. The mu retured by this function is used to compute the
slot number of PRACH. In case of long format, the slot number is as per
UL mu.
2025-02-23 16:17:58 -05:00
Jaroslava Fiedlerova
09a793eea5 Merge remote-tracking branch 'origin/Improve-RA-logs' into integration_2025_w08 (!3264)
Fix "Received Nack" log for Msg4/MsgB and minor improvement in RA logs

Fix "Received Nack" log for Msg4/MsgB, in 4-Step RA. When there is a Msg4 NACK,
we have this log:

[NR_MAC]   (UE 91db) Received Nack in MsgB, preparing retransmission!

This MR fixes the message and now works correctly both in 4-Step RA and 2-Step RA.
Other additional but minor improvement in RA logs.
2025-02-21 14:53:25 +01:00
Jaroslava Fiedlerova
fcd7e76143 Merge remote-tracking branch 'origin/issue903' into integration_2025_w08 (!3259)
UE DCI no candidates

Do not schedule DCI in MAC UE if there are no candidates
2025-02-21 14:52:43 +01:00
Jaroslava Fiedlerova
855f8c715b Merge remote-tracking branch 'origin/fix-f1ap-cell-info-slice' into integration_2025_w08 (!3272)
Fix: write NSSAI info of F1AP Cell Info struct

During refactoring, the previously implemented NSSAI field of the cell
info structure was not written to F1AP ASN.1 structures anymore;
eq_f1ap_cell_info() also conveniently omitted the corresponding equality
check. Add this back so the CU can correctly receive the NSSAI in case
of F1 split operation.

Fixes: f278b008 ("Add encoding/decoding library for F1AP Setup
Request (Interface Management) ")
2025-02-21 14:27:56 +01:00
Jaroslava Fiedlerova
b7c5e13e20 Merge remote-tracking branch 'origin/update_timing_phytest' into integration_2025_w08 (!3270)
Update of gNB-N300-Timing-Phytest threshold

Current results are in some cases well below the current thresholds. We should
periodically adapt them to actual values so that the test is meaningful.
2025-02-21 14:26:19 +01:00
Jaroslava Fiedlerova
01431a0e3f Merge remote-tracking branch 'origin/nrLDPC_coding_improvements_3' into integration_2025_w08 (!3227)
fix(nrLDPC_coding): timers in DL encoding, fix(ldpctest): Confusion in sizes

Main improvements:

1. fix(ldpctest): Confusion in sizes
   IMPORTANT: This fix makes that ldpctest now works with BG2 and K' != K!
   (Worth double checking with more cases than I did check with though)
   The variable block_length had an ambiguous role and was used as both K and
   Kprime. This was leading to arrays with wrong sizes and functions with wrong
   arguments. Now there is not anymore block_length but K and Kprime.
   Kprime can be set with the command line argument -l.
   There was also some problems with array allocation for segments with length
   not divisible by 8. A proper sizing with ((size_in_bits + 7) & ~7) / 8 was
   used.
   A proper masking of the last byte containing payload bits was also added to
   keep filler bits to 0 after random initialization.

2. fix(nrLDPC_coding): timers in DL encoding
   While timers were available for rate matching and interleaving in the new
   interface, these timers were not merged to rate matching and interleaving
   timers in nr_dlsch_coding.
2025-02-21 14:23:24 +01:00
Jaroslava Fiedlerova
76eb5c1732 Merge remote-tracking branch 'origin/image-retention' into integration_2025_w08 (!3269)
chore(ci): change image rentention from 4weeks to 3weeks

The cluster image registry is getting full. At the moment we have limited
storage so we should reduce the retention period.
2025-02-21 14:05:31 +01:00
Jaroslava Fiedlerova
5817a35dd3 Merge remote-tracking branch 'origin/Upgrade_SIMDe' into integration_2025_w08 (!3268)
Upgrade SIMDe commit

Upgrade SIMDe commit to the latest: c7f26b73ba8e874b95c2cec2b497826ad2188f68
2025-02-21 14:04:42 +01:00
Jaroslava Fiedlerova
35d28312d1 Merge remote-tracking branch 'origin/ITTI_msg_leak' into integration_2025_w08 (!3263)
Free ITTI message after receiving it at MAC from RRC

Sanitize reporting the following leaks. This small commit seems to fix them.

```
Direct leak of 9888 byte(s) in 103 object(s) allocated from:
    #0 0x7fea59b60a06 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:153
    #1 0x556dd89473e7 in itti_malloc /home/francesco/openairinterface5g/common/utils/ocp_itti/intertask_interface.cpp:64
    #2 0x556dd8947b76 in itti_alloc_new_message /home/francesco/openairinterface5g/common/utils/ocp_itti/intertask_interface.cpp:93
    #3 0x556dd87100a1 in nr_rrc_ue_decode_NR_BCCH_BCH_Message /home/francesco/openairinterface5g/openair2/RRC/NR_UE/rrc_UE.c:858
    #4 0x556dd87100a1 in rrc_nrue /home/francesco/openairinterface5g/openair2/RRC/NR_UE/rrc_UE.c:2013
    #5 0x556dd871392e in rrc_nrue_task /home/francesco/openairinterface5g/openair2/RRC/NR_UE/rrc_UE.c:1943
    #6 0x7fea59a16608 in start_thread /build/glibc-FcRMwW/glibc-2.31/nptl/pthread_create.c:477

Direct leak of 96 byte(s) in 1 object(s) allocated from:
    #0 0x7fea59b60a06 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:153
    #1 0x556dd89473e7 in itti_malloc /home/francesco/openairinterface5g/common/utils/ocp_itti/intertask_interface.cpp:64
    #2 0x556dd8947b76 in itti_alloc_new_message /home/francesco/openairinterface5g/common/utils/ocp_itti/intertask_interface.cpp:93
    #3 0x556dd86d707c in nr_rrc_ue_process_masterCellGroup /home/francesco/openairinterface5g/openair2/RRC/NR_UE/rrc_UE.c:1094
    #4 0x556dd86faed9 in nr_rrc_process_rrcsetup /home/francesco/openairinterface5g/openair2/RRC/NR_UE/rrc_UE.c:1138
    #5 0x556dd86faed9 in nr_rrc_ue_decode_ccch /home/francesco/openairinterface5g/openair2/RRC/NR_UE/rrc_UE.c:1200
    #6 0x556dd870a518 in rrc_nrue /home/francesco/openairinterface5g/openair2/RRC/NR_UE/rrc_UE.c:2028
    #7 0x556dd871392e in rrc_nrue_task /home/francesco/openairinterface5g/openair2/RRC/NR_UE/rrc_UE.c:1943
    #8 0x7fea59a16608 in start_thread /build/glibc-FcRMwW/glibc-2.31/nptl/pthread_create.c:477

Direct leak of 88 byte(s) in 1 object(s) allocated from:
    #0 0x7fea59b60a06 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:153
    #1 0x556dd89473e7 in itti_malloc /home/francesco/openairinterface5g/common/utils/ocp_itti/intertask_interface.cpp:64
    #2 0x556dd8947b76 in itti_alloc_new_message /home/francesco/openairinterface5g/common/utils/ocp_itti/intertask_interface.cpp:93
    #3 0x556dd86be183 in nr_rrc_process_sib1 /home/francesco/openairinterface5g/openair2/RRC/NR_UE/rrc_UE.c:337
    #4 0x556dd870c3b3 in nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message /home/francesco/openairinterface5g/openair2/RRC/NR_UE/rrc_UE.c:954
    #5 0x556dd870c3b3 in rrc_nrue /home/francesco/openairinterface5g/openair2/RRC/NR_UE/rrc_UE.c:2015
    #6 0x556dd871392e in rrc_nrue_task /home/francesco/openairinterface5g/openair2/RRC/NR_UE/rrc_UE.c:1943
    #7 0x7fea59a16608 in start_thread /build/glibc-FcRMwW/glibc-2.31/nptl/pthread_create.c:477
```
2025-02-21 14:02:37 +01:00
Robert Schmidt
2cc3f3bcac Fix: write NSSAI info of F1AP Cell Info struct
During refactoring, the previously implemented NSSAI field of the cell
info structure was not written to F1AP ASN.1 structures anymore;
eq_f1ap_cell_info() also conveniently omitted the corresponding equality
check. Add this back so the CU can correctly receive the NSSAI in case
of F1 split operation.

Fixes: f278b00837 ("Add encoding/decoding library for F1AP Setup
  Request (Interface Management) ")
2025-02-21 07:42:48 +01:00
Sagar Arora
5f2f907d53 chore(ci): change image rentention from 4weeks to 3weeks
Signed-off-by: Sagar Arora <sagar.arora@openairinterface.org>
2025-02-20 08:31:50 +01:00
francescomani
66d8cf0f13 update of timing test thresholds to reflect current values 2025-02-19 18:28:04 +01:00
Bartosz Podrygajlo
c6ed26fca3 Add a metric for rfsimulator channel emulator performance
Add a print and method to calculate rfsimulators channel emulation performance.
The counter unit is Megasample/second (Msps).
2025-02-19 16:18:16 +01:00
Bartosz Podrygajlo
2fb541a68e Add option to use global noise power for all RX channels in RFSimulator
Added new command line option to channelmod: noise_power_dBFS. This options
allows the user to configure noise power in dBFS added instead of the per-channel
value.

This makes it so noise is not accumulated per channel reaching higher than expected
values.

The dBFS unit allows easy configuration. The gNB by default uses -36 dBFS setting.
To reach 3dB SNR one should set the noise_power_dBFS value to -39.

To configure using command line use --channelmod.noise_power_dBFS -50. Using this
setting the gNB and nrUE connect without issue.
2025-02-19 16:05:38 +01:00
Bartosz Podrygajlo
82fbb6bb04 Remove unused noise_power_dB field in rfsimulator_state_t 2025-02-19 16:05:29 +01:00
Guido Casati
89ca89ea4b Address integrity failure after UE reconnects from RRC IDLE
After a new connection from RRC IDLE, an integrity failure occurs. This
commit is addressing this issue to pass the integrity check.

* Reset ciphering and integrity algorithms when going into RRC IDLE

* Use uplink NAS COUNT in Registration Request for initial KgNB derivation
  * Temporarily deriving UP protection keys in Registration Request
  * Note: AS SMC handling should be done according to 33.501 §6.8.1.1.2.2
2025-02-19 15:07:08 +01:00
Guido Casati
48a307e172 Use 5G-S-TMSI in RRC connection setup procedures
* Use the 5G-S-TMSI stored in RRC to be used as UE identity
* Use 5G-S-TMSI part 1 in RRCSetupRequest encoding (TS 38.331 clause 5.3.3.3)
* Set the ng-5G-S-TMSI-Value in RRCSetupComplete to ng-5G-S-TMSI-Part2 (5.3.3.4 of 3GPP TS 38.331)
* current and only scenario: RRCSetup is received in response to an RRCSetupRequest
2025-02-19 15:02:11 +01:00
luis_pereira87
e1d4ff1126 Upgrade SIMDe commit 2025-02-19 10:32:00 +00:00
francescomani
cb72bd26f4 do not send to L1 DCI PDU if there are no candidates 2025-02-19 10:31:42 +01:00
francescomani
1ce6167c45 free message after receiving it at MAC from RRC 2025-02-18 18:07:44 +01:00
ndomingues
27dccb8bce Fix "Received Nack" log for Msg4/MsgB and minor improvement in RA logs 2025-02-18 14:23:36 +00:00
Guido Casati
c6cc00633f Rework handling of initial NAS message in RRCSetupComplete generation
* use initialNasMsg to store nas messages buffer and length
* buffer is dynamically allocated in generateRegistrationRequest, so do the
  same in NSA and free dynamic allocated data afterwards
2025-02-18 12:47:13 +01:00
Guido Casati
36a39b25a1 Set 5GMM Mode to IDLE when receiving NR_NAS_CONN_RELEASE_IND
> In N1 mode, upon indication from lower layers that the access stratum
  connection has been released, the UE shall enter 5GMM-IDLE mode and
  consider the N1 NAS signalling connection released (3GPP TS 24.501)
2025-02-18 12:47:13 +01:00
Guido Casati
fb318e8e3f Cleanup commented out code in nas_nrue 2025-02-18 12:47:13 +01:00
Guido Casati
ca869d8fd3 Pass to RRC the 5G-S-TMSI extracted from NAS Registration Accept
* NAS -> RRC: RRC receives an ITTI message with NAS 5GMM indication message
  containing the 5G-S-TMSI derived from NAS GUTI
* 5G-S-TMSI is stored in the RRC instance and to be later encoded in the RRCSetup
2025-02-18 12:47:13 +01:00
Guido Casati
4736f97055 Indicate to NAS that the RRC connection has been established with a Connection Establishment Indication
* ITTI from RRC to NAS
* according to 5.3.1.3 of 3GPP TS 24.501
* set 5GMM mode to CONNECTED
2025-02-18 12:47:13 +01:00
Robert Schmidt
6d9c2c35b8 Merge branch 'integration_2025_w07' into 'develop'
Integration: `2025.w07`

Closes #812, #901, #904, #881, and #819

See merge request oai/openairinterface5g!3258

* !3055 Dynamic PDCCH aggregation level
* !3176 Refactor and extend NAS Registration Request
* !3256 Add check on force_local in custom_command CI handling
* !3257 Bugfix in gNB modulated DCI buffer size
* !3249 Improvements in TDD configuration
* !3194 fix NTN LEO scenarios
* !3200 FHI72: remove polling, fix memory leak
* !3127 Optimizations of PDSCH Resource Mapping in nr_dlsch.c/nr_modulation.c
* !3252 \[E2 agent\] Multi RC REPORT service styles support
2025-02-18 11:37:07 +00:00
Francesco Mani
87c83f72cb Fix to receive SIB1 in re-establishment
During re-establishment we still have a valid SIB1 so we don't decode it
again. Then the UE never moves out of UE_RECEIVING_SIB, making
re-establishment impossible. This fixes addresses this.

Fixes: 11b87d8744 ("NR UE: RRC layer now explicitly tells MAC layer
when the RA procedure can be started)"
2025-02-18 10:27:34 +01:00
Robert Schmidt
1114ee3a2d Merge remote-tracking branch 'origin/rc-report-service-fix' into integration_2025_w07 (!3252)
[E2 agent] Multi RC REPORT service styles support

Issue: unforeseen capability of having the same RAN Parameter ID across
different REPORT service styles.

Solution: keep only RAN Parameter IDs from REPORT styles that are
supported by OAI. Implement sequence array where each element is
combination of RIC request ID (unique per RIC SUBSCRIPTION) and Event
Trigger Definition. This way we can properly check further conditions
for a certain RAN Parameter ID. (e.g. if xApp is subscribed to RRC
Connected and/or other modes, for "RRC State Changed To" RAN Parameter
ID)

Next steps: for new RAN Parameter ID, add new sequence array.
2025-02-17 22:10:35 +01:00
Robert Schmidt
651ef3daee Merge remote-tracking branch 'origin/resource_mapping_optim' into integration_2025_w07 (!3127)
Optimizations of PDSCH Resource Mapping in nr_dlsch.c/nr_modulation.c

These changes add SIMD optimizations for Neon/AVX2/AVX512 in the PDSCH
transmit path. The timing improvements are listed here based on the

    nr_dlsim -e25 -R273 -b273 -s30 -x "layers" -y 4 -z 4 -P

benchmark with "layers" 2,3,4 and comparing "PHY proc tx":

273 PRBS, mcs25, 64QAM

peafowl (gcc11,AMD EPYC 9374F)

    2-layer, 4 TX : 431 us (develop 565 us)
    3-layer, 4 TX : 692 us (develop 849 us)
    4-layer, 4 TX : 963 us (develop 1172 us)

stupix (gcc10, Xeon Gold 6354)

    2-layer, 4 TX : 568 us (develop 652 us)
    3-layer, 4 TX : 901 us (develop 1030 us)
    4-layer, 4 TX : 1250 us (develop 1396 us)

matix (gcc14, Ryzen 9 PRO 7945)

    2-layer, 4 TX : 317 us (develop 505 us)
    3-layer, 4 TX : 538 us (develop 779 us)
    4-layer, 4 TX : 767 us (develop 1233 us)
2025-02-17 22:09:26 +01:00
Laurent THOMAS
8a63b01387 merge 2 functions that do the same in one and set better naming 2025-02-17 18:51:21 +01:00
Teodora
9e2c889dba Multi RC REPORT service styles support
Issue: unforeseen capability of having the same RAN Parameter ID across different
REPORT service styles.

Solution: keep only RAN Parameter IDs from REPORT styles that are supported by OAI.
Implement sequence array where each element is combination of RIC request ID (unique per RIC SUBSCRIPTION)
and Event Trigger Definition. This way we can properly check further conditions for a certain RAN Parameter ID.
(e.g. if xApp is subscribed to RRC Connected and/or other modes, for "RRC State Changed To" RAN Parameter ID)

Next steps: for new RAN Parameter ID, add new sequence array.

Co-authored-by: Bischoff <tano.bischoff@hhi.fraunhofer.de>
Co-authored-by: Shrinish Donde <shrinish.donde@hhi.fraunhofer.de>
Co-authored-by: Khanh Toan Pham <khanh.toan.pham@hhi.fraunhofer.de>
2025-02-17 16:33:03 +01:00
Robert Schmidt
f0d6d42aec Merge remote-tracking branch 'origin/fhi72-no-polling' into integration_2025_w07 (!3200)
FHI72: remove polling, fix memory leak

- FHI72 used polling to track the next slot. This is not necessary, a
  simple queue does the job and allows to save one core that was
  previously at 100%
- Remove a workaround to avoid a memory leak (fixes #812); allows to
  also run RFsim/USRP/otehr radios when compiling for FHI72
2025-02-17 15:10:01 +01:00
Robert Schmidt
7d574ffcfb Merge remote-tracking branch 'origin/fix_ntn_leo' into integration_2025_w07 (!3194)
fix NTN LEO scenarios

- gNB: add support for NTN parameter ta-CommonDrift-r17
- NR UE: fix application of NTN TA information
- NR UE: add command line parameter ntn-initial-time-drift to compensate
  time drift during initial sync
- NR UE: fix writeTimestamp inconsistencies
- NR UE: add MAC state UE_RECEIVING_SIB ensuring to start RA only after
  successfully receiving SIBs
- rfsimulator: update earth radius for LEO simulation to match UE
  position in ue.conf file
- update conf files for NTN LEO scenario
- update description how to run NTN scenarios in RUNMODEM.md
- fix: ta-Common is a round-trip-time, not a one-way delay
- NR UE: simplify calculation of next_tx_slot_and_frame by moving up
  assignment of duration_rx_to_tx
- cellbarredNTN indicates notbarred in SIB1 if NTN access is available
- Removed b66 NTN and enabled B254 NTN conf file in CI
- NR UE: RRC layer now explicitly tells MAC layer when the RA procedure
  can be started
- move NTN LEO config to band 254 and update doc/RUNMODEM.md

Closes #901
2025-02-17 15:09:24 +01:00
Laurent THOMAS
ce7bdf71e9 fix simde lacking refix 2025-02-17 11:06:08 +01:00
Jaroslava Fiedlerova
34970d38ef fix in nr_dlsch.c, dmrs_case2b 2025-02-17 10:22:17 +01:00
Raymond Knopp
fa38798521 bugfix in nr_dlsch.c 2025-02-16 23:26:51 +01:00
Thomas Schlichter
0bc46a22c6 move NTN LEO config to band 254 and update doc/RUNMODEM.md 2025-02-14 17:04:47 +00:00
Thomas Schlichter
11b87d8744 NR UE: RRC layer now explicitly tells MAC layer when the RA procedure can be started 2025-02-14 17:04:47 +00:00
Raghavendra Dinavahi
48c8d67393 Removed b66 NTN and enabled B254 NTN conf file in CI 2025-02-14 17:04:47 +00:00
Raghavendra Dinavahi
2b4ca7e47d cellbarredNTN indicates notbarred in SIB1 if NTN access is available
38.331 release 18  section 5.2.2.4.2 indicates that to access NTN, cellbarredNTN in SIB1 should be set to notbarred.
2025-02-14 17:04:47 +00:00
Thomas Schlichter
b3581ce1b8 NR UE: simplify calculation of next_tx_slot_and_frame by moving up assignment of duration_rx_to_tx 2025-02-14 17:04:46 +00:00
Thomas Schlichter
f1ae1025ad fix: ta-Common is a round-trip-time, not a one-way delay 2025-02-14 17:03:56 +00:00
Thomas Schlichter
acac0b21bf update description how to run NTN scenarios in RUNMODEM.md 2025-02-14 17:03:56 +00:00
Thomas Schlichter
cf0a1d6db4 update conf files for NTN LEO scenario
Also added a dedicated conf file for NTN LEO, that can be used for CI.
2025-02-14 17:03:56 +00:00
Thomas Schlichter
3fce7688aa rfsimulator: update earth radius for LEO simulation to match UE position in ue.conf file 2025-02-14 17:03:56 +00:00
Thomas Schlichter
be2ed07911 NR UE: add MAC state UE_RECEIVING_SIB ensuring to start RA only after successfully receiving SIBs 2025-02-14 17:03:56 +00:00
Thomas Schlichter
9b7e39b16f NR UE: fix writeTimestamp inconsistencies
The "writeTimestamp inconsistencies" are coming from the fact that during the actual processing we write `N_TA_offset` samples _and_ `NR_UE_CAPABILITY_SLOT_RX_TO_TX` slots ahead,
but both was not corrently considered in readFrame() and syncInFrame().
Therefore, there was always a warning about a gap in write timestamps as soon the actual processing starts.
2025-02-14 17:03:56 +00:00
Thomas Schlichter
f1ca3066a0 NR UE: add command line parameter ntn-initial-time-drift to compensate time drift during initial sync
The value of ntn_init_time_drift is used at initial sync to compensate for the time drift during initial sync detection.

To perform the initial time and frequency sync, the OAI UE currently takes a snapshot of two frames and then performes PSS correlation, SSS detection and MIB decoding.
Doing this takes much time, several tens of ms. During that time, the DL timing drifts so much, that we immediatedly lose sync again.
Therefore the current OAI UE implementation needs to know the drift rate to compensate for this drift, as we are "blind" while performing the initial sync.

To my undestanding, commercial UEs simply have a faster initial sync, so the DL timing will not drift away too much while performing that initial sync.
2025-02-14 17:03:56 +00:00
Thomas Schlichter
e7122ad789 NR UE: fix application of NTN TA information 2025-02-14 17:03:48 +00:00
Robert Schmidt
590850b03d Merge remote-tracking branch 'origin/issue_904' into integration_2025_w07 (!3257)
Bugfix in gNB modulated DCI buffer size

Closes #904
2025-02-14 15:15:40 +01:00
Robert Schmidt
3f66f8b3ec Merge remote-tracking branch 'origin/ci-script-force-local-fix' into integration_2025_w07 (!3256)
Add check on force_local in custom_command CI handling

The force_local flag was introduced earlier in the main CI script in
order to run a CI test locally.

The flag was still missing in the Custom_Command handling, which was
still targeting the node specified in the test configuration file. This
was causing a failure in the tests with custom commands and therefore
limiting the scenarios that could be run locally.

With this commit, if force_local is enabled the node for the
Custom_Command is set to localhost.
2025-02-14 15:14:37 +01:00
Robert Schmidt
919bfb8cfb Merge remote-tracking branch 'origin/improv_TDD' into integration_2025_w07 (!3249)
Improvements in TDD configuration

Including using the frame structure introduced in !2799 also at the UE
2025-02-14 15:10:22 +01:00
Robert Schmidt
2334f6f522 Merge remote-tracking branch 'origin/nas-issue-881' into integration_2025_w07 (!3176)
Refactor and extend NAS Registration Request

Extended NAS Registration Request generation and encoding according to
8.2.6 of 3GPP TS 24.501. Main topics:

- NAS Registration Type
- NAS KSI
- integrity protection
- NAS container encoding

Improvements:

- Add 5GMM Modes in NAS
- Introduced 5GMM state machine

Fixes:

- add 5GMM Capability IE to Registration Request
- closes #881, #819
2025-02-14 15:08:23 +01:00
Robert Schmidt
bab13b80a2 Merge remote-tracking branch 'origin/dynamic-pdcch' into integration_2025_w07 (!3055)
Dynamic PDCCH aggregation level

The aggregation level search order for PDCCH candidates is modified:

- the search starts from desired_agg_level_index, which is a value from
  0 to 4 proportial to pdcch_cl_adjust.
- pdcch_cl_adjust is a value between 0 and 1 that indicates PDCCH
  channel quality by averaging HARQ DTX rate. A value of 0 means perfect
  channel, a value o 1 means impaired channel.

Also added configuration option for number of PDCCH candidates per
aggregation level.
2025-02-14 10:10:56 +01:00
Bartosz Podrygajlo
095b791929 Add PDCCH UESS aggregation level configuration option
Added uess_agg_levels configuration option which changes the number of PDCCH
candidates per aggregation level.
2025-02-13 10:57:25 +01:00
Bartosz Podrygajlo
16f028dba5 Dynamic PDCCH aggregation level
The aggregation level search order for PDCCH candidates is modified:
 - the search starts from desired_agg_level_index, which is a value from 0 to 4
   proportial to pdcch_cl_adjust.
 - pdcch_cl_adjust is a value between 0 and 1 that indicates PDCCH channel quality
   by averaging HARQ DTX rate. A value of 0 means perfect channel, a value o 1 means
   impaired channel.
2025-02-13 10:57:14 +01:00
francescomani
2bdb1826c9 fix in gnb mod_dci buffer size 2025-02-13 09:34:12 +01:00
Robert Schmidt
e1d7306a43 Reduce indentation, add comment
Reduce one level of indentation, and explain why we wait for
physide_dl_tti callback.
2025-02-13 09:17:01 +01:00
Robert Schmidt
6706c9390d FHI72: Cleanup: Remove first_rx_set
first_rx_set is polling-specific: it makes the polling loop wait to only
check the frame/slot counter once we set it for the first time. However,
that is equivalent to checking the frame/slot directly, which will also
be 0 in the beginning.
2025-02-13 09:17:01 +01:00
Robert Schmidt
0420184518 FHI72: cleanup: remove first_read_set
first_read_set seems to have the function of making frame/slot time
advance only if we started to read the samples in
xran_fh_rx_read_slot(). I interpret that as "only advance the time if
the gNB is reading from xran", which does not make sense to me, because
xran advances the time anyway. Also, polling would not notice, and
no-polling would simply warn about double messages. So the outcome is
likely the same, whether first_read_set is set or not.

I checked in multiple CI runs; it happens that first_read_set is always
set already when oai_xran_fh_rx_callback() is called anyway.
2025-02-13 09:17:01 +01:00
Robert Schmidt
fd77306806 FHI72: make polling configurable in xran_fh_rx_read_slot(), default off
xran_fh_rx_read_slot() uses polling (a loop over cnt++) to wait for the
next frame/slot. The reasons I have been told is "it does not work
differently", or "there are real-time problems". None of those seem to
be true; by default disable polling, and use the queue instead.

It is possible to enable polling with the cmake option
OAI_FHI72_USE_POLLING=ON. Documentation has been updated to inform about
this change.
2025-02-13 09:17:01 +01:00
Robert Schmidt
595a80a3f7 Remove FHI72 memory workaround
The queue L1_rx_out was in place to keep RX/TX processing relatively
"close" to each other (in terms of time, since in RFsim, they might
advance faster than realtime; see also parent commit). This lead to a
memory leak in radios that do not use ru->feprx (no front-end processing
for RX, e.g., PRACH), as the code to read the L1_rx_out messages was
inside a block of if (ru->feprx). Move it out so that the queue is
always read and messages are freed to eliminate the memory leak, and
remove the workaround for FHI72 to avoid this memory leak.

This also allows to run RFsim when compiling FHI72, which was not
possible before this commit.

Closes: #812
2025-02-13 09:17:01 +01:00
Robert Schmidt
99c849c249 Refactor code to wait for free RX job
Some radios (e.g., RFsim) can run faster. A mechanism has been put in
place to keep RX/TX frame/slot numbers not too far from each other.
Refactor in a separate function with documentation to make this clearer.
2025-02-13 09:17:01 +01:00
Robert Schmidt
540d918a09 Detect double sync message and skip frames 2025-02-13 09:17:01 +01:00
Robert Schmidt
0e5bc42e3e FHI72: no poll: use pullNotifiedFIFO(), cleanup code, make compile
Move the extern definition to the header, to avoid type errors.
2025-02-13 09:17:01 +01:00
Robert Schmidt
2cd0bba9c4 notified_fifo: include malloc.h for memalign() 2025-02-13 09:17:00 +01:00
Robert Schmidt
984b917e59 FHI72: Remove unused defines and comments 2025-02-13 09:17:00 +01:00
francescomani
bd7d007ea8 remove global slots_per_frame, use function instead 2025-02-12 18:08:56 +01:00
francescomani
bec43f01a8 use frame_structure in set_tdd_config_nr_ue function 2025-02-12 18:01:56 +01:00
francescomani
ad66c75a33 frame_structure used also at UE 2025-02-12 18:01:51 +01:00
Guido Casati
2333cdabda Add check on force_local in custom_command handling
* The force_local flag was introduced earlier in the main CI script
  in order to run a CI test locally. The flag was missing in the
  Custom_Command handling, which was still targeting the node specified
  in the test configuration file. With this commit, if force_local
  is enabled the node for the Custom_Command is set to localhost.
2025-02-12 15:40:20 +01:00
Raymond Knopp
1d538592fe fixed compilation warnings and minor errors for aarch64 2025-02-12 11:59:52 +01:00
Raymond Knopp
6194b9a525 trace in nr_dlsim : since resource mapping and layer precoding are merged, the indication of timing was reworked in the statistics output 2025-02-12 11:59:52 +01:00
Laurent THOMAS
3edd989aff simplify nr_layer_mapping(), and use all simd sizes for the tail 2025-02-12 11:59:52 +01:00
Laurent THOMAS
9004787171 group two symbol loops to make one with smaller tsack size and smaller variables 2025-02-12 11:59:52 +01:00
Laurent THOMAS
f73afa393e group similar functions in one version, split one too large function in two functions 2025-02-12 11:59:52 +01:00
Laurent THOMAS
eb0dda59ac remove intermediate buffer and memory copy, continue to simplify nr pdsch computation 2025-02-12 11:51:28 +01:00
Laurent THOMAS
2fad8796b1 clean no_ptrs_dmrs_case() 2025-02-12 11:51:28 +01:00
Laurent THOMAS
5ff5d01fb9 simplify and order sizes of SIMD vectors 2025-02-12 11:51:28 +01:00
Laurent THOMAS
9d844135b1 local dmrs_mux and unaligned mod_dmrs 2025-02-12 11:51:28 +01:00
Laurent THOMAS
3ddb2d0502 very coarse grain dlsch computation function break into smaller functions 2025-02-12 11:51:28 +01:00
Laurent THOMAS
d928e68e12 create a separate function to process dlsch ptrs 2025-02-12 11:51:28 +01:00
Laurent THOMAS
5526244ad6 create a function per dlsch_id 2025-02-12 11:51:28 +01:00
Laurent THOMAS
889b4b00e3 SIMD optimizations for Neon/AVX2/AVX512 in the PDSCH transmit path 2025-02-12 11:51:28 +01:00
francescomani
74bcd9963d make relevant frame_structure functions common 2025-02-12 11:49:43 +01:00
francescomani
d0ba1a30e3 use frame_type in frame_structure instead of bool 2025-02-12 11:24:56 +01:00
francescomani
b439816409 use frame structure parameter for slots per frame 2025-02-12 11:24:25 +01:00
Robert Schmidt
ff58b5e169 Merge branch 'integration_2025_w06' into 'develop'
Integration: `2025.w06`

See merge request oai/openairinterface5g!3248

* !3202 Simplify usage of the old segment decoding libraries with the slot coding interface
* !3240 Fix typos in NR_SA_Tutorial_OAI_multi_UE.md
* !3242 Period based phytest bitmap
* !3238 Refactor tun_if.h
* !3000 Improvements for NR dlsim and ulsim
* !3239 Remove inexistant SIMD instruction
* !3246 Deadlock avoidance in rfsimulator
* !3251 nFAPI: make 4-layer on 100MHz work
* !3243 Reset E1 UE contexts after E1 Setup Response
* !3245 Added Support of 35Mhz,45Mhz,70Mhz Bandwidth
* !3219 E1AP enc/dec lib improvements
2025-02-12 06:55:05 +00:00
Robert Schmidt
859494112a Merge remote-tracking branch 'origin/e1ap-lib-improvements' into integration_2025_w06 (!3219)
E1AP enc/dec lib improvements

This MR is including some fixes and improvements for the E1AP library,
focusing mostly on Bearer Context Management:

- struct reorganization: split setup and modification request messages
  into distinct structures, ensuring compliance with 3GPP TS 38.463
  specifications
- add encoding/decoding sub-functions for different IEs
- improvements to Bearer Context Management: Implemented various
  improvements to the E1 Bearer Context Setup Response and Request,
  including the adoption of encoding/decoding sub-functions for
  different IEs
- use lib functions whenever need (e.g. cp_bearer_context_setup_request
  in cucp_cuup_e1ap.c)
- handle optional struct members as pointers
- updated copy/equality check utility functions

EDIT: The MR is also including the changes from !3222 (closed):

> While testing E1 with security enabled for DRBs, it was found that
> data traffic was not functional.
>
> The problem was that security settings were modified in the PDCP
> reestablishment happening when receiving Bearer Context Modification
> Request.
>
> So some restructuring was done.
>
> The actual fix is in 18176297, the others are for support. Basically
> we introduce a boolean to check if the security settings are present in
> Bearer Context Modification Request and we change PDCP security settings
> only if they are.
>
> (Note that in OAI CU security settings are not sent in Bearer Context
> Modification Request, so we could also remove all this, but we need to
> be compatible with other cu-up and/or cu-cp.)
2025-02-11 17:53:40 +01:00
Robert Schmidt
805ed55788 Merge remote-tracking branch 'origin/NR_add_new_BW' into integration_2025_w06 (!3245)
Added Support of 35Mhz,45Mhz,70Mhz Bandwidth

Added Support of 35Mhz,45Mhz,70Mhz Bandwidth for 30Khz Subcarrier
Spacing, Also added 35Mhz, 45Mhz bw for 15Khz Subcarrierspacing.

Referred Spec TS 38.101 v18.6.0 section 5.3.2, table 5.3.2-1
2025-02-11 17:47:59 +01:00
Robert Schmidt
1be038c88b Merge remote-tracking branch 'origin/fix-cuup-assert-reconnect' into integration_2025_w06 (!3243)
Reset E1 UE contexts after E1 Setup Response

38.463 sec. 8.2.3 says

> This procedure also re-initialises the E1AP UE-related contexts (if
> any) and erases all related signalling connections in the two nodes
> like a Reset procedure would do.

Hence, delete all contexts after reception of E1 Setup Response. This
minimizes a risk of receiving an E1 bearer setup req for an existing UE,
which currently leads to an assert [we trust the CU-CP does not send the
same UE ID twice, as we only "mirror" the existing UE ID].  After this
MR, this is what happens if these entities fail:

- CU-CP fails: all context lost implicitly, upon reconnection, both DU
  and CU-UP reset all contexts (like "start from zero")
- DU fails: CU-CP triggers NGAP UE context release request immediately
  (radio connection with UE lost), all UE contexts attached to this DU
  cleared (like "start from zero" for affected DU)
- CU-UP fails: initially, nothing (UE has no user plane); upon
  reconnection of CU-UP, CU-CP triggers NGAP UE context release request
  (cause radio connection with UE lost) and sends F1 Reset to DU, all UE
  contexts associated to this DU cleared (like "start from zero")

for the last case, a possible improvement could be to use the F1 Reset
message to only clear affected UE conetxts. I chose not to do this,
because this MR is very big now already, and possible "victim" UEs
that were not at that CU-UP will reconnect as well
2025-02-11 17:45:14 +01:00
Guido Casati
ac6b1b1894 Enable integrity in E1 SABOX CI test 2025-02-11 14:04:32 +01:00
Cedric Roux
410446cbe9 e1: no need to pass security information since it does not change
In Bearer Context Modification Request, the security information
field is needed only if we change the PDCP algorithms/keys. Since we
don't, no need to pass it.

Let's keep the old code, maybe the current understanding of the
specifications is wrong.
2025-02-11 14:04:32 +01:00
Cedric Roux
1273446804 e1: change security settings only if parameters present
If the Bearer Context Modification Request does not contain security
information, the PDCP entity shall keep the currently configured security
settings.

Passing -1 for ciphering_algorithm and integrity_algorithm is the way
to implement this logic.
2025-02-11 14:04:32 +01:00
Cedric Roux
182b05bd5c e1: security information is optional in bearer modification
Check if the IE is memory allocated to deal with presence/absence of this information
element in Bearer Context Modification Request and add encoding/decoding
in the code.

Note that for decoding the integrity settings may be absent, in which
case we consider NIA0 to be used (no integrity protection). To be refined
if needed.

And for encoding, we always encode integrity settings, even if it's NIA0.
May also be refined if needed.
2025-02-11 14:04:32 +01:00
Cedric Roux
a1eb8f35fb bugfix: use correct algorithm and derive keys accordingly
This was not a big problem, but we were advertising wrong
algorithm and deriving keys using this wrong algorithm in case
DRB ciphering and/or integrity was not active. (Say SRBs
are configured with NIA2 but DRBs are configured without
integrity, we would advertise NIA2 and send the integrity
key derived for NIA2, instead of NIA0 for both.)

It was not a problem because in the PDU Session Resource To Setup
item, there is "securityIndication" which we use to effectively
activate/deactivate the ciphering and/or integrity.

But it did not look clean to see a SecurityInformation with
incorrect data when inspecting the message in wireshark.

So let's use the correct values.

We could also not include the SecurityInformation if both ciphering
and integrity are not used, and only include ciphering if integrity
is not used (because integrity settings are optional).

But then if only integrity is used, we still need to include
ciphering, setting algorithm to NEA0 (no ciphering), because
the ciphering settings are always included.

This logic is too complex, let's use the simple one to always
include SecurityInformation with NEA0 and/or NIA0 if ciphering
and/or integrity is not activated.
2025-02-11 14:04:32 +01:00
Guido Casati
627f8171ec Add test for Bearer Context Modification Request 2025-02-11 14:04:19 +01:00
Robert Schmidt
e8661f5ae5 Reset CU-CP E1 UE context after E1 Setup Response
As in deba3ae066 ("Reset CU-UP E1 UE contexts after E1 Setup
Response"), the CU-CP should reset the E1 UE contexts after E1 Setup
Response. 38.463 sec. 8.2.3 says

> This procedure also re-initialises the E1AP UE-related contexts (if
> any) and erases all related signalling connections in the two nodes like
> a Reset procedure would do.

In the case of CU-CP, this is a bit more complicated. More precisely, we
need to wait for the CU-UP to be available again before informing the DU
about the loss (implemented via an F1 Reset message), because otherwise,
the UE might reconnect immediately, before the CU-UP is online again.

Hence, on connection loss, we mark affected UEs (by setting their E1
association ID to 0); as long as the CU-UP does not connect, nothing
will happen (but UEs don't have user plane). Upon CU-UP connecting
again, we request release of the UEs via NGAP (similarly to what is done
if the DU goes offline, see invalidate_du_connections()), free the UE
contexts locally, and send an F1 Reset message to the DU, because
38.473 sec 8.2.1.2.1 says

> a failure at the gNB-CU [...] has resulted in the loss of some or
> all transaction reference information [...] a RESET message shall be
> sent to the gNB-DU.

The core should accept and send an NGAP release command message; since
no UE contexts are to be found (already deleted), the CU-CP will just
send a release complete (together with some warnings).

It might be possible to more gracefully handle the situation (e.g., as
described in 38.401 section 8.9.5 "Change of gNB-CU-UP"), but

- we lack the PDCP SN exchange
- the current procedure has the advantage of being equivalent to
  "restart of the entire gNB", with less downtown.
2025-02-11 13:20:28 +01:00
Robert Schmidt
d2bb779e78 Refactor rrc_remove_ue() to not send NGAP ctxt release cplt
The next commit will use rrc_remove_ue() to delete a CU(-CP+-UP)
context. However, we don't send NGAP UE context release at that moment
(we will instead *request* the release); more generally, it's not clear
that every user of rrc_remove_ue() wants to actually send this message.
Hence, refactor the code by separately calling
rrc_gNB_send_NGAP_UE_CONTEXT_RELEASE_COMPLETE() where appropriate.
2025-02-11 13:20:28 +01:00
Robert Schmidt
ff106c41a3 Use (CU-initiated) F1 Reset Acknowledgement in stack 2025-02-11 13:20:28 +01:00
Robert Schmidt
df365d9a2d Add F1 Reset Ack enc/dec/cp/eq/free library and test 2025-02-11 13:20:28 +01:00
Robert Schmidt
4c9ed9d7ec Use (CU-initiated) F1 Reset in stack 2025-02-11 13:20:28 +01:00
Robert Schmidt
9157e22c7c Add F1 Reset enc/dec/cp/eq/free library and test 2025-02-11 13:20:28 +01:00
Guido Casati
b854f97130 Enable pDCP_Reestablishment in test_bearer_context_setup_request 2025-02-11 13:15:01 +01:00
Guido Casati
b061b57698 Add Bearer Context Modification Request enc/dec lib 2025-02-11 13:10:21 +01:00
Guido Casati
f2b80ae31c Use cp_bearer_context_setup_request in cucp_cuup_e1ap.c 2025-02-11 13:10:21 +01:00
Guido Casati
cd7218c976 Improvements to E1 Bearer Context Setup Request/Response
* Add enc/dec/cp/eq sub-functions to E1 library and adopt in stack
  * eq_drb_to_mod
  * encode_dl_up_parameters
  * decode_dl_up_parameters
  * e1_decode_snssai
  * e1_encode_snssai
  * eq_security_ind
* Check result of enc/dec functions in Bearer Context Setup enc/dec libs
2025-02-11 13:10:21 +01:00
Guido Casati
1ef24796f9 Add compile definitions E1AP_LOG_ERRORS
* this is necessary to enable the error logs in the E1 libs
* also, updated the define name in the E1AP lib
2025-02-11 13:10:21 +01:00
Guido Casati
2146f29c44 Refactor E1 Bearer Context Management structs
Bearer context setup request and modification request messages
differ in various IEs according to 9.2.2 of 3GPP TS 38.463, e.g.
the Bearer context setup request does not contain a list of
DRBs to modify and does not contain an UP TL configuration.

Thus, the goal of this commit is to split the setup request message
and the modification request into two different structs:
* adopt e1ap_bearer_mod_req_t where necessary (e.g. fill_e1_bearer_modif)

Also, reorganized existing struct members according to specs:
* remove irrelevant struct members from the setup request
* group members from the same IEs into structs
* set optional struct members IEs as pointers
* add and adopt enc/dec/cp/eq lib functions for single IEs
* add UP_TL_information_t struct with TEID and TL address info and adopt in stack
* use int instead of long for count types
* update the relevant copy/equality check utility functions

Extra:
* add a function to handle Security Information in RRC in the process
* add create_up_tl_info and adopt in unit tests
2025-02-11 13:10:21 +01:00
Guido Casati
4f613ab2af Remove incomplete activityNotificationLevel handling 2025-02-11 13:10:21 +01:00
Guido Casati
b862963a95 Add macro to check result of dec lib functions and return with a failure 2025-02-11 13:09:50 +01:00
Raghavendra Dinavahi
f267641bf9 Changes in function prepare_sim_uecap 2025-02-11 09:53:41 +01:00
Robert Schmidt
9b4e067709 Merge remote-tracking branch 'origin/nfapi-fixes-4x4-100MHz' into integration_2025_w06 (!3251)
nFAPI: make 4-layer on 100MHz work

5G nFAPI headers specify 32 bits for the length field, so use it also
when segmenting messages. This should stabilize 4-layer MIMO operation
on 100MHz with nFAPI.
2025-02-11 09:37:14 +01:00
Robert Schmidt
7d4f7ebbfe Merge remote-tracking branch 'origin/rfsim-deadlock-avoidance' into integration_2025_w06 (!3246)
Deadlock avoidance in rfsimulator

This change introduces a countermeasure for deadlock in rfsimulator. The
deadlock happens when all entities are waiting for new data to come in,
and happens with 2+ clients, when a new client connects. I think this
issue is due to ordering of fullwrite calls, resulting in out-of-order
delivery of packets and eventually trashing the packets on the receiving
side. The out-of-order delivery warnings are printed just before the
system deadlocks but I have not found a better solution so far. The
workaround makes the server never lock up permanently by ignoring the
client failure to write on time after 10 tries.

This was tested locally for both UE as server and gNB as server and
works correctly, causing the deadlock to clear and the added log to be
printed several times when the deadlock is detected, after which the
system goes back to normal.

I have some gdb output of the executables during deadlock:

    UE:

    $7 = {conn_sock = 98, lastReceivedTS = 3226163740, headerMode = true, trashingPacket = false, th = {size = 13184, nbAnt = 1, timestamp = 3226150556, option_value = 0, option_flag = 0}, transferPtr = 0x7f6a500018a8 "\200\063", remainToTransfer = 24,
      circularBufEnd = 0x7f6a503b3ac0 "", circularBuf = 0x7f6a501f1ac0, channel_model = 0x0}
    (gdb) p t->buf[5]
    $8 = {conn_sock = 97, lastReceivedTS = 0, headerMode = true, trashingPacket = false, th = {size = 0, nbAnt = 0, timestamp = 0, option_value = 0, option_flag = 0}, transferPtr = 0x7f6a50001900 "", remainToTransfer = 24, circularBufEnd = 0x7f6a50575ad0 "",
      circularBuf = 0x7f6a503b3ad0, channel_model = 0x0}

    nextRxTimestamp 3225937740
    nsamps = 30720

    gNB 1:
    (gdb) p t->buf[0]
    $4 = {conn_sock = 95, lastReceivedTS = 3226026876, headerMode = true, trashingPacket = false, th = {size = 1, nbAnt = 1, timestamp = 3226026875, option_value = 0, option_flag = 0},
      transferPtr = 0x7f8dfc003ab8 "\001", remainToTransfer = 24, circularBufEnd = 0x7f8e1c3ff010 "", circularBuf = 0x7f8e1c23d010, channel_model = 0x0}
    nextRxTimestamp 3225996956

    gNB 2:
    lastReceivedTS = 3226026875
    $2 = {conn_sock = 95, lastReceivedTS = 3226026875, headerMode = true, trashingPacket = false, th = {size = 1, nbAnt = 1, timestamp = 3226026875, option_value = 0, option_flag = 0},
      transferPtr = 0x744898003ab8 "\001", remainToTransfer = 24, circularBufEnd = 0x7448bc2e7010 "", circularBuf = 0x7448bc125010, channel_model = 0x0}

    nextRxTimestamp 3226026875

As you can see all executables are in have_to_wait state.
2025-02-11 09:35:23 +01:00
Robert Schmidt
27a418572d Remove unnecessary includes
f1ap_lib_common should help with common message enc/dec inside lib/, and
not be used directly.
2025-02-10 18:19:27 +01:00
Robert Schmidt
deba3ae066 Reset CU-UP E1 UE contexts after E1 Setup Response
38.463 sec. 8.2.3 says

> This procedure also re-initialises the E1AP UE-related contexts (if
> any) and erases all related signalling connections in the two nodes like
> a Reset procedure would do.

Hence, delete all contexts after reception of E1 Setup Response. This
minimizes a risk of receiving an E1 bearer setup req for an existing UE,
which currently leads to an assert [we trust the CU-CP does not send the
same UE ID twice, as we only "mirror" the existing UE ID].
2025-02-10 18:19:15 +01:00
Robert Schmidt
b9acf4a8e3 Refactor E1 UE removal in separate function
Refactor into remove_ue_e1(), to be used in the next commit, independent
of e1_bearer_release_cmd().
2025-02-10 18:18:38 +01:00
Robert Schmidt
32310cced3 Bugfix: free E1 CU-UP Setup Req on CU-UP disconnection 2025-02-10 15:43:37 +01:00
Guido Casati
bd42948814 Move debug log for SUCI and GUTI to the relvant processing functions 2025-02-10 10:05:02 +01:00
Guido Casati
81ec8d2e13 Rework protection of initial NAS signaling messages (REGISTRATION REQUEST) as per 3GPP TS 33.501
* Without a valid 5G NAS security context:
  * Send REGISTRATION REQUEST with cleartext IEs only.
  * After activating a security context via Security Mode Control:
    wrap the entire REGISTRATION REQUEST (with both non-cleartext and cleartext)
    in a NAS message container IE, include it in SECURITY MODE COMPLETE

* With a valid 5G NAS security context:
  * If non-cleartext IEs are needed, wrap the entire message in a NAS message container IE and cipher it.
  * If only cleartext IEs are needed, send the message directly without the NAS message container IE.
2025-02-10 10:05:02 +01:00
Guido Casati
16b1b0e9ce Enable 5GMM Capability encoding in NAS Registration Request
* this commit is enabling the handling of non-cleartext IEs in the NAS Registration Request message
  according to 24.501, 23.502
* send the full Registration Request message in the NAS Container of the SECURITY MODE COMPLETE
* send the non-cleartext IEs in the NAS container of the Registration Request

closes #881
2025-02-10 10:05:02 +01:00
Guido Casati
9447e4fb57 Refactor 5GMM Capability encoding (9.11.3 of 3GPP TS 24.501)
* add all relevant content fields according to the specs and do the encoding

Related to #881
2025-02-10 10:05:02 +01:00
Guido Casati
0c8761aadd Refactor NAS 5GS Registration Request generation (3GPP TS 24.501)
* send integrity protected Initial NAS Message when UE in 5GMM-IDLE mode has valid current 5G NAS security context:
  > According to 4.4.2.5 TS 24.501:
  > when a UE in 5GMM-IDLE mode establishes a new NAS signalling connection and has a valid current 5G NAS
  > security context, the UE shall transmit the initial NAS message integrity protected with the current 5G NAS security
  > context and further protect this message as specified in subclause 4.4.6.

* set NAS key set identifier IE to "no key is available (UE to network)"
  * previously set to 1 which has no impact
  * set now to 111 in order to trigger new authentication
  * See 9.11.3.32 of 3GPP TS 24.501

* Do 5GS Registration Type "mobility registration updating" when 5GMM state is De-registered
2025-02-10 10:05:02 +01:00
Guido Casati
088939f5b0 Add set_fgs_registration_type to set 5GS Registration Type according to 3GPP TS 24.501 2025-02-10 10:05:02 +01:00
Guido Casati
b9dc68b5ce Add RRC Inactive Indication and Timer T3512 to NAS struct definition 2025-02-10 10:05:00 +01:00
Guido Casati
4633eb8888 Refactor 5GS registration type encoding (9.11.3.7 of 3GPP TS 24.501) 2025-02-10 09:51:52 +01:00
Romain Beurdouche
9dada89ced feat(ldpctest): add CUDA ldpctest test cases to CI 2025-02-10 07:28:24 +00:00
Romain Beurdouche
de4ef83956 feat(ldpctest): add BG2 test cases to CI 2025-02-10 07:22:35 +00:00
Guido Casati
212fe8d2f3 Add common enc/dec E1AP libs to e1ap_lib_common.c
* these functions are used in both interface management
  and bearer context management libraries
2025-02-09 22:48:54 +01:00
Robert Schmidt
609969f46d nFAPI/PNF: Correctly set message length when segmenting
Make the same change as in parent commit, i.e., write the full 32-bit
segment size.

I could not test this, as we do not reach these rx_data.indication
length. It's based on the fix in the parent commit, and to avoid future
bad surprises.
2025-02-08 12:29:25 +01:00
Robert Schmidt
2067831e7a nFAPI/VNF: Correctly set message length when segmenting
The 5G nFAPI message length is 32bits. In particular tx_data.requests
can be longer than 64kB. When segmenting, we should correctly write the
message of the current segment (across all 32bits), because the
length would interpreted wrongly otherwise.

This fixes a bug in which tx_data.requests were discarded for 4-layer DL
MIMO on 100 MHz with this message:

    P7 unpack message length is greater than the message buffer

Further, increase the type of various (segment-related) variables to 32
bits. Currently, the maximum segment size is sxt to 65000 bytes (and in
will likely remain, because the maximum UDP size is 65536);
nevertheless, increase it in case we will ever go beyond this.

See also commit dee68e6319 ("nFAPI: increase maximum segment size to
65000")
2025-02-08 12:25:44 +01:00
Robert Schmidt
976f210132 Merge remote-tracking branch 'origin/error-simd-intrinsic-name' into integration_2025_w06 (!3239)
Remove inexistant SIMD instruction

develop branch doesn't compile with AVX2 only. For instance,
mm_loadi_epi32() doesn't exist in SSE, only in the AVX512 family,
despite it being a 128 bit vector size instruction.

See also:
https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#_mm_loadi_epi32()

This was masked by using SIMDE.
2025-02-07 17:33:08 +01:00
Robert Schmidt
8c39825688 Merge remote-tracking branch 'origin/tun_if_refactor' into integration_2025_w06 (!3238)
Refactor tun_if.h

Use a common function for generating interface name. Use full interface
name in tun_if.h functions.
2025-02-07 17:32:28 +01:00
Robert Schmidt
999877eaae Merge remote-tracking branch 'origin/issue_709' into integration_2025_w06 (!3000)
Improvements for NR dlsim and ulsim
2025-02-07 17:31:59 +01:00
Robert Schmidt
6ed05c5334 Merge remote-tracking branch 'origin/period_based_phytest_bitmap' into integration_2025_w06 (!3242)
Period based phytest bitmap

phy-test slot bitmap tdd period based to minimize the chance to need it
larger than 64 slots
2025-02-07 15:24:48 +01:00
Robert Schmidt
e3c56a2b4e Merge remote-tracking branch 'beraoud/beraoud-develop-patch-76226' into integration_2025_w06 (!3240)
Fix typos in NR_SA_Tutorial_OAI_multi_UE.md
2025-02-07 15:24:02 +01:00
Robert Schmidt
296bf289cb Merge remote-tracking branch 'origin/remove_segment_coding' into integration_2025_w06 (!3202)
Simplify usage of the old segment decoding libraries with the slot coding interface

This MR transforms the segment coding libraries into slot coding
libraries by statically linking the adaptation layer and the segment
coding libraries.

Therefore they can be used directly in ldpctest which uses the segment
coding interface as well as in all the other PHY simulators and the NR
softmodem which use the slot coding interface.

It is not anymore needed to use the

   --nrLDPC_coding_segment.segment_shlibversion

flag.  Instead a segment coding library can be directly chosen with

    --loader.ldpc.shlibversion

since it implements the slot coding interface.
2025-02-07 15:22:30 +01:00
Robert Schmidt
bad4a6eb64 nFAPI: msg length/offset is 32bit
5G nFAPI headers specify 32 bits for the length field, so use it here as
well.
2025-02-07 14:35:31 +01:00
Bartosz Podrygajlo
e61bf5132d Refactor tun_if.h
Use a common function for generating interface name. Use full interface
name in tun_if.h functions.
2025-02-07 12:25:35 +01:00
Raghavendra Dinavahi
3e27175ac2 Added Support of 35Mhz,45Mhz,70Mhz Bandwidth for SCS 30Khz
Also added support for 35Mhz, 45Mhz bw for 15Khz Subcarrierspacing
Referred Spec TS 38.101 v18.6.0 section 5.3.2, table 5.3.2-1
2025-02-06 16:44:45 +01:00
francescomani
bd179fd5e4 making phy-test slot bitmap tdd period based to minimize the chance to need it larger than 64 slots 2025-02-05 18:55:09 +01:00
francescomani
fabaae3327 removing initial sync option from dlsim 2025-02-05 14:07:59 +01:00
Romain Beurdouche
6138e33f42 fix(nrLDPC_coding): Documentation 2025-02-05 11:22:54 +00:00
Romain Beurdouche
2d4d313b62 feat(nrLDPC_coding): Transform segment coding libraries into slot coding libraries by statically linking the adaptation layer and the segment coding libraries 2025-02-05 11:22:46 +00:00
Guido Casati
9dd1929ec0 Add fgsnasmessagecontainer member to NAS Registration Request struct 2025-02-04 15:32:04 +01:00
Guido Casati
54755b57aa Add NAS Registration Request with type Mobility Registration Updating
* ref TS 24.501
2025-02-04 15:31:24 +01:00
Guido Casati
e3eb663085 Add 5GMM Modes in NAS
* added fgs_mm_mode_t enum
* added struct member to NAS
* modes: FGS_IDLE, FGS_CONNECTED
* according to 5GS mobility management (5GMM) modes 5.1.3.2.1.1 of TS 24.501
2025-02-04 15:30:04 +01:00
Guido Casati
98d922e568 Introduced 5GMM state machine
* according to 5.1.3.2.1 of 3GPP TS 24.501
2025-02-04 15:30:03 +01:00
Abdelkhalek Beraoud
d5467aceb0 Fix typos in NR_SA_Tutorial_OAI_multi_UE.md 2025-02-04 13:44:50 +00:00
Romain Beurdouche
ad88beef10 fix(ldpctest): few improvements on top of clang-format changes 2025-02-04 13:30:43 +00:00
Romain Beurdouche
430f0081ea fix(ldpctest): apply clang-format to openair1/PHY/CODING/TESTBENCH/ldpctest.c 2025-02-04 13:30:43 +00:00
Romain Beurdouche
aa2bebdeee fix(ldpctest): Confusion in sizes
The variable block_length had an ambiguous role and was used as both K and Kprime.
This was leading to arrays with wrong sizes and functions with wrong arguments.
Now there is not anymore block_length but K and Kprime.
Kprime can be set with the command line argument `-l`.

There was also some problems with array allocation for segments with length not divisible by 8.
A proper sizing with `((size_in_bits + 7) & ~7) / 8` was used.
A proper masking of the last byte containing payload bits was also added to keep filler bits to 0 after random initialization.
2025-02-04 13:30:38 +00:00
Romain Beurdouche
e6c802176d fix(nrLDPC_coding): Rename ldpc8blocks_coding_segment into ldpc8blocks
The name ldpc8blocks_coding_segment was previously used to avoid any confusion with ldpc8blocks while both were coexisting.
They are not anymore coexisting so it can now be shortened.
2025-02-04 12:34:11 +00:00
Romain Beurdouche
a5215ba047 fix(nrLDPC_coding): Apply clang-format to openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c 2025-02-04 12:34:11 +00:00
Romain Beurdouche
4384021938 fix(nrLDPC_coding): Apply clang-format to openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c 2025-02-04 12:34:11 +00:00
Romain Beurdouche
c89cec2f0c fix(nrLDPC_coding): timers in DL encoding
While timers were available for rate matching and interleaving in the new interface,
these timers were not merged to rate matching and interleaving timers in nr_dlsch_coding.
2025-02-04 12:34:11 +00:00
Laurent THOMAS
43b981247e error-simd-intrinsic-name 2025-02-04 13:21:43 +01:00
francescomani
1a3512960a check if the slot selected is valid for DL/UL in dlsim/ulsim 2025-02-04 09:39:11 +01:00
francescomani
92fc1639e8 add FR2 ulsim test case 2025-02-04 08:38:51 +01:00
francescomani
a772f91053 add option to select slot in dlsim 2025-02-04 08:38:51 +01:00
francescomani
65cbcec57a fixes to allow FR2 dlsim test 2025-02-04 08:38:51 +01:00
francescomani
3bfb952989 rate matching formatting 2025-02-04 08:21:11 +01:00
francescomani
fc52fb8d24 compute_tbs_common formatting 2025-02-04 08:21:11 +01:00
francescomani
d791d03e05 fix to have correct maxMIMO_layers in dlsim computing tbslbrm 2025-02-04 08:21:11 +01:00
Thomas Schlichter
6b8a59cb68 gNB: add support for NTN parameter ta-CommonDrift-r17 2025-02-03 16:04:09 +00:00
Robert Schmidt
0053a3d0f4 Merge branch 'integration_2025_w05' into 'develop'
Integration: `2025.w05`

Closes #885

See merge request oai/openairinterface5g!3233

* !3102 Dockerized development environment
* !3185 Add IQ file recording and IQ file viewer to ImScope
* !3218 more layer1 cleaning
* !3224 Ensure execution of processSlotTX in order in NR UE
* !3231 Bugfix in frame and slot setting for ULSCH beam allocation
* !3229 Verify the integrity protection of the RRCReestablishment message
* !3230 FHI72: fix for single distributed antenna array for xran F release
* !2984 NAS 5GS refactor
* !3235 Parametrized JenkinsNode and JenkinsResource
* !2799 Changes to support multiple TDD patterns
* !3208 Downgrade gNB power limit LOG from "warning" to "debug"
2025-02-03 15:46:43 +00:00
Robert Schmidt
616c677536 Merge remote-tracking branch 'origin/avoid-powerlimit-flood' into integration_2025_w05 (!3208)
Downgrade gNB power limit LOG from "warning" to "debug"

Downgrade the UE power limited LOG from LOG_W to LOG_D. This is to avoid
flooding stdout when UE in low coverage enters power limited state for a
longer period of time. The same information can be inferred from the
periodic UE print which also contains PH value (negative PH values
indicate that the UE is power limited)

Also, correct some typos in PH calculation.

Closes #885
2025-02-03 08:33:23 +01:00
Robert Schmidt
1cb82bae20 Merge remote-tracking branch 'origin/Mult_TDD_Pattern' into integration_2025_w05 (!2799)
Changes to support multiple TDD patterns

- Updated the configuration changes for 2 Patterns
- Update the TDD table configuration for NFAPI
- Added the tdd bitmap for the period
- Adapted the bitmap for UL/DL for the multi TDD pattern
- Updated the RACH procedure for multi TDD pattern
- Updated DL and UL scheduler for multi TDD pattern
2025-02-03 08:32:02 +01:00
Robert Schmidt
1e3e695f52 Merge remote-tracking branch 'origin/nu-ci-colosseum-jenkins-update' into integration_2025_w05 (!3235)
Parametrized JenkinsNode and JenkinsResource

Parametrized variables in Jenkinsfile for automated tests on Colosseum
after update of OAI Jenkins server.
2025-01-31 22:32:04 +01:00
Robert Schmidt
e0865421b9 Merge remote-tracking branch 'origin/nr-ue-nas-improvements' into integration_2025_w05 (!2984)
NAS 5GS refactor

The goal of this MR is to reorganize the NR NAS code into:

- enc/dec library functions (5GS, 5GMM, 5GSM, NR_NAS_defs.h,
  nr_fgs_nas_lib.c)
- handlers and callbacks (nr_nas_msg.c)

The following changes are introduced:

1. migrate 5GS enc/dec lib (5GMM and 5GSM) to a dedicated folder
2. add a nested CMakeLists structure
3. refactor NR NAS enc/dec functions
4. refactor NR NAS messages struct definitions
5. remove most of dependency from NAS LTE
6. further refactor of PDU Session Establishment Accept processing to
   separate enc/dec from handling
7. made naming of 5GS definitions consistent whenever necessary
8. cleanup unused code
9. remove redundant struct definitions

Also:

1. fix decoding of AMF Set ID in 5G-S-TMSI UE identity
2. replace Byte_t directly with uint8_t
2025-01-31 22:29:31 +01:00
Robert Schmidt
70e70f6feb Merge remote-tracking branch 'origin/fhi72-f-release-fix-distributed-arr' into integration_2025_w05 (!3230)
FHI72: fix for a distributed antenna array for xran F release

in the Rx callback I reset the number of section descriptions/number of
fragments to 0, but for each antenna up to max number of antennas per
RU, instead of up to max number of distributed antenna array
2025-01-31 17:07:08 +01:00
Guido Casati
fcea7d9fbf Add pattern2 to TEST-SA-FR1-SC-FDMA-B200 CI test 2025-01-31 16:56:13 +01:00
vijay chadachan
fc6e205c89 Add documentation on TDD configuration
Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2025-01-31 16:56:13 +01:00
vijay chadachan
ca72b56c2c Add gNB configuration file pattern2 TDD configuration
Co-authored-by: Guido Casati <guido.casati@firecell.io>
2025-01-31 16:56:13 +01:00
vijay chadachan
4fc74c17ab Refactoring of is_xlsch_in_slot usage in MAC
* Remove the ulsch_slot_bitmap and dlsch_slot_bitmap from nrmac
* Adopt the new is_dl_slot/is_ul_slot functions in the stack
  to replace is_xlsch_in_slot: these functions are getting
  the DL and UL slots as they are set in the TDD configuration
  stored in tdd_slot_bitmap (frame_structure_t)
* Keep is_xlsch_in_slot in openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c:
  this is necessary because the phy-test pre-processors are using the bitmaps
  dlsch_slot_bitmap and ulsch_slot_bitmap to check which DL/UL slots to use
  for transmission among those set in the TDD configuration

Co-authored-by: Guido Casati <guido.casati@firecell.io>
2025-01-31 16:51:19 +01:00
Guido Casati
529b142d75 Refactor servingNetworkName 2025-01-31 16:05:54 +01:00
Bartosz Podrygajlo
d44279a9a3 Fix PHR PH value to power headroom conversion. 2025-01-31 16:05:13 +01:00
Leonardo Bonati
474c004ff4 Parametrized JenkinsNode and JenkinsResource 2025-01-31 10:03:55 -05:00
Guido Casati
d6e2bf1651 Refactor registration accept decoding
previously we had decodeRegistrationAccept acting as a handler and calling
decode_registration_accept to do the decoding. However the logic was mixed
between the two functions, the naming was confusing and the code was hard
understand. The goal of this commit is to simplify the code, improve
readability and maintainability, while adapting the relevant function
to the new OAI NAS libs structure.

To this purpose:

* move enc/dec logic to NAS lib openair3/NAS/NR_UE/5GS/5GMM/MSG/RegistrationAccept.c -
  the logic of parse_allowed_nssai, get_allowed_nssai has been moved to
  decode_registration_accept and decode_nssai_ie
* add decode_nssai_ie and use it for both Allowed/Configured NSSAIs list (IE handling was added)
* do processing in the handler handle_registration_accept
* simplify the code by removing nested calls
* improve handling of PDU length

Currently only Registration Result, 5GS Mobile Identity, Allowed/Configured NSSAI
are decoded. The other optional IEIs are skipped (only the length is processed).
2025-01-31 16:02:04 +01:00
Bartosz Podrygajlo
1e667b379a Downgrade gNB power limit LOG from "warning" to "debug"
Downgrade the UE power limited LOG from LOG_W to LOG_D. This is to avoid flooding
stdout when UE in low coverage enters power limited state for a longer period of
time. The same information can be inferred from the periodic UE print which also
contains PH value (negative PH values indicate that the UE is power limited)
2025-01-31 15:59:45 +01:00
Bartosz Podrygajlo
fd20068f26 Deadlock avoidance in rfsimulator 2025-01-31 15:47:41 +01:00
Teodora
04bfabcbb1 F release: fix for a distributed antenna array
- in the Rx callback I reset the number of section descriptions/number of fragments to 0,
    but for each antenna up to max number of antennas per RU, instead of up to max number of a distributed antenna array
2025-01-31 12:12:06 +01:00
Robert Schmidt
85edbc8ec7 Merge remote-tracking branch 'origin/RRCReestablishment_integrity' into integration_2025_w05 (!3229)
Verify the integrity protection of the RRCReestablishment message
2025-01-31 08:07:26 +01:00
Robert Schmidt
44fe1175c2 Merge remote-tracking branch 'origin/NR_ULSCH_beam_allocation_bugfix' into integration_2025_w05 (!3231)
Bugfix in frame and slot setting for ULSCH beam allocation
2025-01-31 08:01:39 +01:00
Robert Schmidt
31c8ca9c53 Merge remote-tracking branch 'origin/process-slot-tx-in-order' into integration_2025_w05 (!3224)
Ensure execution of processSlotTX in order in NR UE

Make sure that processSlotTX is executed in slot order.

There is a bug that causes decoding error when processSlotTX is executed
out of order. The root cause is not known at this point, but this change
avoids the bug altogether.
2025-01-31 08:01:07 +01:00
Robert Schmidt
723acf7e60 Merge remote-tracking branch 'origin/more-layer1-cleaning' into integration_2025_w05 (!3218)
More Layer1 cleaning

Cleanup, see commits for info
2025-01-31 08:00:37 +01:00
Robert Schmidt
be6321c888 Merge remote-tracking branch 'origin/imscope-recorder' into integration_2025_w05 (!3185)
Add IQ file recording and IQ file viewer to ImScope

This changeset introduces the following changes to ImScope:

- Added the ability to record IQ data using the same mechanism as
  ImScope.
- Added a new executable target imscope_iq_file_viewer for viewing IQ
  files.
- Introduced a command line argument --imscope-record that enables data
  recording mode.
- Refactored a lot of the scope code

Usage:

- To record IQ data, run a modem with --imscope-record flag.  The
  recording happens whenever a modem calls dumpScopeData, which
  currently is done only in gNB on PUSCH DTX and PUSCH CRC NOK.  There
  is a limit of ~1GB of files written by the thread in a signle run to
  avoid accidentally exhausting disk space.  If a directory imscope-dump
  is available the data will be recorded there in .imscope files.
  Otherwise files are written to the directory the modem was run. This
  is done so that the directory can be mapped in a docker container.
- To view recorded IQ files, use the new executable
  imscope_iq_file_viewer. This can be done by running:

  ./imscope_iq_file_viewer <path_to_iq_file>

  Replace <path_to_iq_file> with the path to the IQ file you want to view.
2025-01-31 07:59:22 +01:00
Robert Schmidt
b34708fa77 Merge remote-tracking branch 'origin/docker-dev-env' into integration_2025_w05 (!3102)
Dockerized development environment

This commit introduces a fully dockerized dev env you can start on any
machine that has docker without installing any direct OAI dependencies
on host.

This allows to migrate development environments between machines easily.
Several complementary scripts were added to enable smooth transition
between your docker environment and host environment. Your user and sudo
should work inside the environment.

In its current state, the environment can be used to compile
nr-softmodem with 7.2 FHI but it cannot run it due to missing
dependencies.
2025-01-31 07:58:43 +01:00
Bartosz Podrygajlo
8ca0a80d17 Dockerized development environment
This commit introduces a fully dockerized dev env you can start on any
machine that has docker without installing any direct OAI dependencies
on host.

This allows to migrate development environments between machines easily. Several
complementary scripts were added to enable smooth transition between your docker
environment and host environment. Your user and sudo should work inside the
environment.
2025-01-31 07:50:01 +01:00
francescomani
7c93de87a4 lower layers to verify the integrity protection of the RRCReestablishment message 2025-01-30 18:20:17 +01:00
Laurent THOMAS
6d14ac735b remove dead commented code 2025-01-30 17:15:11 +01:00
Laurent THOMAS
62e8431c98 remove code obfuscation 2025-01-30 17:14:18 +01:00
Laurent THOMAS
25652c5a24 fix bad type in dci encoding 2025-01-30 17:14:18 +01:00
Laurent THOMAS
5416be3736 move byte2m128i in a more logical place 2025-01-30 17:14:10 +01:00
Laurent THOMAS
268172a435 pure bad code fix 2025-01-30 17:12:27 +01:00
Guido Casati
e842ca2631 Move assert up in decode_5gs_mobile_identity 2025-01-30 15:21:39 +01:00
Guido Casati
8260b2283c Do get_msg_type only once in nas_nrue 2025-01-30 15:21:39 +01:00
Guido Casati
918fcd2b6d Bugfix: 6 bits AMF set ID in decode_guti_5gs_mobile_identity
* the last 6 bits of the GUTI represent the AMF Pointer
* the AMF Set ID is 10 bits long
* the Registration Accept message received from the network contains the GUTI
  which, when properly decoded, will be used in any possible following Registration Request
2025-01-30 15:21:39 +01:00
Guido Casati
97521d21e5 Refactor mm_msg_encode 2025-01-30 15:21:39 +01:00
Guido Casati
3e27e53f52 Handle size in nas_protected_security_header_encode 2025-01-30 15:21:39 +01:00
Guido Casati
c37c5ad7ae Use macro NAS_INTEGRITY_SIZE in NAS 2025-01-30 15:21:39 +01:00
Guido Casati
611c055464 Refactor nas_security_rx_process
* use defines whenever possible
* introduce a switch to handle security type. Currently only integrity protected and ciphered
  is handled, however the idea of the switch is to make the code ready for the future when
  different security types will be handled and different actions should be taken based on that.
* define NAS_INTEGRITY_SIZE
2025-01-30 15:21:39 +01:00
Guido Casati
8b32e95d6a Define security header and security state enums and strings with available macros
* also, add security type NAS_SECURITY_NEW_SECURITY_CONTEXT
2025-01-30 15:21:39 +01:00
Guido Casati
384659ed54 Refactor capture_pdu_session_establishment_accept_msg
* the goal of this commit is to refactor capture_pdu_session_establishment_accept_msg
  into a decoding function
* PduSessionEstablishmentAccept.c is in the 5GSM library and shall only do encoding operations
* handling of PDU Session Establishment accept message is done in nr_nas_msg.c
* adopted new NAS decoding functions in the process
* improved QoS rules decoding
* convert getShort into a macro and add to NAS utils
2025-01-30 15:21:39 +01:00
Guido Casati
2e651ed21c Add NAS 5GS header decoding functions 2025-01-30 15:21:39 +01:00
Guido Casati
b07ddb1e57 Refactor generateServiceRequest
* simplified code, reduced conditional statements, reduced number of pointers
2025-01-30 15:21:39 +01:00
Guido Casati
2c5309f0f8 Add function to fill fgmm_msg_header_t type headers 2025-01-30 15:21:39 +01:00
Guido Casati
63d7f26cfd Refactor NAS 5GMM messages structs definitions
as per legacy code, the NAS functions in nr_nas_msg.c were encoding
the header in the plain header contained in MM_msg
(e.g. plain -> mm_msg -> header in fgs_nas_message_t). The same
header was encoded in the mobility management message contained
in the same struct (e.g. plain -> mm_msg -> registration_request
-> protocoldiscriminator). As this was more complicated than
necessary, the goal of this commit is to simplify the code and
improve readability. Namely:

* Refactor MM_msg into fgmm_nas_message_plain_t to contain
  (1) 5GMM Header
  (2) 5GMM Payload union
* Use fgmm_nas_message_plain_t and fgmm_nas_msg_security_protected_t
  in the 5GMM NAS procedures
* Remove NAS header IEs from 5GMM messages structs and use
  the header in fgs_nas_message_plain_t.
  This reduce also the repetitions of header members in each
  of the 5GMM messages structs.
* Rename struct to distinguish between 5GMM and 5GSM
* Remove fgs_nas_message_t and nas_msg_header_t,
  use directly basic 5GS struct definitions, simplify the code
* The callbacks in nr_nas_msg.c are now doing
  (1) encode header with the common NAS lib
  (2) encode contents with the 5GMM libs
* improve code readibility in the process
2025-01-30 15:21:39 +01:00
Guido Casati
9719f5e574 Add const attribute to NAS enc/dec functions 2025-01-30 15:21:39 +01:00
Guido Casati
08e3f2f0df Refactor generateRegistrationComplete
* replace encoding code with proper functions from the lib
* remove unnecessary header members in struct definition

this commit removes last enc/dec code in nr_nas_msg.c
2025-01-30 15:21:39 +01:00
Guido Casati
7810516596 Add equality check and error macro to NAS 2025-01-30 15:21:39 +01:00
Guido Casati
8a844efa49 Fix typo and rename NAS identity response 2025-01-30 15:21:39 +01:00
Guido Casati
2d75598851 Initial separation of enc/dec functions from handlers/callbacks
* move enc/dec definitions to NR_NAS_defs.h and add new lib file nr_fgs_nas_lib.c
  both used by nr_nas_msg.c
* move utility macros to fgs_nas_utils.h: this can be used in all the 5GMM, 5GSM lib files
* use nr_nas_msg.c for handlers/callbacks only, it should call the enc/dec
  functions in nr_fgs_nas_lib and in the 5GMM, 5GSM libs
* 5GMM, 5GSM libs should only do the enc/dec of the NAS message contents
2025-01-30 15:21:39 +01:00
Guido Casati
f73579ea41 Limit scope of NAS functions (static) 2025-01-30 15:21:39 +01:00
Guido Casati
ddad26effe Refactor includes in nr_nas_msg (.c/.h) 2025-01-30 15:21:39 +01:00
Guido Casati
27ed237300 Refactor NAS 5GS message type definitions
* move defines to openair3/NAS/NR_UE/nr_nas_msg.h as they are
  only used in nr_nas_msg.c
* made naming of all message types consistent, using the same
  prefix for all
2025-01-30 15:21:39 +01:00
Guido Casati
fb85ba7da3 Remove NAS/COMMON/nr_common.c and move servingNetworkName to nr_nas_msg.c
* the only function used from nr_common.c is servingNetworkName which is
  used in nr_nas_msg.c, so it was moved to the latter file and its scope
  was reduced
2025-01-30 15:21:39 +01:00
Guido Casati
03a4d8efb8 Refactor NAS 5GS (5GMM & 5GSM) structs definitions and their use
Every NAS 5GS message can have 3 different headers: (1) security protected
(2) 5GMM plain (3) 5GS plain;

According to 3GPP TS 24.501:
> 4.2 Coordination between the protocols for 5GS mobility management and 5GS session management
> A 5GS session management (5GSM) message is piggybacked in specific 5GS mobility management (5GMM) transport
> messages. To this purpose, the 5GSM messages can be transmitted in an information element in the 5GMM transport
> messages.

A PDU Session Establishment accept is a 5GSM message and as such it is contained in a 5GMM
transport message. The code in capture_pdu_session_establishment_accept_msg is reflecting this.
The message is thus expected to have: (1) Security protected 5GMM header (2) Plain 5GMM message
(3) 5GSM Payload Container (4) Plain 5GSM message.

5.4.5 of 3GPP TS 24.501: also says:

> The type of the payload is identified by the Payload container type IE and includes one of the following: a) a single 5GSM message;

Thus, a 5GSM is not the only possible payload of a NAS transport message.

This commit is focusing on the refactoring of the structs definitions and adaptation of the CMakeLists.

Based on the above:

* Move NR_NAS_defs.h to 5GS subfolder in NR_UE
* Move NAS FGS structs and definitions to NR_NAS_defs.h
* Rename mm_msg_header_t to fgmm_msg_header_t
* Remove duplicated NAS struct definitions
  (1) kept fgs_nas_message_security_header_t over security_protected_nas_5gs_msg_t
  (2) Kept fgsm_msg_header_t over fgs_sm_nas_msg_header_t
* Remove unused definitions, structs, functions in the process
2025-01-30 15:21:39 +01:00
Guido Casati
c0583be24e Migrated NAS 5GS (5GMM & 5GSM) to NR folders and refactor CMakeLists.txt files
This commit is introducing the following macro changes:

(1) Migrate NAS 5GS lib files to a new 5GS subfolder in NR_UE
    and organize NAS 5GS lib messages into 5GMM and 5GSM subfolders.
    A nested CMake structure was implemented and CMakeLists.txt were
    added whenever necessary. This is effectively separating 5GS
    libraries from LTE libraries.

(2) In order to simplify the separation of 5GS libs from LTE libs,
    remaining dependencies from NAS LTE (e.g. nas_ue_task.c, ue-idx-standalone)
    were removed in the process

(3) ExtendedProtocolDiscriminator.c/.h and SpareHalfOctet.c/.h were deleted
    and affected types were replaced with simple integer types

(4) Cleanup: unused definitions and libs (e.g. LIB_5GNAS_GNB)
    were removed

(5) Update doc/Doxyfile

(6) clang-formatted the migrated files in the process

(7) Update includes of headers in affected files
2025-01-30 15:17:30 +01:00
francescomani
bf238491ec fix in frame and slot for ULSCH beam allocation 2025-01-30 14:52:58 +01:00
Bartosz Podrygajlo
2ea6ac26bd Use a global "void_instruction" in imscope record thread
This avoids the issue of compare_exchange_weak always failing. The issue
was that `store()` is not equal to `exchange()`. `exchange` uses memory
copy while `store()` copies the value representation of the argument, which
is not always the same thing.
2025-01-28 16:55:53 +01:00
Bartosz Podrygajlo
30de011fa3 Add build_oai option for imscope_record 2025-01-28 16:55:42 +01:00
Bartosz Podrygajlo
c520a4e295 Refactor some scope macros
Use do {} while (0) for UEdumpScopeData/gNBdumpScopeData macro
2025-01-28 16:55:32 +01:00
Bartosz Podrygajlo
2198e31187 More updates to imscope IQ recorder
- Added event parameter for recording which is reflected in the filename
 - Added event in the UE for DLSCH NACK
 - Added program name to the filename for ease of identification
 - Reworked spinlock to use atomics
2025-01-28 16:55:25 +01:00
Bartosz Podrygajlo
c01adc5e00 Fix pdschRxdataF_comp scope for UE.
Correctly calculate the amount of data to be copied. Copy at correct offset.
Imporve error message in case data is insufficient.
2025-01-28 16:55:17 +01:00
Bartosz Podrygajlo
ab75a7ccfb Add IQ file recording and IQ file viewer to ImScope
This commit introduces the following changes to ImScope:
 - Added the ability to record IQ data using the same mechanism as ImScope.
 - Added a new executable target `imscope_iq_file_viewer` for viewing IQ files.
 - Introduced a command line argument `--imscope-record` that enables data recording mode.
 - Refactored a lot of the scope code

Usage:
 - To record IQ data, run a modem with `--imscope-record` flag.
   The recording happens whenever a modem calls dumpScopeData, which currently is
   done only in gNB on PUSCH DTX and PUSCH CRC NOK.
   There is a limit of ~1GB of files written by the thread in a signle run to avoid
   accidentally exhausting disk space.
   If a directory `imscope-dump` is available the data will be recorded there in .imscope
   files. Otherwise files are written to the directory the modem was run. This is done so that
   the directory can be mapped in a docker container.

 - To view recorded IQ files, use the new executable `imscope_iq_file_viewer`. This can be done by running:
      ```
      ./imscope_iq_file_viewer <path_to_iq_file>
      ```
   Replace `<path_to_iq_file>` with the path to the IQ file you want to view.
2025-01-28 16:54:54 +01:00
Bartosz Podrygajlo
4b9e70b2ba Fix 2 issues causing warning when compiling headers from g++ 2025-01-28 16:53:45 +01:00
Bartosz Podrygajlo
e1814f5340 Ensure execution of processSlotTX in order in NR UE
Make sure that processSlotTX is executed in slot order.
2025-01-28 11:42:38 +01:00
Guido Casati
e9ff628844 Add macros to deep copy and compare optional E1 IEs 2025-01-28 10:18:45 +01:00
Guido Casati
a0da096351 Fix equality check types in Bearer Context Setup Request/Response 2025-01-28 10:18:45 +01:00
Guido Casati
bf3b8b19ef Fix missing line break in e1ap.c 2025-01-28 10:18:45 +01:00
Guido Casati
92460a80cd Use is_mixed_slot in stack 2025-01-28 10:07:31 +01:00
vijay chadachan
0b7bee96cb Add scheduling utility functions to check UL, DL, and mixed slot types in TDD config
* is_ul_slot: returns `true` for UL or mixed slots
* is_dl_slot: returns `true` for DL or mixed slots
* is_mixed_slot: returns `true` for mixed slots

These functions use the TDD slot bitmap for slot type checks

Co-authored-by: Guido Casati <guido.casati@firecell.io>
2025-01-28 10:07:31 +01:00
vijay chadachan
eccd3e840e Take into account multi TDD patterns in RRC configuration
* take into account pattern2 in nr_rrc_config_dl_tda
* use get_tdd_period_idx in nr_rrc_config_ul_tda
* use get_first_ul_slot_multi_tdd in set_SR_periodandoffset

Co-authored-by: Guido Casati <guido.casati@firecell.io>
2025-01-28 10:07:31 +01:00
vijay chadachan
04f082a9a4 Adopt utility functions to get TDD configuration from frame_structure in MAC/RRC
* refactor set_ideal_period to use frame_structure from MAC
* use get_ul_slot_offset to assign slot offset to nth UE and adopt in
  updated config_csirs, configure_periodic_srs, set_csi_meas_periodicity

Co-authored-by: Guido Casati <guido.casati@firecell.io>
2025-01-28 10:07:31 +01:00
vijay chadachan
1d8a590328 Refactor nr_UE_is_to_be_scheduled to use new get_first_ul_slot function
Co-authored-by: Guido Casati <guido.casati@firecell.io>
2025-01-28 10:07:31 +01:00
Guido Casati
00f1d52f92 Rewrite get_first_ul_slot to use pattern configuration stored in frame_structure
* the function is returning the index of the first full UL slot in tdd_slot_bitmap
  or the first UL slot (including mixed) if the "mixed" flag is provided
2025-01-28 10:07:31 +01:00
Guido Casati
bebbc857a0 Add get_ul_slot_offset function to calculate nth UL slot offset for UE in TDD period
* the get_ul_slot_offset function calculates the offset of the nth uplink (UL) slot for a given UE index within a TDD period
* this function uses the frame structure bitmap to determine the UL slot positions
2025-01-28 10:07:31 +01:00
vijay chadachan
ae1a5a968b Refactor gNB_scheduler_uci.c (get_pucch_index, etc..) to use frame_structure stored in MAC
Co-authored-by: Guido Casati <guido.casati@firecell.io>
2025-01-28 10:07:31 +01:00
vijay chadachan
dbfcc1a7ef Refactor set_sched_pucch_list to use frame_structure in MAC
Co-authored-by: Guido Casati <guido.casati@firecell.io>
2025-01-28 10:07:31 +01:00
Guido Casati
3dca350f3e Limit scope of set_sched_pucch_list (static) 2025-01-28 10:07:31 +01:00
vijay chadachan
f4e4f2f7ba Refactor get_feasible_msg3_tda to use frame_structure in MAC
Co-authored-by: Guido Casati <guido.casati@firecell.io>
2025-01-28 10:07:31 +01:00
vijay chadachan
177732ca3a Refactor get_dl_tda and get_ul_tda to get TDD configuration stored in MAC
Co-authored-by: Guido Casati <guido.casati@firecell.io>
2025-01-28 10:07:31 +01:00
vijay chadachan
066559227d get_SIB1_NR: init pattern2 in sib1 servingCellConfigCommon if allocated in scc 2025-01-28 10:07:31 +01:00
vijay chadachan
f4d59dfd17 Get pattern2 configuration from configuration file and store in SCC
* allocate memory for pattern2 only if the IE is present (it is optional)
* fix scc (deallocate memory) when necessary

Co-authored-by: Guido Casati <guido.casati@firecell.io>
2025-01-28 10:07:31 +01:00
vijay chadachan
ad8930e2c4 Configure Frame Structure (including TDD) in MAC
* use config_frame_structure in config_common:
  - fill frame_structure in MAC and NFAPI Config Request
  - use get_tdd_period_idx to set periodicity index in Config Request
  - use config_tdd_patterns to fill tdd_period_config
  - use set_tdd_config_nr to complete NFAPI Config Request configuration

Co-authored-by: Guido Casati <guido.casati@firecell.io>
2025-01-28 10:07:31 +01:00
vijay chadachan
30f6da16f0 Refactor set_tdd_config_nr to use frame_structure_t and tdd_period_config_t
* assuming num_dl_slots and num_ul_slots are including also
  slots with dl/ul symbols respectively
* refactor set_tdd_config_nr
* moved function to MAC
* fill max_num_of_symbol_per_slot_list depending on slot type
* use new set_tdd_config_nr in stack
* minor refactor in config.c to improve readability (scs)

Co-authored-by: Guido Casati <guido.casati@firecell.io>
2025-01-28 10:07:30 +01:00
Laurent THOMAS
284b7af49c more comprehensive modulation lut table generation 2025-01-28 09:50:29 +01:00
Laurent THOMAS
f272d7d1cc set correct type on qpsk modulation table 2025-01-28 09:50:29 +01:00
Laurent THOMAS
c73353bed3 comprehensive dmrs reception and better cpu efficiency 2025-01-28 09:50:29 +01:00
vijay chadachan
421a690b42 Add frame_structure_t to gNB_MAC_INST 2025-01-28 09:42:45 +01:00
Guido Casati
c3a6700037 Implement MAC/RRC setter/getter functions to support multiple TDD patterns
* set_tdd_bmap_period, config_tdd_patterns: to configure TDD period, including bitmap, in the frame structure
* get_tdd_periodicity: to retrieve the periodicity in milliseconds for the given TDD pattern
* get_tdd_period_idx: to get the TDD period index based on pattern periodicities
* get_ul_slots_per_period: get the number of UL slots (including mixed with UL symbols) in period
* get_full_ul_slots_per_period: get the number of full UL slots in period
* get_dl_slots_per_period: get the number of DL slots (including mixed with DL symbols) in period
* get_full_dl_slots_per_period: get the number of full DL slots in period

Co-authored-by: vijay chadachan <vijay.chadachan@firecell.io>
2025-01-28 09:42:45 +01:00
vijay chadachan
9cf1ce7427 Add new TDD period and bitmap configuration structs definitions (nr_common.h)
Co-authored-by: Guido Casati <guido.casati@firecell.io>
2025-01-28 09:42:45 +01:00
Guido Casati
aa68e19ebd Add set_TimeDomainResourceAllocation and refactor nr_rrc_config_ul_tda
* allocate and configure NR_PUSCH_TimeDomainResourceAllocation in a separate function
* remove duplicated lines of code
* use in nr_rrc_config_ul_tda
* use calloc_or_fail
* clang-formatted
2025-01-28 09:42:45 +01:00
Guido Casati
97a575ffeb Reviewed NFAPI tdd_period definition in nfapi_nr_tdd_table_t
* added define for NFAPI_MAX_NUM_PERIODS
* enhanced comments
2025-01-28 09:42:45 +01:00
Robert Schmidt
64a472aef1 Merge branch 'integration_2025_w04' into 'develop'
Integration: `2025.w04`

Closes #876, #896, #875, #893, and #878

See merge request oai/openairinterface5g!3226

* !3198 remove a set of compile options that don't work anyway
* !3171 Refactor SCTP Association Response Handling and E1 connection loss at CU-UP
* !3023 usrp constant and slow derive timestamp
* !3215 Remove unused code
* !3192 fix nr phy-test mode in ntn
* !3214 fix(nrLDPC_coding_t2): Miscellaneous fixes related to T2
* !3020 use ML receiver for 64 QAM UL-MIMO
* Demote error logs to debug for "PUCCH not processed"
* !3217 minor improvements in T hacks
* !3199 Add a small FAPI Hex parser utility
* !3209 Remove most of m64 type usage
* !3211 Avoid huge calloc by alloc'ing TBs independently
* !3212 F1AP IDs: Allow AddMod, fix concurrency bug
* !3152 E1 Setup enc/dec library and unit test
* !2999 Repair nFAPI in 5G
* !3210 FHI72: FDD support
* !3220 Improve RA logs
2025-01-28 07:51:30 +00:00
Jaroslava Fiedlerova
7bd248e15d Merge remote-tracking branch 'origin/preamble-index-logs' into integration_2025_w04 (!3220)
Improve RA logs

Modify existing LOG entries to include preamble index, timing advance and
estimated distance from the gNB. This makes mapping RA attempts to
physical/simulated UEs easier via sent/received preamble index or physical
distance from the gNB in scenarios with >1 UE.
2025-01-27 16:15:10 +01:00
Jaroslava Fiedlerova
c7a90ed237 Merge remote-tracking branch 'origin/fhi72-fdd-mode' into integration_2025_w04 (!3210)
FHI72: FDD support

- harmonize DL/UL PRB mapping in one get_xran_prb_map() function with support
  of mixed slot and duplex mode
- do not assume TDD by default
2025-01-27 15:47:18 +01:00
Jaroslava Fiedlerova
699f2e5d81 Merge remote-tracking branch 'origin/nfapi-fixes' into integration_2025_w04 (!2999)
Repair nFAPI in 5G

Add 5G nFAPI in OAI/Make it it work.

Many commits in this branch are basically bug fixes of things that don't work
properly, such as

- check for correct conditions (e.g. instance numbers in the RAN context)
- remove artificial limitation (e.g. only one PUCCH per TDD period in the PNF)
- improve performance (reduce big mallocs, make some static buffers such as a
  global ring buffer for nFAPI messages in the PNF)
- fix bugs in nFAPI (e.g., increase maximum message size to ~64kB instead of
  1500 bytes, because the latter is way too small for many TX_data.requests in
  5G, and it will delay message arrival unduly)
- fix bugs in message enc/dec (e.g., handle FDD in config.request)
- adjust the L1 such that the condition "we run monolithic" is not necessery
  (e.g., some message numbers in nFAPI struct where reset in MAC, instead of
  L1, and this breaks when running the PNF)

There are instructions that explain how to set it up. Two CI tests have been
added, one with COTS UE and MIMO in DL+UL in TDD numerology 1 (30kHz), and a
second test with FDD mu=0 (15kHZ) in RFsimulator.

These were some old to-dos that have been addressed.

- test with COTS UE - 4x4 pipeline works good in DL, UL now also work
- test in RFsim
- make PNF status message
- make FDD in u0 work
2025-01-27 15:46:19 +01:00
Robert Schmidt
382820dce2 Rename 5G RFsim u0 25PRB title name: it's nFAPI now 2025-01-27 15:36:30 +01:00
Robert Schmidt
3ad9a43880 pnf_nr_p7_pack_and_send_p7_message(): don't use global buffer
This function packs P7 messages. At least RX_data.indication messages
might be much bigger than the global buffer that is used here. Allocate
the buffer on the stack, and make it bigger. Do not use the global
buffer, it's simply not necessary; increasing the global tx buffer size
might have negative effects elsewhere in the code.

That change might make the function reentrant. The mutex seems to only
guards the codec config. However, leave it to not introduce any
regressions as of now.
2025-01-27 15:36:30 +01:00
Robert Schmidt
377ff8970e Merge remote-tracking branch 'origin/e1-setup-encdec-tests' into integration_2025_w04 (!3152)
E1 Setup enc/dec library and unit test

This MR is adding a library for E1 Setup enc/dec functions:

- E1 CU-UP Setup Request
- E1 CU-UP Setup Response
- E1 Setup Failure

and relevant unit tests
2025-01-27 11:43:46 +01:00
Robert Schmidt
f6243e9078 Merge remote-tracking branch 'origin/f1-ue-data-no-assert' into integration_2025_w04 (!3212)
F1AP IDs: Add update, fix concurrency bug

I suspect a concurrency bug: For instance, during reestablishment, the
CU needs to update the DU UE ID under which the UE is identified in the
DU. Previously, the CU would remove, then add the DU UE ID info. At the
same time, the PDCP thread might look up the information. This can lead
to asserts. Modify the code to do the update under (one) lock.

Also, refactor some code.
2025-01-27 11:42:29 +01:00
Robert Schmidt
2cecffb02f Merge remote-tracking branch 'origin/fix-huge-malloc' into integration_2025_w04 (!3211)
Avoid huge calloc by alloc'ing TBs independently

Fix real-time problems on smaller machines due to big calloc(). See the
commit(s) for more details.
2025-01-27 11:40:53 +01:00
Robert Schmidt
6be898806e transform RFsim band 66 u0 test to nFAPI 2025-01-27 10:59:40 +01:00
Robert Schmidt
c553173677 Modify 4x4 60MHz COTS UE test to use nFAPI
Modify the existing 4x4 60MHz USRP+COTS UE test to use nFAPI. The
throughput tests remain the same.
2025-01-27 10:59:40 +01:00
Robert Schmidt
03b63257f2 Add documentation for nFAPI 2025-01-27 10:59:40 +01:00
Robert Schmidt
48d52fdf42 Consolidate 2 gnb-vnf configs in 1 2025-01-27 10:59:40 +01:00
Robert Schmidt
970eb04a84 Remove hardcoding of numerology in VNF
Similar to the parent commit, make the numerology in the VNF
configurable. Unlike for the PNF change, the VNF frame/slot info is in a
per-PNF connection structure to which the "oai_integration" code has no
access. So we need to hack the nfapi_vnf_p7_add_pnf() function signature
to take the numerology, to be able to save this on a per-PNF basis.

The fact that we store this on a per-PNF basis is not strictly required,
as the VNF cannot handle multiple numerologies as of now, either.
However, we might want to extend this in the future, so it seems prudent
to store this on a per-PNF basis, so that we could start handling
multiple numerologies at the L2 without the need to change the L1 or
nFAPI code itself.

Also, the numerology is not needed except for some code that deals with
timing over nFAPI. As of now, we don't use this code (nFAPI gets a
trigger every slot, as per the VNF request, see an earlier commit in
this series), but also here, let's not make the future more complicated
by storing the numerology for each PNF now (this could always be reverted).

For 4G, put numerology 0 (15kHZ SCS), which is the SCS that LTE uses.
2025-01-27 10:59:40 +01:00
Robert Schmidt
58f2f9b3d7 Remove hardcoding of numerology in PNF
Fill in the dynamically received numerology, and make the numerology at
the PNF configurable, following the changes in the parent commit.

The change for the reading is somewhat of a hack, because nFAPI, as of
now, does not really foresee to store the numerology, so we fill the
numerology during the start request, when the numerlogy has been
received in the config request, but at that time, the structure for the
time information (frame/slot) does not exist yet.
2025-01-27 10:59:40 +01:00
Robert Schmidt
3a1cd7480e Adjust slot length based on numerology for proper timing 2025-01-27 10:59:19 +01:00
Robert Schmidt
f7617f8c9b nFAPI time conversion: handle numerologies flexibly
At both the PNF and the VNF, introduce a separate numerology field, and
pass the numerology when converting time information using macros from
nfapi_interface.h. The actually numerology is still hardcoded to 1 (as it
was before), but the follow-up commits will put a suitable numerology.

In both cases, but the numerology next to the frame/slot information.
2025-01-27 10:59:19 +01:00
Robert Schmidt
abe77333b1 L1-emul UE: Make independent of numerology
Similarly as the parent commit(s):
- remove hardcoding to specific numerology
- avoid conversion when we don't need it
2025-01-27 10:59:19 +01:00
Robert Schmidt
08ddce4750 Make independent of numerology: no time conversion macros
Similar as the parent comment, remove time macros. In this particular
case, we can just pass the exact frame/slot information, instead of
squeezing it in a single integer.
2025-01-27 10:59:19 +01:00
Robert Schmidt
e051c9bb0c Simplify code: no time conversion macros necessary
The next commits will modify the time macros used in the 5G nFAPI code
to handle different numerologies. As a preparation, remove all the
usages of these macros where they really don't matter (e.g., don't
convert if we don't need to).
2025-01-27 10:59:19 +01:00
Robert Schmidt
5435585b13 Remove original nfapi patch file
This file is 8y old. It does not seem to serve any purpose. Remove it.
2025-01-27 10:59:19 +01:00
Robert Schmidt
d028cab7ae add header guards 2025-01-27 10:59:19 +01:00
Robert Schmidt
871311d986 config.request: handle FDD 2025-01-27 10:59:19 +01:00
Robert Schmidt
29ce2e5e7f phy_nr_slot_indication(): Remove useless code: it does nothing 2025-01-27 10:59:19 +01:00
Robert Schmidt
0659148d85 Print sfn/slot directly 2025-01-27 10:59:19 +01:00
Robert Schmidt
956ffe4751 aerial_phy_nr_slot_indication(): Remove useless code: it does nothing 2025-01-27 10:59:19 +01:00
Robert Schmidt
1337245d94 PNF: provide some logging of stats 2025-01-27 10:59:19 +01:00
Robert Schmidt
6145f02b81 Function decls to make LTE compile 2025-01-27 10:59:19 +01:00
Robert Schmidt
06a76c3bbc PNF: Deliver DL_TTI.req/TX_data.req only pairwise to L1
the L1 needs both a PDU (in TX_data.req) as well instructions for
the actual transmission (in DL_TTI.req) to encode a PDSCH message. In
nFAPI, it can happen that a DL_TTI.request message has been received
(configuring the PDSCH transmission), without the TX_data.request having
reached the PNF. The L1 assumes to have the PDU.

To avoid problems, ensure that only the pair of DL_TTI.req/TX_data.req
is delivered. Otherwise, drop either message.
2025-01-27 10:59:19 +01:00
Robert Schmidt
77837c7428 Remove unnecessary and long hexdump 2025-01-27 10:59:19 +01:00
Robert Schmidt
63159d3f87 sockaddr_in no memset 2025-01-27 10:59:19 +01:00
Rúben Soares Silva
10c5178bfb Add configuration files for nFAPI split with RFSim and 100MHz 2025-01-27 10:59:19 +01:00
Robert Schmidt
dee68e6319 nFAPI: increase maximum segment size to 65000
nFAPI has a mechanism to segment messages that are too big for transport
over a given medium (see e.g. SCF 225, section 2.3.2).

The maximum segment size of 10000 makes that for larger payloads, e.g.
TX_data.request, many small segments are to be sent. This can create or
increase delays on the transport. On the other hand, the currently only
available transport mechanism, UDP, allows to transport packets of up to
almost 65535 bytes. Correspondingly, increase the maximum segment size
so that less segments are to be created, and potentially, less delay is
to be incurred.  # Please enter the commit message for your changes.
Lines starting
2025-01-27 10:59:19 +01:00
Robert Schmidt
b5276bdb6d nFAPI log: cleanly separate tv_sec/tv_nsec for readability 2025-01-27 10:59:19 +01:00
Robert Schmidt
099804078e pnf_p7_slot_ind(): Fix warning and simplify (no need for slot_ahead) 2025-01-27 10:59:19 +01:00
hsum
6e210e15f1 Handle DL_TTI.request more efficiently
Same as parent.

Co-authored-by: hsum <ming-hong.hsu@eurecom.fr>
Co-authored-by: chenyi <Yi-Quan.Chen@eurecom.fr>
Co-authored-by: Rúben Soares Silva <rsilva@allbesmart.pt>
2025-01-27 10:59:19 +01:00
hsum
cba2f92c8a Handle UL_TTI.request more efficiently
Same as parent.

Co-authored-by: hsum <ming-hong.hsu@eurecom.fr>
Co-authored-by: chenyi <Yi-Quan.Chen@eurecom.fr>
Co-authored-by: Rúben Soares Silva <rsilva@allbesmart.pt>
2025-01-27 10:59:19 +01:00
chenyi
282ee77104 Handle ul_dci.request more efficiently
Same as parent commit.

Co-authored-by: hsum <ming-hong.hsu@eurecom.fr>
Co-authored-by: chenyi <Yi-Quan.Chen@eurecom.fr>
Co-authored-by: Rúben Soares Silva <rsilva@allbesmart.pt>
2025-01-27 10:59:19 +01:00
Robert Schmidt
10beee4fd6 Handle tx_data.request efficiently
Avoid delays in tx_data.request handling by avoiding big malloc()s and
copy operations. Reimplement function to (1) peek the frame/slot
numbers, (2) decide on buffer, and (3) unpack directly into
pre-allocated memory.

Co-authored-by: hsum <ming-hong.hsu@eurecom.fr>
Co-authored-by: chenyi <Yi-Quan.Chen@eurecom.fr>
Co-authored-by: Rúben Soares Silva <rsilva@allbesmart.pt>
2025-01-27 10:59:19 +01:00
Rúben Soares Silva
8da4e92189 Provide check_nr_nfapi_p7_slot_type()
Some messages might arrive for the wrong slot; in those cases, the
message has to be dropped. The next commits will make use of this
functionality.
2025-01-27 10:59:19 +01:00
Rúben Soares Silva
d6b8fe93ab Provide peek_nr_nfapi_p7_sfn_slot() for fast msg dec
The next commits refactor the rx handling of messages in the PNF. To
efficiently handle them, provide a "peek()" function that gives us the
frame/slot for which a message is destined. This allows to decide if a
message is on time and select a destination buffer, before unpacking it
completely, avoiding copies.
2025-01-27 10:59:19 +01:00
chenyi
17e36029fa Fix PMI condition: avoid division by zero 2025-01-27 10:59:19 +01:00
Robert Schmidt
a1190f9fd0 nFAPI: give more time for messages to arrive, make it work
The time that a message between PNF/VNF to arrive depends mostly on the
transport. To allow for some delays, there is a slot_ahead time, during
which the VNF is allowed to schedule and send instructions to the PNF.

This can be multiple slots; the 1ms hitherto given might typically too
short. Increase to 10ms, to encompass a wider range of slot_ahead times.

Make the corresponding log message of when old (stale) message are
removed a bit clearer with respect to times.

This is the first commit in which nFAPI works. Follow-up commits improve
performance.
2025-01-27 10:59:19 +01:00
Robert Schmidt
32363ccaad Remove usage of emulate_l1 flag at gNB
The usage of this flag in the L1 is simply wrong: either, the NFAPI mode
runs L1, or not. Correspondingly, add an assert to check this invariant.

In the NR_IF_module, the correct check to do is for VNF (implying no L1,
or "emulation of L1" [which is not true]), in which case we use
queues.
2025-01-27 10:59:19 +01:00
Robert Schmidt
3fcfef9006 L1 DLSCH: don't preallocate memory, improve log
The L1 receives a pointer to the L1 payload to use for PDSCH generation.
This would overwrite an existing pre-allocated pointer. Remove this
preallocation. Instead, allocate it in the simulator (the only place
that actively uses this buffer allocation; in nr-softmodem, it's lost by
assigning a pointer). Allocate with an extra byte, because the payload
(in bits) might not be a multiple of 8 bits/1 byte, so the CRC is in the
last 3 bytes.

Also, improve the log with frame/slot information if the PDSCH payload
pointer is NULL.
2025-01-27 10:59:19 +01:00
hsum
195b23bdc4 Refactor is_nr_p7_request_in_window function for clarity and efficiency
The function now utilizes simpler variable names and logic to determine
if a given NR P7 request falls within the timing window.

The logic for determining if a request is within the timing window is as follows:
- The function calculates the absolute difference between the current
  and received SFN slots, taking into account the possibility of
  wraparound.
- If the absolute difference is greater than half of the maximum SFN
  slot value, it subtracts this difference from the maximum SFN slot
  value to get the actual difference.
- The function then checks if this difference is less than or equal to
  the specified timing window. If it is, the request is considered to be
  within the window.

Additionally, the commit updates the function signature to return a
boolean value for better readability and consistency.

Changes made:
- Simplified variable names for readability
- Improved logic for handling wraparound scenarios
- Updated function signature to return a boolean value

Co-authored-by: Rúben Soares Silva <rsilva@allbesmart.pt>
2025-01-27 10:59:19 +01:00
Robert Schmidt
267be0afc1 Remove huge memset that is pointless 2025-01-27 10:59:19 +01:00
Robert Schmidt
7949b622be RACH.indication: don't check time window
Since commit defc97ec16 ("Msg2 and Msg3 at gNB: check allocation before
committing to Msg2"), the scheduler calculate Msg2/Msg3 frame/slot
before allocation of Msg2, and not when receiving Msg1. It also respects
the RA response window correctly.

Correspondingly, we don't need to calculate here if the RACH.indication
is within the time window. The scheduler will do this.
2025-01-27 10:59:19 +01:00
Robert Schmidt
6cdea81e4a Reduce PNF nFAPI logs 2025-01-27 10:59:19 +01:00
hsum
65bc677fc3 Ensure equal PNF timing pace
If VNF and PNF are deployed through different processes, it's crucial to
maintain synchronization and ensure smooth operation. This commit
addresses the need to keep the VNF slot ahead of 2 (as required for
network deployment), while ensuring that PNFs wait appropriately to
avoid overtaking the slot. Specifically, this involves measuring slot
duration and implementing a wait mechanism to ensure that PNFs do not
exceed a slot duration of 300 microseconds. This ensures proper smooth
operation, especially in the case of RFsim.
2025-01-27 10:59:19 +01:00
Robert Schmidt
10afbef473 reset nFAPI message count in PNF
Reset the counters. In monolithic, this happens in the scheduler; in the
PNF, without this change, it would trigger PDCCH again.

Co-authored-by: hsum <ming-hong.hsu@eurecom.fr>
2025-01-27 10:59:19 +01:00
Robert Schmidt
50aec62b40 pnf_p7_slot_ind(): don't trigger UL_tti_req twice
This is already triggered in the same function.
2025-01-27 10:59:19 +01:00
Robert Schmidt
63c1b3df03 pnf_p7_slot_ind(): avoid memleak 2025-01-27 10:59:19 +01:00
Robert Schmidt
15b08a362f Refactor pnf_phy_ul_dci_req() et al. to use common code
Refactor pnf_phy_ul_dci_req(), pnf_phy_dl_tti_req(),
pnf_phy_tx_data_req(), pnf_phy_ul_tti_req(), to use L1 functions to
"load" L1 jobs to be executed, via L1 functions.
2025-01-27 10:59:19 +01:00
Robert Schmidt
a32ada76c7 Workaround for sched_response in PNF
In monolithic, the sched_response mechanism ensures that FAPI messages
for one slot are not overwritten by scheduler instructions for the
following slots (i.e., it is like a memory allocation pool).

The allocation happens in nr_schedule_response(), not used by the PNF.
Hence, only deallocate when in monolithic.

The PNF uses a big ring buffer over all slots in a frame to ensure the
same.
2025-01-27 10:59:19 +01:00
Robert Schmidt
82f8c38d74 nr_schedule_response(): split out UL_dci_req into separate function 2025-01-27 10:59:19 +01:00
Robert Schmidt
28fb982cb9 nr_schedule_response(): Split out ul_tti_req into separate function 2025-01-27 10:59:19 +01:00
Robert Schmidt
f2229adba3 nr_schedule_response(): make right order (222.10.0x "API message order") 2025-01-27 10:59:19 +01:00
Robert Schmidt
4fe8d3cd8e nr_schedule_response(): break up in separate dl_tti_req + tx_req phases 2025-01-27 10:59:19 +01:00
Robert Schmidt
6a630f4646 nr_schedule_response(): Separate dlsch_fill into DL_tti_req and TX_req part
FAPI sends those independently, so we cannot treat both on the arrival
of the first one.
2025-01-27 10:59:19 +01:00
Robert Schmidt
c37bf20501 nr_schedule_response() is not used in VNF, only monolithic 2025-01-27 10:59:19 +01:00
Robert Schmidt
73478ca27e pnf_p7_slot_ind(): Handle messages in FAPI 222.10.0x order 2025-01-27 10:59:19 +01:00
Robert Schmidt
70474ad130 PNF: don't send dummy data
If nothing is to be sent, nothing is to be done.
2025-01-27 10:59:19 +01:00
Robert Schmidt
c7e145a471 pnf_p7_slot_ind(): needs to use TX thread time
This function applied an sf_ahead, bigger than the actual slot
indication message sending (so a message could NEVER arrive on time!).
Reduce to zero, because this is when it should arrive for us.
2025-01-27 10:59:19 +01:00
Robert Schmidt
16ead1d001 nr_slot_select() and set_tdd_config_nr(): remove useless second frame
FAPI says these lists should be for MAX_TDD_PERIODICITY (which is maybe
a frame, or a TDD period? but likely not two frames). Reduce to one
frame.

Also, the nFAPI code assumes one entire frame, so use that (this commit
necessary to actually make the PNF work, otherwise, the
packing/unpacking of the FAPI message would need to do 2 frames).

Closes: #876
2025-01-27 10:59:19 +01:00
Robert Schmidt
28b60edaa2 Use posix_memalign() for pnf_p7_t creation
Some L1 functions might get a pointer to P7 structures, and use SIMD in
which case the memory access needs to be aligned.
2025-01-27 10:59:15 +01:00
Rúben Soares Silva
3fb20d960b Call trigger_scheduler defined in nfapi_vnf.c instead of redefining it 2025-01-27 10:59:15 +01:00
Robert Schmidt
e3bad16ab8 Call indication regularly
Upon reception of FAPI UL messages (e.g., RACH.indication), those
messages are put into queues, to be delivered in a single call,
NR_UL_indication(). Call the scheduler to trigger processing in UL.

Note that ideally, these queues should not exist at all, and messages
should just be delivered asynchronously, as this would lead to less
copying of messages. Currently, we fulfill the scheduler interface
instead.

Important! Trigger UL after having run DL scheduler and sent the
messages, to ensure short delay between Slot.indication, and the
response to those messages.
2025-01-27 10:59:15 +01:00
Robert Schmidt
531726633a Call directly into scheduler from VNF, start immediately
The previous designs seems to do:

    loop {
      poll_ind_queue()
      if (msg)
        scheduler;

      pselect() on messages;
      handle_message {
        if slot_ind
          put_ind_queue()
      }
    }

So basically, we artificially put a queue for slot indications in the
middle, but still handle it in the same thread(!). This for some reason
results in a big slow down if the PNF runs faster.

Now, we just do pselect(), waiting for messages. We handle the slot
indication immediately (the schedule should take some microseconds),
then return to pselect().
2025-01-27 10:59:15 +01:00
Robert Schmidt
412446077f IF module slot_indication: send message in PNF
Use this function to implement distinct behavior for monolithic or PNF:

- monolithic: run the scheduler, as normal
- PNF: send a slot indication; the VNF will send an answer which the PNF
  will handle elsewhere.

Add function declarations to make nr_ulsim compile, as NR_IF_Module.c is
part of the MAC sources. As of now, this is necessary; I think the right
way would be to take NR_IF_Module.c out of the MAC, and make this a
"glue" library that sticks L1 and L2 together, in monolithic (in VNF, in
that case, we should not link in L1, and for the PNF not the L2,
creating separate executables... Rome was not built in one day).
2025-01-27 10:59:15 +01:00
Robert Schmidt
c5a76d6654 Remove unnecessary handle_nr_slot_ind()
the slot indication is sent from the tx_thread (tx_func()). Thus, we
don't need to send it a second time.
2025-01-27 10:59:15 +01:00
Robert Schmidt
84d92ac820 Prevent memory leak, use stack for slot indications 2025-01-27 10:59:15 +01:00
Robert Schmidt
9f80c82f54 Only use refcount if monolithic
There is a reference counting mechanism used in monolithic. It does not
apply for the PNF.
2025-01-27 10:59:15 +01:00
Robert Schmidt
9634593da7 Don't call L1 code in VNF
The VNF should never call into the L1, it's L2/L3, by definition. Also,
it's not necessary.
2025-01-27 10:59:15 +01:00
Robert Schmidt
1b44f6448b Allow to use multiple PUCCH at once
We are required to store multiple PUCCH (e.g., for multiple UEs).
However, nr_fill_pucch() automatically freed the previously active PUCCH
structure. Of course(!) this does not make sense.

However, the problem is that init_nr_transport() allocated only one
PUCCH structure. Also this does not make sense to me. The problem was
that slot_ahead was 0, which logically cannot happen in this function
(because slot_ahead is illogical, we must give the radio some time). The
reason is that it uses if_inst->sl_ahead, which, prior to this commit,
was not set.

The init_nr_transport() function is called normally from main() through
init_eNB_afterRU(). In this case, we initialize if_inst->sl_ahead to
what is set in main(). In the PNF case, however, we call
init_nr_transport() from the PNF thread, when receiving the start
request. In the main(), we wait for this to happen, before setting
if_inst->sl_ahead. Hence, initializing this variable (which we should
safely be able to do) before solves the problem.
2025-01-27 10:59:15 +01:00
Robert Schmidt
84d9df501d No special handling for PNF for RX procedures
See also a later commit "Allow to use multiple PUCCH at once", in which
PUCCH handling in the case of PNF is reworked.

We might squash both commits.
2025-01-27 10:59:15 +01:00
Rúben Soares da Silva
a6b40ace23 Assign NFAPI_NR_CONFIG_SLOT_CONFIG_TAG tag in TLVs used for transmitting the TDD Slot configuration through CONFIG.request. 2025-01-27 10:59:15 +01:00
Robert Schmidt
4ceac17cd5 Shorten the sleep
sync_var is set in main() (which likely is wrong in that the L1 code
sync itself, and not require the help of main()).
2025-01-27 10:58:42 +01:00
Robert Schmidt
dd3b3caf32 Sync PNF through the radio
The radio gives the clock. Therefore, we do not need to keep the time
separately in the PNF.

Also, the VNF should not run the ru_thread, as this is an L1 thread.
2025-01-27 10:43:57 +01:00
Robert Schmidt
604cfe8709 Request timing every slot
This is to align with monolithic/FAPI, where we get slot indications in
each slot. In the nFAPI, this is replaced by timing information, such
that the VNF ticks automatically, and gets indications from the PNF on
early/late messages. The timing information handling is not implemented
in the present nFAPI implementation. Instead, we adopt the FAPI behavior
and send timing information in every slot, abusing it to be a slot
indication.
2025-01-27 10:43:57 +01:00
Robert Schmidt
ce0737fc9d Remove double-add of PNF connection
There is no need to add the PNF in nr_start_resp_cb(), because it has
already been done in nr_param_resp_cb(). This might be wrong, because 4G
does it only in nr_start_resp_cb(), but for the moment, since it is also
used in nr_param_resp_cb(), avoid the double add.
2025-01-27 10:43:47 +01:00
Robert Schmidt
d4715fdeca Add PNF to VNF's list of PNFs when IP available
The same function is called in nr_start_resp_cb(), why there and not here?

At reception of nr_param_response, we receive the remote PNF information
on PNF/VNF. We have to store it.

In nr_start_response, it might not be correct and/or can be taken out.
The next commit will remove it.
2025-01-27 10:42:42 +01:00
Jaroslava Fiedlerova
f3e5ab1060 Merge remote-tracking branch 'origin/remove-most-of-m64-type-usage' into integration_2025_w04 (!3209)
Remove most of m64 type usage

MMX instructions were first SIMD version, the registers management is complex
(_mm_empty()) so, it is better to remove it now and use more recent instructions

anyway, gcc/clang should replace it automatically as long as we enable sse2,
that should always be the case but for code understanding and for ARM porting
for example, it is better to explicitly remove it
2025-01-27 10:35:20 +01:00
Jaroslava Fiedlerova
10392b5da2 Merge remote-tracking branch 'origin/nfapi-parser' into integration_2025_w04 (!3199)
Add a small FAPI Hex parser utility

Adds a small FAPI hex parser utility nfapi_hex_parser, that takes in a FAPI
message hexdump, either from the command line or a file, unpacks it and prints
the contents out to the console.

The functions to print the data to the console were added alongside the existing
utility functions, for both P5 and P7 messages.

This allows the user to quickly check if a message has the valid format to be
unpacked in OAI.

The file examples.md contains some examples of execution and output.

This utility is compiled alongside the NFAPI_LIB, as such, it is compiled
whenever we compile nr-softmodem, or any other target that uses the NFAPI_LIB.
2025-01-27 10:32:59 +01:00
Jaroslava Fiedlerova
5512a48fbd Demote error logs to debug for "PUCCH not processed"
As per https://gitlab.eurecom.fr/oai/openairinterface5g/-/issues/896#note_148540,
these logs can be ignored.

Closes: #896
2025-01-27 09:32:49 +01:00
Robert Schmidt
84c69e5064 Avoid huge calloc by alloc'ing TBs independently
Prior to this this commit, the structure NR_UE_info_t is 4881632 bytes.
On some machines, e.g., one of the CI systems, this can lead to realtime
problems when doing the initial calloc() of the data structure.

Commit e586efb29d ("Enable 32 HARQ
Processes in DL, UL") introduced the real-time problems by increasing
the number of HARQ processes.

The reason NR_UE_info_t is that big is that it contains buffers for DL
HARQ data that might need to be retransmitted (the L1 is stateless, it
cannot store this for the L2). To reduce the size, dynamically allocate
the DL HARQ buffers when they are needed. This also reduces the size of
NR_UE_info_t to 15840 bytes.

Encapsulate transportBlock in byte_array and accessory functions, and
allocate in big chunks of multiple of ~32kB.

Reported-By: Cedric Roux <cedric.roux@eurecom.fr>
Fixes: e586efb29d
Closes: #875
2025-01-27 07:47:38 +01:00
Robert Schmidt
8eca2e0591 Correctly link function
ran_func_kpm.c uses cp_ba_to_str(), but it is not defined in OAI. Define
it so we can link properly, instead of relying on FlexRIC (where it was
defined).
2025-01-27 07:45:39 +01:00
Robert Schmidt
febeaa7181 F1AP IDs: Add update method to fix concurrency bug
Introduce function cu_update_f1_ue_data() which does remove+add under
one lock. This fixes a concurrency bug. For instance, during
reestablishment, the CU needs to update the DU UE ID under which the UE
is identified in the DU. Previously, the CU would remove, then add the
DU UE ID info.  At the same time, the PDCP thread might look up the
information. This can lead to asserts. Use the above addmod
functionality to do the remove-add under a mutex.

Modify test to verify this works as expected.
2025-01-24 16:09:10 +01:00
Jaroslava Fiedlerova
7520218195 Merge remote-tracking branch 'origin/t-hacks-small-improvement' into integration_2025_w04 (!3217)
minor improvements in T hacks
2025-01-24 16:06:19 +01:00
Robert Schmidt
ffb3354d49 Verify cu/du_add_f1_ue_data() success in stack 2025-01-24 15:39:43 +01:00
Laurent THOMAS
b999177810 remove MMX instruction usage in polar decode 2025-01-24 15:29:28 +01:00
Robert Schmidt
f0ab268393 Revert "F1AP IDs: Allow AddMod, fix concurrency bug"
This reverts commit 6d5e29f5ae.
2025-01-24 15:23:06 +01:00
Jaroslava Fiedlerova
266076897c Merge remote-tracking branch 'origin/qam64_mimo_ML' into integration_2025_w04 (!3020)
use ML receiver for 64 QAM UL-MIMO

Change condition on MMSE/ML selection to include 64QAM for ML UL-MIMO receiver.
Only 256QAM will now use MMSE UL-MIMO receiver.
2025-01-24 11:32:37 +01:00
Jaroslava Fiedlerova
706aecf22b Merge remote-tracking branch 'origin/fix_t2_harq_combined_offset' into integration_2025_w04 (!3214)
fix(nrLDPC_coding_t2): Miscellaneous fixes related to T2

1. HARQ combined offset:
The offset provided for each code block in the HARQ combined input and output
buffer shall not be above 512. A modulus was performed on the offset of the TB
in the buffer to avoid this situation. But the offset of the code block was
added afterward so that the total offset was sometimes going above 512.This
commit performs the modulus after adding the code block offset. Usually this
issue was triggering a segfault after less than 2 minutes of an iperf test on
some setup using T2. The same iperf test was successfully performed during 10
minutes on the same setup with this change.

2. Properly stop LDPC coding in gNB and UE:
LDPC coding was yet not properly stopped by using free_nrLDPC_coding_interface
in gNB and UE. This was not causing major issue until now. It was especially not
causing any issue with T2 LDPC coding using the PF. But using T2 VFs, if the
coding library is not properly stopped then the VF cannot be used anymore unless
the admin app is restarted. So this MR adds the missing free_nrLDPC_coding_interface.
2025-01-24 11:30:13 +01:00
Jaroslava Fiedlerova
3231b0bcfc Merge remote-tracking branch 'origin/ntn-phytest-mode' into integration_2025_w04 (!3192)
fix nr phy-test mode in ntn

Following SIB19 MR !3019 (merged), the phy-test mode is no longer working
In this MR we update the handling NTN-Config from ServingCellConfigCommon
to be the same as when NTN-Config is received in SIB19

More details: !3019 (comment 145103)
2025-01-24 11:28:32 +01:00
Guido Casati
124f4ab9c5 Improvements to rrc_gNB_process_e1_setup_req
* add const atttribute to input message
* use malloc_or_fail
2025-01-24 11:13:17 +01:00
Guido Casati
5ea432c081 Use CU-UP E1 Setup Failure enc/dec lib in stack 2025-01-24 11:13:17 +01:00
Guido Casati
75b238633c Add test for E1 CUUP Setup Failure 2025-01-24 11:13:17 +01:00
Guido Casati
beb74b3e62 Add GNB-CU-UP E1 Setup failure enc/dec library 2025-01-24 11:13:14 +01:00
Rúben Soares Silva
b1d7bbf1a2 Add dump procedures fir UL_TTI.request PDUs
Add examples of UL_TTI.request to examples.md
Small fix on printing RNTI on DL_TTI.request PDSCH PDU on RNTI field
2025-01-24 10:05:49 +00:00
Jaroslava Fiedlerova
c0a0de3e63 Merge remote-tracking branch 'origin/remove-unused-code' into integration_2025_w04 (!3215)
Remove unused code
2025-01-24 09:31:14 +01:00
Jaroslava Fiedlerova
03420b112e Merge remote-tracking branch 'origin/fix-bug-usrp-constant-derive' into integration_2025_w04 (!3023)
usrp constant and slow derive timestamp

Sample write reorder function doesn't handle properly the clock shift.

It keeps the same time origin forever, so, if the clock sifts in one direction,
we finish to reach the maximum time shift that was designed for slot to slot
maximum shift.

We may also consider if this function is useful: gNB and UE currently ensure Tx
in order because there are other issues above if we let Tx preparation run out
of order in separate threads

Closes #893
2025-01-24 09:27:30 +01:00
Laurent THOMAS
ef3b99a263 remove MMX instruction usage in threegpplte_turbo_encoder_sse() 2025-01-23 21:18:26 +01:00
Laurent THOMAS
e106ec6d91 remove m64 type and a very basic cleaning of LTE ulsch_decoding 2025-01-23 21:18:26 +01:00
Robert Schmidt
4d6b95a155 FHI72: Remove numerology limitation, allow to run mu=0 2025-01-23 18:26:47 +01:00
Robert Schmidt
61b8217a15 FHI72: handle FDD in xran_fh_rx_read_slot() 2025-01-23 18:16:28 +01:00
Jaroslava Fiedlerova
2da68f6056 Merge remote-tracking branch 'origin/e1ap-issue-878' into integration_2025_w04 (!3171)
- Refactor SCTP Association Response Handling
  - Unified function for both CU-CP and CU-UP handling
  - CU-CP: Notifies RRC of E1 connection loss with CU-UP
  - CU-UP: Initiates a new SCTP association request to regain E1 connection
  - this fix will prevent issue #878 from happening

- Send list of PDU Session Resources to Failed Setup in the (PDU Session
  Resource/Initial Context) Setup Response
  - depending on different failure scenarios
  - e.g. (#878) when No CU-UP is associated and still the CU-CP receives a PDU
    Session Setup Request
  - add relevant functions to handle NGAP Setup Response messages with failed
    list of items
  - this is an extra failure handling to make #878 is handled if it ever happens
    again

- NGAP Cause Refactoring
  - Refactor struct for NGAP cause group and value
  - Add extended radio network cause enumeration values
  - Refactor redundant code into a new NGAP cause encoding function

- Minor logging, function descriptions improvements

Closes #878
2025-01-23 17:50:55 +01:00
Jaroslava Fiedlerova
4f5cb2408c Merge remote-tracking branch 'origin/remove-legacy-compile-option' into integration_2025_w04 (!3198)
A user on the mailing list was confused by a wrong flag in CMakeList.txt
so, I remove this and a set of others that are known not working.
2025-01-23 17:48:42 +01:00
Guido Casati
f3890dcd2a Completed GNB-CU-UP E1 Setup failure according to 9.2.1.6 of 3GPP TS 38.463 2025-01-23 17:37:52 +01:00
Guido Casati
b2f5f216cd Add E1AP cause enum definition 2025-01-23 17:37:52 +01:00
Guido Casati
5176199aa2 Use GNB-CU-UP E1 Setup Response enc/dec lib in stack 2025-01-23 17:37:52 +01:00
Guido Casati
5b4a45b694 Add test for E1 CUUP Setup Response 2025-01-23 17:37:52 +01:00
Guido Casati
422e82df70 Add GNB-CU-UP E1 Setup Response enc/dec lib 2025-01-23 17:37:50 +01:00
Guido Casati
763c265c42 Extend CU-UP E1 Setup Response according to 9.2.1.5 of 3GPP TS 38.463 2025-01-23 17:37:02 +01:00
Guido Casati
02e1c3589b Use E1 CU-UP Setup Request enc/dec lib in stack 2025-01-23 17:34:03 +01:00
Guido Casati
8fbfcf48f6 Add test for E1 CUUP Setup Request 2025-01-23 17:34:03 +01:00
Guido Casati
414fc2e9a2 Add E1 CU-UP Setup Request enc/dec lib 2025-01-23 17:34:00 +01:00
Cedric Roux
fc4cc9ef55 T: update list of mandatory libraries 2025-01-23 16:57:43 +01:00
Cedric Roux
28a08786bb T hacks: time_meas: add a periodic tracing mode
Useful to debug realtime issues, for example when calling a periodical
routine, if it's not programmed carefully enough, it may be that the first
call takes way longer than the next ones (for example it uses some memory
that is not mapped in the process, leading to many page faults the first
time it's executed).

Having a periodic log for the timing of this routine with min/avg/max/count
will reveal that a call is way longer than average and will help in
finding where exactly in the code the time is spent, thanks to the ease
of use of the T tracer; you put T(T_XX, T_INT(1)) just before the code
you want to measure, you put T(T_XX, T_INT(0)) just after and time_meas
will show the delta time between those events. Then you cut the routine
in smaller pieces, measure with T(1)/T(0), and you finally reach the small
guilty part that takes too long.
2025-01-23 16:57:43 +01:00
Cedric Roux
44637de3b2 T hacks: minor bugfix: don't log more than once
In time_meas.c, when getting 0 for the event, we log delta time with
previous 1 for the event. "start_valid" was not cleared, so receiving
a second 0 without 1 in between may lead to wrong logging.

Should not happen in practice, but still, little bug.

(Note: we don't protect against streams of 1, but this case should also
not happen.)
2025-01-23 16:57:43 +01:00
Cedric Roux
e6ce301e83 T hacks: minor: remove executable when doing 'make clean' 2025-01-23 16:57:43 +01:00
Bartosz Podrygajlo
803c9c349a Add distance in meters to RA print in gNB 2025-01-23 16:32:31 +01:00
Bartosz Podrygajlo
ad04800b20 Add preamble_index to gNB and UE logs 2025-01-23 16:29:29 +01:00
Rúben Soares Silva
1451f30b93 Add a small FAPI Hex parser utility
Add utility functions to print the FAPI messages contents
Add dump functions for DL_TTI.request PDUs, remaining message structures to be finished
Add file examples.md with some examples on how to use nfapi_hex_parser
2025-01-23 13:34:24 +00:00
Robert Schmidt
c4b57963ee Add some documentation on debug flags/dump 2025-01-23 14:15:51 +01:00
Laurent THOMAS
536b5d8760 Clean up logging module debug flags
cleanup debug/dump flags by avoiding repetitions in the source code and
enable compiler checks. Add a help text if we set a wrong debug trace
option.
2025-01-23 14:12:29 +01:00
Laurent THOMAS
ca37e0c123 Clean up NAS code, remove unused compile options 2025-01-23 14:12:06 +01:00
Laurent THOMAS
d68a8b51e6 Remove unused PHY_MEX compile option 2025-01-23 14:11:13 +01:00
Laurent THOMAS
0f970326c2 Remove unused UESIM_EXPANSION compile option 2025-01-23 14:10:50 +01:00
Laurent THOMAS
17bb19c7be Remove unused LOCALIZATION compile option 2025-01-23 14:10:33 +01:00
Laurent THOMAS
b0734604e9 Remove useless RRC states 2025-01-23 14:10:16 +01:00
Laurent THOMAS
a54eba8fe0 Remove commented code and unused type definitions 2025-01-23 14:08:17 +01:00
Laurent THOMAS
fb2f893954 Remove unused static inline function 2025-01-23 13:57:36 +01:00
Laurent THOMAS
a8f6563060 remove a complex and not very usefull trace in replay_node 2025-01-23 10:35:49 +01:00
Laurent THOMAS
e7e01f753a remove unsed LUT 2025-01-23 10:35:49 +01:00
Laurent THOMAS
eac35f07a5 Usrp constant and slow derive timestamp
Co-authored-by: Thomas Schlichter <thomas.schlichter@iis.fraunhofer.de>
2025-01-23 10:22:31 +01:00
Robert Schmidt
1dd71b51e1 Properly implement PNF/VNF list find
maybe take this out
2025-01-22 18:29:55 +01:00
Robert Schmidt
f4862fe23b Avoid buffer overflow: initialize for multiple PRACH FD occasions
Maybe cosmetic
2025-01-22 18:29:55 +01:00
Robert Schmidt
4132fcc597 Place NFAPI waiting after RU init; don't wait for F1 if in PNF
harmonize with monolithic
2025-01-22 18:29:55 +01:00
Rúben Soares Silva
90435ccba8 Change init_eNB_afterRU to configure L1 according to proper amount.
Now uses RC.nb_nr_L1_inst instead of RC.nb_nr_inst in order to configure the L1, since in PNF RC.nb_nr_inst is always 0, and so, it wouldn't configure the L1
2025-01-22 18:29:55 +01:00
Rúben Soares Silva
c910d9f71f Change Assert condition to allow configuration when in PNF mode. 2025-01-22 18:29:55 +01:00
Robert Schmidt
e0aaa8fa5e Update nFAPI configs
Rename configs according to name guidelines. Put into right directory.
2025-01-22 18:29:50 +01:00
Robert Schmidt
337faca6f5 log changes
Remove useless message bytes printing

Print message if callback missing

less newlines in log

logs
2025-01-22 15:04:46 +01:00
Robert Schmidt
e0549de9ea Remove Slack integration for Jenkins jobs 2025-01-22 14:37:22 +01:00
Sagar Arora
3090d0414e fix(ci): waiting for a pod using k8s wait command
Signed-off-by: Sagar Arora <sagar.arora@openairinterface.org>
2025-01-22 11:06:26 +01:00
Guido Casati
6cfa3e3722 Add E1AP Interface Management lib files 2025-01-20 13:48:47 +01:00
Guido Casati
c0db34077a Explicitly include the mandatory IE cn_support in the E1 Setup Request
* this commit is making explicit the mandatory IE cn_support
  in the E1 Setup Request message
* also, init cn_support in E1 Setup Request initial message preparation
2025-01-20 13:45:29 +01:00
Guido Casati
0cd4aeee5b Add E1 CU-CP Setup Request type
* E1 CU-CP Setup Request is an E1 Interface Management message
  whose type defition was missing, and it is introduced in this commit
  (see 9.2.1.7 of 3GPP TS 38.463)
2025-01-20 13:38:53 +01:00
Guido Casati
334537aa98 Add comments to clarify that E1AP Setup Request refers to GNB-CU-UP E1 Setup Request 2025-01-20 13:28:56 +01:00
Guido Casati
9fe045f40e Add abnormal conditions section to E1-design.md 2025-01-20 09:59:57 +01:00
Romain Beurdouche
38a38e0eaf fix(nrLDPC_coding_t2): Properly stop LDPC coding in gNB and UE
LDPC coding was yet not properly stopped by using free_nrLDPC_coding_interface in gNB and UE.
This was not causing major issue until now. It was especially not causing any issue with T2 LDPC coding using the PF.
But using T2 VFs, if the coding library is not properly stopped then the VF cannot be used anymore unless the admin app is restarted.
So this MR adds the missing free_nrLDPC_coding_interface.
2025-01-20 08:10:42 +00:00
Guido Casati
beee87cdf6 Add check on CU-UP association before sending any E1 Bearer Context Modification Request 2025-01-17 18:07:02 +01:00
Thomas Schlichter
0fd5130573 NR UE: remove unused elements tx_wait_for_dlsch and rx_offset from nr_rxtx_thread_data_t 2025-01-17 11:40:09 +00:00
Thomas Schlichter
a2eaacf2bd remove unused element harq from LDPC encoder_implemparams_t 2025-01-17 11:40:09 +00:00
Thomas Schlichter
45dfcbe6cd remove unused global variable sl_ahead 2025-01-17 10:59:39 +00:00
Thomas Schlichter
0b4b6b952d remove unused rt_profiling 2025-01-17 10:59:28 +00:00
Romain Beurdouche
0d3008c244 fix(nrLDPC_coding_t2): HARQ combined offset
The offset provided for each code block in the HARQ combined input and output buffer shall not be above 512.
A modulus was performed on the offset of the TB in the buffer to avoid this situation.
But the offset of the code block was added afterward so that the total offset was sometimes going above 512.
This commit performs the modulus after adding the code block offset.
2025-01-17 10:55:03 +00:00
Teodora
f1076605f2 FDD mode support in 7.2
- extend get_xran_prb_map() function to handle mixed slot
  - properly fill PRB configuration based on DL/UL direction and duplex mode
  - do not implicitly assume TDD
2025-01-16 21:34:53 +01:00
Robert Schmidt
6d5e29f5ae F1AP IDs: Allow AddMod, fix concurrency bug
Modify xu_add_f1_ue_data() to be xu_addmod_f1_ue_data(), i.e., "addmod"
behavior in which it is possible to also update f1_ue_data. I do it this
way since an xu_updade_f1_ue_data() function would be almost the same as
the add function (only deleting existing data, whereas the original
add() was asserting in that case).

Modify tests to test for this behavior.

This fixes a concurrency bug. For instance, during reestablishment, the
CU needs to update the DU UE ID under which the UE is identified in the
DU. Previously, the CU would remove, then add the DU UE ID info.
At the same time, the PDCP thread might look up the information. This
can lead to asserts. Use the above addmod functionality to do the
remove-add under a mutex.
2025-01-16 16:50:58 +01:00
Robert Schmidt
c7dc71e66d Add test for CU F1AP ID data 2025-01-16 15:38:20 +01:00
Robert Schmidt
e2bf9fb0a4 F1AP IDs: refactor common insert 2025-01-16 15:22:59 +01:00
Robert Schmidt
253fffe7fb F1AP IDs: refactor common code 2025-01-16 15:15:47 +01:00
Teodora
72d5c77e3b Harmonize DL/UL PRB mapping in one get_xran_prb_map() function
- the parameters used in DL/UL are exactly the same, except the direction and the number of PRBs;
    therefore, passing the direction seems convenient for visibility purposes and reduces the code.

Note: Number of PRBs we store in fh_config for both DL/UL is num_rb_dl of openair0_config struct.
At the end, it is actually the same info.
2025-01-16 13:40:10 +01:00
Badescu, Ciprian
2924d18ebe Fix ntn phy-test mode
Following SIB19 MR !3019, the phy-test mode is no longer working
In this MR we update the handling NTN-Config from ServingCellConfigCommon
to be the same as when NTN-Config is received in SIB19
2025-01-16 13:27:18 +02:00
Guido Casati
9e9bd278a9 Minor: RCconfig_NR_CU_E1 function description and logging 2025-01-14 14:13:49 +01:00
Guido Casati
bcd1270237 Refactor SCTP association response handler
* this function is used by both CU-CP and CU-UP
* it behaves differently depending on the type of E1 instance:
  CU-CP: inform RRC of E1 connection loss with CU-UP
  CU-UP: trigger a new SCTP association request by sending an ITTI to the CU-UP task
* after receiving the E1AP register request, the CU-UP will send a new association request to
  SCTP until new E1 connection is achieved by sending a TIMER_HAS_EXPIRED message to the CU-UP
  task. The function e1apHandleTimer() is basically triggering a new E1 association request
  until new E1 connection is achieved
* print SCTP association state in e1ap.c whenever needed

Related to #878
2025-01-14 14:13:49 +01:00
Guido Casati
b922fd2649 Clean up NGAP Setup Failure messages: there's no such message in 3GPP TS 38.413
* the list of PDU Session Resources Failed to Setup shall be sent in the Response message
2025-01-14 14:13:49 +01:00
Guido Casati
a1abf90d5b Handle PDU Session Resource to Setup Failure in (PDU Session Resource/Initial Context) Setup Response
* add function to check whether cu-up is connected
* add functions to send the relevant response messages with the failed list
  e.g. to fill PDU Session Resource Failed to Setup items
* set return value of trigger_bearer_setup to bool and handle the
  failure by sending setup response messages with list of PDU sessions failed to setup
  i.e. send failed list of items when no CU-UP is associated to the CU-CP
  note: it considers all PDU Sessions as failed to setup in the considered failure scenarios
* e.g. send a list of failed PDU session resources in the response message to reject
  PDU Session Resource Setup in rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ
* the Initial Context Setup has a Failure message, but for the considered failure scenario
  when no CU-UP is available the current design is just sending a list of failed to setup
  items in the Response message
* transfer PDU Session Resource/Initial Context Setup Request NAS PDU to UE

closes #878
2025-01-14 14:13:49 +01:00
Guido Casati
f00a7a0197 Refactor NGAP cause
* new struct definition including both NGAP cause group and value
* add encoding function, temporarily in ngap_common.c
  (in the long term to be place in a enc/dec NGAP library)
* extend Radio Network cause enum values
* add cause member to Setup Failure
2025-01-14 14:13:49 +01:00
Guido Casati
0fd0a4fcae NAS: Minor comments and logs 2025-01-08 20:11:12 +01:00
Guido Casati
8215aa60ba Explicit protocol_discriminator size in fgs_nas_message_security_header_t
* size of fgs_nas_message_security_header_t is platform-depending
  while protocol_discriminator must be 1 byte
* fgs_protocol_discriminator_t stays as enum type
2025-01-08 20:11:12 +01:00
Guido Casati
dbd2d8574e Use PDU Session Establish Accept IEI text definition
* replace multiple log lines with one
2025-01-08 20:11:12 +01:00
Guido Casati
047b4eea8b Refactor PDU Session Establish Accept IEI
* use NAS macro to define enums and text description
2025-01-08 20:11:12 +01:00
Guido Casati
ccff518b2c Add include for memcpy to TLVEncoder.h 2025-01-08 20:11:12 +01:00
Guido Casati
45da0c8a81 Cleanup long time commented out code in openair3/NAS/TEST/AS_SIMULATOR/as_process.c 2025-01-08 20:11:12 +01:00
Guido Casati
f87388099d Replace type Byte_t used in NAS directly with uint8_t
* the goal is to simplify the code
2025-01-08 20:11:09 +01:00
Guido Casati
21df50b31e Cleanup unused imsi member in gNB_RRC_UE_s 2024-12-10 16:28:11 +01:00
Guido Casati
c0919d8533 Cleanup long time commented out lines in CMakeLists.txt 2024-12-10 16:28:11 +01:00
Raymond Knopp
026190e0d1 nr_ulsch log2_maxh case for single-layer 2024-10-28 16:55:06 +01:00
Raymond Knopp
e0c0df38ea adjustment of log2_maxh for 2-layer UL MIMO 2024-10-28 10:50:53 +01:00
Raymond Knopp
3e6f2db124 use ML receiver for 64 QAM UL-MIMO 2024-10-28 10:50:28 +01:00
605 changed files with 37488 additions and 43804 deletions

View File

@@ -260,7 +260,6 @@ endif()
# Debug related options
#########################################
add_boolean_option(DEBUG_ASN1 False "Enable ASN1 debug logs" OFF)
# asn1c skeletons have hardcoded this flag to make customized debug logs
# OAI uses this feature to re-use OAI LOG_I(ASN1, ...)
# see common/utils/config.h
@@ -299,6 +298,7 @@ message(STATUS "Selected KPM Version: ${KPM_VERSION}")
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)
##################################################
# ASN.1 grammar C code generation & dependencies #
@@ -346,6 +346,7 @@ set(NGAP_DIR ${OPENAIR3_DIR}/NGAP)
include_directories ("${NGAP_DIR}")
add_library(ngap
${NGAP_DIR}/ngap_gNB.c
${NGAP_DIR}/ngap_common.c
${NGAP_DIR}/ngap_gNB_context_management_procedures.c
${NGAP_DIR}/ngap_gNB_decoder.c
${NGAP_DIR}/ngap_gNB_encoder.c
@@ -449,7 +450,7 @@ add_library(f1ap
${F1AP_DIR}/f1ap_handlers.c
${F1AP_DIR}/f1ap_itti_messaging.c)
target_include_directories(f1ap PUBLIC F1AP_DIR)
target_link_libraries(f1ap PUBLIC asn1_f1ap L2_NR)
target_link_libraries(f1ap PUBLIC asn1_f1ap GTPV1U)
target_link_libraries(f1ap PRIVATE ngap nr_rrc HASHTABLE f1ap_lib)
target_include_directories(f1ap PRIVATE ${F1AP_DIR}/lib)
@@ -494,7 +495,6 @@ include_directories ("${OPENAIR_DIR}/radio/COMMON")
add_boolean_option(UE_EXPANSION False "enable UE_EXPANSION with max 256 UE" ON)
add_boolean_option(PHY_TX_THREAD False "enable UE_EXPANSION with max 256 UE" ON)
add_boolean_option(PRE_SCD_THREAD False "enable UE_EXPANSION with max 256 UE" ON)
add_boolean_option(UESIM_EXPANSION False "enable UESIM_EXPANSION with max 256 UE" ON)
##########################
# SCHEDULING/REAL-TIME/PERF options
@@ -506,20 +506,15 @@ add_boolean_option(ENABLE_VCD_FIFO False "time measurements of proc cal
##########################
# PHY options
##########################
add_boolean_option(LOCALIZATION False "???" ON)
add_integer_option(MAX_NUM_CCs 1 "????" ON)
add_integer_option(MAX_NUM_CCs 1 "Carrier component data arrays size (oai doesn't support carrier aggreagtion for now)" ON)
add_boolean_option(SMBV False "Rohde&Schwarz SMBV100A vector signal generator" ON)
add_boolean_option(DEBUG_PHY False "Enable PHY layer debugging options" ON)
add_boolean_option(DEBUG_PHY_PROC False "Enable debugging of PHY layer procedures" ON)
add_boolean_option(MEX False "Enabling compilation with mex" ON)
##########################
# NAS LAYER OPTIONS
##########################
add_boolean_option(ENABLE_NAS_UE_LOGGING True "????" ON)
add_boolean_option(NAS_BUILT_IN_UE True "UE NAS layer present in this executable" ON)
add_boolean_option(NAS_UE True "NAS UE INSTANCE (<> NAS_MME)" ON)
##########################
# RRC LAYER OPTIONS
@@ -687,7 +682,6 @@ set(SCHED_SRC_NR_UE
${OPENAIR1_DIR}/SCHED_NR_UE/phy_procedures_nr_ue.c
${OPENAIR1_DIR}/SCHED_NR_UE/phy_procedures_nr_ue_sl.c
${OPENAIR1_DIR}/SCHED_NR_UE/fapi_nr_ue_l1.c
${OPENAIR1_DIR}/SCHED_NR_UE/phy_frame_config_nr_ue.c
${OPENAIR1_DIR}/SCHED_NR_UE/harq_nr.c
${OPENAIR1_DIR}/SCHED_NR_UE/pucch_uci_ue_nr.c
)
@@ -716,6 +710,7 @@ set(NFAPI_PNF_SRC
)
add_library(NFAPI_PNF_LIB ${NFAPI_PNF_SRC})
target_link_libraries(NFAPI_PNF_LIB PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
target_link_libraries(NFAPI_PNF_LIB PUBLIC nr_fapi_p7)
include_directories(${NFAPI_DIR}/pnf/public_inc)
include_directories(${NFAPI_DIR}/pnf/inc)
@@ -746,6 +741,9 @@ set(NFAPI_USER_SRC
add_library(NFAPI_USER_LIB ${NFAPI_USER_SRC})
target_link_libraries(NFAPI_USER_LIB PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs UTIL)
target_link_libraries(NFAPI_USER_LIB PRIVATE nr_fapi_p7)
if(OAI_AERIAL)
target_compile_definitions(NFAPI_USER_LIB PRIVATE ENABLE_AERIAL)
endif()
include_directories(${NFAPI_USER_DIR})
# Layer 1
@@ -778,12 +776,11 @@ set(PHY_NRLDPC_CODINGIF
add_library(dfts MODULE ${OPENAIR1_DIR}/PHY/TOOLS/oai_dfts.c ${OPENAIR1_DIR}/PHY/TOOLS/oai_dfts_neon.c)
add_library(crc_byte OBJECT ${OPENAIR1_DIR}/PHY/CODING/crc_byte.c)
set(PHY_SRC_COMMON
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dci_tools_common.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/lte_mcs.c
# ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/slss.c
# ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/sldch.c
# ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/slsch.c
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/get_pmi.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/group_hopping.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/phich_common.c
@@ -806,7 +803,6 @@ set(PHY_SRC_COMMON
${OPENAIR1_DIR}/PHY/CODING/ccoding_byte.c
${OPENAIR1_DIR}/PHY/CODING/ccoding_byte_lte.c
${OPENAIR1_DIR}/PHY/CODING/3gpplte_sse.c
${OPENAIR1_DIR}/PHY/CODING/crc_byte.c
${PHY_TURBOIF}
${OPENAIR1_DIR}/PHY/CODING/lte_rate_matching.c
${OPENAIR1_DIR}/PHY/CODING/viterbi.c
@@ -842,13 +838,9 @@ set(PHY_SRC
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pcfich.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pucch.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pmch.c
# ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/ulsch_demodulation.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/ulsch_decoding.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/rar_tools.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/uci_tools.c
# ${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/freq_equalization.c
# ${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_adjust_sync_eNB.c
# ${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_eNB_measurements.c
${OPENAIR1_DIR}/PHY/INIT/lte_init.c
)
@@ -897,6 +889,7 @@ set(PHY_SRC_UE
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/ulsch_coding.c
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/rar_tools_ue.c
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/initial_sync.c
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/dlsch_llr_computation_avx2.c
${OPENAIR1_DIR}/PHY/MODULATION/slot_fep.c
${OPENAIR1_DIR}/PHY/MODULATION/slot_fep_mbsfn.c
${OPENAIR1_DIR}/PHY/MODULATION/ul_7_5_kHz_ue.c
@@ -918,7 +911,6 @@ set(PHY_SRC_UE
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_prach_common.c
${OPENAIR1_DIR}/PHY/nr_phy_common/src/nr_phy_common_csirs.c
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_scrambling.c
${OPENAIR1_DIR}/PHY/NR_REFSIG/scrambling_luts.c
${OPENAIR1_DIR}/PHY/NR_REFSIG/refsig.c
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/srs_modulation_nr.c
)
@@ -1026,12 +1018,12 @@ if (${SMBV})
set(PHY_SRC "${PHY_SRC} ${OPENAIR1_DIR}/PHY/TOOLS/smbv.c")
endif (${SMBV})
set(PHY_SRC_UE ${PHY_SRC_UE} ${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/dlsch_llr_computation_avx2.c)
add_library(PHY_COMMON ${PHY_SRC_COMMON})
target_link_libraries(PHY_COMMON PRIVATE shlib_loader)
target_link_libraries(PHY_COMMON
PRIVATE shlib_loader asn1_lte_rrc_hdrs crc_byte
PUBLIC UTIL
)
add_dependencies(PHY_COMMON dfts)
target_link_libraries(PHY_COMMON PRIVATE asn1_lte_rrc_hdrs PUBLIC UTIL)
add_library(PHY ${PHY_SRC})
target_link_libraries(PHY PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
@@ -1063,28 +1055,6 @@ target_link_libraries(PHY_NR_UE PRIVATE asn1_nr_rrc_hdrs nr_phy_common nr_common
add_library(PHY_RU ${PHY_SRC_RU})
target_link_libraries(PHY_RU PRIVATE asn1_lte_rrc_hdrs UTIL)
#Library for mex functions
#########################3
set(PHY_MEX_UE
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/linear_preprocessing_rec.c
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/dlsch_llr_computation.c
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/dlsch_demodulation.c
${OPENAIR1_DIR}/PHY/TOOLS/log2_approx.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/lte_mcs.c
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/get_pmi.c
${OPENAIR1_DIR}/PHY/TOOLS/dB_routines.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pmch_common.c
${OPENAIR1_DIR}/PHY/TOOLS/cadd_vv.c
${OPENAIR1_DIR}/PHY/TOOLS/cmult_sv.c
${OPENAIR1_DIR}/PHY/TOOLS/cmult_vv.c
${OPENAIR1_DIR}/PHY/TOOLS/signal_energy.c
${OPENAIR1_DIR}/PHY/TOOLS/simde_operations.c
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/dlsch_llr_computation_avx2.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_ue_measurements.c
)
add_library(PHY_MEX ${PHY_MEX_UE})
target_link_libraries(PHY_MEX PRIVATE asn1_lte_rrc_hdrs UTIL)
#Layer 2 library
#####################
set(MAC_DIR ${OPENAIR2_DIR}/LAYER2/MAC)
@@ -1139,7 +1109,6 @@ set(L2_SRC
${PDCP_DIR}/pdcp_util.c
${PDCP_DIR}/pdcp_security.c
${OPENAIR2_DIR}/LAYER2/openair2_proc.c
# ${RRC_DIR}/rrc_UE.c
${RRC_DIR}/rrc_eNB.c
${RRC_DIR}/rrc_eNB_endc.c
${RRC_DIR}/rrc_eNB_S1AP.c
@@ -1154,7 +1123,6 @@ set(L2_SRC
set(L2_RRC_SRC
${OPENAIR2_DIR}/LAYER2/openair2_proc.c
# ${RRC_DIR}/rrc_UE.c
${RRC_DIR}/rrc_eNB.c
${RRC_DIR}/rrc_eNB_endc.c
${RRC_DIR}/rrc_eNB_S1AP.c
@@ -1213,7 +1181,6 @@ set(NR_L2_SRC_UE
${NR_SDAP_SRC}
${NR_UE_RRC_DIR}/L2_interface_ue.c
${NR_UE_RRC_DIR}/main_ue.c
${NR_RRC_DIR}/nr_rrc_config.c
${NR_UE_RRC_DIR}/rrc_UE.c
${NR_UE_RRC_DIR}/rrc_nsa.c
${NR_UE_RRC_DIR}/rrc_timers_and_constants.c
@@ -1281,7 +1248,7 @@ set (MAC_NR_SRC_UE
${NR_UE_PHY_INTERFACE_DIR}/NR_Packet_Drop.c
${NR_UE_MAC_DIR}/config_ue.c
${NR_UE_MAC_DIR}/config_ue_sl.c
${NR_UE_MAC_DIR}/mac_vars.c
${NR_UE_MAC_DIR}/mac_tables.c
${NR_UE_MAC_DIR}/main_ue_nr.c
${NR_UE_MAC_DIR}/nr_ue_procedures.c
${NR_UE_MAC_DIR}/nr_ue_procedures_sl.c
@@ -1367,10 +1334,9 @@ if(E2_AGENT)
endif()
add_library(L2_LTE_NR
${L2_RRC_SRC}
${MAC_SRC}
# temporary solution until 4G/5G code completely untangled (as evidenced by deletion of the following file)
${MAC_DIR}/dummy_functions.c
${ENB_APP_SRC}
${MCE_APP_SRC}
)
target_link_libraries(L2_LTE_NR PRIVATE f1ap s1ap nr_rrc)
@@ -1382,20 +1348,16 @@ add_library(L2_UE
target_link_libraries(L2_UE PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
target_link_libraries(L2_UE PRIVATE GTPV1U)
add_library(L2_UE_LTE_NR
${L2_RRC_SRC_UE}
${MAC_SRC_UE}
)
target_link_libraries(L2_UE_LTE_NR PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
target_link_libraries(L2_UE PRIVATE asn1_lte_rrc_hdrs)
add_library( NR_L2_UE ${NR_L2_SRC_UE} ${MAC_NR_SRC_UE} )
target_link_libraries(NR_L2_UE PRIVATE f1ap nr_rlc)
target_link_libraries(NR_L2_UE PRIVATE nr_rlc)
target_link_libraries(NR_L2_UE PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs nr_common nr_ue_power_procedures nr_ue_ra_procedures)
target_link_libraries(NR_L2_UE PRIVATE nr_nas)
add_library(MAC_NR_COMMON
${OPENAIR2_DIR}/LAYER2/NR_MAC_COMMON/nr_mac_common.c
${OPENAIR2_DIR}/LAYER2/NR_MAC_COMMON/nr_mac_common_tdd.c
${OPENAIR2_DIR}/LAYER2/NR_MAC_COMMON/nr_compute_tbs_common.c
)
target_link_libraries(MAC_NR_COMMON PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
@@ -1437,6 +1399,7 @@ add_library(SCTP_CLIENT ${SCTP_SRC})
target_link_libraries(SCTP_CLIENT PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
set(NAS_SRC ${OPENAIR3_DIR}/NAS/)
set(libnas_api_OBJS
${NAS_SRC}COMMON/API/NETWORK/as_message.c
${NAS_SRC}COMMON/API/NETWORK/nas_message.c
@@ -1476,10 +1439,6 @@ set(libnas_emm_msg_OBJS
${NAS_SRC}COMMON/EMM/MSG/UplinkNasTransport.c
)
set(libnas_fgs_msg_OBJS
${NAS_SRC}COMMON/EMM/MSG/fgs_service_request.c
)
set(libnas_esm_msg_OBJS
${NAS_SRC}COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextAccept.c
${NAS_SRC}COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextReject.c
@@ -1668,61 +1627,6 @@ set(libnas_ue_esm_sap_OBJS
${NAS_SRC}UE/ESM/SAP/esm_sap.c
)
set(libnrnas_emm_msg_OBJS
${NAS_SRC}COMMON/EMM/MSG/RegistrationRequest.c
${NAS_SRC}COMMON/EMM/MSG/RegistrationAccept.c
${NAS_SRC}COMMON/EMM/MSG/FGSIdentityResponse.c
${NAS_SRC}COMMON/EMM/MSG/FGSAuthenticationResponse.c
${NAS_SRC}COMMON/EMM/MSG/FGSNASSecurityModeComplete.c
${NAS_SRC}COMMON/EMM/MSG/RegistrationComplete.c
${NAS_SRC}COMMON/EMM/MSG/FGSUplinkNasTransport.c
${NAS_SRC}COMMON/ESM/MSG/PduSessionEstablishRequest.c
${NAS_SRC}COMMON/ESM/MSG/PduSessionEstablishmentAccept.c
${NAS_SRC}COMMON/EMM/MSG/FGSDeregistrationRequestUEOriginating.c
)
set(libnrnas_ies_OBJS
${NAS_SRC}COMMON/IES/ExtendedProtocolDiscriminator.c
${NAS_SRC}COMMON/IES/FGSMobileIdentity.c
${NAS_SRC}COMMON/IES/FGSRegistrationType.c
${NAS_SRC}COMMON/IES/SpareHalfOctet.c
${NAS_SRC}COMMON/IES/FGSRegistrationResult.c
${NAS_SRC}COMMON/IES/FGMMCapability.c
${NAS_SRC}COMMON/IES/NrUESecurityCapability.c
${NAS_SRC}COMMON/IES/FGCNasMessageContainer.c
${NAS_SRC}COMMON/IES/SORTransparentContainer.c
)
add_library(LIB_NAS_SIMUE
${NAS_SRC}UE/nas_itti_messaging.c
${NAS_SRC}UE/nas_network.c
${NAS_SRC}UE/nas_parser.c
${NAS_SRC}UE/nas_proc.c
${NAS_SRC}UE/nas_user.c
${NAS_SRC}NR_UE/nr_nas_msg.c
${libnas_api_OBJS}
${libnas_ue_api_OBJS}
${libnas_emm_msg_OBJS}
${libnas_fgs_msg_OBJS}
${libnas_esm_msg_OBJS}
${libnas_ies_OBJS}
${libnas_utils_OBJS}
${libnas_ue_emm_OBJS}
${libnas_ue_emm_sap_OBJS}
${libnas_ue_esm_OBJS}
${libnas_ue_esm_sap_OBJS}
${libnrnas_emm_msg_OBJS}
${libnrnas_ies_OBJS}
$<TARGET_OBJECTS:ds>
)
target_include_directories(LIB_NAS_SIMUE PRIVATE ${OPENAIR_DIR}/common/utils/ds/)
target_link_libraries(LIB_NAS_SIMUE PRIVATE lte_rrc)
set(NAS_SIM_LIB LIB_NAS_SIMUE)
target_link_libraries(LIB_NAS_SIMUE PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
add_library(LIB_NAS_UE
${NAS_SRC}UE/nas_itti_messaging.c
${NAS_SRC}UE/nas_network.c
@@ -1762,15 +1666,6 @@ set (NBIOT_SOURCES
)
add_library(NB_IoT MODULE ${NBIOT_SOURCES} )
add_library(LIB_5GNAS_GNB
${NAS_SRC}/COMMON/nr_common.c
${OPENAIR3_DIR}//UICC/usim_interface.c
)
target_include_directories(LIB_5GNAS_GNB PRIVATE ${OPENAIR_DIR}/common/utils/ds/)
target_link_libraries(LIB_5GNAS_GNB PRIVATE SECURITY)
target_link_libraries(LIB_5GNAS_GNB PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
# Simulation library
##########################
set (SIMUSRC
@@ -1988,20 +1883,22 @@ add_executable(nr-uesoftmodem
${OPENAIR_DIR}/radio/COMMON/common_lib.c
${OPENAIR_DIR}/radio/COMMON/record_player.c
${OPENAIR2_DIR}/LAYER2/NR_MAC_COMMON/nr_mac_common.c
${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c
${OPENAIR2_DIR}/LAYER2/NR_MAC_COMMON/nr_mac_common_tdd.c
${OPENAIR1_DIR}/PHY/TOOLS/phy_scope_interface.c
${NFAPI_USER_DIR}/nfapi.c
${PHY_INTERFACE_DIR}/queue_t.c
)
target_link_libraries(nr-uesoftmodem PRIVATE
-Wl,--start-group
nr_rrc SECURITY UTIL HASHTABLE SCHED_RU_LIB SCHED_NR_UE_LIB
PHY_COMMON PHY_NR_COMMON PHY_NR_UE NR_L2_UE L2_UE_LTE_NR MAC_NR_COMMON NFAPI_LIB NFAPI_PNF_LIB
NFAPI_USER_LIB MISC_NFAPI_NR_LIB
ITTI LIB_5GNAS_GNB LIB_NAS_SIMUE ${NAS_SIM_LIB} SIMU shlib_loader
PHY_COMMON PHY_NR_COMMON PHY_NR_UE NR_L2_UE MAC_NR_COMMON NFAPI_LIB
ITTI SIMU shlib_loader
-Wl,--end-group z dl)
target_link_libraries(nr-uesoftmodem PRIVATE pthread m CONFIG_LIB rt nr_ue_phy_meas)
target_link_libraries(nr-uesoftmodem PRIVATE ${T_LIB})
target_link_libraries(nr-uesoftmodem PRIVATE nr_nas lib_uicc usim_lib)
target_link_libraries(nr-uesoftmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
# force the generation of ASN.1 so that we don't need to wait during the build
@@ -2054,36 +1951,37 @@ target_link_libraries(smallblocktest PRIVATE
add_executable(ldpctest
${OPENAIR1_DIR}/PHY/CODING/TESTBENCH/ldpctest.c
)
${OPENAIR1_DIR}/PHY/CODING/TESTBENCH/ldpctest.c
${OPENAIR1_DIR}/PHY/CODING/nrLDPC_load.c
)
target_link_libraries(ldpctest PRIVATE
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON -Wl,--end-group
m pthread dl shlib_loader ${T_LIB} nr_coding_segment_utils
)
m pthread dl shlib_loader ${T_LIB}
# link 'check_crc' to make it resolved in the LDPC coding libraries
# 'check_crc' is not used in ldpctest so it is not linked in the executable by default
# --whole-archive links 'check_crc' in the executable even though it is note used, see 'man ld'
-Wl,--whole-archive crc_byte -Wl,--no-whole-archive
)
add_executable(nr_dlschsim
${OPENAIR1_DIR}/SIMULATION/NR_PHY/dlschsim.c
${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c
)
add_library(physim_common OBJECT ${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_unitary_common.c)
target_link_libraries(physim_common PRIVATE UTIL)
add_executable(nr_dlschsim ${OPENAIR1_DIR}/SIMULATION/NR_PHY/dlschsim.c)
target_link_libraries(nr_dlschsim PRIVATE
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
m pthread ${T_LIB} ITTI dl shlib_loader
m pthread ${T_LIB} ITTI dl shlib_loader physim_common
)
target_link_libraries(nr_dlschsim PRIVATE asn1_nr_rrc_hdrs)
add_executable(nr_pbchsim
${OPENAIR1_DIR}/SIMULATION/NR_PHY/pbchsim.c
${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c
)
add_executable(nr_pbchsim ${OPENAIR1_DIR}/SIMULATION/NR_PHY/pbchsim.c)
target_link_libraries(nr_pbchsim PRIVATE
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
m pthread ${T_LIB} ITTI dl shlib_loader
m pthread ${T_LIB} ITTI dl shlib_loader physim_common
)
target_link_libraries(nr_pbchsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
add_executable(nr_psbchsim
${OPENAIR1_DIR}/SIMULATION/NR_PHY/psbchsim.c
${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c
${OPENAIR_DIR}/executables/softmodem-common.c
${NR_UE_RRC_DIR}/rrc_nsa.c
${NFAPI_USER_DIR}/nfapi.c
@@ -2092,24 +1990,19 @@ add_executable(nr_psbchsim
)
target_link_libraries(nr_psbchsim PRIVATE
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_UE_NR MAC_NR_COMMON CONFIG_LIB L2_NR -lz -Wl,--end-group
m pthread ${T_LIB} ITTI dl shlib_loader
m pthread ${T_LIB} ITTI dl shlib_loader physim_common
)
target_link_libraries(nr_psbchsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
#PUCCH ---> Prashanth
add_executable(nr_pucchsim
${OPENAIR1_DIR}/SIMULATION/NR_PHY/pucchsim.c
${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c
)
add_executable(nr_pucchsim ${OPENAIR1_DIR}/SIMULATION/NR_PHY/pucchsim.c)
target_link_libraries(nr_pucchsim PRIVATE
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
m pthread ${T_LIB} ITTI dl shlib_loader
m pthread ${T_LIB} ITTI dl shlib_loader physim_common
)
target_link_libraries(nr_pucchsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
add_executable(nr_dlsim
${OPENAIR1_DIR}/SIMULATION/NR_PHY/dlsim.c
${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c
${OPENAIR_DIR}/executables/softmodem-common.c
${NR_UE_RRC_DIR}/rrc_nsa.c
${NFAPI_USER_DIR}/nfapi.c
@@ -2118,33 +2011,28 @@ add_executable(nr_dlsim
)
target_link_libraries(nr_dlsim PRIVATE
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_UE_NR MAC_NR_COMMON nr_rrc CONFIG_LIB L2_NR HASHTABLE x2ap SECURITY ngap -lz -Wl,--end-group
m pthread ${T_LIB} ITTI dl shlib_loader nr_ue_phy_meas
m pthread ${T_LIB} ITTI dl shlib_loader nr_ue_phy_meas physim_common
)
target_link_libraries(nr_dlsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
add_executable(nr_prachsim
${OPENAIR1_DIR}/SIMULATION/NR_PHY/prachsim.c
${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c
)
add_executable(nr_prachsim ${OPENAIR1_DIR}/SIMULATION/NR_PHY/prachsim.c)
target_link_libraries(nr_prachsim PRIVATE
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_RU PHY_NR_UE MAC_NR_COMMON SCHED_NR_LIB CONFIG_LIB -lz -Wl,--end-group
m pthread ${T_LIB} ITTI dl shlib_loader)
m pthread ${T_LIB} ITTI dl shlib_loader physim_common)
target_link_libraries(nr_prachsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
add_executable(nr_ulschsim
${OPENAIR1_DIR}/SIMULATION/NR_PHY/ulschsim.c
${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c
${PHY_INTERFACE_DIR}/queue_t.c
)
target_link_libraries(nr_ulschsim PRIVATE
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
m pthread ${T_LIB} ITTI dl shlib_loader
m pthread ${T_LIB} ITTI dl shlib_loader physim_common
)
target_link_libraries(nr_ulschsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
add_executable(nr_ulsim
${OPENAIR1_DIR}/SIMULATION/NR_PHY/ulsim.c
${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c
${OPENAIR_DIR}/executables/softmodem-common.c
${NR_UE_RRC_DIR}/rrc_nsa.c
${NFAPI_USER_DIR}/nfapi.c
@@ -2154,7 +2042,7 @@ add_executable(nr_ulsim
target_link_libraries(nr_ulsim PRIVATE
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_UE_NR MAC_NR_COMMON nr_rrc CONFIG_LIB L2_NR HASHTABLE x2ap SECURITY ngap -lz -Wl,--end-group
m pthread ${T_LIB} ITTI dl shlib_loader nr_ue_phy_meas
m pthread ${T_LIB} ITTI dl shlib_loader nr_ue_phy_meas physim_common
)
target_link_libraries(nr_ulsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
@@ -2194,10 +2082,6 @@ foreach(myExe s1ap
)
endforeach(myExe)
# to be added
#../targets/TEST/PDCP/test_pdcp.c
#../targets/TEST/PDCP/with_rlc/test_pdcp_rlc.c
#ensure that the T header files are generated before targets depending on them
if (${T_TRACER})
foreach(i
@@ -2214,10 +2098,10 @@ if (${T_TRACER})
SECURITY SCHED_LIB SCHED_NR_LIB SCHED_RU_LIB SCHED_UE_LIB SCHED_NR_UE_LIB default_sched remote_sched RAL
NFAPI_LIB NFAPI_PNF_LIB NFAPI_VNF_LIB NFAPI_USER_LIB
MISC_NFAPI_LTE_LIB MISC_NFAPI_NR_LIB
PHY_COMMON PHY PHY_UE PHY_NR PHY_NR_COMMON PHY_NR_UE PHY_RU PHY_MEX
L2 L2_LTE L2_NR L2_LTE_NR L2_UE NR_L2_UE L2_UE_LTE_NR MAC_NR_COMMON MAC_UE_NR ngap
PHY_COMMON PHY PHY_UE PHY_NR PHY_NR_COMMON PHY_NR_UE PHY_RU
L2 L2_LTE L2_NR L2_LTE_NR L2_UE NR_L2_UE MAC_NR_COMMON MAC_UE_NR ngap
CN_UTILS GTPV1U SCTP_CLIENT MME_APP LIB_NAS_UE NB_IoT SIMU OPENAIR0_LIB
dfts config_internals nr_common)
dfts config_internals nr_common crc_byte)
if (TARGET ${i})
add_dependencies(${i} generate_T)
endif()

View File

@@ -27,6 +27,7 @@ def nodeExecutor = params.nodeExecutor
def doBuild = true
def do4Gtest = false
def do5Gtest = false
def do5GUeTest = false
//
def gitCommitAuthorEmailAddr
@@ -64,17 +65,24 @@ pipeline {
message += " - ~BUILD-ONLY (execute only build stages)\n"
message += " - ~4G-LTE (perform 4G tests)\n"
message += " - ~5G-NR (perform 5G tests)\n"
message += " - ~CI (perform both 4G and 5G tests)\n\n"
message += " - ~CI (perform both 4G and 5G tests)\n"
message += " - ~nrUE (perform only 5G-UE related tests including physims excluding LDPC tests)\n\n"
message += "Not performing CI due to lack of labels"
addGitLabMRComment comment: message
error('Not performing CI due to lack of labels')
} else if (LABEL_CHECK == 'FULL') {
do4Gtest = true
do5Gtest = true
do5GUeTest = true
} else if (LABEL_CHECK == "SHORTEN-4G") {
do4Gtest = true
} else if (LABEL_CHECK == 'SHORTEN-5G') {
do5Gtest = true
} else if (LABEL_CHECK == 'SHORTEN-5G-UE') {
do5GUeTest = true
} else if (LABEL_CHECK == 'SHORTEN-4G-5G-UE') {
do4Gtest = true
do5GUeTest = true
} else if (LABEL_CHECK == 'documentation') {
doBuild = false
} else {
@@ -145,6 +153,28 @@ pipeline {
}
}
}
stage ("Ubuntu-ARM-Image-Builder") {
steps {
script {
triggerSlaveJob ('RAN-Ubuntu-ARM-Image-Builder', 'Ubuntu-ARM-Image-Builder')
}
}
post {
always {
script {
// Using a unique variable name for each test stage to avoid overwriting on a global variable
// due to parallel-time concurrency
ubuntuArmBuildStatus = finalizeSlaveJob('RAN-Ubuntu-ARM-Image-Builder')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
failingStages += ubuntuArmBuildStatus
}
}
}
}
stage ("RHEL-Cluster-Image-Builder") {
steps {
script {
@@ -217,7 +247,7 @@ pipeline {
when { expression {doBuild} }
parallel {
stage ("PhySim-Cluster") {
when { expression {do4Gtest || do5Gtest} }
when { expression {do4Gtest || do5Gtest || do5GUeTest} }
steps {
script {
triggerSlaveJob ('RAN-PhySim-Cluster', 'PhySim-Cluster')
@@ -263,7 +293,7 @@ pipeline {
}
}
stage ("RF-Sim-Test-5G") {
when { expression {do5Gtest} }
when { expression {do5Gtest || do5GUeTest} }
steps {
script {
triggerSlaveJob ('RAN-RF-Sim-Test-5G', 'RF-Sim-Test-5G')
@@ -286,7 +316,7 @@ pipeline {
}
}
stage ("OAI-FLEXRIC-RAN-Integration-Test") {
when { expression {do5Gtest} }
when { expression {do5Gtest || do5GUeTest} }
steps {
script {
triggerSlaveJob ('OAI-FLEXRIC-RAN-Integration-Test', 'OAI-FLEXRIC-RAN-Integration-Test')
@@ -609,7 +639,7 @@ pipeline {
}
}
stage ("SA-OAIUE-CN5G") {
when { expression {do5Gtest} }
when { expression {do5Gtest || do5GUeTest} }
steps {
script {
triggerSlaveJob ('RAN-SA-OAIUE-CN5G', 'SA-OAIUE-CN5G')
@@ -658,9 +688,6 @@ pipeline {
if ("MERGE".equals(env.gitlabActionType)) {
addGitLabMRComment comment: message
def message2 = message + " -- MergeRequest #" + env.gitlabMergeRequestIid + " (" + env.gitlabMergeRequestTitle + ")"
sendSocialMediaMessage('ci-enb', 'good', message2)
} else {
sendSocialMediaMessage('ci-enb', 'good', message)
}
echo "Pipeline is SUCCESSFUL"
}
@@ -672,9 +699,6 @@ pipeline {
def fullMessage = message + '\n\nList of failing test stages:' + failingStages
addGitLabMRComment comment: fullMessage
def message2 = message + " -- MergeRequest #" + env.gitlabMergeRequestIid + " (" + env.gitlabMergeRequestTitle + ")"
sendSocialMediaMessage('ci-enb', 'danger', message2)
} else {
sendSocialMediaMessage('ci-enb', 'danger', message)
}
echo "Pipeline FAILED"
}
@@ -798,9 +822,3 @@ def finalizeSlaveJob(jobName) {
return artifactUrl
}
}
// Abstraction function to send social media messages:
// like on Slack or Mattermost
def sendSocialMediaMessage(pipeChannel, pipeColor, pipeMessage) {
slackSend channel: pipeChannel, color: pipeColor, message: pipeMessage
}

View File

@@ -20,8 +20,8 @@
* contact@openairinterface.org
*/
def node = "porcepix"
def resource = "CI-NEU-CI"
def node = "${params.JenkinsNode}"
def resource = "${params.JenkinsResource}"
pipeline {
agent {

View File

@@ -78,9 +78,10 @@ IS_MR_BUILD_ONLY=`echo $LABELS | grep -c BUILD-ONLY`
IS_MR_CI=`echo $LABELS | grep -c CI`
IS_MR_4G=`echo $LABELS | grep -c 4G-LTE`
IS_MR_5G=`echo $LABELS | grep -c 5G-NR`
IS_MR_5G_UE=`echo $LABELS | grep -c nrUE`
# none is present! No CI
if [ $IS_MR_BUILD_ONLY -eq 0 ] && [ $IS_MR_CI -eq 0 ] && [ $IS_MR_4G -eq 0 ] && [ $IS_MR_5G -eq 0 ] && [ $IS_MR_DOCUMENTATION -eq 0 ]
if [ $IS_MR_BUILD_ONLY -eq 0 ] && [ $IS_MR_CI -eq 0 ] && [ $IS_MR_4G -eq 0 ] && [ $IS_MR_5G -eq 0 ] && [ $IS_MR_DOCUMENTATION -eq 0 ] && [ $IS_MR_5G_UE -eq 0 ]
then
echo "NONE"
exit 0
@@ -93,6 +94,12 @@ then
exit 0
fi
if [ $IS_MR_5G_UE -eq 1 ] && [ $IS_MR_4G -eq 1 ]
then
echo "SHORTEN-4G-5G-UE"
exit 0
fi
# 4G is present: run only 4G
if [ $IS_MR_4G -eq 1 ]
then
@@ -107,6 +114,12 @@ then
exit 0
fi
if [ $IS_MR_5G_UE -eq 1 ]
then
echo "SHORTEN-5G-UE"
exit 0
fi
# BUILD-ONLY is present: only build stages
if [ $IS_MR_BUILD_ONLY -eq 1 ]
then

View File

@@ -72,8 +72,8 @@ def OC_deploy_CN(cmd, ocUserName, ocPassword, ocNamespace, path):
succeeded = OC_login(cmd, ocUserName, ocPassword, ocNamespace)
if not succeeded:
return False, CONST.OC_LOGIN_FAIL
cmd.run('helm uninstall oai5gcn --wait --timeout 60s')
ret = cmd.run(f'helm install --wait --timeout 120s oai5gcn {path}/ci-scripts/charts/oai-5g-basic/.')
cmd.run(f'helm list -aq -n {ocNamespace} | xargs -r helm uninstall -n {ocNamespace} --wait')
ret = cmd.run(f'helm install --wait oai5gcn {path}/ci-scripts/charts/oai-5g-basic/.')
if ret.returncode != 0:
logging.error('OC OAI CN5G: Deployment failed')
OC_logout(cmd)
@@ -100,10 +100,10 @@ def OC_undeploy_CN(cmd, ocUserName, ocPassword, ocNamespace, path):
cmd.run(f'oc logs -f {podName} {ci} &> {path}/logs/{ii}.log &')
cmd.run(f'cd {path}/logs && zip -r -qq test_logs_CN.zip *.log')
cmd.copyin(f'{path}/logs/test_logs_CN.zip','test_logs_CN.zip')
ret = cmd.run('helm uninstall --wait --timeout 60s oai5gcn')
ret = cmd.run(f'helm list -aq -n {ocNamespace} | xargs -r helm uninstall -n {ocNamespace} --wait')
if ret.returncode != 0:
logging.error('OC OAI CN5G: Undeployment failed')
cmd.run('helm uninstall --wait --timeout 60s oai5gcn')
cmd.run(f'helm list -aq -n {ocNamespace} | xargs -r helm uninstall -n {ocNamespace} --wait')
OC_logout(cmd)
return False, CONST.OC_PROJECT_FAIL
report = cmd.run('oc get pods')
@@ -208,7 +208,7 @@ class Cluster:
return -1
return int(result.group("size"))
def _deploy_pod(self, filename, timeout = 30):
def _deploy_pod(self, filename, timeout = 120):
ret = self.cmd.run(f'oc create -f {filename}')
result = re.search(f'pod/(?P<pod>[a-zA-Z0-9_\-]+) created', ret.stdout)
if result is None:
@@ -216,11 +216,9 @@ class Cluster:
return None
pod = result.group("pod")
logging.debug(f'checking if pod {pod} is in Running state')
while timeout > 0:
ret = self.cmd.run(f'oc get pod {pod} -o json | jq -Mc .status.phase', silent=True)
if re.search('"Running"', ret.stdout) is not None: return pod
timeout -= 1
time.sleep(1)
ret = self.cmd.run(f'oc wait --for=condition=ready pod {pod} --timeout={timeout}s', silent=True)
if ret.returncode == 0:
return pod
logging.error(f'pod {pod} did not reach Running state')
self._undeploy_pod(filename)
return None
@@ -228,7 +226,7 @@ class Cluster:
def _undeploy_pod(self, filename):
self.cmd.run(f'oc delete -f {filename}')
def PullClusterImage(self, HTML, node, images):
def PullClusterImage(self, HTML, node, images, tag_prefix):
logging.debug(f'Pull OC image {images} to server {node}')
self.testCase_id = HTML.testCase_id
with cls_cmd.getConnection(node) as cmd:
@@ -244,7 +242,7 @@ class Cluster:
return False
tag = cls_containerize.CreateTag(self.ranCommitID, self.ranBranch, self.ranAllowMerge)
registry = f'{self.OCRegistry}/{CI_OC_RAN_NAMESPACE}'
success, msg = cls_containerize.Containerize.Pull_Image(cmd, images, tag, registry, None, None)
success, msg = cls_containerize.Containerize.Pull_Image(cmd, images, tag, tag_prefix, registry, None, None)
OC_logout(cmd)
param = f"on node {node}"
if success:
@@ -317,9 +315,9 @@ class Cluster:
# delete old images by Sagar Arora <sagar.arora@openairinterface.org>:
# 1. retrieve all images and their timestamp
# 2. awk retrieves those whose timestamp is older than 4 weeks
# 2. awk retrieves those whose timestamp is older than 3 weeks
# 3. issue delete command on corresponding istags (the images are dangling and will be cleaned by the registry)
delete_cmd = "oc get istag -o go-template --template '{{range .items}}{{.metadata.name}} {{.metadata.creationTimestamp}}{{\"\\n\"}}{{end}}' | awk '$2 <= \"'$(date -d '-4weeks' -Ins --utc | sed 's/+0000/Z/')'\" { print $1 }' | xargs --no-run-if-empty oc delete istag"
delete_cmd = "oc get istag -o go-template --template '{{range .items}}{{.metadata.name}} {{.metadata.creationTimestamp}}{{\"\\n\"}}{{end}}' | awk '$2 <= \"'$(date -d '-3weeks' -Ins --utc | sed 's/+0000/Z/')'\" { print $1 }' | xargs --no-run-if-empty oc delete istag"
response = self.cmd.run(delete_cmd)
logging.debug(f"deleted images:\n{response.stdout}")
@@ -332,7 +330,7 @@ class Cluster:
self._recreate_bc('ran-base', baseTag, 'openshift/ran-base-bc.yaml')
ranbase_job = self._start_build('ran-base')
attemptedImages += ['ran-base']
status = ranbase_job is not None and self._wait_build_end([ranbase_job], 800)
status = ranbase_job is not None and self._wait_build_end([ranbase_job], 1000)
if not status: logging.error('failure during build of ran-base')
self.cmd.run(f'oc logs {ranbase_job} &> cmake_targets/log/ran-base.log') # cannot use cmd.run because of redirect
# recover logs by mounting image
@@ -394,7 +392,7 @@ class Cluster:
gnb_aw2s_job = self._start_build('oai-gnb-aw2s')
attemptedImages += ['oai-gnb-aw2s']
wait = enb_job is not None and gnb_job is not None and gnb_aw2s_job is not None and self._wait_build_end([enb_job, gnb_job, gnb_aw2s_job], 600)
wait = enb_job is not None and gnb_job is not None and gnb_aw2s_job is not None and self._wait_build_end([enb_job, gnb_job, gnb_aw2s_job], 800)
if not wait: logging.error('error during build of eNB/gNB')
status = status and wait
# recover logs
@@ -423,7 +421,7 @@ class Cluster:
nrue_job = self._start_build('oai-nr-ue')
attemptedImages += ['oai-nr-ue']
wait = nr_cuup_job is not None and lteue_job is not None and nrue_job is not None and self._wait_build_end([nr_cuup_job, lteue_job, nrue_job], 600)
wait = nr_cuup_job is not None and lteue_job is not None and nrue_job is not None and self._wait_build_end([nr_cuup_job, lteue_job, nrue_job], 800)
if not wait: logging.error('error during build of nr-cuup/lteUE/nrUE')
status = status and wait
# recover logs

View File

@@ -93,7 +93,7 @@ def CopyLogsToExecutor(cmd, sourcePath, log_name):
os.remove(f'./{log_name}.zip')
if (os.path.isdir(f'./{log_name}')):
shutil.rmtree(f'./{log_name}')
cmd.copyin(f'{sourcePath}/cmake_targets/{log_name}.zip', f'./{log_name}.zip')
cmd.copyin(src=f'{sourcePath}/cmake_targets/{log_name}.zip', tgt=f'{os.getcwd()}/{log_name}.zip')
cmd.run(f'rm -f {log_name}.zip')
ZipFile(f'{log_name}.zip').extractall('.')
@@ -359,7 +359,7 @@ class Containerize():
svr = self.eNB_serverId[self.eNB_instance]
lIpAddr, lSourcePath = self.GetCredentials(svr)
logging.debug('Building on server: ' + lIpAddr)
cmd = cls_cmd.RemoteCmd(lIpAddr)
cmd = cls_cmd.getConnection(lIpAddr)
# Checking the hostname to get adapted on cli and dockerfileprefixes
cmd.run('hostnamectl')
@@ -407,6 +407,12 @@ class Containerize():
result = re.search('build_cross_arm64', self.imageKind)
if result is not None:
self.dockerfileprefix = '.ubuntu22.cross-arm64'
result = re.search('native_arm', self.imageKind)
if result is not None:
imageNames.append(('oai-gnb', 'gNB', 'oai-gnb', ''))
imageNames.append(('oai-nr-cuup', 'nr-cuup', 'oai-nr-cuup', ''))
imageNames.append(('oai-nr-ue', 'nrUE', 'oai-nr-ue', ''))
imageNames.append(('oai-gnb-aerial', 'gNB.aerial', 'oai-gnb-aerial', ''))
self.testCase_id = HTML.testCase_id
cmd.cd(lSourcePath)
@@ -491,10 +497,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.2024.05.23.tar.gz .')
cmd.run('cp -f /opt/nvidia-ipc/nvipc_src.*.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.2024.05.23.tar.gz')
cmd.run('rm -f nvipc_src.*.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}/")
@@ -720,9 +726,9 @@ class Containerize():
HTML.CreateHtmlTabFooter(False)
return False
def Push_Image_to_Local_Registry(self, HTML, svr_id):
def Push_Image_to_Local_Registry(self, HTML, svr_id, tag_prefix=""):
lIpAddr, lSourcePath = self.GetCredentials(svr_id)
logging.debug('Pushing images from server: ' + lIpAddr)
logging.debug('Pushing images to server: ' + lIpAddr)
ssh = cls_cmd.getConnection(lIpAddr)
imagePrefix = 'porcepix.sboai.cs.eurecom.fr'
ret = ssh.run(f'docker login -u oaicicd -p oaicicd {imagePrefix}')
@@ -737,7 +743,7 @@ class Containerize():
if self.ranAllowMerge:
orgTag = 'ci-temp'
for image in IMAGES:
tagToUse = CreateTag(self.ranCommitID, self.ranBranch, self.ranAllowMerge)
tagToUse = tag_prefix + CreateTag(self.ranCommitID, self.ranBranch, self.ranAllowMerge)
imageTag = f"{image}:{tagToUse}"
ret = ssh.run(f'docker image tag {image}:{orgTag} {imagePrefix}/{imageTag}')
if ret.returncode != 0:
@@ -751,9 +757,10 @@ class Containerize():
return False
# Creating a develop tag on the local private registry
if not self.ranAllowMerge:
ssh.run(f'docker image tag {image}:{orgTag} {imagePrefix}/{image}:develop')
ssh.run(f'docker push {imagePrefix}/{image}:develop')
ssh.run(f'docker rmi {imagePrefix}/{image}:develop')
devTag = f"{tag_prefix}develop"
ssh.run(f'docker image tag {image}:{orgTag} {imagePrefix}/{image}:{devTag}')
ssh.run(f'docker push {imagePrefix}/{image}:{devTag}')
ssh.run(f'docker rmi {imagePrefix}/{image}:{devTag}')
ssh.run(f'docker rmi {imagePrefix}/{imageTag} {image}:{orgTag}')
ret = ssh.run(f'docker logout {imagePrefix}')
@@ -768,7 +775,7 @@ class Containerize():
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
return True
def Pull_Image(cmd, images, tag, registry, username, password):
def Pull_Image(cmd, images, tag, tag_prefix, registry, username, password):
if username is not None and password is not None:
logging.info(f"logging into registry {username}@{registry}")
response = cmd.run(f'docker login -u {username} -p {password} {registry}', silent=True, reportNonZero=False)
@@ -778,14 +785,15 @@ class Containerize():
return False, msg
pulled_images = []
for image in images:
imagePrefTag = f"{image}:{tag_prefix}{tag}"
imageTag = f"{image}:{tag}"
response = cmd.run(f'docker pull {registry}/{imageTag}')
response = cmd.run(f'docker pull {registry}/{imagePrefTag}')
if response.returncode != 0:
msg = f'Could not pull {image} from local registry: {imageTag}'
msg = f'Could not pull {image} from local registry: {imagePrefTag}'
logging.error(msg)
return False, msg
cmd.run(f'docker tag {registry}/{imageTag} oai-ci/{imageTag}')
cmd.run(f'docker rmi {registry}/{imageTag}')
cmd.run(f'docker tag {registry}/{imagePrefTag} oai-ci/{imageTag}')
cmd.run(f'docker rmi {registry}/{imagePrefTag}')
pulled_images += [f"oai-ci/{imageTag}"]
if username is not None and password is not None:
response = cmd.run(f'docker logout {registry}')
@@ -793,13 +801,13 @@ class Containerize():
msg = "Pulled Images:\n" + '\n'.join(pulled_images)
return True, msg
def Pull_Image_from_Registry(self, HTML, svr_id, images, tag=None, registry="porcepix.sboai.cs.eurecom.fr", username="oaicicd", password="oaicicd"):
def Pull_Image_from_Registry(self, HTML, svr_id, images, tag=None, tag_prefix="", registry="porcepix.sboai.cs.eurecom.fr", username="oaicicd", password="oaicicd"):
lIpAddr, lSourcePath = self.GetCredentials(svr_id)
logging.debug('\u001B[1m Pulling image(s) on server: ' + lIpAddr + '\u001B[0m')
if not tag:
tag = CreateTag(self.ranCommitID, self.ranBranch, self.ranAllowMerge)
with cls_cmd.getConnection(lIpAddr) as cmd:
success, msg = Containerize.Pull_Image(cmd, images, tag, registry, username, password)
success, msg = Containerize.Pull_Image(cmd, images, tag, tag_prefix, registry, username, password)
param = f"on node {lIpAddr}"
if success:
HTML.CreateHtmlTestRowQueue(param, 'OK', [msg])

View File

@@ -0,0 +1,43 @@
L1s = (
{
num_cc = 1;
tr_n_preference = "nfapi";
remote_n_address = "192.168.71.140"; // vnf addr
local_n_address = "192.168.71.141"; // pnf addr
local_n_portc = 50000; // pnf p5 port [!]
remote_n_portc = 50001; // vnf p5 port
local_n_portd = 50010; // pnf p7 port
remote_n_portd = 50011; // vnf p7 port
prach_dtx_threshold = 120;
pucch0_dtx_threshold = 150;
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
}
);
RUs = ({
local_rf = "yes";
nb_tx = 1;
nb_rx = 1;
att_tx = 0;
att_rx = 0;
bands = [7];
max_pdschReferenceSignalPower = -27;
max_rxgain = 114;
sf_extension = 0;
eNB_instances = [0];
});
rfsimulator :
{
serveraddr = "server";
serverport = 4043;
options = (); #("saviq"); or/and "chanmod"
modelname = "AWGN";
IQfile = "/tmp/rfsimulator.iqs";
};
log_config: {
global_log_level = "info";
hw_log_level = "info";
phy_log_level = "info";
};

View File

@@ -0,0 +1,31 @@
usrp-tx-thread-config = 1;
tune-offset = 30720000;
L1s = ({
num_cc = 1;
tr_n_preference = "nfapi";
remote_n_address = "127.0.0.1"; // vnf addr
local_n_address = "127.0.0.1"; // pnf addr
local_n_portc = 50000; // pnf p5 port [!]
remote_n_portc = 50001; // vnf p5 port
local_n_portd = 50010; // pnf p7 port
remote_n_portd = 50011; // vnf p7 port
prach_dtx_threshold = 120;
pusch_dtx_threshold = 20;
max_ldpc_iterations = 10;
});
RUs = ({
local_rf = "yes"
nb_tx = 4;
nb_rx = 4;
att_tx = 0;
att_rx = 0;
bands = [77];
max_pdschReferenceSignalPower = -27;
max_rxgain = 75;
eNB_instances = [0];
#clock_src = "internal";
sdr_addrs = "addr=192.168.80.53, clock_source=internal,time_source=internal"
});

View File

@@ -0,0 +1,218 @@
Active_gNBs = ( "5G-GOA-gNB");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
gNBs =
(
{
////////// Identification parameters:
gNB_ID = 0xe00;
gNB_name = "5G-GOA-gNB";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 1;
plmn_list = ({ mcc = 208; mnc = 99; mnc_length = 2; snssaiList = ({ sst = 1 }) });
nr_cellid = 12345678L;
////////// Physical parameters:
sib1_tda = 5;
min_rxtxtime = 6;
servingCellConfigCommon = (
{
#spCellConfigCommon
physCellId = 0;
# downlinkConfigCommon
#frequencyInfoDL
# this is 2150.43 MHz + 14 PRBs@15kHz SCS (same as initial BWP), points to Subcarrier 0 of RB#10 of SSB block
absoluteFrequencySSB = 430590;
dl_frequencyBand = 66;
# this is 2150.43 MHz
dl_absoluteFrequencyPointA = 430086;
#scs-SpecificCarrierList
dl_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
dl_subcarrierSpacing = 0;
dl_carrierBandwidth = 25;
#initialDownlinkBWP
#genericParameters
# this is RBstart=0,L=25 (275*(L-1))+RBstart
initialDLBWPlocationAndBandwidth = 6600;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialDLBWPsubcarrierSpacing = 0;
#pdcch-ConfigCommon
initialDLBWPcontrolResourceSetZero = 2;
initialDLBWPsearchSpaceZero = 0;
#uplinkConfigCommon
#frequencyInfoUL
ul_frequencyBand = 66;
# this is 1750.43 MHz
ul_absoluteFrequencyPointA = 350086;
#scs-SpecificCarrierList
ul_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
ul_subcarrierSpacing = 0;
ul_carrierBandwidth = 25;
pMax = 20;
#initialUplinkBWP
#genericParameters
initialULBWPlocationAndBandwidth = 6600;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialULBWPsubcarrierSpacing = 0;
#rach-ConfigCommon
#rach-ConfigGeneric
prach_ConfigurationIndex = 98;
#prach_msg1_FDM
#0 = one, 1=two, 2=four, 3=eight
prach_msg1_FDM = 0;
prach_msg1_FrequencyStart = 0;
zeroCorrelationZoneConfig = 13;
preambleReceivedTargetPower = -118;
#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
preambleTransMax = 6;
#powerRampingStep
# 0=dB0,1=dB2,2=dB4,3=dB6
powerRampingStep = 1;
#ra_ReponseWindow
#1,2,4,8,10,20,40,80
ra_ResponseWindow = 5;
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
#one (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64
ra_ContentionResolutionTimer = 7;
rsrp_ThresholdSSB = 19;
#prach-RootSequenceIndex_PR
#1 = 839, 2 = 139
prach_RootSequenceIndex_PR = 2;
prach_RootSequenceIndex = 1;
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
#
msg1_SubcarrierSpacing = 0;
# restrictedSetConfig
# 0=unrestricted, 1=restricted type A, 2=restricted type B
restrictedSetConfig = 0;
msg3_DeltaPreamble = 1;
p0_NominalWithGrant =-90;
# pucch-ConfigCommon setup :
# pucchGroupHopping
# 0 = neither, 1= group hopping, 2=sequence hopping
pucchGroupHopping = 0;
hoppingId = 40;
p0_nominal = -90;
ssb_PositionsInBurst_Bitmap = 1;
# ssb_periodicityServingCell
# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1
ssb_periodicityServingCell = 2;
# dmrs_TypeA_position
# 0 = pos2, 1 = pos3
dmrs_TypeA_Position = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
subcarrierSpacing = 0;
#tdd-UL-DL-ConfigurationCommon
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
referenceSubcarrierSpacing = 0;
# pattern1
# dl_UL_TransmissionPeriodicity
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
dl_UL_TransmissionPeriodicity = 6;
nrofDownlinkSlots = 7;
nrofDownlinkSymbols = 6;
nrofUplinkSlots = 2;
nrofUplinkSymbols = 4;
ssPBCH_BlockPower = -25;
}
);
# ------- SCTP definitions
SCTP :
{
# Number of streams to use in input/output
SCTP_INSTREAMS = 2;
SCTP_OUTSTREAMS = 2;
};
////////// AMF parameters:
amf_ip_address = ({ ipv4 = "192.168.71.132"; });
NETWORK_INTERFACES :
{
GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.71.140/26";
GNB_IPV4_ADDRESS_FOR_NGU = "192.168.71.140/26";
GNB_PORT_FOR_S1U = 2152; # Spec 2152
};
}
);
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "nfapi";
remote_s_address = "192.168.71.141"; // pnf addr [!]
local_s_address = "192.168.71.140"; // vnf addr
local_s_portc = 50001; // vnf p5 port
remote_s_portc = 50000; // pnf p5 port [!]
local_s_portd = 50011; // vnf p7 port [!]
remote_s_portd = 50010; // pnf p7 port [!]
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 150;
pucch_TargetSNRx10 = 200;
}
);
security = {
# preferred ciphering algorithms
# the first one of the list that an UE supports in chosen
# valid values: nea0, nea1, nea2, nea3
ciphering_algorithms = ( "nea0" );
# preferred integrity algorithms
# the first one of the list that an UE supports in chosen
# valid values: nia0, nia1, nia2, nia3
integrity_algorithms = ( "nia2", "nia0" );
# setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter
# what 'ciphering_algorithms' configures; same thing for 'drb_integrity'
drb_ciphering = "yes";
drb_integrity = "no";
};
log_config :
{
global_log_level ="info";
hw_log_level ="info";
phy_log_level ="info";
mac_log_level ="info";
rlc_log_level ="info";
pdcp_log_level ="info";
rrc_log_level ="info";
ngap_log_level ="debug";
f1ap_log_level ="info";
};

View File

@@ -0,0 +1,224 @@
Active_gNBs = ( "gNB-OAI");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
gNBs =
(
{
////////// Identification parameters:
gNB_ID = 0xe00;
gNB_name = "gNB-OAI";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 1;
plmn_list = ({ mcc = 208; mnc = 97; mnc_length = 2; snssaiList = ({ sst = 1; }) });
nr_cellid = 12345678L;
////////// Physical parameters:
pdsch_AntennaPorts_XP = 2;
pusch_AntennaPorts = 4;
pdsch_AntennaPorts_N1 = 2;
maxMIMO_layers = 4;
do_CSIRS = 1;
do_SRS = 1;
servingCellConfigCommon = (
{
#spCellConfigCommon
physCellId = 0;
# downlinkConfigCommon
#frequencyInfoDL
# this is 4100.16 MHz
absoluteFrequencySSB = 673344;
# this is 4071 MHz
dl_absoluteFrequencyPointA = 671400;
dl_frequencyBand = 77;
#scs-SpecificCarrierList
dl_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
dl_subcarrierSpacing = 1;
dl_carrierBandwidth = 162;
#initialDownlinkBWP
#genericParameters
# this is RBstart=0,L=162 (275*(275-L+1))+(274-RBstart))
initialDLBWPlocationAndBandwidth = 31624;
#
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialDLBWPsubcarrierSpacing = 1;
#pdcch-ConfigCommon
initialDLBWPcontrolResourceSetZero = 12;
initialDLBWPsearchSpaceZero = 0;
#uplinkConfigCommon
#frequencyInfoUL
ul_frequencyBand = 77;
#scs-SpecificCarrierList
ul_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
ul_subcarrierSpacing = 1;
ul_carrierBandwidth = 162;
pMax = 20;
#initialUplinkBWP
#genericParameters
initialULBWPlocationAndBandwidth = 31624;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialULBWPsubcarrierSpacing = 1;
#rach-ConfigCommon
#rach-ConfigGeneric
prach_ConfigurationIndex = 98;
#prach_msg1_FDM
#0 = one, 1=two, 2=four, 3=eight
prach_msg1_FDM = 0;
prach_msg1_FrequencyStart = 0;
zeroCorrelationZoneConfig = 12;
preambleReceivedTargetPower = -96;
#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
preambleTransMax = 6;
#powerRampingStep
# 0=dB0,1=dB2,2=dB4,3=dB6
powerRampingStep = 1;
#ra_ReponseWindow
#1,2,4,8,10,20,40,80
ra_ResponseWindow = 5;
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
#one (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64
ra_ContentionResolutionTimer = 7;
rsrp_ThresholdSSB = 19;
#prach-RootSequenceIndex_PR
#1 = 839, 2 = 139
prach_RootSequenceIndex_PR = 2;
prach_RootSequenceIndex = 1;
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
#
msg1_SubcarrierSpacing = 1,
# restrictedSetConfig
# 0=unrestricted, 1=restricted type A, 2=restricted type B
restrictedSetConfig = 0,
msg3_DeltaPreamble = 1;
p0_NominalWithGrant =-90;
# pucch-ConfigCommon setup :
# pucchGroupHopping
# 0 = neither, 1= group hopping, 2=sequence hopping
pucchGroupHopping = 0;
hoppingId = 40;
p0_nominal = -70;
ssb_PositionsInBurst_Bitmap = 1;
# ssb_periodicityServingCell
# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1
ssb_periodicityServingCell = 2;
# dmrs_TypeA_position
# 0 = pos2, 1 = pos3
dmrs_TypeA_Position = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
subcarrierSpacing = 1;
#tdd-UL-DL-ConfigurationCommon
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
referenceSubcarrierSpacing = 1;
# pattern1
# dl_UL_TransmissionPeriodicity
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
dl_UL_TransmissionPeriodicity = 5;
nrofDownlinkSlots = 3;
nrofDownlinkSymbols = 6;
nrofUplinkSlots = 1;
nrofUplinkSymbols = 4;
ssPBCH_BlockPower = -25;
}
);
# ------- SCTP definitions
SCTP :
{
# Number of streams to use in input/output
SCTP_INSTREAMS = 2;
SCTP_OUTSTREAMS = 2;
};
////////// AMF parameters:
amf_ip_address = ({ ipv4 = "192.168.61.132"; });
NETWORK_INTERFACES :
{
GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.61.129/26";
GNB_IPV4_ADDRESS_FOR_NGU = "192.168.61.129/26";
GNB_PORT_FOR_S1U = 2152; # Spec 2152
};
}
);
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "nfapi";
remote_s_address = "127.0.0.1"; // pnf addr [!]
local_s_address = "127.0.0.1"; // vnf addr
local_s_portc = 50001; // vnf p5 port
remote_s_portc = 50000; // pnf p5 port [!]
local_s_portd = 50011; // vnf p7 port [!]
remote_s_portd = 50010; // pnf p7 port [!]
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 250;
pucch_TargetSNRx10 = 250;
pusch_FailureThres = 100;
ul_max_mcs = 28;
}
);
security = {
# preferred ciphering algorithms
# the first one of the list that an UE supports in chosen
# valid values: nea0, nea1, nea2, nea3
ciphering_algorithms = ( "nea1", "nea0" );
# preferred integrity algorithms
# the first one of the list that an UE supports in chosen
# valid values: nia0, nia1, nia2, nia3
integrity_algorithms = ( "nia1", "nia0" );
# setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter
# what 'ciphering_algorithms' configures; same thing for 'drb_integrity'
drb_ciphering = "yes";
drb_integrity = "yes";
};
log_config :
{
global_log_level ="info";
hw_log_level ="info";
phy_log_level ="info";
mac_log_level ="info";
rlc_log_level ="info";
pdcp_log_level ="info";
rrc_log_level ="info";
ngap_log_level ="debug";
f1ap_log_level ="debug";
};

View File

@@ -18,7 +18,8 @@ gNBs =
sib1_tda = 5;
min_rxtxtime = 6;
disable_harq = 1;
num_dlharq = 32;
num_ulharq = 32;
servingCellConfigCommon = (
{
@@ -28,11 +29,11 @@ gNBs =
# downlinkConfigCommon
#frequencyInfoDL
# this is 2150.43 MHz + 14 PRBs@15kHz SCS (same as initial BWP), points to Subcarrier 0 of RB#10 of SSB block
absoluteFrequencySSB = 430590;
dl_frequencyBand = 66;
# this is 2150.43 MHz
dl_absoluteFrequencyPointA = 430086;
# GSCN 6221
absoluteFrequencySSB = 497770;
dl_frequencyBand = 254;
# this is 2486.15 MHz
dl_absoluteFrequencyPointA = 497230;
#scs-SpecificCarrierList
dl_offstToCarrier = 0;
# subcarrierSpacing
@@ -52,9 +53,9 @@ gNBs =
#uplinkConfigCommon
#frequencyInfoUL
ul_frequencyBand = 66;
# this is 1750.43 MHz
ul_absoluteFrequencyPointA = 350086;
ul_frequencyBand = 254;
# this is 1612.65 MHz
ul_absoluteFrequencyPointA = 322530;
#scs-SpecificCarrierList
ul_offstToCarrier = 0;
# subcarrierSpacing
@@ -147,14 +148,15 @@ gNBs =
#ext2
#ntn_Config_r17
cellSpecificKoffset_r17 = 478;
ta-Common-r17 = 29314900;
cellSpecificKoffset_r17 = 40;
ta-Common-r17 = 4634000; # 18.87 ms
ta-CommonDrift-r17 = -230000; # -46 µs/s
positionX-r17 = 0;
positionY-r17 = 0;
positionZ-r17 = 32433846;
positionY-r17 = -2166908; # -2816980.4 m
positionZ-r17 = 4910784; # 6384019.2 m
velocityVX-r17 = 0;
velocityVY-r17 = 0;
velocityVZ-r17 = 0;
velocityVY-r17 = 115246; # 6914.76 m/s
velocityVZ-r17 = 50853; # 3051.18 m/s
}
);
@@ -196,8 +198,11 @@ MACRLCs = (
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
# ulsch_max_frame_inactivity = 0;
pusch_TargetSNRx10 = 150;
pucch_TargetSNRx10 = 200;
dl_max_mcs = 9;
ul_max_mcs = 9;
}
);
@@ -205,7 +210,7 @@ L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
prach_dtx_threshold = 150;
pucch0_dtx_threshold = 150;
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
}
@@ -243,11 +248,28 @@ rfsimulator :
{
serveraddr = "server";
serverport = 4043;
options = (); #("saviq"); or/and "chanmod"
modelname = "AWGN";
options = ("chanmod"); #("saviq"); or/and "chanmod"
prop_delay = 20;
IQfile = "/tmp/rfsimulator.iqs";
};
channelmod = {
max_chan=10;
modellist="modellist_rfsimu_1";
modellist_rfsimu_1 = (
{
model_name = "rfsimu_channel_enB0"
type = "SAT_LEO_TRANS";
noise_power_dB = -100;
},
{
model_name = "rfsimu_channel_ue0"
type = "SAT_LEO_TRANS";
noise_power_dB = -100;
}
);
};
security = {
# preferred ciphering algorithms
# the first one of the list that an UE supports in chosen
@@ -277,4 +299,3 @@ log_config :
ngap_log_level ="debug";
f1ap_log_level ="debug";
};

View File

@@ -28,11 +28,11 @@ gNBs =
# downlinkConfigCommon
#frequencyInfoDL
# GSCN 6221 = 497770, (GSCN 6215 - 497290)
# GSCN 6221
absoluteFrequencySSB = 497770;
dl_frequencyBand = 254;
# this is 2486.9 MHz
dl_absoluteFrequencyPointA = 497380;
# this is 2486.15 MHz
dl_absoluteFrequencyPointA = 497230;
#scs-SpecificCarrierList
dl_offstToCarrier = 0;
# subcarrierSpacing
@@ -47,14 +47,14 @@ gNBs =
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialDLBWPsubcarrierSpacing = 0;
#pdcch-ConfigCommon
initialDLBWPcontrolResourceSetZero = 0;
initialDLBWPcontrolResourceSetZero = 2;
initialDLBWPsearchSpaceZero = 0;
#uplinkConfigCommon
#frequencyInfoUL
ul_frequencyBand = 254;
# this is 1613.4 MHz
ul_absoluteFrequencyPointA = 322680;
# this is 1612.65 MHz
ul_absoluteFrequencyPointA = 322530;
#scs-SpecificCarrierList
ul_offstToCarrier = 0;
# subcarrierSpacing
@@ -70,7 +70,7 @@ gNBs =
initialULBWPsubcarrierSpacing = 0;
#rach-ConfigCommon
#rach-ConfigGeneric
prach_ConfigurationIndex = 98;
prach_ConfigurationIndex = 7;
#prach_msg1_FDM
#0 = one, 1=two, 2=four, 3=eight
prach_msg1_FDM = 0;
@@ -96,11 +96,11 @@ gNBs =
rsrp_ThresholdSSB = 19;
#prach-RootSequenceIndex_PR
#1 = 839, 2 = 139
prach_RootSequenceIndex_PR = 2;
prach_RootSequenceIndex_PR = 1;
prach_RootSequenceIndex = 1;
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
#
msg1_SubcarrierSpacing = 0;
# not allowed when format < 4
# msg1_SubcarrierSpacing = 0;
# restrictedSetConfig
# 0=unrestricted, 1=restricted type A, 2=restricted type B
restrictedSetConfig = 0;
@@ -147,8 +147,8 @@ gNBs =
#ext2
#ntn_Config_r17
cellSpecificKoffset_r17 = 478; //GEO
ta-Common-r17 = 29319745;
cellSpecificKoffset_r17 = 478;
ta-Common-r17 = 58629666; # 238.74 ms
positionX-r17 = 0;
positionY-r17 = 0;
positionZ-r17 = 32433846;
@@ -196,8 +196,11 @@ MACRLCs = (
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
# ulsch_max_frame_inactivity = 0;
pusch_TargetSNRx10 = 150;
pucch_TargetSNRx10 = 200;
dl_max_mcs = 9;
ul_max_mcs = 9;
}
);
@@ -205,7 +208,7 @@ L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
prach_dtx_threshold = 150;
pucch0_dtx_threshold = 150;
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
}
@@ -244,7 +247,7 @@ rfsimulator :
serveraddr = "server";
serverport = 4043;
options = (); #("saviq"); or/and "chanmod"
modelname = "AWGN";
prop_delay = 238.74;
IQfile = "/tmp/rfsimulator.iqs";
};
@@ -277,4 +280,3 @@ log_config :
ngap_log_level ="debug";
f1ap_log_level ="debug";
};

View File

@@ -66,7 +66,7 @@ gNBs =
initialULBWPsubcarrierSpacing = 1;
#rach-ConfigCommon
#rach-ConfigGeneric
prach_ConfigurationIndex = 98;
prach_ConfigurationIndex = 154;
#prach_msg1_FDM
#0 = one, 1=two, 2=four, 3=eight
prach_msg1_FDM = 0;
@@ -133,11 +133,21 @@ gNBs =
# pattern1
# dl_UL_TransmissionPeriodicity
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
dl_UL_TransmissionPeriodicity = 6;
nrofDownlinkSlots = 7;
nrofDownlinkSymbols = 6;
nrofUplinkSlots = 2;
nrofUplinkSymbols = 4;
# ext: 8=ms3, 9=ms4
dl_UL_TransmissionPeriodicity = 8;
nrofDownlinkSlots = 3;
nrofDownlinkSymbols = 6;
nrofUplinkSlots = 2;
nrofUplinkSymbols = 4;
# pattern2
pattern2: {
dl_UL_TransmissionPeriodicity2 = 4;
nrofDownlinkSlots2 = 4;
nrofDownlinkSymbols2 = 0;
nrofUplinkSlots2 = 0;
nrofUplinkSymbols2 = 0;
};
ssPBCH_BlockPower = -25;
}

View File

@@ -9,14 +9,14 @@ ColNames :
Ref :
feprx : 150.0
feptx_prec : 0.0
feptx_ofdm : 65.0
feptx_total : 177.0
L1 Tx processing : 700.0
DLSCH encoding : 226.0
L1 Rx processing : 640.0
PUSCH inner-receiver : 400.0
feptx_ofdm : 60.0
feptx_total : 150.0
L1 Tx processing : 530.0
DLSCH encoding : 220.0
L1 Rx processing : 530.0
PUSCH inner-receiver : 360.0
Schedule Response : 3.0
DL & UL scheduling timing : 15.0
DL & UL scheduling timing : 17.0
UL Indication : 3.0
Slot Indication : 17.0
DeviationThreshold :

View File

@@ -7,16 +7,16 @@ ColNames :
- Average; Max; Count
- Average vs Reference Deviation (Reference Value; Acceptability Deviation Threshold)
Ref :
feprx : 46.0
feprx : 40.0
feptx_prec : 15.0
feptx_ofdm : 35.0
feptx_total : 50.0
L1 Tx processing : 260.0
DLSCH encoding : 160.0
L1 Rx processing : 420.0
PUSCH inner-receiver : 170.0
feptx_ofdm : 30.0
feptx_total : 45.0
L1 Tx processing : 205.0
DLSCH encoding : 140.0
L1 Rx processing : 345.0
PUSCH inner-receiver : 150.0
Schedule Response : 3.0
DL & UL scheduling timing : 8.0
DL & UL scheduling timing : 7.0
UL Indication : 3.0
Slot Indication : 8.0
DeviationThreshold :

View File

@@ -7,18 +7,18 @@ ColNames :
- Average; Max; Count
- Average vs Reference Deviation (Reference Value; Acceptability Deviation Threshold)
Ref :
feprx : 84.0
feprx : 75.0
feptx_prec : 14.0
feptx_ofdm : 35.0
feptx_total : 100.0
L1 Tx processing : 400.0
DLSCH encoding : 177.0
feptx_ofdm : 30.0
feptx_total : 80.0
L1 Tx processing : 315.0
DLSCH encoding : 155.0
L1 Rx processing : 345.0
PUSCH inner-receiver : 200.0
PUSCH inner-receiver : 155.0
Schedule Response : 3.0
DL & UL scheduling timing : 13.0
UL Indication : 3.0
Slot Indication : 15.0
Slot Indication : 12.0
DeviationThreshold :
feprx : 0.25
feptx_prec : 0.25

View File

@@ -7,17 +7,17 @@ ColNames :
- Average; Max; Count
- Average vs Reference Deviation (Reference Value; Acceptability Deviation Threshold)
Ref :
feprx : 43.0
feprx : 40.0
feptx_prec : 13.0
feptx_ofdm : 33.0
feptx_total : 50.0
L1 Tx processing : 200.0
feptx_ofdm : 30.0
feptx_total : 45.0
L1 Tx processing : 160.0
DLSCH encoding : 100.0
L1 Rx processing : 330.0
PUSCH inner-receiver : 120.0
L1 Rx processing : 290.0
PUSCH inner-receiver : 115.0
Schedule Response : 3.0
DL & UL scheduling timing : 6.0
UL Indication : 3.0
UL Indication : 2.0
Slot Indication : 7.0
DeviationThreshold :
feprx : 0.25

View File

@@ -387,25 +387,30 @@ def ExecuteActionWithParam(action):
elif action == 'Push_Local_Registry':
svr_id = test.findtext('svr_id')
success = CONTAINERS.Push_Image_to_Local_Registry(HTML, svr_id)
tag_prefix = test.findtext('tag_prefix') or ""
success = CONTAINERS.Push_Image_to_Local_Registry(HTML, svr_id, tag_prefix)
elif action == 'Pull_Local_Registry' or action == 'Clean_Test_Server_Images':
if force_local:
# Do not pull or remove images when running locally. User is supposed to handle image creation & cleanup
return True
svr_id = test.findtext('svr_id')
tag_prefix = test.findtext('tag_prefix') or ""
images = test.findtext('images').split()
# hack: for FlexRIC, we need to overwrite the tag to use
tag = None
if len(images) == 1 and images[0] == "oai-flexric":
tag = CONTAINERS.flexricTag
if action == "Pull_Local_Registry":
success = CONTAINERS.Pull_Image_from_Registry(HTML, svr_id, images, tag=tag)
success = CONTAINERS.Pull_Image_from_Registry(HTML, svr_id, images, tag=tag, tag_prefix=tag_prefix)
if action == "Clean_Test_Server_Images":
success = CONTAINERS.Clean_Test_Server_Images(HTML, svr_id, images, tag=tag)
elif action == 'Custom_Command':
node = test.findtext('node')
if force_local:
# 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)
@@ -417,9 +422,10 @@ def ExecuteActionWithParam(action):
success = cls_oaicitest.Custom_Script(HTML, node, script, command_fail)
elif action == 'Pull_Cluster_Image':
tag_prefix = test.findtext('tag_prefix') or ""
images = test.findtext('images').split()
node = test.findtext('node')
success = CLUSTER.PullClusterImage(HTML, node, images)
success = CLUSTER.PullClusterImage(HTML, node, images, tag_prefix=tag_prefix)
else:
logging.warning(f"unknown action {action}, skip step")

View File

@@ -45,6 +45,10 @@
040023
020022
040024
000024
040025
000031
030021
100021
222222
</TestCaseRequestedList>
@@ -73,9 +77,9 @@
<testCase id="000022">
<class>Deploy_Object</class>
<desc>Deploy OAI 5G CU+DU+UE RF sim SA</desc>
<desc>Deploy OAI 5G CU + DU-PCI0 + UE RF sim SA</desc>
<yaml_path>ci-scripts/yaml_files/5g_f1_rfsimulator</yaml_path>
<services>oai-cu oai-du oai-nr-ue</services>
<services>oai-cu oai-du-pci0 oai-nr-ue</services>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
</testCase>
@@ -86,6 +90,12 @@
<idle_sleep_time_in_sec>5</idle_sleep_time_in_sec>
</testCase>
<testCase id="000031">
<class>IdleSleep</class>
<desc>Sleep</desc>
<idle_sleep_time_in_sec>2</idle_sleep_time_in_sec>
</testCase>
<testCase id="000023">
<class>Attach_UE</class>
<desc>Attach OAI UE (Wait for IP)</desc>
@@ -93,6 +103,15 @@
<nodes>cacofonix</nodes>
</testCase>
<testCase id="000024">
<class>Deploy_Object</class>
<desc>Deploy OAI 5G (target) DU-PCI1 RF sim SA</desc>
<yaml_path>ci-scripts/yaml_files/5g_f1_rfsimulator</yaml_path>
<services>oai-du-pci1</services>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
</testCase>
<testCase id="020021">
<class>Ping</class>
<desc>Ping ext-dn from all NR-UEs</desc>
@@ -151,6 +170,15 @@
<ping_packetloss_threshold>80</ping_packetloss_threshold>
</testCase>
<testCase id="020023">
<class>Ping</class>
<desc>Ping ext-dn from all NR-UEs</desc>
<id>rfsim5g_ue</id>
<nodes>cacofonix</nodes>
<ping_args> -c 5 192.168.72.135 -i0.5 -w25</ping_args>
<ping_packetloss_threshold>80</ping_packetloss_threshold>
</testCase>
<testCase id="040002">
<class>Custom_Command</class>
<desc>Verify Reestablishment</desc>
@@ -191,6 +219,14 @@
<command_fail>yes</command_fail>
</testCase>
<testCase id="040025">
<class>Custom_Command</class>
<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="100021">
<class>Undeploy_Object</class>
<always_exec>true</always_exec>

View File

@@ -43,7 +43,7 @@
<class>Pull_Local_Registry</class>
<desc>Pull Images from Local Registry</desc>
<svr_id>0</svr_id>
<images>oai-gnb-asan oai-nr-ue-asan</images>
<images>oai-gnb oai-nr-ue</images>
</testCase>
<testCase id="800813">
<class>Create_Workspace</class>
@@ -134,7 +134,7 @@
<always_exec>true</always_exec>
<desc>Clean Test Images on Test Server</desc>
<svr_id>0</svr_id>
<images>oai-gnb-asan oai-nr-ue-asan</images>
<images>oai-gnb oai-nr-ue</images>
</testCase>
</testCaseList>

View File

@@ -34,6 +34,9 @@
020002
030001
030002
040001
000004
020002
100001
222222
</TestCaseRequestedList>
@@ -76,6 +79,12 @@
<nodes>cacofonix</nodes>
</testCase>
<testCase id="000004">
<class>IdleSleep</class>
<desc>Sleep</desc>
<idle_sleep_time_in_sec>5</idle_sleep_time_in_sec>
</testCase>
<testCase id="020001">
<class>Ping</class>
<desc>Ping ext-dn from NR-UE</desc>
@@ -118,6 +127,14 @@
<iperf_bitrate_threshold>90</iperf_bitrate_threshold>
</testCase>
<testCase id="040001">
<class>Custom_Command</class>
<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="100001">
<class>Undeploy_Object</class>
<always_exec>true</always_exec>

View File

@@ -22,7 +22,7 @@
-->
<testCaseList>
<htmlTabRef>rfsim-5gnr-fdd-u0-25prb</htmlTabRef>
<htmlTabName>Monolithic SA FDD u0 25PRB gNB</htmlTabName>
<htmlTabName>VNF-PNF nFAPI FDD u0 25PRB gNB</htmlTabName>
<htmlTabIcon>wrench</htmlTabIcon>
<TestCaseRequestedList>
111111
@@ -62,9 +62,9 @@
<testCase id="000002">
<class>Deploy_Object</class>
<desc>Deploy OAI 5G gNB+nrUE RF sim SA</desc>
<desc>Deploy OAI 5G VNF+PNF+nrUE RF sim SA</desc>
<yaml_path>ci-scripts/yaml_files/5g_rfsimulator_u0_25prb</yaml_path>
<services>oai-gnb oai-nr-ue</services>
<services>oai-vnf oai-pnf oai-nr-ue</services>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
</testCase>
@@ -122,6 +122,7 @@
<class>Undeploy_Object</class>
<always_exec>true</always_exec>
<desc>Undeploy all OAI 5G stack</desc>
<services>oai-vnf oai-pnf</services>
<yaml_path>ci-scripts/yaml_files/5g_rfsimulator_u0_25prb</yaml_path>
<d_retx_th>1,0,0,0</d_retx_th>
<u_retx_th>1,0,0,0</u_retx_th>

View File

@@ -0,0 +1,55 @@
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>build-tab</htmlTabRef>
<htmlTabName>Build Container Images for ARM</htmlTabName>
<htmlTabIcon>wrench</htmlTabIcon>
<TestCaseRequestedList>
800813
000001
000010
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="800813">
<class>Create_Workspace</class>
<desc>Create new Workspace for server 0</desc>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
</testCase>
<testCase id="000001">
<class>Build_Image</class>
<desc>Build all Images</desc>
<kind>native_arm</kind>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
</testCase>
<testCase id="000010">
<class>Push_Local_Registry</class>
<desc>Push Images to Local Registry</desc>
<svr_id>0</svr_id>
<tag_prefix>arm_</tag_prefix>
</testCase>
</testCaseList>

View File

@@ -0,0 +1,49 @@
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>TEST-GH-AERIAL-SA</htmlTabRef>
<htmlTabName>Gracehopper AERIAL 100 MHz TDD SA</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<TestCaseRequestedList>
111111
333333
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="111111">
<class>Pull_Local_Registry</class>
<desc>Pull Images from Local Registry</desc>
<svr_id>0</svr_id>
<images>oai-gnb-aerial</images>
<tag_prefix>arm_</tag_prefix>
</testCase>
<testCase id="333333">
<class>Clean_Test_Server_Images</class>
<always_exec>true</always_exec>
<desc>Clean Test Images on Test Server</desc>
<svr_id>0</svr_id>
<images>oai-gnb-aerial</images>
</testCase>
</testCaseList>

View File

@@ -22,7 +22,7 @@
-->
<testCaseList>
<htmlTabRef>TEST-SA-FR1-N310-4x4-60MHz</htmlTabRef>
<htmlTabName>60 MHz 4x4 TDD SA</htmlTabName>
<htmlTabName>nFAPI 60 MHz 4x4 TDD SA</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<TestCaseRequestedList>
100000
@@ -85,7 +85,7 @@
</testCase>
<testCase id="030101">
<class>Deploy_Object</class>
<desc>Deploy gNB (TDD/Band77/60MHz/N310) in a container</desc>
<desc>Deploy VNF-PNF (TDD/Band77/60MHz/N310) in a container</desc>
<yaml_path>ci-scripts/yaml_files/5g_sa_n310_4x4_60MHz</yaml_path>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
@@ -144,11 +144,11 @@
<testCase id="030201">
<class>Undeploy_Object</class>
<always_exec>true</always_exec>
<desc>Undeploy gNB</desc>
<desc>Undeploy VNF-PNF</desc>
<yaml_path>ci-scripts/yaml_files/5g_sa_n310_4x4_60MHz</yaml_path>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
<services>oai-gnb</services>
<services>oai-vnf oai-pnf</services>
<d_retx_th>10,100,100,100</d_retx_th>
<u_retx_th>10,100,100,100</u_retx_th>
</testCase>

View File

@@ -21,8 +21,8 @@
-->
<testCaseList>
<htmlTabRef>TEST-SA-FR1-SC-FDMA-B200</htmlTabRef>
<htmlTabName>40 MHz TDD SA with SC-FDMA</htmlTabName>
<htmlTabRef>TEST-SA-FR1-SC-PATTERN2-FDMA-B200</htmlTabRef>
<htmlTabName>40 MHz TDD (pattern2) SA with SC-FDMA</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<TestCaseRequestedList>
300000
@@ -101,7 +101,7 @@
</testCase>
<testCase id="230101">
<class>Deploy_Object</class>
<desc>Deploy gNB (TDD/Band78/40MHz/B200) with SC-FDMA in a container</desc>
<desc>Deploy gNB (TDD/pattern2/Band78/40MHz/B200) with SC-FDMA in a container</desc>
<yaml_path>ci-scripts/yaml_files/sa_sc_b200_gnb</yaml_path>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>

View File

@@ -45,7 +45,7 @@
<testCase id="090101">
<class>Initialize_eNB</class>
<desc>Initialize gNB USRP</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band78.106prb.usrpn300.phytest-dora.conf --phy-test -q -U 787200 -T 106 -t 23 -D 130175 -m 28 -M 106 --usrp-tx-thread-config 1 --log_config.global_log_options level,nocolor,time</Initialize_eNB_args>
<Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band78.106prb.usrpn300.phytest-dora.conf --phy-test -q -U 768 -T 106 -t 23 -D 127 -m 28 -M 106 --usrp-tx-thread-config 1 --log_config.global_log_options level,nocolor,time</Initialize_eNB_args>
<rt_stats_cfg>datalog_rt_stats.default.yaml</rt_stats_cfg>
<air_interface>NR</air_interface>
<USRP_IPAddress>192.168.20.2</USRP_IPAddress>

View File

@@ -45,7 +45,7 @@
<testCase id="390101">
<class>Initialize_eNB</class>
<desc>Initialize gNB USRP</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band78.273prb.usrpn300.phytest-dora.conf --phy-test -q -U 787200 -T 273 -t 23 -D 130175 -m 23 -M 273 -l 2 --usrp-tx-thread-config 1 --log_config.global_log_options level,nocolor,time</Initialize_eNB_args>
<Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band78.273prb.usrpn300.phytest-dora.conf --phy-test -q -U 768 -T 273 -t 23 -D 127 -m 23 -M 273 -l 2 --usrp-tx-thread-config 1 --log_config.global_log_options level,nocolor,time</Initialize_eNB_args>
<rt_stats_cfg>datalog_rt_stats.100.2x2.yaml</rt_stats_cfg>
<air_interface>NR</air_interface>
<USRP_IPAddress>192.168.20.2</USRP_IPAddress>

View File

@@ -45,7 +45,7 @@
<testCase id="190101">
<class>Initialize_eNB</class>
<desc>Initialize gNB USRP</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band78.162prb.usrpn300.phytest-dora.conf --phy-test -q -U 787200 -T 162 -t 23 -D 130175 -m 23 -M 162 --usrp-tx-thread-config 1 --log_config.global_log_options level,nocolor,time</Initialize_eNB_args>
<Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band78.162prb.usrpn300.phytest-dora.conf --phy-test -q -U 768 -T 162 -t 23 -D 127 -m 23 -M 162 --usrp-tx-thread-config 1 --log_config.global_log_options level,nocolor,time</Initialize_eNB_args>
<rt_stats_cfg>datalog_rt_stats.1x1.60.yaml</rt_stats_cfg>
<air_interface>NR</air_interface>
<USRP_IPAddress>192.168.20.2</USRP_IPAddress>

View File

@@ -45,7 +45,7 @@
<testCase id="290101">
<class>Initialize_eNB</class>
<desc>Initialize gNB USRP</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band78.162prb.usrpn300.phytest-dora.conf --phy-test --gNBs.[0].pdsch_AntennaPorts_XP 2 --RUs.[0].nb_tx 2 --RUs.[0].nb_rx 2 -q -U 787200 -T 162 -t 23 -D 130175 -m 23 -M 162 -l 2 --usrp-tx-thread-config 1 --log_config.global_log_options level,nocolor,time</Initialize_eNB_args>
<Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band78.162prb.usrpn300.phytest-dora.conf --phy-test --gNBs.[0].pdsch_AntennaPorts_XP 2 --RUs.[0].nb_tx 2 --RUs.[0].nb_rx 2 -q -U 768 -T 162 -t 23 -D 127 -m 23 -M 162 -l 2 --usrp-tx-thread-config 1 --log_config.global_log_options level,nocolor,time</Initialize_eNB_args>
<rt_stats_cfg>datalog_rt_stats.60.2x2.yaml</rt_stats_cfg>
<air_interface>NR</air_interface>
<USRP_IPAddress>192.168.20.2</USRP_IPAddress>

View File

@@ -25,7 +25,10 @@
<htmlTabRef>test-ldpc-gpu</htmlTabRef>
<htmlTabName>Test-ldpc-GPU</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<TestCaseRequestedList>000002 000003 000004 000005 000006 000007 000008 000009 000010 000011 000012 000013 000014 000015 000016 000017 000018 000019 000020 000021</TestCaseRequestedList>
<TestCaseRequestedList>
000002 000003 000004 000005 000006 000007 000008 000009 000010 000011 000012 000013 000014 000015 000016 000017 000018 000019 000020 000021
000022 000023 000024 000025 000026 000027 000028 000029 000030 000031 000032 000033 000034 000035 000036 000037 000038 000039 000040 000041
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="000002">
@@ -188,6 +191,166 @@
<physim_run_args>-l 8448 -s10 -n100 -G 1</physim_run_args>
</testCase>
<testCase id="000022">
<class>Run_Physim</class>
<desc>Run LDPC Test with CPU</desc>
<always_exec>true</always_exec>
<physim_test>ldpctest</physim_test>
<physim_run_args>-l 1 -s10 -n100</physim_run_args>
</testCase>
<testCase id="000023">
<class>Run_Physim</class>
<desc>Run LDPC Test with GPU</desc>
<always_exec>true</always_exec>
<physim_test>ldpctest</physim_test>
<physim_run_args>-l 1 -s10 -n100 -G 1</physim_run_args>
</testCase>
<testCase id="000024">
<class>Run_Physim</class>
<desc>Run LDPC Test with CPU</desc>
<always_exec>true</always_exec>
<physim_test>ldpctest</physim_test>
<physim_run_args>-l 100 -s10 -n100</physim_run_args>
</testCase>
<testCase id="000025">
<class>Run_Physim</class>
<desc>Run LDPC Test with GPU</desc>
<always_exec>true</always_exec>
<physim_test>ldpctest</physim_test>
<physim_run_args>-l 100 -s10 -n100 -G 1</physim_run_args>
</testCase>
<testCase id="000026">
<class>Run_Physim</class>
<desc>Run LDPC Test with CPU</desc>
<always_exec>true</always_exec>
<physim_test>ldpctest</physim_test>
<physim_run_args>-l 193 -s10 -n100</physim_run_args>
</testCase>
<testCase id="000027">
<class>Run_Physim</class>
<desc>Run LDPC Test with GPU</desc>
<always_exec>true</always_exec>
<physim_test>ldpctest</physim_test>
<physim_run_args>-l 193 -s10 -n100 -G 1</physim_run_args>
</testCase>
<testCase id="000028">
<class>Run_Physim</class>
<desc>Run LDPC Test with CPU</desc>
<always_exec>true</always_exec>
<physim_test>ldpctest</physim_test>
<physim_run_args>-l 500 -s10 -n100</physim_run_args>
</testCase>
<testCase id="000029">
<class>Run_Physim</class>
<desc>Run LDPC Test with GPU</desc>
<always_exec>true</always_exec>
<physim_test>ldpctest</physim_test>
<physim_run_args>-l 500 -s10 -n100 -G 1</physim_run_args>
</testCase>
<testCase id="000030">
<class>Run_Physim</class>
<desc>Run LDPC Test with CPU</desc>
<always_exec>true</always_exec>
<physim_test>ldpctest</physim_test>
<physim_run_args>-l 561 -s10 -n100</physim_run_args>
</testCase>
<testCase id="000031">
<class>Run_Physim</class>
<desc>Run LDPC Test with GPU</desc>
<always_exec>true</always_exec>
<physim_test>ldpctest</physim_test>
<physim_run_args>-l 561 -s10 -n100 -G 1</physim_run_args>
</testCase>
<testCase id="000032">
<class>Run_Physim</class>
<desc>Run LDPC Test with CPU</desc>
<always_exec>true</always_exec>
<physim_test>ldpctest</physim_test>
<physim_run_args>-l 600 -s10 -n100</physim_run_args>
</testCase>
<testCase id="000033">
<class>Run_Physim</class>
<desc>Run LDPC Test with GPU</desc>
<always_exec>true</always_exec>
<physim_test>ldpctest</physim_test>
<physim_run_args>-l 600 -s10 -n100 -G 1</physim_run_args>
</testCase>
<testCase id="000034">
<class>Run_Physim</class>
<desc>Run LDPC Test with CPU</desc>
<always_exec>true</always_exec>
<physim_test>ldpctest</physim_test>
<physim_run_args>-l 641 -s10 -n100</physim_run_args>
</testCase>
<testCase id="000035">
<class>Run_Physim</class>
<desc>Run LDPC Test with GPU</desc>
<always_exec>true</always_exec>
<physim_test>ldpctest</physim_test>
<physim_run_args>-l 641 -s10 -n100 -G 1</physim_run_args>
</testCase>
<testCase id="000036">
<class>Run_Physim</class>
<desc>Run LDPC Test with CPU</desc>
<always_exec>true</always_exec>
<physim_test>ldpctest</physim_test>
<physim_run_args>-l 2000 -s10 -n100</physim_run_args>
</testCase>
<testCase id="000037">
<class>Run_Physim</class>
<desc>Run LDPC Test with GPU</desc>
<always_exec>true</always_exec>
<physim_test>ldpctest</physim_test>
<physim_run_args>-l 2000 -s10 -n100 -G 1</physim_run_args>
</testCase>
<testCase id="000038">
<class>Run_Physim</class>
<desc>Run LDPC Test with CPU</desc>
<always_exec>true</always_exec>
<physim_test>ldpctest</physim_test>
<physim_run_args>-l 3000 -s10 -n100</physim_run_args>
</testCase>
<testCase id="000039">
<class>Run_Physim</class>
<desc>Run LDPC Test with GPU</desc>
<always_exec>true</always_exec>
<physim_test>ldpctest</physim_test>
<physim_run_args>-l 3000 -s10 -n100 -G 1</physim_run_args>
</testCase>
<testCase id="000040">
<class>Run_Physim</class>
<desc>Run LDPC Test with CPU</desc>
<always_exec>true</always_exec>
<physim_test>ldpctest</physim_test>
<physim_run_args>-l 3840 -s10 -n100</physim_run_args>
</testCase>
<testCase id="000041">
<class>Run_Physim</class>
<desc>Run LDPC Test with GPU</desc>
<always_exec>true</always_exec>
<physim_test>ldpctest</physim_test>
<physim_run_args>-l 3840 -s10 -n100 -G 1</physim_run_args>
</testCase>
</testCaseList>

View File

@@ -90,6 +90,7 @@ services:
environment:
USE_ADDITIONAL_OPTIONS: --log_config.global_log_options level,nocolor,time
--rfsimulator.options chanmod
--gNBs.[0].remote_s_address 0.0.0.0
--telnetsrv --telnetsrv.listenaddr 192.168.71.150
--telnetsrv.shrmod ci
ASAN_OPTIONS: detect_leaks=0:detect_odr_violation=0
@@ -106,9 +107,9 @@ services:
timeout: 5s
retries: 5
oai-du:
oai-du-pci0:
image: ${REGISTRY:-oaisoftwarealliance}/${GNB_IMG:-oai-gnb}:${TAG:-develop}
container_name: rfsim5g-oai-du
container_name: rfsim5g-oai-du-pci0
cap_drop:
- ALL
environment:
@@ -117,9 +118,11 @@ services:
--rfsimulator.options chanmod
--telnetsrv --telnetsrv.listenaddr 192.168.71.171
--telnetsrv.shrmod ci
--rfsimulator.serveraddr 192.168.71.181
ASAN_OPTIONS: detect_leaks=0:detect_odr_violation=0
depends_on:
- oai-cu
- oai-nr-ue
networks:
public_net:
ipv4_address: 192.168.71.171
@@ -131,6 +134,37 @@ services:
timeout: 5s
retries: 5
oai-du-pci1:
image: ${REGISTRY:-oaisoftwarealliance}/${GNB_IMG:-oai-gnb}:${TAG:-develop}
container_name: rfsim5g-oai-du-pci1
cap_drop:
- ALL
environment:
USE_ADDITIONAL_OPTIONS: --rfsim
--log_config.global_log_options level,nocolor,time
--gNBs.[0].gNB_DU_ID 3585
--gNBs.[0].nr_cellid 11111111
--gNBs.[0].servingCellConfigCommon.[0].physCellId 1
--gNBs.[0].servingCellConfigCommon.[0].absoluteFrequencySSB 643296
--gNBs.[0].servingCellConfigCommon.[0].dl_absoluteFrequencyPointA 642024
--gNBs.[0].servingCellConfigCommon.[0].ssb_PositionsInBurst_Bitmap 3
--MACRLCs.[0].local_n_address 192.168.71.172
--rfsimulator.serveraddr 192.168.71.181
ASAN_OPTIONS: detect_leaks=0:detect_odr_violation=0
depends_on:
- oai-cu
- oai-nr-ue
networks:
public_net:
ipv4_address: 192.168.71.172
volumes:
- ../../conf_files/gnb-du.sa.band78.106prb.rfsim.conf:/opt/oai-gnb/etc/gnb.conf
healthcheck:
test: /bin/bash -c "pgrep nr-softmodem"
interval: 10s
timeout: 5s
retries: 5
oai-nr-ue:
image: ${REGISTRY:-oaisoftwarealliance}/${NRUE_IMG:-oai-nr-ue}:${TAG:-develop}
container_name: rfsim5g-oai-nr-ue
@@ -143,12 +177,12 @@ services:
USE_ADDITIONAL_OPTIONS: --rfsim --log_config.global_log_options level,nocolor,time
-r 106 --numerology 1 -C 3619200000
--uicc0.imsi 208990100001100
--rfsimulator.serveraddr 192.168.71.171
--rfsimulator.options chanmod
--rfsimulator.serveraddr server
--telnetsrv --telnetsrv.shrmod ciUE --telnetsrv.listenaddr 192.168.71.181 --telnetsrv.listenport 8091
--channelmod.modellist_rfsimu_1.[0].model_name rfsimu_channel_ue0
--channelmod.modellist_rfsimu_1.[1].model_name rfsimu_channel_ue1
ASAN_OPTIONS: detect_odr_violation=0
depends_on:
- oai-du
networks:
public_net:
ipv4_address: 192.168.71.181

View File

@@ -86,8 +86,7 @@ services:
cap_drop:
- ALL
environment:
USE_ADDITIONAL_OPTIONS: -E --rfsim --log_config.global_log_options level,nocolor,time
ASAN_OPTIONS: detect_leaks=0
USE_ADDITIONAL_OPTIONS: -E --log_config.global_log_options level,nocolor,time --device.name vrtsim --vrtsim.role server --vrtsim.timescale 0.5
depends_on:
- oai-ext-dn
networks:
@@ -95,11 +94,13 @@ services:
ipv4_address: 192.168.71.140
volumes:
- ../../conf_files/gnb.sa.band66.106prb.rfsim.conf:/opt/oai-gnb/etc/gnb.conf
- tmp_data:/tmp/
healthcheck:
test: /bin/bash -c "pgrep nr-softmodem"
interval: 10s
timeout: 5s
retries: 5
ipc: host
oai-nr-ue:
image: ${REGISTRY:-oaisoftwarealliance}/${NRUE_IMG:-oai-nr-ue}:${TAG:-develop}
container_name: rfsim5g-oai-nr-ue
@@ -109,7 +110,7 @@ services:
- NET_ADMIN # for interface bringup
- NET_RAW # for ping
environment:
USE_ADDITIONAL_OPTIONS: -E --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001100 --band 66 -C 2169090000 --CO -400000000 --ssb 378 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
USE_ADDITIONAL_OPTIONS: -E -r 106 --numerology 1 --uicc0.imsi 208990100001100 --band 66 -C 2169090000 --CO -400000000 --ssb 378 --log_config.global_log_options level,nocolor,time --device.name vrtsim
depends_on:
- oai-gnb
networks:
@@ -119,11 +120,13 @@ services:
- /dev/net/tun:/dev/net/tun
volumes:
- ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/nr-ue.conf
- tmp_data:/tmp/
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
interval: 10s
timeout: 5s
retries: 5
ipc: host
networks:
public_net:
@@ -142,3 +145,6 @@ networks:
- subnet: 192.168.72.128/26
driver_opts:
com.docker.network.bridge.name: "rfsim5g-traffic"
volumes:
tmp_data:

View File

@@ -109,7 +109,10 @@ services:
- NET_ADMIN # for interface bringup
- NET_RAW # for ping
environment:
USE_ADDITIONAL_OPTIONS: --rfsim -r 24 --ssb 24 --numerology 1 -C 3604800000 --uicc0.imsi 208990100001100 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
USE_ADDITIONAL_OPTIONS: --rfsim -r 24 --ssb 24 --numerology 1 -C 3604800000 --uicc0.imsi 208990100001100
--rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
--telnetsrv --telnetsrv.shrmod ciUE --telnetsrv.listenaddr 192.168.71.150 --telnetsrv.listenport 8091
ASAN_OPTIONS: detect_leaks=0:detect_odr_violation=0
depends_on:
- oai-gnb
networks:

View File

@@ -86,7 +86,7 @@ services:
cap_drop:
- ALL
environment:
USE_ADDITIONAL_OPTIONS: --rfsim --rfsimulator.prop_delay 238.74 --log_config.global_log_options level,nocolor,time
USE_ADDITIONAL_OPTIONS: --rfsim --log_config.global_log_options level,nocolor,time
ASAN_OPTIONS: detect_leaks=0
depends_on:
- oai-ext-dn
@@ -94,7 +94,7 @@ services:
public_net:
ipv4_address: 192.168.71.140
volumes:
- ../../conf_files/gnb.sa.band66.ntn.25prb.rfsim.conf:/opt/oai-gnb/etc/gnb.conf
- ../../conf_files/gnb.sa.band254.u0.25prb.rfsim.ntn.conf:/opt/oai-gnb/etc/gnb.conf
healthcheck:
test: /bin/bash -c "pgrep nr-softmodem"
interval: 10s
@@ -110,7 +110,7 @@ services:
- NET_ADMIN # for interface bringup
- NET_RAW # for ping
environment:
USE_ADDITIONAL_OPTIONS: --band 66 -C 2152680000 --CO -400000000 -r 25 --numerology 0 --ssb 48 --rfsim --rfsimulator.prop_delay 238.74 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
USE_ADDITIONAL_OPTIONS: --band 254 -C 2488400000 --CO -873500000 -r 25 --numerology 0 --ssb 60 --rfsim --rfsimulator.prop_delay 238.74 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
depends_on:
- oai-gnb
networks:

View File

@@ -80,13 +80,15 @@ services:
interval: 10s
timeout: 5s
retries: 5
oai-gnb:
oai-vnf:
image: ${REGISTRY:-oaisoftwarealliance}/${GNB_IMG:-oai-gnb}:${TAG:-develop}
container_name: rfsim5g-oai-gnb
container_name: rfsim5g-oai-vnf
cap_drop:
- ALL
environment:
USE_ADDITIONAL_OPTIONS: --rfsim --log_config.global_log_options level,nocolor,time
USE_ADDITIONAL_OPTIONS: --nfapi VNF --log_config.global_log_options level,nocolor,time
NFAPI_TRACE_LEVEL: info
ASAN_OPTIONS: detect_leaks=0
depends_on:
- oai-ext-dn
@@ -94,7 +96,29 @@ services:
public_net:
ipv4_address: 192.168.71.140
volumes:
- ../../conf_files/gnb.sa.band66.u0.25prb.rfsim.conf:/opt/oai-gnb/etc/gnb.conf
- ../../conf_files/gnb-vnf.sa.band66.u0.25prb.nfapi.conf:/opt/oai-gnb/etc/gnb.conf
healthcheck:
test: /bin/bash -c "pgrep nr-softmodem"
interval: 10s
timeout: 5s
retries: 5
oai-pnf:
image: ${REGISTRY:-oaisoftwarealliance}/${GNB_IMG:-oai-gnb}:${TAG:-develop}
container_name: rfsim5g-oai-pnf
cap_drop:
- ALL
environment:
USE_ADDITIONAL_OPTIONS: --nfapi PNF --rfsim --log_config.global_log_options level,nocolor,time
NFAPI_TRACE_LEVEL: info
ASAN_OPTIONS: detect_leaks=0
depends_on:
- oai-vnf
networks:
public_net:
ipv4_address: 192.168.71.141
volumes:
- ../../conf_files/gnb-pnf.band66.rfsim.conf:/opt/oai-gnb/etc/gnb.conf
healthcheck:
test: /bin/bash -c "pgrep nr-softmodem"
interval: 10s
@@ -110,9 +134,9 @@ services:
- NET_ADMIN # for interface bringup
- NET_RAW # for ping
environment:
USE_ADDITIONAL_OPTIONS: --rfsim -r 25 --numerology 0 --uicc0.imsi 208990100001100 --band 66 -C 2152680000 --CO -400000000 --ssb 48 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
USE_ADDITIONAL_OPTIONS: --rfsim -r 25 --numerology 0 --uicc0.imsi 208990100001100 --band 66 -C 2152680000 --CO -400000000 --ssb 48 --rfsimulator.serveraddr 192.168.71.141 --log_config.global_log_options level,nocolor,time
depends_on:
- oai-gnb
- oai-pnf
networks:
public_net:
ipv4_address: 192.168.71.150

View File

@@ -1,8 +1,8 @@
services:
oai-gnb:
oai-vnf:
image: ${REGISTRY:-oaisoftwarealliance}/${GNB_IMG:-oai-gnb}:${TAG:-develop}
network_mode: "host"
container_name: oai-gnb
container_name: oai-vnf
cap_drop:
- ALL
cap_add:
@@ -10,9 +10,30 @@ services:
- IPC_LOCK
environment:
TZ: Europe/Paris
USE_ADDITIONAL_OPTIONS: --log_config.global_log_options level,nocolor,time
USE_ADDITIONAL_OPTIONS: --nfapi VNF
NFAPI_TRACE_LEVEL: info
volumes:
- ../../conf_files/gnb.sa.band77.162prb.usrpn310.4x4.conf:/opt/oai-gnb/etc/gnb.conf
- ../../conf_files/gnb-vnf.sa.band77.162prb.nfapi.4x4.conf:/opt/oai-gnb/etc/gnb.conf
healthcheck:
test: /bin/bash -c "pgrep nr-softmodem"
interval: 10s
timeout: 5s
retries: 5
oai-pnf:
image: ${REGISTRY:-oaisoftwarealliance}/${GNB_IMG:-oai-gnb}:${TAG:-develop}
network_mode: "host"
container_name: oai-pnf
cap_drop:
- ALL
cap_add:
- SYS_NICE
- IPC_LOCK
environment:
TZ: Europe/Paris
USE_ADDITIONAL_OPTIONS: --nfapi PNF
NFAPI_TRACE_LEVEL: info
volumes:
- ../../conf_files/gnb-pnf.band77.usrpn310.4x4.conf:/opt/oai-gnb/etc/gnb.conf
healthcheck:
test: /bin/bash -c "pgrep nr-softmodem"
interval: 10s

View File

@@ -9,6 +9,7 @@ services:
environment:
USE_ADDITIONAL_OPTIONS: --telnetsrv --telnetsrv.listenport 9090 --telnetsrv.shrmod ci
--log_config.global_log_options level,nocolor,time,line_num,function
--security.drb_integrity yes
volumes:
- ../../conf_files/gnb-cucp.sa.f1.quectel.conf:/opt/oai-gnb/etc/gnb.conf
# for performance reasons, we use host mode: in bridge mode, we have

View File

@@ -105,11 +105,7 @@ add_definitions("-DFIRMWARE_VERSION=\"${FIRMWARE_VERSION}\"")
##########################
# NAS LAYER OPTIONS
##########################
add_boolean_option(ENABLE_NAS_UE_LOGGING True "????")
add_boolean_option(NAS_BUILT_IN_EPC False "MME NAS layer not present in this executable")
add_boolean_option(NAS_BUILT_IN_UE False "UE NAS layer present in this executable")
add_boolean_option(NAS_UE True "NAS UE INSTANCE (<> NAS_MME)")
add_boolean_option(NAS_MME False "NAS_UE and NAS_MME are incompatible options")
################################################################################
# SECU LIB

View File

@@ -66,16 +66,26 @@
</testCase>
<testCase id="ldpctest">
<desc>ldpc Test cases. (Test1: block length = 3872),
(Test2: block length = 4224),
(Test3: block length = 4576),
(Test4: block length = 4928),
(Test5: block length = 5280),
(Test6: block length = 5632),
(Test7: block length = 6336),
(Test8: block length = 7040),
(Test9: block length = 7744),
(Test10: block length = 8448)</desc>
<desc>ldpc Test cases. (Test1: block length = 3872, BG1),
(Test2: block length = 4224, BG1),
(Test3: block length = 4576, BG1),
(Test4: block length = 4928, BG1),
(Test5: block length = 5280, BG1),
(Test6: block length = 5632, BG1),
(Test7: block length = 6336, BG1),
(Test8: block length = 7040, BG1),
(Test9: block length = 7744, BG1),
(Test10: block length = 8448, BG1),
(Test11: block length = 1, BG2),
(Test12: block length = 100, BG2),
(Test13: block length = 193, BG2),
(Test14: block length = 500, BG2),
(Test15: block length = 561, BG2),
(Test16: block length = 600, BG2),
(Test17: block length = 641, BG2),
(Test18: block length = 2000, BG2),
(Test19: block length = 3000, BG2),
(Test20: block length = 3840, BG2)</desc>
<main_exec>ldpctest</main_exec>
<main_exec_args>-l3872 -s10 -n100
-l4224 -s10 -n100
@@ -87,9 +97,17 @@
-l7040 -s10 -n100
-l7744 -s10 -n100
-l8448 -s10 -n100
-l561 -s10 -n1
-l500 -s10 -n1</main_exec_args>
<tags>test1 test2 test3 test4 test5 test6 test7 test8 test9 test10</tags>
-l1 -s10 -n100
-l100 -s10 -n100
-l193 -s10 -n100
-l500 -s10 -n100
-l561 -s10 -n100
-l600 -s10 -n100
-l641 -s10 -n100
-l2000 -s10 -n100
-l3000 -s10 -n100
-l3840 -s10 -n100</main_exec_args>
<tags>test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11 test12 test13 test14 test15 test16 test17 test18 test19 test20</tags>
<search_expr_true>BLER 0.000000</search_expr_true>
<search_expr_false>segmentation fault|assertion|exiting|fatal|differ</search_expr_false>
<nruns>3</nruns>
@@ -168,7 +186,8 @@
(Test4: HARQ test 25% TP 4 rounds),
(Test5: HARQ test 33% TP 3 rounds),
(Test6: HARQ test 50% TP 2 rounds),
(Test7: 25 PRBs, 15 kHz SCS)</desc>
(Test7: 25 PRBs, 15 kHz SCS),
(Test8: 32 PRBs, 120 kHz SCS)</desc>
<main_exec>nr_dlsim</main_exec>
<main_exec_args>-n100 -R106 -b106 -s5
-n100 -R217 -b217 -s5
@@ -176,8 +195,9 @@
-n100 -s1 -S2 -t25
-n100 -s1 -S2 -t33
-n100 -s5 -S7 -t50
-n100 -m0 -e0 -R25 -b25 -i 2 1 0</main_exec_args>
<tags>test1 test2 test3 test4 test5 test6 test7</tags>
-n100 -m0 -e0 -R25 -b25 -i 2 1 0
-n100 -s5 -m3 -R32 -b32</main_exec_args>
<tags>test1 test2 test3 test4 test5 test6 test7 test8</tags>
<search_expr_true>PDSCH test OK</search_expr_true>
<search_expr_false>segmentation fault|assertion|exiting|fatal</search_expr_false>
<nruns>3</nruns>
@@ -400,9 +420,10 @@
(Test9: PUSCH Type B, 3 DMRS, 2 PTRS, 7 Interpolated Symbols),
(Test10: PUSCH Type B, 3 DMRS, 2 PTRS, 3 Interpolated Symbols),
(Test11: 25 PRBs, 15 kHz SCS),
(Test12: MCS 0, low SNR performance)
(Test13: MCS 28, 106 PRBs, Time shift 8)
(Test14: SRS, SNR 40 dB)</desc>
(Test12: 32 PRBs, 120 kHz SCS),
(Test13: MCS 0, low SNR performance)
(Test14: MCS 28, 106 PRBs, Time shift 8)
(Test15: SRS, SNR 40 dB)</desc>
<main_exec>nr_ulsim</main_exec>
<main_exec_args>-n100 -m9 -r106 -s5
-n100 -m16 -s10
@@ -415,10 +436,11 @@
-n100 -s5 -T 2,2 -U 1,2,1,1
-n100 -s5 -a4 -b8 -T 1,2 -U 1,3,1,1
-n100 -u0 -m0 -R25 -r25 -i 1,0
-n100 -s5 -r32 -R32 -u3
-n100 -m0 -S -0.6 -i 1,0
-n100 -m 28 -R106 -r106 -t90 -s24 -S24 -d 8
-n100 -s40 -E 1</main_exec_args>
<tags>test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11 test12 test13 test14</tags>
<tags>test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11 test12 test13 test14 test15</tags>
<search_expr_true>PUSCH test OK</search_expr_true>
<search_expr_false>segmentation fault|assertion|exiting|fatal</search_expr_false>
<nruns>3</nruns>

View File

@@ -46,7 +46,7 @@ BUILD_DOXYGEN=0
DISABLE_HARDWARE_DEPENDENCY="False"
CMAKE_BUILD_TYPE="RelWithDebInfo"
CMAKE_CMD="$CMAKE"
OPTIONAL_LIBRARIES="telnetsrv enbscope uescope nrscope ldpc_cuda ldpc_t2 ldpc_xdma websrv oai_iqplayer imscope"
OPTIONAL_LIBRARIES="telnetsrv enbscope uescope nrscope ldpc_cuda ldpc_t2 ldpc_xdma websrv oai_iqplayer imscope imscope_record"
TARGET_LIST=""
BUILD_TOOL_OPT="-j$(nproc)"
@@ -99,7 +99,7 @@ Options:
USRP, BLADERF, LMSSDR, IRIS, SIMU, AW2SORI, AERIAL, None (Default)
Adds this RF board support (in external packages installation and in compilation)
-t | --transport
Selects the transport protocol type, options: None, Ethernet, benetel4g, benetel5g, oran_fhlib_5g
Selects the transport protocol type, options: None, Ethernet, benetel4g, benetel5g, oran_fhlib_5g, oran_fhlib_5g_mplane
-P | --phy_simulators
Makes the unitary tests Layer 1 simulators
-s | --check
@@ -304,6 +304,10 @@ function main() {
TARGET_LIST="$TARGET_LIST $2"
CMAKE_CMD="$CMAKE_CMD -DOAI_FHI72=ON"
;;
"oran_fhlib_5g_mplane")
TARGET_LIST="$TARGET_LIST $2"
CMAKE_CMD="$CMAKE_CMD -DOAI_FHI72=ON -DOAI_FHI72_MPLANE=ON"
;;
"None")
;;
*)
@@ -485,7 +489,7 @@ function main() {
# add some default libraries that should always be built
# for eNB, gNB, UEs, simulators
if [[ $gNB == 1 || $eNB == 1 || $UE == 1 || $nrUE == 1 || $SIMUS_PHY == 1 || $RU == 1 ]]; then
TARGET_LIST="$TARGET_LIST params_libconfig coding rfsimulator dfts params_yaml"
TARGET_LIST="$TARGET_LIST params_libconfig coding rfsimulator dfts params_yaml vrtsim"
fi
mkdir -p $DIR/$BUILD_DIR/build
@@ -504,12 +508,6 @@ function main() {
echo_info "Built Doxygen based documentation. The documentation file is located here: $DIR/$BUILD_DIR/build/doc/html/index.html"
fi
# TODO: once we got the CMakeLists.txt file done for the ORAN files, remove the following lines
if [[ $TARGET_LIST =~ "oran_fhlib_5g" ]]; then
rm -f liboai_transpro.so
ln -s liboran_fhlib_5g.so liboai_transpro.so
fi
if [ "$UE" = 1 ] ; then
echo_info "Compiling UE specific part"

View File

@@ -1,53 +0,0 @@
# - Try to find the LibXml2 xml processing library
# Once done this will define
#
# LIBXML2_FOUND - System has LibXml2
# LIBXML2_INCLUDE_DIR - The LibXml2 include directory
# LIBXML2_LIBRARIES - The libraries needed to use LibXml2
# LIBXML2_DEFINITIONS - Compiler switches required for using LibXml2
# LIBXML2_XMLLINT_EXECUTABLE - The XML checking tool xmllint coming with LibXml2
#=============================================================================
# Copyright 2006-2009 Kitware, Inc.
# Copyright 2006 Alexander Neundorf <neundorf@kde.org>
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
FIND_PACKAGE(PkgConfig)
PKG_CHECK_MODULES(PC_LIBXML libxml-2.0)
SET(LIBXML2_DEFINITIONS ${PC_LIBXML_CFLAGS_OTHER})
FIND_PATH(LIBXML2_INCLUDE_DIR NAMES libxml/xpath.h
HINTS
${PC_LIBXML_INCLUDEDIR}
${PC_LIBXML_INCLUDE_DIRS}
PATH_SUFFIXES libxml2
)
FIND_LIBRARY(LIBXML2_LIBRARIES NAMES xml2 libxml2
HINTS
${PC_LIBXML_LIBDIR}
${PC_LIBXML_LIBRARY_DIRS}
)
FIND_PROGRAM(LIBXML2_XMLLINT_EXECUTABLE xmllint)
# for backwards compat. with KDE 4.0.x:
SET(XMLLINT_EXECUTABLE "${LIBXML2_XMLLINT_EXECUTABLE}")
# handle the QUIETLY and REQUIRED arguments and set LIBXML2_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 DEFAULT_MSG LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)
MARK_AS_ADVANCED(LIBXML2_INCLUDE_DIR LIBXML2_LIBRARIES LIBXML2_XMLLINT_EXECUTABLE)

View File

@@ -75,7 +75,6 @@ endif()
find_path(xran_INCLUDE_DIR
NAMES
xran_common.h
xran_compression.h
xran_cp_api.h
xran_ecpri_owd_measurements.h
@@ -84,7 +83,7 @@ find_path(xran_INCLUDE_DIR
xran_pkt_up.h
xran_sync_api.h
HINTS ${xran_LOCATION}
PATH_SUFFIXES api include
PATH_SUFFIXES api
NO_DEFAULT_PATH
)
find_library(xran_LIBRARY
@@ -127,16 +126,19 @@ find_package_handle_standard_args(xran
VERSION_VAR xran_VERSION
)
# in proper usage of cmake, include directory should only contain "api", but not header files under "src" directory;
# however, we use xran_dev_get_ctx() and xran_dev_get_ctx_by_id() functions which are defined in xran_common.h;
# since xran_common.h is under "src" directory, we have to include it in ${xran_INCLUDE_DIRS}
if(xran_FOUND)
set(xran_LIBRARIES ${xran_LIBRARY})
set(xran_INCLUDE_DIRS ${xran_INCLUDE_DIR})
set(xran_INCLUDE_DIRS ${xran_INCLUDE_DIR} ${xran_INCLUDE_DIR}/../src)
endif()
if(xran_FOUND AND NOT TARGET xran::xran)
add_library(xran::xran UNKNOWN IMPORTED)
set_target_properties(xran::xran PROPERTIES
IMPORTED_LOCATION "${xran_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${xran_INCLUDE_DIR}"
INTERFACE_INCLUDE_DIRECTORIES "${xran_INCLUDE_DIRS}"
)
endif()

View File

@@ -546,7 +546,10 @@ check_install_additional_tools (){
libforms-bin \
libforms-dev \
libxft-dev \
xmlstarlet"
xmlstarlet \
libpcre3-dev \
libssh-dev \
libxml2-dev"
elif [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "centos" ]] || [[ "$OS_DISTRO" == "rocky" ]] || [[ "$OS_DISTRO" == "fedora" ]]; then
PACKAGE_LIST="\
doxygen \
@@ -556,7 +559,10 @@ check_install_additional_tools (){
libXft-devel \
xforms \
xforms-devel \
xmlstarlet"
xmlstarlet \
pcre-devel \
libssh-devel \
libxml2-devel"
fi
$SUDO $INSTALLER install -y $PACKAGE_LIST $optional_packages
}
@@ -674,8 +680,8 @@ install_simde_from_source(){
if [[ -v SIMDE_VERSION ]]; then
git checkout -f $SIMDE_VERSION
else
# At time of writing, last working commit for OAI: 1a09d3bc
git checkout 1a09d3bc9de47c4d9a5daa23eb753d5322748201
# At time of writing, last working commit for OAI: c7f26b7
git checkout c7f26b73ba8e874b95c2cec2b497826ad2188f68
fi
# Showing which version is used
git log -n1

View File

@@ -63,7 +63,7 @@ void SetDefault(configmodule_interface_t *cfg, paramdef_t *param)
*param->i8ptr = param->defintval;
break;
case TYPE_UINT8:
*param->i8ptr = param->defuintval;
*param->u8ptr = param->defuintval;
break;
case TYPE_INT16:
*param->i16ptr = param->defintval;
@@ -120,8 +120,11 @@ void SetNonDefault(configmodule_interface_t *cfg, const YAML::Node &node, paramd
sprintf(*param->strptr, "%s", setting.c_str());
break;
}
case TYPE_INT8:
*param->i8ptr = node[optname].as<int8_t>();
break;
case TYPE_UINT8:
*param->i8ptr = node[optname].as<uint8_t>();
*param->u8ptr = node[optname].as<uint8_t>();
break;
case TYPE_INT16:
*param->i16ptr = node[optname].as<int16_t>();

View File

@@ -150,6 +150,15 @@ typedef enum ip_traffic_type_e {
TRAFFIC_PC5S_SESSION_INIT = 10
} ip_traffic_type_t;
typedef enum {
PDCCH_AGG_LEVEL1 = 0,
PDCCH_AGG_LEVEL2,
PDCCH_AGG_LEVEL4,
PDCCH_AGG_LEVEL8,
PDCCH_AGG_LEVEL16,
NUM_PDCCH_AGG_LEVELS
} Pdcch_Aggregation_Level_t;
typedef struct net_ip_address_s {
unsigned ipv4: 1;
unsigned ipv6: 1;
@@ -288,6 +297,12 @@ typedef struct protocol_ctxt_s {
#define CHECK_CTXT_ARGS(CTXT_Pp)
static inline int ceil_mod(const unsigned int v, const unsigned int mod)
{
return ((v + mod - 1) / mod) * mod;
}
#define exit_fun(msg) exit_function(__FILE__, __FUNCTION__, __LINE__, "exit_fun", OAI_EXIT_NORMAL)
#ifdef __cplusplus
extern "C" {

View File

@@ -21,3 +21,4 @@ if (ENABLE_TESTS)
endif()
add_subdirectory(barrier)
add_subdirectory(actor)
add_subdirectory(shm_iq_channel)

View File

@@ -1,10 +1,15 @@
add_library(log_headers INTERFACE)
target_include_directories(log_headers INTERFACE .)
target_link_libraries(log_headers INTERFACE T_headers)
set(log_sources log.c)
if (ENABLE_LTTNG)
set(log_sources ${log_sources} lttng-tp.c)
endif()
add_library(LOG ${log_sources})
target_include_directories(LOG PUBLIC .)
target_link_libraries(LOG PRIVATE ${T_LIB})
target_link_libraries(LOG PRIVATE CONFIG_LIB)
target_link_libraries(LOG PUBLIC log_headers)
if (ENABLE_LTTNG)
target_link_libraries(LOG PUBLIC lttng-ust)
endif()

View File

@@ -19,8 +19,11 @@ The following options can be specified to trigger the information added in the h
- `thread_id`: add the thread ID
- `function`: add the function name
- `line_num`: adds the (source code) line number
- `time`: add the time since process started
- `wall_clock`: add the system-wide clock time that measures real (i.e., wall-clock) time (`time` and `wall_clock` are mutually exclusive)
- `time`: add the time since the system started in format `ss.ssssss` (seconds and microseconds sourced from `CLOCK_MONOTONIC`)
- `wall_clock`: add the system-wide clock time that measures real (i.e., wall-clock) time in format `ss.ssssss` (seconds and microseconds since 1970-01-01 00:00:00 Coordinated Universal Time (UTC))
- `utc_time`: add the UTC (Coordinated Universal Time) time in format `YYYY-MM-DD hh:mm:ss.ssssss UTC`. Note that this time is independent of the current time zone (it shows GMT). Also, printing this time has additional overhead compared to other time methods (due to time conversion and formatting).
Note: `time`, `utc_time` and `wall_clock` are mutually exclusive and cannot be used together.
### Component specific parameters
| name | type | default | description |
@@ -228,6 +231,10 @@ It can also be retrieved when using the telnet server, as explained [below](###
| `<flag>_debug` | `boolean` | 0 = false | Triggers the activation of conditional code identified by the specified flag.
| `<flag>_dump` | `boolean` | 0 = false| Triggers buffer dump, on the console in text form or in a file in matlab format, depending on the developper choice and forcasted usage|
Example: dump all ASN.1 structures during operation with
`--log_config.ASN1_debug`. To get a list of all flag/dump options, provide an
invalid flag, e.g. `--log_config.HELP_debug`.
### Using the configuration file to configure the logging facility
The following example sets all components log level to info, exept for hw,phy,mac,rlc,pdcp,rrc which log levels are set to error or warning.
```bash

View File

@@ -52,6 +52,13 @@
// main log variables
/** @defgroup _max_length Maximum Length of LOG
* @ingroup _macro
* @brief the macros that describe the maximum length of LOG
* @{*/
#define MAX_LOG_TOTAL 16384 /*!< \brief the maximum length of a log */
// Fixme: a better place to be shure it is called
void read_cpu_hardware (void) __attribute__ ((constructor));
#if !defined(__arm__) && !defined(__aarch64__)
@@ -103,7 +110,8 @@ static const unsigned int FLAG_FILE_LINE = 1 << 4;
static const unsigned int FLAG_TIME = 1 << 5;
static const unsigned int FLAG_THREAD_ID = 1 << 6;
static const unsigned int FLAG_REAL_TIME = 1 << 7;
static const unsigned int FLAG_INITIALIZED = 1 << 8;
static const unsigned int FLAG_UTC_TIME = 1 << 8;
static const unsigned int FLAG_INITIALIZED = 1 << 9;
/** @}*/
static mapping log_options[] = {{"nocolor", FLAG_NOCOLOR},
@@ -114,34 +122,13 @@ static mapping log_options[] = {{"nocolor", FLAG_NOCOLOR},
{"time", FLAG_TIME},
{"thread_id", FLAG_THREAD_ID},
{"wall_clock", FLAG_REAL_TIME},
{"utc_time", FLAG_UTC_TIME},
{NULL, -1}};
mapping * log_option_names_ptr(void)
{
return log_options;
}
static mapping log_maskmap[] = {{"PRACH", DEBUG_PRACH},
{"RU", DEBUG_RU},
{"UE_PHYPROC", DEBUG_UE_PHYPROC},
{"LTEESTIM", DEBUG_LTEESTIM},
{"DLCELLSPEC", DEBUG_DLCELLSPEC},
{"ULSCH", DEBUG_ULSCH},
{"RRC", DEBUG_RRC},
{"PDCP", DEBUG_PDCP},
{"DFT", DEBUG_DFT},
{"ASN1", DEBUG_ASN1},
{"CTRLSOCKET", DEBUG_CTRLSOCKET},
{"SECURITY", DEBUG_SECURITY},
{"NAS", DEBUG_NAS},
{"RLC", DEBUG_RLC},
{"DLSCH_DECOD", DEBUG_DLSCH_DECOD},
{"UE_TIMING", UE_TIMING},
{NULL, -1}};
mapping * log_maskmap_ptr(void)
{
return log_maskmap;
}
/* .log_format = 0x13 uncolored standard messages
* .log_format = 0x93 colored standard messages */
/* keep white space in first position; switching it to 0 allows colors to be disabled*/
@@ -327,6 +314,9 @@ int write_file_matlab(const char *fname, const char *vname, void *data, int leng
return 0;
}
#define FLAG_SETDEBUG(flag) g_log->debug_mask.DEBUG_##flag = *logparams_debug[i++].uptr;
#define FLAG_SETDUMP(flag) g_log->dump_mask.DEBUG_##flag = *logparams_dump[i++].uptr;
/* get log parameters from configuration file */
void log_getconfig(log_t *g_log)
{
@@ -335,8 +325,6 @@ void log_getconfig(log_t *g_log)
paramdef_t logparams_defaults[] = LOG_GLOBALPARAMS_DESC;
paramdef_t logparams_level[MAX_LOG_PREDEF_COMPONENTS];
paramdef_t logparams_logfile[MAX_LOG_PREDEF_COMPONENTS];
paramdef_t logparams_debug[sizeofArray(log_maskmap)];
paramdef_t logparams_dump[sizeofArray(log_maskmap)];
int ret = config_get(config_get_if(), logparams_defaults, sizeofArray(logparams_defaults), CONFIG_STRING_LOG_PREFIX);
if (ret <0) {
@@ -404,37 +392,45 @@ void log_getconfig(log_t *g_log)
}
/* build then read the debug and dump parameter array */
for (int i=0; log_maskmap[i].name != NULL ; i++) {
sprintf(logparams_debug[i].optname, LOG_CONFIG_DEBUG_FORMAT, log_maskmap[i].name);
sprintf(logparams_dump[i].optname, LOG_CONFIG_DUMP_FORMAT, log_maskmap[i].name);
logparams_debug[i].defuintval = 0;
logparams_debug[i].type = TYPE_UINT;
logparams_debug[i].paramflags = PARAMFLAG_BOOL;
logparams_debug[i].uptr = NULL;
logparams_debug[i].chkPptr = NULL;
logparams_debug[i].numelt = 0;
logparams_dump[i].defuintval = 0;
logparams_dump[i].type = TYPE_UINT;
logparams_dump[i].paramflags = PARAMFLAG_BOOL;
logparams_dump[i].uptr = NULL;
logparams_dump[i].chkPptr = NULL;
logparams_dump[i].numelt = 0;
int sz = 0;
for (const char *const *ptr = flag_name; strlen(*ptr) > 1; ptr++)
sz++;
paramdef_t logparams_debug[sz];
paramdef_t logparams_dump[sz];
for (int i = 0; i < sz; i++) {
logparams_debug[i] = (paramdef_t){
.type = TYPE_UINT,
.paramflags = PARAMFLAG_BOOL,
};
sprintf(logparams_debug[i].optname, LOG_CONFIG_DEBUG_FORMAT, flag_name[i]);
logparams_dump[i] = (paramdef_t){.type = TYPE_UINT, .paramflags = PARAMFLAG_BOOL};
sprintf(logparams_dump[i].optname, LOG_CONFIG_DUMP_FORMAT, flag_name[i]);
}
config_get(config_get_if(), logparams_debug, sizeofArray(log_maskmap) - 1, CONFIG_STRING_LOG_PREFIX);
config_get(config_get_if(), logparams_dump, sizeofArray(log_maskmap) - 1, CONFIG_STRING_LOG_PREFIX);
config_get(config_get_if(), logparams_debug, sz, CONFIG_STRING_LOG_PREFIX);
config_get(config_get_if(), logparams_dump, sz, CONFIG_STRING_LOG_PREFIX);
if (config_check_unknown_cmdlineopt(config_get_if(), CONFIG_STRING_LOG_PREFIX) > 0)
bool old = CONFIG_ISFLAGSET(CONFIG_NOABORTONCHKF);
CONFIG_SETRTFLAG(CONFIG_NOABORTONCHKF);
if (config_check_unknown_cmdlineopt(config_get_if(), CONFIG_STRING_LOG_PREFIX) > 0) {
printf("Existing log_config options:\n");
printf(" Boolean options:\n");
for (int i = 0; i < sz; i++)
printf(" %s, \t%s\n", logparams_debug[i].optname, logparams_dump[i].optname);
printf(" Log level per module (");
for (int i = 0; log_level_names[i].name != NULL; i++)
printf("%s ", log_level_names[i].name);
printf(")\n");
for (int i = 0; i < MAX_LOG_PREDEF_COMPONENTS; i++)
printf(" %s\n", logparams_level[i].optname);
exit(1);
/* set the debug mask according to the debug parameters values */
for (int i=0; log_maskmap[i].name != NULL ; i++) {
if (*(logparams_debug[i].uptr) )
g_log->debug_mask = g_log->debug_mask | log_maskmap[i].value;
if (*(logparams_dump[i].uptr) )
g_log->dump_mask = g_log->dump_mask | log_maskmap[i].value;
}
if (!old)
CONFIG_CLEARRTFLAG(CONFIG_NOABORTONCHKF);
int i = 0;
FOREACH_FLAG(FLAG_SETDEBUG);
i = 0;
FOREACH_FLAG(FLAG_SETDUMP);
/* log globally enabled/disabled */
set_glog_onlinelog(consolelog);
@@ -513,8 +509,8 @@ int logInit (void)
memset(&(g_log->log_component[i]),0,sizeof(log_component_t));
}
AssertFatal(!((g_log->flag & FLAG_TIME) && (g_log->flag & FLAG_REAL_TIME)),
"Invalid log options: time and wall_clock both set but are mutually exclusive\n");
AssertFatal(__builtin_popcount(g_log->flag & (FLAG_TIME | FLAG_REAL_TIME | FLAG_UTC_TIME)) <= 1,
"Invalid log options: time, wall_clock and utc_time are mutually exclusive\n");
g_log->flag = g_log->flag | FLAG_INITIALIZED;
return 0;
@@ -558,15 +554,24 @@ static inline int log_header(log_component_t *c,
l[0] = 0;
// output time information
char timeString[32];
if ((flag & FLAG_TIME) || (flag & FLAG_REAL_TIME)) {
char timeString[64];
if ((flag & FLAG_TIME) || (flag & FLAG_REAL_TIME) || (flag & FLAG_UTC_TIME)) {
struct timespec t;
const clockid_t clock = flag & FLAG_TIME ? CLOCK_MONOTONIC : CLOCK_REALTIME;
if (clock_gettime(clock, &t) == -1)
abort();
if (flag & FLAG_UTC_TIME) {
struct tm utc_time;
if (gmtime_r(&t.tv_sec, &utc_time) == NULL)
abort();
snprintf(timeString, sizeof(timeString), "%lu.%06lu ",
t.tv_sec,
t.tv_nsec / 1000);
snprintf(timeString, sizeof(timeString), "%04d-%02d-%02d %02d:%02d:%02d.%06lu UTC ",
utc_time.tm_year + 1900, utc_time.tm_mon + 1, utc_time.tm_mday,
utc_time.tm_hour, utc_time.tm_min, utc_time.tm_sec, t.tv_nsec / 1000);
} else {
snprintf(timeString, sizeof(timeString), "%lu.%06lu ",
t.tv_sec,
t.tv_nsec / 1000);
}
} else {
timeString[0] = 0;
}
@@ -879,31 +884,32 @@ static void log_output_memory(log_component_t *c, const char *file, const char *
* correctly. It was not a big problem because in practice MAX_LOG_TOTAL is
* big enough so that the buffer is never full.
*/
char log_buffer[MAX_LOG_TOTAL];
static_assert(4 * MAX_LOG_TOTAL <= 65536, "log buffer limited to 64kB, please reduce MAX_LOG_TOTAL\n");
char log_buffer[4 * MAX_LOG_TOTAL];
// make sure that for log trace the extra info is only printed once, reset when the level changes
if (level < OAILOG_TRACE) {
int n = log_header(c, log_buffer+len, MAX_LOG_TOTAL, file, func, line, level);
int n = log_header(c, log_buffer+len, sizeof(log_buffer), file, func, line, level);
if (n > 0) {
len += n;
if (len > MAX_LOG_TOTAL) {
len = MAX_LOG_TOTAL;
if (len > sizeof(log_buffer)) {
len = sizeof(log_buffer);
}
}
}
int n = vsnprintf(log_buffer+len, MAX_LOG_TOTAL-len, format, args);
int n = vsnprintf(log_buffer+len, sizeof(log_buffer)-len, format, args);
if (n > 0) {
len += n;
if (len > MAX_LOG_TOTAL) {
len = MAX_LOG_TOTAL;
if (len > sizeof(log_buffer)) {
len = sizeof(log_buffer);
}
}
if (!((g_log->flag) & FLAG_NOCOLOR)) {
int n = snprintf(log_buffer+len, MAX_LOG_TOTAL-len, "%s", log_level_highlight_end[level]);
int n = snprintf(log_buffer+len, sizeof(log_buffer)-len, "%s", log_level_highlight_end[level]);
if (n > 0) {
len += n;
if (len > MAX_LOG_TOTAL) {
len = MAX_LOG_TOTAL;
if (len > sizeof(log_buffer)) {
len = sizeof(log_buffer);
}
}
}
@@ -943,7 +949,7 @@ static void log_output_memory(log_component_t *c, const char *file, const char *
}
}
}else{
AssertFatal(len >= 0 && len <= MAX_LOG_TOTAL, "Bad len %d\n", len);
AssertFatal(len >= 0 && len <= sizeof(log_buffer), "Bad len %d\n", len);
if (write(fileno(c->stream), log_buffer, len)) {};
}
}

View File

@@ -65,12 +65,6 @@
extern "C" {
#endif
/** @defgroup _max_length Maximum Length of LOG
* @ingroup _macro
* @brief the macros that describe the maximum length of LOG
* @{*/
#define MAX_LOG_TOTAL 16384 /*!< \brief the maximum length of a log */
/** @}*/
/** @defgroup _log_level Message levels defined by LOG
@@ -88,7 +82,7 @@ extern "C" {
#define NUM_LOG_LEVEL 6 /*!< \brief the number of message levels users have with LOG (OAILOG_DISABLE is not available to user as a level, so it is not included)*/
/** @}*/
#define SET_LOG_OPTION(O) g_log->flag = (g_log->flag | O)
#define SET_LOG_OPTION(O) g_log->flag = (g_log->flag | O)
#define CLEAR_LOG_OPTION(O) g_log->flag = (g_log->flag & (~O))
/** @defgroup macros to identify a debug entity
@@ -99,28 +93,37 @@ extern "C" {
* server.
* @brief
* @{*/
#define DEBUG_PRACH (1<<0)
#define DEBUG_RU (1<<1)
#define DEBUG_UE_PHYPROC (1<<2)
#define DEBUG_LTEESTIM (1<<3)
#define DEBUG_DLCELLSPEC (1<<4)
#define DEBUG_ULSCH (1<<5)
#define DEBUG_RRC (1<<6)
#define DEBUG_PDCP (1<<7)
#define DEBUG_DFT (1<<8)
#define DEBUG_ASN1 (1<<9)
#define DEBUG_CTRLSOCKET (1<<10)
#define DEBUG_SECURITY (1<<11)
#define DEBUG_NAS (1<<12)
#define DEBUG_RLC (1<<13)
#define DEBUG_DLSCH_DECOD (1<<14)
#define UE_TIMING (1<<20)
#define SET_LOG_DEBUG(B) g_log->debug_mask = (g_log->debug_mask | B)
#define CLEAR_LOG_DEBUG(B) g_log->debug_mask = (g_log->debug_mask & (~B))
#define FOREACH_FLAG(FLAG_DEF) \
FLAG_DEF(PRACH) \
FLAG_DEF(UE_PHYPROC) \
FLAG_DEF(LTEESTIM) \
FLAG_DEF(DLCELLSPEC) \
FLAG_DEF(ULSCH) \
FLAG_DEF(RRC) \
FLAG_DEF(PDCP) \
FLAG_DEF(DFT) \
FLAG_DEF(ASN1) \
FLAG_DEF(CTRLSOCKET) \
FLAG_DEF(SECURITY) \
FLAG_DEF(NAS) \
FLAG_DEF(DLSCH_DECOD) \
FLAG_DEF(UE_TIMING) \
FLAG_DEF(F1AP)
#define SET_LOG_DUMP(B) g_log->dump_mask = (g_log->dump_mask | B)
#define CLEAR_LOG_DUMP(B) g_log->dump_mask = (g_log->dump_mask & (~B))
#define FLAG_BITF(flag) uint64_t DEBUG_##flag: 1;
typedef struct {
FOREACH_FLAG(FLAG_BITF)
} debug_flags_t;
#define FLAG_TEXT(flag) #flag,
static const char *const flag_name[] = {FOREACH_FLAG(FLAG_TEXT) ""};
#define SET_LOG_DEBUG(B) g_log->debug_mask.B = true
#define CLEAR_LOG_DEBUG(B) g_log->debug_mask.B = false
#define SET_LOG_DUMP(B) g_log->dump_mask.B = true
#define CLEAR_LOG_DUMP(B) g_log->dump_mask.B = false
#define FOREACH_COMP(COMP_DEF) \
COMP_DEF(PHY, log) \
@@ -215,8 +218,8 @@ typedef struct {
char level2string[NUM_LOG_LEVEL];
int flag;
char *filelog_name;
uint64_t debug_mask;
uint64_t dump_mask;
debug_flags_t debug_mask;
debug_flags_t dump_mask;
} log_t;
#ifdef LOG_MAIN
@@ -230,7 +233,28 @@ extern "C" {
}
#endif
#endif
#define FLAG_DEBUG_SET(flag) \
if (strcmp(name, #flag) == 0) { \
g_log->debug_mask.DEBUG_##flag = val; \
return true; \
};
static inline bool set_log_debug(char *name, bool val)
{
FOREACH_FLAG(FLAG_DEBUG_SET);
printf("Error: setting log debug of %s option, not existing\n", name);
return false;
}
#define FLAG_DUMP_SET(flag) \
if (strcmp(name, #flag) == 0) { \
g_log->dump_mask.DEBUG_##flag = val; \
return true; \
};
static inline bool set_log_dump(char *name, bool val)
{
FOREACH_FLAG(FLAG_DUMP_SET);
printf("Error: setting log dump of %s option, not existing\n", name);
return false;
}
/*----------------------------------------------------------------------------*/
int logInit (void);
void logTerm (void);
@@ -418,15 +442,15 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int
/* macro used to dump a buffer or a message as in openair2/RRC/LTE/RRC_eNB.c, replaces LOG_F macro */
#define LOG_DUMPMSG(c, f, b, s, x...) \
do { \
if (g_log->dump_mask & f) \
if (g_log->dump_mask.f) \
log_dump(c, b, s, LOG_DUMP_CHAR, x); \
} while (0)
/* bitmask dependent macros, to isolate debugging code */
#define LOG_DEBUGFLAG(D) (g_log->debug_mask & D)
#define LOG_DEBUGFLAG(D) (g_log->debug_mask.D)
/* bitmask dependent macros, to generate debug file such as matlab file or message dump */
#define LOG_DUMPFLAG(D) (g_log->dump_mask & D)
#define LOG_DUMPFLAG(D) (g_log->dump_mask.D)
#define LOG_M(file, vector, data, len, dec, format) \
do { \
@@ -529,11 +553,11 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int
} while (0)
#define nfapi_log(FILE, FNC, LN, COMP, LVL, FMT...)
#define LOG_DEBUGFLAG(D) (g_log->debug_mask & D)
#define LOG_DUMPFLAG(D) (g_log->dump_mask & D)
#define LOG_DEBUGFLAG(D) (g_log->debug_mask.D)
#define LOG_DUMPFLAG(D) (g_log->dump_mask.D)
#define LOG_DUMPMSG(c, f, b, s, x...) \
do { \
if (g_log->dump_mask & f) \
if (g_log->dump_mask.f) \
log_dump(c, b, s, LOG_DUMP_CHAR, x); \
} while (0) /* */

View File

@@ -49,7 +49,7 @@ add_custom_target(generate_T DEPENDS T_IDs.h check_vcd)
# headers have really been created, we make this headers library explicitly
# depend on the generated headers.
add_library(T_headers INTERFACE)
add_dependencies(T_headers T_IDs.h T_messages.txt.h)
add_dependencies(T_headers T_IDs.h generate_T)
target_include_directories(T_headers INTERFACE ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
if(T_TRACER)

View File

@@ -31,7 +31,7 @@ CMake Error at /usr/share/cmake-3.16/Modules/FindPkgConfig.cmake:463 (message):
Run:
```shell
sudo apt-get install libxft-dev
sudo apt-get install libx11-dev libpng-dev libxft-dev
```
## Run the softmodem

View File

@@ -25,4 +25,4 @@ multi-rru-clean: ../utils.o ../database.o ../event.o ../configuration.o multi-rr
$(CC) $(CFLAGS) -c -o $@ $<
clean:
rm -f *.o core dump_nack_signal time_meas timeplot
rm -f *.o core dump_nack_signal time_meas timeplot multi-rru-clean

View File

@@ -1,6 +1,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include "utils.h"
#include "event.h"
#include "database.h"
@@ -14,7 +15,8 @@ void usage(void)
" -d <database file> this option is mandatory\n"
" -ip <host> connect to given IP address (default %s)\n"
" -p <port> connect to given port (default %d)\n"
" -e <event> event to trace (default VCD_FUNCTION_ENB_DLSCH_ULSCH_SCHEDULER)\n",
" -e <event> event to trace (default VCD_FUNCTION_ENB_DLSCH_ULSCH_SCHEDULER)\n"
" -s stat mode, print every second min/avg/max + count\n",
DEFAULT_REMOTE_IP,
DEFAULT_REMOTE_PORT
);
@@ -34,6 +36,21 @@ struct timespec time_sub(struct timespec a, struct timespec b)
return ret;
}
volatile uint64_t acc, count, acc_min, acc_max;
void *stat_thread(void *_)
{
while (1) {
uint64_t v = acc;
uint64_t c = count;
uint64_t min = acc_min;
uint64_t max = acc_max;
acc = acc_min = acc_max = count = 0;
printf("%ld %ld %ld [%ld]\n", min, c==0 ? 0 : v/c, max, c);
sleepms(1000);
}
}
int main(int n, char **v)
{
char *database_filename = NULL;
@@ -49,6 +66,7 @@ int main(int n, char **v)
int start_valid = 0;
struct timespec start_time, stop_time, delta_time;
char *name = "VCD_FUNCTION_ENB_DLSCH_ULSCH_SCHEDULER";
int stat_mode = 0;
for (i = 1; i < n; i++) {
if (!strcmp(v[i], "-h") || !strcmp(v[i], "--help")) usage();
@@ -58,9 +76,13 @@ int main(int n, char **v)
if (!strcmp(v[i], "-p"))
{ if (i > n-2) usage(); port = atoi(v[++i]); continue; }
if (!strcmp(v[i], "-e")) { if (i > n-2) usage(); name = v[++i]; continue; }
if (!strcmp(v[i], "-s")) { stat_mode = 1; continue; }
usage();
}
if (stat_mode)
new_thread(stat_thread, NULL);
if (database_filename == NULL) {
printf("ERROR: provide a database file (-d)\n");
exit(1);
@@ -96,7 +118,8 @@ int main(int n, char **v)
if (e.type != ev_fun)
{ printf("unhandled event %d\n", e.type); continue; }
on_off = e.e[0].i;
printf("yo %d\n", on_off);
if (!stat_mode)
printf("yo %d\n", on_off);
if (on_off == 1) {
start_time = e.sending_time;
start_valid = 1;
@@ -104,11 +127,20 @@ printf("yo %d\n", on_off);
}
if (on_off != 0) { printf("fatal!\n"); abort(); }
if (!start_valid) continue;
start_valid = 0;
stop_time = e.sending_time;
delta_time = time_sub(stop_time, start_time);
fprintf(stderr, "%ld\n",
delta_time.tv_sec * 1000000000UL + delta_time.tv_nsec);
fflush(stderr);
if (stat_mode) {
uint64_t v = delta_time.tv_sec * 1000000000UL + delta_time.tv_nsec;
if (count == 0 || v < acc_min) acc_min = v;
if (v > acc_max) acc_max = v;
acc += v;
count++;
} else {
fprintf(stderr, "%ld\n",
delta_time.tv_sec * 1000000000UL + delta_time.tv_nsec);
fflush(stderr);
}
}
return 0;

View File

@@ -1,6 +1,6 @@
add_library(actor actor.c)
target_include_directories(actor PUBLIC ./)
target_link_libraries(actor PUBLIC thread-pool)
# Only include header files due to issues with ODR in threadPool binaries
target_include_directories(actor PUBLIC ./ ../threadPool/)
if (ENABLE_TESTS)
add_subdirectory(tests)
endif()

View File

@@ -72,3 +72,17 @@ byte_array_t cp_str_to_ba(const char* str)
return dst;
}
char* cp_ba_to_str(const byte_array_t ba)
{
assert(ba.len > 0);
const size_t sz = ba.len;
char* str = calloc(sz+1, sizeof(char));
assert(str != NULL && "Memory exhausted");
memcpy(str, ba.buf, sz);
str[sz] = '\0';
return str;
}

View File

@@ -42,5 +42,6 @@ void free_byte_array(byte_array_t ba);
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);
#endif

View File

@@ -109,8 +109,6 @@ static const unsigned short srs_bandwidth_config[C_SRS_NUMBER][B_SRS_NUMBER][2]
/* 63 */ {{272, 1}, {16, 17}, {8, 2}, {4, 2}},
};
const char *duplex_mode[]={"FDD","TDD"};
static const uint8_t bit_reverse_table_256[] = {
0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0, 0x10, 0x90, 0x50, 0xD0, 0x30, 0xB0, 0x70, 0xF0, 0x08, 0x88, 0x48, 0xC8,
0x28, 0xA8, 0x68, 0xE8, 0x18, 0x98, 0x58, 0xD8, 0x38, 0xB8, 0x78, 0xF8, 0x04, 0x84, 0x44, 0xC4, 0x24, 0xA4, 0x64, 0xE4,
@@ -126,6 +124,36 @@ static const uint8_t bit_reverse_table_256[] = {
0x3B, 0xBB, 0x7B, 0xFB, 0x07, 0x87, 0x47, 0xC7, 0x27, 0xA7, 0x67, 0xE7, 0x17, 0x97, 0x57, 0xD7, 0x37, 0xB7, 0x77, 0xF7,
0x0F, 0x8F, 0x4F, 0xCF, 0x2F, 0xAF, 0x6F, 0xEF, 0x1F, 0x9F, 0x5F, 0xDF, 0x3F, 0xBF, 0x7F, 0xFF};
simde__m128i byte2bit16_lut[256];
void init_byte2bit16(void)
{
for (int s = 0; s < 256; s++) {
byte2bit16_lut[s] = simde_mm_insert_epi16(byte2bit16_lut[s], s & 1, 0);
byte2bit16_lut[s] = simde_mm_insert_epi16(byte2bit16_lut[s], (s >> 1) & 1, 1);
byte2bit16_lut[s] = simde_mm_insert_epi16(byte2bit16_lut[s], (s >> 2) & 1, 2);
byte2bit16_lut[s] = simde_mm_insert_epi16(byte2bit16_lut[s], (s >> 3) & 1, 3);
byte2bit16_lut[s] = simde_mm_insert_epi16(byte2bit16_lut[s], (s >> 4) & 1, 4);
byte2bit16_lut[s] = simde_mm_insert_epi16(byte2bit16_lut[s], (s >> 5) & 1, 5);
byte2bit16_lut[s] = simde_mm_insert_epi16(byte2bit16_lut[s], (s >> 6) & 1, 6);
byte2bit16_lut[s] = simde_mm_insert_epi16(byte2bit16_lut[s], (s >> 7) & 1, 7);
}
}
simde__m128i byte2m128i[256];
void init_byte2m128i(void) {
for (int s=0;s<256;s++) {
byte2m128i[s] = simde_mm_insert_epi16(byte2m128i[s],(1-2*(s&1)),0);
byte2m128i[s] = simde_mm_insert_epi16(byte2m128i[s],(1-2*((s>>1)&1)),1);
byte2m128i[s] = simde_mm_insert_epi16(byte2m128i[s],(1-2*((s>>2)&1)),2);
byte2m128i[s] = simde_mm_insert_epi16(byte2m128i[s],(1-2*((s>>3)&1)),3);
byte2m128i[s] = simde_mm_insert_epi16(byte2m128i[s],(1-2*((s>>4)&1)),4);
byte2m128i[s] = simde_mm_insert_epi16(byte2m128i[s],(1-2*((s>>5)&1)),5);
byte2m128i[s] = simde_mm_insert_epi16(byte2m128i[s],(1-2*((s>>6)&1)),6);
byte2m128i[s] = simde_mm_insert_epi16(byte2m128i[s],(1-2*((s>>7)&1)),7);
}
}
void reverse_bits_u8(uint8_t const* in, size_t sz, uint8_t* out)
{
DevAssert(in != NULL);
@@ -160,18 +188,20 @@ uint64_t reverse_bits(uint64_t in, int n_bits)
return rev_bits;
}
static const int tables_5_3_2[5][12] = {
{25, 52, 79, 106, 133, 160, 216, 270, -1, -1, -1, -1}, // 15 FR1
{11, 24, 38, 51, 65, 78, 106, 133, 162, 217, 245, 273}, // 30 FR1
{-1, 11, 18, 24, 31, 38, 51, 65, 79, 107, 121, 135}, // 60 FR1
{66, 132, 264, -1, -1, -1, -1, -1, -1, -1, -1, -1}, // 60 FR2
{32, 66, 132, 264, -1, -1, -1, -1, -1, -1, -1, -1} // 120FR2
#define NUM_BW_ENTRIES 15
static const int tables_5_3_2[5][NUM_BW_ENTRIES] = {
{25, 52, 79, 106, 133, 160, 188, 216, 242, 270, -1, -1, -1, -1, -1}, // 15 FR1
{11, 24, 38, 51, 65, 78, 92, 106, 119, 133, 162, 189, 217, 245, 273}, // 30 FR1
{-1, 11, 18, 24, 31, 38, 44, 51, 58, 65, 79, 93, 107, 121, 135}, // 60 FR1
{66, 132, 264, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, // 60 FR2
{32, 66, 132, 264, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1} // 120FR2
};
int get_supported_band_index(int scs, frequency_range_t freq_range, int n_rbs)
{
int scs_index = scs + freq_range;
for (int i = 0; i < 12; i++) {
for (int i = 0; i < NUM_BW_ENTRIES; i++) {
if(n_rbs == tables_5_3_2[scs_index][i])
return i;
}
@@ -181,7 +211,7 @@ int get_supported_band_index(int scs, frequency_range_t freq_range, int n_rbs)
int get_smallest_supported_bandwidth_index(int scs, frequency_range_t frequency_range, int n_rbs)
{
int scs_index = scs + frequency_range;
for (int i = 0; i < 12; i++) {
for (int i = 0; i < NUM_BW_ENTRIES; i++) {
if (n_rbs <= tables_5_3_2[scs_index][i])
return i;
}
@@ -394,10 +424,8 @@ void check_ssb_raster(uint64_t freq, int band, int scs)
int get_supported_bw_mhz(frequency_range_t frequency_range, int bw_index)
{
if (frequency_range == FR1) {
int bandwidth_index_to_mhz[] = {5, 10, 15, 20, 25, 30, 40, 50, 60, 80, 90, 100};
AssertFatal(bw_index >= 0 && bw_index <= sizeofArray(bandwidth_index_to_mhz),
"Bandwidth index %d is invalid\n",
bw_index);
int bandwidth_index_to_mhz[] = {5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 60, 70, 80, 90, 100};
AssertFatal(bw_index >= 0 && bw_index <= sizeofArray(bandwidth_index_to_mhz), "Bandwidth index %d is invalid\n", bw_index);
return bandwidth_index_to_mhz[bw_index];
} else {
int bandwidth_index_to_mhz[] = {50, 100, 200, 400};
@@ -523,6 +551,18 @@ void get_coreset_rballoc(uint8_t *FreqDomainResource,int *n_rb,int *rb_offset) {
*n_rb = 6*count;
}
// According to 38.211 7.3.2.2
int get_coreset_num_cces(uint8_t *FreqDomainResource, int duration)
{
int num_rbs;
int rb_offset;
get_coreset_rballoc(FreqDomainResource, &num_rbs, &rb_offset);
int total_resource_element_groups = num_rbs * duration;
int reg_per_cce = 6;
int total_cces = total_resource_element_groups / reg_per_cce;
return total_cces;
}
int get_nb_periods_per_frame(uint8_t tdd_period)
{
@@ -676,19 +716,22 @@ uint64_t from_nrarfcn(int nr_bandP, uint8_t scs_index, uint32_t nrarfcn)
return frequency;
}
int get_first_ul_slot(int nrofDownlinkSlots, int nrofDownlinkSymbols, int nrofUplinkSymbols)
/**
* @brief Get the slot index within the period
*/
int get_slot_idx_in_period(const int slot, const frame_structure_t *fs)
{
return (nrofDownlinkSlots + (nrofDownlinkSymbols != 0 && nrofUplinkSymbols == 0));
return slot % fs->numb_slots_period;
}
int get_dmrs_port(int nl, uint16_t dmrs_ports)
{
if (dmrs_ports == 0) return 0; // dci 1_0
if (dmrs_ports == 0)
return 0; // dci 1_0
int p = -1;
int found = -1;
for (int i=0; i<12; i++) { // loop over dmrs ports
if((dmrs_ports>>i)&0x01) { // check if current bit is 1
for (int i = 0; i < 12; i++) { // loop over dmrs ports
if((dmrs_ports >> i) & 0x01) { // check if current bit is 1
found++;
if (found == nl) { // found antenna port number corresponding to current layer
p = i;
@@ -696,7 +739,7 @@ int get_dmrs_port(int nl, uint16_t dmrs_ports)
}
}
}
AssertFatal(p>-1,"No dmrs port corresponding to layer %d found\n",nl);
AssertFatal(p > -1, "No dmrs port corresponding to layer %d found\n", nl);
return p;
}
@@ -704,7 +747,7 @@ frame_type_t get_frame_type(uint16_t current_band, uint8_t scs_index)
{
int32_t delta_duplex = get_delta_duplex(current_band, scs_index);
frame_type_t current_type = delta_duplex == 0 ? TDD : FDD;
LOG_D(NR_MAC, "NR band %d, duplex mode %s, duplex spacing = %d KHz\n", current_band, duplex_mode[current_type], delta_duplex);
LOG_D(NR_MAC, "NR band %d, duplex mode %s, duplex spacing = %d KHz\n", current_band, duplex_mode_txt[current_type], delta_duplex);
return current_type;
}
@@ -795,6 +838,18 @@ void get_samplerate_and_bw(int mu,
*rx_bw = 50e6;
}
break;
case 242: // 45Mhz
case 188: // 35Mhz
if (threequarter_fs) {
*sample_rate = 46.08e6;
*samples_per_frame = 460800;
} else {
*sample_rate = 61.44e6;
*samples_per_frame = 614400;
}
*tx_bw = (n_rb == 242) ? 45e6 : 35e6;
*rx_bw = (n_rb == 242) ? 45e6 : 35e6;
break;
case 216:
if (threequarter_fs) {
*sample_rate=46.08e6;
@@ -895,6 +950,17 @@ void get_samplerate_and_bw(int mu,
*rx_bw = 80e6;
}
break;
case 189:
if (threequarter_fs) {
*sample_rate = 92.16e6;
*samples_per_frame = 921600;
} else {
*sample_rate = 122.88e6;
*samples_per_frame = 1228800;
}
*tx_bw = 70e6;
*rx_bw = 70e6;
break;
case 162 :
if (threequarter_fs) {
AssertFatal(1==0,"N_RB %d cannot use 3/4 sampling\n",n_rb);
@@ -920,6 +986,20 @@ void get_samplerate_and_bw(int mu,
}
break;
case 119: // 45Mhz
case 92: // 35Mhz
if (threequarter_fs) {
*sample_rate = 46.08e6;
*samples_per_frame = 460800;
} else {
*sample_rate = 61.44e6;
*samples_per_frame = 614400;
}
*tx_bw = (n_rb == 119) ? 45e6 : 35e6;
*rx_bw = (n_rb == 119) ? 45e6 : 35e6;
break;
case 106:
if (threequarter_fs) {
*sample_rate=46.08e6;
@@ -1207,6 +1287,58 @@ int get_scan_ssb_first_sc(const double fc, const int nbRB, const int nrBand, con
return numGscn;
}
// Table 38.211 6.3.3.1-1
static uint8_t long_prach_dur[4] = {1, 3, 4, 1}; // 0.9, 2.28, 3.35, 0.9 ms
uint8_t get_long_prach_dur(unsigned int format, unsigned int mu)
{
AssertFatal(format < 4, "Invalid long PRACH format %d\n", format);
const int num_slots_subframe = (1 << mu);
const int prach_dur_subframes = long_prach_dur[format];
return (prach_dur_subframes * num_slots_subframe);
}
// Table 38.211 6.3.3.2-1
uint8_t get_PRACH_k_bar(unsigned int delta_f_RA_PRACH, unsigned int delta_f_PUSCH)
{
uint8_t k_bar = 0;
if (delta_f_RA_PRACH > 3) { // Rel 15 max PRACH SCS is 120 kHz, 4 and 5 are 1.25 and 5 kHz
// long formats
DevAssert(delta_f_PUSCH < 3);
DevAssert(delta_f_RA_PRACH < 6);
const uint8_t k_bar_table[3][2] = {{7, 12},
{1, 10},
{133, 7}};
k_bar = k_bar_table[delta_f_PUSCH][delta_f_RA_PRACH - 4];
} else {
if (delta_f_RA_PRACH == 3 && delta_f_PUSCH == 4) // \delta f_RA == 120 kHz AND \delta f == 480 kHz
k_bar = 1;
else if (delta_f_RA_PRACH == 3 && delta_f_PUSCH == 5) // \delta f_RA == 120 kHz AND \delta f == 960 kHz
k_bar = 23;
else
k_bar = 2;
}
return k_bar;
}
// K according to 38.211 5.3.2
unsigned int get_prach_K(int prach_sequence_length, int prach_fmt_id, int pusch_mu, int prach_mu)
{
unsigned int K = 1;
if (prach_sequence_length == 0) {
if (prach_fmt_id == 3)
K = (15 << pusch_mu) / 5;
else
K = (15 << pusch_mu) / 1.25;
} else if (prach_sequence_length == 1) {
K = (15 << pusch_mu) / (15 << prach_mu);
} else {
AssertFatal(0, "Invalid PRACH sequence length %d\n", prach_sequence_length);
}
return K;
}
int get_delay_idx(int delay, int max_delay_comp)
{
int delay_idx = max_delay_comp + delay;
@@ -1248,15 +1380,22 @@ int set_default_nta_offset(frequency_range_t freq_range, uint32_t samples_per_su
void nr_timer_start(NR_timer_t *timer)
{
timer->active = true;
timer->suspended = false;
timer->counter = 0;
}
void nr_timer_stop(NR_timer_t *timer)
{
timer->active = false;
timer->suspended = false;
timer->counter = 0;
}
void nr_timer_suspension(NR_timer_t *timer)
{
timer->suspended = !timer->suspended;
}
bool nr_timer_is_active(const NR_timer_t *timer)
{
return timer->active;
@@ -1267,7 +1406,7 @@ bool nr_timer_tick(NR_timer_t *timer)
bool expired = false;
if (timer->active) {
timer->counter += timer->step;
if (timer->target == UINT_MAX) // infinite target, never expires
if (timer->target == UINT_MAX || timer->suspended) // infinite target, never expires
return false;
expired = nr_timer_expired(timer);
if (expired)
@@ -1278,7 +1417,7 @@ bool nr_timer_tick(NR_timer_t *timer)
bool nr_timer_expired(const NR_timer_t *timer)
{
if (timer->target == UINT_MAX) // infinite target, never expires
if (timer->target == UINT_MAX || timer->suspended) // infinite target, never expires
return false;
return timer->counter >= timer->target;
}
@@ -1302,3 +1441,32 @@ unsigned short get_m_srs(int c_srs, int b_srs) {
unsigned short get_N_b_srs(int c_srs, int b_srs) {
return srs_bandwidth_config[c_srs][b_srs][1];
}
frequency_range_t get_freq_range_from_freq(uint64_t freq)
{
// 3GPP TS 38.101-1 Version 19.0.0 Table 5.1-1: Definition of frequency ranges
if (freq >= 410000000 && freq <= 7125000000)
return FR1;
if (freq >= 24250000000 && freq <= 71000000000)
return FR2;
AssertFatal(false, "Undefined Frequency Range for frequency %ld Hz\n", freq);
}
frequency_range_t get_freq_range_from_arfcn(uint32_t arfcn)
{
// 3GPP TS 38.101-1 Version 19.0.0 Table 5.1-1: Definition of frequency ranges
if (arfcn >= 82000 && arfcn <= 875000)
return FR1;
if (arfcn >= 2016667 && arfcn <= 2795832)
return FR2;
AssertFatal(false, "Undefined Frequency Range for ARFCN %d\n", arfcn);
}
frequency_range_t get_freq_range_from_band(uint16_t band)
{
return band <= 256 ? FR1 : FR2;
}

View File

@@ -122,6 +122,29 @@ typedef enum frequency_range_e {
FR2
} frequency_range_t;
#define MAX_NUM_SLOTS_ALLOWED 80 // up to numerology 3 (120 KHz SCS) is supported
enum slot_type { TDD_NR_DOWNLINK_SLOT, TDD_NR_UPLINK_SLOT, TDD_NR_MIXED_SLOT };
typedef struct tdd_bitmap {
enum slot_type slot_type;
uint8_t num_dl_symbols;
uint8_t num_ul_symbols;
} tdd_bitmap_t;
typedef struct tdd_period_config_s {
tdd_bitmap_t tdd_slot_bitmap[MAX_NUM_SLOTS_ALLOWED];
uint8_t num_dl_slots;
uint8_t num_ul_slots;
} tdd_period_config_t;
typedef struct frame_structure_s {
tdd_period_config_t period_cfg;
int8_t numb_slots_frame;
int8_t numb_slots_period;
int8_t numb_period_frame;
frame_type_t frame_type;
} frame_structure_t;
typedef struct {
/// Time shift in number of samples estimated based on DMRS-PDSCH/PUSCH
int est_delay;
@@ -133,6 +156,7 @@ typedef struct {
typedef struct {
bool active;
bool suspended;
uint32_t counter;
uint32_t target;
uint32_t step;
@@ -148,6 +172,12 @@ void nr_timer_start(NR_timer_t *timer);
* @param timer Timer to stopped
*/
void nr_timer_stop(NR_timer_t *timer);
/**
* @brief To suspend/resume a timer
* @param timer Timer to be stopped/suspended
*/
void nr_timer_suspension(NR_timer_t *timer);
/**
* @brief If active, it increases timer counter by an amout of units equal to step. It stops timer if expired
* @param timer Timer to be handled
@@ -181,7 +211,15 @@ bool nr_timer_is_active(const NR_timer_t *timer);
uint32_t nr_timer_elapsed_time(const NR_timer_t *timer);
int set_default_nta_offset(frequency_range_t freq_range, uint32_t samples_per_subframe);
extern const nr_bandentry_t nr_bandtable[];
extern simde__m128i byte2bit16_lut[256];
void init_byte2bit16(void);
void init_byte2m128i(void);
static inline simde__m128i byte2bit16(uint8_t b)
{
return byte2bit16_lut[b];
}
static inline int get_num_dmrs(uint16_t dmrs_mask )
{
@@ -210,10 +248,10 @@ void reverse_bits_u8(uint8_t const* in, size_t sz, uint8_t* out);
uint64_t from_nrarfcn(int nr_bandP, uint8_t scs_index, uint32_t dl_nrarfcn);
uint32_t to_nrarfcn(int nr_bandP, uint64_t dl_CarrierFreq, uint8_t scs_index, uint32_t bw);
int get_first_ul_slot(int nrofDownlinkSlots, int nrofDownlinkSymbols, int nrofUplinkSymbols);
int cce_to_reg_interleaving(const int R, int k, int n_shift, const int C, int L, const int N_regs);
int get_SLIV(uint8_t S, uint8_t L);
void get_coreset_rballoc(uint8_t *FreqDomainResource,int *n_rb,int *rb_offset);
int get_coreset_num_cces(uint8_t *FreqDomainResource, int duration);
int get_nr_table_idx(int nr_bandP, uint8_t scs_index);
int32_t get_delta_duplex(int nr_bandP, uint8_t scs_index);
frame_type_t get_frame_type(uint16_t nr_bandP, uint8_t scs_index);
@@ -255,12 +293,20 @@ void check_ssb_raster(uint64_t freq, int band, int scs);
int get_smallest_supported_bandwidth_index(int scs, frequency_range_t frequency_range, int n_rbs);
unsigned short get_m_srs(int c_srs, int b_srs);
unsigned short get_N_b_srs(int c_srs, int b_srs);
uint8_t get_long_prach_dur(unsigned int format, unsigned int num_slots_subframe);
uint8_t get_PRACH_k_bar(unsigned int delta_f_RA_PRACH, unsigned int delta_f_PUSCH);
unsigned int get_prach_K(int prach_sequence_length, int prach_fmt_id, int pusch_mu, int prach_mu);
int get_slot_idx_in_period(const int slot, const frame_structure_t *fs);
frequency_range_t get_freq_range_from_freq(uint64_t freq);
frequency_range_t get_freq_range_from_arfcn(uint32_t arfcn);
frequency_range_t get_freq_range_from_band(uint16_t band);
#define CEILIDIV(a,b) ((a+b-1)/b)
#define ROUNDIDIV(a,b) (((a<<1)+b)/(b<<1))
// Align up to a multiple of 16
#define ALIGN_UP_16(a) ((a + 15) & ~15)
static const char *const duplex_mode_txt[] = {"FDD", "TDD"};
#ifdef __cplusplus
#ifdef min

View File

@@ -78,6 +78,10 @@
// Prints an error if ID not found in list.
#define RELEASE_IE_FROMLIST(SOURCE, TARGET, FIELD) \
do { \
if (!TARGET) { \
LOG_E(NR_MAC, "Target list not present, impossible to release element\n"); \
break; \
} \
for (int iI = 0; iI < SOURCE->list.count; iI++) { \
long eL = *SOURCE->list.array[iI]; \
int iJ; \

View File

@@ -0,0 +1,6 @@
add_library(shm_td_iq_channel shm_td_iq_channel.c)
target_include_directories(shm_td_iq_channel PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
if (ENABLE_TESTS)
add_subdirectory(tests)
endif()

View File

@@ -0,0 +1,286 @@
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include "shm_td_iq_channel.h"
#include <stdio.h>
#include <sys/mman.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <stdbool.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include "assertions.h"
#include "utils.h"
#include "common/utils/threadPool/pthread_utils.h"
#define CIRCULAR_BUFFER_SIZE (30720 * 14 * 20)
typedef struct {
int magic;
int num_antennas_tx;
int num_antennas_rx;
uint64_t timestamp;
bool is_connected;
pthread_mutex_t mutex;
pthread_cond_t cond;
} ShmTDIQChannelData;
typedef struct ShmTDIQChannel_s {
IQChannelType type;
ShmTDIQChannelData *data;
uint64_t last_timestamp;
char name[256];
sample_t *tx_iq_data;
sample_t *rx_iq_data;
} ShmTDIQChannel;
ShmTDIQChannel *shm_td_iq_channel_create(const char *name, int num_tx_ant, int num_rx_ant)
{
// Create shared memory segment
int fd = shm_open(name, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR);
AssertFatal(fd != -1, "shm_open failed: %s\n", strerror(errno));
size_t tx_buffer_size = CIRCULAR_BUFFER_SIZE * sizeof(sample_t) * num_tx_ant;
size_t rx_buffer_size = CIRCULAR_BUFFER_SIZE * sizeof(sample_t) * num_rx_ant;
size_t total_size = sizeof(ShmTDIQChannelData) + tx_buffer_size + rx_buffer_size;
// Set the size of the shared memory segment
int res = ftruncate(fd, total_size);
AssertFatal(res != -1, "ftruncate failed: %s\n", strerror(errno));
// Map shared memory segment to address space
ShmTDIQChannelData *shm_ptr = mmap(NULL, total_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
AssertFatal(shm_ptr != MAP_FAILED, "mmap failed: %s\n", strerror(errno));
// Initialize shared memory
memset(shm_ptr, 0, total_size);
shm_ptr->num_antennas_tx = num_tx_ant;
shm_ptr->num_antennas_rx = num_rx_ant;
shm_ptr->is_connected = false;
ShmTDIQChannel *channel = calloc_or_fail(1, sizeof(ShmTDIQChannel));
strncpy(channel->name, name, sizeof(channel->name) - 1);
channel->tx_iq_data = (sample_t *)(shm_ptr + 1);
channel->rx_iq_data = channel->tx_iq_data + tx_buffer_size / sizeof(sample_t);
channel->data = shm_ptr;
channel->type = IQ_CHANNEL_TYPE_SERVER;
channel->last_timestamp = 0;
pthread_mutexattr_t mutex_attr;
pthread_condattr_t cond_attr;
int ret = pthread_mutexattr_init(&mutex_attr);
AssertFatal(ret == 0, "pthread_mutexattr_init() failed: errno %d, %s\n", errno, strerror(errno));
ret = pthread_condattr_init(&cond_attr);
AssertFatal(ret == 0, "pthread_condattr_init() failed: errno %d, %s\n", errno, strerror(errno));
ret = pthread_mutexattr_setpshared(&mutex_attr, PTHREAD_PROCESS_SHARED);
AssertFatal(ret == 0, "pthread_mutexattr_setpshared() failed: errno %d, %s\n", errno, strerror(errno));
ret = pthread_condattr_setpshared(&cond_attr, PTHREAD_PROCESS_SHARED);
AssertFatal(ret == 0, "pthread_condattr_setpshared() failed: errno %d, %s\n", errno, strerror(errno));
ret = pthread_mutex_init(&shm_ptr->mutex, &mutex_attr);
AssertFatal(ret == 0, "pthread_mutex_init() failed: errno %d, %s\n", errno, strerror(errno));
ret = pthread_cond_init(&shm_ptr->cond, &cond_attr);
AssertFatal(ret == 0, "pthread_cond_init() failed: errno %d, %s\n", errno, strerror(errno));
shm_ptr->magic = SHM_MAGIC_NUMBER;
close(fd);
return channel;
}
ShmTDIQChannel *shm_td_iq_channel_connect(const char *name, int timeout_in_seconds)
{
// Create shared memory segment
int fd = -1;
while (timeout_in_seconds > 0 && fd == -1) {
fd = shm_open(name, O_RDWR, S_IRUSR | S_IWUSR);
timeout_in_seconds--;
printf("Waiting for server to create shared memory segment\n");
sleep(1);
}
AssertFatal(fd != -1, "shm_open() failed: errno %d, %s", errno, strerror(errno));
struct stat buf;
fstat(fd, &buf);
size_t total_size = buf.st_size;
// Map shared memory segment to address space
ShmTDIQChannelData *shm_ptr = mmap(NULL, total_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
if (shm_ptr == MAP_FAILED) {
perror("mmap");
exit(1);
}
ShmTDIQChannel *channel = calloc_or_fail(1, sizeof(ShmTDIQChannel));
channel->data = shm_ptr;
channel->tx_iq_data = (sample_t *)(shm_ptr + 1);
size_t tx_buffer_size = CIRCULAR_BUFFER_SIZE * sizeof(sample_t) * channel->data->num_antennas_tx;
channel->rx_iq_data = channel->tx_iq_data + tx_buffer_size / sizeof(sample_t);
channel->type = IQ_CHANNEL_TYPE_CLIENT;
channel->last_timestamp = 0;
while (shm_ptr->magic != SHM_MAGIC_NUMBER) {
printf("Waiting for server to initialize shared memory\n");
sleep(1);
}
shm_ptr->is_connected = true;
close(fd);
return channel;
}
IQChannelErrorType shm_td_iq_channel_tx(ShmTDIQChannel *channel,
uint64_t timestamp,
uint64_t num_samples,
int antenna,
const sample_t *tx_iq_data)
{
ShmTDIQChannelData *data = channel->data;
if (data->is_connected == false) {
return CHANNEL_ERROR_NOT_CONNECTED;
}
// timestamp in the past
uint64_t current_time = data->timestamp;
if (timestamp < current_time) {
return CHANNEL_ERROR_TOO_LATE;
}
// timestamp is too far in the future
if (timestamp - current_time + num_samples >= CIRCULAR_BUFFER_SIZE) {
return CHANNEL_ERROR_TOO_EARLY;
}
sample_t *base_ptr;
if (channel->type == IQ_CHANNEL_TYPE_CLIENT) {
base_ptr = channel->rx_iq_data + antenna * CIRCULAR_BUFFER_SIZE;
} else {
base_ptr = channel->tx_iq_data + antenna * CIRCULAR_BUFFER_SIZE;
}
uint64_t first_sample = timestamp % CIRCULAR_BUFFER_SIZE;
uint64_t last_sample = first_sample + num_samples - 1;
if (last_sample >= CIRCULAR_BUFFER_SIZE) {
size_t num_samples_first_copy = CIRCULAR_BUFFER_SIZE - first_sample;
memcpy(base_ptr + first_sample, tx_iq_data, num_samples_first_copy * sizeof(sample_t));
memcpy(base_ptr, tx_iq_data + num_samples_first_copy, (num_samples - num_samples_first_copy) * sizeof(sample_t));
} else {
memcpy(base_ptr + first_sample, tx_iq_data, num_samples * sizeof(sample_t));
}
return CHANNEL_NO_ERROR;
}
IQChannelErrorType shm_td_iq_channel_rx(ShmTDIQChannel *channel,
uint64_t timestamp,
uint64_t num_samples,
int antenna,
sample_t *tx_iq_data)
{
ShmTDIQChannelData *data = channel->data;
if (data->is_connected == false) {
return CHANNEL_ERROR_NOT_CONNECTED;
}
// timestamp in the future
uint64_t current_time = data->timestamp;
if (timestamp > current_time) {
return CHANNEL_ERROR_TOO_EARLY;
}
// timestamp is too far in the past
if (current_time - timestamp >= CIRCULAR_BUFFER_SIZE) {
return CHANNEL_ERROR_TOO_LATE;
}
sample_t *base_ptr;
if (channel->type == IQ_CHANNEL_TYPE_CLIENT) {
base_ptr = channel->tx_iq_data + antenna * CIRCULAR_BUFFER_SIZE;
} else {
base_ptr = channel->rx_iq_data + antenna * CIRCULAR_BUFFER_SIZE;
}
uint64_t first_sample = timestamp % CIRCULAR_BUFFER_SIZE;
uint64_t last_sample = first_sample + num_samples - 1;
if (last_sample >= CIRCULAR_BUFFER_SIZE) {
size_t num_samples_first_copy = CIRCULAR_BUFFER_SIZE - first_sample;
memcpy(tx_iq_data, base_ptr + first_sample, num_samples_first_copy * sizeof(sample_t));
memcpy(tx_iq_data + num_samples_first_copy, base_ptr, (num_samples - num_samples_first_copy) * sizeof(sample_t));
} else {
memcpy(tx_iq_data, base_ptr + first_sample, num_samples * sizeof(sample_t));
}
return CHANNEL_NO_ERROR;
}
void shm_td_iq_channel_produce_samples(ShmTDIQChannel *channel, size_t num_samples)
{
ShmTDIQChannelData *data = channel->data;
if (channel->type != IQ_CHANNEL_TYPE_SERVER) {
return;
}
if (data->is_connected == false) {
return;
}
mutexlock(data->mutex);
data->timestamp += num_samples;
condbroadcast(data->cond);
mutexunlock(data->mutex);
}
void shm_td_iq_channel_wait(ShmTDIQChannel *channel, uint64_t timestamp)
{
ShmTDIQChannelData *data = channel->data;
if (data->is_connected == false) {
abort();
return;
}
size_t current_timestamp = data->timestamp;
if (current_timestamp >= timestamp) {
return;
}
mutexlock(data->mutex);
while (current_timestamp < timestamp) {
condwait(data->cond, data->mutex);
current_timestamp = data->timestamp;
}
mutexunlock(data->mutex);
return;
}
uint64_t shm_td_iq_channel_get_current_sample(const ShmTDIQChannel *channel)
{
ShmTDIQChannelData *data = channel->data;
return data->timestamp;
}
bool shm_td_iq_channel_is_connected(const ShmTDIQChannel *channel)
{
return channel->data->is_connected;
}
void shm_td_iq_channel_destroy(ShmTDIQChannel *channel)
{
ShmTDIQChannelData *data = channel->data;
size_t tx_buffer_size = CIRCULAR_BUFFER_SIZE * sizeof(sample_t) * data->num_antennas_tx;
size_t rx_buffer_size = CIRCULAR_BUFFER_SIZE * sizeof(sample_t) * data->num_antennas_rx;
size_t total_size = sizeof(ShmTDIQChannelData) + tx_buffer_size + rx_buffer_size;
munmap(data, total_size);
if (channel->type == IQ_CHANNEL_TYPE_SERVER) {
shm_unlink(channel->name);
}
free(channel);
}

View File

@@ -0,0 +1,148 @@
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef SHM_IQ_CHANNEL_H
#define SHM_IQ_CHANNEL_H
#include "../threadPool/pthread_utils.h"
#include <stdint.h>
#include <stdbool.h>
#include <semaphore.h>
#define SHM_MAGIC_NUMBER 0x12345678
/**
* ShmTdIqChannel is a shared memory bidirectional time domain IQ channel with a single clock
* source. The server (clock source) shall create the channel while the client should connect to
* it.
*
* To write samples, send them via a pointer passed to shm_td_iq_channel_tx.
* To read samples, receive them via a pointer passed to shm_td_iq_channel_rx. You can either wait until
* the sample are available using shm_td_iq_channel_wait or poll using shm_td_iq_channel_rx until the return
* value is not CHANNEL_ERROR_TOO_EARLY.
* To indicate that samples are ready to be read by the client, call shm_td_iq_channel_produce_samples
* (server only).
*
* The timestamps used in the API are in absolute samples from the time the client/server connection started.
*/
typedef enum IQChannelType { IQ_CHANNEL_TYPE_SERVER, IQ_CHANNEL_TYPE_CLIENT } IQChannelType;
typedef uint32_t sample_t;
typedef enum IQChannelErrorType {
CHANNEL_NO_ERROR,
CHANNEL_ERROR_TOO_LATE,
CHANNEL_ERROR_TOO_EARLY,
CHANNEL_ERROR_NOT_CONNECTED
} IQChannelErrorType;
typedef struct ShmTDIQChannel_s ShmTDIQChannel;
/**
* @brief Creates a shared memory IQ channel.
*
* @param name The name of the shared memory segment.
* @param num_tx_ant The number of TX antennas.
* @param num_rx_ant The number of RX antennas.
* @return A pointer to the created ShmTDIQChannel structure.
*/
ShmTDIQChannel *shm_td_iq_channel_create(const char *name, int num_tx_ant, int num_rx_ant);
/**
* @brief Connects to an existing shared memory IQ channel.
*
* @param name The name of the shared memory segment.
* @param timeout_in_seconds The timeout in seconds for the connection attempt.
* @return A pointer to the connected ShmTDIQChannel structure.
*/
ShmTDIQChannel *shm_td_iq_channel_connect(const char *name, int timeout_in_seconds);
/**
* @brief Transmit data in the channel
*
* @param channel The ShmTDIQChannel structure.
* @param timestamp The timestamp for which to get the TX IQ data slot.
* @param num_samples The number of samples to write.
* @param antenna The antenna index.
* @param tx_iq_data The TX IQ data to write.
*
* @return CHANNEL_NO_ERROR if successful, error type otherwise
*/
IQChannelErrorType shm_td_iq_channel_tx(ShmTDIQChannel *channel,
uint64_t timestamp,
uint64_t num_samples,
int antenna,
const sample_t *tx_iq_data);
/**
* @brief Receive iq data from the channel
*
* @param channel The ShmTDIQChannel structure.
* @param timestamp The timestamp for which to get the RX IQ data slot.
* @param num_samples The number of samples to read.
* @param antenna The antenna index.
* @param tx_iq_data pointer to the RX IQ data slot.
* @return CHANNEL_NO_ERROR if successful, error type otherwise
*/
IQChannelErrorType shm_td_iq_channel_rx(ShmTDIQChannel *channel,
uint64_t timestamp,
uint64_t num_samples,
int antenna,
sample_t *tx_iq_data);
/**
* @brief Advances the time in the channel by specified number of samples
*
* @param channel The ShmTDIQChannel structure.
* @param num_symbols The number of samples to produce.
*/
void shm_td_iq_channel_produce_samples(ShmTDIQChannel *channel, uint64_t num_samples);
/**
* @brief Wait until sample at the specified timestamp is available
*
* @param channel The ShmTDIQChannel structure.
*/
void shm_td_iq_channel_wait(ShmTDIQChannel *channel, uint64_t timestamp);
/**
* @brief Checks if the IQ channel is connected.
*
* @param channel The ShmTDIQChannel structure.
* @return True if the channel is connected, false otherwise.
*/
bool shm_td_iq_channel_is_connected(const ShmTDIQChannel *channel);
/**
* @brief Destroys the shared memory IQ channel.
*
* @param channel The ShmTDIQChannel structure.
*/
void shm_td_iq_channel_destroy(ShmTDIQChannel *channel);
/**
* @brief Returns current sample
*
* @param channel The ShmTDIQChannel structure.
*
* @return Current time as sample count since beginning of transmission
*/
uint64_t shm_td_iq_channel_get_current_sample(const ShmTDIQChannel *channel);
#endif

View File

@@ -0,0 +1,5 @@
add_executable(test_shm_td_iq_channel test_shm_td_iq_channel.c)
target_link_libraries(test_shm_td_iq_channel shm_td_iq_channel minimal_lib pthread)
add_dependencies(tests test_shm_td_iq_channel)
# Commented out due to issues with ASAN in the unit test docker container
#add_test(test_shm_td_iq_channel ./test_shm_td_iq_channel)

View File

@@ -0,0 +1,169 @@
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <pthread.h>
#include <errno.h>
#include "assertions.h"
#define SHM_CHANNEL_NAME "shm_iq_channel_test_file"
#include "shm_td_iq_channel.h"
void server(void);
int client(void);
enum { MODE_SERVER, MODE_CLIENT, MODE_FORK };
int main(int argc, char *argv[])
{
int mode = MODE_FORK;
if (argc == 2) {
if (strcmp(argv[1], "server") == 0) {
mode = MODE_SERVER;
} else if (strcmp(argv[1], "client") == 0) {
mode = MODE_CLIENT;
}
} else if (argc > 2) {
printf("Usage: %s [server|client]\n", argv[0]);
return 1;
}
switch (mode) {
case MODE_SERVER:
server();
break;
case MODE_CLIENT:
return client();
break;
case MODE_FORK: {
char file[256];
snprintf(file, sizeof(file), "/dev/shm/%s", SHM_CHANNEL_NAME);
remove(file);
int pid = fork();
if (pid == 0) {
server();
} else {
return client();
}
} break;
}
return 0;
}
const int num_updates = 50;
const int num_samples_per_update = 30720;
void *produce_symbols(void *arg)
{
ShmTDIQChannel *channel = (ShmTDIQChannel *)arg;
for (int i = 0; i < num_updates; i++) {
shm_td_iq_channel_produce_samples(channel, num_samples_per_update);
usleep(20000);
}
return 0;
}
void server(void)
{
int num_ant_tx = 1;
int num_ant_rx = 1;
ShmTDIQChannel *channel = shm_td_iq_channel_create(SHM_CHANNEL_NAME, num_ant_tx, num_ant_rx);
for (int i = 0; i < 10; i++) {
if (shm_td_iq_channel_is_connected(channel)) {
printf("Server connected\n");
break;
}
printf("Waiting for client\n");
sleep(1);
}
AssertFatal(shm_td_iq_channel_is_connected(channel), "Server failed to connect\n");
pthread_t producer_thread;
int ret = pthread_create(&producer_thread, NULL, produce_symbols, channel);
AssertFatal(ret == 0, "pthread_create() failed: errno %d, %s\n", errno, strerror(errno));
uint64_t timestamp = 0;
int iq_contents = 0;
while (timestamp < num_samples_per_update * num_updates) {
shm_td_iq_channel_wait(channel, timestamp + num_samples_per_update);
uint64_t target_timestamp = timestamp + num_samples_per_update;
timestamp += num_samples_per_update;
uint32_t iq_data[num_samples_per_update];
for (int i = 0; i < num_samples_per_update; i++) {
iq_data[i] = iq_contents;
}
int result = shm_td_iq_channel_tx(channel, target_timestamp, num_samples_per_update, 0, iq_data);
AssertFatal(result == CHANNEL_NO_ERROR, "Failed to write data\n");
iq_contents++;
}
printf("Finished writing data\n");
ret = pthread_join(producer_thread, NULL);
AssertFatal(ret == 0, "pthread_join() failed: errno %d, %s\n", errno, strerror(errno));
shm_td_iq_channel_destroy(channel);
}
int client(void)
{
int total_errors = 0;
ShmTDIQChannel *channel = shm_td_iq_channel_connect(SHM_CHANNEL_NAME, 10);
for (int i = 0; i < 10; i++) {
if (shm_td_iq_channel_is_connected(channel)) {
printf("Client connected\n");
break;
}
printf("Waiting for server\n");
sleep(1);
}
AssertFatal(shm_td_iq_channel_is_connected(channel), "Client failed to connect\n");
uint64_t timestamp = 0;
int iq_contents = 0;
while (timestamp < num_samples_per_update * num_updates) {
shm_td_iq_channel_wait(channel, timestamp + num_samples_per_update);
// Server starts producing from second slot
if (timestamp > num_samples_per_update) {
uint64_t target_timestamp = timestamp - num_samples_per_update;
uint32_t iq_data[num_samples_per_update];
int result = shm_td_iq_channel_rx(channel, target_timestamp, num_samples_per_update, 0, iq_data);
AssertFatal(result == CHANNEL_NO_ERROR, "Failed to read data\n");
int num_errors = 0;
for (int i = 0; i < num_samples_per_update; i++) {
if (iq_data[i] != iq_contents) {
num_errors++;
}
}
if (num_errors) {
printf("Found %d errors, value = %d, reference = %d\n", num_errors, iq_data[0], iq_contents);
total_errors += num_errors;
}
iq_contents++;
}
timestamp += num_samples_per_update;
}
printf("Finished reading data\n");
shm_td_iq_channel_destroy(channel);
return total_errors;
}

View File

@@ -94,11 +94,20 @@ int force_RRC_IDLE(char *buf, int debug, telnet_printfunc_t prnt)
return 0;
}
/** @brief Trigger RA with Msg3 C-RNTI */
int force_crnti_ra(char *buf, int debug, telnet_printfunc_t prnt)
{
NR_UE_MAC_INST_t *mac = get_mac_inst(0);
trigger_MAC_UE_RA(mac, NULL);
return 0;
}
/* Telnet shell command definitions */
static telnetshell_cmddef_t cicmds[] = {
{"sync_state", "[UE_ID(int,opt)]", get_sync_state},
{"force_rlf", "", force_rlf},
{"force_RRC_IDLE", "", force_RRC_IDLE},
{"force_crnti_ra", "", force_crnti_ra},
{"", "", NULL},
};

View File

@@ -251,12 +251,17 @@ void print_threads(char *buf, int debug, telnet_printfunc_t prnt)
proccmd_get_threaddata(buf, debug, prnt, NULL);
}
#define FLAG_PRINT_DEBUG_DUMP(flag) \
logsdata->lines[i].val[0] = (char *)flag_name[i]; \
logsdata->lines[i].val[1] = g_log->debug_mask.DEBUG_##flag ? "true" : "false"; \
logsdata->lines[i].val[1] = g_log->dump_mask.DEBUG_##flag ? "true" : "false"; \
i++;
int proccmd_websrv_getdata(char *cmdbuff, int debug, void *data, telnet_printfunc_t prnt)
{
webdatadef_t *logsdata = (webdatadef_t *)data;
const mapping *const log_level_names = log_level_names_ptr();
const mapping *const log_options = log_option_names_ptr();
const mapping *log_maskmap = log_maskmap_ptr();
if (strncmp(cmdbuff, "set", 3) == 0) {
telnet_printfunc_t printfunc = (prnt != NULL) ? prnt : (telnet_printfunc_t)printf;
if (strcasestr(cmdbuff, "loglvl") != NULL) {
@@ -291,23 +296,16 @@ int proccmd_websrv_getdata(char *cmdbuff, int debug, void *data, telnet_printfun
}
}
if (strcasestr(cmdbuff, "dbgopt") != NULL) {
int optbit = map_str_to_int(log_maskmap, logsdata->lines[0].val[0]);
if (optbit < 0) {
printfunc("debug option %s unknown\n", logsdata->lines[0].val[0]);
} else {
if (strcmp(logsdata->lines[0].val[1], "true") == 0)
SET_LOG_DEBUG(optbit);
else
CLEAR_LOG_DEBUG(optbit);
if (strcmp(logsdata->lines[0].val[2], "true") == 0)
SET_LOG_DUMP(optbit);
else
CLEAR_LOG_DUMP(optbit);
printfunc("%s debug %s dump %s\n",
logsdata->lines[0].val[0],
(strcmp(logsdata->lines[0].val[1], "true") == 0) ? "enabled" : "disabled",
(strcmp(logsdata->lines[0].val[2], "true") == 0) ? "enabled" : "disabled");
}
if (strcmp(logsdata->lines[0].val[1], "true") == 0)
if (!set_log_debug(logsdata->lines[0].val[0], strcmp(logsdata->lines[0].val[2], "true") == 0))
printfunc("debug option %s unknown\n", logsdata->lines[0].val[0]);
if (strcmp(logsdata->lines[0].val[2], "true") == 0)
if (!set_log_dump(logsdata->lines[0].val[0], strcmp(logsdata->lines[0].val[2], "true") == 0))
printfunc("debug option %s unknown\n", logsdata->lines[0].val[0]);
printfunc("%s debug %s dump %s\n",
logsdata->lines[0].val[0],
(strcmp(logsdata->lines[0].val[1], "true") == 0) ? "enabled" : "disabled",
(strcmp(logsdata->lines[0].val[2], "true") == 0) ? "enabled" : "disabled");
}
if (strcasestr(cmdbuff, "threadsched") != NULL) {
unsigned int tid = strtoll(logsdata->lines[0].val[0], NULL, 0);
@@ -354,12 +352,9 @@ int proccmd_websrv_getdata(char *cmdbuff, int debug, void *data, telnet_printfun
snprintf(logsdata->columns[2].coltitle, TELNET_CMD_MAXSIZE, "dump");
logsdata->columns[2].coltype = TELNET_CHECKVAL_BOOL;
for (int i = 0; log_maskmap[i].name != NULL; i++) {
logsdata->numlines++;
logsdata->lines[i].val[0] = (char *)log_maskmap[i].name;
logsdata->lines[i].val[1] = (g_log->debug_mask & log_maskmap[i].value) ? "true" : "false";
logsdata->lines[i].val[2] = (g_log->dump_mask & log_maskmap[i].value) ? "true" : "false";
}
int i = 0;
FOREACH_FLAG(FLAG_PRINT_DEBUG_DUMP);
logsdata->numlines += i;
}
if (strcasestr(cmdbuff, "logopt") != NULL) {
@@ -385,6 +380,14 @@ int proccmd_websrv_getdata(char *cmdbuff, int debug, void *data, telnet_printfun
return 0;
}
#define FLAG_PRINT2_DEBUG_DUMP(flag) \
prnt("%02i %17.17s %5.5s %5.5s\n", \
i, \
flag_name[i], \
g_log->debug_mask.DEBUG_##flag ? "Y" : "N", \
g_log->dump_mask.DEBUG_##flag ? "Y" : "N"); \
i++;
int proccmd_show(char *buf, int debug, telnet_printfunc_t prnt)
{
if (buf == NULL) {
@@ -422,12 +425,8 @@ int proccmd_show(char *buf, int debug, telnet_printfunc_t prnt)
}
if (strcasestr(buf,"dbgopt") != NULL) {
prnt("\n module debug dumpfile\n");
const mapping *log_maskmap = log_maskmap_ptr();
for (int i=0; log_maskmap[i].name != NULL ; i++) {
prnt("%02i %17.17s %5.5s %5.5s\n",i ,log_maskmap[i].name,
((g_log->debug_mask & log_maskmap[i].value)?"Y":"N"),
((g_log->dump_mask & log_maskmap[i].value)?"Y":"N") );
}
int i = 0;
FOREACH_FLAG(FLAG_PRINT2_DEBUG_DUMP);
}
if (strcasestr(buf,"config") != NULL) {
prnt("Command line arguments:\n");
@@ -593,28 +592,16 @@ int s = sscanf(buf,"%ms %i-%i\n",&logsubcmd, &idx1,&idx2);
}
}
else if (l == 2 && strcmp(logparam,"debug") == 0){
optbit = map_str_to_int(log_maskmap, opt);
if (optbit < 0) {
int ret = set_log_debug(opt, idx1 > 0);
if (!ret)
prnt("module %s unknown\n", opt);
} else {
if (idx1 > 0)
SET_LOG_DEBUG(optbit);
else
CLEAR_LOG_DEBUG(optbit);
proccmd_show("dbgopt", debug, prnt);
}
proccmd_show("dbgopt", debug, prnt);
}
else if (l == 2 && strcmp(logparam,"dump") == 0){
optbit = map_str_to_int(log_maskmap, opt);
if (optbit < 0) {
int ret = set_log_dump(opt, idx1 > 0);
if (!ret)
prnt("module %s unknown\n", opt);
} else {
if (idx1 > 0)
SET_LOG_DUMP(optbit);
else
CLEAR_LOG_DUMP(optbit);
proccmd_show("dump", debug, prnt);
}
proccmd_show("dump", debug, prnt);
}
if (logparam != NULL) free(logparam);
if (opt != NULL) free(opt);

View File

@@ -23,6 +23,7 @@
#define NOTIFIED_FIFO_H
#include "pthread_utils.h"
#include <stdint.h>
#include <malloc.h>
#include <pthread.h>
#include "time_meas.h"
#include <memory.h>

View File

@@ -38,7 +38,7 @@
int nas_sock_fd[MAX_MOBILES_PER_ENB * 2]; // Allocated for both LTE UE and NR UE.
int nas_sock_mbms_fd;
static int tun_alloc(char *dev)
static int tun_alloc(const char *dev)
{
struct ifreq ifr;
int fd, err;
@@ -55,25 +55,27 @@ static int tun_alloc(char *dev)
* IFF_NO_PI - Do not provide packet information
*/
ifr.ifr_flags = IFF_TUN | IFF_NO_PI;
if (*dev)
strncpy(ifr.ifr_name, dev, sizeof(ifr.ifr_name) - 1);
strncpy(ifr.ifr_name, dev, sizeof(ifr.ifr_name) - 1);
if ((err = ioctl(fd, TUNSETIFF, (void *)&ifr)) < 0) {
close(fd);
return err;
}
// According to https://www.kernel.org/doc/Documentation/networking/tuntap.txt, TUNSETIFF performs string
// formatting on ifr_name. To ensure that the generated name is what we expect, check it here.
AssertFatal(strcmp(ifr.ifr_name, dev) == 0, "Failed to create tun interface, expected ifname %s, got %s\n", dev, ifr.ifr_name);
err = fcntl(fd, F_SETFL, O_NONBLOCK);
if (err == -1) {
close(fd);
LOG_E(UTIL, "Error fcntl (%d:%s)\n", errno, strerror(errno));
return err;
}
strcpy(dev, ifr.ifr_name);
return fd;
}
int tun_init_mbms(char *ifprefix, int id)
int tun_init_mbms(char *ifname)
{
int ret;
char ifname[64];
sprintf(ifname, "%s%d", ifprefix, id);
nas_sock_mbms_fd = tun_alloc(ifname);
if (nas_sock_mbms_fd == -1) {
@@ -82,48 +84,26 @@ int tun_init_mbms(char *ifprefix, int id)
}
LOG_D(UTIL, "Opened socket %s with fd %d\n", ifname, nas_sock_mbms_fd);
ret = fcntl(nas_sock_mbms_fd, F_SETFL, O_NONBLOCK);
if (ret == -1) {
LOG_E(UTIL, "Error fcntl (%d:%s)\n", errno, strerror(errno));
return 0;
}
struct sockaddr_nl nas_src_addr = {0};
nas_src_addr.nl_family = AF_NETLINK;
nas_src_addr.nl_pid = 1;
nas_src_addr.nl_groups = 0; /* not in mcast groups */
ret = bind(nas_sock_mbms_fd, (struct sockaddr *)&nas_src_addr, sizeof(nas_src_addr));
bind(nas_sock_mbms_fd, (struct sockaddr *)&nas_src_addr, sizeof(nas_src_addr));
return 1;
}
int tun_init(const char *ifprefix, int num_if, int id)
int tun_init(const char *ifname, int instance_id)
{
int ret;
char ifname[64];
nas_sock_fd[instance_id] = tun_alloc(ifname);
int begx = (id == 0) ? 0 : id - 1;
int endx = (id == 0) ? num_if : id;
for (int i = begx; i < endx; i++) {
sprintf(ifname, "%s%d", ifprefix, i + 1);
nas_sock_fd[i] = tun_alloc(ifname);
if (nas_sock_fd[i] == -1) {
LOG_E(UTIL, "Error opening socket %s (%d:%s)\n", ifname, errno, strerror(errno));
return 0;
}
LOG_I(UTIL, "Opened socket %s with fd nas_sock_fd[%d]=%d\n", ifname, i, nas_sock_fd[i]);
ret = fcntl(nas_sock_fd[i], F_SETFL, O_NONBLOCK);
if (ret == -1) {
LOG_E(UTIL, "Error fcntl (%d:%s)\n", errno, strerror(errno));
return 0;
}
if (nas_sock_fd[instance_id] == -1) {
LOG_E(UTIL, "Error opening socket %s (%d:%s)\n", ifname, errno, strerror(errno));
return 0;
}
LOG_I(UTIL, "Opened socket %s with fd nas_sock_fd[%d]=%d\n", ifname, instance_id, nas_sock_fd[instance_id]);
return 1;
}
@@ -209,12 +189,8 @@ fail_interface_state:
return false;
}
// non blocking full configuration of the interface (address, and the two lest octets of the address)
bool tun_config(int interface_id, const char *ipv4, const char *ipv6, const char *ifpref)
bool tun_config(const char* ifname, const char *ipv4, const char *ipv6)
{
char interfaceName[IFNAMSIZ];
snprintf(interfaceName, sizeof(interfaceName), "%s%d", ifpref, interface_id);
AssertFatal(ipv4 != NULL || ipv6 != NULL, "need to have IP address, but none given\n");
int sock_fd = socket(AF_INET, SOCK_DGRAM, 0);
@@ -223,13 +199,16 @@ bool tun_config(int interface_id, const char *ipv4, const char *ipv6, const char
return false;
}
change_interface_state(sock_fd, interfaceName, INTERFACE_DOWN);
if (!change_interface_state(sock_fd, ifname, INTERFACE_DOWN)) {
close(sock_fd);
return false;
}
bool success = true;
if (ipv4 != NULL)
success = setInterfaceParameter(sock_fd, interfaceName, AF_INET, ipv4, SIOCSIFADDR);
success = setInterfaceParameter(sock_fd, ifname, AF_INET, ipv4, SIOCSIFADDR);
// set the machine network mask for IPv4
if (success && ipv4 != NULL)
success = setInterfaceParameter(sock_fd, interfaceName, AF_INET, "255.255.255.0", SIOCSIFNETMASK);
success = setInterfaceParameter(sock_fd, ifname, AF_INET, "255.255.255.0", SIOCSIFNETMASK);
if (ipv6 != NULL) {
// for setting the IPv6 address, we need an IPv6 socket. For setting IPv4,
@@ -240,27 +219,25 @@ bool tun_config(int interface_id, const char *ipv4, const char *ipv6, const char
LOG_E(UTIL, "Failed creating socket for interface management: %d, %s\n", errno, strerror(errno));
success = false;
}
success = success && setInterfaceParameter(sock_fd, interfaceName, AF_INET6, ipv6, SIOCSIFADDR);
success = success && setInterfaceParameter(sock_fd, ifname, AF_INET6, ipv6, SIOCSIFADDR);
close(sock_fd);
}
if (success)
success = change_interface_state(sock_fd, interfaceName, INTERFACE_UP);
success = change_interface_state(sock_fd, ifname, INTERFACE_UP);
if (success)
LOG_I(OIP, "Interface %s successfully configured, IPv4 %s, IPv6 %s\n", interfaceName, ipv4, ipv6);
LOG_I(OIP, "Interface %s successfully configured, IPv4 %s, IPv6 %s\n", ifname, ipv4, ipv6);
else
LOG_E(OIP, "Interface %s couldn't be configured (IPv4 %s, IPv6 %s)\n", interfaceName, ipv4, ipv6);
LOG_E(OIP, "Interface %s couldn't be configured (IPv4 %s, IPv6 %s)\n", ifname, ipv4, ipv6);
close(sock_fd);
return success;
}
void setup_ue_ipv4_route(int interface_id, const char *ipv4, const char *ifpref)
void setup_ue_ipv4_route(const char* ifname, int instance_id, const char *ipv4)
{
int table_id = interface_id - 1 + 10000;
char interfaceName[IFNAMSIZ];
snprintf(interfaceName, sizeof(interfaceName), "%s%d", ifpref, interface_id);
int table_id = instance_id - 1 + 10000;
char command_line[500];
int res = sprintf(command_line,
@@ -271,7 +248,7 @@ void setup_ue_ipv4_route(int interface_id, const char *ipv4, const char *ifpref)
table_id,
ipv4,
table_id,
interfaceName,
ifname,
table_id);
if (res < 0) {
@@ -281,3 +258,7 @@ void setup_ue_ipv4_route(int interface_id, const char *ipv4, const char *ifpref)
background_system(command_line);
}
int tun_generate_ifname(char *ifname, const char *ifprefix, int instance_id)
{
return snprintf(ifname, IFNAMSIZ, "%s%d", ifprefix, instance_id + 1);
}

View File

@@ -23,28 +23,43 @@
#define TUN_IF_H_
#include <stdbool.h>
#include <net/if.h>
/* TODO: doc */
int tun_init(const char *ifprefix, int num_if, int id);
/*!
* \brief This function generates the name of the interface based on the prefix and
* the instance id.
*
* \param[in,out] ifname name of the interface
* \param[in] ifprefix prefix of the interface
* \param[in] instance_id unique instance number
*/
int tun_generate_ifname(char *ifname, const char *ifprefix, int instance_id);
/* TODO: doc */
int tun_init_mbms(char *ifsuffix, int id);
/*!
* \brief This function initializes the TUN interface
* \param[in] ifname name of the interface
* \param[in] instance_id unique instance number, used to save socket file descriptor
*/
int tun_init(const char *ifname, int instance_id);
/*! \fn int tun_config(char*, int, int)
/*!
* \brief This function initializes the TUN interface for MBMS
* \param[in] ifname name of the interface
*/
int tun_init_mbms(char *ifname);
/*!
* \brief This function initializes the nasmesh interface using the basic values,
* basic address, network mask and broadcast address, as the default configured
* ones
* \param[in] interface_id number of this interface, prepended after interface
* name
* \param[in] ifname name of the interface
* \param[in] ipv4 IPv4 address of this interface as a string
* \param[in] ipv6 IPv6 address of this interface as a string
* \param[in] ifprefix interface name prefix to which an interface number will
* be appended
* \return true on success, otherwise false
* \note
* @ingroup _nas
*/
bool tun_config(int interface_id, const char *ipv4, const char *ipv6, const char *ifprefix);
bool tun_config(const char* ifname, const char *ipv4, const char *ipv6);
/*!
* \brief Setup a IPv4 rule in table (interface_id - 1 + 10000) and route to
@@ -52,12 +67,10 @@ bool tun_config(int interface_id, const char *ipv4, const char *ipv6, const char
* net.ipv4.conf.all.rp_filter=2 (strict source filtering would filter out
* responses of packets going out through interface to another IP address not
* in same subnet).
* \param[in] interface_id number of this interface, prepended after interface
* name
* \param[in] ifname name of the interface
* \param[in] instance_id unique instance number, used to create the table
* \param[in] ipv4 IPv4 address of the UE
* \param[in] ifprefix interface name prefix to which an interface number will
* be appended
*/
void setup_ue_ipv4_route(int interface_id, const char *ipv4, const char *ifpref);
void setup_ue_ipv4_route(const char* ifname, int instance_id, const char *ipv4);
#endif /*TUN_IF_H_*/

View File

@@ -997,7 +997,6 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../executables/softmodem-common.h \
@CMAKE_CURRENT_SOURCE_DIR@/../executables/nr-softmodem.c \
@CMAKE_CURRENT_SOURCE_DIR@/../executables/nr-gnb.c \
@CMAKE_CURRENT_SOURCE_DIR@/../executables/rt_profiling.h \
@CMAKE_CURRENT_SOURCE_DIR@/../executables/nr-uesoftmodem.h \
@CMAKE_CURRENT_SOURCE_DIR@/../executables/nr-uesoftmodem.c \
@CMAKE_CURRENT_SOURCE_DIR@/../executables/lte-softmodem.h \
@@ -1134,7 +1133,7 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/UICC/usim_interface.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/ocp-gtpu/gtp_itf.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/NR_UE/nr_nas_msg.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/NR_UE/nr_nas_msgc \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/NR_UE/nr_nas_msg.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/UE/nas_itti_messaging.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/UE/user_defs.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/UE/EMM/emm_proc.h \
@@ -1275,12 +1274,10 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/emm_msg.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/AttachReject.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/SecurityModeReject.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/FGSDeregistrationRequestUEOriginating.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/UplinkNasTransport.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/AuthenticationFailure.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/AuthenticationResponse.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/AttachComplete.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/FGSNASSecurityModeComplete.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/ExtendedServiceRequest.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/GutiReallocationComplete.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/DownlinkNasTransport.h \
@@ -1290,7 +1287,6 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/AttachReject.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/AttachAccept.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/ServiceReject.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/FGSIdentityResponse.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/AttachComplete.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/AttachRequest.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/AuthenticationRequest.c \
@@ -1302,17 +1298,14 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/AttachAccept.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/IdentityResponse.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/GutiReallocationComplete.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/RegistrationComplete.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/ServiceRequest.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/RegistrationAccept.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/IdentityRequest.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/RegistrationRequest.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/DetachAccept.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/AttachRequest.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/FGSIdentityResponse.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/EmmStatus.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/AuthenticationFailure.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/FGSAuthenticationResponse.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/AuthenticationReject.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/TrackingAreaUpdateAccept.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/TrackingAreaUpdateRequest.h \
@@ -1322,13 +1315,14 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/FGSNASSecurityModeComplete.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/IdentityResponse.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/RegistrationComplete.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/FGSDeregistrationRequestUEOriginating.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/emm_cause.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/EmmInformation.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/IdentityRequest.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/FGSUplinkNasTransport.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/GutiReallocationCommand.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/EMM/MSG/RegistrationRequest.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/NR_UE/5GS/5GMM/MSG \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/NR_UE/5GS/5GMM/IES \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/NR_UE/5GS/5GSM \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/NR_UE/5GS/5GSM/MSG \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/UTIL/parser.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/UTIL/device.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/UTIL/device.c \
@@ -1354,7 +1348,6 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/AuthenticationParameterRand.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/UeRadioCapabilityInformationUpdateNeeded.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/ProtocolDiscriminator.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/ExtendedProtocolDiscriminator.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/CsfbResponse.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/EsmCause.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/ProcedureTransactionIdentity.h \
@@ -1368,7 +1361,6 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/LlcServiceAccessPointIdentifier.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/ProtocolConfigurationOptions.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/TransactionIdentifier.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/ExtendedProtocolDiscriminator.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/GutiType.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/SupportedCodecList.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/MobileStationClassmark3.c \
@@ -1392,12 +1384,10 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/UeSecurityCapability.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/ApnAggregateMaximumBitRate.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/ImeisvRequest.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/SpareHalfOctet.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/PdnType.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/ShortMac.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/MobileStationClassmark3.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/TrafficFlowTemplate.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/SORTransparentContainer.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/NasPagingIdentity.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/NasMessageContainer.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/Cli.h \
@@ -1407,18 +1397,15 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/DetachType.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/EmergencyNumberList.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/EsmMessageContainer.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/FGSRegistrationResult.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/GprsTimer.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/TmsiStatus.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/VoiceDomainPreferenceAndUeUsageSetting.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/IdentityType2.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/EpsQualityOfService.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/LocationAreaIdentification.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/FGCNasMessageContainer.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/TrackingAreaIdentityList.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/MsNetworkCapability.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/ShortMac.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/FGSRegistrationResult.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/AuthenticationFailureParameter.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/TrackingAreaIdentity.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/EmmCause.h \
@@ -1433,12 +1420,10 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/AuthenticationParameterAutn.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/PdnAddress.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/EsmInformationTransferFlag.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/SpareHalfOctet.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/KsiAndSequenceNumber.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/LocationAreaIdentification.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/QualityOfService.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/ProcedureTransactionIdentity.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/NrUESecurityCapability.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/ProtocolConfigurationOptions.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/SsCode.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/EpsQualityOfService.h \
@@ -1448,12 +1433,10 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/EpsMobileIdentity.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/MobileIdentity.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/SsCode.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/FGSRegistrationType.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/TrackingAreaIdentity.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/EpsBearerIdentity.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/NasMessageContainer.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/DetachType.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/FGMMCapability.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/TmsiStatus.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/MobileStationClassmark2.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/MessageType.c \
@@ -1467,13 +1450,10 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/AdditionalUpdateType.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/NasRequestType.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/EpsBearerContextStatus.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/FGSMobileIdentity.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/LcsClientIdentity.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/FGSMobileIdentity.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/ServiceType.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/PagingIdentity.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/UeNetworkCapability.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/NrUESecurityCapability.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/AuthenticationParameterAutn.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/PdnAddress.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/EpsUpdateType.h \
@@ -1481,7 +1461,6 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/PTmsiSignature.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/PacketFlowIdentifier.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/UeRadioCapabilityInformationUpdateNeeded.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/FGCNasMessageContainer.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/PTmsiSignature.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/EpsMobileIdentity.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/GutiType.h \
@@ -1497,16 +1476,13 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/NasKeySetIdentifier.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/EpsAttachResult.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/AccessPointName.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/FGMMCapability.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/AdditionalUpdateResult.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/EpsAttachType.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/UeNetworkCapability.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/FGSDeregistrationType.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/EsmMessageContainer.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/SecurityHeaderType.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/EsmCause.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/NasSecurityAlgorithms.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/SORTransparentContainer.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/LinkedEpsBearerIdentity.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/AdditionalUpdateType.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/MsNetworkFeatureSupport.c \
@@ -1519,14 +1495,12 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/EpsBearerIdentity.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/EsmInformationTransferFlag.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/TimeZoneAndTime.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/FGSRegistrationType.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/EpsUpdateResult.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/EpsUpdateType.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/AuthenticationResponseParameter.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/NetworkName.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/LinkedEpsBearerIdentity.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/IES/SupportedCodecList.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/NR_NAS_defs.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/milenage.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/ESM/MSG/EsmStatus.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/ESM/MSG/ModifyEpsBearerContextReject.h \
@@ -1581,7 +1555,6 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/ESM/MSG/EsmInformationResponse.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextAccept.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/userDef.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NAS/COMMON/nr_common.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/UTILS/conversions.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/X2AP/x2ap_eNB_encoder.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/X2AP/x2ap_eNB_management_procedures.c \
@@ -1646,7 +1619,6 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/NETWORK_DRIVER/MESH/ioctl.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/NETWORK_DRIVER/MESH/constant.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/NETWORK_DRIVER/MESH/rrc_nas_primitives.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_COMMON/nr_mac_extern.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_COMMON/nr_compute_tbs_common.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h \
@@ -1717,13 +1689,12 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.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_vars.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_UE/mac_tables.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_UE/mac_defs.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_UE/mac_proto.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_UE/nr_ue_power_procedures.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_UE/config_ue.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_UE/mac_extern.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_UE/main_ue_nr.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c \
@@ -1891,7 +1862,6 @@ INPUT = \
@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/nr_rrc_extern.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/rrc_gNB_reconfig.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/rrc_gNB_NGAP.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/RRC/NR/mac_rrc_dl_f1ap.c \
@@ -2086,7 +2056,6 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/NR_REFSIG/ul_ref_seq_nr.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/NR_REFSIG/ul_ref_seq_nr.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/NR_REFSIG/sss_nr.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/NR_REFSIG/scrambling_luts.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/NR_REFSIG/dmrs_nr.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/NR_REFSIG/refsig_defs_ue.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/NR_REFSIG/ptrs_nr.h \
@@ -2314,10 +2283,8 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SIMULATION/TOOLS/phase_noise.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SIMULATION/TOOLS/channel_sim.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SIMULATION/TOOLS/sim.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED_NR_UE/phy_frame_config_nr.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED_NR_UE/harq_nr.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED_NR_UE/fapi_nr_ue_l1.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED_NR_UE/phy_frame_config_nr_ue.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED_NR_UE/pucch_uci_ue_nr.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED_NR_UE/harq_nr.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED_NR_UE/phy_procedures_nr_ue.c \

View File

@@ -194,3 +194,7 @@ Note that CU-UPs are not released from CU-CP internal structures. That means
that you have to restart the CU-CP if you want to connect the CU-UP again
(e.g., after a crash). The CU-CP might also misfunction during attach if a
CU-UP was connected, but disconnected in the meantime.
# 5. Abnormal conditions
* The CU-UP goes offline during normal operation (e.g. UEs have a valid PDU Session and are exchanging data on the UP): after restarting the CU-UP, the UP is not restored and the user will notice GTP errors. In this case the UEs have to reconnect.

View File

@@ -24,7 +24,9 @@
The following features are valid for the gNB and the 5G-NR UE.
* Static TDD, FDD
* Static TDD
- Multi TDD pattern supported refer [TDD Configuration](NR_SA_Multi_TDD_Pattern.md)
* Static FDD
* Normal CP
* Subcarrier spacings: 15 and 30kHz (FR1), 120kHz (FR2)
* Bandwidths: 10, 20, 40, 60, 80, 100MHz
@@ -137,6 +139,7 @@ These modes of operation are supported:
- evaluation of CQI report
- MAC scheduling of SR reception
- Intra-frequency handover
- Initial support for RedCap
## gNB RLC
@@ -183,6 +186,7 @@ These modes of operation are supported:
- Interface with NGAP for the interactions with the AMF
- Interface with F1AP for CU/DU split deployment option
- Periodic RRC measurements of serving cell (no A/B events)
- Initial support for RedCap
## gNB X2AP

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@@ -38,6 +38,33 @@ The actual scheduler implementation can be found in functions `pf_dl()` and
[`gNB_scheduler_ulsch.c`](../../openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c)
(for UL), respectively.
## PDDCH aggregation level
PDCCH aggregation level is selected using closed loop controller, where DL HARQ
feedback is the controller feedback signal. It is used to increment `pdcch_cl_adjust`
variable if no feedback is detected and decrement the variable when feedback is detected.
`pdcch_cl_adjust` is later mapped to the PDCCH aggregation level range.
The value of `pdcch_cl_adjust` is clamped to range <0,1>, the increment value is 0.05 while
the decrement value is 0.01. These values are selected to ensure PDCCH success rate is high.
See Examples below for futher explaination.
The possible values of aggregation level on UE SS can be configured via `uess_agg_levels` configuration
option. By default the gNB uses only aggregation level 2 which translates to `uess_agg_levels` set to
`[0, 1, 0, 0, 0]`. For example, to enable aggregation level 2 and 4 set `uess_agg_levels` to `[0, 1, 1, 0, 0]`.
### Examples:
#### Example 1:
Say we have 90% PDCCH success rate at aggregation level 1, `pdcch_cl_adjust` will stay at 0
for most of the time. 2 consecutive PDCCH failures will not result in increasing the aggregation
level (because (0.05 + 0.05) * 4 = 0.4 which is closer to 0 than to 1). If PDCCH fails 3 times
in a row the aggregation level will change to 2 and hopefully back to 1 once more PDDCH successes
happen.
### Example 2
Say we have 0% PDCCH success rate (radio link failure scenario) but `pdcch_cl_adjust` is 0 indicating
perfect PDCCH channel. it would take ~18 PDCCH failures to reach maximum aggregation level.
# Periodic output and interpretation
The scheduler periodically outputs statistics that can help you judge the radio
@@ -145,8 +172,8 @@ In the last lines:
## Split-related options (running in a DU)
See [nFAPI documentation](../L2NFAPI.md) or [Aerial
tutorial](../Aerial_FAPI_Split_Tutorial.md) for information about the FAPI
See [nFAPI documentation](../nfapi.md) or [Aerial
tutorial](../Aerial_FAPI_Split_Tutorial.md) for information about the (n)FAPI
split.
See [F1 documentation](../F1-design.md) for information about the F1 split.
@@ -240,3 +267,115 @@ here, *also they pertain to the DU*, i.e., the scheduler.
options are 2, 4, 6, 8, 10, 12, 32; **32 is a Rel-17 features**)
* `num_ulharq` (default 16): as `num_dlharq` for UL (other valid option is 32;
**32 is i Rel-17 feature**)
## ServingCellConfigCommon parameters
The `gNBs` configuration section has a big structure `servingCellConfigCommon`
that has an influence on the overall behavior of MAC and L1. As the name says,
this structure is a flat representation of the ServingCellConfigCommon
structure, specified by 3GPP. Describing all of these parameters would be too
exhaustive; more information about the individual fields can be found in 3GPP
TS 38.331, section 6.3.2 "Radio resource control information elements".
Below is a description of some of these parameters.
### Frequency configuration
There are many parameters, such as `absoluteFrequencySSB`, etc., that have an
impact on the frequency used by the gNB. For more information, please check the
[corresponding document](../gNB_frequency_setup.md).
### TDD pattern configuration
The TDD configuration parameters allow to use one or two TDD patterns.
#### Single TDD pattern
Configure the TDD pattern through these options:
- `dl_UL_TransmissionPeriodicity`: Refers to the UL/DL slots periodicity for
the TDD pattern. See below for valid numbers.
- `nrofDownlinkSlots`: Refers to the number of consecutive DL slots in the TDD
pattern. The number of DL slots depends on the TDD period.
- `nrofDownlinkSymbols`: Indicates the number of consecutive DL symbols within
the special slot that follows the downlink slots in the TDD pattern. The
special slot is needed only to switch from DL to UL. The maximum number of
symbols in this slot is 14.
- `nrofUplinkSlots`: Refers to the number of consecutive UL slots in the TDD
pattern, depending on the desired TDD period.
- `nrofUplinkSymbols`: Indicates the number of consecutive UL symbols within
the special slot that follows the downlink slots in the TDD pattern. The sum
of downlink and uplink symbols should not exceed 14.
- `prach_ConfigurationIndex`: index for PRACH according to tables 6.3.3.2-2 to
6.3.3.2-4 in TS 38.211.
As an example, the below figure shows a single TDD pattern, consisting of 3 DL
slots, 1 mixed slots (with 10 DL, 2 guard, 2 UL symbols), and 1 UL slot.
![TDD Frame Structure](TDD_Frame_Structure.png)
To configure this pattern in the configuration file, use
```plaintext
#dl_UL_TransmissionPeriodicity 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10, 8=ms3, 9=ms4
dl_UL_TransmissionPeriodicity = 5;
nrofDownlinkSlots = 3;
nrofDownlinkSymbols = 10;
nrofUplinkSlots = 1;
nrofUplinkSymbols = 2;
```
The `dl_UL_TransmissionPeriodicity` is set to `5` (2.5ms). The above figure
shows two TDD periods over 5ms. The 10 ms frame period must be strictly
divisible by the sum of the TDD pattern periods.
#### Two TDD patterns
An optional `pattern2` structure is used to signal a TDD pattern 2.
In this case, the TDD pattern may have two extended values of 3 ms and 4 ms.
These values are standardized as `dl-UL-TransmissionPeriodicity-v1530`. For the
sake of simplicity of the gNB configuration file, we have extended the set of
`dl-UL-TransmissionPeriodicity` values to support the new TDD periods, as
explained in the table below. However, these values will later be encoded as
`dl-UL-TransmissionPeriodicity-v1530` to match the specifications.
| `dl_UL_TransmissionPeriodicity` | TDD period |
|---------------------------------|------------|
| 0 | 0.5 ms |
| 1 | 0.625 ms |
| 2 | 1 ms |
| 3 | 1.25 ms |
| 4 | 2 ms |
| 5 | 2.5 ms |
| 6 | 5 ms |
| 7 | 10 ms |
| 8 | 3 ms |
| 9 | 4 ms |
The 10 ms frame period must be strictly divisible by the sum of the TDD pattern
periods. For example, the 3 ms TDD pattern should be used with a second TDD
pattern of 2 ms. Additionally, the 4 ms TDD pattern should be used with a
second TDD pattern of 1 ms.
As an example, this configuration might be used, where the first TDD pattern is
followed by a second, consisting of 4 DL slots.
```
# pattern1
# dl_UL_TransmissionPeriodicity
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
# ext: 8=ms3, 9=ms4
dl_UL_TransmissionPeriodicity = 8;
nrofDownlinkSlots = 3;
nrofDownlinkSymbols = 6;
nrofUplinkSlots = 2;
nrofUplinkSymbols = 4;
# pattern2
pattern2: {
dl_UL_TransmissionPeriodicity2 = 4;
nrofDownlinkSlots2 = 4;
nrofDownlinkSymbols2 = 0;
nrofUplinkSlots2 = 0;
nrofUplinkSymbols2 = 0;
};
```

View File

@@ -54,7 +54,7 @@ Important notes:
sudo ./nr-uesoftmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.conf -r 106 --numerology 1 --band 78 -C 3619200000 --rfsim --uicc0.imsi 001010000000001 --rfsimulator.options chanmod --rfsimulator.serveraddr 10.201.1.100 --telnetsrv --telnetsrv.listenport 9095
```
3. For the second UE, create the namespace ue2 (`-c1`), then execute shell inside (`-o1`, "open"):
3. For the second UE, create the namespace ue2 (`-c2`), then execute shell inside (`-o2`, "open"):
```bash
sudo ./multi-ue.sh -c2

View File

@@ -72,6 +72,7 @@ tested any RU without S-plane. Radio units we are testing/integrating:
|LiteON RU |01.00.08/02.00.03 |
|Benetel 650 |RAN650-1v1.0.4-dda1bf5|
|Benetel 550 CAT-A|RAN550-1v1.0.4-605a25a|
|Foxconn RPQN |v3.1.15q.551_rc10 |
Tested libxran releases:
@@ -475,6 +476,19 @@ cmake .. -GNinja -DOAI_FHI72=ON -Dxran_LOCATION=$HOME/phy/fhi_lib/lib
ninja nr-softmodem oran_fhlib_5g params_libconfig
```
Note that in tags 2025.w06 and prior, the FHI72 driver used polling to wait for
the next slot. This is inefficient as it burns CPU time, and has been replaced
with a more efficient mechanism. Nevertheless, if you experience problems that
did not occur previously, it is possible to re-enable polling, either with
`build_oai` like this
./build_oai --gNB --ninja -t oran_fhlib_5g --cmake-opt -Dxran_LOCATION=$HOME/phy/fhi_lib/lib --cmake-opt -DOAI_FHI72_USE_POLLING=ON
or with `cmake` like so
cmake .. -GNinja -DOAI_FHI72=ON -Dxran_LOCATION=$HOME/phy/fhi_lib/lib -DOAI_FHI72_USE_POLLING=ON
ninja oran_fhlib_5g
# Configuration
RU and DU configurations have a circular dependency: you have to configure DU MAC address in the RU configuration and the RU MAC address, VLAN and Timing advance parameters in the DU configuration.
@@ -658,6 +672,40 @@ The RU configuration is stored in `/etc/rumanager.conf`. The required modificati
At this stage, RU must be rebooted so the changes apply.
### Foxconn RPQN RU
**Version v3.1.15q.551_rc10**
The OAI configuration file [`gnb.sa.band78.273prb.fhi72.4X4-foxconn.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4X4-foxconn.conf) corresponds to:
- TDD pattern `DDDSU`, 2.5ms
- Bandwidth 100MHz
- MTU 8000
#### RU configuration
After switching on or rebooting the RU, the `/home/root/test/init_rrh_config_enable_cuplane` script should be run.
The RU configuration file is located in `/home/root/test/RRHconfig_xran.xml`. The required modifications:
1. `RRH_DST_MAC_ADDR`
2. `RRH_SRC_MAC_ADDR`
3. `RRH_EAXC_ID_TYPE1`
4. `RRH_EAXC_ID_TYPE3`
5. `RRH_CMPR_HDR_PRESENT` -> `0`
6. `RRH_C_PLANE_VLAN_TAG`
7. `RRH_U_PLANE_VLAN_TAG`
8. `RRH_LO_FREQUENCY_KHZ` -> `3750000, 0`
9. `RRH_DISABLE_USING_CAL_TABLES` -> `YES`
10. `RRH_TX_ATTENUATION` -> must be larger than 10dB
11. `RRH_RX_ATTENUATION` -> must be lower than 30dB
RU must be rebooted so the changes apply.
**Note**
- The RU was tested with the `2024.w30` tag of OAI.
- The measured throughput was **520 Mbps DL** and **40 Mbps UL**.
- With newer OAI versions, throughput degrades. This issue is currently under investigation.
## Configure Network Interfaces and DPDK VFs
The 7.2 fronthaul uses the xran library, which requires DPDK. In this step, we
@@ -929,10 +977,8 @@ Edit the sample OAI gNB configuration file and check following parameters:
including the advantages and disadvantages of each mode, refer to
[Memory in DPDK](https://www.dpdk.org/memory-in-dpdk-part-2-deep-dive-into-iova/)
* `owdm_enable`: used for eCPRI One-Way Delay Measurements; it depends if the RU supports it; if not set to 1 (enabled), default value is 0 (disabled)
* `fh_config`: parameters that need to match RU parameters
* timing parameters (starting with `T`) depend on the RU: `Tadv_cp_dl` is a
single number, the rest pairs of numbers `(x, y)` specifying minimum and
maximum delays
* `fh_config`
* DU delay profile (`T1a` and `Ta4`): pairs of numbers `(x, y)` specifying minimum and maximum delays
* `ru_config`: RU-specific configuration:
* `iq_width`: Width of DL/UL IQ samples: if 16, no compression, if <16, applies
compression
@@ -953,7 +999,7 @@ Layer mapping (eAxC offsets) happens as follows:
**Note**
- At the moment, OAI is compatible with CAT A O-RU only. Therefore, SRS is not supported.
- XRAN retreives DU MAC address with `rte_eth_macaddr_get()` function. Hence, `fhi_72.du_addr` parameter is not taken into account.
- XRAN retrieves DU MAC address with `rte_eth_macaddr_get()` function. Hence, `fhi_72.du_addr` parameter is not taken into account.
# Start and Operation of OAI gNB
@@ -1040,14 +1086,16 @@ In this case, you should reverify that `ptp4l` and `phc2sys` are working, e.g.,
do not do any jumps (during the last hour). While an occasional jump is not
necessarily problematic for the gNB, many such messages mean that the system is
not working, and UEs might not be able to attach or reach good performance.
Also, you can try to compile with polling (see [the build
section](.#build-oai-gnb)) to see if it resolves the problem.
# Operation with multiple RUs
It is possible to connect up to 4 RUs to one DU at the same time and operate
them as a (single) distributed antenna (array). This works since all RUs and
the DU are synchronized onto a common clock using PTP. The assumed
configuration is that with N RUs each having an M×M configuration, we
effectively reach an (N×M)×(N×M) configuration.
them either with a single antenna array or a distributed antenna array. This
works since all RUs and the DU are synchronized onto a common clock using PTP.
The assumed configuration is that with N RUs each having an M×M configuration,
we effectively reach an (N×M)×(N×M) configuration.
Some caveats:
- Since it's a distributed antenna, this implies that this setup will deploy a
@@ -1079,10 +1127,10 @@ fhi_72 = {
// mtu
fh_config = (
{
// timing, ru_config, prach_config of RU1
// DU delay profile, ru_config, prach_config of RU1
},
{
// timing, ru_config, prach_config of RU2
// DU delay profile, ru_config, prach_config of RU2
}
);
};
@@ -1106,11 +1154,6 @@ fhi_72 = {
fh_config = (
# RAN650 #1
{
Tadv_cp_dl = 125;
T2a_cp_dl = (259, 500);
T2a_cp_ul = (25, 500);
T2a_up = (134, 375);
Ta3 = (152, 160);
T1a_cp_dl = (419, 470);
T1a_cp_ul = (285, 336);
T1a_up = (294, 345);
@@ -1122,11 +1165,6 @@ fhi_72 = {
},
# RAN650 #2
{
Tadv_cp_dl = 125;
T2a_cp_dl = (259, 500);
T2a_cp_ul = (25, 500);
T2a_up = (134, 375);
Ta3 = (152, 160);
T1a_cp_dl = (419, 470);
T1a_cp_ul = (285, 336);
T1a_up = (294, 345);
@@ -1170,6 +1208,815 @@ Note the eight entries after `avg_IO`.
You should be able to connect a UE now.
# OAI Management Plane
We support Configuration Management in OAI gNB, where gNB configures CU-planes, interfaces, TX/RX antennas, and TX/RX carriers for the RU.
The reference specifications:
* `O-RAN.WG4.MP.0-v05.00`
* `O-RAN.WG4.MP-YANGs-v04.00`
## M-plane prerequisites
Before proceeding, please make sure you have a support for 7.2 interface, as described in [Prerequisites](#prerequisites).
### DHCP server
The M-plane requires a DHCP server, where the M-plane connection can be established over untagged or tagged VLAN. We tested with untagged (the default VLAN is 1).
Please modify `/etc/dhcp/dhcpd.conf` configuration based on your testbed.
<details>
<summary>Example DHCP server configuration</summary>
```
class "vendor-class" {
match option vendor-class-identifier;
}
subclass "vendor-class" "o-ran-ru2/Benetel" {
vendor-option-space VC;
}
option space VC;
option VC.server-address code 129 = array of ip-address;
option VC.server-fqdn code 130 = string;
# Netconf client IP address - DHCP option 43
option VC.server-address 192.168.80.1;
option VC.server-fqdn "o_du_1.operator.com";
set vendor-string = option vendor-class-identifier;
# option 143 - DHCPv4 SZTP Redirect Option (RFC8572)
# 2 bytes of URI's length + URI
option sztp code 143 = { unsigned integer 16, string };
option sztp 15 "https://192.168.80.1";
# port is optional in URI, e.g. "https://192.168.80.1:222"
#option sztp 20 "https://192.168.80.1:2222";
subnet 192.168.80.0 netmask 255.255.255.0 {
option routers 192.168.80.1;
option subnet-mask 255.255.255.0;
option domain-name "oai.com";
option domain-name-servers 172.21.3.100;
host benetel_ru {
# RU MAC address
hardware ethernet <ru-mac-address>;
# RU IP address
fixed-address <desired-ru-ip-address>;
}
}
```
</details>
Please, configure the interface as:
```bash
sudo ip address add 192.168.80.1/24 dev <interface>
```
### Mandatory packages
* On Fedora (we haven't yet tested RHEL):
```bash
sudo dnf install pcre-devel libssh-devel libxml2-devel libyang2-devel libnetconf2-devel
```
* On Ubuntu:
```bash
sudo apt-get install libpcre3-dev libssh-dev libxml2-dev
```
On Ubuntu, please note: `sudo apt-get install libyang2-dev libnetconf2-dev` will install unsupported versions (i.e. v2.0.112/v2.0.24 for `libyang2-dev`/`libnetconf2-dev`, but minimum required are v2.1.4/v2.1.25).
Therefore, please compile these libraries from source, as following:
<details>
<summary>Installing latest v2 libyang2 and libnetconf2 libraries</summary>
```
rm -rf /tmp/build_mplane_v2
mkdir /tmp/build_mplane_v2
# libyang
cd /tmp/build_mplane_v2
git clone https://github.com/CESNET/libyang.git
cd libyang
git checkout v2.1.111
mkdir build && cd build
cmake -DENABLE_TESTS=OFF \
-DENABLE_VALGRIND_TESTS=OFF \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DCMAKE_INSTALL_RPATH=/usr/local/lib \
-DPLUGINS_DIR=/usr/local/lib/libyang \
-DPLUGINS_DIR_EXTENSIONS=/usr/local/lib/libyang/extensions \
-DPLUGINS_DIR_TYPES=/usr/local/lib/libyang/types \
-DYANG_MODULE_DIR=/usr/local/share/yang/modules/libyang ..
make -j8
sudo make install
sudo ldconfig
#libnetconf
cd /tmp/build_mplane_v2
git clone https://github.com/CESNET/libnetconf2.git
cd libnetconf2
git checkout v2.1.37
mkdir build && cd build
cmake -DENABLE_TESTS=OFF \
-DENABLE_EXAMPLES=OFF \
-DENABLE_VALGRIND_TESTS=OFF \
-DCLIENT_SEARCH_DIR=/usr/local/share/yang/modules \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DCMAKE_INSTALL_RPATH=/usr/local/lib \
-DLIBYANG_INCLUDE_DIR=/usr/local/include \
-DLIBYANG_LIBRARY=/usr/local/lib/libyang.so \
-DLY_VERSION_PATH=/usr/local/include \
-DYANG_MODULE_DIR=/usr/local/share/yang/modules/libnetconf2 ..
make -j8
sudo make install
sudo ldconfig
# to uninstall libraries
# cd /tmp/build_mplane_v2/libyang/build && sudo make uninstall
# cd /tmp/build_mplane_v2/libnetconf2/build && sudo make uninstall
# cd
# rm -rf /tmp/build_mplane_v2
```
</details>
If you would like to install these libraries in the custom path, please replace `/usr/local` default path to e.g. `/opt/mplane-v2`.
## Benetel O-RU
Note: Only v1.2.2 RAN550 and RAN650 have been successfully tested.
### One time steps
Connect to the RU as user `root`, enable the mplane service, and reboot:
```bash
ssh root@<ru-ip-address>
systemctl enable mplane
reboot
```
Once the mplane service is successfully enabled on the RU, two new users are being added in `/etc/passwd`:
```bash
...
oranbenetel:x:1000:1000::/home/oranbenetel:/bin/sh
oranext:x:1001:1001::/home/oranext:/bin/sh
```
Create `oranbenetel` home directory:
```bash
mkdir /home/oranbenetel && chown oranbenetel:oranbenetel /home/oranbenetel
```
Connect to the RU as user `oranbenetel`, generate ssh keys, and copy DU public key into RU for NETCONF authentication:
```bash
ssh oranbenetel@<ru-ip-address>
ssh-keygen
echo "<DU-pub-key>" >> ~/.ssh/authorized_keys
```
## gNB configuration
The reference gNB configuration file for one Benetel RAN550:
[`gnb.sa.band78.273prb.fhi72.4x4-benetel550-mplane.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-benetel550-mplane.conf)
The reference DU configuration file for two Benetel RAN650:
[gnb-du.sa.band77.273prb.fhi72.8x8-benetel650_650-mplane.conf](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band77.273prb.fhi72.8x8-benetel650_650-mplane.conf)
In order to run gNB/DU with M-plane, we need to modify the `fhi_72` section in the configuration file.
Example for one RU:
```bash
fhi_72 = {
dpdk_devices = ("0000:c3:11.0", "0000:c3:11.1"); # one VF can be used as well
system_core = 0;
io_core = 1;
worker_cores = (2);
du_key_pair = ("<path-to>/.ssh/id_rsa.pub", "<path-to>/.ssh/id_rsa");
du_addr = ("00:11:22:33:44:66", "00:11:22:33:44:67"); # only one needed if one VF configured
vlan_tag = (9, 9); # only one needed if one VF configured
ru_ip_addr = ("192.168.80.9");
fh_config = ({
T1a_cp_dl = (419, 470);
T1a_cp_ul = (285, 336);
T1a_up = (294, 345);
Ta4 = (0, 200);
});
};
```
Example for two RUs:
```bash
fhi_72 = {
dpdk_devices = ("0000:c3:11.0", "0000:c3:11.1", "0000:c3:11.2", "0000:c3:11.3"); # two VFs can be used as well
system_core = 0;
io_core = 1;
worker_cores = (2);
du_key_pair = ("/home/oaicicd/.ssh/id_rsa.pub", "/home/oaicicd/.ssh/id_rsa");
du_addr = ("00:11:22:33:44:66", "00:11:22:33:44:67", "00:11:22:33:44:68", "00:11:22:33:44:69"); # only two needed if two VFs configured
vlan_tag = (9, 9, 11, 11); # only two needed if two VFs configured
ru_ip_addr = ("192.168.80.9", "192.168.80.10");
fh_config = (
# RAN550 #1
{
T1a_cp_dl = (419, 470);
T1a_cp_ul = (285, 336);
T1a_up = (294, 345);
Ta4 = (0, 200);
},
# RAN550 #2
{
T1a_cp_dl = (419, 470);
T1a_cp_ul = (285, 336);
T1a_up = (294, 345);
Ta4 = (0, 200);
});
};
```
* `fhi_72` :
* `dpdk_devices`: [*]
* `system_core`: [*]
* `io_core`: [*]
* `worker_cores`: [*]
* `file_prefix`: [*]
* `du_key_pair`: ssh public and private keys to authenticate RU with NETCONF
* `du_addr`: DU MAC address(es) to create CU-plane interface(s) in the RU
* `vlan_tag`: VLAN U and C plane tags to create CU-plane interface(s) in the RU
* `ru_ip_addr`: RU IP address to connect to the RU via M-plane
* `dpdk_mem_size`: [*]
* `dpdk_iova_mode`: [*]
* `owdm_enable`: [*]
* `fh_config`: only DU delay profile (`T1a` and `Ta4`)
[*] see [Configure OAI gNB](#configure-oai-gnb) for more details
The following parameters are retrieved from the RU and forwarded to the xran:
* `MTU`
* `RU MAC address`
* `IQ compression`: if RU supports multiple, the first value in the list is taken; please note that the same value is used for PxSCH/PRACH
* `PRACH offset`: hardcoded based on the RU vendor (i.e. for Benetel `max(Nrx,Ntx)`)
## Build and compile gNB
The following cmake options are available:
* `OAI_FHI72` = CUS support
* `OAI_FHI72_MPLANE` = M support
Compiled libraries:
* `OAI_FHI72` <=> `oran_fhlib_5g`
* `OAI_FHI72` && `OAI_FHI72_MPLANE` <=> `oran_fhlib_5g` (CUS) && `oran_fhlib_5g_mplane` (CUSM)
### Using build_oai script
```bash
git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git ~/openairinterface5g
cd ~/openairinterface5g/cmake_targets/
./build_oai -I # if you never installed OAI, use this command once before the next line
./build_oai --install-optional-packages # for pcre/libpcre3, libssh, and libxml2 library installation
./build_oai --gNB --ninja -t oran_fhlib_5g_mplane --cmake-opt -Dxran_LOCATION=$HOME/phy/fhi_lib/lib
# if libyang2 and libnetconf2 are installed in `/opt/mplane-v2`, please use the following command:
PKG_CONFIG_PATH=/opt/mplane-v2/lib/pkgconfig ./build_oai --gNB --ninja -t oran_fhlib_5g_mplane --cmake-opt -Dxran_LOCATION=$HOME/phy/fhi_lib/lib
```
### Using cmake directly
```bash
git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git ~/openairinterface5g
cd ~/openairinterface5g/
mkdir build && cd build
cmake .. -GNinja -DOAI_FHI72=ON -DOAI_FHI72_MPLANE=ON -Dxran_LOCATION=$HOME/phy/fhi_lib/lib
# if libyang2 and libnetconf2 are installed in `/opt/mplane-v2`, please use the following command:
PKG_CONFIG_PATH=/opt/mplane-v2/lib/pkgconfig cmake .. -GNinja -DOAI_FHI72=ON -DOAI_FHI72_MPLANE=ON -Dxran_LOCATION=$HOME/phy/fhi_lib/lib
ninja nr-softmodem oran_fhlib_5g_mplane params_libconfig
```
## Start the gNB
Run the `nr-softmodem` from the build directory:
```bash
cd ~/openairinterface5g/cmake_targets/ran_build/build
sudo ./nr-softmodem -O <mplane-configuration file> --thread-pool <list of non isolated cpus>
```
**Warning**: Make sure that the configuration file you add after the `-O` option is adapted to your machine, especially to its isolated cores.
M-plane sequence diagram:
```mermaid
sequenceDiagram
participant dhcp as DHCP server
participant du as O-DU
participant ru as O-RU
dhcp->ru: 1. Transport Layer Initialization
note over dhcp,ru: (a) perform VLAN scan (untagged or tagged VLAN)<br/>(b) DHCP assigns IP address to RU<br/>(c) DHCP sends DU IP address to RU
du->ru: 2. NETCONF/SSH connect
du->>ru: 3. DU retrieves RU info
note left of du: <get>
note over du: Check if RU is PTP synced
du->>ru: 4. DU subscribes to all RU notifications
note left of du: <subscribe>
du->>ru: 5. DU updates the supervision timer
note left of du: <supervision-watchdog-reset>
note over du: Store RU MAC, MTU, IQ bitwidth, and PRACH offset info for xran
note over du: Store all the RU U-plane info - interface name, TX/RX carrier, and TX/RX endpoint names
du->>ru: 6. DU loads yang models
note left of du: <get-schema>
note right of ru: ietf-netconf-monitoring.yang
du->>ru: 7. DU performs CU-plane configuration
note left of du: <edit-config>
note over ru: (1) o-ran-interface.yang - create new interface with VLAN tag, DU and RU MAC addresses<br/>(2)(opt.) o-ran-transceiver.yang - for file upload<br/>(3) o-ran-processing-elements.yang - element with which RU ports should be assigned<br/>(4) o-ran-uplane-conf.yang<br/>#8193;(4a) low-level-tx/rx-endpoints - PxSCH, PRACH<br/>#8193;(4b) tx/rx-array-carriers - center frequency, BW, gain, ACTIVE,...<br/>#8193;(4c) low-level-tx/rx-links - mapping endpoints, carriers and processing element<br/>#8193;(4d)(opt.) if CAT B, SRS configuration<br/>#8193;(4e)(opt.) TDD configuration
du->>ru: 8. DU checks if CU-plane configuration is valid
note left of du: <validate>
du->>ru: 9. If valid, DU commits the changes
note left of du: <commit>
du->>ru: 10. DU retrieves RU states
note right of ru: ietf-hardware.yang
note left of du: <get>
note over ru: admin-state, power-state, oper-state,<br/>availability-state, usage-state
ru->>du: 11. RU notifies DU about the configuration change
note over du: DU configures xran
du->ru: 12. DU and RU exchange packets
```
<details>
<summary>4x4 MIMO and 100MHz BW with Benetel 550 RU example run</summary>
```
[HW] [MPLANE] RPC request to RU "192.168.80.9" = <connect> with username "oranbenetel" and port ID "830".
[HW] [MPLANE] Successfuly connected to RU "192.168.80.9" with username "oranbenetel" and port ID "830".
[HW] [MPLANE] RPC request to RU "192.168.80.9" = <get> operational datastore.
[HW] [MPLANE] Successfully retrieved operational datastore from RU "192.168.80.9".
[HW] [MPLANE] RU is already PTP synchronized.
[HW] [MPLANE] RPC request to RU "192.168.80.9" = <subscribe> with stream "NETCONF" and filter "(null)".
[HW] [MPLANE] RPC reply = OK.
[HW] [MPLANE] Successfully subscribed to all notifications from RU "192.168.80.9".
[HW] [MPLANE] RPC request to RU "192.168.80.9" = "<supervision-watchdog-reset xmlns="urn:o-ran:supervision:1.0">
<supervision-notification-interval>65535</supervision-notification-interval>
<guard-timer-overhead>65535</guard-timer-overhead>
</supervision-watchdog-reset>".
[HW] [MPLANE] Successfully updated supervision timer to (65535+65535)[s] for RU "192.168.80.9".
[HW] [MPLANE] Watchdog timer answer:
<next-update-at xmlns="urn:o-ran:supervision:1.0">2025-03-30T08:52:31+02:00</next-update-at>
[HW] [MPLANE] Interface MTU 1500 unreliable/not correctly reported by Benetel O-RU, hardcoding to 9600.
[HW] [MPLANE] IQ bitwidth 16 unreliable/not correctly reported by Benetel O-RU, hardcoding to 9.
[HW] [MPLANE] Storing the following information to forward to xran:
RU MAC address 8c:1f:64:d1:11:c0
MTU 9600
IQ bitwidth 9
PRACH offset 4
DU port bitmask 61440
Band sector bitmask 3840
CC ID bitmask 240
RU port ID bitmask 15
DU port ID 0
Band sector ID 0
CC ID 0
RU port ID 0
[HW] [MPLANE] Successfully retrieved all the U-plane info - interface name, TX/RX carrier names, and TX/RX endpoint names.
[HW] [MPLANE] RPC request to RU "192.168.80.9" = <get-schema> for module "ietf-yang-metadata".
[HW] [MPLANE] RPC request to RU "192.168.80.9" = <get-schema> for module "yang".
[HW] [MPLANE] RPC request to RU "192.168.80.9" = <get-schema> for module "ietf-inet-types".
[HW] [MPLANE] RPC request to RU "192.168.80.9" = <get-schema> for module "ietf-yang-types".
[HW] [MPLANE] RPC request to RU "192.168.80.9" = <get-schema> for module "ietf-yang-schema-mount".
[HW] [MPLANE] RPC request to RU "192.168.80.9" = <get-schema> for module "ietf-yang-structure-ext".
[HW] [MPLANE] RPC request to RU "192.168.80.9" = <get-schema> for module "ietf-datastores".
[HW] [MPLANE] RPC request to RU "192.168.80.9" = <get-schema> for module "sysrepo".
[HW] [MPLANE] RPC request to RU "192.168.80.9" = <get-schema> for module "ietf-netconf-acm".
[HW] [MPLANE] RPC request to RU "192.168.80.9" = <get-schema> for module "ietf-factory-default".
[HW] [MPLANE] RPC request to RU "192.168.80.9" = <get-schema> for module "sysrepo-factory-default".
[HW] [MPLANE] RPC request to RU "192.168.80.9" = <get-schema> for module "ietf-yang-library".
[HW] [MPLANE] RPC request to RU "192.168.80.9" = <get-schema> for module "sysrepo-monitoring".
[HW] [MPLANE] RPC request to RU "192.168.80.9" = <get-schema> for module "sysrepo-plugind".
[HW] [MPLANE] RPC request to RU "192.168.80.9" = <get-schema> for module "ietf-netconf".
[HW] [MPLANE] RPC request to RU "192.168.80.9" = <get-schema> for module "ietf-netconf-with-defaults".
[HW] [MPLANE] RPC request to RU "192.168.80.9" = <get-schema> for module "ietf-netconf-notifications".
[HW] [MPLANE] RPC request to RU "192.168.80.9" = <get-schema> for module "ietf-origin".
[HW] [MPLANE] RPC request to RU "192.168.80.9" = <get-schema> for module "ietf-netconf-monitoring".
[HW] [MPLANE] RPC request to RU "192.168.80.9" = <get-schema> for module "ietf-netconf-nmda".
[HW] [MPLANE] RPC request to RU "192.168.80.9" = <get-schema> for module "nc-notifications".
[HW] [MPLANE] [LIBYANG] ERROR: Data model "notifications" not found in local searchdirs. (path: (null)).
[HW] [MPLANE] [LIBYANG] ERROR: Loading "notifications" module failed. (path: (null)).
[HW] [MPLANE] [LIBYANG] ERROR: Parsing module "nc-notifications" failed. (path: (null)).
[HW] [MPLANE] Unable to load module "nc-notifications" from RU "192.168.80.9".
[HW] [MPLANE] Unable to load all yang modules from operational datastore for RU "192.168.80.9". Using yang models present in "models" subfolder.
[HW] [MPLANE] Successfully loaded all yang modules for RU "192.168.80.9".
[HW] [MPLANE] The VLAN tags for C and U plane for the RU "192.168.80.9" are the same. Therefore, configuring one common interface and one processing element.
[HW] [MPLANE] RPC request to RU "192.168.80.9" = <edit-config>:
<interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
<interface>
<name>INTERFACE_0</name>
<type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:l2vlan</type>
<enabled>true</enabled>
<mac-address xmlns="urn:o-ran:interfaces:1.0">8c:1f:64:d1:11:c0</mac-address>
<base-interface xmlns="urn:o-ran:interfaces:1.0">eth0</base-interface>
<vlan-id xmlns="urn:o-ran:interfaces:1.0">9</vlan-id>
</interface>
</interfaces>
<processing-elements xmlns="urn:o-ran:processing-element:1.0">
<transport-session-type>ETH-INTERFACE</transport-session-type>
<ru-elements>
<name>PLANE_0</name>
<transport-flow>
<interface-name>INTERFACE_0</interface-name>
<eth-flow>
<ru-mac-address>8c:1f:64:d1:11:c0</ru-mac-address>
<vlan-id>9</vlan-id>
<o-du-mac-address>00:11:22:33:44:66</o-du-mac-address>
</eth-flow>
</transport-flow>
</ru-elements>
</processing-elements>
<user-plane-configuration xmlns="urn:o-ran:uplane-conf:1.0">
<low-level-tx-links>
<name>PdschLink0</name>
<processing-element>PLANE_0</processing-element>
<tx-array-carrier>TxArray0</tx-array-carrier>
<low-level-tx-endpoint>LowLevelTxEndpoint0</low-level-tx-endpoint>
</low-level-tx-links>
<low-level-tx-links>
<name>PdschLink1</name>
<processing-element>PLANE_0</processing-element>
<tx-array-carrier>TxArray0</tx-array-carrier>
<low-level-tx-endpoint>LowLevelTxEndpoint1</low-level-tx-endpoint>
</low-level-tx-links>
<low-level-tx-links>
<name>PdschLink2</name>
<processing-element>PLANE_0</processing-element>
<tx-array-carrier>TxArray0</tx-array-carrier>
<low-level-tx-endpoint>LowLevelTxEndpoint2</low-level-tx-endpoint>
</low-level-tx-links>
<low-level-tx-links>
<name>PdschLink3</name>
<processing-element>PLANE_0</processing-element>
<tx-array-carrier>TxArray0</tx-array-carrier>
<low-level-tx-endpoint>LowLevelTxEndpoint3</low-level-tx-endpoint>
</low-level-tx-links>
<low-level-rx-links>
<name>PuschLink0</name>
<processing-element>PLANE_0</processing-element>
<rx-array-carrier>RxArray0</rx-array-carrier>
<low-level-rx-endpoint>LowLevelRxEndpoint0</low-level-rx-endpoint>
</low-level-rx-links>
<low-level-rx-links>
<name>PrachLink0</name>
<processing-element>PLANE_0</processing-element>
<rx-array-carrier>RxArray0</rx-array-carrier>
<low-level-rx-endpoint>LowLevelRxPrachEndpoint0</low-level-rx-endpoint>
</low-level-rx-links>
<low-level-rx-links>
<name>PuschLink1</name>
<processing-element>PLANE_0</processing-element>
<rx-array-carrier>RxArray0</rx-array-carrier>
<low-level-rx-endpoint>LowLevelRxEndpoint1</low-level-rx-endpoint>
</low-level-rx-links>
<low-level-rx-links>
<name>PrachLink1</name>
<processing-element>PLANE_0</processing-element>
<rx-array-carrier>RxArray0</rx-array-carrier>
<low-level-rx-endpoint>LowLevelRxPrachEndpoint1</low-level-rx-endpoint>
</low-level-rx-links>
<low-level-rx-links>
<name>PuschLink2</name>
<processing-element>PLANE_0</processing-element>
<rx-array-carrier>RxArray0</rx-array-carrier>
<low-level-rx-endpoint>LowLevelRxEndpoint2</low-level-rx-endpoint>
</low-level-rx-links>
<low-level-rx-links>
<name>PrachLink2</name>
<processing-element>PLANE_0</processing-element>
<rx-array-carrier>RxArray0</rx-array-carrier>
<low-level-rx-endpoint>LowLevelRxPrachEndpoint2</low-level-rx-endpoint>
</low-level-rx-links>
<low-level-rx-links>
<name>PuschLink3</name>
<processing-element>PLANE_0</processing-element>
<rx-array-carrier>RxArray0</rx-array-carrier>
<low-level-rx-endpoint>LowLevelRxEndpoint3</low-level-rx-endpoint>
</low-level-rx-links>
<low-level-rx-links>
<name>PrachLink3</name>
<processing-element>PLANE_0</processing-element>
<rx-array-carrier>RxArray0</rx-array-carrier>
<low-level-rx-endpoint>LowLevelRxPrachEndpoint3</low-level-rx-endpoint>
</low-level-rx-links>
<low-level-tx-endpoints>
<name>LowLevelTxEndpoint0</name>
<compression>
<iq-bitwidth>9</iq-bitwidth>
<compression-type>STATIC</compression-type>
</compression>
<cp-length>0</cp-length>
<cp-length-other>0</cp-length-other>
<offset-to-absolute-frequency-center>0</offset-to-absolute-frequency-center>
<e-axcid>
<o-du-port-bitmask>61440</o-du-port-bitmask>
<band-sector-bitmask>3840</band-sector-bitmask>
<ccid-bitmask>240</ccid-bitmask>
<ru-port-bitmask>15</ru-port-bitmask>
<eaxc-id>0</eaxc-id>
</e-axcid>
</low-level-tx-endpoints>
<low-level-tx-endpoints>
<name>LowLevelTxEndpoint1</name>
<compression>
<iq-bitwidth>9</iq-bitwidth>
<compression-type>STATIC</compression-type>
</compression>
<cp-length>0</cp-length>
<cp-length-other>0</cp-length-other>
<offset-to-absolute-frequency-center>0</offset-to-absolute-frequency-center>
<e-axcid>
<o-du-port-bitmask>61440</o-du-port-bitmask>
<band-sector-bitmask>3840</band-sector-bitmask>
<ccid-bitmask>240</ccid-bitmask>
<ru-port-bitmask>15</ru-port-bitmask>
<eaxc-id>1</eaxc-id>
</e-axcid>
</low-level-tx-endpoints>
<low-level-tx-endpoints>
<name>LowLevelTxEndpoint2</name>
<compression>
<iq-bitwidth>9</iq-bitwidth>
<compression-type>STATIC</compression-type>
</compression>
<cp-length>0</cp-length>
<cp-length-other>0</cp-length-other>
<offset-to-absolute-frequency-center>0</offset-to-absolute-frequency-center>
<e-axcid>
<o-du-port-bitmask>61440</o-du-port-bitmask>
<band-sector-bitmask>3840</band-sector-bitmask>
<ccid-bitmask>240</ccid-bitmask>
<ru-port-bitmask>15</ru-port-bitmask>
<eaxc-id>2</eaxc-id>
</e-axcid>
</low-level-tx-endpoints>
<low-level-tx-endpoints>
<name>LowLevelTxEndpoint3</name>
<compression>
<iq-bitwidth>9</iq-bitwidth>
<compression-type>STATIC</compression-type>
</compression>
<cp-length>0</cp-length>
<cp-length-other>0</cp-length-other>
<offset-to-absolute-frequency-center>0</offset-to-absolute-frequency-center>
<e-axcid>
<o-du-port-bitmask>61440</o-du-port-bitmask>
<band-sector-bitmask>3840</band-sector-bitmask>
<ccid-bitmask>240</ccid-bitmask>
<ru-port-bitmask>15</ru-port-bitmask>
<eaxc-id>3</eaxc-id>
</e-axcid>
</low-level-tx-endpoints>
<low-level-rx-endpoints>
<name>LowLevelRxEndpoint0</name>
<compression>
<iq-bitwidth>9</iq-bitwidth>
<compression-type>STATIC</compression-type>
</compression>
<cp-length>0</cp-length>
<cp-length-other>0</cp-length-other>
<offset-to-absolute-frequency-center>0</offset-to-absolute-frequency-center>
<e-axcid>
<o-du-port-bitmask>61440</o-du-port-bitmask>
<band-sector-bitmask>3840</band-sector-bitmask>
<ccid-bitmask>240</ccid-bitmask>
<ru-port-bitmask>15</ru-port-bitmask>
<eaxc-id>0</eaxc-id>
</e-axcid>
</low-level-rx-endpoints>
<low-level-rx-endpoints>
<name>LowLevelRxPrachEndpoint0</name>
<compression>
<iq-bitwidth>9</iq-bitwidth>
<compression-type>STATIC</compression-type>
</compression>
<cp-length>0</cp-length>
<cp-length-other>0</cp-length-other>
<offset-to-absolute-frequency-center>0</offset-to-absolute-frequency-center>
<e-axcid>
<o-du-port-bitmask>61440</o-du-port-bitmask>
<band-sector-bitmask>3840</band-sector-bitmask>
<ccid-bitmask>240</ccid-bitmask>
<ru-port-bitmask>15</ru-port-bitmask>
<eaxc-id>4</eaxc-id>
</e-axcid>
</low-level-rx-endpoints>
<low-level-rx-endpoints>
<name>LowLevelRxEndpoint1</name>
<compression>
<iq-bitwidth>9</iq-bitwidth>
<compression-type>STATIC</compression-type>
</compression>
<cp-length>0</cp-length>
<cp-length-other>0</cp-length-other>
<offset-to-absolute-frequency-center>0</offset-to-absolute-frequency-center>
<e-axcid>
<o-du-port-bitmask>61440</o-du-port-bitmask>
<band-sector-bitmask>3840</band-sector-bitmask>
<ccid-bitmask>240</ccid-bitmask>
<ru-port-bitmask>15</ru-port-bitmask>
<eaxc-id>1</eaxc-id>
</e-axcid>
</low-level-rx-endpoints>
<low-level-rx-endpoints>
<name>LowLevelRxPrachEndpoint1</name>
<compression>
<iq-bitwidth>9</iq-bitwidth>
<compression-type>STATIC</compression-type>
</compression>
<cp-length>0</cp-length>
<cp-length-other>0</cp-length-other>
<offset-to-absolute-frequency-center>0</offset-to-absolute-frequency-center>
<e-axcid>
<o-du-port-bitmask>61440</o-du-port-bitmask>
<band-sector-bitmask>3840</band-sector-bitmask>
<ccid-bitmask>240</ccid-bitmask>
<ru-port-bitmask>15</ru-port-bitmask>
<eaxc-id>5</eaxc-id>
</e-axcid>
</low-level-rx-endpoints>
<low-level-rx-endpoints>
<name>LowLevelRxEndpoint2</name>
<compression>
<iq-bitwidth>9</iq-bitwidth>
<compression-type>STATIC</compression-type>
</compression>
<cp-length>0</cp-length>
<cp-length-other>0</cp-length-other>
<offset-to-absolute-frequency-center>0</offset-to-absolute-frequency-center>
<e-axcid>
<o-du-port-bitmask>61440</o-du-port-bitmask>
<band-sector-bitmask>3840</band-sector-bitmask>
<ccid-bitmask>240</ccid-bitmask>
<ru-port-bitmask>15</ru-port-bitmask>
<eaxc-id>2</eaxc-id>
</e-axcid>
</low-level-rx-endpoints>
<low-level-rx-endpoints>
<name>LowLevelRxPrachEndpoint2</name>
<compression>
<iq-bitwidth>9</iq-bitwidth>
<compression-type>STATIC</compression-type>
</compression>
<cp-length>0</cp-length>
<cp-length-other>0</cp-length-other>
<offset-to-absolute-frequency-center>0</offset-to-absolute-frequency-center>
<e-axcid>
<o-du-port-bitmask>61440</o-du-port-bitmask>
<band-sector-bitmask>3840</band-sector-bitmask>
<ccid-bitmask>240</ccid-bitmask>
<ru-port-bitmask>15</ru-port-bitmask>
<eaxc-id>6</eaxc-id>
</e-axcid>
</low-level-rx-endpoints>
<low-level-rx-endpoints>
<name>LowLevelRxEndpoint3</name>
<compression>
<iq-bitwidth>9</iq-bitwidth>
<compression-type>STATIC</compression-type>
</compression>
<cp-length>0</cp-length>
<cp-length-other>0</cp-length-other>
<offset-to-absolute-frequency-center>0</offset-to-absolute-frequency-center>
<e-axcid>
<o-du-port-bitmask>61440</o-du-port-bitmask>
<band-sector-bitmask>3840</band-sector-bitmask>
<ccid-bitmask>240</ccid-bitmask>
<ru-port-bitmask>15</ru-port-bitmask>
<eaxc-id>3</eaxc-id>
</e-axcid>
</low-level-rx-endpoints>
<low-level-rx-endpoints>
<name>LowLevelRxPrachEndpoint3</name>
<compression>
<iq-bitwidth>9</iq-bitwidth>
<compression-type>STATIC</compression-type>
</compression>
<cp-length>0</cp-length>
<cp-length-other>0</cp-length-other>
<offset-to-absolute-frequency-center>0</offset-to-absolute-frequency-center>
<e-axcid>
<o-du-port-bitmask>61440</o-du-port-bitmask>
<band-sector-bitmask>3840</band-sector-bitmask>
<ccid-bitmask>240</ccid-bitmask>
<ru-port-bitmask>15</ru-port-bitmask>
<eaxc-id>7</eaxc-id>
</e-axcid>
</low-level-rx-endpoints>
<tx-array-carriers>
<name>TxArray0</name>
<absolute-frequency-center>663360</absolute-frequency-center>
<center-of-channel-bandwidth>3950400000</center-of-channel-bandwidth>
<channel-bandwidth>100000000</channel-bandwidth>
<active>ACTIVE</active>
<gain>0.0</gain>
<downlink-radio-frame-offset>0</downlink-radio-frame-offset>
<downlink-sfn-offset>0</downlink-sfn-offset>
</tx-array-carriers>
<rx-array-carriers>
<name>RxArray0</name>
<absolute-frequency-center>663360</absolute-frequency-center>
<center-of-channel-bandwidth>3950400000</center-of-channel-bandwidth>
<channel-bandwidth>100000000</channel-bandwidth>
<active>ACTIVE</active>
<downlink-radio-frame-offset>0</downlink-radio-frame-offset>
<downlink-sfn-offset>0</downlink-sfn-offset>
<gain-correction>0.0</gain-correction>
<n-ta-offset>0</n-ta-offset>
</rx-array-carriers>
</user-plane-configuration>
[HW] [MPLANE] RPC reply = OK.
[HW] [MPLANE] Successfully edited the candidate datastore for RU "192.168.80.9".
[HW] [MPLANE] RPC request to RU "192.168.80.9" = <validate> candidate datastore.
[HW] [MPLANE] RPC reply = OK.
[HW] [MPLANE] Successfully validated candidate datastore for RU "192.168.80.9".
[HW] [MPLANE] RPC request to RU "192.168.80.9" = <commit> candidate datastore.
[HW] [MPLANE] RPC reply = OK.
[HW] [MPLANE] Successfully commited CU-planes configuration into running datastore for RU "192.168.80.9".
[HW] [MPLANE] Usage state = "idle" for RU "192.168.80.9".
[HW] [MPLANE] Received notification from RU "192.168.80.9" at (2025-03-29T12:40:23.049085102+00:00)
{
"o-ran-uplane-conf:rx-array-carriers-state-change": {
"rx-array-carriers": [
{
"name": "RxArray0",
"state": "BUSY"
}
]
}
}
[HW] [MPLANE] Received notification from RU "192.168.80.9" at (2025-03-29T12:40:23.058136880+00:00)
{
"o-ran-uplane-conf:tx-array-carriers-state-change": {
"tx-array-carriers": [
{
"name": "TxArray0",
"state": "BUSY"
}
]
}
}
[HW] [MPLANE] Received notification from RU "192.168.80.9" at (2025-03-29T12:40:23.078776163+00:00)
{
"o-ran-uplane-conf:rx-array-carriers-state-change": {
"rx-array-carriers": [
{
"name": "RxArray0",
"state": "READY"
}
]
}
}
[HW] [MPLANE] Received notification from RU "192.168.80.9" at (2025-03-29T12:40:23.093039138+00:00)
{
"o-ran-uplane-conf:tx-array-carriers-state-change": {
"tx-array-carriers": [
{
"name": "TxArray0",
"state": "READY"
}
]
}
}
[HW] [MPLANE] Received notification from RU "192.168.80.9" at (2025-03-29T12:40:23.452751936+00:00)
{
"ietf-netconf-notifications:netconf-config-change": {
"changed-by": {
"username": "root",
"session-id": 0
},
"datastore": "running",
"edit": [
{
"target": "/ietf-interfaces:interfaces/interface[name='INTERFACE_0']",
"operation": "create"
},
{
"target": "/ietf-interfaces:interfaces/interface[name='INTERFACE_0']/name",
"operation": "create"
},
...
}
[HW] [MPLANE] RU "192.168.80.9" is now ready.
```
</details>
Note: If you wish to run the fronthaul without M-plane, no need for recompilation, as the library `oran_fhlib_5g` already exists.
The only mandatory step is to link `oran_fhlib_5g` to `oai_transpro` library.
```bash
cd ~/openairinterface5g/cmake_targets/ran_build/build
rm liboai_transpro.so
ln -s liboran_fhlib_5g.so liboai_transpro.so
sudo ./nr-softmodem -O <without-mplane-configuration file> --thread-pool <list of non isolated cpus>
```
# Contact in case of questions
You can ask your question on the [mailing lists](https://gitlab.eurecom.fr/oai/openairinterface5g/-/wikis/MailingList).

View File

@@ -57,7 +57,8 @@ There is some general information in the [OpenAirInterface Gitlab Wiki](https://
- [How to use the L2 simulator](./L2NFAPI.md)
- [How to use the OAI channel simulator](../openair1/SIMULATION/TOOLS/DOC/channel_simulation.md)
- [How to use multiple BWPs](./RUN_NR_multiple_BWPs.md)
- [How to run OAI-VNF and OAI-PNF](./RUN_NR_NFAPI.md) _Note: does not work currently_
- [How to run OAI-VNF and OAI-PNF](./nfapi.md): how to run the nFAPI split,
including some general remarks on FAPI/nFAPI.
- [How to use the positioning reference signal (PRS)](./RUN_NR_PRS.md)
- [How to use device-to-device communication (D2D, 4G)](./d2d_emulator_setup.txt)
- [How to run with E2 agent](../openair2/E2AP/README.md)
@@ -116,6 +117,8 @@ Some directories under `radio` contain READMEs:
- [USRP](../radio/USRP/README.md)
- [BladeRF](../radio/BLADERF/README)
- [IQPlayer](../radio/iqplayer/DOC/iqrecordplayer_usage.md), and [general documentation](./iqrecordplayer_usage.md)
- [fhi_72](../radio/fhi_72/README.md)
- [vrtsim](../radio/vrtsim/README.md)
The other SDRs (AW2S, LimeSDR, ...) have no READMEs.
@@ -134,3 +137,4 @@ The other SDRs (AW2S, LimeSDR, ...) have no READMEs.
- [formatting](../tools/formatting/README.md) is a clang-format error detection tool
- [iwyu](../tools/iwyu/README.md) is a tool to detect `#include` errors
- [docker-dev-env](../tools/docker-dev-env/README.md) is a ubuntu22 docker development environment

View File

@@ -221,15 +221,49 @@ Or by providing this the the command line parameters:
### gNB
The main parameter to cope with the large NTN propagation delay is the cellSpecificKoffset.
This parameter is the scheduling offset used for the timing relationships that are modified for NTN (see TS 38.213).
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 `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.
This parameter can be provided to the gNB in the conf file as `cellSpecificKoffset_r17` in the section `servingCellConfigCommon`.
The parameter `ta-Common-r17` is used to provide the propagation delay between the reference point (at the gNB) and the satellite.
The granularity of ta-Common is 4.072 × 10^(-3) µs. Values are given in unit of corresponding granularity.
The parameter `ta-CommonDrift-r17` indicates the drift rate of the common TA.
The granularity of ta-CommonDrift is 0.2 × 10^(-3) µs/s. Values are given in unit of corresponding granularity.
The satellite position and velocity vartors are provided using the following parameters:
`positionX-r17`, `positionY-r17`, `positionZ-r17`:
X, Y, Z coordinate of satellite position state vector in ECEF. Unit is meter.
Step of 1.3 m. Actual value = field value * 1.3.
`velocityVX-r17`, `velocityVY-r17`, `velocityVZ-r17`:
X, Y, Z coordinate of satellite velocity state vector in ECEF. Unit is meter/second.
Step of 0.06 m/s. Actual value = field value * 0.06.
These parameters can be provided to the gNB in the conf file in the section `servingCellConfigCommon`:
```
...
cellSpecificKoffset_r17 = 478; # GEO satellite
# cellSpecificKoffset_r17 = 40; # LEO satellite
# GEO satellite
cellSpecificKoffset_r17 = 478;
ta-Common-r17 = 58629666; # 238.74 ms
positionX-r17 = 0;
positionY-r17 = 0;
positionZ-r17 = 32433846;
velocityVX-r17 = 0;
velocityVY-r17 = 0;
velocityVZ-r17 = 0;
# LEO satellite
# cellSpecificKoffset_r17 = 40;
# ta-Common-r17 = 4634000; # 18.87 ms
# ta-CommonDrift-r17 = -230000; # -46 µs/s
# positionX-r17 = 0;
# positionY-r17 = -2166908; # -2816980.4 m
# positionZ-r17 = 4910784; # 6384019.2 m
# velocityVX-r17 = 0;
# velocityVY-r17 = 115246; # 6914.76 m/s
# velocityVZ-r17 = 50853; # 3051.18 m/s
...
```
@@ -262,10 +296,11 @@ To enable this feature, the `disable_harq` flag has to be added to the gNB conf
...
```
So with these modifications to the file `targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.25PRB.usrpx300.conf` an example gNB command for FDD, 5 MHz BW, 15 kHz SCS, transparent GEO satellite 5G NR NTN is this:
The settings for a transparent GEO satellite scenario are already provided in the file `ci-scripts/conf_files/gnb.sa.band254.u0.25prb.rfsim.ntn.conf`.
Using this conf file, an example gNB command for FDD, 5 MHz BW, 15 kHz SCS, transparent GEO satellite 5G NR NTN is this:
```
cd cmake_targets
sudo ./ran_build/build/nr-softmodem -O ../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.25PRB.usrpx300.conf --rfsim --rfsimulator.prop_delay 238.74
sudo ./ran_build/build/nr-softmodem -O ../ci-scripts/conf_files/gnb.sa.band254.u0.25prb.rfsim.ntn.conf --rfsim
```
To configure NTN gNB with 32 HARQ processes in downlink and uplink, add these settings in conf files under section `gNBs.[0]`
@@ -281,32 +316,43 @@ To simulate a LEO satellite channel model with rfsimulator in UL (DL is simulate
@include "channelmod_rfsimu_LEO_satellite.conf"
```
So with these modifications to the file `targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.25PRB.usrpx300.conf` an example gNB command for FDD, 5 MHz BW, 15 kHz SCS, trasparent LEO satellite 5G NR NTN is this:
The settings for a transparent LEO satellite scenario are already provided in the file `ci-scripts/conf_files/gnb.sa.band254.u0.25prb.rfsim.ntn-leo.conf`.
Using this conf file, an example gNB command for FDD, 5 MHz BW, 15 kHz SCS, trasparent LEO satellite 5G NR NTN is this:
```
cd cmake_targets
sudo ./ran_build/build/nr-softmodem -O ../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.25PRB.usrpx300.conf --rfsim --rfsimulator.prop_delay 20
sudo ./ran_build/build/nr-softmodem -O ../ci-scripts/conf_files/gnb.sa.band254.u0.25prb.rfsim.ntn-leo.conf --rfsim
```
### NR UE
At UE side, there are two main parameters to cope with the large NTN propagation delay, cellSpecificKoffset and ta-Common.
`cellSpecificKoffset` is the same as for gNB and can be provided to the UE via command line parameter `--ntn-koffset`.
`ta-Common` is a common timing advance and can be provided to the UE via command line parameter `--ntn-ta-common` in milliseconds.
At UE side, only few parameters have to be provided, as the UE receives most relevant parameters via SIB19 from the gNB.
But to calculate the UE specific TA, the UE position has to be provided in the `ue.conf` file.
Also the LEO channel model has to be configured, e.g. by using an `@include` statement, just like on the gNB side:
```
...
position0 = {
x = 0.0;
y = 0.0;
z = 6377900.0;
}
@include "channelmod_rfsimu_LEO_satellite.conf"
```
So an example NR UE command for FDD, 5MHz BW, 15 kHz SCS, transparent GEO satellite 5G NR NTN is this:
```
cd cmake_targets
sudo ./ran_build/build/nr-uesoftmodem --band 66 -C 2152680000 --CO -400000000 -r 25 --numerology 0 --ssb 48 --rfsim --rfsimulator.prop_delay 238.74 --ntn-koffset 478 --ntn-ta-common 477.48
sudo ./ran_build/build/nr-uesoftmodem -O ../targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.conf --band 254 -C 2488400000 --CO -873500000 -r 25 --numerology 0 --ssb 60 --rfsim --rfsimulator.prop_delay 238.74
```
For LEO satellites a third parameter specifying the NTN propagation delay drift has ben added, ta-CommonDrift.
`ta-CommonDrift` provides the drift rate of the common timing advance and can be provided to the UE via command line parameter `--ntn-ta-commondrift` in microseconds per second.
For LEO satellite scenarios, the parameter `--ntn-initial-time-drift` must be provided via command line, as the UE needs this value to compensate for the time drift during initial sync, before SIB19 was received.
This parameter provides the drift rate of the complete DL timing (incl. feeder link and service link) in µs/s.
Also, to perform an autonomous TA update based on the DL drift, the boolean parameter `--autonomous-ta` should be added in case of a LEO satellite scenario.
So an example NR UE command for FDD, 5MHz BW, 15 kHz SCS, transparent LEO satellite 5G NR NTN is this:
```
cd cmake_targets
sudo ./ran_build/build/nr-uesoftmodem --band 66 -C 2152680000 --CO -400000000 -r 25 --numerology 0 --ssb 48 --rfsim --rfsimulator.prop_delay 20 --rfsimulator.options chanmod -O ../targets/PROJECTS/GENERIC-NR-5GC/CONF/channelmod_rfsimu_LEO_satellite.conf --time-sync-I 0.2 --ntn-koffset 40 --ntn-ta-common 37.74 --ntn-ta-commondrift -50 --autonomous-ta
sudo ./ran_build/build/nr-uesoftmodem -O ../targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.conf --band 254 -C 2488400000 --CO -873500000 -r 25 --numerology 0 --ssb 60 --rfsim --rfsimulator.prop_delay 20 --rfsimulator.options chanmod --time-sync-I 0.1 --ntn-initial-time-drift -46 --autonomous-ta
```
# Specific OAI modes

View File

@@ -1,54 +0,0 @@
# Procedure to run nFAPI in 5G NR
## Contributed by 5G Testbed IISc
### Developers: Gokul S, Mahesh A, Aniq U R
## Procedure to Build gNB and UE
The regular commands to build gNB and UE can be used
```
sudo ./build_oai --gNB --nrUE
```
## Procedure to run NR nFAPI using RF-Simulator
### Bring up another loopback interface
If running for the first time on your computer, or you have restarted your computer, bring up another loopback interface with this command:
sudo ifconfig lo: 127.0.0.2 netmask 255.0.0.0 up
### VNF command
```
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band78.tm1.106PRB.nfapi.conf --nfapi VNF --noS1 --phy-test
```
### PNF command
```
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/oaiL1.nfapi.usrpx300.conf --nfapi PNF --rfsim --phy-test --rfsimulator.serveraddr server
```
### UE command
```
sudo ./nr-uesoftmodem --rfsim --phy-test -d --rfsimulator.serveraddr 127.0.0.1
```
## Procedure to run NR nFAPI using Hardware (tested with USRP x310)
### VNF command
```
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band78.tm1.106PRB.nfapi.conf --nfapi VNF --noS1 --phy-test
```
### PNF command
```
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/oaiL1.nfapi.usrpx300.conf --nfapi PNF --phy-test
```
### UE command
```
sudo ./nr-uesoftmodem --usrp-args "addr=*USRP_ADDRESS*,clock_source=external,time_source=external" --phy-test
```

View File

@@ -25,6 +25,7 @@
| aerial2 | 172.21.16.131 | CI-Aerial2-Usage | gNB (PNF/Nvidia CUBB + VNF) | Foxconn RU, _Nvidia Aerial SDK integrated_ |
| cacofonix | 172.21.16.150 | CI-Cacofonix-Usage | gNB (n78, FHI7.2) | |
| matix | 172.21.19.58 | CI-Matix-Usage | gNB (n77) | N310 |
| gracehopper1-oai | -- | Gracehopper1 | build, gNB/Aerial | _Nvidia Aerial SDK integrated_ |
Note: The available resources, and their current usage, is indicated here:
- [Lockable resources of jenkins-oai](https://jenkins-oai.eurecom.fr/lockable-resources/):
@@ -78,7 +79,7 @@ Note: The available resources, and their current usage, is indicated here:
### [RAN-Container-Parent](https://jenkins-oai.eurecom.fr/job/RAN-Container-Parent/)
**Purpose**: automatically triggered tests on MR creation or push, from Gitlab
Webhook ~documentation ~BUILD-ONLY ~4G-LTE ~5G-NR
Webhook ~documentation ~BUILD-ONLY ~4G-LTE ~5G-NR ~nrUE
This pipeline has basically two main stages, as follows. For the image build,
please also refer to the [dedicated documentation](../docker/README.md) for
@@ -87,16 +88,16 @@ information on how the images are built.
#### Image Build pipelines
- [RAN-ARM-Cross-Compile-Builder](https://jenkins-oai.eurecom.fr/job/RAN-ARM-Cross-Compile-Builder/)
~BUILD-ONLY ~4G-LTE ~5G-NR
~BUILD-ONLY ~4G-LTE ~5G-NR ~nrUE
- orion: Cross-compilation from Intel to ARM
- base image from `Dockerfile.base.ubuntu22.cross-arm64`
- build image from `Dockerfile.build.ubuntu22.cross-arm64` (no target images)
- [RAN-cppcheck](https://jenkins-oai.eurecom.fr/job/RAN-cppcheck/)
~BUILD-ONLY ~4G-LTE ~5G-NR
~BUILD-ONLY ~4G-LTE ~5G-NR ~nrUE
- bellatrix
- performs static code analysis, currently not actively enforced
- [RAN-RHEL8-Cluster-Image-Builder](https://jenkins-oai.eurecom.fr/job/RAN-RHEL8-Cluster-Image-Builder/)
~BUILD-ONLY ~4G-LTE ~5G-NR
~BUILD-ONLY ~4G-LTE ~5G-NR ~nrUE
- cluster (`Asterix-OC-oaicicd-session` resource): RHEL image build using the OpenShift Cluster (using gcc/clang)
- base image from `Dockerfile.build.rhel9`
- build image from `Dockerfile.build.rhel9`, followed by
@@ -110,7 +111,7 @@ information on how the images are built.
image)
- build image from `Dockerfile.clang.rhel9` (compilation only, artifacts not used currently)
- [RAN-Ubuntu18-Image-Builder](https://jenkins-oai.eurecom.fr/job/RAN-Ubuntu18-Image-Builder/)
~BUILD-ONLY ~4G-LTE ~5G-NR
~BUILD-ONLY ~4G-LTE ~5G-NR ~nrUE
- run formatting check from `ci-scripts/docker/Dockerfile.formatting.bionic`
- obelix: Ubuntu 22 image build using docker (Note: builds U22 images while pipeline is named U18!)
- base image from `Dockerfile.base.ubuntu22`
@@ -122,13 +123,22 @@ information on how the images are built.
- target image from `Dockerfile.lteUE.ubuntu22`
- target image from `Dockerfile.lteRU.ubuntu22`
- build unit tests from `ci-scripts/docker/Dockerfile.unittest.ubuntu22`, and run them
- [RAN-Ubuntu-ARM-Image-Builder](https://jenkins-oai.eurecom.fr/job/RAN-Ubuntu-ARM-Image-Builder/)
~BUILD-ONLY ~4G-LTE ~5G-NR
- gracehopper1-oai: ARM Ubuntu 22 image build using docker
- base image from `Dockerfile.base.ubuntu22`
- build image from `Dockerfile.build.ubuntu22`, followed by
- target image from `Dockerfile.gNB.ubuntu22`
- target image from `Dockerfile.nr-cuup.ubuntu22`
- target image from `Dockerfile.nrUE.ubuntu22`
- target image from `Dockerfile.gNB.aerial.ubuntu22`
#### Image Test pipelines
- [OAI-CN5G-COTS-UE-Test](https://jenkins-oai.eurecom.fr/job/OAI-CN5G-COTS-UE-Test/)
~5G-NR
- using 5GC bench (resources `CI-Cetautomatix-OC-oaicicd-session`, `CI-Dogmatix-CN5G-gNB`): Attach/Detach of UE with multiple PDU sessions
- [OAI-FLEXRIC-RAN-Integration-Test](https://jenkins-oai.eurecom.fr/job/OAI-FLEXRIC-RAN-Integration-Test/) ~5G-NR
- [OAI-FLEXRIC-RAN-Integration-Test](https://jenkins-oai.eurecom.fr/job/OAI-FLEXRIC-RAN-Integration-Test/) ~5G-NR ~nrUE
- selfix (gNB, nrUE, OAI 5GC, FlexRIC)
- uses RFsimulator, tests FlexRIC/E2 interface and xApps
- [RAN-gNB-N300-Timing-Phytest-LDPC](https://jenkins-oai.eurecom.fr/view/RAN/job/RAN-gNB-N300-Timing-Phytest-LDPC/)
@@ -160,7 +170,7 @@ information on how the images are built.
- nepes + B200 (eNB), ofqot + B200 (gNB), idefix + Quectel, nepes w/ ltebox
- basic NSA test
- [RAN-PhySim-Cluster](https://jenkins-oai.eurecom.fr/job/RAN-PhySim-Cluster/)
~4G-LTE ~5G-NR
~4G-LTE ~5G-NR ~nrUE
- cluster (`Asterix-OC-oaicicd-session` resource), tests in OpenShift Cluster
- unitary simulators (`nr_dlsim`, etc.)
- see [`./physical-simulators.md`](./physical-simulators.md) for an overview
@@ -169,7 +179,7 @@ information on how the images are built.
- cacofonix (eNB, lteUE, OAI EPC)
- uses RFsimulator, for FDD 5, 10, 20MHz with core, 5MHz noS1
- [RAN-RF-Sim-Test-5G](https://jenkins-oai.eurecom.fr/job/RAN-RF-Sim-Test-5G/)
~5G-NR
~5G-NR ~nrUE
- cacofonix (gNB, nrUE, OAI 5GC)
- uses RFsimulator, TDD 40MHz, FDD 40MHz, F1 split
- [RAN-SA-AW2S-CN5G](https://jenkins-oai.eurecom.fr/job/RAN-SA-AW2S-CN5G/)
@@ -182,7 +192,7 @@ information on how the images are built.
- ofqot + B200, idefix + Quectel, nepes w/ sabox
- basic SA test (20 MHz TDD), F1, reestablishment, ...
- [RAN-SA-OAIUE-CN5G](https://jenkins-oai.eurecom.fr/job/RAN-SA-OAIUE-CN5G/)
~5G-NR
~5G-NR ~nrUE
- 5G-NR SA test setup: gNB on avra + N310, OAIUE on caracal + N310, OAI CN5G
- OpenShift cluster for CN deployment and container images for gNB and UE deployment
- [RAN-SA-AERIAL-CN5G](https://jenkins-oai.eurecom.fr/job/RAN-SA-AERIAL-CN5G/)

View File

@@ -2,7 +2,7 @@
OAI uses/supports a number of environment variables, documented in the following:
- `NFAPI_TRACE_LEVEL`: set the nfapi custom logging framework's log level; can be one of `error`, `warn`, `note`, `info`, `debug`
- `NFAPI_TRACE_LEVEL`: set the nfapi custom logging framework's log level; can be one of `error`, `warn`, `note`, `info`, `debug`. Default is `warn`.
- `NR_AWGN_RESULTS_DIR`: directory containing BLER curves for L2simulator channel modelling in SISO case
- `NR_MIMO2x2_AWGN_RESULTS_DIR`: directory containing BLER curves for L2simulator channel modelling in 2x2 MIMO case
- `NVRAM_DIR`: directory to read/write NVRAM data in (5G) `nvram` tool; if not defined, will use `PWD` (working directory)

137
doc/nfapi.md Normal file
View File

@@ -0,0 +1,137 @@
This document describes the SmallCellForum (SCF) (n)FAPI split in 5G, i.e.,
between the MAC/L2 and PHY/L1.
The interested reader is recommended to read a copy of the SCF 222.10
specification ("FAPI"). This includes information on what is P5, P7, and how
FAPI works. The currently used version is SCF 222.10.02, with some messages
upgraded to SCF 222.10.04 due to bugfixes in the spec. Further information
about nFAPI can be found in SCF 225.2.0.
# Quickstart
Compile OAI as normal. Start the CN and make sure that the VNF configuration
matches the PLMN/IP addresses. Then, run the VNF
sudo NFAPI_TRACE_LEVEL=info ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-vnf.sa.band78.106prb.nfapi.conf --nfapi VNF
Afterwards, start and connect the PNF
sudo NFAPI_TRACE_LEVEL=info ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-pnf.band78.rfsim.conf --nfapi PNF --rfsim
Finally, you can start the UE (observe the radio configuration info in the
VNF!)
sudo ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 -O ue.conf
You should not observe a difference between nFAPI split and monolithic.
# Status
All FAPI message can be transferred between VNF and PNF. This is because OAI
uses FAPI with its corresponding messages internally, whether a split is in use
or not.
The nFAPI split mode supports any radio configuration that is also supported by
the monolithic gNB, with the notable exceptions that only numerologies of 15kHz
and 30kHz (mu=0 and mu=1, respectively) are supported.
The VNF requests to be notified about every slot by the PNF. No delay
management is employed as of now; instead, the PNF sends a Slot.indication to
the VNF in every slot (in divergence from the nFAPI spec).
Currently, downlink transmissions work the same in monolithic and nFAPI. In
uplink, we observe an increased number of retransmissions, which limits the MCS
and hence the achievable throughput (which is limited to 10-20Mbps). We are still
debugging the root cause of this.
After stopping the PNF, you also have to restart the VNF.
When using RFsim, the system might run slower than in monolithic. This is
because the PNF needs to slow down the execution time of a specific slot,
because it has to send a Slot.indication to the VNF for scheduling.
# Configuration
Both PNF and VNF are run through the `nr-softmodem` executable. The type of
mode is switched through the `--nfapi` switch, with options `MONOLITHIC`
(default if not provided), `VNF`, `PNF`.
If the type is `VNF`, you have to modify the `MACRLCs.tr_s_preference`
(transport south preference) to `nfapi`. Further, configure these options:
- `MACRLCs.remote_s_address` (remote south address): IP of the PNF
- `MACRLCs.local_s_address` (local south address): IP of the VNF
- `MACRLCs.local_s_portc` (local south port for control): VNF's P5 local port
- `MACRLCs.remote_s_portc` (remote south port for data): PNF's P5 remote port
- `MACRLCs.local_s_portd` (local south port for control): VNF's P5 local port
- `MACRLCs.remote_s_portd` (remote south port for data): PNF's P7 remote port
Note that any L1-specific section (`L1s`, `RUs`,
RFsimulator-specific/IF7.2-specific configuration or other radios, if
necessary) will be ignored and can be deleted.
If the type is `PNF`, you have to modify modify the `L1s.tr_n_preference`
(transport north preference) to `nfapi`. Further, configure these options:
- `L1s.remote_n_address` (remote north address): IP of the VNF
- `L1s.local_n_address` (local north address): IP of the PNF
- `L1s.local_n_portc` (local north port for control): PNF's P5 local port
- `L1s.remote_n_portc` (remote north port for control): VNF's P5 remote port
- `L1s.local_n_portd` (local north port for data): PNF's P7 local port
- `L1s.remote_n_portd` (remote north port for data): VNF's P7 remote port
Note that this file should contain additional, L1-specific sections (`L1s`,
`RUs` RFsimulator-specific/IF7.2-specific configuration or other radios, if
necessary).
To split an existing config file `monolithic.conf` for nFAPI operation, you
can proceed as follows:
- copy `monolithic.conf`, which will be your VNF file (`vnf.conf`)
- in `vnf.conf`
* modify `MACRLCs` section to configure south-bound nFAPI transport
* delete `L1s`, `RUs`, and radio-specific sections.
* in `gNBs` section, increase the `ra_ResponseWindow` by one to extend the RA
window: this is necessary because the PNF triggers the scheduler in the VNF
in advance, which might make the RA window more likely to run out
- copy `monolithic.conf`, which will be your PNF file (`pnf.conf`)
- in `pnf.conf`
* modify `L1s` section to configure north-bound nFAPI transport (make sure it
matches the `MACRLCs` section for `vnf.conf`
* delete all the `gNBs`, `MACRLCs`, `security` sections (they are not needed)
- if you have root-level options in `monolithic.conf`, such as
`usrp-tx-thread-config` or `tune-offset`, make sure to to add them to
`pnf.conf`, or provide them on the command line for the PNF.
- to run, proceed as described in the quick start above.
Note: all L1-specific options have to be passed to the PNF, and remaining
options to the VNF.
# nFAPI logging system
nFAPI has its own logging system, independent of OAI's. It can be activated by
setting the `NFAPI_TRACE_LEVEL` environment variable to an appropriate value;
see [the environment variables documentation](./environment-variables.md) for
more info.
To see the (any) periodical output at the PNF, define `NFAPI_TRACE_LEVEL=info`.
This output shows:
```
41056.739654 [I] 3556767424: pnf_p7_slot_ind: [P7:1] msgs ontime 489 thr DL 0.06 UL 0.01 msg late 0 (vtime)
```
The first numbers are timestamps. `pnf_p7_slot_ind` is the name of the
functions that prints the output. `[P7:1]` refers to the fact that these are
information on P7, of PHY ID 1. Finally, `msgs ontime 489` means that in the
last window (since the last print), 489 messages arrived at the PNF in total.
The combined throughput of `TX_data.requests` (DL traffic) was 0.06 Mbps; note
that this includes SIB1 and other periodical data channels. In UL, 0.01 Mbps
have been sent through `RX_data.indication`. `msg late 0` means that 0 packets
have been late. _This number is an aggregate over the total runtime_, unlike
the other messages. Finally, `(vtime)` is a reminder that the calculations are
done over virtual time, i.e., frames/slots as executed by the 5G Systems. For
instance, these numbers might be slightly higher or slower in RFsim than in
wall-clock time, depending if the system advances faster or slower than
wall-clock time.

View File

@@ -72,6 +72,7 @@ COPY --from=gnb-build \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv_ci.so \
/oai-ran/cmake_targets/ran_build/build/libparams_yaml.so \
/oai-ran/cmake_targets/ran_build/build/libvrtsim.so \
/usr/local/lib/
COPY --from=gnb-base \

View File

@@ -69,6 +69,7 @@ COPY --from=gnb-build \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv_ci.so \
/oai-ran/cmake_targets/ran_build/build/libparams_yaml.so \
/oai-ran/cmake_targets/ran_build/build/libvrtsim.so \
/usr/local/lib/
COPY --from=gnb-base \

View File

@@ -77,7 +77,18 @@ RUN apt-get update && \
# library version. Installing it above would install the wrong version. Hence,
# copy the right version from ran-build. When upgrading to Ubuntu24, install
# the correct one above!
COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libasan.so.8.0.0 /usr/lib/x86_64-linux-gnu/
# note: this dockerfile should work for both x86 and arm, hence the glob below
# which should either match "x86_64" (x86) or "aarch64" (ARM); since the target
# directory needs to be also one of those two, but globs don't work in target
# directories, work around this with mv
COPY --from=gnb-build /usr/lib/*-linux-gnu/libasan.so.8.0.0 /usr/lib/
ARG TARGETPLATFORM
RUN case "${TARGETPLATFORM}" in \
"linux/amd64") TARGET_DIR=x86_64-linux-gnu ;; \
"linux/arm64") TARGET_DIR=aarch64-linux-gnu ;; \
*) exit 1 ;; \
esac; \
mv /usr/lib/libasan.so.8.0.0 /usr/lib/$TARGET_DIR/libasan.so.8.0.0
WORKDIR /opt/oai-gnb/bin
COPY --from=gnb-build \
@@ -99,6 +110,7 @@ COPY --from=gnb-build \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv_5Gue.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv_rrc.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv_o1.so \
/oai-ran/cmake_targets/ran_build/build/libvrtsim.so \
/usr/local/lib/
# Now we are copying from builder-image the UHD files.

View File

@@ -54,7 +54,18 @@ RUN apt-get update && \
# library version. Installing it above would install the wrong version. Hence,
# copy the right version from ran-build. When upgrading to Ubuntu24, install
# the correct one above!
COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libasan.so.8.0.0 /usr/lib/x86_64-linux-gnu/
# note: this dockerfile should work for both x86 and arm, hence the glob below
# which should either match "x86_64" (x86) or "aarch64" (ARM); since the target
# directory needs to be also one of those two, but globs don't work in target
# directories, work around this with mv
COPY --from=gnb-build /usr/lib/*-linux-gnu/libasan.so.8.0.0 /usr/lib/
ARG TARGETPLATFORM
RUN case "${TARGETPLATFORM}" in \
"linux/amd64") TARGET_DIR=x86_64-linux-gnu ;; \
"linux/arm64") TARGET_DIR=aarch64-linux-gnu ;; \
*) exit 1 ;; \
esac; \
mv /usr/lib/libasan.so.8.0.0 /usr/lib/$TARGET_DIR/libasan.so.8.0.0
## Copy E2 SM models
COPY --from=gnb-build /usr/local/lib/flexric /usr/local/lib/flexric

View File

@@ -75,6 +75,7 @@ COPY --from=nr-ue-build \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv_5Gue.so \
/oai-ran/cmake_targets/ran_build/build/libparams_yaml.so \
/oai-ran/cmake_targets/ran_build/build/libvrtsim.so \
/usr/local/lib/
COPY --from=nr-ue-base \

View File

@@ -72,6 +72,7 @@ COPY --from=nr-ue-build \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv_5Gue.so \
/oai-ran/cmake_targets/ran_build/build/libparams_yaml.so \
/oai-ran/cmake_targets/ran_build/build/libvrtsim.so \
/usr/local/lib/
COPY --from=nr-ue-base \

View File

@@ -77,7 +77,18 @@ RUN apt-get update && \
# library version. Installing it above would install the wrong version. Hence,
# copy the right version from ran-build. When upgrading to Ubuntu24, install
# the correct one above!
COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libasan.so.8.0.0 /usr/lib/x86_64-linux-gnu/
# note: this dockerfile should work for both x86 and arm, hence the glob below
# which should either match "x86_64" (x86) or "aarch64" (ARM); since the target
# directory needs to be also one of those two, but globs don't work in target
# directories, work around this with mv
COPY --from=nr-ue-build /usr/lib/*-linux-gnu/libasan.so.8.0.0 /usr/lib/
ARG TARGETPLATFORM
RUN case "${TARGETPLATFORM}" in \
"linux/amd64") TARGET_DIR=x86_64-linux-gnu ;; \
"linux/arm64") TARGET_DIR=aarch64-linux-gnu ;; \
*) exit 1 ;; \
esac; \
mv /usr/lib/libasan.so.8.0.0 /usr/lib/$TARGET_DIR/libasan.so.8.0.0
WORKDIR /opt/oai-nr-ue/bin
COPY --from=nr-ue-build \
@@ -99,6 +110,7 @@ COPY --from=nr-ue-build \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv_ciUE.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv_5Gue.so \
/oai-ran/cmake_targets/ran_build/build/libparams_yaml.so \
/oai-ran/cmake_targets/ran_build/build/libvrtsim.so \
/usr/local/lib/
# Now we are copying from builder-image the UHD files.

View File

@@ -568,7 +568,7 @@ int wakeup_rxtx(PHY_VARS_eNB *eNB,
LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms;
int ret;
LOG_D(PHY,"ENTERED wakeup_rxtx, %d.%d\n",ru_proc->frame_rx,ru_proc->tti_rx);
// wake up TX for subframe n+sl_ahead
// wake up TX for subframe n+sf_ahead
// lock the TX mutex and make sure the thread is ready
AssertFatal((ret=pthread_mutex_lock(&L1_proc->mutex)) == 0,"mutex_lock returns %d\n", ret);

View File

@@ -195,6 +195,15 @@ void handle_nr_srs_measurements(const module_id_t module_id,
/* forward declarations */
void set_default_frame_parms(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs]);
/* TODO these declarations are to be removed */
void nr_schedule_dl_tti_req(void) {};
void nr_schedule_ul_dci_req() {};
void nr_schedule_tx_req() {};
void nr_schedule_ul_tti_req() {};
void nr_slot_select() {};
void NR_UL_indication(NR_UL_IND_t *UL_INFO) {};
void gNB_dlsch_ulsch_scheduler() {};
/*---------------------BMC: timespec helpers -----------------------------*/
struct timespec min_diff_time = { .tv_sec = 0, .tv_nsec = 0 };

View File

@@ -1726,7 +1726,8 @@ void *UE_thread(void *arg) {
pthread_mutex_unlock(&sync_mutex);
*/
wait_sync("UE thread");
#ifdef NAS_UE
#ifdef NAS_BUILT_IN_UE
MessageDef *message_p;
message_p = itti_alloc_new_message(TASK_NAS_UE, 0, INITIALIZE_MESSAGE);
itti_send_msg_to_task (TASK_NAS_UE, UE->Mod_id + NB_eNB_INST, message_p);
@@ -2089,7 +2090,7 @@ void init_UE_single_thread_stub(int nb_inst) {
AssertFatal(PHY_vars_UE_g[i][0]!=NULL,"PHY_vars_UE_g[inst][0] is NULL\n");
if(NFAPI_MODE==NFAPI_UE_STUB_PNF || NFAPI_MODE==NFAPI_MODE_STANDALONE_PNF) {
#ifdef NAS_UE
#ifdef NAS_BUILT_IN_UE
MessageDef *message_p;
message_p = itti_alloc_new_message(TASK_NAS_UE, 0, INITIALIZE_MESSAGE);
itti_send_msg_to_task (TASK_NAS_UE, i + NB_eNB_INST, message_p);

View File

@@ -155,6 +155,12 @@ double cpuf;
extern char uecap_xer[1024];
char uecap_xer_in=0;
/* TODO these declarations are to be removed */
void nr_schedule_dl_tti_req(void) {};
void nr_schedule_ul_dci_req() {};
void nr_schedule_tx_req() {};
void nr_schedule_ul_tti_req() {};
void nr_slot_select() {};
/* see file openair2/LAYER2/MAC/main.c for why abstraction_flag is needed
* this is very hackish - find a proper solution

View File

@@ -172,6 +172,7 @@ int main(int argc, char **argv)
MessageDef *msg = RCconfig_NR_CU_E1(&e1type);
AssertFatal(msg != NULL, "Send init to task for E1AP UP failed\n");
itti_send_msg_to_task(TASK_CUUP_E1, 0, msg);
LOG_D(E1AP, "Send E1AP REGISTER REQ to TASK_CUUP_E1\n");
#ifdef E2_AGENT
//////////////////////////////////

View File

@@ -36,7 +36,6 @@
#include "assertions.h"
#include <common/utils/LOG/log.h>
#include <common/utils/system.h>
#include "rt_profiling.h"
#include "PHY/types.h"
@@ -49,7 +48,6 @@
#include "PHY/MODULATION/nr_modulation.h"
#include "PHY/NR_TRANSPORT/nr_dlsch.h"
#include "openair2/NR_PHY_INTERFACE/nr_sched_response.h"
#include "LAYER2/NR_MAC_COMMON/nr_mac_extern.h"
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
#include "radio/COMMON/common_lib.h"
@@ -91,12 +89,6 @@ static void tx_func(processingData_L1tx_t *info)
int slot_tx = info->slot;
int frame_rx = info->frame_rx;
int slot_rx = info->slot_rx;
int64_t absslot_tx = info->timestamp_tx / info->gNB->frame_parms.get_samples_per_slot(slot_tx, &info->gNB->frame_parms);
int64_t absslot_rx = absslot_tx - info->gNB->RU_list[0]->sl_ahead;
if (absslot_rx < 0) {
LOG_W(NR_PHY, "Slot ahead %d is larger than absslot_tx %ld. Cannot start TX yet.\n", info->gNB->RU_list[0]->sl_ahead, absslot_tx);
return;
}
LOG_D(NR_PHY, "%d.%d running tx_func\n", frame_tx, slot_tx);
PHY_VARS_gNB *gNB = info->gNB;
module_id_t module_id = gNB->Mod_id;
@@ -134,8 +126,6 @@ static void tx_func(processingData_L1tx_t *info)
if (tx_slot_type == NR_DOWNLINK_SLOT || tx_slot_type == NR_MIXED_SLOT || get_softmodem_params()->continuous_tx) {
start_meas(&info->gNB->phy_proc_tx);
phy_procedures_gNB_TX(info, frame_tx, slot_tx, 1);
const int rt_prof_idx = absslot_rx % RT_PROF_DEPTH;
clock_gettime(CLOCK_MONOTONIC, &info->gNB->rt_L1_profiling.return_L1_TX[rt_prof_idx]);
PHY_VARS_gNB *gNB = info->gNB;
processingData_RU_t syncMsgRU;
@@ -147,9 +137,14 @@ static void tx_func(processingData_L1tx_t *info)
ru_tx_func((void *)&syncMsgRU);
stop_meas(&info->gNB->phy_proc_tx);
}
/* this thread is done with the sched_info, decrease the reference counter */
LOG_D(NR_PHY, "Calling deref_sched_response for id %d (tx_func) in %d.%d\n", info->sched_response_id, frame_tx, slot_tx);
deref_sched_response(info->sched_response_id);
if (NFAPI_MODE == NFAPI_MONOLITHIC) {
/* this thread is done with the sched_info, decrease the reference counter.
* This only applies for monolithic; in the PNF, the memory is allocated in
* a ring buffer that should never be overwritten (one frame duration). */
LOG_D(NR_PHY, "Calling deref_sched_response for id %d (tx_func) in %d.%d\n", info->sched_response_id, frame_tx, slot_tx);
deref_sched_response(info->sched_response_id);
}
}
void *L1_rx_thread(void *arg)
@@ -187,24 +182,6 @@ static void rx_func(processingData_L1_t *info)
int frame_rx = info->frame_rx;
int slot_rx = info->slot_rx;
nfapi_nr_config_request_scf_t *cfg = &gNB->gNB_config;
int cumul_samples = gNB->frame_parms.get_samples_per_slot(0, &gNB->frame_parms);
int i = 1;
for (; i < gNB->frame_parms.slots_per_subframe / 2; i++)
cumul_samples += gNB->frame_parms.get_samples_per_slot(i, &gNB->frame_parms);
int samples = cumul_samples / i;
int64_t absslot_tx = info->timestamp_tx / samples;
int64_t absslot_rx = absslot_tx - gNB->RU_list[0]->sl_ahead;
int rt_prof_idx = absslot_rx % RT_PROF_DEPTH;
clock_gettime(CLOCK_MONOTONIC, &info->gNB->rt_L1_profiling.start_L1_RX[rt_prof_idx]);
// *******************************************************************
if (NFAPI_MODE == NFAPI_MODE_PNF) {
// I am a PNF and I need to let nFAPI know that we have a (sub)frame tick
// LOG_D(PHY, "oai_nfapi_slot_ind(frame:%u, slot:%d) ********\n", frame_rx, slot_rx);
handle_nr_slot_ind(frame_rx, slot_rx);
}
// ****************************************
// RX processing
int rx_slot_type = nr_slot_select(cfg, frame_rx, slot_rx);
@@ -241,7 +218,6 @@ static void rx_func(processingData_L1_t *info)
gNB->if_inst->NR_UL_indication(&UL_INFO);
stop_meas(&gNB->ul_indication_stats);
#ifndef OAI_FHI72
notifiedFIFO_elt_t *res = newNotifiedFIFO_elt(sizeof(processingData_L1_t), 0, &gNB->L1_rx_out, NULL);
processingData_L1_t *syncMsg = NotifiedFifoData(res);
syncMsg->gNB = gNB;
@@ -250,10 +226,8 @@ static void rx_func(processingData_L1_t *info)
res->key = slot_rx;
LOG_D(NR_PHY, "Signaling completion for %d.%d (mod_slot %d) on L1_rx_out\n", frame_rx, slot_rx, slot_rx % RU_RX_SLOT_DEPTH);
pushNotifiedFIFO(&gNB->L1_rx_out, res);
#endif
}
clock_gettime(CLOCK_MONOTONIC, &info->gNB->rt_L1_profiling.return_L1_RX[rt_prof_idx]);
}
static size_t dump_L1_meas_stats(PHY_VARS_gNB *gNB, RU_t *ru, char *output, size_t outputlen) {
@@ -331,7 +305,13 @@ void *nrL1_stats_thread(void *param) {
return(NULL);
}
void init_gNB_Tpool(int inst) {
void init_gNB_Tpool(int inst)
{
AssertFatal(NFAPI_MODE == NFAPI_MODE_PNF || NFAPI_MODE == NFAPI_MONOLITHIC,
"illegal NFAPI_MODE %d (%s): it cannot have an L1\n",
NFAPI_MODE,
nfapi_get_strmode());
PHY_VARS_gNB *gNB;
gNB = RC.gNB[inst];
gNB_L1_proc_t *proc = &gNB->proc;
@@ -364,8 +344,7 @@ void init_gNB_Tpool(int inst) {
// this will be removed when the msgDataTx is not necessary anymore
gNB->msgDataTx = msgDataTx;
if ((!get_softmodem_params()->emulate_l1) && (!IS_SOFTMODEM_NOSTATS) && (NFAPI_MODE != NFAPI_MODE_VNF)
&& (NFAPI_MODE != NFAPI_MODE_AERIAL))
if (!IS_SOFTMODEM_NOSTATS)
threadCreate(&proc->L1_stats_thread, nrL1_stats_thread, (void *)gNB, "L1_stats", -1, OAI_PRIORITY_RT_LOW);
}
@@ -384,8 +363,7 @@ void term_gNB_Tpool(int inst) {
abortNotifiedFIFO(&gNB->L1_rx_out);
gNB_L1_proc_t *proc = &gNB->proc;
if (!get_softmodem_params()->emulate_l1)
pthread_join(proc->L1_stats_thread, NULL);
pthread_join(proc->L1_stats_thread, NULL);
}
/// eNB kept in function name for nffapi calls, TO FIX
@@ -393,7 +371,7 @@ void init_eNB_afterRU(void) {
int inst,ru_id,i,aa;
PHY_VARS_gNB *gNB;
for (inst=0; inst<RC.nb_nr_inst; inst++) {
for (inst=0; inst<RC.nb_nr_L1_inst; inst++) {
gNB = RC.gNB[inst];
phy_init_nr_gNB(gNB);

View File

@@ -33,7 +33,6 @@
#include "common/utils/assertions.h"
#include "common/utils/system.h"
#include "common/ran_context.h"
#include "rt_profiling.h"
#include "radio/COMMON/common_lib.h"
#include "radio/ETHERNET/ethernet_lib.h"
@@ -69,7 +68,6 @@ static int DEFRUTPCORES[] = {-1,-1,-1,-1};
#include <nfapi/oai_integration/vendor_ext.h>
#include "executables/nr-softmodem-common.h"
int sl_ahead;
static void NRRCconfig_RU(configmodule_interface_t *cfg);
/*************************************************************/
@@ -1038,15 +1036,6 @@ void ru_tx_func(void *param)
int print_frame = 8;
char filename[40];
int cumul_samples = fp->get_samples_per_slot(0, fp);
int i = 1;
for (; i < fp->slots_per_subframe / 2; i++)
cumul_samples += fp->get_samples_per_slot(i, fp);
int samples = cumul_samples / i;
int64_t absslot_tx = info->timestamp_tx / samples;
int64_t absslot_rx = absslot_tx - ru->sl_ahead;
int rt_prof_idx = absslot_rx % RT_PROF_DEPTH;
clock_gettime(CLOCK_MONOTONIC,&ru->rt_ru_profiling.start_RU_TX[rt_prof_idx]);
// do TX front-end processing if needed (precoding and/or IDFTs)
if (ru->feptx_prec)
ru->feptx_prec(ru,frame_tx,slot_tx);
@@ -1093,11 +1082,48 @@ void ru_tx_func(void *param)
}//for (i=0; i<ru->nb_tx; i++)
}//if(frame_tx == print_frame)
}//else emulate_rf
clock_gettime(CLOCK_MONOTONIC,&ru->rt_ru_profiling.return_RU_TX[rt_prof_idx]);
struct timespec *t0=&ru->rt_ru_profiling.start_RU_TX[rt_prof_idx];
struct timespec *t1=&ru->rt_ru_profiling.return_RU_TX[rt_prof_idx];
}
LOG_D(PHY,"rt_prof_idx %d : RU_TX time %d\n",rt_prof_idx,(int)(1e9 * (t1->tv_sec - t0->tv_sec) + (t1->tv_nsec-t0->tv_nsec)));
/* @brief wait for the next RX TTI to be free
*
* Certain radios, e.g., RFsim, can run faster than real-time. This might
* create problems, e.g., if RX and TX get too far from each other. This
* function ensures that a maximum of 4 RX slots are processed at a time (and
* not more than those four are started).
*
* Through the queue L1_rx_out, we are informed about completed RX jobs.
* rx_tti_busy keeps track of individual slots that have been started; this
* function blocks until the current frame/slot is completed, signaled through
* a message.
*
* @param L1_rx_out the queue from which to read completed RX jobs
* @param rx_tti_busy array to mark RX job completion
* @param frame_rx the frame to wait for
* @param slot_rx the slot to wait for
*/
static bool wait_free_rx_tti(notifiedFIFO_t *L1_rx_out, bool rx_tti_busy[RU_RX_SLOT_DEPTH], int frame_rx, int slot_rx)
{
int idx = slot_rx % RU_RX_SLOT_DEPTH;
if (rx_tti_busy[idx]) {
bool not_done = true;
LOG_D(NR_PHY, "%d.%d Waiting to access RX slot %d\n", frame_rx, slot_rx, idx);
// block and wait for frame_rx/slot_rx free from previous slot processing.
// as we can get other slots, we loop on the queue
while (not_done) {
notifiedFIFO_elt_t *res = pullNotifiedFIFO(L1_rx_out);
if (!res)
return false;
processingData_L1_t *info = NotifiedFifoData(res);
LOG_D(NR_PHY, "%d.%d Got access to RX slot %d.%d (%d)\n", frame_rx, slot_rx, info->frame_rx, info->slot_rx, idx);
rx_tti_busy[info->slot_rx % RU_RX_SLOT_DEPTH] = false;
if ((info->slot_rx % RU_RX_SLOT_DEPTH) == idx)
not_done = false;
delNotifiedFIFO_elt(res);
}
}
// set the tti to busy: the caller will process this slot now
rx_tti_busy[idx] = true;
return true;
}
void *ru_thread(void *param)
@@ -1113,9 +1139,7 @@ void *ru_thread(void *param)
char threadname[40];
int initial_wait = 0;
#ifndef OAI_FHI72
bool rx_tti_busy[RU_RX_SLOT_DEPTH] = {false};
#endif
// set default return value
ru_thread_status = 0;
// set default return value
@@ -1216,29 +1240,7 @@ void *ru_thread(void *param)
struct timespec slot_start;
clock_gettime(CLOCK_MONOTONIC, &slot_start);
struct timespec slot_duration;
slot_duration.tv_sec = 0;
//slot_duration.tv_nsec = 0.5e6;
slot_duration.tv_nsec = 0.5e6;
while (!oai_exit) {
if (NFAPI_MODE==NFAPI_MODE_VNF || NFAPI_MODE == NFAPI_MODE_AERIAL ) {
// We should make a VNF main loop with proper tasks calls in case of VNF
slot_start = timespec_add(slot_start,slot_duration);
struct timespec curr_time;
clock_gettime(CLOCK_MONOTONIC, &curr_time);
struct timespec sleep_time;
if((slot_start.tv_sec > curr_time.tv_sec) ||
(slot_start.tv_sec == curr_time.tv_sec && slot_start.tv_nsec > curr_time.tv_nsec)){
sleep_time = timespec_sub(slot_start,curr_time);
usleep(sleep_time.tv_nsec * 1e-3);
}
}
if (slot==(fp->slots_per_frame-1)) {
slot=0;
frame++;
@@ -1273,9 +1275,6 @@ void *ru_thread(void *param)
proc->timestamp_tx += fp->get_samples_per_slot(i % fp->slots_per_frame, fp);
proc->tti_tx = (proc->tti_rx + ru->sl_ahead) % fp->slots_per_frame;
proc->frame_tx = proc->tti_rx > proc->tti_tx ? (proc->frame_rx + 1) & 1023 : proc->frame_rx;
int64_t absslot_rx = proc->timestamp_rx/fp->get_samples_per_slot(proc->tti_rx,fp);
int rt_prof_idx = absslot_rx % RT_PROF_DEPTH;
clock_gettime(CLOCK_MONOTONIC,&ru->rt_ru_profiling.return_RU_south_in[rt_prof_idx]);
LOG_D(PHY,"AFTER fh_south_in - SFN/SL:%d%d RU->proc[RX:%d.%d TX:%d.%d] RC.gNB[0]:[RX:%d%d TX(SFN):%d]\n",
frame,slot,
proc->frame_rx,proc->tti_rx,
@@ -1286,42 +1285,14 @@ void *ru_thread(void *param)
if (ru->idx != 0)
proc->frame_tx = (proc->frame_tx + proc->frame_offset) & 1023;
#ifndef OAI_FHI72
// do RX front-end processing (frequency-shift, dft) if needed
int slot_type = nr_slot_select(&ru->config, proc->frame_rx, proc->tti_rx);
if (slot_type == NR_UPLINK_SLOT || slot_type == NR_MIXED_SLOT) {
if (!wait_free_rx_tti(&gNB->L1_rx_out, rx_tti_busy, proc->frame_rx, proc->tti_rx))
break; // nothing to wait for: we have to stop
if (ru->feprx) {
if (rx_tti_busy[proc->tti_rx % RU_RX_SLOT_DEPTH]) {
bool not_done = true;
LOG_D(NR_PHY, "%d.%d Waiting to access RX slot %d\n", proc->frame_rx, proc->tti_rx, proc->tti_rx % RU_RX_SLOT_DEPTH);
// now we block and wait our slot memory zone is freed from previous slot processing
// as we can get other slots ending, we loop on the queue
notifiedFIFO_elt_t *res = NULL;
while (not_done) {
res = pullNotifiedFIFO(&gNB->L1_rx_out);
if (!res)
break;
processingData_L1_t *info = (processingData_L1_t *)NotifiedFifoData(res);
LOG_D(NR_PHY,
"%d.%d Got access to RX slot %d.%d (%d)\n",
proc->frame_rx,
proc->tti_rx,
info->frame_rx,
info->slot_rx,
proc->tti_rx % RU_RX_SLOT_DEPTH);
rx_tti_busy[info->slot_rx % RU_RX_SLOT_DEPTH] = false;
if ((info->slot_rx % RU_RX_SLOT_DEPTH) == (proc->tti_rx % RU_RX_SLOT_DEPTH))
not_done = false;
delNotifiedFIFO_elt(res);
}
if (!res)
break;
}
// set the tti that was generated to busy
rx_tti_busy[proc->tti_rx % RU_RX_SLOT_DEPTH] = true;
ru->feprx(ru,proc->tti_rx);
LOG_D(NR_PHY, "Setting %d.%d (%d) to busy\n", proc->frame_rx, proc->tti_rx, proc->tti_rx % RU_RX_SLOT_DEPTH);
clock_gettime(CLOCK_MONOTONIC,&ru->rt_ru_profiling.return_RU_feprx[rt_prof_idx]);
//LOG_M("rxdata.m","rxs",ru->common.rxdata[0],1228800,1,1);
LOG_D(PHY,"RU proc: frame_rx = %d, tti_rx = %d\n", proc->frame_rx, proc->tti_rx);
gNBscopeCopy(RC.gNB[0],
@@ -1337,32 +1308,32 @@ void *ru_thread(void *param)
if (prach_id >= 0) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_RU_PRACH_RX, 1 );
T(T_GNB_PHY_PRACH_INPUT_SIGNAL, T_INT(proc->frame_rx), T_INT(proc->tti_rx), T_INT(0),
T_BUFFER(&ru->common.rxdata[0][fp->get_samples_slot_timestamp(proc->tti_rx-1,fp,0)]/*-ru->N_TA_offset*/, fp->get_samples_per_slot(proc->tti_rx,fp)*4*2));
int N_dur = get_nr_prach_duration(ru->prach_list[prach_id].fmt);
T(T_GNB_PHY_PRACH_INPUT_SIGNAL,
T_INT(proc->frame_rx),
T_INT(proc->tti_rx),
T_INT(0),
T_BUFFER(&ru->common.rxdata[0][fp->get_samples_slot_timestamp(proc->tti_rx - 1, fp, 0) /*-ru->N_TA_offset*/],
(fp->get_samples_per_slot(proc->tti_rx - 1, fp) + fp->get_samples_per_slot(proc->tti_rx, fp)) * 4));
RU_PRACH_list_t *p = ru->prach_list + prach_id;
int N_dur = get_nr_prach_duration(p->fmt);
for (int prach_oc = 0; prach_oc<ru->prach_list[prach_id].num_prach_ocas; prach_oc++) {
int prachStartSymbol = ru->prach_list[prach_id].prachStartSymbol + prach_oc * N_dur;
for (int prach_oc = 0; prach_oc < p->num_prach_ocas; prach_oc++) {
int prachStartSymbol = p->prachStartSymbol + prach_oc * N_dur;
//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,
ru->prach_list[prach_id].fmt, //could also use format
ru->prach_list[prach_id].numRA,
p->fmt, // could also use format
p->numRA,
prachStartSymbol,
p->slot,
prach_oc,
proc->frame_rx,
proc->tti_rx);
}
clock_gettime(CLOCK_MONOTONIC,&ru->rt_ru_profiling.return_RU_prachrx[rt_prof_idx]);
free_nr_ru_prach_entry(ru,prach_id);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_RU_PRACH_RX, 0);
} // end if (prach_id > 0)
} // end if (prach_id >= 0)
} // end if (ru->feprx)
else {
memset(&ru->rt_ru_profiling.return_RU_feprx[rt_prof_idx],0,sizeof(struct timespec));
memset(&ru->rt_ru_profiling.return_RU_prachrx[rt_prof_idx],0,sizeof(struct timespec));
}
} // end if (slot_type == NR_UPLINK_SLOT || slot_type == NR_MIXED_SLOT) {
#endif
notifiedFIFO_elt_t *resTx = newNotifiedFIFO_elt(sizeof(processingData_L1tx_t), 0, &gNB->L1_tx_out, NULL);
processingData_L1tx_t *syncMsgTx = NotifiedFifoData(resTx);

View File

@@ -64,8 +64,8 @@
#define CONFIG_HLP_DLBW_PHYTEST "Set the number of PRBs used for DLSCH in PHYTEST mode\n"
#define CONFIG_HLP_ULBW_PHYTEST "Set the number of PRBs used for ULSCH in PHYTEST mode\n"
#define CONFIG_HLP_PRB_SA "Set the number of PRBs for SA\n"
#define CONFIG_HLP_DLBM_PHYTEST "Bitmap for DLSCH slots (slot 0 starts at LSB)\n"
#define CONFIG_HLP_ULBM_PHYTEST "Bitmap for ULSCH slots (slot 0 starts at LSB)\n"
#define CONFIG_HLP_DLBM_PHYTEST "Bitmap for DLSCH slots in period (slot 0 starts at LSB)\n"
#define CONFIG_HLP_ULBM_PHYTEST "Bitmap for ULSCH slots in period (slot 0 starts at LSB)\n"
#define CONFIG_HLP_SSC "Set the start subcarrier \n"
#define CONFIG_HLP_TDD "Set hardware to TDD mode (default: FDD). Used only with -U (otherwise set in config file).\n"
#define CONFIG_HLP_UE "Set the lte softmodem as a UE\n"

View File

@@ -47,7 +47,6 @@ unsigned short config_frames[4] = {2,9,11,13};
#include <string.h>
#include <unistd.h>
#include "LAYER2/nr_pdcp/nr_pdcp_oai_api.h"
#include "NR_MAC_COMMON/nr_mac_extern.h"
#include "NR_PHY_INTERFACE/NR_IF_Module.h"
#include "LAYER2/NR_MAC_gNB/nr_mac_gNB.h"
#include "PHY/INIT/nr_phy_init.h"
@@ -86,6 +85,7 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "time_meas.h"
#include "utils.h"
#include "x2ap_eNB.h"
#include "openair1/SCHED_NR/sched_nr.h"
pthread_cond_t nfapi_sync_cond;
pthread_mutex_t nfapi_sync_mutex;
@@ -116,8 +116,7 @@ double rx_gain[MAX_NUM_CCs][4] = {{110,0,0,0},{20,0,0,0}};
double rx_gain_off = 0.0;
static int tx_max_power[MAX_NUM_CCs]; /* = {0,0}*/;
int chain_offset=0;
extern void *udp_eNB_task(void *args_p);
int chain_offset = 0;
int emulate_rf = 0;
int numerology = 0;
double cpuf;
@@ -398,9 +397,6 @@ void terminate_task(task_id_t task_id, module_id_t mod_id) {
itti_send_msg_to_task (task_id, ENB_MODULE_ID_TO_INSTANCE(mod_id), msg);
}
//extern void free_transport(PHY_VARS_gNB *);
extern void nr_phy_free_RU(RU_t *);
int stop_L1(module_id_t gnb_id)
{
RU_t *ru = RC.ru[gnb_id];
@@ -678,27 +674,30 @@ int main( int argc, char **argv ) {
#endif // E2_AGENT
// wait for F1 Setup Response before starting L1 for real
if (NFAPI_MODE != NFAPI_MODE_PNF && (NODE_IS_DU(node_type) || NODE_IS_MONOLITHIC(node_type)))
wait_f1_setup_response();
if (RC.nb_RU > 0)
start_NR_RU();
#ifdef ENABLE_AERIAL
gNB_MAC_INST *nrmac = RC.nrmac[0];
nvIPC_Init(nrmac->nvipc_params_s);
#endif
for (int idx = 0; idx < RC.nb_nr_L1_inst; idx++)
RC.gNB[idx]->if_inst->sl_ahead = sl_ahead;
if (NFAPI_MODE==NFAPI_MODE_PNF) {
wait_nfapi_init("main?");
}
// wait for F1 Setup Response before starting L1 for real
if (NODE_IS_DU(node_type) || NODE_IS_MONOLITHIC(node_type))
wait_f1_setup_response();
if (RC.nb_RU > 0)
start_NR_RU();
#ifdef ENABLE_AERIAL
gNB_MAC_INST *nrmac = RC.nrmac[0];
nvIPC_Init(nrmac->nvipc_params_s);
#endif
if (RC.nb_nr_L1_inst > 0) {
wait_RUs();
// once all RUs are ready initialize the rest of the gNBs ((dependence on final RU parameters after configuration)
for (int idx=0;idx<RC.nb_nr_L1_inst;idx++) RC.gNB[idx]->if_inst->sl_ahead = sl_ahead;
if (IS_SOFTMODEM_DOSCOPE || IS_SOFTMODEM_IMSCOPE_ENABLED) {
if (IS_SOFTMODEM_DOSCOPE || IS_SOFTMODEM_IMSCOPE_ENABLED || IS_SOFTMODEM_IMSCOPE_RECORD_ENABLED) {
sleep(1);
scopeParms_t p;
p.argc = &argc;
@@ -711,6 +710,11 @@ int main( int argc, char **argv ) {
if (IS_SOFTMODEM_IMSCOPE_ENABLED) {
load_softscope("im", &p);
}
AssertFatal(!(IS_SOFTMODEM_IMSCOPE_ENABLED && IS_SOFTMODEM_IMSCOPE_RECORD_ENABLED),
"Data recoding and ImScope cannot be enabled at the same time\n");
if (IS_SOFTMODEM_IMSCOPE_RECORD_ENABLED) {
load_module_shlib("imscope_record", NULL, 0, &p);
}
}
if (NFAPI_MODE != NFAPI_MODE_PNF && NFAPI_MODE != NFAPI_MODE_VNF && NFAPI_MODE != NFAPI_MODE_AERIAL) {

Some files were not shown because too many files have changed in this diff Show More