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. A new file nr_ulsch_decoding_slot.c implement for a full slot some steps that were performed in nr_ulsch_decoding.c and let 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 whether it decodes segments or slots. 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. shlibversion: _slot_segment
  • A one shot slot coding and encoding with the T2 board. shlibversion: _slot_t2
  • A decoder on FPGA using the XDMA driver. shlibversion: _xdma

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

Other noteworthy features:

  • The slot coding interface coexist with the segment coding interface.
    Selection of the interface is automatic at library loading.
  • Extensive unit tests based on PHY simulators and RFSIM were added under openair1/PHY/CODING/tests/.

Main caveates:

  • All previously existing coding solutions remain.
    Therefore some parts of codes are almost duplicated.
  • The only CPU based implementation of slot coding (shlibversion _slot_segment) 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).
  • The PHY simulators based unit test are very numerous and long.
    Though this is necessary for detecting some issues.
  • 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.

Merge request reports