Compare commits

..

535 Commits

Author SHA1 Message Date
Raymond Knopp
85f62d5e82 Merge remote-tracking branch 'origin/precoder_optimization' into testing_rk_precoder 2025-09-19 15:56:23 +02:00
Raymond Knopp
3675d21ce4 Merge branch 'develop' into tx_symbol_processing 2025-09-19 15:49:05 +02:00
Robert Schmidt
5b5c06449a Fix: define_property() needs FULL_DOCS
define_property() has optional FULL_DOCS in cmake 3.23+, but before it's
required. I did not notice when adding this.
2025-09-19 09:07:36 +02:00
Robert Schmidt
7ff0a7c8bb Add bands for neighbour configuration in HO CI pipeline
Since !3531, the band is mandatory in a neighbour configuration.

See also: fd4de3c720 ("Add support for band in neighbourConfiguration")
2025-09-19 09:07:36 +02:00
Robert Schmidt
bd815a373a Doc: Add PhySim-Gracehopper and update existing PhySim-Cluster 2025-09-19 09:07:36 +02:00
Robert Schmidt
4f9579e787 Add PhySim-GraceHopper-5G to test pipelines 2025-09-19 09:07:36 +02:00
Robert Schmidt
1ccb8f702f Slight restructuring of the physim doc
Move info about pipelines to the introduction instead of somewhere in
the middle. Add some filler text, and fix indentation headings.
2025-09-19 09:07:36 +02:00
Robert Schmidt
f400b51143 Print results of physims
Remove the runtime, which is not interesting, and add instead
- test name and if the test failed
- the threshold checks, if any, and
- possible additional information about test failures.
2025-09-19 09:07:36 +02:00
Robert Schmidt
f3a5bf34f4 Pass CTest test description in custom property or environment
Prior to this change, each test would have, as label, it's description.
This leads to many labels, which are normally reserved for grouping
tests. Move the description into a custom property instead.

Since we rely on the JSON output for the generation of HTML reports, we
need to also extract the description from the generated JSON. However,
custom properties are only logged starting from cmake 3.30. For
back-wards compatibility, write an additional, separate environment
variable TEST_DESCRIPTION from which the description can be read as a
fallback.

For the add_timed_physim_test(), this has been already done in a parent
commit.
2025-09-19 09:07:36 +02:00
Robert Schmidt
1fdff427cc Put physim status info in separate box
A follow-up commit will introduce a change to print timing logs in the
HTML (if present in the test). Prepare for this with separate box.
2025-09-19 09:07:36 +02:00
Robert Schmidt
de6f62a051 Physim deploy(): add deployment timeout 2025-09-19 09:07:36 +02:00
Robert Schmidt
53e038aa8e Rename to analyze_physim() 2025-09-19 09:07:36 +02:00
Robert Schmidt
218c65d6e8 Remove existing physim offload tests
After the parent commit, there is no need for these XML files anymore.
The tests are driven by ctest instead.
2025-09-19 09:07:36 +02:00
Robert Schmidt
fb2912922b Add new T2 Offload test 2025-09-19 09:07:36 +02:00
Robert Schmidt
6a22052f09 Add script to run PhySims from source
physim

script more
2025-09-19 09:07:36 +02:00
Robert Schmidt
ac5063b7b0 Import existing timing thresholds for offload tests
Imported using commands:

    xmlstarlet sel -t \
      -m '//testCaseList/testCase[class="Run_Physim"]' \
      -v "concat('check_physim_threshold(physim.5g-offload.',physim_test,'.testX.Y \"DLSCH encoding time\" \"< ', physim_time_threshold, '\")')" \
      -n t2_offload_enc_nr_dlsim.xml >> ../../openair1/SIMULATION/tests/ThresholdsOffload.cmake

    xmlstarlet sel -t \
      -m '//testCaseList/testCase[class="Run_Physim"]' \
      -v "concat('check_physim_threshold(physim.5g-offload.',physim_test,'.testX.Y \"ULSCH total decoding time\" \"< ', physim_time_threshold, '\")')" \
      -n t2_offload_dec_nr_ulsim.xml >> ../../openair1/SIMULATION/tests/ThresholdsOffload.cmake
2025-09-19 09:07:36 +02:00
Robert Schmidt
5b92198c43 Clean up output of xmlstarlet command 2025-09-19 09:07:36 +02:00
Robert Schmidt
e0882b0c32 Import Offload unit tests into CTest
The unit tests have been imported with this command:

    xmlstarlet sel -t
      -m '//testCaseList/testCase[class="Run_Physim"]' \
      -v "concat('add_timed_physim_test(physim.5g-offload.',physim_test,'.testX.Y \"',desc,'\" ',physim_test,' ',physim_run_args,')')" \
      -n t2_offload_enc_nr_dlsim.xml t2_offload_dec_nr_ulsim.xml >> ../../openair1/SIMULATION/tests/CMakeLists.txt

The next commit will further cleanup this output. I commit it like this
for verification purposes.
2025-09-19 09:07:36 +02:00
Robert Schmidt
49793a6695 Provide add_timed_physim_test() in cmake
Add two new macros that allow to register physim tests for ctest,
including timing thresholds that should be fulfilled.

First, add_timed_physim_test() registers a new test using a helper
script RunTimedTest.cmake. This is because after test execution, we need
to analyze logs, and the recommended way to do multiple steps in one
test is via a helper cmake script:
https://cmake.org/pipermail/cmake-developers/2016-February/027816.html

Second, check_physim_threshold() adds new thresholds. It takes a text to
be parsed, and a condition (e.g., "< 20") to check for the number
following the threshold (which is assumed to be present right after the
threshold). It uses a test property to count the total number of checks
(limiting them to 10), and sets environment variables for the script.  I
initially planned to use a test property for checks, but those are only
valid in the same directory, and RunTimedTest.cmake seems to be assumed
by cmake to be "elsewhere", hence I needed to resort to environment
variables.

RunTimedTest.cmake is called through cmake with the test parameters and
checks. It re-constructs a list of checks [1], runs the test, and pipes
the log into a separate script that is passed all checks (see below).
Afterwards, it verifies that both the test and script passed.

A script analyze-timing.sh builds an awk script from the checks passed.
The script analyzes each line of the test output for the threshold, and
compares against the threshold. analyze-timing.sh returns success if all
checks passed.

[1] I did not manage to pass a "list" of checks in a single environment
variable through the check_physim_threshold(), which would be simpler.
2025-09-19 09:07:36 +02:00
Robert Schmidt
aadf58d515 Remove LDPC GPU physim tests
Many of these tests do not pass (ldpctest returns non-zero output).
Moving to ctest would make all these tests and hence the pipeline fail.
2025-09-19 09:07:36 +02:00
Robert Schmidt
f6f40ccbfc add_physim_test(): change signature for full test name
Change signature of the macro to take the full test name, a separate
description (previously called a label?), and the executable and test
invocation. The overall signature becomes easier.

The rational for the full test name is that a later commit will
introduce the possibility to define physim tests that are checked for
specific times, in which case we need to reuse the test name. Thus,
using the full name from the beginning leads to more clarity, even
though they are a bit longer.

Add an additional safety check that the given simulator is actually a
target defined within the project (in other words, it actually exists).

Update the documentation correspondingly.
2025-09-19 09:07:36 +02:00
Robert Schmidt
6d05612e14 Add new Physim test for gracehopper 2025-09-19 09:07:36 +02:00
Robert Schmidt
58fedcdf84 Deployment script of physims via docker 2025-09-19 09:07:36 +02:00
Robert Schmidt
92a4a96460 Add Dockerfile for physim build in CI 2025-09-19 09:07:36 +02:00
Robert Schmidt
312ff87ed0 Move PhySim definition to openair1/SIMULATION/tests
Most (but not all) physical simulators are defined under
openair1/SIMULATION/. Defining physical simulators below there seems to
be the more "obvious" directory anyway, as the physical simulators are

    openair1/SIMULATION/tests
    Phy(L1)  Sim        tests => PhySim (tests)
2025-09-19 09:07:36 +02:00
Robert Schmidt
0c58e58efb Query system info 2025-09-19 09:07:36 +02:00
Robert Schmidt
1e628e9e1a Rename to deploy_physim()
deploy_oc_physim() is not specific to OpenShift anymore, so rename to a
neutral name.
2025-09-19 09:07:36 +02:00
Robert Schmidt
bf2a116ba7 Rename PhySim deployment task to Deploy_Run_OC_PhySim
A future commit will introduce the possibility to deploy physims using
docker, so rename the current step to reflect that it works via
OpenShift.
2025-09-19 09:07:36 +02:00
Robert Schmidt
8396d90c37 CI: Generalizce deploy_oc_physim()
A future commit will enable to deploy physical simulators via docker.
Hence:

- Move the script to run out of deploy_oc_physim(), to make it more
  generic (later commits will introduce other scripts)
- pass the working directory (the function will be moved into
  cls_oaicitest, as it fits neither cls_containerize nor cls_cluster
  when deploying the tests from source)
- not using ci-scripts: don't hardcode a specific path, just use the
  working directory
- avoid helm-specific pods summary, and put it into the general "physim
  logs"
- remove helm-specific "release", and use a generic name for results
- always log pod logs and status to debug, even if deployment was not
  successful or tests did not finish.
2025-09-19 09:07:36 +02:00
Robert Schmidt
e72daf3603 CI PhySims: archive LastTest.log
LastTest.log has logs of all tests. It is a raw file from which we
generate per-test logs, but it is useful to also archive this in case we
need it.
2025-09-19 09:07:36 +02:00
Robert Schmidt
9630007e1f CI: Harmonize exec_script() API
Instead of making the function a class member, make it an instance
member because (1) it is more aligned with other functions, notably,
run(), and (2) especially for RemoteCmd() it can be faster, as
successive exec_script() calls do not require a new SSH connection.
2025-09-19 09:07:36 +02:00
Robert Schmidt
62f9a286c6 Remove superfluous HTML.CreateHtmlTabFooter()
CreateHtmlTabFooter() is already called in main.py, at the end of an
XML. This is enough, the others are "duplicates" that are not necessary.
2025-09-19 09:07:36 +02:00
Robert Schmidt
c1c9c39e46 HTML report: Update to 2025 2025-09-19 09:07:36 +02:00
Calvin Peyron
682728f58f Physim doc: mention unmaintained simulators 2025-09-19 09:07:36 +02:00
Reem Bahsoun
d7f90ae364 Add the Handover pipeline to the RAN-Container-Parent 2025-09-19 09:07:36 +02:00
Reem Bahsoun
f765b6bd80 Add the required files for Handover CI setup (.conf, .yml, .xml) 2025-09-19 09:07:36 +02:00
Reem Bahsoun
bb703f8eca Add UE host (raspix) and OC CN for HO CI setup 2025-09-19 09:07:36 +02:00
Robert Schmidt
60dd8eec7f Do not trigger ul failure in measgap scheduling and standardize the verification if MAC is active in other scheduling functions 2025-09-19 09:07:35 +02:00
rmagueta
cf6b6d4428 Refactor and minor improvements in get_MeasConfig function 2025-09-19 09:06:43 +02:00
rmagueta
affe31a299 Add support for band in neighbourConfiguration 2025-09-19 09:06:43 +02:00
francescomani
80e35875fe common function to generate csi_MeasConfig
(also used to get the correct CSI meas structure in case of BWP switch)
2025-09-19 09:06:43 +02:00
francescomani
5c96e592d9 clone cellGroup for BWP switch to avoid removing BWP currently in use from gNB list 2025-09-19 09:06:43 +02:00
francescomani
564e7807ff bugfix in BWP release at UE 2025-09-19 09:06:43 +02:00
francescomani
bdbcc70420 include missing harq information in phy-sim nr_mac_config_t initialization 2025-09-19 09:06:43 +02:00
francescomani
e5bddca656 option to trigger reconfiguration with BWP switching 2025-09-19 09:06:43 +02:00
francescomani
a86455ebf0 configure only 1 BWP at a given time (1st active BWP) 2025-09-19 09:06:43 +02:00
francescomani
84f02dc511 separate functions to configure initial BWPs 2025-09-19 09:06:43 +02:00
francescomani
78f3d0e642 rework BWP configuration via file 2025-09-19 09:06:43 +02:00
francescomani
139038735d formatting and refactoring with intermediate variable names to avoid too long lines 2025-09-19 09:06:43 +02:00
francescomani
6cc2fc6407 function to determine max UL MIMO layers 2025-09-19 09:06:43 +02:00
francescomani
d768a94c42 rework PTRS configuration via file 2025-09-19 09:06:43 +02:00
Robert Schmidt
60b6a8f363 Add TDD pattern config asserts
Check that the number of slots in period/symbols in mixed slot conforms
to what is prescribed by the spec.
2025-09-19 09:06:43 +02:00
Robert Schmidt
33ecb1ce9c Modify CI SA 60MHz 2x2 test to be DSUUU
Update configuration and tweak iperf thresholds accordingly. Tune some
parameters for good UL reception.
2025-09-19 09:06:43 +02:00
Robert Schmidt
20545d63ab Remove ulsch_max_frame_inactivity from CI configs
The parameter is either set to 10 (the default, so not necessary), or to
0 forcing the gNB to schedule the UE all the time, which is only
necessary in specific scenario, and here simply wrong.
2025-09-19 09:06:43 +02:00
Robert Schmidt
7d60c3e103 Increase periodic BSR to 5ms: increase UL throughput
In high throughput UL scenarios, at least with our configuration, the UE
only sends Short BSR. The maximum is 300000 bytes, which is completely
"scheduled away" after a couple of UL grants. Increase the periodic BSR
to 5ms to get more BSR, which results in higher UL throughput.
2025-09-19 09:06:43 +02:00
Robert Schmidt
18a7fa3785 Reset sched_ul_bytes on BSR to tend to overestimation
On BSR reception, reset sched_ul_bytes. This change means that we assume
that no data is "in flight" for this UE at time of BSR reception, or,
put differently, that we overestimate the buffer size at UE (in the
worst case).

To illustrate this, consider the following traces before/after this
change.

Before this change: Upon BSR reception, the estimated BSR of the UE is
reset, but the gNB still accounts for data "in flight". It is visible
that the calculated buffer size (estimated - scheduled) quickly goes to
zero, and we don't use all resources, despite the buffer still being
full. The maximum application throughput in this run was ~220Mbps.

    [NR_MAC]   SHORT BSR at  773.19, est buf 300000
    [NR_MAC]   ULSCH/PUSCH:  774. 6 RNTI af8e UL sched  774. 9 PRB start  0:162 TDA  2 TBS 32797 est 300000 sched 152704 est BSR 147296 TPC 1
    [NR_MAC]   ULSCH/PUSCH:  774. 6 RNTI af8e UL sched  774.11 PRB start  0:162 TDA  4 TBS 7172 est 300000 sched 159876 est BSR 140124 TPC 1
    [NR_MAC]   ULSCH/PUSCH:  774.10 RNTI af8e UL sched  774.12 PRB start  0:162 TDA  0 TBS 32797 est 292845 sched 185501 est BSR 107344 TPC 1
    [NR_MAC]   ULSCH/PUSCH:  774.10 RNTI af8e UL sched  774.13 PRB start  0:162 TDA  2 TBS 32797 est 292845 sched 218298 est BSR  74547 TPC 1
    [NR_MAC]   ULSCH/PUSCH:  774.11 RNTI af8e UL sched  774.14 PRB start  0:162 TDA  2 TBS 32797 est 260117 sched 218298 est BSR  41819 TPC 1
    [NR_MAC]   ULSCH/PUSCH:  774.11 RNTI af8e UL sched  774.16 PRB start  0:162 TDA  4 TBS 7172 est 260117 sched 225470 est BSR  34647 TPC 1
    [NR_MAC]   ULSCH/PUSCH:  774.15 RNTI af8e UL sched  774.17 PRB start  0: 35 TDA  0 TBS 7172 est 220236 sched 185501 est BSR  34735 TPC 1
    [NR_MAC]   ULSCH/PUSCH:  774.15 RNTI af8e UL sched  774.18 PRB start  0:162 TDA  2 TBS 32797 est 220236 sched 218298 est BSR   1938 TPC 1
    [NR_MAC]   ULSCH/PUSCH:  774.16 RNTI af8e UL sched  774.19 PRB start  0: 10 TDA  2 TBS 2017 est 187508 sched 187518 est BSR    -10 TPC 1
    [NR_MAC]   SHORT BSR at  774. 9, est buf 300000
    [NR_MAC]   ULSCH/PUSCH:  775. 0 RNTI af8e UL sched  775. 2 PRB start  0:162 TDA  0 TBS 32797 est 260117 sched 147549 est BSR 112568 TPC 1
    [NR_MAC]   ULSCH/PUSCH:  775. 0 RNTI af8e UL sched  775. 3 PRB start  0:162 TDA  2 TBS 32797 est 260117 sched 180346 est BSR  79771 TPC 1
    [NR_MAC]   ULSCH/PUSCH:  775. 1 RNTI af8e UL sched  775. 4 PRB start  0:162 TDA  2 TBS 32797 est 227389 sched 180346 est BSR  47043 TPC 1
    [NR_MAC]   ULSCH/PUSCH:  775. 1 RNTI af8e UL sched  775. 6 PRB start  0:162 TDA  4 TBS 7172 est 227389 sched 187518 est BSR  39871 TPC 1
    [NR_MAC]   ULSCH/PUSCH:  775. 5 RNTI af8e UL sched  775. 7 PRB start  0:162 TDA  0 TBS 32797 est 180353 sched 173174 est BSR   7179 TPC 1
    [NR_MAC]   ULSCH/PUSCH:  775. 5 RNTI af8e UL sched  775. 8 PRB start  0: 36 TDA  2 TBS 7298 est 180353 sched 180472 est BSR   -119 TPC 1

After this change: The gNB resets the number of bytes "in flight"
(sched). Thus, the calculated buffer is larger, and does not "run out"
before a new BSR arrives (which still indicates the maximum). The UE is
thus allocated all resources, but we might overestimate some resources.
The maximum application throughput in this run was ~300Mbps, limited by
MCS and not by estimated buffer size as in the previous case.

    [NR_MAC]   SHORT BSR at   43. 3, est buf 300000
    [NR_MAC]   ULSCH/PUSCH:   43.15 RNTI d3ea UL sched   43.17 PRB start  0:162 TDA  0 TBS 36897 est 263180 sched  36897 est BSR 226283 TPC 1
    [NR_MAC]   ULSCH/PUSCH:   43.15 RNTI d3ea UL sched   43.18 PRB start  0:162 TDA  2 TBS 36897 est 263180 sched  73794 est BSR 189386 TPC 1
    [NR_MAC]   ULSCH/PUSCH:   43.16 RNTI d3ea UL sched   43.19 PRB start 12:150 TDA  2 TBS 33822 est 263180 sched 107616 est BSR 155564 TPC 1
    [NR_MAC]   ULSCH/PUSCH:   43.16 RNTI d3ea UL sched   44. 1 PRB start  0:162 TDA  4 TBS 7941 est 263180 sched 115557 est BSR 147623 TPC 1
    [NR_MAC]   ULSCH/PUSCH:   44. 1 RNTI d3ea UL sched   44. 3 PRB start  0:162 TDA  0 TBS 36897 est 173698 sched  25881 est BSR 147817 TPC 1
    [NR_MAC]   ULSCH/PUSCH:   44. 1 RNTI d3ea UL sched   44. 4 PRB start  0:162 TDA  2 TBS 36897 est 173698 sched  62778 est BSR 110920 TPC 1
    [NR_MAC]   ULSCH/PUSCH:   44. 1 RNTI d3ea UL sched   44. 6 PRB start  0:162 TDA  4 TBS 7941 est 173698 sched  70719 est BSR 102979 TPC 1
    [NR_MAC]   SHORT BSR at   43.13, est buf 300000
    [NR_MAC]   ULSCH/PUSCH:   44. 5 RNTI d3ea UL sched   44. 7 PRB start  0:162 TDA  0 TBS 36897 est 292079 sched  36897 est BSR 255182 TPC 1
    [NR_MAC]   ULSCH/PUSCH:   44. 5 RNTI d3ea UL sched   44. 8 PRB start  0:162 TDA  2 TBS 36897 est 292079 sched  73794 est BSR 218285 TPC 1
    [NR_MAC]   ULSCH/PUSCH:   44. 6 RNTI d3ea UL sched   44. 9 PRB start  0:162 TDA  2 TBS 36897 est 292079 sched 110691 est BSR 181388 TPC 1
    [NR_MAC]   ULSCH/PUSCH:   44. 6 RNTI d3ea UL sched   44.11 PRB start  0:162 TDA  4 TBS 7941 est 292079 sched 118632 est BSR 173447 TPC 1
    [NR_MAC]   ULSCH/PUSCH:   44.10 RNTI d3ea UL sched   44.12 PRB start  0:162 TDA  0 TBS 36897 est 213587 sched  39972 est BSR 173615 TPC 1
    [NR_MAC]   ULSCH/PUSCH:   44.10 RNTI d3ea UL sched   44.13 PRB start  0:162 TDA  2 TBS 36897 est 213587 sched  76869 est BSR 136718 TPC 1
2025-09-19 09:06:43 +02:00
Robert Schmidt
bcb8382b96 Add documentation on UL-heavy TDD patterns 2025-09-19 09:06:43 +02:00
Francesco Mani
2410b37611 Save PUSCH information for each (re-)transmission
Instead of only saving this information in the first transmission, also
store it on each retransmission. This should ensure that if some
information changes, we always relate to the last transmission. For
instance, power control information might have changed, and should be
considered in subsequent rounds, if necessary. It also simplifies code.

Fixes: 6294ce715e ("Reorder pf_ul to process retransmission")
2025-09-19 09:06:43 +02:00
Robert Schmidt
d62286a2de UL TDA: ensure we reach Msg3 in all cases
In at least the case of mu=1, min_rxtxtime=2 and DDDSU with no UL
symbols (for ULSCH) in the mixed slot, the current state of code does
not allow a UE to attach.  This is because at mu=1, Msg3 is k2+delta,
where k2=min_rxtxtime and delta(mu)=3.

Prior, this special case was handled because we had a dedicated Msg3
TDA, which in most cases is not necessary (because the mixed slot
allocates the DCI, and the following mixed slot has the UL grant). Add
code that tries to ensure that we only add the Msg3 TDA in cases when we
need it.

Fixes: 961a646dc7 ("Remove dedicated Msg3 TDA")
2025-09-19 09:06:43 +02:00
Robert Schmidt
faab8d6da2 Ensure that retransmission uses TDA as indicated
Previously, the TDA reuse condition was wrong: for multiple TDAs with
different k2, the symbol allocation might be the same, in which the
previous logic was using the wrong TDA. Fix the condition, and insert an
assert to ensure the allocated TDA is correct.
2025-09-19 09:06:43 +02:00
Robert Schmidt
9baab451a5 UL TDA for SRS: set correct right k2
We need to set the different k2 values according to the number of UL
slots, not all to the same k2.
2025-09-19 09:06:43 +02:00
Robert Schmidt
bad52220ab Fix: only create mixed slot UL TDU for more than 1 symbol
For PUSCH, we need at least 2 symbols, so ensure when creating the TDA.
2025-09-19 09:06:43 +02:00
francescomani
1ab78fe6ed fix bug in computing number of LCG IDs with data at UE 2025-09-19 09:06:43 +02:00
Thomas Schlichter
df2b033d67 update doc/MAC/mac-usage.md 2025-09-19 09:06:43 +02:00
Thomas Schlichter
37ab89ba36 enable SSB-SINR reporting for NTN GEO scenario 2025-09-19 09:06:43 +02:00
Thomas Schlichter
bceaadc272 nr_ulsim: fix computation of the scrambling errors
The array ul_harq_processes[harq_pid].f contains the data as bits, not bytes.
2025-09-19 09:06:43 +02:00
Thomas Schlichter
186cc1d796 nr_dlsim: several fixes for low SNR scenarios
If the DCI in PDCCH is not correctly received, no PDSCH would be decoded but counted as no error.
Also if the DCI was not correctly received, a TBS of 0 would be used in some computations and memory allocations.

Fix these not counting if there is no PDSCH decoding, and by using the known TBS instead of the one received from the DCI.
2025-09-19 09:06:43 +02:00
Thomas Schlichter
237f8bbf0c NR UE: make the power averaging IIR filter faster
Especially high initial noise levels would stay too long and negatively impact the accuracy of later S(I)NR computations.
2025-09-19 09:06:43 +02:00
Thomas Schlichter
2c1a655e72 gNB: consider the measured PUSCH SNR when computing the UL MCS if only one round is used 2025-09-19 09:06:43 +02:00
Thomas Schlichter
493d67b763 gNB: consider also the min_mcs when computing the DL MCS if only one round is used 2025-09-19 09:06:43 +02:00
Thomas Schlichter
f878df579a gNB: adjust the dl_max_mcs based on the reported SSB-SINR 2025-09-19 09:06:43 +02:00
Thomas Schlichter
df25e2c438 gNB: add SSB-SINR measurement values to the MAC statistics output 2025-09-19 09:06:43 +02:00
Thomas Schlichter
e7c18ccd90 gNB: compute and store SSB-SINR in dB instead of just the SINR-index 2025-09-19 09:06:43 +02:00
Nick Hedberg
fbe6275cd7 Populate sampled_ue_antennas 2025-09-19 09:06:43 +02:00
Reem Bahsoun
9e075d8153 New cuBB image compiled with -DSCF_FAPI_10_04_SRS=ON flag
This flag will be used to compile the cuBB regardless of the use of SRS
This is due to the RX_Beamforming PDU that's used following 222.10.04
2025-09-19 09:06:42 +02:00
Rúben Soares Silva
7a4466c2f4 Alter Aerial documentation to mention mandatory L1 compilation flag 2025-09-19 09:06:42 +02:00
Florian Kaltenberger
1a0c4cadde Revert "Removed TRP-scheme byte from UL BF PDU to Interop with Aerial 25-1 (FAPI 10.02)"
This commit broke compatibility with Aerial when compiled with -DSCF_FAPI_10_04_SRS=ON. It was decided that this should become the default.

This reverts commit 8beb382277.
2025-09-19 09:06:42 +02:00
Guido Casati
6fd20e5394 Fix AMF related prints in NGAP 2025-09-19 09:06:42 +02:00
Guido Casati
b5e0e18b8f Fix PLMN prints in NGAP/RRC
Also, replace NGAP_X with LOG_X to avoid false-positive format warnings in clang.

Closes #985
2025-09-19 09:06:42 +02:00
Guido Casati
6427902627 Replace ngap_plmn_identity_t with plmn_id_t and use proper size for TAI List for Paging
Use platform type plmn_id_t to simplify the code.

TAI List for Paging in NGAP PAGING message (9.2.4.1 3GPP TS 38.413)
is limited to 16.
2025-09-19 09:06:42 +02:00
Laurent THOMAS
949b8b6e9b refine the LTE prach fix from cppcheck error detection 2025-09-19 09:06:42 +02:00
Laurent THOMAS
0ca5a2bb6a array test overflow and possible divide by 0 fixes 2025-09-19 09:06:42 +02:00
Laurent THOMAS
cb32df526e return a error case before a SEGV if the pointer is null 2025-09-19 09:06:42 +02:00
Laurent THOMAS
b4dbdf50fd fix as i can a error detected by cppcheck, w[lprime] is only 0, 1 or -1 2025-09-19 09:06:42 +02:00
Laurent THOMAS
7498cda438 avoid a cppcheck warning 2025-09-19 09:06:42 +02:00
Laurent THOMAS
434244ae16 fix lack of test for fopen() return value 2025-09-19 09:06:42 +02:00
Laurent THOMAS
b8984859df fix printf() format errors 2025-09-19 09:06:42 +02:00
Laurent THOMAS
5e7b724dc3 fix several not tested malloc or calloc return value 2025-09-19 09:06:42 +02:00
francescomani
8a398e815b reset MSG3 C-RNTI flag in case of MAC reset 2025-09-19 09:06:42 +02:00
Romain Beurdouche
2437b67950 fix(ldpc_aal): Documentation
The tuning of the BLER is necessary for Intel ACC, not for the T2.
2025-09-19 09:06:42 +02:00
Romain Beurdouche
fe6e780848 fix(ldpc_aal): Update documentation
Update the documentation to reflect that the DPDK core list is not
anymore necessary when using FHI 7.2.
2025-09-19 09:06:42 +02:00
Romain Beurdouche
fd04e8cf6f feat(ldpc_aal): Do not initialize EAL if it is already initialized
When FHI 7.2 is enabled, the EAL initialization is done by the FHI and
the attempt to init EAL by ldpc_aal will fail.
In that case, it is not necessary neither to provide a DPDK core list
for BBDEV.

This commit offers to skip EAL initialization if it is already initialized
in order to allow dropping the useless DPDK cores argument in that case.
The change relies on `rte_dev_probe` to detect if EAL was already
initialized.
2025-09-19 09:06:42 +02:00
alexjiao
d9b698098e Fix for function compute_csi_rm_unav_res 2025-09-19 09:06:42 +02:00
alexjiao
0383d077c8 NR UE: add support for PDSCH rate matching with NZP CSI-RS
Currently only ZP CSI-RS is considered in function configure_ratematching_csi,
add support for NZP CSI-RS.
2025-09-19 09:06:42 +02:00
Reem Bahsoun
c12ff2324d Replace old nvIPC library with the new one 2025-09-19 09:06:42 +02:00
Reem Bahsoun
4b220e4f9e Change cuBB tag to release 25-2 in YAML and documentation 2025-09-19 09:06:42 +02:00
ndomingues
58c805213c Fix RA 2-Step MgsB Ack at UE
Update condition to prepare MsgB Ack the same way as Msg4 Ack
2025-09-19 09:06:42 +02:00
francescomani
a8dd95f2b5 fix max feedback time parameter (needs to be computed every time we have that information) 2025-09-19 09:06:42 +02:00
Robert Schmidt
649efe8ca4 UL scheduler log: print TDA, it has more info 2025-09-19 09:06:42 +02:00
francescomani
46d773e91f adding other missing beam reaset in RA functions 2025-09-19 09:06:42 +02:00
francescomani
fce360098b adding a missing beam reaset in pf_dl 2025-09-19 09:06:42 +02:00
francescomani
98f4324883 remove unnecessary input in get_cce_index 2025-09-19 09:06:42 +02:00
Raymond Knopp
921e160e5c Add changes for avx512/aarch64 ldpc encoder optimizations
newly-generated files for innermost part of the parity bit
generation which, for AVX512, uses the mm512_permutex2var_epi8
instruction and for 128-bit (aarch64) the mm_alignr_epi8 (vextq_s8) in
the computation corresponding to each non-zero bit of the H matrix.

It is generated with ldpctest -n0 -g1. the changes for this are in a
future MR.  I did these changes to compare with the GPU version
(ldpc_encoder_cuda), so that the CPU version is as fast as possible. The
generator will come when we merge the GPU encoder/decoder which also has
a generator for the CUDA version. it was difficult to extract the
changes in ldpctest/ldpc_encoder.c so I just took the generated file.

This allows for removing a very large memcpy and reduces the memory
demand for the parity matrix computation. For the moment this is limited
to largest case in BG1, namely Zc=384. This is the only format used when
the number of segments after codeblock segmentation is large (>8).  This
improves the timing required for ldpc parity bits generation by more
than a factor 2 with AVX512. This significantly reduces the total time
to generate the DLSCH/PDSCH
2025-09-19 09:06:42 +02:00
Raymond Knopp
4a2b1afdb1 Add reset of dlsch_precoding timing counter in nr_dlsim 2025-09-19 09:06:42 +02:00
Raymond Knopp
b45a94cc5f addition of aarch64 native implementation for rotate_cpx_vector for the case output_shift=15 2025-09-19 09:06:42 +02:00
Raymond Knopp
8ff5a08d2a Change target architecture in arm container build to armv8.2-a
This enables some additional instructions needed in the follow-up
commit.
2025-09-19 09:06:42 +02:00
Robert Schmidt
4662791a7b Simplify cross-compilation Dockerfile
Redirect to files and manual analysis as done in this Dockerfile is not
necessary since we just output all relevant build files to stdout.
Simplify to do the same here.

See: 35361db76b ("build_oai: don't redirect compilations to a file")
2025-09-19 09:06:42 +02:00
Robert Schmidt
c979915cd4 Increase DL UDP traffic for OAIUE OTA pipeline 2025-09-19 09:06:42 +02:00
Robert Schmidt
64eb202904 Fix RX gain for OAIUE-OTA pipeline
Adjust to avoid increased ULSCH DTX, probably because of saturation.

Fixes: 69cb71eddc ("Adjust configuration for OAI OTA test")
2025-09-19 09:06:42 +02:00
Robert Schmidt
8b48e472a3 Adjust configuration for OAI OTA test 2025-09-19 09:06:42 +02:00
Jaroslava Fiedlerova
ee0259072b CI: update XML and yaml files for 10 UEs/process RFSim test 2025-09-19 09:06:42 +02:00
Bartosz Podrygajlo
aaad6505b4 Fix NR UE mislabeling MSG2 as DLSCH PDU 2025-09-19 09:06:42 +02:00
Bartosz Podrygajlo
91e2475e85 Add RFSim 10 UEs/process RFSim test
Add an RFSim test for 10 UEs in a single process.
2025-09-19 09:06:42 +02:00
Bartosz Podrygajlo
6bfa5787bf Make openair0_cfg thread safe
Move openair0_cfg to PHY_VARS_NR_UE making it UE instance specific
and thread safe.
2025-09-19 09:06:42 +02:00
Bartosz Podrygajlo
3142fd70e0 Make map_current_symbol thread safe
Use local function pointers instead of static global variables.
2025-09-19 09:06:42 +02:00
Bartosz Podrygajlo
9749e5b05e Refactor RRC->MAC Communication: Replace ITTI with notifiedFIFO for Multi-UE Support
- Replaced ITTI message queues with notifiedFIFO for RRC to MAC communication in UE.
- Enables correct message delivery to multiple MAC instances running in parallel threads.
- Introduced `nr_mac_rrc_message_t` union for MAC-RRC messages.
- Updated all relevant message handling and initialization code to use notifiedFIFO.
2025-09-19 09:06:42 +02:00
Bartosz Podrygajlo
def9c8562d Add MAX_NUM_NR_UE_INST to NR UE MAC
- Use MAX_NUM_NR_UE_INST in NR UE MAC to control number of MAC instances.
 - Modify the MAC interface slightly so that nr_l2_init_ue only initializes one instance
2025-09-19 09:06:42 +02:00
Bartosz Podrygajlo
2f20d5f2c6 Use MAX_NUM_NR_UE_INST in RRC
Use MAX_NUM_NR_UE_INST for number of NR UE RRC instances. Change the RRC
interface slightly so nr_rrc_init_ue initializes only one RRC instance pointed
to by the id given to the function
2025-09-19 09:06:42 +02:00
Bartosz Podrygajlo
3bfe0c208a NR UE NAS: Use global define MAX_NUM_NR_UE_INST
Use NR UE global MAX_NUM_NR_UE_INST define instead of local define MAX_NAS_UE
2025-09-19 09:06:42 +02:00
Bartosz Podrygajlo
3645767918 Introduce MAX_NUM_NR_UE_INST
Add a new define for maximum number of NR UE per process
2025-09-19 09:06:42 +02:00
Bartosz Podrygajlo
e53a8b039a Add deregistration for all UE instances. 2025-09-19 09:06:42 +02:00
Cedric Roux
13a5d8cba6 T: replace 'subframe' by 'tick'
Some code in T tracers is used by both LTE and NR.

In LTE, we expect 10 subframes per frame, and the logging is done with
this assumption. We have one tick per subframe.

In NR, we deal with slots, not subframes. And we have n ticks per frame
(depending on mu). As of today, only n=20 is tested (corresponding to
mu=1).

A previous commit introduced 'subframes_per_frame' which had the correct
meaning for LTE but was truly 'slots per frame' for NR. This creates
confusion.

Let's replace 'subframe' by 'tick' to reduce confusion.
2025-09-19 09:06:42 +02:00
Cedric Roux
f96819a3db T: add a tracer 'gnb_mac'
To see MAC scheduling decisions. May be useful for debugging.
2025-09-19 09:06:42 +02:00
Cedric Roux
58f3a997ee T: add some traces
To be used by next commit.
2025-09-19 09:06:42 +02:00
Cedric Roux
63a2afdcdc T: fix a typo 2025-09-19 09:06:42 +02:00
Cedric Roux
9b32ff4644 T: make number of subframes per frame a configurable item
Think: NR with different number of slots per frame depending on mu.

The name 'subframes_per_frame' is a bit ambiguous. It is valid for LTE,
but for NR it should be 'slots_per_frame'.

For example, for sub-carrier spacing of 30KHz, we have 20 slots per
frame, so in this case subframes_per_frame = 20. In reality whatever
the numerology, there is always 10 subframes per frame in NR.

But how to name this variable which is used both for LTE and NR cases?
'subframes_or_slots_per_frame'? It's a bit long and also ambiguous.

Conclusion: no big deal I think. 'subframes_per_frame' and so be it.
2025-09-19 09:06:42 +02:00
Cedric Roux
2aaaa25bb7 T: tti view: add automax ability
Also, update a cmake file because compilation of the tracer 'ue' fails
otherwise.
2025-09-19 09:06:42 +02:00
Cedric Roux
382cdf719c T: scrolltti: handle tick discontinuities
For TDD.
2025-09-19 09:06:42 +02:00
Cedric Roux
b0f28ff9d2 T: throughputlog: handle tick discontinuities
Think: TDD.
2025-09-19 09:06:42 +02:00
Cedric Roux
ca52d66e9c T GUI: add a get_range() API function for xy_plot 2025-09-19 09:06:42 +02:00
Cedric Roux
b799ddff3e nr rlc: add an API function to retrieve the occupancy of TX list 2025-09-19 09:06:42 +02:00
Robert Schmidt
d046ab5c68 MBIM stop script: remove IP address
The CI detects whether a UE connected (and has a PDU session) by trying
to read the IP address. It therefore assumes that as long as the UE is
not connected, no IP would be present.

With the existing stop_quectel_mbim.sh script, this was not the case; it
would simply leave the IP address.  Modify this script to flush all IP
addresses on disconnect to remedy this.
2025-09-19 09:06:42 +02:00
Robert Schmidt
cbeffaa4c0 CI: Upgrade RFsim CNs to v2.1.10 2025-09-19 09:06:42 +02:00
Teodora
f52d46eb37 Update the FHI M-plane doc
Performance Management support explanation.

Example run modified according to:
- modification of the frequency offset, frame structure, fft size, cyclic prefix, and Tx gain;
- addition of the managed delay node;
for Tx/Rx endpoints.
2025-09-19 09:06:42 +02:00
Teodora
307dd79a57 Performance Management implementation
Introduced a parameter start_up_timing which indicates if PM activation is supported during the start-up
procedure. We initialize this parameter, based on the vendor.

Notification interval is set to 10s.
2025-09-19 09:06:42 +02:00
Teodora
1380f1e5ca Add support for RU username parameter for connection to a RU via M-plane
The "sudo" access group is required by OAI gNB.
2025-09-19 09:06:42 +02:00
Teodora
abcfe77f3c Rearrange <edit-config>, <validate>, and <commit> RPCs
Refactor these RPCs to facilitate their use in other Management functionalities,
not only Configuration Management.
2025-09-19 09:06:42 +02:00
Teodora
f17c31281d Add a comment for Rx gain correction
Definition in o-ran-uplane-conf.yang model:
"Gain correction of RF path linked with array element or array layers.
 Common part of overall gain_correction.
 gain_correction = common array-carrier gain-correction + eAxC gain correction."
2025-09-19 09:06:42 +02:00
Teodora
8e2614d1c3 Correct the Tx gain 2025-09-19 09:06:42 +02:00
Teodora
d25fdbc6aa Add managed delay node in Rx endpoint creation 2025-09-19 09:06:42 +02:00
Teodora
6dad657131 Correctly fill the cyclic prefix for Tx/Rx endpoints 2025-09-19 09:06:42 +02:00
Teodora
7af23aee06 Correctly fill the frame structure for Tx/Rx endpoints and fft size for Rx endpoints 2025-09-19 09:06:42 +02:00
Teodora
1d12132952 Properly pass the frequency offset to Tx/Rx endpoints 2025-09-19 09:06:42 +02:00
Teodora
e91ec53c25 Separate Tx/Rx endpoint creation
As per o-ran-uplane-conf model, some nodes exist in Rx but not in Tx
(e.g. "ul-fft-sampling-offsets"), and vice versa.
2025-09-19 09:06:42 +02:00
Teodora
5ebfa58d67 Set the correct yang node name for MTU retrieval 2025-09-19 09:06:42 +02:00
Robert Schmidt
deb8347d34 nfapi.md: fix link to current document 2025-09-19 09:06:42 +02:00
Rúben Soares Silva
53c91a0ac0 Skip unpacking SRS.indication TLV when report type is 0
Move the check for timing advance offset being 0xffff to before locking the scheduler
2025-09-19 09:06:42 +02:00
Rúben Soares Silva
4f677b8558 Change last_idx type to int16 to properly avoid unpacking if the tlv length is 0 2025-09-19 09:06:42 +02:00
Thomas Schlichter
6f07a2b73f NR UE: modify shift value in nr_dlsch_mmse() for improved performance 2025-09-19 09:06:42 +02:00
Bartosz Podrygajlo
ee931a71c8 Consider PDSCH EPRE to DMRS EPRE in NR UE 2025-09-19 09:06:42 +02:00
Robert Schmidt
42b16ad21e DLSCH sched: Fix coefficients for UE list ordering
Update the comparator() to properly sort UEs based on their coefficient
by appliey a consistent logic of -1/0/1 (see man qsort) for
smaller/equal/larger.  The previous logic was only sorting based on 0/1
(equal/larger), which would result in some UEs with a high coefficient
not necessarily advancing to the start of the list, which could reduce
the likelihood of them being scheduled when they actually should (in
other words, this should improve fairness).

See also: 62e4025bc8 ("Integrate inactivity scheduling into main
    allocation loop")
2025-09-19 09:06:42 +02:00
Robert Schmidt
172b1e86fe DLSCH sched: only sort relevant part of list
This reduces the amount of elements to compare.

See also: 7ee8e8eaba ("Fix bug: only sort relevant part of list")
2025-09-19 09:06:42 +02:00
francescomani
d7e378b04a fix for config UE TCI state ID 2025-09-19 09:06:42 +02:00
francescomani
be14295280 fix for UECAP F1 handling in dora/phytest mode 2025-09-19 09:06:42 +02:00
Romain Beurdouche
1f2770d7ae feat(rf_emulator): documentation 2025-09-19 09:06:42 +02:00
Robert Schmidt
4378431a32 CI: integrate RFemulator phytest in timing-phytest pipeline 2025-09-19 09:06:42 +02:00
Robert Schmidt
deb76e776e Remove --emulate-rf option and corresponding code
With the RFemulator, there is no need for a dedicated --emulate-rf
option anymore. For all uses of --emulate-rf, RFemulator should be used
instead.
2025-09-19 09:06:39 +02:00
Romain Beurdouche
7f8f6b134f feat(rf_emulator): Add parameters
Add two parameters:
* `enable_noise` to enable noise injection at TX
* `noise_level_dBFS` to set noise level
2025-09-19 09:05:19 +02:00
Romain Beurdouche
73a47770e6 feat(rf_emulator): Add late writes counter 2025-09-19 09:05:19 +02:00
Romain Beurdouche
8450e9918f feat(rf_emulator): Add noise generation 2025-09-19 09:05:19 +02:00
Romain Beurdouche
39458e2c48 feat(rf_emulator): Count late reads
Count late reads and print every second instead of printing each.
2025-09-19 09:05:19 +02:00
Romain Beurdouche
a3ff93088a feat(rf_emulator): Add a dummy RF library
Add a simple RF emulator library with no real RF.
It only synchronizes the gNB with the real time clock.
It is to be used for stress test or benchmarking in phy-test mode.
2025-09-19 09:05:19 +02:00
Romain Beurdouche
fdc9f961d2 feat(ldpc_aal): add decoding timer 2025-09-19 09:05:19 +02:00
Romain Beurdouche
d2f2ff301d feat(nr-gnb): Log decoding timers in the gNB
Log the LDPC reversed interleaving, reversed rate matching and decoding
time stats in nrL1_stats.log for the gNB.
2025-09-19 09:05:19 +02:00
Romain Beurdouche
fc475e84e8 feat(nr_ulsim): detailed ULSCH decoding timers
Add timers to provide ULSCH decoding time split between decoding,
rate recovery and deinterleaving.
2025-09-19 09:05:19 +02:00
Romain Beurdouche
ee14b06647 feat(time_meas): Standard deviation & merge
`diff_square` was not merged in `merge_meas` so that calculation of the
standard deviation was not working with merged timers.
2025-09-19 09:05:19 +02:00
Bartosz Podrygajlo
4a5eb5afe1 Rename VRTSIM cmake option to OAI_VRTSIM 2025-09-19 09:05:19 +02:00
Bartosz Podrygajlo
ca816601bb VRTsim: Add a timeout in taps client
Add a timeout in nanomsg receive code to allow the client
thread to exit cleanly.
2025-09-19 09:05:19 +02:00
Bartosz Podrygajlo
d49ffbec5a Update vrtsim documentation 2025-09-19 09:05:19 +02:00
Bartosz Podrygajlo
42ac85250d VRTSIM: allow client reconnection via a connection descriptor file
Replace the unwieldy unix socket implementation of peer information
exchange with an authorative connection descriptor file that
informs the client of the connection method an number of antennas
on the server.

This allows the server to run without the client and allows the
client to reconnect as long as the server is running, as many times
as needed.
2025-09-19 09:05:19 +02:00
Bartosz Podrygajlo
1098e7f202 Clean exit of vrtsim client if server is stopped first
Force exit in case current sample is not modified by the server with 2s.
2025-09-19 09:05:19 +02:00
Bartosz Podrygajlo
b33d2ede0e Make vrtsim output to stdout more readable. 2025-09-19 09:05:19 +02:00
Bartosz Podrygajlo
41e32a7215 Simplify shm td iq channel implementation
Move the channel state management outside the channel implementation.
This simplifies the channel implementation but forces users of the
channel to manage it's state manually.
2025-09-19 09:05:19 +02:00
Bartosz Podrygajlo
704ccdf778 Detect disconnecton & handle error states in vrtsim
Add handling for error states in vrtsim which allows to close the
softmodems with CTRL+C without hanging, improving user experience
 - Client detection of stale timer.
 - Abort state for client and server
2025-09-19 09:05:19 +02:00
Bartosz Podrygajlo
02fb2cd31b Taps client client for vrtsim
Added a libary that can connect to a channel emulator and provide taps
as they are generated.

 - Enable connection from vrtsim to channel emulation server
 - Depends on flatbuffers definition file from raytracing-channel-emulator
 - Depends on libanomsg-dev and flatbuffers-compiler (Ubuntu) or equivalent
 - Added a compile time option ENABLE_TAPS_CLIENT to prevent other users
   from being affected by additional dependencies
2025-09-19 09:05:19 +02:00
Bartosz Podrygajlo
fd37f84fbe Fixes for vrtsim
- Allow client to exit cleanly if server is down
 - Ensure timing_thread is joined only once avoiding exit_function loop
 - Free noise_device
 - Save previously sent samples for channel modelling
2025-09-19 09:05:19 +02:00
francescomani
4b43607edd remove unused deinterleaving function from dlsch ue 2025-09-19 09:05:19 +02:00
francescomani
6b304bec21 use common channel level for PDSCH 2025-09-19 09:05:19 +02:00
francescomani
a458fba182 use common channel level for PUSCH 2025-09-19 09:05:19 +02:00
francescomani
1abab39d90 use common channel level for DCI reception 2025-09-19 09:05:19 +02:00
francescomani
c5aba5c67d use common channel level for PBCH 2025-09-19 09:05:19 +02:00
francescomani
f41adf0956 common channel level function 2025-09-19 09:05:19 +02:00
Sagar Arora
534a8b5ffc Align add_boolean_option as per cmake documentation use only ON/OFF for uniformity
Signed-off-by: Sagar Arora <sagar.arora@openairinterface.org>
2025-09-19 09:05:19 +02:00
Laurent THOMAS
2a1e9d364e cleaning syntax of nr-ru.c 2025-09-19 09:05:19 +02:00
Cedric Roux
ecbd387102 hack: ignore empty Cell Group Config returned by DU
Interoperability testing with srsRAN DU shows than when receiving
RRCReconfigurationCompleteIndicator in a UEContextModificationRequest
the DU replies in the UEContextModificationResponse with an empty
CellGroupConfig.

This CellGroupConfig is encoded as 2 zero bytes. Let's ignore this
message when we receive it, don't forward it to the UE in a
RRC Reconfiguration, as it should per standard (38.473 8.3.4.2):

    If the CellGroupConfig IE is included in the DU to CU RRC Information
    IE contained in the UE CONTEXT MODIFICATION RESPONSE message, the
    gNB-CU shall perform RRC Reconfiguration as described in TS 38.331 [8].
    The CellGroupConfig IE shall transparently be signaled to the UE as
    specified in TS 38.331 [8].

To be removed/reworked in the future if the interoperability
situation improves.
2025-09-19 09:05:19 +02:00
Cedric Roux
481c03602d GTPU: CU has to send NR-U Sequence Number
This is in 3GPP TS 38.425.

Because it was not done, there was a problem of interoperability
between openair CU and srsran DU. No DL traffic was reaching the UE.

A new GTPU API function is introduced: gtpv1uSendDirectWithNRUSeqNum().
It is only used in the gNB CU, in PDCP. So it was decided to not add a
new parameter to gtpv1uSendDirect() but instead add a new API function.
2025-09-19 09:05:19 +02:00
Cedric Roux
4b3887d76d GTPU: basic support of DL USER DATA
See 3GPP TS 38.425 5.5.2.1.

Only sending part, only dealing with NR-U Sequence Number.
2025-09-19 09:05:19 +02:00
Cedric Roux
b497f7ed78 GTPU: add an API to better deal with extension headers
And adapt existing code to use it.

Only for transmission for the moment.
2025-09-19 09:05:19 +02:00
Cedric Roux
dc467f47d7 ds: add a new type "byte array producer"
Introduced to write bytes to a byte array with size checking.
2025-09-19 09:05:19 +02:00
francescomani
af3321c1d0 separate computation of size and value for DCI precoding information 2025-09-19 09:05:19 +02:00
Laurent THOMAS
829ebe516e remove unused global 2025-09-19 09:05:19 +02:00
Laurent THOMAS
5526a5a3bb rename a global "ru" in root_unit and include correctly the .h file, that leads to mistakes fixes 2025-09-19 09:05:19 +02:00
Laurent THOMAS
ba0b04b94b remove dirty and unused functions with global vars (not working anyway) 2025-09-19 09:05:19 +02:00
Laurent THOMAS
c5aebc38c3 remove a dependancy of gNB to LTE that is not used and adds global vars to gNB 2025-09-19 09:05:19 +02:00
Laurent THOMAS
5fc521b237 remove dead code and replace unmanaged asn1_xer_print global variable by the appropriate existing debug flag 2025-09-19 09:05:19 +02:00
Laurent THOMAS
dd6cc63db3 Limit visibilty of roundKeys 2025-09-19 09:05:19 +02:00
Laurent THOMAS
3dd0a62672 remove dead function 2025-09-19 09:05:19 +02:00
Laurent THOMAS
acbd50bbe6 Remove threequarter_fs, log_level; make functions static
2 functions with same name as static to make it clearer they are separate.

remove unused copy of log_level global var.

remove threequarter sampling variable from the radio board general
configuration. The decision of sampling rate is made above. A better
behavior can be done later, like ask to the radio board what sampling
rate it can do,then use it to decide the appropiate sampling rate from
the gNB configuration. In UE case, it is another issue, as the sampling
rate would change after we decode SIB1, but also it is not developped
yet.
2025-09-19 09:05:19 +02:00
Laurent THOMAS
1d3f99d29a Change tracy version to latest release 2025-09-19 09:05:19 +02:00
Robert Schmidt
b89d3b6520 Explain steps to build Dockerfiles without BuildKit
The Dockerfiles are reused for building on different architectures
(amd64/arm64). They differ, though, on some steps for downloading or
installing platform-specific utilities.

This is handled automatically when using BuildKit, which is the default
in docker versions v23.0+. Older docker versions require some special
settings. Explain this in the README.

Closes: #973
2025-09-19 09:05:19 +02:00
Robert Schmidt
0cc4238277 gNB MAC doc: add dl/ul_min_mcs
Previous commits removed min_grant_mcs and instead introduced
dl/ul_min_mcs as a more generic replacement.

Fixes: 96b0cae63e ("Drop 'min_grant_mcs' configuration parameter ")
Fixes: 699afafc6f ("Add support for 'dl_min_mcs' and 'ul_min_mcs'
    configuration parameters")
2025-09-19 09:05:19 +02:00
Jaroslava Fiedlerova
482dae70aa CI: Update UHD version to 4.8 2025-09-19 09:05:19 +02:00
Robert Schmidt
60f5822916 Write simple CI documentation and add sample script 2025-09-19 09:05:19 +02:00
Robert Schmidt
2775b69e06 CI: correct log analysis filename interpolation
A previous commit changed to use archiveArtifact() to recover CI logs,
and then attempted to "guess" the L1/MAC stats file name through a
regex. However, the format "enb-[0-9]+" is not correct, as
archiveArtifact() puts the task ID ("[0-9]+") BEFORE the file name
(here, "enb"). So, make it more generic and match the final "-enb.log"
("$" means "end of string").

Fixes: 244ea8fc22 ("Use archiveArtifact() for TerminateeNB()")
2025-09-19 09:05:19 +02:00
Robert Schmidt
a4a00cc9b4 CI: Sleep: print time to wait 2025-09-19 09:05:19 +02:00
Robert Schmidt
5a3e9556da Remove HTML 'no analysis function'
For some network functions, we don't match an analysis function. In the
console logs we print an info message. In the HTML, it's just noise.
2025-09-19 09:05:19 +02:00
Robert Schmidt
fbed2f1152 Run_Physim(): avoid large console logs, rewrite file
Many of these tests exit with an exit code != 0. Thus, the CI
automatically logs the result. Rather, write everything including stderr
to the file for analysis.

Also, rewrite the file with ">" instead of appending through ">>". While
appending works because the CI removes files after archiving, it seems
"cleaner" to remove files.
2025-09-19 09:05:19 +02:00
Robert Schmidt
c6ee6aad3f Remove "forcedWorkspaceCleanup" option
It is superseded by the CreateWorkspace() function and task step (which
removes and recreates a workspace), and this option was not actually
used in any function except for the build of unit tests, but no XML
step actually specified this option.
2025-09-19 09:05:19 +02:00
Robert Schmidt
a6ff4b79b3 Fix: new Iperf test need to get ctx 2025-09-19 09:05:19 +02:00
Robert Schmidt
a9863b2194 Ignore eNB{,1,2}{UserName,IPAddress,Password} parameters
After having transitioned to direct node names in the XML, these
parameters are not relevant anymore.

The best way to view this patch is with

    git show <SHA> --ignore-all-space
2025-09-19 09:05:19 +02:00
Robert Schmidt
4f1b256a79 Remove SSH connection
Remove this class. It is not safe to use (no return codes, can get out
of sync), hardcodes the use of passwords, and it's API is cumbersone.

More explanations can also be found in !1867. It is superseded by
cls_cmd.py
2025-09-19 09:05:19 +02:00
Robert Schmidt
a390864c99 LogCollecteNB() not used anymore
Since 28ce0dc444 ("Main: pass in ctx"), the CI always collects logs
into cmake_targets/log/. Hence, LogCollecteNB() is never called. We can
remove it.

Further, change the cmake_targets/log/ to ci-log/, which is shorter, and
append a / on the zip path to make sure that only contents is zipped.
2025-09-19 09:05:19 +02:00
Robert Schmidt
13607b9d9f Reimplement Initialize_eNB()/Terminate_eNB()
Reimplement these functions by

- using cls_cmd
- retain only the necessary steps from the timing-phytest function
- pass in ctx and node information, instead of server ID
- remove all superfluous variables that don't seem to be used
- make some lists (corresponding indices are "server ID") into normal
  variables.
2025-09-19 09:05:19 +02:00
Robert Schmidt
057ae42113 cls_containerize: yamlPath/services as normal string
These variables were set as lists, to be indexed by the "server ID".
Since this has been removed from all XMLs, it is not necessary anymore.
2025-09-19 09:05:19 +02:00
Robert Schmidt
1131aa2c13 Run_Physim(): pass node 2025-09-19 09:05:19 +02:00
Robert Schmidt
41430a80f3 Pass node to various Build*() functions
Pass node directly from XML to these functions

- BuildClusterImage()
- BuildImage()
- BuildProxy()
- BuildRunTests()

instead of reading the "server ID" and looking up from
eNB_IPAddress/eNB1_IPAddress/eNB2_IPAddress.

Improve the proxy build unit test by properly passing ctx information.
2025-09-19 09:05:19 +02:00
Robert Schmidt
141148a4a7 File not used by CI 2025-09-19 09:05:19 +02:00
Robert Schmidt
cbe24b5a80 Remove unused variables 2025-09-19 09:05:19 +02:00
Robert Schmidt
05839e0ba7 Deploy_Run_PhySim(): pass node name
harmonize with other code that takes a "node" parameter.
2025-09-19 09:05:19 +02:00
Robert Schmidt
8b86f0df2c CppCheckAnalysis()/LicenceFormattingCheck(): use node
- ubuntu18 eNB_IPAddress obelix => obelix
- cppcheck eNB_IPAddress 172.21.18.47 => carabe
2025-09-19 09:05:19 +02:00
Robert Schmidt
ac91be64e7 Push_Local_Registry(): pass node 2025-09-19 09:05:19 +02:00
Robert Schmidt
99eabf9069 Create/Deploy/Undeploy(): use node
Pass the node name for a host on which to create a workspace or
deploy/undeploy.

Add a new test for the creation of workspaces.

To help myself and the reviewer, here is a list of
"eNB_IPAddress"/"eNB1_IPAddress" parameters I copied from the various
pipelines:
- rfsim 4G eNB_IPAddress none => localhost
- rfsim 5g eNB_IPAddress none => localhost
- flexric eNB_IPAddress none => localhost
- l2sim 4g eNB_IPAddress none => localhost
- l2sim 4G eNB1_IPAddress 172.21.16.128 => obelix => localhost
- cluster image eNB_IPAddress poseidon
- ubuntu18 eNB_IPAddress obelix => obelix
- ubuntu-arm eNB_IPAddress gracehopper3-oai => gracehopper3-oai
- arm-cross eNB_IPAddress alambix => alambix
- lte-tdd eNB_IPAddress 172.21.18.45 => starsky
- lte-fdd eNB_IPAddress 172.21.18.46 => hutch
- lte-oaiue eNB_IPAddress 172.21.18.46 => hutch
- lte-oaiue eNB1_IPAddress 172.21.18.47 => carabe
- lte-tdd-2x2 eNB_IPAddress 172.21.16.128 => obelix
- nsa eNB_IPAddress 172.21.16.137 => nepes
- nsa eNB1_IPAddress 172.21.16.109 => ofqot
- sa-aerial eNB_IPAddress gracehopper1-oai => gracehopper1-oai
- aw2s eNB_IPAddress 172.21.16.124 => avra
- sabox eNB_IPAddress 172.21.16.109 => ofqot
- sa-oaiue eNB_IPAddress avra => avra
- sa-oaiue eNB1_IPAddress caracal => caracal
- cppcheck eNB_IPAddress 172.21.18.47 => carabe
- timing-phytest eNB_IPAddress caracal => caracal
- physim 4g eNB_IPAddress avra => avra
- physim 5g eNB_IPAddress avra => avra
2025-09-19 09:05:19 +02:00
Robert Schmidt
7445b6d974 Pull_Image_from_Registry()/Clean_Test_Server_Images(): pass node
Pass the node name for a host onto/from which to pull/clean the images.
For doing this, I used:

- rfsim 4G eNB_IPAddress none => localhost
- rfsim 5g eNB_IPAddress none => localhost
- flexric eNB_IPAddress none => localhost
- l2sim 4g eNB_IPAddress none => localhost
- l2sim 4G eNB1_IPAddress 172.21.16.128 => obelix => localhost
2025-09-19 09:05:19 +02:00
Robert Schmidt
2bc7b34550 Integrate all SA-OAIUE pipeline related files into one 2025-09-19 09:05:19 +02:00
Robert Schmidt
2237b08183 Integrate all NSA-related XML files into one
Is simpler to test manually and view the results.
2025-09-19 09:05:19 +02:00
Robert Schmidt
bd31f4d28d Remove unused file 2025-09-19 09:05:19 +02:00
Robert Schmidt
8717ad3d55 Remove unused parameters 2025-09-19 09:05:19 +02:00
Robert Schmidt
4b50523c19 Cluster: build FHI7.2 in parallel 2025-09-19 09:05:19 +02:00
Robert Schmidt
0fc47411bf Remove unnecessary HTML printing, simplify code 2025-09-19 09:05:19 +02:00
Robert Schmidt
60f2652625 AnalyzeBuildLogs(): only analyze one file at a time
Will be used in a follow-up commit to simplify analysis of log files and
HTML file printing.
2025-09-19 09:05:19 +02:00
Robert Schmidt
65a3209e8a Remove unused variables 2025-09-19 09:05:19 +02:00
Bartosz Podrygajlo
62de2b36dc Make run_locally.sh script take the full path to the xml file
Use full path to xml file in run_locally.sh to allow usage of system
command line completion feature.
2025-09-19 09:05:19 +02:00
Robert Schmidt
181c2585ae Complete run_locally.sh to produce valid HTML 2025-09-19 09:05:19 +02:00
Robert Schmidt
9962ed4b73 CI: Clarify HTML message if a (ctest-executed) test fails 2025-09-19 09:05:19 +02:00
Robert Schmidt
ca4118d6a8 Disable various UHD features
build_oai primarily builds UHD for OAI. Thus, a number of targets (B100,
USRP1/2, ...) can be omitted, as OAI does not run on them. Further,
disable documentation and man pages, which is typically not necessary
for the averages user, and does not need to be installed for containers.
2025-09-19 09:05:19 +02:00
Raymond Knopp
8f6bfb40dc UHD installation: remove multiple packages at once
Removing packages individually is slow, because apt starts to (re-)read
it's database over and over again. Do it at once to speed up.
2025-09-19 09:04:43 +02:00
Robert Schmidt
fc3ed6af80 Do not collect log files that don't exist
Since one of the parent commits, build_oai does not redirect files to a
log folder. Hence, there is no need to collect those.
2025-09-19 09:03:07 +02:00
Robert Schmidt
be75595b54 Remove unused build_helper function 2025-09-19 09:03:07 +02:00
Robert Schmidt
5726f14ad4 Don't redirect installation log files to a file
Similarly to the parent, don't redirect log files to a file. It makes
the CI more complicated, and also raises user awareness of what is being
installed.
2025-09-19 09:03:07 +02:00
Robert Schmidt
f44b190ca1 build_oai: don't redirect compilations to a file
Redirecting to a file has the problem that it is difficult in the CI to
recover these files. Furthermore, at least with ninja, when running
build_oai interactively, the build output will only take some lines
(because ninja rewrites lines), so the change should not be that big to
users.

One CI function would print the entire output from build_oai to the
console. Since that output might be long now, do not do this. The file
is archived, anyway.
2025-09-19 09:03:07 +02:00
Robert Schmidt
a8ef9bb7f8 Remove UE_AUTOTEST_TRACE CMake option
This only triggers the build of some dedicated logs that contain
information that is logged already, anyways.
2025-09-19 09:03:07 +02:00
Robert Schmidt
1bdef5f8e9 Remove useless Doxygen variable 2025-09-19 09:03:07 +02:00
Robert Schmidt
2ec7550973 Remove auto-test options in build_oai 2025-09-19 09:03:07 +02:00
Robert Schmidt
2e8708977d Increase AL candidates count on AW2S pipeline
Increase the number of aggregration level candidates. Since we have many
UEs with concurrent traffic in that pipeline, we should ensure that we
can allocate many DCIs to not waste resources (e.g., not all RBs used
because could not find DCIs for specific UEs).
2025-09-19 09:03:07 +02:00
Robert Schmidt
a55ac81f50 Fix AL candidate documentation to right default
The default aggregation level candidate numbers in gnb_config.c (search
"uess_num_agg_level_candidates") is 0,2,0,0,0, so write that instead.
2025-09-19 09:03:07 +02:00
Robert Schmidt
80c070f000 Handle TDD pattern 2 in UL TDA allocation
Add the possibility to use UL slots in TDD pattern 2. For simplicity, we
require the mixed slot to be of the same symbols in pattern 1 & 2. For
UL slots, simply use the right amount of UL TDAs, depending on which
number of UL slots among pattern 1 & 2 is bigger.

One complication is the TDA for the mixed slot. The current code assumes
that k2 has to be equal or larger than (number of DL slots +1) (because
the spec says min k2=2, but we might want to schedule DSUUU). Then,
there could be for instance the following cases:

- only pattern 1: DSUUU DSUUU ...: the mixed slot has to be reached an
  entire period in advance
- pattern 1 & 2: DSUUU DDDDD: normal mixed slot k2, e.g., like for 7DS2U
- pattern 1 & 2: DSUUU DDDSU: the mixed slot has to be reached
  N_ul2+N_dl1+1 slots in advance

I can't think of more cases right now. To avoid unscheduled slots, I put
an assertion (which could also trivially be taken out).
2025-09-19 09:03:07 +02:00
Rúben Soares Silva
30829ce163 P5 Config: Pack/Unpack TDD table with 10.02 and 10.04 formats
Adds the capability to pack/unpack the TDD table in CONFIG.request
following both SCF222.10.02 (Tag 0x1027) and SCF222.10.04 (Tag 0x1035)
formats In the case of Aerial, the TDD table is packed following the
10.04 format, but with the 10.02 tag Prevent the packing of Digital
Beamforming table and Precoding Matrix table for Aerial
2025-09-19 09:03:07 +02:00
Robert Schmidt
dd7b8e6b8f Select best out of multiple TDAs
A new function get_best_ul_tda() allows to select the "best" TDA out of
a number of TDA. Specifically, get_best_ul_tda() considers in how many
RBs a given TDA might be allocated, and multiplies this number of RBs
with the number of symbols in the TDA to form a "score". The TDA with
the best "score" is selected, considering it maximizes resource usage.

In phytest scheduler, we use this function to verify that the given TDA
can be really allocated in all selected slots.
2025-09-19 09:03:07 +02:00
Robert Schmidt
2b7802f519 Correctly interpret SRS numberOfSymbols
A length of 0 is to be interpreted as 1 symbol, a length of 1 is 2, etc.
2025-09-19 09:03:07 +02:00
Robert Schmidt
6fd51b5ce4 Schedule SRS longer in advance, cleanup
Schedule SRS longer in advance, so that it would also be enough even
with big k2 for UL TDA.

Remove useless types: we do not use the information on sched_srs
anymore, so remove it.

Check that the VRB map is free before making allocations.
2025-09-19 09:03:07 +02:00
Robert Schmidt
9f67b3f85e Only add SRS TDA if SRS is activated
Since the parent commit, the TDA for UL scheduling is dynamically
selected, instead of being hardcoded to specific indices. We can thus
also omit the SRS TDA if no SRS is configured.

Also add SRS-specific TDAs if we schedule further into the future.
2025-09-19 09:03:07 +02:00
Robert Schmidt
e6b3a78ee0 Refactor TDA allocation: scheduler can take advantage of multiple k2
Add multiple TDAs with k2 larger than the min_rxtxtime, to potentially
allow to allocate all available slots. For this, nr_rrc_config_ul_tda()
inspects the TDD pattern, and allocates as many TDAs as necessary. It
also sorts the TDA list, with smaller k2 and larger symbol lengths
first.

This in turn is now used by get_num_ul_tda() to use a k2 and the slot
configuration to find a suitable TDA, assuming a list as sorted in
nr_rrc_config_ul_tda().

Note that since get_num_ul_tda() does only inspect the available UL
slots, there might be overlap (e.g., when scheduling SRS), which will be
fixed in a follow-up commit.

Also, TDD pattern 2 is not handled here yet, and a follow-up commit will
fix it.
2025-09-19 09:03:07 +02:00
Robert Schmidt
df6774f534 Add ULSCH preprocessor slot logic for scheduling multiple slots
Add a loop to advance slots as determined by current ("DL") slot, and
advance further into the future (for "UL" slots) if TDAs allow. Ensure
to schedule all TDAs if it's the last DL slot, to guarantee a previously
scheduled TDA will also reoccur (i.e., for guaranteeing that
retransmissions can be made).

Note that the check for number of UE being zero is removed, as this
allows to keep "ul_next" close to the "min_next" slot. This way, we can
use fs_get_max(); otherwise, if we did not always execute this loop,
they might diverge far from each other, making the logic inside the loop
more complicated.

This commit introduces a new type "fsn_t" (frame-slot number) that
encapsulates a single frame-slot combination in a single struct. The
helper functions (in gNB_scheduler_ulsch.c) should be moved to a new
file under common/, but we don't do this here to limit the amount of
code changes.
2025-09-19 09:03:07 +02:00
Robert Schmidt
9bd2bb92ce Use k2 to decide which TDA to use
For scheduling multiple ULSCH ahead, we will have to use different k2.
Hence, we will need to check for k2 in the TDA selection as well. The
function get_ul_tda() is renamed to get_num_ul_tda() to reflect that it
might return multiple TDAs (not done in this commit, but in a follow-up
MR). get_num_ul_tda() also returns a pointer to the first suitable TDA.

In the phy-test scheduler, simplify the selection of the TDA to use: do
not hardcode a specific K2, but rather, use the first one (with any k2).
2025-09-19 09:03:07 +02:00
Robert Schmidt
00e5073999 Provide selected TDA to pf_ul() 2025-09-19 09:03:07 +02:00
Robert Schmidt
cd2bfb6847 Introduce dedicated ul_tda array 2025-09-19 09:03:07 +02:00
Robert Schmidt
978fe70312 Count and print failed CCE allocations for UL/DL 2025-09-19 09:03:07 +02:00
Robert Schmidt
c3d9bfc661 pf_ul(): report if UEs scheduled
For the multi-UL slot scheduling functionality in a follow-up commit, it
would be important to know if the scheduler allocated any UEs. If
pf_ul() allocated for some UEs, we might run it again on a different
slot. If on the other hand, no UEs were allocated, there is no point in
running it again.
2025-09-19 09:03:07 +02:00
Robert Schmidt
ec1a540865 config_frame_structure(): make const 2025-09-19 09:03:07 +02:00
Robert Schmidt
a90ce41b44 Refactor get_feasible_msg3_tda()
Simplify the code. Consider any slot for Msg3, and check that the TDA
fits in a given slot (as before).
2025-09-19 09:03:07 +02:00
Robert Schmidt
8f33b03e70 Remove dedicated Msg3 TDA
A dedicated Msg3 TDA is simply not necessary: get_feasible_msg3_tda()
already iterates through all TDAs to find a suitable one for Msg3, and
takes things such as parameter Δ already into account.

The only prerequisite is that the ra_ResponseWindow is long enough. In
some configurations, Msg3 TDA ensured that Msg2 still happened during
ra_ResponseWindow, while Msg3 was outside of it. This is not necessarily
the case anymore, unless ra_ResponseWindow is long enough.

For the normal user, removing ra_ResponseWindow from the config will be
enough.
2025-09-19 09:03:07 +02:00
Robert Schmidt
60a28c9a58 Remove most ra_ResponseWindow config options
Since the parent commit, the ra_ResponseWindow will be chosen
automatically. Correspondingly, remove most ra_ResponseWindow options
from configuration files in the repository.

One problem in some mu=1 configs is that the ra_ResponseWindow=4 (10
slots), which might be overly restrictive if the L1 slot ahead is
somewhat close to 10 (e.g., 6), in which case we might not be always
able to allocate Msg2 in time.

A notable exception here is gnb-vnf.sa.band66.u0.25prb.nfapi.conf, in
which we still provide it (1) since it uses a non-standard configuration
of a ra_ResponseWindow longer than 10ms (see also issue #916 for more
information) and (2) as an example.
2025-09-19 09:03:07 +02:00
Robert Schmidt
6beb7d0620 Select ra_ResponseWindow automatically if not configured
If the config file does not specify ra_ResponseWindow, select it to be
10 slots in mu=0, or 20 slots for all others.

This should give us enough flexibility to allocate Msg2 without running
out of the response window. The next commit will remove most
ra_ResponseWindow options in configs.
2025-09-19 09:03:07 +02:00
Robert Schmidt
2167f7d497 Comments on func 2025-09-19 09:03:07 +02:00
Robert Schmidt
a39d2b60eb Refactor TDA allocation
Make it simpler to see, in function nr_rrc_config_ul_tda(), which UL
TDAs we allocate for a UE.
2025-09-19 09:03:07 +02:00
Robert Schmidt
b5ea99627b Integrate inactivity scheduling into main allocation loop
Scheduling for inactivity only deviates in details from the main
scheduling logic: we simply allocate a fixed number of RBs instead of
making it dependent of data.

In this commit, add an additional flag to sort UEs that are scheduled
for inactivity in front of "normal" UEs (with traffic). Then, schedule
those UEs by limiting/fixing the amount of RBs to schedule to
min_grant_prb.

Update the comparator() to properly sort UEs based on this flag and the
coefficient by applying a consistent logic of -1/0/1 (see man qsort) for
smaller/equal/larger. The inactivity flag, if set, will always have
higher priority over the coefficient to schedule these UEs first, as was
the case prior to this commit.
2025-09-19 09:03:07 +02:00
Robert Schmidt
715511951b Fix bug: only sort relevant part of list
This reduces the amount of elements to compare.
2025-09-19 09:03:07 +02:00
Robert Schmidt
cce58ee802 Refactor to call post-processor in place
Remove sched_ctrl->sched_ulsch, and call the post-processing function
post_process_ulsch() in the places where sched_ctrl->sched_ulsch has
been assigned. This will have two effects:

- it is not necessary to have the final loop over all UEs, which might
  be costly especially towards many UEs.
- till now, there is only a single sched_ulsch; however, a later commit
  will allow to schedule multiple PUSCH transmissions from a single (DL)
  slot. This would require to make sched_ctrl->sched_ulsch, and
  also iterate through all sched_ulsch. In this new scheme, we can
  simply call post_process_ulsch() multiple times, which is simpler (and
  therefore, implicitly handleded as of this commit).
2025-09-19 09:03:07 +02:00
Robert Schmidt
3b2acfc67f Refactor ULSCH phy-test scheduler
Write a single NR_sched_pusch_t structure in a single statement (where
possible). Assign to sched_ctrl->sched_pusch later, where the
post-processing functionality will be called in a follow-up commit.
2025-09-19 09:03:07 +02:00
Robert Schmidt
8539e8839e Refactor ULSCH main allocation procedure
Write a single NR_sched_pusch_t structure in a single statement (where
possible). Assign to sched_ctrl->sched_pusch in one place, where the
post-processing functionality will be called in a follow-up commit.
2025-09-19 09:03:07 +02:00
Robert Schmidt
0f3439cf57 Refactor retransmission's NR_sched_pusch_t usage
Avoid to overwrite the existing retInfo. Instead, create a new
NR_sched_pusch_t and assign to sched_ctrl->sched_pusch in one place. A
follow-up commit will directly trigger the post processor here.
2025-09-19 09:03:07 +02:00
Robert Schmidt
7c86fe7c87 Refactor inactivity-based PUSCH allocation
Write a single NR_sched_pusch_t structure in a single statement (where
possible). Assign to sched_ctrl->sched_pusch in one place, where the
post-processing functionality will be called in a follow-up commit.
2025-09-19 09:03:07 +02:00
Robert Schmidt
ebb8047daa UL harq PID: similar to parent, reduce scope of sched_pusch 2025-09-19 09:03:07 +02:00
Robert Schmidt
7d8ebff30d Store selected MCS in UE iterator
PF uses MCS and average throughput to decide which UE to schedule. Thus,
the first loop selects the MCS, and the second does the main UE
allocation after sorting by priority, depending on the MCS.

A follow-up commit will remove sched_pusch from NR_UE_sched_ctrl_t.
Thus, we cannot rely on sched_ctrl to store the MCS in the first loop,
and look it up from there in the second. Instead, store it as part of
the UE iterator data, and take it from there.
2025-09-19 09:03:07 +02:00
Robert Schmidt
9bafc1610a Remove unused parameter from sched_pusch 2025-09-19 09:03:07 +02:00
Robert Schmidt
68ec44f8c5 Read TX power from HARQ.sched_pusch
A later commit will remove sched_ctrl->sched_pusch. Instead, the TX
power is also stored for each HARQ process (as they contain
sched_pusch). Read it from there, which should have the same effect.
2025-09-19 09:03:07 +02:00
Robert Schmidt
b7fc18a36e Refactor post processor into post_process_ulsch()
Introduce an array with information on FAPI structures to save resource
allocation into. It's in nr_mac_gNB.h because the next commit reuses
this for all preprocessors.
2025-09-19 09:03:07 +02:00
calvin_peyron
050941b487 "as" should be in capital letters 2025-09-19 09:03:07 +02:00
Calvin Peyron
f8813df28f Rename ubuntuXX to ubuntu 2025-09-19 09:03:07 +02:00
Calvin Peyron
1fff828286 Fix warning tmp may be uninitialized leads to error 2025-09-19 09:03:07 +02:00
calvin_peyron
0884416a3a Remove redundancy
As DEBIAN_FRONTEND has been set as environment variable, there is no need to use DEBIAN_FRONTEND=noninteractive inside RUN lines, it is redundant, hence it has been removed.
2025-09-19 09:03:07 +02:00
calvin_peyron
a54aba96e2 Upgrade CI images to Ubuntu 24
Libboost went from 1.74.0 to 1.83.0 alongside Ubuntu update.
GCC version is set as default to be more practical.
In Ubuntu22, apt sources were in .list files, in Ubuntu24 they are in .sources files.
Add --break-system-packages for pip installation to use same logic as before, see the pip update 23.0.1 (2023-02-17).
With Ubuntu24 liboai_device requires libpython3.12
2025-09-19 09:03:07 +02:00
francescomani
a2dbdbd986 minor refactoring in nfapi_nr_interface_scf 2025-09-19 09:03:07 +02:00
Gabriele Gemmi
e84b5bc491 compute prgsize from number of RA RB 2025-09-19 09:03:07 +02:00
Gabriele Gemmi
f5fed4b00c Removed TRP-scheme byte from UL BF PDU to Interop with Aerial 25-1 (FAPI 10.02) 2025-09-19 09:03:07 +02:00
Gabriele Gemmi
515981f1af Compute DCI prgsize from Coreset 2025-09-19 09:03:07 +02:00
Gabriele Gemmi
e757fb5873 Configuration of FAPI Beamforming PDU for Aerial PBBF 2025-09-19 09:03:07 +02:00
francescomani
fd3ee33705 add option to directly send the beam index to L1 via FAPI without look-up table (for 7.2 split) 2025-09-19 09:03:07 +02:00
Laurent THOMAS
75a3c3891c add gtpu error packet parsing and display 2025-09-19 09:03:07 +02:00
francescomani
af90cc6840 print UE command line parameters also at MAC 2025-09-19 09:03:07 +02:00
Robert Schmidt
e36307e777 CI AW2S-Amarisoft: verify RedCap'edness of a UE
Since the parent commit, UE 1 is normal (no RedCap), UE 2 is RedCap.
Verify that the gNB agrees with that and detects the second UE as RedCap
by analyzing some logs.

The first check is a bit elaborate, but basically is

    [ $(docker logs | grep XYZ | wc -l) -eq 0 ]
    ^   ^             ^          ^      ^
    1   2             3          4      5

(1) is the if statement, that compares
  (4) the number of occurrences
  (3) of "RedCap" in the
  (2) docker logs
(5) to being equal to

Note for all UEs which number, and whether it is RedCap (so this need to
be kept in sync with the Amarisoft UE sim configuration file in use!).
2025-09-19 09:03:07 +02:00
Robert Schmidt
179a20f9fd Make some Amarisoft UEs RedCap UEs
Change the parameters to be redcap (release: 17, redcap: "redcap") on
some UEs, and modify the path to the updated configuration.
Specifically, make UE 1 normal (no RedCap), UE 2 RedCap, UEs 3&4 normal,
UEs 5&6 RedCap, etc.

RedCap UEs should now only be able to connect if the gNB is handling Redcap
UEs, which is done in the parent commit.
2025-09-19 09:03:07 +02:00
Robert Schmidt
e6b5f5c0a3 CI AW2S: modify configuration to have RedCap UEs connect 2025-09-19 09:03:07 +02:00
Robert Schmidt
f72b8b9851 Remove unused Amarisoft CI XML file 2025-09-19 09:03:07 +02:00
Romain Beurdouche
2e12d71db2 feat(ldpc_cl): Remove ldpc_cl 2025-09-19 09:03:07 +02:00
Romain Beurdouche
665f5be4b1 fix(nrLDPC_decoder_CL): Apply clang-format 2025-09-19 09:03:07 +02:00
Romain Beurdouche
219b3dd300 fix(nrLDPC_decoder_LYC): apply clang-format 2025-09-19 09:03:07 +02:00
Romain Beurdouche
a11bba607a feat(LDPCImplementation.md): Add short introduction and TOC 2025-09-19 09:03:07 +02:00
Romain Beurdouche
865a5a5611 fix(LDPCdecoder): Cleanup segment decoder interface
Variables 'harq_pid', 'ulsch_id' and 'C' of the segment decoder
interface were not used any more by the implementations and set to zero
by all the callers.
Then it is more relevant and compliant to remove them.
2025-09-19 09:03:07 +02:00
Romain Beurdouche
ea31c31508 feat(LDPCImplementation.md): Remove ldpc_cl logs
Recommended: Remove logs of a library that is not working as far as we
know.

Pop this commit if this seems not necessary.
2025-09-19 09:03:07 +02:00
Romain Beurdouche
d01508ade1 fix(LDPCImplementation.md): Remove libconfig logs
libconfig log do not display anymore by default so we may better not
show them in the documentation to avoid any misunderstanding.
2025-09-19 09:03:07 +02:00
Thomas Schlichter
544bb3441f NR UE: further simplify and optimize the usage of the PDCCH LLR array
The initial version of this patch was provided by "Laurent THOMAS <laurent.thomas@open-cells.com>"
2025-09-19 09:03:07 +02:00
Thomas Schlichter
2f1ce61304 NR UE: fix pdcch llr_size calculation in nr_rx_pdcch() 2025-09-19 09:03:07 +02:00
Thomas Schlichter
0907d53b93 NR UE NTN: consider acceleration on orbital path to calculate N_UE_TA_drift_variant
The acceleration magnitude on the orbital path can be calculated as:

t = 2 * pi * r / v
omega = 2 * pi / t = v / r
acceleration = omega² * r = v² / r

Where t is the orbital period, r is the orbital radius, v is the orbital velocity, omega is the angular velocity.
The acceleration direction is from the SAT position towards the earth center.
To calculate the acceleration towards the UE, this is projected on the direction from the SAT to the UE.
2025-09-19 09:03:07 +02:00
Laurent THOMAS
71c5c9cdfc When a client connects, we need to start the send/receive loop but the first reception is void data 2025-09-19 09:03:07 +02:00
francescomani
35385efda1 remove fixed size H_awgn_mimo that may cause segfault in simulator in case of more than 4 antennas 2025-09-19 09:03:07 +02:00
Cedric Roux
28728665fa fix a T trace 2025-09-19 09:03:07 +02:00
francescomani
877ecd7b78 highlighting UE LOG with sync SSC printed 2025-09-19 09:03:07 +02:00
francescomani
e5006c9eb5 workaround to take into account SS0 1st symbol depending on SSB 2025-09-19 09:03:07 +02:00
francescomani
b76cd315ea formatting 2025-09-19 09:03:07 +02:00
Sakthivel Velumani
525583d86b Not include DC for CSI IM measurement
DC subcarrier has a significantly higher energy compared to other CSI IM
resource elements. This causes the average interference + noise
estimation to be higher than CSI-RS signal power making the CQI 0. With
a third-party gnb that schedules PDSCH based on CQI, the UE never
receives DL DCI once it starts sending CSI reports.
2025-09-19 09:03:07 +02:00
Sakthivel Velumani
daecbc98a2 Fix PUCCH 2 DMRS in UE
for start RB not multiple of 4
2025-09-19 09:03:07 +02:00
Robert Schmidt
e1edccdfcd Trace analysis results 2025-09-19 09:03:07 +02:00
Robert Schmidt
b88eab09e3 Use Ninja for FHI72 builds 2025-09-19 09:03:07 +02:00
Robert Schmidt
aab1c6a52e Remove LogCollectBuild step: not used by any pipeline 2025-09-19 09:03:07 +02:00
Robert Schmidt
af08ec336e gNB caracal USRP build: don't stop if we can't reboot
Sometimes the connection fails because of the reboot. Without may_fail,
it would stop the build, which will then run the wrong code, possibly.
Instead, continue; if there is a problem with USRP, it will be visible
when starting nr-softmodem.
2025-09-19 09:03:06 +02:00
Robert Schmidt
d1ff1e6142 Use archiveArtifact() for TerminateeNB() 2025-09-19 09:03:06 +02:00
Robert Schmidt
5fcea61e48 Ignore main.py TerminateeNB mode
No pipeline uses it. With the changes in the next commit, pipelines
would start to fail. Remove it for simplicity.
2025-09-19 09:03:06 +02:00
Robert Schmidt
2e0eabc6f2 Remove unused function 2025-09-19 09:03:06 +02:00
Robert Schmidt
8c788bf789 Use archiveArtifact() for SCA.CppCheckAnalysis() 2025-09-19 09:03:06 +02:00
Robert Schmidt
b6ec6a470b Remove cppcheck reference file: nobody knows about it, nobody checks 2025-09-19 09:03:06 +02:00
Robert Schmidt
36d0af079b Use archiveArtifact() for LicenceAndFormattingCheck() 2025-09-19 09:03:06 +02:00
Robert Schmidt
7dfab866cc Remove unused testCase_Id 2025-09-19 09:03:06 +02:00
Robert Schmidt
3f341c0e46 No need for all the useless docker image rm 2025-09-19 09:03:06 +02:00
Robert Schmidt
198f6cc694 Collect the ninja logs for various ran-build images 2025-09-19 09:03:06 +02:00
Robert Schmidt
7e65e0bc04 Use archiveArtifact() for Build()/BuildCluster()
I have to make both together, since they both depend on
AnalyzeBuildLogs().

- remove mkdir for legacy sub-logfiles in build_oai, that does not exist
  anymore; also, remove corresponding log analysis, I think we don't use
  it and it is overkill (either build works or not)
- manually try to copy "all.txt"
- explicitly list log files to copy, then analyze
- AnalyzeBuildLogs(): pass log files to inspect explicitly
2025-09-19 09:03:06 +02:00
Robert Schmidt
83487a9459 use archiveArtifact() for BuildProxy() 2025-09-19 09:03:06 +02:00
Robert Schmidt
f3484ce99b Use archiveArtifact() for BuildRunTests()
Collect also unit test logs, so that developers could see the reason for
failed logs.
2025-09-19 09:03:06 +02:00
Robert Schmidt
20da33823d Use archiveArtifact() for cls_native.run_physim() 2025-09-19 09:03:06 +02:00
Robert Schmidt
797afda6b8 Use archiveArtifact() for cls_native.Build() 2025-09-19 09:03:06 +02:00
Robert Schmidt
28381a22d5 Use archiveArtifact() for deploy_oc_physim() 2025-09-19 09:03:06 +02:00
Robert Schmidt
7caed03d5f Use archiveArtifact() for Ping+IPerf 2025-09-19 09:03:06 +02:00
Robert Schmidt
9227b6a247 Use archiveArtifact() for module_UE 2025-09-19 09:03:06 +02:00
Robert Schmidt
edbb82644a Use archiveArtifact() for (Un-)DeployObject() 2025-09-19 09:03:06 +02:00
Robert Schmidt
da265a36a1 Use archiveArtifact() for CN undeploy 2025-09-19 09:03:06 +02:00
Robert Schmidt
513f6e3750 Simplify ShowTestID()
make it a non-class function, stateless, more information on the current
CI step (the number).
2025-09-19 09:03:06 +02:00
Robert Schmidt
8024f91f8e Main: pass in ctx
Set the context for each task step. Set the artifact result path based
on the XML, so it is harmonized; currently, most pipelines use the "YAML
path" of docker-compose, but that does not always make sense. For
instance, Ping/Iperf() needs to look up this path, but does not
inherently belong to one specific YAML path (there might even be more).
2025-09-19 09:03:06 +02:00
Robert Schmidt
4027267924 Add CI helper class
This class provides a generic "context" for individual tasks about the
current task step, and where to log results. It's used by
archiveArtifact() that would automatically log files in the right
directory, based on a directory in the context, and in a way that order
of files is preserved for long-running pipelines.
2025-09-19 09:03:06 +02:00
Robert Schmidt
10d08baf27 Fix Python "invalid escape sequence" warnings
cls_containerize.py:139: SyntaxWarning: invalid escape sequence '\.'
      lineHasCommit = re.search(f'COMMIT [a-zA-Z0-9\.:/\-]*{image}', str(line)) is not None
    cls_containerize.py:441: SyntaxWarning: invalid escape sequence '\-'
      result = re.search('Size *= *(?P<size>[0-9\-]+) *bytes', cmd.getBefore())
    cls_containerize.py:493: SyntaxWarning: invalid escape sequence '\-'
      result = re.search('Size *= *(?P<size>[0-9\-]+) *bytes', cmd.getBefore())
    cls_containerize.py:616: SyntaxWarning: invalid escape sequence '\-'
      result = re.search('Size *= *(?P<size>[0-9\-]+) *bytes', ret.stdout)
2025-09-19 09:03:06 +02:00
Robert Schmidt
d98fe67b63 Example tracing for QLog
Note: this does not actually work. In the pipelines, we see that for
some reason, quectel-CM cannot establish a connection. Manually, it
works though(?)
2025-09-19 09:03:06 +02:00
Robert Schmidt
77a4248a2a Add example tracing for Amarisoft UE sim
Commented, as the resulting files are very big.
2025-09-19 09:03:06 +02:00
Robert Schmidt
df2be91a5c CI: log UE files in artifacts 2025-09-19 09:03:06 +02:00
Robert Schmidt
f237c8b742 Add possibility to trace UEs 2025-09-19 09:03:06 +02:00
Robert Schmidt
5a5e26b272 5g rfsim NTN LEO/GEO: remove leading undeploy step
It is not necessary (the final undeploys at the end are "always_exec"),
and makes the CI potentially fail since there is nothing to copy at this
point.
2025-09-19 09:03:06 +02:00
Robert Schmidt
31fea37667 CI UE Attach: add more frequent checks, improve output
check for IP once before sleeping in case UE IP address exists, which
should speed up the CI. With this, Only print the actual attach command
once. Print errors only at the beginning. This should simplify attach
command output logs.
2025-09-19 09:03:06 +02:00
Robert Schmidt
580ccbde81 CI: add simple unit test for UE handling 2025-09-19 09:03:06 +02:00
Robert Schmidt
0a5d8384f9 CI: Remove old tracing information
It will be replaced with a new mechanism in a later commit.
2025-09-19 09:03:06 +02:00
Robert Schmidt
4dd026499a CI: use getConnection() to simplify code 2025-09-19 09:03:06 +02:00
Robert Schmidt
1be5e2ed53 CI: shorten UE names (IP might not be available) 2025-09-19 09:03:06 +02:00
Robert Schmidt
f7397fd10f Remove unused statement 2025-09-19 09:03:06 +02:00
Xin Zhe Khooi
665a19c166 ldpc_aal: handle T2 case in runtime 2025-09-19 09:03:06 +02:00
Robert Schmidt
bb2d07188a Rename nrLDPC_coding_t2 options to nrLDPC_coding_aal 2025-09-19 09:03:06 +02:00
Robert Schmidt
31ebac1f7e Rename libldpc_t2 to libldpc_aal
Rename the library to reflect that it's more a generic AAL driver than
specifically for AAL. To this end, rename some documentation.

As of this commit, the options are still called nrLDPC_coding_t2. The
next commit will correct this.

Co-authored-by: Xin Zhe Khooi <khooixz@comp.nus.edu.sg>
2025-09-19 09:03:06 +02:00
Xin Zhe Khooi
1d3a43075e ldpc_t2: generalize for broader BBDEV support (ACC100/200)
- Generalized LDPC T2 implementation to support other DPDK BBDEV
  accelerators (e.g., Intel ACC100/200)
- Added BBDEV capability checks during initialization
- Introduced LLR scaling to improve decoding performance on Intel ACC
  cards
- Implemented self-managed HARQ buffers for ACC200 (no internal HARQ
  memory)
- Library usage documentation update, and added developer documentation

Co-authored-by: Romain Beurdouche <romain.beurdouche@eurecom.fr>
2025-09-19 09:03:06 +02:00
Cedric Roux
75e3c76726 time manager tests: increase some sleep
The CI fails sometimes, because some processes/threads are created in
unpredictable order and if the client connects before the server is
ready some tests fail, as seen in the following log:

[UTIL]   client/server iq-samples: launch sub-processes
[UTIL]   threadCreate() for time client: creating thread (no affinity, default priority)
[UTIL]   time manager configuration: [time source: server] [mode: client] [server IP: 127.0.0.1} [server port: 7374]
[UTIL]   time client: connection to 127.0.0.1:7374 failed, try again in 1s
[UTIL]   threadCreate() for time source iq samples: creating thread (no affinity, default priority)
[UTIL]   threadCreate() for time server: creating thread (no affinity, default priority)
[UTIL]   time manager configuration: [time source: iq_samples] [mode: server] [server IP: 127.0.0.1} [server port: 7374]
[UTIL]   client/server: rlc ticks: 1000 pdcp ticks: 1000 x2ap ticks: 1000
CMDLINE: "/oai-ran/build/common/utils/time_manager/tests/test_time_manager_auto" "--time_management.mode" "server" "--time_management.time_source" "iq_samples"
[UTIL]   client/server: rlc ticks: 0 pdcp ticks: 0 x2ap ticks: 0
CMDLINE: "/oai-ran/build/common/utils/time_manager/tests/test_time_manager_auto" "--time_management.mode" "client"
[UTIL]   client-server iq-samples: ERROR

The client/server iq-samples test is started.
Then we see this log:
[UTIL]   time manager configuration: [time source: server] [mode: client] [server IP: 127.0.0.1} [server port: 7374]
Which means that the client is running.

It tries to connect to the server (not running yet), but fails, so sleeps
for 1 second before attempting another connection to the server:
[UTIL]   time client: connection to 127.0.0.1:7374 failed, try again in 1s

The sleep is done by the time_client thread, the main thread of the test
program continues and does a sleep(1).

Then the server arrives:
[UTIL]   time manager configuration: [time source: iq_samples] [mode: server] [server IP: 127.0.0.1} [server port: 7374]

It sends all the ticks (to no client, since the client is still sleeping).

Then the test is over, the sleep(1) of the client finishes and the program
exits. The client never connected to the server.
We have this log:
[UTIL]   client/server: rlc ticks: 0 pdcp ticks: 0 x2ap ticks: 0

And the test fails.

It's complicated to write an automatic test involving several uncoordinated
programs. The operating system may create processes in any order. We use
some sleeping to wait, but it may be too short or too long, leading to test
failure.

Let's see with more sleep if the CI fails less.
2025-09-19 09:03:06 +02:00
Sakthivel Velumani
4ebc585852 Fix periodic CSI scheduling in UE
Changed the search structure to have periodic resoruce id in the outer
loop and configured resource set as inner loop to prevent configuring
resource that is not needed.

Use const for input pointers.
2025-09-19 09:03:06 +02:00
Jaroslava Fiedlerova
eb2972a034 Add CI unit test for highrate iperf test 2025-09-19 09:03:06 +02:00
Jaroslava Fiedlerova
4e59f378cd CI: refactor iperf3 UDP analysis function
- Add helper function to normalize bitrate values to Mbps for calculations.
- Add helper function to extract data from iperf test report.
- Clean up the UDP analysis function, improve test report formatting.
- Fix an issue where Gbps values were incorrectly reported due to inconsistent
  unit parsing.
- Update CI unit test report checks to match the new formatting.
2025-09-19 09:03:06 +02:00
Robert Schmidt
b8312c30dc Remove F1 interface names from configuration files
These options are not taken into account, they are not even defined in
the configuration module.
2025-09-19 09:03:06 +02:00
Robert Schmidt
5c46a91957 Remove old 4G F1 configuration files
4G F1 has been removed from the code base, so these configs are now
useless.

See also commit 9dc2282249 ("Remove 4G F1")
2025-09-19 09:03:06 +02:00
Robert Schmidt
c22d643e45 Remove unused control port number from F1
Remove these F1-C port numbers. The configuration is not actually
applied, and the default F1-C port number 38472 (see F1AP_PORT_NUMBER)
is hardcoded in the F1 module.

For the moment, I leave the configuration option, in case we want to
allow to configure the port numbers later).
2025-09-19 09:03:06 +02:00
Robert Schmidt
e5abc46b9f Harmonize GTP log messages
Make a common pattern, which makes it simpler to find them in gNB logs,
and, maybe more importantly, link tunnel creation and update (the update
message was missing the "incoming" TEID, so it is not easy to link to
creation apart from the UE ID, but even then the UE might have multiple
tunnels).
2025-09-19 09:03:06 +02:00
Robert Schmidt
d5e36e8475 Refactor gtpv1u_bearer_t and use internally
Reuse the gtpv1u_bearer_t for internal functions. Hopefully this will
also simplify implementation of IPv6, as it encapsulates IP address
handling within gtpv1u_bearer_t.
2025-09-19 09:03:06 +02:00
Robert Schmidt
f5bd42dbba Refactor GTP: pass addr structure directly
This should simplify future transition to IPv6, as we can pass the right
address directly.
2025-09-19 09:03:06 +02:00
Robert Schmidt
630e8cdcf0 Refactor port number out of newGtpuCreateTunnel()
The (remote) port number of the GTP module is configured during
initialization. It is therefore not required when calling
newGtpuCreateTunnel(), and could even lead to bugs (if another port
number is used than specified during GTP init).
2025-09-19 09:03:06 +02:00
Robert Schmidt
e5870977fd Receiver thread: independent of ITTI
This also seems to reduce the packet loss on my machine.
Especially in uplink there are no losses anymore.
2025-09-19 09:03:06 +02:00
Robert Schmidt
16c01d4c04 Reduce receiver mutex scope
This seems to reduce packet loss on my machine.
2025-09-19 09:03:06 +02:00
Robert Schmidt
3eb8f7124b Remove unused struct member 2025-09-19 09:03:06 +02:00
Robert Schmidt
f63f496b6d Reformat gtp_itf.cpp 2025-09-19 09:03:06 +02:00
Robert Schmidt
60c0deedaa DU Buffer Report/DL Delivery Status: remove unused code 2025-09-19 09:03:06 +02:00
Robert Schmidt
eee4f733d1 Add CU-UP load tester and documentation
This is a simple CU-UP load tester. It sets up a configurable number of UEs in the
CU-UP, then sends GTP traffic in downlink/uplink in the N3-F1/F1-N3
direction at the CU-UP. It then compares the sent and received data.

Additional parameters, such as amount of traffic, test length, packet
size, and IP addresses/ports are configurable.

To run:

    mkdir build && cd build && cmake .. -GNinja && ninja nr-cuup nr-cuup-load-test params_libconfig
    ./tests/nr-cuup/nr-cuup-load-test
    ./nr-cuup -O ../tests/nr-cuup/load-test.conf

The tester should be able to detect lost and reordered packets.

Example lost: Receive order 2,3,5,6 (lost packet 4)
=> on packet 2, expected 2, next=expected+1=3
=> on packet 3, expected 3, next=expected+1=4
=> on packet 5, expected 4, diff=5-4=1 (lost 1), next=payload+1=6
=> on packet 6, expected 6
=> 1 lost

Example reordered: Receiver order 2,5,3,6 (lost packet 4)
=> on packet 2, expected 2, next=expected+1=3
=> on packet 5, expected 3, diff=5-3=2 (lost 2), next=payload+1=6
=> on packet 3, expected 6, (reduce lost by 1 to 1), next=expected=6
=> on packet 6, expected 6
=> 1 lost

Example reordered: Receiver order 2,5,3,4,6 (no losses)
2025-09-19 09:03:06 +02:00
Robert Schmidt
2d40124504 Code does nothing: gtpv1u_data_g never populated, always HASH_TABLE_KEY_NOT_EXISTS 2025-09-19 09:03:06 +02:00
Robert Schmidt
0999bd6024 OAI hashtable not used in GTP 2025-09-19 09:03:06 +02:00
Robert Schmidt
dc3b43de07 Make GTP compile on its own, without LTE
Avoid the include gtpv1_u_messages_types.h, as this pulls in e.g., LTE
RRC definitions. The CU-UP load tester integrated in one of the
following commits should be able to build without LTE RRC, if it was for
GTP. Unfortunately, ITTI also pulls in LTE RRC, so it's also somewhat
useless...

Put some forward declarations instead. That also shows that the API is
unnecessarily complex, and would need some cleanup.
2025-09-19 09:03:06 +02:00
Robert Schmidt
87ac99c489 Correctly link sctp into SCTP_CLIENT
Remove sctp from all other targets, since we use sctp::sctp on
SCTP_CLIENT (would fail if it does not exist), and SCTP_CLIENT already
fulfils the SCTP dependency.
2025-09-19 09:03:06 +02:00
Robert Schmidt
d9361aeebc Correct Findsctp.cmake
- Provide some documentation
- Make cmake keywards and sctp lib name lowercase
- Use standard form of find_package_handle_standard_args()
- Make an imported target sctp::sctp that will fail if being used in
  cmake unless defined, which will avoid that "sctp" appears in the
  cmake code but is silently discarded

See also:
https://cmake.org/cmake/help/latest/manual/cmake-developer.7.html#a-sample-find-module
2025-09-19 09:03:06 +02:00
Robert Schmidt
01fa8e3c3e CMake module path to beginning
Move the path to the beginning, so that we can use it early.
Specifically, it was after the SCTP module, and the next commit will use
the Findsctp.cmake module to find SCTP. Use the cmake-proper variable.
2025-09-19 09:03:06 +02:00
Laurent THOMAS
42e4e8d1ef fix array sizes and aligment issues in 5G UE dci decoder 2025-09-19 09:03:06 +02:00
Laurent THOMAS
b1f830a287 fix SIMD tail length in nr_pdcch_detection_mrc() and replace >> operator by / 2025-09-19 09:03:06 +02:00
Laurent THOMAS
d0223139ac move static some functions that are used only in one file 2025-09-19 09:03:06 +02:00
Laurent THOMAS
aa24a1f246 generalize constant nb re per rn in dci_nr.c 2025-09-19 09:03:06 +02:00
Laurent THOMAS
e07c7cc5e3 simplify and make more local variables in nr_rx_pdcch() and fix small bugs (size 9 RE instaed of 12 RE) 2025-09-19 09:03:06 +02:00
Laurent THOMAS
291a30890c reduce size and make local rxdataF_comp in nr_rx_pdcch() 2025-09-19 09:03:06 +02:00
Laurent THOMAS
e84e666a68 simplify nr_pdcch_channel_compensation() 2025-09-19 09:03:06 +02:00
Laurent THOMAS
875cc5c6b2 simplify function nr_pdcch_extract_rbs_single() 2025-09-19 09:03:06 +02:00
Laurent THOMAS
7a012a3310 add assert in a case of wrong gNB configuration file 2025-09-19 09:03:06 +02:00
Cedric Roux
d178adee19 rfsim: add a T trace to dump RX IQ data
Only for one antenna.
2025-09-19 09:03:06 +02:00
Cedric Roux
bde6e2a0c5 T hacks: add ofdm-plot
Used to... surprise... plot OFDM data as output (or input) by gnb!

Limitation: only one antenna.
2025-09-19 09:03:06 +02:00
Cedric Roux
e2f985b0d3 T: dump logs to stderr, not stdout
This is a problem with the new tool ant0 when we dump IQ to stdout.
The logs will mess up the recording.
2025-09-19 09:03:06 +02:00
Cedric Roux
e85aeb2051 rfsim: add a T trace to dump IQ data
Only for one antenna.
2025-09-19 09:03:06 +02:00
Cedric Roux
b8090d6f0f T hacks: add ant0 utility to dump IQ data as float complex
Or as int16.
2025-09-19 09:03:06 +02:00
francescomani
7e36158227 config_isparamset doesn't work for array types, using numelt instead 2025-09-19 09:03:06 +02:00
Thomas Schlichter
563819eb33 NR UE: invalidate SI window on successful SI reception to avoid wrongly reusing this old SI window for new SI reception
This fix was suggested by Francesco Mani
2025-09-19 09:03:06 +02:00
Thomas Schlichter
fe1e51eb8d gNB: fix case when multiple Rel-17 SIBs would be defined
The boolean value v17_sib was not set to true when allocating si_schedulingInfo_v17 and schedulingInfo2_r17.
So multiple Rel-17 SIBs would lead to multiple allocations and only the last SIB being actually configured.

Fix this by removing the redundant v17_sib variable and directly check if the memory was already allocated.
Also move the definition and allocation of si_schedulingInfo_v17 closer to its actual usage.
2025-09-19 09:03:06 +02:00
Thomas Schlichter
16499f1334 NTN config: setting sib1_tda is not required anymore 2025-09-19 09:03:06 +02:00
Thomas Schlichter
2f803844b6 set ntn-UlSyncValidityDuration-r17 to 5 seconds for LEO scenario
Now that we reliably receive SIB19, we can set the ntn-UlSyncValidityDuration-r17 to a sane value
and thus make sure that the UE always has up-to-date SIB19 information.
2025-09-19 09:03:06 +02:00
Thomas Schlichter
2bbed8296a NR UE: fix calculation of SI window expiry 2025-09-19 09:03:06 +02:00
Thomas Schlichter
1ac51d465a gNB: fix scheduling of rel-17 SIBs 2025-09-19 09:03:06 +02:00
Romain Beurdouche
a8c6d48856 feat(LDPCImplementation.md): Fix documentation
* Outdated names of the functions of the segment coding interface.
* Ambiguity about loading of the segment coding libraries.
2025-09-19 09:03:06 +02:00
Robert Schmidt
912a2bc546 Telnet CI: Handle error of no RNTI 2025-09-19 09:03:06 +02:00
Robert Schmidt
ddb4467fd9 Bugfix: when no UE found, return -1 2025-09-19 09:03:06 +02:00
Robert Schmidt
864382ffb0 Add XML step to check UE is on dedicated BWP 2025-09-19 09:03:06 +02:00
Robert Schmidt
3b044bf8b3 Remove non-existing XML steps 2025-09-19 09:03:06 +02:00
Robert Schmidt
2b5f6f2464 Add telnet command to get UE's BWP 2025-09-19 09:03:06 +02:00
francescomani
a969706b03 use CSET0 for common search space in dedicated BWP 2025-09-19 09:03:06 +02:00
luis_pereira87
c4f6563642 CI: Add DedicatedBWP to '40 MHz TDD F1+E1 SA' in 'RAN-SA-B200-Module-SABOX-Container' 2025-09-19 09:03:06 +02:00
luis_pereira87
9b74093bcb Remove 'searchspaceid' from 'verify_agg_levels' function because it was used only for LOG 2025-09-19 09:03:06 +02:00
luis_pereira87
448aa2c5d0 Add a 'common' type SearchSpace in the NR_BWP_DownlinkDedicated IE for DedicatedBWPs to get DCIs decoded in common searchspace of a DedicatedBWP
After RRCSetup, until RRCReconfigurationComplete, gNB continues to schedule ULSCH using DCIs in a common searchspace.
In theory, the UE should decode DCIs in:

            <downlinkBWP-ToAddModList>
                <BWP-Downlink>
                    <bwp-Common>
                        <pdcch-ConfigCommon>
                            <setup>
                                <commonSearchSpaceList>
                                    ...
                                </commonSearchSpaceList>

However, due to the limited amount of time to investigate this issue, the easy way I found to get DCIs decoded in common searchspace of a DedicatedBWP was by adding a common searchspace in the bwp-Dedicated:

                    <bwp-Dedicated>
                        <pdcch-Config>
                            <setup>
                                <searchSpacesToAddModList>
                                    <SearchSpace>
                                        ...
                                    </SearchSpace>
                                </searchSpacesToAddModList>

This way, let's call it a workaround.
2025-09-19 09:03:06 +02:00
luis_pereira87
b0be4931bb Fix fill 'initialDownlinkBWP->pdsch_Config' when there are DedicatedBWPs
This fixes the reported 'RSRP = 0' issue when the UE is in the InitialBWP and we have DedicatedBWPs configured
2025-09-19 09:03:06 +02:00
luis_pereira87
ce4e54e08b Improve CORESET selection 2025-09-19 09:03:06 +02:00
luis_pereira87
d61211e01d Improve SearchSpace selection
There is a removal of the NR_SearchSpace__searchSpaceType_PR because, at this point, the gNB already selected the searchspace and it calls this function only to find the coreset with controlResourceSetId based on the previously searchspace id selected;
There is no need to send a pointer to the entire searchspace structure because we only need the controlResourceSetId: NR_ControlResourceSetId_t coreset_id = *ss->controlResourceSetId;

It also prevents a segmentation fault, in develop when NR_SearchSpace__searchSpaceType_PR_common because gNB calls sched_ctrl->coreset = get_coreset(nr_mac, scc, bwpd, sched_ctrl->search_space, target_ss); the bwpd is NR_BWP_DownlinkDedicated_t *bwpd = NULL; and is it incompatible with the cast to NR_BWP_Downlink_t in coreset = ((NR_BWP_Downlink_t*)bwp)->bwp_Common->pdcch_ConfigCommon->choice.setup->commonControlResourceSet; this was never noticed until now because gNB barely used NR_SearchSpace__searchSpaceType_PR_common
2025-09-19 09:03:06 +02:00
Matthias Mehlhose
ed91d883e1 mod: use random numbers in unit test function 2025-09-19 09:03:06 +02:00
Mario Joa-Ng
964d8e3c35 mod: unit test code to compare CM and SIMD results on both antennas 2025-09-19 09:03:06 +02:00
Matthias Mehlhose
c5159a65c3 Initial unit test to refactor and fix nr_layer_precoder_simd function (See #955) 2025-09-19 09:03:06 +02:00
Jaroslava Fiedlerova
ccb68d7471 CI: adjust gNB conf file in OAIUE pipeline
Following frequency change in the pipeline, we observed degraded UL channel
conditions resulting in low UL throughput. Increasing attenuation on the gNB
side was found to mitigate this issue by improving UL channel quality
and reducing UL noise power.

Increase tested UL and DL bitrates in OAIUE pipeline.
2025-09-19 09:03:06 +02:00
Jaroslava Fiedlerova
cc7e32d944 CI: change frequency for AW2S pipeline 2025-09-19 09:03:06 +02:00
Jaroslava Fiedlerova
69e65df4be CI: change frequency for OAIUE pipeline 2025-09-19 09:03:06 +02:00
Jaroslava Fiedlerova
57978c73c4 CI: change frequency for phytests with USRP N310 2025-09-19 09:03:06 +02:00
Laurent THOMAS
e302845688 Fix a 4G UE bug 2025-09-19 09:03:06 +02:00
Laurent THOMAS
a720e8e63f trace to try to debug old 4G bug 2025-09-19 09:03:06 +02:00
Robert Schmidt
3901b78ef4 Remove unused parameter from build_oai 2025-09-19 09:03:06 +02:00
Laurent THOMAS
ecc4b247ca Fix potential out-of-bound write
Tell strncpy() the size including the NULL byte to make sure we copy all
data.

This just fixes these warnings:

    openair3/NAS/TOOLS/conf_usim.c: In function ‘gen_usim_data’:
    openair3/NAS/TOOLS/conf_usim.c:191:17: warning: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
    openair3/NAS/TOOLS/conf_usim.c:190:53: note: length computed here
    openair3/NAS/TOOLS/conf_usim.c:195:17: warning: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
    openair3/NAS/TOOLS/conf_usim.c:194:54: note: length computed here

add copy with limited size and truncate properly with null C string termination.

As clang-format doesn't handle tab indented files and as it is not the
OAI coding rule, the entire file is re-indented with present OAI coding
rule.
2025-09-19 09:03:06 +02:00
Laurent THOMAS
3ef10e9525 Remove specific directory for LTE SIM management tools
Move into openair3/NAS/TOOLS/CMakeLists.txt, and simplify the
CMakeLists.txt.

Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2025-09-19 09:03:06 +02:00
Sakthivel Velumani
38d9041606 Set sib1 reception flag as per spec
TS 38.213 4.1 says coreset 0 is present only if kssb < 24 for FR1 and <
12 for FR2. This commit sets get_sib1 flag based on kssb.

Also, setting of mac state is taken out of function nr_ue_decode_mib().
2025-09-19 09:03:06 +02:00
Sakthivel Velumani
f80150c06e Add new physim test cases for nr_dlsim
Following tests are added:
  1. 256QAM with TDL-A channel model
  2. 256QAM with 2 layers
2025-09-19 09:03:06 +02:00
Sakthivel Velumani
4e14efeaa1 Fix bug in LLR threshold buffer
The LLR threshold buffers hold only for one symbol but the LLRs are
computed for all symbols together. So only the threshold of last symbol
was used for computing LLR for all other symbols.

This commit calls nr_dlsch_llr for each symbol togther with rest of
nr_rx_pdsch() and calls nr_dlsch_layer_demapping at the last symbol.

Fixes issue 948.
2025-09-19 09:03:06 +02:00
Sakthivel Velumani
e1dddd5970 Dlsim dump processing buffers
Write extracted rxF buffer to output bin file.
Fix offset in writing rxF buffer.
2025-09-19 09:03:06 +02:00
Sakthivel Velumani
6cb6f0d63f Fix counting error bits in nr_dlsim
Recently f buffer was changed to hold packed bits and the correspoinding
change in dlsim was not done so the number of error bits before decoding
was incorrectly reported. This commit fixes it.
2025-09-19 09:03:06 +02:00
Sakthivel Velumani
9ea802275c Fix alignment of LLR buffer in UE 2025-09-19 09:03:06 +02:00
francescomani
13511fd009 fix tun_if.c warning: specified bound 16 equals destination size 2025-09-19 09:03:06 +02:00
francescomani
fac8a39a50 take into account starting PRB when deciding even/odd PRB for CSI PDSCH rate-matching 2025-09-19 09:03:05 +02:00
Robert Schmidt
c1701b0a9a Avoid uninitialized variable btilde
Pre-initialize this variable. It should be set in pucch2x_scrambling(),
but the compiler warns with

    In function ‘pucch2x_modulation’,
        inlined from ‘generate_pucch2x’ at oai/openair1/PHY/LTE_UE_TRANSPORT/pucch_ue.c:425:3:
    oai/openair1/PHY/LTE_UE_TRANSPORT/pucch_ue.c:361:18: warning: ‘btilde’ may be used uninitialized [-Wmaybe-uninitialized]
      361 |     d[i] = btilde[i] == 1 ? -amp : amp;
    oai/openair1/PHY/LTE_UE_TRANSPORT/pucch_ue.c: In function ‘generate_pucch2x’:
    oai/openair1/PHY/LTE_UE_TRANSPORT/pucch_ue.c:387:11: note: ‘btilde’ declared here
      387 |   uint8_t btilde[20];
2025-09-19 09:03:05 +02:00
Robert Schmidt
cdbd8f7a95 Remove --usim-test command line option
Remove the --usim-test option: to my knowledge, it's not used by users,
and is misleadingly placed in various places where there should not be a
difference w.r.t. USIM configuration.

When making the changes, I assumed that --usim-test would be 0 (the
default), which is the case in all executables when not specified in
options except for the nr_dlsim, nr_pbchsmi, nr_ulsim simulators.

The only exception is the initialization of PDCP from the MAC, which is
not correct (the PDCP is in the CU, so it does not make sense to call it
from the MAC which is in the DU). Instead, always initialize from main,
even in the NSA case (NSA was covered by the incorrect initialization
from MAC).

This in turn let to some more cleanup around function du_rlc_data_req().
After receiving GTP packets at the DU, they were given to the PDCP to
enqueue the packet at RLC. This does not work anymore, since the PDCP is
not initialized; it also does not seem necessary, as this enqueue
functionality is necessary to decouple PDCP and RLC to avoid deadlocks
in monolithic, but in split-mode, this cannot happen. Instead, call
directly into the RLC when receiving GTP packets.
2025-09-19 09:03:05 +02:00
Abdo-Gaber
19d691da39 Add Readme for the Data Recording Application
It provides and overview about the Architecture, Requirement Packages,
Configuration Files, How to run Data Recording Application, and an
Overview on Collected Data Set.
2025-09-19 09:03:05 +02:00
Abdo-Gaber
4712b9ac8f Add Data Recording Application v1.0 (main app, SigMF Interface, Config files, Sync validation)
The data recording App includes the following files:
- The main app: data_recording_app_v1.0.py that has the data control service, interact with tracers, and data sync and conversion service
- The configuration file: common/utils/data_recording/config/config_data_recording.json
- The wireless dictionary file: common/utils/data_recording/config/wireless_link_parameter_map.yaml
- The SigMF Interface (common/utils/data_recording/lib/sigmf_interface.py) to store recorded data and meta-data in SigMF format
- A simple script (common/utils/data_recording/sync_validation_demo.py) to validate that the recorded bits from gNB and UE are in Sync
- For more info look to doc/data_recording.md

A squashed commit further updates:
- Enhance Data Recording App structure
- Support the new state machine of T-Tracers
- Add new files for Config Interface, sync Service, def of data recording messages, and common utilties
- Make part of logging on Terminal configurable
2025-09-19 09:03:05 +02:00
Abdo-Gaber
bf1c58c3d6 Add Data Collection Services (T-Tracer for gNB and UE)
- Add _tracer_app_gnb and t_tracer_app_ue apps to common/utils/T/tracer/Makefile
- Add Data collection Service for gNB: common/utils/T/tracer/t_tracer_app_gnb.c
- Add Data Collection Service for UE: common/utils/T/tracer/t_tracer_app_ue.c
- Add Shared memory configuration (common/utils/T/tracer/shared_memory_config.h),
  since We will have too much memory consumption on the stack if the
  T-tracer is not fast enough to process the traces or if we have too
  much traces. As a result, tracers start to capture data, write data in
  shared memory, then close the T-Tracer after getting the recording of
  N slots
- Support the operation of : COnfig, Record, and Stop
- Poll from Socket and not use get_events to mitigate long-time waiting
  if there is no data in buffer or the UE is already released or crashed
- Add extra offset to improve data sync
2025-09-19 09:03:05 +02:00
Abdo-Gaber
de9a4ea4af Add Trace RX Payload on gNB (msg: GNB_PHY_UL_PAYLOAD_RX_BITS) including UTC time
Log gNB RX Payload for both CRC valid and invalid cases
2025-09-19 09:03:05 +02:00
Abdo-Gaber
4cb0db600b Add traces on UE PHY UL and related requirement: Tx Scrambled bits and Tx payload bits
- Update input parameters to nr_ulsch_encoding () in
  nr_transport_proto_ue.h to get number_dmrs_symbols to be added to
  meta-data.
- In nr_ulsch_coding.c: Trace UE PHY UL Payload TX bits (T_message:
  T_UE_PHY_UL_PAYLOAD_TX_BITS) including related meta-data and UTC time.
- In nr_ulsch_ue.c: Trace UE PHY UL Scrambled TX bits (T_message:
  T_UE_PHY_UL_SCRAMBLED_TX_BITS) including related meta-data and UTC
  time.
- Fix the input prameters in nr_ulsch_encoding () called in
  (openair1/SIMULATION/NR_PHY/ulschsim.c) since a new input parameter
  has been added.
2025-09-19 09:03:05 +02:00
Abdo-Gaber
51540d1f2b Add traces on gNB PHY UL and related requirement: FD PUSH IQ, FD DMRS, and UL Channel estimates wi/wo interpolation
- The required memories have been created and initialized in:
  openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
- Those memories: memory for DMRS signals, memory for channel estimates
  based on DMRS positions, memory to store slot grid with channel
  coefficients based on DMRS positions after interpolation, and memory
  to store extracted data including PUSCH + DMRS.
- The input parameters to nr_pusch_channel_estimation() has been updated
  to get the pointer to the added memories of pusch_dmrs_slot_mem and
  pusch_ch_est_dmrs_pos_slot_mem
  (openair1/PHY/NR_ESTIMATION/nr_ul_estimation.h)
- The DMRS grid of NR slot and the estimated channel coefficients at
  DMRS locations are logged to created memories in:
  openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
- The function inner_rx in
  openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c is updated to log
  the extracted ULSCH PRBs and the interpolated channel coefficients.
- The T-macro() has been called in
  (openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c) to trace added
  traces: T_GNB_PHY_UL_FD_DMRS, T_GNB_PHY_UL_FD_CHAN_EST_DMRS_POS,
  T_GNB_PHY_UL_FD_PUSCH_IQ, T_GNB_PHY_UL_FD_CHAN_EST_DMRS_INTERPL
2025-09-19 09:03:05 +02:00
Abdo-Gaber
eca2af37a8 Add log tools to get and process UTC Time during data tracing 2025-09-19 09:03:05 +02:00
Abdo-Gaber
fa895fb648 Add new trace messages on UE and gNB
GNB_PHY_UL_FD_PUSCH_IQ,
GNB_PHY_UL_FD_DMRS,
GNB_PHY_UL_FD_CHAN_EST_DMRS_POS,
GNB_PHY_UL_PAYLOAD_RX_BITS,
UE_PHY_UL_SCRAMBLED_TX_BITS,
UE_PHY_UL_PAYLOAD_TX_BITS
2025-09-19 09:03:05 +02:00
Abdo-Gaber
f7468c67ef T_tracer Extension to Support up to 35 Parameters in the T() macro 2025-09-19 09:03:05 +02:00
Laurent THOMAS
d546b957c3 bad type multi casts with wrong meaning like cast to ** a array of 2D (wrong in C) 2025-09-19 09:03:05 +02:00
Laurent THOMAS
20521226b4 enhance llr unitary tests 2025-09-19 09:03:05 +02:00
Laurent THOMAS
eba960b682 factorize code that initialize all 0xff simd vectors 2025-09-19 09:03:05 +02:00
Jaroslava Fiedlerova
27e3f13ed2 CI: move RFSim 4G to acamas 2025-09-19 09:03:05 +02:00
Jaroslava Fiedlerova
209e2bccb6 rfsimulator: fix model name for channel
bridge->nb_cnx++ is done before calling snprintf(modelname,... in the function,
so we take the model name of the next channel. This commit corrects the issue by
using bridge->nb_cnx - 1, ensuring that the model name corresponds to the currently
connected client.
This bug was introduced by MR !3455.

Co-authored-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
Co-authored-by: Laurent THOMAS <laurent.thomas@open-cells.com>
2025-09-19 09:03:05 +02:00
Marius Tillner
d8554ac0d9 bugfix: avoid segmentation fault when Redcap tries to connect to gNB as NR_ServingCellConfig_t scd is NULL when Redcap does RA 2025-09-19 09:03:05 +02:00
Robert Schmidt
c34b08df85 RAN-Container-Parent: Auto-generate artifact in failure case
RAN-Container-Parent uses Jenkinsfile-GitLab-Container, which only
triggers sub pipelines, then collects their results. However, if a sub
pipeline did not generate an artifact, the result was skipped. It would
also not show it in the automatically generated result page, when it
should.

Remedy this by automatically generating a file with a link to the
pipeline if the artifact could not be retrieved, which

1. Will give a link, which is easier for developers to follow to the
   pipeline than manually clicking through Jenkins,
2. Makes the failed pipeline appear in the list of failed pipelines.
2025-09-19 09:03:05 +02:00
Jaroslava Fiedlerova
d01958a019 CI: test T2 with DPDK 22.11
Build and run OAI physims with DPDK version 22.11 for testing with the latest
T2 firmware release. Environment variables PKG_CONFIG_PATH and LD_LIBRARY_PATH
are set to point to the custom installation path of DPDK v22.11.
2025-09-19 09:03:05 +02:00
francescomani
c99e528a63 use function to count number of dmrs symbols 2025-09-19 09:03:05 +02:00
francescomani
2fbd672e04 replace get_dmrs_symbols_in_slot with new function (does exactly the same) 2025-09-19 09:03:05 +02:00
francescomani
6901cf48d9 function to count bits with a mask for start and stop 2025-09-19 09:03:05 +02:00
Robert Schmidt
53580862f7 Verify 2nd PDU session is up 2025-09-19 09:03:05 +02:00
Robert Schmidt
fe81eeb1b0 CI 5G RFsim nFAPI u0/25PRB: Add Ping test on second PDU session 2025-09-19 09:03:05 +02:00
Reem Bahsoun
1e872cf363 Add WNC RU in Aerial doc + update cuBB iamge name and number of cores used (related to MR 3477) 2025-09-19 09:03:05 +02:00
Reem Bahsoun
a56ce6f20d Add high throuput testing on CI 2025-09-19 09:03:05 +02:00
Reem Bahsoun
2539daef03 Change frequency to match the WNC RU range of frequencies 2025-09-19 09:03:05 +02:00
Jaroslava Fiedlerova
e4e2aa1c22 CI: adjust UL throughput target for 2x2 RFSim5G test on acamas
This commit reduces the UL throughput target in the 2x2 test to align
with the host’s performance capabilities. The adjustment ensures more
reliable and consistent CI results.
2025-09-19 09:03:05 +02:00
Jaroslava Fiedlerova
daed677994 CI: add sleep after UE deployment in TDD dora test
Give more time to the gNB-UE to establish the connection before ping
test is triggered.
2025-09-19 09:03:05 +02:00
Jaroslava Fiedlerova
22c7943e66 CI: Increase sleep time in RFSim5G
Based on observations from testing on acamas, the interval between DL
disruption and the UE synch check needs to be increased - the UE takes
longer to go out of sync . A sleep of 15 seconds has proven to be a
reliable value to ensure constant results.
2025-09-19 09:03:05 +02:00
Jaroslava Fiedlerova
647d490241 CI: add SYS_NICE capability in some RFSim5G tests
Add SYS_NICE capability to enable setting thread priority and affinity
in rfsim5g tests. This improves execution speed in test cases with
heavier processing workloads.
2025-09-19 09:03:05 +02:00
Jaroslava Fiedlerova
b9c08993d5 CI: replace nc by ncat
When migrating from RHEL (on cacofonix) to Ubuntu 22.04 (on acamas), the `nc`
command needs to be replaced by `ncat`. The version of `nc` available on Ubuntu
is the OpenBSD variant, which lacks support for some options used in our scripts.
`ncat` from the Nmap is used instead.
2025-09-19 09:03:05 +02:00
Jaroslava Fiedlerova
3687748cd9 CI: move RFSim 5G to acamas 2025-09-19 09:03:05 +02:00
Bartosz Podrygajlo
7f6b2ff5bc NR UE: Enable additional PDU session
Add new command line / config parameter --extra-pdu-id which when
configured creates an extra PDU session.

Rename --default_pdu_id to --default-pdu-id
2025-09-19 09:03:05 +02:00
Bartosz Podrygajlo
d61f449afb Fix a wraparound bug with equal priority remaining buffer size in MAC 2025-09-19 09:03:05 +02:00
rmagueta
3067e616c8 Inter-frequency handover documentation update 2025-09-19 09:03:05 +02:00
rmagueta
7da2dcde2b Get measurement of neighboring cells and measurement gaps working after RRCReestablishment 2025-09-19 09:03:05 +02:00
rmagueta
1c947ceca1 Get new measConfig and measurementTimingConfiguration for target gNB-DU during handover 2025-09-19 09:03:05 +02:00
rmagueta
608de4d5b3 Send MeasConfig to DU, Receive MeasGapConfig from DU 2025-09-19 09:03:05 +02:00
rmagueta
7cfec04648 Refactor code, add inter-freq neighbors, avoid mem leak
Previously, we only supported intra-frequency handovers, so the
measurements where only for intra-frequency, reusing the same
measurement object. Now that we would support inter-frequency handover,
also add multiple MeasObjects for each neighbor.
2025-09-19 09:03:05 +02:00
rmagueta
97c98a441e Refactor get_MeasConfig(): create subfunctions 2025-09-19 09:03:05 +02:00
rmagueta
b790fa03d0 Add logic for measgap scheduling 2025-09-19 09:03:05 +02:00
rmagueta
60438f4e8e Handle Measurement Timing Configuration in DU/MAC handler 2025-09-19 09:03:05 +02:00
rmagueta
d6db6f54fb Add MeasGap Configuration in Radio config
Add some helper functions that will be used by the MAC handler to fill
the right MeasGap configuration based on Measurement Configuration sent
by the CU, in the next commit.
2025-09-19 09:03:05 +02:00
rmagueta
ecc7ef84fe UE RRC: Print warning that measurement gaps are not supported 2025-09-19 09:03:05 +02:00
rmagueta
d9427243c3 Add F1AP procedures related to measurementTimingConfiguration 2025-09-19 09:03:05 +02:00
Robert Schmidt
2270ece020 Cleanup possible transmission interrupt states 2025-09-19 09:03:05 +02:00
fatich
c0cabf7c64 fix(RLC): Count dropped DL SDUs by the RLC
When a downlink SDU was discarded by the RLC Acknowledged Mode entity due to a full transmit buffer (tx_maxsize), the drop statistics were not being updated.
The `txpdu_dd_pkts` and `txpdu_dd_bytes` counters remained at 0.
It should be noted that while the statistics are named `txpdu_dd_*`, the drop at this stage occurs at the SDU level.
2025-09-19 09:03:05 +02:00
Cedric Roux
fa448fa919 nr rlc: speedup RX path of RLC AM
rx_list is replaced by an array of size 2^(SN size - 1)
which is 131072 for an SN size of 18 bits, leading to
1048576 bytes of memory used. (Less for smaller SN sizes.)

A lot of RX processing was to run through rx_list. When the list was
big (with some non-ideal channel), it can take some time. Removing this
list should improve things. Checking with benchmark_nr_rlc_am_entity
a speedup of more thant x10 is achieved (except for the case 1024 which
is surprisingly faster than the others in the develop branch).

The only thing that may be slower is when looking for cur->next where
the SN is different, in which case we need to look for all SN one by
one until we find something or reach the limit (rx_highest_status).
These are the functions get_first_rx_pdu() and get_next_rx_pdu().
2025-09-19 09:03:05 +02:00
Cedric Roux
5fc7d3abb4 nr rlc: discarding a packet when RX buffer is full is a warning
We want to see it. It's not normal, may disturb the system.
2025-09-19 09:03:05 +02:00
Cedric Roux
ff47cdee88 fix compilation of nr rlc tests
./run_tests.sh in openair2/LAYER2/nr_rlc/tests was not functional anymore.
2025-09-19 09:03:05 +02:00
alexjiao
ca0bbaeac5 Fix PDSCH overlap with ZP CSI-RS case
When PDSCH overlap with ZP CSI-RS, nb_re_pdsch needs to be reduced by number of CSI-RS RE.
2025-09-19 09:03:05 +02:00
Rajesh Guttula
8263b8ccfd Extnded changes to "Initial support for RedCap" feature in gNB
The changes done in this commit are to contribute the supporting changes
for the existing "Initial support for RedCap" feature in gNB.

In this patch, handle and store the RedCap related IE's present in "NR
UE Capability Information" msg which are

- 'supportOfRedCap-r17'
- 'supportOf16DRB-RedCap-r17'
- 'longSN-RedCap-r17'
- 'am-WithLongSN-RedCap-r17'

use 'longSN-RedCap-r17' and 'am-WithLongSN-RedCap-r17' IEs to set the SN
length to either 12 Bit or 18 Bit accordingly.
2025-09-19 09:03:05 +02:00
Laurent THOMAS
0ed8566a45 add telnet commands trace 2025-09-19 09:03:05 +02:00
Laurent THOMAS
0793e8226c fix gNB that should always perform tx in case of rfsim (like continuous-tx 2025-09-19 09:03:05 +02:00
Laurent THOMAS
bf5e7b421c fix bug in rfsim->nb_cnx for client side. it has no usage except a cpu optimisation in case one single rfsim socket and SISO case 2025-09-19 09:03:05 +02:00
Laurent THOMAS
bb3e838851 clarify first transmission to client, split process_recv in 2 functions 2025-09-19 09:03:05 +02:00
Laurent THOMAS
92b30fa714 split rfsimulator too long function in smaller ones. Clean code for bad "UE" instead of rfsim client/server. Simplify logic 2025-09-19 09:03:05 +02:00
Laurent THOMAS
cf25fa375c trace in 4G RAR processing to debug ci result 2025-09-19 09:03:05 +02:00
Laurent THOMAS
98bdb24d53 RF simulator: Fix concurrency issues during new client connections
Fix concurrency issues happening when a new client connects, sometimes
leading to a total softmodem deadlock.

Key changes:
- Fix sample sending on new client connection: send the first
  sample only to the newly connected client.
- Remove the --rfsimulator.hanging-workaround option
- Replace global nb_ue and Sockmutex with nb_cnx and Sockmutex
  in rfsimulator_state_t for better concurrency and clarity.
2025-09-19 09:03:05 +02:00
Rúben Soares Silva
fadcf619e4 Set PNF slot_ahead to 1 when using WLS as the transport mechanism 2025-09-19 09:03:05 +02:00
Rúben Soares Silva
250561b2b1 Fix compilation for simulators and LTE softmodem
Add nr_fapi_p5 library to the simulators common library for access to the utility function `copy_config_request`

Add dummy VNF/PNF functions to be referenced by lte-softmodem, before LTE and NR implementations of the VNF/PNF are separated
2025-09-19 09:03:05 +02:00
Rúben Soares Silva
583a16c946 Add documentation for different VNF/PNF transport
Add a section in nfapi.md related to the different transport mechanisms available for VNF/PNF communication
Edit NR_NFAPI_archi.md to describe the VNF and PNF processing logic, as well as adding a flowchart for each of the components execution
Add the necessary patch to install the WLS library in the system
2025-09-19 09:03:05 +02:00
Rúben Soares Silva
949d8daa1d Prevent pulling TLV tag and length over end of the buffer.
Checks whether there are at least 4 bytes available to pull tag and length values.
On tlv_list unpack, if the size is sent as 0, immediately exit the function
2025-09-19 09:03:05 +02:00
Rúben Soares Silva
d8139780ab Add VNF callback for ERROR.indication
Created a function nr_error_ind_cb for the VNF that takes a received ERROR.indication and shows some details regarding the reported error from the PNF, since up until now it was not handled and treated as an unknown message.
Proper error handling procedure not created, only shows that the error occurred.
2025-09-19 09:03:05 +02:00
Rúben Soares Silva
2c065f7379 Use existing VNF functions for P7 messages
Remove duplicated functions in fapi_vnf_p7.c, leaving only functions for messages that require usage of the secondaty data_buf for unpacking

Move vnf_info struct declaration to nfapi_vnf.h to be available in fapi_nvIPC.c
2025-09-19 09:03:05 +02:00
Rúben Soares Silva
72ca42d40e Change Aerial VNF to use existing functions to process P5 messages
Remove fapi_vnf_p5.c and .h files as they're now unused

Move scheduler functions to fapi_nvIPC.c
2025-09-19 09:03:05 +02:00
Rúben Soares Silva
0b49045152 Initial refactoring for P5 messages in Aerial VNF 2025-09-19 09:03:05 +02:00
Rúben Soares Silva
59d16dc5ca Implementation of VNF using WLS as message transport
Add check to vnf_nr_handle_param_response for when phy_info is not found

The WLS VNF is in charge of Enqueueing the used blocks after usage for transport, this is done by keeping track of all blocks used, and calling WLS_Enqueue for all of them upon receiving a SLOT.indication
2025-09-19 09:03:05 +02:00
Rúben Soares Silva
3084b10097 Implementation of PNF using WLS as message transport
The common library exposes functions for the PNF to return the received blocks to the VNF for it to call WLS_Enqueue on them.
This is done in order to ensure the Blocks are returned after processing, also preventing the Dequeueing of blocks that are still being used, i.e. the internal value is not -1
All saved blocks are to be enqueued at the reception of a SLOT.indication by the VNF

Additionally, the definition of NFAPI_MAX_PACKED_MESSAGE_SIZE was moved to nfapi_interface.h and removed from the other headers, this is done to allow to set the maximum message size when using WLS by only changing the value in one place

Fixup fapi_nr_message_header_unpack call in nfapi_hex_parser
2025-09-19 09:03:05 +02:00
Rúben Soares Silva
42a487f3a1 Separate VNF socket send functions into separate socket library 2025-09-19 09:03:05 +02:00
Rúben Soares Silva
55aa6eaa14 Separate PNF socket send functions into separate socket library 2025-09-19 09:03:05 +02:00
Rúben Soares Silva
ce1d31bcdf Fix non-SCTP socket communication for P5 messages between PNF and VNF.
Switches the used socket type in pnf_interface.c and vnf_interface.c.
These values must always be the same in both components so the same socket type is used in both
2025-09-19 09:03:05 +02:00
Rúben Soares Silva
b8c6dc82ab Add default PNF timing_info value for when the TLV is not sent
Intended to allow FAPI PNF to work without this nFAPI TLV being sent
2025-09-19 09:03:05 +02:00
Rúben Soares Silva
f49c93e494 Add send function pointers to PNF 2025-09-19 09:03:05 +02:00
Rúben Soares Silva
3499f1f95a Add send function pointers to VNF 2025-09-19 09:03:05 +02:00
Rúben Soares Silva
8da9849b2f Change VNF to use functions pointers to pack/unpack messages.
Adds 3 new function pointers to the P5 and P7 VNF structures, allowing to configure which function to use to pack/unpack the messages, as well as unpack the message header, being then used seamlessly regardless of using the FAPI or nFAPI functions.
2025-09-19 09:03:05 +02:00
Rúben Soares Silva
857df18c1f Change PNF to use functions pointers to pack/unpack messages.
Adds 3 new function pointers to the P5 and P7 PNF structures, allowing to configure which function to use to pack/unpack the messages, as well as unpack the message header, being then used seamlessly regardless of using the FAPI or nFAPI functions.

Changes the header unpack and message unpack functions to return true on success and false on failure, instead of an int
2025-09-19 09:03:05 +02:00
Rúben Soares Silva
ee1f515215 Refactor fapi_nr_p5_message_unpack to have the same signature as nfapi_nr_p5_message_header_unpack.
This change is done in preparation to add the header unpack functions to the VNF and PNF structures as function pointers, used to peek the message headers prior to processing.
Add a faux fapi_nr_p7_message_header_unpack with the same signature as nfapi_nr_p7_message_header_unpack, to be used for the P7 header unpack function pointer.
2025-09-19 09:03:05 +02:00
Rúben Soares Silva
2f24896ad9 Use P5 copy function for config.request instead of memcpy 2025-09-19 09:03:04 +02:00
Romain Beurdouche
45563a84ed feat(oran_fhlib_5g): pkgconfig fix for E release
E release had the same issue of not using pkgconfig properly as F release.
This issue was fixed in F release when enabling its compatibility with DPDK 21+.
This commit brings this fix to E release.
2025-09-19 09:03:04 +02:00
Romain Beurdouche
753bc58160 feat(oran_fhlib_5g): Enable to include a BBDEV device while initializing EAL
In order to be usable in parallel of FHI 7.2, BBDEV devices should be included in the EAL initialization that is prformed by xran.
This commit adds a way of adding the BBDEV device from OAI.
Also fixes an issue with pkgconfig in xran.
2025-09-19 09:03:04 +02:00
Romain Beurdouche
a3917591a9 feat(oran_fhlib_5g): F release works with DPDK21+
Modify xran F release patch to make it compile and run with DPDK 21+
(tested with DPDK 22.11)
2025-09-19 09:03:04 +02:00
Robert Schmidt
24ba1f824c get xran stats
Get xran stats in the trx_oran_get_stats function
and use trx_oran_get_stats upon stopping and ending RF.

Co-authored-by: Romain Beurdouche <romain.beurdouche@eurecom.fr>
2025-09-19 09:03:04 +02:00
Robert Schmidt
709f73ad13 Do not include xran internal data: not needed 2025-09-19 09:03:04 +02:00
Robert Schmidt
c24409e404 Use locally available data instead of peaking into xran internals
Look up xran_fh_init/xran_fh_config through driver instead of peaking
into xran internals. Note that xran writes values back into these
structs during initialization, and hence it is important to store them
_after initialization_.

Some remarks regarding less obvious changes:
- slotnum is replaced by slots_in_sf: SLOTNUM_PER_SUBFRAME uses the time
  duration of a slot (=interval_us_local) to calculate the numbers of
  slots in a subframe, which can be done with a simple shift instead
- The prach duration should be queried from the PRACH configuration
  table. The function to query the occasion info is part of the MAC
  layer code while this information can be used outside of this layer.
  Use header `nr_prach_config.h` to not duplicate functionality.

Co-authored-by: Romain Beurdouche <romain.beurdouche@eurecom.fr>
2025-09-19 09:03:04 +02:00
Romain Beurdouche
c344e7d950 Split out PRACH-specific functions into separate header
Split out type and function definitions for a cleaner separation for
some consumers of these functions. Concretely, nr_mac_common.h includes
various ASN.1 NR RRC headers, but not all consumers of these APIs might
need these headers. For instance, the next commit will use these
functions in the driver for 7.2 (it needs to compute PRACH length), but
the driver itself does not depend on nor does it need the ASN.1 NR RRC
headers. Defining a new header avoids the problem.
2025-09-19 09:03:04 +02:00
Robert Schmidt
51aa82ce38 Use buffers as set up by driver
The buffers are set up by the OAI xran driver, so instead of peaking
into xran internal data, access the buffers through the driver directly.

The buffers get set up through the following xran calls

In xran_5g_fronthault_config():
- src   => sFrontHaulTxBbuIoBufCtrl
- srccp => sFrontHaulTxPrbMapBbuIoBufCtrl
- dst   => sFrontHaulRxBbuIoBufCtrl
- dstcp => sFrontHaulRxPrbMapBbuIoBufCtrl

In xran_5g_prach_req()
- prach(dst)       => sFHPrachRxBbuIoBufCtrl
- prach(dst)decomp => sFHPrachRxBbuIoBufCtrlDecomp

Note that in all cases:
- the xran buffer array is [XRAN_N_FE_BUF_LEN][XRAN_MAX_SECTOR_NR][XRAN_MAX_ANTENNA_NR]
  (of [internal] type BbuIoBufCtrlStruct, but we give an sBufferList)
- the driver buffer array is [XRAN_MAX_ANTENNA_NR][XRAN_N_FE_BUF_LEN]

Hence, we switch the order of indexing, leave out the sector, and omit
the sBufferList member.
2025-09-19 09:03:04 +02:00
Robert Schmidt
0f830be0a8 Avoid use of xran_get_slot_idx_from_tti() and use public API
xran_get_slot_idx_from_tti() has been introduced to access data
information from xran. However, it makes no sense, as the used macros to
calculate frame, slot, subframe, are already in the public API. Hence,
use these macros directly.

It would be possible to remove xran_get_slot_idx_from_tti(), but doing
so we would need to update the patch ID, causing trouble to users.
2025-09-19 09:03:04 +02:00
Cedric Roux
c36374ee12 bugfix: UE AMBR is optional
This was a problem with open5gs and more than one PDU session.
The core network sets UE AMBR only once, leading to failure in the gNB
for the second PDU session.

(A proper handling of AMBR has to be develop at some point in the gNB.)
2025-09-19 09:03:04 +02:00
francescomani
0fbf7ff346 DLSCH RB extraction bugfix: check DMRS bitmap only in DMRS symbols 2025-09-19 09:03:04 +02:00
Laurent THOMAS
4247051f0d clarify and indent correctly the function initial sync 2025-09-19 09:03:04 +02:00
Laurent THOMAS
fb927c160a when we try to detect a specific PCI, and it fails, the SSS detection return successful detection, with wrong frequency offset 2025-09-19 09:03:04 +02:00
Raymond Knopp
84bef36248 fixed precoder_simd after CI run (test for n_layers=1) failed 2025-09-18 19:04:41 +02:00
Raymond Knopp
7f97d8c3d1 aarch64 optimizations for precoding, more complete timing reporting in
nr_dlsim
2025-09-18 19:04:41 +02:00
Raymond Knopp
68e7772f57 optimization of DLSCH precoding for AVX2 2025-09-18 19:04:41 +02:00
Raymond Knopp
15d51bb7a8 precoder optimizations for AVX512 2025-09-18 19:04:41 +02:00
Raymond Knopp
013d136c3f Handle larger RB step size in precoding 2025-09-18 19:04:41 +02:00
Raymond Knopp
f792ef424c Add measurements for performance analysis 2025-09-18 19:04:35 +02:00
Raymond Knopp
547897e9c5 retriger CI 2025-07-12 18:09:41 +02:00
Raymond Knopp
3268dd16fa removed warnings in nr_dlsch.c and changed return of do_onelayer 2025-07-12 11:06:18 +02:00
Raymond Knopp
bb4a768d86 Merge remote-tracking branch 'origin/develop' into tx_symbol_processing 2025-07-10 14:20:19 +02:00
Raymond Knopp
16d4426f29 small correction in resource mapping for symbol-based parallelism 2025-07-10 14:19:35 +02:00
Raymond Knopp
3a64961cfa added thread-pool support for TX symbol processing 2025-06-22 07:52:07 +02:00
280 changed files with 7433 additions and 7524 deletions

View File

@@ -19,6 +19,8 @@
# * contact@openairinterface.org
# */
# Author: laurent THOMAS, Lionel GAUTHIER
cmake_minimum_required (VERSION 3.16)
project (OpenAirInterface LANGUAGES C CXX)
set(CMAKE_CXX_STANDARD 17)
@@ -171,6 +173,9 @@ else ()
set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -march=armv8.2-a")
endif()
# add autotools definitions that were maybe used!
add_definitions(-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP)
# we need -rdynamic to incorporate all symbols in shared objects, see man page
set(commonOpts "-pipe -fPIC -Wall -fno-strict-aliasing -rdynamic")
# GNU C/C++ Compiler might throw many warnings without packed-bitfield-compat, see man page
@@ -464,6 +469,9 @@ target_include_directories(f1ap PUBLIC F1AP_DIR)
target_link_libraries(f1ap PUBLIC asn1_f1ap GTPV1U)
target_link_libraries(f1ap PRIVATE ngap nr_rrc HASHTABLE f1ap_lib)
target_include_directories(f1ap PRIVATE ${F1AP_DIR}/lib)
if(E2_AGENT)
target_compile_definitions(f1ap PRIVATE E2_AGENT)
endif()
# LPP
##############
@@ -541,6 +549,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories("${OPENAIR_DIR}/executables")
include_directories("${OPENAIR2_DIR}/COMMON")
include_directories("${OPENAIR2_DIR}/UTIL")
include_directories("${OPENAIR2_DIR}/UTIL/LOG")
include_directories("${OPENAIR3_DIR}/COMMON")
include_directories("${OPENAIR3_DIR}/UTILS")
include_directories("${NFAPI_DIR}/nfapi/public_inc")
@@ -581,7 +590,12 @@ include_directories("${OPENAIR3_DIR}/ocp-gtpu")
include_directories("${OPENAIR3_DIR}/M3AP")
include_directories("${OPENAIR3_DIR}/MME_APP")
include_directories("${OPENAIR_DIR}/radio/COMMON")
include_directories("${OPENAIR2_DIR}/UTIL/OSA")
include_directories("${OPENAIR2_DIR}/UTIL/MEM")
include_directories("${OPENAIR2_DIR}/UTIL/LISTS")
include_directories("${OPENAIR2_DIR}/UTIL/FIFO")
include_directories("${OPENAIR2_DIR}/UTIL/MATH")
include_directories("${OPENAIR2_DIR}/UTIL/TIMER")
include_directories("${OPENAIR2_DIR}/UTIL/OTG")
include_directories("${OPENAIR2_DIR}/UTIL/OPT")
include_directories("${OPENAIR_DIR}")
@@ -609,6 +623,11 @@ add_library(UTIL
${OPENAIR_DIR}/common/utils/LOG/vcd_signal_dumper.c
${OPENAIR2_DIR}/UTIL/OPT/probe.c
)
if (ENABLE_LTTNG)
find_package(LTTngUST 2.3.8 EXACT REQUIRED)
else()
message(STATUS "LTTNG support disabled")
endif()
pkg_check_modules(cap libcap)
if (cap_FOUND)
@@ -923,9 +942,9 @@ set(PHY_SRC_UE
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_tbs_tools.c
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_prach_common.c
${OPENAIR1_DIR}/PHY/nr_phy_common/src/nr_phy_common_csirs.c
${OPENAIR1_DIR}/PHY/nr_phy_common/src/nr_phy_common_srs.c
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_scrambling.c
${OPENAIR1_DIR}/PHY/NR_REFSIG/refsig.c
${OPENAIR1_DIR}/PHY/NR_UE_TRANSPORT/srs_modulation_nr.c
)
set(PHY_NR_SRC
@@ -1148,7 +1167,6 @@ set(L2_NR_SRC
${NR_RRC_DIR}/rrc_gNB.c
${NR_RRC_DIR}/mac_rrc_dl_direct.c
${NR_RRC_DIR}/mac_rrc_dl_f1ap.c
${NR_RRC_DIR}/rrc_gNB_asn1.c
${NR_RRC_DIR}/rrc_gNB_nsa.c
${NR_RRC_DIR}/rrc_gNB_UE_context.c
${NR_RRC_DIR}/rrc_gNB_NGAP.c
@@ -1299,6 +1317,12 @@ add_library(L2
target_link_libraries(L2 PRIVATE x2ap s1ap lte_rrc m2ap)
target_link_libraries(L2 PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
if(E2_AGENT)
target_link_libraries(L2 PUBLIC e2_agent e2_agent_arg e2_ran_func_du_cucp_cuup)
target_compile_definitions(L2 PRIVATE ${E2AP_VERSION} ${KPM_VERSION} E2_AGENT)
endif()
add_library(MAC_UE_NR ${MAC_NR_SRC_UE})
target_link_libraries(MAC_UE_NR PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs PUBLIC nr_ue_power_procedures nr_ue_ra_procedures)
@@ -1325,6 +1349,10 @@ target_link_libraries(L2_NR PRIVATE f1ap x2ap s1ap ngap nr_rrc e1ap nr_rlc nr_co
if(OAI_AERIAL)
target_compile_definitions(L2_NR PRIVATE ENABLE_AERIAL)
endif()
if(E2_AGENT)
target_link_libraries(L2_NR PUBLIC e2_agent e2_agent_arg e2_ran_func_du_cucp_cuup)
target_compile_definitions(L2_NR PRIVATE ${E2AP_VERSION} ${KPM_VERSION} E2_AGENT)
endif()
add_library(L2_LTE_NR
# temporary solution until 4G/5G code completely untangled (as evidenced by deletion of the following file)
@@ -1654,6 +1682,13 @@ include_directories(${NAS_SRC}UE/EMM/SAP)
include_directories(${NAS_SRC}UE/ESM)
include_directories(${NAS_SRC}UE/ESM/SAP)
# nbiot
add_definitions("-DNUMBER_OF_UE_MAX_NB_IoT=16")
set (NBIOT_SOURCES
${OPENAIR2_DIR}/ENB_APP/NB_IoT_config.c
)
add_library(NB_IoT MODULE ${NBIOT_SOURCES} )
# Simulation library
##########################
set (SIMUSRC
@@ -1679,8 +1714,9 @@ include_directories("${NFAPI_DIR}/nfapi/inc")
include_directories("${NFAPI_DIR}/sim_common/inc")
include_directories("${NFAPI_DIR}/pnf_sim/inc")
add_library(oai_iqplayer MODULE ${OPENAIR_DIR}/radio/iqplayer/iqplayer_lib.c)
target_link_libraries(oai_iqplayer PRIVATE log_headers)
add_library(oai_iqplayer MODULE
${OPENAIR_DIR}/radio/iqplayer/iqplayer_lib.c
)
#################################
# add executables for operation
@@ -1690,6 +1726,10 @@ add_library(minimal_lib
)
target_link_libraries(minimal_lib PUBLIC pthread dl ${T_LIB} LOG)
add_executable(nfapi_test
${OPENAIR_DIR}/openair2/NR_PHY_INTERFACE/nfapi_5g_test.c
)
add_executable(measurement_display
${OPENAIR_DIR}/common/utils/threadPool/measurement_display.c)
target_link_libraries (measurement_display minimal_lib)
@@ -1729,7 +1769,6 @@ target_link_libraries(lte-softmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
target_link_libraries(lte-softmodem PRIVATE ${blas_LIBRARIES} ${cblas_LIBRARIES} ${lapacke_LIBRARIES} ${lapack_LIBRARIES})
if(E2_AGENT)
target_link_libraries(lte-softmodem PUBLIC e2_agent e2_agent_arg e2_ran_func_du_cucp_cuup)
target_compile_definitions(lte-softmodem PRIVATE ${E2AP_VERSION} ${KPM_VERSION} E2_AGENT)
endif()
@@ -1833,7 +1872,6 @@ if (OAI_AERIAL)
target_link_libraries(nr-softmodem PUBLIC aerial_lib)
endif()
if(E2_AGENT)
target_link_libraries(nr-softmodem PUBLIC e2_agent e2_agent_arg e2_ran_func_du_cucp_cuup)
target_compile_definitions(nr-softmodem PRIVATE ${E2AP_VERSION} ${KPM_VERSION} E2_AGENT)
endif()
@@ -1855,7 +1893,6 @@ target_link_libraries(nr-cuup PRIVATE
CONFIG_LIB ITTI SCTP_CLIENT
GTPV1U e1ap f1ap
time_management
alg
z dl pthread shlib_loader ${T_LIB})
target_link_libraries(nr-cuup PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
if(E2_AGENT)
@@ -1908,14 +1945,14 @@ target_link_libraries(nr-uesoftmodem PRIVATE
#####################################
#special case for dlim TM4, which uses its own version of phy_scope code
#add_executable(dlsim_tm4
# ${OPENAIR1_DIR}/SIMULATION/LTE_PHY/dlsim_tm4.c
# ${OPENAIR1_DIR}/PHY/TOOLS/lte_phy_scope_tm4.c
# )
#target_link_libraries (dlsim_tm4
# -Wl,--start-group SIMU UTIL SCHED_LIB SCHED_RU_LIB PHY ITTI -Wl,--end-group
# pthread m rt CONFIG_LIB ${T_LIB}
# )
add_executable(dlsim_tm4
${OPENAIR1_DIR}/SIMULATION/LTE_PHY/dlsim_tm4.c
${OPENAIR1_DIR}/PHY/TOOLS/lte_phy_scope_tm4.c
)
target_link_libraries (dlsim_tm4
-Wl,--start-group SIMU UTIL SCHED_LIB SCHED_RU_LIB PHY ITTI -Wl,--end-group
pthread m rt CONFIG_LIB ${T_LIB}
)
add_executable(rftest
${OPENAIR_DIR}/openair1/PHY/TOOLS/calibration_test.c
@@ -2040,9 +2077,7 @@ target_link_libraries(nr_ulsim PRIVATE
)
target_link_libraries(nr_ulsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
# these simulators do not compile:
# dlsim_tm7 pbchsim scansim mbmssim pdcchsim pucchsim prachsim syncsim
foreach(myExe dlsim ulsim)
foreach(myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim prachsim syncsim)
add_executable(${myExe}
${OPENAIR1_DIR}/SIMULATION/LTE_PHY/${myExe}.c
@@ -2062,23 +2097,22 @@ endforeach(myExe)
#unitary tests for Core NEtwork pieces
#################################
#foreach(myExe
# s1ap
# secu_knas_encrypt_eia1
# secu_kenb
# aes128_ctr
# secu_knas_encrypt_eea2
# secu_knas secu_knas_encrypt_eea1
# kdf
# aes128_cmac_encrypt
# secu_knas_encrypt_eia2)
# add_executable(test_${myExe}
# ${OPENAIR3_DIR}/TEST/test_${myExe}.c
# )
# target_link_libraries (test_${myExe}
# -Wl,--start-group SECURITY UTIL -Wl,--end-group m rt CONFIG_LIB
# )
#endforeach(myExe)
foreach(myExe s1ap
secu_knas_encrypt_eia1
secu_kenb
aes128_ctr
secu_knas_encrypt_eea2
secu_knas secu_knas_encrypt_eea1
kdf
aes128_cmac_encrypt
secu_knas_encrypt_eia2)
add_executable(test_${myExe}
${OPENAIR3_DIR}/TEST/test_${myExe}.c
)
target_link_libraries (test_${myExe}
-Wl,--start-group SECURITY UTIL -Wl,--end-group m rt CONFIG_LIB
)
endforeach(myExe)
#ensure that the T header files are generated before targets depending on them
if (${T_TRACER})
@@ -2088,17 +2122,17 @@ if (${T_TRACER})
nr-uesoftmodem dlsim dlsim_tm4 dlsim_tm7
ulsim pbchsim scansim mbmssim pdcchsim pucchsim prachsim
syncsim nr_ulsim nr_dlsim nr_dlschsim nr_pbchsim nr_pucchsim
nr_ulschsim ldpctest polartest smallblocktest
nr_ulschsim ldpctest polartest smallblocktest cu_test du_test
#all "add_library" definitions
ITTI lte_rrc nr_rrc s1ap x2ap m2ap m3ap f1ap
params_libconfig
oai_eth_transpro HASHTABLE UTIL
SECURITY SCHED_LIB SCHED_NR_LIB SCHED_RU_LIB SCHED_UE_LIB SCHED_NR_UE_LIB
params_libconfig oai_usrpdevif oai_bladerfdevif oai_lmssdrdevif oai_iqplayer
oai_eth_transpro oai_mobipass HASHTABLE UTIL OMG_SUMO
SECURITY SCHED_LIB SCHED_NR_LIB SCHED_RU_LIB SCHED_UE_LIB SCHED_NR_UE_LIB default_sched remote_sched RAL
NFAPI_LIB NFAPI_PNF_LIB NFAPI_VNF_LIB NFAPI_USER_LIB
MISC_NFAPI_LTE_LIB MISC_NFAPI_NR_LIB
PHY_COMMON PHY PHY_UE PHY_NR PHY_NR_COMMON PHY_NR_UE PHY_RU
L2 L2_LTE L2_NR L2_LTE_NR L2_UE NR_L2_UE MAC_NR_COMMON MAC_UE_NR ngap
GTPV1U SCTP_CLIENT MME_APP LIB_NAS_UE SIMU
CN_UTILS GTPV1U SCTP_CLIENT MME_APP LIB_NAS_UE NB_IoT SIMU OPENAIR0_LIB
dfts config_internals nr_common crc_byte)
if (TARGET ${i})
add_dependencies(${i} generate_T)
@@ -2106,6 +2140,8 @@ if (${T_TRACER})
endforeach(i)
endif (${T_TRACER})
include(${OPENAIR1_DIR}/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/CMakeLists.txt)
set(ENABLE_TESTS OFF CACHE STRING "Activate build of tests")
set_property(CACHE ENABLE_TESTS PROPERTY TYPE BOOL)
set(ENABLE_PHYSIM_TESTS OFF CACHE STRING "Activate build of physim tests")

View File

@@ -35,8 +35,6 @@ def gitCommitAuthorEmailAddr
// list of failing stages
def failingStages = ""
OAI_Registry = "gracehopper3-oai.sboai.cs.eurecom.fr"
pipeline {
agent {
label nodeExecutor
@@ -836,11 +834,11 @@ def triggerCN5GSlaveJob (jobName, gitlabStatusName) {
shortenShaOne = sh returnStdout: true, script: 'git log -1 --pretty=format:"%h" --abbrev=8 ' + env.gitlabMergeRequestLastCommit
shortenShaOne = shortenShaOne.trim()
branchName = env.gitlabSourceBranch.replaceAll("/", "-").trim()
fullRanTag = OAI_Registry + '/oai-gnb:' + env.gitlabSourceBranch + '-' + shortenShaOne
fullRanTag = 'porcepix.sboai.cs.eurecom.fr/oai-gnb:' + env.gitlabSourceBranch + '-' + shortenShaOne
} else {
shortenShaOne = sh returnStdout: true, script: 'git log -1 --pretty=format:"%h" --abbrev=8 ' + env.GIT_COMMIT
shortenShaOne = shortenShaOne.trim()
fullRanTag = OAI_Registry + '/oai-gnb:develop-' + shortenShaOne
fullRanTag = 'porcepix.sboai.cs.eurecom.fr/oai-gnb:develop-' + shortenShaOne
}
// Workaround for the "cancelled" GitLab pipeline notification
// The slave job is triggered with the propagate false so the following commands are executed

View File

@@ -31,9 +31,6 @@ if (params.LockResources != null && params.LockResources.trim().length() > 0)
// Docker Hub account to push to
def DH_Account = "oaisoftwarealliance"
// internal registry to use
def OAI_Registry = "gracehopper3-oai.sboai.cs.eurecom.fr"
pipeline {
agent {
label nodeExecutor
@@ -82,14 +79,14 @@ pipeline {
def listOfImages = ["oai-enb", "oai-gnb", "oai-lte-ue", "oai-nr-ue", "oai-nr-cuup", "oai-gnb-fhi72"]
// Logging in on both registries
sh "docker login -u ${DH_Username} -p ${DH_Password} > /dev/null 2>&1"
sh "docker login -u oaicicd -p oaicicd ${OAI_Registry} > /dev/null 2>&1"
sh "docker login -u oaicicd -p oaicicd porcepix.sboai.cs.eurecom.fr > /dev/null 2>&1"
listOfImages.eachWithIndex { item, iindex ->
sh "docker pull --quiet ${OAI_Registry}/${item}:develop-${WEEK_SHA}"
sh "docker image tag ${OAI_Registry}/${item}:develop-${WEEK_SHA} ${DH_Account}/${item}:develop"
sh "docker image tag ${OAI_Registry}/${item}:develop-${WEEK_SHA} ${DH_Account}/${item}:${WEEK_TAG}"
sh "docker pull --quiet porcepix.sboai.cs.eurecom.fr/${item}:develop-${WEEK_SHA}"
sh "docker image tag porcepix.sboai.cs.eurecom.fr/${item}:develop-${WEEK_SHA} ${DH_Account}/${item}:develop"
sh "docker image tag porcepix.sboai.cs.eurecom.fr/${item}:develop-${WEEK_SHA} ${DH_Account}/${item}:${WEEK_TAG}"
sh "docker push --quiet ${DH_Account}/${item}:${WEEK_TAG}"
sh "docker push --quiet ${DH_Account}/${item}:develop"
sh "docker rmi ${DH_Account}/${item}:${WEEK_TAG} ${DH_Account}/${item}:develop ${OAI_Registry}/${item}:develop-${WEEK_SHA}"
sh "docker rmi ${DH_Account}/${item}:${WEEK_TAG} ${DH_Account}/${item}:develop porcepix.sboai.cs.eurecom.fr/${item}:develop-${WEEK_SHA}"
}
// Proxy is not following the same pattern.
sh "docker image tag proxy:develop ${DH_Account}/proxy:develop"
@@ -98,7 +95,7 @@ pipeline {
sh "docker push --quiet ${DH_Account}/proxy:${WEEK_TAG}"
sh "docker rmi ${DH_Account}/proxy:develop ${DH_Account}/proxy:${WEEK_TAG}"
// Logging out on both registries
sh "docker logout ${OAI_Registry} > /dev/null 2>&1"
sh "docker logout porcepix.sboai.cs.eurecom.fr > /dev/null 2>&1"
sh "docker logout > /dev/null 2>&1"
}
}
@@ -108,7 +105,7 @@ pipeline {
post {
always {
script {
sh "docker logout ${OAI_Registry} > /dev/null 2>&1"
sh "docker logout porcepix.sboai.cs.eurecom.fr > /dev/null 2>&1"
sh "docker logout > /dev/null 2>&1"
echo "End of Registry Push"
}

View File

@@ -44,4 +44,4 @@ rf_driver: {
#endif
tx_gain: 75.0, /* TX gain (in dB) */
rx_gain: 52.0, /* RX gain (in dB) */
rx_gain: 55.0, /* RX gain (in dB) */

View File

@@ -53,7 +53,6 @@ from cls_ci_helper import archiveArtifact
# (e.g., cls_cluster.py)
#-----------------------------------------------------------
IMAGES = ['oai-enb', 'oai-lte-ru', 'oai-lte-ue', 'oai-gnb', 'oai-nr-cuup', 'oai-gnb-aw2s', 'oai-nr-ue', 'oai-enb-asan', 'oai-gnb-asan', 'oai-lte-ue-asan', 'oai-nr-ue-asan', 'oai-nr-cuup-asan', 'oai-gnb-aerial', 'oai-gnb-fhi72']
DEFAULT_REGISTRY = "gracehopper3-oai.sboai.cs.eurecom.fr"
def CreateWorkspace(host, sourcePath, ranRepository, ranCommitID, ranTargetBranch, ranAllowMerge):
if ranCommitID == '':
@@ -597,7 +596,7 @@ class Containerize():
lSourcePath = self.eNBSourceCodePath
logging.debug('Pushing images to server: ' + node)
ssh = cls_cmd.getConnection(node)
imagePrefix = DEFAULT_REGISTRY
imagePrefix = 'porcepix.sboai.cs.eurecom.fr'
ret = ssh.run(f'docker login -u oaicicd -p oaicicd {imagePrefix}')
if ret.returncode != 0:
msg = 'Could not log into local registry'
@@ -668,7 +667,7 @@ class Containerize():
msg = "Pulled Images:\n" + '\n'.join(pulled_images)
return True, msg
def Pull_Image_from_Registry(self, HTML, node, images, tag=None, tag_prefix="", registry=DEFAULT_REGISTRY, username="oaicicd", password="oaicicd"):
def Pull_Image_from_Registry(self, HTML, node, images, tag=None, tag_prefix="", registry="porcepix.sboai.cs.eurecom.fr", username="oaicicd", password="oaicicd"):
logging.debug(f'\u001B[1m Pulling image(s) on server: {node}\u001B[0m')
if not tag:
tag = CreateTag(self.ranCommitID, self.ranBranch, self.ranAllowMerge)

View File

@@ -18,6 +18,9 @@ gNBs =
////////// Physical parameters:
do_CSIRS = 0;
do_SRS = 0;
servingCellConfigCommon = (
{
#spCellConfigCommon
@@ -26,11 +29,11 @@ gNBs =
# downlinkConfigCommon
#frequencyInfoDL
# 4186.56 MHz
absoluteFrequencySSB = 679104;
dl_frequencyBand = 77;
# 4175.82 MHz
dl_absoluteFrequencyPointA = 678388;
# 4.01 GHz
absoluteFrequencySSB = 629376;
dl_frequencyBand = 78;
# 4 GHz
dl_absoluteFrequencyPointA = 628720;
#scs-SpecificCarrierList
dl_offstToCarrier = 0;
# subcarrierSpacing
@@ -50,7 +53,7 @@ gNBs =
#uplinkConfigCommon
#frequencyInfoUL
ul_frequencyBand = 77;
ul_frequencyBand = 78;
#scs-SpecificCarrierList
ul_offstToCarrier = 0;
# subcarrierSpacing
@@ -81,7 +84,7 @@ gNBs =
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
#one (0..15) 4,8,12,16,...60,64
#oneHalf (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64
@@ -108,6 +111,8 @@ gNBs =
hoppingId = 40;
p0_nominal = -90;
# ssb_PositionsInBurs_BitmapPR
# 1=short, 2=medium, 3=long
ssb_PositionsInBurst_PR = 2;
ssb_PositionsInBurst_Bitmap = 1;
# ssb_periodicityServingCell
@@ -188,7 +193,7 @@ RUs = (
nb_rx = 1
att_tx = 0;
att_rx = 0;
bands = [77];
bands = [78];
max_pdschReferenceSignalPower = -27;
max_rxgain = 114;
eNB_instances = [0];

View File

@@ -18,6 +18,9 @@ gNBs =
////////// Physical parameters:
do_CSIRS = 0;
do_SRS = 0;
servingCellConfigCommon = (
{
#spCellConfigCommon
@@ -26,11 +29,11 @@ gNBs =
# downlinkConfigCommon
#frequencyInfoDL
# 4186.56 MHz
absoluteFrequencySSB = 679104;
dl_frequencyBand = 77;
# 4175.82 MHz
dl_absoluteFrequencyPointA = 678388;
# 4.01 GHz
absoluteFrequencySSB = 629376;
dl_frequencyBand = 78;
# 4 GHz
dl_absoluteFrequencyPointA = 628720;
#scs-SpecificCarrierList
dl_offstToCarrier = 0;
# subcarrierSpacing
@@ -50,7 +53,7 @@ gNBs =
#uplinkConfigCommon
#frequencyInfoUL
ul_frequencyBand = 77;
ul_frequencyBand = 78;
#scs-SpecificCarrierList
ul_offstToCarrier = 0;
# subcarrierSpacing
@@ -81,7 +84,7 @@ gNBs =
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
#one (0..15) 4,8,12,16,...60,64
#oneHalf (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64
@@ -108,6 +111,8 @@ gNBs =
hoppingId = 40;
p0_nominal = -90;
# ssb_PositionsInBurs_BitmapPR
# 1=short, 2=medium, 3=long
ssb_PositionsInBurst_PR = 2;
ssb_PositionsInBurst_Bitmap = 1;
# ssb_periodicityServingCell
@@ -188,7 +193,7 @@ RUs = (
nb_rx = 1
att_tx = 0;
att_rx = 0;
bands = [77];
bands = [78];
max_pdschReferenceSignalPower = -27;
max_rxgain = 114;
eNB_instances = [0];

View File

@@ -193,6 +193,8 @@ RUs = (
eNB_instances = [0];
ru_thread_core = 6;
sl_ahead = 10; #5;
##beamforming 1x2 matrix: 1 layer x 2 antennas
bf_weights = [0x00007fff, 0x0000,0x00007fff, 0x0000];
tr_preference = "raw_if4p5"; # important: activate FHI7.2
do_precoding = 0; # needs to match O-RU configuration
}

View File

@@ -184,7 +184,7 @@ L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 150;
prach_dtx_threshold = 130;
#pucch0_dtx_threshold = 150;
}
);

View File

@@ -6,9 +6,9 @@ neighbour_list = (
gNB_ID = 0xe01;
nr_cellid = 11111111;
physical_cellId = 1;
absoluteFrequencySSB = 679104;
absoluteFrequencySSB = 629376;
subcarrierSpacing = 1; #30 KHz
band = 77;
band = 78;
plmn = { mcc = 001; mnc = 03; mnc_length = 2};
tracking_area_code = 1;
}
@@ -21,9 +21,9 @@ neighbour_list = (
gNB_ID = 0xe00;
nr_cellid = 12345678;
physical_cellId = 0;
absoluteFrequencySSB = 679104;
absoluteFrequencySSB = 629376;
subcarrierSpacing = 1; #30 KHz
band = 77;
band = 78;
plmn = { mcc = 001; mnc = 03; mnc_length = 2};
tracking_area_code = 1;
}

View File

@@ -86,7 +86,7 @@ gNBs =
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
#one (0..15) 4,8,12,16,...60,64
#oneHalf (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14; //15;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64

View File

@@ -100,8 +100,8 @@ gNBs =
powerRampingStep = 1;
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
#one (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3;
#oneHalf (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64

View File

@@ -96,8 +96,8 @@ gNBs =
powerRampingStep = 1;
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
#one (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3;
#oneHalf (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64

View File

@@ -105,8 +105,8 @@ gNBs =
powerRampingStep = 1;
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
#one (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3;
#oneHalf (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64

View File

@@ -80,7 +80,7 @@ gNBs =
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
#one (0..15) 4,8,12,16,...60,64
#oneHalf (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14; //15;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64

View File

@@ -85,7 +85,7 @@ gNBs =
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
#one (0..15) 4,8,12,16,...60,64
#oneHalf (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14; //15;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64

View File

@@ -84,7 +84,7 @@ gNBs =
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
#one (0..15) 4,8,12,16,...60,64
#oneHalf (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64

View File

@@ -83,7 +83,7 @@ gNBs =
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
#one (0..15) 4,8,12,16,...60,64
#oneHalf (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64

View File

@@ -82,7 +82,7 @@ gNBs =
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
#one (0..15) 4,8,12,16,...60,64
#oneHalf (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64

View File

@@ -28,6 +28,11 @@ docker tag oai-nr-ue oai-ci/oai-nr-ue:develop-${SHORT_COMMIT_SHA}
docker tag oai-gnb oai-ci/oai-gnb:develop-${SHORT_COMMIT_SHA}
docker tag oai-nr-cuup oai-ci/oai-nr-cuup:develop-${SHORT_COMMIT_SHA}
python3 main.py --mode=InitiateHtml --ranRepository=NONE --ranBranch=${CURRENT_BRANCH} \
--ranCommitID=${COMMIT_SHA} --ranAllowMerge=false \
--ranTargetBranch=NONE \
--XMLTestFile=xml_files/${TESTCASE} --local
python3 main.py --mode=InitiateHtml --ranRepository=NONE --ranBranch=${CURRENT_BRANCH} \
--ranCommitID=${COMMIT_SHA} --ranAllowMerge=false \
--ranTargetBranch=NONE \

View File

@@ -22,5 +22,5 @@ git config user.name "OAI Jenkins"
git config advice.detachedHead false
mkdir -p cmake_targets/log
git checkout -f ${ref}
[ -n "${merge}" ] && git fetch origin ${merge} && git merge --ff FETCH_HEAD -m "Temporary merge for CI"
[ -n "${merge}" ] && git merge --ff ${merge} -m "Temporary merge for CI"
exit 0

View File

@@ -15,7 +15,7 @@ oc project ${OC_NS} > /dev/null
oc tag oaicicd-ran/oai-physim:${IMG_TAG} ${OC_NS}/oai-physim:${IMG_TAG}
helm install ${OC_RELEASE} ${OAI_DIR}/charts/${OC_RELEASE} --set global.image.version=${IMG_TAG} --wait --timeout 120s
POD_ID=$(oc get pods | grep oai-${OC_RELEASE} | awk '{print $1}')
sleep 30
sleep 10
echo "Monitoring logs for 'FINISHED' in pod '$POD_ID'"
oc logs -f -n ${OC_NS} "$POD_ID" | while read -r line; do
if [[ "$line" == *"FINISHED"* ]]; then

View File

@@ -26,7 +26,7 @@ class TestDeploymentMethods(unittest.TestCase):
# the pull function has the authentication at the internal cluster hardcoded
# this is a refactoring opportunity: we should do it in a separate step
# and allow to have pull work with any registry
registry = cls_containerize.DEFAULT_REGISTRY
registry = "porcepix.sboai.cs.eurecom.fr"
with cls_cmd.getConnection("localhost") as cmd:
ret = cmd.run(f"ping -c1 -w1 {registry}")
if ret.returncode != 0: # could not ping once -> skip test

View File

@@ -31,6 +31,9 @@
000002
000003
020001
020002
030001
030002
000004
040001
050001
@@ -107,7 +110,7 @@
<nodes>acamas</nodes>
<svr_id>rfsim5g_ue</svr_id>
<svr_node>acamas</svr_node>
<ping_args>-c 50 -i 0.25</ping_args>
<ping_args>-c 100 -i 0.25</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
</testCase>
@@ -118,7 +121,7 @@
<nodes>acamas</nodes>
<svr_id>rfsim5g_ext_dn</svr_id>
<svr_node>acamas</svr_node>
<ping_args>-c 50 -i 0.25</ping_args>
<ping_args>-c 100 -i 0.25</ping_args>
<ping_packetloss_threshold>10</ping_packetloss_threshold>
</testCase>

View File

@@ -36,6 +36,18 @@
102002
302002
102003
102004
102005
102006
102007
102008
102009
102010
102011
102012
102013
102014
102015
100100
100010
100020
@@ -106,8 +118,80 @@
<testCase id="102003">
<class>Attach_UE</class>
<desc>Attach UE 3 - 15</desc>
<id>amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10 amarisoft_ue_11 amarisoft_ue_12 amarisoft_ue_13 amarisoft_ue_14 amarisoft_ue_15</id>
<desc>Attach UE 3</desc>
<id>amarisoft_ue_3</id>
</testCase>
<testCase id="102004">
<class>Attach_UE</class>
<desc>Attach UE 4</desc>
<id>amarisoft_ue_4</id>
</testCase>
<testCase id="102005">
<class>Attach_UE</class>
<desc>Attach (RedCap) UE 5</desc>
<id>amarisoft_ue_5</id>
</testCase>
<testCase id="102006">
<class>Attach_UE</class>
<desc>Attach (RedCap) UE 6</desc>
<id>amarisoft_ue_6</id>
</testCase>
<testCase id="102007">
<class>Attach_UE</class>
<desc>Attach UE 7</desc>
<id>amarisoft_ue_7</id>
</testCase>
<testCase id="102008">
<class>Attach_UE</class>
<desc>Attach UE 8</desc>
<id>amarisoft_ue_8</id>
</testCase>
<testCase id="102009">
<class>Attach_UE</class>
<desc>Attach UE 9</desc>
<id>amarisoft_ue_9</id>
</testCase>
<testCase id="102010">
<class>Attach_UE</class>
<desc>Attach (RedCap) UE 10</desc>
<id>amarisoft_ue_10</id>
</testCase>
<testCase id="102011">
<class>Attach_UE</class>
<desc>Attach (RedCap) UE 11</desc>
<id>amarisoft_ue_11</id>
</testCase>
<testCase id="102012">
<class>Attach_UE</class>
<desc>Attach (RedCap) UE 12</desc>
<id>amarisoft_ue_12</id>
</testCase>
<testCase id="102013">
<class>Attach_UE</class>
<desc>Attach UE 13</desc>
<id>amarisoft_ue_13</id>
</testCase>
<testCase id="102014">
<class>Attach_UE</class>
<desc>Attach UE 14</desc>
<id>amarisoft_ue_14</id>
</testCase>
<testCase id="102015">
<class>Attach_UE</class>
<desc>Attach (RedCap) UE 15</desc>
<id>amarisoft_ue_15</id>
</testCase>
<testCase id="100010">

View File

@@ -1,179 +0,0 @@
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>LONGRUN-5G-NRUE</htmlTabRef>
<htmlTabName>Longrun 40 MHz TDD SA</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<TestCaseRequestedList>
060000
010000 010001
800813
020000
800814
020001
000001
001000
000100
001000
000100
001000
000100
001000
000200
001000
000200
001000
000200
040001 040000
333333
444444
060001
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="060000">
<class>DeployCoreNetwork</class>
<desc>Initialize 5G Core</desc>
<cn_id>oc-cn5g</cn_id>
</testCase>
<testCase id="010000">
<class>Pull_Cluster_Image</class>
<desc>Pull Images from Cluster</desc>
<images>oai-gnb</images>
<node>avra</node>
</testCase>
<testCase id="010001">
<class>Pull_Cluster_Image</class>
<desc>Pull Images from Cluster</desc>
<images>oai-nr-ue</images>
<node>caracal</node>
</testCase>
<testCase id="800813">
<class>Create_Workspace</class>
<desc>Create new Workspace</desc>
<node>avra</node>
</testCase>
<testCase id="020000">
<class>Deploy_Object</class>
<desc>Deploy gNB (TDD/Band78/40MHz/N310) in a container</desc>
<node>avra</node>
<yaml_path>ci-scripts/yaml_files/5g_sa_n310_gnb</yaml_path>
<num_attempts>3</num_attempts>
</testCase>
<testCase id="800814">
<class>Create_Workspace</class>
<desc>Create new Workspace</desc>
<node>caracal</node>
</testCase>
<testCase id="020001">
<class>Deploy_Object</class>
<desc>Deploy nrUE (TDD/Band78/40MHz/N310) in a container</desc>
<yaml_path>ci-scripts/yaml_files/5g_sa_n310_nrue</yaml_path>
<node>caracal</node>
<num_attempts>3</num_attempts>
</testCase>
<testCase id="000001">
<class>Attach_UE</class>
<desc>Attach OAIUE</desc>
<id>oai_ue_caracal</id>
</testCase>
<testCase id="000100">
<class>Iperf</class>
<desc>iperf (DL/10Mbps/UDP)(10 min)</desc>
<iperf_args>-u -b 10M -t 600 -i 1 -R</iperf_args>
<id>oai_ue_caracal</id>
<svr_id>oc-cn5g</svr_id>
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
<iperf_bitrate_threshold>80</iperf_bitrate_threshold>
</testCase>
<testCase id="000200">
<class>Iperf</class>
<desc>iperf (UL/2Mbps/UDP)(10 min)</desc>
<iperf_args>-u -b 2M -t 600 -i 1 </iperf_args>
<id>oai_ue_caracal</id>
<svr_id>oc-cn5g</svr_id>
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
<iperf_bitrate_threshold>80</iperf_bitrate_threshold>
</testCase>
<testCase id="001000">
<class>Ping</class>
<desc>Ping: 20pings in 20sec</desc>
<id>oai_ue_caracal</id>
<svr_id>oc-cn5g</svr_id>
<ping_args>-c 20</ping_args>
<ping_packetloss_threshold>1</ping_packetloss_threshold>
<ping_rttavg_threshold>25</ping_rttavg_threshold>
</testCase>
<testCase id="040000">
<class>Undeploy_Object</class>
<always_exec>true</always_exec>
<desc>Undeploy gNB</desc>
<node>avra</node>
<yaml_path>ci-scripts/yaml_files/5g_sa_n310_gnb</yaml_path>
<d_retx_th>20,100,100,100</d_retx_th>
<u_retx_th>20,100,100,100</u_retx_th>
</testCase>
<testCase id="040001">
<class>Undeploy_Object</class>
<always_exec>true</always_exec>
<desc>Undeploy nr UE</desc>
<node>caracal</node>
<yaml_path>ci-scripts/yaml_files/5g_sa_n310_nrue</yaml_path>
</testCase>
<testCase id="333333">
<class>Clean_Test_Server_Images</class>
<always_exec>true</always_exec>
<desc>Clean Test Images on Test Server</desc>
<node>avra</node>
<images>oai-gnb</images>
</testCase>
<testCase id="444444">
<class>Clean_Test_Server_Images</class>
<always_exec>true</always_exec>
<desc>Clean Test Images on Test Server</desc>
<node>caracal</node>
<images>oai-nr-ue</images>
</testCase>
<testCase id="060001">
<class>UndeployCoreNetwork</class>
<desc>Terminate 5G Core</desc>
<always_exec>true</always_exec>
<cn_id>oc-cn5g</cn_id>
</testCase>
</testCaseList>

View File

@@ -88,7 +88,7 @@ services:
cap_drop:
- ALL
environment:
USE_ADDITIONAL_OPTIONS: -E --rfsim --log_config.global_log_options level,nocolor,time --gNBs.[0].TIMERS.t300 1000
USE_ADDITIONAL_OPTIONS: -E --rfsim --log_config.global_log_options level,nocolor,time
ASAN_OPTIONS: detect_leaks=0
depends_on:
- oai-ext-dn

View File

@@ -55,53 +55,4 @@ typedef enum {
typedef enum { NON_DYNAMIC, DYNAMIC } fiveQI_t;
/* QoS Priority Level */
typedef enum {
QOS_PRIORITY_SPARE = 0,
QOS_PRIORITY_HIGHEST,
QOS_PRIORITY_2,
QOS_PRIORITY_3,
QOS_PRIORITY_4,
QOS_PRIORITY_5,
QOS_PRIORITY_6,
QOS_PRIORITY_7,
QOS_PRIORITY_8,
QOS_PRIORITY_9,
QOS_PRIORITY_10,
QOS_PRIORITY_11,
QOS_PRIORITY_12,
QOS_PRIORITY_13,
QOS_PRIORITY_LOWEST,
QOS_NO_PRIORITY
} qos_priority_t;
/* Pre-emption Capability */
typedef enum {
PEC_SHALL_NOT_TRIGGER_PREEMPTION = 0,
PEC_MAY_TRIGGER_PREEMPTION,
PEC_MAX,
} qos_pec_t;
/* Pre-emption Vulnerability */
typedef enum {
PEV_NOT_PREEMPTABLE = 0,
PEV_PREEMPTABLE = 1,
PEV_MAX,
} qos_pev_t;
/* Allocation Retention Priority */
typedef struct {
qos_priority_t priority_level;
qos_pec_t pre_emp_capability;
qos_pev_t pre_emp_vulnerability;
} qos_arp_t;
typedef struct pdusession_level_qos_parameter_s {
uint8_t qfi;
uint64_t fiveQI;
uint64_t qos_priority;
fiveQI_t fiveQI_type;
qos_arp_t arp;
} pdusession_level_qos_parameter_t;
#endif

View File

@@ -39,6 +39,7 @@
#include <stdint.h>
#include <stdbool.h>
#include "common/config/config_paramdesc.h"
#include "common/utils/T/T.h"
#define CONFIG_MAX_OOPT_PARAMS 10 // maximum number of parameters in the -O option (-O <cfgmode>:P1:P2...
#define CONFIG_MAX_ALLOCATEDPTRS 32768 // maximum number of parameters that can be dynamicaly allocated in the config module

View File

@@ -8,11 +8,11 @@ else()
endif()
add_library(params_yaml_static config_yaml.cpp)
target_link_libraries(params_yaml_static PUBLIC yaml-cpp::yaml-cpp)
target_link_libraries(params_yaml_static PUBLIC UTIL yaml-cpp::yaml-cpp)
if (ENABLE_TESTS)
add_subdirectory(tests)
endif()
add_library(params_yaml MODULE config_yaml.cpp)
target_link_libraries(params_yaml PUBLIC yaml-cpp::yaml-cpp)
target_link_libraries(params_yaml PUBLIC UTIL yaml-cpp::yaml-cpp)
set_target_properties(params_yaml PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})

View File

@@ -1,5 +1,5 @@
add_executable(test_yaml_config test_yaml_config.cpp)
target_link_libraries(test_yaml_config PRIVATE params_yaml_static GTest::gtest CONFIG_LIB)
target_link_libraries(test_yaml_config PRIVATE params_yaml_static GTest::gtest)
add_dependencies(tests test_yaml_config)
add_test(NAME test_yaml_config
COMMAND ./test_yaml_config)

View File

@@ -97,7 +97,4 @@
#define UNUSED_VARIABLE(vARIABLE) (void)(vARIABLE)
#define NUM_PRACH_RX_FOR_NOISE_ESTIMATE 100
// SDAP
#define MAX_QOS_FLOWS 64
#endif /* __PLATFORM_CONSTANTS_H__ */

View File

@@ -4,12 +4,10 @@ target_link_libraries(log_headers INTERFACE T_headers)
set(log_sources log.c)
if (ENABLE_LTTNG)
find_package(LTTngUST 2.3.8 EXACT REQUIRED)
set(log_sources ${log_sources} lttng-tp.c)
else()
message(STATUS "LTTNG support disabled")
endif()
add_library(LOG ${log_sources})
target_include_directories(LOG PUBLIC .)
target_link_libraries(LOG PRIVATE CONFIG_LIB)
target_link_libraries(LOG PUBLIC log_headers)
if (ENABLE_LTTNG)

View File

@@ -52,7 +52,6 @@
#endif
#include <pthread.h>
#include <common/utils/utils.h>
#include "common/utils/T/T.h"
#if ENABLE_LTTNG
#include "lttng-log.h"
#endif

View File

@@ -47,7 +47,7 @@ add_custom_target(generate_T DEPENDS T_IDs.h check_vcd)
# even if T is off, we need the headers as many targets depend on it
# for this, create an INTERFACE (header-only) library T_headers. To ensure the
# headers have really been created, we make this headers library explicitly
# depend on the generate_T target.
# depend on the generated headers.
add_library(T_headers INTERFACE)
add_dependencies(T_headers T_IDs.h generate_T)
target_include_directories(T_headers INTERFACE ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})

View File

@@ -25,6 +25,52 @@
#include "common/utils/mem/oai_memory.h"
#include "common/utils/LOG/log.h"
/****************************************************************************
** **
** Name: memory_get_path() **
** **
** Description: Gets the absolute path of the file where non-volatile **
** data are located **
** **
** Inputs: dirname: The directory where data file is located **
** filename: The name of the data file **
** Others: None **
** **
** Outputs: None **
** Return: The absolute path of the non-volatile data **
** file. The returned value is a dynamically **
** allocated octet string that needs to be **
** freed after usage. **
** Others: None **
** **
***************************************************************************/
char* memory_get_path(const char* dirname, const char* filename)
{
/* Get non-volatile data directory */
const char* path = getenv(dirname);
if (path == NULL) {
path = getenv(DEFAULT_NAS_PATH);
}
if (path == NULL) {
path = ".";
}
/* Append non-volatile data file name */
size_t size = strlen(path) + strlen(filename) + 1;
char* data_filename = (char*)malloc(size + 1);
if (data_filename != NULL) {
if (size != sprintf(data_filename, "%s/%s", path, filename)) {
free(data_filename);
return NULL;
}
}
return data_filename;
}
char* memory_get_path_from_ueid(const char* dirname, const char* filename, int ueid)
{
/* Get non-volatile data directory */

View File

@@ -35,6 +35,8 @@ typedef unsigned char uint8_t;
//-----------------------------------------------------------------------------
char* memory_get_path(const char* dirname, const char* filename);
char* memory_get_path_from_ueid(const char* dirname, const char* filename, int ueid);
int memory_read(const char* datafile, void* data, size_t size);

View File

@@ -44,7 +44,7 @@ add_library(telnetsrv_enb MODULE
telnetsrv_enb_phycmd.c
)
add_dependencies(telnetsrv telnetsrv_enb)
target_link_libraries(telnetsrv_enb PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs log_headers)
target_link_libraries(telnetsrv_enb PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
message(STATUS "No specific telnet functions for gnb")

View File

@@ -52,7 +52,7 @@ int main(int argc, char *argv[]) {
while ( 1 ) {
if ( read(fd,&doneRequest, sizeof(doneRequest)) == sizeof(doneRequest)) {
printf("%lu" SEP "%llu" SEP "%llu" SEP "%llu" "\n",
printf("%lu" SEP "%lu" SEP "%lu" SEP "%lu" "\n",
doneRequest.key,
(doneRequest.startProcessingTime-doneRequest.creationTime)/cpuCyclesMicroSec,
(doneRequest.endProcessingTime-doneRequest.startProcessingTime)/cpuCyclesMicroSec,

View File

@@ -7,7 +7,7 @@ add_library(time_management_core OBJECT
time_client.c)
target_link_libraries(time_management PUBLIC time_management_core)
target_link_libraries(time_management_core PRIVATE log_headers)
target_link_libraries(time_management_core PRIVATE ${T_LIB})
if(ENABLE_TESTS)
add_subdirectory(tests)

View File

@@ -1,10 +1,10 @@
# 5GS NAS Overview and OAI Implementation status
**5GS NAS Overview and OAI Implementation status**
This document provides an overview of the 5G System Non-Access Stratum (5GS NAS) protocol as specified in 3GPP TS 24.501. It highlights key message types involved in Mobility and Session Management and explains how these are implemented within the OAI software stack. The document outlines the structure of the OAI codebase by detailing current support for encoding, decoding, and unit testing of specific NAS messages, and explains how the UE handles USIM simulation and message generation.
[TOC]
## About 5GS NAS
# About 5GS NAS
The 5G System Non-Access Stratum (5GS NAS) is defined in 3GPP TS 24.501. It operates within the control plane, facilitating communication between the User Equipment (UE) and the Access and Mobility Management Function (AMF) over the N1 interface.
@@ -13,7 +13,7 @@ Key 5GS NAS messages:
* Mobility Management (5GMM): Handles UE registration, deregistration, authentication and tracking area updates. 5GMM also manages transitions between idle and connected states.
* Session Management (5GSM): Establishes, modifies, and releases PDU sessions. Coordinates with the Session Management Function (SMF) to manage user-plane resources.
## OAI Implementation Status
# OAI Implementation Status
The following tables lists implemented NAS messages and whether there is an encoder or decoder function, and if a corresponding unit test exists.
@@ -33,37 +33,37 @@ The following tables lists implemented NAS messages and whether there is an enco
| 5GSM | PDU Session Establishment Request | yes | no | no |
| 5GSM | PDU Session Establishment Accept | no | yes | no |
### Code Structure
## Code Structure
[openair3/NAS/NR_UE/nr_nas_msg.c](../../openair3/NAS/NR_UE/nr_nas_msg.c):
[openair3/NAS/NR_UE/nr_nas_msg.c](../openair3/NAS/NR_UE/nr_nas_msg.c):
* NAS procedures and message handlers/callbacks
* Integration with RRC (ITTI) and SDAP
* Invokes enc/dec libraries
* Handles 5GMM state and mode
[openair3/NAS/NR_UE/5GS/fgs_nas_lib.c](../../openair3/NAS/NR_UE/5GS/fgs_nas_lib.c):
[openair3/NAS/NR_UE/5GS/NR_NAS_defs.h](../../openair3/NAS/NR_UE/5GS/NR_NAS_defs.h):
[openair3/NAS/NR_UE/5GS/fgs_nas_lib.c](../openair3/NAS/NR_UE/5GS/fgs_nas_lib.c):
[openair3/NAS/NR_UE/5GS/NR_NAS_defs.h](../openair3/NAS/NR_UE/5GS/NR_NAS_defs.h):
* encoding and decoding functions for 5G NAS message headers and payloads
* relies on 5GMM/5GSM messages libs for payload encoding
[openair3/NAS/NR_UE/5GS/fgs_nas_utils.h](../../openair3/NAS/NR_UE/5GS/fgs_nas_utils.h):
[openair3/NAS/NR_UE/5GS/fgs_nas_utils.h](../openair3/NAS/NR_UE/5GS/fgs_nas_utils.h):
* NAS helpers, macros
[openair3/NAS/NR_UE/5GS/5GMM](../../openair3/NAS/NR_UE/5GS/5GMM):
[openair3/NAS/NR_UE/5GS/5GMM](../openair3/NAS/NR_UE/5GS/5GMM):
* encoding/decoding functions and definitions for 5GMM NAS messages payloads
[openair3/NAS/NR_UE/5GS/5GMM/MSG/fgmm_lib.c](../../openair3/NAS/NR_UE/5GS/5GMM/MSG/fgmm_lib.c):
[openair3/NAS/NR_UE/5GS/5GMM/MSG/fgmm_lib.h](../../openair3/NAS/NR_UE/5GS/5GMM/MSG/fgmm_lib.h):
[openair3/NAS/NR_UE/5GS/5GMM/MSG/fgmm_lib.c](../openair3/NAS/NR_UE/5GS/5GMM/MSG/fgmm_lib.c):
[openair3/NAS/NR_UE/5GS/5GMM/MSG/fgmm_lib.h](../openair3/NAS/NR_UE/5GS/5GMM/MSG/fgmm_lib.h):
* encoding/decoding functions and definitions for common 5GMM IEs
[openair3/NAS/NR_UE/5GS/5GSM](../../openair3/NAS/NR_UE/5GS/5GSM):
[openair3/NAS/NR_UE/5GS/5GSM](../openair3/NAS/NR_UE/5GS/5GSM):
* encoding and decoding functions for 5GSM NAS messages payloads
## USIM Simulation
# USIM Simulation
OAI includes a simulated USIM implementation that reads its parameters from standard configuration files. This allows for rapid prototyping and testing without relying on a physical UICC card. The USIM-related configuration is handled via the `init_uicc()` function.
### Configuration
## Configuration
The simulation reads values from a named section in the config file.
@@ -84,11 +84,11 @@ The simulation reads values from a named section in the config file.
These are parsed and stored in the `uicc_t` structure.
### Initialization
## Initialization
The UE calls `init_uicc` via `checkUicc` to allocate memory for the `uicc_t` structure member and load parameters using `config_get()` from the selected config section. Then the UICC structure is stored in the NAS context. `nr_ue_nas_t`, to be used to fill identity and security credentials when generating responses to 5GC messages such as `Identity Response`, `Authentication Response`, and `Security Mode Complete`.
### Milenage Authentication and Key Derivation
## Milenage Authentication and Key Derivation
When the UE receives a **5GMM Authentication Request**, the function `generateAuthenticationResp` generates a valid `Authentication Response` with the necessary derived NAS and AS security keys. The function `derive_ue_keys` parses the Authentication Request and performs the entire 5G AKA key hierarchy:
@@ -97,11 +97,11 @@ When the UE receives a **5GMM Authentication Request**, the function `generateAu
* Computes the `RES` using `transferRES()`
* Derives the keys `KAUSF`, `KSEAF`, `KAMF`, `KNASenc`/`KNASint` via `derive_knas()` and `KGNB` for RRC ciphering (via `derive_kgnb()`)
### Security Mode Complete
## Security Mode Complete
When the UE receives a **Security Mode Command** from the 5GC, it responds with a `Security Mode Complete` message. This message is protected with the newly established NAS security context and may carry additional payloads, including the UEs identity and a nested NAS message (e.g., `Registration Request`) in the `FGSNasMessageContainer`. The function responsible for building and securing this response is `generateSecurityModeComplete`.
#### IMEISV
### IMEISV
The **IMEISV**, is encoded using the `fill_imeisv()` helper. This function extracts each digit from the configured `imeisvStr` in the UICC context and populates the mobile identity structure.

View File

@@ -1,10 +1,22 @@
# OAI 7.2 Fronthaul Interface 5G SA Tutorial
<table style="border-collapse: collapse; border: none;">
<tr style="border-collapse: collapse; border: none;">
<td style="border-collapse: collapse; border: none;">
<a href="http://www.openairinterface.org/">
<img src="./images/oai_final_logo.png" alt="" border=3 height=50 width=150>
</img>
</a>
</td>
<td style="border-collapse: collapse; border: none; vertical-align: center;">
<b><font size = "5">OAI 7.2 Fronthaul Interface 5G SA Tutorial</font></b>
</td>
</tr>
</table>
**Table of Contents**
[[_TOC_]]
## Prerequisites
# Prerequisites
The hardware on which we have tried this tutorial:
@@ -49,7 +61,7 @@ The UEs that have been tested and confirmed working with Aerial are the followin
| Samsung | S23 Ultra |
### Configure your server
## Configure your server
To set up the L1 and install the components manually refer to this [instructions page](https://docs.nvidia.com/aerial/cuda-accelerated-ran/index.html).
@@ -59,7 +71,7 @@ of the FAPI 10.04 version of the SRS PDU, and RX_Beamforming PDU.
- To configure the Gigabyte server please refer to these [instructions](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/2025.w13/doc/Aerial_FAPI_Split_Tutorial.md)
- The last release to support the Gigabyte server is **Aerial CUDA-Accelerated RAN 24-1**.
#### CPU allocation
### CPU allocation
| Server brand | Model | Nº of CPU Cores | Isolated CPUs |
|------------------|---------------|:---------------:|:--------------:|
@@ -72,7 +84,7 @@ of the FAPI 10.04 version of the SRS PDU, and RX_Beamforming PDU.
| PTP & PHC2SYS Services | 41 |
| OAI `nr-softmodem` | 13-14 |
### PTP configuration
## PTP configuration
1. You need to install the `linuxptp` debian package. It will install both ptp4l and phc2sys.
@@ -132,7 +144,7 @@ WantedBy=multi-user.target
```
## Build OAI gNB
# Build OAI gNB
If it's not already cloned, the first step is to clone OAI repository
```bash
@@ -140,7 +152,7 @@ git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git ~/openairinterfac
cd ~/openairinterface5g/
```
### Get nvIPC sources from the L1 container
## Get nvIPC sources from the L1 container
The library used for communication between L1 and L2 components is called nvIPC, and is developed by NVIDIA. It is not open-source and can't be freely distributed.
In order to achieve this communication, we need to obtain the nvIPC source files from the L1 container (cuBB) and place it in the gNB project directory `~/openairinterface5g`.
@@ -198,7 +210,7 @@ aerial@c_aerial_aerial:/opt/nvidia/cuBB/cuPHY-CP/gt_common_libs# exit
With the nvIPC sources in the project directory, the docker image can be built.
### Building OAI gNB docker image
## Building OAI gNB docker image
In order to build the target image (`oai-gnb-aerial`), first you should build a common shared image (`ran-base`)
```bash
@@ -208,12 +220,12 @@ In order to build the target image (`oai-gnb-aerial`), first you should build a
```
## Running the setup
# Running the setup
In order to use Docker Compose to automatically start and stop the setup, we first need to create a pre-built image of L1 after compiling the L1 software and making the necessary adjustments to its configuration files.
The process of preparing L1 is covered in NVIDIA's documentation and falls outside the scope of this document.
### Prepare the L1 image
## Prepare the L1 image
After preparing the L1 software, the container needs to be committed to create an image where L1 is ready for execution, which can later be referenced by a `docker-compose.yaml` file.
*Note:* The default L1 configuration file is `cuphycontroller_P5G_FXN_GH.yaml`, located in `/opt/nvidia/cuBB/cuPHY-CP/cuphycontroller/config/`.
@@ -227,7 +239,7 @@ cubb-build 25-2
-..
```
### Adapt the OAI-gNB configuration file to your system/workspace
## Adapt the OAI-gNB configuration file to your system/workspace
Edit the sample OAI gNB configuration file and check following parameters:
@@ -241,8 +253,8 @@ The default amf_ip_address:ipv4 value is 192.168.70.132, when installing the CN5
Both 'GNB_IPV4_ADDRESS_FOR_NG_AMF' and 'GNB_IPV4_ADDRESS_FOR_NGU' need to be set to the IP address of the NIC referenced previously.
### Running docker compose
#### Aerial L1 entrypoint script
## Running docker compose
### Aerial L1 entrypoint script
The `aerial_l1_entrypoint` script is used by the L1 container to start the L1 software and is called in the Docker Compose file.
It begins by setting up environment variables, restarting NVIDIA MPS, and finally running `cuphycontroller_scf`.
@@ -263,7 +275,7 @@ The logs can be followed using these commands:
docker logs -f oai-gnb-aerial
docker logs -f nv-cubb
```
#### Running with multiple L2s
### Running with multiple L2s
One L1 instance can support multiple L2 instances. See also the [aerial documentation](https://developer.nvidia.com/docs/gputelecom/aerial-sdk/text/cubb_quickstart/running_cubb-end-to-end.html#run-multiple-l2-instances-with-single-l1-instance) for more details.
In OAI the shared memory prefix must be configured in the configuration file.
@@ -274,7 +286,7 @@ In OAI the shared memory prefix must be configured in the configuration file.
```
### Stopping the setup
## Stopping the setup
Run the following command to stop and remove both containers, leaving the system ready to be restarted later:
```bash

View File

@@ -1,14 +1,26 @@
# OAI Build Procedures
<table style="border-collapse: collapse; border: none;">
<tr style="border-collapse: collapse; border: none;">
<td style="border-collapse: collapse; border: none;">
<a href="http://www.openairinterface.org/">
<img src="./images/oai_final_logo.png" alt="" border=3 height=50 width=150>
</img>
</a>
</td>
<td style="border-collapse: collapse; border: none; vertical-align: center;">
<b><font size = "5">OAI Build Procedures</font></b>
</td>
</tr>
</table>
[[_TOC_]]
This page is valid on tags starting from **`2019.w09`**.
## Overview
# Overview
The [OAI EPC](https://github.com/OPENAIRINTERFACE/openair-epc-fed/blob/master/docs/DEPLOY_HOME_MAGMA_MME.md) and [OAI 5GC](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed/-/blob/master/docs/DEPLOY_HOME.md) are developed in distinct projects with their own documentation and are not further described here.
OAI softmodem sources, which aim to implement 3GPP compliant UEs, eNodeB and gNodeB can be downloaded from the Eurecom [gitlab repository](setup/GET_SOURCES.md).
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.
@@ -28,7 +40,7 @@ Running the [build_oai](../cmake_targets/build_oai) script also generates some
- `nvram`: a binary used to build (4G) UE (IMEI...) and EMM (IMSI, registered PLMN) non volatile data.
- `genids` T Tracer utility, used at build time to generate `T_IDs.h` include file. This binary is located in the [T Tracer source file directory](../common/utils/T) .
The build system for OAI uses [cmake](https://cmake.org/) which is a tool to generate makefiles. The `build_oai` script is a wrapper using `cmake` and `make`/`ninja` to ease the oai build and use. It logs the `cmake` and `ninja`/`make` commands it executes. The file describing how to build the executables from source files is the [CMakeLists.txt](CMakeLists.txt), it is used as input by cmake to generate the makefiles.
The build system for OAI uses [cmake](https://cmake.org/) which is a tool to generate makefiles. The `build_oai` script is a wrapper using `cmake` and `make`/`ninja` to ease the oai build and use. It logs the `cmake` and `ninja`/`make` commands it executes. The file describing how to build the executables from source files is the [CMakeLists.txt](../CMakeLists.txt), it is used as input by cmake to generate the makefiles.
cmake is further extended by using [CPM](https://github.com/cpm-cmake/CPM.cmake). CPM is a cmake script that handles external code dependencies. It is setup to cache downloaded code in `~/.cache/cpm`. While most external dependencies should be handled by system package managers, CPM has the advantage of using any code that is available in a public git repository.
@@ -37,9 +49,9 @@ 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.
## Running `build_oai`
# Running `build_oai`
### List of options
## List of options
Calling the `build_oai` script with the `-h` option gives the list of all available options. A number of important ones:
@@ -52,9 +64,9 @@ Calling the `build_oai` script with the `-h` option gives the list of all availa
- `--ninja` is to use the `ninja` build tool, which speeds up compilation.
- `-c` is to clean the workspace and force a complete rebuild.
`build_oai` also provides various options to enable runtime error checkers, i.e. sanitizers in order to find various types of bugs in the codebase and eventually enhance the stability of the OAI softmodems. Refer to [sanitizers.md](dev_tools/sanitizers.md) for more details.
`build_oai` also provides various options to enable runtime error checkers, i.e. sanitizers in order to find various types of bugs in the codebase and eventually enhance the stability of the OAI softmodems. Refer to [sanitizers.md](./dev_tools/sanitizers.md) for more details.
### Installing dependencies
## Installing dependencies
Install all dependencies by issuing the `-I` option. To install furthermore libraries for optional libraries, use the `--install-optional-packages` option. The `-I` option will also install dependencies for an SDR when paired with `-w`. For instance, in order to install all dependencies and the ones for USRP, run:
@@ -65,7 +77,7 @@ cd openairinterface5g/cmake_targets/
Note the section on installing UHD further down for more information.
### Installing (new) asn1c from source
## Installing (new) asn1c from source
With tag 2023.w22, we switch from our [own
`asn1c`](https://gitlab.eurecom.fr/oai/asn1c.git) to a [community-maintained
@@ -95,7 +107,7 @@ install elsewhere, using one of these two methods:
cmake .. -GNinja -DASN1C_EXEC=/opt/asn1c/bin/asn1c
```
### Installing UHD from source
## Installing UHD from source
Previously for Ubuntu distributions, when installing the pre-requisites, most of the packages are installed from PPA.
@@ -127,7 +139,7 @@ See:
* `cmake_targets/tools/uhd-4.x-tdd-patch.diff`
* `cmake_targets/tools/build_helper` --> function `install_usrp_uhd_driver_from_source`
### Building PHY Simulators
## Building PHY Simulators
The PHY layer simulators (LTE and NR) can be built as follows:
@@ -138,9 +150,9 @@ cd openairinterface5g/cmake_targets/
After completing the build, the binaries are available in the `cmake_targets/ran_build/build` directory.
Detailed information about these simulators can be found [in the dedicated page](usage/physical-simulators.md)
Detailed information about these simulators can be found [in the dedicated page](./physical-simulators.md)
### Building UEs, eNodeB and gNodeB Executables
## Building UEs, eNodeB and gNodeB Executables
After downloading the source files, a single build command can be used to get the binaries supporting all the oai softmodem use cases (UE and [eg]NodeB):
@@ -153,7 +165,7 @@ You can build any oai softmodem executable separately, you may not need all of t
After completing the build, the binaries are available in the `cmake_targets/ran_build/build` directory.
### Building Optional Binaries
## Building Optional Binaries
There are a number of optional libraries that can be built in support of the
RAN, such as telnetsrv, scopes, offloading libraries, etc.
@@ -175,7 +187,7 @@ Some libraries have further dependencies and might not build on every system:
- `websrv`: npm and others
- `ldpc_aal`: DPDK with patch
## Running `cmake` directly
# 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:
```
@@ -205,9 +217,9 @@ cmake-gui ../../..
```
You can of course use all standard cmake/ninja/make commands in this directory.
### cmake presets
## cmake presets
CMake presets are common project configure options. See [here](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html).
CMake presets are common project configure options. See https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html
Configure presets:
@@ -229,7 +241,7 @@ To build using a build preset:
cmake --build --preset <preset_name>
## Cross Compile
# Cross Compile
If you want to use cross-compiler on x86 platform for aarch64 version, please refer the [cross-compile.md](setup/cross-compile.md) for more information.
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

@@ -51,7 +51,7 @@ PROJECT_BRIEF = "Full experimental OpenSource LTE and NR implementation
# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
# the logo to the output directory.
PROJECT_LOGO = @CMAKE_SOURCE_DIR@/doc/images/oai_logo.png
PROJECT_LOGO = @CMAKE_SOURCE_DIR@/doc/oai_logo.png
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
# into which the generated documentation will be written. If a relative path is

View File

@@ -1,6 +1,6 @@
[[_TOC_]]
## 1. Introduction
# 1. Introduction
E1 is the interface that lies between the nodes CU Control Plane (CUCP) and CU User Plane (CUUP). Once the nodes are configured, all user plane traffic flows through CUUP.
@@ -75,13 +75,13 @@ sequenceDiagram
Note over u: E1AP_CUUP_task (SCTP Handler)
Note over u: ASN1 decoder
```
More details about the E1AP procedures in OAI are available in this document: [E1 Procedures](e1ap_procedures.md).
More details about the E1AP procedures in OAI are available in this document: [E1 Procedures](./e1ap_procedures.md).
## 2. Running the E1 Split
# 2. Running the E1 Split
The setup is assuming that all modules are running on the same machine. The user can refer to the [F1 design document](../F1AP/F1-design.md) for local deployment of the DU.
The setup is assuming that all modules are running on the same machine. The user can refer to the [F1 design document](./../F1AP/F1-design.md) for local deployment of the DU.
### 2.1 Configuration File
## 2.1 Configuration File
The gNB is started based on the node type that is specified in the configuration file. The following parameters must be configured accordingly.
@@ -130,9 +130,9 @@ The CUUP uses the IP address specified in `gNBs.[0].local_s_address` for F1-U an
Alternatively, you can use the config files `ci-scripts/conf_files/gnb-cucp.sa.f1.conf` and `ci-scripts/conf_files/gnb-cuup.sa.f1.conf`.
### 2.2 Steps to Run the Split in rfsimulator with OAI UE
## 2.2 Steps to Run the Split in rfsimulator with OAI UE
Note: A 5G core must be running at this point. Steps to start the OAI 5G core can be found [in the oai-cn5g-fed repository](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed/-/blob/master/docs/DEPLOY_HOME.md) or [here](../tutorials/NR_SA_Tutorial_OAI_CN5G.md).
Note: A 5G core must be running at this point. Steps to start the OAI 5G core can be found [in the oai-cn5g-fed repository](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed/-/blob/master/docs/DEPLOY_HOME.md) or [here](NR_SA_CN5G_gNB_USRP_COTS_UE_Tutorial.md).
0. Open wireshark to capture the E1AP messages. You might set the capture filter
to `sctp` to limit the number of captured packages.
@@ -165,15 +165,15 @@ OAI UE:
sudo ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --rfsim --rfsimulator.serveraddr 127.0.0.1
```
## 3. Configuration file IP addresses of network functions
# 3. Configuration file IP addresses of network functions
You can also run the nodes on different machines. If you do so please change the interface parameters accordingly and make sure the interfaces are reachable. Please refer to the following figure for an overview of all parameters.
![E1/F1/NG parameters](images/e1-archi.png){width=1200}
![E1/F1/NG parameters](./images/e1-archi.png){width=1200}
[PDF version](images/e1-archi.pdf) | [LaTeX/TikZ version](images/e1-archi.tex) if you want to modify to reflect your setup
[PDF version](./images/e1-archi.pdf) | [LaTeX/TikZ version](./images/e1-archi.tex) if you want to modify to reflect your setup
## 4. Multiple CU-UP
# 4. Multiple CU-UP
It is possible to connect multiple CU-UP to the same CU-CP. In the handler of
the E1 Setup Request, the CU-CP verifies that the PLMN(s) (MCC, MNC) between
@@ -195,6 +195,6 @@ that you have to restart the CU-CP if you want to connect the CU-UP again
(e.g., after a crash). The CU-CP might also misfunction during attach if a
CU-UP was connected, but disconnected in the meantime.
## 5. Abnormal conditions
# 5. Abnormal conditions
* The CU-UP goes offline during normal operation (e.g. UEs have a valid PDU Session and are exchanging data on the UP): after restarting the CU-UP, the UP is not restored and the user will notice GTP errors. In this case the UEs have to reconnect.

View File

@@ -1,8 +1,20 @@
# E1AP Procedures
<table style="border-collapse: collapse; border: none;">
<tr style="border-collapse: collapse; border: none;">
<td style="border-collapse: collapse; border: none;">
<a href="http://www.openairinterface.org/">
<img src="./images/oai_final_logo.png" alt="" border=3 height=50 width=150>
</img>
</a>
</td>
<td style="border-collapse: collapse; border: none; vertical-align: center;">
<b><font size = "5">E1AP Procedures</font></b>
</td>
</tr>
</table>
[[_TOC_]]
## Introduction
# Introduction
The E1 interface is between the gNB-CU-CP (Central Unit - Control Plane) and gNB-CU-UP (Central Unit - User Plane) nodes. This interface is governed by the E1 Application Protocol (E1AP) outlined in the 3GPP release 16 specifications, specifically in the documents:
* 3GPP TS 38.463 - E1 Application Protocol (E1AP)
* 3GPP TS 38.460 - E1 general aspects and principles
@@ -14,18 +26,18 @@ The E1AP protocol consists of the following sets of functions:
* E1 Bearer Context Management functions
* TEID allocation function
### E1 Bearer Context Management function
## E1 Bearer Context Management function
This function handles the establishment, modification, and release of E1 bearer contexts.
* E1 Bearer Context Establishment: initiation of E1 bearer context is by gNB-CU-CP and acceptance or rejection is determined by gNB-CU-UP based on admission control criteria (e.g., resource availability).
* E1 Bearer Context Modification: can be initiated by either gNB-CU-CP or gNB-CU-UP, with the receiving node having the authority to accept or reject the modification.
* Release of Bearer Context: can be triggered either directly by gNB-CU-CP or following a request from gNB-CU-UP.
* QoS-Flow to DRB Mapping Configuration: responsible for setting up and modifying the QoS-flow to DRB mapping configuration. gNB-CU-CP decides the flow-to-DRB mapping, generates SDAP and PDCP configurations, and provides them to gNB-CU-UP.
## OAI implementation
# OAI implementation
For the E1AP design in OAI, please refer to the [E1 Design](E1-design.md) document.
For the E1AP design in OAI, please refer to the [E1 Design](./E1-design.md) document.
### E1 re-establishment
## E1 re-establishment
The purpose of this procedure is to follow-up the re-establishment of RRC connection over the E1 interface. For all activated DRBs a Bearer Context Modification from CU-CP to CU-UP is necessary, according to clause 9.2.2.4 of 3GPP TS 38.463. If any modification to the bearer context is required, the CU-CP informs the CU-UP with the relevant IEs (e.g. in case of PDCP re-establishment, PDCP Configuration IE clause 9.3.1.38), Current implementation in OAI:

View File

@@ -1,8 +1,20 @@
# F1 split design
<table style="border-collapse: collapse; border: none;">
<tr style="border-collapse: collapse; border: none;">
<td style="border-collapse: collapse; border: none;">
<a href="http://www.openairinterface.org/">
<img src="./images/oai_final_logo.png" alt="" border=3 height=50 width=150>
</img>
</a>
</td>
<td style="border-collapse: collapse; border: none; vertical-align: center;">
<b><font size = "5">F1 split design</font></b>
</td>
</tr>
</table>
[[_TOC_]]
## Introduction
# Introduction
The F1 interface is the functional split of 3GPP between the CU (centralized
unit: PDCP, RRC, SDAP) and the DU (distributed unit: RLC, MAC, PHY). It is
@@ -21,17 +33,17 @@ F1-U:
No equivalent for 4G exists.
### Control plane (F1-C)
## Control plane (F1-C)
The interface F1-C is designed for the exchange of signalling messages between the
Radio Network Layer (RNL) and the Transport Network Layer (TNL). It
consists of F1 Application Protocol messages (F1-AP) exchanged over SCTP.
### Data plane (F1-U)
## Data plane (F1-U)
F1-U uses GTP-U for information exchange.
## OAI Implementation Status
# OAI Implementation Status
The implementation of F1AP messages is seamlessly integrated into OAI, supporting both Monolithic SA
and CU/DU functional split modes. The F1 code is therefore always compiled with nr-softmodem.
@@ -47,17 +59,17 @@ This is the current status:
* SA
* Single cell per DU
* Multiple DUs connected to one CU (both CP and UP)
* [Mobility between DUs connected to a single CU](../tutorials/handover-tutorial.md)
* [Mobility between DUs connected to a single CU](../handover-tutorial.md)
- Not supported:
* NSA
### F1-C
## F1-C
#### F1AP messages
### F1AP messages
Refer to [FEATURE_SET.md](../setup/FEATURE_SET.md#gnb-f1ap) to learn about the current F1AP implementation status.
Refer to [FEATURE_SET.md](FEATURE_SET.md#gNB-F1AP) to learn about the current F1AP implementation status.
#### High-level F1-C code structure
### High-level F1-C code structure
The F1 interface is used internally between CU (mostly RRC) and DU (mostly MAC)
to exchange information. In DL, the CU sends messages as defined by the
@@ -158,7 +170,7 @@ sequenceDiagram
TASK_MAC_GNB->>+TASK_RRC_GNB: raw F1AP message (ITTI)
```
### F1-U
## F1-U
Current status:
@@ -166,7 +178,7 @@ Current status:
* Each packet is acknowledged individually
* Support of multiple DUs per CU
## How to run
# How to run
As mentioned earlier, OAI uses F1 internally. It is always compiled in.
To start CU/DU, you use `./nr-softmodem` with the appropriate configuration
@@ -178,7 +190,7 @@ sudo cmake_targets/ran_build/build/nr-softmodem -O ci-scripts/conf_files/gnb-du.
```
These files are tested in the CI, and are configured for use in docker,
see [this `docker-compose` file](../../ci-scripts/yaml_files/5g_f1_rfsimulator/docker-compose.yaml).
see [this `docker-compose` file](../ci-scripts/yaml_files/5g_f1_rfsimulator/docker-compose.yaml).
The rules to decide if a config triggers a start of a DU, CU, or monolithic
gNB, are, in order:
@@ -188,7 +200,7 @@ gNB, are, in order:
(`tr_s_preference`), it is a CU.
3. It is a (monolithic) gNB.
### F1 IP configuration for Local network deployment of F1
## F1 IP configuration for Local network deployment of F1
The following paragraphs explain the IP configuration for F1 in the OAI config
files on the example of a a local deployment. We assume that the CU will bind
@@ -230,7 +242,7 @@ the options `MACRLCs.[0].local_n_address` and
`MACRLCs.[0].local_n_address_f1u`, respectively. Note that this is not foreseen
for the CU; in the case of the CU, please use separate CU-UP and CU-CP.
### Configuration of multiple DUs
## Configuration of multiple DUs
Upon F1 Setup Request of a new DU, the CU cross-checks that
@@ -248,9 +260,9 @@ You have to of course make sure that the local interface of the DU
Assuming you use RFsim, you should make the RFsimulator server side (typically
the gNB) bind on different hosts (`rfsimulator.serverport`).
## Code documentation
# Code documentation
### Common multi-threading architecture
## Common multi-threading architecture
The CU and DU interfaces are based on ITTI threads (see `common/utils/ocp_itti/itti.md`)
adopted by all OAI upper layers to run isolated threads dedicated to one feature.
@@ -289,7 +301,7 @@ All GTP-U tunnels are managed in a Linux Thread, that have partially ITTI design
3. incoming packets are sent to the tunnel creator using a C callback (the callback function is given in tunnel creation order). The callback should not block
### F1-C messages towards the CU
## F1-C messages towards the CU
The CU thread starts when the CU starts. It opens listening socket on the
configuration-specified IP/port by sending the appropriate message to
@@ -320,7 +332,7 @@ You might also want to consult TS 38.401 regarding the message exchange.
| UE Context Release Request | `F1AP_UE_CONTEXT_RELEASE_REQ` | `rrc_CU_process_ue_context_release_request()` | RRC will trigger UE release |
| UE Context Release Complete | `F1AP_UE_CONTEXT_RELEASE_COMPLETE` | `rrc_CU_process_ue_context_release_complete()` | frees UE Context, signals to NGAP |
### F1-C Messages towards the DU
## F1-C Messages towards the DU
The task "gNB app", after reading the configuration file, sends a message
`F1AP_DU_REGISTER_REQ` to the DU task. This message contains network
@@ -359,9 +371,9 @@ You might also want to consult TS 38.401 regarding the message exchange.
a reconfiguration has to be triggered if the CU receives a CellGroupConfig,
originating at the DU. See also flag `expect_reconfiguration`.
### F1-U messages
## F1-U messages
#### General
### General
In the DU in UL, RLC checks in `deliver_sdu()` if we are operating in split
mode, and either (direct) calls `pdcp_data_ind` (DRB) or (f1ap) sends a GTP
@@ -378,7 +390,7 @@ In the DU in DL, assuming the GTP-U tunnel exists, GTP decapsulates the packet
and calls the reception call back `nr_rlc_data_req()`, which enqueues the
packet into the UE's RLC buffer.
### Tunnel Setup
## Tunnel Setup
In GTP-U, TS 29.281 specifies a optional header (NR RAN Container). This
extension header may be transmitted in a G-PDU over the X2-U, Xn-U and F1-U user

View File

@@ -1,13 +1,25 @@
# F1AP Messages Encoding & Decoding Library
<table style="border-collapse: collapse; border: none;">
<tr style="border-collapse: collapse; border: none;">
<td style="border-collapse: collapse; border: none;">
<a href="http://www.openairinterface.org/">
<img src="./images/oai_final_logo.png" alt="" border=3 height=50 width=150>
</img>
</a>
</td>
<td style="border-collapse: collapse; border: none; vertical-align: center;">
<b><font size = "5">F1AP Messages Encoding & Decoding Library</font></b>
</td>
</tr>
</table>
[[_TOC_]]
## Intro
# Intro
This library is for the encoding, decoding and testing of F1AP (F1 Application Protocol) messages.
## Implementation Details
# Implementation Details
The library includes the following components:
@@ -28,7 +40,7 @@ e.g. The following module contains functions that performs the encoding/decoding
* [f1ap_rrc_message_transfer.c](../../openair2/F1AP/lib/f1ap_rrc_message_transfer.c)
## Testing
# Testing
The functions in the file [f1ap_lib_common.c](../../openair2/F1AP/tests/f1ap_lib_test.c) are used to test F1AP message encoding and decoding functionalities, according to the following steps:

View File

@@ -2,7 +2,7 @@
[[_TOC_]]
## Functional Split Architecture
# Functional Split Architecture #
- RCC: Radio-Cloud Center
- RAU: Radio-Access Unit
@@ -11,21 +11,21 @@
- FAPI (IF2) : specified by Small Cell Forum (open-nFAPI implementation)
- IF1 : F1 in 3GPP Release 15
![Functional Split Architecture](../images/oai_enb_func_split_arch.png)
![Functional Split Architecture](./oai_enb_func_split_arch.png)
## OpenAirInterface Block Diagram
# OpenAirInterface Block Diagram #
![Block Diagram](../images/oai_enb_block_diagram.png)
![Block Diagram](./oai_enb_block_diagram.png)
## OpenAirInterface 5G-NR Feature Set
# OpenAirInterface 5G-NR Feature Set #
### General Parameters
## General Parameters
The following features are valid for the gNB and the 5G-NR UE.
* Static TDD
- Multi TDD pattern supported refer [TDD Configuration](../MAC/mac-usage.md)
- Multi TDD pattern supported refer [TDD Configuration](NR_SA_Multi_TDD_Pattern.md)
* Static FDD
* Normal CP
* Subcarrier spacings: 15 and 30kHz (FR1), 120kHz (FR2)
@@ -58,7 +58,7 @@ These modes of operation are supported:
- is unstable (only one UE connection)
### gNB PHY
## gNB PHY
* 15kHz and 30kHz SCS for FR1 and 120kHz SCS for FR2
* Generation of NR-PSS/NR-SSS
@@ -101,7 +101,7 @@ These modes of operation are supported:
* Highly efficient 3GPP compliant polar encoder and decoder
* Encoder and decoder for short block
### gNB MAC
## gNB MAC
- MAC -> PHY configuration using NR FAPI P5 interface
- MAC <-> PHY data interface using FAPI P7 interface for BCH PDU, DCI PDU, PDSCH PDU
@@ -146,7 +146,7 @@ These modes of operation are supported:
- Initial support for RedCap
- Scheduling of SIBs (2, 19)
### gNB RLC
## gNB RLC
- Send/Receive operations according to 38.322 Rel.16
- Segmentation and reassembly procedures
@@ -157,7 +157,7 @@ These modes of operation are supported:
- Interfaces with PDCP, MAC
- Interfaces with gtp-u (data Tx/Rx over F1-U at the DU)
### gNB PDCP
## gNB PDCP
- Send/Receive operations according to 38.323 Rel.16
- Integrity protection and ciphering procedures
@@ -166,7 +166,7 @@ These modes of operation are supported:
- Interfaces with RRC, RLC
- Interfaces with gtp-u (data Tx/Rx over N3 and F1-U interfaces)
### gNB SDAP
## gNB SDAP
- Send/Receive operations according to 37.324 Rel.15
- Establishment/Handling of SDAP entities.
@@ -175,7 +175,7 @@ These modes of operation are supported:
- Marking QoS flow ID in both DL and UL packets
- Reflective QoS flow to DRB mapping for UL SDAP data PDUs
### gNB RRC
## gNB RRC
- NR RRC (38.331) Rel 17 messages using new [asn1c](https://github.com/mouse07410/asn1c)
- LTE RRC (36.331) also updated to Rel 15
@@ -193,13 +193,13 @@ These modes of operation are supported:
- Periodic RRC measurements of serving cell (no A/B events)
- Initial support for RedCap
### gNB X2AP
## gNB X2AP
- Integration of X2AP messages and procedures for the exchanges with the eNB over X2 interface supporting the NSA setup according to 36.423 Rel. 15
- X2 setup with eNB
- Handling of SgNB Addition Request/Addition Request Acknowledge/Reconfiguration Complete
### gNB NGAP
## gNB NGAP
- Integration of NGAP messages and procedures for the exchanges with the AMF over N2 interface according to 38.413 Rel. 15
- NGAP Setup request/response
@@ -211,7 +211,7 @@ These modes of operation are supported:
- NGAP PDU session resource setup request/response
- Interface with RRC
### gNB F1AP
## gNB F1AP
- Integration of F1AP messages and procedures for the control plane exchanges between the CU and DU entities according to 38.473 Rel. 16
- F1 Interface Management:
@@ -232,7 +232,7 @@ These modes of operation are supported:
- One CU(-CP) can handle multiple DUs
- Support for intra-CU mobility (across DUs)
### gNB E1AP
## gNB E1AP
- Integration of E1AP messages and procedures for exchange between CU-CP and CU-UP according to TS 38.463 Rel. 16
- E1 Setup (gNB-CU-UP initiated)
@@ -248,21 +248,21 @@ These modes of operation are supported:
- Interface with RRC and PDCP
- One CU-CP can handle multiple CU-UPs
### gNB GTP-U
## gNB GTP-U
- New GTP-U implementation supporting both N3 and F1-U interfaces according to 29.281 Rel.15
- Interfaces with RRC, F1AP for tunnel creation
- Interfaces with PDCP and RLC for data send/receive at the CU and DU respectively (F1-U interface)
- Interface with SDAP for data send/receive, capture of GTP-U Optional Header, GTP-U Extension Header and PDU Session Container.
### Number of supported UEs
## Number of supported UEs
* 16 by default (as defined in `MAX_MOBILES_PER_GNB`)
* up to 64 if the configured bandwidth is sufficient (at leat 40 MHz)
## OpenAirInterface 5G-NR UE Feature Set
# OpenAirInterface 5G-NR UE Feature Set #
### NR UE PHY Layer
## NR UE PHY Layer ##
* Initial synchronization
- non-blind synchronization (information required: carrier frequency, bandwidth, numerology)
@@ -317,15 +317,15 @@ These modes of operation are supported:
* Highly efficient 3GPP compliant polar encoder and decoder
* Encoder and decoder for short block
### NR UE FAPI
## NR UE FAPI ##
* MAC -> PHY configuration via UE FAPI P5 interface
* Basic MAC to control PHY via UE FAPI P7 interface
* PHY -> MAC indication
### NR UE Higher Layers
## NR UE Higher Layers ##
### UE MAC
## UE MAC
* Minimum system information (MSI)
- MIB processing
@@ -368,7 +368,7 @@ These modes of operation are supported:
- Operation in configured dedicated BWP through RRCSetup or RRCReconfiguration
### UE RLC
## UE RLC
* Tx/Rx operations according to 38.322 Rel.16
- Segmentation and reassembly procedures
@@ -378,7 +378,7 @@ These modes of operation are supported:
- Timers implementation
- Interfaces with PDCP, MAC
### UE PDCP
## UE PDCP
* Tx/Rx operations according to 38.323 Rel.16
- Integrity protection and ciphering procedures
@@ -386,7 +386,7 @@ These modes of operation are supported:
- Radio bearer establishment/handling and association with PDCP entities
- Interfaces with RRC, RLC
### UE SDAP
## UE SDAP
* Tx/Rx operations operations according to 37.324 Rel.15
- Establishment/Handling of SDAP entities.
@@ -394,7 +394,7 @@ These modes of operation are supported:
- Reflective Mapping
- RRC Signaling Mapping
### UE RRC
## UE RRC
* Integration of RRC messages and procedures supporting UE 5G SA connection according to 38.331 Rel.16
- RRCSetupRequest/RRCSetup/RRCSetupComplete
@@ -406,7 +406,7 @@ These modes of operation are supported:
* Interface with PDCP: configuration, DCCH and CCCH message handling
* Interface with RLC and MAC for configuration
### UE NAS
## UE NAS
* Transfer of NAS messages between the AMF and the UE supporting the UE registration with the core network and the PDU session establishment according to 24.501 Rel.16
- Identity Request/Response
@@ -418,9 +418,9 @@ These modes of operation are supported:
## OpenAirInterface 4G LTE eNB Feature Set
# OpenAirInterface 4G LTE eNB Feature Set #
### eNB PHY Layer
## eNB PHY Layer ##
The Physical layer implements **3GPP 36.211**, **36.212**, **36.213** and provides the following features:
@@ -438,7 +438,7 @@ The Physical layer implements **3GPP 36.211**, **36.212**, **36.213** and provid
- Multi-RRU support: over the air synchro b/ multi RRU in TDD mode
- Support for CE-modeA for LTE-M. Limited support for repeatition, single-LTE-M connection, legacy-LTE UE attach is disabled.
#### Performances
### Performances ###
**Transmission Mode, Bandwidth** | **Expected Throughput** | **Measured Throughput** | **Measurement Conditions**
-------------------------------- | ----------------------- | ------------------------| ----------------:
@@ -458,13 +458,13 @@ TDD UL: 5 MHz, 25 PRBS/ MCS **XX** | 2.0 Mbit/s | TM1: 3.31 Mbits/s
TDD UL: 10 MHz, 50 PRBS/ MCS **XX** | 2.0 Mbit/s | TM1: 7.25 Mbits/s | COTS-UE Cat 4 (150/50 Mbps)
TDD UL: 20 MHz, 100 PRBS/ MCS **XX** | 3.0 Mbit/s | TM1: 4.21 Mbits/s | COTS-UE Cat 4 (150/50 Mbps)
#### Number of supported UEs
### Number of supported UEs ###
* 16 by default
* up to 256 when compiling with dedicated compile flag
* was tested with 40 COTS-UE
### eNB MAC Layer
## eNB MAC Layer ##
The MAC layer implements a subset of the **3GPP 36.321** release v8.6 in support of BCH, DLSCH, RACH, and ULSCH channels.
@@ -482,7 +482,7 @@ The MAC layer implements a subset of the **3GPP 36.321** release v8.6 in support
- Link adaptation
- Connected DRX (CDRX) support for FDD LTE UE. Compatible with R13 from 3GPP. Support for Cat-M1 UE comming soon.
### eNB RLC Layer
## eNB RLC Layer ##
The RLC layer implements a full specification of the 3GPP 36.322 release v9.3.
@@ -502,7 +502,7 @@ The RLC layer implements a full specification of the 3GPP 36.322 release v9.3.
* RLC PDU retransmission in support of error control and correction
* Generation of data/control PDUs
### eNB PDCP Layer
## eNB PDCP Layer ##
The current PDCP layer is header compliant with **3GPP 36.323** Rel 10.1.0 and implements the following functions:
@@ -512,7 +512,7 @@ The current PDCP layer is header compliant with **3GPP 36.323** Rel 10.1.0 and i
- PDCP entity association with one or two RLC entities
- Integrity check and encryption using the AES and Snow3G algorithms
### eNB RRC Layer
## eNB RRC Layer ##
The RRC layer is based on **3GPP 36.331** v15.6 and implements the following functions:
@@ -528,7 +528,7 @@ The RRC layer is based on **3GPP 36.331** v15.6 and implements the following fun
- Paging (soon)
- RRC inactivity timer (release of UE after a period of data inactivity)
### eNB X2AP
## eNB X2AP ##
The X2AP layer is based on **3GPP 36.423** v14.6.0 and implements the following functions:
@@ -546,7 +546,7 @@ The X2AP layer is based on **3GPP 36.423** v14.6.0 and implements the following
- RRC : Handling of RRC Connection Reconfiguration with 5G cell info, configuration of 5G-NR measurements
- S1AP : Handling of E-RAB Modification Indication / Confirmation
### eNB/MCE M2AP
## eNB/MCE M2AP ##
The M2AP layer is based on **3GPP 36.443** v14.0.1:
- M2 Setup Request
@@ -557,7 +557,7 @@ The M2AP layer is based on **3GPP 36.443** v14.0.1:
- M2 Session Start Request
- M2 Session Start Response
### MCE/MME M3AP
## MCE/MME M3AP ##
The M3AP layer is based on **3GPP 36.444** v14.0.1:
- M3 Setup Request
@@ -567,9 +567,9 @@ The M3AP layer is based on **3GPP 36.444** v14.0.1:
- M3 Session Start Response
## OpenAirInterface 4G LTE UE Feature Set
# OpenAirInterface 4G LTE UE Feature Set #
### LTE UE PHY Layer
## LTE UE PHY Layer ##
The Physical layer implements **3GPP 36.211**, **36.212**, **36.213** and provides the following features:
@@ -586,7 +586,7 @@ The Physical layer implements **3GPP 36.211**, **36.212**, **36.213** and provid
- LTE non-MBSFN subframe (feMBMS) Carrier Adquistion Subframe-CAS procedures (PSS/SSS/PBCH/PDSH) (experimental)
- LTE MBSFN MBSFN subframe channel (feMBMS): PMCH (CS@1.25KHz) (channel estimation for 25MHz bandwidth) (experimental)
### LTE UE MAC Layer
## LTE UE MAC Layer ##
The MAC layer implements a subset of the **3GPP 36.321** release v8.6 in support of BCH, DLSCH, RACH, and ULSCH channels.
@@ -599,15 +599,15 @@ The MAC layer implements a subset of the **3GPP 36.321** release v8.6 in support
- MBMS-dedicated cell (feMBMS) RRC interface for BCCH
- eMBMS and MBMS-dedicated cell (feMBMS) RRC interface for MCCH, MTCH
### LTE UE RLC Layer
## LTE UE RLC Layer ##
The RLC layer implements a full specification of the 3GPP 36.322 release v9.3.
### LTE UE PDCP Layer
## LTE UE PDCP Layer ##
The current PDCP layer is header compliant with **3GPP 36.323** Rel 10.1.0.
### LTE UE RRC Layer
## LTE UE RRC Layer ##
The RRC layer is based on **3GPP 36.331** v14.3.0 and implements the following functions:
@@ -615,7 +615,7 @@ The RRC layer is based on **3GPP 36.331** v14.3.0 and implements the following f
- RRC connection establishment
- MBMS-dedicated cell (feMBMS) SI-MBMS/SIB1-MBMS management
### LTE UE NAS Layer
## LTE UE NAS Layer ##
The NAS layer is based on **3GPP 24.301** and implements the following functions:
@@ -625,6 +625,6 @@ The NAS layer is based on **3GPP 24.301** and implements the following functions
[OAI wiki home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home)
[OAI softmodem build procedure](../BUILD.md)
[OAI softmodem build procedure](BUILD.md)
[Running the OAI softmodem ](../usage/RUNMODEM.md)
[Running the OAI softmodem ](RUNMODEM.md)

View File

@@ -2,7 +2,7 @@ The OpenAirInterface software can be obtained from our gitLab server. You will
need a git client to get the sources. The repository is used for main
developments.
## Prerequisites
# Prerequisites
You need to install `git` using the following commands:
@@ -11,12 +11,12 @@ sudo apt-get update
sudo apt-get install git
```
## Clone the Git repository (for OAI Users without login to gitlab server)
# Clone the Git repository (for OAI Users without login to gitlab server)
The [openairinterface5g repository](https://gitlab.eurecom.fr/oai/openairinterface5g.git)
holds the source code for the RAN (4G and 5G).
### All users, anonymous access
## All users, anonymous access
Clone the RAN repository:
@@ -24,7 +24,7 @@ Clone the RAN repository:
git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git
```
### For contributors
## For contributors
Configure git with your name/email address, important if you are developer and
want to contribute by pushing code. Please put your full name and the e-mail
@@ -35,16 +35,17 @@ git config --global user.name "Your Name"
git config --global user.email "Your email address"
```
More information can be found in [the contributing page](../../CONTRIBUTING.md).
More information can be found in [the contributing page](../CONTRIBUTING.md).
## Which branch to checkout?
# Which branch to checkout?
- `develop`: contains recent commits that are tested on our CI test bench. The
update frequency is about once a week. 5G is only in this branch. **It is the
recommended and default branch.**
- `master`: contains a known stable version.
You can find the latest stable tag release [here](https://gitlab.eurecom.fr/oai/openairinterface5g/tags).
You can find the latest stable tag release here:
https://gitlab.eurecom.fr/oai/openairinterface5g/tags
The tag naming conventions are:
@@ -54,4 +55,4 @@ The tag naming conventions are:
* `xx` the week number within the year
More information on work flow and policies can be found in [this
document](code-style-contrib.md).
document](./code-style-contrib.md).

View File

@@ -1,27 +1,38 @@
# Open Air LTE Emulation
<table style="border-collapse: collapse; border: none;">
<tr style="border-collapse: collapse; border: none;">
<td style="border-collapse: collapse; border: none;">
<a href="http://www.openairinterface.org/">
<img src="./images/oai_final_logo.png" alt="" border=3 height=50 width=150>
</img>
</a>
</td>
<td style="border-collapse: collapse; border: none; vertical-align: center;">
<b><font size = "5">Open Air LTE Emulation</font></b>
</td>
</tr>
</table>
> **Note:**
> **Unless you know what you are doing, you likely do not need this!
**Note: unless you know what you are doing, you likely do not need this!
Rather, you are probably looking for the
[RFsimulator](../../radio/rfsimulator/README.md)!**
[RFsimulator](../radio/rfsimulator/README.md)!**
oaisim has been scraped and replaced by the same programs that are used for the
real-time operation, `lte-softmodem` and `lte-uesoftmodem`. This uses the IF4p5
fronthaul protocol to achieve the communication.
> Context: oaisim used to be a simulation mode inside OAI to emulate an eNB and
Context: oaisim used to be a simulation mode inside OAI to emulate an eNB and
multiple UEs.
[[_TOC_]]
## Build
# Build
Build eNB/UE as normal, as also described in [How to build the eNB and the UE](../BUILD.md):
Build eNB/UE as normal, as also described in [How to build the eNB and the UE](./BUILD.md):
```bash
./build_oai -c --ninja --eNB --UE
```
## How to run an eNB with the noS1 option
# How to run an eNB with the noS1 option
The following paragraph(s) explains how to run the L1 simulator in noS1 mode and using the oai kernel modules.
@@ -37,7 +48,7 @@ $ cd ../ran_build/build
$ sudo -E ./lte-softmodem -O YYY.conf --noS1
```
## How to run a UE with the noS1 option
# How to run a UE with the noS1 option
Similarly modify the example configuration file in `/openairinterface5g/ci-scripts/conf_files/rru.band7.nos1.simulator.conf` and replace loopback interface and IP addresses. Copy your modifications to a new file, let's call XXX.conf the resulting configuration file.
@@ -53,7 +64,7 @@ $ sudo ./lte-uesoftmodem -O XXX.conf -r 25 --siml1 --noS1
That should give you equivalent functionality to what you had with oaisim including noise and RF channel emulation (path loss / fading, etc.). You should also be able to run multiple UEs.
## How to ping an eNB from a UE and vice versa (with the noS1 option)
# How to ping an eNB from a UE and vice versa (with the noS1 option)
Once your eNB and UE (built with the noS1 option) are running and synchronised, you can ping the eNB from the UE with the following command:

View File

@@ -1,4 +1,16 @@
# L2 nFAPI Simulator Usage
<table style="border-collapse: collapse; border: none;">
<tr style="border-collapse: collapse; border: none;">
<td style="border-collapse: collapse; border: none;">
<a href="http://www.openairinterface.org/">
<img src="./images/oai_final_logo.png" alt="" border=3 height=50 width=150>
</img>
</a>
</td>
<td style="border-collapse: collapse; border: none; vertical-align: center;">
<b><font size = "5">L2 nFAPI Simulator Usage</font></b>
</td>
</tr>
</table>
## 4G L2 nFAPI simulator
@@ -6,11 +18,11 @@ This simulator allows to test L2 and above Layers using the nFAPI interface.
The UE executable is able to "simulate" multiple UEs in order to stimulate the scheduler in the eNB.
> **This simulator is available starting the `v1.0.0` release on the `master` branch.**
**This simulator is available starting the `v1.0.0` release on the `master` branch.**
> **2022/03/08: CAUTION, THIS TUTORIAL IS NO LONGER VALID on the `develop` branch after the `2022.w01` tag.**
**2022/03/08: CAUTION, THIS TUTORIAL IS NO LONGER VALID on the `develop` branch after the `2022.w01` tag.**
> **2022/03/08: CAUTION, THE LAST VALID TAG on `develop` branch is `2021.w51_c`.**
**2022/03/08: CAUTION, THE LAST VALID TAG on `develop` branch is `2021.w51_c`.**
Currently the Continuous Integration process is validating this simulator the following way:
@@ -26,12 +38,11 @@ Normally it should be fine to run both executables on the same host using the `l
2. [No S1 -- eNB and UE on 2 hosts](L2NFAPI_NOS1.md)
> **2022/03/08: Starting the `2022.w01` tag on the `develop` branch, the L2 nFAPI simulation is using a proxy.**
**2022/03/08: Starting the `2022.w01` tag on the `develop` branch, the L2 nFAPI simulation is using a proxy.**
## 5G L2 nFAPI simulator
> **Note:**
> **L2 simulator does not work anymore.**
**Note: L2 simulator does not work anymore.**
### Download and Build the Proxy Server (from EpiSci)

View File

@@ -1,14 +1,26 @@
# L2 nFAPI Simulator (no S1 Mode / 2-host deployment)
<table style="border-collapse: collapse; border: none;">
<tr style="border-collapse: collapse; border: none;">
<td style="border-collapse: collapse; border: none;">
<a href="http://www.openairinterface.org/">
<img src="./images/oai_final_logo.png" alt="" border=3 height=50 width=150>
</img>
</a>
</td>
<td style="border-collapse: collapse; border: none; vertical-align: center;">
<b><font size = "5">L2 nFAPI Simulator (no S1 Mode / 2-host deployment)</font></b>
</td>
</tr>
</table>
> **2022/03/08: CAUTION, THIS TUTORIAL IS NO LONGER VALID on the `develop` branch after the `2022.w01` tag.**
**2022/03/08: CAUTION, THIS TUTORIAL IS NO LONGER VALID on the `develop` branch after the `2022.w01` tag.**
> **2022/03/08: CAUTION, THE LAST VALID TAG on `develop` branch is `2021.w51_c`.**
**2022/03/08: CAUTION, THE LAST VALID TAG on `develop` branch is `2021.w51_c`.**
**Table of Contents**
[[_TOC_]]
## 1. Environment
# 1. Environment #
You may not have access to an EPC or you don't want to hassle to deploy one.
@@ -19,11 +31,11 @@ You may not have access to an EPC or you don't want to hassle to deploy one.
Example of L2 nFAPI Simulator testing environment:
![L2-sim-noS1-2-host-deployment](../images/L2-sim-noS1-2-host-deployment.png)
<img src="./images/L2-sim-noS1-2-host-deployment.png" alt="" border=3>
> Note that the IP addresses are indicative and need to be adapted to your environment.
Note that the IP addresses are indicative and need to be adapted to your environment.
## 2. Retrieve the OAI eNB-UE source code
# 2. Retrieve the OAI eNB-UE source code #
At the time of writing, the tag used in the `develop` branch to do this documentation was `2020.w16`.
@@ -45,7 +57,7 @@ cd ue_folder
git checkout develop
```
## 3. Setup of the USIM information in UE folder
# 3. Setup of the USIM information in UE folder #
```bash
$ ssh sudousername@machineC
@@ -101,11 +113,11 @@ UE1: // <- Edit here
You can repeat the operation for as many users you want to test with.
## 4. Setup of the Configuration files
# 4. Setup of the Configuration files #
> **CAUTION: both proposed configuration files resides in the ci-scripts realm. You can copy them but you CANNOT push any modification on these 2 files as part of an MR without informing the CI team.**
**CAUTION: both proposed configuration files resides in the ci-scripts realm. You can copy them but you CANNOT push any modification on these 2 files as part of an MR without informing the CI team.**
### 4.1. The eNB Configuration file
## 4.1. The eNB Configuration file ##
```bash
$ ssh sudousername@machineB
@@ -131,8 +143,7 @@ MACRLCs = (
);
```
If you are testing more than 16 UEs, a proper setting on the RUs is necessary.
> **Note that this part is NOT present in the original configuration file**.
If you are testing more than 16 UEs, a proper setting on the RUs is necessary. **Note that this part is NOT present in the original configuration file**.
```
RUs = (
@@ -167,7 +178,7 @@ Last, the S1 interface shall be properly set.
};
```
### 4.2. The UE Configuration file
## 4.2. The UE Configuration file ##
```bash
$ ssh sudousername@machineB
@@ -192,11 +203,11 @@ L1s = (
);
```
## 5. Build OAI UE and eNodeB
# 5. Build OAI UE and eNodeB #
See [Build documentation](../BUILD.md).
See [Build documentation](./BUILD.md).
## 6. Start the eNB
# 6. Start the eNB #
In the first terminal (the one you used to build the eNB):
@@ -218,7 +229,7 @@ If you don't use redirection, you can test but many logs are printed on the cons
We do recommend the redirection in steady mode once your setup is correct.
## 7. Start the UE
# 7. Start the UE #
In the second terminal (the one you used to build the UE):
@@ -268,7 +279,7 @@ oaitun_uem1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-
Having the 4 oaitun_ue tunnel interfaces up and with an allocated address means the connection with EPC went alright.
## 8. Test with ping
# 8. Test with ping #
In a third terminal, after around 10 seconds, the UE(s) shall be connected to the eNB: Check with ifconfig
@@ -308,15 +319,15 @@ $ ssh sudousername@machineC
iperf -c 10.0.1.1 -u -t 30 -b 2M -i 1 -fm -B 10.0.1.2 -p 5002
```
## 9. Limitations
# 9. Limitations #
----
[oai wiki home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home)
[oai softmodem features](../setup/FEATURE_SET.md)
[oai softmodem features](FEATURE_SET.md)
[oai softmodem build procedure](../BUILD.md)
[oai softmodem build procedure](BUILD.md)
[L2 nfapi simulator](L2NFAPI.md)

View File

@@ -1,14 +1,26 @@
# L2 nFAPI Simulator (with S1 / 2-host deployment)
<table style="border-collapse: collapse; border: none;">
<tr style="border-collapse: collapse; border: none;">
<td style="border-collapse: collapse; border: none;">
<a href="http://www.openairinterface.org/">
<img src="./images/oai_final_logo.png" alt="" border=3 height=50 width=150>
</img>
</a>
</td>
<td style="border-collapse: collapse; border: none; vertical-align: center;">
<b><font size = "5">L2 nFAPI Simulator (with S1 / 2-host deployment)</font></b>
</td>
</tr>
</table>
> **2022/03/08: CAUTION, THIS TUTORIAL IS NO LONGER VALID on the `develop` branch after the `2022.w01` tag.**
**2022/03/08: CAUTION, THIS TUTORIAL IS NO LONGER VALID on the `develop` branch after the `2022.w01` tag.**
> **2022/03/08: CAUTION, THE LAST VALID TAG on `develop` branch is `2021.w51_c`.**
**2022/03/08: CAUTION, THE LAST VALID TAG on `develop` branch is `2021.w51_c`.**
**Table of Contents**
[[_TOC_]]
## 1. Environment
# 1. Environment #
3 servers are used in this deployment. You can use Virtual Machines instead of each server; like it is done in the CI process.
@@ -18,17 +30,17 @@
Example of L2 nFAPI Simulator testing environment:
![L2-sim-S1-3-host-deployment](../images/L2-sim-S1-3-host-deployment.png)
<img src="./images/L2-sim-S1-3-host-deployment.png" alt="" border=3>
> Note that the IP addresses are indicative and need to be adapted to your environment.
Note that the IP addresses are indicative and need to be adapted to your environment.
## 2. Prepare the EPC
# 2. Prepare the EPC #
Create the environment for the EPC and register all **USIM** information into the **HSS** database.
If you are using OAI-EPC ([see on GitHub](https://github.com/OPENAIRINTERFACE/openair-epc-fed)), build **HSS/MME/SPGW** and create config files.
## 3. Retrieve the OAI eNB-UE source code
# 3. Retrieve the OAI eNB-UE source code #
At the time of writing, the tag used in the `develop` branch to do this documentation was `2020.w16`.
@@ -50,7 +62,7 @@ cd ue_folder
git checkout develop
```
## 4. Setup of the USIM information in UE folder
# 4. Setup of the USIM information in UE folder #
```bash
$ ssh sudousername@machineC
@@ -106,11 +118,11 @@ UE1: // <- Edit here
You can repeat the operation for as many users you want to test with.
## 5. Setup of the Configuration files
# 5. Setup of the Configuration files #
> **CAUTION: both proposed configuration files resides in the ci-scripts realm. You can copy them but you CANNOT push any modification on these 2 files as part of an MR without informing the CI team.**
**CAUTION: both proposed configuration files resides in the ci-scripts realm. You can copy them but you CANNOT push any modification on these 2 files as part of an MR without informing the CI team.**
### 5.1. The eNB Configuration file
## 5.1. The eNB Configuration file ##
```bash
$ ssh sudousername@machineB
@@ -136,8 +148,7 @@ MACRLCs = (
);
```
If you are testing more than 16 UEs, a proper setting on the RUs is necessary.
> **Note that this part is NOT present in the original configuration file**.
If you are testing more than 16 UEs, a proper setting on the RUs is necessary. **Note that this part is NOT present in the original configuration file**.
```
RUs = (
@@ -172,7 +183,7 @@ Last, the S1 interface shall be properly set.
};
```
### 5.2. The UE Configuration file
## 5.2. The UE Configuration file ##
```bash
$ ssh sudousername@machineB
@@ -197,11 +208,11 @@ L1s = (
);
```
## 6. Build OAI UE and eNodeB
# 6. Build OAI UE and eNodeB #
See [Build documentation](../BUILD.md).
See [Build documentation](./BUILD.md).
## 7. Start EPC
# 7. Start EPC #
Start the EPC on machine `A`.
@@ -210,7 +221,7 @@ $ ssh sudousername@machineA
# Start the EPC
```
## 8. Start the eNB
# 8. Start the eNB #
In the first terminal (the one you used to build the eNB):
@@ -224,7 +235,7 @@ If you don't use redirection, you can test but many logs are printed on the cons
We do recommend the redirection in steady mode once your setup is correct.
## 9. Start the UE
# 9. Start the UE #
In the second terminal (the one you used to build the UE):
@@ -274,7 +285,7 @@ oaitun_uem1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-
Having the 4 oaitun_ue tunnel interfaces up and with an allocated address means the connection with EPC went alright.
## 10. Test with ping
# 10. Test with ping #
In a third terminal, after around 10 seconds, the UE(s) shall be connected to the eNB: Check with ifconfig
@@ -288,15 +299,15 @@ $ ping -c 20 192.172.0.5
iperf operations can also be performed.
## 11. Limitations
# 11. Limitations #
----
[oai wiki home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home)
[oai softmodem features](../setup/FEATURE_SET.md)
[oai softmodem features](FEATURE_SET.md)
[oai softmodem build procedure](../BUILD.md)
[oai softmodem build procedure](BUILD.md)
[L2 nfapi simulator](L2NFAPI.md)

View File

@@ -1,53 +1,65 @@
# OAI LDPC offload (O-RAN AAL/DPDK BBDEV)
<table style="border-collapse: collapse; border: none;">
<tr style="border-collapse: collapse; border: none;">
<td style="border-collapse: collapse; border: none;">
<a href="http://www.openairinterface.org/">
<img src="./images/oai_final_logo.png" alt="" border=3 height=50 width=150>
</img>
</a>
</td>
<td style="border-collapse: collapse; border: none; vertical-align: center;">
<b><font size = "5">OAI LDPC offload (O-RAN AAL/DPDK BBDEV)</font></b>
</td>
</tr>
</table>
**Table of Contents**
[[_TOC_]]
This documentation describes the integration of LDPC coding for lookaside acceleration using O-RAN AAL/DPDK BBDEV in OAI, along with its usage.
For details on the implementation, please consult the [developer notes](../../openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_aal/README.md).
For details on the implementation, please consult the [developer notes](../openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_aal/README.md).
## Requirements
# Requirements
In principle, any lookaside LDPC accelerator supporting the O-RAN AAL/DPDK BBDEV should work.
However, the current implementation has only been validated for the Xilinx T2, Intel ACC100, and Intel ACC200 (VRB1).
Therefore, your mileage may vary when using other BBDEV devices as there may be some hardware-specific changes required -- contributions are welcome!
### DPDK Version Requirements
## DPDK Version Requirements
The following DPDK versions are supported:
- For the Xilinx T2 card, DPDK20.11+ is supported.
- As for the Intel ACC100/ACC200, only DPDK22.11+ is supported.
### Tested Devices/ DPDK versions
## Tested Devices/ DPDK versions
#### Xilinx T2
### Xilinx T2
- DPDK20.11.9*.
- DPDK22.11.7*.
> Note: FPGA bitstream image and the corresponding patch file (e.g., `ACCL_BBDEV_DPDK20.11.3_ldpc_3.1.918.patch` for DPDK20.11) from Accelercomm required.
#### Intel ACC100
### Intel ACC100
- DPDK22.11.7*.
- DPDK23.11.3*.
- DPDK24.11.2.
> Note: [Patch](https://github.com/DPDK/dpdk/commit/fdde63a1dfc129d0a510a831aa98253b36a2a1cd) required for pre-DPDK24.11 versions when using the Intel ACC100.
> Note: [Patch]((https://github.com/DPDK/dpdk/commit/fdde63a1dfc129d0a510a831aa98253b36a2a1cd)) required for pre-DPDK24.11 versions when using the Intel ACC100.
#### Intel ACC200 (also known as VRB1)
### Intel ACC200 (also known as VRB1)
- DPDK22.11.7.
- DPDK23.11.3.
- DPDK24.11.2.
## System Setup
### DPDK installation
# System Setup
## DPDK installation
> Important:
> - If you are using the Xilinx T2 card, you will need to apply the vendor-supplied patches before compiling DPDK.
> - If you are using the Intel ACC100, you will need to [patch](https://github.com/DPDK/dpdk/commit/fdde63a1dfc129d0a510a831aa98253b36a2a1cd) the ACC100's driver if you are using DPDK22.11 or DPDK23.11.
Refer to the guide [here](ORAN_FHI7.2_Tutorial.md?ref_type=heads#dpdk-data-plane-development-kit) to install, and then validate your DPDK installation.
Refer to the guide [here](./ORAN_FHI7.2_Tutorial.md?ref_type=heads#dpdk-data-plane-development-kit) to install, and then validate your DPDK installation.
<details open>
<summary> Notes on DPDK patching/installation for Xilinx T2. </summary>
@@ -77,9 +89,9 @@ sudo ldconfig
```
</details>
### System configuration
## System configuration
#### Setting up Hugepages
### Setting up Hugepages
First, we must setup hugepages on the system.
In our setup, we setup 16 of the 1G hugepages.
@@ -89,7 +101,7 @@ Apart from 1G, 2MB hugepages works too, but make sure to allocate a sufficient n
# sudo dpdk-hugepages.py -p 1G --setup 16G
```
#### Locating the Accelerator
### Locating the Accelerator
Next, we check whether our system can detect our accelerator using `dpdk-devbind.py`.
You should see Baseband devices detected by DPDK, as follows:
@@ -105,14 +117,14 @@ Baseband devices using DPDK-compatible driver
As you can see here, our Intel ACC200 has the address of `0000:f7:00.0`.
Depending on the accelerator you are using, the address may vary.
#### Loading VFIO-PCI and enabling SR-IOV
### Loading VFIO-PCI and enabling SR-IOV
Following, make sure to load the `vfio-pci` kernel modules and ensure that SR-IOV is enabled.
```
# sudo modprobe vfio-pci enable_sriov=1 disable_idle_d3=1
```
#### Binding the Accelerator with `vfio-pci`
### Binding the Accelerator with `vfio-pci`
Lastly, we bind our accelerator with the `vfio-pci` driver.
```
@@ -122,7 +134,7 @@ Lastly, we bind our accelerator with the `vfio-pci` driver.
> Note: For the Xilinx T2, we can use this device directly.
If you use an Intel vRAN accelerator, read on.
#### Additional Steps for Intel vRAN Accelerators
### Additional Steps for Intel vRAN Accelerators
> IMPORTANT NOTE:
> - Currently, we only support using the Virtual Functions (VFs) of the Intel vRAN accelerators, but not the Physical Function (PF).
@@ -130,7 +142,7 @@ If you use an Intel vRAN accelerator, read on.
If you are using an Intel vRAN accelerator, you will need to use the [pf_bb_config](https://github.com/intel/pf-bb-config) tool to configure the accelerator beforehand.
##### pf_bb_config
#### pf_bb_config
For more details, please consult the `pf_bb_config` README.
```
@@ -152,7 +164,7 @@ VRB1 PF [0000:f7:00.0] configuration complete!
Log file = /var/log/pf_bb_cfg_0000:f7:00.0.log
```
##### Creating VFs
#### Creating VFs
Finally, we create the VF(s) for our accelerator.
In this example, we only create one SR-IOV VF.
@@ -178,7 +190,7 @@ Baseband devices using DPDK-compatible driver
...
```
## Building OAI with ORAN-AAL
# Building OAI with ORAN-AAL
OTA deployment is precisely described in the following tutorial:
- [NR_SA_Tutorial_COTS_UE](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/doc/NR_SA_Tutorial_COTS_UE.md)
Instead of section *3.2 Build OAI gNB* from the tutorial, run the following commands:
@@ -206,7 +218,7 @@ The selection of the library to compile is done using `--build-lib ldpc_aal`.
> Note: The required DPDK poll mode driver has to be present on the host machine and required DPDK version has to be installed on the host, prior to building OAI.
## O-RAN AAL DPDK EAL parameters
# O-RAN AAL DPDK EAL parameters
To configure O-RAN AAL/DPDK BBDEV, you can set the following parameters via the command line of PHY simulators or nr-softmodem:
> Note: the group parameter name has been renamed from `nrLDPC_coding_t2` to
@@ -242,14 +254,14 @@ loader : {
};
```
## Running OAI with O-RAN AAL
# Running OAI with O-RAN AAL
In general, to offload of the channel coding to the LDPC accelerator, we use use the `--loader.ldpc.shlibversion _aal` option.
Reminder, if you are using the Xilinx T2 card, make sure to set `--nrLDPC_coding_aal.is_t2 1`.
### 5G PHY simulators
## 5G PHY simulators
#### nr_ulsim
### nr_ulsim
Example command:
```bash
@@ -258,7 +270,7 @@ source oaienv
cd cmake_targets/ran_build/build
sudo ./nr_ulsim -n100 -s20 -m20 -r273 -R273 --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev 0000:f7:00.1 --nrLDPC_coding_aal.dpdk_core_list 0-1 --nrLDPC_coding_aal.vfio_vf_token 00112233-4455-6677-8899-aabbccddeeff
```
#### nr_dlsim
### nr_dlsim
Example command:
```bash
@@ -268,9 +280,9 @@ cd cmake_targets/ran_build/build
sudo ./nr_dlsim -n300 -s30 -R 106 -e 27 --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev 0000:f7:00.1 --nrLDPC_coding_aal.dpdk_core_list 0-1 --nrLDPC_coding_aal.vfio_vf_token 00112233-4455-6677-8899-aabbccddeeff
```
### OTA test
## OTA test
#### Running OAI gNB with USRP B210/FHI72
### Running OAI gNB with USRP B210/FHI72
When running the gNB **with FHI 7.2**, it is not necessary to provide the `--nrLDPC_coding_aal.dpdk_core_list` argument
since the core list specified for FHI 7.2 will be used for DPDK.
@@ -284,9 +296,9 @@ cd cmake_targets/ran_build/build
sudo ./nr-softmodem -O ~/gnb.conf --loader.ldpc.shlibversion _aal --nrLDPC_coding_aal.dpdk_dev 0000:f7:00.1 --nrLDPC_coding_aal.dpdk_core_list 14-15 --nrLDPC_coding_aal.vfio_vf_token 00112233-4455-6677-8899-aabbccddeeff
```
## Known Issue(s)
# Known Issue(s)
### Potential Low Throughput
## Potential Low Throughput
The current implementation has been tested to work in an end-to-end setup and is functional.
However, depending on the accelerator in use,

View File

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@@ -4,7 +4,7 @@ out the various configuration options that influence its behavior.
[[_TOC_]]
## General
# General
The 5G MAC scheduler is a proportional fair (PF) scheduler, "approximating
wide-band CQI" (for lack of a better term, but CQI is typically used for PF)
@@ -179,10 +179,11 @@ In the last lines:
## Split-related options (running in a DU)
See [nFAPI documentation](../L1_L2/nfapi.md) or [Aerial tutorial](../tutorials/Aerial_FAPI_Split_Tutorial.md) for information about the (n)FAPI
See [nFAPI documentation](../nfapi.md) or [Aerial
tutorial](../Aerial_FAPI_Split_Tutorial.md) for information about the (n)FAPI
split.
See [F1 documentation](../F1AP/F1-design.md) for information about the F1 split.
See [F1 documentation](../F1-design.md) for information about the F1 split.
## MAC scheduler-related configuration options
@@ -225,7 +226,7 @@ In the `MACRLCs` section of the gNB/DU configuration file:
* `identity_precoding_matrix` (default 0=false): flag to enable to use only
the identity precoding matrix in DL precoding
* `set_analog_beamforming` (default 0=false): flag to enable analog
beamforming (for more information [`analog_beamforming.md`](../tutorials/analog_beamforming.md))
beamforming (for more information [`analog_beamforming.md`](../analog_beamforming.md))
* `beam_duration` (default 1): duration/number of consecutive slots for a given set of
beams, depending on hardware switching performance
* `beams_per_period` (default 1): set of beams that can be simultaneously allocated in a
@@ -243,11 +244,11 @@ SIBs are configured at the DU and some at the CU; please consult the [RRC
configuration](../RRC/rrc-usage.md) as well for SIB configuration.
* `pdsch_AntennaPorts_XP` (default 1): number of XP logical antenna
ports in PDSCH (see also [`RUNMODEM.md`](../usage/RUNMODEM.md))
ports in PDSCH (see also [`RUNMODEM.md`](../RUNMODEM.md))
* `pdsch_AntennaPorts_N1` (default 1): number of horizontal logical antenna
ports in PDSCH (see also [`RUNMODEM.md`](../usage/RUNMODEM.md))
ports in PDSCH (see also [`RUNMODEM.md`](../RUNMODEM.md))
* `pdsch_AntennaPorts_N2` (default 1): number of vertical logical antenna
ports in PDSCH (see also [`RUNMODEM.md`](../usage/RUNMODEM.md))
ports in PDSCH (see also [`RUNMODEM.md`](../RUNMODEM.md))
* `pusch_AntennaPorts` (default 1): number of antenna ports in PUSCH
* `maxMIMO_layers` (default -1=unlimited): maximum number of MIMO layers to use
in downlink
@@ -268,7 +269,7 @@ configuration](../RRC/rrc-usage.md) as well for SIB configuration.
* `force_UL256qam_off` (default 0=false): flag whether to disable 256QAM (limit to
64QAM) in DL
* `disable_harq` (default 0=false): flag whether to disable HARQ completely
(useful for NTN operation, see <../usage/RUNMODEM.md>). **this is a Rel-17 feature
(useful for NTN operation, see <../RUNMODEM.md>). **this is a Rel-17 feature
and you need to have a capable UE for this**
* `use_deltaMCS` (default 0=false): flag whether to enable deltaMCS (**this is not fully tested
and might not work** and you might need to adjust other parameters such as
@@ -290,7 +291,7 @@ configuration](../RRC/rrc-usage.md) as well for SIB configuration.
DL-MIMO is configured using following parameters:
`pdsch_AntennaPorts_XP` , `pdsch_AntennaPorts_N1` , `pdsch_AntennaPorts_N2`, `maxMIMO_layers`
(see also [`RUNMODEM.md`](../usage/RUNMODEM.md))
(see also [`RUNMODEM.md`](../RUNMODEM.md))
## ServingCellConfigCommon parameters
@@ -307,7 +308,7 @@ Below is a description of some of these parameters.
There are many parameters, such as `absoluteFrequencySSB`, etc., that have an
impact on the frequency used by the gNB. For more information, please check the
[corresponding document](../setup/gNB_frequency_setup.md).
[corresponding document](../gNB_frequency_setup.md).
### TDD pattern configuration
@@ -335,7 +336,7 @@ Configure the TDD pattern through these options:
As an example, the below figure shows a single TDD pattern, consisting of 3 DL
slots, 1 mixed slots (with 10 DL, 2 guard, 2 UL symbols), and 1 UL slot.
![TDD Frame Structure](images/TDD_Frame_Structure.png)
![TDD Frame Structure](TDD_Frame_Structure.png)
To configure this pattern in the configuration file, use

View File

@@ -4,18 +4,18 @@ Their internal processing is broadly independent on which transport mechanism
is responsible for exchanging data between the 2 components.
To read more about the transport mechanisms available, and how to run the split, please refer to
[this file](../L1_L2/nfapi.md).
[this file](./nfapi.md).
[[_TOC_]]
# VNF/PNF Split
The gNB is split into `VNF(L2+)` and `PNF(L1)`
The gNB is split into VNF(L2+) and PNF(L1)
These component are configured via the functions:
- `configure_nr_nfapi_vnf()`
- `configure_nr_nfapi_pnf()`
- configure_nr_nfapi_vnf()
- configure_nr_nfapi_pnf()
These functions initialize the configuration appropriate for the transport mechanism selected ( setting the
pack/unpack function pointers, as well as the appropriate send functions )
@@ -25,7 +25,7 @@ After this, a thread is created for the P5 receive loop, which initializes the t
This created thread may be only for P5 messages, or P5 and P7, depending on the transport type
- When using socket-based communication (which uses nFAPI encoding), the receiving loop for P7 messages is separate from
P5, it starts upon the `PNF_START` exchange
P5, it starts upon the PNF_START exchange
- In the other transport mechanisms (WLS and nvIPC, which use FAPI encoding), the receiving loop is the same for P5 and
P7 messages, the P7 configuration is done immediately after the P5 configuration.
@@ -40,8 +40,8 @@ them
Upon the reception of a message (whether in its entirety or segmented in the case of nFAPI), the messages are sent to
the appropriate handler:
- `pnf_nr_handle_p5_message`
- `vnf_nr_handle_p4_p5_message`
- pnf_nr_handle_p5_message
- vnf_nr_handle_p4_p5_message
In each of these functions, there's a switch calling the appropriate handler according to the message ID, for example:
@@ -55,19 +55,18 @@ These loops are autonomous in their thread waiting incoming message.
## P7 interface main loop
> Note
> As explained before, the P7 reception loop is the same as the P5 messages when not using socket-based
- Note: As explained before, the P7 reception loop is the same as the P5 messages when not using socket-based
communication
In this case, when the P5 interface receives appropriate message, it starts the p7 interface by launching a thread
- On the PNF, this is done in the START.request handler ( `nr_start_request(...)` )
- On the VNF, this is done in ( `configure_nr_p7_vnf(...)` )
- On the PNF, this is done in the START.request handler ( nr_start_request(...) )
- On the VNF, this is done in ( configure_nr_p7_vnf(...) )
Much in the same way as when processing P5 messages, the following functions are called to unpack and process them:
- `pnf_nr_handle_p7_message`
- `vnf_nr_handle_p7_message`
- pnf_nr_handle_p7_message
- vnf_nr_handle_p7_message
```
case NFAPI_NR_PHY_MSG_TYPE_SLOT_INDICATION:
@@ -78,11 +77,11 @@ case NFAPI_NR_PHY_MSG_TYPE_SLOT_INDICATION:
## P7 UL transmission by PNF
RF samples are received, and decoding is done by the PNF using control data transmitted by the VNF to the PNF through
downlink p7 messages (`UL_TTI.request` and `UL_DCI.request`).
downlink p7 messages (UL_TTI.request and UL_DCI.request).
After decoding, results are accumulated into the `gNB->UL_INFO` structure at the PNF.
After decoding, results are accumulated into the gNB->UL_INFO structure at the PNF.
The data in the UL_INFO struct is transmitted through the configured send function pointer (`send_p7_msg`), which packs
The data in the UL_INFO struct is transmitted through the configured send function pointer (send_p7_msg), which packs
the message into a buffer according to the encoding and sends it to the VNF
```
@@ -124,7 +123,7 @@ int nfapi_pnf_p7_nr_rach_ind(nfapi_pnf_p7_config_t* config, nfapi_nr_rach_indica
Through the P7 reception loop, the VNF receives a buffer containing the messages, which it handles by the following
process:
- Unpack the header by use of the `hdr_unpack_func` function pointer
- Unpack the header by use of the hdr_unpack_func function pointer
- According to the Message ID in the header, send the buffer to the appropriate handler by use of a switch statement:
```
@@ -134,7 +133,7 @@ process:
```
- In the handler function, unpack the entire message, by using the `unpack_func` function pointer.
- In the handler function, unpack the entire message, by using the unpack_func function pointer.
- If the unpack procedure is successful, call the previously configure callback for that message type:
```
@@ -156,20 +155,20 @@ process:
```
`vnf_nr_dispatch_p7_message()` is the function that contains the switch on various message headers so that the appropriate
vnf_nr_dispatch_p7_message() is the function that contains the switch on various message headers so that the appropriate
unpack function is called.
## P7 DL Transmission by VNF
DL messages are scheduled at the VNF, through `gNB_dlsch_ulsch_scheduler()`. `gNB_dlsch_ulsch_scheduler()` is called when
handling a `SLOT.indication` message in `trigger_scheduler()`.
DL messages are scheduled at the VNF, through gNB_dlsch_ulsch_scheduler(). gNB_dlsch_ulsch_scheduler() is called when
handling a SLOT.indication message in trigger_scheduler().
The function `trigger_scheduler(nfapi_nr_slot_indication_scf_t *slot_ind)` calls the functions `oai_nfapi_[DL P7 msg]_
req()`, calling in turn call the `send_p7_msg` function pointer, which contain the logic to pack the message into a buffer
The function trigger_scheduler(nfapi_nr_slot_indication_scf_t *slot_ind) calls the functions oai_nfapi_[DL P7 msg]_
req(), calling in turn call the send_p7_msg function pointer, which contain the logic to pack the message into a buffer
and send it to the PNF.
Finally, `NR_UL_indication` is called to process the other P7 messages received from the PNF that were put in theire
Finally, NR_UL_indication is called to process the other P7 messages received from the PNF that were put in theire
respective queues.
For example, the `TX_DATA.request` message is sent in the following manner:
For example, the TX_DATA.request message is sent in the following manner:
```
if (g_sched_resp.TX_req.Number_of_PDUs > 0)
@@ -224,13 +223,13 @@ graph TD
## P7 DL Reception at PNF
Through the infinite loop `[while(pnf_p7->terminate == 0)]` running in `pnf_nr_p7_message_pump()`, the PNF receives and
Through the infinite loop [while(pnf_p7->terminate == 0)] running in pnf_nr_p7_message_pump(), the PNF receives and
unpacks the downlink P7 message received on its socket. Based on the unpacked message, the appropriate message
structures are filled in the PNF, and these are used further down the pipeline for processing.
Through the P7 reception loop, the PNF receives a buffer containing a P7 message from the VNF, which it processes the
following way:
- Unpack the header by use of the `hdr_unpack_func` function pointer
- Unpack the header by use of the hdr_unpack_func function pointer
- According to the Message ID in the header, send the buffer to the appropriate handler by use of a switch statement:
```
@@ -260,8 +259,8 @@ following way:
```
- The messages are later processed in the `NR_slot_indication` function, which is called in the `tx_func function (
L1_tx_thread )`
- The messages are later processed in the NR_slot_indication function, which is called in the tx_func function (
L1_tx_thread )
## PNF functional flowchart

View File

@@ -1,10 +1,22 @@
# OAI 5G NR SA tutorial with COTS UE
<table style="border-collapse: collapse; border: none;">
<tr style="border-collapse: collapse; border: none;">
<td style="border-collapse: collapse; border: none;">
<a href="http://www.openairinterface.org/">
<img src="./images/oai_final_logo.png" alt="" border=3 height=50 width=150>
</img>
</a>
</td>
<td style="border-collapse: collapse; border: none; vertical-align: center;">
<b><font size = "5">OAI 5G NR SA tutorial with COTS UE</font></b>
</td>
</tr>
</table>
**Table of Contents**
[[_TOC_]]
## 1. Scenario
# 1. Scenario
In this tutorial we describe how to configure and run a 5G end-to-end setup with OAI CN5G, OAI gNB and COTS UE.
Minimum hardware requirements:
@@ -24,15 +36,15 @@ Minimum hardware requirements:
- Firmware version of Quectel MUST be equal or higher than **RM500QGLABR11A06M4G**
## 2. OAI CN5G
# 2. OAI CN5G
### 2.1 OAI CN5G pre-requisites
## 2.1 OAI CN5G pre-requisites
Please install and configure OAI CN5G as described here:
[OAI CN5G](NR_SA_Tutorial_OAI_CN5G.md)
### 2.2 SIM Card
## 2.2 SIM Card
Program UICC/SIM Card with [Open Cells Project](https://open-cells.com/) programming tool [uicc-v3.3](https://open-cells.com/d5138782a8739209ec5760865b1e53b0/uicc-v3.3.tgz).
```bash
@@ -40,11 +52,11 @@ sudo ./program_uicc --adm 12345678 --imsi 001010000000001 --isdn 00000001 --acc
```
## 3. OAI gNB
# 3. OAI gNB
### 3.1 OAI gNB pre-requisites
## 3.1 OAI gNB pre-requisites
#### Build UHD from source
### Build UHD from source
```bash
# https://files.ettus.com/manual/page_build_guide.html
sudo apt install -y autoconf automake build-essential ccache cmake cpufrequtils doxygen ethtool g++ git inetutils-tools libboost-all-dev libncurses-dev libusb-1.0-0 libusb-1.0-0-dev libusb-dev python3-dev python3-mako python3-numpy python3-requests python3-scipy python3-setuptools python3-ruamel.yaml
@@ -63,7 +75,7 @@ sudo ldconfig
sudo uhd_images_downloader
```
### 3.2 Build OAI gNB
## 3.2 Build OAI gNB
```bash
# Get openairinterface5g source code
@@ -80,42 +92,42 @@ cd ~/openairinterface5g/cmake_targets
./build_oai -w USRP --ninja --gNB -C
```
## 4. Run OAI CN5G and OAI gNB
# 4. Run OAI CN5G and OAI gNB
### 4.1 Run OAI CN5G
## 4.1 Run OAI CN5G
```bash
cd ~/oai-cn5g
docker compose up -d
```
### 4.2 Run OAI gNB
## 4.2 Run OAI gNB
**Note:** From tag `2024.w45`, OAI gNB runs by default in standalone (SA) mode.
In earlier versions the default mode was non-standalone (NSA).
If you are using an earlier version than `2024.w45`, you should add the `--sa` argument to the sample commands below to obtain a correct behavior.
#### USRP B210
### USRP B210
```bash
cd ~/openairinterface5g/cmake_targets/ran_build/build
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf -E --continuous-tx
```
#### USRP N300
### USRP N300
```bash
cd ~/openairinterface5g/cmake_targets/ran_build/build
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.2x2.usrpn300.conf --usrp-tx-thread-config 1
```
#### USRP X300
### USRP X300
```bash
cd ~/openairinterface5g/cmake_targets/ran_build/build
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.2x2.usrpn300.conf --usrp-tx-thread-config 1 -E --continuous-tx
```
## 5. Run UE
### 5.1 Testing with Quectel RM500Q
# 5. Run UE
## 5.1 Testing with Quectel RM500Q
#### 5.1.1 Setup Quectel
### 5.1.1 Setup Quectel
With [PuTTY](https://the.earth.li/~sgtatham/putty/latest/w64/putty.exe), send the following AT commands to the module using a serial interface (ex: COM2) at 115200 bps:
```bash
# MUST be sent at least once everytime there is a firmware upgrade!
@@ -129,7 +141,7 @@ AT+CGPADDR=1
AT+QPING=1,"openairinterface.org"
```
#### 5.1.2 Ping test
### 5.1.2 Ping test
- UE host
```bash
ping 192.168.70.135 -t -S 12.1.1.2
@@ -139,7 +151,7 @@ ping 192.168.70.135 -t -S 12.1.1.2
docker exec -it oai-ext-dn ping 12.1.1.2
```
#### 5.1.3 Downlink iPerf test
### 5.1.3 Downlink iPerf test
- UE host
- Download iPerf for Microsoft Windows from [here](https://iperf.fr/download/windows/iperf-2.0.9-win64.zip).
- Extract to Desktop and run with Command Prompt:
@@ -153,11 +165,11 @@ iperf -s -u -i 1 -B 12.1.1.2
docker exec -it oai-ext-dn iperf -u -t 86400 -i 1 -fk -B 192.168.70.135 -b 100M -c 12.1.1.2
```
## 6. Advanced configurations (optional)
# 6. Advanced configurations (optional)
See also the [dedicated document on performance tuning](../testing/tuning_and_security.md).
See also the [dedicated document on performance tuning](./tuning_and_security.md).
### 6.1 USRP N300 and X300 Ethernet Tuning
## 6.1 USRP N300 and X300 Ethernet Tuning
Please also refer to the official [USRP Host Performance Tuning Tips and Tricks](https://kb.ettus.com/USRP_Host_Performance_Tuning_Tips_and_Tricks) tuning guide.
@@ -179,12 +191,12 @@ sudo sysctl -w net.core.rmem_default=62500000
sudo ethtool -G enp1s0f0 tx 4096 rx 4096
```
### 6.2 Real-time performance workarounds
## 6.2 Real-time performance workarounds
- Enable Performance Mode `sudo cpupower idle-set -D 0`
- If you get real-time problems on heavy UL traffic, reduce the maximum UL MCS using an additional command-line switch: `--MACRLCs.[0].ul_max_mcs 14`.
- You can also reduce the number of LDPC decoder iterations, which will make the LDPC decoder take less time: `--L1s.[0].max_ldpc_iterations 4`.
### 6.3 Uplink issues related with noise on the DC carriers
## 6.3 Uplink issues related with noise on the DC carriers
With devices like the USRP N300 and especially the X300, there is noise in the DC carriers: this can cause uplink PRBs that overlap with the DC carrier to experience interference and increased noise.
@@ -204,7 +216,7 @@ There are two main points to keep in mind:
The option `ul_prbblacklist` is more relevant when using high-bandwidth configurations (e.g., 100 MHz) with devices like the USRP N310 or X310: in this scenarios, `--tune-offset` could not be sufficient to get rid of the noisy PRBs in the center frequency entirely, because it is not possible to shift the DC carriers out of the bandwidth (tune offset shall be smaller than half the bandwidth of the board).
### 6.3.1 Tune offset
## 6.3.1 Tune offset
The value passed to the command line option `--tune-offset <Hz>` will be calling an UHD API. It represents the LO offset frequency in Hz.
The API (tune_request_t class) will send a frequency tuning request (`tx_tune_req`, `rx_tune_req`) to the USRP device, in order to configure the target baseband tx/rx frequency, therefore shifting the tx/rx signal spectrum.
@@ -213,11 +225,11 @@ The value passed to this option should be ideally equal to half the operational
A visual representation of the impact of tune-offset with a 120 MHz bandwidth daughterboard:
![Tune_Offset](../images/USRP_tune_offset.png)
![Tune_Offset](./images/USRP_tune_offset.png)
### 6.3.2 UL PRBs Blacklist
## 6.3.2 UL PRBs Blacklist
To use this option, in the configuration file, e.g. 100 MHz bandwidth setup: `ul_prbblacklist = "135,136,137,138"`.
### 6.4 Lower latency on user plane
## 6.4 Lower latency on user plane
- To lower latency on the user plane, you can force the UE to be scheduled constantly in uplink: `--MACRLCs.[0].ulsch_max_frame_inactivity 0` .

View File

@@ -1,10 +1,22 @@
# OAI 5G NR SA tutorial: setting up OAI CN5G
<table style="border-collapse: collapse; border: none;">
<tr style="border-collapse: collapse; border: none;">
<td style="border-collapse: collapse; border: none;">
<a href="http://www.openairinterface.org/">
<img src="./images/oai_final_logo.png" alt="" border=3 height=50 width=150>
</img>
</a>
</td>
<td style="border-collapse: collapse; border: none; vertical-align: center;">
<b><font size = "5">OAI 5G NR SA tutorial: setting up OAI CN5G</font></b>
</td>
</tr>
</table>
**Table of Contents**
[[_TOC_]]
## 1. Scenario
# 1. Scenario
In this tutorial we describe how to configure and run a 5G end-to-end setup with OAI CN5G, OAI gNB and COTS UE.
Minimum hardware requirements:
@@ -13,9 +25,9 @@ Minimum hardware requirements:
- CPU: 8 cores x86_64 @ 3.5 GHz
- RAM: 32 GB
## 2. OAI CN5G
# 2. OAI CN5G
### 2.1 OAI CN5G pre-requisites
## 2.1 OAI CN5G pre-requisites
```bash
sudo apt install -y git net-tools putty
@@ -35,7 +47,7 @@ sudo usermod -a -G docker $(whoami)
reboot
```
### 2.2 OAI CN5G configuration files
## 2.2 OAI CN5G configuration files
Download and copy configuration files:
```bash
wget -O ~/oai-cn5g.zip https://gitlab.eurecom.fr/oai/openairinterface5g/-/archive/develop/openairinterface5g-develop.zip?path=doc/tutorial_resources/oai-cn5g
@@ -44,31 +56,31 @@ mv ~/openairinterface5g-develop-doc-tutorial_resources-oai-cn5g/doc/tutorial_res
rm -r ~/openairinterface5g-develop-doc-tutorial_resources-oai-cn5g ~/oai-cn5g.zip
```
### 2.3 Pull OAI CN5G docker images
## 2.3 Pull OAI CN5G docker images
```bash
cd ~/oai-cn5g
docker compose pull
```
## 3. Run OAI CN5G
### 3.1 Start OAI CN5G
# 3. Run OAI CN5G
## 3.1 Start OAI CN5G
```bash
cd ~/oai-cn5g
docker compose up -d
```
### 3.2 Stop OAI CN5G
## 3.2 Stop OAI CN5G
```bash
cd ~/oai-cn5g
docker compose down
```
## 4. Run 5G NR SA end-to-end setup with OAI gNB
### 4.1 Testing with COTS UE
# 4. Run 5G NR SA end-to-end setup with OAI gNB
## 4.1 Testing with COTS UE
Please check this link:
[Testing with OAI gNB and COTS UE](NR_SA_Tutorial_COTS_UE.md)
### 4.2 Testing with OAI nrUE
## 4.2 Testing with OAI nrUE
Please check this link:
[Testing with OAI gNB and OAI nrUE](NR_SA_Tutorial_OAI_nrUE.md)

View File

@@ -1,30 +1,42 @@
# OAI 5G NR SA tutorial to deploy multiple OAI nrUE
<table style="border-collapse: collapse; border: none;">
<tr style="border-collapse: collapse; border: none;">
<td style="border-collapse: collapse; border: none;">
<a href="http://www.openairinterface.org/">
<img src="./images/oai_final_logo.png" alt="" border=3 height=50 width=150>
</img>
</a>
</td>
<td style="border-collapse: collapse; border: none; vertical-align: center;">
<b><font size = "5">OAI 5G NR SA tutorial to deploy multiple OAI nrUE</font></b>
</td>
</tr>
</table>
**Table of Contents**
[[_TOC_]]
## Scenario
# Scenario
This tutorial is about how to configure and run multiple OAI nrUE in the same end-to-end OAI 5G setup with RFsimulator.
## Pre-requisites
# Pre-requisites
This tutorial is assuming that OAI CN5G and OAI RAN are already deployed. To learn how to deploy and run a basic setup with OAI nrUE, please refer to [NR_SA_Tutorial_OAI_nrUE.md](NR_SA_Tutorial_OAI_nrUE.md).
Also, it is suggested to get some knowledge on how the channel simulation with OAI RFsimulator works. Please refer to the following documentation to learn about the relevant topics discussed:
- RFsimulator tutorial [rfsimulator/README.md](../../radio/rfsimulator/README.md)
- Channel simulation with OAI [channel_simulation.md](../../openair1/SIMULATION/TOOLS/DOC/channel_simulation.md)
- Telnet server usage [telnetusage.md](../../common/utils/telnetsrv/DOC/telnetusage.md).
- RFsimulator tutorial [rfsimulator/README.md](../radio/rfsimulator/README.md)
- Channel simulation with OAI [channel_simulation.md](../openair1/SIMULATION/TOOLS/DOC/channel_simulation.md)
- Telnet server usage [telnetusage.md](../common/utils/telnetsrv/DOC/telnetusage.md).
## Run multiple UEs in RFsimulator
# Run multiple UEs in RFsimulator
### Multiple nrUEs with namespaces
## Multiple nrUEs with namespaces
Important notes:
* This should be run on the same host as the OAI gNB
* Use the script [multi_ue.sh](../../tools/scripts/multi-ue.sh) to make namespaces for multiple UEs.
* Use the script [multi_ue.sh](../tools/scripts/multi-ue.sh) to make namespaces for multiple UEs.
* For each UE, a namespace shall be created, each one has a different address that will be used as rfsim server address
* Each UE shall have a different IMSI, which shall be present in the relevant tables of the MySQL database
* Each UE shall run a telnet server on a different port, with command line option `--telnetsrv.listenport`
@@ -57,7 +69,7 @@ Important notes:
in the command above, please note that the IMSI and the telnet port changed.
### Running Multiple UEs with Docker
## Running Multiple UEs with Docker
1. Make sure OAI nrUE image is pulled:
@@ -65,7 +77,7 @@ in the command above, please note that the IMSI and the telnet port changed.
docker pull oaisoftwarealliance/oai-nr-ue:latest
```
2. Configure your setup by editing the Docker compose file e.g. in [docker-compose.yaml](../../ci-scripts/yaml_files/5g_rfsimulator/docker-compose.yaml).
2. Configure your setup by editing the Docker compose file e.g. in [docker-compose.yaml](../ci-scripts/yaml_files/5g_rfsimulator/docker-compose.yaml).
3. Deploy the UEs, e.g. for 3 UEs:
@@ -98,10 +110,10 @@ in the command above, please note that the IMSI and the telnet port changed.
docker compose down -v
```
## Further reading
# Further reading
For more details and scenarios, refer to the following files:
* [RFSIM deployment in the CI](../../ci-scripts/yaml_files/5g_rfsimulator/README.md)
* [E1 deployment in the CI](../../ci-scripts/yaml_files/5g_rfsimulator_e1/README.md)
* [Docker documentation](../../docker/README.md)
* [RFSIM deployment in the CI](../ci-scripts/yaml_files/5g_rfsimulator/README.md)
* [E1 deployment in the CI](../ci-scripts/yaml_files/5g_rfsimulator_e1/README.md)
* [Docker documentation](../docker/README.md)

View File

@@ -1,10 +1,22 @@
# OAI 5G NR SA tutorial with OAI nrUE
<table style="border-collapse: collapse; border: none;">
<tr style="border-collapse: collapse; border: none;">
<td style="border-collapse: collapse; border: none;">
<a href="http://www.openairinterface.org/">
<img src="./images/oai_final_logo.png" alt="" border=3 height=50 width=150>
</img>
</a>
</td>
<td style="border-collapse: collapse; border: none; vertical-align: center;">
<b><font size = "5">OAI 5G NR SA tutorial with OAI nrUE</font></b>
</td>
</tr>
</table>
**Table of Contents**
[[_TOC_]]
## 1. Scenario
# 1. Scenario
In this tutorial we describe how to configure and run a 5G end-to-end setup with OAI CN5G, OAI gNB and OAI nrUE.
Minimum hardware requirements:
@@ -20,19 +32,19 @@ Minimum hardware requirements:
- Please identify the network interface(s) on which the USRP is connected and update the gNB configuration file
## 2. OAI CN5G
# 2. OAI CN5G
### 2.1 OAI CN5G pre-requisites
## 2.1 OAI CN5G pre-requisites
Please install and configure OAI CN5G as described here:
[OAI CN5G](NR_SA_Tutorial_OAI_CN5G.md)
## 3. OAI gNB and OAI nrUE
# 3. OAI gNB and OAI nrUE
### 3.1 OAI gNB and OAI nrUE pre-requisites
## 3.1 OAI gNB and OAI nrUE pre-requisites
#### Build UHD from source
### Build UHD from source
```bash
# https://files.ettus.com/manual/page_build_guide.html
sudo apt install -y autoconf automake build-essential ccache cmake cpufrequtils doxygen ethtool g++ git inetutils-tools libboost-all-dev libncurses-dev libusb-1.0-0 libusb-1.0-0-dev libusb-dev python3-dev python3-mako python3-numpy python3-requests python3-scipy python3-setuptools python3-ruamel.yaml
@@ -51,7 +63,7 @@ sudo ldconfig
sudo uhd_images_downloader
```
### 3.2 Build OAI gNB and OAI nrUE
## 3.2 Build OAI gNB and OAI nrUE
```bash
# Get openairinterface5g source code
@@ -71,59 +83,59 @@ cd ~/openairinterface5g/cmake_targets
./build_oai -w USRP --ninja --nrUE --gNB --build-lib "nrscope" -C
```
## 4. Run OAI CN5G and OAI gNB
# 4. Run OAI CN5G and OAI gNB
### 4.1 Run OAI CN5G
## 4.1 Run OAI CN5G
```bash
cd ~/oai-cn5g
docker compose up -d
```
### 4.2 Run OAI gNB
## 4.2 Run OAI gNB
**Note:** From tag `2024.w45`, OAI gNB runs by default in standalone (SA) mode.
In earlier versions the default mode was non-standalone (NSA).
If you are using an earlier version than `2024.w45`, you should add the `--sa` argument to the sample commands below to obtain a correct behavior.
#### USRP B210
### USRP B210
```bash
cd ~/openairinterface5g/cmake_targets/ran_build/build
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf --gNBs.[0].min_rxtxtime 6 -E --continuous-tx
```
#### USRP N300
### USRP N300
```bash
cd ~/openairinterface5g/cmake_targets/ran_build/build
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.2x2.usrpn300.conf --gNBs.[0].min_rxtxtime 6 --usrp-tx-thread-config 1
```
#### USRP X300
### USRP X300
```bash
cd ~/openairinterface5g/cmake_targets/ran_build/build
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.2x2.usrpn300.conf --gNBs.[0].min_rxtxtime 6 --usrp-tx-thread-config 1 -E --continuous-tx
```
#### RFsimulator
### RFsimulator
```bash
cd ~/openairinterface5g/cmake_targets/ran_build/build
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf --gNBs.[0].min_rxtxtime 6 --rfsim
```
#### RFsimulator in FR2
### RFsimulator in FR2
```bash
cd ~/openairinterface5g/cmake_targets/ran_build/build
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band257.u3.32prb.usrpx410.conf --rfsim
```
## 5. OAI UE
# 5. OAI UE
### 5.1 Run OAI nrUE
## 5.1 Run OAI nrUE
**Note:** From tag `2024.w45`, OAI nrUE runs by default in standalone (SA) mode.
In earlier versions the default mode was non-standalone (NSA).
If you are using an earlier version than `2024.w45`, you should add the `--sa` argument to the sample commands below to obtain a correct behavior.
#### USRP B210
### USRP B210
Important notes:
- This should be run in a second Ubuntu 22.04 host, other than gNB
- It only applies when running OAI gNB with USRP B210
@@ -134,7 +146,7 @@ cd ~/openairinterface5g/cmake_targets/ran_build/build
sudo ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --ue-fo-compensation -E --uicc0.imsi 001010000000001
```
#### RFsimulator
### RFsimulator
Important notes:
- This should be run on the same host as the OAI gNB
- It only applies when running OAI gNB with RFsimulator
@@ -145,7 +157,7 @@ cd ~/openairinterface5g/cmake_targets/ran_build/build
sudo ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --uicc0.imsi 001010000000001 --rfsim
```
#### RFsimulator in FR2
### RFsimulator in FR2
Important notes:
- This should be run on the same host as the OAI gNB
- It only applies when running OAI gNB with RFsimulator in FR2
@@ -156,11 +168,11 @@ cd ~/openairinterface5g/cmake_targets/ran_build/build
sudo ./nr-uesoftmodem -r 32 --numerology 3 --band 257 -C 27533280000 --uicc0.imsi 001010000000001 --ssb 72 --rfsim
```
#### Connection to an NG-Core
### Connection to an NG-Core
A configuration file can be fed to the nrUE command line in order to connect to the local NGC.
The nrUE configuration file (e.g. [ue.conf](../../targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.conf)) is structured in a key-value format and contains the relevant UICC parameters that are necessary to authenticate the UE to the local 5GC. E.g.:
The nrUE configuration file (e.g. [ue.conf](../targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.conf)) is structured in a key-value format and contains the relevant UICC parameters that are necessary to authenticate the UE to the local 5GC. E.g.:
```shell
uicc0 = {
@@ -189,21 +201,21 @@ sudo ./nr-uesoftmodem --rfsim --rfsimulator.serveraddr 127.0.0.1 -r 106 --numero
```
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).
More details available 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).
If you are using an earlier version than `2024.w45`, you should add the `--sa` argument to the sample commands above to obtain a correct behavior.
### 5.2 End-to-end connectivity test
## 5.2 End-to-end connectivity test
- Ping test from the UE host to the CN5G
```bash
ping 192.168.70.135 -I oaitun_ue1
```
## 6. Advanced configurations (optional)
# 6. Advanced configurations (optional)
### 6.1 USRP N300 and X300 Ethernet Tuning
## 6.1 USRP N300 and X300 Ethernet Tuning
Please also refer to the official [USRP Host Performance Tuning Tips and Tricks](https://kb.ettus.com/USRP_Host_Performance_Tuning_Tips_and_Tricks) tuning guide.
@@ -225,20 +237,20 @@ sudo sysctl -w net.core.rmem_default=62500000
sudo ethtool -G enp1s0f0 tx 4096 rx 4096
```
### 6.2 Real-time performance workarounds
## 6.2 Real-time performance workarounds
- Enable Performance Mode `sudo cpupower idle-set -D 0`
- If you get real-time problems on heavy UL traffic, reduce the maximum UL MCS using an additional command-line switch: `--MACRLCs.[0].ul_max_mcs 14`.
- You can also reduce the number of LDPC decoder iterations, which will make the LDPC decoder take less time: `--L1s.[0].max_ldpc_iterations 4`.
### 6.3 Uplink issues related with noise on the DC carriers
## 6.3 Uplink issues related with noise on the DC carriers
- There is noise on the DC carriers on N300 and especially the X300 in UL. To avoid their use or shift them away from the center to use more UL spectrum, use the `--tune-offset <Hz>` command line switch, where `<Hz>` is ideally half the bandwidth, or possibly less.
### 6.4 Timing-related Problems
## 6.4 Timing-related Problems
- Sometimes, the nrUE would keep repeating RA procedure because of Msg3 failure at the gNB. If it happens, add the `-A` option at the nrUE and/or gNB side, e.g., `-A 45`. This modifies the timing advance (in samples). Adjust +/-5 if the issue persists.
- This can be necessary since certain USRPs have larger signal delays than others; it is therefore specific to the used USRP model.
- The x310 and B210 are found to work with the default configuration; N310 and x410 can benefit from setting this timing advance.
- For example if the OAI UE uses the X410 and the gNB based on [Nvidia Aerial and Foxconn](Aerial_FAPI_Split_Tutorial.md) a timing advance of 90 has been found to work well.
- For example if the OAI UE uses the X410 and the gNB based on [Nvidia Aerial and Foxconn](./Aerial_FAPI_Split_Tutorial.md) a timing advance of 90 has been found to work well.
### 6.5 Lower latency on user plane
## 6.5 Lower latency on user plane
- To lower latency on the user plane, you can force the UE to be scheduled constantly in uplink: `--MACRLCs.[0].ulsch_max_frame_inactivity 0` .

View File

@@ -1,10 +1,22 @@
# OAI 7.2 Fronthaul Interface 5G SA Tutorial
<table style="border-collapse: collapse; border: none;">
<tr style="border-collapse: collapse; border: none;">
<td style="border-collapse: collapse; border: none;">
<a href="http://www.openairinterface.org/">
<img src="./images/oai_final_logo.png" alt="" border=3 height=50 width=150>
</img>
</a>
</td>
<td style="border-collapse: collapse; border: none; vertical-align: center;">
<b><font size = "5">OAI 7.2 Fronthaul Interface 5G SA Tutorial</font></b>
</td>
</tr>
</table>
**Table of Contents**
[[_TOC_]]
## Prerequisites
# Prerequisites
The hardware on which we have tried this tutorial:
@@ -75,14 +87,14 @@ Tested libxran releases:
**Note**: The libxran driver of OAI identifies the above E release version as "5.1.0" (E is fifth letter, then 1.0), and the above F release as "6.1.0".
### Configure your server
## Configure your server
1. Disable Hyperthreading (HT) in your BIOS. In all our servers HT is always disabled.
2. We recommend you to start with a fresh installation of OS (either RHEL or Ubuntu). You have to install realtime kernel on your OS (Operating System). Based on your OS you can search how to install realtime kernel.
3. Install realtime kernel for your OS
4. Change the boot commands based on the below section. They can be performed either via `tuned` or via manually building the kernel
#### CPU allocation
### CPU allocation
**This section is important to read, regardless of the operating system you are using.**
@@ -125,7 +137,7 @@ tuned-adm profile realtime
**Checkout anyway the examples below.**
#### One NUMA Node
### One NUMA Node
Below is the output of `/proc/cmdline` of a single NUMA node server,
@@ -141,7 +153,7 @@ isolcpus=0-15 nohz_full=0-15 rcu_nocbs=0-15 kthread_cpus=16-31 rcu_nocb_poll nos
Example taken for AMD EPYC 9374F 32-Core Processor
#### Two NUMA Nodes
### Two NUMA Nodes
Below is the output of `/proc/cmdline` of a two NUMA node server,
@@ -158,7 +170,7 @@ mitigations=off usbcore.autosuspend=-1 intel_iommu=on intel_iommu=pt selinux=0 e
Example taken for Intel(R) Xeon(R) Gold 6354 CPU @ 3.00GHz
#### Common
### Common
Configure your servers to maximum performance mode either via OS or in BIOS. If you want to disable CPU sleep state via OS then use the below command:
@@ -175,7 +187,7 @@ The above information we have gathered either from O-RAN documents or via our ow
2. [O-RAN Cloud Platform Reference Designs 2.0,O-RAN.WG6.CLOUD-REF-v02.00,February 2021](https://orandownloadsweb.azurewebsites.net/specifications)
### PTP configuration
## PTP configuration
**Note**: You may run OAI with O-RAN 7.2 Fronthaul without a RU attached (e.g. for benchmarking).
In such case, you can skip PTP configuration and go to DPDK section.
@@ -253,7 +265,7 @@ ExecStart=/usr/sbin/phc2sys $OPTIONS
WantedBy=multi-user.target
```
#### Debugging PTP issues
### Debugging PTP issues
You can see these steps in case your ptp logs have erorrs or `rms` reported in `ptp4l` logs is more than 100ms.
Beware that PTP issues may show up only when running OAI and XRAN. If you are using the `ptp4l` service, have a look back in time in the journal: `journalctl -u ptp4l.service -S <hours>:<minutes>:<seconds>`
@@ -271,7 +283,7 @@ timedatectl | grep NTP
timedatectl set-ntp false
```
### DPDK (Data Plane Development Kit)
## DPDK (Data Plane Development Kit)
Download DPDK version 20.11.9.
@@ -284,7 +296,7 @@ cd
wget http://fast.dpdk.org/rel/dpdk-20.11.9.tar.xz
```
#### DPDK Compilation and Installation
### DPDK Compilation and Installation
```bash
# Installing meson : it should pull ninja-build and compiler packages
@@ -299,7 +311,7 @@ ninja -C build
sudo ninja install -C build
```
#### Verify the installation is complete
### Verify the installation is complete
Check if the LD cache contains the DPDK Shared Objects after update:
@@ -353,7 +365,7 @@ export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib64/pkgconfig/
pkg-config --libs libdpdk --static
```
#### If you want to de-install this version of DPDK
### If you want to de-install this version of DPDK
Go back to the version folder you used to build and install
@@ -362,7 +374,7 @@ cd ~/dpdk-stable-20.11.9
sudo ninja deinstall -C build
```
## Build OAI-FHI gNB
# Build OAI-FHI gNB
Clone OAI code base in a suitable repository, here we are cloning in `~/openairinterface5g` directory,
@@ -371,11 +383,11 @@ git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git ~/openairinterfac
cd ~/openairinterface5g/
```
### Build ORAN Fronthaul Interface Library
## Build ORAN Fronthaul Interface Library
Download ORAN FHI DU library, checkout the correct version, and apply the correct patch (available in `oai_folder/cmake_targets/tools/oran_fhi_integration_patches`).
#### E release
### E release
```bash
git clone https://gerrit.o-ran-sc.org/r/o-du/phy.git ~/phy
cd ~/phy
@@ -383,7 +395,7 @@ git checkout oran_e_maintenance_release_v1.0
git apply ~/openairinterface5g/cmake_targets/tools/oran_fhi_integration_patches/E/oaioran_E.patch
```
#### F release
### F release
```bash
git clone https://gerrit.o-ran-sc.org/r/o-du/phy.git ~/phy
cd ~/phy
@@ -414,7 +426,7 @@ WIRELESS_SDK_TOOLCHAIN=gcc RTE_SDK=~/dpdk-stable-20.11.9/ XRAN_DIR=~/phy/fhi_lib
The shared library object `~/phy/fhi_lib/lib/build/libxran.so` must be present
before proceeding.
### For Arm targets only: Install the Arm RAN Acceleration library
## For Arm targets only: Install the Arm RAN Acceleration library
DU execution on Arm systems is yet not functional.
This feature is intended to enable experiments and future improvements on Arm systems.
@@ -439,7 +451,7 @@ Once ArmRAL is configured at your convenience and built, you can install it:
ninja install
```
### Build OAI gNB
## Build OAI gNB
You can now proceed building OAI. You build it the same way as for other
radios, providing option `-t oran_fhlib_5g`. Additionally, you need to provide
@@ -508,28 +520,28 @@ or with `cmake` like so
cmake .. -GNinja -DOAI_FHI72=ON -Dxran_LOCATION=$HOME/phy/fhi_lib/lib -DOAI_FHI72_USE_POLLING=ON
ninja oran_fhlib_5g
## Configuration
# Configuration
RU and DU configurations have a circular dependency: you have to configure DU MAC address in the RU configuration and the RU MAC address, VLAN and Timing advance parameters in the DU configuration.
**Note**: You may run OAI with O-RAN 7.2 Fronthaul without a RU attached (e.g. for benchmarking).
In such case, skip RU configuration and only configure Network Interfaces, DPDK VFs and OAI configuration by using arbitrary values for RU MAC addresses and VLAN tags.
### Configure the RU
## Configure the RU
Contact the RU vendor and get the configuration manual to understand the below commands. The below configuration only corresponds to the RU firmware version indicated at the start of this document. If your firmware version does not correspond to the indicated version, then please don't try these commands.
**NOTE**: Please understand all the changes you are doing at the RU, especially if you are manipulating anything related to output power.
#### Benetel 650
### Benetel 650
The OAI configuration file [`gnb-du.sa.band77.273prb.fhi72.4x4-benetel650.conf`](../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band77.273prb.fhi72.4x4-benetel650.conf) corresponds to:
The OAI configuration file [`gnb-du.sa.band77.273prb.fhi72.4x4-benetel650.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band77.273prb.fhi72.4x4-benetel650.conf) corresponds to:
- TDD pattern `DDDSU`, 2.5ms
- Bandwidth 100MHz
- MTU 9600
- 4TX4R
##### RU configuration
#### RU configuration
After switching on the radio or rebooting, wait for the radio bring up to complete, which you can follow using `tail -f /tmp/logs/radio_status`. Once you will see `[INFO] Radio bringup complete`, you can configure the RU via editing `/etc/ru_config.cfg`
@@ -547,15 +559,15 @@ flexran_prach_workaround=disabled
dl_ul_tuning_special_slot=0xfd00000
```
#### Benetel 550
### Benetel 550
The OAI configuration file [`gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf`](../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf) corresponds to:
The OAI configuration file [`gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf) corresponds to:
- TDD pattern `DDDDDDDSUU`, 5ms
- Bandwidth 100MHz
- MTU 9600
- 4TX4R
##### RU configuration
#### RU configuration
After switching on the radio or rebooting, wait for the radio bring up to complete, which you can follow using `tail -f /tmp/logs/radio_status`. Once you will see `[INFO] Radio bringup complete`, you can configure the RU via editing `/etc/ru_config.cfg`
@@ -573,15 +585,15 @@ flexran_prach_workaround=disabled
dl_tuning_special_slot=0x13b6
```
#### LITEON
### LITEON
The OAI configuration file [`gnb.sa.band78.273prb.fhi72.4x4-liteon.conf`](../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-liteon.conf) corresponds to:
The OAI configuration file [`gnb.sa.band78.273prb.fhi72.4x4-liteon.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-liteon.conf) corresponds to:
- TDD pattern `DDDSU`, 2.5ms
- Bandwidth 100MHz
- MTU 1500
- MTU 9600: v02.00.10
##### RU configuration
#### RU configuration
SSH to the unit as user `user`. Write `enable` in the terminal to enter the configuration console; the password should be in the user guide. Use the command `show oru-status` to check the RU status. The output should be similar to:
```bash
@@ -611,16 +623,16 @@ jumboframe 1 # enable jumbo frame
...
```
#### VVDN LPRU
### VVDN LPRU
**Version 3.x**
The OAI configuration file [`gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf`](../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf) corresponds to:
The OAI configuration file [`gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf) corresponds to:
- TDD pattern `DDDSU`, 2.5ms
- Bandwidth 100MHz
- MTU 9600
##### RU configuration
#### RU configuration
Check in the RU user manual how to configure the center frequency. There are multiple ways to do it. We set the center frequency by editing `sysrepocfg` database. You can use `sysrepocfg --edit=vi -d running` to do the same. You can edit the `startup` database to make the center frequency change persistent.
@@ -664,11 +676,11 @@ mw.l a0050010 <YOUR-RU-VLAN>3 # e.g. VLAN = 4 => `mw.l a0050010 43`
sysrepocfg --edit=vi -d running
```
#### Metanoia RU
### Metanoia RU
**Version 2.0.6**
The OAI configuration file [`gnb.sa.band78.273prb.fhi72.4x4-metanoia.conf`](../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-metanoia.conf) corresponds to:
The OAI configuration file [`gnb.sa.band78.273prb.fhi72.4x4-metanoia.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-metanoia.conf) corresponds to:
- TDD pattern `DDDSU`, 2.5ms (`DDDDDDDSUU`, 5ms, also supported)
- Bandwidth 100MHz
- 4TX4R
@@ -685,16 +697,16 @@ The RU configuration is stored in `/etc/rumanager.conf`. The required modificati
At this stage, RU must be rebooted so the changes apply.
#### Foxconn RPQN RU
### Foxconn RPQN RU
**Version v3.1.15q.551_rc10**
The OAI configuration file [`gnb.sa.band78.273prb.fhi72.4X4-foxconn.conf`](../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4X4-foxconn.conf) corresponds to:
The OAI configuration file [`gnb.sa.band78.273prb.fhi72.4X4-foxconn.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4X4-foxconn.conf) corresponds to:
- TDD pattern `DDDSU`, 2.5ms
- Bandwidth 100MHz
- MTU 9600
##### RU configuration
#### RU configuration
After switching on or rebooting the RU, the `/home/root/test/init_rrh_config_enable_cuplane` script should be run.
@@ -719,7 +731,7 @@ RU must be rebooted so the changes apply.
- The measured throughput was **520 Mbps DL** and **40 Mbps UL**.
- With newer OAI versions, throughput degrades. This issue is currently under investigation.
### Configure Network Interfaces and DPDK VFs
## Configure Network Interfaces and DPDK VFs
The 7.2 fronthaul uses the xran library, which requires DPDK. In this step, we
need to configure network interfaces to send data to the RU, and configure DPDK
@@ -755,7 +767,7 @@ in the below command and configure VLAN on the switch as "access VLAN". In case
the MTU is different than 1500, you have to update the MTU on the switch
interface as well.
#### Set maximum ring buffers:
### Set maximum ring buffers:
As a first step, please set up the maximum allowed buffer size to your desired interface. To check the maximum value, please execute the following command:
```bash
@@ -770,7 +782,7 @@ MAX_RING_BUFFER_SIZE=<YOUR_PHYSICAL_INTERFACE_MAX_BUFFER_SIZE>
sudo ethtool -G $IF_NAME rx $MAX_RING_BUFFER_SIZE tx $MAX_RING_BUFFER_SIZE
```
#### Set the maximum MTU in the physical interface:
### Set the maximum MTU in the physical interface:
```bash
set -x
IF_NAME=<YOUR_PHYSICAL_INTERFACE_NAME>
@@ -779,9 +791,9 @@ MTU=<RU_MTU>
sudo ip link set $IF_NAME mtu $MTU
```
#### (Re-)create VF(s)
### (Re-)create VF(s)
##### one VF
#### one VF
```bash
set -x
@@ -796,7 +808,7 @@ sudo sh -c 'echo 1 > /sys/class/net/$IF_NAME/device/sriov_numvfs'
sudo ip link set $IF_NAME vf 0 mac $DU_CU_PLANE_MAC_ADD vlan $VLAN mtu $MTU spoofchk off # set CU planes PCI address
```
##### two VFs
#### two VFs
```bash
set -x
@@ -854,12 +866,12 @@ The hardware card `31:00.1` has two associated virtual functions `31:06.0` and
`31:06.1`.
</details>
#### Bind VF(s)
### Bind VF(s)
Now, unbind any pre-existing DPDK devices, load the "Virtual Function I/O"
driver `vfio_pci` or `mlx5_core`, and bind DPDK to these devices.
##### Bind one VF
#### Bind one VF
```bash
set -x
@@ -871,7 +883,7 @@ sudo modprobe $DRIVER
sudo /usr/local/bin/dpdk-devbind.py --bind $DRIVER $CU_PLANE_PCI_BUS_ADD
```
##### Bind two VFs
#### Bind two VFs
```bash
set -x
@@ -921,24 +933,24 @@ sudo /usr/local/bin/dpdk-devbind.py --bind $DRIVER $C_PLANE_PCI_BUS_ADD
### Configure OAI gNB
## Configure OAI gNB
**Beware in the following section to let in the range of isolated cores the parameters that should be (i.e. `L1s.L1_rx_thread_core`, `L1s.L1_tx_thread_core`, `RUs.ru_thread_core`, `fhi_72.io_core` and `fhi_72.worker_cores`)**
Sample configuration files for OAI gNB, specific to the manufacturer of the radio unit, are available at:
1. LITEON RU:
[`gnb.sa.band78.273prb.fhi72.4x4-liteon.conf`](../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-liteon.conf)
[`gnb.sa.band78.273prb.fhi72.4x4-liteon.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-liteon.conf)
2. VVDN RU:
[`gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf`](../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf)
[`gnb.sa.band77.106prb.fhi72.4x4-vvdn.conf`](../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.106prb.fhi72.4x4-vvdn.conf)
[`gnb.sa.band77.273prb.fhi72.2x2-vvdn.conf`](../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.273prb.fhi72.2x2-vvdn.conf)
[`gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf)
[`gnb.sa.band77.106prb.fhi72.4x4-vvdn.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.106prb.fhi72.4x4-vvdn.conf)
[`gnb.sa.band77.273prb.fhi72.2x2-vvdn.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.273prb.fhi72.2x2-vvdn.conf)
3. Benetel 650 RU:
[`gnb-du.sa.band77.273prb.fhi72.4x4-benetel650.conf`](../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band77.273prb.fhi72.4x4-benetel650.conf)
[`gnb-du.sa.band77.273prb.fhi72.4x4-benetel650.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band77.273prb.fhi72.4x4-benetel650.conf)
4. Benetel 550 RU:
[`gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf`](../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf)
[`gnb.sa.band78.273prb.fhi72.4x2-benetel550.conf`](../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x2-benetel550.conf)
[`gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf)
[`gnb.sa.band78.273prb.fhi72.4x2-benetel550.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x2-benetel550.conf)
5. Metanoia RU:
[`gnb.sa.band78.273prb.fhi72.4x4-metanoia.conf`](../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-metanoia.conf)
[`gnb.sa.band78.273prb.fhi72.4x4-metanoia.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-metanoia.conf)
Edit the sample OAI gNB configuration file and check following parameters:
@@ -1014,7 +1026,7 @@ Layer mapping (eAxC offsets) happens as follows:
- At the moment, OAI is compatible with CAT A O-RU only. Therefore, SRS is not supported.
- XRAN retrieves DU MAC address with `rte_eth_macaddr_get()` function. Hence, `fhi_72.du_addr` parameter is not taken into account.
## Start and Operation of OAI gNB
# Start and Operation of OAI gNB
Run the `nr-softmodem` from the build directory:
```bash
@@ -1100,9 +1112,9 @@ do not do any jumps (during the last hour). While an occasional jump is not
necessarily problematic for the gNB, many such messages mean that the system is
not working, and UEs might not be able to attach or reach good performance.
Also, you can try to compile with polling (see [the build
section](#build-oai-gnb)) to see if it resolves the problem.
section](.#build-oai-gnb)) to see if it resolves the problem.
## Operation with multiple RUs
# Operation with multiple RUs
It is possible to connect up to 4 RUs to one DU at the same time and operate
them either with a single antenna array or a distributed antenna array. This
@@ -1191,7 +1203,7 @@ fhi_72 = {
</details>
Compare also with the example (DU) configuration in
[`gnb-du.sa.band77.273prb.fhi72.8x8-benetel650_650.conf`](../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band77.273prb.fhi72.8x8-benetel650_650.conf).
[`gnb-du.sa.band77.273prb.fhi72.8x8-benetel650_650.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band77.273prb.fhi72.8x8-benetel650_650.conf).
Afterwards, start the gNB with the modified configuration file. If everything
went well, you should see the RU counters for both RUs go up:
@@ -1222,7 +1234,7 @@ Note the eight entries after `avg_IO`.
You should be able to connect a UE now.
## OAI Management Plane
# OAI Management Plane
In OAI gNB, we support:
* Configuration Management: interface(s) creation, configuration of RU CU-planes, Tx/Rx antennas, and Tx/Rx carriers.
* Performance Management: activation/deactivation of available RU performance measurements and its notification reception with 10s periodicity:
@@ -1234,10 +1246,10 @@ The reference specifications:
* `O-RAN.WG4.MP.0-v05.00`
* `O-RAN.WG4.MP-YANGs-v04.00`
### M-plane prerequisites
## M-plane prerequisites
Before proceeding, please make sure you have a support for 7.2 interface, as described in [Prerequisites](#prerequisites).
#### DHCP server
### DHCP server
The M-plane requires a DHCP server, where the M-plane connection can be established over untagged or tagged VLAN. We tested with untagged (the default VLAN is 1).
Please modify `/etc/dhcp/dhcpd.conf` configuration based on your testbed.
@@ -1284,7 +1296,7 @@ Please, configure the interface as:
sudo ip address add 192.168.80.1/24 dev <interface>
```
#### Mandatory packages
### Mandatory packages
* On Fedora (we haven't yet tested RHEL):
```bash
sudo dnf install pcre-devel libssh-devel libxml2-devel libyang2-devel libnetconf2-devel
@@ -1353,10 +1365,10 @@ sudo ldconfig
If you would like to install these libraries in the custom path, please replace `/usr/local` default path to e.g. `/opt/mplane-v2`.
### Benetel O-RU
## Benetel O-RU
Note: Only v1.2.2 RAN550 and RAN650 have been successfully tested.
#### One time steps
### One time steps
Connect to the RU as user `root`, enable the mplane service, and reboot:
```bash
ssh root@<ru-ip-address>
@@ -1381,11 +1393,11 @@ echo "<DU-pub-key>" >> ~/.ssh/authorized_keys
```
### gNB configuration
## gNB configuration
The reference gNB configuration file for one Benetel RAN550:
[`gnb.sa.band78.273prb.fhi72.4x4-benetel550-mplane.conf`](../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-benetel550-mplane.conf)
[`gnb.sa.band78.273prb.fhi72.4x4-benetel550-mplane.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-benetel550-mplane.conf)
The reference DU configuration file for two Benetel RAN650:
[gnb-du.sa.band77.273prb.fhi72.8x8-benetel650_650-mplane.conf](../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band77.273prb.fhi72.8x8-benetel650_650-mplane.conf)
[gnb-du.sa.band77.273prb.fhi72.8x8-benetel650_650-mplane.conf](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band77.273prb.fhi72.8x8-benetel650_650-mplane.conf)
In order to run gNB/DU with M-plane, we need to modify Tx gain `att_tx` in RU section, as well as the `fhi_72` section in the configuration file.
Example for one RU:
@@ -1462,7 +1474,7 @@ The following parameters are retrieved from the RU and forwarded to the xran:
* `IQ compression`: if RU supports multiple, the first value in the list is taken; please note that the same value is used for PxSCH/PRACH
* `PRACH offset`: hardcoded based on the RU vendor (i.e. for Benetel `max(Nrx,Ntx)`)
### Build and compile gNB
## Build and compile gNB
The following cmake options are available:
* `OAI_FHI72` = CUS support
* `OAI_FHI72_MPLANE` = M support
@@ -1471,7 +1483,7 @@ Compiled libraries:
* `OAI_FHI72` <=> `oran_fhlib_5g`
* `OAI_FHI72` && `OAI_FHI72_MPLANE` <=> `oran_fhlib_5g` (CUS) && `oran_fhlib_5g_mplane` (CUSM)
#### Using build_oai script
### Using build_oai script
```bash
git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git ~/openairinterface5g
cd ~/openairinterface5g/cmake_targets/
@@ -1482,7 +1494,7 @@ cd ~/openairinterface5g/cmake_targets/
PKG_CONFIG_PATH=/opt/mplane-v2/lib/pkgconfig ./build_oai --gNB --ninja -t oran_fhlib_5g_mplane --cmake-opt -Dxran_LOCATION=$HOME/phy/fhi_lib/lib
```
#### Using cmake directly
### Using cmake directly
```bash
git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git ~/openairinterface5g
cd ~/openairinterface5g/
@@ -1493,7 +1505,7 @@ PKG_CONFIG_PATH=/opt/mplane-v2/lib/pkgconfig cmake .. -GNinja -DOAI_FHI72=ON -DO
ninja nr-softmodem oran_fhlib_5g_mplane params_libconfig
```
### Start the gNB
## Start the gNB
Run the `nr-softmodem` from the build directory:
```bash
cd ~/openairinterface5g/cmake_targets/ran_build/build
@@ -2222,7 +2234,7 @@ sudo ./nr-softmodem -O <without-mplane-configuration file> --thread-pool <list o
```
## Contact in case of questions
# Contact in case of questions
You can ask your question on the [mailing lists](https://gitlab.eurecom.fr/oai/openairinterface5g/-/wikis/MailingList).

View File

@@ -1,4 +1,16 @@
# OpenAirInterface documentation overview
<table style="border-collapse: collapse; border: none;">
<tr style="border-collapse: collapse; border: none;">
<td style="border-collapse: collapse; border: none;">
<a href="http://www.openairinterface.org/">
<img src="./images/oai_final_logo.png" alt="" border=3 height=50 width=150>
</img>
</a>
</td>
<td style="border-collapse: collapse; border: none; vertical-align: center;">
<b><font size = "5">OpenAirInterface documentation overview</font></b>
</td>
</tr>
</table>
This is the general overview page of the OpenAirInterface documentation.
This page groups links to general information, tutorials, design documents, radio integration, and special-purpose libraries.
@@ -11,79 +23,81 @@ Beware if you previously pulled the `develop` branch that your repository may be
[[_TOC_]]
## General
# General
- [FEATURE_SET.md](setup/FEATURE_SET.md): lists supported features
- [GET_SOURCES.md](setup/GET_SOURCES.md): how to download the sources
- [BUILD.md](BUILD.md): how to build the sources
- [code-style-contrib.md](setup/code-style-contrib.md): overall working practices, code style, and review process
- [cross-compile.md](setup/cross-compile.md): how to cross-compile OAI for ARM
- [clang-format.md](setup/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](setup/environment-variables.md): the environment variables used by OAI
- [tuning_and_security.md](testing/tuning_and_security.md): performance and security considerations
- [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
There is some general information in the [OpenAirInterface Gitlab Wiki](https://gitlab.eurecom.fr/oai/openairinterface5g/-/wikis/home)
## Tutorials
# Tutorials
- Step-by-step tutorials to set up 5G:
* [OAI 5GC](tutorials/NR_SA_Tutorial_OAI_CN5G.md)
* [OAI gNB with COTS UE](tutorials/NR_SA_Tutorial_COTS_UE.md)
* [OAI NR-UE](tutorials/NR_SA_Tutorial_OAI_nrUE.md)
* [Multiple OAI NR-UE with RFsimulator](tutorials/NR_SA_Tutorial_OAI_multi_UE.md)
- [RUNMODEM.md](usage/RUNMODEM.md): Generic information on how to
* [OAI 5GC](./NR_SA_Tutorial_OAI_CN5G.md)
* [OAI gNB with COTS UE](./NR_SA_Tutorial_COTS_UE.md)
* [OAI NR-UE](./NR_SA_Tutorial_OAI_nrUE.md)
* [Multiple OAI NR-UE with RFsimulator](./NR_SA_Tutorial_OAI_multi_UE.md)
- [RUNMODEM.md](./RUNMODEM.md): Generic information on how to
* Run simulators
* Run with hardware
* Specific OAI modes (phy-test, do-ra, noS1)
* (5G) Using SDAP and custom DRBs
* IF setups and arbitrary frequencies
* MIMO
- [How to run OAI with O-RAN 7.2 FHI](tutorials/ORAN_FHI7.2_Tutorial.md)
- [How to run a 5G-NSA setup](testing/TESTING_OAI_NSA_COTS_UE.md)
- [How to run a 4G setup using L1 simulator](L1_L2/L1SIM.md) _Note: we recommend the RFsimulator_
- [How to use the L2 simulator](L1_L2/L2NFAPI.md)
- [How to run OAI with O-RAN 7.2 FHI](./ORAN_FHI7.2_Tutorial.md)
- [How to run a 5G-NSA setup](./TESTING_GNB_W_COTS_UE.md)
- [How to run a 4G setup using L1 simulator](./L1SIM.md) _Note: we recommend the RFsimulator_
- [How to use the L2 simulator](./L2NFAPI.md)
- [How to use the OAI channel simulator](../openair1/SIMULATION/TOOLS/DOC/channel_simulation.md)
- [How to use multiple BWPs](usage/RUN_NR_multiple_BWPs.md)
- [How to run OAI-VNF and OAI-PNF](L1_L2/nfapi.md): how to run the FAPI/nFAPI split,
- [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)](usage/RUN_NR_PRS.md)
- [How to use device-to-device communication (D2D, 4G)](setup/d2d_emulator_setup.md)
- [How to use the positioning reference signal (PRS)](./RUN_NR_PRS.md)
- [How to use device-to-device communication (D2D, 4G)](./d2d_emulator_setup.txt)
- [How to run with E2 agent](../openair2/E2AP/README.md)
- [How to run the physical simulators](usage/physical-simulators.md)
- [How to setup OAI with Nvidia Aerial and Foxconn](tutorials/Aerial_FAPI_Split_Tutorial.md)
- [How to setup OAI with LDPC accelerators (Xilinx T2/Intel ACCs)](tutorials/LDPC_OFFLOAD_SETUP.md)
- [How to do a handover](tutorials/handover-tutorial.md)
- [How to setup gNB frequency](setup/gNB_frequency_setup.md)
- [How to run the physical simulators](./physical-simulators.md)
- [How to setup OAI with Nvidia Aerial and Foxconn](./Aerial_FAPI_Split_Tutorial.md)
- [How to setup OAI with LDPC accelerators (Xilinx T2/Intel ACCs)](./LDPC_OFFLOAD_SETUP.md)
- [How to do a handover](./handover-tutorial.md)
- [How to setup gNB frequency](./gNB_frequency_setup.md)
Legacy unmaintained files:
- [`L2NFAPI_NOS1.md`](L1_L2/L2NFAPI_NOS1.md), [`L2NFAPI_S1.md`](L1_L2/L2NFAPI_S1.md):
- [`L2NFAPI_NOS1.md`](./L2NFAPI_NOS1.md), [`L2NFAPI_S1.md`](./L2NFAPI_S1.md):
old L2simulator, not valid anymore
- [`UL_MIMO.md`](usage/UL_MIMO.md): UL-MIMO specific notes
- [`SystemX-tutorial-design.md`](./SystemX-tutorial-design.md): old, high-level
documentation
- [`UL_MIMO.txt`](./UL_MIMO.txt): UL-MIMO specific notes
## Designs
# Designs
- General software architecture notes: [SW_archi.md](architecture/SW_archi.md)
- [Information on E1](E1AP/E1-design.md)
- [Information on F1](F1AP/F1-design.md)
- [Information on how NR nFAPI works](architecture/NR_NFAPI_archi.md)
- [Flow graph of the L1 in gNB](architecture/SW-archi-graph.md)
- [L1 threads in NR-UE](architecture/nr-ue-design.md)
- [Information on gNB MAC](MAC/mac-usage.md)
- [Information on gNB RRC](RRC/rrc-usage.md)
- [Information on analog beamforming implementation](tutorials/analog_beamforming.md)
- [Information on the UE 5G NAS implementation](tutorials/5Gnas.md)
- General software architecture notes: [SW_archi.md](./SW_archi.md)
- [Information on E1](./E1AP/E1-design.md)
- [Information on F1](./F1AP/F1-design.md)
- [Information on how NR nFAPI works](./NR_NFAPI_archi.md)
- [Flow graph of the L1 in gNB](SW-archi-graph.md)
- [L1 threads in NR-UE](./nr-ue-design.md)
- [Information on gNB MAC](./MAC/mac-usage.md)
- [Information on gNB RRC](./RRC/rrc-usage.md)
- [Information on analog beamforming implementation](./analog_beamforming.md)
- [Information on the UE 5G NAS implementation](./5Gnas.md)
## Building and running from images
# Building and running from images
- [How to build images](../docker/README.md)
- [How to run 5G with the RFsimulator from images](../ci-scripts/yaml_files/5g_rfsimulator/README.md)
- [How to run 4G with the RFsimulator from images](../ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/README.md)
- [How to run physical simulators in OpenShift](../openshift/README.md)
## Libraries
# Libraries
### General
## General
- The [T tracer](../common/utils/T/DOC/T.md): a generic tracing tool (VCD, Wireshark, GUI, to save for later, ...)
- [OPT](../openair2/UTIL/OPT/README.txt): how to trace to wireshark
@@ -92,38 +106,38 @@ Legacy unmaintained files:
- The [shared object loader](../common/utils/DOC/loader.md)
- The [threadpool](../common/utils/threadPool/thread-pool.md) used in L1
- The [LDPC implementation](../openair1/PHY/CODING/DOC/LDPCImplementation.md) is a shared library
- The [time management](architecture/time_management.md) module
- The [time management](time_management.md) module
### Radios
## Radios
Some directories under `radio` contain READMEs:
- [RFsimulator](../radio/rfsimulator/README.md)
- [USRP](../radio/USRP/README.md)
- [BladeRF](../radio/BLADERF/README)
- [IQPlayer](../radio/iqplayer/DOC/iqrecordplayer_usage.md), and [general documentation](usage/iqrecordplayer_usage.md)
- [IQPlayer](../radio/iqplayer/DOC/iqrecordplayer_usage.md), and [general documentation](./iqrecordplayer_usage.md)
- [fhi_72](../radio/fhi_72/README.md)
- [vrtsim](../radio/vrtsim/README.md)
- [rf_emulator](../radio/emulator/README.md)
The other SDRs (AW2S, LimeSDR, ...) have no READMEs.
### Special-purpose libraries
## Special-purpose libraries
- OAI has two scopes: one based on Xforms and one based on imgui, described in [this README](../openair1/PHY/TOOLS/readme.md)
- OAI comes with an integrated [telnet server](../common/utils/telnetsrv/DOC/telnethelp.md) to monitor and control
- OAI comes with an integrated [web server](../common/utils/websrv/DOC/websrv.md)
## Testing
# Testing
- [UnitTests.md](testing/UnitTests.md) explains the unit testing setup
- [UnitTests.md](./UnitTests.md) explains the unit testing setup
- Component tests are under `tests/`. Currently, there is a simple CU-UP
tester, see the corresponding [README.md](../tests/nr-cuup/README.md).
- [TESTBenches.md](testing/TESTBenches.md) lists the CI setup and links to pipelines
- [TESTBenches.md](./TESTBenches.md) lists the CI setup and links to pipelines
- The CI setup uses a [custom framework](../ci-scripts/README.md) to run
end-to-end tests.
## Developer tools
# Developer tools
- [formatting](../tools/formatting/README.md) is a clang-format error detection tool
- [iwyu](../tools/iwyu/README.md) is a tool to detect `#include` errors

View File

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

View File

@@ -4,11 +4,11 @@ schemes (connection, reestablishment, handover) including their interworking
with other layers.
User documentation, such as general configuration options, are described in [a
separate page](rrc-usage.md).
separate page](./rrc-usage.md).
[[_TOC_]]
## General
# General
5G RRC is basically an ITTI message queue with associated handlers. It
sequentially reads received ITTI messages and handles them through the function
@@ -26,7 +26,7 @@ possible to find the message in the switch based on a message name in the spec.
Note that RRC is inherently single-threaded, and processes messages in a FIFO
order.
## Sequence Diagrams of UE procedures
# Sequence Diagrams of UE procedures
The following section presents a number of common UE procedures for connection
establishment&control, bearer establishment, etc. The intention is to help
@@ -66,7 +66,7 @@ sequenceDiagram
ue->>cucp: F1AP UL RRC Msg Transfer (RRC Message Answer)
```
### Initial connection setup/Registration
## Initial connection setup/Registration
This sequence diagram shows the principal steps for an initial UE connection.
This can either happen through a _Registration Request_ (e.g., UE connects
@@ -164,7 +164,7 @@ sequenceDiagram
cucp->>amf: NGAP PDU Session Resource Setup Resp
```
### Reestablishment
## Reestablishment
The following sequence diagram shows the principal steps during a
reestablishment request. When handling the RRC Reestablishment Request at the
@@ -210,7 +210,7 @@ sequenceDiagram
end
```
### Inter-DU Handover (F1)
## Inter-DU Handover (F1)
The basic handover (HO) structure is as follows. In order to support various
handover "message passing implementation" (F1AP, NGAP, XnAP), RRC employs
@@ -264,7 +264,7 @@ sequenceDiagram
sdu->>cucp: F1AP UE Context Release Complete
Note over ue,tdu: UE active on target DU
```
### Inter-gNB Handover (N2)
## Inter-gNB Handover (N2)
This is an inter-NG-RAN procedure. The N2 handover specification is defined in the following documents:
@@ -278,7 +278,7 @@ This is an inter-NG-RAN procedure. The N2 handover specification is defined in t
- Includes messages like Handover Request, Handover Command, and Handover Preparation.
* 3GPP TS 38.331 (RRC): details the UE-level RRC procedures involved during handovers
#### End-to-end flow
### End-to-end flow
```mermaid
sequenceDiagram
@@ -353,9 +353,9 @@ sequenceDiagram
Note over ue,tdu: UE active on target DU
```
## Structures
# Structures
### Cells
## Cells
OAI 5G RRC does not actually handle multiple cells as of now, but multiple DUs,
each being limited to one cell.
@@ -363,12 +363,12 @@ each being limited to one cell.
Cell-related data is stored in `nr_rrc_du_container_t`, and kept in a tree
indexed by the SCTP association ID.
### CU-UPs
## CU-UPs
CU-UP information is stored in `nr_rrc_cuup_container_t`, and kept in a tree
indexed by the SCTP association ID.
### Transactions
## Transactions
The RRC keeps track of ongoing transaction (RRC procedures) through a per-UE
array `xids`, which is indexed with a transaction ID `xid` in `[0,3]` to keep
@@ -385,7 +385,7 @@ However, it might be possible to trigger a procedure while another is ongoing.
As of now, no queueing mechanims exists to ensure only one operation is
ongoing, which would likely also simplify the code.
### Handover
## Handover
Handover-related data is stored in a per-UE structure of type
`nr_handover_context_t`. It is a pointer and only set during handover

View File

@@ -2,19 +2,19 @@ This document describes the basic functioning of the 5G RRC layer, describes
the periodic output, and explains the various configuration options that
influence its behavior.
Developer documentation, such as UE connection control flow, reestablishment, or handover, are described in [a separate page](rrc-dev.md).
Developer documentation, such as UE connection control flow, reestablishment, or handover, are described in [a separate page](./rrc-dev.md).
[[_TOC_]]
## General
# General
The RRC layer controls the basic connection setup of UEs as well as additional
procedures. It is the fundamental building block of OAI's CU-CP, and interacts
with lower layers (DU, basically MAC and RLC) through F1AP messages, and with
the CU-UP through E1AP messages. More information can be found in the
respective [F1AP page](../F1AP/F1-design.md) and [E1AP page](../E1AP/E1-design.md).
respective [F1AP page](../F1-design.md) and [E1AP page](../E1AP/E1-design.md).
## Periodic output and interpretation
# Periodic output and interpretation
Similarly to the scheduler, the RRC periodically prints information about
connected UEs and DUs into file `nrRRC_stats.log` in the current working
@@ -53,19 +53,19 @@ blocks/PRB). Only one cell per DU is supported.
As of now, it does not print information about connected CU-UPs or AMFs.
## Configuration of the RRC
# Configuration of the RRC
### Split-related options (when running in a CU or CU-CP)
## Split-related options (when running in a CU or CU-CP)
See [F1 documentation](../F1AP/F1-design.md) for information about the F1 split.
See [F1 documentation](../F1-design.md) for information about the F1 split.
See [E1 documentation](../E1AP/E1-design.md) for information about the E1 split.
### RRC-specific configuration options
## RRC-specific configuration options
In the `gNBs` section of the gNB/CU/CU-CP configuration file is the
RRC-specific configuration
#### cell-specific options
### cell-specific options
Note that some SIBS are configured at the CU and some at the DU; please consult
the [MAC configuration](../MAC/mac-usage.md) as well for SIB configuration.
@@ -90,52 +90,35 @@ the [MAC configuration](../MAC/mac-usage.md) as well for SIB configuration.
- `cu_sibs` (default: `[]`) list of SIBs to give to the DU for transmission.
Currently, SIB2 is supported.
#### UE-specific configuration
### UE-specific configuration
- `um_on_default_drb` (default: false): use RLC UM instead of RLC AM on default
bearers
- `drbs` (default: 0): the number of DRBs to allocate for a UE, only useful for
do-ra or phy-test testing
#### Neighbor-gNB configuration
### Neighbor-gNB configuration
Refer to the [handover tutorial](../tutorials/handover-tutorial.md) for detailed information about gNB neighbors and handover procedures.
#### What is a gNB neighbor?
##### Required configuration parameters
Network continuity is a key aspect of 5G. In the 5G architecture, gNB neighbors play a central role in maintaining service continuity through mechanisms such as handover and load balancing. By definition, a gNB neighbor is another gNB that can be measured and linked by the UE. If the current serving gNB is no longer optimal, the UE may connect to a neighbor gNB.
To define a neighbor cell in the configuration file, the following parameters are required:
To support this behavior, the network configuration specifies additional frequencies and cells that the UE should measure. The UE reports these measurements to the network, which then decides whether or not to initiate a handover.
- `gNB_ID` - identifier of the neighbor gNB (e.g., `0xe01`)
- `nr_cellid` - cell identifier of the neighbor cell (e.g., `11111111`)
- `physical_cellId` - physical cell ID for radio identification (e.g., `1`)
- `absoluteFrequencySSB` - SSB frequency in ARFCN notation (e.g., `643296`)
- `subcarrierSpacing` - numerology index: 0=15kHz, 1=30kHz, 2=60kHz, 3=120kHz
- `band` - 3GPP frequency band number (e.g., `78` for 3.5GHz)
- `plmn` - PLMN configuration object with:
- `mcc` - mobile country code (3 digits, e.g., `001`)
- `mnc` - mobile network code (2-3 digits, e.g., `01`)
- `mnc_length` - number of digits in MNC (must be `2` or `3`)
- `tracking_area_code` - tracking area identifier (e.g., `1`)
Neighbor types include:
- **Intra-gNB neighbors** - cells belonging to the same gNB
- **Inter-gNB neighbors** - cells belonging to different gNBs
- **Inter-RAT neighbors** - cells belonging to another RAT (e.g., LTE)
Example configuration structure:
```
neighbour_list = (
{
nr_cellid = 12345678;
neighbour_cell_configuration = (
{
gNB_ID = 0xe01;
nr_cellid = 11111111;
physical_cellId = 1;
absoluteFrequencySSB = 643296;
subcarrierSpacing = 1; # 30 kHz
band = 78;
plmn = { mcc = 001; mnc = 01; mnc_length = 2 };
tracking_area_code = 1;
}
);
}
);
```
#### Required configuration parameters
Refer to the [handover tutorial](../tutorials/handover-tutorial.md) for complete examples and detailed setup instructions.
To define a neighbor cell in the configuration file, the following parameters are typically needed:
- **gNB ID** - unique identifier of the gNB
- **Cell ID** - identifier of the cell within the gNB
- **Physical Cell ID** - identifier of the cells synchronization signal (PCI)
- **Absolute Frequency** - frequency used by the SSB (absoluteFrequencySSB)
- **Subcarrier Spacing** - numerology (e.g., 15 kHz, 30 kHz)
- **PLMN configuration** - MCC, MNC, and MNC length
- **Tracking Area Code (TAC)** - identifier of the tracking area
Refer to the [handover tutorial](../handover-tutorial.md) for more information.

View File

@@ -1,8 +1,20 @@
# Running OAI 5G Softmodems
<table style="border-collapse: collapse; border: none;">
<tr style="border-collapse: collapse; border: none;">
<td style="border-collapse: collapse; border: none;">
<a href="http://www.openairinterface.org/">
<img src="./images/oai_final_logo.png" alt="" border=3 height=50 width=150>
</img>
</a>
</td>
<td style="border-collapse: collapse; border: none; vertical-align: center;">
<b><font size = "5">Running OAI 5G Softmodems</font></b>
</td>
</tr>
</table>
This document explains some options for running 5G executables.
After you have [built the softmodem executables](../BUILD.md) you can set your
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
@@ -10,9 +22,9 @@ need.
[[_TOC_]]
## Simulators
# Simulators
### RFsimulator
## 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
@@ -25,41 +37,41 @@ It is planned to enhance this simulator with the following functionalities:
- Support for multiple eNodeB's or gNodeB's for hand-over tests
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.
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.
### L2 nFAPI Simulator
## L2 nFAPI Simulator
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).
As for the RFsimulator, no specific hardware is required. The [L2 nfapi
simulator page](../L1_L2/nfapi.md) contains the detailed documentation.
simulator page](./L2NFAPI.md) contains the detailed documentation.
## Running with a true radio head
# Running with a true radio head
OAI supports different radio heads, the following are tested in the CI:
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](../tutorials/NR_SA_Tutorial_COTS_UE.md)
3. Monolithic gNodeB: see next section, or the [standalone tutorial](NR_SA_Tutorial_COTS_UE.md)
## 5G NR
# 5G NR
### NSA setup with COTS UE
## 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
### Launch eNB
```bash
sudo ./lte-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50prb.usrpb210.conf
```
#### Launch gNB
### Launch gNB
```bash
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf --nsa
@@ -67,7 +79,7 @@ sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78
You should see the X2 messages in Wireshark and at the eNB.
### SA setup with OAI NR-UE
## SA setup with OAI NR-UE
The standalone mode is the default mode.
@@ -111,11 +123,11 @@ 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.
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](../tutorials/NR_SA_Tutorial_OAI_nrUE.md).
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
## Optional NR-UE command line options
Here are some useful command line options for the NR UE:
@@ -140,13 +152,13 @@ You can view all available options by typing:
```shell
./nr-uesoftmodem --help
```
### Common gNB and NR UE command line options
## Common gNB and NR UE command line options
#### Three-quarter sampling
### 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
### 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.
@@ -164,14 +176,14 @@ e.g.
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
## How to run a NTN configuration
#### NTN channel
### 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.
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.prop_delay 238.74
@@ -213,7 +225,7 @@ Or by providing this the the command line parameters:
--rfsimulator.options chanmod
```
#### gNB
### 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).
@@ -320,7 +332,7 @@ 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
### 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.
@@ -358,9 +370,9 @@ 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.prop_delay 20 --rfsimulator.options chanmod --time-sync-I 0.1 --ntn-initial-time-drift -46 --autonomous-ta --initial-fo 57340 --cont-fo-comp 2
```
## Specific OAI modes
# Specific OAI modes
### phy-test setup with OAI UE
## 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
@@ -385,9 +397,9 @@ In summary:
* `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.
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
## 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
@@ -406,7 +418,7 @@ 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
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.
@@ -415,13 +427,13 @@ 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
## 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.
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:
@@ -443,7 +455,7 @@ sudo ./nr-uesoftmodem --do-ra
```
#### Run OAI with SDAP & Custom DRBs
### Run OAI with SDAP & Custom DRBs
To run OAI gNB with SDAP, simply include `--gNBs.[0].enable_sdap 1` to the binary's arguments.
@@ -454,7 +466,7 @@ 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
## IF setup with OAI
OAI is also compatible with Intermediate Frequency (IF) equipment. This allows to use RF front-end that with arbitrary frequencies bands that do not comply with the standardised 3GPP NR bands.
@@ -466,7 +478,7 @@ Accordingly, the following parameters must be configured in the RUs section of t
- `if_freq`
- `if_offset`
#### Run OAI with custom DL/UL arbitrary frequencies
### 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.
@@ -477,13 +489,20 @@ sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66
sudo ./nr-uesoftmodem --if_freq 2169080000 --if_freq_off -400000000
```
## 5G gNB MIMO configuration
# 5G gNB MIMO configuration
In order to enable DL-MIMO in OAI 5G softmodem, the prerequisite is to have `do_CSIRS = 1` in the configuration file. This allows the gNB to schedule CSI reference signal and to acquire from the UE CSI measurements to be able to schedule DLSCH with MIMO.
The following step is to set the number of PDSCH logical antenna ports. These needs to be larger or equal to the maximum number of MIMO layers requested (for 2-layer MIMO it is necessary to have at least two logical antenna ports).
![mimo_antenna_ports](../images/mimo_antenna_ports.png)
<table style="border-collapse: collapse; border: none;">
<tr style="border-collapse: collapse; border: none;">
<td style="border-collapse: collapse; border: none;">
<img src="./images/mimo_antenna_ports.png" alt="" border=3 height=100 width=300>
</img>
</td>
</tr>
</table>
This image shows an example of gNB 5G MIMO logical antenna port configuration. It has to be noted that logical antenna ports might not directly correspond to physical antenna ports and each logical antenna port might consist of a sub-array of antennas.

View File

@@ -1,11 +1,23 @@
# Running NR PRS with OAI gNB and nrUE
<table style="border-collapse: collapse; border: none;">
<tr style="border-collapse: collapse; border: none;">
<td style="border-collapse: collapse; border: none;">
<a href="http://www.openairinterface.org/">
<img src="./images/oai_final_logo.png" alt="" border=3 height=50 width=150>
</img>
</a>
</td>
<td style="border-collapse: collapse; border: none; vertical-align: center;">
<b><font size = "8">Running NR PRS with OAI gNB and nrUE</font></b>
</td>
</tr>
</table>
This page is valid on tags starting from **`2022.w37`**.
After you have [built the softmodem executables](../BUILD.md), go to the build directory `openairinterface5g/cmake_targets/ran_build/build/` and start testing the Rel16 PRS usecases.
After you have [built the softmodem executables](BUILD.md), go to the build directory `openairinterface5g/cmake_targets/ran_build/build/` and start testing the Rel16 PRS usecases.
## PRS parameters and config files
# PRS parameters and config files
| **Mode** | **gNB config** | **nrUE config** |
|----------------------------- |------------------------------------------------------------------------------------------- |--------------------------- |
@@ -39,8 +51,8 @@ prs_config = (
```
To TURN OFF PRS, set `NumPRSResources=0` in gNB `prs_config` section. nrUE config has `Active_gNBs` to specify number of active gNBs transmitting PRS signal simultaneously. Find the help string for PRS parameters in `openair2/COMMON/prs_nr_paramdef.h` <br><br>
## gNB in `phy-test` mode
> Note that `numactl` is only needed if you run on a NUMA architecture with more than 1 CPU. In this case it should be installed on Linux using command `sudo apt-get install -y numactl`
# gNB in `phy-test` mode
Note that `numactl` is only needed if you run on a NUMA architecture with more than 1 CPU. In this case it should be installed on Linux using command `sudo apt-get install -y numactl`
Also check the numa nodes USRPs are connected to, using the following command:
@@ -49,7 +61,7 @@ Also check the numa nodes USRPs are connected to, using the following command
Where `eth_if` has to be replaced with the name of the network interface the USRP is connected to.
In our case the output is 0 and hence we use `numactl --cpunodebind=0 --membind=0`
### FR1 test
## FR1 test
Open a terminal on the host machine, and execute below command to launch gNB with **X310 USRPs**
```sudo numactl --cpunodebind=0 --membind=0 ./nr-softmodem -E -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb0.prs.band78.fr1.106PRB.usrpx310.conf --phy-test```
@@ -61,7 +73,7 @@ To run using **rfsimulator**, execute following command:
```sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb0.prs.band78.fr1.106PRB.usrpx310.conf --noS1 --rfsim --phy-test```
### FR2 test
## FR2 test
In FR2 mode, we need RF beamforming module to transmit signal in mmWave frequency range. **X310 USRPs** can be used with BasicTx daughtercard to transmit baseband signal at **Intermediate Frequncy(IF)** and then RF beamforming module would perform beamforming and the upconversion to FR2 frequencies. IF can be specified using `if_freq` in the RU section of gNB config.
If RF beamforming module is NOT present, gNB can still be launched with USRP alone; to transmit at supported `if_freq`.
@@ -73,7 +85,7 @@ To run using **rfsimulator**, execute following command:
```sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb0.prs.band261.fr2.64PRB.usrpx310.conf --noS1 --rfsim --phy-test```
### Multiple gNB scenario
## Multiple gNB scenario
PRS is primarily used for positioning and localization of the UE with multiple gNBs transmitting simultaneously. OAI PRS implementation supports multiple gNB transmission provided all the gNBs are tightely synchronized using GPSDO clock. Therefore before running this scenario, make sure the USRPs has built-in GPSDO and the GPS antennas are connected with good satellite visibility. Also every time a gNB is launched, wait until `GPS LOCKED` is printed on the terminal during gNB startup. If USRP fails to lock with GPSDO, try again until its locked.
To use GPSDO, make sure to change `clock_source` and `time_source` to `gpsdo` in RU section of gNB config.
@@ -83,14 +95,14 @@ To use GPSDO, make sure to change `clock_source` and `time_source` to `gpsdo` in
```sudo numactl --cpunodebind=1 --membind=1 ./nr-softmodem -E -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb1.band78.fr1.106PRB.prs.usrpx310.conf --phy-test```<br><br>
## nrUE in `phy-test` mode
# nrUE in `phy-test` mode
While running gNB and nrUE on the same host machine, `reconfig.raw` and `rbconfig.raw` files would be generated with the launch of gNB and and then nrUE would automatically source it from build directory. However, if gNB and nrUE are running on two different host machines, then run gNB first with the corresponding config and exit after few seconds. This would generate `reconfig.raw` and `rbconfig.raw` files.
After this, nrUE can be launched using one of the below commands depending on the test scenario. If UE is NOT able to connect to the gNB, then check the USRP connections or try increasing `--ue-rxgain` in steps of 10dB.
Also check the instructions on `numactl` in gNB test section as it applies for nrUE execution as well.
### FR1 test
## FR1 test
Once gNB is up and running, open another terminal and execute below command to launch nrUE with **X310 USRPs**. Make sure to specify `IP_ADDR1` and `IP_ADDR2`(optional) correctly as per USRPs IP address
```sudo numactl --cpunodebind=0 --membind=0 ./nr-uesoftmodem -E --phy-test --usrp-args "addr=IP_ADDR1,second_addr=IP_ADDR2,time_source=internal,clock_source=internal" -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.nr.prs.fr1.106prb.conf --ue-rxgain 80 --ue-fo-compensation --non-stop```
@@ -104,7 +116,7 @@ To run using **rfsimulator** with local ETH IF `127.0.0.1`, execute following co
sudo ./nr-uesoftmodem --rfsim --phy-test --noS1 -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.nr.prs.fr1.106prb.conf --rfsimulator.serveraddr 127.0.0.1
```
### FR2 test
## FR2 test
Like gNB, RF beamforming module is receiving at mmWave frequencies and then **X310 USRPs** with BasicRx daughtercard to receive the signal at intermediate frequncy(IF) from RF beamforming module. IF can be specified using `--if_freq` option in nrUE command line.
If RF beamforming module is NOT present, nrUE can still be launched with USRP alone; to receive at `if_freq` and validation can be done. Make sure to specify `if_freq` in the range supported by USRP nrUE is running with.
@@ -118,7 +130,7 @@ To run using **rfsimulator** with local ETH IF `127.0.0.1`, execute following co
sudo ./nr-uesoftmodem --rfsim --phy-test --noS1 -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.nr.prs.fr2.64prb.conf --rfsimulator.serveraddr 127.0.0.1
```
### Multiple gNB scenario
## Multiple gNB scenario
In nrUE prs config file, change `Active_gNBs` to the actual number of gNBs launched. Also verify the parameter in `prs_config` sections of nrUE config is matching with that of gNB config used. And launch nrUE using one of the above commands depending on FR1/FR2 test scenario.
After successful connection, UE starts estimating channel based on the downlink PRS pilots using Least-Squares(LS) method. In the frequency domain, linear interpolation is used to reconstruct the channel over entire PRS bandwidth using LS estimates at pilot locations. UE also measures Time of Arrival(ToA) based on the time domain impulse response. On the console, ToA measurement is printed for each PRS resource.
@@ -132,7 +144,7 @@ After successful connection, UE starts estimating channel based on the downlink
At UE side, T tracer is used to dump PRS channel estimates, both in time and frequency domain using `UE_PHY_DL_CHANNEL_ESTIMATE` and `UE_PHY_DL_CHANNEL_ESTIMATE_FREQ` respectively. These dumps can be enabled using options `--T_stdout 0` without console prints or `--T_stdout 2` with console prints; in above nrUE launch command.<br><br>
## Recording T tracer dumps
# Recording T tracer dumps
Once nrUE is launched with `--T_stdout 0 or 2` option, open another terminal. Navigate to T tracer directory ```common/utils/T/tracer/``` and build the T tracer binary using ```make```
Once the build is successful, execute following command to start recording the PRS channel estimates dumps
@@ -150,7 +162,7 @@ and textlog it on another terminal with following command:
```./textlog -d ../T_messages.txt -ON -no-gui```<br><br>
## Extracting PRS channel estimates
# Extracting PRS channel estimates
Once T tracer dumps are recorded, PRS channel estimates can be extracted from .raw file using bash script `extract_prs_dumps.sh` in T tracer directory ```common/utils/T/tracer/```
```./extract_prs_dumps.sh -g <num_gnb> -n <num_resources> -f <recorded .raw file> -c <count>```
@@ -158,7 +170,7 @@ Once T tracer dumps are recorded, PRS channel estimates can be extracted from .r
In the end, the script will zip all the extracted dumps to `prs_dumps.tgz`. Make sure to check help in running script using -h option:
```./extract_prs_dumps.sh -h```<br><br>
## Using Matlab/Octave script to visualize PRS channel estimates
# Using Matlab/Octave script to visualize PRS channel estimates
We have developed `plot_prs_Ttracer_dumps.m` script to visualize the extracted PRS dumps offline in Matlab/Octave. Location of the script is `openair1/PHY/NR_UE_ESTIMATION/plot_prs_Ttracer_dumps.m`
Make sure to enter the parameters script asks as input like below:
@@ -170,7 +182,13 @@ Enter number of PRS respurces: <NumPRSResources>
Enter number of active gNBs: <Active_gNBs>
```
This script will read the IQ data from extracted PRS dumps(chF_gnbX_Y.raw and chT_gnbX_Y.raw) and plot them like below
| ![PRS CFR FR2](../images/PRS_CFR_FR2_64PRB_8rsc.PNG) | ![PRS CIR FR2](../images/PRS_CIR_FR2_64PRB_8rsc.PNG) |
|:----------------------------------------------------:|:----------------------------------------------------:|
<p align="center"><b>Fig.1 - FR2 100MHz test</b></p>
<table style="border-collapse: collapse; border: none;">
<tr style="border-collapse: collapse; border: none;">
<td style="border-collapse: collapse; border: none;">
<img src="./images/PRS_CFR_FR2_64PRB_8rsc.PNG" alt="" border=1 height=400 width=500>
<img src="./images/PRS_CIR_FR2_64PRB_8rsc.PNG" alt="" border=1 height=400 width=500>
</img>
<figcaption align = "center"><b>Fig.1 - FR2 100MHz test</b></figcaption>
</td>
</tr>
</table>

View File

@@ -4,22 +4,22 @@
### Developers: Abhijith A, Shruthi S
## Terminology
# Terminology #
### Bandwidth part (BWP)
## Bandwidth part (BWP) ##
Bandwidth Part (BWP) is a set of contiguous Resource Blocks in the resource grid.
Parameters of a BWP are communicated to UE using RRC parameters: BWP-Downlink and BWP-Uplink.
A UE can be configured with a set of 4 BWPs in uplink (UL) and downlink (DL) direction (3GPP TS 38.331 Annex B.2 Description of BWP configuration options). But only 1 BWP can be active in UL and DL direction at a given time.
## Procedure to run multiple dedicated BWPs
# Procedure to run multiple dedicated BWPs #
A maximum of 4 dedicated BWPs can be configured for a UE.
To configure multiple BWPs, add the following parameters in the physical parameters section:
### Setup of the Configuration files
## Setup of the Configuration files ##
In the configuration file you have the option to select the 1st active BWP, the RIV and SCS of each BWP in the following way (example with 3 additional BWPs):
```
@@ -31,14 +31,14 @@ In the configuration file you have the option to select the 1st active BWP, the
This example configures 3 additional BWPs, with IDs from 1 to 3. Find these parameters in this configuration file: "ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.neighbour.conf"
## Testing gNB and UE in RF simulator
# Testing gNB and UE in RF simulator
### gNB command:
## gNB command:
```
sudo ./nr-softmodem -O ../../../ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.neighbour.conf --rfsim --rfsimulator.serveraddr server
```
### UE command:
## UE command:
```
sudo ./nr-uesoftmodem -C 3319680000 -r 106 --numerology 1 --ssb 516 --band 78 --rfsim --rfsimulator.serveraddr 127.0.0.1
```

View File

@@ -1,3 +1,21 @@
<style type="text/css" rel="stylesheet">
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 13px;
line-height: 18px;
color: #fff;
background-color: #110F14;
}
h2 { margin-left: 20px; }
h3 { margin-left: 40px; }
h4 { margin-left: 60px; }
.func2 { margin-left: 20px; }
.func3 { margin-left: 40px; }
.func4 { margin-left: 60px; }
</style>
```mermaid
flowchart TB
@@ -65,10 +83,11 @@ end
```
This tuto for 5G gNB design, with Open Cells main
{: .text-center}
## The main thread is in ru_thread()
# The main thread is in ru_thread()
The infinite loop:
### rx_rf()
## rx_rf()
Collect radio signal samples from RF board
all SDR processing is triggered by I/Q sample reception and it's date (timestamp)
TX I/Q samples will have a date in the future, compared to RX timestamp
@@ -78,11 +97,11 @@ The infinite loop:
(each sample has a incremental number representing a very accurate timing)
raw incoming data is in buffer called "rxdata"
We derivate frame number, slot number, ... from the RX timestamp
### gNB_top()
{: .func2}
## gNB_top()
only compute frame numbre, slot number, ...
### ocp_rxtx()
{: .func3}
## ocp_rxtx()
main processing for both UL and DL
start by calling oai_subframe_ind() that trigger processing in pnf_p7_subframe_ind() purpose ???
all the context is in the passed structure UL_INFO
@@ -91,92 +110,92 @@ but not actual coherency (see below handle_nr_rach() assumes data is up-to-date)
The first part (in NR_UL_indication, uses the data computed by the lower part (phy_procedures_gNB_uespec_RX), but for the **previous** slot
Then, phy_procedures_gNB_uespec_RX will hereafter replace the data for the next run
This is very tricky and not thread safe at all.
{: .func3}
#### NR_UL_indication()
### NR_UL_indication()
This block processes data already decoded and stored in structures behind UL_INFO
{: .func4}
* handle_nr_rach()
process data from RACH primary detection
if the input is a UE RACH detection
{: .func4}
* nr_schedule_msg2()
{: .func4}
* handle_nr_uci()
handles uplink control information, i.e., for the moment HARQ feedback.
{: .func4}
* handle_nr_ulsch()
handles ulsch data prepared by nr_fill_indication()
{: .func4}
* gNB_dlsch_ulsch_scheduler ()
the **scheduler** is called here, see dedicated chapter
{: .func4}
* NR_Schedule_response()
process as per the scheduler decided
{: .func4}
#### L1_nr_prach_procedures()
### L1_nr_prach_procedures()
????
#### phy_procedures_gNB_uespec_RX()
{: .func4}
### phy_procedures_gNB_uespec_RX()
* nr_decode_pucch0()
actual CCH channel decoding form rxdataF (rx data in frequency domain)
populates UL_INFO.uci_ind, actual uci data is in gNB->pucch
{: .func4}
* nr_rx_pusch()
{: .func4}
* extracts data from rxdataF (frequency transformed received data)
{: .func4}
* nr_pusch_channel_estimation()
{: .func4}
* nr_ulsch_extract_rbs_single()
{: .func4}
* nr_ulsch_scale_channel()
{: .func4}
* nr_ulsch_channel_level()
{: .func4}
* nr_ulsch_channel_compensation()
{: .func4}
* nr_ulsch_compute_llr()
this function creates the "likelyhood ratios"
{: .func4}
* nr_ulsch_procedures()
{: .func4}
* actual ULsch decoding
{: .func4}
* nr_ulsch_unscrambling()
{: .func4}
* nr_ulsch_decoding()
{: .func4}
* nr_fill_indication()
populate the data for the next call to "NR_UL_indication()"
it would be better to call **NR_UL_indication()** now instead of before (on previous slot)
{: .func4}
#### phy_procedures_gNB_TX()
### phy_procedures_gNB_TX()
* nr_common_signal_procedures()
generate common signals
{: .func4}
* nr_generate_dci_top()
generate DCI: the scheduling informtion for each UE in both DL and UL
{: .func4}
* nr_generate_pdsch()
generate DL shared channel (user data)
{: .func4}
#### nr_feptx_prec()
### nr_feptx_prec()
tx precoding
#### nr_feptx0
{: .func3}
### nr_feptx0
do the inverse DFT
#### tx_rf()
{: .func3}
### tx_rf()
send radio signal samples to the RF board
the samples numbers are the future time for these samples emission on-air
{: .func3}
## Scheduler
# Scheduler
The main scheduler function is called by the chain: nr_ul_indication()=>gNB_dlsch_ulsch_scheduler()
It calls sub functions to process each physical channel (rach, ...)
@@ -255,7 +274,7 @@ nr_preprocessor_phytest()], multiple users [nr_dlsch_preprocessor()].
process information, and fill nFAPI structures (allocate a DCI and PDCCH
messages, TX_req, ...)
## RRC
# RRC
RRC is a regular thread with itti loop on queue: TASK_RRC_GNB
it receives it's configuration in message NRRRC_CONFIGURATION_REQ, then real time mesages for all events: S1/NGAP events, X2AP messages and RRC_SUBFRAME_PROCESS
@@ -264,7 +283,7 @@ RRC_SUBFRAME_PROCESS message is send each subframe
how does it communicate to scheduler ?
## RLC
# RLC
RLC code is new implementation, not using OAI mechanisms: it is implemented directly on pthreads, ignoring OAI common functions.
It is a library, running in thread RRC but also in PHY layer threads and some bits in pdcp running thread or F1 interface threads.
@@ -283,9 +302,9 @@ nr_rlc_ms_tick() must be called periodically to manage the internal timers
successful_delivery() and max_retx_reached(): in ??? trigger, the RLC sends a itti message to RRC: RLC_SDU_INDICATION (neutralized by #if 0 right now)
### RLC data flow
## RLC data flow
#### TX Flow
### TX Flow
Incoming data to be transmitted is forwarded to RLC by PDCP via `rlc_data_req()`.
@@ -296,11 +315,11 @@ At the transport layer, in downlink (DL) at the gNB and uplink (UL) at UE, the s
Subsequently, the scheduler issues commands to lower layers.
#### RX Flow
### RX Flow
In the RX chain, in downlink (DL) at the UE and uplink (UL) at gNB, the transport layer pushes data into RLC through `mac_rlc_data_ind()`. Following this, RLC forwards the data to PDCP by invoking `pdcp_data_ind()` via a complex internal callback mechanism (`deliver_sdu()`).
## PDCP
# PDCP
The PDCP implementation is secured by a general mutex, akin to the design of the RLC layer. This setup ensures that PDCP data remains isolated and encapsulated.
@@ -308,19 +327,19 @@ Initialization of the PDCP layer follows a structure similar to that of the RLC
To manage UE connections, `nr_pdcp_add_srbs()` is employed for adding UE SRBs in PDCP, while `nr_pdcp_remove_UE()` is used for their removal. Similarly, `nr_pdcp_add_drbs()` adds UE DRBs in PDCP, with `nr_pdcp_remove_UE()` handling their removal.
### PDCP Tx flow
## PDCP Tx flow
On the Tx side (downlink in gNB), the entry functions `nr_pdcp_data_req_drb()` and `nr_pdcp_data_req_srb()` are called by the upper layer. The upper layer could be GTP or a PDCP internal thread like `gnb_tun_read_thread()`, which reads directly from the Linux socket if the 3GPP core implementation is skipped. The PDCP internals for `nr_pdcp_data_req_srb()` and `nr_pdcp_data_req_drb()` are thread-safe. Within these functions, the PDCP manager protects access to the SDU receiving function of PDCP (`recv_sdu()` callback, corresponding to `nr_pdcp_entity_recv_pdu()` for DRBs) using mutex. When necessary, the PDCP layer pushes this data to RLC by calling `rlc_data_req()`.
### PDCP Rx flow
## PDCP Rx flow
At the Rx side, `pdcp_data_ind()` serves as the entry point for receiving data from RLC. Within `pdcp_data_ind()`, the PDCP manager mutex protects access to the PDU receiving function of PDCP (`recv_pdu()` callback corresponding to `nr_pdcp_entity_recv_pdu()` for DRBs). Following this, the `deliver_sdu_drb()` function dispatches the received data to the SDAP sublayer.
### PDCP security
## PDCP security
nr_pdcp_config_set_security(): sets the keys for AS security of a UE
## AM DRB traffic flow in OAI
# AM DRB traffic flow in OAI
A sequence diagram of the traffic flow across PDCP and RLC layers. By default, data traffic is directed towards AM DRBs.
@@ -411,46 +430,46 @@ and for uplink:
SG->>GG: send to GTP-U
```
## GTP
# GTP
Gtp + UDP are two twin threads performing the data plane interface to the core network
The design is hybrid: thread and inside other threads calls. It should at least be protected by a mutex.
### GTP thread
## GTP thread
Gtp thread has a itti interface: queue TASK_GTPV1_U
The interface is about full definition: control messages (create/delet GTP tunnels) and data messages (user plane UL and DL).
PDCP layer push to the GTP queue (outside UDP thread that do almost nothing and work only with GTP thread) is to push a UL packet.
### GTP thread running code from other layers
## GTP thread running code from other layers
gtp thread calls directly nr_pdcp_data_req_drb(), so it runs inside it's context internal pdcp structures updates
### inside other threads
## inside other threads
gtpv1u_create_s1u_tunnel(), delete tunnel, ... functions are called inside the other threads, without mutex.
## New GTP
### initialization
# New GTP
## initialization
gtpv1uTask(): this creates only the thread, doesn't configure anything
gtpv1Init(): creates a listening socket to Linux for a given reception and select a local IP address
### newGtpuCreateTunnel()
## newGtpuCreateTunnel()
this function will replace the xxx_create_tunnel_xxx() for various cases
The parameters are:
1. outgoing TEid, associated with outpoing pair(rnti, id)
2. incoming packets callback, incoming pair(rnti,id) and a callback function for incoming data
### outgoing packets
## outgoing packets
Each call to newGtpuCreateTunnel() creates a outgoing context for a teid (given as function input), a pair(rnti,outgoing id).
Each outgoing packet received on GTP-U ITTI queue must match one pair(rnti,id), so the gtp-u thread can lookup the related TEid and use it to encode the outpoing GTP-U tunneled packet.
### incoming packets
## incoming packets
newGtpuCreateTunnel() computes and return the incoming teid that will be used for incoming packets.
When a incoming packet arrives on this incoming teid, the GTP-U thread calls the defined callback, with the associated pair(rnti, incoming id).
stuff like enb_flag, mui and more important data are not given explicitly by any legacy function (gtpv1u_create_s1u_tunnel), but the legacy and the new interface to lower layer (like pdcp) require this data. We hardcode it in first version.
### remaining work
## remaining work
These teids and "instance", so in a Linux socket: same teid can co-exist for different sockets
Remain here a lack to fill: the information given in the legacy funtions is not enough to fullfil the data needed by the callback
@@ -459,10 +478,17 @@ cmake new option: NEW_GTPU to use the new implementation (it changes for the ent
It is possible to use both old and new GTP in same executable because the itti task and all functions names are different
Current status of new implementation: not tested, X2 not developped, 5G new GTP option not developped, remain issues on data coming from void: muid, enb_flag, ...
## NGAP
# NGAP
NGAP would be a itti thread as is S1AP (+twin thread SCTP that is almost void processing)?
About all messages are exchanged with RRC thread
<div class="panel panel-info">
**Note**
{: .panel-heading}
<div class="panel-body">
</div>
</div>

View File

@@ -0,0 +1,143 @@
# OpenAirInterface for SystemX
# Terminology
****This document use the 5G terminology****
**Central Unit (CU):** It is a logical node that includes the gNB
functions like Transfer of user data, Mobility control, Radio access
network sharing, Positioning, Session Management etc., except those
functions allocated exclusively to the DU. CU controls the operation of
DUs over front-haul (Fs) interface. A central unit (CU) may also be
known as BBU/REC/RCC/C-RAN/V-RAN/VNF
**Distributed Unit (DU):** This logical node includes a subset of the
gNB functions, depending on the functional split option. Its operation
is controlled by the CU. Distributed Unit (DU) also known with other
names like RRH/RRU/RE/RU/PNF.
In OpenAir code, the terminology is often RU and BBU.
# OpenAirUsage
## EPC and general environment
### OAI EPC
Use the stable OAI EPC, that can run in one machine (VM or standalone)
Draft description:
<https://open-cells.com/index.php/2017/08/22/all-in-one-openairinterface-august-22nd/>
## Standalone 4G
EPC+eNB on one machine, the UE can be commercial or OAI UE.
### USRP B210
Main current issue: traffic is good only on coaxial link between UE and
eNB (probably power management issue).
### Simulated RF
Running eNB+UE both OAI can be done over a virtual RF link.
The UE current status is that threads synchronization is implicit in
some cases. As the RF simulator is very quick, a “sleep()” is required
in the UE main loop
(line 1744, targets/RT/USER/lte-ue.c).
Running also the UE in the same machine is possible with simulated RF.
Running in same machine is simpler, offers about infinite speed for
virtual RF samples transmission.
A specific configuration is required because the EPC Sgi interface has
the same IP tunnel end point as the UE.
So, we have to create a network namespace for the UE and to route data
in/out of the namespace.
```bash
ip netns delete aNameSpace 2&gt; /dev/null
ip link delete v-eth1 2&gt; /dev/null
ip netns add aNameSpace
ip link add v-eth1 type veth peer name v-peer1
ip link set v-peer1 netns aNameSpace
ip addr add 10.200.1.1/24 dev v-eth1
ip link set v-eth1 up
iptables -t nat -A POSTROUTING -s 10.200.1.0/255.255.255.0 -o enp0s31f6 \
-j MASQUERADE
iptables -A FORWARD -i enp0s31f6 -o v-eth1 -j ACCEPT
iptables -A FORWARD -o enp0s31f6 -i v-eth1 -j ACCEPT
ip netns exec aNameSpace ip link set dev lo up
ip netns exec aNameSpace ip addr add 10.200.1.2/24 dev v-peer1
ip netns exec aNameSpace ip link set v-peer1 up
ip netns exec aNameSpace bash
```
After the last command, the Linux shell is in the new namespace, ready
to run the UE.
To make user plan traffic, the traffic generator has to run in the same
namespace
```bash
ip netns exec aNameSpace bash
```
The traffic genenrator has to specify the interface:
```bash
route add default oaitun_ue1
```
or specify the outgoing route in the traffic generator (like option “-I”
in ping command).
## 5G and F1
Today 5G achievement is limited to physical layer.
The available modulation is 40MHz, that require one X310 or N300 for the
gNB and a X310 or N300 for the nrUE.
### Usage with X310
Linux configuration:
<https://files.ettus.com/manual/page_usrp_x3x0_config.html>
We included most of this configuration included in OAI source code.
Remain to set the NIC (network interface card) MTU to 9000 (jumbo
frames).
### Running 5G
Usage with RFsimulator:
**gNB**
```bash
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf
```
**nrUE**
```bash
sudo ./nr-uesoftmodem --numerology 1 -r 106 -C 3510000000 -d --rfsimulator.serveraddr 127.0.0.1
```

View File

@@ -25,8 +25,8 @@
| gracehopper3-oai | Gracehopper3 | build | -- |
| acamas | Acamas | 4G and 5G rfsimulator| -- |
> **Note:** The available resources, and their current usage, is indicated here:
> - [Lockable resources of jenkins-oai](https://jenkins-oai.eurecom.fr/lockable-resources/):
Note: The available resources, and their current usage, is indicated here:
- [Lockable resources of jenkins-oai](https://jenkins-oai.eurecom.fr/lockable-resources/):
"New" Jenkins, i.e., with RAN-Container-Parent
## Testbenches
@@ -35,42 +35,42 @@
**Purpose**: Over-the-air 4G/5G (NSA/SA) tests, performance tests
![5G OTA Testbench](../testbenches_doc_resources/images/5g-ota-bench.png)
![5G OTA Testbench](testbenches_doc_resources/5g-ota-bench.png)
[LaTeX/TikZ version](../testbenches_doc_resources/tex/5g-ota-bench.tex) if you want to modify to reflect your setup
[LaTeX/TikZ version](testbenches_doc_resources/5g-ota-bench.tex) if you want to modify to reflect your setup
### 5G NSA/Faraday Cage Testbench
**Purpose**: Faraday cage 5G tests, functional tests
![5G NSA/Faraday Cage Testbench](../testbenches_doc_resources/images/5g-nsa-faraday-bench.png)
![5G NSA/Faraday Cage Testbench](testbenches_doc_resources/5g-nsa-faraday-bench.png)
[PDF version](../testbenches_doc_resources/pdfs/5g-nsa-faraday-bench.pdf) | [LaTeX/TikZ version](../testbenches_doc_resources/tex/5g-nsa-faraday-bench.tex) if you want to modify to reflect your setup
[PDF version](testbenches_doc_resources/5g-nsa-faraday-bench.pdf) | [LaTeX/TikZ version](testbenches_doc_resources/5g-nsa-faraday-bench.tex) if you want to modify to reflect your setup
### 5G AW2S Testbench
**Purpose**: AW2S tests with Amarisoft UE simulator
![5G AW2S Testbench](../testbenches_doc_resources/images/5g-aw2s-bench.png)
![5G AW2S Testbench](testbenches_doc_resources/5g-aw2s-bench.png)
[PDF version](../testbenches_doc_resources/pdfs/5g-aw2s-bench.pdf) | [LaTeX/TikZ version](../testbenches_doc_resources/tex/5g-aw2s-bench.tex) if you want to modify to reflect your setup
[PDF version](testbenches_doc_resources/5g-aw2s-bench.pdf) | [LaTeX/TikZ version](testbenches_doc_resources/5g-aw2s-bench.tex) if you want to modify to reflect your setup
### 5G UE OTA Testbench
**Purpose**: Over-the-air 5G tests with OAI UE
![OAI UE Testbench](../testbenches_doc_resources/images/5g-nrue-bench.png)
![OAI UE Testbench](testbenches_doc_resources/5g-nrue-bench.png)
[PDF version](../testbenches_doc_resources/pdfs/5g-nrue-bench.pdf) | [LaTeX/TikZ version](../testbenches_doc_resources/tex/5g-nrue-bench.tex) if you want to modify to reflect your setup
[PDF version](testbenches_doc_resources/5g-nrue-bench.pdf) | [LaTeX/TikZ version](testbenches_doc_resources/5g-nrue-bench.tex) if you want to modify to reflect your setup
### 4G Testbench(es)
**Purpose**: 4G/LTE testbenches
![4G Faraday Cage Testbench](../testbenches_doc_resources/images/4g-faraday-bench.png)
![4G Faraday Cage Testbench](testbenches_doc_resources/4g-faraday-bench.png)
[PDF version](../testbenches_doc_resources/pdfs/4g-faraday-bench.pdf) | [LaTeX/TikZ version](../testbenches_doc_resources/tex/4g-faraday-bench.tex) if you want to modify to reflect your setup
[PDF version](testbenches_doc_resources/4g-faraday-bench.pdf) | [LaTeX/TikZ version](testbenches_doc_resources/4g-faraday-bench.tex) if you want to modify to reflect your setup
## Pipelines
@@ -80,7 +80,7 @@
Webhook ~documentation ~BUILD-ONLY ~4G-LTE ~5G-NR ~nrUE
This pipeline has basically two main stages, as follows. For the image build,
please also refer to the [dedicated documentation](../../docker/README.md) for
please also refer to the [dedicated documentation](../docker/README.md) for
information on how the images are built.
#### Image Build pipelines
@@ -113,7 +113,11 @@ information on how the images are built.
- [RAN-Ubuntu18-Image-Builder](https://jenkins-oai.eurecom.fr/job/RAN-Ubuntu18-Image-Builder/)
~BUILD-ONLY ~4G-LTE ~5G-NR ~nrUE
- run formatting check from `ci-scripts/docker/Dockerfile.formatting.ubuntu`
<<<<<<< HEAD
- obelix: Ubuntu 22 image build using docker (Note: builds U22 images while pipeline is named U18!)
=======
- obelix: Ubuntu image build using docker (Note: builds Ubuntu images of newer version while pipeline is named U18!)
>>>>>>> develop
- base image from `Dockerfile.base.ubuntu`
- build image from `Dockerfile.build.ubuntu`, followed by
- target image from `Dockerfile.eNB.ubuntu`
@@ -128,13 +132,19 @@ information on how the images are built.
- build unit tests from `ci-scripts/docker/Dockerfile.unittest.ubuntu`, and run them
- [RAN-Ubuntu-ARM-Image-Builder](https://jenkins-oai.eurecom.fr/job/RAN-Ubuntu-ARM-Image-Builder/)
~BUILD-ONLY ~4G-LTE ~5G-NR
<<<<<<< HEAD
- gracehopper3-oai: ARM Ubuntu 22 image build using docker
=======
- gracehopper3-oai: ARM Ubuntu image build using docker
>>>>>>> develop
- base image from `Dockerfile.base.ubuntu`
- build image from `Dockerfile.build.ubuntu`, followed by
- target image from `Dockerfile.gNB.ubuntu`
- target image from `Dockerfile.nr-cuup.ubuntu`
- target image from `Dockerfile.nrUE.ubuntu`
- target image from `Dockerfile.gNB.aerial.ubuntu`
<<<<<<< HEAD
=======
- [RAN-Ubuntu-Jetson-Image-Builder](https://jenkins-oai.eurecom.fr/job/RAN-Ubuntu-Jetson-Image-Builder/)
~BUILD-ONLY ~4G-LTE ~5G-NR
- jetson3-oai: ARMv8 Ubuntu image build using docker
@@ -143,6 +153,7 @@ information on how the images are built.
- target image from `Dockerfile.gNB.ubuntu`
- target image from `Dockerfile.nr-cuup.ubuntu`
- target image from `Dockerfile.nrUE.ubuntu`
>>>>>>> develop
#### Image Test pipelines
@@ -183,15 +194,15 @@ information on how the images are built.
- [RAN-PhySim-Cluster-4G](https://jenkins-oai.eurecom.fr/job/RAN-PhySim-Cluster-4G/)
~4G-LTE
- tests 4G physical simulators (`nr_dlsim`, etc.) in OpenShift Cluster (x86)
- see [`../usage/physical-simulators.md`](../usage/physical-simulators.md) for an overview
- see [`./physical-simulators.md`](./physical-simulators.md) for an overview
- [RAN-PhySim-Cluster-5G](https://jenkins-oai.eurecom.fr/job/RAN-PhySim-Cluster-5G/)
~5G-NR ~nrUE
- tests 5G physical simulators (`nr_dlsim`, etc.) in OpenShift Cluster (x86)
- see [`../usage/physical-simulators.md`](../usage/physical-simulators.md) for an overview
- see [`./physical-simulators.md`](./physical-simulators.md) for an overview
- [RAN-PhySim-GraceHopper-5G](https://jenkins-oai.eurecom.fr/job/RAN-PhySim-GraceHopper-5G/)
~5G-NR ~nrUE
- tests 5G physical simulators (`nr_dlsim`, etc.) on Nvidia GraceHopper (ARMv9)
- see [`../usage/physical-simulators.md`](../usage/physical-simulators.md) for an overview
- see [`./physical-simulators.md`](./physical-simulators.md) for an overview
- [RAN-RF-Sim-Test-4G](https://jenkins-oai.eurecom.fr/job/RAN-RF-Sim-Test-4G/)
~4G-LTE
- acamas (eNB, lteUE, OAI EPC)
@@ -279,7 +290,7 @@ steps look like this:
might need to change IP information in the config to match your core.
If you wish, you can rebuild CI images locally following [these
steps](../../docker/README.md) and then use the docker-compose file directly.
steps](../docker/README.md) and then use the docker-compose file directly.
Some tests are run from source (e.g.
`ci-scripts/xml_files/gnb_phytest_usrp_run.xml`), which directly give the
@@ -300,7 +311,7 @@ as of which the pipeline failed. Let's assume the coredump is stored at
`/tmp/coredump.tar.xz`, and the image is in `/tmp/oai-nr-ue.tar.gz`. First, you
should check out the corresponding branch (or directly the commit), let's say
in `~/oai-branch-fail`. Now, unpack the core dump, load the image into docker,
and use the script [`docker/debug_core_image.sh`](../../docker/debug_core_image.sh)
and use the script [`docker/debug_core_image.sh`](../docker/debug_core_image.sh)
to open gdb, as follows:
```
@@ -340,7 +351,7 @@ right image (Ubuntu or RHEL)!
#### Core dump in a file
> **This is not recommended, as files could pile up and fill the system disk
**This is not recommended, as files could pile up and fill the system disk
completely!** Prefer another method further down.
If the core pattern is a path: it should at least include the time in the
@@ -363,7 +374,7 @@ sudo coredumpctl dump <PID> > /tmp/coredump
#### Core dump via abrt (automatic bug reporting tool)
> TBD: use the documentation page for the moment.
TBD: use the documentation page for the moment.
#### Core dump via apport

View File

@@ -6,11 +6,13 @@ STATUS 2020/10/15 : added External Resources section and links
## External Resources
Additional Resources to this page can be found [here](https://docs.google.com/document/d/1pL8Szm0ocGxdl5ESVp12Ff71a4PbhCb9SpvbLZzwYbo/edit?usp=sharing) (special mention to Walter Maguire, [wmaguire@live.com](mailto:wmaguire@live.com)).
Additional Resources to this page can be found here (special mention to Walter Maguire <wmaguire@live.com>) :
https://docs.google.com/document/d/1pL8Szm0ocGxdl5ESVp12Ff71a4PbhCb9SpvbLZzwYbo/edit?usp=sharing
At time of writing, the openairinterface5G Commit Tag is 2020.w39
Faraday Cages can be found [here](http://www.saelig.com/MFR00066/ste2300.htm)
Faraday Cages can be found here :
http://www.saelig.com/MFR00066/ste2300.htm
## Configuration Overview
@@ -35,32 +37,32 @@ Our code might not work with all 5G phones yet, but we are constantly improving
* Simcom SIMCOM8200EA
* Quectel RM500Q-GL
> **Note1:** In the version we have at Eurecom, you need to set the PLMN to 50501, and you also need to change the firmware to "11.0.0 (RD1A.201105.003.B1, Nov 2020, EU carriers)" (see [Factory Images for Nexus and Pixel Devices](https://developers.google.com/android/images))
Note1: In the version we have at Eurecom, you need to set the PLMN to 50501, and you also need to change the firmware to "11.0.0 (RD1A.201105.003.B1, Nov 2020, EU carriers)" (see https://developers.google.com/android/images)
## Repository
[OAI](https://gitlab.eurecom.fr/oai/openairinterface5g/tree/develop)
https://gitlab.eurecom.fr/oai/openairinterface5g/tree/develop
## Architecture Setup
The scheme below depicts our typical setup:
![image info](../images/oai_fr1_setup.jpg)
![image info](./testing_gnb_w_cots_ue_resources/oai_fr1_setup.jpg)
The photo depicts the FR1 setup part of the scheme above:
![image info](../images/oai_fr1_lab.jpg)
![image info](./testing_gnb_w_cots_ue_resources/oai_fr1_lab.jpg)
## Build and Install
General guidelines to build eNB and gNB :
See [Building UE, eNB and gNb executables](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/doc/BUILD.md#building-ues-enodeb-and-gnodeb-executables)
See https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/doc/BUILD.md#building-ues-enodeb-and-gnodeb-executables
- **eNB**
```bash
```
cd <your oai installation directory>/openairinterface5g/
source oaienv
cd cmake_targets/
@@ -70,7 +72,7 @@ cd cmake_targets/
- **gNB**
```bash
```
cd <your oai installation directory>/openairinterface5g/
source oaienv
cd cmake_targets/
@@ -81,7 +83,8 @@ cd cmake_targets/
- **EPC**
for reference:
[DEPLOY_HOME_MAGMA_MME](https://github.com/OPENAIRINTERFACE/openair-epc-fed/blob/master/docs/DEPLOY_HOME_MAGMA_MME.md)
https://github.com/OPENAIRINTERFACE/openair-epc-fed/blob/master/docs/DEPLOY_HOME.md
## Configuration Files
@@ -90,17 +93,15 @@ Each component (EPC, eNB, gNB) has its own configuration file.
These config files are passed as arguments of the run command line, using the option -O \<conf file\>
The **REFERENCE** files for eNB and gNB, **used by the CI**, can be found here:
* [enb conf file](../../ci-scripts/conf_files/enb.band7.25prb.usrpb200.tm1.conf)
* [gnb conf file](../../ci-scripts/conf_files/gnb-du.sa.band78.106prb.usrpb200.conf)
[enb conf file](../ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf)
[gnb conf file](../ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf)
These files have to be updated manually to set the IP addresses and frequency.
---
>**⚠️ ATTENTION ⚠️**
>
>An **EXTERNAL** clock is used to sync the eNB and gNB, whether the clock is internal or external is defined in the configuration files (!! details needed !!)
>
---
**ATTENTION** : an **EXTERNAL** clock is used to sync the eNB and gNB,
whether the clock is internal or external is defined in the configuration files (!! details needed !!)
1- In the **eNB configuration file** :
- look for MME IP address, and update the **ipv4 field** with the IP address of the **EPC** server
@@ -197,13 +198,14 @@ The test takes typically a few seconds, max 10-15 seconds. If it takes more than
- **EPC** (on EPC host):
for reference:
[DEPLOY_HOME_MAGMA_MME](https://github.com/OPENAIRINTERFACE/openair-epc-fed/blob/master/docs/DEPLOY_HOME_MAGMA_MME.md)
https://github.com/OPENAIRINTERFACE/openair-epc-fed/blob/master/docs/DEPLOY_HOME.md
- **eNB** (on the eNB host):
Execute:
```bash
```
~/openairinterface5g/cmake_targets/ran_build/build$ sudo ./lte-softmodem -O **YOUR_ENB_CONF_FILE** | tee **YOUR_LOG_FILE**
```
@@ -211,16 +213,13 @@ Execute:
- **gNB** (on the gNB host)
---
>**⚠️ ATTENTION ⚠️**
>
> For the gNB execution:
> - The **-E** option is required to enable the tri-quarter sampling rate when using a B2xx serie USRP
> - The **-E** option is **NOT supported** when using a a N300 USRP
---
**ATTENTION** : for the gNB execution,
The **-E** option is required to enable the tri-quarter sampling rate when using a B2xx serie USRP
The **-E** option is **NOT supported** when using a a N300 USRP
Execute:
```bash
```
~/openairinterface5g/cmake_targets/ran_build/build$ sudo ./nr-softmodem -O **YOUR_GNB_CONF_FILE** -E --nsa | tee **YOUR_LOG_FILE**
```
@@ -230,9 +229,9 @@ Execute:
The test case corresponds to the UE attachement, that is the UE connection and its initial access in 5G, as depicted below:
**Source** : [5G/LTE interworking](https://www.sharetechnote.com/html/5G/5G_LTE_Interworking.html )
**Source** : https://www.sharetechnote.com/html/5G/5G_LTE_Interworking.html
![image info](../images/attach_signaling_scheme.jpg)
![image info](./testing_gnb_w_cots_ue_resources/attach_signaling_scheme.jpg)
The test reaches step **12. E-RAB modifcation confirmation** , eventhough not all the messages will appear in the log file.
@@ -240,8 +239,8 @@ The test reaches step **12. E-RAB modifcation confirmation** , eventhough not al
From the log file that is generated, we can monitor several important steps, to assess that the test was successful.
Log files examples can be found here:
* [enb log file](../testing_oai_nsa_w_cots_ue_resources/oai_enb.log)
* [gnb log file](../testing_oai_nsa_w_cots_ue_resources/oai_gnb.log)
[enb log file](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/rh_doc_update_3/doc/testing_gnb_w_cots_ue_resources/oai_enb.log)
[gnb log file](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/rh_doc_update_3/doc/testing_gnb_w_cots_ue_resources/oai_gnb.log)
- eNB receives UE capabilities information, including its NR capabilites, and triggers sGNB Addition Request message:

31
doc/UL_MIMO.txt Normal file
View File

@@ -0,0 +1,31 @@
# how to build phy sim
cd cmake_targets/
sudo ./build_oai --phy_simulators -c
cd phy_simulators/build/
# ULSCH sim
# bit level validation
# PUSCH encoding and decoding for 4 layers 2 CMD without data
sudo ./nr_ulschsim -R 106 -m9 -s13 -n100 -y4 -z4 -W4
# UL sim
# Uplink chain validation
# PUSCH on UE side and gNB side,whole chain for PUSCH
# No channel model on data domain signal
# No cross-path connection
# PMI = 0 is only unitary prcoding matrix
sudo ./nr_ulsim -n100 -m9 -r106 -s13 -W4 -y4 -z4
# How to build rfsim
sudo ./build_oai -c --gNB --nrUE -w SIMU
# How to run with rfsim
# 4x4 RANK 4
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.4layer.conf --rfsim --phy-test --l 2 --L 4
sudo ./nr-uesoftmodem --rfsim --phy-test --ue-nb-ant-rx 4 --ue-nb-ant-tx 4
# 4x4 RANK 2
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.4layer.conf --rfsim --phy-test --l 2 --L 2
sudo ./nr-uesoftmodem --rfsim --phy-test --ue-nb-ant-rx 4 --ue-nb-ant-tx 4

View File

@@ -12,7 +12,7 @@ GoogleTest is a C++ unit testing framework that has been added as an external de
See [primer](http://google.github.io/googletest/primer.html) for a quick introduction. To add it to your test executable link against
`GTest::gtest` or `GTest::gtest_main`.
## How to compile tests
# How to compile tests
To compile only the tests, a special target `tests` is available. It has to be
enabled with the special cmake variable `ENABLE_TESTS`:
@@ -26,7 +26,7 @@ ninja tests
The user can use either `ninja` or `make`.
## Run unit tests
# Run unit tests
Then, you can run `ctest` to run all tests:
@@ -75,7 +75,7 @@ if(ENABLE_TESTS)
endif()
```
> **Note** that this might get more complicated, e.g., typically you will have to
Note that this might get more complicated, e.g., typically you will have to
link some library into the executable with `target_link_libraries()`, or pass
some option to the test program.
@@ -116,7 +116,7 @@ that directory directly, which you might also use to compare to the
directly declare the executable in `add_test()`, and `ctest` will locate and
run the executable properly.
## Benchmarking
# Benchmarking
Google benchmark can be used to profile and benchmark small pieces of code. See
`benchmark_rotate_vector` for reference implementation. To start benchmarking code,
@@ -147,7 +147,7 @@ BM_rotate_cpx_vector/16384 4220 ns 4220 ns 169070
BM_rotate_cpx_vector/20000 5288 ns 5289 ns 136190
```
### Comparing results
## Comparing results
Benchmark results can be output to json by using command line arguments, example below

View File

@@ -2,7 +2,7 @@ This document explains the implementation of analog beamforming in OAI codebase.
[[_TOC_]]
## Introduction to analog beamforming
# Introduction to analog beamforming
Beamforming is a technique applied to antenna arrays to create a directional radiation pattern. This often consists in providing a different phase shift to each element of the array such that signals with a different angle of arrival/departure experience a change in radiation pattern because of constructive or destructive interference.
@@ -12,9 +12,9 @@ The presence of a limited number of predefined beams at RU poses constraints to
Analog beamforming implementation also allows to enable distributed antenna systems (DAS), where each beam corrisponds to one antenna (or a set of antennas) of the system. In this scenario, the scheduler constaint is alleviated because normally the number of concurrent beams allowed equals the total number of beams.
## Configuration file fields for analog beamforming
# Configuration file fields for analog beamforming
A set of parameters in configuration files controls the implementation of analog beamforming and instructs the scheduler on how to behave in such scenarios. Since most notably this technique in 5G is employed in FR2, the configuration file example currently available is a RFsim one for band 261. [Config file example](../../ci-scripts/conf_files/gnb.sa.band261.u3.32prb.rfsim.conf)
A set of parameters in configuration files controls the implementation of analog beamforming and instructs the scheduler on how to behave in such scenarios. Since most notably this technique in 5G is employed in FR2, the configuration file example currently available is a RFsim one for band 261. [Config file example](../ci-scripts/conf_files/gnb.sa.band261.u3.32prb.rfsim.conf)
In the `MACRLC` section of configuration files, there are three new parameters: `set_analog_beamforming`, `beam_duration` and `beams_per_period`. The explanation of these parameters is here provided:
- `set_analog_beamforming` can be set a value equal to 1 or 2 to activate or 0 to desactivate analog beamforming (default value is 0)
@@ -26,7 +26,7 @@ Setting analog beamforming to 1 or 2 changes the way FAPI beam index is treated.
DAS is enabled by setting to 1 the parameter `enable_das` in the L1 section of the configuration file. In case of DAS enabled, the field `beam_weights` in `MACRLC` section can be omitted.
## Implementation in OAI scheduler
# Implementation in OAI scheduler
A new MAC structure `NR_beam_info_t` controls the behavior of the scheduler in presence of analog beamforming. Besides the already mentioned parameters `beam_duration` and `beams_per_period`, the structure also holds a matrix `beam_allocation[i][j]`, whose indices `i` and `j` stands respectively for the number of beams in the period and the slot index (the size of the latter depends on the frame characteristics).
This matrix contains the beams already allocated in a given slot, to flag the scheduler to use one of these to schedule a UE in one of these beams. If the matrix is full (all the beams in the given period, e.g. slot) are already allocated, the scheduler can't allocate a UE in a new beam.
@@ -34,7 +34,7 @@ To this goal, we extended the virtual resource block (VRB) map by one dimension
It is important to note that in current implementation, there are several periodical channels, e.g. PRACH or PUCCH for CSI et cetera, that have the precendence in being assigned a beam, that is because the scheduling is automatic, set in RRC configuration, and not up to the scheduler. For these instances, we assume the beam is available (if not there are assertions to stop the process). For data channels, the currently implemented PF scheduler is used. The only modification is that a UE can be served only if there is a free beam available or the one of the beams already in use correspond to that UE beam.
## FAPI implementation
# FAPI implementation
To be noted that in our implementation analog beamforming is only supported in non-split/monolithic mode because we don't support yet SCF P19 interface that would be needed to manage these procedure in a split scenario with SCF FAPI.
@@ -46,14 +46,14 @@ In `config_request` structure, a vendor extension (`nfapi_nr_analog_beamforming_
Additionally, L2 provides in each channel FAPI message information about the beam index. Small Cell Forum (SCF) FAPI provides in its PHY API specifications for the channels only a field for digital beamforming as part of the `precoding_and_beamforming` stucture. Therefore without a better option, we are currently using that one to store the internal analog beamforming index. This is the index used internally by the code to progressively identify the beam with a value from 0 to `total_num_beams_vendor_ext`.
## L1 implementation
# L1 implementation
To handle multiple concurrent beams, the buffers containing Tx and Rx data in frequency domain (`txdataF` and `rxdataF`) have been extended by one dimension to contain multiple concurrent beams to be transmitted/received.
The function `beam_index_allocation`, called by every L1 channel, is responsible to match the FAPI analog beam index to the RU beam index and to store the latter `beam_id` structure, which allocates the beams per symbol, despite L2 only supporting beam change at slot level. At the same time, the function returns the concurrent beam index, to be used to store data in frequency domain buffers. While doing so, the function also checks if there is room for current beam in the list of concurrent beams, which should always be the case, if L2 properly allocated the channels.
In case of DAS, since each beam corresponds to a specific antenna port, the `beam_index_allocation` function is simplified in the sense that the beam index corresponds to the antenna port index of the frequency domain buffers.
## RU implementation
# RU implementation
The implementation is still work in progress.

View File

@@ -1,15 +1,15 @@
We use [clang-format](https://clang.llvm.org/docs/ClangFormat.html) to format our code.
## Integration into editors
# Integration into editors
Integration into various editors (`vim`, `emacs`, `VSCode`, `CLion`) is on the
[clang-format project page](https://clang.llvm.org/docs/ClangFormat.html).
There is also an [eclipse plugin](https://github.com/wangzw/CppStyle).
## Integration into git
# Integration into git
### Short version
## Short version
See below for a more detailed explanation. In short: Add this to `~/.gitconfig`:
```
@@ -24,7 +24,7 @@ diff`. To add modified lines to your commit, stage them as well, then commit.
There is also a pre-commit hook that you can install. To install it, copy it
`pre-commit-clang` to `.git/hooks/pre-commit`, and make it executable.
### Long version
## Long version
In order to integrate `clang-format` into `git`, follow these steps:
@@ -65,6 +65,6 @@ When this is done, you are set up. How to use:
6) Commit. It won't work if code is not properly formatted due to the
pre-commit hook. Force committing with `git commit --no-verify`
## Checking errors introduced by a branch
# Checking errors introduced by a branch
Here is the script that can be used to detect any clang-format errors introduced by a branch [here](../../tools/formatting/README.md)
Here is the script that can be used to detect any clang-format errors introduced by a branch [here](../tools/formatting/README.md)

View File

@@ -4,13 +4,13 @@ review is performed.
[[_TOC_]]
## General
# General
OpenAirInterface employs both human review and automated CI tests to judge
whether a code contribution is ready to be merged.
The contributor has to sign a contributor license agreement (CLA) as described
in [`CONTRIBUTING.md`](../../CONTRIBUTING.md). After creating an account on the
in [`CONTRIBUTING.md`](../CONTRIBUTING.md). After creating an account on the
Eurecom Gitlab, the contributor can open a merge request: he becomes the
"author" of such code contribution. A senior OAI member will review this work,
and make suggestions for possible improvements. Each week, we discuss the
@@ -19,18 +19,18 @@ call](https://gitlab.eurecom.fr/oai/openairinterface5g/-/wikis/OpenAirDevMeeting
and discuss which merge requests can be merged.
The CI consists in various Jenkins pipelines that run on each merge request.
See [`TESTBenches.md`](../testing/TESTBenches.md) for more details about the CI setup.
See [`TESTBenches.md`](./TESTBenches.md) for more details about the CI setup.
There is the official [Gitlab Help](https://docs.gitlab.com/) that can help you
with any questions regarding Gitlab. We recommend reading the [Git
Book](https://git-scm.com/book/en/v2) to use Git properly.
## Basic coding rules
# Basic coding rules
You should respect the `.clang-format` file in the root of the repository. The
`clang-format` tool will pick up this file when being applied to code in the
repository. Please also refer to the [corresponding
documentation](clang-format.md).
documentation](./clang-format.md).
A number of high-level comments:
@@ -64,9 +64,9 @@ document](https://gitlab.eurecom.fr/oai/openairinterface5g/-/wikis/documents/ope
that might be useful; if this document and `.clang-format` contradict,
`.clang-format` takes precedence.
## Main Workflow and Versioning
# Main Workflow and Versioning
### Workflow
## Workflow
You should be familiar with git branching, merging, and rebasing.
@@ -113,7 +113,7 @@ After some time, we make a stable release. For this, we simply merge develop
into master, and give a semantic versioning number, e.g., `v1.1`. We target to
make releases bi-yearly.
### How to manage your own branch
## How to manage your own branch
Before starting to work, please make sure to branch off the latest `develop`
branch. Make commits as appropriate.
@@ -153,7 +153,7 @@ Once you rebased, push the changes to the remote
$ git push origin my-new-feature --force-with-lease # force with lease let's you only overwrite what you also have locally in origin/my-new-feature
```
## Merge Requests
# Merge Requests
A merge request (MR) can be submitted as soon as the code is considered stable
and reviewable. The idea is to start the review early enough so that the code
@@ -196,7 +196,7 @@ Failure to add a label will prevent the CI from running. You can add both
CI posts the results in the comments section of the merge request. Both merge
request authors and reviewers are responsible for manual inspection and
pre-filtering of the CI results. An overview of the CI tests is in
[`TESTBenches.md`](../testing/TESTBenches.md).
[`TESTBenches.md`](./TESTBenches.md).
To communicate the review progress both between author and reviewer, as well as
to the outside world, we (ab-)use the milestones feature of Gitlab to track the
@@ -215,7 +215,7 @@ during its lifetime in the sidebar on the right. Following options:
- %OK_TO_BE_MERGED: the OAI team plans to merge this; *do not push any changes
anymore at this point*.
## Review Form
# Review Form
The following is a check list that might be used by a reviewer to check that
code contribution fulfils minimum standard w.r.t. formatting, data types,
@@ -244,9 +244,9 @@ Additional optional questions in case they apply:
- Has a new tool/dependency been introduced? Needs to be discussed if to be added.
- Is a new CI test necessary? Can it be done in simulators?
## Reporting bugs
# Reporting bugs
Please report only true bugs in the [issue tracker](../../../issues). Do not
Please report only true bugs in the [issue tracker](../../issues). Do not
report general user problems; use the [mailing
lists](https://gitlab.eurecom.fr/oai/openairinterface5g/-/wikis/MailingList)
instead. If in doubt, prefer the mailing lists and if needed and requested by

View File

@@ -3,7 +3,7 @@ OpenAirInterface Cross-Compiler User Guide: explains how to build OAI for ARM64
[[_TOC_]]
## Environment
# Environment
Tested on Ubuntu 22. Newer version of Ubuntu should work as well, please file a
bug report if not (Gitlab Issues page).
@@ -15,7 +15,7 @@ install the dependencies, if not done already:
cmake_targets/build_oai -I
```
## Install ARM64 dependencies
# Install ARM64 dependencies
Set up for install the package for ARM64.
@@ -57,9 +57,9 @@ The above enables apt to download packages for arm64. It also installs
gcc cross-compilers for ARM64 in version 11. This version needs to match the
versions of gcc defined in the cmake cross-compilation file (`cross-arm.cmake`).
## Build for ARM64
# Build for ARM64
### Build code generation tools for host
## Build code generation tools for host
Use the x86 compiler to build the `ldpc_generators` and generate the header
file in the `ran_build/build` folder. They are necessary during a build for
@@ -76,7 +76,7 @@ cmake ../../..
make -j`nproc` ldpc_generators generate_T
```
### Build executables for ARM64
## Build executables for ARM64
Switch to the `ran_build/build-cross` folder to build the target executables
for ARM. The `cross-arm.cmake` file defines some ARM-specific build tools
@@ -94,7 +94,7 @@ ninja lte-softmodem nr-softmodem nr-cuup oairu lte-uesoftmodem nr-uesoftmodem
ninja params_libconfig coding rfsimulator
```
## Further information
# Further information
You can do the above steps using docker, see dockerfiles
`docker/Dockerfile.base.ubuntu.cross-arm64` and

104
doc/d2d_emulator_setup.txt Normal file
View File

@@ -0,0 +1,104 @@
Scenario 1 : Off-network UE2UE link
SynchREF UE (UE1)
UE1(eth0 - 10.10.10.1)--------UE2(eno1 - 10.10.10.2)
Here's an example of /etc/network/interfaces configuration for UE1
auto eth0
iface eth0 inet static
address 10.10.10.1
netmask 255.255.255.0
gateway 10.10.10.1
Prepare the environment:
- git clone https://gitlab.eurecom.fr/matzakos/LTE-D2D.git #branch: master
This branch contains all the current development for DDPS
- UE MAC<-> UE MAC for Scenario 1
- eNB MAC<->UE MAC (NFAPI Transport)
- RRC Extensions for “on-network” cases
NFAPI configuration (required even for Scenario 1 target)
- git clone https://github.com/cisco/open-nFAPI.git
- cd open-nfapi
- patch -p1 --dry-run < $OPENAIR_HOME/open-nfapi.oai.patch
Validate that there are no errors
- patch -p1 < $OPENAIR_HOME/open-nfapi.oai.patch
OAI build/execute
- export NFAPI_DIR=XXX (place where NFAPI was installed)
- cd cmake_targets
- ./build_oai --UE --ninja
(if necessary, use ./build_oai -I --UE to install required packages)
- cd ran_build/build/
UE1:
- sudo ifconfig oip0 10.0.0.1
- sudo iptables -A POSTROUTING -t mangle -o oip0 -d 224.0.0.3 -j MARK --set-mark 3
- (if necessary) sudo route add default gw 10.10.10.1 eth0
UE2:
- sudo ifconfig oip0 10.0.0.2
- sudo iptables -A POSTROUTING -t mangle -o oip0 -d 224.0.0.3 -j MARK --set-mark 3
- (if necessary) sudo route add default gw 10.10.10.1 eno1
UE1 and UE2: Get and build vencore_app from d2d-l3-stub (branch: l3_stub)
- gcc -I . vencore_app.c -o vencore_app -lpthread
--------------------------------
TEST ONE-TO-MANY
Run UE1 then UE2, for example:
UE1: sudo ./lte-softmodem-stub -U --emul-iface eth0
UE2: sudo ./lte-softmodem-stub -U --emul-iface eno1
Test with Ping
- Sender - UE1: ping -I oip0 224.0.0.3
- Receiver - UE2: using wireshark
Test with Iperf
- Sender - UE1: iperf -c 224.0.0.3 -u -b 0.1M --bind 10.0.0.1 -t 100
- Receiver - UE2: sudo ./mcreceive 224.0.0.3 5001
Filter the incomming packets according to GroupL2Id: receiver (one-to-many) can discard the packets if it doesn't belong to this group.
For the moment, both sender and receiver use the same set of Ids (hardcoded)
UE1 (sender)
- sudo ./lte-softmodem-stub -U --emul-iface eth0
- ./vencore_app #send the sourceL2Id, groupL2Id to OAI
- ping -I oip0 224.0.0.3
UE2(receiver)
- sudo ./lte-softmodem-stub -U --emul-iface eno1
#we can see the incomming packets from OAI log, however, cannot see from Wireshark -> they are discarded at MAC layer
- ./vencore_app #we can see the packets appearing in Wireshark
--------------------------------------
TEST PC5-S (UE1 -sender, UE2 - receiver) and PC5-U for ONE-TO-ONE scenario
Configure UE1/UE2
UE1:
- sudo ifconfig oip0 10.0.0.1
- sudo iptables -A POSTROUTING -t mangle -o oip0 -d 10.0.0.2 -j MARK --set-mark 3
- sudo route add default gw 10.10.10.1 eth0
UE2:
- sudo ifconfig oip0 10.0.0.2
- sudo iptables -A POSTROUTING -t mangle -o oip0 -d 10.0.0.1 -j MARK --set-mark 3
- sudo route add default gw 10.10.10.1 eno1
step 1:
- UE1: sudo ./lte-softmodem-stub -U --emul-iface eth0
step 2:
- UE2: sudo ./lte-softmodem-stub -U --emul-iface eno1
- UE2: ./vencore_app -r #listen to incomming message from PC5-S
step 3:
- UE1: ./vencore_app -s #send a message via PC5-S (e.g., DirectCommunicationRequest)
Generate unicast traffic
UE1: ping -I oip0 10.0.0.2
--------------------------------------
TEST PC5-D
step 1:
- UE1: sudo ./lte-softmodem-stub -U --emul-iface eth0
- UE1: ./vencore_app -d #send a PC5-Discovery-Announcement via PC5D
step 2:
- UE2: sudo ./lte-softmodem-stub -U --emul-iface eno1
- UE2: ./vencore_app -d #send a PC5-Discovery-Announcement via PC5D

View File

@@ -17,7 +17,7 @@ Regarding to the APIs between different services, they are such as the following
The following figure shows OAI gNB and UE with the Data Recording App system architecture.
![OAI gNB and UE with the Data Recording App system architecture](../images/data_recording_arch.svg)
<img src="images/data_recording_arch.svg" alt="OAI gNB and UE with the Data Recording App system architectur" width="1000">
## Required Packages
Install all required system packages with the following commands:
@@ -38,11 +38,11 @@ python3 -m pip install -r common/utils/data_recording/requirements.txt
## Configuration Files
### Main Data Recording JSON Configuration File
The Data Recording application provides configuration file in [JSON](http://www.json.org/) format. It is stored in [common/utils/data_recording/config/config_data_recording.json](../../common/utils/data_recording/config/config_data_recording.json) folder. The main parameters are:
The Data Recording application provides configuration file in [JSON](http://www.json.org/) format. It is stored in [common/utils/data_recording/config/config_data_recording.json](../common/utils/data_recording/config/config_data_recording.json) folder. The main parameters are:
- **data_storage_path**: Path to directory for data storage
- **num_records**: Number of requested data records in slots
- **t_tracer_message_definition_file**: T-Tracer message definition file
- **parameter_map_file**: Parameter mapping dictionary (OAI parameters to standardized metadata). It is located here: [common/utils/data_recording/config/wireless_link_parameter_map.yaml](../../common/utils/data_recording/config/wireless_link_parameter_map.yaml)
- **parameter_map_file**: Parameter mapping dictionary (OAI parameters to standardized metadata). It is located here: [common/utils/data_recording/config/wireless_link_parameter_map.yaml](../common/utils/data_recording/config/wireless_link_parameter_map.yaml)
- **start_frame_number**: It can be used to start the recording from a specific frame, but it is not yet supported.
- **base_station**:
- requested_tracer_messages: Requested base station data traces. The supported messages are:
@@ -119,7 +119,7 @@ The figure below illustrates an example of a JSON Data Recording App configurati
```
### Wireless Link Parameter Map Dictionary
Since every signal recorder has related configuration with different naming scheme, the [common/utils/data_recording/config/wireless_link_parameter_map.yaml](../../common/utils/data_recording/config/wireless_link_parameter_map.yaml) is a dictionary to do the parameters pair between the signal configuration and the SigMF metadata (e.g. OAI parameter name vs. SigMF metadata parameter name). It eases of adoption in case of adding new parameters. In case of changing the name of given parameters in OAI and we need to get those parameters in metadata, the required changes need to be done in the parameter map dictionary.
Since every signal recorder has related configuration with different naming scheme, the [common/utils/data_recording/config/wireless_link_parameter_map.yaml](../common/utils/data_recording/config/wireless_link_parameter_map.yaml) is a dictionary to do the parameters pair between the signal configuration and the SigMF metadata (e.g. OAI parameter name vs. SigMF metadata parameter name). It eases of adoption in case of adding new parameters. In case of changing the name of given parameters in OAI and we need to get those parameters in metadata, the required changes need to be done in the parameter map dictionary.
The following figure shows an example of Wireless Link Parameter Map Dictionary. For example, the frequency range is called in standardized SigMF metadata `frequency_range` while it is called in OAI `freq_range` and it is called in NI 5G NR RFmx `frequency range`.
@@ -141,7 +141,7 @@ The following figure shows an example of Wireless Link Parameter Map Dictionary.
### Global Metadata
There are some metadata parameters that the user may need to change only once. Those parameters have been hard coded in the Data Recording App header.
[common/utils/data_recording/data_recording_app_v1.0.py](../../common/utils/data_recording/data_recording_app_v1.0.py). Those are:
[common/utils/data_recording/data_recording_app_v1.0.py](../common/utils/data_recording/data_recording_app_v1.0.py). Those are:
- The global metadata such as: author, description, sigmf collection file prefix, datetime_offset, enable saving config Data Recording App in json file with recorded data, and name of signal generator (i.e. 5gnr_oai). The name of signal generator is used for parameter mapping dictionary (OAI parameters to standardized metadata).
- The mapping between supported OAI messages and file_name_prefix, scope, and description.
@@ -230,7 +230,7 @@ Run NR gNB Softmodem in RF Simulation:
```
sudo ./cmake_targets/ran_build/build/nr-softmodem -O ./targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band78.sa.fr1.106PRB.1x1.usrpx410_3300MHz.conf --gNBs.[0].min_rxtxtime 6 --rfsim --rfsimulator.serveraddr server --phy-test -d --T_stdout 2 --T_nowait
```
> **Note:** User needs to change the name of gNB config file to your gNB config file.
Note: User needs to change the name of gNB config file to your gNB config file.
It is worth mentioning that the possible values for T-tracer control options
- --T_stdout option: default 1
@@ -285,7 +285,7 @@ python3 data_recording_app_v1.0.py
The recorded data set will be stored in the configured path, assume `/home/user/workarea/oai_recorded_data/`.
The following figure shows an example of recorded data set.
![Example from SigMF recorded data set](../images/sigmf_dataset.svg)
<img src="images/sigmf_dataset.svg" alt="Example from SigMF recorded data set" width="600">
## Overview on Collected Data Set
@@ -482,7 +482,7 @@ For synchronization validation and to show how to read SigMF metadata, a simple
- Number of OFDM symbols = 13
- So, the valid number of bits in the transport block (slot) is: 3312 bits. If we will fill DMRS locations by zeros, the number of bits is: 3744 bits, but it is not done due to the real-timing issues. For Tx scrambled bits data de-serialization, the user can reconstruct the Tx Scrambled Bits Grid (2D Grid) by using the captured DMRS grid or Channel Estimates Grid as a reference and no need to derive the DMRS symbols locations based on 5G NR config parameters.
![Data serialization](../images/data_serialization_tx_scrambled_bit_message.svg)
<img src="images/data_serialization_tx_scrambled_bit_message.svg" alt="Data serialization " width="500">
### To Do List:
- Provide an overview about the different services of the Data Recording App (Data Control Service, Data collection (T-Tracer) Service, Data Conversion Service) and the APIs definition between them.

View File

@@ -1,15 +1,27 @@
# OAI Build Procedures
<table style="border-collapse: collapse; border: none;">
<tr style="border-collapse: collapse; border: none;">
<td style="border-collapse: collapse; border: none;">
<a href="http://www.openairinterface.org/">
<img src="./../images/oai_final_logo.png" alt="" border=3 height=50 width=150>
</img>
</a>
</td>
<td style="border-collapse: collapse; border: none; vertical-align: center;">
<b><font size = "5">OAI Build Procedures</font></b>
</td>
</tr>
</table>
[[_TOC_]]
## Sanitize options in `build_oai`
# Sanitize options in `build_oai`
The `build_oai` script provides various [Instrumentation Options](https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html) to add run-time instrumentation to the code and enable runtime error checkers, i.e. sanitizers, in order to help find various types of bugs in the codebase and eventually enhance the stability of the OAI softmodems. The following sanitizers can be enabled using different build options:
### Address Sanitizer (ASAN)
## Address Sanitizer (ASAN)
[Address Sanitizer](https://github.com/google/sanitizers/wiki/AddressSanitizer) is enabled using the `--sanitize-address` option or its shorthand `-fsanitize=address`. It serves as a fast memory error detector and helps detect issues like out-of-bounds accesses, use-after-free bugs, and memory leaks.
#### Run OAI Softmodem with ASAN on
### Run OAI Softmodem with ASAN on
It is necessary to add the envinronment variable `LD_LIBRARY_PATH` to the run command, e.g.:
```
@@ -17,7 +29,7 @@ cd cmake_targets/ran_build/build
sudo LD_LIBRARY_PATH=. ./nr-softmodem ...
```
#### Possible problems
### Possible problems
On some systems with specific ASan versions, executing a program compiled with
ASan might fail with an error `DEADLYSIGNAL`, or simply a segmentation fault.
@@ -36,7 +48,7 @@ sudo sysctl vm.mmap_rnd_bits=30
which reduces the number of bits for memory mappings used to randomize mmap
base addresses. _This reduces the security of the system._
### Undefined Behavior Sanitizer (UBSAN)
## Undefined Behavior Sanitizer (UBSAN)
[Undefined Behavior Sanitizer](https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html) (UBSAN) is a runtime undefined behavior checker. It uses compile-time instrumentation to catch undefined behavior by inserting code that performs specific checks before operations that may cause it. UBSAN can be activated with the `--sanitize-undefined` option or `-fsanitize=undefined`.
UBSAN offers a range of suboptions that enable precise checks for various types of undefined behavior at runtime. These suboptions can be set by tweaking the [CMakeLists.txt](../../CMakeLists.txt) file. Here is an overview of some key suboptions:
@@ -50,7 +62,7 @@ UBSAN offers a range of suboptions that enable precise checks for various types
* `-fsanitize=object-size`: Checks out-of-bounds pointer accesses.
* `-fsanitize=float-divide-by-zero`: Detects floating-point division by zero.
### Memory Sanitizer
## Memory Sanitizer
To enable [Memory Sanitizer](https://clang.llvm.org/docs/MemorySanitizer.html), use the `--sanitize-memory` option or `-fsanitize=memory`. It requires clang and is incompatible with ASAN and UBSAN. Building with this option helps catch issues related to uninitialized memory reads.
To build with Memory Sanitizer, use the following command:
@@ -58,10 +70,10 @@ To build with Memory Sanitizer, use the following command:
CC=/usr/bin/clang CXX=/usr/bin/clang++ ./build_oai ... --sanitize-memory
```
### Thread Sanitizer
## Thread Sanitizer
[Thread Sanitizer](https://clang.llvm.org/docs/ThreadSanitizer.html) can be activated using the `--sanitize-thread` option or `-fsanitize=thread`. This sanitizer helps identify data races and other threading-related issues in the code.
## Summary of Sanitizer Options
# Summary of Sanitizer Options
- `--sanitize`: Shortcut for using both ASAN and UBSAN.
- `--sanitize-address` or `-fsanitize=address`: Enable ASAN on all targets.

View File

@@ -3,13 +3,14 @@
OAI uses/supports a number of environment variables, documented in the following:
- `NFAPI_TRACE_LEVEL`: set the nfapi custom logging framework's log level; can be one of `error`, `warn`, `note`, `info`, `debug`. Default is `warn`.
- `NR_AWGN_RESULTS_DIR`: directory containing BLER curves for NR L2simulator channel modelling in SISO case
- `NR_MIMO2x2_AWGN_RESULTS_DIR`: directory containing BLER curves for NR L2simulator channel modelling in 2x2 MIMO case
- `OPENAIR_DIR`: should point to the root directory of OpenAirInterface; BLER curves for LTE L2sim channel emulation
- `NR_AWGN_RESULTS_DIR`: directory containing BLER curves for L2simulator channel modelling in SISO case
- `NR_MIMO2x2_AWGN_RESULTS_DIR`: directory containing BLER curves for L2simulator channel modelling in 2x2 MIMO case
- `NVRAM_DIR`: directory to read/write NVRAM data in (5G) `nvram` tool; if not defined, will use `PWD` (working directory)
- `OAI_CONFIGMODULE`: can be used to pass the configuration file instead of `-O`
- `OAI_GDBSTACKS`: if defined when hitting an assertion (`DevAssert()`, `AssertFatal()`, ...), OAI will load `gdb` and provide a backtrace for every thread
- `OAI_RNGSEED`: overwrites any seed for random number generators (RNG) in simulators
- `OAI_THREADPOOLMEASUREMENTS`: path to a file to store thread pool debugging information, see the [thread pool documentation](..common/utils/threadPool/thread-pool.md)
- `OPENAIR_DIR`: should point to the root directory of OpenAirInterface; some code relies on this to get a filename, e.g., BLER curves for L2sim channel emulation
- `USIM_DIR`: directory to read/write USIM data in (4G) `usim` tool; if not defined, will use `PWD` (working directory)
Furthermore, these variables appear in code that is not maintained and maybe not even compiled anywhere:
@@ -18,5 +19,3 @@ Furthermore, these variables appear in code that is not maintained and maybe not
- `SSH_CLIENT`: alternative host to connect to, for CLI, if `REMADDR` is not defined
- `USER`: user name in the command-line interface
- `rftestInputFile`: input file for the `calibration_test` tool
- `OPENAIR2_DIR` : OMV and OMG modules, obsolete
- `TITLE`: OTG module, obsolete

View File

Before

Width:  |  Height:  |  Size: 275 KiB

After

Width:  |  Height:  |  Size: 275 KiB

View File

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View File

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 58 KiB

View File

Before

Width:  |  Height:  |  Size: 102 KiB

After

Width:  |  Height:  |  Size: 102 KiB

View File

@@ -3,39 +3,37 @@ user to run multiple UEs in separate Linux processes/machines/VMs/etc. They use
entity between the UE(s) and eNB. The UEs use nFAPI to communicate with the eNB. The
nFAPI interface allows us to run in an emulated layer 2 mode, meaning that we are bypassing
the layer 1 (PHY) functionality. Because we are bypassing the PHY layer,
channel modeling capabilties have been added in the LTE UE `phy_stub_ue.c` file. To understand
the interfaces between the different components associated with LTE mode, the image is shown below.
![functional_diagram_proxy_lte](../images/functional_diagram_proxy_lte.png)
channel modeling capabilties have been added in the LTE UE phy_stub_ue.c file. To understand
the interfaces between the different components associated with LTE mode, the image
functional_diagram_proxy_lte.png has been provided.
This functionality allows the user to plug in their own channel model and emulate the packet dropping procedure
in real time. The channel modeling has not been provided by EpiSci, but the OAI code
base already has some BLER curves available for use. The channel modeling functionality
that is included in the `phy_stub_ue.c` file only includes the downlink channel modeling.
that is included in the phy_stub_ue.c file only includes the downlink channel modeling.
Any uplink channel modeling must be conducted in some sort of proxy, which would sit
between the UEs and eNB. (A description of the downlink channel modeling is illustrated below).
![Channel_Abstraction_UE_Handling_LTE](../images/Channel_Abstraction_UE_Handling_LTE.PNG)
between the UEs and eNB. (A description of the downlink channel modeling is shown in the
Channel_Abstraction_UE_Handling_LTE.PNG image).
The updates to the OAI code base removed some latent bugs, added multi-UE scalability,
and were tested with a standard bypass proxy between the UE(s) and eNB. The bypass proxy is
publicly available on [GitHub](https://github.com/EpiSci/oai-lte-multi-ue-proxy). With this package,
publicly available on GitHub (https://github.com/EpiSci/oai-lte-multi-ue-proxy). With this package,
various multi-UE scenarios can be tested without the overhead of PHY-layer features
of underlying radios. The features added in the L2 Emulator Mode for LTE are:
- Ease of use of gprof and address sanitizer for debugging purposes
- Updated json files to allow for GDB, real-time debugging capabilities
- Updated logging features to minimally log only key connection milestones. This improves scalability of multiple UEs.
The logging mechanism described here is located in the `log.c` and `log.h` files. The `LOG_MINIMAL`
function allows us to remove most OAI logging and includes `LOG_A(...)` logs and above. The `LOG_A`
logs were chosen as analysis logs to meet EpiSci's internal testing procedure. The `LOG_As`
The logging mechanism described here is located in the log.c and log.h files. The LOG_MINIMAL
function allows us to remove most OAI logging and includes LOG_A(...) logs and above. The LOG_A
logs were chosen as analysis logs to meet EpiSci's internal testing procedure. The LOG_As
only include logs that are considered to be milestones in a given test. For example, a
log indicating that the RACH procedure has been completed for LTE. To select full logging,
set `LOG_MINIMAL = 0` in the `log.h` file.
set LOG_MINIMAL = 0 in the log.h file.
- Updated logging to include time stamp for timing analysis
- Updated memory allocation procedures to correct size requirements
- Added debugging features to handle signal terminations
- `nfapi.c` pullarray8 fix invalid pointer math
- nfapi.c pullarray8 fix invalid pointer math
- Overlapping destination and source memory in memcpy, so updated to memmove to check for this bug
- Advanced error checking mechanisms in critical pack and unpack functions
- Created option for CPU assignment to UE to improve scalability
@@ -43,8 +41,8 @@ set `LOG_MINIMAL = 0` in the `log.h` file.
- Updated random value seeds to minimize probability of error in generation of random values
- Enables capability round robin scheduler if desired
- Enables capability real time scheduler if desired
- Added new standalone functions to the UE phy-layer (`phy_stub_ue.c`) to incorporate individual UE entities
- Updated sending and packing functions in UE (`lte_ue.c`) to incorporate new standalone changes
- Added new standalone functions to the UE phy-layer (phy_stub_ue.c) to incorporate individual UE entities
- Updated sending and packing functions in UE (lte_ue.c) to incorporate new standalone changes
- Incorporated semaphores to control timing of incoming downlink packets
- Implemented new queuing system to handle message exchange from UE to eNB and vice versa
- Updated global value in nFAPI for size of subframe

View File

@@ -3,39 +3,37 @@ user to run multiple UEs in separate Linux processes/machines/VMs/etc. They use
entity between the UE(s) and eNB/gNB. The UEs use nFAPI to communicate with the eNB/gNB. The
nFAPI interface allows us to run in an emulated L2 mode, meaning that we are bypassing
the layer 1 (PHY) layer functionality. Becasue we are bypassing the PHY layer, special
channel modeling capabilty has been added in the LTE UE `phy_stub_ue.c` file. To understand
the interfaces between the different components associated with NSA mode, the image is shown below.
![functional_diagram_proxy_nsa](../images/functional_diagram_proxy_nsa.png)
channel modeling capabilty has been added in the LTE UE phy_stub_ue.c file. To understand
the interfaces between the different components associated with NSA mode, the image
functional_diagram_proxy_nsa.png has been provided.
This functionality allows the user to plug in their own channel model and emulate the packet dropping procedure
in real time. The channel modeling has not been provided by EpiSci, but the OAI code
base already has some BLER curves available for use. The chanel modeling functionality
that is included in the `phy_stub_ue.c` file only includes the downlink channel modeling.
that is included in the phy_stub_ue.c file only includes the downlink channel modeling.
Any uplink channel modeling must be conducted in some sort of proxy, which would sit
between the UEs and eNB/gNB. (A description of the downlink channel modeling is illustrated below).
![Channel_Abstraction_UE_Handling_LTE](../images/Channel_Abstraction_UE_Handling_LTE.PNG)
between the UEs and eNB/gNB. (A description of the downlink channel modeling is shown in the
Channel_Abstraction_UE_Handling_LTE.PNG image).
The updates to the OAI code base removed some latent bugs, added multi-UE scalability,
and were tested with a standard bypass proxy between the UE(s) and eNB/gNB. The bypass proxy is
publicly available on [GitHub](https://github.com/EpiSci/oai-lte-multi-ue-proxy). With this package,
publicly available on GitHub (https://github.com/EpiSci/oai-lte-multi-ue-proxy). With this package,
various multi-UE scenarios can be tested without the overhead of PHY-layer features
of underlying radios. The added features to the OAI code base are listed below.
- Ease of use of gprof and address sanitizer for debugging purposes
- Updated json files to allow for GDB, real-time debugging capabilities
- Updated logging features to minimally log only key connection milestones. This improves scalability of multiple UEs.
The logging mechanism described here is located in the `log.c` and `log.h` files. The `LOG_MINIMAL`
function allows us to remove most logs and include `LOG_A(...)` logs and above. The `LOG_A`
logs were chosen as analysis logs to meet EpiSci's internal testing procedure. The `LOG_As`
The logging mechanism described here is located in the log.c and log.h files. The LOG_MINIMAL
function allows us to remove most logs and include LOG_A(...) logs and above. The LOG_A
logs were chosen as analysis logs to meet EpiSci's internal testing procedure. The LOG_As
only include logs that are considered to be milestones in a given test. For example, a
log indicating that the CFRA procedure has been completed for NSA mode. To revert to full logging,
set `LOG_MINIMAL = 0` in the `log.h` file.
set LOG_MINIMAL = 0 in the log.h file.
- Updated logging to include time stamp for timing analysis
- Updated memory allocation procedures to correct size requirements
- Added debugging features to handle signal terminations
- `nfapi.c` pullarray8 fix invalid pointer math
- nfapi.c pullarray8 fix invalid pointer math
- Overlapping destination and source memory in memcpy, so updated to memmove to check for this bug
- Advanced error checking mechanisms in critical pack and unpack functions
- Created option for CPU assignment to UE to improve scalability
@@ -43,8 +41,8 @@ set `LOG_MINIMAL = 0` in the `log.h` file.
- Updated random value seeds to minimize probability of error in generation of random values
- Enables capability round robin scheduler if desired
- Enables capability real time scheduler if desired
- Added new standalone functions to the UE phy-layer (`phy_stub_ue.c`) to incorporate individual UE entities
- Updated sending and packing functions in UE (`lte_ue.c`) to incorporate new standalone changes
- Added new standalone functions to the UE phy-layer (phy_stub_ue.c) to incorporate individual UE entities
- Updated sending and packing functions in UE (lte_ue.c) to incorporate new standalone changes
- Incorporated semaphores to control timing of incoming downlink packets
- Implemented new queuing system to handle message exchange from UE to eNB and vice versa
- Updated global value in nFAPI for size of subframe
@@ -54,7 +52,7 @@ set `LOG_MINIMAL = 0` in the `log.h` file.
Additionally, NSA mode includes the establishment between an NR UE and the gNB via the LTE UE and eNB
connection. For NSA mode, the downlink channel abstraction has not been added to the feature set yet.
NSA mode has been tested and is fully functional with EpiSci's public version of the nFAPI proxy
located at [GitHub Repository](https://github.com/EpiSci/oai-lte-multi-ue-proxy)
located at https://github.com/EpiSci/oai-lte-multi-ue-proxy
NSA mode establishment includes the following steps:
- First UE capability enquiry is sent to NR UE
@@ -76,23 +74,21 @@ NSA mode establishment includes the following steps:
- Msg 3 is generated and sent to gNB
- CFRA procedure is complete
**Please note, the current status is:**
Please note, the current status is:
- A single NSA UE is able to ping an external source
- Up to 4 NSA UEs can complete the CFRA procedure with a single gNB
- UE-to-UE traffic is still in work (incomplete due to gNB crashing)
- The gNB is crashing regularly and is still in work
**Test Setup:**
Test Setup:
For launching the multi-UE for NSA mode, there is a provided test script in the
public EpiSci GitHub multi-ue-proxy repository. However, a brief outline of the
test set up is included below.
If running multiple NSA UEs in a single machine, you will need to launch
multiple LTE and NR UE processes. For example, to launch a 2 NSA UE scenario
there will be a total of 7 processes running for this particular scenario.
These processes are `LTE UE #1`, `LTE UE #2`, `NR UE #1`, `NR UE #2`, `eNB`, `gNB` and the
`proxy`. A detailed description of the launch processes can be found at
[GitHub Repository](https://github.com/EpiSci/oai-lte-multi-ue-proxy/blob/master/README.md)
If running multiple NSA UEs in a single machine, you will need to launch
multiple LTE and NR UE processes. For example, to launch a 2 NSA UE scenario
there will be a total of 7 processes running for this particular scenario.
These processes are LTE UE #1, LTE UE #2, NR UE #1, NR UE #2, eNB, gNB and the
proxy. A detailed description of the launch processes can be found at
https://github.com/EpiSci/oai-lte-multi-ue-proxy/blob/master/README.md

View File

@@ -1,9 +1,9 @@
This tutorial explains how to perform handovers. It covers both F1 handovers
(intra-gNB, within a single gNB between DUs) and N2 handovers (inter-gNB).
This tutorial explains how to perform handovers. For the moment, only F1
handovers are supported.
[[_TOC_]]
## Considered setup for F1 handover
# Considered setup for F1 handover
We consider one CU and two DUs, connected over F1. The UE is initially
connected over the radio interface ("Uu") to DU0. Via movement to a new
@@ -11,32 +11,15 @@ position ("new pos"), it will trigger an event such that the CU triggers a
handover of the UE from DU0 to DU1. Alternatively, a manual trigger can do the
same.
![F1 Handover setup](../RRC/images/ho.png)
![F1 Handover setup](./RRC/ho.png)
## What is a gNB neighbor?
Network continuity is a key aspect of 5G. In the 5G architecture, gNB neighbors
play a central role in maintaining service continuity through mechanisms such
as handover and load balancing. By definition, a gNB neighbor is another gNB
that can be measured and linked by the UE. If the current serving gNB is no
longer optimal, the UE may connect to a neighbor gNB.
To support this behavior, the network configuration specifies additional frequencies
and cells that the UE should measure. The UE reports these measurements to the
network, which then decides whether or not to initiate a handover.
Neighbor types include:
- **Intra-gNB neighbors** - cells belonging to the same gNB
- **Inter-gNB neighbors** - cells belonging to different gNBs
- **Inter-RAT neighbors** - cells belonging to another RAT (e.g., LTE)
## Steps to run F1 handover with OAI UE
# Steps to run F1 handover with OAI UE
Measurement reporting and processing of RRC Reconfiguration for Mobility are
not completed at the UE. Nevertheless, it is possible to make simple handover
tests without any radio setup, on a single PC, with the OAI UE, in RFsimulator.
### Build with telnet support
## Build with telnet support
Since the UE does not support any measurement reporting, it cannot trigger a
handover on its own; it has to be triggered manually through telnet. Thus,
@@ -44,17 +27,17 @@ build both gNB and UE as well as activate the build of telnet to that purpose:
./build_oai --ninja --nrUE --gNB --build-lib telnetsrv
### Run the setup
## Run the setup
This tutorial assumes you have a core network running; [refer to the
corresponding tutorial](./NR_SA_Tutorial_OAI_CN5G.md) if this is not the case
yet.
We will use the TDD configuration files in the repository for the
[CU](../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-cu.sa.f1.conf) as well for
[DU0](../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band78.106prb.rfsim.pci0.conf)
[CU](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-cu.sa.f1.conf) as well for
[DU0](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band78.106prb.rfsim.pci0.conf)
and
[DU1](../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band78.106prb.rfsim.pci1.conf).
[DU1](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb-du.sa.band78.106prb.rfsim.pci1.conf).
Note how the DUs differ in their DU ID (for identification at the CU), nr
cellid (global identification), physical cell ID (identification through UE),
frequency (limitation at OAI UE), and IP address.
@@ -111,7 +94,7 @@ A number of remarks:
1. In some cases, if the RFsim server is at the UE, the whole system can block;
in this case, stop UE and all DUs and restart (the CU can keep running).
### Additional information to the manual HO trigger
## Additional information to the manual HO trigger
You can trigger the handover manually by logging in through telnet:
@@ -134,7 +117,7 @@ and you have to manually type the CU UE ID. You can see a list of all UEs in
the file `nrRRC_stats.log` that is printed periodically in the working
directory of the CU.
## Steps to run F1 handover with COTS UE
# Steps to run F1 handover with COTS UE
You can do handover across DUs with a COTS UE. Note that these DUs should be
separated by at least multiple meters to ensure that the UE will receive
@@ -147,7 +130,7 @@ For UEs, we verified Quectel modules and iPhones. Note, though, that not all
phones might work; for instance, we did not achieve handovers with a OnePlus
Nord, yet.
### Steps
## Steps
First, make sure that you can run both DUs with the CU independently. Use the
same radio hardware for both radios to ensure that both cells can be received
@@ -163,7 +146,7 @@ neighbour relation of the DUs at the CU. To do so, proceed as follows:
```
cat nrRRC_stats.log
```
1. Fill in the [`neighbour-config.conf`](../../ci-scripts/conf_files/neighbour-config.conf) configuration file as shown below, and
1. Fill in the [`neighbour-config.conf`](../ci-scripts/conf_files/neighbour-config.conf) configuration file as shown below, and
`@include` it in the CU file.
1. Start the CU and both DUs.
1. Bring the phone close to one cell, and leave flight mode. It should connect
@@ -188,7 +171,7 @@ through measurements telling the CU that one DU is stronger than others.
Hence, "forcing" a handover just means that you manually trigger the handover,
instead of waiting for UE measurement report.)
### Example neighbour configuration
## Example neighbour configuration
Below is an example neighbour configuration. It is based on this DU information
gathered from `nrRRC_stats.log` at the CU:
@@ -279,13 +262,13 @@ nr_measurement_configuration = {
```
## Handovers triggers and NTN
# Handovers triggers and NTN
Typically, in terrestrial networks, channel measurements as well as criteria
such as load in base stations, is used to determine when and where to handover
a UE.
### NTN
## NTN
Doppler spreading and time selectivity of the channel are already a challenge
for conventional terrestrial networks. However, in the context of
@@ -340,7 +323,7 @@ are as follows:
which sends the preamble. However, UEs with GNSS support are required to
perform this method.
### Simple location/time-based trigger
## Simple location/time-based trigger
A location-based handover trigger, somewhat aligned with 3GPP Rel.17, taking
advantage of deterministic satellite movement, can be implemented whereby it is
@@ -360,9 +343,9 @@ while true; do
done
```
## N2 Handover
# N2 Handover
### Run the setup
## Run the setup
An N2 handover involves the transfer of a UE from one gNB to another via the 5G core network. Unlike F1 handover, where the CU handles the process internally between its DUs, N2 handover requires signaling through the AMF, making it a core-network-based handover.
@@ -370,15 +353,9 @@ We assume:
* Two independent gNBs connected to the same 5GC via N2 interface.
* A UE initially connected to gNB-PCI0, which will be handed over to gNB-PCI1.
* Handover is triggered by either a decision based measurement event (e.g. A3) or telnet command.
* Handover is triggered by either by decision based measurement event (e.g. A3) or telnet command.
### Steps to run N2 handover with OAI UE
**Note for same-machine setup:** When running both gNBs on the same machine, you need to assign a unique IP address to the second gNB to avoid network conflicts. For example:
```sh
sudo ip addr add 192.168.71.180/24 dev rfsim5g-public
```
## Steps to run N2 handover with OAI UE
1. Similarly to F1 handover, UE does not support any measurement reporting and handover is triggered by
telnet command. Therefore, ensure that both gNBs and UE are built with telnet support:
@@ -387,7 +364,7 @@ telnet command. Therefore, ensure that both gNBs and UE are built with telnet su
./build_oai --ninja --nrUE --gNB --build-lib telnetsrv
```
Run the 5G Core Network if not already running. See [OAI CN5G tutorial](NR_SA_Tutorial_OAI_CN5G.md).
Run the 5G Core Network if not already running. See [OAI CN5G tutorial](./NR_SA_Tutorial_OAI_CN5G.md).
2. Start the source gNB (gNB-PCI0) e.g.
@@ -403,17 +380,10 @@ sudo ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --rfsim --ui
Ensure the UE successfully registers with the network.
4. Start the target gNB (gNB-PCI1) e.g.
4. Start the target gNB (gNB PCI1) e.g.
```sh
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.pci1.rfsim.conf --rfsim --telnetsrv --telnetsrv.shrmod ci --gNBs.[0].min_rxtxtime 6 --rfsimulator.serveraddr 127.0.0.1
```
**Note for same-machine setup:** When running both gNBs on the same machine, add the following network interface options to the target gNB command, e.g.:
```sh
--gNBs.[0].NETWORK_INTERFACES.GNB_IPV4_ADDRESS_FOR_NG_AMF 192.168.71.180
--gNBs.[0].NETWORK_INTERFACES.GNB_IPV4_ADDRESS_FOR_NGU 192.168.71.180
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.pci1.rfsim.conf --sa --rfsim --telnetsrv --telnetsrv.shrmod ci --gNBs.[0].min_rxtxtime 6 --rfsimulator.serveraddr 127.0.0.1
```
5. Trigger the N2 handover, e.g.
@@ -423,11 +393,11 @@ From gNB-PCI0, trigger handover on target gNB with PCI 1 for UE ID 1:
```sh
echo ci trigger_n2_ho 1,1 | nc 127.0.0.1 9090 && echo
```
where the input parameters correspond to the PCI of the neighbor cell and the RRC ID of the UE.
where the input parameters correspond to the PCI of the neighbor call and the RRC ID of the UE.
This will initiate the N2 handover on the source gNB.
### Neighbour list and measurement configuration
## Neighbour list and measurement configuration
Make sure the configuration file contains a neighbour list and measurement configuration, e.g. [neighbour-config-rfsim.conf](../../ci-scripts/conf_files/neighbour-config.conf). This configuration can also be present in a different file and included in the gNB configuration file with `@include "neighbour-config-rfsim.conf"`.

View File

@@ -1,7 +1,8 @@
# I/Q record-replay
## using the iq record-replay
This feature provides I/Q record-replay as initially presented in the [4th OAI workshop for LTE](https://www.openairinterface.org/docs/workshop/4_OAI_Workshop_20171107/Talks/MONGAZON_Nokia-Bell-Labs-OAI-IQ.pdf)
This feature provides I/Q record-replay as initially presented in the 4th OAI workshop for LTE
(https://www.openairinterface.org/docs/workshop/4_OAI_Workshop_20171107/Talks/MONGAZON_Nokia-Bell-Labs-OAI-IQ.pdf)
The current implementation has been temporarily disrupted for LTE and only works for 5G SA
nr-uesoftmodem executable.

View File

@@ -10,7 +10,7 @@ about nFAPI can be found in SCF 225.2.0.
[[_TOC_]]
## Quickstart
# Quickstart
Compile OAI as normal. Start the CN and make sure that the VNF configuration
matches the PLMN/IP addresses. Then, run the VNF
@@ -29,7 +29,7 @@ VNF!)
You should not observe a difference between nFAPI split and monolithic.
## Status
# Status
All FAPI message can be transferred between VNF and PNF. This is because OAI
uses FAPI with its corresponding messages internally, whether a split is in use
@@ -54,7 +54,7 @@ When using RFsim, the system might run slower than in monolithic. This is
because the PNF needs to slow down the execution time of a specific slot,
because it has to send a Slot.indication to the VNF for scheduling.
## Configuration
# Configuration
Both PNF and VNF are run through the `nr-softmodem` executable. The type of
mode is switched through the `--nfapi` switch, with options `MONOLITHIC`
@@ -70,7 +70,7 @@ If the type is `VNF`, you have to modify the `MACRLCs.tr_s_preference`
- `MACRLCs.local_s_portd` (local south port for control): VNF's P5 local port
- `MACRLCs.remote_s_portd` (remote south port for data): PNF's P7 remote port
> Note that any L1-specific section (`L1s`, `RUs`,
Note that any L1-specific section (`L1s`, `RUs`,
RFsimulator-specific/IF7.2-specific configuration or other radios, if
necessary) will be ignored and can be deleted.
@@ -84,7 +84,7 @@ If the type is `PNF`, you have to modify modify the `L1s.tr_n_preference`
- `L1s.local_n_portd` (local north port for data): PNF's P7 local port
- `L1s.remote_n_portd` (remote north port for data): VNF's P7 remote port
> Note that this file should contain additional, L1-specific sections (`L1s`,
Note that this file should contain additional, L1-specific sections (`L1s`,
`RUs` RFsimulator-specific/IF7.2-specific configuration or other radios, if
necessary).
@@ -109,10 +109,10 @@ can proceed as follows:
`pnf.conf`, or provide them on the command line for the PNF.
- to run, proceed as described in the quick start above.
> Note: all L1-specific options have to be passed to the PNF, and remaining
Note: all L1-specific options have to be passed to the PNF, and remaining
options to the VNF.
### Transport mechanisms between VNF and PNF
## Transport mechanisms between VNF and PNF
Currently, the VNF/PNF split supports three transport mechanisms between each
other:
@@ -121,8 +121,7 @@ other:
The socket type may be changed by editing `nfapi_pnf_config_create()` and
`nfapi_vnf_config_create()`, in both of which `_this->sctp = <value, 0 or
1>;` indicate whether SCTP or regular sockets are to be used.
> Note: The
1>;` indicate whether SCTP or regular sockets are to be used. Note: The
value of `_this->sctp` **must** be the same on the VNF and PNF.
2. Intel WLS Lib, which uses DPDK to achieve a shared memory communication between components.
3. nvIPC, which is used exclusively for the NVIDIA Aerial L1. Thus, it is only
@@ -132,15 +131,15 @@ The change between transport mechanisms is done at compilation time:
- No changes to the `build_oai` call are required in order to select socket communication, as it is the default.
- In order to select WLS as the transport mechanism between VNF and PNF, first install the WLS library, and afterwards use `-t WLS` as a parameter of `build_oai`:
#### How to use nFAPI
### How to use nFAPI
nFAPI is used by default. Compile and configure as indicated above.
#### How to use Aerial
### How to use Aerial
Refer to [this document](../tutorials/Aerial_FAPI_Split_Tutorial.md) for more information.
Refer to [this document](./Aerial_FAPI_Split_Tutorial.md) for more information.
#### How to use WLS lib
### How to use WLS lib
Before the first compilation with WLS support, the [WLS
library](https://docs.o-ran-sc.org/projects/o-ran-sc-o-du-phy/en/latest/wls-lib.html)
@@ -153,7 +152,7 @@ The WLS library has a few dependencies:
Additionally, a patch needs to be applied to the WLS lib Makefile in order for
the shared library and headers to be installed into the system, the necessary
patch is available [here](../../cmake_targets/tools/install_wls_lib.patch)
patch is available [here](../cmake_targets/tools/install_wls_lib.patch)
Clone the code and apply the patch
@@ -170,11 +169,11 @@ After installing WLS, you can run the build command as shown below:
./build_oai -t WLS -w USRP --gNB --nrUE --ninja -C
##### How to run OAI PNF with OAI VNF
#### How to run OAI PNF with OAI VNF
Refer to the above steps in [Quickstart](#quickstart), but run the PNF first as it is the WLS "master".
##### How to run OAI PNF with OSC/Radisys O-DU
#### How to run OAI PNF with OSC/Radisys O-DU
Set up the hugepages for DPDK (1GB page size, 6 pages; this only needs to be
done once):
@@ -218,7 +217,7 @@ Run the O-DU over GDB
sudo -E gdb -ex run --readnever --args ./odu/odu
> Note: If you see the following prompt in GDB
Note: If you see the following prompt in GDB
This GDB supports auto-downloading debuginfo from the following URLs:
<https://debuginfod.ubuntu.com>
@@ -232,11 +231,11 @@ Run the OAI-UE
sudo ./nr-uesoftmodem -r 273 --numerology 1 --band 78 -C 3400140000 --ssb 1518 --uicc0.imsi 001010000000001 --rfsim
## nFAPI logging system
# nFAPI logging system
nFAPI has its own logging system, independent of OAI's. It can be activated by
setting the `NFAPI_TRACE_LEVEL` environment variable to an appropriate value;
see [the environment variables documentation](../setup/environment-variables.md) for
see [the environment variables documentation](./environment-variables.md) for
more info.
To see the (any) periodical output at the PNF, define `NFAPI_TRACE_LEVEL=info`.

View File

@@ -1,4 +1,4 @@
## PHY and MAC Interface
# PHY and MAC Interface
The PHY sends scheduling requests and data indication to MAC via `nr_ue_dl_indication` for DL path and `nr_ue_ul_indication()` for UL path and the MAC sends scheduling configuration to PHY via `nr_ue_scheduled_response()`. The following diagram shows the interaction for PDCCH and PDSCH reception.
```mermaid
sequenceDiagram
@@ -8,16 +8,16 @@ sequenceDiagram
MAC->>+PHY: Schedules PDSCH reception (via nr_ue_scheduled_response)
```
## Multi-threading Design
# Multi-threading Design
The `UE_thread` function in `nr-ue.c` is the main top level thread that interacts with the radio unit. Once the thread spawns, it starts the 'Initial Synchronization'. Once its complete, the regular processing of slots commences.
The UE exits when at any point in operation it gets out of synchronization. When the command line option `--non-stop` is used, the UE goes to 'Initial Synchronization' mode when it loses synchronization with gNB. However, this feature is not fully implemented and it is a work in progress at the time of writing this documentation. This will be the default behavior (not a command line option) when the feature is fully implemented.
UE uses actors which are threads dedicated to particular activity. Sync Actor handles initial sync. DL Actors handle DLSCH PHY procedures. UL procedures are are run on the UL Actor
![design](../images/nr-ue-threads.svg)
![design](nr-ue-threads.svg)
### Initial Synchronization Block
## Initial Synchronization Block
```mermaid
graph TD
start(Start) -->|UE_thread| rxRu["RU read<br/>(Reads two frames)"]
@@ -26,7 +26,7 @@ graph TD
sync --> |UE_thread| frameSync["Frame synchronization<br/>(Shift received samples to align with frame)"]
rxRuDummy --> |UE_thread| frameSync
```
#### Regular Slot Processing
## Regular Slot Processing
```mermaid
graph TD
sync["Frame synchronization<br/>(Shift received samples to align with frame)"] -->|UE_thread| hw_read["RU read (slot n)"]

View File

Before

Width:  |  Height:  |  Size: 188 KiB

After

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 KiB

View File

Before

Width:  |  Height:  |  Size: 361 KiB

After

Width:  |  Height:  |  Size: 361 KiB

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