Newer
Older
Mody Sy
committed
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
case 8:
{
nrLDPC_cnProc_BG1_Z8_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z8_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 7:
{
nrLDPC_cnProc_BG1_Z7_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z7_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 6:
{
nrLDPC_cnProc_BG1_Z6_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z6_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 5:
{
nrLDPC_cnProc_BG1_Z5_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z5_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 4:
{
nrLDPC_cnProc_BG1_Z4_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z4_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 3:
{
nrLDPC_cnProc_BG1_Z3_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z3_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 2:
{
nrLDPC_cnProc_BG1_Z2_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z2_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
}//end switch(Z)
}
else
Sebastian Wagner
committed
nrLDPC_cnProc_BG2(p_lut, p_procBuf, Z);
}
#ifdef NR_LDPC_PROFILER_DETAIL
stop_meas(&p_profiler->cnProc);
#endif
#ifdef NR_LDPC_DEBUG_MODE
Sebastian Wagner
committed
nrLDPC_debug_writeBuffer2File(nrLDPC_buffers_CN_PROC_RES, p_procBuf);
#endif
// Send CN results back to BNs
#ifdef NR_LDPC_PROFILER_DETAIL
start_meas(&p_profiler->cn2bnProcBuf);
#endif
if (BG == 1)
{
Sebastian Wagner
committed
nrLDPC_cn2bnProcBuf_BG1(p_lut, p_procBuf, Z);
}
else
{
nrLDPC_cn2bnProcBuf_BG2(p_lut, p_procBuf, Z);
}
#ifdef NR_LDPC_PROFILER_DETAIL
stop_meas(&p_profiler->cn2bnProcBuf);
#endif
#ifdef NR_LDPC_DEBUG_MODE
Sebastian Wagner
committed
nrLDPC_debug_writeBuffer2File(nrLDPC_buffers_BN_PROC, p_procBuf);
#endif
// BN Processing
#ifdef NR_LDPC_PROFILER_DETAIL
start_meas(&p_profiler->bnProcPc);
#endif
Sebastian Wagner
committed
nrLDPC_bnProcPc(p_lut, p_procBuf, Z);
#ifdef NR_LDPC_PROFILER_DETAIL
stop_meas(&p_profiler->bnProcPc);
#endif
#ifdef NR_LDPC_DEBUG_MODE
Sebastian Wagner
committed
nrLDPC_debug_writeBuffer2File(nrLDPC_buffers_LLR_RES, p_procBuf);
#endif
#ifdef NR_LDPC_PROFILER_DETAIL
start_meas(&p_profiler->bnProc);
#endif
Sebastian Wagner
committed
nrLDPC_bnProc(p_lut, p_procBuf, Z);
#ifdef NR_LDPC_PROFILER_DETAIL
stop_meas(&p_profiler->bnProc);
#endif
#ifdef NR_LDPC_DEBUG_MODE
Sebastian Wagner
committed
nrLDPC_debug_writeBuffer2File(nrLDPC_buffers_BN_PROC_RES, p_procBuf);
#endif
// BN results to CN processing buffer
#ifdef NR_LDPC_PROFILER_DETAIL
start_meas(&p_profiler->bn2cnProcBuf);
#endif
if (BG == 1)
{
Sebastian Wagner
committed
nrLDPC_bn2cnProcBuf_BG1(p_lut, p_procBuf, Z);
}
else
{
nrLDPC_bn2cnProcBuf_BG2(p_lut, p_procBuf, Z);
}
#ifdef NR_LDPC_PROFILER_DETAIL
stop_meas(&p_profiler->bn2cnProcBuf);
#endif
#ifdef NR_LDPC_DEBUG_MODE
Sebastian Wagner
committed
nrLDPC_debug_writeBuffer2File(nrLDPC_buffers_CN_PROC, p_procBuf);
#endif
// Parity Check
#ifdef NR_LDPC_ENABLE_PARITY_CHECK
#ifdef NR_LDPC_PROFILER_DETAIL
start_meas(&p_profiler->cnProcPc);
#endif
if (BG == 1)
{
Sebastian Wagner
committed
pcRes = nrLDPC_cnProcPc_BG1(p_lut, p_procBuf, Z);
}
else
{
Sebastian Wagner
committed
pcRes = nrLDPC_cnProcPc_BG2(p_lut, p_procBuf, Z);
}
#ifdef NR_LDPC_PROFILER_DETAIL
stop_meas(&p_profiler->cnProcPc);
#endif
#endif
}
// Last iteration
if ( (i < numMaxIter) && (pcRes != 0) )
{
// Increase iteration counter
i++;
// CN processing
#ifdef NR_LDPC_PROFILER_DETAIL
start_meas(&p_profiler->cnProc);
#endif
if (BG == 1)
{
Mody Sy
committed
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
// depend on Z
switch (Z)
{
case 384:
{
nrLDPC_cnProc_BG1_Z384_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z384_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 352:
{
nrLDPC_cnProc_BG1_Z352_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z352_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 320:
{
nrLDPC_cnProc_BG1_Z320_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
//nrLDPC_cnProc_BG1_Z320_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 288:
{
nrLDPC_cnProc_BG1_Z288_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z288_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 256:
{
nrLDPC_cnProc_BG1_Z256_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
//LDPC_cnProc_BG1_Z256_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 240:
{
nrLDPC_cnProc_BG1_Z240_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z240_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 224:
{
nrLDPC_cnProc_BG1_Z224_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
//nrLDPC_cnProc_BG1_Z224_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 208:
{
nrLDPC_cnProc_BG1_Z208_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z208_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 192:
{
nrLDPC_cnProc_BG1_Z192_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z192_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 176:
{
nrLDPC_cnProc_BG1_Z176_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z176_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
Mody Sy
committed
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
case 160:
{
nrLDPC_cnProc_BG1_Z176_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z176_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 144:
{
nrLDPC_cnProc_BG1_Z144_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z144_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 128:
{
nrLDPC_cnProc_BG1_Z128_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z128_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 120:
{
nrLDPC_cnProc_BG1_Z120_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z120_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 112:
{
nrLDPC_cnProc_BG1_Z112_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z112_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 104:
{
nrLDPC_cnProc_BG1_Z104_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z104_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 96:
{
nrLDPC_cnProc_BG1_Z96_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z96_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 88:
{
nrLDPC_cnProc_BG1_Z88_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z88_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 80:
{
nrLDPC_cnProc_BG1_Z80_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z80_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 72:
{
nrLDPC_cnProc_BG1_Z72_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z72_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 64:
{
nrLDPC_cnProc_BG1_Z64_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z64_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 60:
{
nrLDPC_cnProc_BG1_Z60_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z60_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 56:
{
nrLDPC_cnProc_BG1_Z56_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z56_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 52:
{
nrLDPC_cnProc_BG1_Z52_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z52_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 48:
{
nrLDPC_cnProc_BG1_Z48_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z48_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 44:
{
nrLDPC_cnProc_BG1_Z44_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z44_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 40:
{
nrLDPC_cnProc_BG1_Z40_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z40_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 36:
{
nrLDPC_cnProc_BG1_Z36_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z36_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 32:
{
nrLDPC_cnProc_BG1_Z32_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z32_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 30:
{
nrLDPC_cnProc_BG1_Z30_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z30_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 28:
{
nrLDPC_cnProc_BG1_Z28_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z28_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 26:
{
nrLDPC_cnProc_BG1_Z26_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z26_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 24:
{
nrLDPC_cnProc_BG1_Z24_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z24_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 22:
{
nrLDPC_cnProc_BG1_Z22_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z22_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 20:
{
nrLDPC_cnProc_BG1_Z20_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z20_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 18:
{
nrLDPC_cnProc_BG1_Z18_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z18_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 16:
{
nrLDPC_cnProc_BG1_Z16_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z16_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 15:
{
nrLDPC_cnProc_BG1_Z15_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z15_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 14:
{
nrLDPC_cnProc_BG1_Z14_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z14_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 13:
{
nrLDPC_cnProc_BG1_Z13_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z13_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 12:
{
nrLDPC_cnProc_BG1_Z12_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z12_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 11:
{
nrLDPC_cnProc_BG1_Z11_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z11_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 10:
{
nrLDPC_cnProc_BG1_Z10_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z10_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 9:
{
nrLDPC_cnProc_BG1_Z9_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z9_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 8:
{
nrLDPC_cnProc_BG1_Z8_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z8_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 7:
{
nrLDPC_cnProc_BG1_Z7_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z7_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 6:
{
nrLDPC_cnProc_BG1_Z6_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z6_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 5:
{
nrLDPC_cnProc_BG1_Z5_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z5_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 4:
{
nrLDPC_cnProc_BG1_Z4_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z4_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 3:
{
nrLDPC_cnProc_BG1_Z3_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z3_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
case 2:
{
nrLDPC_cnProc_BG1_Z2_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
// nrLDPC_cnProc_BG1_Z2_13_AVX512(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
break;
}
}//end switch(Z)
}
else
{
nrLDPC_cnProc_BG2(p_lut, p_procBuf, Z);
}
#ifdef NR_LDPC_PROFILER_DETAIL
stop_meas(&p_profiler->cnProc);
#endif
#ifdef NR_LDPC_DEBUG_MODE
Sebastian Wagner
committed
nrLDPC_debug_writeBuffer2File(nrLDPC_buffers_CN_PROC_RES, p_procBuf);
#endif
// Send CN results back to BNs
#ifdef NR_LDPC_PROFILER_DETAIL
start_meas(&p_profiler->cn2bnProcBuf);
#endif
if (BG == 1)
{
Sebastian Wagner
committed
nrLDPC_cn2bnProcBuf_BG1(p_lut, p_procBuf, Z);
}
else
{
nrLDPC_cn2bnProcBuf_BG2(p_lut, p_procBuf, Z);
}
#ifdef NR_LDPC_PROFILER_DETAIL
stop_meas(&p_profiler->cn2bnProcBuf);
#endif
#ifdef NR_LDPC_DEBUG_MODE
Sebastian Wagner
committed
nrLDPC_debug_writeBuffer2File(nrLDPC_buffers_BN_PROC, p_procBuf);
#endif
// BN Processing
#ifdef NR_LDPC_PROFILER_DETAIL
start_meas(&p_profiler->bnProcPc);
#endif
Sebastian Wagner
committed
nrLDPC_bnProcPc(p_lut, p_procBuf, Z);
#ifdef NR_LDPC_PROFILER_DETAIL
stop_meas(&p_profiler->bnProcPc);
#endif
#ifdef NR_LDPC_DEBUG_MODE
Sebastian Wagner
committed
nrLDPC_debug_writeBuffer2File(nrLDPC_buffers_LLR_RES, p_procBuf);
#endif
// If parity check not enabled, no need to send the BN proc results
// back to CNs
#ifdef NR_LDPC_ENABLE_PARITY_CHECK
#ifdef NR_LDPC_PROFILER_DETAIL
start_meas(&p_profiler->bnProc);
#endif
Sebastian Wagner
committed
nrLDPC_bnProc(p_lut, p_procBuf, Z);
#ifdef NR_LDPC_PROFILER_DETAIL
stop_meas(&p_profiler->bnProc);
#endif
#ifdef NR_LDPC_DEBUG_MODE
Sebastian Wagner
committed
nrLDPC_debug_writeBuffer2File(nrLDPC_buffers_BN_PROC_RES, p_procBuf);
#endif
// BN results to CN processing buffer
#ifdef NR_LDPC_PROFILER_DETAIL
start_meas(&p_profiler->bn2cnProcBuf);
#endif
if (BG == 1)
{
Sebastian Wagner
committed
nrLDPC_bn2cnProcBuf_BG1(p_lut, p_procBuf, Z);
}
else
{
nrLDPC_bn2cnProcBuf_BG2(p_lut, p_procBuf, Z);
}
#ifdef NR_LDPC_PROFILER_DETAIL
stop_meas(&p_profiler->bn2cnProcBuf);
#endif
#ifdef NR_LDPC_DEBUG_MODE
Sebastian Wagner
committed
nrLDPC_debug_writeBuffer2File(nrLDPC_buffers_CN_PROC, p_procBuf);
#endif
// Parity Check
#ifdef NR_LDPC_PROFILER_DETAIL
start_meas(&p_profiler->cnProcPc);
#endif
if (BG == 1)
{
Sebastian Wagner
committed
pcRes = nrLDPC_cnProcPc_BG1(p_lut, p_procBuf, Z);
}
else
{
Sebastian Wagner
committed
pcRes = nrLDPC_cnProcPc_BG2(p_lut, p_procBuf, Z);
}
#ifdef NR_LDPC_PROFILER_DETAIL
stop_meas(&p_profiler->cnProcPc);
#endif
#endif
}
// If maximum number of iterations reached an PC still fails increase number of iterations
// Thus, i > numMaxIter indicates that PC has failed
#ifdef NR_LDPC_ENABLE_PARITY_CHECK
if (pcRes != 0)
{
i++;
}
// Assign results from processing buffer to output
#ifdef NR_LDPC_PROFILER_DETAIL
start_meas(&p_profiler->llrRes2llrOut);
#endif
nrLDPC_llrRes2llrOut(p_lut, p_llrOut, p_procBuf, Z, BG);
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
#ifdef NR_LDPC_PROFILER_DETAIL
stop_meas(&p_profiler->llrRes2llrOut);
#endif
// Hard-decision
#ifdef NR_LDPC_PROFILER_DETAIL
start_meas(&p_profiler->llr2bit);
#endif
if (outMode == nrLDPC_outMode_BIT)
{
nrLDPC_llr2bitPacked(p_out, p_llrOut, numLLR);
}
else if (outMode == nrLDPC_outMode_BITINT8)
{
nrLDPC_llr2bit(p_out, p_llrOut, numLLR);
}
#ifdef NR_LDPC_PROFILER_DETAIL
stop_meas(&p_profiler->llr2bit);
#endif
return i;
}