Bug related to nr pucch format 2 generator
This bug has been discussed with @hongzhi through mailling list, here: https://lists.eurecom.fr/sympa/arc/openair5g-devel/2019-01/msg00005.html
Bug summary
Location: Function nr_generate_pucch2 in openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c.
Return wrong length of m-sequence
-
In sec 6.4.1.3.2, 38.211, for each OFDM symbol, the DMRS for PUCCH format 2 is generated from an m-sequence, with the length of : 2PRBs12/3 = number of PRBs42 (in which, 2 is to include real and image part of a complex number, 4 is the number of DMRS symbols in 1 PRB).
-
In the function nr_generate_pucch2, m-sequence is generated by calling function lte_gold_generic(), which returns an uint32_t variable. The returned sequence just corresponds to 16 symbols for DMRS, and covers 4 PRBs per OFDM symbols.
-
So, if the number of PRBs for PUCCH format 2 is more than 4 (the number of PUCCH symbols per OFDM symbol >16), the length of the generated m-sequence is not enough. This leads to incorrect generated DMRS.
Reset m-sequence after each symbol
- In addition, as I understand, the variable named m (local variable of nr_generate_pucch2) is used as DMRS symbol index in an OFDM symbol. Therefore, it must be reset after each OFDM symbol.
Resolve
I have created a branch "nr_fix_pucch_dmrs" and merge request !510 (merged) to resolve this issue.
Regards, Son