Shifting the QAM threshold by AMP, instead of shifting the data by AMP_SHIFT
This fixes the errors in bits introduced after LDPC decoding in case of mod_order = 6 and AMO_SHIFT = 9
This commit is contained in:
committed by
Thomas Schlichter
parent
63a2e61101
commit
176d873083
@@ -4,7 +4,6 @@
|
||||
#include "PHY/NR_TRANSPORT/nr_sch_dmrs.h"
|
||||
|
||||
|
||||
|
||||
void nr_ulsch_extract_rbs_single(int **rxdataF,
|
||||
int **rxdataF_ext,
|
||||
uint32_t rxdataF_ext_offset,
|
||||
@@ -35,9 +34,8 @@ void nr_ulsch_extract_rbs_single(int **rxdataF,
|
||||
|
||||
if ( (is_dmrs_symbol && ((re&1) != frame_parms->nushift)) || (is_dmrs_symbol == 0) ) { // [hna] (re&1) != frame_parms->nushift) assuming only dmrs type 1 and mapping type A
|
||||
|
||||
rxF_ext[rxF_ext_index] = (rxF[ ((start_re + re)*2) % (frame_parms->ofdm_symbol_size*2)] << 15) >> AMP_SHIFT;
|
||||
rxF_ext[rxF_ext_index + 1] = (rxF[(((start_re + re)*2) + 1) % (frame_parms->ofdm_symbol_size*2)] << 15) >> AMP_SHIFT;
|
||||
|
||||
rxF_ext[rxF_ext_index] = (rxF[ ((start_re + re)*2) % (frame_parms->ofdm_symbol_size*2)]);
|
||||
rxF_ext[rxF_ext_index + 1] = (rxF[(((start_re + re)*2) + 1) % (frame_parms->ofdm_symbol_size*2)]);
|
||||
rxF_ext_index = rxF_ext_index + 2;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,8 +116,8 @@ void nr_ulsch_16qam_llr(int32_t *rxdataF_comp,
|
||||
nb_re >>= 2; // length in quad words (4 REs)
|
||||
nb_re += (len_mod4 == 0 ? 0 : 1);
|
||||
|
||||
temp_channel = _mm_set1_epi16((int16_t)((QAM16_n1 * one_over_sqrt_2)>>15));
|
||||
|
||||
temp_channel = _mm_set1_epi16((QAM16_n1 * one_over_sqrt_2)>>(2*15-AMP_SHIFT));
|
||||
|
||||
for (i=0; i<nb_re; i++) {
|
||||
|
||||
#if defined(__x86_64__) || defined(__i386)
|
||||
@@ -222,9 +222,8 @@ void nr_ulsch_64qam_llr(int32_t *rxdataF_comp,
|
||||
nb_re = nb_re>>2; // length in quad words (4 REs)
|
||||
nb_re += ((len_mod4 == 0) ? 0 : 1);
|
||||
|
||||
|
||||
temp_channel[0] = _mm_set1_epi16((int16_t)((QAM64_n1 * one_over_sqrt_2)>>15));
|
||||
temp_channel[1] = _mm_set1_epi16((int16_t)((QAM64_n2 * one_over_sqrt_2)>>15));
|
||||
temp_channel[0] = _mm_set1_epi16((QAM64_n1 * one_over_sqrt_2)>>(2*15-AMP_SHIFT));
|
||||
temp_channel[1] = _mm_set1_epi16((QAM64_n2 * one_over_sqrt_2)>>(2*15-AMP_SHIFT));
|
||||
|
||||
for (i=0; i<nb_re; i++) {
|
||||
|
||||
@@ -362,4 +361,4 @@ void nr_ulsch_compute_llr(int32_t *rxdataF_comp,
|
||||
LOG_E(PHY,"nr_ulsch_compute_llr: invalid Qm value, symbol = %d, Qm = %d\n",symbol, mod_order);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -245,7 +245,7 @@
|
||||
#ifdef BIT8_TX
|
||||
#define AMP_SHIFT 7
|
||||
#else
|
||||
#define AMP_SHIFT 10 // [hna] was 9, but 9 doesn't work in case of mod_order = 6 (problem due to IFFT/FFT)
|
||||
#define AMP_SHIFT 9
|
||||
#endif
|
||||
|
||||
#define AMP ((1)<<AMP_SHIFT)
|
||||
|
||||
@@ -216,8 +216,6 @@ void nr_ulsch_procedures(PHY_VARS_gNB *gNB, gNB_L1_rxtx_proc_t *proc, int UE_id,
|
||||
//----------------------------------------------------------
|
||||
|
||||
nr_ulsch_unscrambling(gNB->pusch_vars[UE_id]->llr, gNB->ulsch[UE_id+1][0]->harq_processes[harq_pid]->G, 0, Nid_cell, rel15_ul->rnti);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
//----------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user