Compare commits

...

58 Commits

Author SHA1 Message Date
Raymond Knopp
59a76e7722 some small fixes to nr_pucchsim, nr_gNB_measurements.c, pucch_rx.c pertaining to
PUCCH format 2 reception. There was an overflow scenario in the noise measurements used for PUCCH
thresholding and potentially other uplink receivers.
2026-03-13 21:32:25 +01:00
Raymond Knopp
3d1423ac50 temporary commit 2026-03-12 12:25:36 +01:00
Jaroslava Fiedlerova
582ce818d7 Merge branch 'integration_2026_w10' into 'develop'
Integration `2026.w10`

* !3946 UE L1 cleanup
* !3929 UE: Fix if target cell during handover has SSB at a different offset as in source cell
* !3961 Remove Ubuntu 20 and RHEL/Rocky 8 support, increase cmake min version
* !3884 Integrate NRPPA and NGAP messages required for positioning
* !3784 CI: Create new pipeline for testing with Aerial and Jetson
* !3697 fix: issue 911 - OAI gNB hangs when AMF connection goes down
* !3914 Fix dB_fixed() function
* !3800 Add tracer to record configured events to database
* !3954 UHD streamer thread priorities in nrUE
* !3846 rename with distinct names structs and related typedefs, remove spread struct keyword
* !3958 Remove unused function arguments

Closes #911

See merge request oai/openairinterface5g!3962
2026-03-06 17:33:40 +00:00
francescomani
8ad867837c Merge remote-tracking branch 'origin/unused_function_arguments' into integration_2026_w10 (!3958)
Remove unused function arguments

Some of them, because there are hundreds if not thousands. Warnings at compilation time can be enabled using -Wunused-parameter.
2026-03-06 13:05:47 +01:00
Jaroslava Fiedlerova
acf9c25e18 Merge remote-tracking branch 'origin/change-typedef-names-for-coding-style' into integration_2026_w10 (!3846)
rename with distinct names structs and related typedefs, remove spread struct keyword
2026-03-06 12:18:43 +01:00
Jaroslava Fiedlerova
4e3ac9e98c Merge remote-tracking branch 'origin/uhd_priority_in_nrUE' into integration_2026_w10 (!3954)
Increase UHD streamer thread priority in nrUE

This minor change allows nrUE UHD threads to inherit priority
OAI_PRIORITY_RT_MAX.
2026-03-06 11:13:04 +01:00
Jaroslava Fiedlerova
e6105b9d6a Merge remote-tracking branch 'origin/recordDb' into integration_2026_w10 (!3800)
Add tracer to record configured events to database

This extends the functionality provided by record in that it allows
collection of data into a Clickhouse database, allowing aggregation of
data from gNB and UE for functions like channel estimation for PUSCH
transmissions that did not decode successfully at the gNB.

It is intended to be used in conjunction with Aerial Data Lake but is
not limited to it. Data access is simpler than in !3462 (merged), but
could be improved using the metadata approach from !3462 (merged).

Usage is similar to the exsting record tracer:

        docker exec -it oai-nr-ue bash -c "record_db -on UE -off VCD -ch-droptables -off UE_PHY_UL_TICK -off UE_PHY_DL_TICK -off UE_PHY_PDSCH_IQ"

Which outputs recorded data every 5 seconds:

        17:35:40.945037 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:21   name:UE_PHY_INITIATE_RA_PROCEDURE    has_frame_slot:false columns:5
        17:35:40.945924 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:26   name:NRUE_PHY_MIB                    has_frame_slot:true columns:6
        17:35:40.946717 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:53   name:NRUE_MAC_DL_PDU_WITH_DATA       has_frame_slot:true columns:7
        17:35:40.947467 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:54   name:NRUE_MAC_UL_PDU_WITH_DATA       has_frame_slot:true columns:7
        17:35:40.948208 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:55   name:NRUE_MAC_DL_RAR_PDU_WITH_DATA   has_frame_slot:true columns:6
        17:35:40.948912 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:318  name:UE_MASTER_TICK                  has_frame_slot:true columns:5
        17:35:40.949679 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:321  name:UE_PHY_DLSCH_UE_DCI             has_frame_slot:true columns:10
        17:35:40.950397 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:322  name:UE_PHY_DLSCH_UE_ACK             has_frame_slot:true columns:7
        17:35:40.951125 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:323  name:UE_PHY_DLSCH_UE_NACK            has_frame_slot:true columns:7
        17:35:40.951903 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:324  name:UE_PHY_ULSCH_UE_DCI             has_frame_slot:true columns:12
        17:35:40.952604 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:325  name:UE_PHY_ULSCH_UE_ACK             has_frame_slot:true columns:7
        17:35:40.953305 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:326  name:UE_PHY_ULSCH_UE_NACK            has_frame_slot:true columns:7
        17:35:40.954035 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:327  name:UE_PHY_INPUT_SIGNAL             has_frame_slot:true columns:7
        17:35:40.954778 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:328  name:UE_PHY_DL_CHANNEL_ESTIMATE      has_frame_slot:true columns:8
        17:35:40.955533 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:329  name:UE_PHY_DL_CHANNEL_ESTIMATE_FREQ has_frame_slot:true columns:8
        17:35:40.956250 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:330  name:UE_PHY_PDCCH_IQ                 has_frame_slot:false columns:5
        17:35:40.957010 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:331  name:UE_PHY_PDCCH_ENERGY             has_frame_slot:true columns:9
        17:35:40.957781 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:333  name:UE_PHY_PDSCH_ENERGY             has_frame_slot:true columns:9
        17:35:40.958599 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:334  name:UE_PHY_PUSCH_TX_POWER           has_frame_slot:true columns:10
        17:35:40.959364 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:335  name:UE_PHY_PUCCH_TX_POWER           has_frame_slot:true columns:9
        17:35:40.960154 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:336  name:UE_PHY_MEAS                     has_frame_slot:true columns:12
        17:35:40.961126 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:337  name:UE_PHY_UL_PAYLOAD_TX_BITS       has_frame_slot:true columns:30
        17:35:40.962126 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:338  name:UE_PHY_UL_SCRAMBLED_TX_BITS     has_frame_slot:true columns:30
        17:35:40.962455 record_db.cpp:1063 INF[main  ] Tables created, waiting for messages...

        17:36:00.842116 record_db.cpp:1096 INF[main  ]   UE_PHY_UL_SCRAMBLED_TX_BITS     rows:       52  total:        119
        17:36:00.842117 record_db.cpp:1096 INF[main  ]   UE_PHY_UL_PAYLOAD_TX_BITS       rows:       55  total:        119
        17:36:00.842117 record_db.cpp:1096 INF[main  ]   UE_PHY_MEAS                     rows:        5  total:         12
        17:36:00.842117 record_db.cpp:1096 INF[main  ]   UE_PHY_PDSCH_ENERGY             rows:        6  total:         29
        17:36:00.842117 record_db.cpp:1096 INF[main  ]   NRUE_MAC_DL_PDU_WITH_DATA       rows:        6  total:         28
        17:36:00.842117 record_db.cpp:1096 INF[main  ]   NRUE_MAC_UL_PDU_WITH_DATA       rows:       54  total:        118
        17:36:00.842118 record_db.cpp:1096 INF[main  ]   NRUE_PHY_MIB                    rows:      260  total:        495
        17:36:00.842118 record_db.cpp:1100 INF[main  ]
        17:36:05.861012 record_db.cpp:1096 INF[main  ]   UE_PHY_UL_SCRAMBLED_TX_BITS     rows:       55  total:        174
        17:36:05.861013 record_db.cpp:1096 INF[main  ]   UE_PHY_UL_PAYLOAD_TX_BITS       rows:       55  total:        174
        17:36:05.861013 record_db.cpp:1096 INF[main  ]   UE_PHY_MEAS                     rows:        5  total:         17
        17:36:05.861013 record_db.cpp:1096 INF[main  ]   UE_PHY_PDSCH_ENERGY             rows:       12  total:         41
        17:36:05.861013 record_db.cpp:1096 INF[main  ]   NRUE_MAC_DL_PDU_WITH_DATA       rows:       12  total:         40
        17:36:05.861014 record_db.cpp:1096 INF[main  ]   NRUE_MAC_UL_PDU_WITH_DATA       rows:       56  total:        174
        17:36:05.861014 record_db.cpp:1096 INF[main  ]   NRUE_PHY_MIB                    rows:      260  total:        755

This can also be done for the L2 on the gNB side:

        $ docker exec -it oai-gnb-aerial bash -c "record_db -on GNB_MAC_DL_PDU_WITH_DATA"
        turning ON GNB_MAC_DL_PDU_WITH_DATA
        connecting to 127.0.0.1:2021
        16:31:01.742287 record_db.cpp:1000 INF[main  ] on: item: GNB_MAC_DL_PDU_WITH_DATA, on_off_name: GNB_MAC_DL_PDU_WITH_DATA, on_off_action: 1
        16:31:01.742340 record_db.cpp:1011 INF[main  ] No database file provided, using default: T_messages.txt
        16:31:01.751101 record_db.cpp:1020 INF[main  ] Number of events: 801
        16:31:01.752264 record_db.cpp:439 INF[main  ] ClickHouse connection initialized
        16:31:01.752997 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:49   name:GNB_MAC_DL_PDU_WITH_DATA        has_frame_slot:true columns:9
        16:31:01.753065 record_db.cpp:1063 INF[main  ] Tables created, waiting for messages...
        16:31:07.299147 record_db.cpp:1096 INF[main  ]   GNB_MAC_DL_PDU_WITH_DATA        rows:        1  total:          1
        16:31:07.299148 record_db.cpp:1100 INF[main  ]
        16:31:12.299490 record_db.cpp:1096 INF[main  ]   GNB_MAC_DL_PDU_WITH_DATA        rows:      234  total:        235
        16:31:12.299491 record_db.cpp:1100 INF[main  ]
        16:31:17.299594 record_db.cpp:1096 INF[main  ]   GNB_MAC_DL_PDU_WITH_DATA        rows:      260  total:        495
2026-03-06 10:29:34 +01:00
Jaroslava Fiedlerova
257de65782 Merge remote-tracking branch 'origin/fix_db_fixed' into integration_2026_w10 (!3914)
Fix dB_fixed() function

- dB_fixed(0) returns 0 in develop branch;
- 0 in dB is -INF, but since we're dealing with integer variables, we'll put
  20*log10(2^-15) in the output of dB_fixed() function, instead of 0.
- make all users use signed variables
2026-03-06 10:23:30 +01:00
Jaroslava Fiedlerova
ef14a2b977 Merge remote-tracking branch 'origin/issue-911-fix' into integration_2026_w10 (!3697)
fix: issue 911 - OAI gNB hangs when AMF connection goes down

Once the AMF is down, based on the AMF UE NGAP ID and RAN UE NGAP ID,
the UE associated with the AMF is found

All the contexts related to the UE are released and the timer is started
in the NGAP to look up for the SCTP association. The AMF-gNB reconnection
is made if an SCTP connection is found, also the registration of multiple
UE is triggered

These actions are based on the reference from 4.2.6 AN release Specs
TS 123 502 V16.7.0 (2021-01)

When the NG-AP signalling connection is lost due to (R)AN or AMF failure,
the AN release is performed locally by the AMF or the (R)AN as described
in the procedure flow below without using or relying on any of the signalling
shown between (R)AN and AMF. The AN release causes all UP connections of the UE
to be deactivated.

closes #911
2026-03-06 10:08:10 +01:00
Jaroslava Fiedlerova
5b66b53707 Merge remote-tracking branch 'origin/ci-add-jetson-test' into integration_2026_w10 (!3784)
CI: Create new pipeline for testing with Aerial and Jetson
2026-03-06 10:00:38 +01:00
Jaroslava Fiedlerova
d7fc76b726 Merge remote-tracking branch 'origin/nrppa_ngap_integration' into integration_2026_w10 (!3884)
Integrate NRPPA and NGAP messages required for positioning

This MR integrates NRPPA and NGAP messages required for positioning.
The following NGAP messages are integrated (3GPP 38.413 Version 16.0.0):

NGAP UPLINK UE ASSOCIATED NRPPA TRANSPORT
NGAP UPLINK NON UE ASSOCIATED NRPPA TRANSPORT
NGAP DOWNLINK UE ASSOCIATED NRPPA TRANSPORT
NGAP DOWNLINK NON UE ASSOCIATED NRPPA TRANSPORT

The following NRPPA messages are integrated (3GPP 38.455 Version 16.7.1):

TRP Information Request
TRP Information Response
Positioning Information Request
Positioning Information Response
Positioning activation request
Positioning Activation Response
Measurement Request
Measurement Response

This MR tests these messages via a standalone tester nr-cu-nrppa-test that
connects to the AMF to perform NGAP enc/dec and NRPPA enc/dec

Core Network:
To pull the docker images:

docker pull oaisoftwarealliance/ims:latest
docker pull oaisoftwarealliance/oai-amf:develop
docker pull oaisoftwarealliance/oai-nrf:develop
docker pull oaisoftwarealliance/oai-smf:develop
docker pull oaisoftwarealliance/oai-udr:develop
docker pull oaisoftwarealliance/oai-upf:develop
docker pull oaisoftwarealliance/oai-udm:develop
docker pull oaisoftwarealliance/oai-ausf:develop
docker pull oaisoftwarealliance/oai-lmf:develop

openairinterface5g$ cd doc/tutorial_resources/oai-cn5g
To deploy:
openairinterface5g/doc/tutorial_resources/oai-cn5g$ docker compose -f docker-compose-positioning.yaml up -d

To undeploy:
openairinterface5g/doc/tutorial_resources/oai-cn5g$ docker compose -f docker-compose-positioning.yaml down -t 0

RAN:
To compile:
openairinterface5g$ mkdir build
openairinterface5g$ cd build
openairinterface5g/build$ cmake .. -GNinja
openairinterface5g/build$ ninja nr-cu-nrppa-test

To run:
openairinterface5g/build$ LD_LIBRARY_PATH=. ./tests/nr-cu-nrppa/nr-cu-nrppa-test -O ../tests/nr-cu-nrppa/nr-nrppa-test.conf

To initiate positioning procedure:
openairinterface5g$ cd doc/tutorial_resources/positioning/
openairinterface5g/doc/tutorial_resources/positioning$ curl --http2-prior-knowledge -H "Content-Type: application/json" -d "@InputData.json" -X POST http://192.168.70.141:8080/nlmf-loc/v1/determine-location
2026-03-06 09:59:34 +01:00
Bartosz Podrygajlo
7d058eb0d0 Run nrue_ru_start in a high priority thread
Launch a temporary high-priority thread to start the UE RU,
ensuring radio library threads inherit this priority
2026-03-05 17:34:22 +01:00
Robert Schmidt
1d69eb0e1e Add T tracer to record configured events to database
This extends the functionality provided by record in that it allows
collection of data into a Clickhouse database, allowing aggregation of
data from gNB and UE for functions like channel estimation for PUSCH
transmissions that did not decode successfully at the gNB.

It is intended to be used in conjunction with Aerial Data Lake but is
not limited to it. Data access is simpler than in !3462, but could be
improved using the metadata approach from !3462.

The integration uses logfmt for fast logging, and a clickhouse DB
client, both integrated using CPM.

This change set also adds a docker-compose file for a UE on 100MHz, to
be used with Aerial configurations, and builds the tracer for Aerial and
nrUE docker files.
2026-03-05 14:39:28 +01:00
Aswanth KC
c90d7f7f26 fix: issue 911 - OAI gNB hangs when AMF connection goes down
- Extended fix to support multiple UEs instead of single UE
- Actions now trigger upon AMF reconnection

Per 3GPP TS 123 502 V16.7.0 (2021-01) Section 4.2.6 (AN Release):
When NG-AP signalling connection is lost due to (R)AN or AMF failure,
AN release is performed locally by AMF or (R)AN without relying on
signalling between (R)AN and AMF. This deactivates all UP connections.
2026-03-05 09:53:00 +01:00
Jaroslava Fiedlerova
e107f81d54 CI: update documentation for CI setups
Add information about the new CI setup and the RAN-SA-AERIAL-OAIUE-CN5G
testing pipeline.
2026-03-04 22:16:03 +01:00
Jaroslava Fiedlerova
f12a3f4d45 CI: Set WNC BW in Aerial pipeline
Since the setup script is available, use it to ensure the correct bandwidth
configuration before each run.
2026-03-04 22:16:03 +01:00
Jaroslava Fiedlerova
c9065df7f8 CI: Add test into Jenkinsfile-Gitlab-Container 2026-03-04 22:16:03 +01:00
Jaroslava Fiedlerova
970577c7c4 Merge remote-tracking branch 'origin/remove-u20-cmake-fixes' into integration_2026_w10 (!3961)
Remove Ubuntu 20 and RHEL/Rocky 8 support, increase cmake min version

Ubuntu 20 is EOL [1]. This was the version with the lowest CMake version, so
we can increment the minimum CMake version to 3.19 as well. Increasing the
minimum version will in particular help with the integration of CUDA (updates
in 3.17 and 3.18), the current 3.19 brings better support for apple silicon.

Some minor CMake updates (removing superfluous files and dependencies).

[1] https://ubuntu.com/blog/ubuntu-20-04-lts-end-of-life-standard-support-is-coming-to-an-end-heres-how-to-prepare
2026-03-04 21:18:38 +01:00
Jaroslava Fiedlerova
9c741e9ccf Merge remote-tracking branch 'origin/NR_fix_ssbpos_ho' into integration_2026_w10 (!3929)
UE: Fix if target cell during handover has SSB at a different offset as in source cell

These changes fixed these observed issues:
- If target cell has a different SSB position compared to source cell during
  ho - sync was not successful.
- RAR does not get decoded if SSB position has changed on the target cell
  compared to source cell.
2026-03-04 21:15:46 +01:00
rmagueta
bc6963c588 Fix dB_fixed() function
0 in dB is -INF, but since we're dealing with integer variables, we'll put 10*log10(2^-30) in the output, which corresponds to the symmetrical maximum output of the function.
2026-03-04 16:26:59 +00:00
rmagueta
0e38bd239e Use signed types for dB measurements to support negative values 2026-03-04 16:26:59 +00:00
Robert Schmidt
356a905d5a Remove RHEL and Rocky 8 from supported distributions 2026-03-04 16:10:07 +01:00
Jaroslava Fiedlerova
63575e54bf CI: Add XML file for RAN-SA-AERIAL-OAIUE-CN5G 2026-03-04 14:02:29 +01:00
Jaroslava Fiedlerova
ff358dde6f CI: Add configuration and yaml files for new pipeline with Jetson 2026-03-04 14:02:29 +01:00
Jaroslava Fiedlerova
b33424b790 CI: Add script for BW configuration on WNC RU 2026-03-04 14:02:29 +01:00
Raghavendra Dinavahi
dafabe381c UE: update PDCCH config if MAC config changes
without this fix, after sync is successful, RAR is not getting decoded.
PDCCH area also changes as SSB offset can change. if MAC configuration changes.
2026-03-03 16:36:52 +01:00
Jaroslava Fiedlerova
352188fbd3 Merge remote-tracking branch 'origin/nb_antennas_rx_hardcode' into integration_2026_w10 (!3946)
UE L1 cleanup

Mostly related to remove dependence from NB_ANTENNAS_RX parameter
2026-03-02 19:11:55 +01:00
Rakesh Mundlamuri
7de93489cf Add README for the nr-cu-nrppa tester 2026-03-02 21:43:32 +05:30
Rakesh Mundlamuri
cbc85dd448 Add Measurement Response NRPPA message encoding procedures 2026-03-02 21:36:03 +05:30
Rakesh Mundlamuri
4f8cde6223 Add Measurement Request NRPPA message decoding procedures 2026-03-02 21:36:03 +05:30
Rakesh Mundlamuri
192508e6cc Add Positioning Activation Response NRPPA message encoding procedures 2026-03-02 21:36:03 +05:30
Rakesh Mundlamuri
defafa8d24 Add Positioning Activation Request NRPPA message decoding procedures 2026-03-02 21:36:03 +05:30
Rakesh Mundlamuri
559e3c31de Add Positioning Information Response NRPPA message encoding procedures 2026-03-02 21:36:03 +05:30
Rakesh Mundlamuri
3dcdedb3f8 Send dummy UE registration request to the AMF to register the UE.
This is required for positioning as we initiate positioning procedure
based on the imsi.
2026-03-02 21:36:03 +05:30
Rakesh Mundlamuri
1be578e893 Add Positioning Information Request NRPPA message decoding procedures 2026-03-02 21:36:03 +05:30
Rakesh Mundlamuri
0282e64a3b Add TRP Information Response NRPPA message encoding procedures
Supported TRP Information Response Types:
 - PCI NR
 - NG RAN CGI
 - NR ARFCN
 - GEOGRAPHICAL COORDINATES
2026-03-02 21:36:03 +05:30
Rakesh Mundlamuri
446a905013 Add TRP Information Request NRPPA message decoding procedures 2026-03-02 21:36:02 +05:30
Rakesh Mundlamuri
ccf4b42541 Add RCconfig_nr_positioning to obtain and fill TRP related parameters from config file 2026-03-02 21:35:54 +05:30
Raghavendra Dinavahi
757a3131a1 UE: Fix if target cell has SSB at a different offset as in source cell
Actual problem is that SYNC does not happen on the target cell as frame parameters is not updated
and ssb start carrier is not correct in the UE frame parameters
function nr_get_ssb_start_sc to determine ssb_start_subcarrier
2026-03-02 15:49:12 +01:00
Robert Schmidt
1ea2b1b3ac Upgrade Fedora req to 43 2026-03-02 14:07:08 +01:00
Robert Schmidt
d37cb161ea Update minimum cmake version to 3.19 2026-03-02 12:13:25 +01:00
Robert Schmidt
649ae91e59 Remove Ubuntu 20 support
Ubuntu 20 is EOL [1] unless people pay for support. Therefore, remove it
from build_helper. People can still use it, but might need to install a
more recent cmake version (which the next commit will upgrade). The rest
should be the same.

[1] https://ubuntu.com/about/release-cycle
2026-03-02 11:28:09 +01:00
Robert Schmidt
710ac4e29c Remove unused files/targets in CMakeLists.txt 2026-03-02 11:26:39 +01:00
Laurent THOMAS
d6858d01a0 make distinct names for structs and tyepdefs 2026-02-27 16:53:58 +01:00
francescomani
b07dc35c92 fix some of the unused function arguments (found using -Wunused-parameter) 2026-02-27 13:27:54 +01:00
Rakesh Mundlamuri
6eceaacb73 Add NGAP decoding procedures of Downlink NRPPA Transport procedures 2026-02-27 17:51:27 +05:30
Rakesh Mundlamuri
2cfff7520f Add NGAP encoding procedures of Uplink NRPPA Transport procedures 2026-02-27 17:51:27 +05:30
Rakesh Mundlamuri
040b25bf00 Add NGAP DOWNLINK NON UE ASSOCIATED NRPPA TRANSPORT message decoding
Reference: 3GPP 38.413 v16.0.0

Mandatory fields:
Routing ID (supported)
NRPPa-PDU (supported)
2026-02-27 17:51:27 +05:30
Rakesh Mundlamuri
d4c0431cc7 Add NGAP DOWNLINK UE ASSOCIATED NRPPA TRANSPORT message decoding
Reference: 3GPP 38.413 v16.0.0

Mandatory fields:
AMF UE NGAP ID (supported)
RAN UE NGAP ID (supported)
Routing ID (supported)
NRPPa-PDU (supported)
2026-02-27 17:51:27 +05:30
Rakesh Mundlamuri
e832424240 Add NGAP UPLINK NON UE ASSOCIATED NRPPA TRANSPORT message encoding
Reference: 3GPP 38.413 v16.0.0

Mandatory fields:
Routing ID (supported)
NRPPa-PDU (supported)
2026-02-27 17:51:27 +05:30
Rakesh Mundlamuri
bf90e523a7 Add NGAP UPLINK UE ASSOCIATED NRPPA TRANSPORT message encoding
Reference: 3GPP 38.413 v16.0.0

Mandatory fields:
AMF UE NGAP ID (supported)
RAN UE NGAP ID (supported)
Routing ID (supported)
NRPPa-PDU (supported)
2026-02-27 17:51:27 +05:30
Rakesh Mundlamuri
08d7a150b1 Add json file to initiate positioning procedure from the LMF 2026-02-27 17:51:27 +05:30
Rakesh Mundlamuri
dabb8d338f Add docker compose file of the 5G core network with the LMF feature 2026-02-27 17:51:27 +05:30
Rakesh Mundlamuri
786d8b34c0 Introduce NGAP emulator that connects to the AMF to perform NGAP enc/dec
- Performs NGAP setup request and handles NGAP setup response
 - This is introduced to test NGAP enc/dec of the NRPPa messages

To compile:

openairinterface5g$ mkdir build
openairinterface5g$ cd build
openairinterface5g/build$ cmake .. -GNinja
openairinterface5g/build$ ninja nr-cu-nrppa-test

