Commit 9586db6b authored by Romain Beurdouche's avatar Romain Beurdouche

fix(nrLDPC_decoder): Rename E in Kprime in segment decoder parameters to...

fix(nrLDPC_decoder): Rename E in Kprime in segment decoder parameters to comply with standard naming
parent f9bff3d6
...@@ -323,7 +323,7 @@ one_measurement_t test_ldpc(short max_iterations, ...@@ -323,7 +323,7 @@ one_measurement_t test_ldpc(short max_iterations,
decParams[j].R = code_rate_vec[R_ind]; // 13; decParams[j].R = code_rate_vec[R_ind]; // 13;
decParams[j].numMaxIter = max_iterations; decParams[j].numMaxIter = max_iterations;
decParams[j].outMode = nrLDPC_outMode_BIT; decParams[j].outMode = nrLDPC_outMode_BIT;
decParams[j].E = block_length; decParams[j].Kprime = block_length;
ldpc_toCompare.LDPCinit(); ldpc_toCompare.LDPCinit();
} }
for (int j = 0; j < n_segments; j++) { for (int j = 0; j < n_segments; j++) {
......
...@@ -193,7 +193,7 @@ static void nr_process_decode_segment(void *arg) ...@@ -193,7 +193,7 @@ static void nr_process_decode_segment(void *arg)
memset(rdata->c, 0, Kr_bytes); memset(rdata->c, 0, Kr_bytes);
p_decoderParms->crc_type = crcType(rdata->C, A); p_decoderParms->crc_type = crcType(rdata->C, A);
p_decoderParms->E = lenWithCrc(rdata->C, A); p_decoderParms->Kprime = lenWithCrc(rdata->C, A);
// set first 2*Z_c bits to zeros // set first 2*Z_c bits to zeros
......
...@@ -855,7 +855,7 @@ static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr, ...@@ -855,7 +855,7 @@ static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr,
nrLDPC_llr2bitPacked(p_out, p_llrOut, numLLR); nrLDPC_llr2bitPacked(p_out, p_llrOut, numLLR);
else // if (outMode == nrLDPC_outMode_BITINT8) else // if (outMode == nrLDPC_outMode_BITINT8)
nrLDPC_llr2bit(p_out, p_llrOut, numLLR); nrLDPC_llr2bit(p_out, p_llrOut, numLLR);
if (p_decParams->check_crc((uint8_t*)p_out, p_decParams->E, p_decParams->crc_type)) { if (p_decParams->check_crc((uint8_t*)p_out, p_decParams->Kprime, p_decParams->crc_type)) {
LOG_D(PHY, "Segment CRC OK, exiting LDPC decoder\n"); LOG_D(PHY, "Segment CRC OK, exiting LDPC decoder\n");
break; break;
} }
......
...@@ -86,7 +86,7 @@ typedef struct nrLDPC_dec_params { ...@@ -86,7 +86,7 @@ typedef struct nrLDPC_dec_params {
uint16_t Z; /**< Lifting size */ uint16_t Z; /**< Lifting size */
uint8_t R; /**< Decoding rate: Format 15,13,... for code rates 1/5, 1/3,... */ uint8_t R; /**< Decoding rate: Format 15,13,... for code rates 1/5, 1/3,... */
uint8_t numMaxIter; /**< Maximum number of iterations */ uint8_t numMaxIter; /**< Maximum number of iterations */
int E; int Kprime; /**< Size of the payload bits and CRC bits in the code block */
e_nrLDPC_outMode outMode; /**< Output format */ e_nrLDPC_outMode outMode; /**< Output format */
int crc_type; int crc_type;
int (*check_crc)(uint8_t* decoded_bytes, uint32_t n, uint8_t crc_type); int (*check_crc)(uint8_t* decoded_bytes, uint32_t n, uint8_t crc_type);
......
...@@ -518,7 +518,7 @@ extern "C" int32_t LDPCdecoder(t_nrLDPC_dec_params *p_decParams, ...@@ -518,7 +518,7 @@ extern "C" int32_t LDPCdecoder(t_nrLDPC_dec_params *p_decParams,
init_LLR_DMA(p_decParams, p_llr, p_out); init_LLR_DMA(p_decParams, p_llr, p_out);
uint16_t Zc = p_decParams->Z; uint16_t Zc = p_decParams->Z;
uint8_t BG = p_decParams->BG; uint8_t BG = p_decParams->BG;
int block_length = p_decParams->E; int block_length = p_decParams->Kprime;
uint8_t row, col; uint8_t row, col;
if (BG == 1) { if (BG == 1) {
row = 46; row = 46;
......
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