mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-17 14:40:31 +00:00
Don't require all code blocks to decode in the same HARQ round
Since28cff29178, a transport block's payload (harq_process->b) is only assembled from its decoded code blocks if every single code block reports decodeSuccess in the same HARQ round. Previously, each code block was copied into b independently, as soon as its own decodeSuccess was true, regardless of the state of the others that round. This gate breaks HARQ combining for T2 that report a failure when re-decoding a code block that already succeeded in a previous round. The transport block is retransmitted until it is dropped. Restore per-segment copying into for current round: a code block that already succeeded keeps its previously-copied bytes untouched on any round where it is not currently reporting success. Fixes:28cff29178("Simplify TB_parameters, c, d, d_to_be_cleared") Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
This commit is contained in:
@@ -274,28 +274,21 @@ int nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
|
||||
nrLDPC_TB_decoding_parameters_t *TB_parameters = &TBs[pusch_id];
|
||||
|
||||
uint32_t offset = 0, r_offset = 0;
|
||||
bool crcok = true;
|
||||
LOG_D(PHY, "C = %d\n", TB_parameters->C);
|
||||
for (int r = 0; r < TB_parameters->C; r++) {
|
||||
LOG_D(PHY, "Segment %d %d\n", r, TB_parameters->decodeSuccess[r]);
|
||||
if (TB_parameters->decodeSuccess[r] == false) {
|
||||
uint32_t seg_len = (harq_process->K >> 3) - (harq_process->F >> 3) - ((harq_process->C > 1) ? 3 : 0);
|
||||
if (TB_parameters->decodeSuccess[r]) {
|
||||
memcpy(harq_process->b + offset, harq_process->c + r_offset, seg_len);
|
||||
} else {
|
||||
LOG_D(PHY, "Segment %d/%d in error\n", r, TB_parameters->C);
|
||||
crcok = false;
|
||||
break;
|
||||
}
|
||||
offset += seg_len;
|
||||
r_offset += (harq_process->K >> 3);
|
||||
}
|
||||
if (crcok) {
|
||||
for (int r = 0; r < TB_parameters->C; r++) {
|
||||
// Copy c to b in case of decoding success
|
||||
memcpy(harq_process->b + offset,
|
||||
harq_process->c + r_offset,
|
||||
(harq_process->K >> 3) - (harq_process->F >> 3) - ((harq_process->C > 1) ? 3 : 0));
|
||||
offset += ((harq_process->K >> 3) - (harq_process->F >> 3) - ((harq_process->C > 1) ? 3 : 0));
|
||||
r_offset += (harq_process->K >> 3);
|
||||
}
|
||||
} else {
|
||||
bool crcok = (harq_process->processedSegments == TB_parameters->C);
|
||||
if (!crcok)
|
||||
LOG_D(PHY, "ULSCH %d in error\n", ULSCH_id);
|
||||
}
|
||||
merge_meas(&phy_vars_gNB->ts_deinterleave, &TB_parameters->ts_deinterleave);
|
||||
merge_meas(&phy_vars_gNB->ts_rate_unmatch, &TB_parameters->ts_rate_unmatch);
|
||||
merge_meas(&phy_vars_gNB->ts_seg_prep, &TB_parameters->ts_seg_prep);
|
||||
|
||||
Reference in New Issue
Block a user