Skip to content

New LDPC coding library interface for decoding and encoding complete slots in one call to the library

beurdouc requested to merge ldpc_decoding_module_interface_rework into develop

Previous attempts to integrate LDPC decoding relying on offloading show the limitation of the original code segment coding interface for the library implementing LDPC coding. In order to perform the offload and therefore the decoding in an optimal fashion, it is relevant to provide the implementation with the broader amount of data possible per call, which is a slot.
A previous MR related to T2 offload managed to offer an interface for decoding transport blocks by modifying only nr_ulsch_decoding.c. But this may not be sufficient for performing an efficient decoding in any situation. Slots could be shared between multiple transport blocks in case multiple UEs are connected to the RAN, which makes the transport block size shrink and therefore degrades the efficiency of the offloading.

This MR offers a broader interface with a gNB decoding entry point in phy_procedures_nr_gNB.c. The file nr_ulsch_decoding.c now lets the decoding library implement deinterleaving, rate-unmatching and decoding for the slot. In gNB encoding and UE decoding and encoding as well, tasks are partitioned in a similar fashion.

As it allows to feed the implementation with the broadest amount of data possible, it allows to fit any coding solution in a library. This will avoid further modification to OAI source code and addition of options to select an implementation when integrating new decoding solutions. An implementation of this interface will therefore be offered for every existing decoding solution in OAI and solutions added in the future will be provided as independent module code without any modification to the core of OAI code.
The way to choose the decoding solution and to configure it was also unified using configmodule. The library can be chosen through the option --loader.ldpc.shlibversion. The slot coding solutions shipped with this MR can be configured through configmodule (e.g., T2 address and isolated cores).

This MR includes three coding implementations:

  • A wrapper around segment decoding libraries for test purpose: libldpc.so
  • A one shot slot coding and encoding with the T2 board: libldpc_t2.so
  • A decoder on FPGA using the XDMA driver: libldpc_xdma.so

Improvements brought by this MR:

  • Easy integration of a wider variety of LDPC coding solution at gNB and UE
  • Easy selection of the LDPC coding solution
    (option --ldpc-offload-enable is kept for now but it can be ultimately removed)
  • T2:
    • More efficient when many UEs are connected
    • Decoding and encoding in nr-uesoftmodem

Here are for example the LDPC decoding time that we measured with T2 with segment wide, transport block wide and slot wide interfaces in 100MHz SISO with 1 to 8 UEs:

number of UEs segment transport block slot
1 655.72μs 285.23μs 284.75μs
2 825.73μs 504.85μs 462.69μs
3 908.97μs 658.90μs 564.82μs
4 1062.03μs 818.16μs 695.49μs
5 1178.90μs 948.10μs 777.32μs
6 1289.43μs 1085.88μs 904.56μs
7 1360.31μs 1221.70μs 1001.67μs
8 1472.36μs 1360.34μs 1062.92μs

Same thing for encoding:

number of UEs segment transport block slot
1 291.70μs 130.86μs 138.90μs
2 289.56μs 139.96μs 138.60μs
3 295.20μs 150.03μs 139.77μs
4 303.08μs 160.12μs 141.07μs
5 308.60μs 171.00μs 141.44μs
6 314.58μs 182.34μs 140.95μs
7 320.46μs 193.97μs 144.21μs
8 328.56μs 205.44μs 144.45μs

Other noteworthy features:

  • The slot coding interface coexist with the segment coding interface.
    Library libldpc.so acts as an adaptation layer between the slot interface and the segment interface.
  • Extensive unit tests based on PHY simulators and RFSIM were added under openair1/PHY/CODING/tests/.

Main caveates: Therefore some parts of codes are almost duplicated.

  • The only CPU based implementation of slot coding (libldpc.so) relies on a segment coding library.
  • Some coding solutions existing as segment coding library are not yet available as a slot coding library (e.g., CUDA).
  • T2 enabled UE was not tested over the air.

More information is available in the updated documentation: openair1/PHY/CODING/DOC/LDPCImplementation.md, doc/LDPC_T2_OFFLOAD_SETUP.md and doc/LDPC_XDMA_OFFLOAD_SETUP.md.

Edited by beurdouc

Merge request reports

Loading