merge develop and fix CI cross compilation issue
This commit is contained in:
@@ -322,9 +322,9 @@ add_definitions("-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAV
|
|||||||
set(commonOpts "-pipe -Wno-packed-bitfield-compat -fPIC -Wall -fno-strict-aliasing -rdynamic")
|
set(commonOpts "-pipe -Wno-packed-bitfield-compat -fPIC -Wall -fno-strict-aliasing -rdynamic")
|
||||||
|
|
||||||
set(CMAKE_C_FLAGS
|
set(CMAKE_C_FLAGS
|
||||||
"${CMAKE_C_FLAGS} ${C_FLAGS_PROCESSOR} ${commonOpts} -std=gnu99 -funroll-loops")
|
"${CMAKE_C_FLAGS} ${C_FLAGS_PROCESSOR} ${commonOpts} -std=gnu99 -funroll-loops -mpclmul")
|
||||||
set(CMAKE_CXX_FLAGS
|
set(CMAKE_CXX_FLAGS
|
||||||
"${CMAKE_CXX_FLAGS} ${C_FLAGS_PROCESSOR} ${commonOpts} -std=c++11")
|
"${CMAKE_CXX_FLAGS} ${C_FLAGS_PROCESSOR} ${commonOpts} -std=c++11 -mpclmul")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -150,11 +150,12 @@ can use SIMD optimized Intel CRC for LTE/NR 24a/24b variants
|
|||||||
unsigned int crc24a (unsigned char * inptr,
|
unsigned int crc24a (unsigned char * inptr,
|
||||||
int bitlen)
|
int bitlen)
|
||||||
{
|
{
|
||||||
|
int octetlen = bitlen / 8; /* Change in octets */
|
||||||
|
|
||||||
int octetlen = bitlen / 8; /* Change in octets */
|
if ( bitlen % 8 || !__builtin_cpu_supports ("pclmul") ) {
|
||||||
#ifndef USE_INTEL_CRC
|
|
||||||
unsigned int crc = 0;
|
unsigned int crc = 0;
|
||||||
int resbit= (bitlen % 8);
|
int resbit= (bitlen % 8);
|
||||||
|
|
||||||
while (octetlen-- > 0) {
|
while (octetlen-- > 0) {
|
||||||
// printf("crc24a: in %x => crc %x\n",crc,*inptr);
|
// printf("crc24a: in %x => crc %x\n",crc,*inptr);
|
||||||
crc = (crc << 8) ^ crc24aTable[(*inptr++) ^ (crc >> 24)];
|
crc = (crc << 8) ^ crc24aTable[(*inptr++) ^ (crc >> 24)];
|
||||||
@@ -163,10 +164,10 @@ unsigned int crc24a (unsigned char * inptr,
|
|||||||
if (resbit > 0)
|
if (resbit > 0)
|
||||||
crc = (crc << resbit) ^ crc24aTable[((*inptr) >> (8 - resbit)) ^ (crc >> (32 - resbit))];
|
crc = (crc << resbit) ^ crc24aTable[((*inptr) >> (8 - resbit)) ^ (crc >> (32 - resbit))];
|
||||||
return crc;
|
return crc;
|
||||||
#else
|
} else {
|
||||||
return crc32_calc_pclmulqdq(inptr, octetlen, 0,
|
return crc32_calc_pclmulqdq(inptr, octetlen, 0,
|
||||||
<e_crc24a_pclmulqdq);
|
<e_crc24a_pclmulqdq);
|
||||||
#endif
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -183,10 +184,12 @@ static DECLARE_ALIGNED(struct crc_pclmulqdq_ctx lte_crc24b_pclmulqdq, 16) = {
|
|||||||
unsigned int crc24b (unsigned char * inptr,
|
unsigned int crc24b (unsigned char * inptr,
|
||||||
int bitlen)
|
int bitlen)
|
||||||
{
|
{
|
||||||
int octetlen= bitlen / 8;
|
int octetlen = bitlen / 8; /* Change in octets */
|
||||||
#ifndef USE_INTEL_CRC
|
|
||||||
|
if ( bitlen % 8 || !__builtin_cpu_supports ("pclmul") ) {
|
||||||
unsigned int crc = 0;
|
unsigned int crc = 0;
|
||||||
int resbit = (bitlen % 8);
|
int resbit = (bitlen % 8);
|
||||||
|
|
||||||
while (octetlen-- > 0) {
|
while (octetlen-- > 0) {
|
||||||
// printf("crc24b: in %x => crc %x (%x)\n",crc,*inptr,crc24bTable[(*inptr) ^ (crc >> 24)]);
|
// printf("crc24b: in %x => crc %x (%x)\n",crc,*inptr,crc24bTable[(*inptr) ^ (crc >> 24)]);
|
||||||
crc = (crc << 8) ^ crc24bTable[(*inptr++) ^ (crc >> 24)];
|
crc = (crc << 8) ^ crc24bTable[(*inptr++) ^ (crc >> 24)];
|
||||||
@@ -196,10 +199,10 @@ unsigned int crc24b (unsigned char * inptr,
|
|||||||
crc = (crc << resbit) ^ crc24bTable[((*inptr) >> (8 - resbit)) ^ (crc >> (32 - resbit))];
|
crc = (crc << resbit) ^ crc24bTable[((*inptr) >> (8 - resbit)) ^ (crc >> (32 - resbit))];
|
||||||
|
|
||||||
return crc;
|
return crc;
|
||||||
#else
|
} else {
|
||||||
return crc32_calc_pclmulqdq(inptr, octetlen, 0,
|
return crc32_calc_pclmulqdq(inptr, octetlen, 0,
|
||||||
<e_crc24b_pclmulqdq);
|
<e_crc24b_pclmulqdq);
|
||||||
#endif
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int crc24c (unsigned char * inptr,
|
unsigned int crc24c (unsigned char * inptr,
|
||||||
|
|||||||
@@ -38,12 +38,12 @@
|
|||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
unsigned int n_segments; // optim8seg
|
unsigned int n_segments; // optim8seg
|
||||||
unsigned int macro_num; // optim8segmulti
|
unsigned int macro_num; // optim8segmulti
|
||||||
unsigned char gen_code; //orig
|
unsigned char gen_code; //orig
|
||||||
time_stats_t *tinput;
|
time_stats_t *tinput;
|
||||||
time_stats_t *tprep;
|
time_stats_t *tprep;
|
||||||
time_stats_t *tparity;
|
time_stats_t *tparity;
|
||||||
time_stats_t *toutput;
|
time_stats_t *toutput;
|
||||||
int Kr;
|
int Kr;
|
||||||
uint32_t Kb;
|
uint32_t Kb;
|
||||||
uint32_t *Zc;
|
uint32_t *Zc;
|
||||||
@@ -58,10 +58,10 @@ typedef struct {
|
|||||||
uint32_t F;
|
uint32_t F;
|
||||||
/// LDPC-code outputs
|
/// LDPC-code outputs
|
||||||
uint8_t *d[MAX_NUM_NR_DLSCH_SEGMENTS];
|
uint8_t *d[MAX_NUM_NR_DLSCH_SEGMENTS];
|
||||||
}encoder_implemparams_t;
|
} encoder_implemparams_t;
|
||||||
#define INIT0_LDPCIMPLEMPARAMS {0,0,0,NULL,NULL,NULL,NULL}
|
#define INIT0_LDPCIMPLEMPARAMS {0,0,0,NULL,NULL,NULL,NULL}
|
||||||
typedef void(*nrLDPC_initcallfunc_t)(t_nrLDPC_dec_params* p_decParams, int8_t* p_llr, int8_t* p_out);
|
typedef void(*nrLDPC_initcallfunc_t)(t_nrLDPC_dec_params *p_decParams, int8_t *p_llr, int8_t *p_out);
|
||||||
typedef int(*nrLDPC_encoderfunc_t)(unsigned char **,unsigned char **,int,int,short, short, encoder_implemparams_t*);
|
typedef int(*nrLDPC_encoderfunc_t)(unsigned char **,unsigned char **,int,int,short, short, encoder_implemparams_t *);
|
||||||
//============================================================================================================================
|
//============================================================================================================================
|
||||||
// decoder interface
|
// decoder interface
|
||||||
/**
|
/**
|
||||||
@@ -71,5 +71,5 @@ typedef int(*nrLDPC_encoderfunc_t)(unsigned char **,unsigned char **,int,int,sho
|
|||||||
\param p_llrOut Output vector
|
\param p_llrOut Output vector
|
||||||
\param p_profiler LDPC profiler statistics
|
\param p_profiler LDPC profiler statistics
|
||||||
*/
|
*/
|
||||||
typedef int32_t(*nrLDPC_decoderfunc_t)(t_nrLDPC_dec_params* , int8_t*, int8_t* , t_nrLDPC_procBuf* , t_nrLDPC_time_stats* );
|
typedef int32_t(*nrLDPC_decoderfunc_t)(t_nrLDPC_dec_params *, int8_t *, int8_t *, t_nrLDPC_procBuf *, t_nrLDPC_time_stats * );
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user