46 Commits
Author SHA1 Message Date
Raymond Knopp 0e09c7c347 Add changes for avx512/aarch64 ldpc encoder optimizations
newly-generated files for innermost part of the parity bit
generation which, for AVX512, uses the mm512_permutex2var_epi8
instruction and for 128-bit (aarch64) the mm_alignr_epi8 (vextq_s8) in
the computation corresponding to each non-zero bit of the H matrix.

It is generated with ldpctest -n0 -g1. the changes for this are in a
future MR.  I did these changes to compare with the GPU version
(ldpc_encoder_cuda), so that the CPU version is as fast as possible. The
generator will come when we merge the GPU encoder/decoder which also has
a generator for the CUDA version. it was difficult to extract the
changes in ldpctest/ldpc_encoder.c so I just took the generated file.

This allows for removing a very large memcpy and reduces the memory
demand for the parity matrix computation. For the moment this is limited
to largest case in BG1, namely Zc=384. This is the only format used when
the number of segments after codeblock segmentation is large (>8).  This
improves the timing required for ldpc parity bits generation by more
than a factor 2 with AVX512. This significantly reduces the total time
to generate the DLSCH/PDSCH
2025-09-02 08:55:08 +02:00
Romain BeurdoucheandLaurent Thomas 06c81030dc fix(nrLDPC_coding_segment_encoder): address review
1. nrLDPC_coding_segment_encoding: Clarifying encoder parameters
   The way the encoder implementation params was used could be made clearer:
   * `macro_num` was always used in order to calculate segment indexes.
     It is clearer to pass directly the first segment index.
   * The initialisation of a common implementation parameters structure can be made clearer.

2. nrLDPC_coding_segment_encoder: Remove multi segment dimension in encoder output
   The output of `LDPCencoder` was a 2D unsigned char array.
   But all the segments were actually packed in the first segment, 8 bits of different segments per byte of the first segment.
   So the first dimension was useless. This commit removes this dimension.

3. nrLDPC_coding_segment_encoder: Rename `nrLDPC_prepare_TB_encoding` into `nrLDPC_launch_TB_encoding`

4. nrLDPC_coding_segment_encoder: Remove the useless second rate matching for E2, one rate matching with max(E, E2) does the job.

5. nr_interleaving_ldpc: cleanup
   Rewrite code to use different SIMD sizes in a linear fashion.
   This means cascading preprocessor directives are used to start from a high SIMD size an decrease it progressively.

6. ldpc_encoder_optim8segmulti: linear usage of SIMD
   Use cascading preprocessor directives to include different SIMD sizes and types depending on which are available on the system.
   The different loops use a common index that is progressively incremented.
   Also add AVX512 version of bits distribution from 8 segments into one byte.

Co-authored-by: Laurent Thomas <laurent.thomas@open-cells.com>
2025-05-13 14:08:33 +00:00
Raymond Knopp bbbbda70f5 feat(nrLDPC_coding_segment_encoder): Dense Rate Matching and Dense and Concatenated Output
1. 3GPP Rate-matching/interleaving on 8-segment blocks, deinterleaving at output of multi-segment processing.

2. Bit-packing done in nrLDPC_coding_segment_encoder.c now instead of nr_scrambling.
   Interestingly, it improves performance significantly too.
   Tested for AVX512 only for now.