To run:
openairinterface5g/build$ LD_LIBRARY_PATH=. ./tests/nr-cu-nrppa/nr-cu-nrppa-test -O ../tests/nr-cu-nrppa/nr-nrppa-test.conf
2026-02-27 17:51:27 +05:30
Rakesh Mundlamuri
1d9418097f Move RCconfig_NR_NG() to NGAP 2026-02-27 17:51:27 +05:30
francescomani
a0a0f2104f further cleanup in defs_nr_UE.h 2026-02-27 10:31:33 +01:00
francescomani
c57a112aae cleanup of PHY_NR_MEASUREMENTS structure to remove unused fields and dependence from NB_ANTENNAS_RX 2026-02-27 10:31:29 +01:00
francescomani
dea42f7e4a remove some unnecessary use of NB_ANTENNAS_RX at UE 2026-02-27 10:17:05 +01:00
197 changed files with 9759 additions and 1299 deletions

View File

@@ -19,7 +19,7 @@
# * contact@openairinterface.org
# */
cmake_minimum_required (VERSION 3.16)
cmake_minimum_required (VERSION 3.19)
project (OpenAirInterface LANGUAGES C CXX)
set(CMAKE_CXX_STANDARD 17)
set(OAI_VERSION 2.4.0)
@@ -441,6 +441,7 @@ add_library(ngap
${NGAP_DIR}/ngap_gNB_overload.c
${NGAP_DIR}/ngap_gNB_trace.c
${NGAP_DIR}/ngap_gNB_ue_context.c
${NGAP_DIR}/ngap_gNB_NRPPa_transport_procedures.c
)
target_link_libraries(ngap PUBLIC asn1_ngap)
target_link_libraries(ngap PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
@@ -1308,6 +1309,8 @@ set (GNB_APP_SRC
${OPENAIR2_DIR}/GNB_APP/gnb_app.c
${OPENAIR2_DIR}/E1AP/e1ap_setup.c
${OPENAIR2_DIR}/GNB_APP/gnb_config.c
${OPENAIR2_DIR}/GNB_APP/gnb_config_common.c
${OPENAIR2_DIR}/GNB_APP/gnb_config_ng.c
)
set (MCE_APP_SRC
@@ -2012,11 +2015,9 @@ target_link_libraries(nr_pbchsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
add_executable(nr_psbchsim
${OPENAIR1_DIR}/SIMULATION/NR_PHY/psbchsim.c
${NFAPI_USER_DIR}/nfapi.c
${NFAPI_USER_DIR}/gnb_ind_vars.c
${PHY_INTERFACE_DIR}/queue_t.c
)
target_link_libraries(nr_psbchsim PRIVATE
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_UE_NR MAC_NR_COMMON CONFIG_LIB L2_NR -Wl,--end-group
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_UE_NR MAC_NR_COMMON CONFIG_LIB -Wl,--end-group
m pthread ${T_LIB} ITTI dl physim_common softmodem_common
)
target_link_libraries(nr_psbchsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
@@ -2035,7 +2036,7 @@ add_executable(nr_dlsim
${PHY_INTERFACE_DIR}/queue_t.c
)
target_link_libraries(nr_dlsim PRIVATE
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_UE_NR MAC_NR_COMMON nr_rrc CONFIG_LIB L2_NR x2ap SECURITY ngap -Wl,--end-group
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_UE_NR MAC_NR_COMMON CONFIG_LIB L2_NR -Wl,--end-group
m pthread ${T_LIB} ITTI dl nr_ue_phy_meas physim_common
softmodem_common
)
@@ -2049,7 +2050,6 @@ target_link_libraries(nr_prachsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
add_executable(nr_ulschsim
${OPENAIR1_DIR}/SIMULATION/NR_PHY/ulschsim.c
${PHY_INTERFACE_DIR}/queue_t.c
)
target_link_libraries(nr_ulschsim PRIVATE
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
@@ -2065,7 +2065,7 @@ add_executable(nr_ulsim
)
target_link_libraries(nr_ulsim PRIVATE
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_UE_NR MAC_NR_COMMON nr_rrc CONFIG_LIB L2_NR x2ap SECURITY ngap -Wl,--end-group
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_UE_NR MAC_NR_COMMON CONFIG_LIB L2_NR -Wl,--end-group
m pthread ${T_LIB} ITTI dl nr_ue_phy_meas physim_common softmodem_common
)
target_link_libraries(nr_ulsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
@@ -2073,8 +2073,6 @@ target_link_libraries(nr_ulsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
add_executable(nr_srssim
${OPENAIR1_DIR}/SIMULATION/NR_PHY/srssim.c
${NFAPI_USER_DIR}/nfapi.c
${NFAPI_USER_DIR}/gnb_ind_vars.c
${PHY_INTERFACE_DIR}/queue_t.c
)
target_link_libraries(nr_srssim PRIVATE

View File

@@ -7,7 +7,7 @@
<a href="https://releases.ubuntu.com/22.04/"><img src="https://img.shields.io/badge/OS-Ubuntu22-Green" alt="Supported OS Ubuntu 22"></a>
<a href="https://releases.ubuntu.com/24.04/"><img src="https://img.shields.io/badge/OS-Ubuntu24-Green" alt="Supported OS Ubuntu 24"></a>
<a href="https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux"><img src="https://img.shields.io/badge/OS-RHEL9-Green" alt="Supported OS RHEL9"></a>
<a href="https://getfedora.org/en/workstation/"><img src="https://img.shields.io/badge/OS-Fedore41-Green" alt="Supported OS Fedora 41"></a>
<a href="https://getfedora.org/en/workstation/"><img src="https://img.shields.io/badge/OS-Fedore41-Green" alt="Supported OS Fedora 43"></a>
</p>
<p align="center">

View File

@@ -795,6 +795,29 @@ pipeline {
}
}
}
stage ("SA-AERIAL-OAIUE-CN5G") {
when { expression {do5Gtest || do5GUeTest} }
steps {
script {
triggerSlaveJob ('RAN-SA-AERIAL-OAIUE-CN5G', 'SA-AERIAL-OAIUE-CN5G')
}
}
post {
always {
script {
// Using a unique variable name for each test stage to avoid overwriting on a global variable
// due to parallel-time concurrency
saAERIALOAIUEStatus = finalizeSlaveJob('RAN-SA-AERIAL-OAIUE-CN5G')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
failingStages += saAERIALOAIUEStatus
}
}
}
}
stage ("SA-OAIUE-CN5G") {
when { expression {do5Gtest || do5GUeTest} }
steps {

View File

@@ -101,6 +101,14 @@ oc-cn5g-20897-aerial:
Undeploy: "! scripts/oc-cn5g-undeploy.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-nvidia-aerial"
LogCollect: "! scripts/oc-cn5g-logcollect.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-nvidia-aerial %%log_dir%%"
oc-cn5g-00104:
Host: gracehopper1-oai
NetworkScript: echo "inet 172.21.6.105"
RunIperf3Server: False
Deploy: "! scripts/oc-cn5g-deploy.sh /opt/oai-cn5g-fed-develop-00104 oaicicd-core-for-nvidia-aerial"
Undeploy: "! scripts/oc-cn5g-undeploy.sh /opt/oai-cn5g-fed-develop-00104 oaicicd-core-for-nvidia-aerial"
LogCollect: "! scripts/oc-cn5g-logcollect.sh /opt/oai-cn5g-fed-develop-00104 oaicicd-core-for-nvidia-aerial %%log_dir%%"
matix-cn5g:
Host: matix
NetworkScript: docker exec prod-trf-gen ip a show dev eth0
@@ -300,6 +308,14 @@ oai_ue_caracal:
IF: oaitun_ue1
MTU: 1500
oai_ue_jetson2:
Host: jetson2-oai
AttachScript: 'docker start oai-nr-ue'
DetachScript: 'docker stop oai-nr-ue'
NetworkScript: ip a show dev oaitun_ue1
IF: oaitun_ue1
MTU: 1500
lte_oai_ue_carabe:
Host: carabe
NetworkScript: docker exec lte-b200-ue-fdd-10Mhz-tm1 ip a show dev oaitun_ue1

View File

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

View File

@@ -0,0 +1,93 @@
#!/bin/bash
if [ -z "$1" ]; then
echo "Usage: $0 <bandwidth> [reboot]"
exit 1
fi
BANDWIDTH="$1"
DO_REBOOT="$2"
RU_IP="10.10.0.115"
HOST="root@$RU_IP"
LOGFILE="/tmp/radio_config_$(date +%Y%m%d_%H%M%S).log"
echo "=== Starting at $(date) ===" | tee "$LOGFILE"
echo "Target bandwidth: $BANDWIDTH" | tee -a "$LOGFILE"
echo "Reboot before configuration: ${DO_REBOOT:-no}" | tee -a "$LOGFILE"
if [ "$DO_REBOOT" == "reboot" ]; then
echo "=== Rebooting RU ($RU_IP) ... ===" | tee -a "$LOGFILE"
expect <<EOF | tee -a "$LOGFILE" > /dev/null 2>&1
set timeout 10
spawn ssh -tt $HOST
expect "#"
send "reboot\r"
expect "Continue?"
send "Y\r"
# We expect disconnect now
expect eof
EOF
echo "→ Waiting for $RU_IP SSH to go down..." | tee -a "$LOGFILE"
sleep 10
echo "→ Waiting for $RU_IP SSH port 22 to be open..." | tee -a "$LOGFILE"
while ! nc -zv $RU_IP 22 >/dev/null 2>&1; do
echo "SSH port 22 not open, waiting 5 seconds..." | tee -a "$LOGFILE"
sleep 5
done
echo "✓ SSH port 22 is open on $RU_IP" | tee -a "$LOGFILE"
fi
echo "=== Applying bandwidth configuration ===" | tee -a "$LOGFILE"
expect <<EOF | tee -a "$LOGFILE" > /dev/null 2>&1
set timeout 10
spawn ssh -tt $HOST
expect "#"
send "radio disable\r"
expect "#"
send "config\r"
expect "(config)#"
send "radio 1\r"
expect "(conf-rf 1)#"
send "bandwidth ${BANDWIDTH}\r"
expect "(conf-rf 1)#"
send "exit\r"
expect "(config)#"
send "exit\r"
expect "#"
send "radio enable\r"
expect "#"
send "show running-config\r"
expect "#"
send "exit\r"
EOF
echo "=== Checking bandwidth in running-config ===" | tee -a "$LOGFILE"
FOUND_BW=$(grep -E "bandwidth[[:space:]]+[0-9]+" "$LOGFILE" \
| tail -n 1 \
| awk '{print $2}' \
| tr -d '\r[:space:]')
if [ "$FOUND_BW" -eq "$BANDWIDTH" ]; then
echo "✓ SUCCESS: Bandwidth correctly set to $FOUND_BW" | tee -a "$LOGFILE"
rm "$LOGFILE"
exit 0
else
echo "✖ ERROR: Expected bandwidth $BANDWIDTH but found: $FOUND_BW" | tee -a "$LOGFILE"
exit 1
fi

View File

@@ -33,6 +33,15 @@
<tag_prefix>arm_</tag_prefix>
</testCase>
<testCase>
<class>Custom_Script</class>
<always_exec>true</always_exec>
<desc>Configure 100 MHz bandwidth on WNC RU</desc>
<node>gracehopper1-oai</node>
<script>scripts/set-wnc-bandwidth.sh</script>
<args>100</args>
</testCase>
<testCase>
<class>Detach_UE</class>
<always_exec>true</always_exec>

View File

@@ -33,6 +33,15 @@
<tag_prefix>arm_</tag_prefix>
</testCase>
<testCase>
<class>Custom_Script</class>
<always_exec>true</always_exec>
<desc>Configure 100 MHz bandwidth on WNC RU</desc>
<node>gracehopper1-oai</node>
<script>scripts/set-wnc-bandwidth.sh</script>
<args>100</args>
</testCase>
<testCase>
<class>Detach_UE</class>
<always_exec>true</always_exec>

View File

@@ -0,0 +1,212 @@
<!--
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>JETSON-5G-NRUE</htmlTabRef>
<htmlTabName>30 MHz TDD SA JETSON</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<testCase>
<class>DeployCoreNetwork</class>
<desc>Initialize 5G Core</desc>
<cn_id>oc-cn5g-00104</cn_id>
</testCase>
<testCase>
<class>Pull_Local_Registry</class>
<desc>Pull Images from Local Registry</desc>
<node>jetson2-oai</node>
<images>oai-nr-ue</images>
<tag_prefix>armv8_</tag_prefix>
</testCase>
<testCase>
<class>Pull_Local_Registry</class>
<desc>Pull Images from Local Registry</desc>
<node>gracehopper1-oai</node>
<images>oai-gnb-aerial</images>
<tag_prefix>arm_</tag_prefix>
</testCase>
<testCase>
<class>Create_Workspace</class>
<desc>Create new Workspace</desc>
<node>jetson2-oai</node>
</testCase>
<testCase>
<class>Create_Workspace</class>
<desc>Create new Workspace</desc>
<node>gracehopper1-oai</node>
</testCase>
<testCase>
<class>Custom_Script</class>
<desc>Configure 30 MHz bandwidth on WNC RU</desc>
<node>gracehopper1-oai</node>
<script>scripts/set-wnc-bandwidth.sh</script>
<args>30</args>
</testCase>
<testCase>
<class>Deploy_Object</class>
<desc>Deploy PNF/Nvidia CUBB in a container</desc>
<node>gracehopper1-oai</node>
<yaml_path>ci-scripts/yaml_files/sa_gnb_aerial_30MHz</yaml_path>
<services>nv-cubb</services>
</testCase>
<testCase>
<class>Deploy_Object</class>
<desc>Deploy VNF in a container</desc>
<node>gracehopper1-oai</node>
<yaml_path>ci-scripts/yaml_files/sa_gnb_aerial_30MHz</yaml_path>
<services>oai-gnb-aerial</services>
</testCase>
<testCase>
<class>Deploy_Object</class>
<desc>Deploy nrUE (TDD/Band78/40MHz/N310) in a container</desc>
<yaml_path>ci-scripts/yaml_files/sa_b200_jetson_nrue</yaml_path>
<node>jetson2-oai</node>
<num_attempts>3</num_attempts>
</testCase>
<testCase>
<class>Attach_UE</class>
<desc>Attach OAIUE</desc>
<id>oai_ue_jetson2</id>
</testCase>
<testCase>
<class>Custom_Command</class>
<desc>Configure IP route</desc>
<node>jetson2-oai</node>
<command>sudo ip route add 172.21.6.105 via 13.1.1.100 dev oaitun_ue1</command>
</testCase>
<testCase>
<class>Ping</class>
<desc>Ping: 20pings in 20sec</desc>
<id>oai_ue_jetson2</id>
<svr_id>oc-cn5g-00104</svr_id>
<ping_args>-c 20</ping_args>
<ping_packetloss_threshold>1</ping_packetloss_threshold>
<ping_rttavg_threshold>25</ping_rttavg_threshold>
</testCase>
<testCase>
<class>Iperf</class>
<desc>iperf (UL/10Mbps/UDP)(30 sec)</desc>
<iperf_args>-u -b 10M -t 30 -i 1</iperf_args>
<id>oai_ue_jetson2</id>
<svr_id>oc-cn5g-00104</svr_id>
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
<iperf_bitrate_threshold>80</iperf_bitrate_threshold>
</testCase>
<testCase>
<class>Iperf</class>
<desc>iperf (DL/10Mbps/UDP)(30 sec)</desc>
<iperf_args>-u -b 10M -t 30 -i 1 -R</iperf_args>
<id>oai_ue_jetson2</id>
<svr_id>oc-cn5g-00104</svr_id>
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
<iperf_bitrate_threshold>80</iperf_bitrate_threshold>
</testCase>
<testCase>
<class>Iperf</class>
<desc>iperf (UL/30Mbps/UDP)(30 sec)</desc>
<may_fail>true</may_fail>
<iperf_args>-u -b 30M -t 30 -i 1</iperf_args>
<id>oai_ue_jetson2</id>
<svr_id>oc-cn5g-00104</svr_id>
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
<iperf_bitrate_threshold>80</iperf_bitrate_threshold>
</testCase>
<testCase>
<class>Iperf</class>
<desc>iperf (DL/30Mbps/UDP)(30 sec)</desc>
<may_fail>true</may_fail>
<iperf_args>-u -b 30M -t 30 -i 1 -R</iperf_args>
<id>oai_ue_jetson2</id>
<svr_id>oc-cn5g-00104</svr_id>
<iperf_packetloss_threshold>25</iperf_packetloss_threshold>
<iperf_bitrate_threshold>80</iperf_bitrate_threshold>
</testCase>
<testCase>
<class>Undeploy_Object</class>
<always_exec>true</always_exec>
<desc>Undeploy nr UE</desc>
<node>jetson2-oai</node>
<yaml_path>ci-scripts/yaml_files/sa_b200_jetson_nrue</yaml_path>
<analysis>
<services>oai-nr-ue</services>
</analysis>
</testCase>
<testCase>
<class>Undeploy_Object</class>
<always_exec>true</always_exec>
<desc>Undeploy gNB</desc>
<node>gracehopper1-oai</node>
<yaml_path>ci-scripts/yaml_files/sa_gnb_aerial_30MHz</yaml_path>
<analysis>
<services>oai-gnb-aerial=RetxCheck=20,100,100,100 oai-gnb-aerial=EndsWithBye</services>
</analysis>
</testCase>
<testCase>
<class>Custom_Script</class>
<always_exec>true</always_exec>
<desc>Configure 100 MHz bandwidth on WNC RU</desc>
<node>gracehopper1-oai</node>
<script>scripts/set-wnc-bandwidth.sh</script>
<args>100</args>
</testCase>
<testCase>
<class>Clean_Test_Server_Images</class>
<always_exec>true</always_exec>
<desc>Clean Test Images on Test Server</desc>
<node>gracehopper1-oai</node>
<images>oai-gnb-aerial</images>
</testCase>
<testCase>
<class>Clean_Test_Server_Images</class>
<always_exec>true</always_exec>
<desc>Clean Test Images on Test Server</desc>
<node>jetson2-oai</node>
<images>oai-nr-ue</images>
</testCase>
<testCase>
<class>UndeployCoreNetwork</class>
<always_exec>true</always_exec>
<desc>Terminate 5G Core</desc>
<cn_id>oc-cn5g-00104</cn_id>
</testCase>
</testCaseList>

View File

@@ -0,0 +1,27 @@
services:
oai-nr-ue:
image: ${REGISTRY-oaisoftwarealliance/}${NRUE_IMG:-oai-nr-ue}:${TAG:-develop}
network_mode: host
container_name: oai-nr-ue
cap_drop:
- ALL
cap_add:
- NET_ADMIN # for interface bringup
- NET_RAW # for ping
- SYS_NICE # for performance
- IPC_LOCK # for memory locking
devices:
- /dev/net/tun:/dev/net/tun
- /dev/bus/usb/:/dev/bus/usb/
environment:
TZ: Europe/Paris
USE_B2XX: 'yes'
USE_ADDITIONAL_OPTIONS: --usrp-args type=b200 -C 3350010000 -r 78 --numerology 1 --band 78 --ssb 345 --ue-fo-compensation --uicc0.imsi 001040000000001 --uicc0.pdu_sessions.[0].dnn oai.ipv4 -A 60 --thread-pool 5,6,7,8,9 --ue-txgain 15 --ue-rxgain 90
cpuset: "3-11"
volumes:
- ../../conf_files/ue.sa.conf:/opt/oai-nr-ue/etc/nr-ue.conf
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
interval: 10s
timeout: 5s
retries: 5

View File

@@ -0,0 +1,61 @@
services:
oai-nr-ue:
image: ${REGISTRY-oaisoftwarealliance/}${NRUE_IMG:-oai-nr-ue}:${UE_TAG:-${TAG:-develop}}
logging:
options:
max-file: "1"
network_mode: host
container_name: oai-nr-ue
privileged: true
cpuset: 4,6,8,10,12,14,16,18,20,22,24,26,28
cap_drop:
- ALL
cap_add:
- NET_ADMIN # for interface bringup
- NET_RAW # for ping
- SYS_NICE # for performance
- IPC_LOCK # for memory locking
- SYS_PTRACE # for debugging
devices:
- /dev/net/tun:/dev/net/tun
ulimits:
core: -1 # for core dumps
#entrypoint: /bin/bash -c "sleep infinity"
environment:
TZ: UTC
#DISPLAY: $DISPLAY #Uncomment for GUI
USE_ADDITIONAL_OPTIONS: |
--thread-pool 4,6,8,10,12,14,16,18,20,22,24,26
--usrp-args type=x4xx,addr=192.168.10.2,clock_source=external,time_source=external
--ssb 1478 -r 273 --numerology 1 --band 78 -C 3750000000
--num-dl-actors 20
--ue-nb-ant-tx 1
--ue-nb-ant-rx 1
--ue-rxgain 25
--ue-txgain 13
--uicc0.imsi 001010000000003
--ue-fo-compensation -A 90
--usrp-tx-thread-config 1
--log_config.global_log_options level,nocolor,utc_time
# Unused options:
# --T_stdout 2
# --imscope
# --ssb 1478 -r 273 --numerology 1 --band 78 -C 3750000000
# --usrp-tx-thread-config 1
# --log_config.mac_log_level debug
# --log_config.nr_mac_log_level debug
# --usrp-tx-thread-config 1 -d
# --ssb 194 -r 51 --numerology 1 --band 78 -C 3750000000 #20MHz
# --ssb 236 -r 106 --numerology 1 --band 78 -C 3750000000 #40MHz
volumes:
- ../../conf_files/ue.sa.conf:/opt/oai-nr-ue/etc/nr-ue.conf
# UL throughput is worse with 256-qam table
- ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/uecap_ports1.xml:/opt/oai-nr-ue/uecap_ports1.xml
#For GUI
- ${HOME}/.Xauthority:/root/.Xauthority:rw
- /tmp/.X11-unix:/tmp/.X11-unix
healthcheck:
test: /bin/bash -c "pgrep nr-uesoftmodem"
interval: 10s
timeout: 5s
retries: 5

View File

@@ -0,0 +1,32 @@
#!/bin/bash
# Check if cuBB_SDK is defined, if not, use default path
cuBB_Path="${cuBB_SDK:-/opt/nvidia/cuBB}"
cd "$cuBB_Path" || exit 1
# Restart MPS
# Export variables
export CUDA_DEVICE_MAX_CONNECTIONS=8
export CUDA_MPS_PIPE_DIRECTORY=/var
export CUDA_MPS_LOG_DIRECTORY=/var
# Stop existing MPS
echo quit | sudo -E nvidia-cuda-mps-control
# Start MPS
sudo -E nvidia-cuda-mps-control -d
sudo -E echo start_server -uid 0 | sudo -E nvidia-cuda-mps-control
# Start cuphycontroller_scf
# Check if an argument is provided
if [ $# -eq 0 ]; then
# No argument provided, use default value
argument="P5G_WNC_GH"
else
# Argument provided, use it
argument="$1"
fi
sudo -E "$cuBB_Path"/build.$(uname -m)/cuPHY-CP/cuphycontroller/examples/cuphycontroller_scf "$argument"
sudo -E ./build.$(uname -m)/cuPHY-CP/gt_common_libs/nvIPC/tests/pcap/pcap_collect

View File

@@ -0,0 +1,243 @@
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
#
# 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.
aerial_sdk_version: 25-3-cubb
l2adapter_filename: l2_adapter_config_P5G_GH.yaml
aerial_metrics_backend_address: 127.0.0.1:8081
# CPU core shared by all low-priority threads
low_priority_core: 10
enable_ptp_svc_monitoring: 0
ptp_rms_threshold: 20 #ns
nic_tput_alert_threshold_mbps: 85000
cuphydriver_config:
standalone: 0
validation: 0
num_slots: 8
log_level: DBG
profiler_sec: 0
dpdk_thread: 10
dpdk_verbose_logs: 0
accu_tx_sched_res_ns: 500
accu_tx_sched_disable: 0 #Flag applicable only for CX6-DX : BF3/CX7 HW and beyond support accurate send scheduling directly on timestamp, for CX6-DX this is implemented via software emulation
fh_stats_dump_cpu_core: -1
pdump_client_thread: -1
use_green_contexts: 0
use_batched_memcpy: 0 # Experimental feature; requires >= CUDA 12.8
mps_sm_pusch: 100
mps_sm_pucch: 2
mps_sm_prach: 2
mps_sm_ul_order: 20
mps_sm_pdsch: 102
mps_sm_pdcch: 10
mps_sm_pbch: 2
mps_sm_gpu_comms: 16
mps_sm_srs: 16
pdsch_fallback: 0
dpdk_file_prefix: cuphycontroller
nics:
- nic: '0000:01:00.0'
mtu: 9216
cpu_mbufs: 196608
uplane_tx_handles: 64
txq_size: 8192
rxq_size: 16384
gpu: 0
cus_port_failover: 0
gpus:
- 0
# Set GPUID to the GPU sharing the PCIe switch as NIC
# run nvidia-smi topo -m to find out which GPU
workers_ul: [4,5]
workers_dl: [6,7,8]
debug_worker: -1
workers_sched_priority: 95
prometheus_thread: -1
start_section_id_srs: 3072
start_section_id_prach: 2048
enable_ul_cuphy_graphs: 1
enable_dl_cuphy_graphs: 1
ul_order_kernel_mode: 0 # 0: Ping-Pong, 1: dual CTA
ul_order_timeout_cpu_ns: 8000000
ul_order_timeout_log_interval_ns: 1000000000
ul_order_timeout_gpu_ns: 3000000
ul_order_timeout_gpu_srs_ns: 5200000
ul_srs_aggr3_task_launch_offset_ns: 500000
ul_order_timeout_gpu_log_enable: 0
ul_order_max_rx_pkts: 512
ul_order_rx_pkts_timeout_ns: 100000
cplane_disable: 0
gpu_init_comms_dl: 1
cell_group: 1
cell_group_num: 1
fix_beta_dl: 0
bfw_beta_prescaler: 16384
pusch_workCancelMode: 2 # set cuphyPuschStatPrms_t workCancelMode field to PUSCH_DEVICE_GRAPHS; this only sets the mode and does not cancel work;
# work cancellation (i.e., not launching some of the device graphs) can only occur after an explicit internal
# memory write is timely observed by a PUSCH graph.
pusch_sinr: 2
pusch_rssi: 1
pusch_tdi: 1
pusch_cfo: 1
pusch_dftsofdm: 0
pusch_to: 1
pusch_select_eqcoeffalgo: 3
pusch_select_chestalgo: 1
pusch_enable_perprgchest: 0
pusch_tbsizecheck: 1
pusch_deviceGraphLaunchEn: 1
pusch_waitTimeOutPreEarlyHarqUs: 3000
pusch_waitTimeOutPostEarlyHarqUs: 3000
puxch_polarDcdrListSz: 8
enable_cpu_task_tracing: 0
enable_prepare_tracing: 0
disable_empw: 0 #1=>Disables Multi packet WQE feature
cqe_tracer_config:
enable_dl_cqe_tracing: 0
cqe_trace_cell_mask: 1 #[64 bit mask: Bit0->Cell0, Bit1->Cell1...]
cqe_trace_slot_mask: 196800 #[20 bit mask: Bit0->Slot0, Bit1->Slot1...] 196800=>All *6,*7 DL Slots
ul_rx_pkt_tracing_level: 0
ul_rx_pkt_tracing_level_srs: 0
pmu_metrics: 0 #Enable and select PMU metrics, 0=disabled, 1=General Counters (platform agnostic), 2=Topdown Metrics (Grace only), 3=Cache Metrics (Grace only)
enable_h2d_copy_thread: 1
h2d_copy_thread_cpu_affinity : 11
h2d_copy_thread_sched_priority : 95 #0->SCHED_OTHER, >0->Actual
split_ul_cuda_streams: 0 # 1=Put UL slot 4 and slot 5 on different streams for DDDSUUDDDD pattern
serialize_pucch_pusch: 0 # 1=Force serialization of PUSCH/PUCCH
# Note: for Early Harq (EH) order is PUSCH EH -> PUCCH -> PUSCH non EH
# for non-Early Harq order is PUCCH -> all PUSCH processing
aggr_obj_non_avail_th: 5 # Threshold for consecutive non-availability of Aggregated objects(UL/DL) or DL/UL buffers
dl_wait_th_ns:
- 500000 #H2D copy wait threshold
- 4000000 #cuPHY DL channel wait threshold
sendCPlane_timing_error_th_ns : 0
sendCPlane_ulbfw_backoff_th_ns: 300000 # ULBFW must be completed by cplane send time - this is the backoff time
sendCPlane_dlbfw_backoff_th_ns: 300000 # DLBFW must be completed by cplane send time - this is the backoff time
pusch_forcedNumCsi2Bits: 0
mMIMO_enable: 0
enable_srs: 1
ue_mode: 0
mCh_segment_proc_enable: 0
pusch_aggr_per_ctx: 3
prach_aggr_per_ctx: 2
pucch_aggr_per_ctx: 4
srs_aggr_per_ctx: 3
ul_input_buffer_per_cell: 10
ul_input_buffer_per_cell_srs: 6
max_harq_pools: 384
max_harq_tx_count_bundled: 10
max_harq_tx_count_non_bundled: 4
ok_testbench_config:
enable_ok_tb: 0
num_ok_tb_slot: 0 #Presently not used
max_ru_unhealthy_ul_slots: 100
srs_chest_algo_type: 0
srs_chest_tol2_normalization_algo_type: 1
srs_chest_tol2_constant_scaler: 32768.0
bfw_power_normalization_alg_selector: 1
total_num_srs_chest_buffers: 6144
send_static_bfw_wt_all_cplane: 1
ul_pcap_capture_enable: 0
ul_pcap_capture_thread_cpu_affinity: 10
ul_pcap_capture_thread_sched_priority: 95
pcap_logger_ul_cplane_enable: 0
pcap_logger_dl_cplane_enable: 0
pcap_logger_thread_cpu_affinity: 10
pcap_logger_thread_sched_prio: 95
pcap_logger_file_save_dir: ./
dlc_bfw_enable_divide_per_cell: 0 # Enable/disable dividing DL BFW C-Plane transmission window among multiple cells in a slot
ulc_bfw_enable_divide_per_cell: 0 # Enable/disable dividing UL BFW C-Plane transmission window among multiple cells in a slot
dlc_alloc_cplane_bfw_txq: 0 # Allocates a second separate queue for BFW DL C-Plane transmission
ulc_alloc_cplane_bfw_txq: 1 # Allocates a second separate queue for BFW UL C-Plane transmission
#static beam id range
static_beam_id_start: 1
static_beam_id_end: 16527
#dynamic beam id range
dynamic_beam_id_start: 16528 #Dynamic beam ID start should be after static beam ID end
dynamic_beam_id_end: 32767 #15bit max value
bfw_c_plane_chaining_mode: 0 # 0: Default memcpy of BFW weights, 1: CPU mbuf chaining of BFW weights, 2: GPU mbuf chaining
enable_l1_param_sanity_check: 0
pusch_nMaxLdpcHetConfigs: 32
notify_ul_harq_buffer_release: 0
# data_config:
# datalake_core: 12 # This must be set for Data Lake and/or E3 Agent to be used
# datalake_db_write_enable: 1 # Enable/disable ClickHouse writes based on datalake_data_types
# datalake_samples: 1000000
# datalake_address: localhost
# datalake_engine: "MergeTree() PRIMARY KEY (TsTaiNs)"
# # datalake_drop_tables: 0 # Set to 1 to drop Clickhouse tables at startup
# datalake_data_types: [fh, pusch, hest] # Data types to write to ClickHouse DB (all types always collected in memory for E3 Agent):
# fh = Fronthaul IQ samples,pusch = PUSCH/FAPI data, hest = channel estimates
# datalake_store_failed_pdu: 0 # Set to 1 to store PDU data even when CRC fails
# e3_agent_enable: 0 # Enable/disable E3 Agent and dApp capabilities
# num_rows_fh: 120
# num_rows_pusch: 200
# num_rows_hest: 140
# e3_pub_port: 5555 # E3 publisher port for indication messages
# e3_rep_port: 5556 # E3 reply port for E3AP requests
# e3_sub_port: 5560 # E3 subscriber port for Manager messages
cells:
- name: O-RU 0
cell_id: 1
ru_type: 1
# set to 00:00:00:00:00:00 to use the MAC address of the NIC port to use
src_mac_addr: 00:00:00:00:00:00
dst_mac_addr: e8:c7:cf:ad:12:0b #WNC n78
nic: '0000:01:00.0'
vlan: 500
pcp: 7
txq_count_uplane: 1
eAxC_id_ssb_pbch: [0, 1, 2, 3]
eAxC_id_pdcch: [0, 1, 2, 3]
eAxC_id_pdsch: [0, 1, 2, 3]
eAxC_id_csirs: [0, 1, 2, 3]
eAxC_id_pusch: [0, 1, 2, 3]
eAxC_id_pucch: [0, 1, 2, 3]
eAxC_id_srs: [8, 9, 10, 11]
eAxC_id_prach: [4, 5, 6, 7]
dl_iq_data_fmt: {comp_meth: 1, bit_width: 9}
ul_iq_data_fmt: {comp_meth: 1, bit_width: 9}
section_3_time_offset: 484
fs_offset_dl: 10
exponent_dl: 4
ref_dl: 0
fs_offset_ul: -5
exponent_ul: 4
max_amp_ul: 65504
mu: 1
T1a_max_up_ns: 280000
T1a_max_cp_ul_ns: 405000
Ta4_min_ns: 50000
Ta4_max_ns: 331000
Tcp_adv_dl_ns: 125000
ul_u_plane_tx_offset_ns: 280000
fh_len_range: 0
pusch_prb_stride: 273
prach_prb_stride: 12
srs_prb_stride: 273
pusch_ldpc_max_num_itr_algo_type: 1
pusch_fixed_max_num_ldpc_itrs: 10
pusch_ldpc_early_termination: 0
pusch_ldpc_algo_index: 0
pusch_ldpc_flags: 2
pusch_ldpc_use_half: 1
pusch_nMaxPrb: 273
pusch_nMaxRx: 4
ul_gain_calibration: 78.68
lower_guard_bw: 845
tv_pusch: cuPhyChEstCoeffs.h5

View File

@@ -0,0 +1,67 @@
services:
nv-cubb:
container_name: nv-cubb
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities:
- gpu
network_mode: host
shm_size: 4096m
privileged: true
stdin_open: true
tty: true
volumes:
- /lib/modules:/lib/modules
- /dev/hugepages:/dev/hugepages
- /usr/src:/usr/src
- ./cuphycontroller_P5G_WNC_GH.yaml:/opt/nvidia/cuBB/cuPHY-CP/cuphycontroller/config/cuphycontroller_P5G_WNC_GH.yaml
- ./aerial_l1_entrypoint.sh:/opt/nvidia/cuBB/aerial_l1_entrypoint.sh
- /var/log/aerial:/var/log/aerial
- ../../../cmake_targets/share:/opt/cuBB/share
userns_mode: host
ipc: "shareable"
image: cubb-build:25-3
environment:
- cuBB_SDK=/opt/nvidia/cuBB
command: bash -c "sudo rm -rf /tmp/phy.log && sudo chmod +x /opt/nvidia/cuBB/aerial_l1_entrypoint.sh && /opt/nvidia/cuBB/aerial_l1_entrypoint.sh"
healthcheck:
test: ["CMD-SHELL",'grep -q "L1 is ready!" /tmp/phy.log && echo 0 || echo 1']
interval: 20s
timeout: 5s
retries: 5
oai-gnb-aerial:
cpuset: "13-16"
image: ${REGISTRY-oaisoftwarealliance/}${GNB_IMG:-oai-gnb-aerial}:${TAG:-develop}
depends_on:
nv-cubb:
condition: service_healthy
cap_drop:
- ALL
cap_add:
- SYS_NICE
- IPC_LOCK
ipc: "container:nv-cubb"
environment:
USE_ADDITIONAL_OPTIONS: --log_config.global_log_options level,nocolor,utc_time
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities:
- gpu
network_mode: host
shm_size: 4096m
volumes:
- ../../conf_files/gnb-vnf.sa.band78.78prb.aerial.conf:/opt/oai-gnb/etc/gnb.conf
container_name: oai-gnb-aerial
healthcheck:
test: /bin/bash -c "ps aux | grep -v grep | grep -c softmodem"
interval: 10s
timeout: 5s
retries: 5

View File

@@ -105,19 +105,9 @@ check_supported_distribution() {
case "$distribution" in
"ubuntu24.04") return 0 ;;
"ubuntu22.04") return 0 ;;
"ubuntu20.04") return 0 ;;
"debian11") return 0 ;;
"debian12") return 0 ;;
"fedora41") return 0 ;;
"fedora40") return 0 ;;
"rhel8.2") return 0 ;;
"rhel8.3") return 0 ;;
"rhel8.4") return 0 ;;
"rhel8.5") return 0 ;;
"rhel8.6") return 0 ;;
"rhel8.7") return 0 ;;
"rhel8.8") return 0 ;;
"rhel8.9") return 0 ;;
"fedora43") return 0 ;;
"rhel9.0") return 0 ;;
"rhel9.1") return 0 ;;
"rhel9.2") return 0 ;;
@@ -127,9 +117,6 @@ check_supported_distribution() {
"rhel9.6") return 0 ;;
"rhel9.7") return 0 ;;
"centos9") return 0 ;; # CentOS stream
"rocky8.7") return 0 ;;
"rocky8.8") return 0 ;;
"rocky8.9") return 0 ;;
"rocky9.1") return 0 ;;
"rocky9.2") return 0 ;;
"rocky9.3") return 0 ;;
@@ -281,7 +268,7 @@ check_install_usrp_uhd_driver(){
$SUDO apt-get update
$SUDO apt-get -y install python3-tk $boost_libs_ubuntu libusb-1.0-0-dev
case "$(get_distribution_release)" in
"ubuntu20.04" | "ubuntu22.04")
"ubuntu22.04")
$SUDO apt-get -y install libuhd-dev libuhd4.5.0 uhd-host
;;
esac
@@ -441,7 +428,7 @@ check_install_additional_tools (){
local optional_packages=""
if [[ "$OS_BASEDISTRO" == "debian" ]]; then
case "$(get_distribution_release)" in
"ubuntu20.04" | "ubuntu22.04" | "debian11" | "debian12" )
"ubuntu22.04" | "debian11" | "debian12" )
optional_packages="python3 python3-pip python3-dev python3-scipy python3-matplotlib python3-pyroute2 universal-ctags"
;;
esac

