Compare commits

...

66 Commits

Author SHA1 Message Date
Sakthivel Velumani
5f44b943cf tmp 2026-04-07 03:39:12 +00:00
Jaroslava Fiedlerova
2407c35633 Merge branch 'integration_2026_w14' into 'develop'
Integration `2026.w14`

* !4021 hotfix for 4 layer mapping on aarch64
* !4022 UE: Fix CSI RS Measurement
* !4010 UE: Implement SUCI Profile Scheme A
* !4012 More compilation improvements
* !4027 CI: fix Aerial conf for test with 30 MHz BW
* !3948 Update doc: split RUNMODEM.md, clarify USRP-specific workarounds
* !4026 RRC/E1 bugfixes: handle missing UE context, don't send E1 msg if no PDU session
* !3996 Switch xran lib repo to https://github.com/openairinterface/o-du-phy.git
* !4020 Remove a lot of unused code and defines
* !3969 Acceleration of channel convolution
* !4023 Cleanup common_lib.h
* Clarifications on license
* !4017 CI: Add stage to push to local git repository

See merge request oai/openairinterface5g!4025
2026-04-03 10:09:09 +00:00
Jaroslava Fiedlerova
1a4c4c9b35 Merge remote-tracking branch 'origin/ci-push-local-repo' into integration_2026_w14 (!4017)
CI: Add stage to push to local git repository

This MR includes minor code cleanup and fixes for warnings reported by Jenkins.
It also introduces a new stage in ci-scripts/Jenkinsfile-GitLab-Container that
pushes the branch to a local repository after the merge. In a follow-up MR,
this local repository will be used as the source for cloning the branch,
replacing direct access to GitLab/GitHub.
2026-04-03 09:09:06 +02:00
Jaroslava Fiedlerova
3f3c0b5ed2 Jenkinsfile-GitLab-Container: declare pipeline variables
Did you forget the `def` keyword? WorkflowScript seems to be setting a field named JOB_TIMESTAMP (to a value of type String) which could lead to memory leaks or other issues.
Did you forget the `def` keyword? WorkflowScript seems to be setting a field named MR_NUMBER (to a value of type String) which could lead to memory leaks or other issues.
2026-04-03 08:48:32 +02:00
Jaroslava Fiedlerova
febbadf83a CI: Add stage to push to local git repository 2026-04-03 08:48:32 +02:00
Jaroslava Fiedlerova
e0d9edeeee Add Jenkinsfile for RAN-Local-Repo-Push 2026-04-03 08:48:32 +02:00
Robert Schmidt
0f7550831f Clarifications on license
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-03 04:14:46 +02:00
Jaroslava Fiedlerova
5e6fd58dde Merge remote-tracking branch 'origin/cleanup-split8-api' into integration_2026_w14 (!4023)
Cleanup common_lib.h

This change reduces the number of dependecies of common_lib.h and simplifies
the task of implementing an external OAI radio library.
2026-04-02 18:33:50 +02:00
Jaroslava Fiedlerova
978932e522 Merge remote-tracking branch 'origin/vrtsim-convolution-acceleration' into integration_2026_w14 (!3696)
Acceleration of channel convolution

Added two versions of channel convolution:
- accelerated via threadpool
- accelerated using CUDA
2026-04-02 17:11:31 +02:00
Robert Schmidt
0393a14049 Merge remote-tracking branch 'origin/remove-unused-code' into integration_2026_w14 (!4020)
Remove a lot of unused code, defines, and config options

Remove unused header files and defines.

Slightly clean up gnb_config.c by removing all _IDX variables. Remove
these unused parameters:

- MACRLCs.[0].num_cc
- MACRLCs.[0].local_n_portc
- MACRLCs.[0].remove_n_portc
- MACRLCs.[0].remote_s_portc
- MACRLCs.[0].remote_s_portd
- L1s.[0].num_cc
- L1s.[0].local_n_portc
2026-04-02 15:46:56 +02:00
Jaroslava Fiedlerova
eb50f78ed5 Merge remote-tracking branch 'origin/xran-repo' into integration_2026_w14 (!3996)
Switch xran lib repo to https://github.com/openairinterface/o-du-phy.git
2026-04-02 12:49:50 +02:00
Jaroslava Fiedlerova
13fbc5a643 CI: Get source repository from Gitlab plugin in Jenkins 2026-04-02 12:34:55 +02:00
Jaroslava Fiedlerova
6cf2570a9f Jenkinsfile-GitLab-Container: declare local vars in slave job triggers
Declare `localStatus` and `localResult` as local variables in `triggerSlaveJob`
and `triggerCN5GSlaveJob` functions by adding `def`.

This prevents unintended use of global variables in pipeline and avoids
potential variable leakage or conflicts between stages.

Follows the Jenkins recommendation:
Did you forget the `def` keyword? WorkflowScript seems to be setting a field named localStatus (to a value of type RunWrapper) which could lead to memory leaks or other issues.
Did you forget the `def` keyword? WorkflowScript seems to be setting a field named localResult (to a value of type String) which could lead to memory leaks or other issues.
2026-04-02 12:34:55 +02:00
Jaroslava Fiedlerova
df7a1704cc Jenkinsfile-GitLab-Container: remove unused function 2026-04-02 12:34:55 +02:00
Robert Schmidt
e1a7a2e8af Remove L1s.local_n_portc: not used
Also remove intermediate variable eth_params_n that is not used
anywhere.
2026-04-02 11:58:59 +02:00
Robert Schmidt
16b1a031a9 Remove MACRLCs.remote_s_portc/d: not used
Remove the gNB_MAC_INST.eth_params_s, since it's only purpose is to
store what can be on the stack.

For the Aerial log message, don't print an empty prefix but what is
actually used for Aerial.
2026-04-02 11:58:59 +02:00
Robert Schmidt
7ee619b0bc MACRLCs my/remote_portc: remove, is unused 2026-04-02 11:58:59 +02:00
Jaroslava Fiedlerova
1682507735 CI: Add CUDA-enabled unit tests for running on GH
- remove test_multipath and test_noise from ChanelSim tests of
  RAN-Channel-Simulation pipeline - will be executed together with the
  other CUDA-enabled unit tests
2026-04-01 23:00:16 +02:00
Jaroslava Fiedlerova
b05985e7ab CI: Extend BuildRunTests() to accept configurable dockerfile and test options
- enable configurable dockerfile, runtime-opt, and ctest-opt parameters in
  the XML file for the Build_Run_Tests step
- pass runtime options to `docker run` to support ctest execution with CUDA
- allow additional ctest options for selective test execution and labeling
2026-04-01 22:57:03 +02:00
Robert Schmidt
7cf92f4bae Remove all gNB num_cc parameters in MACRLCs and L1s sections
These parameters are not used.
2026-04-01 21:38:40 +02:00
Jaroslava Fiedlerova
84d9cd3c93 CI: add channel pipeline tests to CTest and label CUDA tests
- add benchmark_channel_pipeline to CTest
- add test_channel_pipeline to CTest
- add `cuda` label to CUDA-dependent tests for easier execution and
  filtering
2026-04-01 21:36:20 +02:00
Jaroslava Fiedlerova
45d106f1c6 Relax CUDA device requirement
This change removes the cudaDevAttrIntegrated check and only requires
pageable memory access. This change allows to run GPU accelerated
channel convolution on GH machines.
2026-04-01 21:36:10 +02:00
Robert Schmidt
8a48fca140 Remove L1_..._IDX
Similar like parent commit, but for L1.
2026-04-01 21:19:51 +02:00
Robert Schmidt
42d5e5a0dc Remove MACRLC_..._IDX
The indices are brittle and might be wrong. Instead, use the option name
(via gpd()) to look up config options. This will also simplify the
removal of unused parameters, as we don't have to update all indices.

Remove leading CONFIG_STRING_, as it is just repetitive and adds noise.
The constants are both short(er) and sufficiently self-explanatory
without it.
2026-04-01 21:19:14 +02:00
Jaroslava Fiedlerova
f69b88a108 Merge remote-tracking branch 'origin/fixes-rrc-e1' into integration_2026_w14 (!4026)
RRC/E1 bugfixes: handle missing UE context, don't send E1 msg if no PDU session

See individual commits
2026-04-01 20:58:35 +02:00
Jaroslava Fiedlerova
8f5148ab2a Merge remote-tracking branch 'origin/update-split-doc-runmodem' into integration_2026_w14 (!3948)
Update doc: split RUNMODEM.md, clarify USRP-specific workarounds

This reworks the documentation:
- split up RUNMODEM.md into separate documents for gNB, UE, NTN
- explains USRP workaround and patches
- makes a standalone UE doc file that explains UE-specific configuration
  & modes
- better explains physical simulators
- adds a document on tracy
- cleanup
2026-04-01 20:57:16 +02:00
Robert Schmidt
1a3bf557cf delay transaction: handle if no UE found
It can happen that a message is delayed, but then no UE is found for
such message, e.g., something is delayed but the UE context is deleted
in the meantime:

    [02:23:16.320730] [NR_RRC] I [--] (UE ID 3 RNTI d2b1) Remove UE context

    Assertion (ue_context_p) failed!
    In rrc_delay_transaction() /oai-ran/openair2/RRC/NR/rrc_gNB.c:191

In that case, don't delay the message further -- all handlers gated by
this function will check for the UE context and abort the transaction if
not present.
2026-04-01 17:09:37 +02:00
Robert Schmidt
1e9476a6de E1 message: handle if no UE found
Abort message processing if no UE can be found, which is what is done in
most other messages.
2026-04-01 17:09:37 +02:00
Robert Schmidt
95e4270ea7 bugfix: do not trigger e1 bearer setup when no PDU session
It can happen that no PDU session can be setup (e.g., PDU session
already setup). Check that there is at least one before triggering the
message.

Also initialize bearer_req.gNB_cu_cp_ue_id early to avoid uninitialized
IDs (e.g., when no PDU session to be setup).
2026-04-01 17:09:37 +02:00
Jaroslava Fiedlerova
fcd3e62a33 Merge remote-tracking branch 'origin/ci-fix-aerial-oaiue' into integration_2026_w14 (!4027)
CI: fix Aerial conf for test with 30 MHz BW
2026-04-01 16:33:08 +02:00
Jaroslava Fiedlerova
28c6b6d9d9 Merge remote-tracking branch 'origin/compil_imp' into integration_2026_w14 (!4012)
More compilation improvements

Mostly to decouple NR files from LTE headers.

At least in one instance, ulsch_input_buffer_array, using an LTE constant in
NR code was quite dangerous because the buffer in NR could easily be larger
than what the LTE constant foresee.
2026-04-01 16:32:18 +02:00
Jaroslava Fiedlerova
d1f92c03a7 Merge remote-tracking branch 'origin/fix-csi-rs-meas' into integration_2026_w14 (!4022)
UE: Fix CSI RS Measurement

1. Fix regression introduced in !3834.
2. ZMQ has no interference or artificial noise so the interference plus noise
   measured is always 0. nr_csi_rs_pmi_estimation() returns SINR as 0 if noise
   is 0 which reports CQI as 0. This fix computes SINR if noise is 0 instead of
   returning.
2026-04-01 09:58:48 +02:00
Jaroslava Fiedlerova
1dd66355a2 Merge remote-tracking branch 'origin/nr-ue-suci-scheme-a' into integration_2026_w14 (!4010)
UE: Implement SUCI Profile Scheme A

This MR modifies the nrUE to support Profile Scheme A based SUCI generation as
outlined in TS 33.501 §C.3 Elliptic Curve Integrated Encryption Scheme (ECIES),
this further extends SUCI generation, which currently only supports the NULL
Scheme.

Changes:
- Extend UICC structure for SUCI parameters.
- Add cryptographic primitives (Curve25519, X9.63 KDF).
- Add an abstracted function to transfer digit strings into their corresponding
  BCD value.
- Updates SUCI generation to support Profile Scheme A.
- Updates NAS SUCI encoding to support hexadecimal cryptographic output in
  addition to BCD encoded MSINs.

Notes:
When a configuration file specifies an unsupported Profile Scheme, the NAS layer
triggers a fatal error. This occurs either because Profile Scheme B is
unimplemented or the build uses OpenSSL < 3.0, which lacks Curve25519 and X9.63
KDF support, ensuring users are informed of the incompatibility. Support for
Profile Scheme B (TS 33.501 §C.3.4.2 Profile B) can be implemented at a later
stage using P-256-based encryption.

The implementation of SUCI Profile Scheme A was tested against Open5GS’s core
implementation. OpenAirInterface’s cn5G does not yet support Scheme A and should
be extended to include it in a future update.
2026-04-01 09:56:29 +02:00
Jaroslava Fiedlerova
f59083f620 CI: fix Aerial conf for testcase with 30 MHz BW 2026-03-31 22:30:48 +02:00
Robert Schmidt
40a1afda05 Rewrite RUNMODEM.md for general gNB overview
Assisted-by: Claude:claude-sonnet-4-6
2026-03-31 21:35:31 +02:00
Robert Schmidt
fd2fda6260 runmodem-ue.md: update multi-UE operation, minor updates 2026-03-31 21:35:31 +02:00
Robert Schmidt
faadb1aa15 doc: physim: explain timing, give more ctest examples 2026-03-31 21:35:31 +02:00
Jaroslava Fiedlerova
c07813a43e Add physical simulator test to tests target
This allows to compile physical simulators by compiling only tests with
"ninja tests". It fixes a regression.

Fixes: ec8efe1b7e ("Unify physim test definition")
2026-03-31 21:35:31 +02:00
Robert Schmidt
76b4899ecb USRP driver: describe patch, --continuous-tx, -E options 2026-03-31 21:35:31 +02:00
Sakthivel Velumani
422ebb2c7c csi: fix sinr measurement with ZMQ 2026-03-31 19:10:58 +00:00
Sakthivel Velumani
e3b74e542d csi: fix regression introduced in !3834 2026-03-31 19:10:49 +00:00
francescomani
74cc133a13 fix for ldpc_aal compilation error 2026-03-31 16:45:25 +02:00
francescomani
0b3216f889 further compilation cleanup 2026-03-31 16:45:25 +02:00
francescomani
f94dad6893 rename and take out gold generic function from lte files to specific file to avoid cross-compilation 2026-03-31 16:45:25 +02:00
francescomani
a71cd36248 compilation improvements aroung impl_defs_top file 2026-03-31 16:45:24 +02:00
Bartosz Podrygajlo
e4d2d2b827 Cleanup common_lib.h
This change reduces the number of dependecies of common_lib.h and simplifies
the task of implementing an external OAI radio library.
2026-03-31 11:50:35 +02:00
Jaroslava Fiedlerova
7b2d9d9e31 Merge remote-tracking branch 'origin/hotfix_layer_mapping_aarch64' into integration_2026_w14 (!4021)
hotfix for 4 layer mapping on aarch64

This hotfix fixes a small bug appearing on aarch64 in the 4-layer PDSCH mapping
function. It was an error in the original implemntation.
2026-03-31 11:42:21 +02:00
Aaron van Diepen
8ec7b4009b Implement SUCI Profile Scheme A for 5G UE
Extend UICC configuration parsing to provide: routing_indicator,
protection_scheme, home_network_public_key, and home_network_public_key_id.
Use the protection_scheme value to decide what SUCI Profile Scheme to
apply during SUCI generation. Add support for Profile Scheme A which
provides ECIES-based encryption using Curve25519 and X9.63 KDF as outlined
in TS 33.501 Section C.3.4.1 Profile A.

When a configuration file specifies an unsupported Profile Scheme,
the NAS layer triggers a fatal error. This occurs either because
Profile Scheme B is unimplemented or the build uses OpenSSL < 3.0,
which lacks Curve25519 and X9.63 KDF support, ensuring users are
informed of the incompatibility.
2026-03-31 00:44:32 +02:00
Robert Schmidt
732f970442 Add tracy documentation 2026-03-30 23:35:22 +02:00
Robert Schmidt
dd3490714c Reorganize BUILD.md: cmake first, describe how to build all targets 2026-03-30 21:20:43 +02:00
Robert Schmidt
50e6cd44af Move instruction on how to configure UE to separate page
Save space in the main tutorial, and group UE-specific configuration in
one page. Add a reference where to find UE-related configuration
information.
2026-03-30 21:20:33 +02:00
Robert Schmidt
4ad1775c1d Remove unused BWP document entry 2026-03-30 21:20:29 +02:00
Robert Schmidt
37a2a0590a Move developer-specific docs to developer's section 2026-03-30 21:20:24 +02:00
Robert Schmidt
4c9aaba54a Remove NSA from instructions: already covered elsewhere 2026-03-30 21:20:22 +02:00
Robert Schmidt
fbb867adb8 Split out nrUE configuration/documentation to separate document
I only modify the headings and write an introductory sentence, but the
content is otherwise unmodified.
2026-03-30 21:19:34 +02:00
Robert Schmidt
2db282c7d3 Split out NTN configuration from RUNMODEM.md
Split out to make a standalone NTN configuratio page that would be
easier to find. I only modify the headings in the new file and write an
introductory sentence of the tutorial, the rest is unchanged.
2026-03-30 21:18:01 +02:00
Bartosz Podrygajlo
2578866451 vrtsim: disable channelmod histogram print if its empty 2026-03-30 09:49:18 +02:00
Bartosz Podrygajlo
96cec32eaf Integrate channel pipeline with vrtsim
Integrate channel pipeline library with vrtsim with two acceleration
options chosen at compile time:
 - threadpool if CUDA support is disabled
 - CUDA otherwise
2026-03-30 09:48:58 +02:00
Bartosz Podrygajlo
47ba5d3ca5 Acceleration of channel convolution and noise generation
Added two versions of channel convolution and noise generation:
 - accelerated via threadpool
 - accelerated using CUDA

The main difference between this and previous versions of channel
convolution implementations is that these functions take a real-world
approach to input/output where both could be split unevenly over a set of
buffers, e.g. ring buffers used in vrtsim.

The CUDA-accelerated version only works on systems with unified memory, e.g. NVidia
DGX Spark or GH
2026-03-30 09:48:50 +02:00
Bartosz Podrygajlo
c7799886cf Move noise_device to openair1/SIMULATION/TOOLS 2026-03-30 09:47:17 +02:00
Bartosz Podrygajlo
384d1eedf6 Fix for unit tests 2026-03-30 09:26:55 +02:00
Bartosz Podrygajlo
744e8d2108 Switch xran lib repo to https://github.com/openairinterface/o-du-phy.git 2026-03-29 21:38:35 +02:00
Raymond Knopp
f68f23ea86 hotfix for 4 layer mapping on aarch64 2026-03-27 21:55:35 +01:00
Robert Schmidt
bdc9c4922f Remove unused ITTI tasks 2026-03-27 18:57:11 +01:00
Robert Schmidt
ab0757c4d9 Remove many unused files
The lteUE RRC was sending some messages, but no TASK_PHY_UE exists to
receive them. Remove also this code for clarity.
2026-03-27 18:57:09 +01:00
Robert Schmidt
77b898b4d3 Remove unused MACRLC defines
The removed code is a subset of what is actually defined in
MACRLC_nr_paramdef.h. The only thing missing there is
CONFIG_STRING_MACRLC_LIST.
2026-03-27 17:47:51 +01:00
334 changed files with 3990 additions and 2671 deletions

