Initializing the device in lib load function
This commit is contained in:
committed by
Hongzhi Wang
parent
7b88c36ba6
commit
1247a02f6d
@@ -1613,8 +1613,8 @@ int32_t nrLDPC_decod_offload(t_nrLDPC_dec_params* p_decParams, uint8_t C, uint8_
|
|||||||
0,
|
0,
|
||||||
ad->ops_mempool,
|
ad->ops_mempool,
|
||||||
1,
|
1,
|
||||||
1,
|
get_num_ops(),
|
||||||
1);
|
get_num_lcores());
|
||||||
if (f_ret != TEST_SUCCESS) {
|
if (f_ret != TEST_SUCCESS) {
|
||||||
printf("Couldn't init test op params");
|
printf("Couldn't init test op params");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,20 +78,28 @@ int load_nrLDPClib_offload(void) {
|
|||||||
int ret=load_module_shlib("ldpc_offload",&shlib_decoffload_fdesc,1,NULL);
|
int ret=load_module_shlib("ldpc_offload",&shlib_decoffload_fdesc,1,NULL);
|
||||||
AssertFatal( (ret >= 0),"Error loading ldpc decoder offload");
|
AssertFatal( (ret >= 0),"Error loading ldpc decoder offload");
|
||||||
nrLDPC_decoder_offload = (nrLDPC_decoffloadfunc_t)shlib_decoffload_fdesc.fptr;
|
nrLDPC_decoder_offload = (nrLDPC_decoffloadfunc_t)shlib_decoffload_fdesc.fptr;
|
||||||
|
|
||||||
|
t_nrLDPC_dec_params decParams;
|
||||||
|
t_nrLDPC_dec_params* p_decParams = &decParams;
|
||||||
|
int8_t l[68*384];
|
||||||
|
int8_t llrProcBuf[22*384];
|
||||||
|
|
||||||
|
p_decParams->Z = 384;
|
||||||
|
p_decParams->BG = 1;
|
||||||
|
|
||||||
|
nrLDPC_decoder_offload(p_decParams,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
25344,
|
||||||
|
8,
|
||||||
|
l,
|
||||||
|
llrProcBuf, 0);
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*int load_nrLDPClib_offload(void) {
|
|
||||||
loader_shlibfunc_t shlib_decoffload_fdesc;
|
|
||||||
|
|
||||||
shlib_decoffload_fdesc.fname = "top_testsuite";
|
|
||||||
int ret=load_module_shlib("ldpc_offload",&shlib_decoffload_fdesc,1,NULL);
|
|
||||||
AssertFatal( (ret >= 0),"Error loading ldpc decoder offload");
|
|
||||||
top_testsuite = (nrLDPC_dectopfunc_t)shlib_decoffload_fdesc.fptr;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
int load_nrLDPClib_ref(char *libversion, nrLDPC_encoderfunc_t * nrLDPC_encoder_ptr) {
|
int load_nrLDPClib_ref(char *libversion, nrLDPC_encoderfunc_t * nrLDPC_encoder_ptr) {
|
||||||
loader_shlibfunc_t shlib_encoder_fdesc;
|
loader_shlibfunc_t shlib_encoder_fdesc;
|
||||||
|
|
||||||
|
|||||||
@@ -643,24 +643,6 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
load_nrLDPClib_offload();
|
load_nrLDPClib_offload();
|
||||||
|
|
||||||
t_nrLDPC_dec_params decParams;
|
|
||||||
t_nrLDPC_dec_params* p_decParams = &decParams;
|
|
||||||
int8_t l_ol [68*384];
|
|
||||||
__m128i *pl_ol128 = (__m128i*)&l_ol;
|
|
||||||
int8_t llrProcBuf[22*384];
|
|
||||||
|
|
||||||
p_decParams->Z = 384;
|
|
||||||
p_decParams->BG = 1;
|
|
||||||
|
|
||||||
nrLDPC_decoder_offload(p_decParams,
|
|
||||||
1,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
25344,
|
|
||||||
8,
|
|
||||||
(int8_t*)&pl_ol128[0],
|
|
||||||
llrProcBuf, 0);
|
|
||||||
|
|
||||||
if (snr1set == 0)
|
if (snr1set == 0)
|
||||||
snr1 = snr0 + 10;
|
snr1 = snr0 + 10;
|
||||||
double sampling_frequency;
|
double sampling_frequency;
|
||||||
|
|||||||
Reference in New Issue
Block a user