Compare commits

...

211 Commits

Author SHA1 Message Date
Shubhika Garg
33adfe65ad mkdocs: Fix doc/README.md and move the file listings to correct sections 2026-02-23 15:07:32 +01:00
Shubhika Garg
efc00b135c mkdocs: compress logo size 2026-02-23 14:18:57 +01:00
Shubhika Garg
8dd5fb6cac mkdocs: Remove navigation from the yml
- as it will be generated and injected via python script
2026-02-23 13:34:39 +01:00
Shubhika Garg
8abed0ce1d doc: Add short descriptions for common-utilities and L2 emulator doc listings in doc/README.md 2026-02-20 14:26:30 +01:00
Shubhika Garg
fb867b37c2 doc: Add short descriptions for file listings in doc/README.md for consistency 2026-02-20 13:36:16 +01:00
Shubhika Garg
f9cefbfe4b MkDocs: Capitalize document title listings for consistency in doc/README.md 2026-02-20 09:46:49 +01:00
Shubhika Garg
afea13f0fe MkDocs: Add dockerfile to build and serve documentation 2026-02-20 09:28:12 +01:00
Shubhika Garg
14a8500e71 MkDocs: Update README to build MkDocs using Docker 2026-02-20 09:28:12 +01:00
Shubhika Garg
9315f3eaf5 mkdocs: Add markdown pre-processing script and main.py
- main.py: handles navigation generation for mkdocs and Markdown pre-processing
2026-02-20 09:28:12 +01:00
Shubhika Garg
9a5aef9440 mkdocs: rewrite all .md links to directory URLs in rendered HTML
- Added a template override to rewrite links to .md
         files so that they point to the correct directory URLs
         in the published site.
       - README.md links now point to the folder root.
         This resolves 404 errors of page not found.
2026-02-20 09:28:12 +01:00
Shubhika Garg
21f40cf601 mkdocs: suppress not_found link validation to prevent warnings
- Docs reference files outside the docs directory,
         which triggers validation warnings during build.
2026-02-20 09:28:12 +01:00
Shubhika Garg
4149f312fa mkdocs: include additional file types & allow included files to appear in site output
- So docs can reference and display them directly.
2026-02-20 09:28:12 +01:00
Shubhika Garg
5c3fe47510 mkdocs: Add missing file listings in doc/README.md
- Also, re-run the generate navigation script to add those missing listings
        in mkdocs.yml
      - This is because of the following warning during MkDocs build:
        "The following pages exist in the docs directory, but are not included in the "nav" configuration:"
2026-02-20 09:28:12 +01:00
Shubhika Garg
971d066504 mkdocs: Fix formatting for doc/README.md to generate mkdocs nav correctly 2026-02-20 09:28:12 +01:00
Shubhika Garg
ac48d2b7b9 mkdocs: Add missing listing of documents in doc/README.md
- To be able to generate navigation for mkdocs documentation
2026-02-20 09:28:12 +01:00
Shubhika Garg
e7980d1426 mkdocs: Add mkdocs config file 2026-02-20 09:28:12 +01:00
Shubhika Garg
4daa3cf1cb mkdocs: add stylesheets and mkdocs assets 2026-02-20 09:28:12 +01:00
Shubhika Garg
735de0c7c3 mkdocs: add requirements file and script to generate mkdocs nav bar 2026-02-20 09:28:12 +01:00
Shubhika Garg
2fdf3ef4ac doc: Add MkDocs README.md guide 2026-02-20 09:28:12 +01:00
Robert Schmidt
520360a629 Merge branch 'integration_2026_w08' into 'develop'
Integration: `2026.w08`

* !3934 Fix Ubuntu build: reinstate -Werror
* !3803 remove cblas and atlas dependancy
* !3918 Add a simple GTP unit test
* !3924 T: macpdu2wireshark: gentle exit (and some other minor work in the T tracer)
* !3925 Fix race condition on double RA during RRC reestablishment
* !3930 bugfix: add PCell to serving_cells in fallback path and refactor update logic
* !3936 [FHI72] Remove support for xran E release
* !3893 NR Paging on CU

See merge request oai/openairinterface5g!3939
2026-02-20 06:46:39 +00:00
Robert Schmidt
90c6bbce65 Merge remote-tracking branch 'origin/nr-paging-cu' into integration_2026_w08 (!3893)
NR Paging on CU

Implements the NR paging path on the CU:

- NGAP Paging is decoded and passed to RRC
- RRC builds F1AP Paging, and distributes it to DUs via F1 callback

Changes:

- Refactor and extend F1AP Paging encode/decode libraries
  * add missing enc/dec/eq/cp functions
  * add unit test
  * IEs: CN UE 5G-S-TMSI, RAN UE I-RNTI; optional DRX/priority/origin)
- Refactor CU callback CU_send_Paging
- Refactor DU handler DU_handle_Paging
- Refactor old F1 callback for Paging indication, extend it and align
  with existing F1 callbacks in stack
- Refactor and extend NGAP Paging encode/decode lib
  * add missing enc/dec/eq/cp functions
  * add unit test
  * Fixes NGAP paging to accept Paging only on SCTP stream 0 per TS
    38.412
- Includes supporting refactors (PDU session split, shared 5G-S-TMSI
  helpers, NGAP/F1AP cleanups)

Testing

- NGAP and F1AP Paging lib unit tests (enc/dec)
- Stream-0 fix validated with Open5GS AMF

This MR does not address the DU changes besides the F1 handler. F1AP
Paging does not have an RRC container to pass the PCCH message to the
DU, and F1 DL RRC Message Transfer does not apply to PCCH. PCCH-Message
shall be built at DU per TS 38.331 §5.3.2, with padding as per §8.5 and
delivered as RLC SDU per §8.2. For each cell in Paging Cell List that
belongs to this DU, queue for MAC. MAC schedules at PF/PO per TS 38.304
§7.

Refs:

- F1AP 3GPP TS 38.473 version 16.21.0 Release 16
- NGAP 3GPP TS 38.413 version 16.17.0 Release 16
2026-02-18 16:06:09 +01:00
Jaroslava Fiedlerova
e2f20eea8a Merge remote-tracking branch 'origin/remove-xran-e' into integration_2026_w08 (!3936)
[FHI72] Remove support for xran E release

All the use cases we tested with E release are working end-to-end with F release.
The near future plan is to support K release which is ongoing in the MR !3444.
2026-02-18 15:03:58 +01:00
Robert Schmidt
2b7f3e2f72 Merge remote-tracking branch 'origin/rrc-fix-rrcsetup-fallback' into integration_2026_w08 (!3930)
bugfix: add PCell to serving_cells in fallback path and refactor update logic

Fix assertion failure in rrc_gNB_send_NGAP_NAS_FIRST_REQ() when RRC
Reestablishment falls back to RRC Setup. The fallback path was not
adding the PCell to the UE's serving_cells array, causing
rrc_get_pcell_for_ue() to return NULL.

Major changes:

- Add rrc_update_ue_pcell() helper function that handles PCell updates
  for both new UEs (fallback) and existing UEs (normal reestablishment)
- Refactor normal reestablishment path to use rrc_update_ue_pcell()
  helper instead of manual cleanup + add sequence
- Add PCell update to fallback_rrc_setup path using the same helper
- Move C-RNTI validation after current_cell fetch to ensure current_cell
  is initialized before fallback_rrc_setup label
- Change error handling: return instead of fallback when PCell add fails
  in normal reestablishment path

Fixes CI failure in !3908
2026-02-18 10:44:38 +01:00
Teodora
5a339d66f2 Use the same pattern for checking the existance of F_RELEASE definition
In general, `#ifdef` and `#if defined` are the same.

Note: `#elif` is not the same as `#elif defined`.
2026-02-18 09:46:27 +01:00
Teodora
c68068f144 Remove support for xran E release
All the use cases we tested so far, are supported with xran F release.
Therefore, we can proceed with removing the support with E release.

In addition, our plan is to bring the support for K release which is ongoing activity in
the MR https://gitlab.eurecom.fr/oai/openairinterface5g/-/merge_requests/3444.
2026-02-18 09:44:08 +01:00
Robert Schmidt
3520eb3c0d Merge remote-tracking branch 'origin/rrc-race-condition' into integration_2026_w08 (!3925)
Fix race condition on double RA during RRC reestablishment

Sometimes, especially in poor channel conditions, a UE can trigger
multiple RA procedures during RRC reestablishment, causing
reconfigCellGroup to be overwritten with a CellGroup that already has
spCellConfig removed, leading to an assertion failure in
update_cellgroup_for_reestablishment(). See logs below

    [NR_MAC]  456.13 UE 991d: Received Ack of Msg4. CBRA procedure succeeded (UE Connected)
    [NR_MAC] Adding new UE context with RNTI 0x991d
    [NR_PHY] [RAPROC] 461.9 Initiating RA procedure with preamble 8, energy 48.0 dB (I0 274, thres 130), delay 21 start symbol 2 freq index 0
    [NR_MAC] 461.9 UE RA-RNTI 0081 TC-RNTI ecd8: initiating RA procedure
    [NR_MAC] UE ecd8: Sync beam index 0
    [NR_MAC] UE ecd8: Msg3 scheduled at 462.3 (461.18 TDA 2) start 0 RBs 8
    [NR_MAC] UE ecd8: 461.18 Generating RA-Msg2 DCI, RA RNTI 0x81, state 1, preamble_index(RAPID) 8, timing_offset = 21 (estimated distance 820.3 [m])
    [NR_MAC]  462. 3 PUSCH with TC_RNTI 0xecd8 received correctly
    [NR_MAC] Received a MAC CE for C-RNTI with 991d
    [NR_MAC] Remove NR rnti 0xecd8
    [NR_MAC]  462. 3 RA with C-RNTI 991d complete
    [NR_PHY] [RAPROC] 471.19 Initiating RA procedure with preamble 6, energy 51.0 dB (I0 276, thres 130), delay 21 start symbol 2 freq index 0
    [NR_MAC] 471.19 UE RA-RNTI 010d TC-RNTI 022d: initiating RA procedure
    [NR_MAC] UE 022d: Sync beam index 0
    [NR_MAC] UE 022d: Msg3 scheduled at 472.13 (472.8 TDA 2) start 0 RBs 8
    [NR_MAC] UE 022d: 472.8 Generating RA-Msg2 DCI, RA RNTI 0x10d, state 1, preamble_index(RAPID) 6, timing_offset = 21 (estimated distance 820.3 [m])
    [NR_MAC]  472.13 PUSCH with TC_RNTI 0x022d received correctly
    [NR_MAC] Received a MAC CE for C-RNTI with 991d
    [NR_MAC] Remove NR rnti 0x022d
    [NR_MAC]  472.13 RA with C-RNTI 991d complete
    [NR_RRC] [UL] (cellID 1, UE ID 1 RNTI 991d) Received RRCReestablishmentComplete
    [NR_RRC] UE 1 Processing NR_RRCReestablishmentComplete from UE
    [NR_MAC] UE 991d: gNB-DU Configuration Query received, will include CellGroupConfig in response

    Assertion (new_CellGroup->spCellConfig) failed!
    In update_cellgroup_for_reestablishment() /phy/openairinterface5g/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c:666

This MR solves it by skipping the reconfigCellGroup overwrite when it
already holds a valid config with spCellConfig, and by replacing the
fatal assertion on missing spCellConfig with an early return.
2026-02-17 18:16:27 +01:00
Robert Schmidt
a264937825 Merge remote-tracking branch 'origin/T-macpdu-fix' into integration_2026_w08 (!3924)
T: macpdu2wireshark: gentle exit (and some other minor work in the T tracer)

When outputting to a file, typing ctrl+c exits the program without
calling fclose(), leading to loss of traces in the output file.

Let's intercept ctrl+c and exit gently, calling fclose().

Also include a small fix for compilation of _check_vcd, some work on
extract and hacks/plot-ofdm, minor stuff.
2026-02-17 18:10:59 +01:00
Robert Schmidt
8abb535481 Merge remote-tracking branch 'origin/gtp-unit-test' into integration_2026_w08 (!3918)
Add a simple GTP unit test

Add a simple unit test for GTP that as of now tests the main
functionality, i.e., for a single UE, set up a bearer between two
endpoints and checking that traffic sending works. This is a start to
extend it further, e.g., with API changes, extensions to support new
functionality such as IPv6, and refactorings.

A number of supporting cleanup has been done as well.
2026-02-17 18:10:04 +01:00
Robert Schmidt
3671a47a7d Merge remote-tracking branch 'origin/remove-blas-atlas-dep' into integration_2026_w08 (!3803)
remove cblas and atlas dependancy

With new Fedora, we have again the cblas.h place not working

cblas+atlas dependancy is annoying for years

i start this MR to remove this dependancy

first commit: only cleaning: remove dead code, make static functions,
simplify code

after this commit, we see we use blas only in: conjugate_transpose()
that is a quite trivial function H_hermH_plus_sigma2I() a bit more
complex, but still possible to recode mutl_matrix_matrix_col_based() i
think we have the same elsewhere in OAI

atlas is used only in: lin_eq_solver() in don't know if replacement is
hard

We can observe all is related to MMSE, that is also coded in OAI 5G, so
maybe the solution is to use 5G code in 4G

Since nothing seems to be used, we can remove it.
2026-02-17 18:09:09 +01:00
Robert Schmidt
2a925d6cd4 GTP: add second test for tunnels without QFI 2026-02-17 13:56:07 +01:00
Robert Schmidt
d6c7321077 Implement removal of endpoint
For unit testing, allow to remove endpoints such that we could reuse a
port/IP combination.

The function does not take care of endpoints that are still "dangling",
it is the user's responsibility to remove all existing TEIDs.
2026-02-17 13:52:32 +01:00
Robert Schmidt
d290850e59 Add basic GTP unit test
Add a simple unit test that tests sending unidirectional traffic. So
far, it merely replicates what is already in nr-cuup-load-test, but it's
a single executable (so easier to handle), and could be more easily
extended to further tests (e.g., IPv6).

A couple of ideas for refactoring/improvements have been added in
comments in the test.
2026-02-17 13:52:32 +01:00
Guido Casati
df11c946f9 Paging (NGAP): fix stream handling to comply with TS 38.412
Paging messages are classified as non-UE-associated signalling per
3GPP TS 38.412 clause 7 (TL), which requires them to be sent on
stream 0 (or a reserved stream pair).

Paging message is received when UE is in RRC_IDLE or RRC_INACTIVE
state, as the RAN has no active UE context and paging targets the
UE by 5G-S-TMSI rather than RAN-UE-NGAP-ID.

The previous implementation incorrectly rejected paging messages
received on stream 0, causing paging failures when using Open5GS AMF.

Changes:
- Accept paging on stream 0 (non-UE-associated signalling)
- Reject paging on non-zero streams (UE-associated streams)
- Add documentation
2026-02-17 12:25:58 +01:00
Guido Casati
8209dcb5d9 Paging (RRC): refactor NGAP Paging handler in CUCP
RRC now builds F1AP paging messages directly by calling F1AP/direct
callbacks and aligning the CU/DU intergace with the F1AP design in the CU.
Messages are forwarded based on TAI-based cell matching across DUs.

- Remove F1AP_PAGING_IND message def and f1ap_paging_ind_t.
  RRC no longer sends ITTI F1AP_PAGING_IND; it builds f1ap_paging_t
  and passes it to the DU path.

- rrc_gNB_process_PAGING_IND: new signature (rrc, instance, msg)
  with const where appropriate; call in rrc_gnb_task() updated.

- NGAP handler logic: For each TAI, match (PLMN + TAC) to
  rrc->configuration; collect matching TAIs. Build one f1ap_paging_t
  (5G-S-TMSI via nr_construct_5g_s_tmsi(), identity type
  F1AP_PAGING_IDENTITY_CN_UE, optional drx/priority/origin copied
  from ngap_paging_ind_t), call rrc_send_paging_to_dus(), then
  free_f1ap_paging(). Remove the previous AssertFatal stub, CC loop,
  NODE_IS_CU branch, and UE lookup logic: it is now handled by
  F1AP/direct CU callbacks.

- rrc_gNB_du: Add rrc_send_paging_to_dus(rrc, tais, n_tai, msg).
  Iterate DUs with RB_FOREACH; for each DU, fill msg->cells from
  du->cells whose (PLMN + TAC) matches any requested TAI, set
  n_cells, then call rrc->mac_rrc.paging_transfer(du->assoc_id,
  msg). Skip DUs with no matching cells. Prevents duplicate paging
  when multiple TAIs map to the same PLMN.
2026-02-17 12:25:58 +01:00
Guido Casati
6022ac8bf1 Paging (F1AP): wire paging through mac_rrc_dl and use F1AP free/decoding lib on CU/DU
Introduce paging_transfer in the mac_rrc_dl interface so the CU can pass
paging to the DU (F1 or direct). Use the F1AP paging lib on both CU and DU
for decode/free and to avoid leaking the message after send.

- Add f1_paging_transfer_func_t and paging_transfer to nr_mac_rrc_dl_if_s
  (mac_rrc_dl.h, nr_rrc_defs.h).
- F1AP path: paging_f1ap() allocates F1AP_PAGING, copies with cp_f1ap_paging(),
  sends via ITTI to TASK_CU_F1. Direct path: f1_paging_transfer_direct() stub
- CU task: call free_f1ap_paging() after CU_send_Paging() to release the message.
- DU: DU_handle_Paging() uses decode_f1ap_paging()/free_f1ap_paging() from lib,
  returns on decode failure; remove inline ASN.1 IE parsing.
- cleanup outdated header comments in header files
- Left a TODO not in DU code to build PCCH (in F1 and direct paths)
2026-02-17 12:25:58 +01:00
Guido Casati
cf7879f038 Paging (F1AP): refactor CU_send_Paging() to use PAGING message
- Add F1AP_PAGING message type and macro; F1AP defines Paging, not
  Paging Indication. CU task now handles F1AP_PAGING instead of
  F1AP_PAGING_IND.
- In CU_send_Paging(): take const f1ap_paging_t *; replace inline
  ASN.1 encoding with encode_f1ap_paging(); refine memory management;
  clean up in the process

Note: F1AP_PAGING_IND definitions left in place and still used in the
RRC callback - to be removed in a follow-up commit.
2026-02-17 12:25:58 +01:00
Guido Casati
08f0f9369c Paging (F1AP): add F1 paging library (9.2.6.1 3GPP TS 38.473)
Add F1AP Paging library and new message type to follow the existing F1AP
library pattern and to support multi-cell paging and both RAN UE (I-RNTI)
and CN UE (5G-S-TMSI) paging identities at the library level per TS 38.473.

* New library (f1ap_paging.c/h, f1ap_lib_includes.h, CMakeLists.txt)
  - Implement encode/decode/copy/eq/free for F1AP Paging (procedure 9.2.6).
  - Add ASN.1 includes for Paging, PagingIdentity, CN/RAN UE identities.
  - Enables unit testing of Paging enc/dec in f1ap_lib_test.c.

* New types in f1ap_messages_types.h (existing f1ap_paging_ind_t unchanged)
  - f1ap_paging_t: UE Identity Index, paging identity (union + type enum),
    optional paging_drx, paging_priority, paging_origin, and paging_cells[].
  - f1ap_paging_cell_item_t, f1ap_paging_identity_type_t, f1ap_paging_identity_t
    for multi-cell list and RAN/CN identity discrimination.
  - Paging Origin IE is optional per F1AP 8.7.1.2.

Tests: test_f1ap_paging() roundtrip and copy for CN UE (5G-S-TMSI) and
RAN UE (I-RNTI) cases, with optional IEs.
2026-02-17 12:25:58 +01:00
Guido Casati
b026e6b4ee Paging (NGAP): add paging encode/decode library and unit tests (3GPP TS 38.413)
- Refactor ngap_paging_ind_t (openair2/COMMON/ngap_messages_types.h):
  - optional paging_drx and paging_priority as pointers
  - TAI list as tai_list[] and n_tai
  - add optional IEs: Paging Origin, Paging Attempt Information,
    UE Radio Capability for Paging.
  - Introduce nr_tai_t, ngap_paging_attempt_info_t, ngap_paging_origin_t;
  - generate paging enums via FOREACH macros.
- Add NGAP Paging encode/decode/eq/free in openair3/NGAP/ngap_gNB_paging.c
  (encode_ng_paging, decode_ng_paging, eq_ng_paging, free_ng_paging).
- Replace inline Paging decode in ngap_gNB_handle_paging() with
  decode_ng_paging() and add error handling; add eq_ngap_plmn() in
  ngap_common.
- Update rrc_gNB_NGAP.c to use tai_list/n_tai and optional paging_drx
  when forwarding paging to F1AP.
- Add ASN.1 includes for Paging in ngap_msg_includes.h; register
  ngap_gNB_paging.c in root CMakeLists.txt.
- Add NGAP unit test (openair3/NGAP/tests/ngap_lib_test.c): encode/decode
  roundtrip for Paging; tests subdirectory and executable under
  ENABLE_TESTS in openair3/NGAP/CMakeLists.txt.
2026-02-17 12:25:58 +01:00
Guido Casati
41942c96d2 Refactor (NGAP): split out NGAP utilities from common lib
ngap_common.h is for common IEs enc/dec functions, utilities
should go into a separate file. Changes in this commit:

* Add ngap_utils.h (utilities)
* Move helper macros (NGAP_ERROR, NGAP_DEBUG, NGAP_FIND_PROTOCOLIE_BY_ID, etc.) to ngap_utils.h
* Move equality check macros (_NGAP_EQ_CHECK_*) to ngap_utils.h
* Clean up includes

This change is preparatory to the introduction the paging lib with unit
tests, with the goal of reducing the inter-dependency between concurrent
NGAP libs.
2026-02-17 12:25:58 +01:00
Guido Casati
c436f05ea9 Refactor (NGAP): adopt TO_ENUM/TO_TEXT pattern for NGAP enums
TO_ENUM/TO_TEXT are already used in NAS, and can be adopted in NGAP.
To avoid duplication, the following changes are introduced:

* Move text_info_t, TO_ENUM, TO_TEXT to common/utils/utils.h
* Include utils.h include to ngap_messages_types.h, fgs_nas_utils.h, and fgmm_lib.h
* RRC establishment cause: refactor to FOREACH_RRC_ESTABLISHMENT_CAUSE macro
* Cause Group: refactor to FOREACH_CAUSE_GROUP macro
* Radio Network Cause: refactor to FOREACH_CAUSE_RADIO_NETWORK macro
* Protocol Cause: refactor to FOREACH_CAUSE_PROTOCOL macro

This change is preparatory to the introduction the paging lib with unit
tests, with the goal of reducing the inter-dependency between concurrent
NGAP libs.
2026-02-17 12:25:58 +01:00
Guido Casati
3dc8647a58 Refactor (NGAP): add conversion functions to ngap_common.c
These conversion functions will be needed across different
NGAP libraries upon refactoring: tnl_to_bitstring, bitstring_to_tnl
Therefore, they are moved to the common lib.
2026-02-17 12:25:58 +01:00
Guido Casati
e062f40137 Refactor (NGAP): extract PDU session management procedures to dedicated library
PDU session related NGAP messages do not belong to NAS procedures lib.

* Create ngap_gNB_pdu_session_management.c and .h
* Move out ngap_gNB_pdusession_setup_resp, ngap_gNB_pdusession_modify_resp,
  ngap_gNB_pdusession_release_resp from ngap_gNB_nas_procedures.c
* Move encode_ngap_pdusession_setup_response_transfer to ngap_common.c:
  this transfer IE is common used both in PDU Session Management and
  Initial Context Setup, so it's moved to the common lib
* Add ngap_gNB_pdu_session_management.c to CMakeLists.txt
2026-02-17 12:25:58 +01:00
Guido Casati
563a0cfa61 Refactor: unify equality-check macros across protocol libs
This commit centralizes equality-check behavior and removes duplicated
macro implementations across protocol stacks.

Major changes:
- add `common/utils/eq_check.h` with shared `_EQ_CHECK_*`,
  `EQ_CHECK_GENERIC`, and optional-IE pointer helpers
- replace E1AP/F1AP/NAS local equality macros and call sites with
  the shared helpers
- remove duplicated layer-specific error/equality macro definitions from
  common headers and switch includes to `eq_check.h`
- update CMake test flags to define `ENABLE_TESTS` for `e1ap_lib`,
  and 5GS NAS libraries; drop `E1AP_LOG_ERRORS` - equality-check/error
  printing is now consistently controlled by `ENABLE_TESTS`
2026-02-17 12:25:58 +01:00
Guido Casati
f295252b2e Refactor 5G-S-TMSI: harmonize 5G-S-TMSI handling with centralized helpers
Centralizes 5G-S-TMSI bit manipulation logic for consistency and
maintainability. All manual bit operations replaced with documented
helper functions following TS 23.003 bit layout specification.

- Add helper functions for 5G-S-TMSI operations:

  * nr_construct_5g_s_tmsi_part1: 5G-S-TMSI construction is defined
    in 3GPP TS 23.003 and relevant at both gNB and UE side
    * Add helper functions to be later used in NG Paging
    * Adopt in NAS UE
  * nr_extract_5g_s_tmsi_part1() - extract Part1 (39 bits) from full
  * nr_extract_5g_s_tmsi_part2() - extract Part2 (9 bits) from full
  * nr_build_full_5g_s_tmsi() - reconstruct full from Part1+Part2
  * nr_deconstruct_5g_s_tmsi() - deconstruct into components
- Refactor manual bit manipulation to use helper functions:
  * asn1_msg.c: use nr_extract_5g_s_tmsi_part1() in RRCSetupRequest
  * asn1_msg.c: use nr_extract_5g_s_tmsi_part2() in RRCSetupComplete
  * rrc_gNB.c: use nr_build_full_5g_s_tmsi() when reconstructing from parts
  * rrc_gNB.c: use nr_deconstruct_5g_s_tmsi() when extracting components
- Optimize nr_construct_5g_s_tmsi_part1() to reuse extract function
2026-02-17 12:25:58 +01:00
Guido Casati
3c164ef138 Minor (NGAP): clarify ngap_register_gnb_req_t actually refers to NG SETUP REQUEST
There is no such thing as NG Register message, the naming is
inaccurate, however the goal of this commit is only to clarify that
and major refactoring is not yet carried out.
2026-02-17 12:25:58 +01:00
Guido Casati
b27833fbd2 Cleanup (NGAP): remove unused message definitions
* NGAP_PATH_SWITCH_REQ_LOG, NGAP_PATH_SWITCH_REQ_ACK_LOG
* NGAP_UE_CTXT_MODIFICATION_RESP, NGAP_UE_CTXT_MODIFICATION_FAIL, NGAP_UE_CTXT_MODIFICATION_REQ
2026-02-17 12:25:58 +01:00
Guido Casati
2da094dd66 Cleanup (NGAP): remove NR_HandoverPreparationInformation.h from NGAP includes
this is not an NGAP header and does not belong to ngap_msg_includes.h
2026-02-17 12:25:58 +01:00
Guido Casati
372f121cf6 Refactor (RRC): extract rrc_update_ue_pcell() to public API and adopt consistently
Move rrc_update_ue_pcell() from static function in rrc_gNB.c to public
function in rrc_cell_management.c, making it reusable across RRC code
paths. Replace duplicate PCell addition logic in handover paths
(intra-CU and inter-CU) and RRCSetup path with calls to this shared
function.

This eliminates code duplication between handover and RRCSetup paths,
centralizes PCell update logic (including cleanup of old PCell's DU
serving cells) in a single reusable function and makes the function
available for future use in other RRC procedures
2026-02-17 11:36:25 +01:00
Guido Casati
f247a6cc2e fix(RRC): add PCell to serving_cells in fallback path and refactor update logic
Fix assertion failure in rrc_gNB_send_NGAP_NAS_FIRST_REQ() when RRC
Reestablishment falls back to RRC Setup. The fallback path was not
adding the PCell to the UE's serving_cells array, causing
rrc_get_pcell_for_ue() to return NULL.

Major changes:
- Add rrc_update_ue_pcell() helper function that handles PCell updates
  for both new UEs (fallback) and existing UEs (normal reestablishment)
- Refactor normal reestablishment path to use rrc_update_ue_pcell()
  helper instead of manual cleanup + add sequence
- Add PCell update to fallback_rrc_setup path using the same helper
- Move C-RNTI validation after current_cell fetch to ensure current_cell
  is initialized before fallback_rrc_setup label
- Change error handling: return instead of fallback when PCell add fails
  in normal reestablishment path
2026-02-17 11:36:25 +01:00
Cedric Roux
c1f41caa8d T: hacks: plot-ofdm: handle more skipped samples 2026-02-17 11:18:37 +01:00
Cedric Roux
61bdee3e61 T: extract: extract all traces by default 2026-02-17 11:18:37 +01:00
Cedric Roux
0c4655448f T: minor: fix compilation of _check_vcd
"make _check_vcd" was failing.
2026-02-17 11:18:37 +01:00
Cedric Roux
7e74d4c43e T: macpdu2wireshark: gentle exit
When outputting to a file, typing ctrl+c exits the program without calling
fclose(), leading to loss of traces in the output file.

Let's intercept ctrl+c and exit gently, calling fclose().
2026-02-17 11:18:37 +01:00
Teodora
dcfd16bd83 Remove useless definitions for E&F releases in _BySymbol() functions
Those functions are already encapsulated in #ifdef F_RELEASE condition.
2026-02-17 09:58:24 +01:00
Robert Schmidt
8925654c07 Remove unused 4G MMSE code
Since the parent commit, USE_MMSE is not defined. Thus, the
corresponding code is commented out. Since there are no linker problems,
it is obvious that this code is never called, and we can remove it.
2026-02-16 20:05:05 +01:00
Laurent THOMAS
da7897be04 remove cblas and lapack dependency, as the calling code can't be called in present master branch (likely never worked/fished code 2026-02-16 20:05:04 +01:00
Laurent THOMAS
345b44d9b3 re-order the functions to have them in natural C order (function implemented before call). Add a #if to be able to disable never called code, but the flag is not activated in this commit 2026-02-16 20:04:29 +01:00
Laurent THOMAS
b6171949cd only cleaning: remove dead code, make static functions, simplify code 2026-02-16 20:04:29 +01:00
Robert Schmidt
40e61d59a6 Merge branch 'fix-ubuntu-build' into 'develop' (!3934)
Fix Ubuntu build: reinstate -Werror

See merge request oai/openairinterface5g!3934
2026-02-16 14:31:23 +00:00
Robert Schmidt
a159f1b78a Revert "Compile everything in Ubuntu builder"
This reverts commit 16c333b1a3.

I tried to build everything in Ubuntu images, but

- this introduced a regression (ignores $BUILD_OPTION)
- made that we don't use -Werror (when we should)

I tried to fix the use of the first, but it would involve more changes
than I prefer. On the second, we cannot enable -Werror, as FlexRIC does
not build warning-free (in Release mode). We thus have to build only the
targets that we require, and therefore we can keep using build_oai,
which is the simplest option (cf. the first point).
2026-02-16 11:04:11 +01:00
Robert Schmidt
9c1603cfbb Remove BUILD_ARG: Will never build sanitize
xran does not work with Address Sanitizer. Thus, there is no reason to
keep these build arguments.
2026-02-16 11:01:37 +01:00
Jaroslava Fiedlerova
7fa4d018d4 Merge branch 'integration_2026_w07' into 'develop'
Integration: `2026.w07`

* !3899 Solving issues caused by invalid RRC configuration
* !3905 Add undocumented Aerial ERROR.indication vendor specific error codes
* !3896 Add fallbacks for ARMv8a to make it compile
* !3734 vrtsim: add CIR DB playback with CLI flags
* !3886 Integrate GPU-Accelerated Channel Simulation + CI Test Pipeline
* !3907 RRC QoS refactor: PDU Session Modify support, SDAP fixes, and code improvements
* !3891 Fix for split 7.2 DU configurations including DU & RU ethernet addresses
* !3913 Remove VCD signal dumper from NR code
* !3783 RRC: Multi-cell handling architecture
* !3916 CI: Rename RAN-SA-2x2-Module-CN5G pipeline
* !3922 Fix and update tracy tag to v0.13.1
* !3917 Fix SRS power computation
* !3915 Cleanup Cmake: remove some double compilation
* !3883 Improvements in handling beamforming inputs
* !3906 fix(ci): remove git reset command from Jenkinsfile
* !3894 Reimplement BladeRF radio driver, make it work for 5G

Closes #845

See merge request oai/openairinterface5g!3908
2026-02-13 11:41:25 +00:00
Robert Schmidt
bf325466b3 Merge remote-tracking branch 'origin/bladerf_testing' into integration_2026_w07 (!3894)
Reimplement BladeRF radio driver, make it work for 5G

This MR reimplements the BladeRF radio driver such that it is usable for
5G. On the way, we remove unused code, refactor it for readability, and
update configuration.

Tested:

- 40MHz carrier as gNB
- 20MHz carries as gNB

An initial focus was 2x2, but I did not manage to do this yet.
Documentation on the format is here [1] and there is a helper [2]. I
will do this later.

[1] https://www.nuand.com/bladeRF-doc/libbladeRF/v2.6.0/group___s_t_r_e_a_m_i_n_g___f_o_r_m_a_t.html#gga4c61587834fd4de51a8e2d34e14a73b2a92cfbda7a5577c809e2ff6123f8f30b6
[2] https://www.nuand.com/bladeRF-doc/libbladeRF/v2.6.0/group___s_t_r_e_a_m_i_n_g___f_o_r_m_a_t.html#gac754a927c12cd8aa3fc270e9dd9c108e
2026-02-12 17:04:10 +01:00
Maxime
37cb854319 Fix crash on double reestablishment: guard reconfigCellGroup overwrite 2026-02-12 11:03:23 -05:00
Robert Schmidt
d87696e583 Merge remote-tracking branch 'origin/fix-ci-reset' into integration_2026_w07 (!3906)
fix(ci): remove git reset command from Jenkinsfile

- By default, the variable eNB_CommitID is set as 'develop' in the
  config
- When OAI-FLEXRIC-RAN-Integration-Test is triggered by upstream FlexRIC
  push events, it takes develop
- Triggered by RAN takes commit SHA where origin/SHA does not work

Below are issues seen after this week's merge to develop:

    https://jenkins-oai.eurecom.fr/view/RAN/job/RAN-Ubuntu-ARM-Image-Builder/4103/pipeline-overview/?selected-node=44

    08:43:07  + git reset --hard origin/9777d23173a740de7cf982659fae13ad6627d3aa
    08:43:07  fatal: ambiguous argument 'origin/9777d23173a740de7cf982659fae13ad6627d3aa': unknown revision or path not in the working tree.

When triggered through upstream FlexRIC (as a PUSH Event), it is taking
the branch as shown in the logs:

    https://jenkins-oai.eurecom.fr/job/OAI-FLEXRIC-RAN-Integration-Test/3832/pipeline-overview/?selected-node=47

    13:45:27  + git reset --hard origin/develop
    13:45:27  HEAD is now at 9777d23173 Merge branch 'integration_2026_w06' into 'develop'
2026-02-12 15:31:05 +01:00
Robert Schmidt
76c2dbf23f Merge remote-tracking branch 'origin/beam_fix' into integration_2026_w07 (!3883)
Improvements in handling beamforming inputs

Fix a bug in setting analog beamforming structure and improves config
file parameter
2026-02-12 12:04:22 +01:00
Robert Schmidt
7bf290d674 Merge remote-tracking branch 'origin/cleanup-cmake' into integration_2026_w07 (!3915)
Cleanup Cmake: remove some double compilation

Harmonize some cmake code to avoid double compilation, notably around
polar and smallblock. In develop, we just add their sources to other
targets, whereas now we define STATIC libraries (further changed to
shared library in !3856) to avoid double compilation.

With this command line:

    cmake .. -GNinja -DENABLE_TESTS=ON && ninja

shows that before we compile 12631 files, where after it is 12583

there is additional supporting cleanup (move code, remove headers,
types, ...).

there is more harmonization to do, I limited myself to some easy wins.
For instance, we do the same with PDCP/SDAP, and this should be
refactored into STATIC libraries as well.
2026-02-12 12:00:24 +01:00
Robert Schmidt
5d004818d4 Merge remote-tracking branch 'origin/fix-srs-power' into integration_2026_w07 (!3917)
Fix SRS power computation

The SRS symbols have been remapped recently in
srs_estimated_channel_freq, and therefore the calculation of the SRS
power has to retrieve the symbols from different positions.
2026-02-12 11:57:42 +01:00
Robert Schmidt
4d14aac494 Merge remote-tracking branch 'origin/tracy-fix' into integration_2026_w07 (!3922)
Fix and update tracy tag to v0.13.1
2026-02-12 11:57:03 +01:00
Bartosz Podrygajlo
144f0de222 Fix and update tracy tag to v0.13.1 2026-02-12 11:45:02 +01:00
Robert Schmidt
37e969d1ed Merge remote-tracking branch 'origin/ci-pipeline-rename' into integration_2026_w07 (!3916)
CI: Rename RAN-SA-2x2-Module-CN5G pipeline

RAN-SA-2x2-Module-CN5G performs tests not only with 2x2 but also with a
4x4 MIMO configuration. The pipeline name has been generalized to
RAN-SA-Multi-Antenna-CN5G to cover multiple antenna configurations.
2026-02-12 09:08:55 +01:00
Robert Schmidt
a0d2c172ad Merge remote-tracking branch 'origin/rrc-multi-cell' into integration_2026_w07 (!3783)
RRC: Multi-cell handling architecture

This MR implements a foundational multi-cell handling architecture for
RRC by separating DU management from cell management and establishing a
hierarchical cell organization within each DU container. The changes
enable proper multi-cell support where each DU can serve multiple cells,
addressing the previous limitation where DU and cell management were
tightly coupled with the assumption of one cell per DU.

Key Changes:

- Data Structure Separation: Separated for DU containers (DU-specific
  info) from cell containers (cell-specific data)
- Global DU and Cell Trees: Cells are now stored in global RB trees in
  RRC, similarly to DUs
- Du-specific cell seq_arr: within each DU container (du->cells) is
  stored a seq_arr of cells belonging to the DU
- UE Cell Association Framework: Introduced serving_cells array to track
  PCell and SCells for each UE with servCellIndex indexing
- Cell Management Library: Extracted cell management functions into
  rrc_cell_management.c/h for better testability and maintainability

Other relevant changes:

- F1AP Refactoring: cell list definitions, heap allocation to prevent
  stack overflow
- 5G-S-TMSI Helpers: Common helper functions for 3GPP TS 23.003
  compliant construction
- Integration Tests: Comprehensive test suite for DU lookup, cell
  lookup, and UE cell association
- Cell Duplication Checks: Validation in F1 DU configuration update to
  prevent duplicate cells
- Documentation: Updated RRC developer documentation with multi-cell
  architecture details

Validated with RFsim in re-establishment and handover scenarios.
2026-02-12 09:07:58 +01:00
Robert Schmidt
0464329eed Make 5G RRC not depend on LTE code 2026-02-12 08:47:08 +01:00
Robert Schmidt
4d4d0d4dd4 Move RRC config to RRC header, rename
openair2/COMMON/rrc_messages_types.h has mostly 4G types. The only 5G
(gNB) RRC type is gNB_RrcConfigurationReq, which we can move to a header
in the corresponding directory (where it is used).

This allows to separate 5G gNB RRC module from the 4G types in
rrc_messages_types.h in the next commit.
2026-02-12 08:47:08 +01:00
Robert Schmidt
12e9ab1412 Remove unused type 2026-02-12 08:47:08 +01:00
Robert Schmidt
d1aa6b1d7c Remove unused headers 2026-02-12 08:47:07 +01:00
Robert Schmidt
b14127b3ff Remove double-declared C files
Is already linked in through MAC_NR_COMMON.
2026-02-12 08:47:07 +01:00
Robert Schmidt
7da5d3889f Split common_lib.c in separate compilation unit
This avoids double compilation.
2026-02-12 08:47:07 +01:00
Robert Schmidt
e1736b2fb5 Move softmodem-common.c to separate library
This potentially reduces multiple compilation of the same file.
2026-02-12 08:47:07 +01:00
Robert Schmidt
ee1f9dfede Move hashtable to ds/ folder
Notably, remove the include_directories(), which is not necessary, as
most files do not actually use this.
2026-02-12 08:47:07 +01:00
Robert Schmidt
49eeba339a Move smallblock cmake code to subdirectory 2026-02-12 08:47:06 +01:00
Robert Schmidt
f159d22499 Move crc_byte cmake code to subdirectory 2026-02-12 08:47:06 +01:00
Robert Schmidt
76a5aad7c4 Move polar coding cmake code to subdirectory 2026-02-12 08:47:06 +01:00
Robert Schmidt
cc33a01cee Remove unused -lz from simulators
We don't use zlib in the simulators, we don't need this.
2026-02-12 08:47:06 +01:00
Robert Schmidt
7a7ffc18e2 Move reverse_bits*() to separate source file
reversing bits is not NR specific. Think of it like this: LTE code might
use reverse_bits*() as well, but in the old location, it would pull in a
bunch of NR dependencies that are superfluous.
2026-02-12 08:47:06 +01:00
Robert Schmidt
bfc0f9e2a3 Merge remote-tracking branch 'origin/remove_nr_vcd' into integration_2026_w07 (!3913)
Remove VCD signal dumper from NR code

We don't test VCD in 5G NR code (and haven't tested it in 4G for years).
Remove the VCD traces in 5G code to avoid any ambiguity. 4G code remains
in place, as well as the tools to analyze existing traces.
2026-02-12 08:43:27 +01:00
Robert Schmidt
be4461ccca Move GTPV1U cmake code to subdirectory
Move the module cmake code to its subdirectory for better organization,
and  remove superfluous include_directories() that are not recommended
to be used (as it populates all other targets with those directories,
most of which don't need it anyway).

Slightly clean up the module by removing headers to unused dependencies.
The GTP module has a dependency to 4G and 5G RLC, which should not exist
(the RLC modules have a dependency on GTP, not the other way around),
but in this commit, make as little modifications as possible.
2026-02-12 06:48:52 +01:00
Robert Schmidt
11c2791527 Remove 5G code from LTE RRC 2026-02-12 06:14:49 +01:00
Robert Schmidt
9a248b4411 Move rrc_eNB_GTPV1U.c from GTP to LTE RRC module in cmake 2026-02-12 06:14:35 +01:00
Robert Schmidt
d9d18f07fd Remove unused functions 2026-02-12 06:06:19 +01:00
Robert Schmidt
40cfe2e5f2 Remove unused GTP types 2026-02-12 06:02:59 +01:00
Robert Schmidt
abe3ee9624 Fixes bladerf install scripts
- at least in CI, there is no bladerf, so don't try to upgrade a
  firmware (we don't do that either with USRPs)
- the base distro for ubuntu is debian
2026-02-11 18:37:45 +01:00
Robert Schmidt
054d0f55cd base&build: install with BladeRF 2026-02-11 18:37:45 +01:00
Robert Schmidt
16c333b1a3 Compile everything in Ubuntu builder
Compile all targets in Ubuntu build to avoid breakage of software.
Remove ldd in build dockerfile, as we don't need that (can also be
inspected manually).
2026-02-11 18:37:45 +01:00
Robert Schmidt
0a585c1235 Add BladeRF configs 2026-02-11 18:37:45 +01:00
Reem Bahsoun
f83b53d6d1 Update BladeRF documentation 2026-02-11 18:37:45 +01:00
Robert Schmidt
80b5d4ef22 Make functions static, reformat, use logging module
This commit does not introduce a functional change.
2026-02-11 18:37:45 +01:00
Robert Schmidt
792e1ed7d9 Rewrite BladeRF's device_init()
- Add more sampling rates to support, e.g., 40MHz in 5G
- Allocate memory only at end to avoid memory leaks in case of failure
- Group recurring configuration functionality in configure_channel() to
  reduced code duplication and uniform output
- Read maximum TX gain to set maximum automatically, and analogous to
  USRP radio lib
- Check if BladeRF config (buffer size, num transfers, ...) fulfills
  requirements as specified in documentation [1]
- Set BladeRF logging early to see BladeRF output

[1] https://www.nuand.com/bladeRF-doc/libbladeRF/v2.6.0/group___f_n___s_t_r_e_a_m_i_n_g___a_s_y_n_c.html#ga72752f2a047b95544e7686596a409abd

Co-authored-by: Brice Robert <robert@eurecom.fr>
Closes: #845
2026-02-11 18:37:45 +01:00
Robert Schmidt
f14aa8283c Active BladeRF on startup only, introduce BLADERF_CHECK
Don't enable radios twice, and only do it on device startup. Simplify
that function by using a new BLADERF_CHECK macro that checks return
codes and that will be reused in the following commits.
2026-02-11 18:37:45 +01:00
Brice Robert
4fdcb11edd BladeRF: Use global constant for used sampling format 2026-02-11 18:37:45 +01:00
Robert Schmidt
5fdec24b52 Delete unused or useless code
Note: device->Mod_id is deleted in !3831. The calibration table has no
purpose.

Co-authored-by: Brice Robert <robert@eurecom.fr>
2026-02-11 18:37:45 +01:00
Robert Schmidt
93c37e96e6 Make BladeRF library compile
Fixes: dd8a25524a ("remove dead code in common_lib.h")
2026-02-11 18:37:45 +01:00
Robert Schmidt
4e5d92401b Add Debian 12 to list of supported distributions 2026-02-11 18:37:45 +01:00
Robert Schmidt
38975ef120 Allow installation of multiple hardwares in same build_oai invocation
There is no reason to not allow

    ./build_oai -I -w USRP -w BLADERF

To install USRP and BladeRF together (which will be used in the CI in a
later commit). Fix this.
2026-02-11 18:37:45 +01:00
Robert Schmidt
977c484524 Remove option --disable-hardware-dependency 2026-02-11 18:37:45 +01:00
Robert Schmidt
c5834e6c1b Fix nr_srssim linking problems when building with E2 support
In this case, there are a number of linker errors:

    /usr/bin/ld: libL2_NR.a(rrc_gNB.c.o): in function `nr_rrc_transfer_protected_rrc_message':
    /home/richie/oai/openair2/RRC/NR/rrc_gNB.c:330:(.text+0x6f6): undefined reference to `signal_rrc_msg'

However, nr_srssim does not need RRC, while it is being linked in. Thus,
link without nr_rrc and L2. For the remaining two linker problems:

- provide a definition of NR_IF_Module_init() as in most other
  simulators
- move rrc_get_max_nr_csrs() to nr_common.c. It is already declared in
  the corresponding header, and itself does not have anything to do with
  RRC radio configuration, therefore it does not belong to
  nr_radio_config.c
2026-02-11 18:37:45 +01:00
Robert Schmidt
7fd9e99f5c Merge remote-tracking branch 'origin/fix-mplane-du-address' into integration_2026_w07 (!3891)
Fix for split 7.2 DU configurations including DU & RU ethernet addresses

Fix parsing of DU configurations that include both RU and DU ethernet
addresses in the fhi_72 section. The extraneous DU addresses are used in
MPlane to configure the RU.
2026-02-11 15:03:35 +01:00
Robert Schmidt
2a4cbda212 Merge remote-tracking branch 'origin/rrc-qos-refactor' into integration_2026_w07 (!3907)
RRC QoS refactor: PDU Session Modify support, SDAP fixes, and code improvements

The goal of this MR is to prepare the RRC/NGAP layer for the multi-QoS
support. The MR:

- enables PDU Session Resource Modify support in RRC/NGAP/E1AP
- fixes SDAP header mapping
- enables SDAP by default
- refactors QoS flow handling in RRC/NGAP
- improves error handling, and code maintainability in RRC/NGAP

Changes:

- NGAP PDU Session Modify:
  * add NGAP PDU Session Resource Modify Request/Response handling with
    proper error reporting for unrecognized sessions and AMF UE NGAP ID
    validation
- E1AP Bearer Context Modification:
  * add DRB To Remove List IE to support DRB release during modify
  * rename numQosFlow2Setup to numQosFlowsMod in DRB To Modify List
- RRC QoS flow handling:
  * enable multi-QoS flow support per DRB
  * add utilities to map NGAP QoS parameters to E1AP
  * filter QoS flows by DRB ID
- SDAP configuration:
  * Fix SDAP header UL/DL mapping between internal representation and
    ASN.1 enum (invert mapping)
  * change SDAP header fields from long to bool for clarity
- F1 DRB setup refactoring:
  * Extract shared helpers for F1 DRB setup list filling
  * reduce duplication between E1 response and direct DRB setup paths
- AMBR management:
  * Store AMBR in UE context
  * validate AMBR is set before bearer setup
- Configuration:
  * remove unused drbs configuration parameter
  * enable SDAP by default (change default from false to true)
2026-02-11 15:02:01 +01:00
rmagueta
b2093089ab Fix SRS power computation 2026-02-11 11:24:21 +00:00
Jaroslava Fiedlerova
abd2bc0e45 CI: Rename RAN-SA-2x2-Module-CN5G pipeline
RAN-SA-2x2-Module-CN5G performs tests not only with 2x2 but also with a 4x4 MIMO
configuration. The pipeline name has been generalized to RAN-SA-Multi-Antenna-CN5G
to cover multiple antenna configurations.
2026-02-11 11:58:16 +01:00
francescomani
0a447fd304 remove VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME from NR code and remaining unused header include 2026-02-11 10:30:07 +01:00
Robert Schmidt
f8d9c54eff Merge remote-tracking branch 'origin/multipath-testing-ci' into integration_2026_w07 (!3886)
Integrate GPU-Accelerated Channel Simulation + CI Test Pipeline

This MR builds on top of MR !3588 (feat: GPU Accelerated Channel
Simulation Pipeline).

The main portion of the changes is directly taken from MR !3588, and
focuses on integrating the GPU-accelerated channel simulation. On top of
that, this MR adds CI-related configurations to introduce a new channel
simulation testing pipeline into the CI --> RAN-Channel-Simulation

This MR introduces a CUDA-based pipeline to offload the
multipath_channel and add_noise channel simulation functions to the GPU.
This enables large-scale, real-time physical layer simulations not
possible on the CPU.

For full documentation, please see the file at openair1/SIMULATION/TOOLS/DOC/gpu_acceleration.md.

System & Compiler Requirements: An NVIDIA GPU with a compatible driver
and the CUDA Toolkit installed.

This feature was developed and tested on the GH200 server using the GCC
12 toolchain. To ensure reproducibility, building with GCC 12 is highly
recommended.  Build Instructions

The primary flag to enable this feature is -DCUDA_ENABLE=ON. The
following command shows a sample configuration used during development
on the GH200 server:

    ./build_oai --phy_simulators --cmake-opt "\
      -DCUDA_ENABLE=ON \
      -DUSE_UNIFIED_MEMORY=ON \
      -DUSE_ATS_MEMORY=OFF \
      -DCMAKE_C_COMPILER=/usr/bin/gcc-12 \
      -DCMAKE_CXX_COMPILER=/usr/bin/g++-12 \
      -DENABLE_TESTS=ON"

Memory Model Configuration

The pipeline supports multiple CUDA memory management modes, which can
be configured at compile time. ATS Memory (-DUSE_ATS_MEMORY=ON) is
enabled by default. To use another memory model, you must first disable
ATS.

For a detailed explanation of these models, please refer to Section 3 of
the gpu_acceleration.md report.
2026-02-11 10:21:44 +01:00
Robert Schmidt
9f5acb7242 Merge remote-tracking branch 'origin/vrtsim_cirdb_read' into integration_2026_w07 (!3734)
vrtsim: add CIR DB playback with CLI flags

VRTSIM: CIR DB playback via CLI

This change adds an optional in-process CIR DB path to VRTSIM. When
enabled with --vrtsim.cirdb and optional --vrtsim.cirdb-path, VRTSIM
reads precomputed taps from cir_db.bin. Default behavior is unchanged
when the flag is not set.

Build

    cmake ../../ -GNinja -DOAI_VRTSIM_CIRDB=ON -DOAI_VRTSIM_TAPS_CLIENT=OFF
    cmake --build . --target vrtsim

How to run

gNB

    sudo ./nr-softmodem \
      -O ./targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf \
      --device.name vrtsim \
      --vrtsim.role server \
      --gNBs.[0].min_rxtxtime 3 \
      --vrtsim.cirdb 1 \
      --vrtsim.cirdb-path /home/merkeb/oai-cir-emitter/cir_db.bin

UE

    sudo ./nr-uesoftmodem \
      -C 3619200000 -r 106 --numerology 1 --ssb 516 --band 78 \
      --device.name vrtsim

Expected logs

- VRTSIM prints that channel modelling is active and uses DB backed taps
- CIRDB ready: model=..., shape=Tx x Rx, L=..., S=..., fs=..., dt=...,
  speed=...

CLI behavior and fallbacks

- TAPS client and chanmod paths are unchanged
- If --vrtsim.cirdb is not set or equals 0, VRTSIM uses the existing
  channel model path
2026-02-11 10:20:28 +01:00
Merkebu Girmay
33cc04b3e1 Add CIRDB playback test pipeline
Increase retx threshold in vrtsim with CIRDB.
2026-02-10 21:19:34 -08:00
francescomani
8410ecac29 remove VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME from gNB code 2026-02-10 16:26:24 +01:00
Robert Schmidt
42ef7bac98 Merge remote-tracking branch 'origin/armv8-a-compatibility' into integration_2026_w07 (!3896)
Add fallbacks for ARMv8a to make it compile

The current code, on ARM, uses ARMv8.1-A RDM instructions. Add a
fallback for processors that do not have this instruction set.

Add some specific compile options for this platform.

Add debian 12 to the list of architectures.
2026-02-10 14:46:57 +01:00
Eric Mittag
d7ea319b59 cmac0_prec128()/rotate_cpx_vector(): Add ARMv8.0-A fallback
The current code, on ARM, uses ARMv8.1-A RDM instructions. Add a
fallback for processors that do not have this instruction set.
2026-02-10 14:45:20 +01:00
Eric Mittag
15ee75980b Set ARMv8.2-A (Cortex-A53) specific compile options 2026-02-10 14:45:15 +01:00
Eric Mittag
7b86f61383 Add support for Debian 12 in build_oai 2026-02-10 14:45:10 +01:00
Jaroslava Fiedlerova
66e55acca0 CI: Add new pipeline to CI doc 2026-02-10 09:02:47 +00:00
Nika Ghaderi
b9df7eb84f add markdown report for gpu benchmark 2026-02-10 08:38:50 +00:00
francescomani
f15994da14 improvement in config file parameter to set analog beamforming 2026-02-10 09:04:18 +01:00
Merkebu Girmay
a707094196 vrtsim: implement batched TX writes for channel modelling
- Move buffer allocation per-batch
- Convert and write per batch
- Fix saved_samples gap handling bug
2026-02-09 23:23:10 -08:00
Merkebu Girmay
ccf5021072 radio/vrtsim: Add CIRDB support for precomputed channel taps
Integrate Channel Impulse Response Database (CIRDB) to enable playback
of precomputed realistic channel taps in vrtsim, with runtime selection
via YAML metadata.

Features:
- Read precomputed channel taps from binary database with YAML sidecar
- Runtime enable via --vrtsim.cirdb with optional paths (cirdb_yaml, cirdb_file, cirdb_path)
- Channel parameter configuration: model_id (TDL-A..E), delay spread (ds_ns), UE speed (speed_mps)
- Fallback to existing channel model options when disabled
- Time-driven snapshot progression based on elapsed simulation time

Fixes:
- RNG initialization: Add randominit() call before gaussZiggurat()
- FlatBuffers linking: Handle both 'FlatBuffers' and 'flatbuffers' package names when working with external channel emmulator
- Address review comments: use pthread directly, update calloc_or_fail, simplify CMake
2026-02-09 23:22:40 -08:00
Guido Casati
d1150d90e1 NR RRC/SDAP: enable SDAP by default and update CI/docs
- Change gNB RRC enable_sdap default to true
- Update RRC and RUNMODEM docs to reflect new default behavior
- Clean up CI gNB configs by removing redundant enable_sdap=1
- Keep explicit SDAP disable config for NFAPI gNB VNF
2026-02-09 17:01:25 +01:00
Guido Casati
3d41d28f1d RRC: enhance AMBR management in CU-CP
According to TS 38.413:

* AMBR is conditional to PDU Session Resource to setup in the Initial UE
  Context Setup procedure
* The UE Aggregate Maximum Bit Rate IE should be sent to the NG-RAN node
  if the AMF has not sent it previously. If it is included in the PDU
  SESSION RESOURCE SETUP REQUEST message, the NG-RAN node shall store
  it in the UE context
* Range is INTEGER [0..4,000,000,000,000]

To this purpose, changes in the commit:
* Init AMBR to out of range value when creating UE context
* Store AMBR in UE context whenever is received
* Assert if not set at the time of Bearer Setup (should be known at that stage)
2026-02-09 17:01:25 +01:00
Bartosz Podrygajlo
85f8d70376 Fix for split 7.2 DU configurations including DU & RU ethernet addresses
Fix parsing of DU configurations that include both RU and DU ethernet
addresses in the fhi_72 section. The extraneous DU addresses are used
in MPlane to configure the RU.
2026-02-09 16:36:50 +01:00
Jaroslava Fiedlerova
33ab261ac8 Add RAN-Channel-Simulation into parent CI pipeline 2026-02-09 15:19:07 +00:00
Jaroslava Fiedlerova
036793f55e CI: ensure proper alignment of ctest log report 2026-02-09 15:19:07 +00:00
Jaroslava Fiedlerova
50411ad86d CI: build and run CUDA channel simulation unit tests 2026-02-09 15:19:07 +00:00
Jaroslava Fiedlerova
2c4885c662 CI: Add XML for channel simulator testing 2026-02-09 15:19:07 +00:00
Jaroslava Fiedlerova
34e072823d CI: Unify PhySim build/deploy actions and select script from XML 2026-02-09 15:19:07 +00:00
Jaroslava Fiedlerova
400e7b7ea3 CI: Add Dockerfile for channel simulation build on GH with CUDA support 2026-02-09 15:19:07 +00:00
Jaroslava Fiedlerova
4d7ed95179 CI: Add cmake file for CUDA channel simulation ctest threshold check 2026-02-09 15:18:50 +00:00
Jaroslava Fiedlerova
1ef9812e59 Add ctests for test_channel_scalability
For now, test in the following configuration:
- 16 parallel channels
- channel length of 32 and 128
- with 61440 and 122880 samples
- 12 trials per each test (due to CUDA kernel loading delay in first iterations)
- multiple MIMO configurations: 2TX - 2/4/8/32 RX, 2/4/8/32 TX - 2RX
2026-02-09 15:01:05 +00:00
Robert Schmidt
9dddad86a1 Merge remote-tracking branch 'origin/add_undocumented_aerial_error_codes' into integration_2026_w07 (!3905)
Add undocumented Aerial ERROR.indication vendor specific error codes

This MR adds the remaining vendor-specific ERROR.indication error codes
that are undocumented in the Aerial online documentation, but are
present in the cuPHY-CP/scfl2adapter/lib/scf_5g_fapi/scf_5g_fapi.h
header file.

This change stems from the appearance of an undocumented error code
during testing (SCF_ERROR_CODE_L1_MISSING_UL_IQ = 0x44) It aims to ease
the comprehension of the errors thrown by Aerial L1.
2026-02-09 14:40:52 +01:00
Robert Schmidt
a1f1726d92 Merge remote-tracking branch 'origin/check_rrc_config_ue' into integration_2026_w07 (!3899)
Solving issues caused by invalid RRC configuration

Verify RRC configuration.
2026-02-09 14:39:43 +01:00
Guido Casati
5ad1f14cb8 RRC: refactor F1 DRB setup list filling into shared helpers
Extract common code from `fill_drb_to_be_setup_from_e1_resp` and
`rrc_fill_f1_drb_to_setup` into reusable helper functions to reduce
duplication and improve maintainability. This refactoring enables
multi-QoS flow handling per DRB and prepares helpers for upcoming
PDU Session Modify changes.

Impact:
- Enables multi-QoS flow support: `rrc_fill_f1_drb_to_setup` now
  collects all QFIs mapped to a DRB instead of only the first one
- Reduces code duplication between E1 response and direct DRB setup
  code paths
- Improves maintainability by centralizing F1 DRB setup logic

Major changes:
- Add `fill_f1_drb_info_nr`: fills DRB information IE including QoS
  flows from QFI list
- Add `fill_f1_drb_to_be_setup`: creates F1 DRB to setup structure
  from RRC DRB, PDU session, and QFI list
- Add `fill_f1_drbs_from_e1`: processes DRBs from E1 response and
  extracts QFIs from drb_config->qosFlows
- Refactor `fill_drb_to_be_setup_from_e1_resp` to use
  `fill_f1_drbs_from_e1`
- Refactor `rrc_fill_f1_drb_to_setup` to collect all QFIs mapped to
  each DRB and use `fill_f1_drb_to_be_setup`
2026-02-09 14:02:12 +01:00
Guido Casati
2ed28c84b3 RRC/NGAP: refactor rrc_gNB_process_NGAP_PDUSESSION_MODIFY_REQ
TS 38.413 8.2.3 PDU Session Modify:

> For each PDU session which failed to be modified, the PDU Session Resource Modify
> Unsuccessful Transfer IE shall be included containing the failure cause

> If the NG-RAN node receives a PDU SESSION RESOURCE MODIFY REQUEST message containing
> some PDU Session ID IEs (in the PDU Session Resource Modify Request List IE) that the
> NG-RAN node does not recognize, the NG-RAN node shall report the corresponding invalid
> PDU sessions as failed in the PDU SESSION RESOURCE MODIFY RESPONSE message
> with an appropriate cause value

Changes in the commit:

* add rrc_gNB_ngap_pdusession_mod_failure helper function to handle
  abnormal conditions and send NGAP response with (all) failed PDU sessions
  * improve error handling: send NGAP response instead of silently returning -1
    when UE context lookup fails (unknown RAN UE NGAP ID)
  * add AMF UE NGAP ID validation: check stored AMF UE NGAP ID matches request
    and send failure response if mismatch (per 3GPP TS 38.413)
* handle unrecognized PDU Session IDs per 3GPP TS 38.413 8.2.3.4: add to
  failed list to be sent in the reponse message
* simplify failure path: reuse rrc_gNB_send_NGAP_PDUSESSION_MODIFY_RESP
  instead of manually constructing response message
* remove failed PDU sessions from RRC list in rrc_gNB_send_NGAP_PDUSESSION_MODIFY_RESP
* remove redundant code and improve code organization
* add bounds checking
* improve function signature
2026-02-09 14:01:50 +01:00
Guido Casati
eaf27acb3b RRC/NGAP: refactor rrc_gNB_send_NGAP_PDUSESSION_MODIFY_RESP
This commit refactors the rrc_gNB_send_NGAP_PDUSESSION_MODIFY_RESP function
to improve code clarity, fix bugs, and ensure compliance with 3GPP TS 38.413
section 9.2.1.6.

The main improvement is ensuring the PDU Session Resource Modify Response message
is always sent with mandatory IEs, even when there are no PDU sessions to report
in the optional lists.

Key changes:
- Initialize message structure parameters to 0 by leveraging structure
  initialization, ensuring clean state
- Replace local counter variables (pdu_sessions_done, pdu_sessions_failed)
  with direct access to resp->nb_of_pdusessions and resp->nb_of_pdusessions_failed,
  eliminating redundant state tracking and improving code clarity
- Remove conditional message sending: always send the response message
  (per 3GPP TS 38.413 9.2.1.6, PDUSessionResourceModifyResponse must always
  be sent with mandatory IEs: AMF-UE-NGAP-ID and RAN-UE-NGAP-ID, even when
  optional lists are empty)
- Fix duplicate assignment: remove redundant p->pdusession_id assignment
  (was assigned twice in the PDU_SESSION_STATUS_DONE case)
- Improve failed PDU session handling: use direct structure assignment
  (failed->cause = session->cause) instead of field-by-field copying,
  making the code more maintainable
- Remove failed PDU session upon response
- Enhance logging: improve log messages for better debugging and clarity
- Add function documentation comment
2026-02-09 14:01:50 +01:00
Guido Casati
7982374f6a RRC/NGAP: add utility function to fill E1 QoS to setup list from NGAP
Introduce fill_e1_qos_flow_to_setup to translate pdusession_level_qos_parameter_t (NGAP)
into qos_flow_to_setup_t (E1), including ARP and QoS characteristics (dynamic/non-dynamic).

Refactor fill_e1_drb_to_setup to use the new helper for building QoS flows.
* Only include QoS flows whose drb_id matches the target DRB.
* Add DevAssert(drb_ngran.numQosFlow2Setup > 0) to ensure at least one QoS flow is added.

This change centralizes and simplifies QoS mapping logic between NGAP inputs
and E1 DRB configuration. It ensures correctness by associating QoS flows
to the appropriate DRB.

Major changes:
- Extract QoS flow mapping logic into fill_e1_qos_flow_to_setup helper function
- Filter QoS flows by matching drb_id before adding to DRB setup list
- Replace inline mapping code with helper function call
- Add assertion to verify at least one QoS flow is added per DRB
2026-02-09 14:01:08 +01:00
Guido Casati
2923e50ed0 RRC/E1AP: Fix SDAP header mapping in E1AP and test callback header handling
This commit fixes two related issues:

1. SDAP Header Mapping Bug (cucp_cuup_handler.c):
   The original code incorrectly mapped SDAP header configuration from
   internal E1AP representation to ASN.1 enum values. The internal
   representation (`bearer_context_sdap_config_t`) uses true=present/false=absent,
   while ASN.1 enum (`E1AP_SDAP_Configuration_t`) uses
   0=present/1=absent. The fix correctly inverts the mapping:
   - Internal true (1) → ASN.1 0 (present)
   - Internal false (0) → ASN.1 1 (absent)

The commit also clarifies internal representation in the stack.

2. Test Overhead Adjustment (nr-cuup-load-test.c):
   The change in (1) led to a failure in nr_cuup_functional_test
   with assertion: "size % 4 == 0" in recv_ng()

   - Changed UL packet overhead from 3 bytes to 2 bytes in sender_thread()
   - Before the SDAP fix, the test incorrectly accounted for 3 bytes:
     * 2 bytes PDCP header (correct)
     * 1 byte SDAP header (incorrectly included)
   - After the SDAP fix, SDAP headers are correctly set to absent, so
     only 2 bytes (PDCP header) are needed

   This ensures the test sends packets with the correct header size,
   matching what CU-UP expects after the SDAP configuration fix.

The load test does not enable SDAP headers, therefore the original 3-byte
overhead was possibly a workaround for the SDAP header bug.
With the bug fixed, the test correctly uses 2-byte overhead (PDCP header).
2026-02-09 13:19:02 +01:00
Guido Casati
53c0d2d306 NGAP: refactor PDU Session Resource Modify struct definition
This commit refactors the PDU Session Resource Modify Response message
structures to improve naming, documentation, and compliance with 3GPP TS 38.413 9.2.1.6.

Changes in NGAP:
- Rename qos_flow_tobe_modified_t to qos_flow_addmod_response_item_t to better
  reflect its purpose as a QoS Flow Add or Modify Response Item IE (as per specs)
- Add mandatory AMF UE NGAP ID field to ngap_pdusession_modify_resp_t structure
- Optimize field types: change nb_of_pdusessions and nb_of_pdusessions_failed
  from uint16_t to uint8_t (NGAP_MAX_PDU_SESSION limit) (ref 3GPP TS 38.413, 9.2.1.6)
- Update PDU Session Modify Response encoder to use amf_ue_ngap_id from the
  message structure (pdusession_modify_resp_p->amf_ue_ngap_id) instead of
  retrieving it from UE context (ue_context_p->amf_ue_ngap_id)
- Add comprehensive comments with 3GPP TS 38.413 section references throughout

Changes in RRC/NGAP:
- Populate amf_ue_ngap_id field in PDU Session Modify Response message from
  UE context
- Update type reference to qos_flow_addmod_response_item_t
2026-02-09 13:19:02 +01:00
Guido Casati
fa0542f845 NGAP: fix NGAP PDU Session Modify transfer encoding
Encode response/unsuccessful transfers using existing stack-allocated transfer structs.
2026-02-09 13:19:02 +01:00
Guido Casati
c679b5953b E1AP: rename numQosFlow2Setup to numQosFlowsMod in DRB To Modify List
A DRB To Modify Item contains a Flow Mapping Information,
which overrides previous mapping information. For consistency,
rename the count member to reflect a QoS Flow modification,
since it is not limited to setup only.

- Rename DRB flow mapping counters to `numQosFlowsMod`
  for a DRB To Modify List
- Adjust encode/decode/equality + E1AP tests
2026-02-09 13:19:02 +01:00
Guido Casati
e490faa60c E1AP: add DRB To Remove list to E1 Bearer Context Modification lib
Add DRB To Remove List IE to PDU Session To Modify list, which is sent
in the Bearer Context Modification request. This allows the CUCP to
inform the CUUP about DRBs to be released in a specific PDU session
during a MODIFY procedure.

Changes:

* Add struct definition
* Add enc/dec/eq/cp func
* Add test
2026-02-09 13:19:02 +01:00
Guido Casati
d38188e153 RRC: remove unused drbs configuration parameter
- Delete drbs field from gNB_RrcConfigurationReq and its use in RCconfig_NRRRC()
- Remove GNB_CONFIG_STRING_DRBS, help text, index, and GNBPARAMS_CHECK entry from gnb_paramdef.h
- Drop DU-side verification and DRB count logging in gnb_config.c
2026-02-09 13:19:02 +01:00
Jaroslava Fiedlerova
b40d2f60c5 Adjust output reporting of test_channel_scalability
This modification enables us to use the same analysis function in CI
as we use for physims.
2026-02-09 09:29:36 +00:00
Nika Ghaderi
44875e1c58 Add Scalability Benchmark
This commit introduces a new, configurable benchmark,
`test_channel_scalability`, designed to measure the performance and
scalability of the CUDA channel simulation pipeline under various
conditions.

This benchmark provides several key features:
- It supports multiple GPU execution models, including a high-throughput
  "batch" mode, an asynchronous "stream" mode, and a "serial" mode for
  baseline measurements.
- It includes an optional interference simulation mode, activated by the
  `--sum-outputs` flag, which sums the outputs of multiple parallel
  channels.
- Simulation parameters (MIMO configuration, signal length,
  channel length, and batch size) are configurable via command-line
  arguments.
- It runs the full simulation pipeline on both the CPU and the GPU,
  reporting the average execution time for each and calculating the
  overall speedup.
2026-02-09 09:29:36 +00:00
Nika Ghaderi
affab00c90 Add Batched and Streamed Functions for Scalability
This commit extends the CUDA API with new functions designed for
high-throughput scalability testing and advanced concurrency.

Key additions include:
- Batched versions of the kernels (`..._batched`) that use the
  `blockIdx.z` grid dimension to process many independent channel
  simulations in parallel.

- A C-callable wrapper, `run_channel_pipeline_cuda_batched`, to
  orchestrate the execution of these new kernels.

- A "streamed" version of the pipeline,
  `run_channel_pipeline_cuda_streamed`, which accepts a
  `cudaStream_t` as an argument. This allows the calling
  application to manage the execution stream, enabling overlap
  with other GPU or CPU tasks.
2026-02-09 09:29:36 +00:00
Nika Ghaderi
d43d267626 Add Performance Benchmark for Full Channel Pipeline
This commit adds a performance benchmark for the end-to-end channel simulation pipeline, named `test_channel_simulation`. Its methodology is as follows:

- It systematically iterates through a matrix of test cases, varying
  MIMO configuration (Tx/Rx antennas), signal length, and channel
  length.
- For each case, it runs both the full CPU pipeline (`multipath_channel_float`
  followed by `add_noise_float`) and the single `run_channel_pipeline_cuda`
  function.
- It measures the average execution time for both implementations over
  many trials and calculates the resulting speedup.

This provides a performance characterization of the GPU pipeline across different workloads and directly compares it to the CPU baseline.
2026-02-09 09:29:36 +00:00
Nika Ghaderi
2cb960df4e Create End-to-End CUDA Channel Simulation Pipeline
This commit introduces the main C-callable pipeline function,
`run_channel_pipeline_cuda`, located in a new `channel_pipeline.cu`
file.

This function serves as the primary entry point for the GPU channel
simulation. It orchestrates the entire sequence of operations:
- Manages Host-to-Device data transfers for the input signal and
  channel coefficients.
- Launches the `multipath_channel_kernel` and the
  `add_noise_and_phase_noise_kernel` in the correct order.
- Manages the Device-to-Host data transfer for the final output signal.
- Synchronizes to ensure completion before returning.
2026-02-09 09:29:36 +00:00
Nika Ghaderi
7101dc04d1 Add Performance Benchmark for Noise Generation
This commit adds a new standalone benchmark, `test_noise`, to measure
and compare the performance of the CPU and CUDA implementations of noise
generation.

The benchmark's methodology is as follows:
- It iterates through various configurations, including different
  numbers of receive antennas and signal lengths.
- For each configuration, it runs both the CPU (`add_noise_float`)
  and CUDA (`add_noise_cuda`) functions multiple times to get a stable
  average execution time.
- It prints a formatted table comparing the CPU and GPU latencies and
  calculates the resulting speedup.
2026-02-09 09:29:36 +00:00
Nika Ghaderi
257b296e41 Implement CUDA Noise and Phase Noise Kernel
This commit adds the CUDA implementation for adding Additive White
Gaussian Noise (AWGN) and phase noise to the signal. The code is
located in phase_noise.cu.

- The `add_noise_and_phase_noise_kernel` uses the NVIDIA cuRAND
  library for efficient parallel random number generation.
- Helper functions are included to create, initialize, and destroy
  the cuRAND states required by the kernel.
- Placeholder for a C-callable wrapper, `add_noise_cuda`, is also
  provided.
2026-02-09 09:29:36 +00:00
Nika Ghaderi
97a14c3960 Add Unit Test for CUDA Multipath Channel Kernel
This commit adds a new standalone unit test, `test_multipath`, to
validate the CUDA implementation of the multipath channel.

The test performs the following steps:
- Generates a random input signal and channel model.
- Runs the CPU version (`multipath_channel_float`) to get a baseline result.
- Runs the CUDA version (`multipath_channel_cuda`) with the same inputs.
- Compares the two outputs by calculating the Mean Squared Error (MSE)
  and ensures it is below a small tolerance.
2026-02-09 09:29:36 +00:00
Nika Ghaderi
77d854bdf3 Implement CUDA Multipath Channel Simulation
This commit introduces the CUDA implementation of the multipath channel
model in `multipath_channel.cu`.

- Implements `multipath_channel_kernel` using shared memory for
  efficient, high-performance convolution.

- Provides a C-callable wrapper, `multipath_channel_cuda`, to
  orchestrate the full pipeline of data transfers and kernel
  launches.

- The wrapper includes support for multiple memory models (Explicit
  Copy, Unified Memory, ATS) via preprocessor directives to adapt to
  different build configurations.

- Adds a `interleave_channel_output_cuda` utility to convert signal
  data from the CPU's planar format to the GPU's interleaved format.
2026-02-09 09:29:36 +00:00
Nika Ghaderi
c54f0f7955 Refactor and extend CPU channel model with float support
This commit refactors the CPU-based channel model for improved reusability and extends it with single-precision floating-point support.
This serves as a performance and correctness baseline for the new CUDA implementation.

Key changes include:

	- The original double-based multipath_channel function is refactored to remove hardcoded antenna dimensions from its signature. It now accepts dynamically sized arrays, making it more flexible for use in simulators like dlsim and ulsim.

	- A new multipath_channel_float function is introduced to operate on float data types, matching the GPU's native format.

	- A corresponding add_noise_float function is also added to complete the floating-point CPU pipeline.

	- The new float-based functions are designed to work with an interleaved IQ sample format ([I, Q, I, Q]), which is more suitable for vectorized (SSE) and GPU processing.
2026-02-09 09:29:36 +00:00
Nika Ghaderi
70726903f3 Configure CMake for CUDA and SSE simulations
This commit adds the initial infrastructure for building accelerated simulation components.

   - Adds the CUDA_ENABLE option and logic to find the CUDA toolkit.

   - Adds the CHANNEL_SSE option to enable SSE-specific code paths.

   - Sets required properties on the SIMU target to allow linking with CUDA-compiled objects.

   - Creates the initial oai_cuda.h header for the public API.
2026-02-09 09:29:36 +00:00
francescomani
1d5e2d84c2 add safety check to prevent segfault when dealing with DMRS mapping type for DLSCH and ULSCH (#1019) 2026-02-08 09:13:00 +01:00
francescomani
9b381f5d10 declare RLF to re-establish or restart the connection if the ASN1 decoding fails 2026-02-08 09:13:00 +01:00
francescomani
296fb2bd72 checking csi-rs resource mapping consistency to handle #1017 2026-02-08 09:12:58 +01:00
francescomani
562fcd322f checking SRS symbol mapping consistency to handle #1016 2026-02-08 09:09:44 +01:00
francescomani
833ff548c5 checking consistency in CSI-ResourceConfigId for channel and interference measurements in received RRC configuration
This handles issue #1018
2026-02-08 09:07:22 +01:00
francescomani
0b500d412a adding a function to check the received RRC configuration (function to be expanded in later commits)
also move functions to check RRC configuration to a new file not to overload the already big rrc_UE.c
2026-02-08 08:51:17 +01:00
Shubhika Garg
824d9035c1 fix(ci): remove git reset command from Jenkinsfile
- By default, eNB_CommitID is set as 'develop' in the config
       - When OAI-FLEXRIC-RAN-Integration-Test is triggered by upstream FlexRIC push events, it takes `develop`
       - Triggered by RAN takes commit SHA where `origin/SHA` does not work
2026-02-06 13:16:12 +01:00
Rúben Soares Silva
1271f166e0 Add undocumented Aerial ERROR.indication vendor specific error codes 2026-02-06 10:09:02 +00:00
francescomani
a2a354a447 fix analog beamforming fapi structure generation 2026-02-06 09:03:32 +01:00
Jaroslava Fiedlerova
9777d23173 Merge branch 'integration_2026_w06' into 'develop'
Integration `2026.w06`

* !3690 [FHI72] Support large DU delay profiles in the xran F, and include ProtO-RU emulator designed to run 7.2 with an USRP
* !3887 Update RHEL UBI image source to `registry.redhat.io`
* !3882 Change Aerial to pack directly in nvIPC message buffer
* !3895 CI: Ensure OAI-FLEXRIC-RAN-Integration-Test pipeline always uses latest commit for non-MR builds
* !3873 Ensure noise power is non-zero
* !3889 Enable imscope for split7.2
* !3801 Resolve "7.2 split ru_thread slot miss
* !3898 Fix config_libconfig_get for string
* !3876 Removing the duplicate loop in ULSCH power computation

Closes #972

See merge request oai/openairinterface5g!3888
2026-02-06 07:42:09 +00:00
Jaroslava Fiedlerova
068e91ad0c Merge remote-tracking branch 'origin/string_libconfig_fix' into integration_2026_w06 (!3898)
Fix config_libconfig_get for string

Change in libconfig reading input for string to reject if it is not of type
string with an error message
2026-02-05 17:53:45 +01:00
Jaroslava Fiedlerova
543fab819e Merge remote-tracking branch 'origin/fix-ulsch_power' into integration_2026_w06 (!3876)
Removing the duplicate loop in ULSCH power computation

- Removing the duplicate loop in ULSCH power computation.
- The logs obtained are as follows:

[NR_MAC] UE dc65: 134.11 Generating RA-Msg2 DCI, RA RNTI 0x113, state 1, preamble_index(RAPID) 42, timing_offset = 5 (estimated distance 195.3 [m])
[PHY]    PUSCH not detected in 134.17 (307,302,50)
[PHY]    PUSCH not detected in 134.17 (311,309,50)
[NR_MAC]  135 4: RA RNTI 41c5 CC_id 0 Scheduling retransmission of Msg3 in (135,8)
[NR_MAC]  135 4: RA RNTI a3cc CC_id 0 Scheduling retransmission of Msg3 in (135,8)
[PHY]    PUSCH not detected in 134.18 (310,312,50)
[NR_MAC]  135 5: RA RNTI dc65 CC_id 0 Scheduling retransmission of Msg3 in (135,9)
[PHY]    PUSCH not detected in 135.8 (309,309,50)
[PHY]    PUSCH not detected in 135.8 (313,308,50)
[NR_MAC]  13515: RA RNTI 41c5 CC_id 0 Scheduling retransmission of Msg3 in (135,19)
[NR_MAC]  13515: RA RNTI a3cc CC_id 0 Scheduling retransmission of Msg3 in (135,19)
[PHY]    PUSCH not detected in 135.9 (308,300,50)
[NR_MAC]  136 4: RA RNTI dc65 CC_id 0 Scheduling retransmission of Msg3 in (136,8)
[NR_PHY] [RAPROC] 135.19 Initiating RA procedure with preamble 6, energy 19.1 dB (I0 63, thres 120), delay 4 start symbol 0 freq index 0
[PHY]    PUSCH not detected in 135.19 (310,310,50)
[PHY]    PUSCH not detected in 135.19 (312,310,50)
[NR_MAC] 135.19 UE RA-RNTI 010b TC-RNTI 0888: initiating RA procedure
[NR_MAC] UE 0888: Sync beam index 0
[NR_MAC] UE 0888: Msg3 scheduled at 136.17 (136.10 TDA 2) start 0 RBs 8
[NR_MAC] UE 0888: 136.10 Generating RA-Msg2 DCI, RA RNTI 0x10b, state 1, preamble_index(RAPID) 6, timing_offset = 4 (estimated distance 156.3 [m])

- For the same scenario, develop branch gives exactly the same result. When
  there is no PUSCH, the power measured for ULSCH and noise are practically
  the same. Furthermore, the value in develop branch is also approximately
  310 for the same noise level.
2026-02-05 17:49:06 +01:00
Guido Casati
337cc4bbe7 Doc: update RRC documentation with new multi-cell architecture
Expand RRC developer and usage documentation to match the current
multi-cell design with separate DU and cell management.

- rrc-dev.md: Document DU and cell data structures and key functions
  (get_du_by_assoc_id, get_cell_by_cell_id, rrc_add_cell_to_du, etc.);
  add DU and cell lifecycle (F1 Setup, config update, disconnection)
  and UE cell association (serving cells, PCell/SCells) with sequence
  diagrams; add handover and cell association update flow; update UE
  context description.
- rrc-usage.md: Update DU/cell list output format and description
  (e.g. integrated DU-CU) and multi-cell per DU wording.
2026-02-05 16:57:31 +01:00
Guido Casati
e75399707c RRC multi-cell (finalise): add informative comments and logging
This commit adds documentation comments and logging to improve
code readability and debugging capabilities for the multi-cell
architecture.

Changes:
- gnb_config.c: Add logging when configuring DU with cell ID and PCI
- rrc_gNB_du.c: Add documentation comment for ssb_arfcn_mtc()
- rrc_gNB_du.c: Add documentation comment for dump_du_info()
2026-02-05 16:57:31 +01:00
Guido Casati
9bfe62b85b RRC multi-cell (finalise): make internal helper functions static
After introduction of new cell management design, these helper functions
are now only used internally within their respective modules and do not
need to be part of the public API. They are made static and their
declarations are removed from public headers.

Changes:
- f1ap_interface_management.c: Make free_f1ap_cell() and
  copy_f1ap_served_cell_info() static
- f1ap_interface_management.h: Remove declarations for the above functions
- rrc_gNB_du.c: Make get_dl_band() and get_ssb_scs() static
- rrc_gNB_du.h: Remove declarations for get_dl_band() and get_ssb_scs()
2026-02-05 16:57:31 +01:00
Guido Casati
bd2fc0d237 RRC multi-cell: enable multiple cell in F1 Setup
Remove the single-cell limit in F1 Setup Request processing and
refactor to loop-based cell handling. Move cell validation (PLMN
check, neighbor configuration validation, system info extraction),
cell creation, SIB encoding, and neighbor labeling inside a loop
over all available cells.

Update F1 Setup Response to include all cells instead of hardcoding to 1.

Add warning log when more than one cell is received. Add proper
cleanup with free_f1ap_setup_response() on error paths.

Impact:
- F1 Setup now accepts and processes multiple cells from a single
  DU, enabling multi-cell deployments
- All cells are validated, created, and included in the setup
  response
2026-02-05 16:55:32 +01:00
Jaroslava Fiedlerova
0858ee8877 Merge remote-tracking branch 'origin/972-7-2-split-ru_thread-slot-miss' into integration_2026_w06 (!3801)
Resolve "7.2 split ru_thread slot miss"

Closes #972
2026-02-05 15:21:25 +01:00
rmagueta
0c2a9384d0 Removing the duplicate loop 2026-02-05 13:33:03 +00:00
francescomani
269880f89d change in libconfig for string to reject an input that is not of type string with error message 2026-02-05 13:35:13 +01:00
Robert Schmidt
12fc8112d9 Merge remote-tracking branch 'origin/imscope-for-7.2' into integration_2026_w06 (!3889)
Enable imscope for split7.2
2026-02-05 13:28:08 +01:00
andrewse
95c8fa468a fhi_72: Track delay processing via atomic variable
Add xran_queue_length atomic variable to count the number of messages in
oran_sync_fifo (as notifiedFIFO_t does not do this). Use this to
tolerate some double messages (e.g. excessive processing delay), but
start to skip if messages accumulate.

Prior to this change, "Detected double sync message" was printed each
time there was more than one message, which reflected the previous
behavior when using polling, but the gNB might catch up if it is only
once. The new logic ensure that we don't skip individual slots but do so
once messages start to accumulate.
2026-02-05 13:19:12 +01:00
Guido Casati
d471046623 RRC multi-cell: complete migration to cell container architecture
Finalize the migration from single-cell-per-DU to the multi-cell
architecture: remove legacy DU/cell fields and refactor RRC procedures
to use cell containers and UE serving cells instead of DU-based lookups.

Data structure changes:
- Remove nr_cellid from gNB_RRC_UE_t; cell identity comes from the UE's
  serving_cells (PCell entry via ue_get_pcell_entry(ue)). UE_LOG_ARGS
  and LOG_UE_* macros take a PCell entry pointer for null-safe cell_id
  in logs; all call sites pass ue_get_pcell_entry(ue).
- Remove setup_req, mib, sib1, mtc from nr_rrc_du_container_t (held in
  cell containers); remove nr_cellid from gNB_RRC_INST and its
  assignment in gnb_config.c.

Function and signature updates:
- get_ssb_arfcn(): take cell container instead of DU.
- label_intra_frequency_neighbours(): drop du parameter, use cell only.
- Handover: Handover context (source and target) now stores cell
  pointers (source->cell, target->cell) instead of DU pointers. When
  the context is created (N2: on Handover Request; F1: in
  nr_rrc_trigger_f1_ho), the target cell is set in ho_context->target->cell
  and, for F1, the source cell in ho_context->source->cell.
  nr_initiate_handover() takes only source_cell and reads the target
  from ho_ctx->target->cell, so it no longer takes a target parameter.
  The target is known at handover creation time, while the UE’s
  serving_cells are only updated after F1 UE Context Setup Response.
- nr_rrc_trigger_f1_ho() and the N2 handover path pass cell pointers
  and set ho_context->target->cell (and for F1, source->cell) when
  the handover is triggered.

Procedure refactoring:
- Lookups: replace get_du_by_cell_id() with get_cell_by_cell_id()/
  get_cell_by_pci(); remove get_du_by_cell_id() and
  get_cell_information_by_phycellId().
  Rationale: cell-specific data (MIB, SIB1, mtc, info) now lives in
  cell containers, and a DU can host multiple cells. Callers need the
  cell (to use cell->info, cell->mtc, etc.), not the DU. Looking up
  by cell_id therefore returns the cell container
  (get_cell_by_cell_id()); when the DU is needed, use
  cell->assoc_id and get_du_by_assoc_id(). Looking up by PCI is
  scoped (e.g. get_cell_by_pci_for_du() for a given DU, or via the
  UE’s serving cells) because PCI is not globally unique.
- Setup/Reestablishment: resolve cell, register as PCell via
  rrc_add_ue_serving_cell(); reestablishment resolves cell by PCI
  (rrc_get_cell_by_pci_for_du), then rrc_remove_ue_scells_from_du +
  rrc_add_ue_serving_cell; validate_ue_cell_association() after update.
- Measurement config: use cell->info (SCS/band) and cell->mtc.
- Handover: use cell containers end-to-end; after UE context
  modification response call nr_rrc_update_cell_assoc_after_ho().
- NGAP: cell_id and TAC from UE PCell via rrc_get_pcell_for_ue();
  Handover Notify: get cell for message content, use get_du_for_ue() for
  DU existence check; paging resolves UE by 5G-S-TMSI-Part1 and uses that
  UE's PCell (rrc_get_pcell_for_ue) for F1AP_PAGING_IND nr_cellid.

Performance and robustness:
- Use rrc_get_pcell_for_ue() when cell data is needed; use
  get_du_for_ue() when only the DU is needed (F1/N2 HO trigger,
  Handover Notify DU check) for efficiency.
- Reestablishment: remove old PCell before adding new; error handling
  for PCell add and validation.

Code cleanup:
- F1 setup: stop copying/storing setup request in DU container; F1
  disconnect only frees cell containers via rrc_free_cell_container().
- dump_du_info(): iterate du->cells and show all cells per DU.
- telnetsrv_ci.c: use du->gNB_DU_id directly and fix format (%ld).
- UeContextSetupRequest servCellIndex set to RRC_PCELL_INDEX; remove
  servCellIndex from F1AP UE context modification request.
2026-02-05 11:44:10 +01:00
Guido Casati
5980dbcb40 RRC multi-cell: use cell lookups in NGAP Handover Request handling
In rrc_gNB_NGAP.c, rrc_gNB_process_Handover_Request() is updated to
resolve the target by cell instead of by DU, then resolve the DU from
the cell's assoc_id. This aligns Handover Request with the new
cell-centric model and cell management APIs.

- Resolve target with get_cell_by_cell_id(&rrc->cells, msg->nr_cell_id)
  instead of get_du_by_cell_id(); on failure, log "no cell found" and
  send NGAP handover failure.
- Resolve DU with get_du_by_assoc_id(rrc, cell->assoc_id); add a
  failure path (log, NGAP handover failure, return -1) when no DU
  exists for the cell's assoc_id.
- Use cell->info (nr_rrc_cell_info_t) for logging and for key
  derivation (nr_derive_key_ng_ran_star); use du->assoc_id
  for UE context creation instead of du->setup_req->cell[0].info.

get_ssb_arfcn(du) is unchanged and still takes the DU; other DU-based
lookups are kept where still required.
2026-02-05 11:44:10 +01:00
Guido Casati
15c79b0288 RRC multi-cell: adopt cell management in F1 DU configuration update procedures
Migrate F1 DU configuration update procedures in openair2/RRC/NR/rrc_gNB_du.c
to use the cell management API instead of accessing cell data through
setup_req, completing the transition to the new multi-cell architecture.

1. update_cell_info:
   - Refactored to use cell management API: takes RRC instance, old cell_id,
     and new cell info; finds cell via get_cell_by_cell_id() internally.
   - Returns cell container pointer (or NULL on failure) instead of void.
   - When cell_id changes: removes cell from RB tree (old key), updates via
     cp_f1_served_cell_info_to_cell(), re-inserts (new key); validates no
     duplicate cell_id/PCI before allowing change.
   - Frees old MTC when new measurement timing config is present.
   - Encapsulates cell lookup and update logic.

2. rrc_gNB_process_f1_du_configuration_update:
   - Uses update_cell_info() for cell modify; validates cell belongs to DU
     (assoc_id) after update.
   - Duplicate checking via get_cell_by_cell_id() and
     rrc_get_cell_by_pci_for_du()
   - For cells to add: validates duplicate cell_id globally and duplicate
     PCI within DU; rejects with logging.
   - MIB/SIB1 updated in cell container (cell->mib, cell->sib1); uses
     du->gNB_DU_id; passes cell to label_intra_frequency_neighbours();
     removes direct setup_req->cell[0] access.

Backward compatibility: setup_req remains until migration is completed;
cell-specific data is managed in the cell container and accessed via
the cell management API. Improves separation of concerns and enables
proper multi-cell support.
2026-02-05 11:44:09 +01:00
Guido Casati
95d35b9b7d RRC multi-cell: integrate cell containers into F1 setup flow
Refactor F1 setup processing to create and manage cell containers during DU
initialization, establishing the foundation for multi-cell architecture where
cells are managed independently from DUs.

Why: Cell information is currently tied to F1AP structures (f1ap_served_cell_info_t),
which complicates multi-cell support. Introducing cell containers at F1 setup
decouples RRC cell management from F1AP and allows cells to be managed
independently while keeping existing code paths working.

Key changes:

1. Cell container creation (cp_f1_served_cell_info_to_cell):
   New helper copying F1AP served cell info into nr_rrc_cell_container_t (cell_id,
   pci, plmn, tac, TDD/FDD frequency info). Extracts and stores MTC in the cell.

2. Function signature updates:
   get_cell_neighbour_list() and label_intra_frequency_neighbours() now take
   nr_rrc_cell_container_t* and use cell->info; improved logging (cell_id, PCI,
   SSB ARFCN).

3. valid_du_in_neighbour_configs:
   Removed ssb_arfcn parameter; MTC is extracted and freed inside the function.

4. F1 Setup (rrc_gNB_process_f1_setup_req):
   Initialize DU cell tree (RB_INIT(&du->cells)). Populate DU-only fields
   (gNB_DU_id, gNB_DU_name, rrc_ver).
   Flow:
   - create cell with cp_f1_served_cell_info_to_cell
   - add to global tree via rrc_add_cell()
   - add DU via rrc_add_du()
   - attach cell to DU with rrc_add_cell_to_du().
   Store MIB/SIB1/MTC in cell.
   Use cell container for neighbour labeling and SIB encoding.

5. Duplicate cell detection:
   Use rrc_add_cell() for global cell tree insert; collision return indicates
   duplicate cell_id. Clearer error messages for Cell ID vs PCI conflicts.
   Use F1AP_CauseRadioNetwork_cell_not_available for cell conflicts.

6. DU configuration update:
   Use get_cell_by_cell_id() to find cell, check assoc_id, pass cell container
   to label_intra_frequency_neighbours().

7. DU disconnection:
   Use rrc_cleanup_du() to remove cells from global tree and free resources;
   logging uses DU fields (gNB_DU_id, gNB_DU_name).

8. Global cell tree:
   Initialize rrc->cells in openair_rrc_gNB_configuration().

Backward compatibility: setup_req still built via cp_f1ap_setup_request();
du->mib, du->sib1, du->mtc remain set (shared with cell container).
2026-02-05 11:44:09 +01:00
Guido Casati
c453c342ed RRC multi-cell: add integration tests
Add integration tests for RRC cell and DU management and UE serving-cell
logic so that multi-cell behaviour and regressions can be validated
without running the full stack.

* test_du_lookup() – DU container lookup by assoc_id:
  - Multiple DU creation and insertion into RRC DU tree
  - Lookup of existing DUs by assoc_id
  - Non-existing and invalid assoc_ids
  - Cleanup of DU containers and cells

* test_cell_lookup() – Cell management and UE association:
  - Cell lookup by cell_id and PCI (global and per-DU)
  - DU-specific lookup: rrc_get_cell_for_du(), rrc_get_cell_by_pci_for_du()
  - Duplicate cell and PCI collision handling (including PCI reuse across
    DUs and rejection of duplicate PCI within same DU)
  - Cell–DU association (add/remove cells from DU containers)
  - UE serving cell: add PCell/SCells, get by ID, get PCell, max serving
    cells limit, single PCell enforcement
  - validate_ue_cell_association(), rrc_remove_ue_scells_from_du()
  - Edge cases and error handling

Add openair2/RRC/NR/tests/rrc_cell_management_test.c and extend
openair2/RRC/NR/tests/CMakeLists.txt to build and register the test.
2026-02-05 11:44:09 +01:00
Guido Casati
2ff071a52e RRC multi-cell: add UE serving cell management functions
Add functions to manage UE serving cells so the RRC can track which cells
a UE is using (PCell and SCells) for multi-cell UE context and future
SCell management.

- rrc_cell_management.c / rrc_cell_management.h:
  * rrc_get_ue_serving_cell_by_id(): return serving cell by servCellIndex
    (O(k) linear search, k ≤ 32).
  * rrc_add_ue_serving_cell(ue, cell, serving_cell_id): add entry to UE
    serving_cells with validation: reject duplicate servCellIndex with
    different nci, enforce max 32 serving cells (TS 38.331), keep PCell
    at index 0 for O(1) access; return existing entry if same
    servCellIndex and nci.
  * rrc_remove_ue_scells_from_du(ue, assoc_id): remove all serving cells
    for the given DU (handover/DU disconnect); use stored assoc_id for
    O(k) comparison.
  * ue_get_pcell_entry(): return PCell entry (first element, O(1)).
  * rrc_get_pcell_for_ue(): return PCell container from cell tree using
    UE's PCell entry.
  * Header: RRC_PCELL_INDEX (0), RRC_MAX_NUM_SERVING_CELLS (32), and
    declarations for the above.

- UE context lifecycle:
  * rrc_gNB_create_ue_context(): seq_arr_init(serving_cells).
  * rrc_delete_ue_data(): seq_arr_free(serving_cells).
2026-02-05 11:44:09 +01:00
Guido Casati
6d0c7945c2 RRC multi-cell: extract DU management to cell management library
Move DU tree management from rrc_gNB_du.c into rrc_cell_management so that
DU and cell lookup logic live in one place, improving maintainability and
testability (there is no DU lib).

- rrc_cell_management: add du_compare(), RB_GENERATE(rrc_du_tree),
  get_du_by_assoc_id(), rrc_add_du(), rrc_rm_du(), rrc_cleanup_du(),
  rrc_free_du_container(); declare them in rrc_cell_management.h.
- rrc_gNB_du: move du_compare(), RB_GENERATE, get_du_by_assoc_id()
  to rrc_cell_management
2026-02-05 11:44:09 +01:00
Guido Casati
3dfdc66c41 RRC multi-cell: add cell management library with lookup and cleanup
This commit introduces a new library module (rrc_cell_management.c/h)
to centralise functions that provides cell lookup, DU-specific cell
management, and cell lifecycle managements.

The design uses a dual-tree architecture:
- Global cell tree: RB-tree at RRC level (rrc->cells) keyed by cell_id,
  used for O(log N_CELL) lookups and for maintaining num_cells.
- DU-specific storage: seq_arr_t per DU (du->cells) for iteration and
  management of cells belonging to each DU.

API added:
- Global tree: get_cell_by_cell_id()(finds cell using global RB-tree
  lookup (O(log N_CELL) complexity); rrc_add_cell(); rrc_rm_cell()
  (rrc_rm_cell removes from tree, decrements num_cells, and frees the
  cell via rrc_free_cell_container).
- DU-local seq_arr: rrc_get_cell_for_du(), rrc_get_cell_by_pci_for_du(),
  rrc_add_cell_to_du() (with duplicate cell_id/PCI checks).
- Cleanup: rrc_free_cell_container() (frees ASN.1 MIB/SIB1/MTC and
  container

Build: add rrc_cell_management static library in openair2/RRC/NR;
link it into nr_rrc from top-level CMakeLists.txt.
2026-02-05 11:44:09 +01:00
Guido Casati
b699884ae4 RRC multi-cell: add data structure definitions for multi-cell architecture
Add foundational data structures in nr_rrc_defs.h for multi-cell handling
in RRC, separating DU management from cell management.
Design uses a global cell tree for O(log N) lookups while keeping cell
ownership in DUs for locality and maintenance.

The implementation maintains backward compatibility and follows the same
patterns as existing DU and CUUP management in the codebase, i.e. RB-trees
with logarithmic complexity for scalable multi-cell deployments.

- Cell container structures:
  * nr_rrc_cell_container_t: cell-specific data (cell_id, pci, plmn, tac,
    frequency info, mib, sib1, mtc)
  * nr_rrc_cell_info_t: TDD/FDD modes; frequency structs nr_rrc_freq_info_t,
    nr_rrc_tdd_info_t, nr_rrc_fdd_info_t

- UE serving cell tracking:
  * ue_serving_cell_t: nci, serving_cell_id (ServCellIndex TS 38.331,
    0=PCell, 1-31=SCell), assoc_id for fast DU lookup
  * gNB_RRC_UE_t: seq_arr_t serving_cells, with PCell always being the
    first in the sequence

- DU container refactoring:
  * nr_rrc_du_container_t: DU-only fields (gNB_DU_id, gNB_DU_name, rrc_ver);
    seq_arr_t cells for per-DU iteration; setup_req/mib/sib1/mtc kept for
    backward compatibility

- Global cell tree:
  * gNB_RRC_INST_s: RB_HEAD(rrc_cell_tree, nr_rrc_cell_container_t) cells,
    num_cells (data only; lookup helpers get_cell_by_cell_id/get_cell_by_pci
    to be added separately)
2026-02-05 11:44:09 +01:00
Guido Casati
c6229a9c7a RRC multi-cell: enforce unique PCI in per-cell neighbour lists
Neighbour lists are built per serving cell in fill_neighbour_cell_configuration.
Each neighbour in a list is identified by PCI; having two entries with the same
PCI in one cell's list would be ambiguous and indicate a configuration error.
This commit adds validation so that duplicate PCIs within a cell's neighbour
list are detected at configuration load time and cause a fatal assertion with
a clear error message.

Changes:
- Add eq_neighbour_pci() and get_neighbour_by_pci() using
  common/utils/alg/find.h to look up a neighbour by PCI in a seq_arr.
- In fill_neighbour_cell_configuration(), before appending each
  cell's neighbour list, iterate over neighbours and assert that no PCI
  appears more than once
2026-02-05 11:44:09 +01:00
Guido Casati
4c56c6b2de Refactor (RRC): improve UE context removal logging
Replace generic UE event log with explicit INFO log including UE ID and RNTI
when removing a UE context and centralize access to UE fields via a local
pointer.

rrc_delete_ue_data removes the all the list in the UE context, including the
serving cells, and therefore the cell id should not be logged in the function
responsible for the removal of the UE context, which at this point is already
emptied and while the cells themselves are still there (in the DU/global cell
structures), the lists in the UE context are empty.
2026-02-05 11:43:59 +01:00
Jaroslava Fiedlerova
f4b9e04c61 Merge remote-tracking branch 'origin/fix-noise-calc' into integration_2026_w06 (!3873)
Ensure noise power is non-zero

Prior to this commit, noise power estimation could be zero because of a
call to clearArray() in gNB_I0_measurements(). This is problematic, as
this can lead to a noise power of 0 if all symbols in a RB are used,
which in turn leads to a spike in SNR.

To avoid this, use an intermediate array to store noise power, and only
update n0_subband_power if not all RBs are used (i.e., we can detect
noise power). Further, use an exponential moving average to smoothen
noise estimation.

Fixes: fb4235fd ("changes in PUCCH0 SNR measurement, testing for
PUCCH power control")
2026-02-05 10:20:45 +01:00
Laurent THOMAS
74b998a0d8 Rewrite n0_subband_power_avg_dB calculation with better locality 2026-02-04 19:22:00 +01:00
Laurent THOMAS
ee00eb346e Reformat dump_nr_I0_stats() 2026-02-04 19:11:10 +01:00
Laurent THOMAS
656b1d52a0 Remove unused global variables 2026-02-04 19:09:38 +01:00
Robert Schmidt
b533127553 Ensure noise power is non-zero
Prior to this commit, noise power estimation could be zero because of a
call to clearArray() in gNB_I0_measurements(). This is problematic, as
this can lead to a noise power of 0 if all symbols in a RB are used,
which in turn leads to a spike in SNR.

To avoid this, use an intermediate array to store noise power, and only
update n0_subband_power if not all RBs are used (i.e., we can detect
noise power). Further, use an exponential moving average to smoothen
noise estimation.

Fixes: fb4235fd50 ("changes in PUCCH0 SNR measurement, testing for
    PUCCH power control")
2026-02-04 18:36:08 +01:00
Robert Schmidt
ec0b97beae Merge remote-tracking branch 'origin/ci-fix-jenkinsfile' into integration_2026_w06 (!3895)
CI: Ensure OAI-FLEXRIC-RAN-Integration-Test pipeline always uses latest commit for non-MR builds

Related MR -> mosaic5g/flexric!77

For push events, we have:

    sh "git fetch"
    sh "git checkout -f ${commitID}"

We need to do a reset hard so that the run is executed on synchronized
develop branch.

In the pipeline, we see:

    17:38:34  + git checkout -f develop
    17:38:34  Previous HEAD position was 9cb79027e4 Merge branch 'integration_2026_w05' into 'develop'
    17:38:34  Switched to branch 'develop'
    17:38:34  Your branch is behind 'origin/develop' by 526 commits, and can be fast-forwarded.
    17:38:34    (use "git pull" to update your local branch)

After implementing the fix:

Below are the runs for pipeline triggered by a merge request event:

    https://jenkins-oai.eurecom.fr/job/OAI-FLEXRIC/229/
    https://jenkins-oai.eurecom.fr/job/OAI-FLEXRIC-RAN-Integration-Test/3788/

In the OAI-FLEXRIC-RAN-Integration-Test pipeline, which is executed by
Build with Parameters from OAI-FLEXRIC

We see the pipeline took the latest develop:

    11:26:02  + git reset --hard origin/develop
    11:26:02  HEAD is now at 9cb79027e4 Merge branch 'integration_2026_w05' into 'develop'
2026-02-04 12:55:33 +01:00
Robert Schmidt
357496a88a Merge remote-tracking branch 'origin/Change_nvIPC_send_functions' into integration_2026_w06 (!3882)
Change Aerial to pack directly in nvIPC message buffer

This MR changes the Aerial pack/send procedures to pack the messages
directly into the nvIPC message buffers.

This saves the use of some memcopy calls, as well as clean up the code.

The P7 message packing/send is now only handled in the file
`fapi_nv_p7.c`

Add 3 functions in fapi_nvIPC.c to allow message allocation, release and
send from fapi_vnf_p7.c

Add 2 functions to access the memory pool sizes allocated from nvIPC, as
we can't use sizeof to report the buffer size to the packing functions

Remove now unused aerial_send_P5_msg , aerial_send_P7_msg and
aerial_send_P7_msg_with_data functions

Now Aerial only has one function to handle sending P5 and another to
send P7 messages

Remove fapi_phy_api_msg from fapi_nvIPC.h as it is duplicated in
nr_fapi.h
2026-02-04 12:12:47 +01:00
Shubhika Garg
df7db3ab27 ci-fix: Ensure downstream pipeline always uses latest commit for non-MR events
- ensure the local branch is synchronized with the latest commit from the remote.
     - Related MR!77 on mosaic5g/Flexric repository
2026-02-04 11:15:18 +01:00
Rúben Soares Silva
b7867a4053 Change data_len type in aerial_pack_tx_data_request to match with nv_ipc_msg_t.data_len type 2026-02-03 10:20:45 +00:00
Rúben Soares Silva
54076927ba Remove duplicated FAPI header struct from fapi_nvIPC.h 2026-02-03 10:20:45 +00:00
Rúben Soares Silva
aeba59a9ad Change Aerial to pack directly in nvIPC message buffer.
Get mempool sizes from nvIPC for usage in the packing procedures.

Remove now unused functions.
2026-02-03 10:20:45 +00:00
Bartosz Podrygajlo
315fe92253 Enable imscope for split7.2 2026-02-03 10:04:42 +01:00
Jaroslava Fiedlerova
2c1687e44f Merge remote-tracking branch 'origin/rhel-fix' into integration_2026_w06 (!3887)
Update RHEL UBI image source to registry.redhat.io

This merge request updates the RHEL UBI base image source to registry.redhat.io,
aligning with Red Hat’s supported container registry and avoiding potential
access or availability issues with registry.access.redhat.com.
2026-02-03 08:12:06 +01:00
Jaroslava Fiedlerova
358c17ce58 Merge remote-tracking branch 'origin/xran-large-delay-profile' into integration_2026_w06 (!3690)
[FHI72] Support large DU delay profiles in the xran F, and include ProtO-RU
emulator designed to run 7.2 with an USRP

This MR does the following:
- we patch xRAN to support large DU delay profiles (i.e., T1a/Ta4 values larger
  than a TTI)
- we update the FHI72 docs to introduce ProtO-RU, a software implementation of a
  Split-7.2 O-RU with large delay profile
- we provide an example configuration for ProtO-RU

Details on the xRAN patch:
In xRAN, it appears that T1a/Ta4 values are assumed to be within a TTI. When
T1a/Ta4 values larger than a TTI are used, this causes two issues:
(1) C-plane packets to be generated later than expected, and
(2) oai_xran_fh_rx_callback() receives the wrong timing information, resulting
    in potentially empty/stale PUSCH/PRACH data to be read.
In the xRAN patch, we modify xRAN to make it handle large T1a/Ta4 values properly.
The changes include:
(1) three additional variables in offset_num_slots_* (xran_dev.h),
(2) modify "xran_timing_create_cbs" and "xran_timer_arm_for_deadline"
    (xran_cb_proc.c), and
(3) revise "tx_cp_dl_cb" and "tx_cp_ul_cb" (xran_main.c).
Additionally, we add additional guard conditions to prevent xran_tx_proc.c from
sending U-plane packets when it is not a downlink slot.
2026-02-03 08:07:56 +01:00
Xin Zhe Khooi
95df8b174e protoru: fix doc indent 2026-02-02 15:28:06 +00:00
Guido Casati
5d657c801c Refactor (F1AP): align cell lists definitions with TS 38.473
* Commit applies to Setup Request, CU/DU Configuration Update
* Set standard compliant max number of cells per DU
* Allocate large lists on the heap to prevent stack overflow
  due to the large size
* Update relevant free functions
* Also, fix bug in eq_f1ap_cu_configuration_update

Also, improve comments in struct definition.
2026-02-02 16:26:10 +01:00
Guido Casati
d73a9148de Refactor: add common helper functions to construct 5G-S-TMSI
* 5G-S-TMSI construction is defined in 3GPP TS 23.003 and
  relevant at both gNB and UE side
* Add helper functions to be later used in NG Paging
* Adopt in NAS UE
2026-02-02 16:25:47 +01:00
Xin Zhe Khooi
34c001d488 protoru: sample config update 2026-02-02 15:07:42 +00:00
Xin Zhe Khooi
0388bf0e67 protoru: add docs and sample config 2026-02-02 15:01:44 +00:00
Xin Zhe Khooi
003d72c859 fhi7.2: introduce support for T1a and Ta4 values larger than TTI interval
In xRAN, it appears that T1a/Ta4 values are assumed to be within a TTI.
When T1a/Ta4 values with larger than a TTI are used, this causes two issues: (1) C-plane packets to be generated later than expected and (2) oai_xran_fh_rx_callback() receives the wrong timing information resulting in potentially empty/stale PUSCH/PRACH data to be read.

In this patch, we modify xRAN to make it handle large T1a/Ta4 values properly.
The changes include: (1) three additional variables in offset_num_slots_* (xran_dev.h), (2) modify "xran_timing_create_cbs" and "xran_timer_arm_for_deadline" (xran_cb_proc.c), and (3) revise "tx_cp_dl_cb" and "tx_cp_ul_cb" (xran_main.c).
Additionally, we add additional guard conditions to prevent xran_tx_proc.c from sending U-plane packets when it is not a downlink slot.
2026-02-02 15:00:01 +00:00
Shubhika Garg
f393300da1 RHEL: switch registry to registry.redhat.io
- Switched base image source from registry.access.redhat.com to registry.redhat.io for all RHEL9 variants.
2026-01-30 10:11:21 +01:00
317 changed files with 15029 additions and 9048 deletions

View File

@@ -24,6 +24,38 @@ project (OpenAirInterface LANGUAGES C CXX)
set(CMAKE_CXX_STANDARD 17)
set(OAI_VERSION 2.4.0)
option(CUDA_ENABLE "Enable CUDA accelerated channel simulation" OFF)
if(CUDA_ENABLE)
find_package(CUDA REQUIRED)
find_package(CUDAToolkit REQUIRED)
message(STATUS "CUDA explicitly enabled, building with GPU acceleration support.")
enable_language(CUDA)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
set(CMAKE_CUDA_ARCHITECTURES 90)
endif()
option(USE_UNIFIED_MEMORY "Enable CUDA Unified Memory path" OFF)
option(USE_ATS_MEMORY "Enable ATS Hybrid Memory path" ON)
if(USE_UNIFIED_MEMORY AND USE_ATS_MEMORY)
message(FATAL_ERROR "Cannot enable both USE_UNIFIED_MEMORY and USE_ATS_MEMORY at the same time.")
endif()
if(USE_UNIFIED_MEMORY)
add_compile_definitions(USE_UNIFIED_MEMORY)
message(STATUS "CUDA Unified Memory path enabled.")
elseif(USE_ATS_MEMORY)
add_compile_definitions(USE_ATS_MEMORY)
message(STATUS "CUDA ATS Hybrid Memory path enabled.")
else()
message(STATUS "CUDA Explicit Copy path enabled (default ATS was overridden).")
endif()
add_compile_definitions(ENABLE_CUDA)
endif()
#########################################################
# Base directories, compatible with legacy OAI building #
#########################################################
@@ -166,6 +198,8 @@ elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -gdwarf-2 -mcpu=neoverse-n1 -lgcc -lrt")
elseif (CPUPART MATCHES "0xd49") # Neoverse-N2
set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -gdwarf-2 -mcpu=neoverse-n2 -ftree-vectorize -lgcc -lrt")
elseif (CPUPART MATCHES "0xd03") # Cortex-A53
set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -gdwarf-2 -mcpu=cortex-a53 -lgcc -lrt")
else ()
set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -gdwarf-2 -mcpu=native -lgcc -lrt")
endif()
@@ -174,7 +208,12 @@ else()
endif()
if (NOT CROSS_COMPILE)
set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -march=native")
if (CPUPART MATCHES "0xd03")
# Cortex-A53 does not support ARMv8.2-A extensions
set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -march=armv8-a+simd")
else()
set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -march=native")
endif()
else ()
set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -march=armv8.2-a")
endif()
@@ -282,6 +321,22 @@ if(GIT_FOUND)
)
endif()
option(USE_UNIFIED_MEMORY "Enable CUDA Unified Memory path instead of explicit copies" OFF)
option(USE_ATS_MEMORY "Enable Hybrid ATS (CPU->GPU) and Explicit Copy (GPU->CPU) path" OFF)
if(USE_UNIFIED_MEMORY AND USE_ATS_MEMORY)
message(FATAL_ERROR "Cannot enable both USE_UNIFIED_MEMORY and USE_ATS_MEMORY at the same time.")
endif()
if(USE_UNIFIED_MEMORY)
add_compile_definitions(USE_UNIFIED_MEMORY)
message(STATUS "CUDA Unified Memory path enabled.")
elseif(USE_ATS_MEMORY)
add_compile_definitions(USE_ATS_MEMORY)
message(STATUS "CUDA ATS Hybrid Memory path enabled.")
endif()
# Debug related options
#########################################
# asn1c skeletons have hardcoded this flag to make customized debug logs
@@ -297,7 +352,7 @@ add_boolean_option(TRACY_ENABLE OFF "Enable tracy instrumentation" ON)
if (TRACY_ENABLE)
# the tracy version here should match the tracy server version
# below is latest release as of this commit
CPMAddPackage("gh:wolfpld/tracy#0.12.2")
CPMAddPackage("gh:wolfpld/tracy#v0.13.1")
endif()
set (OCP_ITTI ${OPENAIR_DIR}/common/utils/ocp_itti)
@@ -342,7 +397,7 @@ target_link_libraries(lte_rrc PRIVATE nr_rrc)
#NR RRC
#######
add_library(nr_rrc ${OPENAIR2_DIR}/RRC/NR/MESSAGES/asn1_msg.c)
target_link_libraries(nr_rrc PUBLIC asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(nr_rrc PUBLIC asn1_nr_rrc asn1_lte_rrc rrc_cell_management)
# S1AP
##############
@@ -379,7 +434,9 @@ add_library(ngap
${NGAP_DIR}/ngap_gNB_handlers.c
${NGAP_DIR}/ngap_gNB_itti_messaging.c
${NGAP_DIR}/ngap_gNB_management_procedures.c
${NGAP_DIR}/ngap_gNB_paging.c
${NGAP_DIR}/ngap_gNB_nas_procedures.c
${NGAP_DIR}/ngap_gNB_pdu_session_management.c
${NGAP_DIR}/ngap_gNB_nnsf.c
${NGAP_DIR}/ngap_gNB_overload.c
${NGAP_DIR}/ngap_gNB_trace.c
@@ -387,6 +444,9 @@ add_library(ngap
)
target_link_libraries(ngap PUBLIC asn1_ngap)
target_link_libraries(ngap PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
if(ENABLE_TESTS)
target_compile_definitions(ngap PRIVATE ENABLE_TESTS)
endif()
#M2AP
##############
@@ -477,7 +537,7 @@ add_library(f1ap
${F1AP_DIR}/f1ap_itti_messaging.c)
target_include_directories(f1ap PUBLIC F1AP_DIR)
target_link_libraries(f1ap PUBLIC asn1_f1ap GTPV1U)
target_link_libraries(f1ap PRIVATE ngap nr_rrc HASHTABLE f1ap_lib)
target_link_libraries(f1ap PRIVATE ngap nr_rrc ds f1ap_lib)
target_include_directories(f1ap PRIVATE ${F1AP_DIR}/lib)
if(E2_AGENT)
target_compile_definitions(f1ap PRIVATE E2_AGENT)
@@ -515,8 +575,6 @@ target_link_libraries(params_libconfig PRIVATE config_internals ${libconfig_LIBR
add_library(shlib_loader OBJECT common/utils/load_module_shlib.c)
target_link_libraries(shlib_loader PRIVATE CONFIG_LIB)
include_directories ("${OPENAIR_DIR}/radio/COMMON")
##############################################################
# ???!!! TO BE DOCUMENTED OPTIONS !!!???
##############################################################
@@ -595,7 +653,6 @@ include_directories("${OPENAIR3_DIR}/S1AP")
include_directories("${OPENAIR2_DIR}/X2AP")
include_directories("${OPENAIR2_DIR}/M2AP")
include_directories("${OPENAIR2_DIR}/F1AP")
include_directories("${OPENAIR3_DIR}/ocp-gtpu")
include_directories("${OPENAIR3_DIR}/M3AP")
include_directories("${OPENAIR3_DIR}/MME_APP")
include_directories("${OPENAIR_DIR}/radio/COMMON")
@@ -617,12 +674,6 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/common/utils/T
# set the T_LIB name to T if the target exists, otherwise leave empty
set(T_LIB $<TARGET_NAME_IF_EXISTS:T>)
add_library(HASHTABLE
${OPENAIR_DIR}/common/utils/hashtable/hashtable.c
${OPENAIR_DIR}/common/utils/hashtable/obj_hashtable.c
)
include_directories(${OPENAIR_DIR}/common/utils/hashtable)
add_library(UTIL
${OPENAIR_DIR}/common/utils/LOG/vcd_signal_dumper.c
${OPENAIR2_DIR}/UTIL/OPT/probe.c
@@ -780,24 +831,6 @@ include_directories(${NFAPI_USER_DIR})
# Layer 1
#############################
set(PHY_POLARSRC
${OPENAIR1_DIR}/PHY/CODING/nrPolar_tools/nr_polar_init.c
${OPENAIR1_DIR}/PHY/CODING/nrPolar_tools/nr_bitwise_operations.c
${OPENAIR1_DIR}/PHY/CODING/nrPolar_tools/nr_crc_byte.c
${OPENAIR1_DIR}/PHY/CODING/nrPolar_tools/nr_polar_decoder.c
${OPENAIR1_DIR}/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c
${OPENAIR1_DIR}/PHY/CODING/nrPolar_tools/nr_polar_encoder.c
${OPENAIR1_DIR}/PHY/CODING/nrPolar_tools/nr_polar_interleaving_pattern.c
${OPENAIR1_DIR}/PHY/CODING/nrPolar_tools/nr_polar_kernal_operation.c
${OPENAIR1_DIR}/PHY/CODING/nrPolar_tools/nr_polar_kronecker_power_matrices.c
${OPENAIR1_DIR}/PHY/CODING/nrPolar_tools/nr_polar_matrix_and_array.c
${OPENAIR1_DIR}/PHY/CODING/nrPolar_tools/nr_polar_procedures.c
${OPENAIR1_DIR}/PHY/CODING/nrPolar_tools/nr_polar_sequence_pattern.c
)
set(PHY_SMALLBLOCKSRC
${OPENAIR1_DIR}/PHY/CODING/nrSmallBlock/encodeSmallBlock.c
${OPENAIR1_DIR}/PHY/CODING/nrSmallBlock/decodeSmallBlock.c
)
set(PHY_TURBOIF
${OPENAIR1_DIR}/PHY/CODING/coding_load.c
)
@@ -808,8 +841,6 @@ 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
@@ -899,7 +930,6 @@ set(PHY_SRC_UE
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/sss_gen.c
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/dlsch_demodulation.c
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/dlsch_llr_computation.c
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/linear_preprocessing_rec.c
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/dlsch_decoding.c
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/dci_tools_ue.c
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/uci_tools_ue.c
@@ -978,8 +1008,6 @@ set(PHY_SRC_UE
${OPENAIR1_DIR}/PHY/TOOLS/dB_routines.c
${OPENAIR1_DIR}/PHY/TOOLS/sqrt.c
${OPENAIR1_DIR}/PHY/TOOLS/oai_arith_operations.c
${PHY_POLARSRC}
${PHY_SMALLBLOCKSRC}
${PHY_NRLDPC_CODINGIF}
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/pucch_rx.c
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/srs_rx.c
@@ -1029,8 +1057,6 @@ set(PHY_SRC_UE
${OPENAIR1_DIR}/PHY/TOOLS/sqrt.c
${OPENAIR1_DIR}/PHY/TOOLS/oai_arith_operations.c
${OPENAIR1_DIR}/PHY/INIT/nr_init_ue.c
${PHY_POLARSRC}
${PHY_SMALLBLOCKSRC}
${PHY_NRLDPC_CODINGIF}
)
@@ -1049,29 +1075,21 @@ add_dependencies(PHY_COMMON dfts)
add_library(PHY ${PHY_SRC})
target_link_libraries(PHY PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
pkg_check_modules(blas REQUIRED blas)
pkg_check_modules(lapacke REQUIRED lapacke)
add_library(PHY_UE ${PHY_SRC_UE})
target_link_libraries(PHY_UE PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs UTIL)
# RHEL needs also cblas, but Ubuntu does not have it. So `cblas_LIBRARIES` and
# `cblas_INCLUDE_DIRS` will be empty for Ubuntu, a no-op
pkg_check_modules(cblas cblas)
target_link_libraries(PHY_UE PRIVATE ${blas_LIBRARIES} ${cblas_LIBRARIES} ${lapacke_LIBRARIES})
target_include_directories(PHY_UE PRIVATE ${blas_INCLUDE_DIRS} ${cblas_INCLUDE_DIRS} ${lapacke_INCLUDE_DIRS})
add_library(PHY_NR_COMMON ${PHY_NR_SRC_COMMON})
target_link_libraries(PHY_NR_COMMON PUBLIC UTIL)
add_library(PHY_NR ${PHY_NR_SRC})
target_link_libraries(PHY_NR nr_phy_common nr_common nr_fapi_p5)
target_link_libraries(PHY_NR nr_phy_common nr_common nr_fapi_p5 polar smallblock)
add_library(PHY_NR_NO_AVX_256 ${PHY_NR_SRC})
target_link_libraries(PHY_NR_NO_AVX_256 nr_phy_common nr_common)
target_compile_definitions(PHY_NR_NO_AVX_256 PUBLIC USE_128BIT)
add_library(PHY_NR_UE ${PHY_NR_UE_SRC})
target_link_libraries(PHY_NR_UE PRIVATE asn1_nr_rrc_hdrs nr_phy_common nr_common UTIL)
target_link_libraries(PHY_NR_UE PRIVATE asn1_nr_rrc_hdrs nr_phy_common nr_common UTIL polar smallblock)
add_library(PHY_RU ${PHY_SRC_RU})
target_link_libraries(PHY_RU PRIVATE asn1_lte_rrc_hdrs UTIL)
@@ -1135,7 +1153,7 @@ set(L2_SRC
${RRC_DIR}/rrc_eNB_S1AP.c
${RRC_DIR}/rrc_eNB_M2AP.c
${RRC_DIR}/rrc_eNB_UE_context.c
${NR_RRC_DIR}/rrc_gNB_UE_context.c
${RRC_DIR}/rrc_eNB_GTPV1U.c
${RRC_DIR}/rrc_common.c
${RRC_DIR}/L2_interface.c
${RRC_DIR}/L2_interface_common.c
@@ -1201,6 +1219,7 @@ set(NR_L2_SRC_UE
${NR_UE_RRC_DIR}/L2_interface_ue.c
${NR_UE_RRC_DIR}/main_ue.c
${NR_UE_RRC_DIR}/rrc_UE.c
${NR_UE_RRC_DIR}/verify_RRC.c
${NR_UE_RRC_DIR}/rrc_timers_and_constants.c
${NR_UE_RRC_DIR}/rrc_sl_preconfig.c
)
@@ -1381,15 +1400,6 @@ include_directories("${OPENAIR1_DIR}/SCHED_NR_UE")
# CN libs
##########################
add_library (GTPV1U
${RRC_DIR}/rrc_eNB_GTPV1U.c
${OPENAIR3_DIR}/ocp-gtpu/gtp_itf.cpp
${OPENAIR3_DIR}/ocp-gtpu/gtpu_extensions.c
)
target_link_libraries(GTPV1U PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
target_link_libraries(GTPV1U PRIVATE SIMU ds)
include_directories(${OPENAIR3_DIR}/ocp-gtp)
set (MME_APP_SRC
${OPENAIR3_DIR}/MME_APP/mme_app.c
${OPENAIR3_DIR}/MME_APP/mme_config.c
@@ -1687,6 +1697,17 @@ set (SIMUSRC
add_library(SIMU STATIC ${SIMUSRC} )
target_include_directories(SIMU PUBLIC ${OPENAIR1_DIR}/SIMULATION/TOOLS ${OPENAIR1_DIR}/SIMULATION/RF)
option(CHANNEL_SSE "Enable SSE optimizations for channel simulation" OFF)
if(CHANNEL_SSE)
message(STATUS "SSE-optimized channel simulation enabled.")
target_compile_definitions(SIMU PRIVATE CHANNEL_SSE)
endif()
if(CUDA_FOUND)
set_property(TARGET SIMU PROPERTY CUDA_ARCHITECTURES ${CMAKE_CUDA_ARCHITECTURES})
set_property(TARGET SIMU PROPERTY LINKER_LANGUAGE CXX)
endif()
include_directories("${NFAPI_DIR}/nfapi/public_inc")
include_directories("${NFAPI_DIR}/common/public_inc")
include_directories("${NFAPI_DIR}/pnf/public_inc")
@@ -1717,12 +1738,9 @@ add_executable(lte-softmodem
${OPENAIR_DIR}/executables/lte-ru.c
${OPENAIR_DIR}/executables/ru_control.c
${OPENAIR_DIR}/executables/lte-softmodem.c
${OPENAIR_DIR}/executables/softmodem-common.c
${OPENAIR2_DIR}/ENB_APP/NB_IoT_interface.c
${OPENAIR_DIR}/executables/create_tasks.c
${OPENAIR_DIR}/executables/create_tasks_mbms.c
${OPENAIR_DIR}/radio/COMMON/common_lib.c
${OPENAIR_DIR}/radio/COMMON/record_player.c
${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c
${PHY_INTERFACE_DIR}/queue_t.c
${OPENAIR_DIR}/common/utils/lte/ue_power.c
@@ -1733,15 +1751,14 @@ add_dependencies(lte-softmodem oai_iqplayer)
target_link_libraries(lte-softmodem PRIVATE
-Wl,--start-group
lte_rrc nr_rrc s1ap m2ap x2ap m3ap GTPV1U SECURITY UTIL HASHTABLE SCTP_CLIENT MME_APP SCHED_LIB SCHED_RU_LIB
lte_rrc nr_rrc s1ap m2ap x2ap m3ap GTPV1U SECURITY UTIL SCTP_CLIENT MME_APP SCHED_LIB SCHED_RU_LIB
PHY_COMMON PHY PHY_RU L2 L2_LTE NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB
${NAS_UE_LIB} ITTI SIMU shlib_loader
${NAS_UE_LIB} ITTI SIMU radio_common softmodem_common
-Wl,--end-group z dl)
target_link_libraries(lte-softmodem PRIVATE pthread m CONFIG_LIB rt)
target_link_libraries(lte-softmodem PRIVATE ${T_LIB})
target_link_libraries(lte-softmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
target_link_libraries(lte-softmodem PRIVATE ${blas_LIBRARIES} ${cblas_LIBRARIES} ${lapacke_LIBRARIES} ${lapack_LIBRARIES})
if(E2_AGENT)
target_link_libraries(lte-softmodem PUBLIC e2_agent e2_agent_arg e2_ran_func_du_cucp_cuup)
@@ -1751,16 +1768,13 @@ endif()
add_executable(oairu
${OPENAIR_DIR}/executables/lte-ru.c
${OPENAIR_DIR}/executables/ru_control.c
${OPENAIR_DIR}/radio/COMMON/common_lib.c
${OPENAIR_DIR}/radio/COMMON/record_player.c
${OPENAIR_DIR}/executables/softmodem-common.c
${OPENAIR_DIR}/openair1/SCHED/phy_procedures_lte_common.c
${OPENAIR_DIR}/executables/main_ru.c
${OPENAIR_DIR}/common/utils/lte/prach_utils.c
)
target_link_libraries(oairu PRIVATE
-Wl,--start-group
SCHED_RU_LIB PHY_COMMON PHY_RU UTIL shlib_loader
SCHED_RU_LIB PHY_COMMON PHY_RU UTIL radio_common softmodem_common
-Wl,--end-group z dl)
target_link_libraries(oairu PRIVATE pthread m CONFIG_LIB rt ${T_LIB})
@@ -1777,10 +1791,7 @@ target_link_libraries(lte-softmodem PRIVATE
add_executable(lte-uesoftmodem
${OPENAIR_DIR}/executables/lte-ue.c
${OPENAIR_DIR}/executables/lte-uesoftmodem.c
${OPENAIR_DIR}/executables/softmodem-common.c
${OPENAIR_DIR}/executables/create_tasks_ue.c
${OPENAIR_DIR}/radio/COMMON/common_lib.c
${OPENAIR_DIR}/radio/COMMON/record_player.c
${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c
${OPENAIR_DIR}/common/utils/lte/ue_power.c
${OPENAIR_DIR}/common/utils/lte/prach_utils.c
@@ -1790,15 +1801,14 @@ add_executable(lte-uesoftmodem
target_link_libraries(lte-uesoftmodem PRIVATE
-Wl,--start-group
lte_rrc nr_rrc s1ap x2ap m2ap m3ap
SECURITY UTIL HASHTABLE SCTP_CLIENT MME_APP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON
SECURITY UTIL SCTP_CLIENT MME_APP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON
PHY_UE PHY_RU L2_UE L2_LTE SIMU NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB
${NAS_UE_LIB} ITTI shlib_loader
${NAS_UE_LIB} ITTI radio_common softmodem_common
-Wl,--end-group z dl)
target_link_libraries(lte-uesoftmodem PRIVATE pthread m CONFIG_LIB rt)
target_link_libraries(lte-uesoftmodem PRIVATE ${T_LIB})
target_link_libraries(lte-uesoftmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
target_link_libraries(lte-uesoftmodem PRIVATE ${blas_LIBRARIES} ${cblas_LIBRARIES} ${lapacke_LIBRARIES} ${lapack_LIBRARIES})
# force the generation of ASN.1 so that we don't need to wait during the build
target_link_libraries(lte-uesoftmodem PRIVATE
@@ -1811,13 +1821,11 @@ add_executable(nr-oru
${OPENAIR_DIR}/openair1/SCHED_NR/phy_frame_config_nr.c
${OPENAIR_DIR}/openair1/SCHED_NR/nr_prach_procedures.c
${OPENAIR_DIR}/openair1/SCHED/phy_procedures_lte_common.c
${OPENAIR_DIR}/radio/COMMON/common_lib.c
${OPENAIR_DIR}/radio/COMMON/record_player.c
${OPENAIR_DIR}/executables/softmodem-common.c
${OPENAIR_DIR}/executables/main_nr_ru.c
)
target_link_libraries(nr-oru PRIVATE
UTIL SCHED_RU_LIB PHY_COMMON PHY_RU PHY_NR shlib_loader z dl)
UTIL SCHED_RU_LIB PHY_COMMON PHY_RU PHY_NR shlib_loader z dl
radio_common softmodem_common)
target_link_libraries(nr-oru PRIVATE pthread m CONFIG_LIB rt ${T_LIB} utils
barrier actor)
target_link_libraries(nr-oru PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs nr_phy_common time_management)
@@ -1832,9 +1840,6 @@ add_executable(nr-softmodem
${OPENAIR_DIR}/executables/nr-gnb.c
${OPENAIR_DIR}/executables/nr-ru.c
${OPENAIR_DIR}/executables/nr-softmodem.c
${OPENAIR_DIR}/executables/softmodem-common.c
${OPENAIR_DIR}/radio/COMMON/common_lib.c
${OPENAIR_DIR}/radio/COMMON/record_player.c
${OPENAIR_DIR}/common/utils/lte/ue_power.c
${OPENAIR_DIR}/common/utils/lte/prach_utils.c
${PHY_INTERFACE_DIR}/queue_t.c
@@ -1843,11 +1848,11 @@ add_executable(nr-softmodem
target_link_libraries(nr-softmodem PRIVATE
-Wl,--start-group
UTIL HASHTABLE SCTP_CLIENT SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_NR_COMMON PHY_RU GTPV1U SECURITY
UTIL SCTP_CLIENT SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_NR_COMMON PHY_RU GTPV1U SECURITY
ITTI ${NAS_UE_LIB} lte_rrc nr_rrc
ngap s1ap L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB SIMU
x2ap f1ap m2ap m3ap e1ap shlib_loader
time_management
x2ap f1ap m2ap m3ap e1ap radio_common
time_management softmodem_common
-Wl,--end-group z dl)
target_link_libraries(nr-softmodem PRIVATE pthread m CONFIG_LIB rt)
@@ -1877,7 +1882,6 @@ target_link_libraries(nr-softmodem PRIVATE
add_executable(nr-cuup
executables/nr-cuup.c
executables/softmodem-common.c
${NR_RRC_DIR}/rrc_gNB_UE_context.c
${OPENAIR2_DIR}/E1AP/e1ap_setup.c
${NR_PDCP_SRC}
@@ -1887,9 +1891,9 @@ add_executable(nr-cuup
target_link_libraries(nr-cuup PRIVATE
CONFIG_LIB ITTI SCTP_CLIENT
GTPV1U e1ap f1ap
time_management
time_management softmodem_common
alg
z dl pthread shlib_loader ${T_LIB})
z dl pthread ${T_LIB})
target_link_libraries(nr-cuup PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
if(E2_AGENT)
target_link_libraries(nr-cuup PRIVATE e2_agent e2_agent_arg e2_ran_func_cuup)
@@ -1906,11 +1910,6 @@ add_executable(nr-uesoftmodem
${OPENAIR_DIR}/executables/position_interface.c
${OPENAIR_DIR}/executables/nr-ue.c
${OPENAIR_DIR}/executables/nr-ue-ru.c
${OPENAIR_DIR}/executables/softmodem-common.c
${OPENAIR_DIR}/radio/COMMON/common_lib.c
${OPENAIR_DIR}/radio/COMMON/record_player.c
${OPENAIR2_DIR}/LAYER2/NR_MAC_COMMON/nr_mac_common.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
@@ -1918,10 +1917,10 @@ add_executable(nr-uesoftmodem
target_link_libraries(nr-uesoftmodem PRIVATE
-Wl,--start-group
nr_rrc SECURITY UTIL HASHTABLE SCHED_RU_LIB SCHED_NR_UE_LIB
nr_rrc SECURITY UTIL SCHED_RU_LIB SCHED_NR_UE_LIB
PHY_COMMON PHY_NR_COMMON PHY_NR_UE NR_L2_UE MAC_NR_COMMON NFAPI_LIB
ITTI SIMU shlib_loader
time_management
ITTI SIMU radio_common
time_management softmodem_common
-Wl,--end-group z dl)
target_link_libraries(nr-uesoftmodem PRIVATE pthread m CONFIG_LIB rt nr_ue_phy_meas)
@@ -1954,10 +1953,10 @@ target_link_libraries(nr-uesoftmodem PRIVATE
add_executable(rftest
${OPENAIR_DIR}/openair1/PHY/TOOLS/calibration_test.c
${OPENAIR_DIR}/openair1/PHY/TOOLS/calibration_scope.c
${OPENAIR_DIR}/radio/COMMON/common_lib.c
${OPENAIR_DIR}/executables/softmodem-common.c
)
target_link_libraries(rftest PRIVATE minimal_lib PHY_NR_COMMON UTIL forms pthread dl m ${T_LIB} shlib_loader)
target_link_libraries(rftest PRIVATE
minimal_lib PHY_NR_COMMON UTIL forms pthread dl m ${T_LIB}
radio_common softmodem_common)
target_link_libraries(rftest PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
add_executable(polartest
@@ -1974,7 +1973,7 @@ add_executable(smallblocktest
target_link_libraries(smallblocktest PRIVATE
-Wl,--start-group UTIL SIMU PHY_NR PHY_COMMON PHY_NR_COMMON -Wl,--end-group
m pthread dl shlib_loader ${T_LIB}
m pthread dl ${T_LIB}
)
@@ -1984,7 +1983,7 @@ add_executable(ldpctest
)
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}
m pthread dl ${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'
@@ -1997,54 +1996,53 @@ 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 physim_common
m pthread ${T_LIB} ITTI dl physim_common
)
target_link_libraries(nr_dlschsim PRIVATE asn1_nr_rrc_hdrs)
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 physim_common
m pthread ${T_LIB} ITTI dl 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
${OPENAIR_DIR}/executables/softmodem-common.c
${NFAPI_USER_DIR}/nfapi.c
${NFAPI_USER_DIR}/gnb_ind_vars.c
${PHY_INTERFACE_DIR}/queue_t.c
)
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 physim_common
-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 -Wl,--end-group
m pthread ${T_LIB} ITTI dl physim_common softmodem_common
)
target_link_libraries(nr_psbchsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
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 physim_common
m pthread ${T_LIB} ITTI dl 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
${OPENAIR_DIR}/executables/softmodem-common.c
${NFAPI_USER_DIR}/nfapi.c
${NFAPI_USER_DIR}/gnb_ind_vars.c
${PHY_INTERFACE_DIR}/queue_t.c
)
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 physim_common
-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 x2ap SECURITY ngap -Wl,--end-group
m pthread ${T_LIB} ITTI dl nr_ue_phy_meas physim_common
softmodem_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)
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 physim_common)
-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 -Wl,--end-group
m pthread ${T_LIB} ITTI dl physim_common)
target_link_libraries(nr_prachsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
add_executable(nr_ulschsim
@@ -2053,41 +2051,48 @@ add_executable(nr_ulschsim
)
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 physim_common
m pthread ${T_LIB} ITTI dl 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
${OPENAIR_DIR}/executables/softmodem-common.c
${NFAPI_USER_DIR}/nfapi.c
${NFAPI_USER_DIR}/gnb_ind_vars.c
${PHY_INTERFACE_DIR}/queue_t.c
)
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 physim_common
-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 x2ap SECURITY ngap -Wl,--end-group
m pthread ${T_LIB} ITTI dl nr_ue_phy_meas physim_common softmodem_common
)
target_link_libraries(nr_ulsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
add_executable(nr_srssim
${OPENAIR1_DIR}/SIMULATION/NR_PHY/srssim.c
${OPENAIR_DIR}/executables/softmodem-common.c
${NFAPI_USER_DIR}/nfapi.c
${NFAPI_USER_DIR}/gnb_ind_vars.c
${PHY_INTERFACE_DIR}/queue_t.c
)
target_link_libraries(nr_srssim 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 L2_NR -lz -Wl,--end-group
m pthread ITTI dl nr_ue_phy_meas physim_common
-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 -Wl,--end-group
m pthread ITTI dl nr_ue_phy_meas physim_common softmodem_common
)
if(CUDA_ENABLE)
if (TARGET oai_cuda_lib)
target_link_libraries(nr_dlsim PRIVATE oai_cuda_lib)
target_link_libraries(nr_ulsim PRIVATE oai_cuda_lib)
target_compile_definitions(nr_dlsim PRIVATE ENABLE_CUDA)
target_compile_definitions(nr_ulsim PRIVATE ENABLE_CUDA)
endif()
endif()
# these simulators do not compile:
# dlsim_tm7 pbchsim scansim mbmssim pdcchsim pucchsim prachsim syncsim
foreach(myExe dlsim ulsim)
add_executable(${myExe}
${OPENAIR1_DIR}/SIMULATION/LTE_PHY/${myExe}.c
${OPENAIR_DIR}/common/utils/lte/ue_power.c
@@ -2097,7 +2102,7 @@ foreach(myExe dlsim ulsim)
)
target_link_libraries (${myExe} PRIVATE
-Wl,--start-group SIMU UTIL SCHED_LIB SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_NR_COMMON PHY PHY_UE PHY_RU ITTI -Wl,--end-group
pthread m rt CONFIG_LIB ${T_LIB} dl shlib_loader
pthread m rt CONFIG_LIB ${T_LIB} dl
)
target_link_libraries(${myExe} PRIVATE asn1_lte_rrc_hdrs)
add_dependencies(${myExe} coding)
@@ -2136,7 +2141,7 @@ if (${T_TRACER})
#all "add_library" definitions
ITTI lte_rrc nr_rrc s1ap x2ap m2ap m3ap f1ap
params_libconfig
oai_eth_transpro HASHTABLE UTIL
oai_eth_transpro UTIL
SECURITY SCHED_LIB SCHED_NR_LIB SCHED_RU_LIB SCHED_UE_LIB SCHED_NR_UE_LIB
NFAPI_LIB NFAPI_PNF_LIB NFAPI_VNF_LIB NFAPI_USER_LIB
MISC_NFAPI_LTE_LIB
@@ -2189,6 +2194,7 @@ if(ENABLE_TESTS)
endif()
add_subdirectory(common)
add_subdirectory(executables)
add_subdirectory(doc)
add_subdirectory(nfapi)
add_subdirectory(openair1)
@@ -2197,6 +2203,11 @@ add_subdirectory(openair3)
add_subdirectory(radio)
add_subdirectory(tests)
if(TARGET oai_cuda_lib)
message(STATUS "CUDA library 'oai_cuda_lib' found, linking to targets...")
target_link_libraries(nr_dlsim PRIVATE oai_cuda_lib)
target_link_libraries(nr_ulsim PRIVATE oai_cuda_lib)
endif()
if(PACKAGING_LTE OR PACKAGING_NR OR PACKAGING_COMMON OR PACKAGING_USRP OR PACKAGING_PHYSIM)
include("tools/packages/packages.cmake")

View File

@@ -334,6 +334,29 @@ pipeline {
}
}
}
stage ("Channel-Simulation") {
when { expression {do5Gtest || do5GUeTest} }
steps {
script {
triggerSlaveJob ('RAN-Channel-Simulation', 'Channel-Simulation')
}
}
post {
always {
script {
// Using a unique variable name for each test stage to avoid overwriting on a global variable
// due to parallel-time concurrency
channelSimStatus = finalizeSlaveJob('RAN-Channel-Simulation')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
failingStages += channelSimStatus
}
}
}
}
stage ("PhySim-Cluster-4G") {
when { expression {do4Gtest} }
steps {
@@ -703,11 +726,11 @@ pipeline {
}
}
}
stage ("SA-2x2-Module-CN5G") {
stage ("SA-Multi-Antenna-CN5G") {
when { expression {do5Gtest} }
steps {
script {
triggerSlaveJob ('RAN-SA-2x2-Module-CN5G', 'SA-2x2-Module-CN5G')
triggerSlaveJob ('RAN-SA-Multi-Antenna-CN5G', 'SA-Multi-Antenna-CN5G')
}
}
post {
@@ -715,13 +738,13 @@ pipeline {
script {
// Using a unique variable name for each test stage to avoid overwriting on a global variable
// due to parallel-time concurrency
saTDD2x2Status = finalizeSlaveJob('RAN-SA-2x2-Module-CN5G')
saMultiAntennaStatus = finalizeSlaveJob('RAN-SA-Multi-Antenna-CN5G')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
failingStages += saTDD2x2Status
failingStages += saMultiAntennaStatus
}
}
}

View File

@@ -255,7 +255,7 @@ def Deploy_Physim(ctx, HTML, node, workdir, script, options):
logging.debug(f'Running physims on server {node} workdir {workdir}')
with cls_cmd.getConnection(node) as c:
sys_info = c.exec_script("scripts/sys-info.sh", 5)
ret = c.exec_script(script, 1000, options)
ret = c.exec_script(script, 1500, options)
logging.debug(f'"{script}" finished with code {ret.returncode}, output:\n{ret.stdout}')
HTML.CreateHtmlTestRowQueue('Query system info', 'OK', [sys_info.stdout])
with cls_cmd.getConnection(node) as ssh:

View File

@@ -175,7 +175,7 @@ MACRLCs = ({
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
set_analog_beamforming = 2;
set_analog_beamforming = "lophy";
beam_duration = 1;
beams_per_period = 1;
beam_weights = [0]; // single SSB -> one analog beam

View File

@@ -18,7 +18,7 @@ gNBs =
////////// Physical parameters:
min_rxtxtime = 6;
enable_sdap = 1;
enable_sdap = 0;
servingCellConfigCommon = (
{

View File

@@ -18,7 +18,7 @@ gNBs =
////////// Physical parameters:
min_rxtxtime = 6;
enable_sdap = 1;
enable_sdap = 0;
servingCellConfigCommon = (
{

View File

@@ -0,0 +1,52 @@
#/*
# * 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
# */
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Ubuntu 24.04
#
#---------------------------------------------------------------------
FROM nvidia/cuda:12.9.1-devel-ubuntu22.04 AS cuda-image
FROM ran-base:develop AS ran-tests
RUN rm -Rf /oai-ran
COPY --from=cuda-image /usr/local/cuda/ /usr/local/cuda/
# Set the LD_LIBRARY_PATH to ensure the system can find the copied libraries.
# This is crucial for applications that use CUDA.
ENV LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda/targets/sbsa-linux/lib
ENV PATH=/usr/local/cuda/bin:$PATH
ENV C_INCLUDE_PATH=/usr/local/cuda/include
WORKDIR /oai-ran
COPY . .
WORKDIR /oai-ran/build
RUN cmake -GNinja -DENABLE_PHYSIM_TESTS=ON -DENABLE_TESTS=ON \
-DSANITIZE_UNDEFINED=OFF -DSANITIZE_ADDRESS=OFF \
-DCMAKE_C_FLAGS=-Werror -DCMAKE_CXX_FLAGS=-Werror \
-DPHYSIM_CHECK_FILES="ThresholdsCuda.cmake" \
-DCUDA_ENABLE=ON \
-DUSE_UNIFIED_MEMORY=ON \
-DUSE_ATS_MEMORY=OFF \
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/oai-ran/cmake_targets/ran_build/build \
.. && \
ninja test_channel_scalability test_multipath test_noise

View File

@@ -202,9 +202,9 @@ def ExecuteActionWithParam(action, ctx, node):
workdir = CLUSTER.eNBSourceCodePath
success = cls_oaicitest.Deploy_Physim(ctx, HTML, node, workdir, script, options)
elif action == 'Build_Deploy_Docker_PhySim' or action == 'Build_Deploy_Source_PhySim':
elif action == 'Build_Deploy_PhySim':
ctest_opt = test.findtext('ctest-opt') or ''
script = "scripts/docker-build-and-deploy-physims.sh" if action == 'Build_Deploy_Docker_PhySim' else 'scripts/source-deploy-physims.sh'
script = test.findtext('script')
options = f"{CONTAINERS.eNBSourceCodePath} {ctest_opt}"
workdir = CONTAINERS.eNBSourceCodePath
success = cls_oaicitest.Deploy_Physim(ctx, HTML, node, workdir, script, options)

View File

@@ -0,0 +1,46 @@
#!/bin/bash
function die() { echo $@; exit 1; }
[ $# -ge 1 ] || die "usage: $0 <directory> [ctest-options]"
IMAGE=ran-channelsim:ci-temp
CONTAINER=ran-channelsim
function cleanup-docker() {
docker stop ${CONTAINER}
docker rm ${CONTAINER}
docker rmi ${IMAGE}
docker volume prune --force
}
trap cleanup-docker EXIT
set -x
DIR=$1
RESULT_DIR=${DIR}/
shift
CTEST_OPT=$@
# build channel simulator
docker build --progress=plain --tag ${IMAGE} --file ${DIR}/ci-scripts/docker/Dockerfile.channelsim.ubuntu ${DIR} &>> ${RESULT_DIR}/channelsim_build_log.txt
if [ $? -ne 0 ]; then
echo "build of channel simulator failed"
exit 1
fi
# get a JSON description of all tests to run
docker run -a STDOUT --workdir /oai-ran/build/ --env LD_LIBRARY_PATH=/oai-ran/build/ --rm --name ${CONTAINER} ${IMAGE} ctest ${CTEST_OPT} --show-only=json-v1 &> ${RESULT_DIR}/desc-tests.json
JSON_RES=$?
# run the actual tests: we don't suppy --rm as we have to copy the files
# similar to unit tests, we can't mount the file where we write physims-5g-run.xml to
# as it would write a file as root, but this script is run as a normal user
docker run -a STDOUT --gpus all --workdir /oai-ran/build/ --env LD_LIBRARY_PATH=/oai-ran/build/ --name ${CONTAINER} ${IMAGE} ctest ${CTEST_OPT} --output-junit results-run.xml --test-output-size-passed 100000 --test-output-size-failed 100000 &>> ${RESULT_DIR}/channelsim_log.txt
RUN_RES=$?
docker cp ${CONTAINER}:/oai-ran/build/results-run.xml ${RESULT_DIR}/
docker cp ${CONTAINER}:/oai-ran/build/Testing/Temporary/LastTestsFailed.log ${RESULT_DIR}/
docker cp ${CONTAINER}:/oai-ran/build/Testing/Temporary/LastTest.log ${RESULT_DIR}/
# if both were successful, return 0
# TODO not sure
#[[ $JSON_RES -eq 0 && $RUN_RES -eq 0 ]] && exit 0
exit 0

View File

@@ -24,8 +24,7 @@
- Undeploy_Object
- Cppcheck_Analysis
- Deploy_Run_OC_PhySim
- Build_Deploy_Docker_PhySim
- Build_Deploy_Source_PhySim
- Build_Deploy_PhySim
- LicenceAndFormattingCheck
- Push_Local_Registry
- Pull_Local_Registry

View File

@@ -0,0 +1,130 @@
<!--
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>vrtsim-5gnr-cirdb</htmlTabRef>
<htmlTabName>Monolithic gNB vrtsim + CIRDB</htmlTabName>
<htmlTabIcon>wrench</htmlTabIcon>
<testCase>
<class>Pull_Local_Registry</class>
<desc>Pull Images from Local Registry</desc>
<node>localhost</node>
<images>oai-gnb oai-nr-ue</images>
<tag_prefix>arm_</tag_prefix>
</testCase>
<testCase>
<class>Create_Workspace</class>
<desc>Create new Workspace</desc>
<node>localhost</node>
</testCase>
<testCase>
<class>Deploy_Object</class>
<desc>Deploy OAI 5G CoreNetwork</desc>
<node>localhost</node>
<yaml_path>ci-scripts/yaml_files/5g_vrtsim_cirdb</yaml_path>
<services>mysql oai-amf oai-smf oai-upf oai-ext-dn</services>
</testCase>
<testCase>
<class>Deploy_Object</class>
<desc>Deploy OAI 5G gNB+UE RF sim SA</desc>
<node>localhost</node>
<yaml_path>ci-scripts/yaml_files/5g_vrtsim_cirdb</yaml_path>
<services>oai-gnb oai-nr-ue</services>
</testCase>
<testCase>
<class>Attach_UE</class>
<desc>Attach OAI UE (Wait for IP)</desc>
<id>rfsim5g_ue</id>
<node>localhost</node>
</testCase>
<testCase>
<class>Ping</class>
<desc>Ping ext-dn from NR-UE</desc>
<id>rfsim5g_ue</id>
<node>localhost</node>
<svr_id>rfsim5g_ext_dn</svr_id>
<svr_node>localhost</svr_node>
<ping_args>-c 20 -i 0.25</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
</testCase>
<testCase>
<class>Ping</class>
<desc>Ping NR-UE from ext-dn</desc>
<id>rfsim5g_ext_dn</id>
<node>localhost</node>
<svr_id>rfsim5g_ue</svr_id>
<svr_node>localhost</svr_node>
<ping_args>-c 20 -i 0.25</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
</testCase>
<testCase>
<class>Iperf</class>
<desc>Iperf (DL/3Mbps/UDP)(20 sec)</desc>
<iperf_args>-u -b 3M -t 20 -R</iperf_args>
<id>rfsim5g_ue</id>
<node>localhost</node>
<svr_id>rfsim5g_ext_dn</svr_id>
<svr_node>localhost</svr_node>
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
<iperf_bitrate_threshold>90</iperf_bitrate_threshold>
</testCase>
<testCase>
<class>Iperf</class>
<desc>Iperf (UL/1Mbps/UDP)(20 sec)</desc>
<iperf_args>-u -b 1M -t 20</iperf_args>
<id>rfsim5g_ue</id>
<node>localhost</node>
<svr_id>rfsim5g_ext_dn</svr_id>
<svr_node>localhost</svr_node>
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
<iperf_bitrate_threshold>90</iperf_bitrate_threshold>
</testCase>
<testCase>
<class>Undeploy_Object</class>
<always_exec>true</always_exec>
<desc>Undeploy all OAI 5G stack</desc>
<node>localhost</node>
<yaml_path>ci-scripts/yaml_files/5g_vrtsim_cirdb</yaml_path>
<d_retx_th>10,0,0,0</d_retx_th>
<u_retx_th>1,0,0,0</u_retx_th>
</testCase>
<testCase>
<class>Clean_Test_Server_Images</class>
<always_exec>true</always_exec>
<desc>Clean Test Images on Test Server</desc>
<node>localhost</node>
<images>oai-gnb oai-nr-ue</images>
</testCase>
</testCaseList>

View File

@@ -32,8 +32,9 @@
</testCase>
<testCase>
<class>Build_Deploy_Docker_PhySim</class>
<desc>Build and Deploy PhySim</desc>
<class>Build_Deploy_PhySim</class>
<desc>Build and Deploy PhySim in Docker</desc>
<script>scripts/docker-build-and-deploy-physims.sh</script>
<node>localhost</node>
<ctest-opt>-R 5g -E "nr_dlsim|nr_ulsim|ldpctest" -j32</ctest-opt>
</testCase>

View File

@@ -32,8 +32,9 @@
</testCase>
<testCase>
<class>Build_Deploy_Docker_PhySim</class>
<class>Build_Deploy_PhySim</class>
<desc>Build and Deploy PhySim with timing check</desc>
<script>scripts/docker-build-and-deploy-physims.sh</script>
<node>localhost</node>
<ctest-opt>-R 5g -R "nr_dlsim|nr_ulsim|ldpctest" -E physim.5g.nr_dlsim.mcs.mimo.test9 -j1</ctest-opt>
</testCase>

View File

@@ -32,8 +32,9 @@
</testCase>
<testCase>
<class>Build_Deploy_Source_PhySim</class>
<class>Build_Deploy_PhySim</class>
<desc>Build and Deploy PhySim T2 Offload tests</desc>
<script>scripts/source-deploy-physims.sh</script>
<node>caracal</node>
<ctest-opt>-R 5g-offload -j1</ctest-opt>
</testCase>

View File

@@ -0,0 +1,43 @@
<!--
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>channelsim-tab</htmlTabRef>
<htmlTabName>ChannelSim</htmlTabName>
<htmlTabIcon>wrench</htmlTabIcon>
<testCase>
<class>Create_Workspace</class>
<desc>Create new Workspace</desc>
<node>localhost</node>
</testCase>
<testCase>
<class>Build_Deploy_PhySim</class>
<desc>Build and Deploy Test Channel Simulation</desc>
<script>scripts/docker-build-and-deploy-chansim.sh</script>
<node>localhost</node>
<ctest-opt>-R cuda.5g.channelsim</ctest-opt>
</testCase>
</testCaseList>

View File

@@ -0,0 +1,183 @@
services:
# CIR Generator service - generates CIRDB files on every CI run
cir-generator:
image: oaisoftwarealliance/cir-generator:test
environment:
GENERATOR_ARGS: "--demo"
OUTPUT: "--out /opt/output/cir_db.bin"
volumes:
- cirdb_data:/opt/output
mysql:
container_name: "rfsim5g-mysql"
image: mysql:8.0
init: true
volumes:
- ../5g_rfsimulator/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
- ../5g_rfsimulator/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
environment:
- TZ=Europe/Paris
- MYSQL_DATABASE=oai_db
- MYSQL_USER=test
- MYSQL_PASSWORD=test
- MYSQL_ROOT_PASSWORD=linux
healthcheck:
test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
interval: 10s
timeout: 5s
start_period: 10s
start_interval: 500ms
retries: 30
networks:
public_net:
ipv4_address: 192.168.71.131
oai-amf:
container_name: "rfsim5g-oai-amf"
image: oaisoftwarealliance/oai-amf:v2.1.10
environment:
- TZ=Europe/paris
volumes:
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-amf/etc/config.yaml
depends_on:
- mysql
networks:
public_net:
ipv4_address: 192.168.71.132
oai-smf:
container_name: "rfsim5g-oai-smf"
image: oaisoftwarealliance/oai-smf:v2.1.10
environment:
- TZ=Europe/Paris
volumes:
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-smf/etc/config.yaml
depends_on:
- oai-amf
networks:
public_net:
ipv4_address: 192.168.71.133
oai-upf:
container_name: "rfsim5g-oai-upf"
image: oaisoftwarealliance/oai-upf:v2.1.10
init: true
environment:
- TZ=Europe/Paris
volumes:
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-upf/etc/config.yaml
depends_on:
- oai-smf
cap_add:
- NET_ADMIN
- SYS_ADMIN
cap_drop:
- ALL
privileged: true
networks:
public_net:
ipv4_address: 192.168.71.134
interface_name: eth0
traffic_net:
ipv4_address: 192.168.72.134
interface_name: eth1
oai-ext-dn:
privileged: true
container_name: rfsim5g-oai-ext-dn
image: oaisoftwarealliance/trf-gen-cn5g:latest
init: true
entrypoint: /bin/bash -c \
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
"ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity"
depends_on:
- oai-upf
networks:
traffic_net:
ipv4_address: 192.168.72.135
healthcheck:
test: /bin/bash -c "ping -c 2 192.168.72.134"
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
start_interval: 500ms
oai-gnb:
image: ${REGISTRY-oaisoftwarealliance/}${GNB_IMG:-oai-gnb}:${TAG:-develop}
container_name: rfsim5g-oai-gnb
cap_drop:
- ALL
environment:
USE_ADDITIONAL_OPTIONS: -E --log_config.global_log_options level,nocolor,time --device.name vrtsim --vrtsim.role server --vrtsim.cirdb 1 --vrtsim.cirdb_file /cirdb/cir_db.bin --vrtsim.cirdb_yaml /cirdb/cir_db.yaml --vrtsim.cirdb_model_id 0 --vrtsim.cirdb_ds_ns 1 --vrtsim.cirdb_speed_mps 1.5
depends_on:
cir-generator:
condition: service_completed_successfully
oai-ext-dn:
condition: service_started
networks:
public_net:
ipv4_address: 192.168.71.140
volumes:
- ../../conf_files/gnb.sa.band78.106prb.vrtsim.2x2.yaml:/opt/oai-gnb/etc/gnb.yaml
- cirdb_data:/cirdb:ro
- tmp_data:/tmp/
healthcheck:
test: /bin/bash -c "pgrep nr-softmodem"
interval: 10s
timeout: 5s
start_period: 10s
start_interval: 500ms
retries: 5
ipc: host
oai-nr-ue:
image: ${REGISTRY-oaisoftwarealliance/}${NRUE_IMG:-oai-nr-ue}:${TAG:-develop}
container_name: rfsim5g-oai-nr-ue
cap_drop:
- ALL
cap_add:
- NET_ADMIN
- NET_RAW
environment:
USE_ADDITIONAL_OPTIONS: -E -r 106 --numerology 1 --band 78 -C 3619200000 --ssb 516 --uicc0.imsi 208990100001100 --log_config.global_log_options level,nocolor,time --device.name vrtsim --vrtsim.role client
depends_on:
- oai-gnb
networks:
public_net:
ipv4_address: 192.168.71.150
devices:
- /dev/net/tun:/dev/net/tun
volumes:
- ../../conf_files/nrue.vrtsim.chanmod.yaml:/opt/oai-nr-ue/etc/nr-ue.yaml
- tmp_data:/tmp/
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
start_interval: 500ms
ipc: host
networks:
public_net:
driver: bridge
name: rfsim5g-oai-public-net
ipam:
config:
- subnet: 192.168.71.128/26
driver_opts:
com.docker.network.bridge.name: "rfsim5g-public"
traffic_net:
driver: bridge
name: rfsim5g-oai-traffic-net
ipam:
config:
- subnet: 192.168.72.128/26
driver_opts:
com.docker.network.bridge.name: "rfsim5g-traffic"
volumes:
tmp_data:
cirdb_data:

View File

@@ -36,9 +36,8 @@ set_openair_env
# Variables for UE data generation
conf_nvram_path=$OPENAIR_DIR/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf
HW=""
HWs=""
BUILD_DIR=ran_build
DISABLE_HARDWARE_DEPENDENCY="False"
CMAKE_BUILD_TYPE="RelWithDebInfo"
CMAKE_CMD="$CMAKE"
OPTIONAL_LIBRARIES="telnetsrv enbscope uescope nrscope ldpc_cuda ldpc_aal ldpc_xdma websrv oai_iqplayer imscope imscope_record"
@@ -254,22 +253,22 @@ function main() {
-w | --hardware)
case "$2" in
"USRP" | "BLADERF" | "LMSSDR" | "IRIS")
HW="OAI_"$2
HWs+=" OAI_"$2
TARGET_LIST="$TARGET_LIST oai_${2,,}devif" # ,, makes lowercase
CMAKE_CMD="$CMAKE_CMD -DOAI_$2=ON"
;;
"SIMU")
HW="OAI_"$2
HWs+=" OAI_"$2
TARGET_LIST="$TARGET_LIST rfsimulator"
CMAKE_CMD="$CMAKE_CMD -DOAI_$2=ON"
;;
"AW2SORI")
HW="OAI_"$2
HWs=" OAI_"$2
TARGET_LIST="$TARGET_LIST aw2sori_transpro"
CMAKE_CMD="$CMAKE_CMD -DOAI_$2=ON"
;;
"AERIAL"|"Aerial"|"aerial")
HW="OAI_AERIAL"
HWs+=" OAI_AERIAL"
CMAKE_CMD="$CMAKE_CMD -DOAI_AERIAL=ON"
;;
"None")
@@ -328,10 +327,6 @@ function main() {
CMAKE_CMD="$CMAKE_CMD -DT_TRACER=False"
echo_info "Disabling the T tracer"
shift 1;;
--disable-hardware-dependency)
echo_info "Disabling hardware dependency for compiling software"
DISABLE_HARDWARE_DEPENDENCY="True"
shift 1;;
--ue-trace)
CMAKE_CMD="$CMAKE_CMD -DUE_DEBUG_TRACE=False"
echo_info "Enabling UE trace for debug"
@@ -424,27 +419,23 @@ function main() {
echo_info "installing LTTng"
install_lttng $1
fi
if [ "$HW" == "OAI_USRP" ] ; then
echo_info "installing packages for USRP support"
check_install_usrp_uhd_driver
if [ ! -v BUILD_UHD_FROM_SOURCE ] && [ ! "$DISABLE_HARDWARE_DEPENDENCY" == "True" ]; then
install_usrp_uhd_driver $UHD_IMAGES_DIR
for HW in $HWs; do
if [ "$HW" == "OAI_USRP" ] ; then
echo_info "installing packages for USRP support"
check_install_usrp_uhd_driver
if [ ! -v BUILD_UHD_FROM_SOURCE ]; then
install_usrp_uhd_driver $UHD_IMAGES_DIR
fi
elif [ "$HW" == "OAI_BLADERF" ] ; then
echo_info "installing packages for BLADERF support"
check_install_bladerf_driver
elif [ "$HW" == "OAI_IRIS" ] ; then
echo_info "installing packages for IRIS support"
check_install_soapy
else
echo_warning "no installation scripts for hardware $HW"
fi
fi
if [ "$HW" == "OAI_BLADERF" ] ; then
echo_info "installing packages for BLADERF support"
check_install_bladerf_driver
if [ ! "$DISABLE_HARDWARE_DEPENDENCY" == "True" ]; then
flash_firmware_bladerf
fi
fi
if [ "$HW" == "OAI_IRIS" ] ; then
echo_info "installing packages for IRIS support"
check_install_soapy
#if [ ! "$DISABLE_HARDWARE_DEPENDENCY" == "True" ]; then
# flash_firmware_iris
#fi
fi
done
fi
if [ "$INSTALL_OPTIONAL" = "1" ] ; then

View File

@@ -107,6 +107,7 @@ check_supported_distribution() {
"ubuntu22.04") return 0 ;;
"ubuntu20.04") return 0 ;;
"debian11") return 0 ;;
"debian12") return 0 ;;
"fedora41") return 0 ;;
"fedora40") return 0 ;;
"rhel8.2") return 0 ;;
@@ -345,19 +346,10 @@ install_bladerf_driver_from_source(){
make
$SUDO make install
$SUDO ldconfig
echo "Downloading FPGA and firmware images"
cd /tmp/bladeRF
#wget has been removed from default dependencies, so we must be sure that's installed
$SUDO $INSTALLER -y install wget
wget --tries=3 --retry-connrefused https://www.nuand.com/fx3/bladeRF_fw_latest.img
wget --tries=3 --retry-connrefused https://www.nuand.com/fpga/hostedx40-latest.rbf
sudo mkdir -p /usr/share/Nuand/bladeRF
sudo mv bladeRF_fw_latest.img /usr/share/Nuand/bladeRF/bladeRF_fw.img
sudo mv hostedx40-latest.rbf /usr/share/Nuand/bladeRF/hostedx40.rbf
}
check_install_bladerf_driver(){
if [[ "$OS_DISTRO" == "ubuntu" ]]; then
if [[ "$OS_BASEDISTRO" == "debian" ]]; then
$SUDO apt-get install -y bladerf libbladerf-dev
$SUDO apt-get install -y bladerf-firmware-fx3
$SUDO apt-get install -y bladerf-fpga-hostedx40
@@ -368,10 +360,6 @@ check_install_bladerf_driver(){
fi
}
flash_firmware_bladerf() {
$SUDO bladeRF-cli --flash-firmware /usr/share/Nuand/bladeRF/bladeRF_fw.img
}
check_install_lmssdr_driver(){
if ( [ -d "/usr/local/include/lime" ] &&
[ -f "/usr/local/include/lime/LimeSuite.h" ] )
@@ -453,7 +441,7 @@ check_install_additional_tools (){
local optional_packages=""
if [[ "$OS_BASEDISTRO" == "debian" ]]; then
case "$(get_distribution_release)" in
"ubuntu20.04" | "ubuntu22.04" | "debian11" )
"ubuntu20.04" | "ubuntu22.04" | "debian11" | "debian12" )
optional_packages="python3 python3-pip python3-dev python3-scipy python3-matplotlib python3-pyroute2 universal-ctags"
;;
esac
@@ -496,7 +484,7 @@ check_install_oai_software() {
if [[ "$OS_BASEDISTRO" == "debian" ]]; then
$SUDO apt install -y software-properties-common
case "$(get_distribution_release)" in
"debian11")
"debian11" | "debian12" )
specific_packages="libz-dev"
;;
esac
@@ -508,9 +496,6 @@ check_install_oai_software() {
ninja-build \
pkg-config \
git \
libblas-dev \
liblapack-dev \
liblapacke-dev \
libreadline-dev \
libconfig-dev \
libsctp-dev \
@@ -548,10 +533,6 @@ check_install_oai_software() {
openssl-devel \
patch \
readline-devel \
lapack \
lapack-devel \
blas \
blas-devel \
vim-common \
zlib-devel \
yaml-cpp-devel

View File

@@ -1,5 +1,5 @@
diff --git a/fhi_lib/app/src/common.h b/fhi_lib/app/src/common.h
index ac5f471..ed9ab7d 100644
index ac5f471..b1acb26 100644
--- a/fhi_lib/app/src/common.h
+++ b/fhi_lib/app/src/common.h
@@ -28,7 +28,7 @@
@@ -7,7 +7,7 @@ index ac5f471..ed9ab7d 100644
#include <rte_mbuf.h>
-#define VERSIONX "oran_f_release_v1.0"
+#define VERSIONX "oran_f_release_v1.7"
+#define VERSIONX "oran_f_release_v1.8"
#define APP_O_DU 0
#define APP_O_RU 1
@@ -530,7 +530,7 @@ index 59b6850..322d238 100644
\ No newline at end of file
+}
diff --git a/fhi_lib/lib/src/xran_cb_proc.c b/fhi_lib/lib/src/xran_cb_proc.c
index 08660f3..2bb5187 100644
index 08660f3..b5de607 100644
--- a/fhi_lib/lib/src/xran_cb_proc.c
+++ b/fhi_lib/lib/src/xran_cb_proc.c
@@ -25,7 +25,10 @@
@@ -544,6 +544,55 @@ index 08660f3..2bb5187 100644
#include <rte_common.h>
#include <rte_eal.h>
#include <rte_errno.h>
@@ -106,6 +109,12 @@ void xran_timer_arm_for_deadline(struct rte_timer *tim, void* arg, void *p_dev_
+ nSubframeIdx*SLOTNUM_PER_SUBFRAME(p_xran_dev_ctx->interval_us_local)
+ nSlotIdx;
+ /* correction to rx_tti for Ta4 values larger than a TTI */
+ rx_tti -= p_xran_dev_ctx->offset_num_slots_up_ul;
+ if (rx_tti < 0) {
+ rx_tti += (SUBFRAMES_PER_SYSTEMFRAME*SLOTNUM_PER_SUBFRAME(p_xran_dev_ctx->interval_us_local)*1024);
+ }
+
p_xran_dev_ctx->cb_timer_ctx[p_xran_dev_ctx->timer_put % MAX_CB_TIMER_CTX].tti_to_process = rx_tti;
if (xran_if_current_state == XRAN_RUNNING){
rte_timer_cb_t fct = (rte_timer_cb_t)arg;
@@ -195,6 +204,7 @@ xran_timing_create_cbs(void *args)
max_dl_delay_offset += interval_us_local;
numSlots++;
}
+ p_dev_ctx->offset_num_slots_cp_dl = numSlots;
/* Delay from start of 'a' slot */
delay_cp_dl_max = max_dl_delay_offset - p_dev_ctx->fh_cfg.T1a_max_cp_dl;
@@ -227,6 +237,7 @@ xran_timing_create_cbs(void *args)
ul_delay_offset += interval_us_local;
numSlots++;
}
+ p_dev_ctx->offset_num_slots_cp_ul = numSlots;
delay_cp_ul = ul_delay_offset - p_dev_ctx->fh_cfg.T1a_max_cp_ul;
sym_cp_ul = (delay_cp_ul*1000/(interval_us_local*1000/N_SYM_PER_SLOT)+1);
uint8_t ul_offset_sym = (numSlots+1)*N_SYM_PER_SLOT - sym_cp_ul;
@@ -242,8 +253,18 @@ xran_timing_create_cbs(void *args)
delay_up = p_dev_ctx->fh_cfg.T1a_max_up;
time_diff_us = p_dev_ctx->fh_cfg.Ta4_max;
+ uint32_t ul_up_delay_offset=interval_us_local;
+ numSlots=0;
+ while(time_diff_us > ul_up_delay_offset) {
+ ul_up_delay_offset += interval_us_local;
+ numSlots++;
+ }
+ p_dev_ctx->offset_num_slots_up_ul = numSlots;
+
+ printf("offset_num_slots_cp_dl=%d, offset_num_slots_cp_ul=%d, offset_num_slots_up_ul=%d\n",
+ p_dev_ctx->offset_num_slots_cp_dl, p_dev_ctx->offset_num_slots_cp_ul, p_dev_ctx->offset_num_slots_up_ul);
- delay_cp2up = delay_up-delay_cp_dl_max;
+ delay_cp2up = p_dev_ctx->fh_cfg.T1a_max_cp_dl - p_dev_ctx->fh_cfg.T1a_max_up;
time_diff_nSymb = time_diff_us*1000/(interval_us_local*1000/N_SYM_PER_SLOT);
diff --git a/fhi_lib/lib/src/xran_common.c b/fhi_lib/lib/src/xran_common.c
index dc40ad9..1b88013 100644
--- a/fhi_lib/lib/src/xran_common.c
@@ -1032,7 +1081,7 @@ index 4acade1..c939edc 100644
for(i = 0; i < xran_ports_num; i++){
g_xran_dev_ctx[i] = pCtx;
diff --git a/fhi_lib/lib/src/xran_dev.h b/fhi_lib/lib/src/xran_dev.h
index 0371a53..dd76b49 100644
index 0371a53..778b38d 100644
--- a/fhi_lib/lib/src/xran_dev.h
+++ b/fhi_lib/lib/src/xran_dev.h
@@ -201,6 +201,7 @@ struct __rte_cache_aligned xran_device_ctx
@@ -1043,6 +1092,18 @@ index 0371a53..dd76b49 100644
int64_t offset_sec;
int64_t offset_nsec; //offset to GPS time calcuated based on alpha and beta
uint32_t interval_us_local;
@@ -254,6 +255,11 @@ struct __rte_cache_aligned xran_device_ctx
int32_t sym_up; /**< when we start sym 0 of up with respect to OTA time as measured in symbols */
int32_t sym_up_ul;
+ /* used to support large T1a/Ta4 values */
+ int32_t offset_num_slots_cp_dl;
+ int32_t offset_num_slots_cp_ul;
+ int32_t offset_num_slots_up_ul;
+
xran_fh_tti_callback_fn ttiCb[XRAN_CB_MAX];
void *TtiCbParam[XRAN_CB_MAX];
uint32_t SkipTti[XRAN_CB_MAX];
diff --git a/fhi_lib/lib/src/xran_frame_struct.c b/fhi_lib/lib/src/xran_frame_struct.c
index fbb1298..44aaf92 100644
--- a/fhi_lib/lib/src/xran_frame_struct.c
@@ -1082,7 +1143,7 @@ index 7ed0a3a..8e66945 100644
#ifdef __cplusplus
}
diff --git a/fhi_lib/lib/src/xran_main.c b/fhi_lib/lib/src/xran_main.c
index 7c472d7..7c7cf91 100644
index 7c472d7..db03d94 100644
--- a/fhi_lib/lib/src/xran_main.c
+++ b/fhi_lib/lib/src/xran_main.c
@@ -35,7 +35,11 @@
@@ -1132,7 +1193,42 @@ index 7c472d7..7c7cf91 100644
print_dbg("PRACH eAxC_offset %d\n", pPrachCPConfig->eAxC_offset);
/* Save some configs for app */
@@ -1169,6 +1192,10 @@ xran_prepare_cp_ul_slot(uint16_t xran_port_id, uint32_t nSlotIdx, uint32_t nCcS
@@ -623,6 +646,8 @@ xran_prepare_cp_dl_slot(uint16_t xran_port_id, uint32_t nSlotIdx, uint32_t nCcS
return ret;
}
+uint32_t prev_dl_tti = -1;
+
void
tx_cp_dl_cb(struct rte_timer *tim, void *arg)
{
@@ -655,7 +680,7 @@ tx_cp_dl_cb(struct rte_timer *tim, void *arg)
if(first_call && p_xran_dev_ctx->enableCP)
{
- tti = pTCtx[(xran_lib_ota_tti[PortId] & 1) ^ 1].tti_to_process;
+ tti = pTCtx[(xran_lib_ota_tti[PortId] & 1) ^ 1].tti_to_process + p_xran_dev_ctx->offset_num_slots_cp_dl;
buf_id = tti % XRAN_N_FE_BUF_LEN;
slot_id = XranGetSlotNum(tti, SLOTNUM_PER_SUBFRAME(interval_us_local));
@@ -665,6 +690,16 @@ tx_cp_dl_cb(struct rte_timer *tim, void *arg)
{
/* Wrap around to next second */
frame_id = (frame_id + NUM_OF_FRAMES_PER_SECOND) & 0x3ff;
+ prev_dl_tti = -1;
+ }
+ else if (p_xran_dev_ctx->offset_num_slots_cp_dl > 0 && prev_dl_tti == xran_fs_get_max_slot(PortId) - 1 + p_xran_dev_ctx->offset_num_slots_cp_dl)
+ {
+ prev_dl_tti = tti;
+ tti = xran_fs_get_max_slot(PortId) + p_xran_dev_ctx->offset_num_slots_cp_dl;
+ }
+ else
+ {
+ prev_dl_tti = tti;
}
ctx_id = tti % XRAN_MAX_SECTIONDB_CTX;
@@ -1169,6 +1204,10 @@ xran_prepare_cp_ul_slot(uint16_t xran_port_id, uint32_t nSlotIdx, uint32_t nCcS
uint8_t seqid = xran_get_cp_seqid(pHandle, XRAN_DIR_UL, cc_id, port_id);
beam_id = xran_get_beamid(pHandle, XRAN_DIR_UL, cc_id, port_id, slot_id);
@@ -1143,7 +1239,45 @@ index 7c472d7..7c7cf91 100644
ret = generate_cpmsg_prach(pHandle, &params, sect_geninfo, mbuf, p_xran_dev_ctx,
frame_id, subframe_id, slot_id, tti,
beam_id, cc_id, port_id, occasionid, seqid);
@@ -1338,6 +1365,10 @@ tx_cp_ul_cb(struct rte_timer *tim, void *arg)
@@ -1213,6 +1252,7 @@ xran_prepare_cp_ul_slot(uint16_t xran_port_id, uint32_t nSlotIdx, uint32_t nCcS
return ret;
}
+uint32_t prev_ul_tti = -1;
void
tx_cp_ul_cb(struct rte_timer *tim, void *arg)
@@ -1254,7 +1294,7 @@ tx_cp_ul_cb(struct rte_timer *tim, void *arg)
pTCtx = &p_xran_dev_ctx->timer_ctx[0];
interval = p_xran_dev_ctx->interval_us_local;
PortId = p_xran_dev_ctx->xran_port_id;
- tti = pTCtx[(xran_lib_ota_tti[PortId] & 1) ^ 1].tti_to_process;
+ tti = pTCtx[(xran_lib_ota_tti[PortId] & 1) ^ 1].tti_to_process + p_xran_dev_ctx->offset_num_slots_cp_ul;
buf_id = tti % XRAN_N_FE_BUF_LEN;
ctx_id = tti % XRAN_MAX_SECTIONDB_CTX;
@@ -1264,7 +1304,20 @@ tx_cp_ul_cb(struct rte_timer *tim, void *arg)
/* Wrap around to next second */
if(tti == 0)
+ {
frame_id = (frame_id + NUM_OF_FRAMES_PER_SECOND) & 0x3ff;
+ prev_ul_tti = tti;
+ }
+ else if (p_xran_dev_ctx->offset_num_slots_cp_ul > 0 && prev_ul_tti == xran_fs_get_max_slot(PortId) - 1 + p_xran_dev_ctx->offset_num_slots_cp_ul)
+ {
+ prev_ul_tti = tti;
+ tti = xran_fs_get_max_slot(PortId) + p_xran_dev_ctx->offset_num_slots_cp_ul;
+ }
+ else
+ {
+ prev_ul_tti = tti;
+ }
+
if(xran_get_ru_category(pHandle) == XRAN_CATEGORY_A)
num_eAxc = xran_get_num_eAxc(pHandle);
else
@@ -1338,6 +1391,10 @@ tx_cp_ul_cb(struct rte_timer *tim, void *arg)
uint8_t seqid = xran_get_cp_seqid(pHandle, XRAN_DIR_UL, cc_id, port_id);
beam_id = xran_get_beamid(pHandle, XRAN_DIR_UL, cc_id, port_id, slot_id);
@@ -1154,7 +1288,7 @@ index 7c472d7..7c7cf91 100644
ret = generate_cpmsg_prach(pHandle, &params, sect_geninfo, mbuf, p_xran_dev_ctx,
frame_id, subframe_id, slot_id, tti,
beam_id, cc_id, port_id, occasionid, seqid);
@@ -1570,6 +1601,7 @@ int32_t handle_ecpri_ethertype(struct rte_mbuf* pkt_q[], uint16_t xport_id, stru
@@ -1570,6 +1627,7 @@ int32_t handle_ecpri_ethertype(struct rte_mbuf* pkt_q[], uint16_t xport_id, stru
{
case ECPRI_IQ_DATA:
pkt_data[num_data++] = pkt;
@@ -1162,7 +1296,7 @@ index 7c472d7..7c7cf91 100644
break;
// For RU emulation
case ECPRI_RT_CONTROL_DATA:
@@ -1587,7 +1619,7 @@ int32_t handle_ecpri_ethertype(struct rte_mbuf* pkt_q[], uint16_t xport_id, stru
@@ -1587,7 +1645,7 @@ int32_t handle_ecpri_ethertype(struct rte_mbuf* pkt_q[], uint16_t xport_id, stru
break;
default:
if (p_dev_ctx->fh_init.io_cfg.id == O_DU) {
@@ -1171,7 +1305,7 @@ index 7c472d7..7c7cf91 100644
}
break;
}
@@ -1876,7 +1908,7 @@ xran_sector_get_instances (uint32_t xran_port, void * pDevHandle, uint16_t nNumI
@@ -1876,7 +1934,7 @@ xran_sector_get_instances (uint32_t xran_port, void * pDevHandle, uint16_t nNumI
for (i = 0; i < nNumInstances; i++) {
/* Allocate Memory for CC handles */
@@ -1180,7 +1314,7 @@ index 7c472d7..7c7cf91 100644
if(pCcHandle == NULL)
return XRAN_STATUS_RESOURCE;
@@ -2347,8 +2379,7 @@ ring_processing_func_per_port(void* args)
@@ -2347,8 +2405,7 @@ ring_processing_func_per_port(void* args)
for (i = 0; i < ctx->io_cfg.num_vfs && i < XRAN_VF_MAX; i = i+1) {
if (ctx->vf2xran_port[i] == port_id) {
for(qi = 0; qi < ctx->rxq_per_port[port_id]; qi++){
@@ -1190,7 +1324,7 @@ index 7c472d7..7c7cf91 100644
}
}
}
@@ -2414,9 +2445,6 @@ xran_spawn_workers(void)
@@ -2414,9 +2471,6 @@ xran_spawn_workers(void)
nWorkerCore = nWorkerCore << 1;
}
@@ -1200,7 +1334,7 @@ index 7c472d7..7c7cf91 100644
printf("O-XU %d\n", eth_ctx->io_cfg.id);
printf("HW %d\n", icx_cpu);
printf("Num cores %d\n", total_num_cores);
@@ -2453,7 +2481,7 @@ xran_spawn_workers(void)
@@ -2453,7 +2507,7 @@ xran_spawn_workers(void)
eth_ctx->time_wrk_cfg.arg = NULL;
eth_ctx->time_wrk_cfg.state = 1;
@@ -1209,7 +1343,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -2475,7 +2503,7 @@ xran_spawn_workers(void)
@@ -2475,7 +2529,7 @@ xran_spawn_workers(void)
/* workers */
/** 0 **/
@@ -1218,7 +1352,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -2502,7 +2530,7 @@ xran_spawn_workers(void)
@@ -2502,7 +2556,7 @@ xran_spawn_workers(void)
}
/** 1 - CP GEN **/
@@ -1227,7 +1361,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -2536,7 +2564,7 @@ xran_spawn_workers(void)
@@ -2536,7 +2590,7 @@ xran_spawn_workers(void)
else
p_dev->tx_sym_gen_func = xran_process_tx_sym_cp_on_opt;
@@ -1236,7 +1370,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -2559,7 +2587,7 @@ xran_spawn_workers(void)
@@ -2559,7 +2613,7 @@ xran_spawn_workers(void)
/* workers */
/** 0 **/
@@ -1245,7 +1379,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -2586,7 +2614,7 @@ xran_spawn_workers(void)
@@ -2586,7 +2640,7 @@ xran_spawn_workers(void)
}
/** 1 - CP GEN **/
@@ -1254,7 +1388,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -2613,7 +2641,7 @@ xran_spawn_workers(void)
@@ -2613,7 +2667,7 @@ xran_spawn_workers(void)
/* workers */
/** 0 **/
@@ -1263,7 +1397,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -2628,7 +2656,7 @@ xran_spawn_workers(void)
@@ -2628,7 +2682,7 @@ xran_spawn_workers(void)
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
/** 1 - CP GEN **/
@@ -1272,7 +1406,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -2643,7 +2671,7 @@ xran_spawn_workers(void)
@@ -2643,7 +2697,7 @@ xran_spawn_workers(void)
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
/** 2 UP GEN **/
@@ -1281,7 +1415,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -2682,7 +2710,7 @@ xran_spawn_workers(void)
@@ -2682,7 +2736,7 @@ xran_spawn_workers(void)
/* workers */
/** 0 **/
@@ -1290,7 +1424,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -2697,7 +2725,7 @@ xran_spawn_workers(void)
@@ -2697,7 +2751,7 @@ xran_spawn_workers(void)
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
/** 1 - CP GEN **/
@@ -1299,7 +1433,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -2712,7 +2740,7 @@ xran_spawn_workers(void)
@@ -2712,7 +2766,7 @@ xran_spawn_workers(void)
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
/** 2 UP GEN **/
@@ -1308,7 +1442,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -2727,7 +2755,7 @@ xran_spawn_workers(void)
@@ -2727,7 +2781,7 @@ xran_spawn_workers(void)
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
/** 3 UP GEN **/
@@ -1317,7 +1451,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -2766,7 +2794,7 @@ xran_spawn_workers(void)
@@ -2766,7 +2820,7 @@ xran_spawn_workers(void)
/* workers */
/** 0 **/
@@ -1326,7 +1460,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -2781,7 +2809,7 @@ xran_spawn_workers(void)
@@ -2781,7 +2835,7 @@ xran_spawn_workers(void)
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
/** 1 Eth Tx **/
@@ -1335,7 +1469,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
@@ -2797,7 +2825,7 @@ xran_spawn_workers(void)
@@ -2797,7 +2851,7 @@ xran_spawn_workers(void)
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
/** 2 - CP GEN **/
@@ -1344,7 +1478,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -2812,7 +2840,7 @@ xran_spawn_workers(void)
@@ -2812,7 +2866,7 @@ xran_spawn_workers(void)
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
/** 3 UP GEN **/
@@ -1353,7 +1487,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -2827,7 +2855,7 @@ xran_spawn_workers(void)
@@ -2827,7 +2881,7 @@ xran_spawn_workers(void)
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
/** 4 UP GEN **/
@@ -1362,7 +1496,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -2861,7 +2889,7 @@ xran_spawn_workers(void)
@@ -2861,7 +2915,7 @@ xran_spawn_workers(void)
/* workers */
/** 0 Eth RX */
@@ -1371,7 +1505,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -2876,7 +2904,7 @@ xran_spawn_workers(void)
@@ -2876,7 +2930,7 @@ xran_spawn_workers(void)
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
/** 1 FH RX and BBDEV */
@@ -1380,7 +1514,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -2891,7 +2919,7 @@ xran_spawn_workers(void)
@@ -2891,7 +2945,7 @@ xran_spawn_workers(void)
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
/** 2 FH RX and BBDEV */
@@ -1389,7 +1523,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -2906,7 +2934,7 @@ xran_spawn_workers(void)
@@ -2906,7 +2960,7 @@ xran_spawn_workers(void)
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
/** 3 FH RX and BBDEV */
@@ -1398,7 +1532,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -2921,7 +2949,7 @@ xran_spawn_workers(void)
@@ -2921,7 +2975,7 @@ xran_spawn_workers(void)
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
/** FH TX and BBDEV */
@@ -1407,7 +1541,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -2969,7 +2997,7 @@ xran_spawn_workers(void)
@@ -2969,7 +3023,7 @@ xran_spawn_workers(void)
/* p_dev->tx_sym_gen_func = xran_process_tx_sym_cp_on_opt; */
@@ -1416,7 +1550,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -3004,7 +3032,7 @@ xran_spawn_workers(void)
@@ -3004,7 +3058,7 @@ xran_spawn_workers(void)
/* workers */
/** 0 **/
@@ -1425,7 +1559,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -3031,7 +3059,7 @@ xran_spawn_workers(void)
@@ -3031,7 +3085,7 @@ xran_spawn_workers(void)
}
/** 1 - CP GEN **/
@@ -1434,7 +1568,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -3062,7 +3090,7 @@ xran_spawn_workers(void)
@@ -3062,7 +3116,7 @@ xran_spawn_workers(void)
/* workers */
/** 0 **/
@@ -1443,7 +1577,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -3089,7 +3117,7 @@ xran_spawn_workers(void)
@@ -3089,7 +3143,7 @@ xran_spawn_workers(void)
}
/** 1 - CP GEN **/
@@ -1452,7 +1586,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -3115,7 +3143,7 @@ xran_spawn_workers(void)
@@ -3115,7 +3169,7 @@ xran_spawn_workers(void)
/* workers */
/** 0 **/
@@ -1461,7 +1595,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -3130,7 +3158,7 @@ xran_spawn_workers(void)
@@ -3130,7 +3184,7 @@ xran_spawn_workers(void)
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
/** 1 - CP GEN **/
@@ -1470,7 +1604,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -3145,7 +3173,7 @@ xran_spawn_workers(void)
@@ -3145,7 +3199,7 @@ xran_spawn_workers(void)
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
/** 2 UP GEN **/
@@ -1479,7 +1613,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -3184,7 +3212,7 @@ xran_spawn_workers(void)
@@ -3184,7 +3238,7 @@ xran_spawn_workers(void)
/* workers */
/** 0 FH RX and BBDEV */
@@ -1488,7 +1622,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -3199,7 +3227,7 @@ xran_spawn_workers(void)
@@ -3199,7 +3253,7 @@ xran_spawn_workers(void)
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
/** 1 - CP GEN **/
@@ -1497,7 +1631,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -3214,7 +3242,7 @@ xran_spawn_workers(void)
@@ -3214,7 +3268,7 @@ xran_spawn_workers(void)
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
/** 2 UP GEN **/
@@ -1506,7 +1640,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -3229,7 +3257,7 @@ xran_spawn_workers(void)
@@ -3229,7 +3283,7 @@ xran_spawn_workers(void)
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
/** 3 UP GEN **/
@@ -1515,7 +1649,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -3266,7 +3294,7 @@ xran_spawn_workers(void)
@@ -3266,7 +3320,7 @@ xran_spawn_workers(void)
/* workers */
/** 0 **/
@@ -1524,7 +1658,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -3281,7 +3309,7 @@ xran_spawn_workers(void)
@@ -3281,7 +3335,7 @@ xran_spawn_workers(void)
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
/** 1 - CP GEN **/
@@ -1533,7 +1667,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -3296,7 +3324,7 @@ xran_spawn_workers(void)
@@ -3296,7 +3350,7 @@ xran_spawn_workers(void)
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
/** 2 UP GEN **/
@@ -1542,7 +1676,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -3311,7 +3339,7 @@ xran_spawn_workers(void)
@@ -3311,7 +3365,7 @@ xran_spawn_workers(void)
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
/** 3 UP GEN **/
@@ -1551,7 +1685,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -3326,7 +3354,7 @@ xran_spawn_workers(void)
@@ -3326,7 +3380,7 @@ xran_spawn_workers(void)
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
/** 4 UP GEN **/
@@ -1560,7 +1694,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -3348,7 +3376,7 @@ xran_spawn_workers(void)
@@ -3348,7 +3402,7 @@ xran_spawn_workers(void)
/* workers */
/** 0 Eth RX */
@@ -1569,7 +1703,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -3363,7 +3391,7 @@ xran_spawn_workers(void)
@@ -3363,7 +3417,7 @@ xran_spawn_workers(void)
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
/** 1 FH RX and BBDEV */
@@ -1578,7 +1712,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -3378,7 +3406,7 @@ xran_spawn_workers(void)
@@ -3378,7 +3432,7 @@ xran_spawn_workers(void)
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
/** 2 FH RX and BBDEV */
@@ -1587,7 +1721,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -3393,7 +3421,7 @@ xran_spawn_workers(void)
@@ -3393,7 +3447,7 @@ xran_spawn_workers(void)
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
/** 3 FH RX and BBDEV */
@@ -1596,7 +1730,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -3408,7 +3436,7 @@ xran_spawn_workers(void)
@@ -3408,7 +3462,7 @@ xran_spawn_workers(void)
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
/** FH TX and BBDEV */
@@ -1605,7 +1739,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -3435,7 +3463,7 @@ xran_spawn_workers(void)
@@ -3435,7 +3489,7 @@ xran_spawn_workers(void)
/* workers */
/** 0 Eth RX */
@@ -1614,7 +1748,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -3450,7 +3478,7 @@ xran_spawn_workers(void)
@@ -3450,7 +3504,7 @@ xran_spawn_workers(void)
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
/** 1 FH RX and BBDEV */
@@ -1623,7 +1757,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -3465,7 +3493,7 @@ xran_spawn_workers(void)
@@ -3465,7 +3519,7 @@ xran_spawn_workers(void)
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
/** 2 FH RX and BBDEV */
@@ -1632,7 +1766,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -3480,7 +3508,7 @@ xran_spawn_workers(void)
@@ -3480,7 +3534,7 @@ xran_spawn_workers(void)
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
/** 3 FH RX and BBDEV */
@@ -1641,7 +1775,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -3495,7 +3523,7 @@ xran_spawn_workers(void)
@@ -3495,7 +3549,7 @@ xran_spawn_workers(void)
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
/** 4 FH RX and BBDEV */
@@ -1650,7 +1784,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -3510,7 +3538,7 @@ xran_spawn_workers(void)
@@ -3510,7 +3564,7 @@ xran_spawn_workers(void)
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
/** FH TX and BBDEV */
@@ -1659,7 +1793,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -3537,7 +3565,7 @@ xran_spawn_workers(void)
@@ -3537,7 +3591,7 @@ xran_spawn_workers(void)
/* workers */
/** 0 **/
@@ -1668,7 +1802,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -3562,7 +3590,7 @@ xran_spawn_workers(void)
@@ -3562,7 +3616,7 @@ xran_spawn_workers(void)
}
/** 1 - CP GEN **/
@@ -1677,7 +1811,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -3577,7 +3605,7 @@ xran_spawn_workers(void)
@@ -3577,7 +3631,7 @@ xran_spawn_workers(void)
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
/** 2 UP GEN **/
@@ -1686,7 +1820,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -3602,7 +3630,7 @@ xran_spawn_workers(void)
@@ -3602,7 +3656,7 @@ xran_spawn_workers(void)
}
/** 3 UP GEN **/
@@ -1695,7 +1829,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -3627,7 +3655,7 @@ xran_spawn_workers(void)
@@ -3627,7 +3681,7 @@ xran_spawn_workers(void)
}
/** 4 UP GEN **/
@@ -1704,7 +1838,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -3642,7 +3670,7 @@ xran_spawn_workers(void)
@@ -3642,7 +3696,7 @@ xran_spawn_workers(void)
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
/** 5 UP GEN **/
@@ -1713,7 +1847,7 @@ index 7c472d7..7c7cf91 100644
if(pThCtx == NULL){
print_err("pThCtx allocation error\n");
return XRAN_STATUS_FAIL;
@@ -3754,6 +3782,7 @@ xran_open(void *pHandle, struct xran_fh_config* pConf)
@@ -3754,6 +3808,7 @@ xran_open(void *pHandle, struct xran_fh_config* pConf)
p_xran_dev_ctx->puschMaskSlot = pConf->puschMaskSlot;
p_xran_dev_ctx->DynamicSectionEna = pConf->DynamicSectionEna;
p_xran_dev_ctx->RunSlotPrbMapBySymbolEnable = pConf->RunSlotPrbMapBySymbolEnable;
@@ -1721,7 +1855,7 @@ index 7c472d7..7c7cf91 100644
p_xran_dev_ctx->dssEnable = pConf->dssEnable;
p_xran_dev_ctx->dssPeriod = pConf->dssPeriod;
for(i=0; i<pConf->dssPeriod; i++) {
@@ -4034,6 +4063,24 @@ xran_get_slot_idx (uint32_t PortId, uint32_t *nFrameIdx, uint32_t *nSubframeIdx,
@@ -4034,6 +4089,24 @@ xran_get_slot_idx (uint32_t PortId, uint32_t *nFrameIdx, uint32_t *nSubframeIdx,
return tti;
}
@@ -1746,7 +1880,7 @@ index 7c472d7..7c7cf91 100644
int32_t
xran_set_debug_stop(int32_t value, int32_t count)
{
@@ -4208,7 +4255,7 @@ int32_t xran_init_PrbMap_by_symbol_from_cfg(struct xran_prb_map* p_PrbMapIn, str
@@ -4208,7 +4281,7 @@ int32_t xran_init_PrbMap_by_symbol_from_cfg(struct xran_prb_map* p_PrbMapIn, str
int32_t i = 0, j = 0, nPrbElm = 0;
int16_t iqwidth = p_PrbMapIn->prbMap[0].iqWidth;
struct xran_prb_elm *p_prb_elm_src, *p_prb_elm_dst;
@@ -1755,7 +1889,7 @@ index 7c472d7..7c7cf91 100644
int32_t nRBStart_tmp, nRBremain, nStartSymb, nEndSymb, nRBStart, nRBEnd, nRBSize;
// int32_t eth_xran_up_headers_sz = sizeof(struct eth_xran_up_pkt_hdr);
// int32_t nmaxRB = (mtu - eth_xran_up_headers_sz - RTE_PKTMBUF_HEADROOM)/XRAN_PAYLOAD_1_RB_SZ(iqwidth);
@@ -4217,7 +4264,6 @@ int32_t xran_init_PrbMap_by_symbol_from_cfg(struct xran_prb_map* p_PrbMapIn, str
@@ -4217,7 +4290,6 @@ int32_t xran_init_PrbMap_by_symbol_from_cfg(struct xran_prb_map* p_PrbMapIn, str
if (mtu==9600)
nmaxRB--; //for some reason when mtu is 9600, only 195 RB can be sent, not 196
@@ -1763,7 +1897,7 @@ index 7c472d7..7c7cf91 100644
memcpy(p_PrbMapOut, p_PrbMapIn, sizeof(struct xran_prb_map));
for(i = 0; i < XRAN_NUM_OF_SYMBOL_PER_SLOT; i++)
{
@@ -4292,26 +4338,30 @@ int32_t xran_init_PrbMap_by_symbol_from_cfg(struct xran_prb_map* p_PrbMapIn, str
@@ -4292,26 +4364,30 @@ int32_t xran_init_PrbMap_by_symbol_from_cfg(struct xran_prb_map* p_PrbMapIn, str
for(; i < XRAN_NUM_OF_SYMBOL_PER_SLOT; i++)
{
@@ -2045,7 +2179,7 @@ index 72249bc..6b30084 100644
#include <rte_config.h>
diff --git a/fhi_lib/lib/src/xran_tx_proc.c b/fhi_lib/lib/src/xran_tx_proc.c
index 45a17a8..85ce6fa 100644
index 45a17a8..cca2dcc 100644
--- a/fhi_lib/lib/src/xran_tx_proc.c
+++ b/fhi_lib/lib/src/xran_tx_proc.c
@@ -35,7 +35,11 @@
@@ -2060,7 +2194,19 @@ index 45a17a8..85ce6fa 100644
#include <rte_common.h>
#include <rte_eal.h>
@@ -1514,7 +1518,11 @@ xran_process_tx_sym_cp_on_opt(void* pHandle, uint8_t ctx_id, uint32_t tti, int32
@@ -1399,6 +1403,11 @@ xran_process_tx_sym_cp_on_opt(void* pHandle, uint8_t ctx_id, uint32_t tti, int32
if(0!=ptr_sect_elm->cur_index)
{
+ /* prevent xran from sending DL U-plane packets when it should not */
+ if(p_xran_dev_ctx->fh_init.io_cfg.id == O_DU && xran_fs_get_slot_type(xran_port_id, 0, tti, XRAN_SLOT_TYPE_DL) != 1)
+ {
+ return 0;
+ }
num_sections = ptr_sect_elm->cur_index;
/* iterate C-Plane configuration to generate corresponding U-Plane */
vf_id = p_xran_dev_ctx->map2vf[direction][cc_id][ant_id][XRAN_UP_VF];
@@ -1514,7 +1523,11 @@ xran_process_tx_sym_cp_on_opt(void* pHandle, uint8_t ctx_id, uint32_t tti, int32
mb_oran_hdr_ext->buf_addr = ext_buff;
mb_oran_hdr_ext->buf_iova = ((struct rte_mempool_objhdr*)RTE_PTR_SUB(mb_base, rte_mempool_objhdr_size))->iova + RTE_PTR_DIFF(ext_buff, mb_base);
mb_oran_hdr_ext->buf_len = ext_buff_len;
@@ -2072,7 +2218,7 @@ index 45a17a8..85ce6fa 100644
mb_oran_hdr_ext->shinfo = p_share_data;
mb_oran_hdr_ext->data_off = (uint16_t)RTE_MIN((uint16_t)RTE_PKTMBUF_HEADROOM, (uint16_t)mb_oran_hdr_ext->buf_len) - rte_ether_hdr_size;
mb_oran_hdr_ext->data_len = (uint16_t)(mb_oran_hdr_ext->data_len + rte_ether_hdr_size);
@@ -1532,8 +1540,13 @@ xran_process_tx_sym_cp_on_opt(void* pHandle, uint8_t ctx_id, uint32_t tti, int32
@@ -1532,8 +1545,13 @@ xran_process_tx_sym_cp_on_opt(void* pHandle, uint8_t ctx_id, uint32_t tti, int32
/* Fill in the ethernet header. */
#ifndef TRANSMIT_BURST
@@ -2086,7 +2232,7 @@ index 45a17a8..85ce6fa 100644
((struct rte_ether_hdr*)pStart)->ether_type = ETHER_TYPE_ECPRI_BE; /* ethertype */
#endif
nPktSize = sizeof(struct rte_ether_hdr)
@@ -1878,7 +1891,11 @@ xran_process_tx_srs_cp_on(void* pHandle, uint8_t ctx_id, uint32_t tti, int32_t s
@@ -1878,7 +1896,11 @@ xran_process_tx_srs_cp_on(void* pHandle, uint8_t ctx_id, uint32_t tti, int32_t s
mb_oran_hdr_ext->buf_addr = ext_buff;
mb_oran_hdr_ext->buf_iova = ((struct rte_mempool_objhdr*)RTE_PTR_SUB(mb_base, rte_mempool_objhdr_size))->iova + RTE_PTR_DIFF(ext_buff, mb_base);
mb_oran_hdr_ext->buf_len = ext_buff_len;
@@ -2098,7 +2244,7 @@ index 45a17a8..85ce6fa 100644
mb_oran_hdr_ext->shinfo = p_share_data;
mb_oran_hdr_ext->data_off = (uint16_t)RTE_MIN((uint16_t)RTE_PKTMBUF_HEADROOM, (uint16_t)mb_oran_hdr_ext->buf_len) - rte_ether_hdr_size;
mb_oran_hdr_ext->data_len = (uint16_t)(mb_oran_hdr_ext->data_len + rte_ether_hdr_size);
@@ -1887,8 +1904,13 @@ xran_process_tx_srs_cp_on(void* pHandle, uint8_t ctx_id, uint32_t tti, int32_t s
@@ -1887,8 +1909,13 @@ xran_process_tx_srs_cp_on(void* pHandle, uint8_t ctx_id, uint32_t tti, int32_t s
pStart = (char*)((char*)mb_oran_hdr_ext->buf_addr + mb_oran_hdr_ext->data_off);
/* Fill in the ethernet header. */

View File

@@ -319,6 +319,32 @@ int config_libconfig_set(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
}
}
static const char *config_type_to_name(int type)
{
switch (type) {
case CONFIG_TYPE_NONE:
return "none";
case CONFIG_TYPE_GROUP:
return "group";
case CONFIG_TYPE_INT:
return "integer";
case CONFIG_TYPE_INT64:
return "64-bit integer";
case CONFIG_TYPE_FLOAT:
return "float";
case CONFIG_TYPE_STRING:
return "string";
case CONFIG_TYPE_BOOL:
return "boolean";
case CONFIG_TYPE_ARRAY:
return "array";
case CONFIG_TYPE_LIST:
return "list";
default:
return "unknown";
}
}
int config_libconfig_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions, int numoptions, char *prefix)
{
config_setting_t *setting;
@@ -348,17 +374,26 @@ int config_libconfig_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
switch(cfgoptions[i].type) {
case TYPE_STRING:
if ( config_lookup_string(&(libconfig_privdata.cfg), cfgpath, (const char**)&str)) {
config_check_valptr(cfg, &cfgoptions[i], 1, strlen(str) + 1);
if ( strlen(str)+1 > cfgoptions[i].numelt )
fprintf(stderr,"[LIBCONFIG] %s: %s exceeds maximum length of %i bytes, value truncated\n",
cfgpath,str,cfgoptions[i].numelt);
snprintf( *cfgoptions[i].strptr , cfgoptions[i].numelt, "%s", str);
printf_params(cfg, "[LIBCONFIG] %s: \"%s\"\n", cfgpath, *cfgoptions[i].strptr);
} else {
setting = config_lookup(&(libconfig_privdata.cfg), cfgpath);
if (setting != NULL) {
int type = config_setting_type(setting);
if (type == CONFIG_TYPE_STRING) {
const char *strng = config_setting_get_string(setting);
config_check_valptr(cfg, &cfgoptions[i], 1, strlen(strng) + 1);
if (strlen(strng) + 1 > cfgoptions[i].numelt)
fprintf(stderr,
"[LIBCONFIG] %s: %s exceeds maximum length of %i bytes, value truncated\n",
cfgpath,
strng,
cfgoptions[i].numelt);
snprintf(*cfgoptions[i].strptr, cfgoptions[i].numelt, "%s", strng);
printf_params(cfg, "[LIBCONFIG] %s: \"%s\"\n", cfgpath, *cfgoptions[i].strptr);
} else {
fprintf(stderr,"[LIBCONFIG] expected a string input for %s but got type %s\n", cfgpath, config_type_to_name(type));
fatalerror = 1;
}
} else
defval = config_common_getdefault(cfg, &cfgoptions[i], prefix);
}
break;
case TYPE_STRINGLIST:

View File

@@ -14,12 +14,9 @@ add_subdirectory(nr)
add_subdirectory(LOG)
add_subdirectory(threadPool)
add_subdirectory(time_manager)
add_library(utils utils.c system.c time_meas.c time_stat.c tuntap_if.c)
add_library(utils utils.c system.c time_meas.c time_stat.c tuntap_if.c reverse_bits.c)
target_include_directories(utils PUBLIC .)
target_link_libraries(utils PRIVATE ${T_LIB})
if (ENABLE_TESTS)
add_subdirectory(hashtable/tests)
endif()
add_subdirectory(barrier)
add_subdirectory(actor)
add_subdirectory(shm_iq_channel)

View File

@@ -21,7 +21,7 @@ incgen/T_IDs.h: $(GENIDS) T_messages.txt
./$(GENIDS) T_messages.txt incgen/T_IDs.h
check_vcd: incgen/T_IDs.h incgen/T_messages.txt.h
gcc -Wall -I. -I.. -I../itti -I../../../openair2/COMMON -Itracer -o _check_vcd check_vcd.c tracer/database.c tracer/utils.c -lm -pthread
gcc -Wall -I. -I.. -I../../.. -I../itti -I../../../openair2/COMMON -Itracer -Iincgen -o _check_vcd check_vcd.c tracer/database.c tracer/utils.c -lm -pthread
./_check_vcd T_messages.txt ../LOG/vcd_signal_dumper.h || (rm -rf ./_check_vcd ./incgen && false)
rm -f ./_check_vcd

View File

@@ -18,6 +18,7 @@ void usage(void)
" (you can use several -f options)\n"
" -after <raw time> <nsec> 'event' time has to be greater than this\n"
" -count <n> dump 'n' matching events (less if EOF reached)\n"
" (default: no limit)\n"
);
exit(1);
}
@@ -53,7 +54,7 @@ int main(int n, char **v)
int filter_count = 0;
int buffer_arg;
int found;
int count = 1;
int count = -1;
int check_time = 0;
time_t sec = 0; /* initialization not necessary but gcc is not happy */
long nsec = 0; /* initialization not necessary but gcc is not happy */
@@ -132,12 +133,12 @@ int main(int n, char **v)
if (fwrite(e.e[buffer_arg].b, e.e[buffer_arg].bsize, 1, out) != 1)
{ perror(output_file); exit(1); }
found++;
if (found == count)
if (count != -1 && found == count)
break;
}
if (found == 0) printf("ERROR: event not found\n");
if (found != count)
if (count != -1 && found != count)
printf("WARNING: dumped %d events (wanted %d)\n", found, count);
fclose(out);

View File

@@ -135,7 +135,7 @@ int main(int n, char **v)
int input_is_float = 0;
int no_fft = 0;
int delay = 0;
int skip = 0;
uint64_t skip = 0;
int symbols_per_subframe;
long sampling_rate = 61440000;
int mu = 1;
@@ -152,7 +152,7 @@ int main(int n, char **v)
if (!strcmp(v[i], "-srate")) { if (i>n-2) usage(); sampling_rate = atol(v[++i]); continue; }
if (!strcmp(v[i], "-prb")) { if (i>n-2) usage(); prb = atoi(v[++i]); continue; }
if (!strcmp(v[i], "-mu")) { if (i>n-2) usage(); mu = atoi(v[++i]); continue; }
if (!strcmp(v[i], "-skip")) { if (i>n-2) usage(); skip = atoi(v[++i]); continue; }
if (!strcmp(v[i], "-skip")) { if (i>n-2) usage(); skip = atoll(v[++i]); continue; }
usage();
}
@@ -222,14 +222,14 @@ int main(int n, char **v)
int back_color = 0;
int hpixel = 0;
if (skip) {
if (input_is_float) {
float intime[skip * 2];
if (fread(intime, skip * 8, 1, stdin) != 1) abort();
} else {
short intime[skip * 2];
if (fread(intime, skip * 4, 1, stdin) != 1) abort();
}
/* skip data */
int sample_size = input_is_float ? 8 : 4;
uint64_t to_skip = skip;
while (to_skip) {
char intime[4096 * sample_size];
int count = to_skip > 4096 ? 4096 : to_skip;
if (fread(intime, count * sample_size, 1, stdin) != 1) abort();
to_skip -= count;
}
while (1) {

View File

@@ -1,6 +1,8 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <unistd.h>
#include <fcntl.h>
#include <netinet/in.h>
#include <arpa/inet.h>
@@ -387,6 +389,7 @@ void sr(void *_d, event e)
#define MAC_NR_HARQID 0x06
#define MAC_NR_FRAME_SLOT_TAG 0x07
#define NR_FDD_RADIO 1
#define NR_TDD_RADIO 2
#define NR_DIRECTION_UPLINK 0
@@ -948,6 +951,18 @@ void usage(void)
exit(1);
}
volatile int run = 1;
static int sock = -1;
void force_stop(int x)
{
printf("\ngently quit...\n");
close(sock);
sock = -1;
run = 0;
}
int main(int n, char **v)
{
char *database_filename = NULL;
@@ -968,6 +983,9 @@ int main(int n, char **v)
int live = 0;
memset(&d, 0, sizeof(ev_data));
/* write on a socket fails if the other end is closed and we get SIGPIPE */
if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) abort();
for (i = 0; i < 65536; i++) {
d.lte_rnti_to_ueid[i] = -1;
d.nr_rnti_to_ueid[i] = -1;
@@ -1014,8 +1032,10 @@ int main(int n, char **v)
perror(input_filename);
return 1;
}
} else
} else {
in = connect_to(live_ip, live_port);
sock = in;
}
database = parse_database(database_filename);
load_config_file(database_filename);
@@ -1121,10 +1141,15 @@ int main(int n, char **v)
new_thread(receiver, &d);
}
/* exit on ctrl+c and ctrl+z */
if (signal(SIGQUIT, force_stop) == SIG_ERR) abort();
if (signal(SIGINT, force_stop) == SIG_ERR) abort();
if (signal(SIGTSTP, force_stop) == SIG_ERR) abort();
OBUF ebuf = {.osize = 0, .omaxsize = 0, .obuf = NULL};
/* read messages */
while (1) {
while (run) {
event e;
e = get_event(in, &ebuf, database);

View File

@@ -2,6 +2,8 @@ add_library(ds OBJECT
byte_array.c
byte_array_producer.c
seq_arr.c
hashtable.c
obj_hashtable.c
)
target_include_directories(ds PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

View File

@@ -2,3 +2,9 @@ add_executable(test_seq_arr test_seq_array.c)
target_link_libraries(test_seq_arr ds alg)
add_dependencies(tests test_seq_arr)
add_test(NAME test_seq_arr COMMAND test_seq_arr) # no options required
add_executable(test_hashtable test_hashtable.cpp)
add_dependencies(tests test_hashtable)
target_link_libraries(test_hashtable PRIVATE ds GTest::gtest)
add_test(NAME test_hashtable
COMMAND ./test_hashtable)

81
common/utils/eq_check.h Normal file
View File

@@ -0,0 +1,81 @@
/*
* 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 EQ_CHECK_H_
#define EQ_CHECK_H_
#include <stdio.h>
#include <string.h>
/*
* Layers may override PRINT_ERROR() before including this header to preserve
* custom logging style (for example by mapping it to a local PRINT_ERROR()).
*/
#ifndef PRINT_ERROR
#ifdef ENABLE_TESTS
#define PRINT_ERROR(fmt, ...) fprintf(stderr, "%s:%d: " fmt, __FILE__, __LINE__, ##__VA_ARGS__)
#else
#define PRINT_ERROR(...) \
do { \
} while (0)
#endif
#endif
#ifndef EQ_CHECK_FAIL
#define EQ_CHECK_FAIL() return false
#endif
#define EQ_CHECK_GENERIC(condition, fmt, ...) \
do { \
if (!(condition)) { \
PRINT_ERROR("Equality condition '%s' failed: " fmt " != " fmt "\n", #condition, ##__VA_ARGS__); \
EQ_CHECK_FAIL(); \
} \
} while (0)
#define _EQ_CHECK_LONG(A, B) EQ_CHECK_GENERIC((A) == (B), "%ld", (A), (B))
#define _EQ_CHECK_INT(A, B) EQ_CHECK_GENERIC((A) == (B), "%d", (A), (B))
#define _EQ_CHECK_UINT32(A, B) EQ_CHECK_GENERIC((A) == (B), "%u", (A), (B))
#define _EQ_CHECK_UINT64(A, B) EQ_CHECK_GENERIC((A) == (B), "%" PRIu64, (uint64_t)(A), (uint64_t)(B))
#define _EQ_CHECK_STR(A, B) EQ_CHECK_GENERIC(strcmp((A), (B)) == 0, "'%s'", (A), (B))
#define _EQ_CHECK_OPTIONAL_IE(A, B, FIELD, EQ_MACRO) \
do { \
EQ_CHECK_GENERIC((((A)->FIELD) != NULL) == (((B)->FIELD) != NULL), "%d", ((A)->FIELD) != NULL, ((B)->FIELD) != NULL); \
if ((A)->FIELD && (B)->FIELD) \
EQ_MACRO(*(A)->FIELD, *(B)->FIELD); \
} while (0)
#define _EQ_CHECK_OPTIONAL_PTR(A, B, FIELD) \
do { \
if ((((A)->FIELD) != NULL) != (((B)->FIELD) != NULL)) { \
PRINT_ERROR("%s:%d: optional IE '%s' not allocated: %p, %p\n", \
__FILE__, \
__LINE__, \
#FIELD, \
(void *)(A)->FIELD, \
(void *)(B)->FIELD); \
EQ_CHECK_FAIL(); \
} \
} while (0)
#endif /* EQ_CHECK_H_ */

View File

@@ -1,5 +0,0 @@
add_executable(test_hashtable test_hashtable.cpp)
add_dependencies(tests test_hashtable)
target_link_libraries(test_hashtable PRIVATE HASHTABLE GTest::gtest)
add_test(NAME test_hashtable
COMMAND ./test_hashtable)

View File

@@ -37,7 +37,6 @@
#include "nr_common.h"
#include <limits.h>
#include <math.h>
#include <simde/x86/gfni.h>
#define C_SRS_NUMBER (64)
#define B_SRS_NUMBER (4)
@@ -112,46 +111,6 @@ static const unsigned short srs_bandwidth_config[C_SRS_NUMBER][B_SRS_NUMBER][2]
/* 63 */ {{272, 1}, {16, 17}, {8, 2}, {4, 2}},
};
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,
0x14, 0x94, 0x54, 0xD4, 0x34, 0xB4, 0x74, 0xF4, 0x0C, 0x8C, 0x4C, 0xCC, 0x2C, 0xAC, 0x6C, 0xEC, 0x1C, 0x9C, 0x5C, 0xDC,
0x3C, 0xBC, 0x7C, 0xFC, 0x02, 0x82, 0x42, 0xC2, 0x22, 0xA2, 0x62, 0xE2, 0x12, 0x92, 0x52, 0xD2, 0x32, 0xB2, 0x72, 0xF2,
0x0A, 0x8A, 0x4A, 0xCA, 0x2A, 0xAA, 0x6A, 0xEA, 0x1A, 0x9A, 0x5A, 0xDA, 0x3A, 0xBA, 0x7A, 0xFA, 0x06, 0x86, 0x46, 0xC6,
0x26, 0xA6, 0x66, 0xE6, 0x16, 0x96, 0x56, 0xD6, 0x36, 0xB6, 0x76, 0xF6, 0x0E, 0x8E, 0x4E, 0xCE, 0x2E, 0xAE, 0x6E, 0xEE,
0x1E, 0x9E, 0x5E, 0xDE, 0x3E, 0xBE, 0x7E, 0xFE, 0x01, 0x81, 0x41, 0xC1, 0x21, 0xA1, 0x61, 0xE1, 0x11, 0x91, 0x51, 0xD1,
0x31, 0xB1, 0x71, 0xF1, 0x09, 0x89, 0x49, 0xC9, 0x29, 0xA9, 0x69, 0xE9, 0x19, 0x99, 0x59, 0xD9, 0x39, 0xB9, 0x79, 0xF9,
0x05, 0x85, 0x45, 0xC5, 0x25, 0xA5, 0x65, 0xE5, 0x15, 0x95, 0x55, 0xD5, 0x35, 0xB5, 0x75, 0xF5, 0x0D, 0x8D, 0x4D, 0xCD,
0x2D, 0xAD, 0x6D, 0xED, 0x1D, 0x9D, 0x5D, 0xDD, 0x3D, 0xBD, 0x7D, 0xFD, 0x03, 0x83, 0x43, 0xC3, 0x23, 0xA3, 0x63, 0xE3,
0x13, 0x93, 0x53, 0xD3, 0x33, 0xB3, 0x73, 0xF3, 0x0B, 0x8B, 0x4B, 0xCB, 0x2B, 0xAB, 0x6B, 0xEB, 0x1B, 0x9B, 0x5B, 0xDB,
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};
void reverse_bits_u8(uint8_t const* in, size_t sz, uint8_t* out)
{
DevAssert(in != NULL);
DevAssert(out != NULL);
// Bit reversal implementation based on https://wunkolo.github.io/post/2020/11/gf2p8affineqb-bit-reversal/
#if defined(__GFNI__) && defined(__AVX512F__)
int simde_sz = 64;
int i = 0;
int simde_bound = sz - simde_sz;
for (; i <= simde_bound; i += simde_sz) {
__m512i input = _mm512_loadu_epi8(&in[i]);
__m512i reversed = _mm512_gf2p8affine_epi64_epi8(input, _mm512_set1_epi64(0x8040201008040201), 0);
_mm512_storeu_epi8(&out[i], reversed);
}
for (; i < sz; ++i) {
out[i] = bit_reverse_table_256[in[i]];
}
#else
for(size_t i = 0; i < sz; ++i)
out[i] = bit_reverse_table_256[in[i]];
#endif
}
/** @brief 3GPP TS 38.133 Table 10.1.6.1-1 mapping from dBm to RSRP index */
uint8_t get_rsrp_index(int rsrp_dBm)
{
@@ -163,31 +122,6 @@ uint8_t get_rsrp_index(int rsrp_dBm)
return (uint8_t)index;
}
// Reverse bits implementation based on http://graphics.stanford.edu/~seander/bithacks.html
uint64_t reverse_bits(uint64_t in, int n_bits)
{
// Reverse n_bits in uint64_t variable, example:
// n_bits: 10
// in: 10 0000 1111
// return: 11 1100 0001
AssertFatal(n_bits <= 64, "Maximum bits to reverse is 64, impossible to reverse %d bits!\n", n_bits);
uint64_t rev_bits = 0;
uint8_t *p = (uint8_t *)&in;
uint8_t *q = (uint8_t *)&rev_bits;
int n_bytes = n_bits >> 3;
for (int n = 0; n < n_bytes; n++) {
q[n_bytes - 1 - n] = bit_reverse_table_256[p[n]];
}
// Reverse remaining bits (not aligned with 8-bit)
rev_bits = rev_bits << (n_bits % 8);
for (int i = n_bytes * 8; i < n_bits; i++) {
rev_bits |= ((in >> i) & 0x1) << (n_bits - i - 1);
}
return rev_bits;
}
#define NUM_BW_ENTRIES 15
static const int tables_5_3_2[5][NUM_BW_ENTRIES] = {
@@ -1447,6 +1381,31 @@ unsigned short get_N_b_srs(int c_srs, int b_srs) {
return srs_bandwidth_config[c_srs][b_srs][1];
}
// TODO: Implement to b_SRS = 1 and b_SRS = 2
long rrc_get_max_nr_csrs(const int max_rbs, const long b_SRS)
{
if(b_SRS>0) {
LOG_E(NR_RRC,"rrc_get_max_nr_csrs(): Not implemented yet for b_SRS>0\n");
return 0; // This c_srs is always valid
}
const uint16_t m_SRS[64] = { 4, 8, 12, 16, 16, 20, 24, 24, 28, 32, 36, 40, 48, 48, 52, 56, 60, 64, 72, 72, 76, 80, 88,
96, 96, 104, 112, 120, 120, 120, 128, 128, 128, 132, 136, 144, 144, 144, 144, 152, 160,
160, 160, 168, 176, 184, 192, 192, 192, 192, 208, 216, 224, 240, 240, 240, 240, 256, 256,
256, 264, 272, 272, 272 };
long c_srs = 0;
uint16_t m = 4;
for(int c = 1; c<64; c++) {
if(m_SRS[c]>m && m_SRS[c]<max_rbs) {
c_srs = c;
m = m_SRS[c];
}
}
return c_srs;
}
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
@@ -1487,3 +1446,90 @@ float get_beta_dmrs(int num_cdm_groups_no_data, bool is_type2)
}
return beta_dmrs_pusch;
}
/** @brief Construct full 5G-S-TMSI from 5G-S-TMSI components
* @param amf_set_id AMF Set ID (10 bits)
* @param amf_pointer AMF Pointer (6 bits)
* @param m_tmsi 5G-TMSI (32 bits)
* @return Full 5G-S-TMSI (48 bits)
* @note The 5G-S-TMSI is constructed as a 48-bit value:
* - Bits 38-47: AMF Set ID (10 bits)
* - Bits 32-37: AMF Pointer (6 bits)
* - Bits 0-31: 5G-TMSI (32 bits)
* @ref 3GPP TS 23.003 */
uint64_t nr_construct_5g_s_tmsi(uint16_t amf_set_id, uint8_t amf_pointer, uint32_t m_tmsi)
{
// Construct full 5G-S-TMSI: <AMF Set ID (10 bits)><AMF Pointer (6 bits)><5G-TMSI (32 bits)>
return ((uint64_t)amf_set_id << 38) | ((uint64_t)amf_pointer << 32) | m_tmsi;
}
/** @brief Extract 5G-S-TMSI-Part1 from full 5G-S-TMSI
* @param fiveg_s_tmsi Full 5G-S-TMSI (48 bits)
* @return 5G-S-TMSI-Part1 (rightmost 39 bits)
* @note 5G-S-TMSI-Part1 is the rightmost 39 bits of the full 5G-S-TMSI:
* - Bits 32-37: AMF Pointer (6 bits)
* - Bits 0-31: 5G-TMSI (32 bits)
* @ref 3GPP TS 23.003 */
uint64_t nr_extract_5g_s_tmsi_part1(const uint64_t fiveg_s_tmsi)
{
return fiveg_s_tmsi & ((1ULL << 39) - 1);
}
/** @brief Construct 5G-S-TMSI-Part1 from 5G-S-TMSI components
* @param amf_set_id AMF Set ID (10 bits)
* @param amf_pointer AMF Pointer (6 bits)
* @param m_tmsi 5G-TMSI (32 bits)
* @return 5G-S-TMSI-Part1 (rightmost 39 bits of the full 5G-S-TMSI)
* @note 5G-S-TMSI-Part1 is the rightmost 39 bits of the full 5G-S-TMSI:
* - Bits 32-37: AMF Pointer (6 bits)
* - Bits 0-31: 5G-TMSI (32 bits)
* @ref 3GPP TS 23.003 */
uint64_t nr_construct_5g_s_tmsi_part1(uint16_t amf_set_id, uint8_t amf_pointer, uint32_t m_tmsi)
{
// Construct full 5G-S-TMSI and extract Part1: rightmost 39 bits
uint64_t full_s_tmsi = nr_construct_5g_s_tmsi(amf_set_id, amf_pointer, m_tmsi);
return nr_extract_5g_s_tmsi_part1(full_s_tmsi);
}
/** @brief Extract 5G-S-TMSI-Part2 from full 5G-S-TMSI
* @param fiveg_s_tmsi Full 5G-S-TMSI (48 bits)
* @return 5G-S-TMSI-Part2 (leftmost 9 bits)
* @note 5G-S-TMSI-Part2 is the leftmost 9 bits of the full 5G-S-TMSI:
* - Bits 39-47: AMF Set ID (9 bits)
* @ref 3GPP TS 23.003 */
uint16_t nr_extract_5g_s_tmsi_part2(const uint64_t fiveg_s_tmsi)
{
return (fiveg_s_tmsi >> 39) & ((1ULL << 9) - 1);
}
/** @brief Build full 5G-S-TMSI from Part1 and Part2
* @param part1 5G-S-TMSI-Part1 (rightmost 39 bits)
* @param part2 5G-S-TMSI-Part2 (leftmost 9 bits)
* @return Full 5G-S-TMSI (48 bits)
* @note Combines Part2 (leftmost 9 bits) and Part1 (rightmost 39 bits)
* @ref 3GPP TS 23.003 */
uint64_t nr_build_full_5g_s_tmsi(const uint64_t part1, const uint16_t part2)
{
return ((uint64_t)part2 << 39) | part1;
}
/** @brief Deconstruct full 5G-S-TMSI into its components
* @param fiveg_s_tmsi Full 5G-S-TMSI (48 bits)
* @param[out] amf_set_id Pointer to store AMF Set ID (10 bits)
* @param[out] amf_pointer Pointer to store AMF Pointer (6 bits)
* @param[out] m_tmsi Pointer to store 5G-TMSI (32 bits)
* @note The 5G-S-TMSI is deconstructed from a 48-bit value:
* - Bits 38-47: AMF Set ID (10 bits)
* - Bits 32-37: AMF Pointer (6 bits)
* - Bits 0-31: 5G-TMSI (32 bits)
* @ref 3GPP TS 23.003 */
void nr_deconstruct_5g_s_tmsi(const uint64_t fiveg_s_tmsi, uint16_t *amf_set_id, uint8_t *amf_pointer, uint32_t *m_tmsi)
{
DevAssert(amf_set_id != NULL);
DevAssert(amf_pointer != NULL);
DevAssert(m_tmsi != NULL);
*amf_set_id = fiveg_s_tmsi >> 38;
*amf_pointer = (fiveg_s_tmsi >> 32) & 0x3F;
*m_tmsi = fiveg_s_tmsi;
}

View File

@@ -286,9 +286,6 @@ static inline void warn_higher_threequarter_fs(const int n_rb, const int mu)
mu);
}
uint64_t reverse_bits(uint64_t in, int n_bits);
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);
@@ -357,6 +354,24 @@ frequency_range_t get_freq_range_from_band(uint16_t band);
*/
float get_beta_dmrs(int num_cdm_groups_no_data, bool is_type2);
/** @brief Construct full 5G-S-TMSI from 5G-S-TMSI components */
uint64_t nr_construct_5g_s_tmsi(uint16_t amf_set_id, uint8_t amf_pointer, uint32_t m_tmsi);
/** @brief Construct 5G-S-TMSI-Part1 from 5G-S-TMSI components */
uint64_t nr_construct_5g_s_tmsi_part1(uint16_t amf_set_id, uint8_t amf_pointer, uint32_t m_tmsi);
/** @brief Extract 5G-S-TMSI-Part1 from full 5G-S-TMSI */
uint64_t nr_extract_5g_s_tmsi_part1(const uint64_t fiveg_s_tmsi);
/** @brief Extract 5G-S-TMSI-Part2 from full 5G-S-TMSI */
uint16_t nr_extract_5g_s_tmsi_part2(const uint64_t fiveg_s_tmsi);
/** @brief Build full 5G-S-TMSI from Part1 and Part2 */
uint64_t nr_build_full_5g_s_tmsi(const uint64_t part1, const uint16_t part2);
/** @brief Deconstruct full 5G-S-TMSI into its components */
void nr_deconstruct_5g_s_tmsi(const uint64_t fiveg_s_tmsi, uint16_t *amf_set_id, uint8_t *amf_pointer, uint32_t *m_tmsi);
#define CEILIDIV(a,b) ((a+b-1)/b)
#define ROUNDIDIV(a,b) (((a<<1)+b)/(b<<1))
#define BOUNDED_EVAL(a, b, c) (min(c, max(a, b)))

View File

@@ -0,0 +1,92 @@
/*
* 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 "reverse_bits.h"
// we avoid assertions.h as it necessitates othe dependencies (e.g., exit_function)
#include <assert.h>
#include <simde/x86/gfni.h>
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,
0x14, 0x94, 0x54, 0xD4, 0x34, 0xB4, 0x74, 0xF4, 0x0C, 0x8C, 0x4C, 0xCC, 0x2C, 0xAC, 0x6C, 0xEC, 0x1C, 0x9C, 0x5C, 0xDC,
0x3C, 0xBC, 0x7C, 0xFC, 0x02, 0x82, 0x42, 0xC2, 0x22, 0xA2, 0x62, 0xE2, 0x12, 0x92, 0x52, 0xD2, 0x32, 0xB2, 0x72, 0xF2,
0x0A, 0x8A, 0x4A, 0xCA, 0x2A, 0xAA, 0x6A, 0xEA, 0x1A, 0x9A, 0x5A, 0xDA, 0x3A, 0xBA, 0x7A, 0xFA, 0x06, 0x86, 0x46, 0xC6,
0x26, 0xA6, 0x66, 0xE6, 0x16, 0x96, 0x56, 0xD6, 0x36, 0xB6, 0x76, 0xF6, 0x0E, 0x8E, 0x4E, 0xCE, 0x2E, 0xAE, 0x6E, 0xEE,
0x1E, 0x9E, 0x5E, 0xDE, 0x3E, 0xBE, 0x7E, 0xFE, 0x01, 0x81, 0x41, 0xC1, 0x21, 0xA1, 0x61, 0xE1, 0x11, 0x91, 0x51, 0xD1,
0x31, 0xB1, 0x71, 0xF1, 0x09, 0x89, 0x49, 0xC9, 0x29, 0xA9, 0x69, 0xE9, 0x19, 0x99, 0x59, 0xD9, 0x39, 0xB9, 0x79, 0xF9,
0x05, 0x85, 0x45, 0xC5, 0x25, 0xA5, 0x65, 0xE5, 0x15, 0x95, 0x55, 0xD5, 0x35, 0xB5, 0x75, 0xF5, 0x0D, 0x8D, 0x4D, 0xCD,
0x2D, 0xAD, 0x6D, 0xED, 0x1D, 0x9D, 0x5D, 0xDD, 0x3D, 0xBD, 0x7D, 0xFD, 0x03, 0x83, 0x43, 0xC3, 0x23, 0xA3, 0x63, 0xE3,
0x13, 0x93, 0x53, 0xD3, 0x33, 0xB3, 0x73, 0xF3, 0x0B, 0x8B, 0x4B, 0xCB, 0x2B, 0xAB, 0x6B, 0xEB, 0x1B, 0x9B, 0x5B, 0xDB,
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};
void reverse_bits_u8(uint8_t const* in, size_t sz, uint8_t* out)
{
assert(in != NULL);
assert(out != NULL);
// Bit reversal implementation based on https://wunkolo.github.io/post/2020/11/gf2p8affineqb-bit-reversal/
#if defined(__GFNI__) && defined(__AVX512F__)
int simde_sz = 64;
int i = 0;
int simde_bound = sz - simde_sz;
for (; i <= simde_bound; i += simde_sz) {
__m512i input = _mm512_loadu_epi8(&in[i]);
__m512i reversed = _mm512_gf2p8affine_epi64_epi8(input, _mm512_set1_epi64(0x8040201008040201), 0);
_mm512_storeu_epi8(&out[i], reversed);
}
for (; i < sz; ++i) {
out[i] = bit_reverse_table_256[in[i]];
}
#else
for(size_t i = 0; i < sz; ++i)
out[i] = bit_reverse_table_256[in[i]];
#endif
}
// Reverse bits implementation based on http://graphics.stanford.edu/~seander/bithacks.html
uint64_t reverse_bits(uint64_t in, int n_bits)
{
// Reverse n_bits in uint64_t variable, example:
// n_bits: 10
// in: 10 0000 1111
// return: 11 1100 0001
assert(n_bits <= 64); // Maximum bits to reverse is 64
uint64_t rev_bits = 0;
uint8_t *p = (uint8_t *)&in;
uint8_t *q = (uint8_t *)&rev_bits;
int n_bytes = n_bits >> 3;
for (int n = 0; n < n_bytes; n++) {
q[n_bytes - 1 - n] = bit_reverse_table_256[p[n]];
}
// Reverse remaining bits (not aligned with 8-bit)
rev_bits = rev_bits << (n_bits % 8);
for (int i = n_bytes * 8; i < n_bits; i++) {
rev_bits |= ((in >> i) & 0x1) << (n_bits - i - 1);
}
return rev_bits;
}

View File

@@ -0,0 +1,31 @@
/*
* 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 REVERSE_BITS_H_
#define REVERSE_BITS_H_
#include <stddef.h>
#include <stdint.h>
uint64_t reverse_bits(uint64_t in, int n_bits);
void reverse_bits_u8(uint8_t const* in, size_t sz, uint8_t* out);
#endif /* REVERSE_BITS_H_ */

View File

@@ -168,7 +168,7 @@ int fetch_du_by_ue_id(char *buf, int debug, telnet_printfunc_t prnt)
nr_rrc_du_container_t *du = get_du_for_ue(RC.nrrrc[0], ue_id);
if (du) {
prnt("gNB_DU_id %d is connected to ue_id %ld\n", du->setup_req->gNB_DU_id, ue_id);
prnt("gNB_DU_id %ld is connected to ue_id %ld\n", du->gNB_DU_id, ue_id);
return 0;
} else {
ERROR_MSG_RET("No DU connected\n");

View File

@@ -109,6 +109,15 @@ int hex_char_to_hex_value (char c);
// Converts an hexadecimal ASCII coded string into its value.**
int hex_string_to_hex_value (uint8_t *hex_value, const char *hex_string, int size);
/* Map task id to printable name. */
typedef struct {
int id;
char text[256];
} text_info_t;
#define TO_TEXT(LabEl, nUmID) {nUmID, #LabEl},
#define TO_ENUM(LabEl, nUmID) LabEl = nUmID,
char *itoa(int i);
#define STRINGIFY(S) #S

View File

@@ -229,7 +229,7 @@ In the `MACRLCs` section of the gNB/DU configuration file:
(see `ulsch_max_frame_inactivity`) or after scheduling request (SR)
* `identity_precoding_matrix` (default 0=false): flag to enable to use only
the identity precoding matrix in DL precoding
* `set_analog_beamforming` (default 0=false): flag to enable analog
* `set_analog_beamforming` (default "none"): parameter to enable analog
beamforming (for more information [`analog_beamforming.md`](../analog_beamforming.md))
* `beam_duration` (default 1): duration/number of consecutive slots for a given set of
beams, depending on hardware switching performance

View File

@@ -69,11 +69,10 @@ Tested libxran releases:
| Vendor |
|-----------------------------------------|
| `oran_e_maintenance_release_v1.0` |
| `oran_f_release_v1.0` |
**Note**: The libxran driver of OAI identifies the above E release version as "5.1.0" (E is fifth letter, then 1.0), and the above F release as "6.1.0".
**Note**: The libxran driver of OAI identifies the above F release version as "6.1.0" (F is the sixth letter, then 1.0).
### Configure your server
@@ -375,14 +374,6 @@ cd ~/openairinterface5g/
Download ORAN FHI DU library, checkout the correct version, and apply the correct patch (available in `oai_folder/cmake_targets/tools/oran_fhi_integration_patches`).
#### E release
```bash
git clone https://gerrit.o-ran-sc.org/r/o-du/phy.git ~/phy
cd ~/phy
git checkout oran_e_maintenance_release_v1.0
git apply ~/openairinterface5g/cmake_targets/tools/oran_fhi_integration_patches/E/oaioran_E.patch
```
#### F release
```bash
git clone https://gerrit.o-ran-sc.org/r/o-du/phy.git ~/phy
@@ -404,7 +395,6 @@ This feature is intended to enable experiments and future improvements on Arm sy
```bash
cd ~/phy/fhi_lib/lib
make clean
RTE_SDK=~/dpdk-stable-20.11.9/ XRAN_DIR=~/phy/fhi_lib make XRAN_LIB_SO=1 # E release
WIRELESS_SDK_TOOLCHAIN=gcc RTE_SDK=~/dpdk-stable-20.11.9/ XRAN_DIR=~/phy/fhi_lib make XRAN_LIB_SO=1 # F release
...
[AR] build/libxran.so
@@ -719,7 +709,37 @@ RU must be rebooted so the changes apply.
- 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
#### ProtO-RU
[ProtO-RU](https://github.com/NUS-CIR/ProtO-RU) is a software implementation of an O-RAN 7.2 RU using a NI USRP.
Different from other COTS RUs, ProtO-RU requires a larger DU delay profile which is larger than the TTI interval.
The OAI configuration file [`gnb.sa.band78.106prb.fhi72.1x1-proto-ru.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.106prb.fhi72.1x1-proto-ru.conf) corresponds to:
- TDD pattern `DDDSU`, 2.5ms
- Bandwidth 40MHz
- MTU 9216
- 1T1R
##### RU configuration
First, compile the RU as outlined in the [building ProtO-RU tutorial](https://github.com/NUS-CIR/ProtO-RU/tree/proto-ru?tab=readme-ov-file#building-proto-ru).
Then, ensure that both your DU and ProtO-RU host are PTP synchronized.
Next, use the RU config, [protoru-OAI-B210-TDD-n78-40MHz-1x1-30kHz.yml](https://github.com/NUS-CIR/ProtO-RU/blob/proto-ru/proto-ru/conf-files/protoru-OAI-B210-TDD-n78-40MHz-1x1-30kHz.yml), which corresponds to the above mentioned DU config file.
In addition, please adapt the DU MAC address and VLAN tag to your needs.
ProtO-RU was successfully tested with USRP B210.
If you are using a different SDR (e.g., N310), you will need to update the ProtO-RU and the DU configurations accordingly.
Launch ProtO-RU with the adapted configuration file with the command:
```bash
sudo ./ru_emulator -c <path-to/protoru-OAI-B210-TDD-n78-40MHz-1x1-30kHz.yml>
```
Finally, start the OAI gNB.
## Configure Network Interfaces and DPDK VFs
The 7.2 fronthaul uses the xran library, which requires DPDK. In this step, we
need to configure network interfaces to send data to the RU, and configure DPDK
@@ -937,7 +957,7 @@ Sample configuration files for OAI gNB, specific to the manufacturer of the radi
4. Benetel 550 RU:
[`gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf)
[`gnb.sa.band78.273prb.fhi72.4x2-benetel550.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x2-benetel550.conf)
[`gnb.sa.band78.273prb.fhi72.2x2-benetel550-16b.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.2x2-benetel550-16b.conf) - only with E release; with F, UL U-plane fragmentation is not correct
[`gnb.sa.band78.273prb.fhi72.2x2-benetel550-16b.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.2x2-benetel550-16b.conf) - tested successfully with E release; with F, UL U-plane fragmentation is not correct
5. Metanoia RU:
[`gnb.sa.band78.273prb.fhi72.4x4-metanoia.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-metanoia.conf)
@@ -1001,6 +1021,7 @@ Edit the sample OAI gNB configuration file and check following parameters:
* `prach_config`: PRACH-specific configuration
* `eAxC_offset`: PRACH antenna offset; if not set, default value of `N = max(Nrx,Ntx)` is used
* `kbar`: the PRACH guard interval, provided in RU
* `app_id`: `DU` or `RU`. Sets the application `id` value in xRAN. Use the default value: `DU`.
Layer mapping (eAxC offsets) happens as follows:
- For PUSCH/PDSCH, the layers are mapped to `[0,1,...,Nrx-1]/[0,1,...,Ntx-1]` where `Nrx/Ntx` is the
@@ -1461,6 +1482,7 @@ fhi_72 = {
* `dpdk_iova_mode`: [*]
* `owdm_enable`: [*]
* `fh_config`: only DU delay profile (`T1a` and `Ta4`)
* `app_id`: [*]
[*] see [Configure OAI gNB](#configure-oai-gnb) for more details

View File

@@ -13,122 +13,221 @@ Beware if you previously pulled the `develop` branch that your repository may be
## General
- [FEATURE_SET.md](./FEATURE_SET.md): lists supported features
- [GET_SOURCES.md](./GET_SOURCES.md): how to download the sources
- [BUILD.md](./BUILD.md): how to build the sources
- [code-style-contrib.md](./code-style-contrib.md): overall working practices, code style, and review process
- [cross-compile.md](./cross-compile.md): how to cross-compile OAI for ARM
- [clang-format.md](./clang-format.md): how to format the code
- [sanitizers.md](./dev_tools/sanitizers.md): how to run with ASan/UBSan/MemSAN/TSan
- [environment-variables.md](./environment-variables.md): the environment variables used by OAI
- [tuning_and_security.md](./tuning_and_security.md): performance and security considerations
- [Contributing](../CONTRIBUTING.md): how to contribute to the project
- [Changelog](../CHANGELOG.md): release notes and version history
- [Notice](../NOTICE.md): third-party software credits and licenses
- [License](../LICENSE): software license and terms of use
- [Mailing Lists](https://gitlab.eurecom.fr/oai/openairinterface5g/-/wikis/MailingList): subscribe for updates and get support from the community.
- [OAI Developer Meetings](https://gitlab.eurecom.fr/oai/openairinterface5g/-/wikis/OpenAirDevMeetings): weekly OAI Developer Calls open to all OAI community members
- [System Requirements](./system_requirements.md): system requirements for running the OAI 4G/5G stack
- [Feature Set](./FEATURE_SET.md): lists supported features
- [Get Sources](./GET_SOURCES.md): how to download the sources
- [Build](./BUILD.md): how to build the sources
- [Code Style & Contribution](./code-style-contrib.md): overall working practices, code style, and review process
- [Cross Compile](./cross-compile.md): how to cross-compile OAI for ARM
- [Clang Format](./clang-format.md): how to format the code
- [Sanitizers](./dev_tools/sanitizers.md): how to run with ASan/UBSan/MemSAN/TSan
- [Environment Variables](./environment-variables.md): the environment variables used by OAI
- [Tuning and Security](./tuning_and_security.md): performance and security considerations
There is some general information in the [OpenAirInterface Gitlab Wiki](https://gitlab.eurecom.fr/oai/openairinterface5g/-/wikis/home)
## Tutorials
- Step-by-step tutorials to set up 5G:
* [OAI 5GC](./NR_SA_Tutorial_OAI_CN5G.md)
* [OAI gNB with COTS UE](./NR_SA_Tutorial_COTS_UE.md)
* [OAI NR-UE](./NR_SA_Tutorial_OAI_nrUE.md)
* [Multiple OAI NR-UE with RFsimulator](./NR_SA_Tutorial_OAI_multi_UE.md)
- [RUNMODEM.md](./RUNMODEM.md): Generic information on how to
* Run simulators
* Run with hardware
* Specific OAI modes (phy-test, do-ra, noS1)
* (5G) Using SDAP and custom DRBs
* IF setups and arbitrary frequencies
* MIMO
- [How to run OAI with O-RAN 7.2 FHI](./ORAN_FHI7.2_Tutorial.md)
- [How to run a 5G-NSA setup](./TESTING_OAI_NSA_COTS_UE.md)
- [How to run a 4G setup using L1 simulator](./L1SIM.md) _Note: we recommend the RFsimulator_
- [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)
- [OAI 5GC](./NR_SA_Tutorial_OAI_CN5G.md): Step-by-step tutorial to set up 5G Core Network
- [OAI gNB with COTS UE](./NR_SA_Tutorial_COTS_UE.md): Step-by-step tutorial for gNB with COTS-UE
- [OAI NR-UE](./NR_SA_Tutorial_OAI_nrUE.md): Step-by-step tutorial for NR-UE
- [Multiple OAI NR-UE with RFsimulator](./NR_SA_Tutorial_OAI_multi_UE.md): Setup for multiple UEs
- [RUNMODEM](./RUNMODEM.md): Generic information on how to run simulators, run
with hardware, specific OAI modes (phy-test, do-ra, noS1), (5G) using SDAP and
custom DRBs, IF setups and arbitrary frequencies, and MIMO.
- [How to run OAI with O-RAN 7.2 FHI](./ORAN_FHI7.2_Tutorial.md): Use OAI with O-RAN 7.2 fronthaul interface
- [How to run a 5G-NSA setup](./TESTING_OAI_NSA_COTS_UE.md): Guide to set up and test 5G Non-Standalone (NSA)
- [How to run a 4G setup using L1 simulator](./L1SIM.md): _Note: we recommend the RFsimulator_
- [How to use the L2 simulator](./L2NFAPI.md): L2 nFAPI Simulator Usage
- [How to use the OAI channel simulator](../openair1/SIMULATION/TOOLS/DOC/channel_simulation.md): Guide to configure and run OAI channel simulation
- [How to use GPU-accelerated channel simulation](../openair1/SIMULATION/TOOLS/DOC/gpu_acceleration.md): CUDA GPU acceleration for channel simulation
- [How to run OAI-VNF and OAI-PNF](./nfapi.md): how to run the FAPI/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.md)
- [How to run with E2 agent](../openair2/E2AP/README.md)
- [How to run the physical simulators](./physical-simulators.md)
- [How to setup OAI with Nvidia Aerial and Foxconn](./Aerial_FAPI_Split_Tutorial.md)
- [How to setup OAI with LDPC accelerators (Xilinx T2/Intel ACCs)](./LDPC_OFFLOAD_SETUP.md)
- [How to setup OAI with the XDMA FPGA LDPC accelerator](./LDPC_XDMA_offload_setup.md)
- [How to do a handover](./handover-tutorial.md)
- [How to setup gNB frequency](./gNB_frequency_setup.md)
- [How to use the RT data recording app](./data_recording.md)
- [How to use packages](./packages.md)
- [How to use the positioning reference signal (PRS)](./RUN_NR_PRS.md): How to run NR PRS with OAI gNB and nrUE
- [How to use device-to-device communication (D2D, 4G)](./d2d_emulator_setup.md): Setup and test D2D communication in 4G
- [How to run with E2 agent](../openair2/E2AP/README.md): Guide to deploy 5G OAI RAN with E2 Agent and FlexRIC nearRT-RIC
- [How to run the physical simulators](./physical-simulators.md): Guide for using physims
- [How to setup OAI with Nvidia Aerial and Foxconn](./Aerial_FAPI_Split_Tutorial.md): Guide to setup OAI with Nvidia Aerial FAPI split and Foxconn Radio Units
- [How to setup OAI with LDPC accelerators (Xilinx T2/Intel ACCs)](./LDPC_OFFLOAD_SETUP.md): Guide to setup OAI LDPC offload
- [How to setup OAI with the XDMA FPGA LDPC accelerator](./LDPC_XDMA_offload_setup.md): Guide to setup LDPC offload with XDMA driver
- [How to do a handover](./handover-tutorial.md): Guide to perform F1 and N2 handovers
- [How to setup gNB frequency](./gNB_frequency_setup.md): Instructions to configure 5G gNB frequency
- [How to use the RT data recording app](./data_recording.md): Synchronized real-time 5G data recording
- [How to use packages](./packages.md): Build OAI Deb/RPM packages using CMake
- [NR LDPC AAL](../openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_aal/README.md): implementation for O-RAN LDPC BBDEV
Legacy unmaintained files:
- [`L2NFAPI_NOS1.md`](./L2NFAPI_NOS1.md), [`L2NFAPI_S1.md`](./L2NFAPI_S1.md):
old L2simulator, not valid anymore
### Legacy unmaintained files
- [L2NFAPI_NOS1](./L2NFAPI_NOS1.md): old L2simulator, not valid anymore
- [L2NFAPI_S1](./L2NFAPI_S1.md): old L2simulator, not valid anymore
## Designs
- General software architecture notes: [SW_archi.md](./SW_archi.md)
- [Information on E1](./E1AP/E1-design.md)
- [Information on F1](./F1AP/F1-design.md)
- [Information on how NR nFAPI works](./NR_NFAPI_archi.md)
- [Flow graph of the L1 in gNB](SW-archi-graph.md)
- [L1 threads in NR-UE](./nr-ue-design.md)
- [Information on gNB MAC](./MAC/mac-usage.md)
- [Information on gNB RRC](./RRC/rrc-usage.md)
- [Information on analog beamforming implementation](./analog_beamforming.md)
- [Information on the UE 5G NAS implementation](./5Gnas.md)
- [Software Architecture](./SW_archi.md): General software architecture notes
- [Information on E1](./E1AP/E1-design.md): E1 interface between CU-CP and CU-UP
- [E1AP Procedures](./E1AP/e1ap_procedures.md): Information on E1 interface procedures
- [F1AP Messages Encoding & Decoding Library](./F1AP/F1AP-lib.md): Library for encoding, decoding, and testing F1AP messages
- [Information on F1](./F1AP/F1-design.md): F1 interface design between CU and DU
- [Information on how NR nFAPI works](./NR_NFAPI_archi.md): SmallCellForum 5G (n)FAPI split and message handling
- [Flow graph of the L1 in gNB](SW-archi-graph.md): L1 threading and scheduler flow in gNB
- [L1 threads in NR-UE](./nr-ue-design.md): L1 PHY-MAC flow and UE thread processing
- [Information on gNB MAC](./MAC/mac-usage.md): 5G MAC scheduler and configuration
- [Information on gNB RRC](./RRC/rrc-usage.md): 5G RRC layer functioning and configuration
- [5G RRC Layer](./RRC/rrc-dev.md): 5G RRC procedures and UE handling
- [Information on analog beamforming implementation](./analog_beamforming.md): Implementation of analog beamforming in OAI codebase.
- [Information on the UE 5G NAS implementation](./5Gnas.md): 5GS NAS protocol and its implementation in OAI
- [Information on UL-MIMO](./UL_MIMO.md): UL-MIMO specific notes
- [gNB RACH Processing](./rach_processing_in_gNB.md): gNB RACH handling from sample collection to response scheduling
## Building and running from images
- [How to build images](../docker/README.md)
- [How to run 5G with the RFsimulator from images](../ci-scripts/yaml_files/5g_rfsimulator/README.md)
- [How to run 4G with the RFsimulator from images](../ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/README.md)
- [How to run physical simulators in OpenShift](../openshift/README.md)
- [How to build images](../docker/README.md): Build and Use OAI with Docker/Podman
- [How to run 5G with the RFsimulator from images](../ci-scripts/yaml_files/5g_rfsimulator/README.md): Run 5G NR using RF simulator with Docker containers
- [How to run 4G with the RFsimulator from images](../ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/README.md): Run 4G-LTE using RF simulator with Docker containers
- [How to run physical simulators in OpenShift](../openshift/README.md): OpenShift Build and Usage Procedures
## Libraries
### General
- The [T tracer](../common/utils/T/DOC/T.md): a generic tracing tool (VCD, Wireshark, GUI, to save for later, ...)
- [T tracer](../common/utils/T/DOC/T.md): a generic tracing tool (VCD, Wireshark, GUI, to save for later, ...)
- [OPT](../openair2/UTIL/OPT/README.txt): how to trace to wireshark
- The [configuration module](../common/config/DOC/config.md)
- The [logging module](../common/utils/LOG/DOC/log.md)
- The [shared object loader](../common/utils/DOC/loader.md)
- The [threadpool](../common/utils/threadPool/thread-pool.md) used in L1
- The [LDPC implementation](../openair1/PHY/CODING/DOC/LDPCImplementation.md) is a shared library
- The [time management](time_management.md) module
- [Threadpool](../common/utils/threadPool/thread-pool.md): used in L1
- [LDPC Implementation](../openair1/PHY/CODING/DOC/LDPCImplementation.md): It is a shared library
- [Time Management](time_management.md): manages time for OAI components
- [LTE RRC Configuration (ASN.1 Based)](../openair2/RRC/LTE/MESSAGES/README.md): generates LTE RRC data structures based on the ASN.1
#### Configuration Module
- [OAI Configuration Module](../common/config/DOC/config.md): Manages and validates OAI parameters
- [Config Runtime Usage](../common/config/DOC/config/rtusage.md): overview of config runtime usage
- [Config Architecture](../common/config/DOC/config/arch.md): config module source files and components
- [Config Dev Usage API](../common/config/DOC/config/devusage/api.md): information on configuration module API
- [Config Dev Usage Add A Param](../common/config/DOC/config/devusage/addaparam.md): add parameters in an existing section
- [Config Dev Usage Add Param Set](../common/config/DOC/config/devusage/addparamset.md): add a parameter set in a new section
- [Config Dev Usage Struct](../common/config/DOC/config/devusage/struct.md): configuration module public structures
- [Config Dev Usage](../common/config/DOC/config/devusage.md): overview of config dev usage
#### Loader
- [Shared Object Loader](../common/utils/DOC/loader.md): manage modular shared libraries
- [Loader Runtime Usage](../common/utils/DOC/loader/rtusage.md): information on loader runtime usage
- [Loader Architecture](../common/utils/DOC/loader/arch.md): details on loader source files
- [Loader Dev Usage Loading](../common/utils/DOC/loader/devusage/loading.md): implementation of a shared library dynamic load using the oai loader
- [Loader Dev Usage API](../common/utils/DOC/loader/devusage/api.md): information on loader API
- [Loader Dev Usage Struct](../common/utils/DOC/loader/devusage/struct.md): `loader_shlibfunc_t` structure
- [Loader Dev Usage](../common/utils/DOC/loader/devusage.md): overview of loader dev usage
#### Logging
- [Logging Module](../common/utils/LOG/DOC/log.md): OAI console logging facility
- [LOG Add Console Trace](../common/utils/LOG/DOC/addconsoletrace.md): Adding console traces in oai code
- [LOG LTTng Logs](../common/utils/LOG/DOC/lttng_logs.md): OAI gNB LTTng Tracing Setup Guide
- [LOG Configure Log](../common/utils/LOG/DOC/configurelog.md): Initializing and configuring the logging facility
- [LOG Runtime Usage](../common/utils/LOG/DOC/rtusage.md): details on LOG Runtime Usage
- [LOG Architecture](../common/utils/LOG/DOC/arch.md): logging facility source files
- [LOG Dev Usage](../common/utils/LOG/DOC/devusage.md): logging facility developer usage
### Radios
Some directories under `radio` contain READMEs:
- [RFsimulator](../radio/rfsimulator/README.md)
- [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)
- [rf_emulator](../radio/emulator/README.md)
- [RFsimulator](../radio/rfsimulator/README.md): Guide to using the RF Simulator
- [USRP](../radio/USRP/README.md): USRP Radio Setup and Usage Guide.
- [BladeRF](../radio/BLADERF/README.md): BladeRF 2.0 Micro Setup instructions
- [IQPlayer](./iqrecordplayer_usage.md): general documentation for the IQ player
- [IQ Record Playback](../radio/iqplayer/DOC/iqrecordplayer_usage.md): specific usage documentation in the `radio` directory
- [FHI 7.2](../radio/fhi_72/README.md): XRAN Driver (FHI 7.2) Setup
- [vrtsim](../radio/vrtsim/README.md): VRTSim Setup and Usage Guide
- [RF Emulator](../radio/emulator/README.md): RF Emulator Library
- [Ethernet Drivers](../radio/ETHERNET/ethernet.md): Ethernet-based drivers for fronthaul
The other SDRs (AW2S, LimeSDR, ...) have no READMEs.
### Special-purpose libraries
- OAI has two scopes: one based on Xforms and one based on imgui, described in [this README](../openair1/PHY/TOOLS/readme.md)
- OAI comes with an integrated [telnet server](../common/utils/telnetsrv/DOC/telnethelp.md) to monitor and control
- OAI comes with an integrated [web server](../common/utils/websrv/DOC/websrv.md)
- [OAI Scopes](../openair1/PHY/TOOLS/readme.md): OAI has two scopes (one based on Xforms and one based on imgui)
#### Telnet Server
- [Telnet Server Help](../common/utils/telnetsrv/DOC/telnethelp.md): OAI comes with an integrated telnet server to monitor and control
- [Telnet Server](../common/utils/telnetsrv/DOC/telnetsrv.md): OAI embedded telnet server
- [Telnet Add Command](../common/utils/telnetsrv/DOC/telnetaddcmd.md): example of adding a command to the telnet server
- [Telnet Log](../common/utils/telnetsrv/DOC/telnetlog.md): telnet log command
- [Telnet Measurement](../common/utils/telnetsrv/DOC/telnetmeasur.md): information on telnet `measur` command
- [Telnet Usage](../common/utils/telnetsrv/DOC/telnetusage.md): Using the telnet server
- [Telnet Loop](../common/utils/telnetsrv/DOC/telnetloop.md): information on telnet `loop` command
- [Telnet Loader](../common/utils/telnetsrv/DOC/telnetloader.md): information on telnet `loader` command
- [Telnet History](../common/utils/telnetsrv/DOC/telnethist.md): implementation of simple history system
- [Telnet Get/Set](../common/utils/telnetsrv/DOC/telnetgetset.md): information on telnet `getall` command
- [Telnet Architecture](../common/utils/telnetsrv/DOC/telnetarch.md): overview of telnet server architecture
- [Telnet O1](../common/utils/telnetsrv/DOC/telneto1.md): telnet module to perform some O1-related actions
#### Web Server
- [Web Server](../common/utils/websrv/DOC/websrv.md): OAI comes with an integrated web server
- [Web Server Architecture](../common/utils/websrv/DOC/websrvarch.md): web server interface implementation
- [Web Server Usage](../common/utils/websrv/DOC/websrvuse.md): building the web server
- [Web Server Development](../common/utils/websrv/DOC/websrvdev.md): enhancing the web server
- [Web Server Frontend](../common/utils/websrv/frontend/README.md): information on web server frontend
## Testing
- [UnitTests.md](./UnitTests.md) explains the unit testing setup
- Component tests are under `tests/`. Currently, there is a simple CU-UP
tester, see the corresponding [README.md](../tests/nr-cuup/README.md).
- [TESTBenches.md](./TESTBenches.md) lists the CI setup and links to pipelines
- The CI setup uses a [custom framework](../ci-scripts/README.md) to run
end-to-end tests.
- [Unit Tests](./UnitTests.md): explains the unit testing setup
- [CU-UP Tester](../tests/nr-cuup/README.md): Component tests are under `tests/` (currently, a simple CU-UP tester)
- [Test Benches](./TESTBenches.md): Lists the CI setup and links to pipelines
- [CI Framework](../ci-scripts/README.md): The CI setup uses a custom framework to run end-to-end tests.
## Developer tools
- [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 ubuntu24 docker development environment
- [doc_best_practices.md](./doc_best_practices.md): overall best practices for writing documentations
- [Formatting](../tools/formatting/README.md): a clang-format error detection tool
- [IWYU](../tools/iwyu/README.md): a tool to detect `#include` errors
- [Docker Dev Environment](../tools/docker-dev-env/README.md): Ubuntu 24 Docker development environment
- [Plotting tools](../tools/plots/README.md): tools to visualize 5G NR simulation results
- [Documentation Best Practices](./doc_best_practices.md): overall best practices for writing documentations
- [Documentations using MkDocs](../tools/mkdocs/README.md): generate and serve documentation with MkDocs
## CI
- [Configuration Files](../ci-scripts/conf_files/README.md): naming style guide for config files
- [OAI O-RAN 7.2 Front-haul VVDN RU](../ci-scripts/yaml_files/sa_fhi_7.2_vvdn_gnb/README.md): OAI O-RAN 7.2 Front-haul Docker Compose with VVDN RU
- [OAI O-RAN 7.2 Front-haul Metanoia RU](../ci-scripts/yaml_files/sa_fhi_7.2_metanoia_2x2_gnb/README.md): OAI O-RAN 7.2 Front-haul Docker Compose with Metanoia RU
- [OAI O-RAN 7.2 Front-haul Benetel RU](../ci-scripts/yaml_files/sa_fhi_7.2_benetel550_gnb/README.md): OAI O-RAN 7.2 Front-haul Docker Compose with Benetel RU
- [CI test for 5G F1+E1 splits with RFsimulator](../ci-scripts/yaml_files/5g_rfsimulator_e1/README.md): CI test for 5G F1+E1 splits with RFsimulator
- [CI tests](../ci-scripts/tests/README.md): CI code test cases and helper scripts
- [Colosseum Testing](../ci-scripts/colosseum_scripts/README.md): automated testing of OpenAirInterface (OAI) gNB and softUE on the Colosseum
## nFAPI
- [Open-nFAPI](../nfapi/open-nFAPI/README.md): implementation of the Small Cell Forum's Network Functional API (nFAPI)
- [Open-nFAPI License](../nfapi/open-nFAPI/LICENSE.md): licensing information for Open-nFAPI
- [Open-nFAPI Examples](../nfapi/open-nFAPI/utils/examples.md): Open-nFAPI usage examples
- [Open-nFAPI Changelog](../nfapi/open-nFAPI/CHANGELOG.md): release notes for Open-nFAPI
- [nFAPI Changes](../nfapi/CHANGES.md): information on nFAPI changes
## Common Utilities
- [OCP ITTI](../common/utils/ocp_itti/itti.md): interthread interface (ITTI)
- [T Tracer Wireshark](../common/utils/T/DOC/T/wireshark.md): MAC PDUs and wireshark
- [T Tracer CSV](../common/utils/T/DOC/T/csv.md): tracer to dump information of a single trace to a CSV.
- [T Tracer Record](../common/utils/T/DOC/T/record.md): how to use the `record` tracer
- [T Tracer ENB](../common/utils/T/DOC/T/enb.md): information on T Tracer eNB
- [T Tracer Replay](../common/utils/T/DOC/T/replay.md): how to use the `replay` tracer
- [T Tracer Basic](../common/utils/T/DOC/T/basic.md): Basic usage of the T tracer
- [T Tracer How To New Trace](../common/utils/T/DOC/T/howto_new_trace.md): simple tutorial on T tracer
- [T Tracer Multi](../common/utils/T/DOC/T/multi.md): Multiple tracers
- [T Tracer To VCD](../common/utils/T/DOC/T/to_vcd.md): tracer to dump a VCD trace of the softmodem.
- [Actor README](../common/utils/actor/README.md): simple actor model implementation
## L2 Emulator (deprecated)
- [LTE Mode L2 Emulator](./episys/lte_mode_l2_emulator/README.md): Multi-UE Proxy for UEs to communicate with eNB (LTE mode)
- [NSA Mode L2 Emulator](./episys/nsa_mode_l2_emulator/README.md): Multi-UE Proxy for UEs to communicate with gNB (NSA mode)

View File

@@ -390,13 +390,255 @@ sequenceDiagram
## Structures
### Cells
### DUs and Cells
OAI 5G RRC does not actually handle multiple cells as of now, but multiple DUs,
each being limited to one cell.
OAI 5G RRC is enabling support for multiple DUs, with each DU potentially
serving multiple cells (though currently each DU is limited to one cell in practice).
The architecture separates DU management from cell management to enable future
multi-cell per DU capability.
Cell-related data is stored in `nr_rrc_du_container_t`, and kept in a tree
indexed by the SCTP association ID.
#### DU Management
DU-related data is stored in `nr_rrc_du_container_t`, and kept in a red-black
tree indexed by the unique SCTP association ID (`assoc_id`). Each DU container stores:
- DU identity and name
- SCTP association ID for F1 interface communication
- RRC version information
- Sequential array of cell pointers (`cells`) - stores pointers to cells belonging to this DU (seq_arr_t)
Key Functions:
- `get_du_by_assoc_id()` - Lookup DU by SCTP association ID (O(log d) tree lookup)
- `get_du_for_ue()` - Get DU associated with a specific UE
- `find_target_du()` - Find a target DU for handover operations
#### Cell Management
Cell-related data is stored in `nr_rrc_cell_container_t`. Cells are stored in two data structures:
1. Global cell tree (`rrc->cells`): Red-black tree indexed by `cell_id`, containing all cells from all DUs. Used for efficient O(log N_CELL) lookups across all DUs. PCI reuse across the network is allowed and this is reflected in the tree.
2. DU cell array (`du->cells`): Sequential array (seq_arr_t) of cell pointers, storing only cells belonging to that specific DU. Used for DU-specific operations. PCI must be unique within a DU.
Each cell container stores:
- Cell identity (NR Cell ID) and PCI (Physical Cell ID)
- Link to serving DU via the unique `assoc_id`
- Cell-specific information (PLMN, TAC, frequency, mode TDD/FDD)
- MIB, SIB1, and MeasurementTimingConfiguration messages
Key Functions:
- `get_cell_by_cell_id()` - Lookup cell by NR Cell ID using global cell tree
- `rrc_get_cell_for_du()` - Lookup cell by cell_id within a specific DU's cell array
- `rrc_get_cell_by_pci_for_du()` - Lookup cell by PCI within DU's cells array
- `rrc_add_cell_to_du()` - Add cell to DU's sequential array
- `rrc_free_cell_container()` - Free cell container and associated ASN.1 structures
Architecture Notes:
- The `assoc_id` field (in cell and DUs containers) links cells to their serving DUs
- When a DU connects via F1 Setup, cells are added to both the global tree and the DU's array
- When a DU disconnects, cells are removed from both structures
- Global tree enables efficient cross-DU cell lookups (O(log N_CELL))
- DU array enables efficient per-DU cell iteration (O(k) where k=cells per DU)
- Each DU maintains a sequential array of cell pointers
##### DU and Cell Lifecycle
The following diagram shows the lifecycle of DUs and their associated cells, including the main F1AP messages and internal operations:
```mermaid
sequenceDiagram
participant CellTree as Cell Tree
participant DUTree as DU Tree
participant CU as CU-CP
participant DU as gNB-DU
participant UE as UE
Note over DU,CellTree: DU Connection & Cell Registration
DU->>CU: F1AP F1 Setup Request(DU ID, Cell Info, MIB/SIB1)
Note over CU: Validate: PLMN match with CU configuration
alt PLMN mismatch
CU->>DU: F1AP F1 Setup Failure (PLMN not served)
end
Note over CU: Validate: DU ID uniqueness (RB_FOREACH gNB_DU_id in DU tree)
alt DU ID already exists
CU->>DU: F1AP F1 Setup Failure (Unspecified)
end
Note over CU: Validate: Neighbour cell configuration (if configured)
alt Neighbour config invalid
CU->>DU: F1AP F1 Setup Failure (Unspecified)
end
Note over CU: Extract MIB/SIB1 from system info (if present)
alt System info extraction fails
CU->>DU: F1AP F1 Setup Failure (Semantic error)
end
alt All Validations Success
CU->>CU: Create cell container (nr_rrc_cell_container_t), set assoc_id, copy cell info, set MIB/SIB1
CU->>CellTree: rrc_add_cell(rrc, new) - RB_INSERT into global tree, increment rrc->num_cells
alt Duplicate cell_id (collision)
CU->>DU: F1AP F1 Setup Failure (Cell not available)
else Cell added to tree
CU->>CU: Create DU container (nr_rrc_du_container_t)
CU->>CU: seq_arr_init(&du->cells) - Initialize DU's cell array
CU->>DUTree: rrc_add_du(rrc, du) - RB_INSERT(du), increment rrc->num_dus
CU->>CU: rrc_add_cell_to_du(&du->cells, new) - Add cell to DU's array
Note over CU,UE: Cell available for UE association
CU->>CU: Encode CU SIBs (if configured)
CU->>DU: F1AP F1 Setup Response(Cells to Activate, CU SIBs)
Note over CU,CellTree: DU and cell now active
end
end
UE->>CU: RRC Setup Request
Note over CU: rrc_handle_RRCSetupRequest()
CU->>CU: get_cell_by_cell_id(&rrc->cells) - Use global tree
alt Cell not found
CU->>UE: RRC Reject
end
Note over CU: UE Cell Association
CU->>CU: rrc_add_ue_serving_cell(UE, cell, RRC_PCELL_INDEX)
Note over DU,CellTree: Optional: Cell Configuration Update
opt DU sends configuration update
DU->>CU: F1AP DU Configuration Update(Add/Modify/Delete cells)
Note over CU: get_du_by_assoc_id(assoc_id)
loop For each cell to add
CU->>CU: get_cell_by_cell_id(&rrc->cells) - Check cell_id uniqueness globally
alt Duplicate cell_id found
Note over CU: Reject and return
end
CU->>CU: rrc_get_cell_by_pci_for_du(&du->cells) - Check PCI unique within DU
alt Duplicate PCI in DU
Note over CU: Reject and return
end
end
loop Cell Modification
CU->>CU: get_cell_by_cell_id(cells, old_nr_cellid) - Find cell by old cell_id
CU->>CU: update_cell_info(rrc, old_nci, new_ci) - Update in place
Note over CU: If cell_id changes: RB_REMOVE then re-insert after update
Note over CU: Free old MTC if new measurement timing config provided
Note over CU: If sys_info present: extract MIB/SIB1 and set on cell
end
CU->>DU: F1AP DU Configuration Update Acknowledge
end
Note over DU,CellTree: DU Disconnection & Cell Cleanup
DU-->>CU: F1AP Lost Connection(SCTP connection lost)
Note over CU: rrc_CU_process_f1_lost_connection()
CU->>DUTree: RB_FIND(du) - Find DU by assoc_id using temporary struct
alt DU not found
Note over CU: Log warning and return
end
Note over CU: rrc_cleanup_du() then invalidate_du_connections()
CU->>CU: Iterate cells in DU's array (last to first)
loop For each cell in DU's array
CU->>CU: seq_arr_erase(&du->cells, cell_ptr) - Remove from DU's array
CU->>CellTree: rrc_rm_cell(): RB_REMOVE(cell), decrement num_cells, rrc_free_cell_container()
end
CU->>DUTree: rrc_rm_du(): RB_REMOVE(du) - Remove DU from tree
CU->>CU: Decrement rrc->num_dus counter
CU->>CU: seq_arr_free(&du->cells) - Free DU's cell array
CU->>CU: rrc_free_du_container() - Free DU container
Note over CU: invalidate_du_connections()
loop For each UE:
CU->>CU: rrc_remove_ue_scells_from_du() - Remove SCells from disconnected DU
alt UE belongs to disconnected DU
CU->>CU: Set du_assoc_id = 0 (mark DU offline)
CU->>CU: Trigger NGAP UE Context Release Request
end
end
Note over CU,CellTree: DU and all cells removed
```
Key Functions:
- `rrc_gNB_process_f1_setup_req()` - Handles F1 Setup Request, creates DU and cell containers.
Validates PLMN match, DU ID uniqueness, and cell_id/PCI uniqueness before creating containers.
- `rrc_gNB_process_f1_du_configuration_update()` - Handles cell configuration updates.
Currently supports cell modification (MIB/SIB1 updates) and validates cell additions, but cell addition
and deletion are not yet fully implemented.
- `rrc_CU_process_f1_lost_connection()` - Handles DU disconnection. Calls `rrc_cleanup_du()` to
remove all cells and the DU from their trees and free resources, then
`invalidate_du_connections()` to clean up UE associations (e.g. trigger NGAP UE Context Release Request for UEs on that DU).
#### UE Cell Association Management
The RRC maintains a per-UE association with serving cells, tracking which cells
a UE is currently using. This replaces the previous single-cell assumption and
enables proper multi-cell support where each UE can have multiple serving cells
(one PCell and up to 31 SCells). The servCellIndex (TS 38.331) is tracked per-UE
in the `ue_serving_cell_t` structure in the UE context (the same cell can have
different servCellIndex values for different UEs).
Data Structures:
- `ue_serving_cell_t`: Stores serving cell information (nci, servCellIndex, assoc_id)
- `gNB_RRC_UE_t.serving_cells`: Dynamic array (seq_arr_t) of serving cell entries. PCell is always at index 0.
Key Functions:
- `rrc_add_ue_serving_cell()` - Adds a new serving cell to UE's serving_cells array.
- `rrc_get_ue_serving_cell_by_id()` - Retrieves serving cell entry by servCellIndex.
- `ue_get_pcell_entry()` - Returns the PCell serving cell entry (first element in serving_cells).
- `rrc_remove_ue_scells_from_du()` - Removes all serving cells belonging to a specific DU via assoc_id (e.g. during handover or DU disconnection).
##### Handover and Cell Association Updates
During handover, the UE's serving cell list is updated so the PCell reflects the target cell and source-DU cells are removed.
###### F1 handover (inter-DU, same CU-CP)
Cell association is updated when the **source** DU sends F1AP UE Context Modification Response (after it has sent the RRC Reconfiguration to the UE). The CU-CP is a single RRC instance; both source DU and target DU are under the same CU.
```mermaid
sequenceDiagram
participant SourceDU as Source DU
participant CU as CU-CP
Note over CU,CU: F1 handover: cell association update on Context Modification Response
SourceDU->>CU: F1AP UE Context Modification Response
Note over CU: rrc_CU_process_ue_context_modification_response()
Note over CU: Check: ho_context && source && target (F1 HO)
alt F1 handover in progress
CU->>CU: nr_rrc_apply_target_context(UE)
Note over CU: F1 UE data: du_assoc_id = target DU, secondary_ue = target DU UE ID, RNTI = target RNTI
CU->>CU: nr_rrc_update_cell_assoc_after_ho(rrc, UE)
Note over CU: F1 branch (ho_context->source present):
CU->>CU: rrc_remove_ue_scells_from_du(UE, source_ctx->cell->assoc_id)
Note over CU: Remove all serving cells (incl. PCell) belonging to source DU
CU->>CU: rrc_add_ue_serving_cell(UE, target_ctx->cell, RRC_PCELL_INDEX)
Note over CU: Handover complete: PCell = target cell, source DU cells removed
end
```
###### N2 handover (inter-gNB: source CU vs target CU)
Cell association is updated only on the target CU-CP, when the target DU sends F1AP UE Context Setup Response. The UE context was created for handover, so there is no existing serving cell to remove. The flow is triggered inside the handover request acknowledge callback.
- Target CU-CP: Receives HANDOVER REQUEST, sets up bearer and F1 UE context on target DU; when the target DU sends F1AP UE Context Setup Response, the target CU runs the cell-association update and then sends HANDOVER REQUEST ACKNOWLEDGE.
```mermaid
sequenceDiagram
participant TargetDU as Target DU
participant TargetCU as Target CU-CP
Note over TargetCU: N2 handover: cell association update
Note over TargetCU: F1AP UE Context Setup Resp from target DU (in nr_rrc_n2_ho_acknowledge)
TargetDU->>TargetCU: F1AP UE Context Setup Response
Note over TargetCU: rrc_CU_process_ue_context_setup_response() then callback ho_req_ack()
Note over TargetCU: nr_rrc_n2_ho_acknowledge(rrc, UE)
TargetCU->>TargetCU: nr_rrc_apply_target_context(UE)
Note over TargetCU: F1 UE data: du_assoc_id = target DU, secondary_ue = target DU UE ID, RNTI = target RNTI
TargetCU->>TargetCU: nr_rrc_update_cell_assoc_after_ho(rrc, UE)
Note over TargetCU: N2 branch (ho_context->source NULL): no SCells to remove
TargetCU->>TargetCU: rrc_add_ue_serving_cell(UE, target_ctx->cell, RRC_PCELL_INDEX)
Note over TargetCU: Then: encode Handover Command, send NGAP HANDOVER REQUEST ACKNOWLEDGE
```
## UE Context
UE context information is stored in `gNB_RRC_UE_t`, which includes:
- Serving cells tracking: Dynamic array of serving cells (PCell + SCells)
- Security context: Keys, algorithms, and security state
- Radio bearers: SRB and DRB configurations
- PDU sessions: Active PDU session information
- Handover context: Temporary data during handover procedures
### CU-UPs

View File

@@ -41,15 +41,19 @@ For each DU, it prints:
```
1 connected DUs
[1] DU ID 3584 (gNB-OAI-DU) assoc_id 8: nrCellID 12345678, PCI 0, SSB ARFCN 641280
TDD: band 78 ARFCN 640008 SCS 30 (kHz) PRB 106
[1] DU ID 3584 (gNB-OAI) integrated DU-CU: 1 cell
[1] nrCellID 12345678, PCI 0, Mode TDD, SSB ARFCN 641280
TDD: band 78 ARFCN 640008 SCS 30 (kHz) PRB 106
```
i.e., an index (`[1]`), the DU ID and it's name, the SCTP association ID
(`assoc_id 8`, cf. UE information), and DU specific information for the cell
(cell ID, physical cell identity/PCI, the SSB frequency in ARFCN notation, the
band and Point A ARFCN, subcarrier spacing/SCS, and the number of resource
blocks/PRB). Only one cell per DU is supported.
The output shows:
- Total number of connected DUs
- For each DU: an index (`[1]`), the DU ID and name, connection type (either `integrated DU-CU` for monolithic deployments or `assoc_id X` for split deployments), and the number of cells served by this DU
- For each cell served by the DU: a cell index (`[1]`), the NR Cell ID, Physical Cell ID (PCI), operating mode (TDD or FDD), and SSB ARFCN
- Cell-specific frequency information: for TDD mode, the band, Point A ARFCN, subcarrier spacing (SCS), and number of resource blocks (PRB); for FDD mode, separate DL and UL frequency information
The RRC enables the support of multiple cells per DU (though currently each DU
typically serves one cell in practice).
As of now, it does not print information about connected CU-UPs or AMFs.
@@ -84,7 +88,7 @@ the [MAC configuration](../MAC/mac-usage.md) as well for SIB configuration.
`0xffffff` is a reserved value and means "no SD"
Note that: SST=1, no SD is "eMBB"; SST=2, no SD is "URLLC"; SST=3, no SD
is "mMTC"
- `enable_sdap` (default: false): enable the use of the SDAP layer. If
- `enable_sdap` (default: true): enable the use of the SDAP layer. If
deactivated, a transparent SDAP header is prepended to packets, but no
further processing is being done.
- `cu_sibs` (default: `[]`) list of SIBs to give to the DU for transmission.
@@ -94,8 +98,6 @@ the [MAC configuration](../MAC/mac-usage.md) as well for SIB configuration.
- `um_on_default_drb` (default: false): use RLC UM instead of RLC AM on default
bearers
- `drbs` (default: 0): the number of DRBs to allocate for a UE, only useful for
do-ra or phy-test testing
#### Neighbor-gNB configuration

View File

@@ -544,7 +544,7 @@ sudo ./nr-uesoftmodem --do-ra
#### Run OAI with SDAP & Custom DRBs
To run OAI gNB with SDAP, simply include `--gNBs.[0].enable_sdap 1` to the binary's arguments.
SDAP is enabled by default. To disable SDAP, include `--gNBs.[0].enable_sdap 0` to the binary's arguments.
The DRB creation is dependent on the 5QI.
If the 5QI corresponds to a GBR Flow it assigns a dedicated data radio bearer.

View File

@@ -220,7 +220,7 @@ information on how the images are built.
~5G-NR
- 5G-NR SA test setup: OAI VNF + PNF/NVIDIA CUBB on gracehopper1-oai + Foxconn RU, up2 + COTS UE (Quectel RM520N), OAI CN5G
- container images for gNB deployment
- [RAN-SA-2x2-Module-CN5G](https://jenkins-oai.eurecom.fr/view/RAN/job/RAN-SA-2x2-Module-CN5G/)
- [RAN-SA-Multi-Antenna-CN5G](https://jenkins-oai.eurecom.fr/view/RAN/job/RAN-SA-Multi-Antenna-CN5G/)
~5G-NR
- matix + N310 (gNB), up2 + COTS UE (Quectel RM520N), OAI 5GC deployed in docker on matix
- NR performance tests: 2x2 configuration, 60 MHz and 100 MHz bandwidth
@@ -234,6 +234,10 @@ information on how the images are built.
- groot (CU+DU0) + B210, rocket (DU1) + B210, raspix (Quectel RM520N UE), OAI CN5G
- OpenShift cluster for CN deployment
- Attenuator (mini circuits RC4DAT-6G-60) - controlled from rocket
- [RAN-Channel-Simulation](https://jenkins-oai.eurecom.fr/job/RAN-Channel-Simulation/)
~5G-NR
- gracehopper1-oai
- run channel simulation on CPU and GPU using test_channel_scalability
### RAN-CI-NSA-Trigger

View File

@@ -19,12 +19,12 @@ Analog beamforming implementation also allows to enable distributed antenna syst
A set of parameters in configuration files controls the implementation of analog beamforming and instructs the scheduler on how to behave in such scenarios. Since most notably this technique in 5G is employed in FR2, the configuration file example currently available is a RFsim one for band 261. [Config file example](../ci-scripts/conf_files/gnb.sa.band257.u3.66prb.rfsim.conf)
In the `MACRLC` section of configuration files, there are three new parameters: `set_analog_beamforming`, `beam_duration` and `beams_per_period`. The explanation of these parameters is here provided:
- `set_analog_beamforming` can be set a value equal to 1 or 2 to activate or 0 to desactivate analog beamforming (default value is 0)
- `set_analog_beamforming` can be set to "none", "preconfigured" or "lophy" (default value is "none")
- `beam_duration` is the number of slots (currently minimum duration of a beam) the scheduler is tied to a beam (default value is 1)
- `beams_per_period` is the number of concurrent beams the RU can handle in the beam duration (default value is 1)
- `beam_weights` is a vector field containing the set of beam indices to be provided by the OAI L1 to the RU is also required. In current implementation, the number of beam indices should be equal to the number of SSBs transmitted
Setting analog beamforming to 1 or 2 changes the way FAPI beam index is treated. By setting 1, we instruct L1 to look up in Hi-PHY preconfigured DBM beam index. By setting 2, we instruct L2 to directly signal to Lo-PHY the beam index (e.g. over 7.2x fronthaul).
Setting analog beamforming to "preconfigured" or "lophy" changes the way FAPI beam index is treated. By setting "preconfigured", we instruct L1 to look up in Hi-PHY preconfigured DBM beam index. By setting "lophy", we instruct L2 to directly signal to Lo-PHY the beam index (e.g. over 7.2x fronthaul).
DAS is enabled by setting to 1 the parameter `enable_das` in the L1 section of the configuration file. In case of DAS enabled, the field `beam_weights` in `MACRLC` section can be omitted and the number of beams per period equals the total number of beams.

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -0,0 +1,22 @@
:root {
--md-primary-fg-color: #224C98;
--md-primary-fg-color--light: #4C74C0;
--md-primary-fg-color--dark: #183A76;
--md-accent-fg-color: #224C98;
}
.md-content {
padding-left: 1rem;
padding-right: 1rem;
}
.md-grid {
max-width: none;
}
/* Style the footer copyright text */
.md-footer-copyright p {
font-size: 0.6rem; /* Increase the font size */
padding: 1rem; /* Add some top and bottom padding */
}

View File

@@ -42,10 +42,7 @@ sudo apt install -y gcc-aarch64-linux-gnu \
g++-aarch64-linux-gnu
sudo apt-get install -y \
libblas-dev:arm64 \
libc6-dev-i386 \
liblapack-dev:arm64 \
liblapacke-dev:arm64 \
libreadline-dev:arm64 \
libgnutls28-dev:arm64 \
libconfig-dev:arm64 \

23
doc/overrides/main.html Normal file
View File

@@ -0,0 +1,23 @@
{% extends "base.html" %}
{% block content %}
{# Rewrite all .md links to directory URLs #}
{{ super()
| replace(".md", "/")
| replace("README/", "")
}}
{% endblock %}
{% block footer %}
<footer class="md-footer">
<div class="md-footer-meta" style="display: flex; justify-content: space-between; align-items: center; padding: 0 40px;">
<div class="md-footer-left">
<p><em>© Copyright 2026 <a href="https://openairinterface.org/" target="_blank" rel="noopener">OpenAirInterface.org</a></em></p>
</div>
<div class="md-footer-right">
<p><em>For any bug or problems please raise an issue on <a href="https://gitlab.eurecom.fr/groups/oai/-/issues" target="_blank" rel="noopener">GitLab ↗.</a></em></p>
</div>
</div>
</footer>
{% endblock %}

View File

@@ -26,7 +26,7 @@
#---------------------------------------------------------------------
FROM registry.access.redhat.com/ubi9/ubi:latest AS ran-base
FROM registry.redhat.io/ubi9/ubi:latest AS ran-base
LABEL MAINTAINER OpenAirInterface <contact@openairinterface.org>
ARG NEEDED_GIT_PROXY
ARG TARGETARCH

View File

@@ -86,4 +86,4 @@ COPY oaienv .
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai -I -w USRP --install-optional-packages
./build_oai -I -w USRP -w BLADERF --install-optional-packages

View File

@@ -57,9 +57,6 @@ RUN apt-get update && \
tzdata \
xxd \
# ARM64 packages
libblas-dev:arm64 \
liblapack-dev:arm64 \
liblapacke-dev:arm64 \
libreadline-dev:arm64 \
libgnutls28-dev:arm64 \
libconfig-dev:arm64 \

View File

@@ -81,8 +81,7 @@ RUN /bin/sh oaienv && \
--ninja --gNB \
--build-lib "telnetsrv enbscope uescope nrscope" \
-t oran_fhlib_5g --cmake-opt -Dxran_LOCATION=/opt/phy/fhi_lib/lib \
--build-e2 --cmake-opt -DXAPP_MULTILANGUAGE=OFF --cmake-opt -DKPM_VERSION=$KPM_VERSION --cmake-opt -DE2AP_VERSION=$E2AP_VERSION \
$BUILD_OPTION && \
--build-e2 --cmake-opt -DXAPP_MULTILANGUAGE=OFF --cmake-opt -DKPM_VERSION=$KPM_VERSION --cmake-opt -DE2AP_VERSION=$E2AP_VERSION && \
# Mainly to see if the sanitize option was perfectly executed
ldd ran_build/build/nr-softmodem && \
ldd ran_build/build/liboran_fhlib_5g.so && \

View File

@@ -71,8 +71,7 @@ RUN /bin/sh oaienv && \
--ninja --gNB --nrRU \
--build-lib "telnetsrv enbscope uescope nrscope" \
-t oran_fhlib_5g --cmake-opt -Dxran_LOCATION=/opt/phy/fhi_lib/lib \
--build-e2 --cmake-opt -DKPM_VERSION=$KPM_VERSION --cmake-opt -DE2AP_VERSION=$E2AP_VERSION \
$BUILD_OPTION && \
--build-e2 --cmake-opt -DKPM_VERSION=$KPM_VERSION --cmake-opt -DE2AP_VERSION=$E2AP_VERSION && \
# Mainly to see if the sanitize option was perfectly executed
ldd ran_build/build/nr-softmodem && \
ldd ran_build/build/liboran_fhlib_5g.so && \

View File

@@ -47,7 +47,7 @@ RUN \
./build_oai -c --ninja \
--eNB --gNB --RU --UE --nrUE \
--build-lib "telnetsrv enbscope uescope nrscope" \
-w USRP -t Ethernet \
-w USRP -t Ethernet -w BLADERF \
--build-e2 --cmake-opt -DKPM_VERSION=$KPM_VERSION --cmake-opt -DE2AP_VERSION=$E2AP_VERSION \
--cmake-opt -DOAI_VRTSIM_TAPS_CLIENT=ON \
--noavx512 \

View File

@@ -31,7 +31,7 @@ FROM ran-build:latest AS enb-build
#start from scratch for target executable
FROM registry.access.redhat.com/ubi9/ubi:latest AS oai-enb
FROM registry.redhat.io/ubi9/ubi:latest AS oai-enb
ENV TZ=Europe/Paris
RUN dnf update -y && \

View File

@@ -51,7 +51,6 @@ RUN apt-get update && \
libboost-system1.83.0 \
libboost-program-options1.83.0 \
tzdata \
libblas3 \
libconfig9 \
openssl \
net-tools \
@@ -74,8 +73,7 @@ RUN apt-get update && \
# if the --sanitize option was used to build, additional packages are required
/bin/bash -c 'if [[ "$BUILD_OPTION" = "--sanitize" ]]; then DEBIAN_FRONTEND=noninteractive apt-get install --yes \
libasan8 \
libubsan1 \
liblapacke; fi' && \
libubsan1 ; fi' && \
apt-get clean -y && \
rm -rf /var/lib/apt/lists/*

View File

@@ -70,7 +70,6 @@ RUN apt-get update && \
procps \
libsctp1 \
tzdata \
libblas3 \
libconfig9 \
openssl \
net-tools \

View File

@@ -69,7 +69,6 @@ RUN apt-get update && \
procps \
libsctp1 \
tzdata \
libblas3 \
libconfig9 \
openssl \
net-tools \

View File

@@ -38,7 +38,7 @@ RUN /bin/sh oaienv && \
./build_oai -w AW2SORI -t Ethernet
#start from scratch for target executable
FROM registry.access.redhat.com/ubi9/ubi:latest AS oai-gnb-aw2s
FROM registry.redhat.io/ubi9/ubi:latest AS oai-gnb-aw2s
ENV TZ=Europe/Paris
# Install EPEL for RHEL9

View File

@@ -48,7 +48,6 @@ RUN apt-get update && \
procps \
libsctp1 \
tzdata \
libblas3 \
libc6 \
libconfig9 \
gdb \

View File

@@ -30,7 +30,7 @@ FROM ran-base:latest AS gnb-base
FROM ran-build-fhi72:latest AS gnb-build
#start from scratch for target executable
FROM registry.access.redhat.com/ubi9/ubi:latest AS oai-gnb-fhi72
FROM registry.redhat.io/ubi9/ubi:latest AS oai-gnb-fhi72
ENV TZ=Europe/Paris
# Install EPEL for RHEL9
@@ -101,10 +101,6 @@ COPY --from=gnb-build /usr/local/lib64/flexric /usr/local/lib64/flexric
COPY --from=gnb-base \
/lib64/libconfig.so.11 \
/lib64/libforms.so.2 \
/lib64/libblas.so.3 \
/lib64/libcblas.so.3 \
/lib64/liblapack.so.3 \
/lib64/liblapacke.so.3 \
/lib64/libicudata.so.67 \
/lib64/libicui18n.so.67 \
/lib64/libicuuc.so.67 \

View File

@@ -90,10 +90,6 @@ COPY --from=gnb-build /usr/local/lib64/flexric /usr/local/lib64/flexric
COPY --from=gnb-base \
/lib64/libconfig.so.11 \
/lib64/libforms.so.2 \
/lib64/libblas.so.3 \
/lib64/libcblas.so.3 \
/lib64/liblapack.so.3 \
/lib64/liblapacke.so.3 \
/lib64/libicudata.so.67 \
/lib64/libicui18n.so.67 \
/lib64/libicuuc.so.67 \

View File

@@ -44,7 +44,6 @@ RUN apt-get update && \
pkg-config \
libsctp1 \
tzdata \
libblas3 \
libconfig9 \
openssl \
net-tools \
@@ -63,8 +62,7 @@ RUN apt-get update && \
# if the --sanitize option was used to build, additional packages are required
/bin/bash -c 'if [[ "$BUILD_OPTION" = "--sanitize" ]]; then DEBIAN_FRONTEND=noninteractive apt-get install --yes \
libasan8 \
libubsan1 \
liblapacke; fi' && \
libubsan1 ; fi' && \
rm -rf /var/lib/apt/lists/*
WORKDIR /opt/oai-gnb/bin

View File

@@ -31,7 +31,7 @@ FROM ran-build:latest AS gnb-build
#start from scratch for target executable
FROM registry.access.redhat.com/ubi9/ubi:latest AS oai-gnb
FROM registry.redhat.io/ubi9/ubi:latest AS oai-gnb
ENV TZ=Europe/Paris
# Install EPEL for RHEL9

View File

@@ -51,7 +51,6 @@ RUN apt-get update && \
libboost-system1.83.0 \
libboost-program-options1.83.0 \
tzdata \
libblas3 \
libconfig9 \
openssl \
net-tools \
@@ -69,8 +68,7 @@ RUN apt-get update && \
# if the --sanitize option was used to build, additional packages are required
/bin/bash -c 'if [[ "$BUILD_OPTION" = "--sanitize" ]]; then DEBIAN_FRONTEND=noninteractive apt-get install --yes \
libasan8 \
libubsan1 \
liblapacke; fi' && \
libubsan1; fi' && \
apt-get clean -y && \
rm -rf /var/lib/apt/lists/*

View File

@@ -31,7 +31,7 @@ FROM ran-build:latest AS ru-build
#start from scratch for target executable
FROM registry.access.redhat.com/ubi9/ubi:latest AS oai-lte-ru
FROM registry.redhat.io/ubi9/ubi:latest AS oai-lte-ru
ENV TZ=Europe/Paris
RUN dnf update -y && \

View File

@@ -49,7 +49,6 @@ RUN apt-get update && \
libboost-thread1.83.0 \
libboost-system1.83.0 \
libboost-program-options1.83.0 \
libblas3 \
libconfig9 \
net-tools \
gdb \

View File

@@ -31,7 +31,7 @@ FROM ran-build:latest AS lte-ue-build
#start from scratch for target executable
FROM registry.access.redhat.com/ubi9/ubi:latest AS oai-lte-ue
FROM registry.redhat.io/ubi9/ubi:latest AS oai-lte-ue
ENV TZ=Europe/Paris
RUN dnf update -y && \
@@ -73,10 +73,6 @@ COPY --from=lte-ue-build \
COPY --from=lte-ue-base \
/lib64/libconfig.so.11 \
/lib64/libblas.so.3 \
/lib64/libcblas.so.3 \
/lib64/liblapack.so.3 \
/lib64/liblapacke.so.3 \
/lib64/libboost_chrono.so.1.75.0 \
/lib64/libboost_date_time.so.1.75.0 \
/lib64/libboost_filesystem.so.1.75.0 \

View File

@@ -74,10 +74,6 @@ COPY --from=lte-ue-build \
COPY --from=lte-ue-base \
/lib64/libconfig.so.11 \
/lib64/libblas.so.3 \
/lib64/libcblas.so.3 \
/lib64/liblapack.so.3 \
/lib64/liblapacke.so.3 \
/lib64/libboost_chrono.so.1.75.0 \
/lib64/libboost_date_time.so.1.75.0 \
/lib64/libboost_filesystem.so.1.75.0 \

View File

@@ -51,8 +51,6 @@ RUN apt-get update && \
libboost-system1.83.0 \
libboost-program-options1.83.0 \
tzdata \
liblapacke \
libblas3 \
libconfig9 \
openssl \
net-tools \
@@ -75,8 +73,7 @@ RUN apt-get update && \
# if the --sanitize option was used to build, additional packages are required
/bin/bash -c 'if [[ "$BUILD_OPTION" = "--sanitize" ]]; then DEBIAN_FRONTEND=noninteractive apt-get install --yes \
libasan8 \
libubsan1 \
liblapacke; fi' && \
libubsan1 ; fi' && \
apt-get clean -y && \
rm -rf /var/lib/apt/lists/*

View File

@@ -32,7 +32,7 @@ FROM ran-build:latest AS gnb-build
RUN cp /oai-ran/docker/scripts/gnb_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
#start from scratch for target executable
FROM registry.access.redhat.com/ubi9/ubi:latest AS oai-nr-cuup
FROM registry.redhat.io/ubi9/ubi:latest AS oai-nr-cuup
ENV TZ=Europe/Paris
# Install EPEL

View File

@@ -47,8 +47,7 @@ RUN apt-get update && \
# if the --sanitize option was used to build, additional packages are required
/bin/bash -c 'if [[ "$BUILD_OPTION" = "--sanitize" ]]; then DEBIAN_FRONTEND=noninteractive apt-get install --yes \
libasan8 \
libubsan1 \
liblapacke; fi' && \
libubsan1; fi' && \
rm -rf /var/lib/apt/lists/*
## Copy E2 SM models

View File

@@ -25,7 +25,6 @@ FROM ran-build-fhi72:latest AS ran-build
#start from scratch for target executable
FROM ubuntu:noble AS oai-nr-oru
ARG BUILD_OPTION
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe
@@ -37,7 +36,6 @@ RUN apt-get update && \
pkg-config \
libsctp1 \
tzdata \
libblas3 \
libconfig9 \
openssl \
net-tools \
@@ -50,11 +48,6 @@ RUN apt-get update && \
xz-utils \
libnuma-dev \
libyaml-cpp-dev && \
# if the --sanitize option was used to build, additional packages are required
/bin/bash -c 'if [[ "$BUILD_OPTION" = "--sanitize" ]]; then DEBIAN_FRONTEND=noninteractive apt-get install --yes \
libasan8 \
libubsan1 \
liblapacke; fi' && \
rm -rf /var/lib/apt/lists/*
WORKDIR /opt/nr-oru/bin

View File

@@ -31,7 +31,7 @@ FROM ran-build:latest AS nr-ue-build
#start from scratch for target executable
FROM registry.access.redhat.com/ubi9/ubi:latest AS oai-nr-ue
FROM registry.redhat.io/ubi9/ubi:latest AS oai-nr-ue
ENV TZ=Europe/Paris
# Install EPEL for RHEL9

View File

@@ -52,8 +52,6 @@ RUN apt-get update && \
libboost-system1.83.0 \
libboost-program-options1.83.0 \
tzdata \
liblapacke \
libblas3 \
libconfig9 \
openssl \
net-tools \

View File

@@ -46,7 +46,7 @@ RUN /bin/sh oaienv && \
ninja -k10 -j36
#start from scratch for target executable
FROM registry.access.redhat.com/ubi9/ubi:latest AS oai-physim
FROM registry.redhat.io/ubi9/ubi:latest AS oai-physim
RUN dnf update -y && \
dnf install -y \
@@ -69,10 +69,6 @@ COPY --from=phy-sim-build /opt/oai-physim/bin/ /opt/oai-physim/bin/
COPY --from=phy-sim-build \
/oai-ran/cmake_targets/ran_build/build/libcoding.so \
/lib64/liblapacke.so.3 \
/lib64/libblas.so.3 \
/lib64/libcblas.so.3 \
/lib64/liblapack.so.3 \
/usr/lib64/libasan.so.6 \
/usr/lib64/libubsan.so.1 \
/oai-ran/cmake_targets/ran_build/build/libdfts.so \

View File

@@ -0,0 +1,2 @@
add_library(softmodem_common STATIC softmodem-common.c)
target_link_libraries(softmodem_common PUBLIC shlib_loader)

View File

@@ -33,8 +33,6 @@
#include "PHY/phy_extern.h"
#include "PHY/TOOLS/phy_scope_interface.h"
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
// #include "PHY/INIT/phy_init.h"
#include "openair2/ENB_APP/enb_paramdef.h"
#include "system.h"
#include "nfapi/oai_integration/vendor_ext.h"

View File

@@ -48,7 +48,6 @@
#include "common/utils/LOG/log.h"
#include "common/utils/time_manager/time_manager.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include <executables/softmodem-common.h>
/* these variables have to be defined before including ENB_APP/enb_paramdef.h and GNB_APP/gnb_paramdef.h */
@@ -244,9 +243,8 @@ int connect_rau(RU_t *ru) {
/* Southbound Fronthaul functions, RCC/RAU */
// southbound IF5 fronthaul for 16-bit OAI format
void fh_if5_south_out(RU_t *ru, int frame, int slot, uint64_t timestamp) {
if (ru == RC.ru[0])
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, ru->proc.timestamp_tx & 0xffffffff);
void fh_if5_south_out(RU_t *ru, int frame, int slot, uint64_t timestamp)
{
int offset = get_samples_slot_timestamp(ru->nr_frame_parms, slot);
void *buffs[ru->nb_tx];
for (int aid = 0; aid < ru->nb_tx; aid++)
@@ -266,10 +264,8 @@ void fh_if5_south_out(RU_t *ru, int frame, int slot, uint64_t timestamp) {
}
// southbound IF4p5 fronthaul
void fh_if4p5_south_out(RU_t *ru, int frame, int slot, uint64_t timestamp) {
if (ru == RC.ru[0])
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, ru->proc.timestamp_tx & 0xffffffff);
void fh_if4p5_south_out(RU_t *ru, int frame, int slot, uint64_t timestamp)
{
LOG_D(PHY,"Sending IF4p5 for frame %d subframe %d\n",ru->proc.frame_tx,ru->proc.tti_tx);
if ((nr_slot_select(&ru->config, ru->proc.frame_tx, ru->proc.tti_tx) & NR_DOWNLINK_SLOT) > 0)
@@ -281,12 +277,10 @@ void fh_if4p5_south_out(RU_t *ru, int frame, int slot, uint64_t timestamp) {
// Synchronous if5 from south
void fh_if5_south_in(RU_t *ru,
int *frame,
int *tti) {
void fh_if5_south_in(RU_t *ru, int *frame, int *tti)
{
NR_DL_FRAME_PARMS *fp = ru->nr_frame_parms;
RU_proc_t *proc = &ru->proc;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF5, 1 );
start_meas(&ru->rx_fhaul);
ru->ifdevice.trx_read_func2(&ru->ifdevice, &proc->timestamp_rx, NULL, get_samples_per_slot(*tti, fp));
@@ -339,9 +333,6 @@ void fh_if5_south_in(RU_t *ru,
proc->first_rx,
ru->rx_fhaul.p_time / (cpu_freq_GHz * 1000.0),
rxmeas.tv_nsec);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TS, proc->timestamp_rx&0xffffffff );
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF5, 0 );
}
// Synchronous if4p5 from south
@@ -398,15 +389,7 @@ void fh_if4p5_south_in(RU_t *ru,
*slot = proc->tti_rx;
}
if (ru == RC.ru[0]) {
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX0_RU, f );
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_RX0_RU, sl);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_RU, proc->frame_tx );
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_TX0_RU, proc->tti_tx );
}
proc->symbol_mask[proc->tti_rx] = 0;
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TS, proc->timestamp_rx&0xffffffff );
LOG_D(PHY,"RU %d: fh_if4p5_south_in sleeping ...\n",ru->idx);
}
@@ -448,7 +431,8 @@ void fh_if4p5_south_asynch_in(RU_t *ru,int *frame,int *slot) {
// RRU IF4p5 TX fronthaul receiver. Assumes an if_device on input and if or rf device on output
// receives one subframe's worth of IF4p5 OFDM symbols and OFDM modulates
void fh_if4p5_north_in(RU_t *ru,int *frame,int *slot) {
void fh_if4p5_north_in(RU_t *ru,int *frame,int *slot)
{
uint32_t symbol_number=0;
uint32_t symbol_mask, symbol_mask_full;
uint16_t packet_type;
@@ -461,12 +445,6 @@ void fh_if4p5_north_in(RU_t *ru,int *frame,int *slot) {
recv_IF4p5(ru, frame, slot, &packet_type, &symbol_number);
symbol_mask = symbol_mask | (1<<symbol_number);
} while (symbol_mask != symbol_mask_full);
// dump VCD output for first RU in list
if (ru == RC.ru[0]) {
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_RU, *frame );
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_TX0_RU, *slot );
}
}
void fh_if5_north_asynch_in(RU_t *ru, int *frame, int *slot)
@@ -525,12 +503,6 @@ void fh_if4p5_north_asynch_in(RU_t *ru,int *frame,int *slot) {
((uint64_t)frame_tx + proc->frame_tx_unwrap) * fp->samples_per_subframe * 10 + get_samples_slot_timestamp(fp, slot_tx);
LOG_D(PHY, "RU %d/%d TST %lu, frame %d, subframe %d\n", ru->idx, 0, proc->timestamp_tx, frame_tx, slot_tx);
// dump VCD output for first RU in list
if (ru == RC.ru[0]) {
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_RU, frame_tx );
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_TX0_RU, slot_tx );
}
if (ru->feptx_ofdm)
ru->feptx_ofdm(ru, frame_tx, slot_tx);
@@ -538,18 +510,16 @@ void fh_if4p5_north_asynch_in(RU_t *ru,int *frame,int *slot) {
ru->fh_south_out(ru, frame_tx, slot_tx, proc->timestamp_tx);
}
void fh_if5_north_out(RU_t *ru) {
void fh_if5_north_out(RU_t *ru)
{
/// **** send_IF5 of rxdata to BBU **** ///
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF5, 1 );
AssertFatal(1 == 0, "Shouldn't get here\n");
}
// RRU IF4p5 northbound interface (RX)
void fh_if4p5_north_out(RU_t *ru) {
void fh_if4p5_north_out(RU_t *ru)
{
RU_proc_t *proc=&ru->proc;
if (ru->idx == 0)
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_RX0_RU, proc->tti_rx);
start_meas(&ru->tx_fhaul);
send_IF4p5(ru, proc->frame_rx, proc->tti_rx, IF4p5_PULFFT);
stop_meas(&ru->tx_fhaul);
@@ -569,15 +539,12 @@ static void rx_rf(RU_t *ru, int *frame, int *slot)
for (int i = 0; i < nb; i++)
rxp[i] = (void *)&ru->common.rxdata[i][get_samples_slot_timestamp(fp, *slot)];
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ, 1);
openair0_timestamp_t old_ts = proc->timestamp_rx;
LOG_D(PHY,"Reading %d samples for slot %d (%p)\n", samples_per_slot, *slot, rxp[0]);
openair0_timestamp_t ts;
unsigned int rxs;
rxs = ru->rfdevice.trx_read_func(&ru->rfdevice, &ts, rxp, samples_per_slot, nb);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ, 0 );
proc->timestamp_rx = ts-ru->ts_offset;
if (rxs != samples_per_slot)
@@ -617,12 +584,6 @@ static void rx_rf(RU_t *ru, int *frame, int *slot)
proc->tti_tx,
fp->slots_per_frame);
// dump VCD output for first RU in list
if (ru == RC.ru[0]) {
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX0_RU, proc->frame_rx );
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_RX0_RU, proc->tti_rx );
}
if (proc->first_rx == 0) {
if (proc->tti_rx != *slot) {
LOG_E(PHY,
@@ -653,8 +614,6 @@ static void rx_rf(RU_t *ru, int *frame, int *slot)
metadata mt = {.slot = *slot, .frame = *frame};
gNBscopeCopyWithMetadata(ru, gNbTimeDomainSamples, rxp[0], sizeof(c16_t), 1, samples_per_slot, 0, &mt);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TS, (proc->timestamp_rx+ru->ts_offset)&0xffffffff );
if (rxs != samples_per_slot) {
//exit_fun( "problem receiving samples" );
LOG_E(PHY, "problem receiving samples\n");
@@ -773,17 +732,11 @@ void tx_rf(RU_t *ru, int frame,int slot, uint64_t timestamp)
const int flags = flags_burst | (flags_gpio << 4);
proc->first_tx = 0;
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_TRX_WRITE_FLAGS, flags);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_RU, frame);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_TX0_RU, slot);
int nt = ru->nb_tx * ru->num_beams_period;
void *txp[nt];
for (int i = 0; i < nt; i++)
txp[i] = (void *)&ru->common.txdata[i][get_samples_slot_timestamp(fp, slot)] - sf_extension * sizeof(int32_t);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, (timestamp + ru->ts_offset) & 0xffffffff);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 1);
// prepare tx buffer pointers
uint32_t txs = ru->rfdevice.trx_write_func(&ru->rfdevice,
timestamp + ru->ts_offset - sf_extension,
@@ -804,7 +757,6 @@ void tx_rf(RU_t *ru, int frame,int slot, uint64_t timestamp)
siglen + sf_extension,
txs,
10 * log10((double)signal_energy(txp[0], siglen + sf_extension)));
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 0);
}
static void fill_rf_config(RU_t *ru, char *rf_config_file)
@@ -1208,10 +1160,8 @@ void *ru_thread(void *param)
// Do PRACH RU processing
prach_item_t *p = find_nr_prach(&gNB->prach_list, proc->frame_rx, proc->tti_rx, SEARCH_EXIST);
if (p) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_RU_PRACH_RX, 1 );
// need to extract RACH data for lqter processing by rx_nr_prach()
rx_nr_prach_ru(p, ru->common.rxdata, ru->nr_frame_parms, ru->N_TA_offset);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_RU_PRACH_RX, 0);
} // end if (prach_id >= 0)
} // end if (ru->feprx)
} // end if (slot_type == NR_UPLINK_SLOT || slot_type == NR_MIXED_SLOT) {

View File

@@ -675,11 +675,28 @@ int main( int argc, char **argv ) {
wait_nfapi_init("main?");
}
if (IS_SOFTMODEM_IMSCOPE_ENABLED || IS_SOFTMODEM_IMSCOPE_RECORD_ENABLED) {
sleep(1);
scopeParms_t p;
p.argc = &argc;
p.argv = argv;
p.gNB = RC.gNB[0];
p.ru = RC.ru[0];
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 (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)
if (IS_SOFTMODEM_DOSCOPE || IS_SOFTMODEM_IMSCOPE_ENABLED || IS_SOFTMODEM_IMSCOPE_RECORD_ENABLED) {
if (IS_SOFTMODEM_DOSCOPE) {
sleep(1);
scopeParms_t p;
p.argc = &argc;
@@ -689,14 +706,6 @@ int main( int argc, char **argv ) {
if (IS_SOFTMODEM_DOSCOPE) {
load_softscope("nr", &p);
}
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) {

View File

@@ -60,7 +60,6 @@ unsigned short config_frames[4] = {2,9,11,13};
#endif
#include "common/utils/LOG/log.h"
#include "common/utils/time_manager/time_manager.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "UTIL/OPT/opt.h"
#include "LAYER2/nr_pdcp/nr_pdcp_oai_api.h"
@@ -166,8 +165,6 @@ static void get_options(configmodule_interface_t *cfg)
paramdef_t cmdline_params[] = CMDLINE_NRUEPARAMS_DESC;
int numparams = sizeofArray(cmdline_params);
config_get(cfg, cmdline_params, numparams, NULL);
if (nrUE_params.vcdflag > 0)
ouput_vcd = 1;
AssertFatal(nrUE_params.extra_pdu_id == -1,
"Add additional PDU sessions in uicc.pdu_sessions array instead\n");
}
@@ -285,9 +282,6 @@ int main(int argc, char **argv)
int ret_loader = load_nrLDPC_coding_interface(NULL, &nrLDPC_coding_interface);
AssertFatal(ret_loader == 0, "error loading LDPC library\n");
if (ouput_vcd) {
vcd_signal_dumper_init("/tmp/openair_dump_nrUE.vcd");
}
// strdup to put the sring in the core file for post mortem identification
char *pckg = strdup(OAI_PACKAGE_VERSION);
LOG_I(HW, "Version: %s\n", pckg);
@@ -479,9 +473,6 @@ int main(int argc, char **argv)
LOG_W(NR_PHY, "Returned from ITTI signal handler\n");
oai_exit = 1;
if (ouput_vcd)
vcd_signal_dumper_close();
if (PHY_vars_UE_g && PHY_vars_UE_g[0]) {
for (int CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
PHY_VARS_NR_UE *phy_vars = PHY_vars_UE_g[0][CC_id];

85
mkdocs.yml Normal file
View File

@@ -0,0 +1,85 @@
################################################################################
# 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
################################################################################
site_name: OpenAirInterface
site_url: ""
site_author: OpenAirInterface Software Alliance
docs_dir: doc
theme:
name: material
custom_dir: doc/overrides
logo: assets/images/OPEN_AIR_INTERFACE_LOGO.png
favicon: assets/images/oai-logo-favicon.png
features:
- navigation.top
- content.collapse
- content.code.copy
palette:
primary: custom
accent: custom
font:
text: Roboto
code: Roboto Mono
extra:
version:
provider: mike
extra_css:
- assets/stylesheets/extra.css
# Repository
repo_name: OAI Documentation GitLab
repo_url: https://gitlab.eurecom.fr/oai/openairinterface5g
## Navigation Entries Block Starts
## Navigation Entries Block Ends
markdown_extensions:
- toc:
permalink: true
- tables
- attr_list
- admonition
- codehilite
- footnotes
- smarty
- pymdownx.details
- pymdownx.superfences:
custom_fences:
- name: mermaid
class: mermaid
format: !!python/name:mermaid2.fence_mermaid_custom
validation:
links:
not_found: ignore
plugins:
- search
- mermaid2
- simple:
include: [".txt", ".mmd", "README", ".conf", ".c", ".yaml", ".yml", ".cpp", ".md", ".png", ".h", ".json", ".patch", ".py", ".sh"]
merge_docs_dir: true
ignore:
- README.md

View File

@@ -63,6 +63,10 @@ char cpu_buf_recv[RECV_BUF_LEN];
uint16_t sfn = 0, slot = 0;
nv_ipc_t *ipc;
static nv_ipc_config_t nv_ipc_config;
static int cpu_msg_buf_size = 0;
static int cpu_data_buf_size = 0;
void nvIPC_Stop()
{
LOG_I(NR_MAC, "Received STOP.indication\n");
@@ -95,7 +99,7 @@ static int ipc_handle_rx_msg(nv_ipc_t *ipc, nv_ipc_msg_t *msg)
nfapi_vnf_config_t * vnf_config = get_config();
if (vnf_config != 0) {
// first, unpack the header
fapi_phy_api_msg fapi_msg;
fapi_message_header_t fapi_msg;
if (!(pull8(&pReadPackedMessage, &fapi_msg.num_msg, end) && pull8(&pReadPackedMessage, &fapi_msg.opaque_handle, end)
&& pull16(&pReadPackedMessage, &fapi_msg.message_id, end)
&& pull32(&pReadPackedMessage, &fapi_msg.message_length, end))) {
@@ -195,267 +199,78 @@ static int ipc_handle_rx_msg(nv_ipc_t *ipc, nv_ipc_msg_t *msg)
return 0;
}
int8_t buf[1024];
int get_cpu_msg_buf_size()
{
return cpu_msg_buf_size;
}
int get_cpu_data_buf_size()
{
return cpu_data_buf_size;
}
nv_ipc_config_t nv_ipc_config;
bool allocate_msg(nv_ipc_msg_t *send_msg)
{
return ipc->tx_allocate(ipc, send_msg, 0) == 0;
}
void release_msg(nv_ipc_msg_t *send_msg)
{
ipc->tx_release(ipc, send_msg);
}
bool send_nvipc_msg(nv_ipc_msg_t *send_msg)
{
int send_retval = ipc->tx_send_msg(ipc, send_msg);
if (send_retval != 0) {
LOG_E(NFAPI_VNF, "%s error: send TX message failed Error: %d\n", __FUNCTION__, send_retval);
ipc->tx_release(ipc, send_msg);
return false;
}
ipc->notify(ipc, 1); // notify that there's 1 message in queue
return true;
}
bool aerial_nr_send_p5_message(vnf_t *vnf, uint16_t p5_idx, nfapi_nr_p4_p5_message_header_t *msg, uint32_t msg_len)
{
nfapi_vnf_pnf_info_t *pnf = nfapi_vnf_pnf_list_find(&(vnf->_public), p5_idx);
if (pnf) {
uint8_t tx_messagebufferFAPI[sizeof(vnf->tx_message_buffer)];
// Create the message
nv_ipc_msg_t send_msg = {.msg_id = msg->message_id,
.cell_id = 0,
// For P5 we don't need CPU_DATA
.data_pool = NV_IPC_MEMPOOL_CPU_MSG,
.data_len = 0,
.data_buf = NULL};
// Allocate the message
if (!allocate_msg(&send_msg)) {
return false;
}
int packedMessageLengthFAPI = -1;
packedMessageLengthFAPI =
vnf->_public.pack_func(msg, msg_len, tx_messagebufferFAPI, sizeof(tx_messagebufferFAPI), &vnf->_public.codec_config);
return aerial_send_P5_msg(tx_messagebufferFAPI, packedMessageLengthFAPI, msg) == 0;
// Pack directly into it
if ((packedMessageLengthFAPI =
vnf->_public.pack_func(msg, msg_len, send_msg.msg_buf, get_cpu_msg_buf_size(), &vnf->_public.codec_config))
< 0) {
release_msg(&send_msg);
return false;
}
if (packedMessageLengthFAPI <= 0) {
LOG_E(NFAPI_VNF, "Error packing message 0x%02x\n", msg->message_id);
release_msg(&send_msg);
return false;
}
// Set the length
send_msg.msg_len = packedMessageLengthFAPI + 8; // adding 8 to account for the size of the FAPI header
// Send
return send_nvipc_msg(&send_msg);
} else {
NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() cannot find pnf info for p5_idx:%d\n", __FUNCTION__, p5_idx);
return false;
}
}
bool aerial_send_P5_msg(void *packedBuf, uint32_t packedMsgLength, nfapi_nr_p4_p5_message_header_t *header)
{
if (ipc == NULL) {
return false;
}
nv_ipc_msg_t send_msg = {0};
// look for the specific message
switch (header->message_id) {
case NFAPI_NR_PHY_MSG_TYPE_PARAM_REQUEST:
case NFAPI_NR_PHY_MSG_TYPE_PARAM_RESPONSE:
case NFAPI_NR_PHY_MSG_TYPE_CONFIG_REQUEST:
case NFAPI_NR_PHY_MSG_TYPE_CONFIG_RESPONSE:
case NFAPI_NR_PHY_MSG_TYPE_START_REQUEST:
case NFAPI_NR_PHY_MSG_TYPE_START_RESPONSE:
case NFAPI_NR_PHY_MSG_TYPE_STOP_REQUEST:
case NFAPI_NR_PHY_MSG_TYPE_STOP_RESPONSE:
break;
default: {
if (header->message_id >= NFAPI_VENDOR_EXT_MSG_MIN && header->message_id <= NFAPI_VENDOR_EXT_MSG_MAX) {
// if(config && config->pack_p4_p5_vendor_extension) {
// result = (config->pack_p4_p5_vendor_extension)(header, ppWritePackedMsg, end, config);
// } else {
// NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s VE NFAPI message ID %d. No ve ecoder provided\n", __FUNCTION__, header->message_id);
// }
} else {
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s NFAPI Unknown message ID %d\n", __FUNCTION__, header->message_id);
}
} break;
}
send_msg.msg_id = header->message_id;
send_msg.cell_id = 0;
send_msg.msg_len = packedMsgLength + 8; // adding 8 to account for the size of the FAPI header
send_msg.data_len = 0;
send_msg.data_buf = NULL;
send_msg.data_pool = NV_IPC_MEMPOOL_CPU_MSG;
// procedure is allocate->fill->send
int alloc_retval = ipc->tx_allocate(ipc, &send_msg, 0);
if (alloc_retval != 0) {
LOG_E(NFAPI_VNF, "%s error: allocate TX buffer failed Error: %d\n", __FUNCTION__, alloc_retval);
ipc->tx_release(ipc, &send_msg);
return false;
}
memcpy(send_msg.msg_buf, packedBuf, send_msg.msg_len);
LOG_D(NFAPI_VNF,
"send: cell_id=%d msg_id=0x%02X msg_len=%d data_len=%d data_pool=%d\n",
send_msg.cell_id,
send_msg.msg_id,
send_msg.msg_len,
send_msg.data_len,
send_msg.data_pool);
// Send the message
int send_retval = ipc->tx_send_msg(ipc, &send_msg);
if (send_retval < 0) {
LOG_E(NFAPI_VNF, "%s error: send TX message failed Error: %d\n", __FUNCTION__, send_retval);
ipc->tx_release(ipc, &send_msg);
return false;
}
ipc->notify(ipc, 1); // notify that there's 1 message in queue
return true;
}
bool aerial_send_P7_msg(void *packedBuf, uint32_t packedMsgLength, nfapi_nr_p7_message_header_t *header)
{
if (ipc == NULL) {
return false;
}
nv_ipc_msg_t send_msg;
uint8_t *pPacketBodyField = &((uint8_t *)packedBuf)[8];
uint8_t *pPackMessageEnd = packedBuf + packedMsgLength + 8;
uint16_t present_sfn = 0;
uint16_t present_slot = 0;
pull16(&pPacketBodyField, &present_sfn, pPackMessageEnd);
pull16(&pPacketBodyField, &present_slot, pPackMessageEnd);
if (present_sfn != old_sfn || present_slot != old_slot) {
LOG_E(NFAPI_VNF,
"\n============================================================================\n"
"sfn slot doesn't match unpacked one! L2->L1 %d.%d vs L1->L2 %d.%d \n"
"============================================================================\n",
present_sfn,
present_slot,
old_sfn,
old_slot);
}
// look for the specific message
switch (header->message_id) {
case NFAPI_NR_PHY_MSG_TYPE_DL_TTI_REQUEST:
case NFAPI_NR_PHY_MSG_TYPE_UL_TTI_REQUEST:
case NFAPI_NR_PHY_MSG_TYPE_TX_DATA_REQUEST:
case NFAPI_NR_PHY_MSG_TYPE_UL_DCI_REQUEST:
case NFAPI_UE_RELEASE_REQUEST:
case NFAPI_UE_RELEASE_RESPONSE:
case NFAPI_NR_PHY_MSG_TYPE_SLOT_INDICATION:
case NFAPI_NR_PHY_MSG_TYPE_RX_DATA_INDICATION:
case NFAPI_NR_PHY_MSG_TYPE_CRC_INDICATION:
case NFAPI_NR_PHY_MSG_TYPE_UCI_INDICATION:
case NFAPI_NR_PHY_MSG_TYPE_SRS_INDICATION:
case NFAPI_NR_PHY_MSG_TYPE_RACH_INDICATION:
case NFAPI_NR_PHY_MSG_TYPE_DL_NODE_SYNC:
case NFAPI_NR_PHY_MSG_TYPE_UL_NODE_SYNC:
case NFAPI_TIMING_INFO:
case 0x8f:
break;
default: {
if (header->message_id >= NFAPI_VENDOR_EXT_MSG_MIN && header->message_id <= NFAPI_VENDOR_EXT_MSG_MAX) {
} else {
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s NFAPI Unknown message ID %d\n", __FUNCTION__, header->message_id);
}
} break;
}
send_msg.msg_id = header->message_id;
send_msg.cell_id = 0;
send_msg.msg_len = packedMsgLength + 8; // adding 8 to account for the size of the FAPI header
send_msg.data_len = 0;
send_msg.data_buf = NULL;
send_msg.data_pool = NV_IPC_MEMPOOL_CPU_MSG;
// procedure is allocate->fill->send
// Allocate buffer for TX message
int alloc_retval = ipc->tx_allocate(ipc, &send_msg, 0);
if (alloc_retval != 0) {
LOG_E(NFAPI_VNF, "%s error: allocate TX buffer failed Error: %d\n", __FUNCTION__, alloc_retval);
ipc->tx_release(ipc, &send_msg);
return false;
}
memcpy(send_msg.msg_buf, packedBuf, send_msg.msg_len);
LOG_D(NFAPI_VNF,
"send: cell_id=%d msg_id=0x%02X msg_len=%d data_len=%d data_pool=%d\n",
send_msg.cell_id,
send_msg.msg_id,
send_msg.msg_len,
send_msg.data_len,
send_msg.data_pool);
// Send the message
int send_retval = ipc->tx_send_msg(ipc, &send_msg);
if (send_retval < 0) {
LOG_E(NFAPI_VNF, "%s error: send TX message failed Error: %d\n", __FUNCTION__, send_retval);
ipc->tx_release(ipc, &send_msg);
return false;
}
ipc->notify(ipc, 1); // notify that there's 1 message in queue
return true;
}
bool aerial_send_P7_msg_with_data(void *packedBuf,
uint32_t packedMsgLength,
void *dataBuf,
uint32_t dataLength,
nfapi_nr_p7_message_header_t *header)
{
if (ipc == NULL) {
return false;
}
nv_ipc_msg_t send_msg;
uint8_t *pPacketBodyField = &((uint8_t *)packedBuf)[8];
uint8_t *pPackMessageEnd = packedBuf + packedMsgLength + 8;
uint16_t present_sfn = 0;
uint16_t present_slot = 0;
pull16(&pPacketBodyField, &present_sfn, pPackMessageEnd);
pull16(&pPacketBodyField, &present_slot, pPackMessageEnd);
if (present_sfn != old_sfn || present_slot != old_slot) {
LOG_E(NFAPI_VNF,
"\n============================================================================\n"
"sfn slot doesn't match unpacked one! L2->L1 %d.%d vs L1->L2 %d.%d \n"
"============================================================================\n",
present_sfn,
present_slot,
old_sfn,
old_slot);
}
// look for the specific message
switch (header->message_id) {
case NFAPI_NR_PHY_MSG_TYPE_DL_TTI_REQUEST:
case NFAPI_NR_PHY_MSG_TYPE_UL_TTI_REQUEST:
case NFAPI_NR_PHY_MSG_TYPE_TX_DATA_REQUEST:
case NFAPI_NR_PHY_MSG_TYPE_UL_DCI_REQUEST:
case NFAPI_UE_RELEASE_REQUEST:
case NFAPI_UE_RELEASE_RESPONSE:
case NFAPI_NR_PHY_MSG_TYPE_SLOT_INDICATION:
case NFAPI_NR_PHY_MSG_TYPE_RX_DATA_INDICATION:
case NFAPI_NR_PHY_MSG_TYPE_CRC_INDICATION:
case NFAPI_NR_PHY_MSG_TYPE_UCI_INDICATION:
case NFAPI_NR_PHY_MSG_TYPE_SRS_INDICATION:
case NFAPI_NR_PHY_MSG_TYPE_RACH_INDICATION:
case NFAPI_NR_PHY_MSG_TYPE_DL_NODE_SYNC:
case NFAPI_NR_PHY_MSG_TYPE_UL_NODE_SYNC:
case NFAPI_TIMING_INFO:
break;
default: {
if (header->message_id >= NFAPI_VENDOR_EXT_MSG_MIN && header->message_id <= NFAPI_VENDOR_EXT_MSG_MAX) {
} else {
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s NFAPI Unknown message ID %d\n", __FUNCTION__, header->message_id);
}
} break;
}
send_msg.msg_id = header->message_id;
send_msg.cell_id = 0;
send_msg.msg_len = packedMsgLength + 8; // adding 8 to account for the size of the FAPI header
send_msg.data_len = dataLength;
send_msg.data_pool = NV_IPC_MEMPOOL_CPU_DATA;
// procedure is allocate->fill->send
// Allocate buffer for TX message
int alloc_retval = ipc->tx_allocate(ipc, &send_msg, 0);
if (alloc_retval != 0) {
LOG_E(NFAPI_VNF, "%s error: allocate TX buffer failed Error: %d\n", __FUNCTION__, alloc_retval);
ipc->tx_release(ipc, &send_msg);
return false;
}
memcpy(send_msg.msg_buf, packedBuf, send_msg.msg_len);
memcpy(send_msg.data_buf, dataBuf, send_msg.data_len);
LOG_D(NFAPI_VNF,
"send: cell_id=%d msg_id=0x%02X msg_len=%d data_len=%d data_pool=%d\n",
send_msg.cell_id,
send_msg.msg_id,
send_msg.msg_len,
send_msg.data_len,
send_msg.data_pool);
// Send the message
int send_retval = ipc->tx_send_msg(ipc, &send_msg);
if (send_retval != 0) {
LOG_E(NFAPI_VNF, "%s error: send TX message failed Error: %d\n", __FUNCTION__, send_retval);
ipc->tx_release(ipc, &send_msg);
return false;
}
ipc->notify(ipc, 1); // notify that there's 1 message in queue
return true;
}
// Always allocate message buffer, but allocate data buffer only when data_len > 0
static int aerial_recv_msg(nv_ipc_t *ipc, nv_ipc_msg_t *recv_msg)
{
@@ -568,6 +383,10 @@ int nvIPC_Init(nvipc_params_t nvipc_params_s)
{
// Want to use transport SHM, type epoll, module secondary (reads the created shm from cuphycontroller)
load_hard_code_config(&nv_ipc_config, NV_IPC_MODULE_SECONDARY, NV_IPC_TRANSPORT_SHM);
// save the mempool sizes for later use in packing
cpu_msg_buf_size = nv_ipc_get_buf_size(&nv_ipc_config, NV_IPC_MEMPOOL_CPU_MSG);
cpu_data_buf_size = nv_ipc_get_buf_size(&nv_ipc_config, NV_IPC_MEMPOOL_CPU_DATA);
// Create nv_ipc_t instance
LOG_I(NFAPI_VNF, "%s: creating IPC interface with prefix %s\n", __func__, nvipc_params_s.nvipc_shm_prefix);
strcpy(nv_ipc_config.transport_config.shm.prefix, nvipc_params_s.nvipc_shm_prefix);
@@ -588,10 +407,9 @@ int oai_fapi_ul_tti_req(nfapi_nr_ul_tti_request_t *ul_tti_req)
ul_tti_req->header.phy_id = 1; // DJP HACK TODO FIXME - need to pass this around!!!!
ul_tti_req->header.message_id = NFAPI_NR_PHY_MSG_TYPE_UL_TTI_REQUEST;
// int retval = nfapi_vnf_p7_ul_tti_req(p7_config, ul_tti_req);
int retval = p7_config->send_p7_msg(get_p7_vnf(), &ul_tti_req->header);
bool retval = p7_config->send_p7_msg(get_p7_vnf(), &ul_tti_req->header);
if (retval != 0) {
if (!retval) {
LOG_E(PHY, "%s() Problem sending retval:%d\n", __FUNCTION__, retval);
} else {
// Reset number of PDUs so that it is not resent
@@ -608,9 +426,9 @@ int oai_fapi_ul_dci_req(nfapi_nr_ul_dci_request_t *ul_dci_req)
nfapi_vnf_p7_config_t *p7_config = get_p7_vnf_config();
ul_dci_req->header.phy_id = 1; // DJP HACK TODO FIXME - need to pass this around!!!!
ul_dci_req->header.message_id = NFAPI_NR_PHY_MSG_TYPE_UL_DCI_REQUEST;
// int retval = nfapi_vnf_p7_ul_dci_req(p7_config, ul_dci_req);
int retval = p7_config->send_p7_msg(get_p7_vnf(), &ul_dci_req->header);
if (retval != 0) {
bool retval = p7_config->send_p7_msg(get_p7_vnf(), &ul_dci_req->header);
if (!retval) {
LOG_E(PHY, "%s() Problem sending retval:%d\n", __FUNCTION__, retval);
} else {
ul_dci_req->numPdus = 0;
@@ -623,10 +441,9 @@ int oai_fapi_tx_data_req(nfapi_nr_tx_data_request_t *tx_data_req)
nfapi_vnf_p7_config_t *p7_config = get_p7_vnf_config();
tx_data_req->header.phy_id = 1; // DJP HACK TODO FIXME - need to pass this around!!!!
tx_data_req->header.message_id = NFAPI_NR_PHY_MSG_TYPE_TX_DATA_REQUEST;
// LOG_D(PHY, "[VNF] %s() TX_REQ sfn_sf:%d number_of_pdus:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(tx_data_req->SFN),
// tx_data_req->Number_of_PDUs); int retval = nfapi_vnf_p7_tx_data_req(p7_config, tx_data_req);
int retval = p7_config->send_p7_msg(get_p7_vnf(), &tx_data_req->header);
if (retval != 0) {
bool retval = p7_config->send_p7_msg(get_p7_vnf(), &tx_data_req->header);
if (!retval) {
LOG_E(PHY, "%s() Problem sending retval:%d\n", __FUNCTION__, retval);
} else {
tx_data_req->Number_of_PDUs = 0;
@@ -640,11 +457,12 @@ int oai_fapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req)
nfapi_vnf_p7_config_t *p7_config = get_p7_vnf_config();
dl_config_req->header.message_id = NFAPI_NR_PHY_MSG_TYPE_DL_TTI_REQUEST;
dl_config_req->header.phy_id = 1; // DJP HACK TODO FIXME - need to pass this around!!!!
int retval = p7_config->send_p7_msg(get_p7_vnf(), &dl_config_req->header);
bool retval = p7_config->send_p7_msg(get_p7_vnf(), &dl_config_req->header);
dl_config_req->dl_tti_request_body.nPDUs = 0;
dl_config_req->dl_tti_request_body.nGroup = 0;
if (retval != 0) {
if (!retval) {
LOG_E(PHY, "%s() Problem sending retval:%d\n", __FUNCTION__, retval);
}
return retval;
@@ -653,8 +471,9 @@ int oai_fapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req)
int oai_fapi_send_end_request(int cell, uint32_t frame, uint32_t slot){
nfapi_vnf_p7_config_t *p7_config = get_p7_vnf_config();
nfapi_nr_slot_indication_scf_t nr_slot_resp = {.header.message_id = 0x8F, .sfn = frame, .slot = slot};
int retval = p7_config->send_p7_msg(get_p7_vnf(), &nr_slot_resp.header);
if (retval != 0) {
bool retval = p7_config->send_p7_msg(get_p7_vnf(), &nr_slot_resp.header);
if (!retval) {
LOG_E(PHY, "%s() Problem sending retval:%d\n", __FUNCTION__, retval);
}
return retval;

View File

@@ -41,22 +41,12 @@
#include "openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h"
typedef struct {
uint8_t num_msg;
uint8_t opaque_handle;
uint16_t message_id;
uint32_t message_length;
} fapi_phy_api_msg;
int get_cpu_msg_buf_size();
int get_cpu_data_buf_size();
bool allocate_msg(nv_ipc_msg_t* send_msg);
void release_msg(nv_ipc_msg_t* send_msg);
bool send_nvipc_msg(nv_ipc_msg_t* send_msg);
bool aerial_nr_send_p5_message(vnf_t *vnf, uint16_t p5_idx, nfapi_nr_p4_p5_message_header_t *msg, uint32_t msg_len);
bool aerial_send_P5_msg(void *packedBuf, uint32_t packedMsgLength, nfapi_nr_p4_p5_message_header_t *header);
bool aerial_send_P7_msg(void *packedBuf, uint32_t packedMsgLength, nfapi_nr_p7_message_header_t *header);
bool aerial_send_P7_msg_with_data(void *packedBuf,
uint32_t packedMsgLength,
void *dataBuf,
uint32_t dataLength,
nfapi_nr_p7_message_header_t *header);
int nvIPC_Init(nvipc_params_t nvipc_params_s);
int oai_fapi_send_end_request(int cell_id, uint32_t frame, uint32_t slot);
int oai_fapi_ul_tti_req(nfapi_nr_ul_tti_request_t *ul_tti_req);

View File

@@ -114,10 +114,10 @@ static int32_t aerial_pack_tx_data_request(void *pMessageBuf,
void *pPackedBuf,
void *pDataBuf,
uint32_t packedBufLen,
uint32_t dataBufLen,
int32_t dataBufLen,
nfapi_p7_codec_config_t *config,
nfapi_vnf_p7_config_t *p7_config,
uint32_t *data_len)
int32_t *data_len)
{
if (pMessageBuf == NULL || pPackedBuf == NULL) {
NFAPI_TRACE(NFAPI_TRACE_ERROR, "P7 Pack supplied pointers are null\n");
@@ -130,7 +130,7 @@ static int32_t aerial_pack_tx_data_request(void *pMessageBuf,
uint8_t *pPackedDataField = &pDataPackedMessage[0];
uint8_t *pPackedDataFieldStart = &pDataPackedMessage[0];
uint8_t **ppWriteData = &pPackedDataField;
const uint32_t dataBufLen32 = (dataBufLen + 3) / 4;
const int32_t dataBufLen32 = (dataBufLen + 3) / 4;
nfapi_nr_tx_data_request_t *pNfapiMsg = (nfapi_nr_tx_data_request_t *)pMessageHeader;
// Actual payloads are packed in a separate buffer
for (int i = 0; i < pNfapiMsg->Number_of_PDUs; i++) {
@@ -180,40 +180,67 @@ static int32_t aerial_pack_tx_data_request(void *pMessageBuf,
return (int32_t)(pMessageHeader->message_length);
}
bool aerial_nr_send_p7_message(vnf_p7_t *vnf_p7, nfapi_nr_p7_message_header_t *header)
{
uint8_t FAPI_buffer[1024 * 64];
// Common to both cases, we can set it now
// In most cases we don't need the data pool, only the CPU_MSG
nv_ipc_msg_t send_msg = {.msg_id = header->message_id, .data_pool = NV_IPC_MEMPOOL_CPU_MSG, .cell_id = 0};
// Check if TX_DATA request, if true, need to pack to data_buf
if (header->message_id == NFAPI_NR_PHY_MSG_TYPE_TX_DATA_REQUEST) {
// for this we need the secondary CPU_DATA pool
send_msg.data_pool = NV_IPC_MEMPOOL_CPU_DATA;
// Allocate the message after setting the data pool
if (!allocate_msg(&send_msg)) {
LOG_E(NFAPI_VNF, "Error in allocating nvipc message\n");
return false;
}
nfapi_nr_tx_data_request_t *pNfapiMsg = (nfapi_nr_tx_data_request_t *)header;
uint64_t size = 0;
for (int i = 0; i < pNfapiMsg->Number_of_PDUs; ++i) {
size += pNfapiMsg->pdu_list[i].PDU_length;
}
AssertFatal(size <= 1024 * 1024 * 2, "Message data larger than available buffer, tried to pack %" PRId64, size);
uint8_t FAPI_data_buffer[1024 * 1024 * 2]; // 2MB
uint32_t data_len = 0;
AssertFatal(size <= get_cpu_data_buf_size(), "Message data larger than available buffer, tried to pack %" PRId64, size);
int32_t data_len = 0;
int32_t len_FAPI = aerial_pack_tx_data_request(header,
FAPI_buffer,
FAPI_data_buffer,
sizeof(FAPI_buffer),
sizeof(FAPI_data_buffer),
send_msg.msg_buf,
send_msg.data_buf,
get_cpu_msg_buf_size(),
get_cpu_data_buf_size(),
&vnf_p7->_public.codec_config,
((nfapi_vnf_p7_config_t *)vnf_p7),
&data_len);
// Set both lengths
send_msg.msg_len = len_FAPI + 8; // adding 8 to account for the size of the FAPI header
send_msg.data_len = data_len;
if (len_FAPI <= 0) {
LOG_E(NFAPI_VNF, "Problem packing TX_DATA_request\n");
release_msg(&send_msg);
return false;
} else {
return aerial_send_P7_msg_with_data(FAPI_buffer, len_FAPI, FAPI_data_buffer, data_len, header) == 0;
}
// Send
return send_nvipc_msg(&send_msg);
} else {
// Create and send FAPI P7 message
int len_FAPI = ((nfapi_vnf_p7_config_t *)vnf_p7)->pack_func(header,
FAPI_buffer,
sizeof(FAPI_buffer),
&vnf_p7->_public.codec_config);
return aerial_send_P7_msg(FAPI_buffer, len_FAPI, header) == 0;
send_msg.data_len = 0;
send_msg.data_buf = NULL;
// Allocate the message
if (!allocate_msg(&send_msg)) {
LOG_E(NFAPI_VNF, "Error in allocating nvipc message\n");
return false;
}
// Pack directly into it
nfapi_vnf_p7_config_t* p7_config = (nfapi_vnf_p7_config_t *)vnf_p7;
int len_FAPI = p7_config->pack_func(header, send_msg.msg_buf, get_cpu_msg_buf_size(), &vnf_p7->_public.codec_config);
if (len_FAPI <= 0) {
LOG_E(NFAPI_VNF, "Problem packing message 0x%02x\n", header->message_id);
release_msg(&send_msg);
return false;
}
// Set the length
send_msg.msg_len = len_FAPI + 8; // adding 8 to account for the size of the FAPI header
// Send
return send_nvipc_msg(&send_msg);
}
}

View File

@@ -716,7 +716,13 @@ typedef enum {
X(NFAPI_NR_PHY_API_MSG_TX_ERR, 0X8)
#ifdef ENABLE_AERIAL
// Error codes obtained from Aerial L1 file
// cuPHY-CP/scfl2adapter/lib/scf_5g_fapi/scf_5g_fapi.h
#define AERIAL_ERROR_LIST \
X(SCF_ERROR_CODE_MSG_INVALID_PHY_ID, 0x9) \
X(SCF_ERROR_CODE_MSG_UNINSTANTIATED_PHY, 0xA) \
X(SCF_ERROR_CODE_MSG_INVALID_DFE_Profile, 0xB) \
X(SCF_ERROR_CODE_MSG_PHY_PROFILE_SELECTION, 0xC) \
X(AERIAL_ERROR_CODE_FAPI_END, 0x32) \
X(AERIAL_ERROR_CODE_L1_PROC_OBJ_UNAVAILABLE_ERR, 0x33) \
X(AERIAL_ERROR_CODE_MSG_LATE_SLOT_ERR, 0x34) \
@@ -729,7 +735,26 @@ typedef enum {
X(AERIAL_ERROR_CODE_L1_P1_EXIT_ERROR, 0x3B) \
X(AERIAL_ERROR_CODE_L1_P2_EXIT_ERROR, 0x3C) \
X(AERIAL_ERROR_CODE_L1_DL_CH_ERROR, 0x3D) \
X(AERIAL_ERROR_CODE_L1_UL_CH_ERROR, 0x3E)
X(AERIAL_ERROR_CODE_L1_UL_CH_ERROR, 0x3E) \
X(SCF_ERROR_CODE_EARLY_HARQ_TIMING_ERROR, 0x3F) \
X(SCF_ERROR_CODE_SRS_CHEST_BUFF_BAD_STATE, 0x40) \
X(SCF_ERROR_CODE_BEAM_ID_OUT_OF_RANGE, 0x41) \
X(SCF_ERROR_CODE_PTP_SVC_ERROR, 0x42) \
X(SCF_ERROR_CODE_PTP_SYNCED, 0x43) \
X(SCF_ERROR_CODE_L1_MISSING_UL_IQ, 0x44) \
X(SCF_ERROR_CODE_MSG_CAPACITY_EXCEEDED, 0x45) \
X(SCF_ERROR_CODE_RHOCP_PTP_EVENTS_ERROR, 0x46) \
X(SCF_ERROR_CODE_RHOCP_PTP_EVENTS_SYNCED, 0x47) \
X(SCF_FAPI_SSB_PBCH_L1_LIMIT_EXCEEDED, 0x81) \
X(SCF_FAPI_PDCCH_L1_LIMIT_EXCEEDED, 0x82) \
X(SCF_FAPI_PDSCH_L1_LIMIT_EXCEEDED, 0x84) \
X(SCF_FAPI_CSIRS_L1_LIMIT_EXCEEDED, 0x88) \
X(SCF_FAPI_PUSCH_L1_LIMIT_EXCEEDED, 0xC1) \
X(SCF_FAPI_PUCCH_L1_LIMIT_EXCEEDED, 0xC2) \
X(SCF_FAPI_SRS_L1_LIMIT_EXCEEDED, 0xC4) \
X(SCF_FAPI_PRACH_L1_LIMIT_EXCEEDED, 0xC8) \
X(SCF_ERROR_CODE_RELEASED_HARQ_BUFFER_INFO, 0xD0)
#else
#define AERIAL_ERROR_LIST
#endif

View File

@@ -66,5 +66,9 @@ if (ENABLE_LDPC_CUDA)
add_dependencies(nr_dlschsim ldpc_cuda)
endif()
add_library(crc_byte OBJECT crc_byte.c)
add_subdirectory(nrLDPC_coding)
add_subdirectory(nrLDPC_decoder)
add_subdirectory(nrPolar_tools)
add_subdirectory(nrSmallBlock)

View File

@@ -44,12 +44,12 @@ $(OBJ) : %.o : %.c
$(CC) -c $(CFLAGS) -Wall -I$(TOP_DIR) -I$(TOP_DIR)/PHY/CODING -I$(OPENAIR0_DIR)/express-mimo/simulator/baseband/C/channel_decoder -o $@ $<
ltetest: $(OBJ) ltetest.c
$(CC) ltetest.c -O2 -I$(TOP_DIR) -I$(TOP_DIR)/PHY/CODING -I$(OPENAIR0_DIR)/express-mimo/simulator/baseband/C/channel_decoder -o ltetest $(CFLAGS) $(OBJ) -lm -DOPENAIR_LTE -lblas -lrt
$(CC) ltetest.c -O2 -I$(TOP_DIR) -I$(TOP_DIR)/PHY/CODING -I$(OPENAIR0_DIR)/express-mimo/simulator/baseband/C/channel_decoder -o ltetest $(CFLAGS) $(OBJ) -lm -DOPENAIR_LTE -lrt
pdcch_test: $(OBJ) pdcch_test.c
$(CC) pdcch_test.c -I$(TOP_DIR) -o pdcch_test $(CFLAGS) $(PHY_OBJS) -lm -lblas
$(CC) pdcch_test.c -I$(TOP_DIR) -o pdcch_test $(CFLAGS) $(PHY_OBJS) -lm
viterbi_test: $(OBJ) viterbi_test.c
$(CC) viterbi_test.c -I$(TOP_DIR) -o viterbi_test $(CFLAGS) $(PHY_OBJS) -lm -lblas
$(CC) viterbi_test.c -I$(TOP_DIR) -o viterbi_test $(CFLAGS) $(PHY_OBJS) -lm
clean:
rm $(OBJ)

View File

@@ -5,6 +5,7 @@
#include "../nrLDPC_coding_interface.h"
#include "nrLDPC_coding_aal.h"
#include "PHY/sse_intrin.h"
#include "reverse_bits.h"
#include <common/utils/LOG/log.h>
#define NR_LDPC_ENABLE_PARITY_CHECK

View File

@@ -37,7 +37,6 @@
#include "PHY/NR_TRANSPORT/nr_dlsch.h"
#include "SCHED_NR/sched_nr.h"
#include "defs.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/log.h"
#include <stdalign.h>

View File

@@ -34,7 +34,6 @@
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
#include "PHY/NR_TRANSPORT/nr_dlsch.h"
#include "SCHED_NR/sched_nr.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/log.h"
#include "common/utils/nr/nr_common.h"
#include <openair2/UTIL/OPT/opt.h>

View File

@@ -40,7 +40,6 @@
#include "PHY/defs_gNB.h"
#include "SCHED_NR/sched_nr.h"
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "defs.h"
// #define DEBUG_ULSCH_DECODING
// #define gNB_DEBUG_TRACE

View File

@@ -0,0 +1,15 @@
add_library(polar STATIC
nr_polar_init.c
nr_bitwise_operations.c
nr_crc_byte.c
nr_polar_decoder.c
nr_polar_decoding_tools.c
nr_polar_encoder.c
nr_polar_interleaving_pattern.c
nr_polar_kernal_operation.c
nr_polar_kronecker_power_matrices.c
nr_polar_matrix_and_array.c
nr_polar_procedures.c
nr_polar_sequence_pattern.c
)
target_link_libraries(polar PRIVATE utils)

View File

@@ -30,8 +30,8 @@
* \warning
*/
#include "common/utils/nr/nr_common.h"
#include "PHY/CODING/nrPolar_tools/nr_polar_defs.h"
#include "reverse_bits.h"
#include <assert.h>
#include <stdlib.h>
#include <stdint.h>

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