View File

@@ -165,6 +165,7 @@ static const char *const flag_name[] = {FOREACH_FLAG(FLAG_TEXT) ""};
COMP_DEF(M2AP, ) \
COMP_DEF(M3AP, ) \
COMP_DEF(NGAP, ) \
COMP_DEF(NRPPA, ) \
COMP_DEF(GNB_APP, log) \
COMP_DEF(NR_RRC, log) \
COMP_DEF(NR_MAC, log) \

View File

@@ -586,6 +586,27 @@ ID = LEGACY_NGAP_TRACE
GROUP = ALL:LEGACY_NGAP:LEGACY_GROUP_TRACE:LEGACY
FORMAT = string,log
ID = LEGACY_NRPPA_INFO
DESC = NRPPA legacy logs - info level
GROUP = ALL:LEGACY_NRPPA:LEGACY_GROUP_INFO:LEGACY
FORMAT = string,log
ID = LEGACY_NRPPA_ERROR
DESC = NRPPA legacy logs - error level
GROUP = ALL:LEGACY_NRPPA:LEGACY_GROUP_ERROR:LEGACY
FORMAT = string,log
ID = LEGACY_NRPPA_WARNING
DESC = NRPPA legacy logs - warning level
GROUP = ALL:LEGACY_NRPPA:LEGACY_GROUP_WARNING:LEGACY
FORMAT = string,log
ID = LEGACY_NRPPA_DEBUG
DESC = NRPPA legacy logs - debug level
GROUP = ALL:LEGACY_NRPPA:LEGACY_GROUP_DEBUG:LEGACY
FORMAT = string,log
ID = LEGACY_NRPPA_TRACE
DESC = NRPPA legacy logs - trace level
GROUP = ALL:LEGACY_NRPPA:LEGACY_GROUP_TRACE:LEGACY
FORMAT = string,log
ID = LEGACY_X2AP_INFO
DESC = X2AP legacy logs - info level
GROUP = ALL:LEGACY_X2AP:LEGACY_GROUP_INFO:LEGACY
@@ -1404,7 +1425,7 @@ ID = UE_PHY_PDCCH_ENERGY
ID = UE_PHY_PDSCH_IQ
DESC = UE PDSCH received IQ data
GROUP = ALL:PHY:GRAPHIC:HEAVY:UE
FORMAT = int,eNB_ID : int,frame : int,subframe : int,nb_rb : int,N_RB_UL : int,symbols_per_tti : buffer,pusch_comp
FORMAT = int,eNB_ID : int,frame : int,subframe : int,nb_rb : int,N_RB_UL : int,symbols_per_tti : buffer,pdsch_comp
ID = UE_PHY_PDSCH_ENERGY
DESC = UE PDSCH 1 energy and threshold
GROUP = ALL:PHY:GRAPHIC:HEAVY:UE

View File

