Commit db71a0b9 authored by sebastian's avatar sebastian

cn2bnProc is done

parent 51a45a4d
......@@ -515,16 +515,41 @@ static const uint16_t circShift_BG1_Z384_CNG19[19][4] = {{307, 76, 205, 276},{19
// Startaddressses in the BN buffer of the different CN groups
// BG1
// Group of CNs with 3 BNs (CNG3)
static const uint32_t startAddrBnProcBuf_BG1_CNG3[3] = {111360, 100224, 0};
static const uint32_t startAddrBnProcBuf_BG1_CNG4[4][5] = {{105984, 107904, 120192, 120576, 109440}, {40704, 74880, 43392, 47232, 43008}, {42240, 19200, 62592, 23424, 92928}, {8832, 12672, 13824, 14592, 15744}};
static const uint32_t startAddrBnProcBuf_BG1_CNG5[5][18] = {{116736, 105216, 105600, 117504, 117888, 106368, 118272, 106752, 118656, 107136, 119040, 107520, 119424, 119808, 108288, 108672, 109056, 120960}, {88704, 30336, 39552, 31872, 46848, 58752, 89856, 87936, 90240, 33408, 89472, 41856, 61824, 30720, 73344, 74496, 62208, 92544}, {72576, 88320, 86400, 46464, 33024, 97536, 73728, 90624, 60288, 61440, 32640, 91776, 34176, 91392, 91008, 32256, 98688, 33792}, {59520, 97152, 57216, 31104, 74112, 22272, 21888, 23040, 22656, 75264, 61056, 92160, 97920, 93312, 34560, 98304, 23808, 93696}, {6912, 7296, 8064, 8448, 9216, 9600, 9984, 10368, 10752, 11136, 11520, 11904, 12288, 13056, 13440, 14208, 14976, 15360}};
static const uint32_t startAddrBnProcBuf_BG1_CNG6[6][8] = {{114432, 103680, 115584, 104064, 115968, 116352, 104832, 117120}, {68736, 69888, 55680, 87168, 104448, 71040, 17280, 72192}, {83328, 56832, 59136, 71424, 84864, 29184, 60672, 46080}, {41472, 42624, 57984, 96768, 41088, 58368, 43776, 59904}, {18816, 86016, 71808, 31488, 86784, 87552, 72960, 89088}, {3456, 4608, 4992, 5376, 5760, 6144, 6528, 7680}};
static const uint32_t startAddrBnProcBuf_BG1_CNG7[7][5] = {{112512, 102144, 114048, 114816, 115200}, {100992, 28800, 102912, 85632, 103296}, {45312, 45696, 83712, 29568, 85248}, {80256, 81792, 55296, 57600, 70272}, {38784, 39936, 69120, 56448, 96384}, {52608, 54144, 96000, 70656, 21504}, {1152, 2304, 3072, 3840, 4224}};
static const uint32_t startAddrBnProcBuf_BG1_CNG8[8][2] = {{111744, 113664}, {100608, 102528}, {66432, 84096}, {81024, 56064}, {52992, 69504}, {67200, 84480}, {81408, 18432}, {384, 2688}};
static const uint32_t startAddrBnProcBuf_BG1_CNG9[9][2] = {{112128, 113280}, {38400, 101760}, {80640, 82176}, {52224, 53760}, {66816, 67968}, {53376, 54912}, {95232, 95616}, {39168, 40320}, {768, 1920}};
static const uint32_t startAddrBnProcBuf_BG1_CNG10[10][1] = {{112896}, {101376}, {67584}, {82560}, {54528}, {29952}, {68352}, {82944}, {21120}, {1536}};
static const uint32_t startAddrBnProcBuf_BG1_CNG19[19][4] = {{109824, 110208, 110592, 110976}, {99072, 25728, 99456, 99840}, {24192, 64128, 27264, 65280}, {62976, 44160, 44544, 44928}, {16128, 16512, 16896, 37248}, {34944, 75648, 36096, 78720}, {24576, 35328, 77184, 37632}, {76032, 26112, 36480, 79104}, {47616, 49152, 27648, 50688}, {76416, 77952, 77568, 79488}, {63360, 48000, 64512, 65664}, {24960, 26496, 49536, 51072}, {48384, 49920, 28032, 51456}, {94080, 48768, 50304, 51840}, {25344, 26880, 94464, 94848}, {35712, 64896, 28416, 38016}, {63744, 78336, 36864, 66048}, {76800, 18048, 20352, 79872}, {17664, 19584, 19968, 20736}};
// Group of CNs with 3 BNs (CNG3) / only this group is independent of Z
static const uint32_t startAddrBnProcBuf_BG1_CNG3[3][1] = {{111360},{100224},{0}};
// Group of CNs with 4 BNs (CNG4)
static const uint32_t startAddrBnProcBuf_BG1_CNG4[4][5] = {{105984, 107904, 120192, 120576, 109440},{40704, 74496, 43008, 47232, 43008},{41856, 19200, 61440, 23424, 92544},{0, 0, 0, 0, 0}};
static const uint8_t bnPosBnProcBuf_BG1_CNG4[4][5] = {{0, 0, 0, 0, 0},{0, 1, 1, 0, 0},{1, 0, 3, 0, 1},{23, 33, 36, 38, 41}};
// Group of CNs with 5 BNs (CNG5)
static const uint32_t startAddrBnProcBuf_BG1_CNG5[5][18] = {{116736, 105216, 105600, 117504, 117888, 106368, 118272, 106752, 118656, 107136, 119040, 107520, 119424, 119808, 108288, 108672, 109056, 120960},{87936, 30336, 39552, 31872, 46848, 58368, 89472, 87936, 89472, 33408, 89472, 41856, 61440, 30336, 73344, 74496, 61440, 92544},{72192, 87936, 86400, 46464, 31872, 97536, 73344, 89472, 59904, 61440, 31872, 91008, 33408, 91008, 91008, 31872, 98688, 33408},{58368, 97152, 56832, 30336, 73344, 21888, 21888, 22656, 22656, 74496, 59904, 91008, 97920, 92544, 33408, 98304, 23424, 92544},{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
static const uint8_t bnPosBnProcBuf_BG1_CNG5[5][18] = {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},{2, 0, 0, 0, 0, 1, 1, 0, 2, 0, 0, 0, 1, 1, 0, 0, 2, 0},{1, 1, 0, 0, 3, 0, 1, 3, 1, 0, 2, 2, 2, 1, 0, 1, 0, 1},{3, 0, 1, 2, 2, 1, 0, 1, 0, 2, 3, 3, 0, 2, 3, 0, 1, 3},{18, 19, 21, 22, 24, 25, 26, 27, 28, 29, 30, 31, 32, 34, 35, 37, 39, 40}};
// Group of CNs with 6 BNs (CNG6)
static const uint32_t startAddrBnProcBuf_BG1_CNG6[6][8] = {{114432, 103680, 115584, 104064, 115968, 116352, 104832, 117120},{68736, 69888, 55296, 86400, 104448, 71040, 17280, 72192},{83328, 56832, 58368, 71040, 84864, 28800, 59904, 46080},{40704, 41856, 56832, 96768, 40704, 58368, 43008, 59904},{18816, 84864, 71040, 30336, 86400, 86400, 72192, 87936},{0, 0, 0, 0, 0, 0, 0, 0}};
static const uint8_t bnPosBnProcBuf_BG1_CNG6[6][8] = {{0, 0, 0, 0, 0, 0, 0, 0},{0, 0, 1, 2, 0, 0, 0, 0},{0, 0, 2, 1, 0, 1, 2, 0},{2, 2, 3, 0, 1, 0, 2, 0},{0, 3, 2, 3, 1, 3, 2, 3},{9, 12, 13, 14, 15, 16, 17, 20}};
// Group of CNs with 7 BNs (CNG7)
static const uint32_t startAddrBnProcBuf_BG1_CNG7[7][5] = {{112512, 102144, 114048, 114816, 115200},{100992, 28800, 102912, 84864, 103296},{45312, 45696, 83328, 28800, 84864},{80256, 81792, 55296, 56832, 69888},{38400, 39552, 68736, 55296, 96384},{52224, 53760, 96000, 69888, 21120},{0, 0, 0, 0, 0}};
static const uint8_t bnPosBnProcBuf_BG1_CNG7[7][5] = {{0, 0, 0, 0, 0},{0, 0, 0, 2, 0},{0, 0, 1, 2, 1},{0, 0, 0, 2, 1},{1, 1, 1, 3, 0},{1, 1, 0, 2, 1},{3, 6, 8, 10, 11}};
// Group of CNs with 8 BNs (CNG8)
static const uint32_t startAddrBnProcBuf_BG1_CNG8[8][2] = {{111744, 113664},{100608, 102528},{66432, 83328},{80256, 55296},{52224, 68736},{66432, 83328},{80256, 18432},{0, 0}};
static const uint8_t bnPosBnProcBuf_BG1_CNG8[8][2] = {{0, 0},{0, 0},{0, 2},{2, 2},{2, 2},{2, 3},{3, 0},{1, 7}};
// Group of CNs with 9 BNs (CNG9)
static const uint32_t startAddrBnProcBuf_BG1_CNG9[9][2] = {{112128, 113280},{38400, 101760},{80256, 81792},{52224, 53760},{66432, 67584},{52224, 53760},{95232, 95616},{38400, 39552},{0, 0}};
static const uint8_t bnPosBnProcBuf_BG1_CNG9[9][2] = {{0, 0},{0, 0},{1, 1},{0, 0},{1, 1},{3, 3},{0, 0},{2, 2},{2, 5}};
// Group of CNs with 10 BNs (CNG10)
static const uint32_t startAddrBnProcBuf_BG1_CNG10[10][1] = {{112896},{101376},{67584},{81792},{53760},{28800},{67584},{81792},{21120},{0}};
static const uint8_t bnPosBnProcBuf_BG1_CNG10[10][1] = {{0},{0},{0},{2},{2},{3},{2},{3},{0},{4}};
// Group of CNs with 19 BNs (CNG19)
static const uint32_t startAddrBnProcBuf_BG1_CNG19[19][4] = {{109824, 110208, 110592, 110976},{99072, 25728, 99456, 99840},{24192, 64128, 27264, 65280},{62976, 44160, 44544, 44928},{16128, 16512, 16896, 37248},{34944, 75648, 36096, 78720},{24192, 34944, 77184, 37248},{75648, 25728, 36096, 78720},{47616, 49152, 27264, 50688},{75648, 77184, 77184, 78720},{62976, 47616, 64128, 65280},{24192, 25728, 49152, 50688},{47616, 49152, 27264, 50688},{94080, 47616, 49152, 50688},{24192, 25728, 94464, 94848},{34944, 64128, 27264, 37248},{62976, 77184, 36096, 65280},{75648, 18048, 20352, 78720},{17664, 19584, 19584, 20352}};
static const uint8_t bnPosBnProcBuf_BG1_CNG19[19][4] = {{0, 0, 0, 0},{0, 0, 0, 0},{0, 0, 0, 0},{0, 0, 0, 0},{0, 0, 0, 0},{0, 0, 0, 0},{1, 1, 0, 1},{1, 1, 1, 1},{0, 0, 1, 0},{2, 2, 1, 2},{1, 1, 1, 1},{2, 2, 1, 1},{2, 2, 2, 2},{0, 3, 3, 3},{3, 3, 0, 0},{2, 2, 3, 2},{2, 3, 2, 2},{3, 0, 0, 3},{0, 0, 1, 1}};
// BG1
// Z = 2
......
......@@ -297,6 +297,7 @@ static inline void nrLDPC_cn2bnProcBuf_BG1(t_nrLDPC_lut* p_lut, t_nrLDPC_procBuf
uint32_t i;
uint32_t j;
uint32_t M;
uint32_t idxBn = 0;
// =====================================================================
// CN group with 3 BNs
......@@ -309,14 +310,7 @@ static inline void nrLDPC_cn2bnProcBuf_BG1(t_nrLDPC_lut* p_lut, t_nrLDPC_procBuf
{
p_cnProcBufRes = &cnProcBufRes[lut_startAddrCnGroups[0] + j*bitOffsetInGroup];
/*
for (i=0; i<M; i++)
{
bnProcBuf[p_lut_cn2bn[j*M + i]] = p_cnProcBufRes[i];
}
*/
nrLDPC_circ_memcpy(&bnProcBuf[startAddrBnProcBuf_BG1_CNG3[j]],p_cnProcBufRes,Z,lut_circShift_CNG3[j][0]);
nrLDPC_circ_memcpy(&bnProcBuf[startAddrBnProcBuf_BG1_CNG3[j][0]],p_cnProcBufRes,Z,lut_circShift_CNG3[j][0]);
}
// =====================================================================
......@@ -330,19 +324,12 @@ static inline void nrLDPC_cn2bnProcBuf_BG1(t_nrLDPC_lut* p_lut, t_nrLDPC_procBuf
{
p_cnProcBufRes = &cnProcBufRes[lut_startAddrCnGroups[1] + j*bitOffsetInGroup];
/*
for (i=0; i<M; i++)
{
bnProcBuf[p_lut_cn2bn[j*M + i]] = p_cnProcBufRes[i];
}
*/
for (i=0; i<lut_numCnInCnGroups_BG1_R13[1]; i++)
{
nrLDPC_circ_memcpy(&bnProcBuf[startAddrBnProcBuf_BG1_CNG4[j][i]],p_cnProcBufRes,Z,lut_circShift_CNG4[j][i]);
p_cnProcBufRes += NR_LDPC_ZMAX;
idxBn = startAddrBnProcBuf_BG1_CNG4[j][i] + bnPosBnProcBuf_BG1_CNG4[j][i]*Z;
nrLDPC_circ_memcpy(&bnProcBuf[idxBn],p_cnProcBufRes,Z,lut_circShift_CNG4[j][i]);
p_cnProcBufRes += Z;
}
}
// =====================================================================
......@@ -355,18 +342,14 @@ static inline void nrLDPC_cn2bnProcBuf_BG1(t_nrLDPC_lut* p_lut, t_nrLDPC_procBuf
for (j=0; j<5; j++)
{
p_cnProcBufRes = &cnProcBufRes[lut_startAddrCnGroups[2] + j*bitOffsetInGroup];
/*
for (i=0; i<M; i++)
{
bnProcBuf[p_lut_cn2bn[j*M + i]] = p_cnProcBufRes[i];
}
*/
for (i=0; i<lut_numCnInCnGroups_BG1_R13[2]; i++)
{
nrLDPC_circ_memcpy(&bnProcBuf[startAddrBnProcBuf_BG1_CNG5[j][i]],p_cnProcBufRes,Z,lut_circShift_CNG5[j][i]);
p_cnProcBufRes += NR_LDPC_ZMAX;
idxBn = startAddrBnProcBuf_BG1_CNG5[j][i] + bnPosBnProcBuf_BG1_CNG5[j][i]*Z;
nrLDPC_circ_memcpy(&bnProcBuf[idxBn],p_cnProcBufRes,Z,lut_circShift_CNG5[j][i]);
//nrLDPC_circ_memcpy(&bnProcBuf[lut_startAddrBnProcBuf_CNG5[j][i]],p_cnProcBufRes,Z,lut_circShift_CNG5[j][i]);
p_cnProcBufRes += Z;
}
}
// =====================================================================
......@@ -380,17 +363,12 @@ static inline void nrLDPC_cn2bnProcBuf_BG1(t_nrLDPC_lut* p_lut, t_nrLDPC_procBuf
{
p_cnProcBufRes = &cnProcBufRes[lut_startAddrCnGroups[3] + j*bitOffsetInGroup];
for (i=0; i<M; i++)
{
bnProcBuf[p_lut_cn2bn[j*M + i]] = p_cnProcBufRes[i];
}
/*
for (i=0; i<lut_numCnInCnGroups_BG1_R13[3]; i++)
{
nrLDPC_circ_memcpy(&bnProcBuf[startAddrBnProcBuf_BG1_CNG6[j][i]],p_cnProcBufRes,Z,lut_circShift_CNG6[j][i]);
p_cnProcBufRes += NR_LDPC_ZMAX;
idxBn = startAddrBnProcBuf_BG1_CNG6[j][i] + bnPosBnProcBuf_BG1_CNG6[j][i]*Z;
nrLDPC_circ_memcpy(&bnProcBuf[idxBn],p_cnProcBufRes,Z,lut_circShift_CNG6[j][i]);
p_cnProcBufRes += Z;
}
*/
}
// =====================================================================
......@@ -404,17 +382,12 @@ static inline void nrLDPC_cn2bnProcBuf_BG1(t_nrLDPC_lut* p_lut, t_nrLDPC_procBuf
{
p_cnProcBufRes = &cnProcBufRes[lut_startAddrCnGroups[4] + j*bitOffsetInGroup];
for (i=0; i<M; i++)
{
bnProcBuf[p_lut_cn2bn[j*M + i]] = p_cnProcBufRes[i];
}
/*
for (i=0; i<lut_numCnInCnGroups_BG1_R13[4]; i++)
{
nrLDPC_circ_memcpy(&bnProcBuf[startAddrBnProcBuf_BG1_CNG7[j][i]],p_cnProcBufRes,Z,lut_circShift_CNG7[j][i]);
p_cnProcBufRes += NR_LDPC_ZMAX;
idxBn = startAddrBnProcBuf_BG1_CNG7[j][i] + bnPosBnProcBuf_BG1_CNG7[j][i]*Z;
nrLDPC_circ_memcpy(&bnProcBuf[idxBn],p_cnProcBufRes,Z,lut_circShift_CNG7[j][i]);
p_cnProcBufRes += Z;
}
*/
}
// =====================================================================
......@@ -428,17 +401,12 @@ static inline void nrLDPC_cn2bnProcBuf_BG1(t_nrLDPC_lut* p_lut, t_nrLDPC_procBuf
{
p_cnProcBufRes = &cnProcBufRes[lut_startAddrCnGroups[5] + j*bitOffsetInGroup];
for (i=0; i<M; i++)
{
bnProcBuf[p_lut_cn2bn[j*M + i]] = p_cnProcBufRes[i];
}
/*
for (i=0; i<lut_numCnInCnGroups_BG1_R13[5]; i++)
{
nrLDPC_circ_memcpy(&bnProcBuf[startAddrBnProcBuf_BG1_CNG8[j][i]],p_cnProcBufRes,Z,lut_circShift_CNG8[j][i]);
p_cnProcBufRes += NR_LDPC_ZMAX;
idxBn = startAddrBnProcBuf_BG1_CNG8[j][i] + bnPosBnProcBuf_BG1_CNG8[j][i]*Z;
nrLDPC_circ_memcpy(&bnProcBuf[idxBn],p_cnProcBufRes,Z,lut_circShift_CNG8[j][i]);
p_cnProcBufRes += Z;
}
*/
}
// =====================================================================
......@@ -452,17 +420,12 @@ static inline void nrLDPC_cn2bnProcBuf_BG1(t_nrLDPC_lut* p_lut, t_nrLDPC_procBuf
{
p_cnProcBufRes = &cnProcBufRes[lut_startAddrCnGroups[6] + j*bitOffsetInGroup];
for (i=0; i<M; i++)
{
bnProcBuf[p_lut_cn2bn[j*M + i]] = p_cnProcBufRes[i];
}
/*
for (i=0; i<lut_numCnInCnGroups_BG1_R13[6]; i++)
{
nrLDPC_circ_memcpy(&bnProcBuf[startAddrBnProcBuf_BG1_CNG9[j][i]],p_cnProcBufRes,Z,lut_circShift_CNG9[j][i]);
p_cnProcBufRes += NR_LDPC_ZMAX;
idxBn = startAddrBnProcBuf_BG1_CNG9[j][i] + bnPosBnProcBuf_BG1_CNG9[j][i]*Z;
nrLDPC_circ_memcpy(&bnProcBuf[idxBn],p_cnProcBufRes,Z,lut_circShift_CNG9[j][i]);
p_cnProcBufRes += Z;
}
*/
}
// =====================================================================
......@@ -476,17 +439,12 @@ static inline void nrLDPC_cn2bnProcBuf_BG1(t_nrLDPC_lut* p_lut, t_nrLDPC_procBuf
{
p_cnProcBufRes = &cnProcBufRes[lut_startAddrCnGroups[7] + j*bitOffsetInGroup];
for (i=0; i<M; i++)
{
bnProcBuf[p_lut_cn2bn[j*M + i]] = p_cnProcBufRes[i];
}
/*
for (i=0; i<lut_numCnInCnGroups_BG1_R13[7]; i++)
{
nrLDPC_circ_memcpy(&bnProcBuf[startAddrBnProcBuf_BG1_CNG10[j][i]],p_cnProcBufRes,Z,lut_circShift_CNG10[j][i]);
p_cnProcBufRes += NR_LDPC_ZMAX;
idxBn = startAddrBnProcBuf_BG1_CNG10[j][i] + bnPosBnProcBuf_BG1_CNG10[j][i]*Z;
nrLDPC_circ_memcpy(&bnProcBuf[idxBn],p_cnProcBufRes,Z,lut_circShift_CNG10[j][i]);
p_cnProcBufRes += Z;
}
*/
}
// =====================================================================
......@@ -500,17 +458,12 @@ static inline void nrLDPC_cn2bnProcBuf_BG1(t_nrLDPC_lut* p_lut, t_nrLDPC_procBuf
{
p_cnProcBufRes = &cnProcBufRes[lut_startAddrCnGroups[8] + j*bitOffsetInGroup];
for (i=0; i<M; i++)
{
bnProcBuf[p_lut_cn2bn[j*M + i]] = p_cnProcBufRes[i];
}
/*
for (i=0; i<lut_numCnInCnGroups_BG1_R13[8]; i++)
{
nrLDPC_circ_memcpy(&bnProcBuf[startAddrBnProcBuf_BG1_CNG19[j][i]],p_cnProcBufRes,Z,lut_circShift_CNG19[j][i]);
p_cnProcBufRes += NR_LDPC_ZMAX;
idxBn = startAddrBnProcBuf_BG1_CNG19[j][i] + bnPosBnProcBuf_BG1_CNG19[j][i]*Z;
nrLDPC_circ_memcpy(&bnProcBuf[idxBn],p_cnProcBufRes,Z,lut_circShift_CNG19[j][i]);
p_cnProcBufRes += Z;
}
*/
}
}
......@@ -711,7 +664,7 @@ static inline void nrLDPC_bn2cnProcBuf_BG1(t_nrLDPC_lut* p_lut, t_nrLDPC_procBuf
for (j=0; j<4; j++)
{
p_cnProcBuf = &cnProcBuf[lut_startAddrCnGroups[2] + j*bitOffsetInGroup];
for (i=0; i<M; i++)
{
p_cnProcBuf[i] = bnProcBufRes[p_lut_cn2bn[j*M + i]];
......
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