Commit f36a1b42 authored by Raphael Defosseux's avatar Raphael Defosseux

Merge remote-tracking branch 'origin/NCTU_OpinConnect_LDPC' into develop_integration_2020_w34

parents a8ea336c d4603636
...@@ -396,17 +396,17 @@ int test_ldpc(short No_iteration, ...@@ -396,17 +396,17 @@ int test_ldpc(short No_iteration,
decParams.numMaxIter=No_iteration; decParams.numMaxIter=No_iteration;
decParams.outMode = nrLDPC_outMode_BIT; decParams.outMode = nrLDPC_outMode_BIT;
//decParams.outMode =nrLDPC_outMode_LLRINT8; //decParams.outMode =nrLDPC_outMode_LLRINT8;
#ifdef CUDA_FLAG
set_compact_BG(Zc,BG);
for(j=0;j<n_segments;j++) { init_LLR_DMA_for_CUDA(&decParams, (int8_t*)channel_output_fixed[j], (int8_t*)estimated_output[j], block_length);
#endif
for(j=0;j<n_segments;j++) {
start_meas(time_decoder); start_meas(time_decoder);
#ifdef CUDA_FLAG #ifdef CUDA_FLAG
if(run_cuda){ if(run_cuda){
printf("***********run ldpc by cuda\n");
n_iter = nrLDPC_decoder_LYC(&decParams, (int8_t*)channel_output_fixed[j], (int8_t*)estimated_output[j], block_length, time_decoder); n_iter = nrLDPC_decoder_LYC(&decParams, (int8_t*)channel_output_fixed[j], (int8_t*)estimated_output[j], block_length, time_decoder);
} }
else{ else{
printf("**************run ldpc by cpu\n");
// decode the sequence // decode the sequence
// decoder supports BG2, Z=128 & 256 // decoder supports BG2, Z=128 & 256
//esimated_output=ldpc_decoder(channel_output_fixed, block_length, No_iteration, (double)((float)nom_rate/(float)denom_rate)); //esimated_output=ldpc_decoder(channel_output_fixed, block_length, No_iteration, (double)((float)nom_rate/(float)denom_rate));
...@@ -516,6 +516,9 @@ int test_ldpc(short No_iteration, ...@@ -516,6 +516,9 @@ int test_ldpc(short No_iteration,
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#ifdef CUDA_FLAG
warmup_for_GPU();
#endif
unsigned int errors, errors_bit, crc_misses; unsigned int errors, errors_bit, crc_misses;
double errors_bit_uncoded; double errors_bit_uncoded;
short block_length=8448; // decoder supports length: 1201 -> 1280, 2401 -> 2560 short block_length=8448; // decoder supports length: 1201 -> 1280, 2401 -> 2560
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -23,4 +23,12 @@ ...@@ -23,4 +23,12 @@
int32_t nrLDPC_decoder_LYC(t_nrLDPC_dec_params* p_decParams, int8_t* p_llr, int8_t* p_out, int block_length, time_stats_t *time_decoder); int32_t nrLDPC_decoder_LYC(t_nrLDPC_dec_params* p_decParams, int8_t* p_llr, int8_t* p_out, int block_length, time_stats_t *time_decoder);
void init_LLR_DMA_for_CUDA(t_nrLDPC_dec_params* p_decParams, int8_t* p_llr, int8_t* p_out, int block_length);
void warmup_for_GPU(void);
void set_compact_BG(int Zc, short BG);
#endif #endif
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