fix(nrLDPC_coding_t2): HARQ combined offset
The offset provided for each code block in the HARQ combined input and output buffer shall not be above 512. A modulus was performed on the offset of the TB in the buffer to avoid this situation. But the offset of the code block was added afterward so that the total offset was sometimes going above 512. This commit performs the modulus after adding the code block offset.
This commit is contained in:
@@ -559,8 +559,18 @@ set_ldpc_dec_op(struct rte_bbdev_dec_op **ops,
|
||||
ops[j]->ldpc_dec.op_flags |= RTE_BBDEV_LDPC_CRC_TYPE_24B_CHECK;
|
||||
}
|
||||
ops[j]->ldpc_dec.code_block_mode = 1;
|
||||
ops[j]->ldpc_dec.harq_combined_input.offset = (((nrLDPC_slot_decoding_parameters->TBs[h].harq_unique_pid * NR_LDPC_MAX_NUM_CB) % HARQ_CODEBLOCK_ID_MAX) + i) * LDPC_MAX_CB_SIZE;
|
||||
ops[j]->ldpc_dec.harq_combined_output.offset = (((nrLDPC_slot_decoding_parameters->TBs[h].harq_unique_pid * NR_LDPC_MAX_NUM_CB) % HARQ_CODEBLOCK_ID_MAX) + i) * LDPC_MAX_CB_SIZE;
|
||||
|
||||
// Calculate offset in the HARQ combined buffers
|
||||
// Unique segment offset
|
||||
uint32_t segment_offset = (nrLDPC_slot_decoding_parameters->TBs[h].harq_unique_pid * NR_LDPC_MAX_NUM_CB) + i;
|
||||
// Prune to avoid shooting above maximum id
|
||||
uint32_t pruned_segment_offset = segment_offset % HARQ_CODEBLOCK_ID_MAX;
|
||||
// Segment offset to byte offset
|
||||
uint32_t harq_combined_offset = pruned_segment_offset * LDPC_MAX_CB_SIZE;
|
||||
|
||||
ops[j]->ldpc_dec.harq_combined_input.offset = harq_combined_offset;
|
||||
ops[j]->ldpc_dec.harq_combined_output.offset = harq_combined_offset;
|
||||
|
||||
if (bufs->hard_outputs != NULL)
|
||||
ops[j]->ldpc_dec.hard_output = bufs->hard_outputs[start_idx + j];
|
||||
if (bufs->inputs != NULL)
|
||||
|
||||
Reference in New Issue
Block a user