Commit 7b88c36b authored by Hongzhi Wang's avatar Hongzhi Wang Committed by Hongzhi Wang

moving more init functions to device initialization

parent 6532db12
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#define __NRLDPC_DEFS__H__ #define __NRLDPC_DEFS__H__
#include <openair1/PHY/defs_nr_common.h> #include <openair1/PHY/defs_nr_common.h>
#include "openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_types.h" #include "openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_types.h"
/** /**
\brief LDPC encoder \brief LDPC encoder
\param 1 input \param 1 input
...@@ -73,8 +74,7 @@ typedef int(*nrLDPC_encoderfunc_t)(unsigned char **,unsigned char **,int,int,sho ...@@ -73,8 +74,7 @@ typedef int(*nrLDPC_encoderfunc_t)(unsigned char **,unsigned char **,int,int,sho
*/ */
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* );
//typedef int32_t(*nrLDPC_decoffloadfunc_t)(t_nrLDPC_dec_params* , int8_t*, int8_t* , t_nrLDPC_procBuf* , t_nrLDPC_time_stats* ); typedef int32_t(*nrLDPC_decoffloadfunc_t)(t_nrLDPC_dec_params* , uint8_t , uint8_t, uint16_t, uint32_t, uint8_t, int8_t*, int8_t* ,uint8_t);
typedef int32_t(*nrLDPC_decoffloadfunc_t)(t_nrLDPC_dec_params* , uint8_t , uint8_t, uint16_t, uint32_t, uint8_t, int8_t*, int8_t* ,uint8_t );
typedef int32_t(*nrLDPC_dectopfunc_t)(void); typedef int32_t(*nrLDPC_dectopfunc_t)(void);
#endif #endif
...@@ -602,17 +602,17 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB, ...@@ -602,17 +602,17 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
{ {
pl_ol128[j] = _mm_packs_epi16(pv_ol128[i],pv_ol128[i+1]); pl_ol128[j] = _mm_packs_epi16(pv_ol128[i],pv_ol128[i+1]);
} }
ret = nrLDPC_decoder_offload(p_decParams, ret = nrLDPC_decoder_offload(p_decParams,
1, //harq_process->C, 1,
pusch_pdu->pusch_data.rv_index, pusch_pdu->pusch_data.rv_index,
harq_process->F, harq_process->F,
E, E,
Qm, Qm,
(int8_t*)&pl_ol128[0], (int8_t*)&pl_ol128[0],
llrProcBuf, 1); llrProcBuf, 1);
for (int m=0; m < Kr>>3; m ++) { for (int m=0; m < Kr>>3; m ++) {
harq_process->c[r][m]= (uint8_t) llrProcBuf[m]; harq_process->c[r][m]= (uint8_t) llrProcBuf[m];
} }
......
...@@ -648,17 +648,19 @@ int main(int argc, char **argv) ...@@ -648,17 +648,19 @@ int main(int argc, char **argv)
int8_t l_ol [68*384]; int8_t l_ol [68*384];
__m128i *pl_ol128 = (__m128i*)&l_ol; __m128i *pl_ol128 = (__m128i*)&l_ol;
int8_t llrProcBuf[22*384]; int8_t llrProcBuf[22*384];
p_decParams->Z = 384;
p_decParams->BG = 1;
nrLDPC_decoder_offload(p_decParams, nrLDPC_decoder_offload(p_decParams,
1, 1,
0, 0,
0, 0,
0, 25344,
2, 8,
(int8_t*)&pl_ol128[0], (int8_t*)&pl_ol128[0],
llrProcBuf, 0); llrProcBuf, 0);
if (snr1set == 0) if (snr1set == 0)
snr1 = snr0 + 10; snr1 = snr0 + 10;
double sampling_frequency; double sampling_frequency;
......
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