# openairinterface/openairinterface5g architecture

> Architecture diagram of the GitHub repository openairinterface/openairinterface5g, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/openairinterface/openairinterface5g
- Repository: https://github.com/openairinterface/openairinterface5g

## Overview

#### Purpose and entry points
Duranta OpenAirInterface is a C/C++ cellular RAN stack for LTE/4G and NR/5G, supporting simulation, SDR-based deployment, disaggregated RAN, and core-network integration. CMake builds role-specific softmodem processes; primary runtime mains are gNB, NR UE, eNB, LTE UE, RU/ORU, and NR CU-UP.
Paths: `CMakeLists.txt`, `executables/nr-softmodem.c`, `executables/nr-gnb.c`, `executables/nr-ue.c`, `executables/lte-softmodem.c`, `executables/nr-cuup.c`.

#### Process bootstrap, configuration, and tasking
Executables load command-line, libconfig, or YAML configuration, initialize radio/L1/L2/control-plane tasks, then run concurrent real-time processing. Common configuration is a key boundary between deployment-specific `.conf`/YAML and protocol modules. Inter-task messaging and queues decouple many protocol/control tasks.
Paths: `common/config/config_load_configmodule.c`, `common/config/yaml/config_yaml.cpp`, `executables/create_tasks.c`, `common/utils/ocp_itti/intertask_interface.cpp`.

#### PHY and real-time radio pipeline
`openair1` implements LTE and NR Layer 1: frame setup, OFDM/modulation, reference signals, channel estimation, transport coding/decoding (including LDPC and Polar), and per-slot gNB/UE procedures. The PHY exchanges scheduling requests/results with Layer 2 and IQ samples with a selected radio backend.
Paths: `openair1/SCHED_NR/phy_procedures_nr_gNB.c`, `openair1/SCHED_NR_UE/phy_procedures_nr_ue.c`, `openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c`.

#### Layer 2, RRC, and user plane
NR and LTE MAC schedule radio resources and bridge to PHY; RLC/PDCP/SDAP manage bearer data, retransmission, security, and QoS; RRC owns UE/cell context and radio-bearer control. In a monolithic gNB these layers are in-process; split deployments redirect their interfaces through F1/E1 components.
Paths: `openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c`, `openair2/LAYER2/nr_rlc/nr_rlc_entity.c`, `openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c`, `openair2/RRC/NR/rrc_gNB.c`.

#### External 3GPP and RAN interfaces
Control-plane modules encode/decode ASN.1 protocol messages and use SCTP toward 5G/LTE cores. NGAP connects gNBs to a 5GC; S1AP serves LTE EPC connectivity. F1AP separates CU/DU, E1AP separates CU-CP/CU-UP, and NFAPI/FAPI separates MAC/VNF from PHY/PNF, including Aerial integration.
Paths: `openair3/NGAP/ngap_gNB.c`, `openair2/F1AP/f1ap_cu_task.c`, `openair2/E1AP/e1ap.c`, `nfapi/oai_integration/nfapi.c`.

#### Radio and fronthaul boundary
The radio abstraction supports hardware drivers (notably USRP), Ethernet, RF simulation, virtual simulation, ZeroMQ, and O-RAN 7.2 fronthaul. These modules are runtime-selected integration boundaries: they convert PHY sample streams or split-plane traffic to hardware/network transports. O-RAN ORU handling includes packetization, compression, timing, and optional management-plane support.
Paths: `radio/COMMON/common_lib.h`, `radio/USRP/usrp_lib.cpp`, `radio/rfsimulator/simulator.cpp`, `fronthaul/oru/oru_fh.c`, `radio/fhi_72/oaioran.c`.

#### Deployment, observability, and validation
Native Linux processes can be containerized for Ubuntu/RHEL, run under Docker Compose simulation scenarios, or deployed through OpenShift/Kubernetes-oriented manifests and Helm jobs. CI orchestration drives builds and radio/core integration scenarios. Runtime diagnostics include logging, tracing, and an optional web control server with Angular frontend.
Paths: `docker/Dockerfile.gNB.ubuntu`, `ci-scripts/yaml_files/5g_rfsimulator/docker-compose.yaml`, `ci-scripts/main.py`, `common/utils/LOG/log.c`, `common/utils/websrv/websrv.c`.