2025-05-13 14:08:33 +00:00
Raymond Knopp a4c950774b feat(ldpc_encoder_optim8segmulti): Improvements for Arm Neoverse
Use 128 bit SIMD in packing and unpacking segment bits in bytes
Adapt compiler options for Neoverse.
2025-05-13 14:08:33 +00:00
Raymond Knopp 8964fdb6a2 AVX512 modifications for LDPC encoding: interleaving, ZC384 BG1, output formatting for encoder, segmentation (memcpy) 2025-05-13 14:08:33 +00:00
Romain Beurdouche d6ee29a193 feat(nrLDPC_encoder): remove _optim and _optim8seg
It is pointless to keep updating ldpc_optim and ldpc_optim8seg.
So we remove them.
2025-05-13 07:32:36 +00:00
Robert Schmidt 5e72bd70bc nfapi: Fixup BG (un)packing and error message 2024-11-29 09:12:55 +01:00
francescomani c93dcc0484 cleanup of encode_parity_check_part_optim including asserting for case not handled 2024-08-28 17:40:26 +02:00
Bartosz Podrygajlo 732555ddc3 Run optimized parity check in ldpc encoder only on supported Zc values
Optimized ldpc encoder was run for Zc values that are not supported (Zc == 64). This
commit fixes the fallback condition to Zc >= 72 for BG 2
2024-08-28 17:40:19 +02:00
mir fc8d0c59c6 Scan build: Result of operation is garbage or undefined 2024-03-07 11:00:57 +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 bba9aac079 fix most of doxygen warnings and errors 2023-10-26 16:47:19 +02: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
Laurent THOMAS a773d024e8 no sanitize on generated ldpc code 2023-06-19 09:48:17 +02:00
francescomani 5a153c502f adding static const in Gen_shift_value.h to avoid asan odr-violation 2023-04-14 13:52:16 +02:00
Bruno Mongazon-Cazavet fe1dc24e28 Add Intrinsics usage by SIMDE 2022-09-28 18:21:19 +02:00
Robert Schmidt 8419166fc4 Move time_meas.{c,h} to common/utils/ 2022-02-25 17:27:02 +01:00
Robert Schmidt 76d609f7fa Delete unused code 2022-02-25 17:27:02 +01:00
Raphael Defosseux 38cb4554d0 fix(ci): proper value of RF 5G Sim conf file; remove useless define
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2021-12-20 10:09:14 +01:00
Raymond Knopp 07d735f93c step-by-step merging from tx-proc-optim-lts. Everything except NR_TRANSPORT merged. Some issues with 64QAM modulation 2021-11-11 08:28:10 +01:00
Raymond Knopp 64e610361f merge from Laurent's TX-optimization-lts (cherry-picked dlsch_encoding component) 2021-10-31 22:43:20 +01:00
Raymond Knopp 1ddd729044 bring back recent changes in ldpc encoder after merge with dynamic library implementation 2020-03-16 09:32:50 +01:00
Raymond Knopp 7491e23dbd Merge remote-tracking branch 'origin/develop' into NR_RRCConfiguration 2020-03-15 18:13:11 +01:00
frtabu 3b3d232214 move ldpc coder/decoder into a shared lib dymically loaded. Also fix a record player bug 2020-03-11 17:41:38 +01:00
Raymond Knopp b232be94ed dlsim/ulsim updated to generate configuration without need for external pre-generated file. 2020-02-22 15:01:55 +01:00
frtabu 64e4826c81 add softmodem-common.c and common error handler 2020-02-04 17:39:36 +01:00
Raymond Knopp 5490d3e75d some cppcheck fixes and also compilation warnings removal 2019-12-19 09:43:45 +01:00
Francesco Mani e2b77c3edb removing printf 2019-11-15 09:27:02 +01:00
Hongzhi Wang feb461bafb add missing fix for bg2 2019-11-14 16:25:23 +01:00
Hongzhi Wang 17f5a80387 ldpc encoder bg2 bug fix 2019-11-14 15:16:21 +01:00
Florian Kaltenberger 748a2397d6 fixing ldpctest and some encoding for >8 segments 2019-10-25 13:38:21 +02:00
Francesco Mani f2c5ebd4cd Zc fix in LDPC encoder 2019-10-22 15:26:44 +02:00
Florian Kaltenberger f8d969d506 Merge remote-tracking branch 'origin/ldpc-endian' into integration_develop-nr_2019w42
Conflicts:
	openair1/PHY/CODING/TESTBENCH/ldpctest.c
2019-10-14 13:43:33 +02:00
Raymond Knopp 2109c768df modified endian on unoptimized encoder 2019-10-10 18:44:32 +02:00
Raymond Knopp a8bf0b2373 andmask for both optimized encoder routines. Minor changes in ldpctest 2019-10-10 18:39:41 +02:00
Raymond Knopp 2daf95a027 ldpc encoder bit endian (MSB->LSB) for 3GPP compliance 2019-10-09 21:44:08 +02:00
yilmazt 84af6103f8 another batch of cppcheck error corrections 2019-09-24 11:59:17 +02:00
Wang Tsu-Han bc4b6cf2cf adding timing measurement for RT execution 2019-06-26 15:48:05 +02:00
yilmazt b44e15fd06 More warning removals but nr_dlschsim still not working 2019-01-17 21:06:15 +01:00
Raymond Knopp cb9321c65d Merge remote-tracking branch 'origin/nr_pdsch' into nr-polar-encoder-optimizations
Conflicts:
	cmake_targets/CMakeLists.txt
	openair1/PHY/CODING/TESTBENCH/ldpctest.c
	openair1/PHY/CODING/nrLDPC_encoder/ldpc_encoder2.c
	openair1/PHY/CODING/nrLDPC_encoder/ldpc_generate_coefficient.c
	openair1/PHY/CODING/nr_compute_tbs.c
	openair1/PHY/CODING/nr_segmentation.c
	openair1/PHY/MODULATION/slot_fep_nr.c
	openair1/PHY/NR_REFSIG/nr_dmrs_rx.c
	openair1/PHY/NR_TRANSPORT/nr_dci_tools.c
	openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
	openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
	openair1/SCHED_NR/fapi_nr_l1.c
	openair1/SCHED_NR/nr_ru_procedures.c
	openair1/SCHED_NR/phy_procedures_nr_common.c
	openair1/SCHED_NR/phy_procedures_nr_gNB.c
	openair1/SCHED_NR_UE/defs.h
	openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
	openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
	openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
	openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
	targets/RT/USER/nr-gnb.c
	targets/RT/USER/nr-ru.c
	targets/RT/USER/nr-ue.c
2019-01-04 16:46:50 +01:00
yilmazt 1da3a24c41 Warning removals. 2018-10-30 11:25:50 +01:00
Florian Kaltenberger 262177f4f3 patch 2 from Milan Zivkovic (Nokia Bell Labs) 2018-09-14 00:58:05 -07:00
Florian Kaltenberger 6e29ff0872 patch from Milan Zivkovic (Nokia Bell Labs) 2018-09-07 06:48:09 -07:00
Florian Kaltenberger 714cdc091f adding llr clipping + other bugfixes 2018-08-24 12:50:12 -07:00
Florian Kaltenberger 90a468facb changing the prototypes of the ldpc encoder functions to harmonize more with standard
adding ldpctest encoder, decoder and ldpctest to CMakeLists.txt
activating the TCL LDPC decoder in the LDPC testbench but only works for largest blocksize 8448 for now.
2018-08-24 02:38:25 -07:00
Florian Kaltenberger b61e800764 adding LDPC encoder and decoder (from mwc18 branch) 2018-04-09 13:10:17 -07:00