Commit cbb9464b authored by Raphael Defosseux's avatar Raphael Defosseux

Merge branch '448-ldpc-decoder-optimizations' into 'develop-nr'

Resolve "LDPC Decoder Optimizations"

See merge request !680
parents b3bc216d 03da0a5e
......@@ -622,6 +622,10 @@ inline static uint32_t vcd_get_write_index(void)
return write_index;
}
#if defined(ENABLE_ITTI)
int signal_mask(void);
#endif
void *vcd_dumper_thread_rt(void *args)
{
vcd_queue_user_data_t *data;
......
......@@ -771,7 +771,7 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
INPUT = ../nrLDPC_defs.h ../nrLDPC_types.h ../nrLDPC_init.h ../nrLDPC_cnProc.h ../nrLDPC_bnProc.h ../nrLDPC_mPass.h ../nrLDPC_decoder.h ../nrLDPC_decoder.c ../nrLDPC_lut/nrLDPC_lut.h
INPUT = ../nrLDPC_defs.h ../nrLDPC_types.h ../nrLDPC_init.h ../nrLDPC_cnProc.h ../nrLDPC_bnProc.h ../nrLDPC_mPass.h ../nrLDPC_decoder.h ../nrLDPC_decoder.c ../nrLDPC_lut.h
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
......
......@@ -22,7 +22,7 @@
/*!\file nrLDPC_cnProc.h
* \brief Defines the functions for check node processing
* \author Sebastian Wagner (TCL Communications) Email: <mailto:sebastian.wagner@tcl.com>
* \date 27-03-2018
* \date 30-09-2019
* \version 1.0
* \note
* \warning
......@@ -34,6 +34,7 @@
/**
\brief Performs CN processing for BG2 on the CN processing buffer and stores the results in the CN processing results buffer.
\param p_lut Pointer to decoder LUTs
\param p_procBuf Pointer to processing buffers
\param Z Lifting size
*/
static inline void nrLDPC_cnProc_BG2(t_nrLDPC_lut* p_lut, t_nrLDPC_procBuf* p_procBuf, uint16_t Z)
......
......@@ -22,8 +22,8 @@
/*!\file nrLDPC_decoder.c
* \brief Defines the LDPC decoder
* \author Sebastian Wagner (TCL Communications) Email: <mailto:sebastian.wagner@tcl.com>
* \date 27-03-2018
* \version 1.0
* \date 30-09-2019
* \version 2.0
* \note
* \warning
*/
......@@ -96,6 +96,8 @@ static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr, int8_t* p_out, t_nrLDP
{
// Use LLR processing buffer as temporary output buffer
p_llrOut = p_procBuf->llrProcBuf;
// Clear llrProcBuf
memset(p_llrOut,0, NR_LDPC_MAX_NUM_LLR*sizeof(int8_t));
}
......@@ -116,7 +118,14 @@ static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr, int8_t* p_out, t_nrLDP
#ifdef NR_LDPC_PROFILER_DETAIL
start_meas(&p_profiler->llr2CnProcBuf);
#endif
nrLDPC_llr2CnProcBuf(p_lut, p_llr, p_procBuf, numLLR, Z, BG);
if (BG == 1)
{
nrLDPC_llr2CnProcBuf_BG1(p_lut, p_llr, p_procBuf, Z);
}
else
{
nrLDPC_llr2CnProcBuf_BG2(p_lut, p_llr, p_procBuf, Z);
}
#ifdef NR_LDPC_PROFILER_DETAIL
stop_meas(&p_profiler->llr2CnProcBuf);
#endif
......@@ -158,7 +167,7 @@ static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr, int8_t* p_out, t_nrLDP
}
else
{
nrLDPC_cn2bnProcBuf(p_lut, p_procBuf, Z);
nrLDPC_cn2bnProcBuf_BG2(p_lut, p_procBuf, Z);
}
#ifdef NR_LDPC_PROFILER_DETAIL
stop_meas(&p_profiler->cn2bnProcBuf);
......@@ -206,7 +215,7 @@ static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr, int8_t* p_out, t_nrLDP
}
else
{
nrLDPC_bn2cnProcBuf(p_lut, p_procBuf, Z);
nrLDPC_bn2cnProcBuf_BG2(p_lut, p_procBuf, Z);
}
#ifdef NR_LDPC_PROFILER_DETAIL
stop_meas(&p_profiler->bn2cnProcBuf);
......@@ -257,7 +266,7 @@ static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr, int8_t* p_out, t_nrLDP
}
else
{
nrLDPC_cn2bnProcBuf(p_lut, p_procBuf, Z);
nrLDPC_cn2bnProcBuf_BG2(p_lut, p_procBuf, Z);
}
#ifdef NR_LDPC_PROFILER_DETAIL
stop_meas(&p_profiler->cn2bnProcBuf);
......@@ -302,7 +311,7 @@ static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr, int8_t* p_out, t_nrLDP
}
else
{
nrLDPC_bn2cnProcBuf(p_lut, p_procBuf, Z);
nrLDPC_bn2cnProcBuf_BG2(p_lut, p_procBuf, Z);
}
#ifdef NR_LDPC_PROFILER_DETAIL
stop_meas(&p_profiler->bn2cnProcBuf);
......@@ -329,7 +338,6 @@ static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr, int8_t* p_out, t_nrLDP
stop_meas(&p_profiler->cnProcPc);
#endif
#endif
}
// Last iteration
......@@ -368,7 +376,7 @@ static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr, int8_t* p_out, t_nrLDP
}
else
{
nrLDPC_cn2bnProcBuf(p_lut, p_procBuf, Z);
nrLDPC_cn2bnProcBuf_BG2(p_lut, p_procBuf, Z);
}
#ifdef NR_LDPC_PROFILER_DETAIL
stop_meas(&p_profiler->cn2bnProcBuf);
......@@ -416,7 +424,7 @@ static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr, int8_t* p_out, t_nrLDP
}
else
{
nrLDPC_bn2cnProcBuf(p_lut, p_procBuf, Z);
nrLDPC_bn2cnProcBuf_BG2(p_lut, p_procBuf, Z);
}
#ifdef NR_LDPC_PROFILER_DETAIL
stop_meas(&p_profiler->bn2cnProcBuf);
......@@ -444,19 +452,21 @@ static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr, int8_t* p_out, t_nrLDP
#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++;
}
#endif
// 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, numLLR);
nrLDPC_llrRes2llrOut(p_lut, p_llrOut, p_procBuf, Z, BG);
#ifdef NR_LDPC_PROFILER_DETAIL
stop_meas(&p_profiler->llrRes2llrOut);
#endif
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
static const uint32_t lut_cn2bnProcBuf_BG1_Z10_R23[1440] = {52227, 52228, 52229, 52230, 52231, 52232, 52233, 52224, 52225, 52226, 47621, 47622, 47623, 47624, 47625, 47616, 47617, 47618, 47619, 47620, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 53378, 53379, 53380, 53381, 53382, 53383, 53384, 53385, 53376, 53377, 49540, 49541, 49542, 49543, 49544, 49545, 49536, 49537, 49538, 49539, 54921, 54912, 54913, 54914, 54915, 54916, 54917, 54918, 54919, 54920, 48392, 48393, 48384, 48385, 48386, 48387, 48388, 48389, 48390, 48391, 13440, 13441, 13442, 13443, 13444, 13445, 13446, 13447, 13448, 13449, 50309, 50310, 50311, 50312, 50313, 50304, 50305, 50306, 50307, 50308, 22673, 22674, 22675, 22666, 22667, 22668, 22669, 22670, 22671, 22672, 25355, 25356, 25357, 25358, 25359, 25360, 25361, 25362, 25363, 25354, 43401, 43392, 43393, 43394, 43395, 43396, 43397, 43398, 43399, 43400, 22676, 22677, 22678, 22679, 22680, 22681, 22682, 22683, 22684, 22685, 25369, 25370, 25371, 25372, 25373, 25364, 25365, 25366, 25367, 25368, 43410, 43411, 43402, 43403, 43404, 43405, 43406, 43407, 43408, 43409, 22691, 22692, 22693, 22694, 22695, 22686, 22687, 22688, 22689, 22690, 25375, 25376, 25377, 25378, 25379, 25380, 25381, 25382, 25383, 25374, 43427, 43428, 43429, 43430, 43431, 43422, 43423, 43424, 43425, 43426, 22702, 22703, 22704, 22705, 22696, 22697, 22698, 22699, 22700, 22701, 25385, 25386, 25387, 25388, 25389, 25390, 25391, 25392, 25393, 25384, 43444, 43445, 43446, 43447, 43448, 43449, 43450, 43451, 43442, 43443, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 52611, 52612, 52613, 52614, 52615, 52616, 52617, 52608, 52609, 52610, 54534, 54535, 54536, 54537, 54528, 54529, 54530, 54531, 54532, 54533, 48002, 48003, 48004, 48005, 48006, 48007, 48008, 48009, 48000, 48001, 49927, 49928, 49929, 49920, 49921, 49922, 49923, 49924, 49925, 49926, 22656, 22657, 22658, 22659, 22660, 22661, 22662, 22663, 22664, 22665, 43412, 43413, 43414, 43415, 43416, 43417, 43418, 43419, 43420, 43421, 37276, 37277, 37268, 37269, 37270, 37271, 37272, 37273, 37274, 37275, 43441, 43432, 43433, 43434, 43435, 43436, 43437, 43438, 43439, 43440, 37289, 37290, 37291, 37292, 37293, 37294, 37295, 37296, 37297, 37288, 43459, 43460, 43461, 43452, 43453, 43454, 43455, 43456, 43457, 43458, 37315, 37316, 37317, 37308, 37309, 37310, 37311, 37312, 37313, 37314, 43465, 43466, 43467, 43468, 43469, 43470, 43471, 43462, 43463, 43464, 37327, 37318, 37319, 37320, 37321, 37322, 37323, 37324, 37325, 37326, 8094, 8095, 8096, 8097, 8098, 8099, 8100, 8101, 8102, 8103, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 53001, 52992, 52993, 52994, 52995, 52996, 52997, 52998, 52999, 53000, 54153, 54144, 54145, 54146, 54147, 54148, 54149, 54150, 54151, 54152, 13451, 13452, 13453, 13454, 13455, 13456, 13457, 13458, 13459, 13450, 49156, 49157, 49158, 49159, 49160, 49161, 49152, 49153, 49154, 49155, 37251, 37252, 37253, 37254, 37255, 37256, 37257, 37248, 37249, 37250, 40326, 40327, 40328, 40329, 40320, 40321, 40322, 40323, 40324, 40325, 37261, 37262, 37263, 37264, 37265, 37266, 37267, 37258, 37259, 37260, 40336, 40337, 40338, 40339, 40330, 40331, 40332, 40333, 40334, 40335, 37280, 37281, 37282, 37283, 37284, 37285, 37286, 37287, 37278, 37279, 40351, 40352, 40353, 40354, 40355, 40356, 40357, 40358, 40359, 40350, 22708, 22709, 22710, 22711, 22712, 22713, 22714, 22715, 22706, 22707, 25401, 25402, 25403, 25394, 25395, 25396, 25397, 25398, 25399, 25400, 37306, 37307, 37298, 37299, 37300, 37301, 37302, 37303, 37304, 37305, 40375, 40376, 40377, 40378, 40379, 40370, 40371, 40372, 40373, 40374, 22721, 22722, 22723, 22724, 22725, 22716, 22717, 22718, 22719, 22720, 25413, 25404, 25405, 25406, 25407, 25408, 25409, 25410, 25411, 25412, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 53765, 53766, 53767, 53768, 53769, 53760, 53761, 53762, 53763, 53764, 48771, 48772, 48773, 48774, 48775, 48776, 48777, 48768, 48769, 48770, 25344, 25345, 25346, 25347, 25348, 25349, 25350, 25351, 25352, 25353, 40341, 40342, 40343, 40344, 40345, 40346, 40347, 40348, 40349, 40340, 40366, 40367, 40368, 40369, 40360, 40361, 40362, 40363, 40364, 40365, 13460, 13461, 13462, 13463, 13464, 13465, 13466, 13467, 13468, 13469, 40389, 40380, 40381, 40382, 40383, 40384, 40385, 40386, 40387, 40388, 40395, 40396, 40397, 40398, 40399, 40390, 40391, 40392, 40393, 40394, 8108, 8109, 8110, 8111, 8112, 8113, 8104, 8105, 8106, 8107, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50691, 50692, 50693, 50694, 50695, 50696, 50697, 50688, 50689, 50690, 51075, 51076, 51077, 51078, 51079, 51080, 51081, 51072, 51073, 51074, 51464, 51465, 51456, 51457, 51458, 51459, 51460, 51461, 51462, 51463, 51840, 51841, 51842, 51843, 51844, 51845, 51846, 51847, 51848, 51849, 46469, 46470, 46471, 46472, 46473, 46464, 46465, 46466, 46467, 46468, 11140, 11141, 11142, 11143, 11144, 11145, 11136, 11137, 11138, 11139, 46855, 46856, 46857, 46848, 46849, 46850, 46851, 46852, 46853, 46854, 47240, 47241, 47232, 47233, 47234, 47235, 47236, 47237, 47238, 47239, 9987, 9988, 9989, 9990, 9991, 9992, 9993, 9984, 9985, 9986, 17287, 17288, 17289, 17280, 17281, 17282, 17283, 17284, 17285, 17286, 12288, 12289, 12290, 12291, 12292, 12293, 12294, 12295, 12296, 12297, 19968, 19969, 19970, 19971, 19972, 19973, 19974, 19975, 19976, 19977, 14601, 14592, 14593, 14594, 14595, 14596, 14597, 14598, 14599, 14600, 14603, 14604, 14605, 14606, 14607, 14608, 14609, 14610, 14611, 14602, 17290, 17291, 17292, 17293, 17294, 17295, 17296, 17297, 17298, 17299, 19985, 19986, 19987, 19978, 19979, 19980, 19981, 19982, 19983, 19984, 4224, 4225, 4226, 4227, 4228, 4229, 4230, 4231, 4232, 4233, 6145, 6146, 6147, 6148, 6149, 6150, 6151, 6152, 6153, 6144, 8072, 8073, 8064, 8065, 8066, 8067, 8068, 8069, 8070, 8071, 12299, 12300, 12301, 12302, 12303, 12304, 12305, 12306, 12307, 12298, 10003, 9994, 9995, 9996, 9997, 9998, 9999, 10000, 10001, 10002, 14615, 14616, 14617, 14618, 14619, 14620, 14621, 14612, 14613, 14614, 11153, 11154, 11155, 11146, 11147, 11148, 11149, 11150, 11151, 11152, 19993, 19994, 19995, 19996, 19997, 19988, 19989, 19990, 19991, 19992, 4239, 4240, 4241, 4242, 4243, 4234, 4235, 4236,