Skip to content

feat(LDPC Rate Matching): Fix Bit Selection starting position

beurdouc requested to merge beurdouc/ral:fix_ldpc_rate_matching_k0 into main

Description

Fixes issue #6 (closed)

In the rate matching function, the starting position of bit selection k0 is calculated in the way instructed by 3GPP TS 38.212 and then used to copy the selected part of the encoder output. But, this k0 is the starting position of bit selection in the encoder output including the filler bits. While bits are selected from a buffer in_bits where filler bits were previously removed. The result is that if k0 falls within or after the filler bits then bits selection starts at the wrong position which introduces an offset in the bit selection output with regard to the expected output.

This commit fixes this behavior in the library at src/UpperPHY/LDPC/arm_ldpc_rate_matching.cpp but also in the reference implementation at test/UpperPHY/LDPC/RateMatching/main.cpp. The fix is to test where k0 falls relatively to the filler bits and reduce it accordingly before proceeding with bit selection.

Checklist

Merge request reports

Loading