Merge remote-tracking branch 'origin/t2-offload-mr2' into integration_2023_w51
This commit is contained in:
@@ -184,6 +184,7 @@ Some libraries have further dependencies and might not build on every system:
|
||||
- `nrqtscope`: Qt5
|
||||
- `ldpc_cuda`: CUDA
|
||||
- `websrv`: npm and others
|
||||
- `ldpc_t2`: DPDK with patch
|
||||
|
||||
# Running `cmake` directly
|
||||
|
||||
|
||||
@@ -21,19 +21,21 @@ This documentation aims to provide a tutorial for AMD Xilinx T2 Telco card integ
|
||||
# Requirements
|
||||
|
||||
- bitstream image and PMD driver for the T2 card provided by AccelerComm
|
||||
- DPDK 20.11.7 with patch from Accelercomm (also tested with DPDK 20.11.3)
|
||||
- tested on RHEL7.9, RHEL9.2, Ubuntu 20.04, Ubuntu 22.04
|
||||
- DPDK 20.11.9 with patch from Accelercomm: version ACCL_BBDEV_DPDK20.11.3_ldpc_3.1.918.patch
|
||||
- tested on RHEL7.9, RHEL9.2, Ubuntu 22.04
|
||||
|
||||
# DPDK setup
|
||||
## DPDK installation
|
||||
*Note: Following instructions are valid for ACCL_BBDEV_DPDK20.11.3_ldpc_3.1.918.patch version, which is compatible with DPDK 20.11.9. Installation steps, which should be followed for older versions of the patch file (for example ACL_BBDEV_DPDK20.11.3_BL_1006_build_1105_dev_branch_MCT_optimisations_1106_physical_std.patch) are present in older version of this documentation, under the tag 2023.w48.*
|
||||
|
||||
```
|
||||
# Get DPDK source code
|
||||
git clone https://github.com/DPDK/dpdk-stable.git ~/dpdk-stable
|
||||
cd ~/dpdk-stable
|
||||
git checkout v20.11.7
|
||||
git apply ~/ACL_BBDEV_DPDK20.11.3_xxx.patch
|
||||
git checkout v20.11.9
|
||||
git apply ~/ACL_BBDEV_DPDK20.11.3_ldpc_3.1.918.patch
|
||||
```
|
||||
Replace `~/ACL_BBDEV_DPDK20.11.3_xxx.patch` by patch file provided by
|
||||
Replace `~/ACL_BBDEV_DPDK20.11.3_ldpc_3.1.918.patch` by patch file provided by
|
||||
Accelercomm.
|
||||
```
|
||||
cd ~/dpdk-stable
|
||||
@@ -47,16 +49,15 @@ sudo ldconfig
|
||||
## DPDK configuration
|
||||
- load required kernel module
|
||||
```
|
||||
sudo modprobe igb_uio
|
||||
sudo insmod ~/dpdk-stable/kernel/linux/igb_uio/igb_uio.ko
|
||||
sudo modprobe vfio-pci
|
||||
```
|
||||
- check presence of the card and its PCI addres on the host machine
|
||||
```
|
||||
lspci | grep "Xilinx"
|
||||
```
|
||||
- bind the card with igb_uio driver
|
||||
- bind the card with vfio-pci driver
|
||||
```
|
||||
sudo python3 ~/dpdk-stable/usertools/dpdk-devbind.py -b igb_uio 41:00.0
|
||||
sudo python3 ~/dpdk-stable/usertools/dpdk-devbind.py --bind=vfio-pci 41:00.0
|
||||
```
|
||||
Replace PCI address of the card *41:00.0* by address detected by *lspci | grep "Xilinx"* command
|
||||
- hugepages setup (10 x 1GB hugepages)
|
||||
@@ -68,12 +69,12 @@ sudo python3 ~/dpdk-stable/usertools/dpdk-hugepages.py -p 1G --setup 10G`
|
||||
the host machine*
|
||||
|
||||
# Modifications in the OAI code
|
||||
## PMD path specification
|
||||
Path to the PMD for operating the card is specified in `CMakeLists.txt` file in
|
||||
## DPDK lib and PMD path specification
|
||||
Path to the DPDK lib and Accelercomm PMD for operating the card is specified in the `CMakeLists.txt` file, in
|
||||
*LDPC OFFLOAD library* section. Modify following line based on the location of
|
||||
the PMD on your system. By deafult, path to the PMD is set to `/opt/dpdk-t2/lib/x86_64-linux-gnu/`.
|
||||
`libdpdk.pc` file associated with the target DPDK library on your system. By default, the path is set to `/usr/local/lib/x86_64-linux-gnu/pkgconfig`.
|
||||
```
|
||||
find_library(PMD_T2 NAMES rte_baseband_accl_ldpc HINTS "/opt/dpdk-t2/lib/x86_64-linux-gnu/")
|
||||
set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/lib/x86_64-linux-gnu/pkgconfig")
|
||||
```
|
||||
|
||||
## T2 card DPDK initialization
|
||||
@@ -106,7 +107,7 @@ cd ~/openairinterface5g/cmake_targets
|
||||
cd ~/openairinterface5g
|
||||
source oaienv
|
||||
cd cmake_targets
|
||||
./build_oai -w USRP --ninja --gNB -P -C --build-lib "ldpc_t2"
|
||||
./build_oai -w USRP --ninja --gNB -P --build-lib "ldpc_t2" -C
|
||||
```
|
||||
Shared object file *libldpc_t2.so* is created during the compilation. This object is conditionally compiled. Selection of the library to compile is done using *--build-lib ldpc_t2*.
|
||||
|
||||
@@ -131,14 +132,14 @@ sudo ./nr_dlsim -n300 -s30 -R 106 -e 27 -c
|
||||
```
|
||||
|
||||
# OTA test
|
||||
Offload of the channel encoding and decoding to the AMD Xilinx T2 card is enabled by *--ldpc-offload-enable 1* option.
|
||||
Offload of the channel encoding and decoding to the AMD Xilinx T2 card is enabled by *--ldpc-offload-enable* option.
|
||||
|
||||
## Run OAI gNB with USRP B210
|
||||
```
|
||||
cd ~/openairinterface5g
|
||||
source oaienv
|
||||
cd cmake_targets/ran_build/build
|
||||
sudo ./nr-softmodem --sa -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf --ldpc-offload-enable 1
|
||||
sudo ./nr-softmodem --sa -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf --ldpc-offload-enable
|
||||
```
|
||||
|
||||
# Limitations
|
||||
|
||||
Reference in New Issue
Block a user