View File

@@ -674,6 +674,8 @@ target_link_libraries(UTIL PUBLIC instrumentation)
set(SECURITY_SRC
${OPENAIR3_DIR}/SECU/secu_defs.c
${OPENAIR3_DIR}/SECU/curve_25519.c
${OPENAIR3_DIR}/SECU/x963_kdf.c
${OPENAIR3_DIR}/SECU/kdf.c
${OPENAIR3_DIR}/SECU/aes_128_ctr.c
${OPENAIR3_DIR}/SECU/aes_128_cbc_cmac.c
@@ -1911,7 +1913,7 @@ target_link_libraries(nr-uesoftmodem PRIVATE
target_link_libraries(nr-uesoftmodem PRIVATE pthread m CONFIG_LIB rt nr_ue_phy_meas)
target_link_libraries(nr-uesoftmodem PRIVATE ${T_LIB})
target_link_libraries(nr-uesoftmodem PRIVATE nr_nas lib_uicc usim_lib)
target_link_libraries(nr-uesoftmodem PRIVATE nr_nas lib_uicc usim_lib SECURITY)
target_link_libraries(nr-uesoftmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
# force the generation of ASN.1 so that we don't need to wait during the build
@@ -2061,6 +2063,21 @@ target_link_libraries(nr_srssim PRIVATE
m pthread ITTI dl nr_ue_phy_meas physim_common softmodem_common
)
add_executable(nr_csirssim
${OPENAIR1_DIR}/SIMULATION/NR_PHY/csirssim.c
${NFAPI_USER_DIR}/nfapi.c
${NFAPI_USER_DIR}/gnb_ind_vars.c
${PHY_INTERFACE_DIR}/queue_t.c
)
target_link_libraries(nr_csirssim 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 -Wl,--end-group
m pthread ${T_LIB} ITTI dl nr_ue_phy_meas physim_common
softmodem_common
)
target_link_libraries(nr_csirssim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
#target_link_libraries(nr_csirssim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs UTIL physim_common m L2_NR pthread ITTI dl nr_ue_phy_meas softmodem_common)
if(CUDA_ENABLE)
if (TARGET oai_cuda_lib)
target_link_libraries(nr_dlsim PRIVATE oai_cuda_lib)

10
NOTICE
View File

@@ -1,10 +1,10 @@
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
The source code is distributed under [**Collaborative Standards Software
License (CSSL) v1.0**](LICENSE). Some files, such as for orchestration,
are distributed under [MIT license](preferred)(MIT.txt). Documentation is
distributed under [Creative Commons Attribution 4.0 International
license](LICENSES/preferred/CC-BY-4.0.txt).
The source code is distributed under Collaborative Standards Software License
(CSSL) v1.0. Some files, such as for orchestration, are distributed under MIT
license. Documentation is distributed under Creative Commons Attribution 4.0
International license. All the files without an explicit copyright header have
an implicit "Copyright of OpenAirInterface Authors".
For more details of the license, refer to the `LICENSES` directory for a list
of preferred and exceptionally-applied licenses.

View File

@@ -40,7 +40,18 @@ Some files, such as for orchestration, are distributed under
[MIT license](preferred)(MIT.txt). Documentation is distributed under
[Creative Commons Attribution 4.0 International license](LICENSES/preferred/CC-BY-4.0.txt).
Please see [NOTICE](NOTICE.md) for other licenses which are used in the software.
All the files without an explicit copyright header have an implicit "Copyright
of OpenAirInterface Authors".
Please see [NOTICE](NOTICE) for other licenses which are used in the software.
In the past OAI source code has been re-licensed sometimes, here is the
history:
1. CSSL v1.0 starting tag 2026.w14
2. OAI Public License v1.1 starting tag v1.0 till af4b0d53
3. OAI Public License v1.0: starting tag v.04 till v1.0
4. GPL 3: starting tag v.0 till v.04 (only initial implementation of 4G)
# Where to Start #

View File

@@ -34,9 +34,7 @@ pipeline {
stage ("Verify Parameters") {
steps {
script {
JOB_TIMESTAMP = sh returnStdout: true, script: 'date --utc --rfc-3339=seconds | sed -e "s#+00:00##"'
JOB_TIMESTAMP = JOB_TIMESTAMP.trim()
env.JOB_TIMESTAMP = sh(returnStdout: true, script: 'date --utc --rfc-3339=seconds | sed -e "s#+00:00##"').trim()
echo '\u2705 \u001B[32mVerify Parameters\u001B[0m'
def allParametersPresent = true
@@ -112,6 +110,23 @@ pipeline {
}
}
}
stage ("Local-Repo-Push") {
steps {
script {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
triggerSlaveJob ('RAN-Local-Repo-Push', 'Local-Repo-Push')
}
}
}
post {
failure {
script {
echo "Push to local repository KO"
failingStages += '\n * RAN-Local-Repo-Push'
}
}
}
}
// Build Stages are Mandatory
stage ("Image Building Processes") {
when { expression {doBuild} }
@@ -855,25 +870,22 @@ pipeline {
// ---- Slave Job functions
def triggerSlaveJob (jobName, gitlabStatusName) {
if ("MERGE".equals(env.gitlabActionType)) {
MR_NUMBER = env.gitlabMergeRequestIid
} else {
MR_NUMBER = 'develop'
}
def MR_NUMBER = "MERGE".equals(env.gitlabActionType) ? env.gitlabMergeRequestIid : 'develop'
// Workaround for the "cancelled" GitLab pipeline notification
// The slave job is triggered with the propagate false so the following commands are executed
// Its status is now PASS/SUCCESS from a stage pipeline point of view
// localStatus variable MUST be analyzed to properly assess the status
localStatus = build job: jobName,
def localStatus = build job: jobName,
parameters: [
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
string(name: 'SourceRepo', value: String.valueOf(env.gitlabSourceRepoHttpUrl)),
string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)),
string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)),
string(name: 'eNB_MR', value: String.valueOf(MR_NUMBER)),
booleanParam(name: 'eNB_mergeRequest', value: "MERGE".equals(env.gitlabActionType)),
string(name: 'eNB_TargetBranch', value: String.valueOf(env.gitlabTargetBranch))
], propagate: false
localResult = localStatus.getResult()
def localResult = localStatus.getResult()
echo "${jobName} Slave Job status is ${localResult}"
gitlabCommitStatus(name: gitlabStatusName) {
if (localStatus.resultIsBetterOrEqualTo('SUCCESS')) {
@@ -899,11 +911,11 @@ def triggerCN5GSlaveJob (jobName, gitlabStatusName) {
// The slave job is triggered with the propagate false so the following commands are executed
// Its status is now PASS/SUCCESS from a stage pipeline point of view
// localStatus variable MUST be analyzed to properly assess the status
localStatus = build job: jobName,
def localStatus = build job: jobName,
parameters: [
string(name: 'FULL_RAN_TAG', value: String.valueOf(fullRanTag))
], propagate: false
localResult = localStatus.getResult()
def localResult = localStatus.getResult()
echo "${jobName} Slave Job status is ${localResult}"
gitlabCommitStatus(name: gitlabStatusName) {
if (localStatus.resultIsBetterOrEqualTo('SUCCESS')) {
@@ -914,34 +926,6 @@ def triggerCN5GSlaveJob (jobName, gitlabStatusName) {
}
}
def triggerSlaveJobNoGitLab (jobName) {
if ("MERGE".equals(env.gitlabActionType)) {
MR_NUMBER = env.gitlabMergeRequestIid
} else {
MR_NUMBER = 'develop'
}
// Workaround for the "cancelled" GitLab pipeline notification
// The slave job is triggered with the propagate false so the following commands are executed
// Its status is now PASS/SUCCESS from a stage pipeline point of view
// localStatus variable MUST be analyzed to properly assess the status
localStatus = build job: jobName,
parameters: [
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)),
string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)),
string(name: 'eNB_MR', value: String.valueOf(MR_NUMBER)),
booleanParam(name: 'eNB_mergeRequest', value: "MERGE".equals(env.gitlabActionType)),
string(name: 'eNB_TargetBranch', value: String.valueOf(env.gitlabTargetBranch))
], propagate: false
localResult = localStatus.getResult()
echo "${jobName} Slave Job status is ${localResult}"
if (localStatus.resultIsBetterOrEqualTo('SUCCESS')) {
echo "${jobName} Slave Job is OK"
} else {
error "${jobName} Slave Job is KO"
}
}
def finalizeSlaveJob(jobName) {
lock ('Parent-Lock') {
// In case of any non-success, we are retrieving the HTML report of the last completed
@@ -957,7 +941,7 @@ def finalizeSlaveJob(jobName) {
filter: 'test_results*.html',
selector: lastCompleted())
if (fileExists(fileName)) {
sh "sed -i -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' ${fileName}"
sh "sed -i -e 's#TEMPLATE_BUILD_TIME#${env.JOB_TIMESTAMP}#' ${fileName}"
} else {
sh "echo \"could not copy results from ${jobName}, please check pipeline ${BUILD_URL}\" > ${fileName}"
}

View File

@@ -0,0 +1,103 @@
#!/bin/groovy
/*
* SPDX-License-Identifier: LicenseRef-CSSL-1.0
*/
// Location of the python executor node shall be in the same subnet as the others servers
def nodeExecutor = params.nodeExecutor
// SSH URL of the internal git repository
def internalRepoURL = params.internalRepoURL
// Name of the resource
def lockResources = []
if (params.LockResources != null && params.LockResources.trim().length() > 0)
params.LockResources.trim().split(",").each{lockResources += [resource: it.trim()]}
pipeline {
agent {
label nodeExecutor
}
options {
ansiColor('xterm')
lock(extra: lockResources)
}
stages {
stage('Verify parameters') {
steps {
script {
def missingParams = []
if (!params.SourceRepo?.trim()) { missingParams << 'SourceRepo' }
if (!params.eNB_Branch?.trim()) { missingParams << 'eNB_Branch' }
if (!params.eNB_CommitID?.trim()) { missingParams << 'eNB_CommitID' }
if (!params.eNB_TargetBranch?.trim()) { missingParams << 'eNB_TargetBranch' }
if (!params.eNB_Repository?.trim()) { missingParams << 'eNB_Repository' }
if (missingParams) {
error "Missing required parameters: ${missingParams.join(', ')}"
}
echo "Source Repo : ${params.SourceRepo}"
echo "Source Branch : ${params.eNB_Branch}"
echo "Source Commit : ${params.eNB_CommitID}"
echo "Target Branch : ${params.eNB_TargetBranch}"
echo "Target Repo : ${params.eNB_Repository}"
}
}
}
stage('Prepare workspace') {
steps {
sh """
git config user.email "jenkins@openairinterface.org"
git config user.name "OAI Jenkins"
git remote remove source || true
git remote remove internal-repo || true
"""
}
}
stage('Add source repo & fetch branches') {
steps {
sh """
git remote add source ${params.SourceRepo} || true
git fetch source ${params.eNB_Branch}
git fetch origin ${params.eNB_TargetBranch}
"""
}
}
stage('Create temporary branch for CI') {
steps {
script {
def shortCommit = params.eNB_CommitID.take(8)
env.NEW_BRANCH = "${params.eNB_Branch}-${shortCommit}"
echo "New branch: ${env.NEW_BRANCH}"
}
sh """
# Checkout source commit
git checkout -B ${env.NEW_BRANCH} ${params.eNB_CommitID}
"""
}
}
stage('Merge target into source') {
steps {
sh """
echo "Merging target branch ${params.eNB_TargetBranch} into source branch ${env.NEW_BRANCH}"
if ! git merge --ff origin/${params.eNB_TargetBranch} \
-m "Merge ${params.eNB_TargetBranch} into ${params.eNB_Branch} for CI"; then
echo "Merge conflicts detected. Aborting."
git merge --abort || true
exit 1
fi
"""
}
}
stage('Push merged branch to internal repository') {
steps {
sh """
git remote add internal-repo ${internalRepoURL} || true
echo "Pushing ${env.NEW_BRANCH} to internal repo"
git push --force internal-repo ${env.NEW_BRANCH}
"""
}
}
}
}

View File

@@ -483,10 +483,10 @@ class Containerize():
HTML.CreateHtmlTestRow('commit ' + tag, 'KO', CONST.ALL_PROCESSES_OK)
return False
def BuildRunTests(self, ctx, node, HTML):
def BuildRunTests(self, ctx, node, dockerfile, runtime_opt, ctest_opt, HTML):
lSourcePath = self.eNBSourceCodePath
logging.debug('Building on server: ' + node)
cmd = cls_cmd.RemoteCmd(node)
cmd = cls_cmd.getConnection(node)
cmd.cd(lSourcePath)
ret = cmd.run('hostnamectl')
@@ -513,9 +513,9 @@ class Containerize():
return False
# build ran-unittests image
dockerfile = "ci-scripts/docker/Dockerfile.unittest.ubuntu"
logfile = f'{lSourcePath}/cmake_targets/log/unittest-build.log'
ret = cmd.run(f'docker build --progress=plain --tag ran-unittests:{baseTag} --file {dockerfile} . &> {logfile}')
ret = cmd.run(f'docker build --progress=plain --tag ran-unittests:{baseTag} --file ci-scripts/{dockerfile} . &> {logfile}')
archiveArtifact(cmd, ctx, logfile)
if ret.returncode != 0:
logging.error(f'Cannot build unit tests')
@@ -528,7 +528,7 @@ class Containerize():
# I would like to run it with --rm and mount the ctest result directory to avoid 'docker cp'
# below, but then permissions are messed up and we can't remove the directory without sudo
# making the next pipeline fail
ret = cmd.run(f'docker run -a STDOUT --workdir /oai-ran/build/ --env LD_LIBRARY_PATH=/oai-ran/build/ --name ran-unittests ran-unittests:{baseTag} ctest --no-label-summary -j$(nproc)')
ret = cmd.run(f'docker run -a STDOUT {runtime_opt} --workdir /oai-ran/build/ --env LD_LIBRARY_PATH=/oai-ran/build/ --name ran-unittests ran-unittests:{baseTag} ctest --no-label-summary -j$(nproc) {ctest_opt}')
cmd.run('docker cp ran-unittests:/oai-ran/build/Testing/Temporary/LastTest.log .')
archiveArtifact(cmd, ctx, f'{lSourcePath}/LastTest.log')
cmd.run('docker cp ran-unittests:/oai-ran/build/Testing/Temporary/LastTestsFailed.log .')

View File

@@ -157,7 +157,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "f1";
local_n_address = "127.0.0.5";
@@ -171,7 +170,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 200;
pucch0_dtx_threshold = 150;

View File

@@ -162,7 +162,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "f1";
local_n_address = "192.168.71.171";
@@ -176,7 +175,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 200;
pucch0_dtx_threshold = 150;

View File

@@ -191,7 +191,6 @@ rlc = {
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "f1";
local_n_address = "127.0.0.5";
@@ -205,7 +204,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 200;
pucch0_dtx_threshold = 30;

View File

@@ -156,7 +156,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "f1";
local_n_address = "172.21.19.98";
@@ -171,7 +170,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 100;
pucch0_dtx_threshold = 10;

View File

@@ -156,7 +156,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "f1";
local_n_address = "172.21.19.99";
@@ -171,7 +170,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 100;
pucch0_dtx_threshold = 10;

View File

@@ -2,7 +2,6 @@
L1s = (
{
num_cc = 1;
tr_n_preference = "nfapi";
remote_n_address = "192.168.71.140"; // vnf addr
local_n_address = "192.168.71.141"; // pnf addr

View File

@@ -4,7 +4,6 @@ usrp-tx-thread-config = 1;
tune-offset = 30720000;
L1s = ({
num_cc = 1;
tr_n_preference = "nfapi";
remote_n_address = "127.0.0.1"; // vnf addr
local_n_address = "127.0.0.1"; // pnf addr

View File

@@ -173,14 +173,11 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "nfapi";
remote_s_address = "192.168.71.141"; // pnf addr [!]
local_s_address = "192.168.71.140"; // vnf addr
local_s_portc = 50001; // vnf p5 port
remote_s_portc = 50000; // pnf p5 port [!]
local_s_portd = 50011; // vnf p7 port [!]
remote_s_portd = 50010; // pnf p7 port [!]
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 150;
pucch_TargetSNRx10 = 200;

View File

@@ -175,14 +175,11 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "nfapi";
remote_s_address = "127.0.0.1"; // pnf addr [!]
local_s_address = "127.0.0.1"; // vnf addr
local_s_portc = 50001; // vnf p5 port
remote_s_portc = 50000; // pnf p5 port [!]
local_s_portd = 50011; // vnf p7 port [!]
remote_s_portd = 50010; // pnf p7 port [!]
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 300;

View File

@@ -180,13 +180,10 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
remote_s_address = "127.0.0.1"; // pnf addr [!]
local_s_address = "127.0.0.2"; // vnf addr
local_s_portc = 50001; // vnf p5 port
remote_s_portc = 50000; // pnf p5 port [!]
local_s_portd = 50011; // vnf p7 port [!]
remote_s_portd = 50010; // pnf p7 port [!]
tr_s_preference = "aerial";
tr_n_preference = "local_RRC";
pucch_RSSI_Threshold = -270;

View File

@@ -180,13 +180,10 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
remote_s_address = "127.0.0.1"; // pnf addr [!]
local_s_address = "127.0.0.2"; // vnf addr
local_s_portc = 50001; // vnf p5 port
remote_s_portc = 50000; // pnf p5 port [!]
local_s_portd = 50011; // vnf p7 port [!]
remote_s_portd = 50010; // pnf p7 port [!]
tr_s_preference = "aerial";
tr_n_preference = "local_RRC";
pucch_RSSI_Threshold = -270;

View File

@@ -179,13 +179,10 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
remote_s_address = "127.0.0.1"; // pnf addr [!]
local_s_address = "127.0.0.2"; // vnf addr
local_s_portc = 50001; // vnf p5 port
remote_s_portc = 50000; // pnf p5 port [!]
local_s_portd = 50011; // vnf p7 port [!]
remote_s_portd = 50010; // pnf p7 port [!]
tr_s_preference = "aerial";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 180; # 150;

View File

@@ -161,7 +161,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
}
@@ -169,7 +168,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
}

View File

@@ -173,7 +173,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 220;
@@ -184,7 +183,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120
pucch0_dtx_threshold = 80;

View File

@@ -173,7 +173,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
}
@@ -181,7 +180,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
}
);

View File

@@ -173,7 +173,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
}
@@ -181,7 +180,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
}
);

View File

@@ -170,13 +170,11 @@ gNBs =
);
MACRLCs = ({
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
});
L1s = ({
num_cc = 1;
tr_n_preference = "local_mac";
});

View File

@@ -172,13 +172,11 @@ gNBs =
);
MACRLCs = ({
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
});
L1s = ({
num_cc = 1;
tr_n_preference = "local_mac";
});

View File

@@ -180,7 +180,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
@@ -190,7 +189,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
}

