Commit bde12e9c authored by Raymond Knopp's avatar Raymond Knopp

new luts for LDPC decoder to reduce decoding latency.

parent bc01744e
......@@ -170,6 +170,7 @@ int test_ldpc(short No_iteration,
*errors_bit_uncoded=0;
*crc_misses=0;
// generate input block
for(j=0;j<MAX_NUM_DLSCH_SEGMENTS;j++) {
test_input[j]=(unsigned char *)malloc16(sizeof(unsigned char) * block_length/8);
......@@ -663,6 +664,8 @@ int main(int argc, char *argv[])
fprintf(fd,"SNR BLER BER UNCODED_BER ENCODER_MEAN ENCODER_STD ENCODER_MAX DECODER_TIME_MEAN DECODER_TIME_STD DECODER_TIME_MAX DECODER_ITER_MEAN DECODER_ITER_STD DECODER_ITER_MAX\n");
nrLDPC_prep();
for (SNR=SNR0;SNR<SNR0+20.0;SNR+=SNR_step)
{
//reset_meas(&time_optim);
......
......@@ -87,23 +87,29 @@ static inline void nrLDPC_cnProc_BG2(t_nrLDPC_lut* p_lut, t_nrLDPC_procBuf* p_pr
// Set of results pointer to correct BN address
p_cnProcBufResBit = p_cnProcBufRes + (j*bitOffsetInGroup);
__m256i *pj0 = &p_cnProcBuf[lut_idxCnProcG3[j][0]];
__m256i *pj1 = &p_cnProcBuf[lut_idxCnProcG3[j][1]];
// Loop over CNs
for (i=0; i<M; i++)
{
// Abs and sign of 32 CNs (first BN)
ymm0 = p_cnProcBuf[lut_idxCnProcG3[j][0] + i];
// ymm0 = p_cnProcBuf[lut_idxCnProcG3[j][0] + i];
ymm0 = pj0[i];
sgn = _mm256_sign_epi8(*p_ones, ymm0);
min = _mm256_abs_epi8(ymm0);
// 32 CNs of second BN
ymm0 = p_cnProcBuf[lut_idxCnProcG3[j][1] + i];
// ymm0 = p_cnProcBuf[lut_idxCnProcG3[j][1] + i];
ymm0 = pj1[i];
min = _mm256_min_epu8(min, _mm256_abs_epi8(ymm0));
sgn = _mm256_sign_epi8(sgn, ymm0);
// Store result
min = _mm256_min_epu8(min, *p_maxLLR); // 128 in epi8 is -127
*p_cnProcBufResBit = _mm256_sign_epi8(min, sgn);
p_cnProcBufResBit++;
//*p_cnProcBufResBit = _mm256_sign_epi8(min, sgn);
//p_cnProcBufResBit++;
p_cnProcBufResBit[i]=_mm256_sign_epi8(min, sgn);
}
}
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -48,7 +48,9 @@ typedef struct nrLDPC_lut {
const uint32_t* llr2CnProcBuf; /**< LUT for input LLRs to CN processing buffer */
const uint8_t* numEdgesPerBn; /**< LUT with number of edges per BN */
const uint32_t* cn2bnProcBuf; /**< LUT for transferring CN processing results to BN processing buffer */
const uint16_t* llr2llrProcBuf; /**< LUT for transferring input LLRs to LLR processing buffer */
const uint32_t* cn2bnProcBuf2; /**< LUT for transferring CN processing results to BN processing buffer */
uint32_t cn2bnProcBuf2_size;
const uint16_t* llr2llrProcBuf; /**< LUT for transferring input LLRs to LLR processing buffer */
} t_nrLDPC_lut;
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment