Commit f116a10d authored by Cedric Roux's avatar Cedric Roux

hotfix: turbo decoder should not fail if CRC is 0

The case of a CRC == 0 is legal.

After discussion with Raymond, it is also possible to have all
bits at 0 (and so a CRC==0) if there is no transmission and thus
not much energy.

So this hotfix may introduce new problems (false decoding).

A future work is to handle this case properly by not calling the
turbo decoder if there is not enough energy received.

The problem might manifest itself more in the UE part, especially
when it tries to decode MIB and/or SIB (if I understood correctly).
parent be0b164a
...@@ -1058,7 +1058,7 @@ unsigned char phy_threegpplte_turbo_decoder_scalar(llr_t *y, ...@@ -1058,7 +1058,7 @@ unsigned char phy_threegpplte_turbo_decoder_scalar(llr_t *y,
break; break;
} }
if ((crc == oldcrc) && (crc!=0)) { if (crc == oldcrc) {
return(iteration_cnt); return(iteration_cnt);
} }
......
...@@ -1375,7 +1375,7 @@ unsigned char phy_threegpplte_turbo_decoder16avx2(int16_t *y, ...@@ -1375,7 +1375,7 @@ unsigned char phy_threegpplte_turbo_decoder16avx2(int16_t *y,
fprintf(fdavx2b,"oldcrc %x, crc %x, oldcrc_cw2 %x, crc_cw2 %x\n",oldcrc,crc,oldcrc_cw2,crc_cw2); fprintf(fdavx2b,"oldcrc %x, crc %x, oldcrc_cw2 %x, crc_cw2 %x\n",oldcrc,crc,oldcrc_cw2,crc_cw2);
#endif #endif
if ((crc == oldcrc) && (crc!=0) && (crc_cw2 == oldcrc_cw2) && (crc_cw2!=0)) { if (crc == oldcrc && crc_cw2 == oldcrc_cw2) {
return(iteration_cnt); return(iteration_cnt);
} }
} }
......
...@@ -2556,7 +2556,7 @@ unsigned char phy_threegpplte_turbo_decoder(short *y, ...@@ -2556,7 +2556,7 @@ unsigned char phy_threegpplte_turbo_decoder(short *y,
stop_meas(intl2_stats); stop_meas(intl2_stats);
if ((crc == oldcrc) && (crc!=0)) { if (crc == oldcrc) {
return(iteration_cnt); return(iteration_cnt);
} }
} }
......
...@@ -1612,7 +1612,7 @@ unsigned char phy_threegpplte_turbo_decoder16(short *y, ...@@ -1612,7 +1612,7 @@ unsigned char phy_threegpplte_turbo_decoder16(short *y,
fprintf(fdsse4,"oldcrc %x, crc %x\n",oldcrc,crc); fprintf(fdsse4,"oldcrc %x, crc %x\n",oldcrc,crc);
#endif #endif
if ((crc == oldcrc) && (crc!=0)) { if (crc == oldcrc) {
return(iteration_cnt); return(iteration_cnt);
} }
} }
......
...@@ -1625,7 +1625,7 @@ unsigned char phy_threegpplte_turbo_decoder8(short *y, ...@@ -1625,7 +1625,7 @@ unsigned char phy_threegpplte_turbo_decoder8(short *y,
if (intl2_stats) stop_meas(intl2_stats); if (intl2_stats) stop_meas(intl2_stats);
if ((crc == oldcrc) && (crc!=0)) { if (crc == oldcrc) {
return(iteration_cnt); return(iteration_cnt);
} }
} }
......
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