View File

@@ -197,7 +197,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 150;
@@ -209,7 +208,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 150;
pucch0_dtx_threshold = 150;

View File

@@ -205,7 +205,6 @@ rlc = {
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 150;
@@ -217,7 +216,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 150;
pucch0_dtx_threshold = 150;

View File

@@ -172,7 +172,6 @@ gNBs =
);
MACRLCs = ({
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
@@ -185,7 +184,6 @@ MACRLCs = ({
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
#pucch0_dtx_threshold = 120;

View File

@@ -172,7 +172,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
ulsch_max_slots_inactivity = 100;
@@ -183,7 +182,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
pusch_proc_threads = 8;
prach_dtx_threshold = 200;

View File

@@ -178,7 +178,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 320;
@@ -192,7 +191,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
pusch_dtx_threshold = 20;

View File

@@ -174,7 +174,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
@@ -185,7 +184,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 130
pucch0_dtx_threshold = 80;

View File

@@ -171,7 +171,6 @@ gNBs = (
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 320;
@@ -185,7 +184,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
max_ldpc_iterations = 15;

View File

@@ -171,7 +171,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
@@ -182,7 +181,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
pucch0_dtx_threshold = 100;

View File

@@ -174,7 +174,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 150;
@@ -184,7 +183,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 150;
#pucch0_dtx_threshold = 150;

View File

@@ -176,7 +176,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
@@ -186,7 +185,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 200;
# pucch0_dtx_threshold = 150;

View File

@@ -166,7 +166,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
@@ -176,7 +175,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 200;
# pucch0_dtx_threshold = 150;

View File

@@ -174,7 +174,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 250;
@@ -184,7 +183,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
pucch0_dtx_threshold = 100;

View File

@@ -167,7 +167,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
@@ -197,7 +196,6 @@ prs_config = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
}

View File

@@ -143,16 +143,14 @@ gNBs:
MACRLCs:
- num_cc: 1
tr_s_preference: local_L1
- tr_s_preference: local_L1
tr_n_preference: local_RRC
pusch_TargetSNRx10: 200
pucch_TargetSNRx10: 200
stats_max_ue: 17
L1s:
- num_cc: 1
tr_n_preference: local_mac
- tr_n_preference: local_mac
prach_dtx_threshold: 200
# pucch0_dtx_threshold = 150;

View File

@@ -178,7 +178,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
@@ -189,7 +188,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 150;
pucch0_dtx_threshold = 30;

View File

@@ -146,15 +146,13 @@ gNBs:
MACRLCs:
- num_cc: 1
tr_s_preference: local_L1
- tr_s_preference: local_L1
tr_n_preference: local_RRC
pusch_TargetSNRx10: 200
pucch_TargetSNRx10: 200
L1s:
- num_cc: 1
tr_n_preference: local_mac
- tr_n_preference: local_mac
prach_dtx_threshold: 200
# pucch0_dtx_threshold = 150;

View File

@@ -169,7 +169,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 150;
@@ -179,7 +178,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
pusch_proc_threads = 8;
prach_dtx_threshold = 120;

View File

@@ -173,7 +173,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
}
@@ -181,7 +180,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
tx_amp_backoff_dB = 30;

View File

@@ -177,7 +177,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
@@ -187,7 +186,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
pucch0_dtx_threshold = 50;

View File

@@ -179,7 +179,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
@@ -190,7 +189,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
pucch0_dtx_threshold = 50;

View File

@@ -168,7 +168,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
@@ -179,7 +178,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
pucch0_dtx_threshold = 100;

View File

@@ -19,7 +19,6 @@ pdu_sessions = ({ dnn = "oai"; nssai_sst = 1; });
MACRLCs = (
{
num_cc = 1;
tr_n_preference = "nfapi";
remote_n_address = "127.0.0.1"; //Proxy IP
local_n_address = "127.0.0.1";

View File

@@ -11,7 +11,7 @@ uicc0:
thread-pool: "-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1"
channelmod:
max_chan: 10;
max_chan: 10
modellist: DefaultChannelList
DefaultChannelList:
- model_name: client_tx_channel_model

View File

@@ -203,9 +203,7 @@ MACRLCs = (
remote_s_address = "127.0.0.1";
local_s_address = "127.0.0.1";
local_s_portc = 50001;
remote_s_portc = 50000;
local_s_portd = 50011;
remote_s_portd = 50010;
tr_s_preference = "nfapi";
tr_n_preference = "local_RRC";
scheduler_mode = "fairRR";

View File

@@ -189,9 +189,7 @@ MACRLCs = (
remote_s_address = "127.0.0.1"; // pnf addr [!]
local_s_address = "127.0.0.2"; // vnf addr
local_s_portc = 50601; // vnf p5 port
remote_s_portc = 50600; // pnf p5 port [!]
local_s_portd = 50611; // vnf p7 port [!]
remote_s_portd = 50610; // pnf p7 port [!]
tr_s_preference = "nfapi";
tr_n_preference = "local_RRC";
}

View File

@@ -177,9 +177,7 @@ MACRLCs = (
remote_s_address = "127.0.0.1"; // pnf addr [!]
local_s_address = "127.0.0.2"; // vnf addr
local_s_portc = 50601; // vnf p5 port
remote_s_portc = 50600; // pnf p5 port [!]
local_s_portd = 50611; // vnf p7 port [!]
remote_s_portd = 50610; // pnf p7 port [!]
tr_s_preference = "nfapi";
tr_n_preference = "local_RRC";
}

View File

@@ -188,7 +188,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
@@ -198,7 +197,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
pucch0_dtx_threshold = 150;

View File

@@ -184,7 +184,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
@@ -194,7 +193,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
}

View File

@@ -192,7 +192,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
@@ -202,7 +201,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 200;
# pucch0_dtx_threshold = 150;

View File

@@ -179,7 +179,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
@@ -189,7 +188,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
}

View File

@@ -183,7 +183,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
@@ -193,7 +192,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
}
);

View File

@@ -184,7 +184,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
}
@@ -192,7 +191,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
pucch0_dtx_threshold = 80;

View File

@@ -172,7 +172,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
ulsch_max_slots_inactivity = 100;
@@ -183,7 +182,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
pusch_proc_threads = 8;
prach_dtx_threshold = 200;

View File

@@ -175,7 +175,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 220;
@@ -185,7 +184,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 150;
# pucch0_dtx_threshold = 150;

View File

@@ -188,7 +188,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 220;
@@ -198,7 +197,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 150;
# pucch0_dtx_threshold = 150;

View File

@@ -189,7 +189,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
# pusch_TargetSNRx10 = 200;
@@ -199,7 +198,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
# pucch0_dtx_threshold = 150;

View File

@@ -167,7 +167,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
@@ -178,7 +177,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
pucch0_dtx_threshold = 100;

View File

@@ -31,4 +31,4 @@ RUN cmake -GNinja -DENABLE_PHYSIM_TESTS=ON -DENABLE_TESTS=ON \
-DUSE_ATS_MEMORY=OFF \
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/oai-ran/cmake_targets/ran_build/build \
.. && \
ninja test_channel_scalability test_multipath test_noise
ninja test_channel_scalability

View File

@@ -0,0 +1,25 @@
# SPDX-License-Identifier: MIT
FROM nvidia/cuda:12.9.1-devel-ubuntu22.04 AS cuda-image
FROM ran-base:develop AS ran-tests
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
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
libgtest-dev \
libyaml-cpp-dev
RUN rm -Rf /oai-ran
WORKDIR /oai-ran
COPY . .
WORKDIR /oai-ran/build
RUN cmake -GNinja -DENABLE_TESTS=ON -DCUDA_ENABLE=ON .. && ninja tests

View File

@@ -70,6 +70,9 @@ def ExecuteActionWithParam(action, ctx, node):
RAN.Build_eNB_args=test.findtext('Build_eNB_args')
CONTAINERS.imageKind=test.findtext('kind')
proxy_commit = test.findtext('proxy_commit')
dockerfile = test.findtext('dockerfile') or ''
runtime_opt = test.findtext('runtime-opt') or ''
ctest_opt = test.findtext('ctest-opt') or ''
if proxy_commit is not None:
CONTAINERS.proxyCommit = proxy_commit
if action == 'Build_eNB':
@@ -81,7 +84,7 @@ def ExecuteActionWithParam(action, ctx, node):
elif action == 'Build_Cluster_Image':
success = CLUSTER.BuildClusterImage(ctx, node, HTML)
elif action == 'Build_Run_Tests':
success = CONTAINERS.BuildRunTests(ctx, node, HTML)
success = CONTAINERS.BuildRunTests(ctx, node, dockerfile, runtime_opt, ctest_opt, HTML)
elif action == 'Initialize_eNB':
RAN.Initialize_eNB_args=test.findtext('Initialize_eNB_args')

View File

@@ -0,0 +1,23 @@
<!-- SPDX-License-Identifier: LicenseRef-CSSL-1.0 -->
<testCaseList>
<htmlTabRef>build-run-test-gh-tab</htmlTabRef>
<htmlTabName>Build and Run Unit Tests with CUDA</htmlTabName>
<htmlTabIcon>wrench</htmlTabIcon>
<testCase>
<class>Create_Workspace</class>
<desc>Create new Workspace</desc>
<node>localhost</node>
</testCase>
<testCase>
<class>Build_Run_Tests</class>
<desc>Build and Run UnitTests</desc>
<dockerfile>docker/Dockerfile.unittest.cuda.ubuntu</dockerfile>
<runtime-opt>--gpus all</runtime-opt>
<ctest-opt>-L cuda</ctest-opt>
<node>localhost</node>
</testCase>
</testCaseList>

View File

@@ -8,6 +8,7 @@
<testCase>
<class>Build_Run_Tests</class>
<desc>Build and Run UnitTests</desc>
<dockerfile>docker/Dockerfile.unittest.ubuntu</dockerfile>
<node>obelix</node>
</testCase>

View File

@@ -236,7 +236,7 @@ cuphydriver_config:
pusch_ldpc_algo_index: 0
pusch_ldpc_flags: 2
pusch_ldpc_use_half: 1
pusch_nMaxPrb: 273
pusch_nMaxPrb: 78
pusch_nMaxRx: 4
ul_gain_calibration: 78.68
lower_guard_bw: 845

View File

@@ -80,6 +80,8 @@ add_boolean_option(NAS_BUILT_IN_UE False "UE NAS layer present in this
# SECU LIB
################################################################################
set(secu_cn_SRC
${OPENAIR3_DIR}/SECU/curve_25519.c
${OPENAIR3_DIR}/SECU/x963_kdf.c
${OPENAIR3_DIR}/SECU/aes_128_ctr.c
${OPENAIR3_DIR}/SECU/aes_128_cbc_cmac.c
${OPENAIR3_DIR}/SECU/sha_256_hmac.c

View File

@@ -286,7 +286,7 @@ function main() {
SIMUS_PHY=1
CMAKE_CMD="$CMAKE_CMD -DENABLE_PHYSIM_TESTS=ON"
# TODO: fix: dlsim_tm4 pucchsim prachsim pdcchsim pbchsim mbmssim
TARGET_LIST="$TARGET_LIST dlsim ulsim ldpctest polartest smallblocktest nr_pbchsim nr_dlschsim nr_ulschsim nr_dlsim nr_ulsim nr_pucchsim nr_prachsim nr_psbchsim nr_srssim"
TARGET_LIST="$TARGET_LIST dlsim ulsim ldpctest polartest smallblocktest nr_pbchsim nr_dlschsim nr_ulschsim nr_dlsim nr_ulsim nr_pucchsim nr_prachsim nr_psbchsim nr_srssim nr_csirssim"
echo_info "Will compile dlsim, ulsim, ..."
shift;;
-V | --vcd)

View File

@@ -25,6 +25,9 @@
#define NR_NB_SC_PER_RB 12
#define NR_MAX_NUM_LCID 32
#define NR_MAX_NUM_QFI 64
#define MAX_NUM_NR_DLSCH_SEGMENTS_PER_LAYER 36
#define MAX_NUM_NR_ULSCH_SEGMENTS_PER_LAYER 34
#define NR_MAX_SLOTS_PER_FRAME 160
#define RNTI_NAMES /* see 38.321 Table 7.1-2 RNTI usage */ \
R(TYPE_C_RNTI_) /* Cell RNTI */ \
R(TYPE_CS_RNTI_) /* Configured Scheduling RNTI */ \
@@ -41,6 +44,11 @@
R(TYPE_TPC_SRS_RNTI_) \
R(TYPE_MCS_C_RNTI_)
/* FFS_NR_TODO it defines ue capability which is the number of slots */
/* - between reception of pdsch and transmission of its acknowlegment (k1) */
/* - between reception of un uplink grant and its related transmission (k2) */
#define NR_UE_CAPABILITY_SLOT_RX_TO_TX (3)
#define R(k) k ,
typedef enum { RNTI_NAMES } nr_rnti_type_t;
#undef R

View File

@@ -2,9 +2,7 @@
* SPDX-License-Identifier: LicenseRef-CSSL-1.0
*/
#include "openair2/COMMON/phy_messages_def.h"
#include "openair2/COMMON/mac_messages_def.h"
#include "openair2/COMMON/rlc_messages_def.h"
#include "openair2/COMMON/pdcp_messages_def.h"
#include "openair2/COMMON/rrc_messages_def.h"
#include "openair2/COMMON/nas_messages_def.h"
@@ -13,7 +11,6 @@
#include "openair2/COMMON/m2ap_messages_def.h"
#include "openair2/COMMON/m3ap_messages_def.h"
#include "openair2/COMMON/sctp_messages_def.h"
#include "openair2/COMMON/udp_messages_def.h"
#include "openair2/COMMON/gtpv1_u_messages_def.h"
#include "openair2/COMMON/f1ap_messages_def.h"
#include "openair2/COMMON/e1ap_messages_def.h"

View File

@@ -53,9 +53,7 @@ typedef struct IttiMsgText_s {
char text[];
} IttiMsgText;
#include <openair2/COMMON/phy_messages_types.h>
#include <openair2/COMMON/mac_messages_types.h>
#include <openair2/COMMON/rlc_messages_types.h>
#include <openair2/COMMON/pdcp_messages_types.h>
#include <openair2/COMMON/networkDef.h>
#include <openair2/COMMON/as_message.h>
@@ -208,7 +206,6 @@ typedef struct IttiMsgText_s {
#include <openair2/COMMON/m2ap_messages_types.h>
#include <openair2/COMMON/m3ap_messages_types.h>
#include <openair2/COMMON/sctp_messages_types.h>
#include <openair2/COMMON/udp_messages_types.h>
#include <openair2/COMMON/gtpv1_u_messages_types.h>
#include <openair2/COMMON/ngap_messages_types.h>
#include <openair2/COMMON/nrppa_messages_types.h>
@@ -262,18 +259,14 @@ typedef struct {
TASK_DEF(TASK_UNKNOWN, 50) \
TASK_DEF(TASK_TIMER, 10) \
TASK_DEF(TASK_L2L1, 200) \
TASK_DEF(TASK_BM, 200) \
TASK_DEF(TASK_PHY_ENB, 200) \
TASK_DEF(TASK_MAC_GNB, 200) \
TASK_DEF(TASK_RLC_ENB, 200) \
TASK_DEF(TASK_RRC_ENB_NB_IoT, 200) \
TASK_DEF(TASK_PDCP_ENB, 200) \
TASK_DEF(TASK_PDCP_GNB, 200) \
TASK_DEF(TASK_DATA_FORWARDING, 200) \
TASK_DEF(TASK_END_MARKER, 200) \
TASK_DEF(TASK_RRC_ENB, 200) \
TASK_DEF(TASK_RRC_GNB, 200) \
TASK_DEF(TASK_RAL_ENB, 200) \
TASK_DEF(TASK_S1AP, 200) \
TASK_DEF(TASK_NGAP, 200) \
TASK_DEF(TASK_NRPPA, 200) \
@@ -288,14 +281,12 @@ typedef struct {
TASK_DEF(TASK_GNB_APP, 200) \
TASK_DEF(TASK_MCE_APP, 200) \
TASK_DEF(TASK_MME_APP, 200) \
TASK_DEF(TASK_PHY_UE, 200) \
TASK_DEF(TASK_MAC_UE, 200) \
TASK_DEF(TASK_RLC_UE, 200) \
TASK_DEF(TASK_PDCP_UE, 200) \
TASK_DEF(TASK_RRC_UE, 200) \
TASK_DEF(TASK_RRC_NRUE, 200) \
TASK_DEF(TASK_NAS_UE, 200) \
TASK_DEF(TASK_RAL_UE, 200) \
TASK_DEF(TASK_GTPV1_U, 1000) \
TASK_DEF(TASK_CU_F1, 200) \
TASK_DEF(TASK_DU_F1, 200) \

View File

@@ -33,6 +33,8 @@ typedef struct ShmTDIQChannel_s {
char name[256];
sample_t *tx_iq_data;
sample_t *rx_iq_data;
int nb_tx_ant;
int nb_rx_ant;
bool abort;
} ShmTDIQChannel;
@@ -61,6 +63,8 @@ ShmTDIQChannel *shm_td_iq_channel_create(const char *name, int num_tx_ant, int n
strncpy(channel->name, name, sizeof(channel->name) - 1);
channel->tx_iq_data = (sample_t *)(shm_ptr + 1);
channel->rx_iq_data = channel->tx_iq_data + tx_buffer_size / sizeof(sample_t);
channel->nb_tx_ant = num_tx_ant;
channel->nb_rx_ant = num_rx_ant;
channel->data = shm_ptr;
channel->type = IQ_CHANNEL_TYPE_SERVER;
pthread_mutexattr_t mutex_attr;
@@ -113,9 +117,15 @@ ShmTDIQChannel *shm_td_iq_channel_connect(const char *name, int timeout_in_secon
ShmTDIQChannel *channel = calloc_or_fail(1, sizeof(ShmTDIQChannel));
channel->data = shm_ptr;
channel->tx_iq_data = (sample_t *)(shm_ptr + 1);
sample_t *tx_buffer = (sample_t *)(shm_ptr + 1);
size_t tx_buffer_size = CIRCULAR_BUFFER_SIZE * sizeof(sample_t) * channel->data->num_antennas_tx;
channel->rx_iq_data = channel->tx_iq_data + tx_buffer_size / sizeof(sample_t);
sample_t *rx_buffer = tx_buffer + tx_buffer_size / sizeof(sample_t);
// Flip the order between TX and RX to simplify tx/rx functions
channel->tx_iq_data = rx_buffer;
channel->rx_iq_data = tx_buffer;
channel->nb_tx_ant = channel->data->num_antennas_rx;
channel->nb_rx_ant = channel->data->num_antennas_tx;
printf("\033[38;5;208mnb_tx_ant, nb_rx_ant: %d, %d\n\033[0m", channel->nb_tx_ant, channel->nb_rx_ant);
channel->type = IQ_CHANNEL_TYPE_CLIENT;
while (shm_ptr->magic != SHM_MAGIC_NUMBER) {
printf("Waiting for server to initialize shared memory\n");
@@ -131,6 +141,7 @@ IQChannelErrorType shm_td_iq_channel_tx(ShmTDIQChannel *channel,
int antenna,
const sample_t *tx_iq_data)
{
AssertFatal(antenna < channel->nb_tx_ant, "Invalid antenna index %d num_antennas %d\n", antenna, channel->nb_tx_ant);
ShmTDIQChannelData *data = channel->data;
// timestamp in the past
uint64_t current_time = data->timestamp;
@@ -142,12 +153,7 @@ IQChannelErrorType shm_td_iq_channel_tx(ShmTDIQChannel *channel,
return CHANNEL_ERROR_TOO_EARLY;
}
sample_t *base_ptr;
if (channel->type == IQ_CHANNEL_TYPE_CLIENT) {
base_ptr = channel->rx_iq_data + antenna * CIRCULAR_BUFFER_SIZE;
} else {
base_ptr = channel->tx_iq_data + antenna * CIRCULAR_BUFFER_SIZE;
}
sample_t *base_ptr = channel->tx_iq_data + antenna * CIRCULAR_BUFFER_SIZE;
uint64_t first_sample = timestamp % CIRCULAR_BUFFER_SIZE;
uint64_t last_sample = first_sample + num_samples - 1;
@@ -167,6 +173,7 @@ IQChannelErrorType shm_td_iq_channel_rx(ShmTDIQChannel *channel,
int antenna,
sample_t *tx_iq_data)
{
AssertFatal(antenna < channel->nb_rx_ant, "Invalid antenna index %d num_antennas %d\n", antenna, channel->nb_rx_ant);
ShmTDIQChannelData *data = channel->data;
// timestamp in the future
uint64_t current_time = data->timestamp;
@@ -178,12 +185,7 @@ IQChannelErrorType shm_td_iq_channel_rx(ShmTDIQChannel *channel,
return CHANNEL_ERROR_TOO_LATE;
}
sample_t *base_ptr;
if (channel->type == IQ_CHANNEL_TYPE_CLIENT) {
base_ptr = channel->tx_iq_data + antenna * CIRCULAR_BUFFER_SIZE;
} else {
base_ptr = channel->rx_iq_data + antenna * CIRCULAR_BUFFER_SIZE;
}
sample_t *base_ptr = channel->rx_iq_data + antenna * CIRCULAR_BUFFER_SIZE;
uint64_t first_sample = timestamp % CIRCULAR_BUFFER_SIZE;
uint64_t last_sample = first_sample + num_samples - 1;

View File

@@ -3,8 +3,7 @@
*/
#include <common/utils/simple_executable.h>
#include "thread-pool.h"
#include "notified_fifo.h"
#define SEP "\t"

View File

@@ -94,6 +94,51 @@ char *itoa(int i) {
return strdup(buffer);
}
/****************************************************************************
** **
** Name: digit_string_to_bcd_value() **
** **
** Description: Converts a decimal ASCII coded string into its BCD encoded**
** value. **
** **
** Inputs: bcd_value: Output buffer **
** digit_string: Input digit string **
** size: Size of bcd_value in bytes **
** **
** Outputs: bcd_value: Converted BCD value **
** Return: 0 on success, -1 on error **
** **
***************************************************************************/
int digit_string_to_bcd_value(uint8_t *bcd_value, const char *digit_string, int size)
{
int i;
uint8_t len = strlen(digit_string);
/* Accept even (size*2) or odd (size*2 - 1) digit counts */
if (len < size * 2 - 1 || len > size * 2) {
fprintf(stderr, "the string '%s' should be of length %d or %d\n", digit_string, size * 2 - 1, size * 2);
return -1;
}
for (i = 0; i < size; i++) {
uint8_t low = digit_string[2 * i] - '0';
uint8_t high = (2 * i + 1 < len) ? digit_string[2 * i + 1] - '0' : 0xF;
if (low > 9 || (high > 9 && high != 0xF))
goto error;
bcd_value[i] = (high << 4) | low;
}
return 0;
error:
fprintf(stderr, "the string '%s' is not a valid digit string\n", digit_string);
for (i = 0; i < size; i++)
bcd_value[i] = 0;
return -1;
}
/**
* @brief Convert a version string x.y.z into numbers.
*

View File

@@ -123,6 +123,8 @@ static inline void *malloc_or_fail(size_t size)
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);
// Converts a decimal ASCII coded string into its BCD encoded value.
int digit_string_to_bcd_value(uint8_t *bcd_value, const char *digit_string, int size);
/* Map task id to printable name. */
typedef struct {

View File

@@ -78,18 +78,22 @@ The simulation reads values from a named section in the config file.
**Config options in the `uicc` section**:
| Parameter | Description | Default value |
|---------------|-----------------------------------|--------------------------------------------|
| `imsi` | User IMSI | `2089900007487` |
| `nmc_size` | Number of digits in NMC | `2` |
| `key` | Subscription key (Ki) | `fec86ba6eb707ed08905757b1bb44b8f` |
| `opc` | OPc value | `c42449363bbad02b66d16bc975d77cc1` |
| `amf` | AMF value | `8000` |
| `sqn` | Sequence number | `000000` |
| `dnn` | Default DNN (APN) | `oai` |
| `nssai_sst` | NSSAI slice/service type | `1` |
| `nssai_sd` | NSSAI slice differentiator | `0xffffff` |
| `imeisv` | IMEISV string | `6754567890123413` |
| Parameter | Description | Default value |
|------------------------------|-----------------------------------|--------------------------------------------------------------------|
| `imsi` | User IMSI | `2089900007487` |
| `nmc_size` | Number of digits in NMC | `2` |
| `key` | Subscription key (Ki) | `fec86ba6eb707ed08905757b1bb44b8f` |
| `opc` | OPc value | `c42449363bbad02b66d16bc975d77cc1` |
| `amf` | AMF value | `8000` |
| `sqn` | Sequence number | `000000` |
| `dnn` | Default DNN (APN) | `oai` |
| `nssai_sst` | NSSAI slice/service type | `1` |
| `nssai_sd` | NSSAI slice differentiator | `0xffffff` |
| `imeisv` | IMEISV string | `6754567890123413` |
| `routing_indicator` | Routing Indicator | `0000` |
| `protection_scheme` | SUCI Profile Scheme | `0` |
| `home_network_public_key_id` | Home Network Public Key ID | `1` |
| `home_network_public_key` | Home Network Public Key | `5a8d38864820197c3394b92613b20b91633cbd897119273bf8e4a6f4eec0a650` |
These are parsed and stored in the `uicc_t` structure.
@@ -116,3 +120,37 @@ The **IMEISV**, is encoded using the `fill_imeisv()` helper. This function extra
See TS 24.501 §4.4 for reference.
#### SUCI (Subscription Concealed Identifier)
The **SUCI**, is generated using the `fill_suci()` helper. This function extracts the MCC, MNC, and MSIN from the configured `imsi` with the use of `nmc_size` in the UICC context and populates the mobile identity structure.
Contains:
* MCC and MNC (public network identity)
* Routing Indicator
* Protection Scheme ID
* Home Network Public Key ID
* Concealed or clear MSIN depending on the protection scheme
If the UE is unable to generate SUCI due to configuration or crypto limitations, the UE will fail to generate a `Registration Request`.
###### 0. Null Scheme (TS 33.501 §C.2)
MSIN in cleartext.
###### 1. Profile A (TS 33.501 §C.3.4.1)
MSIN is concealed using elliptic curve cryptography.
Based on:
* Curve25519 for key agreement
* X9.63 KDF for key derivation
(requires OpenSSL ≥ 3.0)
###### 2. Profile B (TS 33.501 §C.3.4.2)
MSIN is concealed using elliptic curve cryptography.
Based on:
* P-256 for key agreement
* X9.63 KDF for key derivation
(currently not supported)

View File

@@ -2,9 +2,9 @@
# OAI Build Procedures
[[_TOC_]]
This page describes how to build OAI.
This page is valid on tags starting from **`2019.w09`**.
[[_TOC_]]
## Overview
@@ -12,7 +12,11 @@ The [OAI EPC](https://github.com/OPENAIRINTERFACE/openair-epc-fed/blob/master/do
OAI softmodem sources, which aim to implement 3GPP compliant UEs, eNodeB and gNodeB can be downloaded from the Eurecom [gitlab repository](./GET_SOURCES.md).
Sources come with a build script [build_oai](../cmake_targets/build_oai) located at the root of the `openairinterface5g/cmake_targets` directory. This script is developed to build the oai binaries (executables,shared libraries) for different hardware platforms, and use cases.
The historically convential way to build OAI is
[build_oai](../cmake_targets/build_oai) located at the root of the
`openairinterface5g/cmake_targets` directory. This script is developed to build
the oai binaries (executables,shared libraries) for different hardware
platforms, and use cases, and is a wrapper on top of `cmake`.
The main oai binaries, which are tested by the Continuous Integration process are:
@@ -39,6 +43,81 @@ The oai softmodem supports many use cases, and new ones are regularly added. Mos
- s1, noS1
- all simulators as the rfsimulator, the L2 simulator, with exception of PHY simulators, which are distinct executables.
## Dependencies
TODO.
## Running `cmake` directly
As mentioned, `build_oai` is a wrapper on top of `cmake`. It is therefore
possible, and now recommended, to run `cmake` directly. To build all of OAI in
a default install:
```
cd openairinterface5g
mkdir build
cd build
cmake .. -GNinja
ninja
```
Alternatively, let cmake generate the directory:
```
cd openairinterface5g
cmake -B build -G Ninja
cmake --build build
```
To build additional libraries, e.g., telnetsrv, do the following:
```bash
cmake .. -GNinja -DENABLE_TELNETSRV=ON
ninja telnetsrv
```
A list of all libraries can be seen using `ccmake ..` or `cmake-gui ..`.
The default target directory of `build_oai` is the following, for historical
reasons:
```bash
cd openairinterface5g/cmake_targets/ran_build/build
cmake ../../.. -GNinja
ccmake ../../..
cmake-gui ../../..
```
You can of course use all standard cmake/ninja/make commands in this directory,
assuming you already build with `build_oai`. For instance, to compile sources
after modifying the code, do
```
cd cmake_targets/ran_build/build
ninja
```
### cmake presets
CMake presets are common project configure options. See [here](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html).
Configure presets:
- `default`: Configure compilation with default options
- `tests`: Same as above but `ENABLE_TESTS` and `SANITIZE_ADDRESS` is ON
Build presets:
- `5gdefault`: Build the software for NR rfsimulator test
- `default`: same as 5gdefault
- `4gdefault`: Build the software for LTE rfsimulator test
- `tests`: build all unit tests
To configure using configuration preset:
cmake --preset <preset_name>
To build using a build preset:
cmake --build --preset <preset_name>
## Running `build_oai`
### List of options
@@ -176,60 +255,6 @@ Some libraries have further dependencies and might not build on every system:
- `websrv`: npm and others
- `ldpc_aal`: DPDK with patch
## Running `cmake` directly
`build_oai` is a wrapper on top of `cmake`. It is therefore possible to run `cmake` directly. An example using `ninja`: to build all "main targets" for 5G, excluding additional libraries:
```
cd openairinterface5g
mkdir build && cd build
cmake .. -GNinja && ninja nr-softmodem nr-uesoftmodem nr-cuup params_libconfig coding rfsimulator ldpc
```
To build additional libraries, e.g., telnetsrv, do the following:
```bash
cmake .. -GNinja -DENABLE_TELNETSRV=ON && ninja telnetsrv
```
A list of all libraries can be seen using `ccmake ..` or `cmake-gui ..`.
It is currently not possible to build all targets in the form of `cmake ..
-GNinja && ninja`: currently, SDRs are always exposed, even if you don't have
the dependencies, and some targets are simply broken. Again, `build_oai` list
all targets that it builds, and you can use them with `ninja`
The default target directory of `build_oai` is the following, for historical reasons:
```bash
cd openairinterface5g/cmake_targets/ran_build/build
cmake ../../.. -GNinja
ccmake ../../..
cmake-gui ../../..
```
You can of course use all standard cmake/ninja/make commands in this directory.
### cmake presets
CMake presets are common project configure options. See [here](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html).
Configure presets:
- `default`: Configure compilation with default options
- `tests`: Same as above but ENABLE_TESTS and SANITIZE_ADDRESS is ON
Build presets:
- `5gdefault`: Build the software for NR rfsimulator test
- `default`: same as 5gdefault
- `4gdefault`: Build the software for LTE rfsimulator test
- `tests`: build all unit tests
To configure using configuration preset:
cmake --preset <preset_name>
To build using a build preset:
cmake --build --preset <preset_name>
## Cross Compile
If you want to use cross-compiler on x86 platform for aarch64 version, please refer the [cross-compile.md](./cross-compile.md) for more information.

View File

@@ -1066,6 +1066,8 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NGAP/ngap_gNB_overload.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/NGAP/ngap_gNB_default_values.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/SECU/secu_defs.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/SECU/curve_25519.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/SECU/x963_kdf.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/SECU/sha_256_hmac.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/SECU/nas_stream_eea0.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/SECU/aes_128_ecb.h \
@@ -1088,6 +1090,8 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/SECU/aes_128_ctr.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/SECU/nas_stream_eia2.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/SECU/snow3g.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/SECU/curve_25519.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/SECU/x963_kdf.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/SECU/sha_256_hmac.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/SECU/aes_128_cbc_cmac.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair3/SECU/nas_stream_eia1.c \
@@ -1797,34 +1801,27 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/pdcp_messages_def.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/mac_rrc_primitives.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/ngap_messages_def.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/rlc_messages_def.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/m3ap_messages_def.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/sctp_messages_def.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/x2ap_messages_types.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/commonDef.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/udp_messages_def.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/nas_messages_types.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/sctp_messages_types.h \
@CMAKE_CURRENT_SOURCE_DIR@/../common/platform_types.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/ngap_messages_types.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/gtpv1_u_messages_types.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/rlc_messages_types.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/e1ap_messages_def.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/phy_messages_def.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/s1ap_messages_types.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/networkDef.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/f1ap_messages_types.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/mac_messages_types.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/udp_messages_types.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/gtpv1_u_messages_def.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/s1ap_messages_def.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/rrc_messages_types.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/e1ap_messages_types.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/m3ap_messages_types.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/phy_messages_types.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/x2ap_messages_def.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/mac_messages_def.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/openair_defs.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/as_message.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/nas_messages_def.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/COMMON/pdcp_messages_types.h \

View File

@@ -305,7 +305,6 @@ Example configuration snippet:
...
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 180;
@@ -322,7 +321,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
pucch0_dtx_threshold = 100;

View File

@@ -201,7 +201,7 @@ With devices like the USRP N300 and especially the X300, there is noise in the D
There are two possible solution that can be enabled in OAI:
* `--tune-offset`: it consists in shifting away the operational bandwidth to avoid the center frequency
* `ul_prbblacklist`: can be used to define specific PRBs that should not be used for uplink scheduling
* `gNBs.[0].ul_prbblacklist`: can be used to define specific PRBs that should not be used for uplink scheduling
A spectrum clean from the noisy PRBs will eventually result in an enhanced UL throughput.

View File

@@ -179,39 +179,23 @@ uicc0 = {
}
```
| **Parameter** | **Description** | **Default Value** |
|---------------|-----------------|-------------------|
| **IMSI** | Unique identifier for the UE within the mobile network. Used by the network to identify the UE during authentication. It ensures that the UE is correctly identified by the network. | 001010000000001 |
| **key** | Cryptographic key shared between the UE and the network, used for encryption during the authentication process. | `fec86ba6eb707ed08905757b1bb44b8f` |
| **OPC** | Operator key for the Milenage Authentication and Key Agreement algorithm used for encryption during the authentication process. | Ensures secure communication between the UE and the network by matching the encryption keys. | `C42449363BBAD02B66D16BC975D77CC1` |
| **DNN** | _Deprecated_: Specifies the name of the data network the UE wishes to connect to, similar to an APN in 4G networks. | `oai` |
| **NSSAI** | _Deprecated_: Allows the UE to select the appropriate network slice, which provides different QoS. | `1` |
| **pdu_sessions** | list of PDU sessions to request | empty array (no PDU session) |
Further information about the meaning of these parameters is described in the
[dedicated nrUE configuration page](./runmodem-nrue.md).
Note that DNN and NSSAI parameters are deprecated, and `pdu_sessions` should be
used. If the `pdu_sessions` array is present, DNN and NSSAI are ignored.
Each element within the `pdu_sessions` array takes the following parameters.
Multiple PDU sessions can be requested.
| **Parameter** | **Description** | **Default Value** |
|---------------|-----------------|-------------------|
| `id` | ID of the PDU session to request | index of the current element (1..16) |
| `type` | Type of the PDU session to request (allowed: `IPv4`, `IPv6`, `IPv4v6`, `Ethernet` | `IPv4` |
| `dnn` | Specifies the name of the data network the UE wishes to connect to | `oai` |
| `nssai_sst` | Slice Service Type to request (1=eMBB, 2=URLLC, 3=mMTC) | `1` |
| `nssai_sd` | Slice Differentiator to request | `0xffffff` (meaning "no SD") |
The UE configuration must match the one of the network's AMF. The nrUE can connect by default to OAI CN5G with no need to provide the configuration file.
When running the `nr-uesoftmodem`, one can specify the nrUE configuration file using the `-O` option. E.g.:
The UE configuration must match the one of the network's AMF. When running the
`nr-uesoftmodem`, one can specify the nrUE configuration file using the `-O`
option. E.g.:
```bash
sudo ./nr-uesoftmodem --rfsim --rfsimulator.[0].serveraddr 127.0.0.1 -r 106 --numerology 1 --band 78 -C 3619200000 -O ~/nrue.uicc.conf
```
The CL option `--uicc0.imsi` can override the IMSI value in the configuration file if necessary (e.g. when running multiple UEs): `--uicc0.imsi 001010000000001`.
More details available at [ci-scripts/yaml_files/5g_rfsimulator/README.md](../ci-scripts/yaml_files/5g_rfsimulator/README.md).
The command line option `--uicc0.imsi` can override the IMSI value in the
configuration file if necessary (e.g. when running multiple UEs): `--uicc0.imsi
001010000000001`.
More details can also be found at
[ci-scripts/yaml_files/5g_rfsimulator/README.md](../ci-scripts/yaml_files/5g_rfsimulator/README.md).
**Note:** From tag `2024.w45`, OAI nrUE runs by default in standalone (SA) mode.
In earlier versions the default mode was non-standalone (NSA).

View File

@@ -378,7 +378,7 @@ Download ORAN FHI DU library, checkout the correct version, and apply the correc
#### F release
```bash
git clone https://gerrit.o-ran-sc.org/r/o-du/phy.git ~/phy
git clone https://github.com/openairinterface/o-du-phy.git ~/phy
cd ~/phy
git checkout oran_f_release_v1.0
git apply ~/openairinterface5g/cmake_targets/tools/oran_fhi_integration_patches/F/oaioran_F.patch

View File

@@ -18,10 +18,6 @@ Beware if you previously pulled the `develop` branch that your repository may be
- [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
@@ -34,20 +30,21 @@ There is some general information in the [OpenAirInterface Gitlab Wiki](https://
* [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
- [RUNMODEM.md](./RUNMODEM.md): Information on how to run the gNB
* 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
- [nrUE-specific configuration and modes](./runmodem-nrue.md)
* Specific OAI modes (phy-test, do-ra, noS1)
- [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 run an NTN setup](./ntn-configuration.md)
- [How to use GPU-accelerated channel simulation](../openair1/SIMULATION/TOOLS/DOC/gpu_acceleration.md)
- [How to use multiple BWPs](./RUN_NR_multiple_BWPs.md)
- [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)
@@ -133,7 +130,13 @@ The other SDRs (AW2S, LimeSDR, ...) have no READMEs.
## Developer tools
- [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. See also the
next entry for an error detection tool.
- [formatting](../tools/formatting/README.md) is a clang-format error detection tool
- [sanitizers.md](./dev_tools/sanitizers.md): how to run with ASan/UBSan/MemSAN/TSan
- [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
- [performance analysis with tracy](./dev_tools/tracy.md)
- [doc_best_practices.md](./doc_best_practices.md): overall best practices for writing documentations

View File

@@ -1,596 +1,249 @@
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
# Running OAI 5G Softmodems
# Running the OAI 5G gNB (nr-softmodem)
This document is a general overview of running `nr-softmodem`, the OAI 5G
gNodeB executable. For build instructions see [BUILD.md](BUILD.md). For UE
documentation see [runmodem-nrue.md](runmodem-nrue.md).
This document explains some options for running 5G executables.
After you have [built the softmodem executables](BUILD.md) you can set your
default directory to the build directory `cmake_targets/ran_build/build/` and
start testing some use cases. Below, the description of the different OAI
functionalities should help you choose the OAI configuration that suits your
need.
[[_TOC_]]
## Simulators
## Modes of operation
`nr-softmodem` supports several deployment modes. The default is "standalone"
mode.
| Option | Mode | Description |
|----------|------------|-------------|
| _none_ | standalone | Run gNB in SA mode (no flag). |
| `--nsa` | NSA | Non-standalone mode, requires an LTE eNB, see [NSA documentation](TESTING_OAI_NSA_COTS_UE.md). |
| phy-test | `--phy-test` | Test modes without random access, see [nrUE page](runmodem-nrue.md). |
| do-ra | `--do-ra` | Test mode without a core network or RRC connection, see [nrUE page](runmodem-nrue.md). |
| noS1 | `--noS1` | Manually inject traffic, suitable for phy-test/do-ra without core network. |
## Basic invocation
From the build directory (with `build_oai`, by default `cmake_targets/ran_build/build/`):
```bash
sudo ./nr-softmodem -O <config_file> [options]
```
Example with a USRP B210:
```bash
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf -E --continuous-tx
```
CI-tested sample configuration files are in `ci-scripts/conf_files/`. Sample
configuration files for various hardware can be found under
`targets/PROJECTS/GENERIC-NR-5GC/CONF/`.
## Configuration file
The configuration file can use either libconfig (`.conf`) or YAML (`.yaml`)
syntax, based on the file ending. The main sections are:
- `gNBs`: cell identity, PLMN, physical cell parameters, AMF address
- `MACRLCs`: MAC/RLC layer settings
- `L1s`: L1 layer settings and thread pinning
- `RUs`: radio unit configuration (device selection, antennas, gains)
- `security`: ciphering and integrity algorithm preferences
- `log_config`: per-module log levels
Individual parameters can be overridden on the command line using the
`--Section.[index].param value` syntax, e.g.
`--gNBs.[0].min_rxtxtime 6`.
### Core network connectivity
In the `gNBs` section, set the following to connect to a 5G core (AMF):
```
gNBs = (
{
tracking_area_code = 1;
plmn_list = ({ mcc = 001; mnc = 01; mnc_length = 2; snssaiList = ({ sst = 1; sd = 0xffffff; }) });
nr_cellid = 12345678L;
amf_ip_address = ({ ipv4 = "192.168.70.132"; });
NETWORK_INTERFACES :
{
GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.70.129"; // N2 interface
GNB_IPV4_ADDRESS_FOR_NGU = "192.168.70.129"; // N3 interface
GNB_PORT_FOR_S1U = 2152;
};
});
```
- `plmn_list` must match the PLMN configured in the AMF.
- `amf_ip_address` is the IP address of the AMF.
- `GNB_IPV4_ADDRESS_FOR_NG_AMF` is the local IP address of the gNB's N2 interface.
- `GNB_IPV4_ADDRESS_FOR_NGU` is the local IP address of the gNB's N3 interface.
### MAC configuration
In the `MACRLCs` section, configure MAC parameters. See the [MAC user
documentation](MAC/mac-usage.md) for more information.
### L1 configuration
The `L1s` section configures the L1 (physical layer) processing pipeline.
- `tr_n_preference`: transport to the MAC layer. Normally `local_mac` (shared
memory). Set to `nfapi` for a networked L1/MAC split; see [nFAPI docs](nfapi.md).
- `prach_dtx_threshold`: energy threshold (in dB x10) for PRACH preamble detection. Lower
values increase sensitivity but may cause false detections. Typical range:
60200.
- `pucch0_dtx_threshold`: energy threshold for PUCCH format 0 (SR/HARQ-ACK)
detection. Similar trade-off as `prach_dtx_threshold`. Typical range: 10100.
- `pusch_dtx_threshold`: energy threshold for PUSCH detection. Similar
trade-off as `prach_dtx_threshold`. Typical range: 10100.
- `ofdm_offset_divisor`: controls a small timing advance applied to the OFDM
signal to ensure samples arrive before the processing deadline. Set to
`UINT_MAX` (i.e., `4294967295`) for zero offset; a value of `8` gives an
offset of `frame_length / 8`. The default value of `8` works well in most
cases.
- `max_ldpc_iterations`: maximum number of LDPC decoder iterations. Fewer
iterations reduce CPU load at the cost of UL error rate. Default is 8, but
might be as high as 20 or more..
- `L1_rx_thread_core` / `L1_tx_thread_core`: pin the L1 RX and TX threads to
specific isolated CPU cores. Recommended for real-time performance, especially
with O-RAN 7.2 fronthaul.
- `phase_compensation` (FHI 7.2 only): set to `0` if phase compensation is done
in the O-RU, `1` if it should be done in the DU (software). Must match the
O-RU configuration.
- `tx_amp_backoff_dB` (FHI 7.2 only): output amplitude backoff in dB relative
to full scale. Must be set according to the O-RU vendor documentation to avoid
exceeding the RU's power limits.
### RU configuration
The `RUs` section describes the radio unit, i.e., either an integrated RF device
(split 8 radio) or a remote RU connected via a fronthaul interface (e.g., O-RU).
- `local_rf`: `"yes"` for a locally attached RF device (USRP, etc.), `"no"`
for a remote RU (e.g., O-RAN 7.2 fronthaul).
- `nb_tx` / `nb_rx`: number of TX and RX antenna ports. Must be consistent with
the antenna port configuration in `gNBs` (see [MIMO section](#5g-gnb-mimo-configuration)).
- `att_tx` / `att_rx`: software attenuation applied to TX/RX samples in dB.
Used to reduce signal levels in software before they reach the RF device.
- `bands`: list of NR band numbers this RU operates on, e.g. `[78]`.
- `max_pdschReferenceSignalPower`: maximum PDSCH reference signal power in dBm.
Used by the UE for path loss estimation. Should match the actual transmit
power level.
- `max_rxgain`: maximum RX gain of the RF device in dB. This is the hardware
gain limit; the actual gain used may be lower.
- `clock_src`: clock reference source. `"internal"` uses the device's own
oscillator; `"external"` expects an external 10 MHz reference; `"gpsdo"`
uses a GPS-disciplined oscillator. Applicable only for USRP.
- `sdr_addrs`: device address string passed to the RF driver. Used notably with
USRP and BladeRF devices.
- `ru_thread_core`: CPU core for the RU fronthaul thread. Should
be an isolated core (FHI 7.2 only).
### Frequency and cell configuration
Key parameters in `servingCellConfigCommon`:
- `absoluteFrequencySSB` / `dl_absoluteFrequencyPointA`: DL frequency in NR-ARFCN for SSB and PointA
- `dl_frequencyBand` / `ul_frequencyBand`: NR band number
- `dl_carrierBandwidth` / `ul_carrierBandwidth`: bandwidth in PRBs
- `dl_subcarrierSpacing`: subcarrier spacing (0=15 kHz, 1=30 kHz, 2=60 kHz, 3=120 kHz)
- `ssPBCH_BlockPower`: SSB transmit power in dBm (EPRE of SSB resource elements)
- `prach_ConfigurationIndex`, `prach_msg1_FrequencyStart`: PRACH configuration
For a reference of frequency parameters and band configurations see
[gNB frequency setup](gNB_frequency_setup.md).
### Security
The `security` section controls NAS/AS security algorithm selection:
```
security = {
# preferred ciphering algorithms
# the first one of the list that an UE supports in chosen
# valid values: nea0, nea1, nea2, nea3
ciphering_algorithms = ( "nea0" );
# preferred integrity algorithms
# the first one of the list that an UE supports in chosen
# valid values: nia0, nia1, nia2, nia3
integrity_algorithms = ( "nia2", "nia0" );
# setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter
# what 'ciphering_algorithms' configures; same thing for 'drb_integrity'
drb_ciphering = "yes";
drb_integrity = "no";
};
```
## Common radio devices
### RFsimulator
The RFsimulator is an OAI device replacing the radio heads (for example the
USRP device). It allows connecting the oai UE (LTE or 5G) and respectively the
oai eNodeB or gNodeB through a network interface carrying the time-domain
samples, getting rid of over the air unpredictable perturbations. This is the
ideal tool to check signal processing algorithms and protocols implementation.
The RFsimulator has some preliminary support for channel modeling.
The RFsimulator replaces the radio device with a virtual radio, allowing
gNB and UE to run without hardware. Built by default. Ideal for testing,
debugging, and development. Add `--rfsim` to the command line.
It is planned to enhance this simulator with the following functionalities:
See the [RFsimulator documentation](../radio/rfsimulator/README.md).
- Support for multiple eNodeB's or gNodeB's for hand-over tests
### USRP (B2xx, N3xx, X3xx, x4xx)
This is an easy use-case to setup and test, as no specific hardware is required. The [rfsimulator page](../radio/rfsimulator/README.md) contains the detailed documentation.
Build with `build_oai -w USRP`/`cmake -DOAI_USRP=ON`. The device is selected
automatically. Common per-device recommendations:
### L2 nFAPI Simulator
- B210: use `-E --continuous-tx`; limited to ~40 MHz bandwidth
- N3xx/X3xx: use `--usrp-tx-thread-config 1`; consider `--tune-offset` or
`ul_prbblacklist` for DC noise at high bandwidth
This simulator connects an eNodeB and UEs through an nFAPI interface,
short-cutting the L1 layer. The objective of this simulator is to allow multi
UEs simulation, with a large number of UEs (ideally up to 255).
For network tuning of 10G USRP devices (N300, X300):
```bash
sudo ethtool -G <ifname> tx 4096 rx 4096
sudo sysctl -w net.core.wmem_max=62500000
sudo sysctl -w net.core.rmem_max=62500000
```
As for the RFsimulator, no specific hardware is required. The [L2 nfapi
simulator page](./L2NFAPI.md) contains the detailed documentation.
See also the [COTS UE tutorial](NR_SA_Tutorial_COTS_UE.md) and
[performance tuning guide](tuning_and_security.md).
## Running with a true radio head
### O-RAN 7.2 Fronthaul (FHI)
OAI supports different radio heads, the following are tested in the CI:
For O-RAN split 7.2 with an O-RU, build with `build_oai -t
oran_fhlib_5g`/`cmake -DOAI_FHI72=ON`. Configuration requires a `fhi_72`
section and DPDK setup. See the [O-RAN FHI 7.2 tutorial](ORAN_FHI7.2_Tutorial.md).
1. [Monolithic eNodeB](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/HowToConnectCOTSUEwithOAIeNBNew) where the whole signal processing is performed in a single process
2. IF4P5 mode, where frequency domain samples are carried over ethernet, from the RRU which implement part of L1(FFT,IFFT,part of PRACH), to a RAU
3. Monolithic gNodeB: see next section, or the [standalone tutorial](NR_SA_Tutorial_COTS_UE.md)
## Higher-layer splits
### CU/DU (F1) and CU-CP/CU-UP (E1) splits
## 5G NR
F1 splits the gNB into a CU (RRC/PDCP/SDAP) and one or more DUs (RLC/MAC/L1).
See [F1AP docs](F1AP/F1-design.md). The CU and DU connect via F1AP over SCTP.
The DU configuration specifies the CU IP address.
### NSA setup with COTS UE
This setup requires an EPC, an OAI eNB and gNB, and a COTS Phone. A dedicated page describe the setup can be found [here](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home/gNB-COTS-UE-testing).
The `--nsa` flag must be used to run gNB in non-standalone mode.
#### Launch eNB
To run a split gNB, start a CU and one or more DUs separately:
```bash
sudo ./lte-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50prb.usrpb210.conf
# CU
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/cu_gnb.conf
# DU
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/du_gnb.conf
```
#### Launch gNB
E1 splits the CU into a CU-CP (RRC) and one or more CU-UPs (PDCP/SDAP) (and
therefore also requires F1). See [E1AP docs](E1AP/E1-design.md).
```bash
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf --nsa
```
### FAPI/nFAPI splits
You should see the X2 messages in Wireshark and at the eNB.
### SA setup with OAI NR-UE
The standalone mode is the default mode.
Before tag `2024.w45`, the default mode was NSA. Thus, in the past, to run
either the gNB or the UE in standalone mode, it was necessary to provide the
`--sa` flag in the command line. This is not the case anymore. If provided
the softmodem exits reporting that it does not know this option.
The default (SA) mode does the following:
- At the gNB:
* The RRC encodes SIB1 according to the configuration file and transmits it through NR-BCCH-DL-SCH.
- At the UE:
* Decode SIB1 and starts the 5G NR Initial Access Procedure for SA:
1) 5G-NR RRC Connection Setup
2) NAS Authentication and Security
3) 5G-NR AS Security Procedure
4) 5G-NR RRC Reconfiguration
5) Start Downlink and Uplink Data Transfer
Command line parameters for UE in standalone mode:
- `-C` : downlink carrier frequency in Hz (default value 0)
- `--CO` : uplink frequency offset for FDD in Hz (default value 0)
- `--numerology` : numerology index (default value 1)
- `-r` : bandwidth in terms of RBs (default value 106)
- `--band` : NR band number (default value 78)
- `--ssb` : SSB start subcarrier (default value 516)
To simplify the configuration for the user testing OAI UE with OAI gNB, the latter prints the following LOG that guides the user to correctly set some of the UE command line parameters:
```shell
[PHY] Command line parameters for OAI UE: -C 3319680000 -r 106 --numerology 1 --ssb 516
```
You can run this, using USRPs, on two separate machines:
```shell
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf --gNBs.[0].min_rxtxtime 6
sudo ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --ssb 516
```
With the **RFsimulator** (on the same machine), just add the option `--rfsim` to both gNB and NR UE command lines.
UE capabilities can be passed according to the [UE Capabilities](#UE-Capabilities) section.
A detailed tutorial is provided at this page [NR_SA_Tutorial_OAI_nrUE.md](./NR_SA_Tutorial_OAI_nrUE.md).
### Optional NR-UE command line options
Here are some useful command line options for the NR UE:
| Parameter | Description |
|--------------------------|---------------------------------------------------------------------------------------------------------------|
| `--ue-scan-carrier` | Scan for cells in current bandwidth. This option can be used if the SSB position of the gNB is unknown. If multiple cells are detected, the UE will try to connect to the first cell. By default, this option is disabled and the UE attempts to only decode SSB given by `--ssb`. |
| `--ue-fo-compensation` | Enables the initial frequency offset compensation at the UE. Useful when running over the air and/or without an external clock/time source. |
| `--cont-fo-comp` | Enables the continuous frequency offset (FO) estimation and compensation. Parameter value `1` specifies that the main FO contribution comes from the local oscillator's (LO) accuracy. Parameter value `2` specifies that the main FO contribution comes from Doppler shift. Parameter value `3` specifies that no measured residual DL FO is considered for UL FO pre-compensation. |
| `--initial-fo` | Sets the known initial frequency offset. Useful especially with large Doppler frequency, e.g. LEO satellite. |
| `--freq-sync-P` | Sets the coefficient for the Proportional part of the PI-controller for the continuous frequency offset compensation. Default value 0.01. |
| `--freq-sync-I` | Sets the coefficient for the Integrating part of the PI-controller for the continuous frequency offset compensation. Default value 0.001. |
| `--ntn-initial-time-drift` | Sets the initial NTN DL time drift (feeder link and service link), given in µs/s. |
| `--autonomous-ta` | Enables the autonomous TA update, based on DL drift (useful if main contribution to DL drift is movement, e.g. LEO satellite). |
| `--time-sync-P` | Sets the coefficient for the Proportional part of the PI-controller for the time synchronization. Default value 0.5. |
| `--time-sync-I` | Sets the coefficient for the Integrating part of the PI-controller for the time synchronization. Default value 0.0. |
| `--usrp-args` | Equivalent to the `sdr_addrs` field in the gNB config file. Used to identify the USRP and set some basic parameters (like the clock source). |
| `--clock-source` | Sets the clock source (internal or external). |
| `--time-source` | Sets the time source (internal or external). |
You can view all available options by typing:
```shell
./nr-uesoftmodem --help
```
### NR UE: Configure multiple RF-frontends (RUs)
Multiple RF-frontends (also called RUs) can be defined for the nr-uesoftmodem.
Therefore, two sections in the NR UE configuration file are used:
- `RUs`
- `cells`
The `RUs` section in the NR UE configuration file contains an array of elements, where each element has these properies:
| Property name | Type | Default value | Description |
| ---------------- | -------------- | ------------- | ------------------------------------ |
| nb_tx | integer | 1 | Number of TX Antennas |
| nb_rx | integer | 1 | Number of RX Antennas |
| att_tx | integer | 0 | TX Attenuation in dB |
| att_rx | integer | 0 | RX Attenuation in dB |
| max_rxgain | integer | 120 | Maximum RX Gain at 0 dB Attenuation |
| sdr_addrs | string | type=b200 | SDR Parameter String |
| tx_subdev | string | | SDR TX Subdevice |
| rx_subdev | string | | SDR RX Subdevice |
| clock_src | string | internal | SDR Clock Source |
| time_src | string | internal | SDR Time Source |
| tune_offset | floating point | 0.0 | SDR Tune Offset in Hz |
| if_freq | integer | 0 | DL Intermediate Frequency in Hz |
| if_offset | integer | 0 | UL Intermediate Frequency Offset in Hz |
The `cells` section in the NR UE configuration file contains an array of elements, where each element has these properies:
| Property name | Type | Default value | Description |
| ---------------- | ------- | ------------- | ---------------------------------------- |
| ru_id | integer | 0 | ID of the associated RU from the `RUs` section |
| band | integer | 78 | 5G NR Band |
| rf_freq | integer | 0 | DL Carrier Centre Frequency in Hz |
| rf_offset | integer | 0 | DL Carrier Centre Frequency Offset in Hz |
| numerology | integer | 1 | 5G NR Numerology (µ) |
| N_RB_DL | integer | 106 | Number of DL Carrier Ressource Blocks |
| ssb_start | integer | 516 | Ressource Element where the SSB Starts |
There are different scenarios where multiple RF-frontends (also called RUs) are beneficial for the NR UE:
1. RF-Simulator Inter-Frequency Handover between multiple cells
2. Multiple UEs in one instance, each using their own RF-frontend (RF-Simulator connection)
3. Different Antennas connected to different RF-ports
4. Concurrent connection to multiple carriers (carrier aggregation CA)
This would be and example configuration for the 1. scenario:
```
rfsimulator = (
{
serveraddr = "127.0.0.2";
serverport = 4043;
}, {
serveraddr = "127.0.0.3";
serverport = 4044;
}
);
RUs = (
{
nb_tx = 1;
nb_rx = 1;
}, {
nb_tx = 1;
nb_rx = 1;
}
);
cells = (
{
ru_id = 0;
band = 78;
rf_freq = 3619200000L;
numerology = 1;
N_RB_DL = 106;
ssb_start = 516;
}, {
ru_id = 1;
band = 78;
rf_freq = 3649440000L;
numerology = 1;
N_RB_DL = 106;
ssb_start = 516;
}
);
```
An example for the 2. scenario can be found in the file [ci-scripts/yaml_files/5g_rfsimulator_multiue/nrue.uicc.conf](../ci-scripts/yaml_files/5g_rfsimulator_multiue/nrue.uicc.conf).
The 3. scenario is similar to 1., but instead of providing RF-Simulator parameters, actual SDR parameters have to be provided.
The 4. scenario is not supported, as the NR UE does not implement CA, yet.
Current Limitations:
- Each RU can be used by only one cell.
- Each RU and cell can be used by only one UE (no RU sharing implemented, yet).
- The sampling rates of all RUs must be the same.
### Common gNB and NR UE command line options
#### Three-quarter sampling
The command line option `-E` can be used to enable three-quarter sampling for split 8 sample rate. Required for certain radios (e.g., 40MHz with B210). If used on the gNB, it is a good idea to use for the UE as well (and vice versa).
#### UE Capabilities
The `--uecap_file` option can be used to pass the UE Capabilities input file (path location + filename), e.g.`--uecap_file ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/uecap_ports1.xml` for 1 layer or e.g. `--uecap_file ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/uecap_ports2.xml` for 2 layers.
This option is available for the following combinations of operation modes and gNB/nrUE softmodems:
| Mode | Executable | Description |
|------------|----------------|-----------------------------------------------------|
| SA | nr-uesoftmodem | Send UE capabilities from the UE to the gNB via RRC |
| phy-test | nr-softmodem | Mimic the reception of UE capabilities by the gNB |
| do-ra | nr-softmodem | Mimic the reception of UE capabilities by the gNB |
e.g.
```shell
sudo ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3319680000 --ue-nb-ant-tx 2 --ue-nb-ant-rx 2 --uecap_file /opt/oai-nr-ue/etc/uecap.xml
```
### How to run a NTN configuration
#### NTN channel
A 5G NR NTN configuration only works in a non-terrestrial setup.
Therefore either SDR boards and a dedicated NTN channel emulator are required, or RFsimulator has to be configured to simulate a NTN channel.
As shown on the [rfsimulator page](../radio/rfsimulator/README.md), RFsimulator provides different possibilities.
E.g. to perform a simple simulation of a satellite in geostationary orbit (GEO), these parameters should be added to both gNB and UE command lines:
```
--rfsimulator.[0].prop_delay 238.74
```
For simulation of a satellite in low earth orbit (LEO), two channel models have been added to rfsimulator:
- `SAT_LEO_TRANS`: transparent LEO satellite with gNB on ground
- `SAT_LEO_REGEN`: regenerative LEO satellite with gNB on board
Both channel models simulate the delay and Doppler for a circular orbit at 600 km height according to the Matlab function [dopplerShiftCircularOrbit](https://de.mathworks.com/help/satcom/ref/dopplershiftcircularorbit.html).
An example configuration to simulate a transparent LEO satellite with rfsimulator would be:
```
channelmod = {
max_chan=10;
modellist="modellist_rfsimu_1";
modellist_rfsimu_1 = (
{
model_name = "rfsimu_channel_enB0"
type = "SAT_LEO_TRANS";
noise_power_dB = -100;
},
{
model_name = "rfsimu_channel_ue0"
type = "SAT_LEO_TRANS";
noise_power_dB = -100;
}
);
};
```
This configuration is also provided in the file `targets/PROJECTS/GENERIC-NR-5GC/CONF/channelmod_rfsimu_LEO_satellite.conf`.
Additionally, rfsimulator has to be configured to apply the channel model.
This can be done by either providing this line in the conf file in section `rfsimulator`:
```
options = ("chanmod");
```
Or by providing this the the command line parameters:
```
--rfsimulator.[0].options chanmod
```
#### gNB
The main parameters to cope with the large NTN propagation delay are cellSpecificKoffset, ta-Common, ta-CommonDrift and the ephemeris data (satellite position and velocity vectors).
The parameter `ntn-UlSyncValidityDuration-r17` indicates the maximum time duration from epochtime during which the UE can apply assistance information without having acquired new assistance information. i.e this enables UE to re-read SIB19 before timer with value ulSyncValidityDuration expires. The unit of the field is in seconds. Example values for GEO: 240s, MEO: 20s, LEO: 5s.
As epochtime is not implemented yet, UE starts the timer from the TTI where SIB19 is received with ntn-UlSyncValidityDuration-r17 IE.
The parameter `cellSpecificKoffset_r17` is the scheduling offset used for the timing relationships that are modified for NTN (see TS 38.213).
The unit of the field Koffset is number of slots for a given subcarrier spacing of 15 kHz.
The parameter `ta-Common-r17` is used to provide the propagation delay between the reference point (at the gNB) and the satellite.
The granularity of ta-Common is 4.072 × 10^(-3) µs. Values are given in unit of corresponding granularity.
The parameter `ta-CommonDrift-r17` indicates the drift rate of the common TA.
The granularity of ta-CommonDrift is 0.2 × 10^(-3) µs/s. Values are given in unit of corresponding granularity.
The satellite position and velocity vartors are provided using the following parameters:
`positionX-r17`, `positionY-r17`, `positionZ-r17`:
X, Y, Z coordinate of satellite position state vector in ECEF. Unit is meter.
Step of 1.3 m. Actual value = field value * 1.3.
`velocityVX-r17`, `velocityVY-r17`, `velocityVZ-r17`:
X, Y, Z coordinate of satellite velocity state vector in ECEF. Unit is meter/second.
Step of 0.06 m/s. Actual value = field value * 0.06.
These parameters can be provided to the gNB in the conf file in the section `servingCellConfigCommon`:
```
...
# GEO satellite
cellSpecificKoffset_r17 = 478;
ta-Common-r17 = 58629666; # 238.74 ms
positionX-r17 = 0;
positionY-r17 = 0;
positionZ-r17 = 32433846;
velocityVX-r17 = 0;
velocityVY-r17 = 0;
velocityVZ-r17 = 0;
# LEO satellite
# cellSpecificKoffset_r17 = 40;
# ta-Common-r17 = 4634000; # 18.87 ms
# ta-CommonDrift-r17 = -230000; # -46 µs/s
# positionX-r17 = 0;
# positionY-r17 = -2166908; # -2816980.4 m
# positionZ-r17 = 4910784; # 6384019.2 m
# velocityVX-r17 = 0;
# velocityVY-r17 = 115246; # 6914.76 m/s
# velocityVZ-r17 = 50853; # 3051.18 m/s
...
```
Besides this, some timers, e.g. `sr_ProhibitTimer_v1700`, `t300`, `t301` and `t319`, in the conf file section `gNBs.[0].TIMERS` might need to be extended for GEO satellites.
```
...
TIMERS :
{
sr_ProhibitTimer = 0;
sr_TransMax = 64;
sr_ProhibitTimer_v1700 = 512;
t300 = 2000;
t301 = 2000;
t319 = 2000;
};
...
```
To improve the achievable UL and DL throughput in conditions with large RTT (esp. GEO satellites), there is a feature defined in REL17 to disable HARQ feedback.
This allows to reuse HARQ processes immediately, but it breaks compatibility with UEs not supporting this REL17 feature.
To enable this feature, the `disable_harq` flag has to be added to the gNB conf file in the section `gNBs.[0]`
```
...
min_rxtxtime = 6;
disable_harq = 1; // <--
servingCellConfigCommon = (
{
...
```
The settings for a transparent GEO satellite scenario are already provided in the file `ci-scripts/conf_files/gnb.sa.band254.u0.25prb.rfsim.ntn.conf`.
Using this conf file, an example gNB command for FDD, 5 MHz BW, 15 kHz SCS, transparent GEO satellite 5G NR NTN is this:
```
cd cmake_targets
sudo ./ran_build/build/nr-softmodem -O ../ci-scripts/conf_files/gnb.sa.band254.u0.25prb.rfsim.ntn.conf --rfsim
```
To configure NTN gNB with 32 HARQ processes in downlink and uplink, add these settings in conf files under section `gNBs.[0]`
```
...
num_dlharq = 32;
num_ulharq = 32;
...
```
To simulate a LEO satellite channel model with rfsimulator in UL (DL is simulated at the UE side) either the `channelmod` section as shown before has to be added to the gNB conf file, or a channelmod conf file has to be included like this:
```
@include "channelmod_rfsimu_LEO_satellite.conf"
```
The settings for a transparent LEO satellite scenario are already provided in the file `ci-scripts/conf_files/gnb.sa.band254.u0.25prb.rfsim.ntn-leo.conf`.
Using this conf file, an example gNB command for FDD, 5 MHz BW, 15 kHz SCS, trasparent LEO satellite 5G NR NTN is this:
```
cd cmake_targets
sudo ./ran_build/build/nr-softmodem -O ../ci-scripts/conf_files/gnb.sa.band254.u0.25prb.rfsim.ntn-leo.conf --rfsim
```
#### NR UE
At UE side, only few parameters have to be provided, as the UE receives most relevant parameters via SIB19 from the gNB.
But to calculate the UE specific TA, the UE position has to be provided in the `ue.conf` file.
Also the LEO channel model has to be configured, e.g. by using an `@include` statement, just like on the gNB side:
```
...
position0 = {
x = 0.0;
y = 0.0;
z = 6377900.0;
}
@include "channelmod_rfsimu_LEO_satellite.conf"
```
So an example NR UE command for FDD, 5MHz BW, 15 kHz SCS, transparent GEO satellite 5G NR NTN is this:
```
cd cmake_targets
sudo ./ran_build/build/nr-uesoftmodem -O ../targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.conf --band 254 -C 2488400000 --CO -873500000 -r 25 --numerology 0 --ssb 60 --rfsim --rfsimulator.[0].prop_delay 238.74
```
For LEO satellite scenarios, the parameter `--ntn-initial-time-drift` must be provided via command line, as the UE needs this value to compensate for the time drift during initial sync, before SIB19 was received.
This parameter provides the drift rate of the complete DL timing (incl. feeder link and service link) in µs/s.
To perform an autonomous TA update based on the DL drift, the boolean parameter `--autonomous-ta` can be added.
If that parameter is omitted, the TA is continuously computed based on the SIB19 information.
For LEO satellite scenario we assume the LO to be very accurate and the main FO contribution comes from Doppler shift.
Therefore, we use the command line parameter `--cont-fo-comp 2` to continuously compensate the DL Doppler and pre-compensate the UL Doppler.
The initial Doppler frequency offset must be provided via command line with the parameter `--initial-fo`.
For other information on optional NR UE command line options, please refer [here](#optional-nr-ue-command-line-options).
So an example NR UE command for FDD, 5MHz BW, 15 kHz SCS, transparent LEO satellite 5G NR NTN is this:
```
cd cmake_targets
sudo ./ran_build/build/nr-uesoftmodem -O ../targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.conf --band 254 -C 2488400000 --CO -873500000 -r 25 --numerology 0 --ssb 60 --rfsim --rfsimulator.[0].prop_delay 20 --rfsimulator.[0].options chanmod --time-sync-I 0.1 --ntn-initial-time-drift -46 --initial-fo 57340 --cont-fo-comp 2
```
## Specific OAI modes
### phy-test setup with OAI UE
The OAI UE can also be used in front of a OAI gNB without the support of eNB or EPC and circumventing random access. In this case both gNB and eNB need to be run with the `--phy-test` flag. At the gNB this flag does the following
- it reads the RRC configuration from the configuration file
- it encodes the RRCConfiguration and the RBconfig message and stores them in the binary files `rbconfig.raw` and `reconfig.raw` in the current directory
- the MAC uses a pre-configured allocation of PDSCH and PUSCH with randomly generated payload instead of the standard scheduler. The options `-m`, `-l`, `-t`, `-M`, `-T`, `-D`, and `-U` can be used to configure this scheduler.
- Options `-Dmod`, and `-Umod` were introduced to enable scheduling PDSCH/PUSCH on slots >= 64 in phy-test mode. (in case of >= 120Khz subcarrier spacing and FDD)
- For ex: `-Dmod 2' / '-Umod 2` allocates every 2nd slot for PDSCH or PUSCH respectively.
- See `./nr-softmodem -h` for more information.
At the UE, the `--phy-test` flag will read the binary files `rbconfig.raw` and `reconfig.raw` from the current directory and process them. If you wish to provide a different path for these files, please use the options `--reconfig-file` and `--rbconfig-file`.
```bash
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf --phy-test
```
```bash
sudo ./nr-uesoftmodem --phy-test [--reconfig-file ../../../ci-scripts/rrc-files/reconfig.raw --rbconfig-file ../../../ci-scripts/rrc-files/rbconfig.raw]
```
In summary:
- If you are running on the same machine and launched the 2 executables (`nr-softmodem` and `nr-uesoftmodem`) from the same directory, nothing has to be done.
- If you launched the 2 executables from 2 different folders, just point to the location where you launched the `nr-softmodem`:
* `sudo ./nr-uesoftmodem --rfsim --phy-test --reconfig-file /the/path/where/you/launched/nr-softmodem/reconfig-file --rbconfig-file /the/path/where/you/launched/nr-softmodem/rbconfig-file --rfsimulator.[0].serveraddr <TARGET_GNB_INTERFACE_ADDRESS>`
- If you are not running on the same machine, you need to **COPY** the two raw files
* `scp usera@machineA:/the/path/where/you/launched/nr-softmodem/r*config.raw userb@machineB:/the/path/where/you/will/launch/nr-uesoftmodem/`
* Obviously this operation should be done before launching the `nr-uesoftmodem` executable.
In phy-test mode it is possible to mimic the reception of UE Capabilities at gNB through the command line parameter `--uecap_file`. Refer to the [UE Capabilities](#UE-Capabilities) section for more details.
### noS1 setup with OAI UE
Instead of randomly generated payload, in the phy-test mode we can also
inject/receive user-plane traffic over a TUN interface. This is the so-called
noS1 mode.
The noS1 mode is applicable to both gNB/UE, and enabled by passing `--noS1` as
an option. The gNB/UE will open a TUN interface which the interface names and
IP addresses `oaitun_enb1`/10.0.1.1, and `oaitun_ue1`/10.0.1.2, respectively.
You can then use these interfaces to send traffic, e.g.,
```bash
iperf -sui1 -B 10.0.1.2
```
to open an iperf server on the UE side, and
```bash
iperf -uc 10.0.1.2 -B 10.0.1.1 -i1 -t10 -b1M
```
to send data from the gNB down to the UE.
> Note that this does not work if both interfaces are on the same host. We
recommend to use two different hosts, or at least network namespaces, to route
traffic through the gNB/UE tunnel.
This option is only really helpful for phy-test/do-ra (see below) modes, in
which the UE does not connect to a core network. If the UE connects to a core
network, it receives an IP address for which it automatically opens a network
interface.
### do-ra setup with OAI
The do-ra flag is used to ran the NR Random Access procedures in contention-free mode. Currently OAI implements the RACH process from Msg1 to Msg3.
In order to run the RA, the `--do-ra` flag is needed for both the gNB and the UE.
In do-ra mode it is possible to mimic the reception of UE Capabilities at gNB through the command line parameter `--uecap_file`. Refer to the [UE Capabilities](#UE-Capabilities) section for more details.
To run using the RFsimulator:
```bash
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf --do-ra --rfsim
sudo ./nr-uesoftmodem --do-ra --rfsim --rfsimulator.[0].serveraddr 127.0.0.1
```
Using USRPs:
```bash
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf --do-ra
```
On a separate machine:
```bash
sudo ./nr-uesoftmodem --do-ra
```
#### Run OAI with SDAP & Custom DRBs
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.
The Non-GBR flows use a shared data radio bearer.
To hardcode the DRBs for testing purposes, simply add `--gNBs.[0].drbs x` to the binary's arguements, where `x` is the number of DRBs, along with SDAP.
The hardcoded DRBs will be treated like GBR Flows. Due to code limitations at this point the max. number of DRBs is 4.
### IF setup with OAI
OAI is also compatible with Intermediate Frequency (IF) equipment, allowing the
use of RF front-ends operating on arbitrary frequency bands that do not conform
to the standardized 3GPP NR bands.
### OAIUE configuration
To configure IF frequencies on the UE side, provide the following command-line
options:
- `if_freq`: DL frequency in Hz
- `if_freq_off`: UL frequency offset in Hz
### gNB configuration
On the gNB side, the corresponding parameters must be set in the RUs section of
the configuration file:
- `if_freq`: DL frequency in Hz
- `if_offset`: UL frequency offset in Hz
> Note: When using a libconfig-based configuration file for the gNB, ensure that
> `if_freq` numeric value is suffixed with "L" so it is correctly parsed as
> 64-bit integer.
#### Run OAI with custom DL/UL arbitrary frequencies
The following example uses DL frequency 2169.080 MHz and UL frequency offset
-400 MHz, with a configuration file for band 66 (FDD) at gNB side.
On two separate machines with USRPs, run:
```
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpx300.conf
sudo ./nr-uesoftmodem --if_freq 2169080000 --if_freq_off -400000000
```
FAPI splits the L1 and MAC. It is used internally by the monolithic gNB. It is
possible to separate L1 and L2 into separate processes and use shared memory
between both. It is further possible use networked FAPI (nFAPI) to separate L1
and L2 into separate processes on different hosts and use socket-based
communication. See the [FAPI/nFAPI documentation](nfapi.md)
## 5G gNB MIMO configuration
@@ -611,3 +264,19 @@ Finally the number of TX physical antenna in the RU part of the configuration fi
It is possible to limit the number supported DL MIMO layers via RRC configuration, e.g. to a value lower than the number of logical antenna ports configured, by using the configuration file parameter `maxMIMO_layers`.
[Example of configuration file with parameters for 2-layer MIMO](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.2x2.usrpn300.conf)
## IF (Intermediate Frequency) equipment
OAI supports RF front-ends operating on arbitrary frequencies outside standard
3GPP NR bands. Configure in the `RUs` section of the gNB config file:
- `if_freq`: DL frequency in Hz (suffix with `L` in libconfig, e.g. `2169080000L`)
- `if_offset`: UL frequency offset in Hz
## Related documentation
Further documentation not referenced above:
- [Build instructions](BUILD.md)
- [NR SA tutorial with OAI nrUE](NR_SA_Tutorial_OAI_nrUE.md)
- [NTN configuration](ntn-configuration.md)

View File

@@ -1,8 +1,9 @@
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
STATUS 2020/10/15 : added External Resources section and links
# How to run an NSA setup with eNB/gNB
**Table of Contents**
This page details how to run an non-standalone (NSA) setup, using an eNB and
gNB (both OAI). It might be outdated, but still contains valuable information.
[[_TOC_]]
@@ -227,6 +228,7 @@ Execute:
```
You should see the X2 messages in Wireshark and at the eNB.
## Test Case

58
doc/dev_tools/tracy.md Normal file
View File

@@ -0,0 +1,58 @@
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
# Performance analysis with the Tracy profiler
[[_TOC_]]
## Overview
From the Tracy manual:
> Tracy is a real-time, nanosecond resolution hybrid frame and sampling
> profiler that you can use for remote or embedded telemetry of games and other
> applications. It can profile CPU, GPU, memory allocations, locks, context
> switches, [...]
- Sources are on [Github](https://github.com/wolfpld/tracy)
- There is a [web demo](https://tracy.nereid.pl/)
- You can [watch an intro video](https://youtu.be/ghXk3Bk5F2U?t=37)
- You can [read the manual](https://github.com/wolfpld/tracy/releases/download/v0.13.1/tracy.pdf)
## OAI Integration
To enable Tracy, compile `-DTRACY_ENABLE=ON` in cmake. Note that `build_oai`
has no native switch, but you can use `--cmake-opt -DTRACY_ENABLE=ON` instead.
Furthermore, you will need the Tracy profiler:
- Windows hosts: There is a precompiled `tracy-profiler.exe` on Github
- Linux hosts: Compile tracy-profiler from source as described in the manual.
Start the OAI executable you want to profile. Then, open the profiler, and
click on connect to connect to the executable.
It is also possible to collect data from within docker containers:
- Open port 8086.
- To collect CPU data, make sure that you run docker with `--privileged --mount
"type=bind,source=/sys/kernel/debug,target=/sys/kernel/debug,readonly" --user
0:0 --pid=host` or provide the corresponding options in docker-compose.
## Instrumentation
Instrumentation is done via the header `common/instrumentation.h`. A couple of
places in OAI have been instrumented already, search for the macros mentioned
in `common/instrumentation.h`.
In short, main features already in use:
- Measure specific code regions by surrounding them with `TracyCZone(ctx, true);`
and `TracyCZoneEnd(ctx);`.
- Record individual "Tracy frames" (in the OAI context, that's likely one 4G/5G
slot) with `TracyCFrameMark;`
- Plot values using `TracyCPlot(name, val);`
More information about these macros can be found in the manual.
Make sure to link `utils` into the static library you are modifying to get
tracy header definitions.

View File

@@ -160,7 +160,7 @@ patch is available [here](../cmake_targets/tools/install_wls_lib.patch)
Clone the code and apply the patch
git clone -b oran_f_release https://gerrit.o-ran-sc.org/r/o-du/phy.git
git clone -b oran_f_release https://github.com/openairinterface/o-du-phy.git
cd phy/wls_lib/
git apply ~/openairinterface5g/cmake_targets/tools/install_wls_lib.patch

204
doc/ntn-configuration.md Normal file
View File

@@ -0,0 +1,204 @@
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
# How to run a NTN configuration
This tutorial explains how to run non-terrestrial network (NTN) setup for both
low-earth orbit (LEO) and geostationary orbit (GEO) scenarios.
It assumes you have a working terrestrial network (TN) setup, include core
network.
[[_TOC_]]
## NTN channel
A 5G NR NTN configuration only works in a non-terrestrial setup.
Therefore either SDR boards and a dedicated NTN channel emulator are required, or RFsimulator has to be configured to simulate a NTN channel.
As shown on the [rfsimulator page](../radio/rfsimulator/README.md), RFsimulator provides different possibilities.
E.g. to perform a simple simulation of a satellite in geostationary orbit (GEO), these parameters should be added to both gNB and UE command lines:
```
--rfsimulator.[0].prop_delay 238.74
```
For simulation of a satellite in low earth orbit (LEO), two channel models have been added to rfsimulator:
- `SAT_LEO_TRANS`: transparent LEO satellite with gNB on ground
- `SAT_LEO_REGEN`: regenerative LEO satellite with gNB on board
Both channel models simulate the delay and Doppler for a circular orbit at 600 km height according to the Matlab function [dopplerShiftCircularOrbit](https://de.mathworks.com/help/satcom/ref/dopplershiftcircularorbit.html).
An example configuration to simulate a transparent LEO satellite with rfsimulator would be:
```
channelmod = {
max_chan=10;
modellist="modellist_rfsimu_1";
modellist_rfsimu_1 = (
{
model_name = "rfsimu_channel_enB0"
type = "SAT_LEO_TRANS";
noise_power_dB = -100;
},
{
model_name = "rfsimu_channel_ue0"
type = "SAT_LEO_TRANS";
noise_power_dB = -100;
}
);
};
```
This configuration is also provided in the file `targets/PROJECTS/GENERIC-NR-5GC/CONF/channelmod_rfsimu_LEO_satellite.conf`.
Additionally, rfsimulator has to be configured to apply the channel model.
This can be done by either providing this line in the conf file in section `rfsimulator`:
```
options = ("chanmod");
```
Or by providing this the the command line parameters:
```
--rfsimulator.[0].options chanmod
```
## gNB
The main parameters to cope with the large NTN propagation delay are cellSpecificKoffset, ta-Common, ta-CommonDrift and the ephemeris data (satellite position and velocity vectors).
The parameter `ntn-UlSyncValidityDuration-r17` indicates the maximum time duration from epochtime during which the UE can apply assistance information without having acquired new assistance information. i.e this enables UE to re-read SIB19 before timer with value ulSyncValidityDuration expires. The unit of the field is in seconds. Example values for GEO: 240s, MEO: 20s, LEO: 5s.
As epochtime is not implemented yet, UE starts the timer from the TTI where SIB19 is received with ntn-UlSyncValidityDuration-r17 IE.
The parameter `cellSpecificKoffset_r17` is the scheduling offset used for the timing relationships that are modified for NTN (see TS 38.213).
The unit of the field Koffset is number of slots for a given subcarrier spacing of 15 kHz.
The parameter `ta-Common-r17` is used to provide the propagation delay between the reference point (at the gNB) and the satellite.
The granularity of ta-Common is 4.072 × 10^(-3) µs. Values are given in unit of corresponding granularity.
The parameter `ta-CommonDrift-r17` indicates the drift rate of the common TA.
The granularity of ta-CommonDrift is 0.2 × 10^(-3) µs/s. Values are given in unit of corresponding granularity.
The satellite position and velocity vartors are provided using the following parameters:
`positionX-r17`, `positionY-r17`, `positionZ-r17`:
X, Y, Z coordinate of satellite position state vector in ECEF. Unit is meter.
Step of 1.3 m. Actual value = field value * 1.3.
`velocityVX-r17`, `velocityVY-r17`, `velocityVZ-r17`:
X, Y, Z coordinate of satellite velocity state vector in ECEF. Unit is meter/second.
Step of 0.06 m/s. Actual value = field value * 0.06.
These parameters can be provided to the gNB in the conf file in the section `servingCellConfigCommon`:
```
...
# GEO satellite
cellSpecificKoffset_r17 = 478;
ta-Common-r17 = 58629666; # 238.74 ms
positionX-r17 = 0;
positionY-r17 = 0;
positionZ-r17 = 32433846;
velocityVX-r17 = 0;
velocityVY-r17 = 0;
velocityVZ-r17 = 0;
# LEO satellite
# cellSpecificKoffset_r17 = 40;
# ta-Common-r17 = 4634000; # 18.87 ms
# ta-CommonDrift-r17 = -230000; # -46 µs/s
# positionX-r17 = 0;
# positionY-r17 = -2166908; # -2816980.4 m
# positionZ-r17 = 4910784; # 6384019.2 m
# velocityVX-r17 = 0;
# velocityVY-r17 = 115246; # 6914.76 m/s
# velocityVZ-r17 = 50853; # 3051.18 m/s
...
```
Besides this, some timers, e.g. `sr_ProhibitTimer_v1700`, `t300`, `t301` and `t319`, in the conf file section `gNBs.[0].TIMERS` might need to be extended for GEO satellites.
```
...
TIMERS :
{
sr_ProhibitTimer = 0;
sr_TransMax = 64;
sr_ProhibitTimer_v1700 = 512;
t300 = 2000;
t301 = 2000;
t319 = 2000;
};
...
```
To improve the achievable UL and DL throughput in conditions with large RTT (esp. GEO satellites), there is a feature defined in REL17 to disable HARQ feedback.
This allows to reuse HARQ processes immediately, but it breaks compatibility with UEs not supporting this REL17 feature.
To enable this feature, the `disable_harq` flag has to be added to the gNB conf file in the section `gNBs.[0]`
```
...
min_rxtxtime = 6;
disable_harq = 1; // <--
servingCellConfigCommon = (
{
...
```
The settings for a transparent GEO satellite scenario are already provided in the file `ci-scripts/conf_files/gnb.sa.band254.u0.25prb.rfsim.ntn.conf`.
Using this conf file, an example gNB command for FDD, 5 MHz BW, 15 kHz SCS, transparent GEO satellite 5G NR NTN is this:
```
cd cmake_targets
sudo ./ran_build/build/nr-softmodem -O ../ci-scripts/conf_files/gnb.sa.band254.u0.25prb.rfsim.ntn.conf --rfsim
```
To configure NTN gNB with 32 HARQ processes in downlink and uplink, add these settings in conf files under section `gNBs.[0]`
```
...
num_dlharq = 32;
num_ulharq = 32;
...
```
To simulate a LEO satellite channel model with rfsimulator in UL (DL is simulated at the UE side) either the `channelmod` section as shown before has to be added to the gNB conf file, or a channelmod conf file has to be included like this:
```
@include "channelmod_rfsimu_LEO_satellite.conf"
```
The settings for a transparent LEO satellite scenario are already provided in the file `ci-scripts/conf_files/gnb.sa.band254.u0.25prb.rfsim.ntn-leo.conf`.
Using this conf file, an example gNB command for FDD, 5 MHz BW, 15 kHz SCS, trasparent LEO satellite 5G NR NTN is this:
```
cd cmake_targets
sudo ./ran_build/build/nr-softmodem -O ../ci-scripts/conf_files/gnb.sa.band254.u0.25prb.rfsim.ntn-leo.conf --rfsim
```
## NR UE
At UE side, only few parameters have to be provided, as the UE receives most relevant parameters via SIB19 from the gNB.
But to calculate the UE specific TA, the UE position has to be provided in the `ue.conf` file.
Also the LEO channel model has to be configured, e.g. by using an `@include` statement, just like on the gNB side:
```
...
position0 = {
x = 0.0;
y = 0.0;
z = 6377900.0;
}
@include "channelmod_rfsimu_LEO_satellite.conf"
```
So an example NR UE command for FDD, 5MHz BW, 15 kHz SCS, transparent GEO satellite 5G NR NTN is this:
```
cd cmake_targets
sudo ./ran_build/build/nr-uesoftmodem -O ../targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.conf --band 254 -C 2488400000 --CO -873500000 -r 25 --numerology 0 --ssb 60 --rfsim --rfsimulator.[0].prop_delay 238.74
```
For LEO satellite scenarios, the parameter `--ntn-initial-time-drift` must be provided via command line, as the UE needs this value to compensate for the time drift during initial sync, before SIB19 was received.
This parameter provides the drift rate of the complete DL timing (incl. feeder link and service link) in µs/s.
To perform an autonomous TA update based on the DL drift, the boolean parameter `--autonomous-ta` can be added.
If that parameter is omitted, the TA is continuously computed based on the SIB19 information.
For LEO satellite scenario we assume the LO to be very accurate and the main FO contribution comes from Doppler shift.
Therefore, we use the command line parameter `--cont-fo-comp 2` to continuously compensate the DL Doppler and pre-compensate the UL Doppler.
The initial Doppler frequency offset must be provided via command line with the parameter `--initial-fo`.
For other information on optional NR UE command line options, please refer [here](#optional-nr-ue-command-line-options).
So an example NR UE command for FDD, 5MHz BW, 15 kHz SCS, transparent LEO satellite 5G NR NTN is this:
```
cd cmake_targets
sudo ./ran_build/build/nr-uesoftmodem -O ../targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.conf --band 254 -C 2488400000 --CO -873500000 -r 25 --numerology 0 --ssb 60 --rfsim --rfsimulator.[0].prop_delay 20 --rfsimulator.[0].options chanmod --time-sync-I 0.1 --ntn-initial-time-drift -46 --initial-fo 57340 --cont-fo-comp 2
```

View File

@@ -19,6 +19,7 @@ Physims are essential for:
* Debugging and evaluating new PHY code in isolation
* Regression testing
* Ensuring correctness before merging new contributions into the repository
* Performance measurements
These tests are run automatically as part of the following
pipelines:
@@ -54,9 +55,11 @@ Example:
openair1/SIMULATION/NR_PHY/dlsim.c
```
The actual tests are defined in `openair1/SIMULATION/tests/CMakeLists.txt`.
## How to Run Simulators Using `ctest`
### Option 1: Using CMake
### Option 1: Using CMake (Recommended)
Build the simulators and tests using the dedicated cmake option, then run
`ctest` which will run all registered tests.
@@ -102,6 +105,65 @@ parallel, type
ctest -L nr_ulschsim -j 4
Or you run all 5G tests that `-R` pattern-match on a `dl` pattern:
ctest -R nr_dl
Or you can see the test parameters that would be run for `nr_ulsim` without
actually running the tests
ctest -R nr_ulsim -N -V
Note that the lines `Test command:` show the actual shell code that will be
executed. For increased flexibility, tests are run indirectly through a cmake
script `openair1/SIMULATION/tests/RunTimedTest.cmake` that not only runs the
test, but can also analyze its output. The actual command is passed via a
variable `TEST_CMD` that lists the executable and parameters as a semicolon
(`;`) delimited list. See further below for an example of how to read this.
## Performance evaluation
Some simulators, notably `nr_dlsim` and `nr_ulsim`, provide the possibility to
show performance metrics via option `-P`.
To discover predefined tests, you can search for test cases that define `-P`
like so (note the leading `;` to limit to the test case executable command line
as `-P` is also used by the cmake scripts themselves):
$ ctest -N -V | grep Test\ command: | grep -- ';-P' | tail -n1
213: Test command: /usr/bin/cmake "-DTEST_CMD=/home/richie/oai/build/nr_ulsim;-P;-n300;-b14;-I15;-i;0,1;-g;C,l;-t70;-u;1;-m16;-R106;-r106;-U;1,1,1,2;-W2;-y2;-z4;-s11.2;-S11.2" "-DCHECK_SCRIPT=/home/richie/oai/openair1/SIMULATION/tests/analyze-timing.sh" "-P" "/home/richie/oai/openair1/SIMULATION/tests/RunTimedTest.cmake"
From this, we see that the tests can be run like so, in the same directory as
cmake:
./nr_ulsim -P -n300 -b14 -I15 -i 0,1 -g C,l -t70 -u 1 -m16 -R106 -r106 -U 1,1,1,2 -W2 -y2 -z4 -s11.2 -S11.2
After invoking the tests, you should see processing times for UE TX and gNB RX:
```
UE TX
|__ PHY_PROC_TX 246.01 us (300 trials) ( 73.80 total [ms])
[...]
gNB RX
Total PHY proc rx 2587.88 us (300 trials)
Statistics std=301.10, median=0.00, q1=0.00, q3=0.00 µs (on 0 trials)
|__ RX PUSCH time 875.68 us (300 trials) (262.70 total [ms])
```
You can see average per-trial processing time in micro-seconds, and the total
test times for the 300 trials (`-n`) in milliseconds.
Use `grep` to find the places where these stats are printed, and to see which
variable in the stacks traces the measurement. For `RX PUSCH time`, we can
identify the variable `rx_pusch_stats`:
```
$ git grep -n 'RX PUSCH time' ../
../openair1/SIMULATION/NR_PHY/ulsim.c:1714: printStatIndent(&gNB->rx_pusch_stats, "RX PUSCH time");
```
## Adding a New Physim Test
To define a new test or modify existing ones, update the following file:

328
doc/runmodem-nrue.md Normal file
View File

@@ -0,0 +1,328 @@
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
# General information for nrUE and configuration
This page describes the configuration of the nrUE (applicable for use with any
gNB) as well as OAI-specific modes.
[[_TOC_]]
## General configuration
Command line parameters for UE in standalone mode:
- `-C` : downlink carrier frequency in Hz (default value 0)
- `--CO` : uplink frequency offset for FDD in Hz (default value 0)
- `--numerology` : numerology index (default value 1)
- `-r` : bandwidth in terms of RBs (default value 106)
- `--band` : NR band number (default value 78)
- `--ssb` : SSB start subcarrier (default value 516)
To simplify the configuration for the user testing OAI UE with OAI gNB, the latter prints the following LOG that guides the user to correctly set some of the UE command line parameters:
```shell
[PHY] Command line parameters for OAI UE: -C 3319680000 -r 106 --numerology 1 --ssb 516
```
You can run this, using USRPs, on two separate machines:
```shell
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf --gNBs.[0].min_rxtxtime 6
sudo ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --ssb 516
```
With the **RFsimulator** (on the same machine), just add the option `--rfsim` to both gNB and NR UE command lines.
UE capabilities can be passed according to the [UE Capabilities](#UE-Capabilities) section.
## Configuration file
The UE can be provided a configuration file on the command line using `-O
<config>`. At the very least, the configuration file should always contain
information on IMSI, key, and PDU session to use for the information:
```shell
uicc0 = {
imsi = "001010000000001";
key = "fec86ba6eb707ed08905757b1bb44b8f";
opc = "C42449363BBAD02B66D16BC975D77CC1";
pdu_sessions = ({ dnn = "oai"; nssai_sst = 1; });
}
```
| **Parameter** | **Description** | **Default Value** |
|---------------|-----------------|-------------------|
| **IMSI** | Unique identifier for the UE within the mobile network. Used by the network to identify the UE during authentication. It ensures that the UE is correctly identified by the network. | 001010000000001 |
| **key** | Cryptographic key shared between the UE and the network, used for encryption during the authentication process. | `fec86ba6eb707ed08905757b1bb44b8f` |
| **OPC** | Operator key for the Milenage Authentication and Key Agreement algorithm used for encryption during the authentication process. | Ensures secure communication between the UE and the network by matching the encryption keys. | `C42449363BBAD02B66D16BC975D77CC1` |
| **DNN** | _Deprecated_: Specifies the name of the data network the UE wishes to connect to, similar to an APN in 4G networks. Use `pdu_sessions` instead. | `oai` |
| **NSSAI** | _Deprecated_: Allows the UE to select the appropriate network slice, which provides different QoS. Use `pdu_sessions` instead. | `1` |
| **pdu_sessions** | list of PDU sessions to request | empty array (no PDU session) |
Note that DNN and NSSAI parameters are deprecated, and `pdu_sessions` should be
used. If the `pdu_sessions` array is present, DNN and NSSAI are ignored.
Each element within the `pdu_sessions` array takes the following parameters.
Multiple PDU sessions can be requested.
| **Parameter** | **Description** | **Default Value** |
|---------------|-----------------|-------------------|
| `id` | ID of the PDU session to request | index of the current element (1..16) |
| `type` | Type of the PDU session to request (allowed: `IPv4`, `IPv6`, `IPv4v6`, `Ethernet` | `IPv4` |
| `dnn` | Specifies the name of the data network the UE wishes to connect to | `oai` |
| `nssai_sst` | Slice Service Type to request (1=eMBB, 2=URLLC, 3=mMTC) | `1` |
| `nssai_sd` | Slice Differentiator to request | `0xffffff` (meaning "no SD") |
For instance, to request two PDU sessions with user-defined IDs, you could
use.
```
uicc0 = {
# ...
pdu_sessions = (
{ id=1; dnn = "oai.ipv4"; type = "IPv4", nssai_sst = 1; },
{ id=2; dnn = "oai.ipv6"; type = "IPv6", nssai_sst = 1; },
);
}
```
### Optional NR-UE command line options
Here are some useful command line options for the NR UE:
| Parameter | Description |
|--------------------------|---------------------------------------------------------------------------------------------------------------|
| `--ue-scan-carrier` | Scan for cells in current bandwidth. This option can be used if the SSB position of the gNB is unknown. If multiple cells are detected, the UE will try to connect to the first cell. By default, this option is disabled and the UE attempts to only decode SSB given by `--ssb`. |
| `--ue-fo-compensation` | Enables the initial frequency offset compensation at the UE. Useful when running over the air and/or without an external clock/time source. |
| `--cont-fo-comp` | Enables the continuous frequency offset (FO) estimation and compensation. Parameter value `1` specifies that the main FO contribution comes from the local oscillator's (LO) accuracy. Parameter value `2` specifies that the main FO contribution comes from Doppler shift. Parameter value `3` specifies that no measured residual DL FO is considered for UL FO pre-compensation. |
| `--initial-fo` | Sets the known initial frequency offset. Useful especially with large Doppler frequency, e.g. LEO satellite. |
| `--freq-sync-P` | Sets the coefficient for the Proportional part of the PI-controller for the continuous frequency offset compensation. Default value 0.01. |
| `--freq-sync-I` | Sets the coefficient for the Integrating part of the PI-controller for the continuous frequency offset compensation. Default value 0.001. |
| `--num-ues` | Run multiple UEs in one process |
| `--ntn-initial-time-drift` | Sets the initial NTN DL time drift (feeder link and service link), given in µs/s. |
| `--autonomous-ta` | Enables the autonomous TA update, based on DL drift (useful if main contribution to DL drift is movement, e.g. LEO satellite). |
| `--time-sync-P` | Sets the coefficient for the Proportional part of the PI-controller for the time synchronization. Default value 0.5. |
| `--time-sync-I` | Sets the coefficient for the Integrating part of the PI-controller for the time synchronization. Default value 0.0. |
| `--usrp-args` | Equivalent to the `sdr_addrs` field in the gNB config file. Used to identify the USRP and set some basic parameters (like the clock source). |
| `--clock-source` | Sets the clock source (internal or external). |
| `--time-source` | Sets the time source (internal or external). |
You can view all available options by typing:
```shell
./nr-uesoftmodem --help
```
### UE Capabilities
The `--uecap_file` option can be used to pass the UE Capabilities input file (path location + filename), e.g.`--uecap_file ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/uecap_ports1.xml` for 1 layer or e.g. `--uecap_file ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/uecap_ports2.xml` for 2 layers.
This option is available for the following combinations of operation modes and gNB/nrUE softmodems:
| Mode | Executable | Description |
|------------|----------------|-----------------------------------------------------|
| SA | nr-uesoftmodem | Send UE capabilities from the UE to the gNB via RRC |
| phy-test | nr-softmodem | Mimic the reception of UE capabilities by the gNB |
| do-ra | nr-softmodem | Mimic the reception of UE capabilities by the gNB |
e.g.
```shell
sudo ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3319680000 --ue-nb-ant-tx 2 --ue-nb-ant-rx 2 --uecap_file /opt/oai-nr-ue/etc/uecap.xml
```
## NR UE: Configure multiple RF-frontends (RUs) and UEs in one process
Multiple RF-frontends (also called RUs) can be defined for the nr-uesoftmodem.
Therefore, two sections in the NR UE configuration file are used:
- `RUs`
- `cells`
The `RUs` section in the NR UE configuration file contains an array of elements, where each element has these properies:
| Property name | Type | Default value | Description |
| ---------------- | -------------- | ------------- | ------------------------------------ |
| nb_tx | integer | 1 | Number of TX Antennas |
| nb_rx | integer | 1 | Number of RX Antennas |
| att_tx | integer | 0 | TX Attenuation in dB |
| att_rx | integer | 0 | RX Attenuation in dB |
| max_rxgain | integer | 120 | Maximum RX Gain at 0 dB Attenuation |
| sdr_addrs | string | type=b200 | SDR Parameter String |
| tx_subdev | string | | SDR TX Subdevice |
| rx_subdev | string | | SDR RX Subdevice |
| clock_src | string | internal | SDR Clock Source |
| time_src | string | internal | SDR Time Source |
| tune_offset | floating point | 0.0 | SDR Tune Offset in Hz |
| if_freq | integer | 0 | DL Intermediate Frequency in Hz |
| if_offset | integer | 0 | UL Intermediate Frequency Offset in Hz |
The `cells` section in the NR UE configuration file contains an array of elements, where each element has these properies:
| Property name | Type | Default value | Description |
| ---------------- | ------- | ------------- | ---------------------------------------- |
| ru_id | integer | 0 | ID of the associated RU from the `RUs` section |
| band | integer | 78 | 5G NR Band |
| rf_freq | integer | 0 | DL Carrier Centre Frequency in Hz |
| rf_offset | integer | 0 | DL Carrier Centre Frequency Offset in Hz |
| numerology | integer | 1 | 5G NR Numerology (µ) |
| N_RB_DL | integer | 106 | Number of DL Carrier Ressource Blocks |
| ssb_start | integer | 516 | Ressource Element where the SSB Starts |
There are different scenarios where multiple RF-frontends (also called RUs) are beneficial for the NR UE:
1. RF-Simulator Inter-Frequency Handover between multiple cells
2. Multiple UEs in one instance, each using their own RF-frontend (RF-Simulator connection)
3. Different Antennas connected to different RF-ports
4. Concurrent connection to multiple carriers (carrier aggregation CA)
This would be and example configuration for the 1. scenario:
```
rfsimulator = (
{
serveraddr = "127.0.0.2";
serverport = 4043;
}, {
serveraddr = "127.0.0.3";
serverport = 4044;
}
);
RUs = (
{
nb_tx = 1;
nb_rx = 1;
}, {
nb_tx = 1;
nb_rx = 1;
}
);
cells = (
{
ru_id = 0;
band = 78;
rf_freq = 3619200000L;
numerology = 1;
N_RB_DL = 106;
ssb_start = 516;
}, {
ru_id = 1;
band = 78;
rf_freq = 3649440000L;
numerology = 1;
N_RB_DL = 106;
ssb_start = 516;
}
);
```
An example for the 2. scenario can be found in the file
[ci-scripts/yaml_files/5g_rfsimulator_multiue/nrue.uicc.conf](../ci-scripts/yaml_files/5g_rfsimulator_multiue/nrue.uicc.conf).
Multiple UEs run in one process, and since no RU sharing is implemented (see
below), each UE runs its own RF device, e.g., an RFsimulator connection.
The number of UE instances is controlled by `--num-ues N`. This creates N
independent UE protocol stacks (PHY, MAC, NAS). UE instance `i` reads its
credentials from the `uicc{i}` config section and is assigned `cells[i]` in
order. The config must therefore have at least N `uicc`, `cells`, and `RUs`
entries. Note that **all RUs defined in the `RUs` section are opened and
initialized regardless of `--num-ues`**; extra entries consume resources
without being used by any UE instance.
The 3. scenario is similar to 1., but instead of providing RF-Simulator parameters, actual SDR parameters have to be provided.
The 4. scenario is not supported, as the NR UE does not implement CA, yet.
Current Limitations:
- Each RU can be used by only one cell.
- Each RU and cell can be used by only one UE (no RU sharing implemented, yet).
- The sampling rates of all RUs must be the same.
## Specific OAI modes
These modes are applicable when running both OAI UE and OAI gNB together.
### phy-test setup with OAI UE
The OAI UE can also be used in front of a OAI gNB without the support of eNB or EPC and circumventing random access. In this case both gNB and eNB need to be run with the `--phy-test` flag. At the gNB this flag does the following
- it reads the RRC configuration from the configuration file
- it encodes the RRCConfiguration and the RBconfig message and stores them in the binary files `rbconfig.raw` and `reconfig.raw` in the current directory
- the MAC uses a pre-configured allocation of PDSCH and PUSCH with randomly generated payload instead of the standard scheduler. The options `-m`, `-l`, `-t`, `-M`, `-T`, `-D`, and `-U` can be used to configure this scheduler.
- Options `-Dmod`, and `-Umod` were introduced to enable scheduling PDSCH/PUSCH on slots >= 64 in phy-test mode. (in case of >= 120Khz subcarrier spacing and FDD)
- For ex: `-Dmod 2' / '-Umod 2` allocates every 2nd slot for PDSCH or PUSCH respectively.
- See `./nr-softmodem -h` for more information.
At the UE, the `--phy-test` flag will read the binary files `rbconfig.raw` and `reconfig.raw` from the current directory and process them. If you wish to provide a different path for these files, please use the options `--reconfig-file` and `--rbconfig-file`.
```bash
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf --phy-test
```
```bash
sudo ./nr-uesoftmodem --phy-test [--reconfig-file ../../../ci-scripts/rrc-files/reconfig.raw --rbconfig-file ../../../ci-scripts/rrc-files/rbconfig.raw]
```
In summary:
- If you are running on the same machine and launched the 2 executables (`nr-softmodem` and `nr-uesoftmodem`) from the same directory, nothing has to be done.
- If you launched the 2 executables from 2 different folders, just point to the location where you launched the `nr-softmodem`:
* `sudo ./nr-uesoftmodem --rfsim --phy-test --reconfig-file /the/path/where/you/launched/nr-softmodem/reconfig-file --rbconfig-file /the/path/where/you/launched/nr-softmodem/rbconfig-file --rfsimulator.[0].serveraddr <TARGET_GNB_INTERFACE_ADDRESS>`
- If you are not running on the same machine, you need to **COPY** the two raw files
* `scp usera@machineA:/the/path/where/you/launched/nr-softmodem/r*config.raw userb@machineB:/the/path/where/you/will/launch/nr-uesoftmodem/`
* Obviously this operation should be done before launching the `nr-uesoftmodem` executable.
In phy-test mode it is possible to mimic the reception of UE Capabilities at gNB through the command line parameter `--uecap_file`. Refer to the [UE Capabilities](#UE-Capabilities) section for more details.
### noS1 setup with OAI UE
Instead of randomly generated payload, in the phy-test mode we can also
inject/receive user-plane traffic over a TUN interface. This is the so-called
noS1 mode.
The noS1 mode is applicable to both gNB/UE, and enabled by passing `--noS1` as
an option. The gNB/UE will open a TUN interface which the interface names and
IP addresses `oaitun_enb1`/10.0.1.1, and `oaitun_ue1`/10.0.1.2, respectively.
You can then use these interfaces to send traffic, e.g.,
```bash
iperf -sui1 -B 10.0.1.2
```
to open an iperf server on the UE side, and
```bash
iperf -uc 10.0.1.2 -B 10.0.1.1 -i1 -t10 -b1M
```
to send data from the gNB down to the UE.
> Note that this does not work if both interfaces are on the same host. We
recommend to use two different hosts, or at least network namespaces, to route
traffic through the gNB/UE tunnel.
This option is only really helpful for phy-test/do-ra (see below) modes, in
which the UE does not connect to a core network. If the UE connects to a core
network, it receives an IP address for which it automatically opens a network
interface.
### do-ra setup with OAI
The do-ra flag is used to ran the NR Random Access procedures in contention-free mode. Currently OAI implements the RACH process from Msg1 to Msg3.
In order to run the RA, the `--do-ra` flag is needed for both the gNB and the UE.
In do-ra mode it is possible to mimic the reception of UE Capabilities at gNB through the command line parameter `--uecap_file`. Refer to the [UE Capabilities](#UE-Capabilities) section for more details.
To run using the RFsimulator:
```bash
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf --do-ra --rfsim
sudo ./nr-uesoftmodem --do-ra --rfsim --rfsimulator.[0].serveraddr 127.0.0.1
```
Using USRPs:
```bash
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf --do-ra
```
On a separate machine:
```bash
sudo ./nr-uesoftmodem --do-ra
```

View File

@@ -183,7 +183,6 @@ gNBs =
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
}
@@ -191,7 +190,6 @@ MACRLCs = (
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
}
);

View File

@@ -36,7 +36,7 @@ RUN wget http://fast.dpdk.org/rel/dpdk-20.11.9.tar.xz && \
ninja install -C build
## Build Fronthaul library
RUN git clone https://gerrit.o-ran-sc.org/r/o-du/phy.git /opt/phy && \
RUN git clone https://github.com/openairinterface/o-du-phy.git /opt/phy && \
cd /opt/phy && \
git checkout oran_f_release_v1.0 &&\
git apply /oai-ran/cmake_targets/tools/oran_fhi_integration_patches/F/oaioran_F.patch && \

View File

@@ -23,7 +23,7 @@ RUN wget http://fast.dpdk.org/rel/dpdk-20.11.9.tar.xz && \
ninja install -C build
## Build Fronthaul library
RUN git clone https://gerrit.o-ran-sc.org/r/o-du/phy.git /opt/phy && \
RUN git clone https://github.com/openairinterface/o-du-phy.git /opt/phy && \
cd /opt/phy && \
git checkout oran_f_release_v1.0 &&\
git apply /oai-ran/cmake_targets/tools/oran_fhi_integration_patches/F/oaioran_F.patch && \

View File

@@ -36,7 +36,7 @@ RUN wget http://fast.dpdk.org/rel/dpdk-20.11.9.tar.xz && \
ninja install -C build
## Build Fronthaul library
RUN git clone https://gerrit.o-ran-sc.org/r/o-du/phy.git /opt/phy && \
RUN git clone https://github.com/openairinterface/o-du-phy.git /opt/phy && \
cd /opt/phy && \
git checkout oran_f_release_v1.0 &&\
git apply /oai-ran/cmake_targets/tools/oran_fhi_integration_patches/F/oaioran_F.patch && \

View File

@@ -300,8 +300,6 @@ void init_UE(int nb_inst,
UE_thread,
(void *)UE), "");
}
printf("UE threads created by %ld\n", gettid());
}
// Initiating all UEs within a single set of threads for PHY_STUB. Future extensions -> multiple

View File

@@ -22,7 +22,6 @@
#include "PHY/LTE_TRANSPORT/if4_tools.h"
#include "PHY/types.h"
#include "PHY/defs_nr_common.h"
#include "PHY/phy_extern.h"
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
@@ -982,7 +981,7 @@ 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, gNB->frame_parms.nb_antennas_rx, SEARCH_EXIST);
find_nr_prach(&gNB->prach_list, proc->frame_rx, proc->tti_rx, gNB->frame_parms.nb_antennas_rx, NR_SEARCH_EXIST);
if (p) {
// need to extract RACH data for later processing by rx_nr_prach()
rx_nr_prach_ru(p, ru->common.rxdata, ru->nr_frame_parms, ru->N_TA_offset);
@@ -1016,7 +1015,6 @@ int nr_start_if(struct RU_t_s *ru, struct PHY_VARS_gNB_s *gNB) {
for (int i = 0; i < ru->nb_rx; i++)
ru->openair0_cfg.rxbase[i] = ru->common.rxdata[i];
ru->openair0_cfg.rxsize = ru->nr_frame_parms->samples_per_subframe*10;
reset_meas(&ru->ifdevice.tx_fhaul);
return ru->ifdevice.trx_start_func(&ru->ifdevice);
}

View File

@@ -30,7 +30,6 @@
#include <sys/sysinfo.h>
#include "radio/COMMON/common_lib.h"
#include "assertions.h"
#include "PHY/types.h"
/* help strings definition for command line options, used in CMDLINE_XXX_DESC macros and printed when -h option is used */
#define CONFIG_HLP_DLMCS_PHYTEST "Set the downlink MCS for PHYTEST mode\n"

View File

@@ -55,7 +55,6 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "gnb_paramdef.h"
#include "intertask_interface.h"
#include "nfapi/oai_integration/vendor_ext.h"
#include "nfapi_interface.h"
#include "nfapi_nr_interface_scf.h"
#include "ngap_gNB.h"
#include "nr-softmodem-common.h"
@@ -595,7 +594,6 @@ int main( int argc, char **argv ) {
: TIME_SOURCE_REALTIME);
// start the main threads
number_of_cards = 1;
wait_gNBs();
int sl_ahead = NFAPI_MODE == NFAPI_MODE_AERIAL ? 0 : 6;

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