the LDPC decoder supports several rates and the input has to be adapted accordingly (by padding with zeros to the next lower supported rate). Moreover, the first 2*Z LLRs are zero (since they are punctured and not transmitted) then you have the LLRs corresponding to the systematic bits. After that come the filler bits, the encoder uses 0 for the filler bits hence for the decoder you need to put 127 (max LLR for bit 0) at their place. Then come the LLRs corresponding to the punctured bits followed by zeros to pad for the supported decoder rate.
*/
for(i=0;i<2*Zc;i++)
channel_output_fixed[i]=0;
decParams.BG=BG;
decParams.Z=Zc;
decParams.R=13;
...
...
@@ -236,9 +256,9 @@ int test_ldpc(short No_iteration,