Commit Graph
176 Commits
Author SHA1 Message Date
Romain Beurdouche 37bb58feb2 fix(nrLDPC_coding_interface): lidldpc_slot_segment becomes default libldpc 2024-12-16 08:40:54 +01:00
Robert Schmidt 16535f3de4 Reformat all polar code
Commands used:

    clang-format -i openair1/PHY/CODING/TESTBENCH/polartest.c
    clang-format -i openair1/PHY/CODING/nr_polar_init.c
    clang-format -i openair1/PHY/CODING/nrPolar_tools/*
2024-11-07 09:43:19 +01:00
Laurent THOMAS 3e019af4d9 remove the big LUT for decoder de-interleaver
no performance degradation

some reformatting
2024-11-07 09:29:21 +01:00
Laurent THOMAS d57ea715c0 Improve polar decoder/encoder
- Ensure packed struct through bitfield
- decoder tree buffer increase: i don't find evidence in the 3GPP
  standard of the max size of polar coded PDU.  even with this max size,
  the way this tree is built is not trivial.  so, it is hard to predict,
  i just put 8 system pages (32KB) that looks enough [1]
- a lot of reformatting

[1] https://arxiv.org/pdf/1804.04389
according to this paper, the largest polar code in 5G is in UL, so
likely the biggest problem will be in gNB, not the UE.  in DL, the max
output coded block is 512, in UL 1024.  probably the tree we discuss is
related to this size.

"frozen bits" means only bits we don't encode/decode because polar code
size is only by power of 2.
We see this in OAI code:  NR_POLAR_PUCCH_N_MAX is 10, so 2^10 is 1024,
that is the maximum size for 5G polar code length.  in the code, we
assert if N > 512: "N = %d, not done yet\n",
polarParams->N".  so, the today OAI code can't do PUCCH large blocks.

using current oai limitation of 2⁹ max code size, we can create up to
2^9+2⁸... nodes, so 1023 nodes in the tree.  the problem then is that
each node have variable size, depending on the 'level' (the power of 2
we are currently).  the algo provision large alpha and beta to be able
to store all lower levels in the tree (int leaf_sz = 1 << level)
therefore upper tree nodes are large (the top level for n=9 uses about
1.5KB) and the bottom nodes uses 64 bytes.  if all nodes are populated,
the size will be very large: 1.5KB + 2 * 800 + ....  but, we create
nodes in the tree only for the "information bits", so the payload, that
is limited to 128 bits (else we assert, the code is not "finished").
1.5KB * 128 is >> 8KB i allocated.  but, we can't create more than one
mode at top level, so there is maximum 1.5KB + 2 * 800, + 4 * 400 + 8 *
200 + 16 * 100 + remaining of 128-32 nodes of 64 bytes.  about 14KB.

i allocated 1024*sizeof(__m256i) bytes = 32KB that looks good.
2024-11-07 09:25:18 +01:00
Laurent THOMAS 31f770978c option q is to set cpu measurements but it is hardcoded in some places 2024-09-18 16:02:14 +02:00
Robert Schmidt 9f86e33ec2 Merge remote-tracking branch 'origin/t2-offload-mr4.1' into integration_2024_w27 2024-07-09 07:54:08 +02:00
Jaroslava Fiedlerova 6bec8779c6 Enhance T2 Offload for gNB and UE
- Reworked nrLDPC_decoder_offload.c to process all segments in a TB with a single call to LDPCdecoder() or LDPCencoder().
- Perform CRC checks on the T2.
- Modified nr_ulsch_decoding (gNB decoder) to:
  - Count processed segments.
  - Properly perform CRC checks.
- Created a constant NR_LDPC_MAX_NUM_CB to define the maximum number of codeblocks.
- Conditional library loading:
  - On gNB: Load ldpc_t2 library if offload is enabled using the --ldpc-offload-enable flag.
  - On UE: Load both ldpc_t2 and ldpc libraries since only encoder offload is supported.
- General cleanup of nrLDPC_decoder_offload.c for improved readability and maintainability.
- Modified the structure of LDPC encoder/decoder/offload parameters:
  - Introduced a structure for code block (CB) related parameters.
  - Removed parameter E from the encoder and offload parameter structures for clarity.
  - Replaced E with perCB->E_cb in the UE encoder code.
2024-06-27 14:40:41 +02:00
Romain Beurdouche 327b9a8b70 fix(phy_simulators): enable the use of option -O to pass a configuration file to configmodule in phy simulators 2024-06-25 10:38:09 +02:00
Romain Beurdouche b51a144d7d fix(phy simulators): fix cmdline configmodule for CODING phy simulators 2024-05-15 14:12:40 +02:00
Laurent THOMAS 18919576b7 rework PUCCH codec with c16_t type, rewrite large parts of functions to make readable code. Not fixed parts that are using SIMD. No change, the code is still same block by block (variable visibility narrowed, declaration can be shifted) 2024-01-04 10:21:15 +01:00
Laurent THOMAS 99ca87a1c1 Refactor LDPC API to make common API with various implementations 2023-11-28 09:37:37 +01:00
Laurent THOMAS f50d5f5a9b make multiple config instead of one implicit global 2023-11-10 10:23:11 +01:00
Raymond Knopp a7bc282302 First-level of support for new aarch64 machines
Testing on Neoverse N1 (Ampere 3GHz). Tested only on a subset of phy-simulators.

- Changes:
- use SIMDE consistently
- adaptations of LDPC decoder generator for ARMv8 performance
- SIMDe modifications of Intel CRC to allow for aarch64 build.
  optimizations for 128-bit to improve performance of LDPC encode/decode
  on aarch64 (Neoverse 1)
- added BG2 files for 128-bit ldpc encoder (aarch64)
- testing on Xeon
- testing on x86
- minor changes to build/run on x86
- change in crc.h after returning to aarch64
- removed some warning in ldpc decoder generator for x86_64
- char
- Delete irrelevant constants
- Correctly declare variables
- Define stdbool for all architectures
- Remove definition of _MM_SHUFFLE and use SIMDE_MM_SHUFFLE
- Remove commented code
- Fix CMakeLists.txt
- Include SIMDE avx2 functions in tools_defs.h
2023-09-13 17:19:20 +02:00
Robert Schmidt 01d1a47adf Remove commented code that uses getenv(): it might be confusing if reactivated 2023-06-28 07:16:00 +02:00
laurent 615324294b ldpc check based on crc 2023-06-12 10:24:57 +02:00
Laurent THOMAS 3645c96c09 remove generic thread pool abort 2023-06-12 10:24:37 +02:00
Vijay Chadachan 836469e849 CPPCHECK fixes for printf issues
Fix for following CPPCheck warnings
- invalidPrintfArgType
Rebased with latest develop branch w21.
Reverted modifications unrelated to printf issues.
2023-06-01 12:07:26 +02:00
Robert Schmidt 3b429c5399 Fix uninitialized variable warning 2023-04-20 13:44:05 +02:00
Robert Schmidt 852a6c4f28 Remove write-only variables 2023-04-14 13:52:12 +02:00
Robert Schmidt 6791974004 Remove unused OCG (OpenAir Config Generator) 2023-03-11 15:50:50 +01:00
francescomani 6d13f28bc0 physical simulators compilation warnings 2023-03-09 19:01:47 +01:00
Bruno Mongazon-Cazavet b5b0e59c35 fix errors in ldpctest and warning in rrc_eNB.c 2023-02-23 10:41:49 +01:00
Bruno Mongazon-Cazavet 8601b8c990 Fix IQ recorder/player for nrUE 2023-02-17 12:00:46 +01:00
laurent b74ba0fb92 cleaning only 2023-01-19 14:52:39 +01:00
Bruno Mongazon-Cazavet fe1dc24e28 Add Intrinsics usage by SIMDE 2022-09-28 18:21:19 +02:00
francescomani 539563f03e moving targets/ARCH to sdr/ 2022-09-26 11:17:44 +02:00
Sakthivel Velumani f305b486dd Merge branch 'develop' into ldpc-decoder-memory 2022-03-24 17:02:46 +05:30
Sakthivel Velumani 91426a08bd Merge branch 'develop' into ldpc-decoder-memory 2022-03-11 12:39:26 +05:30
francescomani 43ea92bf8f Merge remote-tracking branch 'origin/develop' into NR_MIMO_memory 2022-03-01 15:08:30 +01:00
Laurent THOMAS efcac39c76 simplify polar codec interface 2022-02-22 18:30:44 +01:00
Robert Schmidt cdea2899bc Remove memory leaks from ldpctest
except for:
- config module
2022-02-21 13:36:41 +01:00
Robert Schmidt 65c6456472 Resolve buffer overflows polartest 2022-02-21 13:36:41 +01:00
Laurent THOMAS 3e2c9af134 with polar structures delete and better cpu performance 2022-02-21 13:36:41 +01:00
Laurent THOMAS be314a9770 remove usage of undefined var in polar and memory leaks 2022-02-21 13:36:41 +01:00
Sakthivel Velumani f6e25c0e15 code cleanup ldpctest.c 2022-02-21 16:41:18 +05:30
Sakthivel Velumani 9b4a7526ad Fix incorrect merge 2022-02-21 15:26:00 +05:30
Sakthivel Velumani 5c9c2783a5 removed crc from ldpctest 2022-02-14 09:49:54 +05:30
Sakthivel Velumani ba891206e5 fixed stacksmashing error 2022-02-14 09:47:34 +05:30
francescomani 9e2185aa17 some more cleanup in memory allocation 2022-01-31 18:52:50 +01:00
Sakthivel Velumani aa4db6057b updated ldpctest 2022-01-21 17:34:34 +05:30
Sakthivel Velumani a8a5897a98 Cherry pick ldpc-decoder-crc-check
commit: 3cfefe3c6f7b2854a14d94fb7072ece2ff4c5c0a
2022-01-20 21:08:44 +05:30
Raymond Knopp fefa42c889 phy simulators remove measurments printf and check/allow log level config 2022-01-04 15:34:03 +01:00
frtabu 1cd4c87052 Add -v option in ldpctest to select ldpc shared lib version
going on with openCL ldpc implem
2021-10-27 15:00:31 +02:00
frtabu a6dd62a50f Enhance loader to allow library version selection for executables, as ldcptest which do not use the config module. 2021-10-27 14:42:12 +02:00
frtabu 41ba9a5afb Fix rebasing problems 2021-10-27 14:42:12 +02:00
Raymond Knopp d88ce5b9bf Merge remote-tracking branch 'origin/develop' into oairu 2021-04-27 11:58:31 +02:00
Raymond Knopp 0b59ce4faf Merge remote-tracking branch 'origin/develop' into oairu 2021-04-07 15:50:46 +02:00
Laurent OpenCells c0ef3e6f88 fix gcc reported issues 2021-04-03 23:37:58 +02:00
Thomas Schlichter 62a1cf49ab NR: initialize t_nrLDPC_time_stats structure 2021-03-18 13:25:18 +01:00
Raymond Knopp 579a573b90 unitary simulations build 2021-01-30 22:34:16 +01:00