@@ -37,11 +37,65 @@ add_subdirectory(filter)
add_subdirectory(logger)
add_subdirectory(view)
# Option to enable record_db tracer tool with ClickHouse database support
add_boolean_option(T_RECORD_DB OFF "Compile record_db tracer tool with ClickHouse support" OFF)
if(T_RECORD_DB)
# Save current BUILD_SHARED_LIBS setting
set(SAVED_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
# Configure options for clickhouse-cpp
set(BUILD_SHARED_LIBS ON CACHE BOOL "" FORCE)
# Save current compiler flags and disable -Werror for zstd
set(SAVED_CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
# Check if system zstd library is available
find_library(ZSTD_LIBRARY NAMES zstd)
if(ZSTD_LIBRARY)
# Use system zstd library to avoid building legacy zstd code with warnings
set(WITH_SYSTEM_ZSTD ON CACHE BOOL "" FORCE)
else()
# Fall back to bundled zstd and suppress warnings from legacy code
# https://github.com/ClickHouse/clickhouse-cpp/blob/master/contrib/zstd/zstd/legacy/zstd_v01.c#L1935
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-maybe-uninitialized -Wno-uninitialized")
endif()
CPMAddPackage(
NAME clickhouse-cpp
GITHUB_REPOSITORY ClickHouse/clickhouse-cpp
GIT_TAG master
)
# Restore original compiler flags and BUILD_SHARED_LIBS
set(CMAKE_C_FLAGS "${SAVED_CMAKE_C_FLAGS}")
set(BUILD_SHARED_LIBS ${SAVED_BUILD_SHARED_LIBS} CACHE BOOL "" FORCE)
CPMAddPackage(
NAME fmtlog
GITHUB_REPOSITORY MengRao/fmtlog
GIT_TAG main
GIT_SHALLOW FALSE
)
add_executable(record_db record_db.cpp)
target_include_directories(record_db PRIVATE ${fmtlog_SOURCE_DIR} ${fmtlog_SOURCE_DIR}/fmt/include)
target_link_libraries(record_db PRIVATE tracer_utils clickhouse-cpp-lib fmtlog-shared fmt)
endif() # T_RECORD_DB
add_custom_target(T_tools)
add_dependencies(T_tools
record replay extract_config extract_input_subframe
extract_output_subframe extract macpdu2wireshark multi
textlog csv)
# Add record_db to T_tools if it was built
if(TARGET record_db)
add_dependencies(T_tools record_db)
endif()
add_dependencies(nr-softmodem T_tools)
add_dependencies(nr-uesoftmodem T_tools)
add_dependencies(lte-softmodem T_tools)

View File

@@ -1,18 +1,23 @@
CC=gcc
CXX=g++
CFLAGS=-Wall -g -pthread -DT_TRACER -I. -I../incgen
CXXFLAGS=-Wall -g -pthread -DT_TRACER -I. -I../incgen -std=c++11
#CFLAGS += -O3 -ffast-math -fomit-frame-pointer
LIBS=-lm
XLIBS=-lX11 -lpng -lXft
all: record replay extract_config textlog enb ue vcd macpdu2wireshark \
all: record record_db replay extract_config textlog enb ue vcd macpdu2wireshark \
extract_input_subframe extract_output_subframe to_vcd extract multi \
gnb t_tracer_app_gnb t_tracer_app_ue gnb_mac csv
record: utils.o record.o database.o configuration.o
$(CC) $(CFLAGS) -o record $^ $(LIBS)
record_db: utils.o record_db.o database.o configuration.o
$(CXX) $(CXXFLAGS) -o record_db $^ $(LIBS) -lclickhouse-cpp-lib $(FMTLOG_LIBS)
replay: utils.o replay.o
$(CC) $(CFLAGS) -o replay $^ $(LIBS)
@@ -102,8 +107,11 @@ filter/filter.a:
%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
%.o: %.cpp
$(CXX) $(CXXFLAGS) -c -o $@ $<
clean:
rm -f *.o core tracer_remote textlog enb ue vcd record replay
rm -f *.o core tracer_remote textlog enb ue vcd record record_db replay
rm -f extract_config macpdu2wireshark extract_input_subframe
rm -f extract_output_subframe to_vcd extract multi gnb
rm -f t_tracer_app_gnb t_tracer_app_ue gnb_mac csv

File diff suppressed because it is too large Load Diff

View File

@@ -29,7 +29,7 @@
#define SHUTDOWN_ACTOR(ptr) shutdown_actor((Actor_t *)ptr);
typedef struct Actor_t {
typedef struct {
notifiedFIFO_t fifo;
bool terminate;
pthread_t thread;

View File

@@ -93,7 +93,7 @@ TEST(DISABLED_actor, thread_safety_with_core_affinity)
// Thread safety can be ensured through data separation, here using C inheritance-like
// model
typedef struct TestActor_t {
typedef struct {
Actor_t actor;
int count;
} TestActor_t;

View File

@@ -27,7 +27,7 @@
typedef void (*callback_t)(void*);
/// @brief This thread barrier allows modifying the maximum joins after it is initialized
typedef struct dynamic_barrier_t {
typedef struct {
pthread_mutex_t barrier_lock;
int completed_jobs;
int max_joins;

View File

@@ -14,4 +14,4 @@
#include "openair2/COMMON/f1ap_messages_def.h"
#include "openair2/COMMON/e1ap_messages_def.h"
#include "openair2/COMMON/ngap_messages_def.h"
#include "openair2/COMMON/nrppa_messages_def.h"

View File

@@ -230,6 +230,7 @@ typedef struct IttiMsgText_s {
#include <openair2/COMMON/udp_messages_types.h>
#include <openair2/COMMON/gtpv1_u_messages_types.h>
#include <openair2/COMMON/ngap_messages_types.h>
#include <openair2/COMMON/nrppa_messages_types.h>
#include <openair3/SCTP/sctp_eNB_task.h>
#include <openair3/NAS/UE/nas_proc_defs.h>
#include <openair3/NAS/UE/ESM/esmData.h>
@@ -294,6 +295,7 @@ typedef struct {
TASK_DEF(TASK_RAL_ENB, 200) \
TASK_DEF(TASK_S1AP, 200) \
TASK_DEF(TASK_NGAP, 200) \
TASK_DEF(TASK_NRPPA, 200) \
TASK_DEF(TASK_X2AP, 200) \
TASK_DEF(TASK_M2AP_ENB, 200) \
TASK_DEF(TASK_M2AP_MCE, 200) \

View File

@@ -121,8 +121,9 @@ The other SDRs (AW2S, LimeSDR, ...) have no READMEs.
## Testing
- [UnitTests.md](./UnitTests.md) explains the unit testing setup
- Component tests are under `tests/`. Currently, there is a simple CU-UP
tester, see the corresponding [README.md](../tests/nr-cuup/README.md).
- Component tests are under `tests/`. Currently, the following component tests are supported
- A simple CU-UP tester, see the corresponding [README.md](../tests/nr-cuup/README.md).
- A CU-NRPPA tester, see the corresponding [README.md](../tests/nr-cu-nrppa/README.md).
- [TESTBenches.md](./TESTBenches.md) lists the CI setup and links to pipelines
- The CI setup uses a [custom framework](../ci-scripts/README.md) to run
end-to-end tests.

View File

@@ -27,6 +27,7 @@
| groot | Groot | gNB (n77) | B210 (30AD30F) |
| rocket | Rocket | gNB (n77) | B210 (31F8010) |
| raspix | Raspix | COTS UE | Quectel RM520N |
| jetson1-oai | Jetson1-oai | nrUE | USRP B210 |
> **Note:** The available resources, and their current usage, is indicated here:
> - [Lockable resources of jenkins-oai](https://jenkins-oai.eurecom.fr/lockable-resources/):
@@ -238,6 +239,10 @@ information on how the images are built.
~5G-NR
- gracehopper1-oai
- run channel simulation on CPU and GPU using test_channel_scalability
- [RAN-SA-AERIAL-OAIUE-CN5G](https://jenkins-oai.eurecom.fr/job/RAN-SA-AERIAL-OAIUE-CN5G/)
~5G-NR ~nrUE
- 5G-NR SA test setup: OAI VNF + PNF/NVIDIA CUBB on gracehopper1-oai + WNC RU, OAIUE on jetson1-oai + B210, OAI CN5G
- OpenShift cluster for CN deployment and container images for gNB and UE deployment
### RAN-CI-NSA-Trigger

View File

@@ -100,6 +100,12 @@ nfs:
port: 8080
api_version: v1
interface_name: eth0
lmf:
host: oai-lmf
sbi:
port: 8080
api_version: v1
interface_name: eth0
#### Common for UDR and AMF
database:
@@ -220,6 +226,20 @@ upf:
- dnn: "ims"
- dnn: "default"
lmf:
http_threads_count: 8
gnb_id_bits_count: 28
num_gnb: 1
trp_info_wait_ms: 500
positioning_wait_ms: 500
measurement_wait_ms: 500
support_features:
request_trp_info: no
determine_num_gnb: yes
use_http2: yes
use_fqdn_dns: no
register_nrf: yes
## DNN configuration
dnns:
- dnn: "oai"

View File

@@ -0,0 +1,195 @@
services:
mysql:
container_name: "mysql"
image: mysql:8.0
volumes:
- ./database/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
- ./healthscripts/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
environment:
- TZ=Europe/Paris
- MYSQL_DATABASE=oai_db
- MYSQL_USER=test
- MYSQL_PASSWORD=test
- MYSQL_ROOT_PASSWORD=linux
healthcheck:
test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
interval: 5s
timeout: 2s
retries: 10
networks:
public_net:
ipv4_address: 192.168.70.131
ims:
container_name: "ims"
image: oaisoftwarealliance/ims:latest
volumes:
- ./conf/sip.conf:/etc/asterisk/sip.conf
- ./conf/users.conf:/etc/asterisk/users.conf
healthcheck:
test: /bin/bash -c "pgrep asterisk"
interval: 5s
timeout: 2s
retries: 10
networks:
public_net:
ipv4_address: 192.168.70.139
oai-udr:
container_name: "oai-udr"
image: oaisoftwarealliance/oai-udr:develop
expose:
- 80/tcp
- 8080/tcp
volumes:
- ./conf/config.yaml:/openair-udr/etc/config.yaml
environment:
- TZ=Europe/Paris
depends_on:
- mysql
- oai-nrf
networks:
public_net:
ipv4_address: 192.168.70.136
oai-udm:
container_name: "oai-udm"
image: oaisoftwarealliance/oai-udm:develop
expose:
- 80/tcp
- 8080/tcp
volumes:
- ./conf/config.yaml:/openair-udm/etc/config.yaml
environment:
- TZ=Europe/Paris
depends_on:
- oai-udr
networks:
public_net:
ipv4_address: 192.168.70.137
oai-ausf:
container_name: "oai-ausf"
image: oaisoftwarealliance/oai-ausf:develop
expose:
- 80/tcp
- 8080/tcp
volumes:
- ./conf/config.yaml:/openair-ausf/etc/config.yaml
environment:
- TZ=Europe/Paris
depends_on:
- oai-udm
networks:
public_net:
ipv4_address: 192.168.70.138
oai-nrf:
container_name: "oai-nrf"
image: oaisoftwarealliance/oai-nrf:develop
expose:
- 80/tcp
- 8080/tcp
volumes:
- ./conf/config.yaml:/openair-nrf/etc/config.yaml
environment:
- TZ=Europe/Paris
networks:
public_net:
ipv4_address: 192.168.70.130
oai-amf:
container_name: "oai-amf"
image: oaisoftwarealliance/oai-amf:develop
expose:
- 80/tcp
- 8080/tcp
- 38412/sctp
volumes:
- ./conf/config.yaml:/openair-amf/etc/config.yaml
environment:
- TZ=Europe/Paris
depends_on:
- mysql
- oai-nrf
- oai-ausf
networks:
public_net:
ipv4_address: 192.168.70.132
oai-lmf:
container_name: "oai-lmf"
image: oaisoftwarealliance/oai-lmf:develop
#image: oai-lmf:psoElementwiseTdoAmeanVarTDoAfilter
expose:
- 80/tcp
- 8080/tcp
volumes:
- ./conf/config.yaml:/openair-lmf/etc/config.yaml
environment:
- TZ=Europe/Paris
depends_on:
- mysql
- oai-nrf
- oai-amf
networks:
public_net:
ipv4_address: 192.168.70.141
oai-smf:
container_name: "oai-smf"
image: oaisoftwarealliance/oai-smf:develop
expose:
- 80/tcp
- 8080/tcp
- 8805/udp
volumes:
- ./conf/config.yaml:/openair-smf/etc/config.yaml
environment:
- TZ=Europe/Paris
depends_on:
- oai-nrf
- oai-amf
networks:
public_net:
ipv4_address: 192.168.70.133
oai-upf:
container_name: "oai-upf"
image: oaisoftwarealliance/oai-upf:develop
expose:
- 2152/udp
- 8805/udp
volumes:
- ./conf/config.yaml:/openair-upf/etc/config.yaml
environment:
- TZ=Europe/Paris
depends_on:
- oai-nrf
- oai-smf
cap_add:
- NET_ADMIN
- SYS_ADMIN
cap_drop:
- ALL
privileged: true
networks:
public_net:
ipv4_address: 192.168.70.134
oai-ext-dn:
privileged: true
init: true
container_name: oai-ext-dn
image: oaisoftwarealliance/trf-gen-cn5g:jammy
entrypoint: /bin/bash -c \
"ip route add 10.0.0.0/16 via 192.168.70.134 dev eth0; ip route; sleep infinity"
command: ["/bin/bash", "-c", "trap : SIGTERM SIGINT; sleep infinity & wait"]
healthcheck:
test: /bin/bash -c "ip r | grep 10.0.0"
interval: 5s
timeout: 2s
retries: 10
networks:
public_net:
ipv4_address: 192.168.70.135
networks:
public_net:
driver: bridge
name: oai-cn5g-public-net
ipam:
config:
- subnet: 192.168.70.128/26
driver_opts:
com.docker.network.bridge.name: "oai-cn5g"

View File

@@ -0,0 +1,43 @@
{
"externalClientType": "VALUE_ADDED_SERVICES",
"amfId": "128:1:1",
"locationQoS": {
"hAccuracy": 1.5,
"vAccuracy": 1.5,
"verticalRequested": true,
"responseTime": "LOW_DELAY",
"lcsQosClass": "BEST_EFFORT"
},
"supportedGADShapes": [
"POINT",
"POINT_UNCERTAINTY_CIRCLE"
],
"supi": "imsi-001010000000001",
"ncgi": {
"plmnId": {
"mcc": "001",
"mnc": "01"
},
"nrCellId": "14680064",
"nid": "0"
},
"priority": "HIGHEST_PRIORITY",
"velocityRequested": "VELOCITY_IS_NOT_REQUESTED",
"lcsServiceType": 127,
"ldrType": "UE_AVAILABLE",
"hgmlcCallBackURI": "198.168.70.129",
"ldrReference": "11",
"lirReference": "1",
"periodicEventInfo": {
"reportingAmount": 10,
"reportingInterval": 60
},
"reportingAccessTypes": [
"NR",
"NON_3GPP_CONNECTED_TO_5GC"
],
"ueConnectivityStates": {
"accessType": "3GPP_ACCESS",
"connectivitystate": "IDLE"
}
}

View File

@@ -51,6 +51,8 @@ RUN apt-get update && \
bison \
flex \
m4 \
# libzstd-dev for ClickHouse C++ library
libzstd-dev \
# python3-pip for conf template generation
python3-pip \
wget \

View File

@@ -52,6 +52,7 @@ RUN \
--cmake-opt -DOAI_VRTSIM_TAPS_CLIENT=ON \
--noavx512 \
--build-tool-opt -k10 \
--cmake-opt -DT_RECORD_DB=ON \
--cmake-opt -DCMAKE_C_FLAGS="-Werror" --cmake-opt -DCMAKE_CXX_FLAGS="-Werror" $BUILD_OPTION && \
# Mainly to see if the sanitize option was perfectly executed
echo "---- ldd on executables ----" && \

View File

@@ -56,13 +56,15 @@ RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai -c -w AERIAL --gNB --ninja --build-tool-opt -k10 \
--cmake-opt -DCMAKE_C_FLAGS="-Werror" --cmake-opt -DCMAKE_CXX_FLAGS="-Werror"
--cmake-opt -DCMAKE_C_FLAGS="-Werror" --cmake-opt -DCMAKE_CXX_FLAGS="-Werror" \
--cmake-opt -DT_RECORD_DB=ON
#start from scratch for target executable
FROM ${UBUNTU_IMAGE} AS oai-gnb-aerial
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe
ENV PATH="/opt/oai-gnb/bin:$PATH"
RUN apt-get update && \
apt-get upgrade --yes && \
@@ -85,17 +87,20 @@ RUN apt-get update && \
WORKDIR /opt/oai-gnb/bin
COPY --from=ran-build \
/oai-ran/cmake_targets/ran_build/build/nr-softmodem ./
/oai-ran/cmake_targets/ran_build/build/nr-softmodem \
/oai-ran/cmake_targets/ran_build/build/common/utils/T/tracer/record* \
./
COPY ./docker/scripts/gnb_entrypoint.sh ./entrypoint.sh
COPY --from=ran-build \
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/libparams_yaml.so \
/oai-ran/cmake_targets/ran_build/build/_deps*/fmtlog-build*/libfmtlog-shared*.so \
/oai-ran/cmake_targets/ran_build/build/_deps*/clickhouse-cpp-build*/clickhouse/libclickhouse*.so \
/usr/local/lib/
#copy files from nvIPC
COPY --from=ran-build \
/usr/local/lib/libfmtlog-shared.so \
/usr/local/lib/libnvlog.so \
/usr/local/lib/libnvipc.so \
/usr/local/lib/
@@ -113,5 +118,6 @@ WORKDIR /opt/oai-gnb
COPY --from=ran-build /usr/local/bin/yq /usr/local/bin/yq
COPY --from=ran-build /tini /tini
COPY --from=ran-build /oai-ran/common/utils/T/T_messages.txt ./
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-gnb/bin/entrypoint.sh"]
CMD ["/opt/oai-gnb/bin/nr-softmodem"]

View File

@@ -25,7 +25,6 @@ FROM ran-build-fhi72:latest AS ran-build
#start from scratch for target executable
FROM ${UBUNTU_IMAGE} AS oai-nr-oru
ARG BUILD_OPTION
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe

View File

@@ -36,6 +36,7 @@ FROM ${UBUNTU_IMAGE} AS oai-nr-ue
ARG BUILD_OPTION
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Paris
ENV PATH="/opt/oai-nr-ue/bin:$PATH"
RUN apt-get update && \
apt-get upgrade --yes && \
@@ -66,6 +67,7 @@ RUN apt-get update && \
iperf3 \
iperf \
libyaml-cpp-dev \
libzstd1 \
libnanomsg5 && \
# if the --sanitize option was used to build, additional packages are required
/bin/bash -c 'if [[ "$BUILD_OPTION" = "--sanitize" ]]; then DEBIAN_FRONTEND=noninteractive apt-get install --yes \
@@ -77,6 +79,7 @@ RUN apt-get update && \
WORKDIR /opt/oai-nr-ue/bin
COPY --from=nr-ue-build \
/oai-ran/cmake_targets/ran_build/build/nr-uesoftmodem \
/oai-ran/cmake_targets/ran_build/build/common/utils/T/tracer/record* \
./
COPY ./docker/scripts/nr_ue_entrypoint.sh ./entrypoint.sh
@@ -93,10 +96,17 @@ COPY --from=nr-ue-build \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv_ciUE.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv_5Gue.so \
/oai-ran/cmake_targets/ran_build/build/libnrscope.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
/oai-ran/cmake_targets/ran_build/build/libparams_yaml.so \
/oai-ran/cmake_targets/ran_build/build/libvrtsim.so \
# Wildcards so it doesn't fail if not present
/oai-ran/cmake_targets/ran_build/build/_deps*/fmtlog-build*/libfmtlog-shared*.so \
/oai-ran/cmake_targets/ran_build/build/_deps*/clickhouse-cpp-build*/clickhouse/libclickhouse*.so \
/usr/local/lib/
# /oai-ran/cmake_targets/ran_build/build/libimscope.so \
# Now we are copying from builder-image the UHD files.
COPY --from=nr-ue-base /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=nr-ue-base /usr/local/lib/libuhd.so.4.8.0 /usr/local/lib
@@ -123,5 +133,6 @@ WORKDIR /opt/oai-nr-ue
COPY --from=nr-ue-base /usr/local/bin/yq /usr/local/bin/yq
COPY --from=nr-ue-base /tini /tini
COPY --from=nr-ue-build /oai-ran/common/utils/T/T_messages.txt ./
CMD ["/opt/oai-nr-ue/bin/nr-uesoftmodem"]
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-nr-ue/bin/entrypoint.sh"]

View File

@@ -120,13 +120,7 @@ static void tx_func(processingData_L1tx_t *info)
if (tx_slot_type == NR_DOWNLINK_SLOT || tx_slot_type == NR_MIXED_SLOT || get_softmodem_params()->continuous_tx
|| IS_SOFTMODEM_RFSIM || cfg->analog_beamforming_ve.analog_bf_vendor_ext.value) {
start_meas(&info->gNB->phy_proc_tx);
phy_procedures_gNB_TX(info->gNB,
&sched_response.DL_req,
&sched_response.TX_req,
&sched_response.UL_dci_req,
frame_tx,
slot_tx,
1);
phy_procedures_gNB_TX(info->gNB, &sched_response.DL_req, &sched_response.TX_req, &sched_response.UL_dci_req, frame_tx,slot_tx);
PHY_VARS_gNB *gNB = info->gNB;
processingData_RU_t syncMsgRU;

View File

@@ -225,7 +225,7 @@ static void UE_synch(void *arg) {
ret = sl_nr_slss_search(UE, &syncD->proc, SL_NR_SSB_REPETITION_IN_FRAMES);
} else {
nr_get_carrier_frequencies(UE, &dl_carrier, &ul_carrier);
ret = nr_initial_sync(&syncD->proc, UE, 2, IS_SA_MODE(get_softmodem_params()), syncD->gscnInfo, syncD->numGscn);
ret = nr_initial_sync(&syncD->proc, UE, 2, syncD->gscnInfo, syncD->numGscn);
}
if (ret.cell_detected) {
@@ -486,12 +486,13 @@ static int handle_sync_req_from_mac(PHY_VARS_NR_UE *UE)
UE->UE_scan_carrier = false;
UE->target_Nid_cell = UE->synch_request.synch_req.target_Nid_cell;
const fapi_nr_ue_carrier_config_t *cfg = &UE->nrUE_config.carrier_config;
const fapi_nr_config_request_t *config = &UE->nrUE_config;
const fapi_nr_ue_carrier_config_t *cfg = &config->carrier_config;
uint64_t dl_CarrierFreq = get_carrier_frequency(fp->N_RB_DL, fp->numerology_index, cfg->dl_frequency);
uint64_t ul_CarrierFreq = get_carrier_frequency(fp->N_RB_UL, fp->numerology_index, cfg->uplink_frequency);
if (dl_CarrierFreq != fp->dl_CarrierFreq || ul_CarrierFreq != fp->ul_CarrierFreq) {
LOG_I(NR_PHY,
"[UE %d] RF frequency change: dl %lu->%lu Hz, ul %lu->%lu Hz (from dl_frequency=%u kHz, target_Nid_cell=%d)\n",
"[UE %d] SYNC REQ: RF frequency change: dl %lu->%lu Hz, ul %lu->%lu Hz (from dl_frequency=%u kHz, target_Nid_cell=%d)\n",
UE->Mod_id,
fp->dl_CarrierFreq,
dl_CarrierFreq,
@@ -505,6 +506,16 @@ static int handle_sync_req_from_mac(PHY_VARS_NR_UE *UE)
init_symbol_rotation(fp);
}
int ssb_start_subcarrier = nr_get_ssb_start_sc(fp->numerology_index,
config->ssb_table.ssb_offset_point_a,
config->ssb_table.ssb_subcarrier_offset,
fp->freq_range);
// SSB location can change during for ex: handover on the target cell
if (ssb_start_subcarrier != fp->ssb_start_subcarrier) {
fp->ssb_start_subcarrier = ssb_start_subcarrier;
LOG_I(NR_PHY, "SYNC REQ: SSB location changed:%d\n", fp->ssb_start_subcarrier);
}
// Apply Doppler based on NTN-Config for target cell
if (UE->nrUE_config.ntn_config.is_targetcell)
apply_ntn_timing_advance_and_doppler(UE, fp, -1);
@@ -726,7 +737,6 @@ void *UE_thread(void *arg)
PHY_VARS_NR_UE *UE = (PHY_VARS_NR_UE *)arg;
const NR_DL_FRAME_PARMS *fp = &UE->frame_parms;
// int tx_enabled = 0;
c16_t *rxp[fp->nb_antennas_rx];
enum stream_status_e stream_status = STREAM_STATUS_UNSYNC;
fapi_nr_config_request_t *cfg = &UE->nrUE_config;
sl_nr_phy_config_request_t *sl_cfg = NULL;
@@ -780,6 +790,7 @@ void *UE_thread(void *arg)
readFrame(UE, &tmp, duration_rx_to_tx, true);
}
c16_t *rxp[fp->nb_antennas_rx];
while (!oai_exit) {
if (syncRunning) {
notifiedFIFO_elt_t *res = pollNotifiedFIFO(&nf);

View File

@@ -240,6 +240,13 @@ static void trigger_deregistration(int sig)
}
}
void *nrue_ru_start_thread(void *arg)
{
(void)arg;
nrue_ru_start();
return NULL;
}
int NB_UE_INST = 1;
configmodule_interface_t *uniqCfg = NULL;
nrLDPC_coding_interface_t nrLDPC_coding_interface = {0};
@@ -450,7 +457,11 @@ int main(int argc, char **argv)
load_module_shlib("imscope_record", NULL, 0, PHY_vars_UE_g[0][0]);
}
nrue_ru_start();
// Launch a temporary high-priority thread to start the UE RU, ensuring radio library threads inherit this priority
pthread_t ru_start_thread;
threadCreate(&ru_start_thread, nrue_ru_start_thread, NULL, "ru_start_thread", -1, OAI_PRIORITY_RT_MAX);
int ret = pthread_join(ru_start_thread, NULL);
AssertFatal(ret == 0, "pthread_join error %d, errno %d (%s)\n", ret, errno, strerror(errno));
for (int inst = 0; inst < NB_UE_INST; inst++) {
LOG_I(PHY,"Intializing UE Threads for instance %d ...\n", inst);

View File

@@ -20,20 +20,17 @@
#include "nfapi_pnf_interface.h"
typedef struct pnf_s {
nfapi_pnf_config_t _public;
struct pnf_t {
nfapi_pnf_config_t _public;
int p5_sock;
int p5_sock;
uint8_t tx_message_buffer[NFAPI_MAX_PACKED_MESSAGE_SIZE];
uint8_t sctp;
uint8_t terminate;
};
} pnf_t;
int pnf_connect(pnf_t *pnf);
int pnf_message_pump(pnf_t *pnf);

View File

@@ -80,12 +80,10 @@ typedef struct {
} pnf_p7_rx_reassembly_queue_t;
typedef struct pnf_p7_s {
nfapi_pnf_p7_config_t _public;
struct pnf_p7_t {
nfapi_pnf_p7_config_t _public;
//private data
//private data
int p7_sock;
uint8_t terminate;
@@ -138,7 +136,7 @@ struct pnf_p7_t {
pnf_p7_stats_t stats;
pnf_p7_nr_stats_t nr_stats;
};
} pnf_p7_t;
int pnf_p7_message_pump(pnf_p7_t* pnf_p7);
int pnf_nr_p7_message_pump(pnf_p7_t* pnf_p7);

View File

@@ -31,8 +31,8 @@ extern "C" {
#include <sys/types.h>
#include "openair1/PHY/defs_gNB.h"
typedef struct pnf_t pnf_t;
typedef struct pnf_p7_t pnf_p7_t;
typedef struct pnf_s pnf_t;
typedef struct pnf_p7_s pnf_p7_t;
/*! This enum is used to describe the states of the pnf
*/

View File

@@ -20,19 +20,16 @@
#include "nfapi_vnf_interface.h"
struct vnf_t
{
typedef struct vnf_s {
nfapi_vnf_config_t _public;
nfapi_vnf_config_t _public;
uint8_t terminate;
uint8_t terminate;
uint8_t sctp;
uint8_t tx_message_buffer[NFAPI_MAX_PACKED_MESSAGE_SIZE];
uint16_t next_phy_id;
};
uint16_t next_phy_id;
} vnf_t;
int vnf_pack_and_send_p5_message(vnf_t* vnf, uint16_t p5_idx, nfapi_p4_p5_message_header_t* msg, uint16_t msg_len);

View File

@@ -107,11 +107,10 @@ typedef struct nfapi_vnf_p7_connection_info {
} nfapi_vnf_p7_connection_info_t;
struct vnf_p7_t{
typedef struct vnf_p7_s {
nfapi_vnf_p7_config_t _public;
nfapi_vnf_p7_config_t _public;
// private data
// private data
uint8_t terminate;
nfapi_vnf_p7_connection_info_t* p7_connections;
int socket;
@@ -119,8 +118,8 @@ struct vnf_p7_t{
uint32_t slot_start_time_hr;
uint8_t* rx_message_buffer; // would this be better put in the p7 conenction info?
uint16_t rx_message_buffer_size;
};
} vnf_p7_t;
uint32_t vnf_get_current_time_hr(void);

View File

@@ -30,9 +30,8 @@
extern "C" {
#endif
typedef struct vnf_t vnf_t;
typedef struct vnf_p7_t vnf_p7_t;
typedef struct vnf_s vnf_t;
typedef struct vnf_p7_s vnf_p7_t;
/*! The nfapi VNF phy configuration information
*/

View File

@@ -24,9 +24,9 @@
author: Hongzhi WANG (TCL)
date: 12.09.2017
*/
#include "PHY/defs_nr_UE.h"
//#include "SCHED/extern.h"
#include "common/utils/LOG/log.h"
#include "openair1/PHY/CODING/coding_defs.h"
//#define DEBUG_SEGMENTATION
int32_t nr_segmentation(unsigned char *input_buffer,
@@ -174,8 +174,6 @@ else
return Kb;
}
#ifdef MAIN
main()
{

View File

@@ -291,7 +291,7 @@ static void sl_ue_free(PHY_VARS_NR_UE *UE)
}
}
void term_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB)
void term_nr_ue_signal(PHY_VARS_NR_UE *ue)
{
const NR_DL_FRAME_PARMS* fp = &ue->frame_parms;
phy_term_nr_top();

View File

@@ -24,6 +24,7 @@
#include "common/utils/LOG/log.h"
#include "executables/softmodem-common.h"
#include "PHY/MODULATION/nr_modulation.h"
#include "PHY/nr_phy_common/inc/nr_phy_common.h"
/// Subcarrier spacings in Hz indexed by numerology index
static const uint32_t nr_subcarrier_spacing[MAX_NUM_SUBCARRIER_SPACING] = {15e3, 30e3, 60e3, 120e3, 240e3};
@@ -421,16 +422,11 @@ int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *fp, fapi_nr_config_request_t* conf
fp->samples_per_frame = 10 * fp->samples_per_subframe;
fp->freq_range = get_freq_range_from_freq(fp->dl_CarrierFreq);
uint8_t sco = 0;
if (((fp->freq_range == FR1) && (config->ssb_table.ssb_subcarrier_offset < 24)) ||
((fp->freq_range == FR2) && (config->ssb_table.ssb_subcarrier_offset < 12))) {
if (fp->freq_range == FR1)
sco = config->ssb_table.ssb_subcarrier_offset>>config->ssb_config.scs_common;
else
sco = config->ssb_table.ssb_subcarrier_offset;
}
fp->ssb_start_subcarrier = nr_get_ssb_start_sc(config->ssb_config.scs_common,
config->ssb_table.ssb_offset_point_a,
config->ssb_table.ssb_subcarrier_offset,
fp->freq_range);
fp->ssb_start_subcarrier = (12 * config->ssb_table.ssb_offset_point_a + sco);
set_Lmax(fp);
fp->L_ssb = (((uint64_t) config->ssb_table.ssb_mask_list[0].ssb_mask)<<32) | config->ssb_table.ssb_mask_list[1].ssb_mask;

View File

@@ -34,7 +34,7 @@ int nr_init_frame_parms_ue_sl(NR_DL_FRAME_PARMS *fp,
int threequarter_fs,
uint32_t ofdm_offset_divisor);
int init_nr_ue_signal(PHY_VARS_NR_UE *ue,int nb_connected_eNB);
void term_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB);
void term_nr_ue_signal(PHY_VARS_NR_UE *ue);
void init_nr_ue_transport(PHY_VARS_NR_UE *ue);
void nr_dump_frame_parms(NR_DL_FRAME_PARMS *frame_parms);
void phy_init_nr_gNB(PHY_VARS_gNB *gNB);

View File

@@ -87,12 +87,12 @@ void lte_eNB_I0_measurements(PHY_VARS_eNB *eNB,
measurements->n0_power[aarx] = ((k1*signal_energy(&common_vars->rxdata[aarx][(frame_parms->samples_per_tti<<1) -frame_parms->ofdm_symbol_size],
frame_parms->ofdm_symbol_size)) + k2*measurements->n0_power[aarx])>>10;
//measurements->n0_power[aarx] = (measurements->n0_power[aarx]) * 12*frame_parms->N_RB_DL)/(frame_parms->ofdm_symbol_size);
measurements->n0_power_dB[aarx] = (unsigned short) dB_fixed(measurements->n0_power[aarx]);
measurements->n0_power_dB[aarx] = dB_fixed(measurements->n0_power[aarx]);
measurements->n0_power_tot += measurements->n0_power[aarx];
}
measurements->n0_power_tot_dB = (unsigned short) dB_fixed(measurements->n0_power_tot);
measurements->n0_power_tot_dB = dB_fixed(measurements->n0_power_tot);
measurements->n0_power_tot_dBm = measurements->n0_power_tot_dB - eNB->rx_total_gain_dB;
// printf("n0_power %d\n",measurements->n0_power_tot_dB);
@@ -183,14 +183,14 @@ void lte_eNB_srs_measurements(PHY_VARS_eNB *eNB,
measurements->rx_spatial_power[srs_id][0][aarx]<<=1; // because of noise only in odd samples
measurements->rx_spatial_power_dB[srs_id][0][aarx] = (unsigned short) dB_fixed(measurements->rx_spatial_power[srs_id][0][aarx]);
measurements->rx_spatial_power_dB[srs_id][0][aarx] = dB_fixed(measurements->rx_spatial_power[srs_id][0][aarx]);
measurements->wideband_cqi[srs_id][aarx] = measurements->rx_spatial_power[srs_id][0][aarx];
// measurements->rx_power[UE_id][aarx]/=frame_parms->nb_antennas_tx;
measurements->wideband_cqi_dB[srs_id][aarx] = (unsigned short) dB_fixed(measurements->wideband_cqi[srs_id][aarx]);
measurements->wideband_cqi_dB[srs_id][aarx] = dB_fixed(measurements->wideband_cqi[srs_id][aarx]);
rx_power += measurements->wideband_cqi[srs_id][aarx];
// measurements->rx_avg_power_dB[UE_id] += measurements->rx_power_dB[UE_id][aarx];
}
@@ -206,7 +206,7 @@ void lte_eNB_srs_measurements(PHY_VARS_eNB *eNB,
measurements->wideband_cqi_tot[srs_id] = dB_fixed2(rx_power,2*measurements->n0_power_tot);
// times 2 since we have noise only in the odd carriers of the srs comb
measurements->rx_rssi_dBm[srs_id] = (int32_t)dB_fixed(rx_power_avg_eNB[srs_id])-eNB->rx_total_gain_dB;
measurements->rx_rssi_dBm[srs_id] = dB_fixed(rx_power_avg_eNB[srs_id])-eNB->rx_total_gain_dB;

View File

@@ -254,13 +254,13 @@ void ue_rrc_measurements(PHY_VARS_UE *ue,
// ue->measurements.n0_power[aarx] += (((int32_t)rxF_pss[-64]*rxF_pss[-64])+((int32_t)rxF_pss[-63]*rxF_pss[-63]));
// printf("pssm32 %d\n",ue->measurements.n0_power[aarx]);
ue->measurements.n0_power_dB[aarx] = (unsigned short) dB_fixed(ue->measurements.n0_power[aarx]/12);
ue->measurements.n0_power_dB[aarx] = dB_fixed(ue->measurements.n0_power[aarx]/12);
ue->measurements.n0_power_tot /*+=*/ = ue->measurements.n0_power[aarx];
}
//LOG_I(PHY,"Subframe %d RRC UE MEAS Noise Level %d \n", subframe, ue->measurements.n0_power_tot);
ue->measurements.n0_power_tot_dB = (unsigned short) dB_fixed(ue->measurements.n0_power_tot/(12*aarx));
ue->measurements.n0_power_tot_dB = dB_fixed(ue->measurements.n0_power_tot/(12*aarx));
ue->measurements.n0_power_tot_dBm = ue->measurements.n0_power_tot_dB - ue->rx_total_gain_dB - dB_fixed(ue->frame_parms.ofdm_symbol_size);
} else {
LOG_E(PHY, "Not yet implemented: noise power calculation when prefix length == EXTENDED\n");
@@ -311,11 +311,11 @@ void ue_rrc_measurements(PHY_VARS_UE *ue,
ue->measurements.n0_power[aarx] += (((int32_t)rxF_pss[-66]*rxF_pss[-66])+((int32_t)rxF_pss[-65]*rxF_pss[-65]));
// ue->measurements.n0_power[aarx] += (((int32_t)rxF_pss[-64]*rxF_pss[-64])+((int32_t)rxF_pss[-63]*rxF_pss[-63]));
// printf("pssm32 %d\n",ue->measurements.n0_power[aarx]);
ue->measurements.n0_power_dB[aarx] = (unsigned short) dB_fixed(ue->measurements.n0_power[aarx]/12);
ue->measurements.n0_power_dB[aarx] = dB_fixed(ue->measurements.n0_power[aarx]/12);
ue->measurements.n0_power_tot /*+=*/ = ue->measurements.n0_power[aarx];
}
ue->measurements.n0_power_tot_dB = (unsigned short) dB_fixed(ue->measurements.n0_power_tot/(12*aarx));
ue->measurements.n0_power_tot_dB = dB_fixed(ue->measurements.n0_power_tot/(12*aarx));
ue->measurements.n0_power_tot_dBm = ue->measurements.n0_power_tot_dB - ue->rx_total_gain_dB - dB_fixed(ue->frame_parms.ofdm_symbol_size);
//LOG_I(PHY,"Subframe %d RRC UE MEAS Noise Level %d \n", subframe, ue->measurements.n0_power_tot);
@@ -1034,7 +1034,7 @@ void lte_ue_measurements(PHY_VARS_UE *ue,
if (ue->measurements.rx_spatial_power[eNB_id][aatx][aarx]<0)
ue->measurements.rx_spatial_power[eNB_id][aatx][aarx] = 0; //ue->measurements.n0_power[aarx];
ue->measurements.rx_spatial_power_dB[eNB_id][aatx][aarx] = (unsigned short) dB_fixed(ue->measurements.rx_spatial_power[eNB_id][aatx][aarx]);
ue->measurements.rx_spatial_power_dB[eNB_id][aatx][aarx] = dB_fixed(ue->measurements.rx_spatial_power[eNB_id][aatx][aarx]);
if (aatx==0)
ue->measurements.rx_power[eNB_id][aarx] = ue->measurements.rx_spatial_power[eNB_id][aatx][aarx];
@@ -1042,7 +1042,7 @@ void lte_ue_measurements(PHY_VARS_UE *ue,
ue->measurements.rx_power[eNB_id][aarx] += ue->measurements.rx_spatial_power[eNB_id][aatx][aarx];
} //aatx
ue->measurements.rx_power_dB[eNB_id][aarx] = (unsigned short) dB_fixed(ue->measurements.rx_power[eNB_id][aarx]);
ue->measurements.rx_power_dB[eNB_id][aarx] = dB_fixed(ue->measurements.rx_power[eNB_id][aarx]);
if (aarx==0)
ue->measurements.rx_power_tot[eNB_id] = ue->measurements.rx_power[eNB_id][aarx];
@@ -1050,7 +1050,7 @@ void lte_ue_measurements(PHY_VARS_UE *ue,
ue->measurements.rx_power_tot[eNB_id] += ue->measurements.rx_power[eNB_id][aarx];
} //aarx
ue->measurements.rx_power_tot_dB[eNB_id] = (unsigned short) dB_fixed(ue->measurements.rx_power_tot[eNB_id]);
ue->measurements.rx_power_tot_dB[eNB_id] = dB_fixed(ue->measurements.rx_power_tot[eNB_id]);
} //eNB_id

View File

@@ -48,7 +48,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
uint16_t *max_preamble,
uint16_t *max_preamble_energy,
uint16_t *max_preamble_delay,
uint16_t *avg_preamble_energy,
int16_t *avg_preamble_energy,
uint16_t Nf,
uint8_t tdd_mapindex,
uint8_t br_flag,
@@ -639,7 +639,7 @@ void rx_prach(PHY_VARS_eNB *eNB,
uint16_t *max_preamble,
uint16_t *max_preamble_energy,
uint16_t *max_preamble_delay,
uint16_t *avg_preamble_energy,
int16_t *avg_preamble_energy,
uint16_t Nf,
uint8_t tdd_mapindex,
uint8_t br_flag) {

View File

@@ -593,7 +593,7 @@ void rx_prach(PHY_VARS_eNB *phy_vars_eNB,RU_t *ru,
uint16_t *max_preamble,
uint16_t *max_preamble_energy,
uint16_t *max_preamble_delay,
uint16_t *avg_preamble_energy,
int16_t *avg_preamble_energy,
uint16_t Nf, uint8_t tdd_mapindex,
uint8_t br_flag
);

View File

@@ -19,12 +19,10 @@
* contact@openairinterface.org
*/
#include "PHY/defs_nr_UE.h"
#include "PHY/defs_gNB.h"
#include "PHY/defs_nr_common.h"
#include "modulation_UE.h"
#include "nr_modulation.h"
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
#include "PHY/NR_UE_ESTIMATION/nr_estimation.h"
#include "PHY/nr_phy_common/inc/nr_phy_common.h"
#include <common/utils/LOG/log.h>

View File

@@ -184,9 +184,8 @@ void gNB_I0_measurements(PHY_VARS_gNB *gNB, int slot, int first_symb, int num_sy
} //rb
} // symb
int nb_rb=0;
int32_t n0_subband_tot_perANT[frame_parms->nb_antennas_rx];
int64_t n0_subband_tot_perANT[frame_parms->nb_antennas_rx];
memset(n0_subband_tot_perANT, 0, sizeof(n0_subband_tot_perANT));
allocCast2D(n0_subband_power,
unsigned int,
measurements->n0_subband_power,
@@ -195,7 +194,7 @@ void gNB_I0_measurements(PHY_VARS_gNB *gNB, int slot, int first_symb, int num_sy
false);
for (int rb = 0 ; rb<frame_parms->N_RB_UL;rb++) {
int32_t n0_subband_tot_perPRB=0;
int64_t n0_subband_tot_perPRB=0;
if (nb_symb[rb] > 0) {
for (int aarx = 0; aarx < frame_parms->nb_antennas_rx; aarx++) {
tmp_n0_subband[aarx][rb] /= nb_symb[rb];
@@ -213,9 +212,9 @@ void gNB_I0_measurements(PHY_VARS_gNB *gNB, int slot, int first_symb, int num_sy
if (nb_rb>0) {
int64_t n0_subband_tot = 0;
for (int aarx = 0; aarx < frame_parms->nb_antennas_rx; aarx++) {
measurements->n0_subband_power_avg_perANT_dB[aarx] = dB_fixed(n0_subband_tot_perANT[aarx] / nb_rb);
n0_subband_tot += n0_subband_tot_perANT[aarx];
measurements->n0_subband_power_avg_perANT_dB[aarx] = dB_fixed((int32_t)(n0_subband_tot_perANT[aarx] / nb_rb));
n0_subband_tot += (int32_t)(n0_subband_tot_perANT[aarx]/nb_rb);
}
measurements->n0_subband_power_avg_dB = dB_fixed(n0_subband_tot / nb_rb);
measurements->n0_subband_power_avg_dB = dB_fixed(n0_subband_tot/frame_parms->nb_antennas_rx);
}
}

View File

@@ -500,7 +500,6 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
float beta_dmrs_pusch = get_beta_dmrs(pusch_pdu->num_dmrs_cdm_grps_no_data, pusch_pdu->dmrs_config_type == pusch_dmrs_type2);
int16_t dmrs_scaling = (1 / beta_dmrs_pusch) * (1 << 14);
nr_pusch_dmrs_rx(fp->Ncp,
Ns,
gold,
pilot,
(1000 + p),
@@ -520,7 +519,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
"Num RBs not configured according to 3GPP 38.211 section 6.3.1.4. For PUSCH with transform precoding, num RBs "
"cannot be multiple of any other primenumber other than 2,3,5\n");
AssertFatal(dmrs_seq != NULL, "DMRS low PAPR seq not found, check if DMRS sequences are generated");
nr_pusch_lowpaprtype1_dmrs_rx(fp->Ncp, Ns, dmrs_seq, pilot, 1000, 0, nb_rb_pusch, 0, pusch_pdu->dmrs_config_type);
nr_pusch_lowpaprtype1_dmrs_rx(fp->Ncp, dmrs_seq, pilot, 1000, 0, nb_rb_pusch, 0, pusch_pdu->dmrs_config_type);
#ifdef DEBUG_PUSCH
printf("NR_UL_CHANNEL_EST: index %d, u %d,v %d\n", index, u, v);
LOG_M("gNb_DMRS_SEQ.m", "gNb_DMRS_SEQ", dmrs_seq, 6 * nb_rb_pusch, 1, 1);
@@ -725,8 +724,6 @@ void nr_pusch_ptrs_processing(PHY_VARS_gNB *gNB,
*ptrsReOffset,
*nb_rb,
rel15_ul->rnti,
nr_tti_rx,
symbol,
frame_parms->ofdm_symbol_size,
(int16_t *)&pusch_vars->rxdataF_comp[aarx][(symbol * nb_re_pusch)],
gold,

View File

@@ -33,24 +33,11 @@
#ifndef DMRS_NR_H
#define DMRS_NR_H
#include "PHY/defs_nr_UE.h"
#include "PHY/types.h"
#include "PHY/NR_REFSIG/ss_pbch_nr.h"
#include "PHY/NR_REFSIG/pss_nr.h"
#include "PHY/NR_REFSIG/sss_nr.h"
/************** CODE GENERATION ***********************************/
/************** DEFINE ********************************************/
/************* STRUCTURES *****************************************/
/************** VARIABLES *****************************************/
/************** FUNCTION ******************************************/
int pseudo_random_sequence(int M_PN, uint32_t *c, uint32_t cinit);
void lte_gold_new(LTE_DL_FRAME_PARMS *frame_parms, uint32_t lte_gold_table[20][2][14], uint16_t Nid_cell);
uint16_t get_dmrs_freq_idx_ul(uint16_t n, uint8_t k_prime, uint8_t delta, uint8_t dmrs_type);

View File

@@ -64,7 +64,6 @@ static inline c16_t get_modulated(const uint32_t *gold_sequence, const int idx_g
}
int nr_pusch_dmrs_rx(nr_prefix_type_t Ncp,
unsigned int Ns,
const uint32_t *nr_gold_pusch,
c16_t *output,
unsigned short p,
@@ -108,7 +107,6 @@ int nr_pusch_dmrs_rx(nr_prefix_type_t Ncp,
}
int nr_pdsch_dmrs_rx(nr_prefix_type_t Ncp,
unsigned int Ns,
const unsigned int *nr_gold_pdsch,
c16_t *output,
unsigned short p,
@@ -213,7 +211,6 @@ void nr_gen_ref_conj_symbols(const uint32_t *in, uint32_t length, c16_t *output,
}
int nr_pusch_lowpaprtype1_dmrs_rx(nr_prefix_type_t Ncp,
unsigned int Ns,
c16_t *dmrs_seq,
c16_t *output,
unsigned short p,

View File

@@ -36,7 +36,6 @@ uint32_t *nr_gold_csi_rs(int N_RB_DL, int symbols_per_slot, int slot, int symb,
uint32_t *nr_gold_prs(int nid, int slot, int symbol);
int nr_pdsch_dmrs_rx(nr_prefix_type_t Ncp,
unsigned int Ns,
const unsigned int *nr_gold_pdsch,
c16_t *output,
unsigned short p,
@@ -56,7 +55,6 @@ void nr_pbch_dmrs_rx(int dmrss, const unsigned int *nr_gold_pbch, c16_t *output,
void nr_pdcch_dmrs_ref(const unsigned int *nr_gold_pdcch, c16_t *output, unsigned short nb_rb_corset);
int nr_pusch_dmrs_rx(nr_prefix_type_t Ncp,
unsigned int Ns,
const uint32_t *nr_gold_pusch,
c16_t *output,
unsigned short p,
@@ -71,7 +69,6 @@ void nr_generate_modulation_table(void);
extern simde__m128i byte2m128i[256];
int nr_pusch_lowpaprtype1_dmrs_rx(nr_prefix_type_t Ncp,
unsigned int Ns,
c16_t *dmrs_seq,
c16_t *output,
unsigned short p,

View File

@@ -32,9 +32,8 @@
#ifndef PSS_NR_H
#define PSS_NR_H
#include "PHY/defs_nr_UE.h"
#include "PHY/defs_nr_common.h"
#include "PHY/types.h"
#include "PHY/NR_REFSIG/ss_pbch_nr.h"
/************** CODE GENERATION ***********************************/

View File

@@ -194,8 +194,6 @@ void nr_ptrs_cpe_estimation(uint8_t K_ptrs,
uint8_t ptrsReOffset,
uint16_t nb_rb,
uint16_t rnti,
unsigned char Ns,
unsigned char symbol,
uint16_t ofdm_symbol_size,
int16_t *rxF_comp,
const uint32_t *gold_seq,

View File

@@ -33,20 +33,6 @@
#ifndef PTRS_NR_H
#define PTRS_NR_H
#include "PHY/defs_nr_UE.h"
/************** CODE GENERATION ***********************************/
/************** DEFINE ********************************************/
/************* STRUCTURES *****************************************/
/************** VARIABLES *****************************************/
/************** FUNCTION ******************************************/
void set_ptrs_symb_idx(uint16_t *ptrs_symbols,
uint8_t duration_in_symbols,
uint8_t start_symbol,
@@ -86,15 +72,13 @@ int8_t nr_ptrs_process_slot(uint16_t dmrsSymbPos,
uint16_t ptrsSymbPos,
int16_t *estPerSymb,
uint16_t startSymbIdx,
uint16_t noSymb
);
uint16_t noSymb);
/* general function to estimate common phase error based upon PTRS */
void nr_ptrs_cpe_estimation(uint8_t K_ptrs,
uint8_t ptrsReOffset,
uint16_t nb_rb,
uint16_t rnti,
unsigned char Ns,
unsigned char symbol,
uint16_t ofdm_symbol_size,
int16_t *rxF_comp,
const uint32_t *gold_seq,

View File

@@ -33,9 +33,7 @@
#define SSS_NR_H
#include "limits.h"
#include "PHY/defs_nr_UE.h"
#include "PHY/types.h"
#include "pss_nr.h"
/************** DEFINE ********************************************/

View File

@@ -33,11 +33,8 @@
#ifndef LOWPAPR_SEQUENCES_NR_H
#define LOWPAPR_SEQUENCES_NR_H
#include "PHY/defs_nr_UE.h"
#include "PHY/types.h"
#include "PHY/NR_REFSIG/ss_pbch_nr.h"
#include "PHY/defs_nr_common.h"
#include "PHY/defs_gNB.h"

View File

@@ -37,6 +37,7 @@
#include "PHY/NR_REFSIG/dmrs_nr.h"
#include "PHY/NR_REFSIG/ptrs_nr.h"
#include "common/utils/nr/nr_common.h"
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
#include "executables/softmodem-common.h"
#include "SCHED_NR/sched_nr.h"
@@ -261,7 +262,6 @@ static inline int dmrs_case00(c16_t *output,
const int amp,
int sz,
int start_sc,
int remaining_re,
int dmrs_port,
const int dmrs_Type,
int symbol_sz,
@@ -438,7 +438,6 @@ static inline int do_onelayer(NR_DL_FRAME_PARMS *frame_parms,
amp,
sz,
start_sc,
remaining_re,
dmrs_port,
dmrs_Type,
symbol_sz,
@@ -772,7 +771,6 @@ static int do_one_dlsch(unsigned char *input_ptr, PHY_VARS_gNB *gNB, NR_gNB_DLSC
void nr_generate_pdsch(PHY_VARS_gNB *gNB, int n_dlsch, NR_gNB_DLSCH_t *dlsch_array, int frame, int slot)
{
NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms;
time_stats_t *dlsch_encoding_stats = &gNB->dlsch_encoding_stats;
time_stats_t *tinput = &gNB->tinput;
time_stats_t *tprep = &gNB->tprep;
@@ -831,7 +829,6 @@ void nr_generate_pdsch(PHY_VARS_gNB *gNB, int n_dlsch, NR_gNB_DLSCH_t *dlsch_arr
dlsch_array,
frame,
slot,
frame_parms,
output,
tinput,
tprep,

View File

@@ -42,7 +42,6 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
NR_gNB_DLSCH_t *dlsch_array,
int frame,
uint8_t slot,
NR_DL_FRAME_PARMS *frame_parms,
unsigned char *output,
time_stats_t *tinput,
time_stats_t *tprep,

View File

@@ -106,7 +106,6 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
NR_gNB_DLSCH_t *dlsch_array,
int frame,
uint8_t slot,
NR_DL_FRAME_PARMS *frame_parms,
unsigned char *output,
time_stats_t *tinput,
time_stats_t *tprep,

View File

@@ -27,12 +27,7 @@
//#define DEBUG_PRS_MOD
//#define DEBUG_PRS_MAP
int nr_generate_prs(int slot,
c16_t *txdataF,
int16_t amp,
prs_config_t *prs_cfg,
nfapi_nr_config_request_scf_t *config,
const NR_DL_FRAME_PARMS *frame_parms)
int nr_generate_prs(int slot, c16_t *txdataF, int16_t amp, prs_config_t *prs_cfg, const NR_DL_FRAME_PARMS *frame_parms)
{
int k_prime = 0, k = 0, idx;

View File

@@ -40,12 +40,7 @@
NR_gNB_PHY_STATS_t *get_phy_stats(PHY_VARS_gNB *gNB, uint16_t rnti);
int nr_generate_prs(int slot,
c16_t *txdataF,
int16_t amp,
prs_config_t *prs_cfg,
nfapi_nr_config_request_scf_t *config,
const NR_DL_FRAME_PARMS *frame_parms);
int nr_generate_prs(int slot, c16_t *txdataF, int16_t amp, prs_config_t *prs_cfg, const NR_DL_FRAME_PARMS *frame_parms);
/*!
\fn int nr_generate_pss
@@ -224,7 +219,6 @@ void nr_fill_srs(PHY_VARS_gNB *gNB,
int nr_get_srs_signal(PHY_VARS_gNB *gNB,
c16_t **rxdataF,
frame_t frame,
slot_t slot,
nfapi_nr_srs_pdu_t *srs_pdu,
nr_srs_info_t *nr_srs_info,

View File

@@ -903,7 +903,7 @@ void init_pucch2_luts()
*lut_num_i++ = (cw & 0x8) <= 0;
*lut_num_i++ = (cw & 0x80) <= 0;
#ifdef DEBUG_NR_PUCCH_RX
log_dump(PHY, pucch2_polar_llr_num_lut, 8, LOG_DUMP_C16, "lut_num %d:", i);
log_dump(PHY, pucch2_polar_llr_num_lut, 8, LOG_DUMP_C16, "lut_num %d:", *lut_num_i);
#endif
}
}
@@ -1177,11 +1177,11 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
uint64_t decodedPayload[nb_symbols];
memset(decodedPayload,0,sizeof(decodedPayload));
uint8_t corr_dB;
int8_t corr_dB;
int decoderState = 2;
if (pucch2_levdB < gNB->measurements.n0_subband_power_avg_dB + (gNB->pucch0_thres / 10))
decoderState = 1; // assuming missed detection, only attempt to decode for polar case (with CRC)
LOG_D(NR_PHY, "n0+thres %d decoderState %d\n", gNB->measurements.n0_subband_power_avg_dB + (gNB->pucch0_thres / 10), decoderState);
LOG_D(NR_PHY,"pucch2_levdB %d n0+thres %d (thres %d) decoderState %d\n", pucch2_levdB, gNB->measurements.n0_subband_power_avg_dB + (gNB->pucch0_thres / 10), gNB->pucch0_thres / 10,decoderState);
if (nb_bit < 12 && decoderState == 2) { // short blocklength case
uint64_t corr=0;
@@ -1195,10 +1195,10 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
const simde__m256i *coeff = (simde__m256i *)&pucch2_lut[nb_bit - 3][cw].cw;
const simde__m256i *rext = (simde__m256i *)r_ext[aa][symb];
const simde__m256i *rext2 = (simde__m256i *)r_ext2[aa][symb];
simde__m256i re = simde_mm256_madd_epi16(coeff[0], rext[group]);
simde__m256i im = simde_mm256_madd_epi16(coeff[0], rext2[group]);
simde__m256i re2 = simde_mm256_madd_epi16(coeff[1], rext[group + 1]);
simde__m256i im2 = simde_mm256_madd_epi16(coeff[1], rext2[group + 1]);
simde__m256i re = simde_mm256_madd_epi16(coeff[0], rext[group<<1]);
simde__m256i im = simde_mm256_madd_epi16(coeff[0], rext2[group<<1]);
simde__m256i re2 = simde_mm256_madd_epi16(coeff[1], rext[(group<<1) + 1]);
simde__m256i im2 = simde_mm256_madd_epi16(coeff[1], rext2[(group<<1) + 1]);
re = simde_mm256_add_epi32(re, re2);
im = simde_mm256_add_epi32(im, im2);
re = simde_mm256_hadd_epi32(re, re);
@@ -1297,7 +1297,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
} else
LOG_D(PHY, "PUCCH not processed: nb_bit %d decoderState %d\n", nb_bit, decoderState);
LOG_D(PHY, "UCI decoderState %d, payload[0] %llu\n", decoderState, (unsigned long long)decodedPayload[0]);
LOG_D(PHY,"UCI decoderState %d, payload[0] %llu\n", decoderState, (unsigned long long)decodedPayload[0]);
// estimate CQI for MAC (from antenna port 0 only)
// TODO this computation is wrong -> to be ignored at MAC for now
@@ -1372,67 +1372,3 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
uci_pdu->pduBitmap|=8;
}
}
void nr_dump_uci_stats(FILE *fd,PHY_VARS_gNB *gNB,int frame) {
int strpos = 0;
char output[16384];
for (int i = 0; i < MAX_MOBILES_PER_GNB; i++) {
NR_gNB_PHY_STATS_t *stats = &gNB->phy_stats[i];
if (!stats->active)
return;
NR_gNB_UCI_STATS_t *uci_stats = &stats->uci_stats;
if (uci_stats->pucch0_sr_trials > 0)
strpos += sprintf(output + strpos,
"UCI %d RNTI %x: pucch0_sr_trials %d, pucch0_n00 %d dB, pucch0_n01 %d dB, pucch0_sr_thres %d dB, current "
"pucch1_stat0 %d dB, current pucch1_stat1 %d dB, positive SR count %d\n",
i,
stats->rnti,
uci_stats->pucch0_sr_trials,
uci_stats->pucch0_n00,
uci_stats->pucch0_n01,
uci_stats->pucch0_sr_thres,
dB_fixed(uci_stats->current_pucch0_sr_stat0),
dB_fixed(uci_stats->current_pucch0_sr_stat1),
uci_stats->pucch0_positive_SR);
if (uci_stats->pucch01_trials > 0)
strpos += sprintf(output + strpos,
"UCI %d RNTI %x: pucch01_trials %d, pucch0_n00 %d dB, pucch0_n01 %d dB, pucch0_thres %d dB, current "
"pucch0_stat0 %d dB, current pucch1_stat1 %d dB, pucch01_DTX %d\n",
i,
stats->rnti,
uci_stats->pucch01_trials,
uci_stats->pucch0_n01,
uci_stats->pucch0_n01,
uci_stats->pucch0_thres,
dB_fixed(uci_stats->current_pucch0_stat0),
dB_fixed(uci_stats->current_pucch0_stat1),
uci_stats->pucch01_DTX);
if (uci_stats->pucch02_trials > 0)
strpos += sprintf(output + strpos,
"UCI %d RNTI %x: pucch01_trials %d, pucch0_n00 %d dB, pucch0_n01 %d dB, pucch0_thres %d dB, current "
"pucch0_stat0 %d dB, current pucch0_stat1 %d dB, pucch01_DTX %d\n",
i,
stats->rnti,
uci_stats->pucch02_trials,
uci_stats->pucch0_n00,
uci_stats->pucch0_n01,
uci_stats->pucch0_thres,
dB_fixed(uci_stats->current_pucch0_stat0),
dB_fixed(uci_stats->current_pucch0_stat1),
uci_stats->pucch02_DTX);
if (uci_stats->pucch2_trials > 0)
strpos += sprintf(output + strpos,
"UCI %d RNTI %x: pucch2_trials %d, pucch2_DTX %d\n",
i,
stats->rnti,
uci_stats->pucch2_trials,
uci_stats->pucch2_DTX);
}
if (fd)
fprintf(fd, "%s", output);
else
printf("%s", output);
}

View File

@@ -75,7 +75,6 @@ void nr_fill_srs(PHY_VARS_gNB *gNB, frame_t frame, slot_t slot, nfapi_nr_srs_pdu
int nr_get_srs_signal(PHY_VARS_gNB *gNB,
c16_t **rxdataF,
frame_t frame,
slot_t slot,
nfapi_nr_srs_pdu_t *srs_pdu,
nr_srs_info_t *nr_srs_info,

View File

@@ -34,7 +34,6 @@
int nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms,
PHY_VARS_NR_UE *ue,
module_id_t gNB_id,
const int estimateSz,
struct complex16 dl_ch_estimates_time[][estimateSz],
uint8_t frame,

View File

@@ -1295,7 +1295,7 @@ void nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
float beta_dmrs_pdsch = get_beta_dmrs(dlsch->n_dmrs_cdm_groups, config_type == NFAPI_NR_DMRS_TYPE2);
int16_t dmrs_scaling = (int16_t)((1 / beta_dmrs_pdsch) * (1 << 14));
const uint32_t *gold = nr_gold_pdsch(fp->N_RB_DL, fp->symbols_per_slot, dlsch->dlDmrsScramblingId, dlsch->nscid, slot, symbol);
nr_pdsch_dmrs_rx(fp->Ncp, slot, gold, pilot, 1000 + p, 0, nb_rb_pdsch + rb_offset, config_type, dmrs_scaling);
nr_pdsch_dmrs_rx(fp->Ncp, gold, pilot, 1000 + p, 0, nb_rb_pdsch + rb_offset, config_type, dmrs_scaling);
delay_t delay = {0};
@@ -1380,8 +1380,7 @@ void nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
* 2) Interpolate PTRS estimated value in TD after all PTRS symbols
* 3) Compensate signal with PTRS estimation for slot
*********************************************************************/
void nr_pdsch_ptrs_processing(PHY_VARS_NR_UE *ue,
int nbRx,
void nr_pdsch_ptrs_processing(int nbRx,
c16_t ptrs_phase_per_slot[][14],
int32_t ptrs_re_per_slot[][14],
uint32_t rx_size_symbol,
@@ -1389,7 +1388,6 @@ void nr_pdsch_ptrs_processing(PHY_VARS_NR_UE *ue,
NR_DL_FRAME_PARMS *frame_parms,
NR_DL_UE_HARQ_t *dlsch0_harq,
NR_DL_UE_HARQ_t *dlsch1_harq,
uint8_t gNB_id,
uint8_t nr_slot_rx,
unsigned char symbol,
uint16_t rnti,
@@ -1478,8 +1476,6 @@ void nr_pdsch_ptrs_processing(PHY_VARS_NR_UE *ue,
*ptrsReOffset,
*nb_rb,
rnti,
nr_slot_rx,
symbol,
frame_parms->ofdm_symbol_size,
(int16_t *)(rxdataF_comp[0][aarx] + symbol * rx_size_symbol),
gold,

View File

@@ -94,7 +94,6 @@ void nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
int nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms,
PHY_VARS_NR_UE *ue,
module_id_t gNB_id,
int estimateSz,
struct complex16 dl_ch_estimates_time[][estimateSz],
uint8_t frame,
@@ -108,7 +107,6 @@ void nr_ue_measurements(PHY_VARS_NR_UE *ue,
int32_t dl_ch_estimates[][pdsch_est_size]);
uint32_t nr_ue_calculate_ssb_rsrp(const NR_DL_FRAME_PARMS *fp,
const UE_nr_rxtx_proc_t *proc,
const c16_t rxdataF[][fp->samples_per_slot_wCP],
int symbol_offset,
int ssb_start_subcarrier);
@@ -122,7 +120,7 @@ void nr_ue_ssb_rsrp_measurements(PHY_VARS_NR_UE *ue,
typedef struct {
UE_nr_rxtx_proc_t proc;
PHY_VARS_NR_UE *ue;
c16_t *rxdata[NB_ANTENNAS_RX];
c16_t **rxdata;
uint32_t rxdata_size;
c16_t rxdata_ant[];
} nr_meas_task_args_t;
@@ -139,8 +137,7 @@ void phy_adjust_gain_nr(PHY_VARS_NR_UE *ue,
uint32_t rx_power_fil_dB,
uint8_t gNB_id);
void nr_pdsch_ptrs_processing(PHY_VARS_NR_UE *ue,
int nbRx,
void nr_pdsch_ptrs_processing(int nbRx,
c16_t ptrs_phase_per_slot[][14],
int32_t ptrs_re_per_slot[][14],
uint32_t rx_size_symbol,
@@ -148,7 +145,6 @@ void nr_pdsch_ptrs_processing(PHY_VARS_NR_UE *ue,
NR_DL_FRAME_PARMS *frame_parms,
NR_DL_UE_HARQ_t *dlsch0_harq,
NR_DL_UE_HARQ_t *dlsch1_harq,
uint8_t gNB_id,
uint8_t nr_slot_rx,
unsigned char symbol,
uint16_t rnti,

View File

@@ -73,7 +73,7 @@ void nr_ue_measurements(PHY_VARS_NR_UE *ue,
cmax(frame_parms->nb_antennas_rx, 1),
false);
allocCast3D(rx_spatial_power_dB,
unsigned short,
short,
ue->measurements.rx_spatial_power_dB,
NUMBER_OF_CONNECTED_gNB_MAX,
cmax(frame_parms->nb_antenna_ports_gNB, 1),
@@ -81,32 +81,21 @@ void nr_ue_measurements(PHY_VARS_NR_UE *ue,
false);
// signal measurements
for (gNB_id = 0; gNB_id < ue->n_connected_gNB; gNB_id++){
for (gNB_id = 0; gNB_id < ue->n_connected_gNB; gNB_id++) {
ue->measurements.rx_power_tot[gNB_id] = 0;
for (aarx = 0; aarx < frame_parms->nb_antennas_rx; aarx++){
ue->measurements.rx_power[gNB_id][aarx] = 0;
for (aatx = 0; aatx < frame_parms->nb_antenna_ports_gNB; aatx++){
for (aarx = 0; aarx < frame_parms->nb_antennas_rx; aarx++) {
int rx_power = 0;
for (aatx = 0; aatx < frame_parms->nb_antenna_ports_gNB; aatx++) {
const int z = signal_energy_nodc((c16_t*)&dl_ch_estimates[gNB_id][ch_offset], number_rbs * NR_NB_SC_PER_RB);
rx_spatial_power[gNB_id][aatx][aarx] = z;
if (rx_spatial_power[gNB_id][aatx][aarx] < 0)
rx_spatial_power[gNB_id][aatx][aarx] = 0;
rx_spatial_power_dB[gNB_id][aatx][aarx] = (unsigned short)dB_fixed(rx_spatial_power[gNB_id][aatx][aarx]);
ue->measurements.rx_power[gNB_id][aarx] += rx_spatial_power[gNB_id][aatx][aarx];
rx_spatial_power_dB[gNB_id][aatx][aarx] = dB_fixed(rx_spatial_power[gNB_id][aatx][aarx]);
rx_power += rx_spatial_power[gNB_id][aatx][aarx];
}
ue->measurements.rx_power_dB[gNB_id][aarx] = (unsigned short) dB_fixed(ue->measurements.rx_power[gNB_id][aarx]);
ue->measurements.rx_power_tot[gNB_id] += ue->measurements.rx_power[gNB_id][aarx];
ue->measurements.rx_power_tot[gNB_id] += rx_power;
}
ue->measurements.rx_power_tot_dB[gNB_id] = (unsigned short) dB_fixed(ue->measurements.rx_power_tot[gNB_id]);
ue->measurements.rx_power_tot_dB[gNB_id] = dB_fixed(ue->measurements.rx_power_tot[gNB_id]);
}
// filter to remove jitter
@@ -154,7 +143,6 @@ void nr_ue_measurements(PHY_VARS_NR_UE *ue,
// This function calculates:
// - SS reference signal received digital power in dB/RE
uint32_t nr_ue_calculate_ssb_rsrp(const NR_DL_FRAME_PARMS *fp,
const UE_nr_rxtx_proc_t *proc,
const c16_t rxdataF[][fp->samples_per_slot_wCP],
int symbol_offset,
int ssb_start_subcarrier)
@@ -242,7 +230,7 @@ void nr_ue_ssb_rsrp_measurements(PHY_VARS_NR_UE *ue,
if (fp->half_frame_bit)
symbol_offset += (fp->slots_per_frame >> 1) * fp->symbols_per_slot;
uint32_t rsrp_avg = nr_ue_calculate_ssb_rsrp(fp, proc, rxdataF, symbol_offset, fp->ssb_start_subcarrier);
uint32_t rsrp_avg = nr_ue_calculate_ssb_rsrp(fp, rxdataF, symbol_offset, fp->ssb_start_subcarrier);
float rsrp_db_per_re = 10 * log10(rsrp_avg);
openair0_config_t *cfg0 = &openair0_cfg[ue->rf_map.card];
@@ -489,7 +477,7 @@ void do_neighboring_cell_measurements(UE_nr_rxtx_proc_t *proc, PHY_VARS_NR_UE *u
}
// RSRP measurements
neighboring_cell_info->ssb_rsrp = nr_ue_calculate_ssb_rsrp(frame_parms, proc, rxdataF, 0, frame_parms->ssb_start_subcarrier);
neighboring_cell_info->ssb_rsrp = nr_ue_calculate_ssb_rsrp(frame_parms, rxdataF, 0, frame_parms->ssb_start_subcarrier);
neighboring_cell_info->ssb_rsrp_dBm =
10 * log10(neighboring_cell_info->ssb_rsrp) + 30 - SQ15_SQUARED_NORM_FACTOR_DB
@@ -533,9 +521,9 @@ void nr_ue_rrc_measurements(PHY_VARS_NR_UE *ue,
LOG_D(PHY, "In %s doing measurements for ssb_offset %d l_sss %d \n", __FUNCTION__, ssb_offset, l_sss);
for (aarx = 0; aarx<ue->frame_parms.nb_antennas_rx; aarx++) {
for (aarx = 0; aarx < ue->frame_parms.nb_antennas_rx; aarx++) {
ue->measurements.n0_power[aarx] = 0;
uint32_t n0_power = 0;
rxF_sss = (int16_t *)&rxdataF[aarx][l_sss*ue->frame_parms.ofdm_symbol_size];
//-ve spectrum from SSS
@@ -547,8 +535,7 @@ void nr_ue_rrc_measurements(PHY_VARS_NR_UE *ue,
LOG_I(PHY, "In %s -rxF_sss %d %d\n", __FUNCTION__, rxF_sss[re*2], rxF_sss[re*2 + 1]);
#endif
ue->measurements.n0_power[aarx] += (((int32_t)rxF_sss[re*2]*rxF_sss[re*2]) + ((int32_t)rxF_sss[re*2 + 1]*rxF_sss[re*2 + 1]));
n0_power += (((int32_t)rxF_sss[re * 2] * rxF_sss[re * 2]) + ((int32_t)rxF_sss[re * 2 + 1] * rxF_sss[re * 2 + 1]));
}
//+ve spectrum from SSS
@@ -560,17 +547,14 @@ void nr_ue_rrc_measurements(PHY_VARS_NR_UE *ue,
LOG_I(PHY, "In %s +rxF_sss %d %d\n", __FUNCTION__, rxF_sss[re*2], rxF_sss[re*2 + 1]);
#endif
ue->measurements.n0_power[aarx] += (((int32_t)rxF_sss[re*2]*rxF_sss[re*2]) + ((int32_t)rxF_sss[re*2 + 1]*rxF_sss[re*2 + 1]));
n0_power += (((int32_t)rxF_sss[re * 2]*rxF_sss[re * 2]) + ((int32_t)rxF_sss[re * 2 + 1] * rxF_sss[re * 2 + 1]));
}
ue->measurements.n0_power[aarx] /= 2*k_length;
ue->measurements.n0_power_dB[aarx] = (unsigned short) dB_fixed(ue->measurements.n0_power[aarx]);
ue->measurements.n0_power_tot += ue->measurements.n0_power[aarx];
n0_power /= 2 * k_length;
ue->measurements.n0_power_tot += n0_power;
}
ue->measurements.n0_power_tot_dB = (unsigned short) dB_fixed(ue->measurements.n0_power_tot);
ue->measurements.n0_power_tot_dB = dB_fixed(ue->measurements.n0_power_tot);
#ifdef DEBUG_MEAS_RRC
const int psd_awgn = -174;

View File

@@ -581,7 +581,7 @@ int nr_csi_rs_pmi_estimation(const PHY_VARS_NR_UE *ue,
const int16_t log2_re,
uint8_t *i1,
uint8_t *i2,
uint32_t *precoded_sinr_dB)
int32_t *precoded_sinr_dB)
{
const NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
@@ -730,7 +730,6 @@ int nr_csi_rs_cqi_estimation(const uint32_t precoded_sinr,
}
static void nr_csi_im_power_estimation(const PHY_VARS_NR_UE *ue,
const UE_nr_rxtx_proc_t *proc,
const fapi_nr_dl_config_csiim_pdu_rel15_t *csiim_config_pdu,
uint32_t *interference_plus_noise_power,
const c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP])
@@ -822,7 +821,7 @@ void nr_ue_csi_im_procedures(PHY_VARS_NR_UE *ue,
LOG_I(NR_PHY, "csiim_config_pdu->l_csiim = %i.%i.%i.%i\n", csiim_config_pdu->l_csiim[0], csiim_config_pdu->l_csiim[1], csiim_config_pdu->l_csiim[2], csiim_config_pdu->l_csiim[3]);
#endif
nr_csi_im_power_estimation(ue, proc, csiim_config_pdu, &ue->nr_csi_info->interference_plus_noise_power, rxdataF);
nr_csi_im_power_estimation(ue, csiim_config_pdu, &ue->nr_csi_info->interference_plus_noise_power, rxdataF);
ue->nr_csi_info->csi_im_meas_computed = true;
}
@@ -948,7 +947,7 @@ void nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue,
uint8_t i1[3] = {0};
uint8_t i2[1] = {0};
uint8_t cqi = 0;
uint32_t precoded_sinr_dB = 0;
int32_t precoded_sinr_dB = 0;
// bit 3 in bitmap to indicate RI measurment
if (csirs_config_pdu->measurement_bitmap & 8) {
nr_csi_rs_pmi_estimation(ue,

View File

@@ -324,7 +324,6 @@ static void nr_pdcch_detection_mrc(int nb_ant, int sz, c16_t rxdataF_comp[][sz])
static void nr_rx_pdcch_symbol(PHY_VARS_NR_UE *ue,
const UE_nr_rxtx_proc_t *proc,
int symbol,
int rel_symb_monOcc,
int ss_idx,
nr_phy_data_t *phy_data,
int llr_size_symbol,
@@ -430,12 +429,6 @@ int get_max_pdcch_monOcc(const NR_UE_PDCCH_CONFIG *phy_pdcch_config)
return monOcc;
}
static void nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue,
const UE_nr_rxtx_proc_t *proc,
c16_t *pdcch_e_rx,
fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15,
fapi_nr_dci_indication_t *dci_ind);
void set_first_last_pdcch_symb(const NR_UE_PDCCH_CONFIG *phy_pdcch_config, int *first_symb, int *last_symb)
{
*first_symb = NR_SYMBOLS_PER_SLOT; // max first pdcch symbol
@@ -478,7 +471,6 @@ void nr_pdcch_generate_llr(PHY_VARS_NR_UE *ue,
nr_rx_pdcch_symbol(ue,
proc,
symbol,
rel_symb_monOcc,
ss_idx,
phy_data,
llr_size_symbol,
@@ -489,64 +481,6 @@ void nr_pdcch_generate_llr(PHY_VARS_NR_UE *ue,
}
}
/* Decode DCI from LLRs for each Search-Space and send to MAC */
void nr_pdcch_dci_indication(const UE_nr_rxtx_proc_t *proc,
int llr_size,
int max_monOcc,
PHY_VARS_NR_UE *ue,
nr_phy_data_t *phy_data,
c16_t llr[phy_data->phy_pdcch_config.nb_search_space][max_monOcc][llr_size])
{
NR_UE_PDCCH_CONFIG *phy_pdcch_config = &phy_data->phy_pdcch_config;
nr_downlink_indication_t dl_indication;
fapi_nr_dci_indication_t dci_ind = {.SFN = proc->frame_rx, .slot = proc->nr_slot_rx};
for (int ss_idx = 0; ss_idx < phy_pdcch_config->nb_search_space; ss_idx++) {
fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15 = &phy_pdcch_config->pdcch_config[ss_idx];
uint8_t unused_start_symb[NR_SYMBOLS_PER_SLOT] = {0};
const int num_monitoring_occ = get_pdcch_mon_occasions_slot(rel15, unused_start_symb);
const int llr_stride = llr_size / rel15->coreset.duration;
int n_rb, cset_start;
get_coreset_rballoc(rel15->coreset.frequency_domain_resource, &n_rb, &cset_start);
for (int m = 0; m < num_monitoring_occ; m++) {
/// PDCCH/DCI e-sequence (input to rate matching).
c16_t pdcch_e_rx[NR_MAX_PDCCH_SIZE];
nr_pdcch_demapping_deinterleaving(n_rb,
llr[ss_idx][m],
pdcch_e_rx,
rel15->coreset.duration,
rel15->coreset.RegBundleSize,
rel15->coreset.InterleaverSize,
rel15->coreset.ShiftIndex,
rel15->number_of_candidates,
rel15->CCE,
rel15->L,
llr_stride);
nr_dci_decoding_procedure(ue, proc, pdcch_e_rx, rel15, &dci_ind);
}
}
for (int i = 0; i < dci_ind.number_of_dcis; i++) {
LOG_D(PHY,
"Frame.slot: %d.%d: DCI %i of %d total DCIs found --> rnti %x : format %d\n",
proc->frame_rx,
proc->nr_slot_rx,
i + 1,
dci_ind.number_of_dcis,
dci_ind.dci_list[i].rnti,
dci_ind.dci_list[i].dci_format);
}
/* Send to MAC */
nr_fill_dl_indication(&dl_indication, &dci_ind, NULL, proc, ue, phy_data);
ue->if_inst->dl_indication(&dl_indication);
phy_pdcch_config->nb_search_space = 0;
}
static void nr_pdcch_unscrambling(c16_t *e_rx,
uint16_t scrambling_RNTI,
uint32_t length,
@@ -566,8 +500,7 @@ static void nr_pdcch_unscrambling(c16_t *e_rx,
}
}
static void nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue,
const UE_nr_rxtx_proc_t *proc,
static void nr_dci_decoding_procedure(const UE_nr_rxtx_proc_t *proc,
c16_t *pdcch_e_rx,
fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15,
fapi_nr_dci_indication_t *dci_ind)
@@ -659,3 +592,61 @@ static void nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue,
e_rx_cand_idx += RE_PER_RB_OUT_DMRS * L * 6; // e_rx index for next candidate (L CCEs, 6 REGs per CCE and 9 REs per REG )
}
}
/* Decode DCI from LLRs for each Search-Space and send to MAC */
void nr_pdcch_dci_indication(const UE_nr_rxtx_proc_t *proc,
int llr_size,
int max_monOcc,
PHY_VARS_NR_UE *ue,
nr_phy_data_t *phy_data,
c16_t llr[phy_data->phy_pdcch_config.nb_search_space][max_monOcc][llr_size])
{
NR_UE_PDCCH_CONFIG *phy_pdcch_config = &phy_data->phy_pdcch_config;
nr_downlink_indication_t dl_indication;
fapi_nr_dci_indication_t dci_ind = {.SFN = proc->frame_rx, .slot = proc->nr_slot_rx};
for (int ss_idx = 0; ss_idx < phy_pdcch_config->nb_search_space; ss_idx++) {
fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15 = &phy_pdcch_config->pdcch_config[ss_idx];
uint8_t unused_start_symb[NR_SYMBOLS_PER_SLOT] = {0};
const int num_monitoring_occ = get_pdcch_mon_occasions_slot(rel15, unused_start_symb);
const int llr_stride = llr_size / rel15->coreset.duration;
int n_rb, cset_start;
get_coreset_rballoc(rel15->coreset.frequency_domain_resource, &n_rb, &cset_start);
for (int m = 0; m < num_monitoring_occ; m++) {
/// PDCCH/DCI e-sequence (input to rate matching).
c16_t pdcch_e_rx[NR_MAX_PDCCH_SIZE];
nr_pdcch_demapping_deinterleaving(n_rb,
llr[ss_idx][m],
pdcch_e_rx,
rel15->coreset.duration,
rel15->coreset.RegBundleSize,
rel15->coreset.InterleaverSize,
rel15->coreset.ShiftIndex,
rel15->number_of_candidates,
rel15->CCE,
rel15->L,
llr_stride);
nr_dci_decoding_procedure(proc, pdcch_e_rx, rel15, &dci_ind);
}
}
for (int i = 0; i < dci_ind.number_of_dcis; i++) {
LOG_D(PHY,
"Frame.slot: %d.%d: DCI %i of %d total DCIs found --> rnti %x : format %d\n",
proc->frame_rx,
proc->nr_slot_rx,
i + 1,
dci_ind.number_of_dcis,
dci_ind.dci_list[i].rnti,
dci_ind.dci_list[i].dci_format);
}
/* Send to MAC */
nr_fill_dl_indication(&dl_indication, &dci_ind, NULL, proc, ue, phy_data);
ue->if_inst->dl_indication(&dl_indication);
phy_pdcch_config->nb_search_space = 0;
}

View File

@@ -60,7 +60,6 @@ static void nr_dlsch_mmse(uint32_t rx_size_symbol,
c16_t dl_ch_magb[][n_rx][rx_size_symbol],
c16_t dl_ch_magr[][n_rx][rx_size_symbol],
int32_t dl_ch_estimates_ext[][rx_size_symbol],
unsigned short nb_rb,
unsigned char mod_order,
int shift,
unsigned char symbol,
@@ -86,7 +85,6 @@ static void nr_dlsch_llr(uint32_t rx_size_symbol,
c16_t dl_ch_mag[rx_size_symbol],
c16_t dl_ch_magb[rx_size_symbol],
c16_t dl_ch_magr[rx_size_symbol],
NR_DL_UE_HARQ_t *dlsch0_harq,
NR_DL_UE_HARQ_t *dlsch1_harq,
unsigned char symbol,
uint32_t len,
@@ -141,7 +139,6 @@ static void nr_dlsch_channel_level_median(uint32_t rx_size_symbol,
@param rho Cross-correlation between two spatial channels on each RX antenna
@param frame_parms Pointer to frame descriptor
@param symbol Symbol on which to operate
@param first_symbol_flag set to 1 on first DLSCH symbol
@param mod_order Modulation order of allocation
@param nb_rb Number of RBs in allocation
@param output_shift Rescaling for compensated output (should be energy-normalizing)
@@ -161,7 +158,6 @@ static void nr_dlsch_channel_compensation(uint32_t rx_size_symbol,
uint8_t n_layers,
unsigned char symbol,
int length,
bool first_symbol_flag,
unsigned char mod_order,
unsigned short nb_rb,
unsigned char output_shift,
@@ -555,7 +551,6 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
nl,
symbol,
nb_re_pdsch,
first_symbol_flag,
dlsch_config->qamModOrder,
nb_rb_pdsch,
*log2_maxh,
@@ -614,7 +609,6 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
dl_ch_magb,
dl_ch_magr,
dl_ch_estimates_ext,
nb_rb_pdsch,
dlsch_config->qamModOrder,
*log2_maxh,
symbol,
@@ -649,8 +643,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
/* Check for PTRS bitmap and process it respectively */
if((pduBitmap & 0x1) && (dlsch[0].rnti_type == TYPE_C_RNTI_)) {
nr_pdsch_ptrs_processing(ue,
nbRx,
nr_pdsch_ptrs_processing(nbRx,
ptrs_phase_per_slot,
ptrs_re_per_slot,
rx_size_symbol,
@@ -658,7 +651,6 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
fp,
dlsch0_harq,
dlsch1_harq,
gNB_id,
nr_slot_rx,
symbol,
dlsch[0].rnti,
@@ -674,7 +666,6 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
dl_ch_mag[0][0],
dl_ch_magb[0][0],
dl_ch_magr[0][0],
dlsch0_harq,
dlsch1_harq,
symbol,
dl_valid_re[symbol],
@@ -769,7 +760,6 @@ static void nr_dlsch_channel_compensation(uint32_t rx_size_symbol,
uint8_t n_layers,
unsigned char symbol,
int length,
bool first_symbol_flag,
unsigned char mod_order,
unsigned short nb_rb,
unsigned char output_shift,
@@ -868,24 +858,11 @@ static void nr_dlsch_channel_compensation(uint32_t rx_size_symbol,
for (int aarx = 0; aarx < frame_parms->nb_antennas_rx; aarx++) {
for (int l = 0; l < n_layers; l++) {
for (int atx = 0; atx < n_layers; atx++) {
rho128 = (simde__m128i *)&rho[aarx][l * n_layers + atx][symbol * nb_rb * 12];
dl_ch128 = (simde__m128i *)dl_ch_estimates_ext[l * frame_parms->nb_antennas_rx + aarx];
dl_ch128_2 = (simde__m128i *)dl_ch_estimates_ext[atx * frame_parms->nb_antennas_rx + aarx];
// multiply by conjugated channel
mult_cpx_conj_vector((c16_t *)dl_ch128, (c16_t *)dl_ch128_2, (c16_t *)rho128, 12 * nb_rb_0, output_shift);
if (first_symbol_flag) {
// rho_nm = H_arx_n.conj(H_arx_m)
// rho_rx_corr[arx][nm] = |H_arx_n|^2.|H_arx_m|^2 &rho[aarx][l*n_layers+atx][symbol*nb_rb*12]
measurements->rx_correlation[0][aarx][l * n_layers + atx] =
signal_energy(&rho[aarx][l * n_layers + atx][symbol * nb_rb * 12], length);
// avg_rho_re[aarx][l*n_layers+atx] = 16*avg_rho_re[aarx][l*n_layers+atx]/length;
// avg_rho_im[aarx][l*n_layers+atx] = 16*avg_rho_im[aarx][l*n_layers+atx]/length;
// printf("rho[rx]%d tx%d tx%d = Re: %d Im: %d\n",aarx, l,atx, avg_rho_re[aarx][l*n_layers+atx],
// avg_rho_im[aarx][l*n_layers+atx]); printf("rho_corr[rx]%d tx%d tx%d = %d ...\n",aarx, l,atx,
// measurements->rx_correlation[0][aarx][l*n_layers+atx]);
}
rho128 = (simde__m128i *)&rho[aarx][l * n_layers + atx][symbol * nb_rb * 12];
dl_ch128 = (simde__m128i *)dl_ch_estimates_ext[l * frame_parms->nb_antennas_rx + aarx];
dl_ch128_2 = (simde__m128i *)dl_ch_estimates_ext[atx * frame_parms->nb_antennas_rx + aarx];
// multiply by conjugated channel
mult_cpx_conj_vector((c16_t *)dl_ch128, (c16_t *)dl_ch128_2, (c16_t *)rho128, 12 * nb_rb_0, output_shift);
}
}
}
@@ -1364,7 +1341,6 @@ static void nr_dlsch_mmse(uint32_t rx_size_symbol,
c16_t dl_ch_magb[][n_rx][rx_size_symbol],
c16_t dl_ch_magr[][n_rx][rx_size_symbol],
int32_t dl_ch_estimates_ext[][rx_size_symbol],
unsigned short nb_rb,
unsigned char mod_order,
int shift,
unsigned char symbol,
@@ -1556,7 +1532,6 @@ static void nr_dlsch_llr(uint32_t rx_size_symbol,
c16_t dl_ch_mag[rx_size_symbol],
c16_t dl_ch_magb[rx_size_symbol],
c16_t dl_ch_magr[rx_size_symbol],
NR_DL_UE_HARQ_t *dlsch0_harq,
NR_DL_UE_HARQ_t *dlsch1_harq,
unsigned char symbol,
uint32_t len,

View File

@@ -374,7 +374,7 @@ void nr_scan_ssb(void *arg)
&ssbInfo->pbchResult,
rxdataF); // start pbch detection at first symbol after pss
if (ssbInfo->syncRes.cell_detected) {
uint32_t rsrp_avg = nr_ue_calculate_ssb_rsrp(ssbInfo->fp, ssbInfo->proc, rxdataF, 0, ssbInfo->gscnInfo.ssbFirstSC);
uint32_t rsrp_avg = nr_ue_calculate_ssb_rsrp(ssbInfo->fp, rxdataF, 0, ssbInfo->gscnInfo.ssbFirstSC);
int rsrp_db_per_re = 10 * log10(rsrp_avg);
ssbInfo->adjust_rxgain = TARGET_RX_POWER - rsrp_db_per_re;
LOG_I(PHY, "pbch rx ok. rsrp:%d dB/RE, adjust_rxgain:%d dB\n", rsrp_db_per_re, ssbInfo->adjust_rxgain);
@@ -388,7 +388,6 @@ void nr_scan_ssb(void *arg)
nr_initial_sync_t nr_initial_sync(UE_nr_rxtx_proc_t *proc,
PHY_VARS_NR_UE *ue,
int n_frames,
int sa,
nr_gscn_info_t gscnInfo[MAX_GSCN_BAND],
int numGscn)
{

View File

@@ -151,7 +151,6 @@ static int sl_nr_pss_correlation(PHY_VARS_NR_UE *UE, int frame_index)
}
static void sl_nr_extract_sss(PHY_VARS_NR_UE *ue,
UE_nr_rxtx_proc_t *proc,
int32_t *tot_metric,
uint8_t *phase_max,
c16_t rxdataF[][ue->SL_UE_PHY_PARAMS.sl_frame_params.samples_per_slot_wCP])
@@ -440,7 +439,7 @@ nr_initial_sync_t sl_nr_slss_search(PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc,
UE->common_vars.rxdata);
}
sl_nr_extract_sss(UE, NULL, &metric_tdd_ncp, &phase_tdd_ncp, rxdataF);
sl_nr_extract_sss(UE, &metric_tdd_ncp, &phase_tdd_ncp, rxdataF);
// save detected cell id to psbch
rx_slss_id = UE->SL_UE_PHY_PARAMS.sync_params.N_sl_id;
@@ -510,7 +509,7 @@ nr_initial_sync_t sl_nr_slss_search(PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc,
sl_nr_rx_indication_t rx_ind = {0};
uint16_t number_pdus = 1;
nr_fill_sl_indication(&sl_indication, &rx_ind, NULL, proc, UE, NULL);
nr_fill_sl_rx_indication(&rx_ind, SL_NR_RX_PDU_TYPE_SSB, UE, number_pdus, proc, (void *)decoded_output, rx_slss_id);
nr_fill_sl_rx_indication(&rx_ind, SL_NR_RX_PDU_TYPE_SSB, UE, number_pdus, (void *)decoded_output, rx_slss_id);
LOG_D(PHY, "Sidelink SLSS SEARCH PSBCH RX OK. Send SL-SSB TO MAC\n");

View File

@@ -126,8 +126,7 @@ int nr_ulsch_encoding(PHY_VARS_NR_UE *ue,
const uint8_t slot,
unsigned int *G,
int nb_ulsch,
uint8_t *ULSCH_ids,
uint16_t number_dmrs_symbols);
uint8_t *ULSCH_ids);
/*! \brief Perform PUSCH scrambling. TS 38.211 V15.4.0 subclause 6.3.1.1
@param[in] in Pointer to input bits
@@ -242,7 +241,6 @@ double nr_ue_pbch_freq_offset(const NR_DL_FRAME_PARMS *frame_parms,
nr_initial_sync_t nr_initial_sync(UE_nr_rxtx_proc_t *proc,
PHY_VARS_NR_UE *phy_vars_ue,
int n_frames,
int sa,
nr_gscn_info_t gscnInfo[MAX_GSCN_BAND],
int numGscn);

View File

@@ -159,8 +159,7 @@ int nr_ulsch_encoding(PHY_VARS_NR_UE *ue,
const uint8_t slot,
unsigned int *G,
int nb_ulsch,
uint8_t *ULSCH_ids,
uint16_t number_dmrs_symbols)
uint8_t *ULSCH_ids)
{
start_meas_nr_ue_phy(ue, ULSCH_ENCODING_STATS);

View File

@@ -435,8 +435,7 @@ static void map_current_symbol(const nr_phy_pxsch_params_t p,
/*
TS 38.211 table 6.4.1.1.3-1 and 2
*/
static void dmrs_amp_mult(const uint32_t dmrs_port,
const int Wt,
static void dmrs_amp_mult(const int Wt,
const int Wf[2],
const c16_t *mod_dmrs,
c16_t *mod_dmrs_out,
@@ -493,9 +492,9 @@ static void map_symbols(const nr_phy_pxsch_params_t p,
c16_t mod_dmrs[ALNARS_16_4(n_dmrs)] __attribute((aligned(16)));
if (p.transform_precoding == transformPrecoder_disabled) {
nr_modulation(gold, n_dmrs * 2, DMRS_MOD_ORDER, (int16_t *)mod_dmrs);
dmrs_amp_mult(p.dmrs_port, p.Wt, p.Wf, mod_dmrs, mod_dmrs_amp, n_dmrs, p.dmrs_type, p.num_cdm_no_data);
dmrs_amp_mult(p.Wt, p.Wf, mod_dmrs, mod_dmrs_amp, n_dmrs, p.dmrs_type, p.num_cdm_no_data);
} else {
dmrs_amp_mult(p.dmrs_port, p.Wt, p.Wf, dmrs_seq, mod_dmrs_amp, n_dmrs, p.dmrs_type, p.num_cdm_no_data);
dmrs_amp_mult(p.Wt, p.Wf, dmrs_seq, mod_dmrs_amp, n_dmrs, p.dmrs_type, p.num_cdm_no_data);
}
} else if ((p.pdu_bit_map & PUSCH_PDU_BITMAP_PUSCH_PTRS) && ptrs_symbol) {
AssertFatal(p.transform_precoding == transformPrecoder_disabled, "PTRS NOT SUPPORTED IF TRANSFORM PRECODING IS ENABLED\n");
@@ -1190,7 +1189,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
rm_info = calc_rate_match_info_uci(pusch_pdu, harq_process_ul_ue, nl_qm, &G[pusch_id]);
}
if (nr_ulsch_encoding(UE, &phy_data->ulsch, frame, slot, G, 1, ULSCH_ids, number_dmrs_symbols) == -1) {
if (nr_ulsch_encoding(UE, &phy_data->ulsch, frame, slot, G, 1, ULSCH_ids) == -1) {
stop_meas_nr_ue_phy(UE, PUSCH_PROC_STATS);
return;
}

View File

@@ -52,8 +52,7 @@
//#define ONE_OVER_SQRT2 23170 // 32767/sqrt(2) = 23170 (ONE_OVER_SQRT2)
//#define POLAR_CODING_DEBUG
void nr_generate_pucch0(const PHY_VARS_NR_UE *ue,
c16_t **txdataF,
void nr_generate_pucch0(c16_t **txdataF,
const NR_DL_FRAME_PARMS *frame_parms,
const int16_t amp16,
const int nr_slot_tx,
@@ -156,8 +155,7 @@ void nr_generate_pucch0(const PHY_VARS_NR_UE *ue,
}
}
void nr_generate_pucch1(const PHY_VARS_NR_UE *ue,
c16_t **txdataF,
void nr_generate_pucch1(c16_t **txdataF,
const NR_DL_FRAME_PARMS *frame_parms,
const int16_t amp16,
const int nr_slot_tx,
@@ -752,8 +750,7 @@ void nr_uci_encoding(uint64_t payload, uint8_t nr_bit, uint8_t nrofPRB, bool uci
}
}
//#if 0
void nr_generate_pucch2(const PHY_VARS_NR_UE *ue,
c16_t **txdataF,
void nr_generate_pucch2(c16_t **txdataF,
const NR_DL_FRAME_PARMS *frame_parms,
const int16_t amp16,
const int nr_slot_tx,
@@ -937,8 +934,7 @@ void nr_generate_pucch2(const PHY_VARS_NR_UE *ue,
}
}
//#if 0
void nr_generate_pucch3_4(const PHY_VARS_NR_UE *ue,
c16_t **txdataF,
void nr_generate_pucch3_4(c16_t **txdataF,
const NR_DL_FRAME_PARMS *frame_parms,
const int16_t amp16,
const int nr_slot_tx,

View File

@@ -42,29 +42,25 @@
#include "T.h"
#define ONE_OVER_SQRT2 23170 // 32767/sqrt(2) = 23170 (ONE_OVER_SQRT2)
void nr_generate_pucch0(const PHY_VARS_NR_UE *ue,
c16_t **txdataF,
void nr_generate_pucch0(c16_t **txdataF,
const NR_DL_FRAME_PARMS *frame_parms,
const int16_t amp,
const int nr_slot_tx,
const fapi_nr_ul_config_pucch_pdu *pucch_pdu);
void nr_generate_pucch1(const PHY_VARS_NR_UE *ue,
c16_t **txdataF,
void nr_generate_pucch1(c16_t **txdataF,
const NR_DL_FRAME_PARMS *frame_parms,
const int16_t amp,
const int nr_slot_tx,
const fapi_nr_ul_config_pucch_pdu *pucch_pdu);
void nr_generate_pucch2(const PHY_VARS_NR_UE *ue,
c16_t **txdataF,
void nr_generate_pucch2(c16_t **txdataF,
const NR_DL_FRAME_PARMS *frame_parms,
const int16_t amp,
const int nr_slot_tx,
const fapi_nr_ul_config_pucch_pdu *pucch_pdu);
void nr_generate_pucch3_4(const PHY_VARS_NR_UE *ue,
c16_t **txdataF,
void nr_generate_pucch3_4(c16_t **txdataF,
const NR_DL_FRAME_PARMS *frame_parms,
const int16_t amp,
const int nr_slot_tx,

View File

@@ -189,8 +189,8 @@ void insert_sss_nr(int16_t *sss_time,
static int pss_ch_est_nr(const NR_DL_FRAME_PARMS *frame_parms,
int nid2,
c16_t pss_ext[NB_ANTENNAS_RX][LENGTH_PSS_NR],
c16_t sss_ext[NB_ANTENNAS_RX][LENGTH_SSS_NR])
c16_t pss_ext[frame_parms->nb_antennas_rx][LENGTH_PSS_NR],
c16_t sss_ext[frame_parms->nb_antennas_rx][LENGTH_SSS_NR])
{
int16_t *pss = get_primary_synchro_nr2(nid2);
@@ -250,15 +250,13 @@ static int pss_ch_est_nr(const NR_DL_FRAME_PARMS *frame_parms,
*
*********************************************************************/
static int do_pss_sss_extract_nr(
const NR_DL_FRAME_PARMS *frame_parms,
c16_t pss_ext[NB_ANTENNAS_RX][LENGTH_PSS_NR],
c16_t sss_ext[NB_ANTENNAS_RX][LENGTH_SSS_NR],
uint8_t doPss,
uint8_t doSss,
uint8_t subframe,
int ssb_start_subcarrier,
c16_t rxdataF[][frame_parms->samples_per_slot_wCP]) // add flag to indicate extracting only PSS, only SSS, or both
static int do_pss_sss_extract_nr(const NR_DL_FRAME_PARMS *frame_parms,
c16_t pss_ext[frame_parms->nb_antennas_rx][LENGTH_PSS_NR],
c16_t sss_ext[frame_parms->nb_antennas_rx][LENGTH_SSS_NR],
uint8_t doPss,
uint8_t doSss,
int ssb_start_subcarrier,
c16_t rxdataF[][frame_parms->samples_per_slot_wCP]) // add flag to indicate extracting only PSS, only SSS, or both
{
AssertFatal(frame_parms->nb_antennas_rx > 0, "UB as sss_ext is not set to any value\n");
@@ -331,9 +329,8 @@ static int do_pss_sss_extract_nr(
*********************************************************************/
static int pss_sss_extract_nr(const NR_DL_FRAME_PARMS *frame_parms,
c16_t pss_ext[NB_ANTENNAS_RX][LENGTH_PSS_NR],
c16_t sss_ext[NB_ANTENNAS_RX][LENGTH_SSS_NR],
uint8_t subframe,
c16_t pss_ext[frame_parms->nb_antennas_rx][LENGTH_PSS_NR],
c16_t sss_ext[frame_parms->nb_antennas_rx][LENGTH_SSS_NR],
int ssb_start_subcarrier,
c16_t rxdataF[][frame_parms->samples_per_slot_wCP])
{
@@ -342,7 +339,6 @@ static int pss_sss_extract_nr(const NR_DL_FRAME_PARMS *frame_parms,
sss_ext,
1 /* doPss */,
1 /* doSss */,
subframe,
ssb_start_subcarrier,
rxdataF);
}
@@ -371,8 +367,8 @@ bool rx_sss_nr(const NR_DL_FRAME_PARMS *frame_parms,
c16_t rxdataF[][frame_parms->samples_per_slot_wCP])
{
uint8_t i;
c16_t pss_ext[NB_ANTENNAS_RX][LENGTH_PSS_NR] = {0};
c16_t sss_ext[NB_ANTENNAS_RX][LENGTH_SSS_NR] = {0};
c16_t pss_ext[frame_parms->nb_antennas_rx][LENGTH_PSS_NR];
c16_t sss_ext[frame_parms->nb_antennas_rx][LENGTH_SSS_NR];
uint8_t Nid2 = GET_NID2(nid2);
uint16_t Nid1;
uint8_t phase;
@@ -381,7 +377,7 @@ bool rx_sss_nr(const NR_DL_FRAME_PARMS *frame_parms,
// pss sss extraction
pss_sss_extract_nr(frame_parms, pss_ext, sss_ext, 0, ssb_start_subcarrier, rxdataF); /* subframe */
pss_sss_extract_nr(frame_parms, pss_ext, sss_ext, ssb_start_subcarrier, rxdataF); /* subframe */
#ifdef DEBUG_PLOT_SSS

View File

@@ -21,7 +21,7 @@
#include "tools_defs.h"
// Approximate 10*log10(x) in fixed point : x = 0...(2^32)-1
// Approximate 10*log10(x) in fixed point : x = 0...(2^32)-1, where the output is truncated to 10*log10(2^30) = 90 dB
static const int8_t dB_table[256] = {
0, 3, 5, 6, 7, 8, 8, 9, 10, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15,
@@ -131,60 +131,60 @@ int16_t dB_fixed_x10(uint32_t x) {
int16_t dB_fixed_times10(uint32_t x)
{
int16_t dB_power=0;
int16_t dB_power = 0;
if (x==0) {
dB_power = 0;
} else if ( (x&0xff000000) != 0 ) {
dB_power = dB_table_times10[((x>>24)&255)-1];
dB_power += 3*dB_table_times10[255];
} else if ( (x&0x00ff0000) != 0 ) {
dB_power = dB_table_times10[((x>>16)&255)-1];
dB_power += 2*dB_table_times10[255];
} else if ( (x&0x0000ff00) != 0 ) {
dB_power = dB_table_times10[((x>>8)&255)-1];
if (x == 0) {
dB_power = -900; // 0 in dB is -INF, but since we're dealing with integer variables, we'll put 10*log10(2^-30) x 10 in the output
} else if ((x & 0xff000000) != 0) {
dB_power = dB_table_times10[((x >> 24) & 255) - 1];
dB_power += 3 * dB_table_times10[255];
} else if ((x & 0x00ff0000) != 0) {
dB_power = dB_table_times10[((x >> 16) & 255) - 1];
dB_power += 2 * dB_table_times10[255];
} else if ((x & 0x0000ff00) != 0) {
dB_power = dB_table_times10[((x >> 8) & 255) - 1];
dB_power += dB_table_times10[255];
} else {
dB_power = dB_table_times10[(x&255)-1];
dB_power = dB_table_times10[(x & 255) - 1];
}
if (dB_power > 900)
return(900);
return (900);
return dB_power;
}
int8_t dB_fixed(uint32_t x)
{
int8_t dB_power=0;
int8_t dB_power = 0;
if (x==0) {
dB_power = 0;
} else if ( (x&0xff000000) != 0 ) {
dB_power = dB_table[((x>>24)&255)-1];
dB_power += 3*dB_table[255];
} else if ( (x&0x00ff0000) != 0 ) {
dB_power = dB_table[((x>>16)&255)-1];
dB_power += 2*dB_table[255];
} else if ( (x&0x0000ff00) != 0 ) {
dB_power = dB_table[((x>>8)&255)-1];
if (x == 0) {
dB_power = -90; // 0 in dB is -INF, but since we're dealing with integer variables, we'll put 10*log10(2^-30) in the output
} else if ((x & 0xff000000) != 0) {
dB_power = dB_table[((x >> 24) & 255) - 1];
dB_power += 3 * dB_table[255];
} else if ((x & 0x00ff0000) != 0) {
dB_power = dB_table[((x >> 16) & 255) - 1];
dB_power += 2 * dB_table[255];
} else if ((x & 0x0000ff00) != 0) {
dB_power = dB_table[((x >> 8) & 255) - 1];
dB_power += dB_table[255];
} else {
dB_power = dB_table[(x&255)-1];
dB_power = dB_table[(x & 255) - 1];
}
if (dB_power > 90)
return(90);
return (90);
return dB_power;
}
uint8_t dB_fixed64(uint64_t x)
int8_t dB_fixed64(uint64_t x)
{
if ((x<(((uint64_t)1)<<32))) return(dB_fixed((uint32_t)x));
else return(4*dB_table[255]+dB_fixed((uint32_t)(x>>32)));
if ((x < (((uint64_t)1) << 32)))
return (dB_fixed((uint32_t)x));
else
return (4 * dB_table[255] + dB_fixed((uint32_t)(x >> 32)));
}

View File

@@ -961,7 +961,7 @@ uint32_t angle(struct complex16 perrror);
unsigned char factor2(unsigned int x);
int8_t dB_fixed(uint32_t x);
uint8_t dB_fixed64(uint64_t x);
int8_t dB_fixed64(uint64_t x);
int8_t dB_fixed2(uint32_t x,uint32_t y);
int16_t dB_fixed_times10(uint32_t x);
int16_t dB_fixed_x10(uint32_t x);

View File

@@ -45,7 +45,7 @@
#define MAX_BANDS_PER_RRU 4
#define MAX_RRU_CONFIG_SIZE 1024
typedef struct NR_DL_FRAME_PARMS_s NR_DL_FRAME_PARMS;
typedef enum {
normal_txrx=0,
@@ -176,7 +176,7 @@ typedef struct {
int slot;
const c16_t *rxdata;
c16_t *rxdataF;
const struct NR_DL_FRAME_PARMS *fp;
const NR_DL_FRAME_PARMS *fp;
int32_t sample_offet;
task_ans_t *ans;
} feprx_cmd_t;
@@ -491,8 +491,8 @@ typedef struct RU_t_s {
/// FAPI confiuration
nfapi_nr_config_request_scf_t config;
/// Frame parameters
struct LTE_DL_FRAME_PARMS *frame_parms;
struct NR_DL_FRAME_PARMS *nr_frame_parms;
struct LTE_DL_FRAME_PARMS_s *frame_parms;
struct NR_DL_FRAME_PARMS_s *nr_frame_parms;
///timing offset used in TDD
int N_TA_offset;
/// SF extension used in TDD (unit: number of samples at 30.72MHz) (this is an expert option)

View File

@@ -206,15 +206,15 @@ typedef struct {
//! estimated noise power (linear)
unsigned int n0_power[NB_ANTENNAS_RX];
//! estimated noise power (dB)
unsigned short n0_power_dB[NB_ANTENNAS_RX];
short n0_power_dB[NB_ANTENNAS_RX];
//! total estimated noise power (linear)
unsigned int n0_power_tot;
//! total estimated noise power (dB)
unsigned short n0_power_tot_dB;
short n0_power_tot_dB;
//! average estimated noise power (linear)
unsigned int n0_power_avg;
//! average estimated noise power (dB)
unsigned short n0_power_avg_dB;
short n0_power_avg_dB;
//! total estimated noise power (dBm)
short n0_power_tot_dBm;
@@ -222,24 +222,24 @@ typedef struct {
//! estimated received spatial signal power (linear)
int rx_spatial_power[NUMBER_OF_CONNECTED_eNB_MAX][2][2];
//! estimated received spatial signal power (dB)
unsigned short rx_spatial_power_dB[NUMBER_OF_CONNECTED_eNB_MAX][2][2];
short rx_spatial_power_dB[NUMBER_OF_CONNECTED_eNB_MAX][2][2];
/// estimated received signal power (sum over all TX antennas)
//int wideband_cqi[NUMBER_OF_CONNECTED_eNB_MAX][NB_ANTENNAS_RX];
int rx_power[NUMBER_OF_CONNECTED_eNB_MAX][NB_ANTENNAS_RX];
/// estimated received signal power (sum over all TX antennas)
//int wideband_cqi_dB[NUMBER_OF_CONNECTED_eNB_MAX][NB_ANTENNAS_RX];
unsigned short rx_power_dB[NUMBER_OF_CONNECTED_eNB_MAX][NB_ANTENNAS_RX];
short rx_power_dB[NUMBER_OF_CONNECTED_eNB_MAX][NB_ANTENNAS_RX];
/// estimated received signal power (sum over all TX/RX antennas)
int rx_power_tot[NUMBER_OF_CONNECTED_eNB_MAX]; //NEW
/// estimated received signal power (sum over all TX/RX antennas)
unsigned short rx_power_tot_dB[NUMBER_OF_CONNECTED_eNB_MAX]; //NEW
short rx_power_tot_dB[NUMBER_OF_CONNECTED_eNB_MAX]; //NEW
//! estimated received signal power (sum of all TX/RX antennas, time average)
int rx_power_avg[NUMBER_OF_CONNECTED_eNB_MAX];
//! estimated received signal power (sum of all TX/RX antennas, time average, in dB)
unsigned short rx_power_avg_dB[NUMBER_OF_CONNECTED_eNB_MAX];
short rx_power_avg_dB[NUMBER_OF_CONNECTED_eNB_MAX];
/// SINR (sum of all TX/RX antennas, in dB)
int wideband_cqi_tot[NUMBER_OF_CONNECTED_eNB_MAX];

View File

@@ -598,8 +598,7 @@ typedef struct {
int non_mbsfn_SubframeConfig;
} NonMBSFN_config_t;
typedef struct LTE_DL_FRAME_PARMS {
typedef struct LTE_DL_FRAME_PARMS_s {
/// Number of resource blocks (RB) in DL
uint8_t N_RB_DL;
/// Number of resource blocks (RB) in UL

View File

@@ -419,17 +419,17 @@ typedef struct {
//! estimated noise power (linear)
unsigned int n0_power[MAX_NUM_RU_PER_eNB];
//! estimated noise power (dB)
unsigned short n0_power_dB[MAX_NUM_RU_PER_eNB];
short n0_power_dB[MAX_NUM_RU_PER_eNB];
//! total estimated noise power (linear)
unsigned int n0_power_tot;
//! estimated avg noise power (dB)
unsigned short n0_power_tot_dB;
short n0_power_tot_dB;
//! estimated avg noise power (dB)
short n0_power_tot_dBm;
//! estimated avg noise power per RB per RX ant (lin)
unsigned short n0_subband_power[MAX_NUM_RU_PER_eNB][100];
//! estimated avg noise power per RB per RX ant (dB)
unsigned short n0_subband_power_dB[MAX_NUM_RU_PER_eNB][100];
short n0_subband_power_dB[MAX_NUM_RU_PER_eNB][100];
//! estimated avg noise power per RB (dB)
short n0_subband_power_tot_dB[100];
//! estimated avg noise power per RB (dBm)
@@ -440,7 +440,7 @@ typedef struct {
//! estimated received spatial signal power (linear)
unsigned int rx_spatial_power[NUMBER_OF_SRS_MAX][2][2];
//! estimated received spatial signal power (dB)
unsigned short rx_spatial_power_dB[NUMBER_OF_SRS_MAX][2][2];
short rx_spatial_power_dB[NUMBER_OF_SRS_MAX][2][2];
//! estimated rssi (dBm)
short rx_rssi_dBm[NUMBER_OF_SRS_MAX];
//! estimated correlation (wideband linear) between spatial channels (computed in dlsch_demodulation)
@@ -453,7 +453,7 @@ typedef struct {
/// Wideband CQI in dB (= SINR dB)
int wideband_cqi_dB[NUMBER_OF_SRS_MAX][MAX_NUM_RU_PER_eNB];
/// Wideband CQI (sum of all RX antennas, in dB)
char wideband_cqi_tot[NUMBER_OF_SRS_MAX];
int wideband_cqi_tot[NUMBER_OF_SRS_MAX];
/// Subband CQI per RX antenna and RB (= SINR)
int subband_cqi[NUMBER_OF_SRS_MAX][MAX_NUM_RU_PER_eNB][100];
/// Total Subband CQI and RB (= SINR)

View File

@@ -319,17 +319,17 @@ typedef struct {
//! estimated noise power (linear)
unsigned int n0_power[MAX_NUM_RU_PER_gNB];
//! estimated noise power (dB)
unsigned int n0_power_dB[MAX_NUM_RU_PER_gNB];
int n0_power_dB[MAX_NUM_RU_PER_gNB];
//! total estimated noise power (linear)
unsigned int n0_power_tot;
//! estimated avg noise power (dB)
unsigned int n0_power_tot_dB;
int n0_power_tot_dB;
//! estimated avg noise power per RB per RX ant (lin)
fourDimArray_t *n0_subband_power;
//! estimated avg subband noise power (dB)
unsigned int n0_subband_power_avg_dB;
int n0_subband_power_avg_dB;
//! estimated avg subband noise power per antenna (dB)
unsigned int n0_subband_power_avg_perANT_dB[MAX_ANT];
int n0_subband_power_avg_perANT_dB[MAX_ANT];
//! estimated avg noise power per RB (dB)
int n0_subband_power_tot_dB[275];
/// PRACH background noise level

View File

@@ -104,18 +104,11 @@
/// Context data structure for gNB subframe processing
typedef struct {
/// Component Carrier index
uint8_t CC_id;
uint8_t CC_id;
/// Last RX timestamp
openair0_timestamp_t timestamp_rx;
} UE_nr_proc_t;
typedef enum {
NR_PBCH_EST=0,
NR_PDCCH_EST,
NR_PDSCH_EST,
NR_SSS_EST,
} NR_CHANNEL_EST_t;
#define debug_msg if (((mac_xface->frame%100) == 0) || (mac_xface->frame < 50)) msg
#define NEIGHBOR_CELL_MAX_CONSECUTIVE_FAILURES 10
@@ -144,18 +137,14 @@ typedef struct {
int ssb_rsrp_dBm[64];
float ssb_sinr_dB[64];
// common measurements
//! estimated noise power (linear)
unsigned int n0_power[NB_ANTENNAS_RX];
//! estimated noise power (dB)
unsigned short n0_power_dB[NB_ANTENNAS_RX];
//! total estimated noise power (linear)
unsigned int n0_power_tot;
//! total estimated noise power (dB)
unsigned short n0_power_tot_dB;
short n0_power_tot_dB;
//! average estimated noise power (linear)
unsigned int n0_power_avg;
//! average estimated noise power (dB)
unsigned short n0_power_avg_dB;
short n0_power_avg_dB;
//! total estimated noise power (dBm)
short n0_power_tot_dBm;
@@ -165,59 +154,27 @@ typedef struct {
//! estimated received spatial signal power (dB)
fourDimArray_t *rx_spatial_power_dB;
/// estimated received signal power (sum over all TX antennas)
int rx_power[NUMBER_OF_CONNECTED_gNB_MAX][NB_ANTENNAS_RX];
/// estimated received signal power (sum over all TX antennas)
unsigned short rx_power_dB[NUMBER_OF_CONNECTED_gNB_MAX][NB_ANTENNAS_RX];
/// estimated received signal power (sum over all TX/RX antennas)
int rx_power_tot[NUMBER_OF_CONNECTED_gNB_MAX]; //NEW
int rx_power_tot[NUMBER_OF_CONNECTED_gNB_MAX]; //NEW
/// estimated received signal power (sum over all TX/RX antennas)
unsigned short rx_power_tot_dB[NUMBER_OF_CONNECTED_gNB_MAX]; //NEW
short rx_power_tot_dB[NUMBER_OF_CONNECTED_gNB_MAX]; //NEW
//! estimated received signal power (sum of all TX/RX antennas, time average)
int rx_power_avg[NUMBER_OF_CONNECTED_gNB_MAX];
int rx_power_avg[NUMBER_OF_CONNECTED_gNB_MAX];
//! estimated received signal power (sum of all TX/RX antennas, time average, in dB)
unsigned short rx_power_avg_dB[NUMBER_OF_CONNECTED_gNB_MAX];
short rx_power_avg_dB[NUMBER_OF_CONNECTED_gNB_MAX];
/// SINR (sum of all TX/RX antennas, in dB)
int wideband_cqi_tot[NUMBER_OF_CONNECTED_gNB_MAX];
int wideband_cqi_tot[NUMBER_OF_CONNECTED_gNB_MAX];
/// SINR (sum of all TX/RX antennas, time average, in dB)
int wideband_cqi_avg[NUMBER_OF_CONNECTED_gNB_MAX];
int wideband_cqi_avg[NUMBER_OF_CONNECTED_gNB_MAX];
//! estimated rssi (dBm)
short rx_rssi_dBm[NUMBER_OF_CONNECTED_gNB_MAX];
//! estimated correlation (wideband linear) between spatial channels (computed in dlsch_demodulation)
int rx_correlation[NUMBER_OF_CONNECTED_gNB_MAX][NB_ANTENNAS_RX][NR_MAX_NB_LAYERS*NR_MAX_NB_LAYERS];//
//! estimated correlation (wideband dB) between spatial channels (computed in dlsch_demodulation)
int rx_correlation_dB[NUMBER_OF_CONNECTED_gNB_MAX][2];
short rx_rssi_dBm[NUMBER_OF_CONNECTED_gNB_MAX];
/// Wideband CQI (sum of all RX antennas, in dB, for precoded transmission modes (3,4,5,6), up to 4 spatial streams)
int precoded_cqi_dB[NUMBER_OF_CONNECTED_gNB_MAX+1][4];
/// Subband CQI per RX antenna (= SINR)
int subband_cqi[NUMBER_OF_CONNECTED_gNB_MAX][NB_ANTENNAS_RX][NUMBER_OF_SUBBANDS_MAX];
/// Total Subband CQI (= SINR)
int subband_cqi_tot[NUMBER_OF_CONNECTED_gNB_MAX][NUMBER_OF_SUBBANDS_MAX];
/// Subband CQI in dB (= SINR dB)
int subband_cqi_dB[NUMBER_OF_CONNECTED_gNB_MAX][NB_ANTENNAS_RX][NUMBER_OF_SUBBANDS_MAX];
/// Total Subband CQI
int subband_cqi_tot_dB[NUMBER_OF_CONNECTED_gNB_MAX][NUMBER_OF_SUBBANDS_MAX];
/// Wideband PMI for each RX antenna
int wideband_pmi_re[NUMBER_OF_CONNECTED_gNB_MAX][NB_ANTENNAS_RX];
/// Wideband PMI for each RX antenna
int wideband_pmi_im[NUMBER_OF_CONNECTED_gNB_MAX][NB_ANTENNAS_RX];
///Subband PMI for each RX antenna
int subband_pmi_re[NUMBER_OF_CONNECTED_gNB_MAX][NUMBER_OF_SUBBANDS_MAX][NB_ANTENNAS_RX];
///Subband PMI for each RX antenna
int subband_pmi_im[NUMBER_OF_CONNECTED_gNB_MAX][NUMBER_OF_SUBBANDS_MAX][NB_ANTENNAS_RX];
/// chosen RX antennas (1=Rx antenna 1, 2=Rx antenna 2, 3=both Rx antennas)
unsigned char selected_rx_antennas[NUMBER_OF_CONNECTED_gNB_MAX][NUMBER_OF_SUBBANDS_MAX];
/// Wideband Rank indication
unsigned char rank[NUMBER_OF_CONNECTED_gNB_MAX];
/// Number of RX Antennas
unsigned char nb_antennas_rx;
/// DLSCH error counter
// short dlsch_errors;
/// Info about neighboring cells to perform the measurements
neighboring_cell_info_t neighboring_cell_info[NUMBER_OF_NEIGHBORING_CELLS_MAX];
bool meas_request_pending;
@@ -263,17 +220,6 @@ typedef struct {
#define MAX_NR_DCI_DECODED_SLOT 10 // This value is not specified
typedef enum {
_format_0_0_found = 0,
_format_0_1_found = 1,
_format_1_0_found = 2,
_format_1_1_found = 3,
_format_2_0_found = 4,
_format_2_1_found = 5,
_format_2_2_found = 6,
_format_2_3_found = 7
} format_found_t;
#endif
typedef struct {
int nb_search_space;
@@ -282,18 +228,6 @@ typedef struct {
#define NR_PSBCH_DMRS_LENGTH 297 // in mod symbols
#define NR_PSBCH_DMRS_LENGTH_DWORD 20 // ceil(2(QPSK)*NR_PBCH_DMRS_LENGTH/32)
/* NR Sidelink PSBCH payload fields
TODO: This will be removed in the future and
filled in by the upper layers once developed. */
typedef struct {
uint32_t coverageIndicator : 1;
uint32_t tddConfig : 12;
uint32_t DFN : 10;
uint32_t slotIndex : 7;
uint32_t reserved : 2;
} PSBCH_payload;
#define PBCH_A 24
typedef struct {
@@ -426,15 +360,11 @@ typedef struct PHY_VARS_NR_UE_s {
fapi_nr_config_request_t nrUE_config;
nr_synch_request_t synch_request;
NR_UE_PRACH *prach_vars[NUMBER_OF_CONNECTED_gNB_MAX];
NR_UE_PRS *prs_vars[NR_MAX_PRS_COMB_SIZE];
uint8_t prs_active_gNBs;
NR_UE_PRACH *prach_vars[NUMBER_OF_CONNECTED_gNB_MAX];
NR_UE_PRS *prs_vars[NR_MAX_PRS_COMB_SIZE];
uint8_t prs_active_gNBs;
NR_DL_UE_HARQ_t dl_harq_processes[2][NR_MAX_DLSCH_HARQ_PROCESSES];
NR_UL_UE_HARQ_t ul_harq_processes[NR_MAX_ULSCH_HARQ_PROCESSES];
//Paging parameters
uint32_t IMSImod1024;
uint32_t PF;
uint32_t PO;
// Scrambling IDs used in PUSCH DMRS
c16_t X_u[64][839];
@@ -463,21 +393,6 @@ typedef struct PHY_VARS_NR_UE_s {
int dlsch_received[NUMBER_OF_CONNECTED_gNB_MAX];
int dlsch_received_last[NUMBER_OF_CONNECTED_gNB_MAX];
int dlsch_fer[NUMBER_OF_CONNECTED_gNB_MAX];
int dlsch_SI_received[NUMBER_OF_CONNECTED_gNB_MAX];
int dlsch_SI_errors[NUMBER_OF_CONNECTED_gNB_MAX];
int dlsch_ra_received[NUMBER_OF_CONNECTED_gNB_MAX];
int dlsch_ra_errors[NUMBER_OF_CONNECTED_gNB_MAX];
int dlsch_p_received[NUMBER_OF_CONNECTED_gNB_MAX];
int dlsch_p_errors[NUMBER_OF_CONNECTED_gNB_MAX];
int dlsch_mch_received[NUMBER_OF_CONNECTED_gNB_MAX];
int current_dlsch_cqi[NUMBER_OF_CONNECTED_gNB_MAX];
int dlsch_mch_received_sf[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_gNB_MAX];
int dlsch_mcch_received[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_gNB_MAX];
int dlsch_mtch_received[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_gNB_MAX];
int dlsch_mcch_errors[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_gNB_MAX];
int dlsch_mtch_errors[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_gNB_MAX];
int dlsch_mcch_trials[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_gNB_MAX];
int dlsch_mtch_trials[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_gNB_MAX];
uint8_t init_sync_frame;
/// temporary offset during cell search prior to MIB decoding
int ssb_offset;

View File

@@ -156,9 +156,7 @@ typedef struct {
} prach_list_t;
void init_prach_list(prach_list_t *);
typedef struct NR_DL_FRAME_PARMS NR_DL_FRAME_PARMS;
struct NR_DL_FRAME_PARMS {
typedef struct NR_DL_FRAME_PARMS_s {
/// frequency range
frequency_range_t freq_range;
// /// Placeholder to replace overlapping fields below
@@ -269,7 +267,7 @@ struct NR_DL_FRAME_PARMS {
uint16_t tdd_slot_config;
uint8_t tdd_period;
bool print_ue_help_cmdline_log;
};
} NR_DL_FRAME_PARMS;
// PRS config structures
typedef struct {
@@ -305,6 +303,29 @@ typedef struct {
int32_t reserved;
} prs_meas_t;
// Configuration parameters required for 5G Positioning
// TRP Cartesian Coordinate information
typedef struct trp_s {
// TRP id
uint32_t id;
// TRP x-axis value
uint32_t x_axis;
// TRP y-axis value
uint32_t y_axis;
// TRP z-axis value
uint32_t z_axis;
// 0 = mm, 1 = cm, 2 = dm
uint8_t unit;
} trp_t;
#define MAX_NUM_TRPs 8
typedef struct {
trp_t trps[MAX_NUM_TRPs];
uint8_t num_trp;
// Serving gNB indicator
bool is_serving_gNB;
} positioning_config_t;
// rel16 prs k_prime table as per ts138.211 sec.7.4.1.7.2
#define K_PRIME_TABLE_ROW_SIZE 4
#define K_PRIME_TABLE_COL_SIZE 12

View File

@@ -55,15 +55,15 @@ typedef struct {
//! estimated noise power (linear)
unsigned int n0_power[NB_ANTENNAS_RX];
//! estimated noise power (dB)
unsigned short n0_power_dB[NB_ANTENNAS_RX];
short n0_power_dB[NB_ANTENNAS_RX];
//! total estimated noise power (linear)
unsigned int n0_power_tot;
//! total estimated noise power (dB)
unsigned short n0_power_tot_dB;
short n0_power_tot_dB;
//! average estimated noise power (linear)
unsigned int n0_power_avg;
//! average estimated noise power (dB)
unsigned short n0_power_avg_dB;
short n0_power_avg_dB;
//! total estimated noise power (dBm)
short n0_power_tot_dBm;
@@ -71,24 +71,24 @@ typedef struct {
//! estimated received spatial signal power (linear)
int rx_spatial_power[NUMBER_OF_CONNECTED_eNB_MAX][2][2];
//! estimated received spatial signal power (dB)
unsigned short rx_spatial_power_dB[NUMBER_OF_CONNECTED_eNB_MAX][2][2];
short rx_spatial_power_dB[NUMBER_OF_CONNECTED_eNB_MAX][2][2];
/// estimated received signal power (sum over all TX antennas)
//int wideband_cqi[NUMBER_OF_CONNECTED_eNB_MAX][NB_ANTENNAS_RX];
int rx_power[NUMBER_OF_CONNECTED_eNB_MAX][NB_ANTENNAS_RX];
/// estimated received signal power (sum over all TX antennas)
//int wideband_cqi_dB[NUMBER_OF_CONNECTED_eNB_MAX][NB_ANTENNAS_RX];
unsigned short rx_power_dB[NUMBER_OF_CONNECTED_eNB_MAX][NB_ANTENNAS_RX];
short rx_power_dB[NUMBER_OF_CONNECTED_eNB_MAX][NB_ANTENNAS_RX];
/// estimated received signal power (sum over all TX/RX antennas)
int rx_power_tot[NUMBER_OF_CONNECTED_eNB_MAX]; //NEW
/// estimated received signal power (sum over all TX/RX antennas)
unsigned short rx_power_tot_dB[NUMBER_OF_CONNECTED_eNB_MAX]; //NEW
short rx_power_tot_dB[NUMBER_OF_CONNECTED_eNB_MAX]; //NEW
//! estimated received signal power (sum of all TX/RX antennas, time average)
int rx_power_avg[NUMBER_OF_CONNECTED_eNB_MAX];
//! estimated received signal power (sum of all TX/RX antennas, time average, in dB)
unsigned short rx_power_avg_dB[NUMBER_OF_CONNECTED_eNB_MAX];
short rx_power_avg_dB[NUMBER_OF_CONNECTED_eNB_MAX];
/// SINR (sum of all TX/RX antennas, in dB)
int wideband_cqi_tot[NUMBER_OF_CONNECTED_eNB_MAX];
@@ -141,17 +141,17 @@ typedef struct {
//! estimated noise power (linear)
unsigned int n0_power[NB_ANTENNAS_RX];
//! estimated noise power (dB)
unsigned short n0_power_dB[NB_ANTENNAS_RX];
short n0_power_dB[NB_ANTENNAS_RX];
//! total estimated noise power (linear)
unsigned int n0_power_tot;
//! estimated avg noise power (dB)
unsigned short n0_power_tot_dB;
short n0_power_tot_dB;
//! estimated avg noise power (dB)
short n0_power_tot_dBm;
//! estimated avg noise power per RB per RX ant (lin)
unsigned short n0_subband_power[NB_ANTENNAS_RX][100];
//! estimated avg noise power per RB per RX ant (dB)
unsigned short n0_subband_power_dB[NB_ANTENNAS_RX][100];
short n0_subband_power_dB[NB_ANTENNAS_RX][100];
//! estimated avg noise power per RB (dB)
short n0_subband_power_tot_dB[100];
//! estimated avg noise power per RB (dBm)
@@ -160,7 +160,7 @@ typedef struct {
//! estimated received spatial signal power (linear)
unsigned int rx_spatial_power[NUMBER_OF_UE_MAX][2][2];
//! estimated received spatial signal power (dB)
unsigned short rx_spatial_power_dB[NUMBER_OF_UE_MAX][2][2];
short rx_spatial_power_dB[NUMBER_OF_UE_MAX][2][2];
//! estimated rssi (dBm)
short rx_rssi_dBm[NUMBER_OF_UE_MAX];
//! estimated correlation (wideband linear) between spatial channels (computed in dlsch_demodulation)
@@ -173,7 +173,7 @@ typedef struct {
/// Wideband CQI in dB (= SINR dB)
int wideband_cqi_dB[NUMBER_OF_UE_MAX][NB_ANTENNAS_RX];
/// Wideband CQI (sum of all RX antennas, in dB)
char wideband_cqi_tot[NUMBER_OF_UE_MAX];
int wideband_cqi_tot[NUMBER_OF_UE_MAX];
/// Subband CQI per RX antenna and RB (= SINR)
int subband_cqi[NUMBER_OF_UE_MAX][NB_ANTENNAS_RX][100];
/// Total Subband CQI and RB (= SINR)

View File

@@ -389,4 +389,9 @@ void nr_generate_csi_rs(const NR_DL_FRAME_PARMS *frame_parms,
const uint8_t cdm_type,
c16_t **dataF);
int nr_get_ssb_start_sc(int scs,
int ssb_offset_point_a,
int ssb_sco,
frequency_range_t freq_range);
#endif

View File

@@ -481,3 +481,26 @@ void nr_fo_compensation(double fo_Hz, int samples_per_ms, int sample_offset, con
mult_complex_vectors(rxdata_in, rot, rxdata_out, size, 14);
#endif
}
/*!
* Setting the first subcarrier
* 3GPP TS 38.211 sections 7.4.3.1 and 4.4.4.2
* for FR1 offsetToPointA and k_SSB are expressed in terms of 15 kHz SCS
* for FR2 offsetToPointA is expressed in terms of 60 kHz SCS and k_SSB expressed in terms of the SCS provided
* by the higher-layer parameter subCarrierSpacingCommon
*/
int nr_get_ssb_start_sc(int scs, int ssb_offset_point_a, int ssb_sco, frequency_range_t freq_range)
{
const int prb_offset =
(freq_range == FR1) ? ssb_offset_point_a >> scs : ssb_offset_point_a >> (scs - 2);
const int sc_offset =
(freq_range == FR1) ? ssb_sco >> scs : ssb_sco;
int ssb_start_subcarrier = (12 * prb_offset + sc_offset);
LOG_D(NR_PHY, "prb_offset:%d, ssb_subcarrier_offset:%d,scs :%d, Fr:%d, ssb_start_subcarrier:%d\n",
prb_offset, ssb_sco, scs, freq_range, ssb_start_subcarrier);
return ssb_start_subcarrier;
}

View File

@@ -4,11 +4,8 @@
#include "nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h"
#include "openair2/NR_PHY_INTERFACE/NR_IF_Module.h"
#include "openair1/PHY/LTE_TRANSPORT/transport_common.h"
typedef struct pnf_t pnf_t;
typedef struct pnf_p7_t pnf_p7_t;
typedef struct vnf_t vnf_t;
typedef struct vnf_p7_t vnf_p7_t;
#include "nfapi/open-nFAPI/vnf/inc/vnf.h"
#include "nfapi/open-nFAPI/pnf/inc/pnf.h"
int l1_north_init_gNB(void){return 0;}
int slot_ahead = 6;

View File

@@ -47,11 +47,12 @@
extern int oai_nfapi_rach_ind(nfapi_rach_indication_t *rach_ind);
void prach_procedures(PHY_VARS_eNB *eNB,
int br_flag ) {
uint16_t max_preamble[4]={0},max_preamble_energy[4]={0},max_preamble_delay[4]={0},avg_preamble_energy[4]={0};
void prach_procedures(PHY_VARS_eNB *eNB, int br_flag)
{
uint16_t max_preamble[4] = {0}, max_preamble_energy[4] = {0}, max_preamble_delay[4] = {0};
int16_t avg_preamble_energy[4] = {0};
uint16_t i;
int frame,subframe;
int frame, subframe;
if (br_flag==1) {
subframe = eNB->proc.subframe_prach_br;

View File

@@ -35,7 +35,7 @@
#include "sched_nr.h"
#include "PHY/MODULATION/modulation_common.h"
#include "PHY/MODULATION/nr_modulation.h"
#include "openair1/PHY/defs_nr_common.h"
#include "common/utils/LOG/log.h"
#include "common/utils/system.h"

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