Main entry points: [`executables/nr-softmodem.c`](https://github.com/openairinterface/openairinterface5g/blob/develop/executables/nr-softmodem.c) (Softmodem processes), [`executables/create_tasks.c`](https://github.com/openairinterface/openairinterface5g/blob/develop/executables/create_tasks.c) (Task creation and ITTI), [`openair2/RRC/NR/rrc_gNB.c`](https://github.com/openairinterface/openairinterface5g/blob/develop/openair2/RRC/NR/rrc_gNB.c) (RRC control), [`openair1/SCHED_NR/phy_procedures_nr_gNB.c`](https://github.com/openairinterface/openairinterface5g/blob/develop/openair1/SCHED_NR/phy_procedures_nr_gNB.c) (NR/LTE PHY procedures)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Softmodem runtime"]
  node_build["CMake role builds<br/>build system<br/>[CMakeLists.txt]"]
  node_softmodems["Softmodem processes<br/>runtime mains<br/>[nr-softmodem.c]"]
  node_configuration["Configuration loading<br/>config boundary"]
  node_tasking["Task creation and ITTI<br/>concurrent messaging<br/>[create_tasks.c]"]
end

subgraph group_ran["RAN protocol stack"]
  node_phy["NR/LTE PHY procedures<br/>Layer 1"]
  node_coding["Channel coding<br/>PHY coding<br/>[nrLDPC_decoder.c]"]
  node_mac["MAC scheduling<br/>Layer 2 MAC<br/>[gNB_scheduler.c]"]
  node_bearers["RLC / PDCP / SDAP<br/>bearer plane<br/>[nr_pdcp_entity.c]"]
  node_rrc["RRC control<br/>radio control<br/>[rrc_gNB.c]"]
end

subgraph group_interfaces["Split and core interfaces"]
  node_ngap["NGAP / S1AP core access<br/>core control interface<br/>[ngap_gNB.c]"]
  node_f1["F1AP CU/DU split<br/>disaggregation interface<br/>[f1ap_cu_task.c]"]
  node_e1["E1AP CU split<br/>CU-CP/CU-UP interface<br/>[e1ap.c]"]
  node_nfapi["NFAPI / FAPI<br/>MAC-PHY split<br/>[nfapi.c]"]
end

subgraph group_radio["Radio and fronthaul"]
  node_radio_abstraction["Radio abstraction<br/>radio backend API<br/>[common_lib.h]"]
  node_sdr_sim["SDR and RF simulation<br/>radio backends<br/>[usrp_lib.cpp]"]
  node_oran["O-RAN 7.2 fronthaul<br/>fronthaul transport<br/>[oru_fh.c]"]
end

subgraph group_operations["Delivery and operations"]
  node_deployment["Containers and cluster deploy<br/>deployment assets"]
  node_ci["CI integration scenarios<br/>validation orchestration<br/>[main.py]"]
  node_diagnostics["Logging and web control<br/>observability<br/>[log.c]"]
end

node_build -->|"builds"| node_softmodems
node_softmodems -->|"loads"| node_configuration
node_softmodems -->|"bootstraps"| node_tasking
node_configuration -->|"configures"| node_tasking
node_tasking -->|"runs task"| node_phy
node_tasking -->|"runs task"| node_mac
node_tasking -->|"runs task"| node_rrc
node_mac -->|"scheduling and results"| node_phy
node_phy -->|"transport processing"| node_coding
node_bearers -->|"radio PDUs"| node_mac
node_rrc -->|"bearer control"| node_bearers
node_rrc -->|"core signaling"| node_ngap
node_rrc -.->|"CU/DU mode"| node_f1
node_bearers -.->|"CU-UP mode"| node_e1
node_mac -.->|"MAC-PHY split"| node_nfapi
node_phy -->|"IQ samples"| node_radio_abstraction
node_radio_abstraction -->|"selects backend"| node_sdr_sim
node_radio_abstraction -->|"fronthaul mode"| node_oran
node_deployment -->|"packages and deploys"| node_softmodems
node_ci -->|"runs scenarios"| node_deployment
node_ci -.->|"validates integration"| node_softmodems
node_softmodems -->|"emits diagnostics"| node_diagnostics

click node_build "https://github.com/openairinterface/openairinterface5g/blob/develop/CMakeLists.txt"
click node_softmodems "https://github.com/openairinterface/openairinterface5g/blob/develop/executables/nr-softmodem.c"
click node_configuration "https://github.com/openairinterface/openairinterface5g/blob/develop/common/config/config_load_configmodule.c"
click node_tasking "https://github.com/openairinterface/openairinterface5g/blob/develop/executables/create_tasks.c"
click node_phy "https://github.com/openairinterface/openairinterface5g/blob/develop/openair1/SCHED_NR/phy_procedures_nr_gNB.c"
click node_coding "https://github.com/openairinterface/openairinterface5g/blob/develop/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c"
click node_mac "https://github.com/openairinterface/openairinterface5g/blob/develop/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c"
click node_bearers "https://github.com/openairinterface/openairinterface5g/blob/develop/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c"
click node_rrc "https://github.com/openairinterface/openairinterface5g/blob/develop/openair2/RRC/NR/rrc_gNB.c"
click node_ngap "https://github.com/openairinterface/openairinterface5g/blob/develop/openair3/NGAP/ngap_gNB.c"
click node_f1 "https://github.com/openairinterface/openairinterface5g/blob/develop/openair2/F1AP/f1ap_cu_task.c"
click node_e1 "https://github.com/openairinterface/openairinterface5g/blob/develop/openair2/E1AP/e1ap.c"
click node_nfapi "https://github.com/openairinterface/openairinterface5g/blob/develop/nfapi/oai_integration/nfapi.c"
click node_radio_abstraction "https://github.com/openairinterface/openairinterface5g/blob/develop/radio/COMMON/common_lib.h"
click node_sdr_sim "https://github.com/openairinterface/openairinterface5g/blob/develop/radio/USRP/usrp_lib.cpp"
click node_oran "https://github.com/openairinterface/openairinterface5g/blob/develop/fronthaul/oru/oru_fh.c"
click node_deployment "https://github.com/openairinterface/openairinterface5g/blob/develop/docker/Dockerfile.gNB.ubuntu"
click node_ci "https://github.com/openairinterface/openairinterface5g/blob/develop/ci-scripts/main.py"
click node_diagnostics "https://github.com/openairinterface/openairinterface5g/blob/develop/common/utils/LOG/log.c"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_build,node_softmodems,node_configuration,node_tasking toneBlue
class node_phy,node_coding,node_mac,node_bearers,node_rrc toneAmber
class node_ngap,node_f1,node_e1,node_nfapi toneMint
class node_radio_abstraction,node_sdr_sim,node_oran toneRose
class node_deployment,node_ci,node_diagnostics toneIndigo
```

## Components

### Softmodem runtime

Role-specific processes and concurrent task bootstrap.

- [CMake role builds](https://github.com/openairinterface/openairinterface5g/blob/develop/CMakeLists.txt): build system · Builds the role-specific softmodem binaries. · `CMakeLists.txt`
- [Softmodem processes](https://github.com/openairinterface/openairinterface5g/blob/develop/executables/nr-softmodem.c): runtime mains · gNB, UE, eNB, LTE UE, RU/ORU, and CU-UP roles. · `executables/nr-softmodem.c`
- [Configuration loading](https://github.com/openairinterface/openairinterface5g/blob/develop/common/config/config_load_configmodule.c): config boundary · Loads CLI, libconfig, and YAML deployment settings. · `common/config/config_load_configmodule.c`
- [Task creation and ITTI](https://github.com/openairinterface/openairinterface5g/blob/develop/executables/create_tasks.c): concurrent messaging · Initializes protocol tasks and inter-task queues. · `executables/create_tasks.c`

### RAN protocol stack

Real-time PHY and in-process L2/L3 functions.

- [NR/LTE PHY procedures](https://github.com/openairinterface/openairinterface5g/blob/develop/openair1/SCHED_NR/phy_procedures_nr_gNB.c): Layer 1 · Per-slot gNB and UE radio processing. · `openair1/SCHED_NR/phy_procedures_nr_gNB.c`
- [Channel coding](https://github.com/openairinterface/openairinterface5g/blob/develop/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c): PHY coding · LDPC and Polar transport decoding/encoding. · `openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c`
- [MAC scheduling](https://github.com/openairinterface/openairinterface5g/blob/develop/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c): Layer 2 MAC · Schedules radio resources and exchanges PHY results. · `openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c`
- [RLC / PDCP / SDAP](https://github.com/openairinterface/openairinterface5g/blob/develop/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c): bearer plane · Handles retransmission, security, and QoS bearers. · `openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c`
- [RRC control](https://github.com/openairinterface/openairinterface5g/blob/develop/openair2/RRC/NR/rrc_gNB.c): radio control · Owns cell, UE context, and radio-bearer control. · `openair2/RRC/NR/rrc_gNB.c`

### Split and core interfaces

3GPP control and disaggregation boundaries.

- [NGAP / S1AP core access](https://github.com/openairinterface/openairinterface5g/blob/develop/openair3/NGAP/ngap_gNB.c): core control interface · ASN.1 and SCTP connectivity to 5GC or EPC. · `openair3/NGAP/ngap_gNB.c`
- [F1AP CU/DU split](https://github.com/openairinterface/openairinterface5g/blob/develop/openair2/F1AP/f1ap_cu_task.c): disaggregation interface · Redirects split RAN control and user interfaces. · `openair2/F1AP/f1ap_cu_task.c`
- [E1AP CU split](https://github.com/openairinterface/openairinterface5g/blob/develop/openair2/E1AP/e1ap.c): CU-CP/CU-UP interface · Separates CU control and user-plane functions. · `openair2/E1AP/e1ap.c`
- [NFAPI / FAPI](https://github.com/openairinterface/openairinterface5g/blob/develop/nfapi/oai_integration/nfapi.c): MAC-PHY split · Connects MAC/VNF to PHY/PNF and Aerial integrations. · `nfapi/oai_integration/nfapi.c`

### Radio and fronthaul

Runtime-selected sample and fronthaul transports.

- [Radio abstraction](https://github.com/openairinterface/openairinterface5g/blob/develop/radio/COMMON/common_lib.h): radio backend API · Selects SDR, Ethernet, simulation, or ZeroMQ transport. · `radio/COMMON/common_lib.h`
- [SDR and RF simulation](https://github.com/openairinterface/openairinterface5g/blob/develop/radio/USRP/usrp_lib.cpp): radio backends · USRP and RF simulator implementations. · `radio/USRP/usrp_lib.cpp`
- [O-RAN 7.2 fronthaul](https://github.com/openairinterface/openairinterface5g/blob/develop/fronthaul/oru/oru_fh.c): fronthaul transport · Handles ORU packetization, compression, and timing. · `fronthaul/oru/oru_fh.c`

### Delivery and operations

Deployment, validation, and diagnostics.

- [Containers and cluster deploy](https://github.com/openairinterface/openairinterface5g/blob/develop/docker/Dockerfile.gNB.ubuntu): deployment assets · Docker, Compose, OpenShift/Kubernetes, and Helm delivery. · `docker/Dockerfile.gNB.ubuntu`
- [CI integration scenarios](https://github.com/openairinterface/openairinterface5g/blob/develop/ci-scripts/main.py): validation orchestration · Builds and runs radio/core integration scenarios. · `ci-scripts/main.py`
- [Logging and web control](https://github.com/openairinterface/openairinterface5g/blob/develop/common/utils/LOG/log.c): observability · Runtime logging, tracing, and optional web control. · `common/utils/LOG/log.c`

## Connections

- CMake role builds → Softmodem processes: builds
- Softmodem processes → Configuration loading: loads
- Softmodem processes → Task creation and ITTI: bootstraps
- Configuration loading → Task creation and ITTI: configures
- Task creation and ITTI → NR/LTE PHY procedures: runs task
- Task creation and ITTI → MAC scheduling: runs task
- Task creation and ITTI → RRC control: runs task
- MAC scheduling → NR/LTE PHY procedures: scheduling and results
- NR/LTE PHY procedures → Channel coding: transport processing
- RLC / PDCP / SDAP → MAC scheduling: radio PDUs
- RRC control → RLC / PDCP / SDAP: bearer control
- RRC control → NGAP / S1AP core access: core signaling
- RRC control → F1AP CU/DU split: CU/DU mode
- RLC / PDCP / SDAP → E1AP CU split: CU-UP mode
- MAC scheduling → NFAPI / FAPI: MAC-PHY split
- NR/LTE PHY procedures → Radio abstraction: IQ samples
- Radio abstraction → SDR and RF simulation: selects backend
- Radio abstraction → O-RAN 7.2 fronthaul: fronthaul mode
- Containers and cluster deploy → Softmodem processes: packages and deploys
- CI integration scenarios → Containers and cluster deploy: runs scenarios
- CI integration scenarios → Softmodem processes: validates integration
- Softmodem processes → Logging and web control: emits diagnostics
